Modifying A* pathfinding based on size of moving object

I've implemented basic A* pathfinding in my top-down 2D game, and I'm almost ready to test it, but I thought of something while adding the movement code to my enemies that I think could affect the pathfinding.  My tiles are 64x64 px, and most enemies are as well. However, I do have some boss monsters that are larger than that. My initial thought was that to move to their goal, they have to move toward each node in their path, and to determine whether they've arrived at that node and to start targeting the next node, I need to test the distance between the enemy and their current target node. So what happens if, for example, their next node is next to a wall, and because of their size, their center is too far to "reach" the node?  My solution to that would be to check if the distance between their center of mass and the next node location is less than half the enemy's width plus maybe 10 px. However, what if one of their movement nodes is in between two tiles, and they're too large to fit through the two objects the node goes between? Is there a simple way to modify A* that takes size into account?


Let $f,g\in PC(2\pi)$ continuous. Show that $$\lim_{n\to \infty}\int_{-\pi}^{\pi}f(x)g(nx)\,dx=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)\,dx\int_{-\pi}^{\pi}g(x)\,dx$$ Where if $f\in PC(2\pi)$ then $\int_{-\pi}^{\pi}f(x)\,dx=\int_c^{c+2\pi}f(x)\,dx \quad\forall c\in\mathbb{R}.$ I've been struggling with this proof. Any suggestions would be great!


So we all know its there, and we all know how to fix it, but adding the extra steps to have to change the interpolation on every new animation just plain sucks. To be honest I don't find this feature useful as a default at all because more times than not we have to correct for it.  Is there an option somewhere to turn auto ease in off? (I personally think this should be the default and should require user to turn it on if they want it).


What is the program of quantum field theory? What is its derivation?

Paraphrasing Griffith's: For some particle of mass m constrained to the x-axis subject to some force $F(x,t)=-∂V/∂x$, the program of classical mechanics is to determine the particle's position at any given time: $x(t)$. This is obtained via Newton's second law $F=ma$. $V(x)$ together with an initial condition determines $x(t)$.  The program of quantum mechanics is to obtain the particle's wave function $\Psi(x,t)$, gotten from solving the Schrôdinger equation:  $$i \hbar \frac{∂\Psi}{∂t} = -\frac{\hbar^2}{2m}\frac{∂^2\Psi}{∂x^2} + V\Psi .$$  This is a simple case, but it illustrates the program, and generalizes to multiple particles, 3 dimensions, spin, and magnetism easily.  What is the equivalent program of quantum field theory?  And also, what is the specific representation of the "state" within that program? For example, in quantum mechanics for 1 particle in 3 dimensions, excluding spin, $\Psi: R\times R^3 \rightarrow C $ subject to normalization constraints.  Another property of the previous two programs is that it is immediately clear how the state variables evolve numerically over time (if not calculable).  And for such a solution program, is there an algebraic derivation, the way the Galilean group provides such a derivation for the Schrôdinger equation in quantum mechanics?  I'm aware of second quantization, and that particle number changes, and I've seen various Langrangians, but only for specific cases, and these are unsatisfying compared to the seemingly generic programs of other branches.  An answer dependent on Hamiltonian mechanics, classical field theory, exterior calculus, or abstract algebra is fine.  Edit: This is not a duplicate. I've seen the other question, and it's getting at how QFT differs from single-particle QM generally. I'm asking what is the specific solution program that is just generic enough to encompass all of quantum field theory, and incidentally the mathematical structure of the instances of the state variables in it, and also incidentally whether an algebraic derivation of the program exists.


Proving that doesn't exist subgroup H with order 6 in $A_4$

Let $G=A_4$. Prove that does not exist subgroup $H\le G$ s.t $|H|=6$.   I don't know from where to start (maybe I need to prove that if so $H\triangleleft A_4 $?) Any hint will be appreciated.


Use Ctrl + C and Ctrl + V for Copy and Paste

Right now, I have Copy and Paste bound to Ctrl + Shift + C and Ctrl + Shift + V in the Ubuntu terminal. However, that is not ideal. I would like Copy and Paste to work like in any other application, using Ctrl + C and Ctrl + V. Q1: When I bind Copy to Ctrl + C, how can I then kill processes? Q2: Would it be possible to bind kill processes to Ctrl + Shift + C ?


I am looking for a recommendation for a somewhat powerful but more importantly user friendly CMS for .NET.   The ones I have found seem decent at best.  If you say DotNetNuke I will be tempted to reach through this screen and slap you...  Edit: I have made it community wiki. Please add 1 CMS per answer so the best may rise to the top.


I am appending data dynamically to my table as:  function myFunctionEdit() {  var table = document.getElementById("nomiTable"); var len = table.rows.length; var row = table.insertRow(len); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2); var cell4 = row.insertCell(3); var cell5 = row.insertCell(4); var cell6 = row.insertCell(5);  cell1.innerHTML = len; cell2.innerHTML = name; cell3.innerHTML = dob; cell4.innerHTML = relation; cell5.innerHTML = share; cell6.innerHTML = "";  $('#editNomiModal').modal('hide'); return false; }   My table structure is:

 ..

 ..Dynamically generated columns...
   JQuery Function on #editNominHref click:  $("#editNominHref").on('click', function(e)  { alert($(this).closest('tr').index()); });   Problem: The method does not work on dynamically generated Edit Hrefs. Any help would be highly appreciated.


Shortcut to switch between different spreadsheet in excel?

Is there a keyboard-shortcut to switch between different sheet in MS-excel?


it is clear that "Vanilla" means that component that we add to our food , and no one don't know the meaning of "experiences" but i can't got it in this context , and i thi,k that it is a slang or idiomatic expression , could you help getting the meaning of it :  " right there in front of them now without commenting on whether these people were already very socially awkward in the first place I thought it was very interesting how even with vanilla experiences one could be so used to reducing themselves to a voyeur that they come to prefer that rather than the real deal  "


How to fix keyboard shortcut toggle for keyboard layout?

I use both German and US American layout. For convenience, I defined a shortcut to toggle these via Scroll. I also have an indicator on the top gnome shell bar that shows the current layout.  Yet recently, I assume it has something to do with the 13.10 upgrade, pressing the shortcut does not toggle the layout in the current application even though the indicator shows the change. Strangely, going into the keyboard applet via mouse and there selecting the layout works.  How do I get the keyboard shortcut working again?


My wife and kids are due to fly from Kiev via Frankfurt to Heathrow with Lufthansa. I meet them at Heathrow and we all fly British Airways to Miami.  They all have US visas for their trip to Miami. My question is based around the fact that they won't be able to check their bags from Kiev to Miami and will have to collect at Heathrow. Will they be able to do this without any sort of transit visa?   The flight is in a week and I am just became aware that this could be a problem.


I have Windows 8 Enterprise x64. It's installed a virtual machine. After trying to update VMWare's guest extension it black screened. After resetting it, now the virtual machine won't boot. It just says "automatic repair couldn't repair your PC"   Everything I do ends with an error or it coming back to this screen. If I go to Troubleshoot > Advanced Options > Start up settings and then go to Safe Mode, all it will do is say "preparing automatic repair" and then "diagnosing your PC" and then will come straight back to the "automatic repair couldn't repair your PC" screen. It's as if it doesn't even attempt to go into safe made.   Is there anything else I can do before I reformat?


Consider a RSA key file like this:  -----BEGIN PUBLIC KEY----- MIIBITANBgkqhkiG9w0BAQEFAAOCAQ4AMIIBCQKCAQBUndTbDYZ9HM8WxZRHi6ir Oi1XbiZzRk+ABErWWDxbDc+wo9jM4FSXEPiaZsBtrjgggZu9naCoKTue2BC7FEGh wuRazFP5OnGp9ojq8xoDKtWcREtyfLC2UdYNuA0WrJBr7gUol+Mn5DTKxUFV5KLj 45JDiB2zYPDLzxWWTggjp2pK7u0jHOThMy+Af7Q886itbFrbbesj30VTLRSXn7sm LkuQU8g0IyiQeCZuPACjqFkYFa68DjqAZlRr5EoZp88IRoNonWQv14GBv+kDBeUu 2fYZpet0z3srNyjgWPsEQLBUPPWyxcrtwhJpu5I6wLqs91w49LMsbkec8nwjqDgL AgMBAAE= -----END PUBLIC KEY-----   How does that tell a program how to encrypt? Can I decode this key and see the its components?


Why can't enum's constructor access static fields?

Why can't enum's constructor access static fields and methods? This is perfectly valid with a class, but is not allowed with an enum.  What I'm trying to do is store my enum instances in a static Map. Consider this example code which allows lookup by abbreivation:  public enum Day {     Sunday("Sun"), Monday("Mon"), Tuesday("Tue"), Wednesday("Wed"), Thursday("Thu"), Friday("Fri"), Saturday("Sat");      private final String abbreviation;      private static final Map<String, Day> ABBREV_MAP = new HashMap<String, Day>();      private Day(String abbreviation) {         this.abbreviation = abbreviation;         ABBREV_MAP.put(abbreviation, this);  // Not valid     }      public String getAbbreviation() {         return abbreviation;     }      public static Day getByAbbreviation(String abbreviation) {         return ABBREV_MAP.get(abbreviation);     } }   This will not work as enum doesn't allow static references in its constructor. It however works just find if implemented as a class:  public static final Day SUNDAY = new Day("Sunday", "Sun"); private Day(String name, String abbreviation) {     this.name = name;     this.abbreviation = abbreviation;     ABBREV_MAP.put(abbreviation, this);  // Valid }


Proof of $S_{n,r} = \frac{1}{r!} \sum_{k=0}^r (-1)^{r-k} \binom{r}{k} k^n$ with inclusion-exclusion principle

For $n, r \in \mathbb{N}$,  $(X_1, ...,X_r)$ is an ordered partition of $[n]$ in $r$ non-empty sets, if $X_1,..., X_r$ are disjoint and non-empty subsets  of $[n]$ for which it holds that $X_1 \cup  ... \cup X_r = [n]$. How can one prove that $$S_{n,r} = \frac{1}{r!} \sum_{k=0}^r (-1)^{r-k} \binom{r}{k} k^n$$ In another  here, I found this  A function $f:X \to Y$ is called surjective when each of its preimages isn't empty. They form a partition of $Y$ into $k=|X|$ "blocks". On the other hand each partition from $Y$ into $k$ "blocks" lead to $n!$ surjective functions from $X$ to $Y$. Let denote $S_{n,k}$ they number of these partitions. They are basically the Stirling numbers of the second kind. You can calculate the Stirling numbers by the following recursion: $S_{n,k} = S_{n-1,k-1}+ k S_{n-1,k}$. This can be seen in the following way: The set of all partitions of the Set $Y:=[n]$ with $[n]=\{1,2,3,...,n\}$ decay in two disjoint subsets.  all partitions with $n \in Y$ is an own "block" of the partition all partitions with $n \in Y$ isn't an own "block" of the partition  ad 1) you can remove the the "block" {n} and this leads to a partition of $[n-1]$ into $k-1$ blocks and that is given by $S_{n-1,k-1}$. ad 2) you can remove $n$ from his corresponding "block" and this leads to a partition of $[n-1]$ into $k$ "blocks" but from each such partition you can make $k$ partitions of $[n]$ when u put the element $n$ back to one "block". Therefore we have $k S_{n-1,k}$. When you solve this recursion this leads to $S_{n,k} = \frac{1}{k!} \sum_{i=0}^{k} \binom{k}{i} (-1)^{k-i} i^n$  but I'm looking for an answer that uses the inclusion-exclusion principle.


How to select featured images for 1500 posts?

I have over 1500 posts I imported from Tumblr. While the images were imported into the gallery, I need to make sure there's a featured image for each. How do I make the images (12 per post minus 30 that don't have images) a featured image automatically?


What is the ᴄᴏʀʀᴇᴄᴛ English pronunciation of a character pointer in C-like programming languages?

In programming languages like C, Go, and C++, the  is denoted using:  char *   What is the correct English pronunciation for this data type?   Is it /kɑr stɑr/, so with the ‹ch› of char pronounced as in character /ˈkerəktər/ and choir /kwɑɪr/?  Is it /tʃɑr stɑr/, so with the ‹ch› of char pronounced as in chair /tʃer/ and child /tʃɑɪld/?    My colleague has been arguing that the correct way is the second version, not the first version.  Who’s right?


Story about a man bringing nanomachines from the future to save his lover

Many years ago I read a short (?) sci-fi story that I've since lost track of.  Here's what I remember:   A man came from the future, met a girl, fell in love, told her he was from the future and (not so sure about this part) found out that she was dying and left her a pill/shot of nanomachines to save her from her illness The girl lived in a remote part of the United States (?), in a very distinct rural area with mountains and trees that meant a lot to her. Said man then went back to the future (?), Humanity gained access to nanomachines, became immortal and started exploring the Universe. The girl/woman was one of the the first explorers and visited many planets She came back from her exploration, back to the place where she was born to wander amongst the tress/mountains she grew up with The nanomachines were injected in the brain stem   Sorry in advance if the details are a bit fuzzy but it was many years ago. Scoured Google but was unable to find anything (likely on the account of misremembering some/most of the details).


My account was hacked I and need to reset my password.   What icon do I click? I can't see where it is written "change your Logon".


Can there be a symbol for continuous product?

We know that continuous version of $\sum$ is $\int$, but, can there be a continuous version of $\Pi$?


I just have a question regarding my following code for quicksort in Java.  public class QuickSort{  public void sort(int array[]){    quickSort(array,0,array.length-1); }  public void quickSort(int array[], int left, int right){     int index = partition(array,left,right);     if(left<index-1){         quickSort(array,left,index-1);       }     if(index<right){         quickSort(array,index,right);     } }  public int partition(int array[], int left, int right){     int pivot = array[(left+right)/2];     while(left<=right){         while(array[left]<pivot){             left++;         }         while(pivot<array[right]){             right--;         }          if(left<=right){             int temp=array[left];             array[left]=array[right];             array[right]=temp;             left++;             right--;         }     }     return left; }  public static void main(String args[]){      int iArr[] = {23,44,1,2009,2,88,123,7,999,1040,88};     QuickSort ms = new QuickSort();     ms.sort(iArr);      for(int i=0;i<iArr.length;i++){         System.out.println(iArr[i]);     } }}   In the above code, I pass an array to a method for sorting which does not return anything. Hence, the original array in the main method must be still unsorted. But, when I try to print the values of the original array in the main method after calling sort method, they are somehow sorted.  How can the array in the main method be sorted, when I have not returned anything from the sort method. I know the scope is only restricted to the method.  Please explain me.


I recently started a C# project (VS 2008) as a 'Console' project where I wrote a few libraries, test programs, etc.  Now I'd like to add a couple of WPF windows, but it looks like console project won't let me do that.  I'm coming from Java so this is a little strange.  How can I add a WPF form (which I will instantiate my self from my "main" class?


I would like to use a number that is a fraction of one constant and one argument of function. I tried:  \newcommand{\myfunction}[1]{ \newcommand{\tailleimg}{0.95/#1} }   But I get an error  ! Illegal unit of measure (pt inserted).   Adding units after the fraction does not solve the problem. What can I do?


How to write a multilingual regex validation for Russian + Persian + Chinese + English languages?

I have finally figured out how to validate inserted  russian text in my  tag by       mask = jQuery.extend({unitprmask:/^\d+(\.\d{1,1})?$/,expressmask:/^\d+(\.\d{1,1})?$/,qtymask:/^\d+(\.\d{1,1})?$/,yourdescdmask:/^[а-яА-Я\p{Cyrillic}0-9\s\-]{1,10}$/,URLmask:/^(https?|ftp):\/\/(.*)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/});   But I want to allow users to write in the  in mixed languages " Russian + Persian + Chinese + English". how can I make it happened using regex? what should I add to the above code, I have tried to add a-zA-Z to validate english letters but i wasn't successful. I am actually not able to add other languages, the one I wrote     yourdescdmask:/^[а-яА-Я\p{Cyrillic}0-9\s\-]{1,10}$/   will allow Russian text only.   Could you please help me out here?  Thanks


How to use ssh-agent with multiple (valid) keys and yet choose which one to use?

Let's say there are two keys A and B, both of which are valid for user@host public key authentication. Since authorized_keys is configured for different behaviour depending on the key, ~/.ssh/config on the client uses something like  Host A.host     HostName host     User user     IdentityFile ~/.ssh/A Host B.host     HostName host     User user     IdentityFile ~/.ssh/B   That works fine. However, the moment I use ssh-agent and add both keys A and B (e.g. in order to enter their passphrases at login instead of when I call the respective ssh A.host or ssh B.host), the connection will always use the same id for both virtual hosts. Is there any way to specify which stored key ssh should use from ssh-agent without having to remove the other key?


Div value in domxpath keeps changing- Automation anywhere

i have to get the Inner text based on dom x- path, but in the x-path div value keeps changing. how do i do it in automation anywhere object cloning in Chrome browser.  The xpath I am using is:  /html/body/div[5]/div[1]/section[1]/div[2]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[1]/table[1]/tbody[1]/tr[1]/td[5]/span[1]/span[1] /html/body/div[5]/div[1]/section[1]/div[2]/div[1]/div[1]/div[3]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[2]/div[1]/div[1]/div[1]/table[1]/tbody[1]/tr[1]/td[5]/span[1]/span[1]


Where is my iPhone backup kept? (Created prior iOS5 upgrade)

I've just updated my wife's 3GS to iOS 5.1 from iOS 4. The restore seem to only restore the messages/photo roll and some other settings. I don't see most of the apps but the most important part is the contacts are missing. This is why I'm looking for the iPhone backup that iTunes creates before updating the software.   I currently have tried the following:   Turn off iCloud Turn on then off iCloud Adding a Contact Restoring from the last backup file(without timestamp) Reset to Factory defaults and restoring Copying from Sim (Has some older contacts, not the recent ones) Using iBackupBot to browse the backups (only iOS5 backups seem to be there)   Here are some other valid points:  1. The iPhone isn't regularly synced  2. I created a backup before updating the OS I can't find it anywhere now  3. There's no contacts on the Mac's Address Book.  4. There is only Sim contacts in the iCloud sync  5. iBackupBot shows me there are no other contacts other than the Sim ones that got synced to iCloud  6. There are existing SMS-es without Contact Names  7. I can try to correlate the SMSes with names but it will not give me the full contact list.  Since the Messages are restored, the contacts must be kept somewhere can anyone help me? I'm pretty sure I just need to find the backup that was created for the Update and somehow grab all the contacts maybe using ibackupbot.


Error with Spreadsheet::ParseExcel::Simple in Perl

I have a perl script which extracts rows from many Excel spreadsheets in a directory, however, it's not working due to some error messages:   I didn't know why I had this error since I only used Spreadsheet::ParseExcel::Simple twice in my script:   use Spreadsheet::ParseExcel::Simple; my $xls = Spreadsheet::ParseExcel::Simple->read($exxfilename);   Here's the whole chunk of code for your reference:   # Get rows from many Excel spreadsheets in a directory ###################################  #! /usr/local/bin/perl -w use strict; use Spreadsheet::ParseExcel::Simple;  #---------------------------------------------------------------------------------------------------------- # Read Directory #-------------------------------------------------------------------------------   ---------------------------    my $excel_directory=getcwd;  my $out_directory = 'xxxout'; opendir(EXCELDIR, $excel_directory) || die ("no excel directory"); my @excelfiles = readdir(EXCELDIR); closedir(EXCELDIR);  chdir($excel_directory);    my $LPHname;    # String to hold Local Public Health Name.    my @sheetarray; # Array to hold the row.    my $sheetcount; # Array element in the row.    my $sheetname; # Name of the Excel spreadsheet.    my $sheettemp;  # Temporary string to hold row for join.    my $cellnumber;  # Cell number in the row.    my $cellwanted;  # Cell number in the row.    my $rowwanted;  # Row number wanted.    my $county_namecell;  # Cell for county name.    my $county_namerow;  # Row for county name.  foreach my $exxfilename (@excelfiles){  if ($exxfilename =~ /^\.+.*/) { next; }  my $xls = Spreadsheet::ParseExcel::Simple->read($exxfilename);  foreach my $sheet ($xls->sheets) {    $sheetname= $sheet->{sheet}->{Name}; # Sheet Name    if ($sheetname !~ '2007 Budget') { next; }    $sheetcount=0;    $county_namecell=11;    $county_namerow=1; #      $cellwanted=4;    $rowwanted=11;     while ($sheet->has_data) {         my @data = $sheet->next_row;         $sheetcount++;      if ($sheetcount==$county_namerow){         $cellnumber=0;         foreach my $ttcell (@data) {             $cellnumber++;             if ($cellnumber != $county_namecell ){next;};              $sheettemp=$sheetarray[$sheetcount]; #                 $sheetarray[$sheetcount]=join("\t",$sheettemp,$ttcell);              $LPHname=$ttcell;         }      }   #        if (($sheetcount < ($rowwanted-1)) ||             ($sheetcount > ($rowwanted+7))){next;}      if ($sheetcount != $rowwanted){next;};      $cellnumber=0;      $sheetarray[$sheetcount]=join("\t",$sheettemp,$LPHname);      foreach my $ttcell (@data) {         $cellnumber++;  #    if ($cellnumber != $cellwanted ){next;};         $sheettemp=$sheetarray[$sheetcount];         $sheetarray[$sheetcount]=join("\t",$sheettemp,$ttcell);      }    } } foreach my $sheetline (@sheetarray){     print $sheetline,"\n"; } } exit


How to catch keystrokes in Linux environment

I need a C code to be executed when some particular keys are pressed in Linux "Desktop" environment.  What are the ways to register for such an event and How?  Should I write ISR for that? I need an exact part of Linux from where I can get this call.  Which part of OS handles stuff like these, Is it part Desktop environment like GNOME or part of some service?


Is there any easy way to parse machine generated log files? Here is 1 line from the file that I am trying to read and save to SQL.  import re  mytext='''2018-07-22 08:12:02 Receive DR [SMAC:PI_ID_VOP3_N_K_T] [SVC:vikan2] [ACT:vitp3] [BINF:] [FID:e6f97a4b-c4bc-4aa1-876b-3a5ce40b4cfd] [META:?spp?dl_err=%03%00% 00&] [from:ALERTS] [to:91985] [flags:-1:-1:-1:-1:1] [msg:132:id:e6f97a4b-c4bc-4aa1-876b-3a5ce40b4cfd sub:001 dlvrd:001 submit date:180722070002 done date:1807220 81157 stat:DEL err:000 text:] [udh:0:]  '''  values = re.search(r'SVC:(.*)]', mytext) print (values.groups())   Intead of returning only 'vikan2' it returns a long string...     ('vikan2] [ACT:vitp3] [BINF:]   [FID:e6f97a4b-c4bc-4aa1-876b-3a5ce40b4cfd',)   I am trying to convert the string to dictionary that will look like this...  {'log_date':'2018-07-22 08:12:02', 'log_entry':'Receive DR',      'SMAC': 'PI_ID_VOP3_N_K_T',      'SVC': 'vikan2',      'ACT': 'vitp3',      'BINF': '',      'FID': 'e6f97a4b-c4bc-4aa1-876b-3a5ce40b4cfd',      'META': '?spp?dl_err=%03%00%\n00&',      'from': 'ALERTS',      'to': '91985',      'flags': '-1:-1:-1:-1:1',      'msg': '132:id:e6f97a4b-c4bc-4aa1-876b-3a5ce40b4cfd',      'sub': '001',      'dlvrd': '001',      'submit date': '180722070002',      'done date': '1807220\n81157',      'stat': 'DEL',      'err': '000',      'text': '',      'udh': '0:'}     Update:  1) I am not able to read the "meta" field (i.e. did not return expected string '?spp?dl_err=%03%00%\n00&'  2) I am able to build the dictinoary using this code. But I am sure there must better way to do this.  svc = re.search(r'SVC:(.*?)]', mytext) smc = re.search(r'SMC:(.*?)]', mytext) act = re.search(r'ACT:(.*?)]', mytext) binf = re.search(r'BINF:(.*?)]', mytext) fid = re.search(r'FID:(.*?)]', mytext) from1 = re.search(r'from:(.*?)]', mytext) to1 = re.search(r'to:(.*?)]', mytext) flags = re.search(r'flags:(.*?)]', mytext) msg = re.search(r'msg:(.*?)\s', mytext) sub = re.search(r'sub:(.*?)\s', mytext) dlvrd = re.search(r'dlvrd:(.*?)\s', mytext) submit_date = re.search(r'submit date:(.*?)\s', mytext) done_date = re.search(r'done date:(.*?)\s', mytext) stat = re.search(r'stat:(.*?)\s', mytext) err = re.search(r'err:(.*?)\s', mytext) text = re.search(r'text:(.*?)]', mytext) udh = re.search(r'udh:(.*?)]', mytext)  mydict=dict()  mydict['SVC'] = svc.groups()[0] mydict['SMC'] = smc.groups()[0] mydict['ACT'] = act.groups()[0] mydict['BINF'] = binf.groups()[0] mydict['FID'] = fid.groups()[0] mydict['from'] = from1.groups()[0] mydict['to'] = to1.groups()[0] mydict['flags'] = flags.groups()[0] mydict['msg'] = msg.groups()[0] mydict['sub'] = sub.groups()[0] mydict['dlvrd'] = dlvrd.groups()[0] mydict['submit_date'] = submit_date.groups()[0] mydict['done_date'] = done_date.groups()[0] mydict['stat'] = stat.groups()[0] mydict['err'] = err.groups()[0] mydict['text'] = text.groups()[0] mydict['udh'] = udh.groups()[0]


ArrayList contains not detecting what it should

I have an arrayList with a bunch of strings in it. I also have another arrayList with a bunch of strings. I would like to see whether the first array list contains any string from the second arrayList and if so, just to print it out. Should be simple but it doesn't seems to work (and there are definitely strings in common).  Here is my code:   ArrayList<String> che=new ArrayList<String>();  for (int i = 1; i <= rsmd.getColumnCount(); i++) {      System.out.println("COL"+rsmd.getColumnName(i));      che.add(rsmd.getColumnName(i).trim());  }  String key = "";  String keys = "";  for (Entry<String, String> entry : map.entrySet()) {      key = entry.getKey().replace(":","")            .replace(">","MoreThan").replace("__","")            .replaceAll("\\." ,"").replaceAll("\\(s\\)" ,"")            .replaceAll(",$" ,"").replaceAll("%" ,"")            .replaceAll("\\(" ,"").replaceAll("\\)" ,"")            .replace("-" ,"").replace("-" ,"")            .replace("_" ,"").replace("#" ,"")            .replaceAll("\\/", "_").replaceAll("@", "AT")            .replaceAll("&", "AND").replaceAll("\\?", "AND")            .replace("≤","LessThan").replace("≥","MoreThan")            .replaceAll("\\s" ,"").replaceAll("^,","");        for (String n:che){          System.out.println("Che_String "+n);          System.out.println("KEY_String "+key);          if (n==key){              System.out.println("Detected the same: "+key.trim());          }      }  }   I know there are a lot of replaces and I should use StringUtils.repaceEach and I will do so but need to sort this first  The System.out.println output shows that there are several similar strings but they are not being picked up eg  Che_String Gender KEY_String Gender   But my Detected the same: output is empty.  I've also tried che.contains(key) with the same results.


Using Pigeonhole Principle to prove two numbers in a subset of $[2n]$ divide each other

Let $n$ be greater or equal to $1$, and let $S$ be an $(n+1)$-subset of $[2n]$. Prove that there exist two numbers in $S$ such that one divides the other.   Any help is appreciated!


Are there statements that are undecidable but not provably undecidable

This is a variant of  and  (but is not asked or answered in either of those threads).  Call a formula $\phi$ provably undecidable if $ZFC$ proves that ($ZFC$ is consistent) $\Rightarrow$ ($\phi$ is independent of ZFC). Now, (assuming that $ZFC$ is consistent) are there statements which are undecidable but not provably so ?  Here is another way to put it. Call a statement $\phi$ weakly decidable if ZFC can either prove that $\phi$ is true or prove that $\phi$ is false, or at least prove the implication ($ZFC$ is consistent) $\Rightarrow$ ($\phi$ is independent of ZFC).  Thus, the continuum hypothesis is weakly decidable in ZFC, and the axiom of choice is weakly decidable in ZF. On the other hand, it is not known today if the existence of an inacessible cardinal is weakly decidable.  The original question can then be rephrased as, are some statements not even weakly decidable ?


How can I transfer downloaded games from my console to my friends and activate with my account

So let’s say I bought a ps4, bought fifa 19, red dead redemption 2 and Spider-Man on my psn account, downloaded the games on my console and can now play the games. And then I decide to transfer my games and other data to my friend who just got a ps4 console. If I sign out of my account and sign into his console to activate the games I had purchased with my psn account. Provided I do not go online with my own console, can I still play these games on the first console (mine)?


filter csv file based on list of id in another file

I have a large csv file with these format file 1:  id,ICD,CT 16214497,008.8,1 16227244,401.1,45 27154870,780.79,1   I have another txt file with one column of list of id (header id). file 2:  id 16214497 27154870   I want another file that has only data limited to the list of id in file 2  output file:  id,ICD,CT 16214497,008.8,1 27154870,780.79,1


Space before computer storage abbreviations

Forgive me if this has already been asked, I could not find it via search.  My question is this: what is the proper way to append computer storage abbreviations to a number? For example, a 500 gigabyte hard disk drive will usually be spelled as "500GB" on web sites, with no space, but occasionally I see "500 GB", with a space between the number and the unit. Putting a space between the number and the abbreviation makes more sense to me, but since  does not put a space between them, I am not sure. Which is the proper way?


find a particular function of cubic function in gap

I am trying to find a cubic polynomial over GF(5) that evaluates to zero at the points (1,2,0),(2,0,0),(1,4,1),(-2,-1,-1),(-3,2,1),(1,-1,0),(2,-3,1),(-3,-2,2),(1,-2,1).  Clearly the zero polynomial would satisfy the condition, thus I'm looking for a proper cubic polynomial. I note that the generic form of such a polynomial is $f= ax^3+ by^3+ cz^3+ dx^2y + ex^2z+ fy^2x+ iy^2z+ gz^2x+ kz^2y+ lxyz$, that is I need to solve for the coefficients $a,b,\ldots,l$.  I would prefer to do this calculation in GAP as I am using the software already for other calculations.


Is there a 32-bit version of Ubuntu 18.04 desktop?

I have an older HP netbook and am looking for a 32-bit version of Ubuntu 18.04 desktop. Can you advise if one is available?


We have a remote Xen server running a lot of guest machines (on Linux), with only a couple of IPs available.  Each guest machine should be directly accessible by the SSH from the outer world.  Right now we assign a separate domain name to each guest machine, pointing to one of the few available IPs. We also assign a port number to that guest machine.  So, to access machine named foo, one should do as follows:   $ ssh foo.example.com -p 12345   ...And to access machine named bar:   $ ssh bar.example.com -p 12346   Both foo.example.com and bar.example.com point to the same IP.  Is it possible to somehow get rid of custom ports in this configuration and configure SSH server, listening at that IP (or firewall or whatever on server side), so it would route the incoming connection to the correct guest machine, based on the domain address, so that following works as intended?   $ ssh foo.example.com hostname # prints foo $ ssh bar.example.com hostname # prints bar   Note that I do know about .ssh/config and related client-side configuration solutions, we're using that now. This question is specifically about a zero client configuration solution.


Window + arrow not working on Lubuntu 20.04

OS: Lubuntu 20.04 X64  I don't know why when I press Window + arrow keys nothing happens and it was working on 18.04 before upgrading (Fresh 20.04 install). Also working on Windows 10 so it's not a hardware thing.  It is supposed to move the current window to the arrow direction..  How to activate this ? Is it a but or something ?


Finding equality of inequality via Cauchy-Schwarz

Assuming $p_k > 0$, $1 \leq k \leq n$ and $p_1 + p_2 + \cdots + p_n = 1$, show that:  $$\sum_{k=1}^n \left( p_k + \frac{1}{p_k} \right)^2 \geq n^3 + 2n + 1/n$$  and determine necessary and sufficient conditions for equality to hold.  This comes from Michael Steele's 'Cauchy-Schwarz Master Class' book, exercise 1.6. I was able to solve the first part using Cauchy-Schwarz multiple times:  $$p_1 + \cdots + p_n = 1 \leq \sqrt{n} \left( \sum_{k=1}^n p_k ^2 \right)^{1/2}$$  $$\frac{1}{p_1} + \cdots + \frac{1}{p_n} \leq \sqrt{n} \left( \sum_{k=1}^n \frac{1}{p_k ^2} \right)^{1/2}$$  $$n \leq \left( \sum_{k=1}^n \frac{1}{p_k} \right)^{1/2}$$  using these 3 inequalities leads to the inequality.    However for the second part, I'm not sure how Cauchy Schwarz (or some other technique, however this is the 1st chapter in the book) could be used to show instead:  $$\sum_{k=1}^n \left( p_k + \frac{1}{p_k} \right)^2 = n^3 + 2n + 1/n$$  I was aware (as well an answer here) that the above equality holds iff $p_1 = ... = p_n$ but am not sure how to prove that the equality implies that $p_1, p_2, \cdots = 1/n$. Any hints would be greatly helpful.


The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector that separates the objects along the vector that the penetrating object is moving (i.e. the contact point).  I drew a picture to help clarify. There is one box, moving from the before to the after position. In its after position, it intersects the grey polygon. SAT can easily return the MTV, which is the red vector. I am looking to calculate the blue vector.    My current solution performs a binary search between the before and after positions until the length of the blue vector is known to a certain threshold. It works but it's a very expensive calculation since the collision between shapes needs to be recalculated every loop.  Is there a simpler and/or more efficient way to find the contact point vector?


Is sudo required for installing VMware Tools?

I'm trying to install VMware Tools in Ubuntu 16.04. Should I do this by using sudo? Why?


How to safely change MySQL innodb variable 'innodb_log_file_size'?

So I'm fairly new to tuning InnoDB. I'm slowly changing tables (where necessary) from MyIsam to InnoDB. I've got about 100MB in innodb, so I increased the innodb_buffer_pool_size variable to 128MB:  mysql> show variables like 'innodb_buffer%'; +-------------------------+-----------+ | Variable_name           | Value     | +-------------------------+-----------+ | innodb_buffer_pool_size | 134217728 | +-------------------------+-----------+ 1 row in set (0.00 sec)   When I went to change the innodb_log_file_size value (example my.cnf on  comments to change the log file size to 25% of the buffer size. So now my my.cnf looks like this:  # innodb innodb_buffer_pool_size = 128M innodb_log_file_size = 32M   When I restart the server, I get this error:      110216  9:48:41  InnoDB: Initializing buffer pool, size = 128.0M   110216  9:48:41  InnoDB: Completed initialization of buffer pool   InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes   InnoDB: than specified in the .cnf file 0 33554432 bytes!   110216  9:48:41 [ERROR] Plugin 'InnoDB' init function returned error.   110216  9:48:41 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.   So my question: Is it safe to delete the old log_files, or is there another method to change the innodb_log_file_size variable?


Is 60 minutes enough layover time at Los Angeles International Airport?

I am flying in to LAX on American Airlines and have a 60 min layover before I fly out with American Airlines (same ticket).  Will this be enough time?


Find the closest integer to $\frac{1}{\sqrt[6]{5^6+1}-\sqrt[6]{5^6-1}}$

This appeared in the Area Level of the 19th Philippine Mathematical Olympiad. Electronic calculators were not allowed during the competition of course. The closest I got to was to express it as:  $$ \dfrac{1}{\sqrt[6]{2}(\sqrt[6]{7813}-\sqrt[3]{6}\sqrt[6]{217})}. $$  The answer using an electronic calculator is 9375. Can anyone show how this can be approximated without the use of electronic calculators?


New navigation : newest and recently active inverted in recommended mode

While showing recommended questions :  Recently active sorting shows new questions :    Newest questions sorting shows recently active questions :


illustrator pathfinder minus front not working?

How come pathfinder - minus front is not working? I want a stylized N where that white part is taken out


What is the keyboard layout environment variable?

I want a script to run when I press a keyboard shortcut, but only if I’m using a specific keyboard layout (I have 4 installed). I figured the easiest way to do this was with the keyboard layout environment variable (provided there is one), but I couldn’t find anything of the sort. Any help is welcome.  I’m open to other ideas, I just thought this would be easiest.


How to read content of Word file in Php?

I am trying to read content of Word file. I used code below but it is giving warning as Warning: fread() [function.fread]: Length parameter must be greater than 0  $filename=$file->getFilename(); $ext = pathinfo($filename, PATHINFO_EXTENSION); if($ext=='docx') { $fname = fopen($filename, 'r'); if (is_readable($filename))  { $content = fread($fname,filesize($filename)); echo $content; }  else  { echo 'The file is not readable.'; } fclose($fname); }


In what sensible way can we define the union and intersection of an empty family of sets?  How come empty intersection of empty sets become the whole space ?


In the area I currently live, we are experiencing massive population growth.  Land and house prices haven't risen as fast as rent, to the point that renting is now at least 3-4x as expensive per square foot as owning.  This makes saving a down payment very difficult while renting.  Given these conditions, would it make sense to buy with 0 down when I can get double the space and pay less even with PMI than my current rent?  Additional info:  rent on a 1 bedroom apartment in my area is currently around $1600, but I can find decent houses in the 175k-225k range.  Financing even with 0 down is no problem to obtain.  I have been unsuccessful in finding any roommates who could split the cost of a larger unit.  To clarify, I am looking for the lowest cost place to live.  Rent continues to climb, where mortgage payments would be fixed.  I do not consider the house an investment, so even if, say after 3 years I had to sell at a bit of a loss, I consider it a win if the total amount paid for the house, upkeep, taxes, selling costs, etc are a lower total than the rent would be over the same period.  I have owned before so am familiar with the additional costs of renting vs owning, and do most maintenance myself.  I guess what I really want to know is, how do you figure out where the line is?  How high does rent have to get so that it would be better to buy?


Exact two sample proportions binomial test in R (and some strange p-values)

I am trying to solve the following question:     Player A won 17 out of 25 games while player B won 8 out of 20 - is   there a significant difference between both ratios?   The thing to do in R that comes to mind is the following:  > prop.test(c(17,8),c(25,20),correct=FALSE)      2-sample test for equality of proportions without continuity correction  data:  c(17, 8) out of c(25, 20) X-squared = 3.528, df = 1, p-value = 0.06034 alternative hypothesis: two.sided 95 percent confidence interval:  -0.002016956  0.562016956 sample estimates: prop 1 prop 2    0.68   0.40    So this test says that the difference is not significant at the 95% confidence level.  Because we know that prop.test() is only using an approximation I want to make things more exact by using an exact binomial test - and I do it both ways around:  > binom.test(x=17,n=25,p=8/20)      Exact binomial test  data:  17 and 25 number of successes = 17, number of trials = 25, p-value = 0.006693 alternative hypothesis: true probability of success is not equal to 0.4 95 percent confidence interval:  0.4649993 0.8505046 sample estimates: probability of success                    0.68   > binom.test(x=8,n=20,p=17/25)      Exact binomial test  data:  8 and 20 number of successes = 8, number of trials = 20, p-value = 0.01377 alternative hypothesis: true probability of success is not equal to 0.68 95 percent confidence interval:  0.1911901 0.6394574 sample estimates: probability of success                     0.4    Now this is strange, isn't it? The p-values are totally different each time! In both cases now the results are (highly) significant but the p-values seem to jump around rather haphazardly.  My questions   Why are the p-values that different each time? How to perform an exact two sample proportions binomial test in R correctly?


"Thank you very much" vs "thank you so much"

Would you briefly explain the use of the following wish in different perspective with various examples please?


How to avoid debconf questions during apt install (lightdm)?

On my Xenial test system, I've got already gdm3 installed. Now I'd like to install the lightdm package as well. When I do so, it asks which default display manager should be used:  I need to avoid this question (going to install those packages with Chef). How do I do that? With debconf-get-selections, I found: $ debconf-get-selections | grep lightdm # Choices: gdm3, lightdm lightdm shared/default-x-display-manager    select  gdm3 lightdm lightdm/daemon_name string  /usr/sbin/lightdm  Based on that, I created a file with an answer and gave it to debconf-set-selections: $ cat /tmp/lightdm lightdm shared/default-x-display-manager select lightdm  $ sudo debconf-set-selections -v /tmp/lightdm info: Trying to set 'shared/default-x-display-manager' [select] to 'lightdm' info: Loading answer for 'shared/default-x-display-manager'  But when I now run apt install lightdm, it still asks this question. Why is it still asking that question and how can I avoid that?


How does one show that if $2^n-1$ is a prime, then $n$ is a prime?


Will low grades for a minor on my trascript affect my chances of getting into grad school?

So, I started out as an Information Technology major and now decided to pursue Psychology. I wanted to also pursue a minor in Computer Science instead because I am 1 class away from a minor. I am undecided what exactly I want to do after I graduate, but I do know I want to go to some sort of graduate school. So far, most of my grades have been at least a "C", most of them being A's. This semester I am taking 3 computer science classes and a calculus class. I have been struggling this semester and I don't count on having high grades (I realized I am not as interested in this field and have trouble understanding the subject matter). I think a few of my grades will end up being D's, but my GPA should still be over a 3.0. Once I start my psychology classes, I think I can bring my GPA back up.   So, I was wondering if graduate schools would worry about the low grades I may receive this semester even though they are not included in my psychology major. I also do not plan on retaking any classes.


Why is there an undefined reference error when calling this constructor in C++?

I've defined my header file column.h: #ifndef COLUMN_H_ #define COLUMN_H_  #include "include.h"  template <class T> class Column { private:     std::string column;             // Column Name     unsigned int data_type;         // type of elements it stores     std::vector<T> elements;        // Container for elements     size_t CHAR_MAX;                // Used for VARCHAR types  public:     Column();     Column(std::string, std::vector<int>);     Column(std::string, std::vector<float>);     Column(std::string, std::vector<char>); };  #endif // COLUMN_H_  And my declaration file column.cpp: #include "column.h"  template <class T> Column<T>::Column() {     this->column = std::string("undefined");     this->data_type = 0;     this->elements = std::vector<T>(); }   template <class T> Column<T>::Column(std::string column, std::vector<int> elements) {     this->column = column;     this->elements = elements;     this->data_type = 0; }  template <class T> Column<T>::Column(std::string column, std::vector<float> elements) {     this->column = column;     this->elements = elements;     this->data_type = 1; }  template <class T> Column<T>::Column(std::string column, std::vector<char> elements) {     this->column = column;     this->elements = elements;     this->data_type = 2; }  I attempt to create a templated column object with Column<int> newCol(column, std::vector<int>());  but I am hit with the error: undefined reference to `Column<int>::Column(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >)'  I call column constructor in another file, table.cpp.  table.cpp includes table.h table.h includes column.h  Why doesn't the compiler see the reference to the Column constructor when it's included by table.h? Could this be a CMake issue?


I know 2 options to break the line.  Option 1:  Abcdef\\ Ghijkl   Result:  Abcdef Ghijkl   Option 2:  Abcdef  Ghijkl   Result:  Abcdef   Ghijkl   Are there any rules when to use which?  PS: I'm using scrreprt as my document class.


We have a late 2012 27 inch iMac. It has a 2.9 GHz i5 processor and a 1 TB fusion drive along with 8 GB of RAM. I recently upgraded it to El Capitan.  A couple of months ago it randomly started to not wake up after being asleep. We would have to unplug it and plug it back in to get it back on. It also would just randomly shut off while we were using it. If we had music playing, the screen would go black and the music would stop so it's not a display issue.  I took it in to our local Apple store and talked to them about it and they said the first thing they would do would be to reinstall OS X. So I decided to do that myself but that still did not fix the issue.  I then lugged it back into the Apple store about 2 weeks ago and left it with them for a few days to get to the bottom of it. They repaired OS X and then put it through a battery of tests to see if there were any issues with memory or the hard drive but everything came back fine. They then left it plugged in with a bunch of graphics programs and videos playing and still had no issues.  At this point, I was thinking it was a power issue with the plug we were using. When I brought it home, we left it plugged in and running in our dining room for a few days and did not have any issues. I gradually loaded programs back on and still did not have any issues. I then moved it back upstairs but the other day it started acting up again on my wife. I moved it back to our dining room thinking it was the outlet up there, but it's exhibiting the same behavior there now.  After doing some searching online, I found this post . It seems to describe the issue we are having.  I was able to check the Console and it says the cause for shutdown is 0. I'm pretty sure the Apple store ran the hardware test and memtest while it was there. I have repeatedly reset the SMC, which the Apple store employee informed me is basically what I'm doing every time I have to unplug it and plug it back in.  The only thing I haven't done yet is a PRAM reset.  So, now I'm not sure what to do next. According to that post, his logic board needed to be replaced. The Apple store quoted me $583.32 to replace the logic board if that was what was needed. But I only want to do that if I know definitively that's the issue.  So sorry for the long post, but does anyone have a suggestion on how to  root cause this?


How is it even possible that a single photon can be isolated and "shot" through a slit? What tool or mechanism or setup allows such an incredible feat, especially since the photon has no mass?


Will I lose my League/Rank in Starcraft 2 due to inactivity?

I just got promoted to diamond league. If I stop playing for a while, will I get demoted back to a lower league? If so, how lang can I stay inactive without this happening? Also, will I get demoted, when I lose to much games?


I am trying to create a JPanel that asks whether the player wants to hit or stand in a Black Jack game.   public class decisionLayout extends JFrame { JPanel decisionPanel;   public JButton buttons[];  private final String names[] = { "YES", "NO" };  final static String ASK_FOR_DECISION = "Decide whether to hit or not.";  public decisionLayout()  {      super( "decisionPanel demo" );       JPanel panel = new JPanel();     JPanel TextFieldPanel = new JPanel();      final JTextField tf = new JTextField();      tf.setText( ASK_FOR_DECISION );       tf.setEditable( false );       TextFieldPanel.add( tf );      // create the decisions      JPanel decisionPlace = new JPanel();       for ( int count = 0; count < buttons.length; count++ )     {          buttons[ count ] = new JButton( names[ count ] );          buttons[ count ].addActionListener(              new ActionListener()              {                  public void actionPerformed( ActionEvent e )                 {                      if( e.getSource() == buttons[ 0 ] )                     {                          tf.setText( "Yes. You want more cards." );                     }                     else                     {                          tf.setText( "No. You do not want more cards." );                     }                 }             }         );     }      JPanel decisionPanel = new JPanel();      decisionPanel.add( decisionPlace );      panel.add( TextFieldPanel, BorderLayout.PAGE_START );      panel.add( decisionPanel, BorderLayout.CENTER ); }   }   `  I do not see why there is a compilation error at line:    for ( int count = 0; count < buttons.length; count++ )   ,which is what eclipse keeps telling me. Does anybody have any ideas why this is happening?


Show that a statement is true by induction for $x,y > 0$ and $n \in N$.

I ve been assigned the following problem: How can we prove by induction that for every $x,y > 0$ and $n \in N$ it is true that: $$\frac{x^n+y^n}{2} \geq \bigg(\frac{x+y}{2}\bigg)^n$$ I have established a base of $n=1$ so that $\frac{x+y}{2} = \frac{x+y}{2}$ and have assumed that the statement is true for any natural $k$ but am having problem proving that it is true for $k+1$. Any help is appreciated!


My blender used to work fine with my previous video driver which unfortunately do not remember,but now the writings on tools,bootom bar,... appears cut off.if any one can tell me which driver is fit for nvidia geforce 320 please help me.


How long do eggs last at room temperature?

Eggs that were never refrigerated and placed in an ACed room at a constant temperature of 77-78f (25-26c), how long before they start to go bad?


What is Peter Quill's status after Guardians of the Galaxy Vol. 2?

Spoilers for the end of the second film      Towards the end of the fight against Ego, we see that the bomb Groot set off blows up Ego's core. Shortly thereafter, it cuts to a scene where Quill is shown apparently losing his powers.   Given that the movie builds up this finale so much, I'm left wondering:      Did Quill lose his powers or merely the means to access them after Ego's apparent death?   Answers from the film or comics are very much welcome.


Whenever I boot ubuntu, it shows FAILED to start kernel modules. The system starts normally after it but on every restart it shows failed to start kernel modules. I saw on one post that doing the below command should not give errors but doing it gives the following:  Doing journalctl | grep modules gives the following:  May 20 13:59:37 Sarthak systemd-modules-load[287]: Inserted module 'lp' May 20 13:59:37 Sarthak systemd-modules-load[287]: Inserted module 'ppdev' May 20 13:59:37 Sarthak systemd-modules-load[287]: Inserted module 'parport_pc' May 20 13:59:37 Sarthak systemd-modules-load[287]: could not find module by name='off' May 20 13:59:37 Sarthak systemd-modules-load[287]: Failed to insert 'off': No such file or directory May 20 13:59:37 Sarthak systemd-modules-load[287]: could not find module by name='off' May 20 13:59:37 Sarthak systemd-modules-load[287]: Failed to insert 'off': No such file or directory May 20 13:59:38 Sarthak systemd-modules-load[366]: could not find module by name='off' May 20 13:59:38 Sarthak systemd-modules-load[366]: Failed to insert 'off': No such file or directory May 20 13:59:38 Sarthak systemd-modules-load[366]: could not find module by name='off' May 20 13:59:38 Sarthak systemd-modules-load[366]: Failed to insert 'off': No such file or directory May 20 13:59:38 Sarthak systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE May 20 13:59:38 Sarthak systemd[1]: systemd-modules-load.service: Unit entered failed state. May 20 13:59:38 Sarthak systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'. May 20 13:59:39 Sarthak systemd-modules-load[568]: could not find module by name='off' May 20 13:59:39 Sarthak systemd-modules-load[568]: Failed to insert 'off': No such file or directory May 20 13:59:39 Sarthak systemd-modules-load[568]: could not find module by name='off' May 20 13:59:39 Sarthak systemd-modules-load[568]: Failed to insert 'off': No such file or directory May 20 13:59:39 Sarthak systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE May 20 13:59:39 Sarthak systemd[1]: systemd-modules-load.service: Unit entered failed state. May 20 13:59:39 Sarthak systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'. May 20 13:59:40 Sarthak systemd-modules-load[589]: could not find module by name='off' May 20 13:59:40 Sarthak systemd-modules-load[589]: Failed to insert 'off': No such file or directory May 20 13:59:40 Sarthak systemd-modules-load[589]: could not find module by name='off' May 20 13:59:40 Sarthak systemd-modules-load[589]: Failed to insert 'off': No such file or directory May 20 13:59:40 Sarthak systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE May 20 13:59:40 Sarthak systemd[1]: systemd-modules-load.service: Unit entered failed state. May 20 13:59:40 Sarthak systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.   Also the result of grep -v \# /etc/modules-load.d/* is:  /etc/modules-load.d/cups-filters.conf:lp /etc/modules-load.d/cups-filters.conf:ppdev /etc/modules-load.d/cups-filters.conf:parport_pc /etc/modules-load.d/modules.conf: /etc/modules-load.d/modules.conf:nouveau   sarthak@Sarthak:~$ grep -v \# /usr/lib/modules-load.d/*.conf grep: /usr/lib/modules-load.d/*.conf: No such file or directory sarthak@Sarthak:~$ grep -v \# /run/modules-load.d/*.conf grep: /run/modules-load.d/.conf: No such file or directory sarthak@Sarthak:~$ grep -v \# /run/modules-load.d/*.conf grep: /run/modules-load.d/*.conf: No such file or directory   Can anyone help me to solve it? I have no idea why it is happening.


What is the blue aura around my Pokemon?

I was transferring a bunch of Pokemon recently, and I noticed that some of the Pokemon had blue aura's around them.   What do these auras mean?  You can see the auras in the cp159 Zubat as compared to the cp135 Zubat in the image below:


Using quickSort with an override compare

I'm trying to figure out why I'm getting  a NullPointerException despite the fact that the array is populated with card object. What I'm asking is that can my QuickSort algorithm use the compare method I override in my card class?  QuickSort:  package sort;  //All import goes here import java.util.ArrayList; import java.util.Comparator;  //Comment out at the moment //import java.util.List;    public class QuickSort<T> {      private ArrayList<T> list;     private int length;     Comparator<T> pod;        public void sort(ArrayList<T> lst){          //Check if the list is empty         //if(lst.isEmpty() || lst == null){         if(lst == null || lst.isEmpty()){              return;         }         this.list = lst;         length = lst.size();         quickSort(0, length - 1);      }      private void quickSort(int lowIndex, int highIndex){         int low = lowIndex;         int high = highIndex;          //Find the pivot value         T pivot = list.get(lowIndex + (highIndex - lowIndex)/2);          while(low <= high){             /**              * In each iteration, we will find a value from the left side               * which is greater than the pivot value, and also we will              * find a value from the right side which is less then the pivot               * once the search is done, we will then exchange both numbers               */              //o1 < pivot             while(pod.compare(list.get(low), pivot) == -1){                  low++;              }              //o1 > pivot             while(pod.compare(list.get(high), pivot) == 1){                 high--;             }              if(low <= high){                 swap(low, high);                  //Move index to next position on both side                  low++;                 high--;             }         }          //Call quickSort recursively         if(lowIndex < high){             quickSort(lowIndex, high);         }         if(low < highIndex){             quickSort(low, highIndex);         }      }      private void swap(int i, int j){         //Temporary variable to hold the element at index i          T temp = list.get(i);         //Swap i index with the element in j index         list.set(i, list.get(j));         //Swap j index with the element that was in i index         list.set(j, temp);     } }   Card:  //Compare method in my Card class public class Card implements Comparator<Card>{     .....      @Override     public int compare(Card o1, Card o2) {          //Check if o1 has the highest suit         if(o1.getSuit().getVal() > o2.getSuit().getVal()){             return 1;         }          //Check if o2 has highest suit         else if(o1.getSuit().getVal() < o2.getSuit().getVal()){             return -1;         }          //Check if the suit are the same         else if(o1.getSuit().equals(o2.getSuit())){              //Check if o1 has the highest value             if(o1.getValue().getVal() > o2.getValue().getVal()){                 return 1;             }              //Check if o2 has the highest value             else if(o1.getValue().getVal() > o2.getValue().getVal()){                 return -1;             }         }         //Either there duplicate or something wrong with the compare method.          System.out.println("Well there something wrong with the card Compare method or there duplicate of card in the deck.");         return 0;     } }   Spade:  //Sort player hand for easy readability QuickSort<Card> sort = new QuickSort<Card>(); System.out.println(USER.getHand().size()); sort.sort(USER.getHand());   Error:  Exception in thread "main" java.lang.NullPointerException at sort.QuickSort.quickSort(QuickSort.java:48) at sort.QuickSort.sort(QuickSort.java:28) at Spade.main(Spade.java:155)   Update:   I check if the argument were null for the compare method where the exception originate, both argument check return false.


Hi I would like to know if it's possible to do something like this kind of thing.  int myInt = 0; Type myType = myInt.GetType(); List<myType> lst = new List<myType>();   I know here the variable myType old the Type int but I would like to know if it there any way to do something similar to this in a context I wouldn't know the type of myInt  This made me ask myself why this isn't valid. I know it's stupid but why it's not valid?  List<typeof(int)> myList = new List<typeof(int)>();  So I'm looking to do something among the line up here. Is there any way to archieve something similar to any of those?


What will be the value of $$\lim_{n\to\infty} ((1+\frac{1}{n^2})(1+\frac{2}{n^2})(1+\frac{3}{n^2})\cdots(1+\frac {n}{n^2}))$$   My attempt was to use binomial expansion i.e. writing $(1+x^n)$ as $(1+nx)$ and the taking log on both sides. After that I tried using the method of integration for series limits but that led to a wrong answer. I am pretty sure the answer will be 'e' raised to the power something but i am not able to make it out.  All help is appreciated.


, it says how to use the audio jack as in input. On my MacBook Pro 13" (mid 2012), It doesn't seem to have the option in settings. Is it not possible with these computers?


Using a different administration theme according to the role

Is there a way to use different administration themes according to the roles assigned to users? I have two roles (admin, editor), and I want that, when creating content, users with the admin role use the garland theme, while users with the editor role use another theme.


Windows defender reports trojan Win64/Longage in 2 Ubuntu files

I am using Ubuntu on Windows 10, and my windows defender just reported trojan in two Ubuntu files:   /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0.0 /usr/lib/apt/methods/http   Are these files safe to use (unblock in Windows Defender)?    This is specifically what it shows:


How can I disable the button of my CD/DVD drive?

Up until Fedora 14 I was successfully using  to enable/disable the CD/DVD eject button on my laptop (Thinkpad T410). Sadly it has stopped working now.  I've consulted the methods discussed in these 2 questions:       None of which have worked for me. So I turn back to cdctl to see if we can't fix what's broken with it, since it's worked for so long.  Debugging the issue  So starting with cdctl switches I notice that most things seem to work just fine.  Examples  These things work.  ejects the drive  $ cdctl -e   list capabilities  $ cdctl -k Tray close             : 1 Tray open              : 1 Can disable eject      : 1 Selectable spin speed  : 1 Is a jukebox           : 0 Is multisession capable: 1 Can read the MCN (UPC) : 1 Can report media change: 1 Can play audio discs   : 1 Can do a hard reset    : 1 Can report drive status: 1   According to that list cdctl even thinks that it can enable/disable the eject button.   Can disable eject      : 1    So I continue on with debugging the issue.  Debugging cdctl  So I figure lets do an strace on cdctl to see if it can shed some light on what's going on.  $ strace cdctl -o1 ... brk(0)                                  = 0x1371000 open("/dev/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory) open("/dev/cd", O_RDONLY|O_NONBLOCK)    = -1 ENOENT (No such file or directory) open("/dev/scd0", O_RDONLY|O_NONBLOCK)  = -1 ENOENT (No such file or directory) open("/dev/sr0", O_RDONLY|O_NONBLOCK)   = 3 ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0 close(3)                                = 0 exit_group(0)                           = ? +++ exited with 0 +++   Curiously it seems like cdctl thinks it's disabling the button.   $ strace cdctl -o1 ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0  $ strace cdctl -o0 ioctl(3, CDROM_LOCKDOOR, 0)             = 0   NOTE: If I understand this right, the return of a 0 means it was successful.  One thing that caught my eye here was the list of devices that cdctl is attempting to interact with. So I thought "what if I try these devices with eject"?  eject command  One of the other commands I used to use years ago was the eject command to interact with the CD/DVD device. I noticed that this command also now has a similar named switch:  $ eject --help  -i, --manualeject <on|off>  toggle manual eject protection on/off   Example  $ eject -i 1 /dev/sr0 eject: CD-Drive may NOT be ejected with device button  $ eject -i 0 /dev/sr0 eject: CD-Drive may be ejected with device button   So eject too thinks that it's disabling the button, yet it isn't either. Using strace here I see the same system calls:  $ strace eject -i 1 /dev/sr0 |& grep ioctl ioctl(3, CDROM_LOCKDOOR, 0x1)           = 0  $ strace eject -i 0 /dev/sr0 |& grep ioctl ioctl(3, CDROM_LOCKDOOR, 0)             = 0   So now I'm wondering if UDEV or something else is potentially blocking or taking ownership of device?  Thoughts?


How to determine if a $\lim\limits_{n \rightarrow \infty}{(1+{ix\over n})^n}$ would be complex

Question  Recently, I have been looking at complex limits, The most famous being $e^{ix}$=$\lim\limits_{n \rightarrow \infty}{(1+{ix\over n})^n}$. An example would be that when $x = \pi$ we know that the answer will be -1. But how do you determine this due to the fact that you can always $+1$ which will determine the outcome.  I am fully aware that you are able to do this via the $i\cdot \sin(a \ln b) +\cos(a\ln b)$ however, how can you prove this via a limit, because if you test it on a calculator, most of the time you'll end up with some imaginary part.   Specifically I have been looking at the representation of $\sin x={ie^{-ix}\over 2}-{ie^{ix}\over 2}$. Everyone would be safe to assume that $\sin x$ is always real, but when you apply a limit then how can you determine if it is only real or imaginary and real?


Two errors when running ssh in a bash script

I try to run this script against a remote machine, to carry out login check, but have some problems executing it with no errors. I have the following error when I run the script: The Error:  bash: -c: option requires an argument bash: line 2: [: missing `]'   The Shell Script:  #!/bin/bash ssh root@192.168.88.20 bash -c ' radtest user password 127.0.0.1 100 testing | grep 'Access-Accept' &> /dev/null if [ $? == 0]; then         echo "match" fi '   Any ideas what could cases the error? Note: ssh doesn't need a password here.


Updating attribute table of shapefile on display automatically using ArcPy?

I have a shapefile attribute table on display. After some processing, I have to right click click Refresh to get updated version of table. I am wondering if there is a way using arcpy to update it automatically every time I make an edit to shapefile.  Note: I have a dialog box with values which I change based on my requirement and press recalculation which gives me updated attribute table.


How to get shutdown hook to execute on a process launched from Eclipse

I have a shutdown hook in my application (created using Runtime.getRuntime().addShutdownHook). However if I launch the application from within Eclipse, when it is shut-down the shutdown hook doesn't execute.   I think this is because Eclipse sends the equivalent of a force-kill signal to the process, which doesn't cause the shut-down hook to execute (equivalent of taskkill /F on Windows or kill -p on Linux), though I'm not absolutely sure.  Does anyone know how to get around this? I'm running Windows (Vista), and I've a feeling it may be a Windows-specific issue, but I'm not sure.


Getting error: unmappable character for encoding ASCII during building (Ivy) of a project in Jenkins

I have the correct encoding in SVN and i see the correct text while opening the file in SVN. The above error is thrown during Cobertura compile in Jenkins server ( log below). When i was doing a jenkins build locally, i could not see this error.  I am using Java 1.7 and have integrated Sonar to Jenkins.I am using IVY to manage dependencies inside the project. I searched a lot in the web and Stack Overflow but could only find answers related to Maven.  Would appreciate if someone could help.  Full Log Below  init:      [echo] ### Making default directories ###      [mkdir] Created dir: /opt/hd/dt/var/jenkins/workspace/A/ProjectName/build/classes  cobertura.compile:       [echo] ### Setting Compile Classpath ###      [javac] /opt/hd/dt/var/jenkins/workspace/A/ProjectName/src/com/cs/mm/ab/common/util/Constants.java:119: error: unmappable character for encoding ASCII     [javac]     public static final String THANK_YOU = "Thank you for choosing Restie?s for your ";     [javac]                                                                                [javac] 1 error  BUILD FAILED /opt/hd/dt/var/jenkins/workspace/A/ProjectName/build/ant/build.xml:32: The following error occurred while executing this line: /opt/hd/dt/var/jenkins/workspace/A/ProjectName/build/ant/cobertura-build.xml:51: Compile failed; see the compiler error output for details.


A valid proof for the invariance of domain theorem?

The  states that, given an open subset $U\subseteq \mathbb{R}^n$ and an injective and continuous function $f:U\rightarrow\mathbb{R}^n$ then $f$ is a homeomorphism between $U$ and $f$'s image.   I tried proving it by using another theorem:  if $g:K\rightarrow X$ is injective and continuous, $K$ is compact and $X$ is  then $g$ is a homeomorphism between $K$ and $f(K)$.  But I'm not sure on how to prove this (sub)-theorem? or perhaps there exists an easier proof of the invariance of domain theorem?


Disable storage of invisible files "._" on my cfs or smb network storage

I use OS X Mavericks and have some company storage drives mounted (using smb or cfs). (smb://username@address.path.toserver.com/directory/data). When I work with files on the drive or copy files to the drive, some hidden files are created. Most of these files start with dot-dash ._ and then the filename of the original file, like:  ._test001.png ._test002.png ._test003.png   And most of the times, the famous ._.DS_Store and .DS_Store are also there.  On my Mac, these . dot items are invisible, but my windows colleagues do see these files. How can I prevent OS X from making these strange invisible files?  On  (and other internet sources) you can find a 'defaults write' to disable the creation of .DS_Store files on your network drives. But this does not work in Mavericks:  defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true   For now I use this oneliner, but doing a rm -rf does feel wrong in this case.  find . -type f -name "._*" -exec rm "{}" \;   Edit: I don't want to delete the files or exclude them from copying. I want them not to be created in the first place.  Edit: I prefer a 'native' OS X solution over third party apps.  Edit: This questions has two answers, one for the ._ files and one for the .DS_Store files. The bounty is rewarded for dot_clean, this native command line app cleans all ._ files. Unfortunately is does not clear the .DS_Store files, this can effectively be done with Asepsis. Asepsis stores .DS_Stores in a fixed location, and not in the folder itself.


I saw the definition of electric charge in David Tong's QFT lecture in the Dirac theory to be given as, $$Q=\int d^{3} x \bar{\psi} \gamma^{0} \psi=\int d^{3} x \psi^{\dagger} \psi.$$ However, the combination $\psi^{\dagger} \psi$ is not Lorentz invariant. Then how the charge is a Lorentz invariant quantity as it is supposed to be? Am I missing something? Can someone clarify these to me. Also in QFT what is the most rigorous definition of electric charge if the electrons are modeled as excitations of the Dirac field?


Use sed to edit a line in a file with spaces in the name

I am looping through folders, opening a file within the folder with the same name, and doing some manipulation.  I'm using sed to manipulate a line:  sed "1s/Log R Ratio/$SAMPLE.LRR/" $FILE   where $FILE is a file with 1+ spaces in the name.  Example:  NAT062813_Batch A_1_TR27GD1_CytoScanHD_NL_092913/NAT062813_Batch A_1_TR27GD1_CytoScanHD_NL_092913.txt    Is there a way (without going through and renaming things) to use sed with these files? I tried putting quotes around $FILE, but that just printed it out.


How do I delete one of two Ubuntus on my PC

I've installed Ubuntu 13.04 two times on my PC. Each on a different partition. I would like to delete the one which I'm not using. How would I do that?


The effects of Lorentz transformation on shape

Imagine a solid 3D cube. Now imagine that this cube is traveling close to the speed of light. To what degree will the spatial geometric properties of this object (or in general of any 3D object) change (as predicted by the Lorentz transformations)? I assume that despite the changes to shape, some fundamental geometric features of 3D objects are preserved no matter the frame of reference. I assume that a cube will preserve some of its fundamental geometry Namely, a cube undergoing Lorentz contraction will not become a torus or vice-versa. (I might be wrong about this) But what is the formal limit to these changes? Will the affine structure of a 3D object undergoing Lorentz contractions change or would its topology also change?


C++ float/double to accurate string representation

I have a problem getting a correct/accurate string representation of float/double/long double values.  I have this function that attempts to get a string representation of a floating point value:  template <typename T> std::string double_to_string(const T& v) {   static_assert(std::is_floating_point<T>::value,                 "T is not a floating point type");   std::stringstream sstr;   sstr.setf(std::ios::fixed | std::ios::showpoint);   sstr << v << std::ends;   return sstr.str(); }   I invoke it with float, double and long double values, but do not get a correct/accurate string representation of the actual value I pass in to the function:  // float: std::cout << double_to_string(77777777777777.7777777f) << std::endl; // double: std::cout << double_to_string(77777777777777.7777777) << std::endl; // long double: std::cout << double_to_string(77777777777777.7777777L) << std::endl;   The output I get is as below:  // float:  77777780867072.000000  // double: 77777777777777.781250  // long double: 77777777777777.777779   Is there any way I can get an accurate string representation of float/double/long double values in C++?  (p.s. I'm using g++ 7.2.0)  Thanks.


Why do high frequencies have a larger deflection through a prism than smaller frequencies?

The following is a proof that higher (angular) frequencies have a greater deflection than lower frequencies through a glass prism:      It was omitted in the image above, but $n_{\text{air}}$ is taken to be unity, which is the reason for the $1$ in Snell's law.  My problem is as follows; in a general dielectric (such as a glass prism) we have the following dispersion relation:  $$v_{\text{phase}}=\frac{\omega}{k}=\frac{1}{\sqrt{\mu_0\,\epsilon}}=\frac{c}{{\epsilon_r}^{1/2}}=\frac{c}{n}\tag{1}$$  so in short $$\frac{\omega}{k}=\frac{c}{n}$$  or $$n=\frac{k\,c}{\omega}$$   therefore $$n\propto \frac{1}{\omega}\tag{2}$$  Now looking at the writing in the image it says:      $v_{\text{phase}}$ decreases with $\omega$   According to $(1)$ $v_{\text{phase}}$ increases with $\omega$; since $v_{\text{phase}}\propto\omega$.  But that's not the only problem the text also says:     $n_{\text{glass}}$ increases with $\omega$   According to $(2)$ $n$ decreases with $\omega$. Another contradiction.    Is there anyone that can explain why $v_{\text{phase}}$ decreases with $\omega$ and why $n_{\text{glass}}$ increases with $\omega$?    EDIT:  I'm voting to close this question now since I no longer care whether or not it it is a duplicate of  as I already have accepted an answer to my question.


Creating a constant count of unique values for one variable by another variable in MS Excel 2013

I am trying to figure out how to create a variable that gives me a count of the number of unique dates for each person in my dataset.    For example, if I have:  A  B     K 9/12 K 9/12 K 9/13 K 9/14 J 9/12 J 9/14 J 9/15 J 9/16 F 9/14 F 9/14 F 9/15   I want Excel to return:  A  B   C K 9/12 3 K 9/12 3 K 9/13 3 K 9/14 3 J 9/12 4 J 9/14 4 J 9/15 4 J 9/16 4 F 9/14 2 F 9/14 2 F 9/15 2   I tend to work more in Stata and R, but I'm trying to put together an excel workbook with formulas to help a coworker who does not normally work with data. Any tips would be greatly appreciated!


Show that the direct sum of a kernel of a projection and its image create the originating vector space.

I got the following question as my homework.     Given $V$ is a vector space with $P \in \operatorname{End} V$. $P \circ P = P$ ("P is idempotent"). Show that $V = \operatorname{Ker} P \oplus \operatorname{Im} P$.   One $P$ I can imagine is a projection from 3d-space to plane, that just sets some coordinates to zero. For example $\begin{pmatrix} x \\ y \\ z\end{pmatrix} \mapsto \begin{pmatrix}x \\ y \\ 0\end{pmatrix}$. Then $\operatorname{Ker} P$ would give the line $\begin{pmatrix} 0 \\ 0 \\ z\end{pmatrix}$ and $\operatorname{Im} P$ would contain all $\begin{pmatrix}x \\ y \\ 0\end{pmatrix}$. So the result of $\operatorname{Ker} P \oplus \operatorname{Im} P$ is of course $V$.  But how do I prove that in a mathematical way?


Walls aren't appearing right in game mode

When I built the walls of my scene, I did it by creating many subdivides and extruding up to create an entire building using a single plane. The problem is, it looks fine in obj/and edit mode, but when I enter game mode, my walls become paper thin and I phase through them even with collision active. Any idea why this is happening?


Proof: Every convergent sequence of real numbers is bounded

(Taken from an old exam - no homework:)      Prove that every convergent sequence of real numbers is bounded.   It would be cruel if our professor would take a task like that in the exam because I rather prefer calculating than doing theory (in an exam where you haven't got much time to describe things..). But I'll be honest and say I dislike theory in general! :-)  Anyway, for the task, I really got no idea how to proof that but I'll give it a try...    We know that if a sequence is convergent it has exactly ONE limit where the sequences (sry my English here) accumulate. So the sequence will have an upper bound or lower bound, based on the limit, thus it will be surely bounded if it's convergent sequence.    Even if my proof is wrong (most likely..) I'd like to see a proof like mine, where you avoid using (complicated) maths symbols. Just using words any human can understand would be awesome! :-)  Of course a more formal proof is welcome too but not necessarily preferred ^.^


Boundary behaviour of holomorphic function on unit disk

Let $\mathbb{D}=\{z \in \mathbb{C} \ | \ |z|<1 \} $ be the open unit disk in the complex plane. I would like to see explicit examples of the following phenomena:   a holomorphic function $f$ on $\mathbb{D}$ which extends continuously to the boundary but has no holomorphic extension beyond any boundary point (i.e. on sets of the form $\mathbb{D} \cup B(z_0,r)$ for some $r>0$ and $z_0 \in \partial \mathbb{D}$) a holomorphic function $f$ on $\mathbb{D}$ which is bounded on $\mathbb{D}$ but has no holomorphic extension beyond any boundary point (i.e. on sets of the form $\mathbb{D} \cup B(z_0,r)$ for some $r>0$ and $z_0 \in \partial \mathbb{D}$)   Such functions should exist according to this  to a previous . Thanks for any reference/advice.


Prove $(Ma)\times(Mb)=(\det M)(M^{-1})^T(a\times b)$ for matrix transformation $M$.

I wanted to prove $(Ma)\times(Mb)=(\det M)(M^{-1})^T(a\times b)$ where the formula could be found here  However, I had a hard time counting the index, and I was wondering if there's any easier way to prove it.


In PostgreSQL we use generate_series a lot to do quick test cases.  For example  I generate a quick test for that question using   CREATE TABLE foo AS   SELECT x::int AS a, (x%2*x)::int AS b   FROM generate_series(1,3e6) AS gs(x);   What's the easy way to generate sample data in MariaDB? Is there anything like generate_series or how do experienced MariaDB users generate test cases?


class Ideone     {       int x;       public static void main (String[] args) throws java.lang.Exception       {          Ideone i;          i = new Ideone();          i.x = 25;          System.out.println(i.x);          f(i);          System.out.println(i.x);          g(i);          System.out.println(i.x);       }        public static void f(Ideone j){          j = new Ideone();          j.x = 55; // It just changes new instance of J. It is not changing actual object       }        public static void j(Ideone j){          j.x = 52; // It modifies actual object       }   }   I have a doubt in this. In case of j function, it modifies actual object. Is it not pass by reference? We are passing the object and modifying it inside j.   But I am doing the samein function f also. Passing the object and modifying it. But it is not modifying the original object.   I am confused the behaviour between these.  As per the highly voted , I am passing an URL in both cases. And I am modifying the content in the URL. But it is visible to all in one case but it is not in the other case.


Can I find out who is tracking my iPhone?

I received 3 emails from Apple that my phone was tracked using Find My iPhone. It gave the dates and times.  Can I find out who is tracking me using Find My iPhone ?


install google-chrome isnt working, why?

I am currently using ubuntu 16.04 The weird thing is, I have installed google chrome in my laptop using ubuntu 14.04 and worked perfectly.  Somehow I just installed ubuntu 16.04 into my desktop and trying to install chrome but just wouldn't work.  I went to the google chrome website and clicked download, I have the 64bit deb file, clicked on it and my software GUI popped up.  I click on install but it just keep on stalling, stays there forever and wouldn't move.  As I remember installing chrome in my laptop, after clicking install the process bar appears and bar will move but somehow now when I click install, it just keeps on showing install.  I checked my launcher bar to the left, there's something new but only says waiting to install.  It stays there for at least 2 hours and nothing happens.  Can someone give me a hand on what is going on? Thanks in advance.


Input encoding error after upgrading from Biber 1.9 to Biber 2.1

Under biber 2.1 my biblatex produces input encoding errors. The same procedures worked smoothly under biblatex 2.9a/biber 1.9, now that I upgraded to biblatex 3.0/biber 2.1 I get the following message when pdflatex runs after biber:     Package inputenc Error: Unicode char \u8:╠ü not set up for use with LaTeX.   Here is a minimum working example:  \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[backend=biber]{biblatex}  \bibliography{test.bib} \usepackage{filecontents}  \begin{filecontents}{test.bib} @article{rodr, author = {Rodr{\'{\i}}guez, A}, year = {1999} } \end{filecontents}  \begin{document} Rodr\'{\i}guez \textcite{rodr} \printbibliography \end{document}    Any help appreciated!


Count() returning 1 with comma separated string with explode

I have a field that stores tags comma seperated. I'm trying to count the number of items listed.   Let's say I've already pulled the data from the DB, and the $tags variable has the following info:  $tags = "Videos,Magazines,Store";  // First separate tags by commas, put into into array $tagArray = explode(",",$tags);  // Count how many items are in the array $arrayCount = count($tagArray);   That always returns "1", regardless if there's an item in the array or not. the $tags variable can have any number of items - from empty, to a single item like "Videos" to multiple items "Videos,Games,Store" etc.  Can someone help me out on what I'm doing wrong?


I am trying to convert a NSDate to a String and then Change Format. But when I pass NSDate to String it is producing whitespace.   let formatter = DateFormatter()  let myString = (String(describing: date))  formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"  let yourDate: Date? = formatter.date(from: myString)  formatter.dateFormat = "dd-MMM-yyyy"  print(yourDate)


What is the multiarch support for Google Earth 64 bit package?

The  for Google Earth says this:     Note to 64bit users: The 64bit debian package depends on ia32-libs   which is deprecated and no longer available as of 13.10 Saucy. Use the   32bit package and multiarch-support.   Where is this multiarch-support and how can I ensure it is installed?  This is for a re-installation of the 64-bit version. The Software Updater lists  main under the 'Other Software' tab. Does that mean multiarch-support is set to update as part of that?  (Ubuntu 14.04 LTS, Nvidia GeForce 430 using Nvidia binary driver v. 331.113)


I designed a PCB with an STM32 and a micro USB connector. I put a NUF2042XV6T1G between the connector and the STM32 to protect the data lines. The USB shield is connected to system ground via a 120R@100MHz ferrite bead.  The board has a power prioritization scheme going on, so it can be either bus powered, powered via a power supply or from a battery. I tested the prioritization circuit extensively, and the priorities and the make-before-break behaviour work just fine.  However, I noticed that when the board ground is referenced to mains earth via the power supply, the STM sometimes resets when I plug in the micro USB cable. At first I thought that the make-before-break doesn't work reliably, but that is not the case. Then I noticed that it is enough to touch the micro USB plug's shield to the receptacle's shield to crash the CPU. So I had a look at what's going on on the USB shield when not connected to my board:    Above is the shield voltage (referenced to mains earth) when the USB cable is plugged into a cheap chinese USB power supply (no mains earth connection).    Above is the shield voltage (referenced to mains earth) when the USB cable is plugged into a genuine Apple USB power supply (no mains earth connection either). Not as bad as the chinese one, but I'm still shocked (fortunately only figuratively. I don't notice anything when touching the shield with my finger).  I noticed that the CPU does not reset if I touch the USB plug's and receptacle's shield with my finger before connecting the metal parts when plugging in  So the question here is: How should I connect the receptacle's ground to the circuit ground to avoid this issue and stay clear of EMI issues? A high resistance (1M or so) instead of the ferrite bead? Both in series? Both in parallel (makes no sense to me)? Capacitively couple them?


Examples of modules such that $M\oplus N_1\simeq M\oplus N_2$, but $N_1\not\simeq N_2$?

Are there any examples of modules such that $M\oplus N_1\simeq M\oplus N_2$, but $N_1\not\simeq N_2$ as modules?  I thought of taking $\bigoplus_{i\geq 0}\mathbb{Z}\oplus\mathbb{Z}\simeq\bigoplus_{i\geq 0}\mathbb{Z}\oplus\{0\}$ as $\mathbb{Z}$-modules, but $\mathbb{Z}\not\simeq\{0\}$. Is this correct? Even if it is, I felt it's kind of a cheap example, and was hoping to see something more interesting.


How do I check to see if user added '.txt' to file name and add it if they did not?

I'm having an issue that is probably more easy than I am making it out to be. (I am in an intro level programming class)  Basically I am writing a program where I ask a user for a file name, I read info from the file before sorting it in a list and writing it somewhere else. The assignment wants us to ask user for the file name to read from. If the user enters the file name with the '.txt', we carry on with the processing. If they do not, we must add the '.txt' before continuing on. I know how to add the '.txt' to the file name if they did not include it, but I can not figure out how to check first to see if they did.  How do I go about first checking to see if the user wrote the file name with the extension?  I am assuming it has something to do with an if/else statement but I have been baffled.  Thank you


Book: Nanobot apocalypse on Earth, originally used for weather control

A few years ago I read an excellent sf book about nanobots that went out of control. In the book they were used for weather control, when they went amok the scientists threw in yet another bunch of nanites and so on, until Earth became uninhabitable, teeming with nanites, I remember the weather also became cold. The planet still could be visited but when they lost cloaking the nanites would attack.   Also, some humans in the book merged with nanites, they could behave benevolently but I forgot the plot too. I only remember fragments of this book, I would like to read it again in English. (loaned a long time ago from a library here in Sweden but they closed the library).   I only know that it was written by an Anglo-American contemporary SF writer, probably 30-55 y.o.


What's the difference between a trip and a journey?

I've found these definitions: A trip - a small casual outing from a day to a few weeks. A journey - a longer several months trip (in terms of time and/or distance), perhaps to multiple destinations, or with a greater sense of unknown. A journey may not be fully planned out ahead of time.  But for the journey I've also read that it doesn't matter how long it is, the emphasis is put on regularity. I still don't understand the difference.


Why is Peeves never on camera in the HP movies?

In the Harry Potter books, Peeves’ actions are in some situations very important for the story.   Why did he never appear in the movies or get a small role in one of them?   What do you think? Don’t give me the answer that a book is too big to put it all in a movie. It’s Peeves!


How Does the Following Definition of the Axiom of Choise Entail that Elements Are Simultaneously Chosen from an Infinite Collection of Nonempty Sets

The following excerpt is from Ethan Bloch,  (2nd ed, 2011 : page 121) and concerns one of the motivations for introducing the axiom of choice (AC). Initially, the author explains that for a finite collection $\Gamma$ of nonempty finite sets $\Gamma_i$, we can choose a single element $\gamma \in \Gamma_i$  sequentially for all $i \in I$ where $I$ is an indexing set, and eventually we will have a new set $\Lambda$ which contains those elements $\gamma$ in a finite number of steps. The problem of choosing a single element sequentially arises when the collection is infinitely large:     If we want to choose one element from each set in an infinite family of nonempty sets, we need to make the choices simultaneously. Such a simultaneous choice is not something we could physically do, and the ability to do so mathematically does not follow from the [ZF] axioms of set theory. Therefore, we need an additional axiom to guarantee our ability to make such choices, and that axiom is the Axiom of Choice   Since the discussion of AC was introduced prior to the concept of a function, the author defines AC in terms of sets:     Let $x$ be a set. Suppose that if $y,w \in x$, then $y \neq \varnothing$ and $y  \cap w = \varnothing$. Then there is a set $z$ such that if $y \in x$, then $y \cap z$ contains a single element.   Okay, now that I have laid the foundation, here is my question: What in the above definition entails that the elements are simultaneously chosen when $x$ is an infinite collection of nonempty sets?


$().change or $().bind(change,function()) doesn't work on IE8, JQuery,Javascript

Code Example:      $(document).ready(function() {  txtchangefunction();  });  function txtchangefunction(  $(".textCssClass").change(function () {  ....});  or $(".textCssClass").bind('change', function())   both work for Chrome etc. but not IE8.  Can everyone help on that?? no console error comes out. Thanks a lot.


quick question, I am able to create schematics in EAGLE and other online based tools. But for the purpose of creating basic schematics, i.e. no model numbers, with basic stencil component outlines?  I have VISIO but it does not have all the required shapes, such as op-amps, or is it a case that there is no free option available?


I made a big pot of a very hot chicken soup. I put it in my small extra fridge at 11 PM, and it was still warm 9 hours later, at 8 AM.  Do I need to throw it away?


I downloaded vim-youcompleteme from the software center in Ubuntu. But I don't know how to make it work. When I restarted vim and tested, nothing special occurred. And vim-syntastic is the same. Could someone tell me how to make them work? Should I do something with my ~/.vimrc ? Thanks in advance!


Different Confidence vs. Credible Interval (Continuous case, noninformative prior)

Okay, so, credible intervals aren't the same as confidence intervals. We all know that. In fact, they're only guaranteed to be the same when they're about a location or a scale parametre with a noninformative prior when they can be calculated from a single sufficient statistic. Furthermore, the most obvious way in which they differ is exactly in the prior, since if you have an informative prior then the credible interval even for the mean of a normal distribution will be different than the confidence one.  However, is there a simple example of a continuous case where they differ even with noninformative priors, that's not ?  Googling finds the truncated exponential, also  but that's discrete and not terribly clear either.  So, what I want is some example of a continuous variable that's reasonably simple (by reasonably simple I mean "doesn't need obscure theorems like the characteristic function theorem") where the prior is noninformative and confidence and credible intervals do not coincide.  --EDIT:  I wonder why people marked this question as a duplicate of another question when I explicitly linked to that other question and said that it did not answer my question, and therefore those were not the answers I was looking for. Specifically because they were either too complex or too discrete.


'segmentation fault (core dumped)', inputting strings without pointers

I'm trying to write a function that takes in an arbritrary string and changes all the letters to the next letter in the alphabet (eg. "John" to "Kpio"). My function works if I define the string str (eg. char str[] = "John"), but not when I leave it as arbitrary; instead I get a segmentation fault (core dumped) error.   I've tried using pointers instead by adding *str to everything, but this didn't work and I'd rather the solution didn't use pointers since I'm still unfamiliar with them.   #include <stdio.h> /*declare function*/ void letter( char str[] ) { int i = 0; while ( str[ i ] != 0 ) {     str[i] += 1;     printf("%c", str[i]);     i++; } } /*call function with input "John"*/ int main( void ) {  letter( "John" ); return 0; }


Partially processing a file with the preprocessor

We have inherited a very convolved project (500kloc) with a lot of preprocessor conditional logic, most of which is no longer relevant, and I want to clean it up.  Can I use the preprocessor¹ to expand only some of the conditional logic, and leave all other preprocessor macros, defines, and includes alone in the output?  ¹ Here, by "the preprocessor", I really mean "any tool", either a standard C preprocessor, something I can install, or even a hacked-together Perl or Python script.    For instance, suppose we have this set of code:  #include <foo> #define baz #define bar(a) do{(a)+1} \                while(0) #ifdef X   #if Y > 20     #if Z > 5       so_far_so_good = true;     #endif     #ifdef baz     something();     #endif   #else     otherthing();   #endif #else   #if Z > 10     wow().this.is.bad;   #endif #endif   The tool I want (and might need to write if it doesn't exist) would be a version of CPP that accepts not only the list of definitions for a particular invocation, but also a list of defines to respect during expansion. Any preprocessor symbol not in the second list is completely left alone. An example is in order:  cpptreadlight -DY=22 --only=Y   would produce:  #include <foo> #define baz #define bar(a) do{(a)+1} \                while(0) #ifdef X     #if Z > 5       so_far_so_good = true;     #endif     #ifdef baz     something();     #endif #else   #if Z > 10     wow().this.is.bad;   #endif #endif   and:  cpptreadlight -DY=22 -DZ=8 -DX --only=Y,baz,Z   would give me:  #include <foo> #define bar(a) do{(a)+1} \                while(0) #ifdef X       so_far_so_good = true;     something(); #else #endif   Notice that even though X is defined, it was left behind, because it didn't appear in the --only list. Also note that baz was in the --only list, and so was expanded once it was defined in the source.    I tried a hack-solution: escaping uninteresting stuff using a pipeline like the following (my own gsub tool is used, but it does what you might expect):  function escape_tr() {     gsub "#(define|include)" '@@@\1' < $1 |       (echo '#include "simple.h"' && gsub '\\$' "%%%") |         cpp -C -P -DY=301 -DZ > $1.new  }   Now I can filter out a lot of stuff, and then put the things I want the preprocessor to expand in simple.h. Comments are left alone, and #line directives are left out.  This almost does the trick, in that includes are not pulled in, #define blocks are not defined, and so not expanded into the body. But of course it doesn't let me specify the set of conditional logic that I'd like to keep in the output. That's bad. Some of it is important to keep conditional.   #if nests, and the #else and #endif tokens don't lexically match, putting the problem beyond a regex pipeline. I need a full-blown parser, something practically identical to cpp itself, but with finer grained control of what is expanded.   Hence, before digging into a preprocessor to implement this, I thought I'd ask if anyone has solved this problem before. I can't be the only one to have inherited a preprocessor spaghetti nest full of dead branches.


Should a mathematical variable at the beginning of a sentence be capitalized?

If a sentence starts with a mathematical variable which normally is lower case, should that variable be capitalized? Or is it better to just avoid starting sentences with variables?        x and y represent the width and height of the anticuboctahedron.   X and y represent the width and height of the anticuboctahedron.   The width and height of the anticuboctahedron are represented by x and y.