I do not know if it's possible but I would factorize functions like      // wiki   if(command === "wiki"){     bangSearch('wikiSearch','_',args);   }    // afr amazon fr   if(command === ("afr")){     bangSearch('amazonSearch','+',args);   }    function wikiSearch(recherche){     var url = "https://fr.wikipedia.org/w/api.php?action=opensearch&search="+recherche+"&limit=1&namespace=0&format=json";     request(url, function(err, resopnse, json){       //some code     });   }    function amazonSearch(recherche){     var url = "https://www.amazon.fr/s/ref=nb_sb_noss?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Daps&field-keywords="+recherche;     message.channel.send('Recherche amazon pour: '+recherche+'\n'+url);   }    function bangSearch(searchFunctionName,keywordSeparator,args){      if(args.length > 1){       searchFunctionName(args.join(keywordSeparator));     }else if (args.length == 0) {       searchFunctionName(/*some args*/);     }else{       searchFunctionName(args[0]);     }   }     But when i run the code, I have this error: TypeError: searchFunctionName is not a function  So, I understand that the code does not call searchFunctionName like wikiSearch or amazonSearch but it only understands that the called function is searchFunctionName.  So I can not call the argument function which is either "wikiSearch" or "amazonSearch"  Is it possible to do this? Can you help me ?  The entire code: Here is the entire code. It's for a discord bot and i use Discord.js     // wiki   if(command === "wiki"){     console.log(args);     bangSearch(wikiSearch,'_',args);   }    // afr amazon fr   if(command === ("afr")){     bangSearch(amazonSearch,'+',args);   }     function wikiSearch(recherche){     var url = "https://fr.wikipedia.org/w/api.php?action=opensearch&search="+recherche+"&limit=1&namespace=0&format=json";     request(url, function(err, resopnse, json){       try {         var name = JSON.parse(json)[1];         var link = JSON.parse(json)[3];         if(name ==='undefined'){           message.channel.send('Aucun résultats');         }else {           message.channel.send('Recherche wikipedia pour: '+recherche);           message.channel.send('Nom: '+name[0]+'\n'+link[0]+'\n\n');         }       } catch (e) {         callback('ERREUR: '+e);       }     });   }    function amazonSearch(recherche){     var url = "https://www.amazon.fr/s/ref=nb_sb_noss?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Daps&field-keywords="+recherche;     message.channel.send('Recherche amazon pour: '+recherche+'\n'+url);   }    function bangSearch(searchFunctionName,keywordSeparator,args){      if(args.length > 1){       searchFunctionName(args.join(keywordSeparator));     }else if (args.length == 0) {       message.channel.send('tu veux quoi ?').then(() => {         message.channel.awaitMessages(response => response.content.length > 0 , {           max: 1,           time: 10000,           errors: ['time'],         }).then((collected) => {           searchFunctionName(collected.first().content);         }).catch(() => {           message.channel.send('T\'as pas trouvé les touches sur ton clavier ou quoi ?');         });       });     }else{       searchFunctionName(args[0]);     }   }

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I have an object in STL format that I have imported into the Blender. The Object is made of up several parts but in the editor mode it shows up as one set of polygons.  I have managed to use the Linked option in the Select menu to only have the desired parts in edit mode.  How can I make this a separate object from the original STL object ?  I just want to add different colors and textures to different parts of my object. But as it is Blender sees everything as one object .  I have attached an image where you can see the orange area are the linked parts in edit mode that I wish to separate from the original Green colored areas so that I can give them a different texture and color.  Many thanks.

I've just made a set of armor by using a male body mesh model I downloaded and selecting certain faces from the model and duplicating them to create viable armor pieces.   Since the pieces are just duplicated from the same mesh male model, then it's still part of the same object.   How do I separate the armor piece from the model to make the pieces separate?


So there's this sentence that people have been sharing on facebook that's in Swahili and requires a direct word to word translation to English. Superficially it seems like an easy translation but once you try it, it get really messy and every thing you try just doesn't sound right to the ear. So if figured you guys might help or have fun trying.  Kiswahili:      Mama, mimi ni mtoto wako wa ngapi   English:     Mother, I am child yours what number   Essentially what this statement is about a child wanting to know from his/her mother what position she's on of all her mothers children. For example there are nine children in your family and you are the fifth born but you don't know for some reason and you wanted to ask your mother how would you pose the question?  I have tried     Mother, I am your what born?   Mother, what number am I on your list of children?   Mother, of all your children I am what born?   Thank you I advance and my apologies if this is a stupid question.

Possible Duplicate:           I know the title sounds stupid, but this is one question that has left me stumped for quite some time. I hope to get an answer in this forum. If the answer is "I am the fourth son of my father", what should be the question?  In general, how do you ask questions with ordinal numbers?


There are some instances that numbers are formatted with a comma, and some aren't. Using  as an example:  Famous Question    Asked a question with 10,000 views Gold Badge         You must have a total score of 1000 in at least 200                     non-community wiki answers to achieve this badge. Steward            Completed at least 1,000 review tasks. This badge is                     awarded once per review type Publicist          Shared a link to a question that was visited by 1000                     unique IP addresses  Can these be standardized/cleaned up?

In the  there are lots of numbers on display, including 1000, 2500 or 10000. The display is erratic though:    Same number, two displays. Both appear valid to me: 1000 or 1,000 but please, make it consistent. My eyes hurt! :) I just found , but there it's discussing the whole network while I'm asking just for that specific page. For a start.


We often learn the structure “Let’s do something”, but why it there an apostrophe-s after let and before the verb?  Why does we need ’s in this structure?   Does ’s means is or does it mean was?

The verb let means  “allow”, “permit”, “not prevent or forbid”, “pass, go or come”  and it's used with an object and the bare infinitive.         Are you going to let me drive or not?     Don't let him off the hook.     Before we let our children surf the Internet, they have to do their homework.     She lets the cats out before leaving.   He let us into the house.      The full form let us can be used similarly        Let us know as soon as possible.      Please, let us help you.   They will never let us forget.      None of the above can be contracted; however, when let us is used for making a suggestion; giving self-encouragement; expressing a consequence or plea,  it is often contracted to let's      Let's go out   Let's have a party   Let's see what happens   Let's stand together in this emergency   Let's not forget those who sacrificed their lives     Questions   I believe that let + us is the only instance where this type of contraction occurs. Is there an explanation as to why verbs such as (i) give + us, (ii) get + us or (iii) take + us were not similarly contracted? When was the apostrophe used to replace the omitted letter "u" in let us?  What is the origin of let's?


First of all sorry for not asking a technical question.  Actually I need to know the best English grammar book in terms of completeness and depth of every topic.  Any help would be appreciated.

Before marking this post duplicate or voting to get it closed (the reason for which I simply don't get just because it is a grammar forum after all! If I am seeking recommendation for a book that means I will be coming back someday to the same site for my doubts also provided I get a not so harsh reply!), please read this and help this MBA aspirant.   A little about myself and my research so far. I am a very critical reader of English Grammar and the kind of person who aims at perfection.  Currently, I am keen on taking on English grammar again after a certain gap. Well, I am aiming for MBA, so preparing for entrance exams for the same.  I bought the religiously followed Wren and Martin and started studying it chapter by chapter. I was surprised when I read the pronouns chapter. I studied all the rules given and then started practising but it came as surprise when I found when many of the attempted questions were wrong. The reason simply being the rules for those specific sentences were not given.   For example:     We scored as many goals as they/them?    According to me, the answer should be they, but it's them according to the solution manual. Worse still, the solution manual offers no explanation for this.  So after a chat with my teachers I was suggested to follow the blogs of grammarians and look for any rules for the sentences that have contradictory answers!  I did so and was clarified by  post of pronouns, Rule 5.  Then I saw a book by the same author. I was momentarily happy. It was Momentarily because the reviews on Amazon were too bad about this book. After reading a couple of forums about the book I found a common statement saying that no grammar book is exhaustive.  So, it's okay for me to have more than one. And my simple question is what will be a good and almost exhaustive (if not fully exhaustive) book of English grammar to help get through the subtle usages of English in my management entrances  which is crisp and to the point and yet covers all important rules and syntax, and most importantly having practice tests at the end with solutions and explanations?


Thought this wouldn't be too bad to figure out, but I'm kind of stumped.  I have three columns of data and want the output to be a series of all possible combinations, with the terms separated by a space.  For example, Column A has text in 23 rows down, Column B has text in 35 rows down, and Column C has text in 7 rows down. I can write what I want to have happen, output would be in Column D, would be something like this: =A2&" "&B2&" "&C2 =A2&" "&B2&" "&C3 =A2&" "&B2&" "&C4 =A2&" "&B2&" "&C5 =A2&" "&B2&" "&C6 =A2&" "&B2&" "&C7 =A2&" "&B3&" "&C2  <---Note the next B value starts here =A1&" "&B3&" "&C3 =A1&" "&B3&" "&C4 =A1&" "&B3&" "&C5 =A1&" "&B3&" "&C6 =A1&" "&B3&" "&C7 =A1&" "&B3&" "&C2  <---And again here =A1&" "&B4&" "&C3    And so on, until all combinations from A, B, and C are combined in a very long column D.  There will be 5,535 combinations (23.  Hope this explanation makes sense.  Excel tries to 'guess' when drag-filling, and I can't get Flash-Fill to 'see' what the repeating series is.  Hoping you geniuses out there will have a few ideas or tips for me.

Let's assume I have 3 columns with labels   A B C D  a b c d e 1 2 3 4 5 6 7 8 9 10   Is there a quick and easy way to create an empty table with all permutations? i.e.   A - a - 1  A - a - 2 ....  D - e - 10


Say I have some code where I have a variable a and I allocate a pointer to point to a:  int a = 5; int* ptr = &a;   However, after this, I want to give the memory location that variable a occupies the name b.  int b = a;  // doesn't work, because it only copies the value &b = ptr;   // doesn't work, not an assignable value  ptr = &b;   // doesn't work, this moves the pointer to point to b             // instead of renaming the location that ptr already pointed to   Is this possible? (There's no good reason for doing this - just curious.)  -- Edit: This question is not about the differences between pointers and references, but rather how to achieve a goal through using them, and thus is not a duplicate of "what is the difference between references and pointers?"

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


basically I'm looking to press a single keyboard shortcut, similar to Cmd+Shift+4, except rather than having to draw my own box, I'd like a box of a predefined dimension appear, such as 300px x 300px that I can move around.   Or an alternative would be to have Cmd+Shift+4 work at a fixed aspect ratio, for example hold down alt and it will be locked to 1:1  The only tool I've found to do this is Snapz X Pro but the price is a bit crazy when I only need it for make screen snips.  My job has a task that requires making multiple (dozens or hundreds) of 1:1 screenshots of various things, I can't fiddle with the mouse down to the pixel. I also can't deal with going through 3 menus and saving and typing my own file name either, but that wouldn't be the end of the world.  If I could just lock the aspect ratio with Cmd+Shift+4 I could start large and batch resize the snips when I'm done, that would be a good alternative.

I am trying to use automator to take a screen shot of a specified area. Though I can only find the option of taking a screenshot of a windows or the entire screen. Is there a option to to this with automator or with apple script?


In the context of particle physics, does time flow for a particle that is isolated and has no subsystems?

I am sorry if this question is silly; it′s just one of those things I wished I asked before leaving university.  If there were a static universe only as big as the size of two particles, say electrons, and there were one electron in it going back and forth from point A to point B: would time also go back and forth in the future (point B) and in the past (point A), or would it be considered to  go forward as it does for us? would it be possible to know how long that electron stayed at point A or point B, would it even make sense to ask? I guess what I am asking is: does time move forward only because there are so many particles moving in this enormous space that it is almost impossible they would all be back in the same position they held at least once before relative to each other? does time exist only as a consequence of a lot of particles and their position relative to each other, and the space for them, just like heat?


I have been trying to solve this problem since 2 days.I am not able to understand what mistake   I am doing.  I am implementing a Stack class Stack1 which has the methods push,pop and peak.  I n the main method of the Stack1 class for each t testcase I am creating Stack1 stack and performing 'n'push pop and peak operations based on inputs given by user   The program is taking inputs but not providing any output  RAther it is just terminating after taking inputs  It would be great if someone would help me. Thank You  Here's my code  import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.Scanner;  public class Stack1 { static final  int max=1000000;     int top;     int[] arr=new int[max];     Stack1()     {         this.top=-1;      }     public void push(int val)     {         if(top<max-1)         this.arr[++top]=val;     }     public int pop()     {         if(top!=-1)           return arr[top--];              return -110;     }     public int peak()     {         if(top!=-1)         {             int maxi=arr[0];                 for(int i=0;i<=top;i++)                 {                     if(maxi<arr[i])                         maxi=arr[i];                 }             return maxi;         }         return -1;     }     public static void main(String[] args) throws NumberFormatException, IOException {         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));         BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));         int t=Integer.parseInt(br.readLine());         Stack1[] st=new Stack1[t];          for(int i=0;i<t;i++)         {              st[i]=new Stack1();             int n=Integer.parseInt(br.readLine());             while(n-->0)             {             String[] str=br.readLine().split(" ");                if(str.length==2)               {                   int k=Integer.parseInt(str[1]);                   st[i].push(k);                }              if(str[0]=="R")             {                 int r=st[i].pop();                 if(r==-1)                     bw.write("Empty\n");                 else                     bw.write(r+"\n");             }             if(str[0]=="Q")             {                 int q=st[i].peak();                 if(q==-1)                     bw.write("Empty\n");                 else                     bw.write(q+"\n");              }             }         }         bw.flush();     }   }   I don't know where it is going wrong It is taking all the inputs but is not providing any output //

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I often buy cilantro from Trader Joe's in a big bunch. I love using the leaves, especially in Indian cooking, but always end up tossing out the stems, which make up half the bunch. Is there something I can do with them that I'm unaware of?

Is it necessary to first remove the stems from fresh cilantro when chopping it for a recipe? If so, how much of the stem should be removed?


I know Ubuntu 17.10 released only a few days ago, but has someone figured out how to auto-hide the top panel like the dock auto-hides when apps are full screen.  I have followed multiple tutorials online, but none of them worked.

Is there any possibility to autohide the Panel in GNOME session?  In picture below I selected the area what I mean.


I want to search through a WhatsApp conversation (dumped as txt file) for any message containing  the string "I will tell to your mom" as well as the message before it.  However, I need to be able to match variations of the search string such as:  - tell to your mom !!  - teLl to Your Mom !!!!!!   Those should also be considered the same if same wording appears in the line before.

zzzzzzzzz aaaaaaaaa bbbbbbbbb & ccccccccc & ddddddddd hhhhhhhhh eeeeeeeee fffffffff & ggggggggg &   in the above line, what i want is to grep/sed/awk (any method is fine) line that have & sign plus one line on top of them. so for example the desired output will look like :  aaaaaaaaa bbbbbbbbb & ccccccccc & eeeeeeeee fffffffff & ggggggggg &   following is what i have tried with no luck.  egrep "&" | -b 1 file.txt


I've tried this code snippet to assign '\0' to the last character of a C string  char *words = "words"; words[4] = '\0';   why is line 2 causes segmentation fault?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Suppose the following code:  class Person():     def __init__(self,name):         self.name = name  class Student(Person): pass  class Teacher(Person): pass  John = Student('John') Tom = Student('Tom') Victor = Teacher('Victor')   After the script is run, class Person is aware of its subclasses through  In [22]: Person.__subclasses__() Out[22]: [__main__.Student, __main__.Teacher]   How to find all instances of class Student like:  Student.__instances__() AttributeError: type object 'Student' has no attribute '__instances__'

With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?


I am trying to understand how security updates work for the ubuntu package mirror. I see  that the recommendation is to set up security.ubuntu.com as the apt source for the security pocket, and to set archive.ubuntu.com as the apt source for all other pockets. I assume that these correspond to the bionic-security dist and bionic, bionic-updates, bionic-backports, and bionic-proposed apt sources present in my apt config file. Further, it looks like the config file correspondes to these dists directories seen  However, it looks like archive.ubuntu.com has the bionic-security dist present as well. How is this different than the dist of the same name present on security.ubuntu.com? As far as I can tell these are updated at the same cadence. Are these effectively the same? If so, why is it recommended to use security.ubuntu.com for the -security source?

Upon my observation, seems new packages will first appear in security.ubuntu.com, but if you upgrade later, they will appear in XX.archive.ubuntu.com (depends on your config),  Was that true ?


Show that the phi function is multiplicative $$\phi(mn) = \phi(m)\phi(n)$$    Any nice way to prove this without using induction ? The textbook proof looks bit awkward to me, so I am trying to see if it makes sense using other methods. Appreciate any help :D

That is,     why is $\varphi(AB)=\varphi(A)\varphi(B)$, if $A$ and $B$ are two coprime positive integers?   It's not just a technical trouble—I can't see why this should be, intuitively: I bellyfeel that its multiplicativity should be an approximation at most. And why the minimum value for $\varphi (n)$ should be $ \frac{4n}{15} $ completely passes me by.


I want to check if the table has rows and if it contains, then I want to delete it. Below is my code for checking if table has rows in it.       boolean empty = true;     Cursor cursor = db.rawQuery("SELECT count(*) FROM TABLE_NAME",null);     cursor.moveToFirst();     if (cursor.getInt(0) > 0)     {         empty = false;     }     else     {         empty= true;     }     return  empty;    I even tried checking with below code,      boolean empty = true;     Cursor cur = db.rawQuery("SELECT COUNT(*) FROM TABLE_NAME", null);     if (cur != null && cur.moveToFirst()) {         empty = (cur.getInt (0) == 0);     }     cur.close();      return empty;       Both of the above code, throws NullPointerException in line  ("SELECT COUNT(*) FROM TABLE_NAME", null);  Any help would be great !! Thanks

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I stumbled upon this problem and can't find a solution. I tried taking the derivative of this function $e^x - x^e$ and got this function: $e(e^{x-1} - x^{e-1})$ and I can't prove it is positive or equal to zero because it's almost my original problem.  If i could prove the derivative was always positive then i could say that the function is strictly increasing and because the limit as $x \to 0^{+}$, of the function is positive then it must mean that $e^x \ge x^e$.

I find it very strange that $$ e^x \geq x^e \, \quad \forall x \in \mathbb{R}^+.$$   I have scratched my head for a long time, but could not find any logical reason. Can anybody explain what is the reason behind the above inequality? I know this is math community, but I'd appreciate a more intuitive explanation than a technical one.


System will not update nor can I install/remove application because the application apt-get will not release the process.  Rebooting the laptop does not resolve this matter.  I'm very new to this OS and still find myself fumbling around to self fix issues. I get the following error :  Error when attempting to an update of system using the GUI ....  Not all updates can be installed .... Recommend to do a partial update which I do and get the next error .... Unable to get exclusive lock  This usually means that another package management application (like apt-get or aptitude) already running. Please close that application first.   This all started when I was attempting to install apps for Netflix to run per instructions   The last command that was executed was sudo apt-get install pipelight-multi which installed then presented text licencing agreement and OK at the bottom. Clicking on OK with the mouse pointer or pressing the ENTER button did not get past this screen.  In frustration, I closed the terminal program. Which leads me to the area I am at now.  Per MUSHER's request to input the following into Terminal and post(ps aux | grep -i apt)  root      6734  0.0  0.0   7628   880 ?        S    Jul28   0:00 sudo apt-get install pipelight-multi root      6735  0.0  0.1  35840  1332 ?        S    Jul28   0:05 apt-get install pipelight-multi root      6792  0.0  0.0  55328   848 pts/2    Ss+  Jul28   0:02 /usr/bin/dpkg --status-fd 44 --unpack --auto-deconfigure /var/cache/apt/archives/libunistring0_0.9.3-5_i386.deb /var/cache/apt/archives/libgettextpo0_0.18.1.1-5ubuntu3_i386.deb /var/cache/apt/archives/libmpg123-0_1.12.1-3.2ubuntu1_i386.deb /var/cache/apt/archives/libodbc1_2.2.14p2-5ubuntu3_i386.deb /var/cache/apt/archives/cabextract_1.4-1_i386.deb /var/cache/apt/archives/ttf-mscorefonts-installer_3.4ubuntu3_all.deb /var/cache/apt/archives/wine-compholio-i386_1.7.23~ubuntu12.04.1_i386.deb /var/cache/apt/archives/wine-compholio_1.7.23~ubuntu12.04.1_i386.deb /var/cache/apt/archives/libcapi20-3_1%3a3.12.20071127-0ubuntu11_i386.deb /var/cache/apt/archives/libosmesa6_8.0.4-0ubuntu0.7_i386.deb /var/cache/apt/archives/mesa-utils_8.0.1+git20110129+d8f7d6b-0ubuntu2_i386.deb /var/cache/apt/archives/pipelight-multi_0.2.7.1~ubuntu12.04.1_i386.deb root      8670  0.8  2.3  59116 24084 ?        SN   06:10   0:27 /usr/bin/python /usr/sbin/aptd root      9751  0.0  0.6  15180  6928 ?        S    06:31   0:00 /usr/bin/python /usr/share/apt-xapian-index/update-apt-xapian-index-dbus libby    10203  0.0  0.0   4392   848 pts/4    R+   07:02   0:00 grep --color=auto -i apt

My synaptic package manager in ubuntu is giving error:    Unable to get exclusive lock   This usually means that another package management application(like apt-get or     aptitude) is already running. Please close that application first.


I am new to UNIX and am trying to learn basic level text processing in UNIX so maybe this question may seem very basic but I would really appreciate any guidance.  I have a txt file "data.txt" as below   A 1  B 2  C 9  D 1  A 5  B 3  C 9  A 6  C 7  A 5  C 1   for which I was able to piece together a code inside a shell script "script.sh" (with a lot of help) as below  #!/bin/bash  cat | awk 'BEGIN{OFS=FS=" "}!(($1,$2)in c){c[$1,$2]=1;r[$1]=r[$1] OFS $2} END{for(i in r){print i r[i]}}'   This script is called on the text file as below  cat data.txt | ./script.sh 7   to get it to print the format below:  A 1 5 6 5 B 2 3 C 9 4 7 1 D 1   My shell script will also take an argument k (=7 say)  In this case, my script should sample 1 element from each box(A,B,C,D) until have a total of 7 elements sampled. This will be like follows: First pick 1 from A, then 2 from B,9 from C, 1 from D, 5 from A,3 from B, 4 from C and display  A 1 5 B 2 3 C 9 4 D 1   If instead I had k = 9 as my input, then my output should be  A 1 5 6 B 2 3 C 9 4 7 D 1   Thank you in advance. Request you to please guide me from the awk pipe``

I am new to UNIX and am trying to learn basic level text processing in UNIX so maybe this question may seem very basic but I would really appreciate any guidance.  I have a text file as below  A 1 B 2 C 9 D 1 A 5 B 3 C 4 A 6 C 7 A 5 C 1   for which I was able to piece together a command with some help as below  cat | awk 'BEGIN{OFS=FS=" "}!(($1,$2)in c){c[$1,$2]=1;r[$1]=r[$1] OFS $2} END{for(i in r){print i r[i]}}'   inside a shell script to get it to the format below:  A 1 5 6 5 B 2 3 C 9 4 7 1 D 1   My shell script will also take an argument k  (=7 say)  In this case, my script should sample 1 element from each box (A,B,C,D) until it has a total of 7 elements sampled. This will be like follows: First pick 1 from A, then 2 from B, 9 from C, 1 from D, 5 from A, 3 from B, 4 from C and display  A 1 5 B 2 3 C 9 4 D 1   If instead I had k = 9 as my input, then my output should be  A 1 5 6 B 2 3 C 9 4 7 D 1


Some time ago I encouraged by 11 year old son to watch Cosmos: A Spacetime Odyssey with Neil DeGrasse Tyson, and subsequently Cosmos: A personal Voyage with Carl Sagan, as well as other astronomy shows including History Channel's The Universe. One of these such shows inspired a question about black holes and gravity.  Can a black hole be so large that not even the effects of its own gravity can escape?  Perhaps the question rephrased might be: Why are gravitational waves immune to the effects of gravity?

My understanding is that light can not escape from within a black hole (within the event horizon).  I've also heard that information cannot propagate faster than the speed of light.  It would seem to me that the gravitational attraction caused by a black hole carries information about the amount of mass within the black hole.  So, how does this information escape?  Looking at it from a particle point of view: do the gravitons (should they exist) travel faster than the photons?


I'm practicing with Sigma 28 - 300mm f/3.5 - 6.3 Macro lens. And the thing I've noticed is that at 300mm focal length my aperture can be set to as wide as f/5.6. And EXIF data confirms it:    I'm wondering how is that technically possible and if the behavior is considered normal?

I bought Sigma 150-600mm f5-6.3 Contemporary DG OS HSM Lens for my Crop Sensor Canon 1300D.  What I've noticed is that it gives me max aperture of f5.6 at 600MM instead of f6.3 and f4.5 at 150mm on my Canon 1300D.   Please provide your views. Here's the link to the pic with Metadata–


I want to replace internal HDD to a SSD. My laptop's Windows 10 activation key is in its BIOS. I don't want to clone the HDD. What steps do I need to follow for clean Windows 10 installation in SSD? Machine : Lenovo IdeaPad 100-14IBY - 14" - Pentium N3540 - 4 GB RAM - 500 GB HDD.

I've been using Windows 10 for a couple of month now (joined the Insider Preview).  Now my hard drive started ticking so I've bought a new SSD and I want to move the windows installation to the new hard drive, which has been connected to the computer (unpartitioned). I don't mind and I even prefer reinstalling it over again.   Since I have the free version of Windows 10 pro, can I still reinstall it anew? Does the windows 10 installation offer disk management and partition like the older Windows installations used to? How should I reinstall Winodws 10 x64 the easiest but still remain on free mode?


I want to make my section titles look like the ones in this figure. However I have no idea what font that is, or how to only change the font for the tiles and sections etc. or how to get the fancy box. Is there a way to figure this out? Any pointer or direct solution is appreciated.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Comments like "can you provide more information?" or "clarify what you mean" can become obsolete when the post gets edited. Should the comment be removed after the edit, or not? I think that removing the unneeded comments (those that do not contribute towards solving the issue) is the right thing to do, since it cleans up the question.

These types of comment discussions are pretty common:        @AuthorX: In your post, I think you meant "you're", not "your". - user1234 35 mins ago   Oh, thanks. It's fixed now. - AuthorX 30 minutes ago      Once resolved, those comments are useless and noise.  As a user, I was always wary about deleting my own part in those conversations because it would leave the other user's comment looking orphaned or silly. But as a moderator, I have delete-access to both ends of the conversation.  Do you think users will take offense if these no-longer-relevant comment threads are summarily deleted as a matter of general policy?


I have a latex thesis template, written in english. I would like to use it in french but i didn't translate the defined layout like the word "chapter", " List of ...".   Have you any idea how to translate the layout.

I am using LaTeX to write my scientific paper. My problem is, the paper is in a foreign language. So when I am making chapters, using  \chapter{...}   I get the default "Chapter 1, ..."  I want to set the entire document into French, so that it reads "Chapitre 1, ...". Same for "Table of contents", "Abstract", etc. I don't have a problem with the actual body of text, just those titles that pop up automatically.   Can anybody tell me the way, or should I re-download the program from some French source?


What site in the Stack Exchange network (meta/SO/programmers) is the best for starting a topic about a Microsoft certification? I'm not after technical assistance - I would like opinions on being 'ready' for the exam etc.

I know C++, Python, JavaScript and Prolog.  I want to learn Java.  Will my question be deleted if I ask for recommendations on StackOverflow?  If so, is there another StackExchange site I can ask on?


I'm trying to make a simple login activity using email and password from my Mysql Database.  Now, i set the email value to "e" and the password to "e1" (to test it). And i import it to my app into a string, i check if the password and the email are true:  res = st.executeQuery("SELECT * FROM Users WHERE Email = '"+emailVar+"' AND Password = '"+pswdVar+"' ");          while (res.next()) {               String pswdDb = res.getString("Password");               String emailDb = res.getString("Email");               if (emailVar == emailDb && pswdVar == pswdDb)               {                    Intent I = new Intent (this, MainActivity.class);                   startActivity(I);               }   but the if statement always returns false.  After debugging i saw that the value from the database and the input value are equal.  How do i fix this??

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Consider the dihedral group $D_8$ of order $16$.  Consider $D_8$ with the presentation $D_8=\{r^i s^j : i=0,...,7; j=0,1; r^8=s^2=e; sr=r^7s=r^{-1}s\}$, where $\{e\}, \{rs, r^3s, r^5 s, r^7s\}$ and $\{s, r^2s , r^4s, r^6s\}$ are three of its conjugacy classes (here $r$ is a rotation and $s$ is a reflection).   1) Find the remaining conjugacy classes.  2) Find the centre and class equation for $D_8$.  3) Find the subgroups of order $4$ and explain which is normal and why.

List all the conjugate classes in the dihedral group of order $2n$ and verify the class equation.  The dihedral group is generated by two elements $r$ and $s$.   The order of $r$ is two since $r^2=e$ and $s$ is $n$ since $s^n = e$. And I know all elements can be produced as either $s^k$ or $rs^k$. How can I list all the conjugacy class?


When I manually declare and initialise all the elements in a list of lists and change one of the values, the change can be seen as one would expect.  a=[[0,0,0],[0,0,0]] a[0][0]=9 print(a)   The output is [[9,0,0],[0,0,0]] as one would expect.  However, when I use shorthand notation, changing the first element of the first list changes the first element of all the lists. Here's the code:  a=[[0]*3]]*2 a[0][0]=9 print(a)   This time, the output is [[9,0,0],[9,0,0]]!  What's going on?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


... or at least pass in a specific class?  Here is what I have right now:  private static invoice_response GetResponse(String jsonResponse) {     invoice_response deserialized = (invoice_response) JSON.deserialize(jsonResponse, invoice_response.class);     return deserialized; }       Since I have to deserialized a bunch of things... I'd like to have the following with Generics or perhaps another way:  private static invoice_response GetResponse<T>(String jsonResponse) {     T deserialized = (T) JSON.deserialize(jsonResponse, T.class);     return deserialized; }      Is this possible using Apex?  P.S. @MarkPond provided a solid attempt at the solution to this problem, but, alas, Apex only supports built in generics, thus I can't properly "genericize" this method.

While researching the possibility of using generics in apex I can across a blog with this:      "Generics are partially supported in Apex, you must be using them with   Collections and Batch Apex."   However, I couldn't really find any more information on that. Can generics be used in apex? What are the limitations?  By generic I mean in a  sense where types are not defined in code but determined at run time. For example, I would like to be able to write a List iterator in apex but not have to define the object type. Something like:  global class ListIterator implements Iterator<T>{   global boolean hasNext(){      ...   }        global T next(){             ...   }  }   Where T would be defined at runtime - it could be Account, or Opportunity, or CustomObject1 or CustomClassX. Not only would it work with these data types but when I call hasNext() it would return an instance of that class (as opposed to returning a generic Object or sObject that I would then have to cast).


I'm having a problem with centering my figure captions. Particuarly, I know that we can use \usepackage[justification=centering]{caption} to center captions, however, I'm interested in just centering a specific caption. I've read the caption manual but no luck, so my question is: How can I center a specific caption?

I want to put the caption of my figure in the center but I can't do that. when I put my figure in the center the caption is also in the center but when the caption is too long and there is a return to a newline it is not in the center


I have a script which runs several commands remotely through ssh. I'm running each command separately because I want to do other things in between executions.  However, I don't want to recreate an ssh session every time I issue a new command. I've read about -oControlMaster but I can't seem to get it to work.  When I run:  ssh -oControlMaster=yes -oControlPath=/tmp/test.sock root@host   after I enter my password, I just get an ssh session. If I exit out, the /tmp/test.sock file is no where to be found.   What am I missing?

Currently i invoke the following:  $ ssh me@host.com my_cmd   This is slow and not easy to automate safely. I would like to establish ssh connection once and have some script that will forward my commands to host.com and print output.  Is that possible ?  Adding my machine to authorized_keys is not an option for me and it wouldn't solve slowness issue.


co1=["CM","CD","XC","XL","IX","IV"] s='AAMCML'  for i,j in enumerate(s):     if i<len(s)-1 and ((j+s[i+1]) in co1):         print(j+s[i+1])         **SKIP NEXT LOOP VALUE (I don't need the next value in loop to be printed.                                                                 Here it would be M)**     print(j)   I want the result to be printed like [A A M CM L] (it need not be necessarily a list, just print). In this case M after C should not be printed in the output. Any suggestions would be helpful!

I have a loop going, but there is the possibility for exceptions to be raised inside the loop. This of course would stop my program all together. To prevent that I catch the exceptions and handle them. But then the rest of the iteration runs even though an exception occurred. Is there a keyword to use in my except: clause to just skip the rest of the current iteration?


Previously I unsuccessfully installed Ubuntu at the end of installation it told me that could install bootloader. So I loaded windows from my USB drive and decided to reinstall Ubuntu with out any options (In brackets it said that it will delete Ubuntu and install new one) I thought that would help with bootloader problem. The installation ended successfully without errors. However now Ubuntu works as my default operating system and I don't see my windows files anywhere?? Is there anyway to bring back windows or recover my files?? Were they deleted??  Please help, I have very important information on that hard drive without backup.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Como faço para baixar o ubuntu desktop 32 bits? Não estou conseguindo, se puderem mandar o link de download ou explicar como baixar agradeço!  Translation     How do I download the ubuntu 32-bit desktop? I can not, if you can send the download link or explain how to download thank you!

I need to find the 32-bit version, and all I keep finding is the 64-bit. Can anyone provide me with a link?


I'm having the following code and I'm trying to compile my pdf. But I'm getting an error that says: Package biblatex Error: incompatible package 'ucs' \begin{document} .. my pdf compiles for some reason but the bibliography never appears...  why ?   \documentclass[a4paper,12pt]{book} \setcounter{tocdepth}{3} \setcounter{secnumdepth}{3} \usepackage[greek, english]{babel} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{graphicx} \usepackage{biblatex} \usepackage{tabularx} \usepackage[a4paper, inner=1.5cm, outer=3cm, top=2cm, bottom=3cm, bindingoffset=1cm]{geometry} \usepackage[onehalfspacing]{setspace} \bibliography{ref}   \begin{document}  \bibliographystyle{alpha} \bibliography{ref}  \printbibliography  \end{document}

For my thesis, I use biblatex for the bibliography.  As seen , biblatex is not compatible, with \usepackage[utf8x]{inputenc}. It was reported as close but I still have the same problem with my version of bibtex (last one on archlinux ). I want to use the € symbol inside my report but it fails without utf8.  ! Package biblatex Error: Incompatible package 'ucs'.  See the biblatex package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.7 \begin{document}   Any idea idea how to fix ?  \documentclass{report}  \usepackage[utf8x]{inputenc} \usepackage{biblatex} \bibliography{includes/mybib}{}  \begin{document}  X said Y \cite{bib1}  \printbibliography  \end{document}   and the file mybib  @online { bib1,        title = {Refrence title},        author = {X},        url = {http://site.com/y}}


Are both of these sentences correct?     I will go to the dance if I find somebody to go with me.      I would go to the dance if I find somebody to go with me.   If so, does that mean "would" and "will" are interchangeable?

What would be the correct use of will & would in these sentences?  1) What will happen if I say to my boss that I will not come tomorrow?  2) What will happen if I would say to my boss that I will not come tomorrow?  3) What will happen if I will say to my boss that I will not come tomorrow?  4) What would happen if I would say to my boss that I will not come tomorrow?  There are four sentences which one should I use and in which situation?


I can't figure out why it doesn't work.     java.lang.IllegalStateException: Could not execute method of the activity   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ArrayAdapter.add(java.lang.Object)' on a null object reference at com.example.buddy.test.TestDatabaseActivity.addButton(TestDatabaseActivity.java:31)   When Add button was clicking the app crashed but comment is in database.   TestDatabaseActivity.java  public class TestDatabaseActivity extends ListActivity { private CommentsDataSource datasource; private ArrayAdapter<Comment> adapter = (ArrayAdapter<Comment>) getListAdapter();  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_test_database);      datasource = new CommentsDataSource(this);     datasource.open();      List<Comment> values = datasource.getAllComments();      ArrayAdapter<Comment> adapter = new ArrayAdapter<Comment>(this, android.R.layout.simple_list_item_1, values);     setListAdapter(adapter); }  public void addButton(View view){     Comment comment;     comment = datasource.createComment("My comment");     adapter.add(comment);     adapter.notifyDataSetChanged(); }  public void deleteButton(View view){     Comment comment;     if (getListAdapter().getCount() > 0) {         comment = (Comment) getListAdapter().getItem(0);         datasource.deleteComment(comment);         adapter.remove(comment);     }     adapter.notifyDataSetChanged(); }  @Override protected void onResume() {     datasource.open();     super.onResume(); }  @Override protected void onPause() {     datasource.close();     super.onPause(); } }   CommentsDataSource.java  public class CommentsDataSource { private SQLiteDatabase database; private MySQLiteHelper dbHelper; private String[] allColumns = { MySQLiteHelper.COLUMN_ID, MySQLiteHelper.COLUMN_COMMENT };  public CommentsDataSource(Context context) {     dbHelper = new MySQLiteHelper(context); }  public void open() throws SQLException {     database = dbHelper.getWritableDatabase(); }  public void close() {     dbHelper.close(); }  public Comment createComment(String comment) {     ContentValues values = new ContentValues();     values.put(MySQLiteHelper.COLUMN_COMMENT, comment);     long insertId = database.insert(MySQLiteHelper.TABLE_COMMENTS, null, values);     Cursor cursor = database.query(MySQLiteHelper.TABLE_COMMENTS, allColumns, MySQLiteHelper.COLUMN_ID + " = " + insertId, null, null, null, null);     cursor.moveToFirst();     Comment newComment = cursorToComment(cursor);     cursor.close();     return newComment; }  public void deleteComment(Comment comment) {     long id = comment.getId();     System.out.println("Comment deleted with id: " + id);     database.delete(MySQLiteHelper.TABLE_COMMENTS, MySQLiteHelper.COLUMN_ID + " = " + id, null); }  public List<Comment> getAllComments() {     List<Comment> comments = new ArrayList<Comment>();      Cursor cursor = database.query(MySQLiteHelper.TABLE_COMMENTS, allColumns, null, null, null, null, null);      cursor.moveToFirst();     while (!cursor.isAfterLast()) {         Comment comment = cursorToComment(cursor);         comments.add(comment);         cursor.moveToNext();     }     cursor.close();     return comments; }  private Comment cursorToComment(Cursor cursor) {     Comment comment = new Comment();     comment.setId(cursor.getLong(0));     comment.setComment(cursor.getString(1));     return comment; } }   Comment.java  public class Comment { private long id; private String comment;  public long getId() {     return id; }  public void setId(long id) {     this.id = id; }  public String getComment() {     return comment; }  public void setComment(String comment) {     this.comment = comment; }  @Override public String toString() {     return comment; } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm setting up my mysql installation (that still contains data). The problem is: I setted utf8 in several settings, but still doesn't work fine.  MySql is xampp-managed, and these are settings  +--------------------------+--------------------------------+ | Variable_name            | Value                          | +--------------------------+--------------------------------+ | character_set_client     | utf8                           | | character_set_connection | utf8                           | | character_set_database   | utf8                           | | character_set_filesystem | binary                         | | character_set_results    | utf8                           | | character_set_server     | utf8                           | | character_set_system     | utf8                           | | character_sets_dir       | C:\xampp\mysql\share\charsets\ | +--------------------------+--------------------------------+   I also edited my.ini:  ## UTF 8 Settings init-connect=\'SET NAMES utf8\' collation_server=utf8_unicode_ci character_set_server=utf8 #skip-character-set-client-handshake #character_sets-dir="C:/xampp/mysql/share/charsets"   My problem is accented words matches. Actually, if I select a field, the accent is "?".

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Let $\alpha > 0$, $M_t=\exp(\alpha B_t - \alpha^2 t/2)$ for all $t \ge 0$. Show that $M_t \to 0$ a.s. I have started a class in stochastic Calculus and we are using the text by Steele. I have been staring at this text book for days and I just can't seem to understand this. I guess I don't have sufficient background in probability theory. Apparently we are supposed to use the inversion property of Brownian motion for the main tool here but I still cannot see it. I know that what we are trying to show is this. $$P \left ( \lim_{t \to \infty} M_t = 0 \right) = 1$$ We have a main tool called Doob's Maximal inequality which is supposed to be used for probabilistic purposes but I'm not sure if it fits in. I start by trying to take a limit. $$\lim_{t \to \infty }\exp(\alpha B_t - \alpha^2 t/2) = \lim_{t \to \infty } \frac{ \exp(\alpha B_t) }{ \exp(\alpha^2 t/2) }$$ I know the point is that we need to show somehow that the denominator increased "faster" than the numerator, so this limit goes to zero. However I really am at a loss for how to proceed. I don't see how to fit probability into it. I feel that I have had zero examples about how this works I just don't understand the technique. Thanks for any help!

Define the exponential Brownian martingale as $N_t = \exp\left\{a W_t - \frac12 a^2 t \right\}$ which is a martingale with respect to the natural filtration of $W$ which stands for a standard Brownian motion.  I now want to prove that $N_t \rightarrow 0$ a.s. for $t \rightarrow \infty$. As $N_t$ is a martingale it is by definition in $L^1$ hence Doob's martingale convergence theorem tells us that there exists a $N_\infty \in L^1$ such that $N_t \rightarrow N_\infty$ a.s., but how could I prove that $N_\infty \equiv 0$? Any help is greatly appreciated!


After windows failed to format my external raw drive, I gave a shot to Gparted in linux. Gparted says "ërror input/output error during read on /dev/sdb" Clicking ignore I can see my drive labeled "unallocated" trying creating a new partition table it says "libparted bug found, ërror input/output error during read on /dev/sdb "  I have looked on many answers and cant seem to help. I have also tried cfdisk, fdisk without success.

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


I have 4 textboxes, 2 of them being password boxes (for the user to confirm their password).  Here's my code:  public void actionPerformed(ActionEvent arg0) {     String username = usernameField.getText();     String emailAddress = emailField.getText();     String password1 = passwordField1.getText();     String password2 = passwordField2.getText();     if (password1 != password2) {         [code here]     } }   How can I make it so that if the passwords aren't equal it stops the rest of the code in that method from executing?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


The The On-Line Encyclopedia of Integer Sequences (OEIS) maintains a  describing how to produce various mathematical symbols in LaTeX. However, several of the OEIS commands are custom defined. For example, they say that the symbol for the real numbers (ℝ) can be produced by writing $\R$. However, doing that will result in an error unelss you import a package or define a new command. In "vanilla" LaTeX, blackboard-bold ℝ is often achieved by writing $\mathbb{R}$ To get the  to work, you have to write something like \newcommand\R[...]         Is there a webpage similar to the OEIS wiki page on mathematical symbols for vanilla LaTeX? When I say a "vanilla" copy of LaTeX, I mean an unmodified copy of LaTeX. The Vanilla distribution of LaTeX might have some additional libraries if those libraries are standard or very popular. However, we don't define any new commands inside of our document or import any esoteric packages having fewer than two dozen users.

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'm very new to the spellcaster archetype in D&D. I've been playing rogues exclusively in 3e and 5e in every one of my campaigns, so yeah.  I'm playing a level 3 bard with 17 charisma. I only know level 0 and 1 spells.  In terms of bonus spells, with the feat empower spell, can I cast an empowered level 0 using a level 2 slot, since my character has a bonus level 2 spell slot and empower increases the spell level by 2?

This question is inspired by discussion , about how Heighten Spell works with Reserve Feats.  The question that I am asking here deals with whether or not players can cast spells using spell slots for spell levels that they don't have access to yet.    I feel like an example would explain this concept best.  Take Xylitol, the first-level wizard with an intelligence of 18.  He has 5 0th-level spells per day and 3 1st level spells per day from his class.  He also has 1 bonus 1st level spell per day from his high intelligence.  The  table says that he also has 1 bonus spell of each 2nd, 3rd, and 4th levels.  The question is this:  Can Xylitol cast 1st level spells using the bonus slots for his 2nd, 3rd, and 4th level spells?  He clearly can't cast spells that are inherently higher level than 1st, since he can't learn them, but can he cast 1st level spells using bonus 2nd, 3rd, and 4th level slots?  This has come up on these boards before, .  What I'm looking for here is a clear rules citation that clarifies this one way or the other.  The wording in the section on ability scores makes it quite clear that characters cannot cast spells that are actually higher level than their class allows them to cast, but it is not clear that these higher level slots are barred until the appropriate spell level is unlocked.  If a character has access to a spell level that they can't use because their ability score isn't high enough, they can freely use those slots for lower level spells, so why can't they use their bonus spell slots for lower level spells?  As KRyan's answer says, the Basics section covers this.  Based on questions and comments both here and elsewhere, that section seems to be worded ambiguously enough that it's caused confusion.  I'd like to find another, more clear wording to this rule if at all possible.  Answers from either D&D 3.5 or Pathfinder are acceptable, but please note which one your answer applies to.  N.B. I'd like to note that I personally don't feel that players should have access to higher level slots like this.  There are a large number of locations where it's heavily implied that this is not the case, but I feel that finding a clear rules citation here would be helpful.  I can't find one that is clear for either interpretation here.


This question has been asked but not solved before on here.  I have an Ironlake laptop with a 520 M and integrated graphics.  It has been working fine for ~2 months now, but just today I performed a software update with the Software Updater application.  After rebooting, my system loaded the software rendering drivers instead of the Intel integrated graphics drivers and is using low graphics mode for unity.

I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.   The display is blank The display flickers Items on the screen do not display correctly Certain programs complain of graphics issues The computer boots to low-graphics mode Your specific issue may not be here, but try the solutions described in the answers anyway.   This question is very broad, but each one of these issues likely has one solution.    If you are experiencing a login loop, check the last part of my answer.    If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.    Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.


I have this circuit in which I want to convert the input voltage of micro order to volt. The circuit image has been posted. I have figured out the bandpass filter ( basically everything after the big vertical dotted line).  What I can't figure out is that the input offset voltage of AD620 is 30 micro volt. So it could create a problem. For that I have read that you need to use a capacitor in series with the feedback resistor but I don't know how to calculate the value. If anyone has a better idea about this please do suggest! Also another doubt I have is whether the comparator (TL084CN) after the instrumentation amplifier (AD620) will be able to shoot the milli order voltage to near Vcc value or at least bring it into order of volt? The shape of the signal doesn't matter to me but only the frequency does . So I'm trying to shoot the voltage up before passing it into the bandpass filter. If you have understood my goal and have better modifications to the circuit please let me know!  Datasheet used:     Image of the circuit: PS: The gain is 883 due to the 56 ohm resistor at instrumentation amplifier (not clearly seen in the image) ]

I have a circuit which has an input of voltage of the order of micro. I want to convert it into volt order. I am using an instrumentation amplifier AD620 with gain of 1000 to first convert it into milli order. And then I am using TL084cn as a comparator whose one input is the milli order voltage and the other is grounded. The +Vcc and -Vcc is 10 V. Also the frequency of operation is between 8-40 Hz. The question is that theoretically this is possible but before I implement it practically I would want to know whether I could face some issue for such sudden abrupt change in the order of the voltage.  Also, keep in mind please that I don't actually care about the shape of the signal cause in my project the information is in frequency and not in amplitude.


I was searching a lot for everything related to this topic. Could someone give me an idea, a suggestion how could I convert the cell values of a float raster to integer in Python environment using GDAL?  I have tried this:  int(round(myarray))

I have a raster with float number values for example: 2.544459104537964 and I want to round these up to integers. I have seen other posts on ArcGIS like  but when I use Raster Calculator in QGIS, Int(myraster + 0.5) only makes the first value (which is 0) to 0,5 and the last one (which is 100) to 100,5. The other pixels stay float.


I'm trying to find the function this series converges to. $\sum \limits_{i=0}^{\infty}{{{n+i}\choose{n}}{(\frac{a}{x})}^{i}}$ I guess it converges to $(\frac{x}{x-a})^{n+1}$. Can someone help me?

I was wondering if there is also a closed expression for the series   $$\sum_{n=0}^{\infty} \binom{n+k}{k} x^n$$ where $|x|<1.$  A few examples suggest that the answer is $\frac{1}{(1-x)^{k+1}}$ but I don't see how to show this.


could you please someone tell me how to match these types of url in string?  For example:  example.com www.example.com http://example.com https://www.example.com example.com/exam1/exam.php example.com/exam ...   Actually, I need to detect all forms of URL you can see for example on Twitter in plain text.  I have tried to find some regex by google but I couldn't find something which fits all the types in Java.  UPDATE: Maybe I wasn't too precise - I need find all these types of url in plain text and replace them by some token. For example: status.replaceAll(yourRegex, "URL");  Thank you!

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


Maybe there is the same question but I haven't found it.  I have following code:  class MBase {     public:         ~MBase() { cout << "Base destructor\n" << endl; } };  class MF: public MBase {     public:         ~MF() { cout << "MF Destructor" << endl; } };  class MS: public MBase {     public:         ~MS() { cout << "MS Destructor" << endl;} };  int main() {      unique_ptr<MBase> ptr1 = unique_ptr<MF>(new MF());     unique_ptr<MBase> ptr2 = unique_ptr<MS>(new MS());      return 0; }   And there is output   Base destructor  Base destructor   Isn't it right? Why derived destructors weren't called? What I have to do to fix that?

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


In my PC (2 GB RAM, 160 GB HDD) I have Windows 7 in Partition C  (20 GB). I have tried Ubuntu 12.04 from Live USB. I now want to replace Windows 7 with Ubuntu 12.04 in the same C Partition without affecting the other partitions and their contents. I have read the answer to a similar question but still do not feel confident. Like in that question, I too have proceeded till "Something Else", but then precisely what steps should I take? Is it possible to simply choose the C Partition and start installing Ubuntu there? In that case what other choices should I make?

My laptop is filled with viruses and Windows XP is just becoming impossible to work with.   I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh?


I'm trying to use Python to create a sun lamp (in Cycles mode) and then change it's strength.  I began by performing the operations manually and then copying the Python code that was produced in the top output area.  When I then run the script, the sun lamp is created, but I get an error before the strength can be set.  Here's the code:  import bpy  bpy.context.scene.render.engine = 'CYCLES' bpy.ops.object.lamp_add(type='SUN', view_align=False, location=(0, 0, 0)) bpy.context.space_data.context = 'DATA' bpy.data.node_groups["Shader Nodetree"].nodes["Emission"].inputs[1].default_value = 2   Which produces this error:  File "/Text", line 5, in <module> AttributeError: 'SpaceTextEditor' object has no attribute 'context'   It seems as though the problem is that I'm not properly telling Blender what object I want to change?    The answer (thanks to poor):  import bpy    bpy.context.scene.render.engine = 'CYCLES' bpy.ops.object.lamp_add(type='SUN', view_align=False, location=(0, 0, 0)) bpy.context.object.data.node_tree.nodes['Emission'].inputs['Strength'].default_value=3

I'm trying to animate the colour and strength properties of an emission shader based on external data using script. I add a cube and give it an emission shader. I can alter the strength property using:  bpy.context.active_object.active_material.node_tree.nodes['Emission'].inputs['Strength'].default_value=1   I then try to add a keyframe on the strength property using:   bpy.context.active_object.active_material.keyframe_insert(data_path="nodes[\"Emission\"].inputs[1].default_value",frame=10)   But I can't get the correct data_path. I must be missing something fundamental here. I have quite limited scripting experience in blender.  Code suggestions gratefully received.


I accidentally issued 'sudo rm -rfd *' in the /usr/local directory. What would I have to do to at least get it back to how it would be from a fresh install (Linux Mint 15)?

By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?


I want to prove the following statement:     Let linear operator $T:V\rightarrow V$ ($V$ is $n$-dimentional). Then there exists a vector $v$ such that $\left\{ v, Tv, ..., T^{n-1}v \right\}$ form a basis of $V$, iff $f_T=m_T$.   (Actually, the $\Rightarrow$ direction is quite easy. I need to prove the other direction.)  I've seen couple of answers to this problem in this site, all using the "Rational Canonial Form", which is something I wasn't tought in the course (but I am familiar with the Jordan Form).  Moreover, the only proof I've found on the internet is , which seemed to be promising, until I got to this sentence, which unfortunately seems to be a mistake:     See that $V_i$ is a subspace of $V$, for all $1 \leq i \leq m$, and   $V=\bigcup_{i=1}^m V_i$. Therefore $V=V_k$, for some $1 \leq k \leq m$.   I don't know if that's true for infinite vector spaces, but for finite ones, such as $\mathbb{F}_p^n$ it's certainly isn't.  Any step towards a proof would be appriciated (as well as an explanation for the suspicious claim stated above). Thank you!

I'm trying to make my way through two problems in Curtis's Linear Algebra, chapter 25.  One of the two problems is this one, #5:     Prove that $V$ is cyclic relative to a linear transformation $T \in \mathcal{L}(V)$ if and only if the minimal polynomial of $T$ is equal to the characteristic polynomial.   Part of the issue is that I'm not really sure what it's asking. The statement that $V$ is cyclic seems to suggest that the entire vector space (say it has dimension $n$) is generated by some vector $v \in V$, along with $Tv, T^2v, \ldots T^{n-1}v$; Curtis's definition of a cyclic subspace (as opposed to a space, though I can't see why there should be a difference) seems to reinforce this:     A $T$-invariant subspace $V_1$ of $V$ is called cyclic relative to $T$ if $V_1 \neq 0$ and there exists a vector $v_1 \in V_1$ such that $V_1$ is generated by $\{ v_1, Tv_1, T^2v_1, \ldots T^kv_1 \}$ for some $k$.   However, I've seen several examples that seem to directly contradict this interpretation. For example, we recently had a take-home midterm that required we find elementary divisors, rational canonical form, etc., of a $6\times 6$ matrix; a classmate who received a perfect score on her test found that her matrix's characteristic polynomial was equal to its minimal polynomial — it was $(x+8)^2 (x+14)^2 (x^2+61x+80)$ — and yet the vector space could be written as $\left< v_6 \right> \oplus \left< v_4 \right> \oplus \left< -v_2+v_3+v_6 \right>$ — i.e., as the direct sum of three cyclic subspaces, not as one cyclic subspace.  So that suggests that "$V$ is cyclic" might mean the direct sum of cyclic subspaces. However, while working on the exercise that follows (#6), I came across this:  $$S= \left(\begin{array}{ccc} -1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 2 \end{array}\right)$$  Here, the characteristic polynomial is not equal to the minimal polynomial, which is $m(x) = (x-1)(x+1)(x+2)$. The eigenspace associated with $\lambda = 1$ has dimension $2$. And so it seems as though, if $V$ has basis $\{ v_1, v_2, v_3, v_4 \}$, we can write $V = \left< v_1 \right> \oplus \left< v_2 \right> \oplus \left< v_3 \right> \oplus \left< v_4 \right> $. This would seem to contradict my second interpretation of the original question.  Obviously I'm missing something. Could someone fill me in on what it might be? (I've tried to be thorough, but I'm also trying not to make this ridiculously long; if I've left out necessary information, I'll be happy to append it.)


We know that for any integer $n$, $\sin(n)$ can never equal to one. So what is the maximum value of $sin(n)$? How close can the sine of an integer get to unity?  I'll be really interested to know if such a value exists.

In formal, does there exist $k\in\mathbb{N}$ such that $\sin n\leq\sin k$ for all $n\in\mathbb{N}$?


I am working on a document in which several plots are placed alongside each other. Some of them use "fill between" and some of them don't. The problem now is that depending on whether this is used or not, the legend has a different font size. Additionally, the thickness of the plots is also affected. As a work around, I now use an empty "fill between" in every plot (third tikzpicture) but this feels too much like cheating and I would love to know what is really going on here.  Here is a MWE:  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{fillbetween}  \begin{document}  \begin{tikzpicture}[scale=0.55] \begin{axis}[     ticks=none, axis x line* = bottom,      samples= 160, domain = -3:3,         xmin = -3, xmax = 3,         ymin = 0, ymax = 3,     legend style={at={(axis cs:2.9,2.9)},anchor=north east}]     \addplot[name path=f, black, thick, mark=none, ] {max(2.8-2*x^2,0)};     \addplot[name path=g, black, thick, mark=none, dashed, ] {max(1-0.3*x^2,0)};     \addplot[name path=line, gray, no markers, line width=0pt] {0};     \addplot[color=gray, fill opacity=0.25] fill between[of = f and line, split];     \legend{$f$,$q$} \end{axis} \end{tikzpicture}\hspace{5em} \begin{tikzpicture}[scale=0.55] \begin{axis}[     ticks=none, axis x line* = bottom,      samples= 160, domain = -3:3,         xmin = -3, xmax = 3,         ymin = 0, ymax = 3,     legend style={at={(axis cs:2.9,2.9)},anchor=north east}]     \addplot[name path=f, black, thick, mark=none, ] {max(2.8-2*x^2,0)};     \addplot[name path=g, black, thick, mark=none, dashed, ] {max(1-0.3*x^2,0)};     \addplot[name path=line, gray, no markers, line width=0pt] {0};     \legend{$f$,$q$} \end{axis} \end{tikzpicture} \begin{tikzpicture}[scale=0.55] \begin{axis}[     ticks=none, axis x line* = bottom,      samples= 160, domain = -3:3,         xmin = -3, xmax = 3,         ymin = 0, ymax = 3,     legend style={at={(axis cs:2.9,2.9)},anchor=north east}]     \addplot[name path=f, black, thick, mark=none, ] {max(2.8-2*x^2,0)};     \addplot[name path=g, black, thick, mark=none, dashed, ] {max(1-0.3*x^2,0)};     \addplot[name path=line, gray, no markers, line width=0pt] {0};     \addplot[color=gray, fill opacity=0.25] fill between[of = line and line, split];     \legend{$f$,$q$} \end{axis} \end{tikzpicture}  \end{document}   Edit: thanks to the answer by Zarko, I now think this question is a duplicate of . For some reason, invoking fillbetween causes the scaling to suddenly affect the legend. I still haven't figured out why though.

I recently ran into scaling problems with the very nice pgfplots library fillbetween. See the following example, which is perfectly fine:  \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture}[scale=1.0]  \begin{semilogxaxis}[xmin=1,xmax=256,grid=both,legend pos=north west,             xlabel=Nb. of sub-domains,ylabel=Number of neighbors,legend cell align=left,             every axis y label/.style={at={(ticklabel cs:0.5)},rotate=90,anchor=near ticklabel},             xtick={1,2,4,8,16,32,64,128,256},xticklabels={1,2,4,8,16,32,64,128,256}] \legend{Min., Max., Average};  \addplot[color=blue,very thick,mark=*,name path=A] coordinates { (1,0) (2,1) (4,3) (8,4) (16,3) (32,3) (64,4) (128,4) (256,5) }; %Min \addplot[color=gray,very thick,mark=*,name path=B] coordinates { (1,0) (2,1) (4,3) (8,6) (16,9) (32,12) (64,15) (128,15) (256,16)}; %Max \addplot[color=black,very thick,mark=*] coordinates { (1,0) (2,1) (4,3) (8,5.5) (16,6.12) (32,7.88) (64,9.59) (128,10.50) (256,11.37)}; %Avg \addplot[orange,opacity=0.4] fill between[of=A and B];  \end{semilogxaxis}  \end{tikzpicture}   \end{document}     Now, I just change scale=1.0 to scale=0.8, and I obtain the following result:    Note that if I comment the "fillbetween" line in the code, everything works fine when scaling the picture. Does anyone has an idea about this ?  Cheers


My service has been disconnected on my iphone6. I want to use it for imessage, how do I remove the old phone number that's grayed out in the send/receive in message settings?  Thanks

Good day everyone. For only 1 hour (!) I used my relatives iPhone with my sim card and that's it, he keeps receiving all of my iMessages. I tried checking in iTunes all devices associated with my account and his device is not listed. I tried to log in and log out to/from iMessage on his phone with his apple ID, still won't help. How can I stop this nightmare!? When I go to iMessage settings>Send & Receive on his device, there is only my phone number listed, how do I remove it without smashing phone to the wall?! Thanks and have a great day  EDIT. After talking to apple support for some time, they removed my phone number from my friend's iMessage. So I guess if you are facing same problem you have to contact support.


I am writing a proof by mathematical induction.  I prove the base case: $n = 0$. In the inductive step I want to prove $P(n + 1)$ by assuming $P(n)$. As it turns out, to show $P(n+1)$ I need to rely on  all $P(k), 0 \leq k \leq n$.  Is this possible? Or do I need to reconsider my proof strategy?

I just started to learn induction in my first year course. I'm having a difficult time grasping the concept. I believe I understand the basics but could someone summarize simple induction and strong induction and explain what the differences are? The video I'm watching explains that if $P(k)$ is true then $P(k+1)$ is true for simple induction, and for strong induction if $P(i)$ is true for all $i$ less than equal to $k$ then $P(k+1)$ is true. I don't really know what that means.


Let us have a simple graph G. (That means no loops and no multiple edges)  Prove that $\chi \geq  \frac{V^2}{V^2-2E}$  I found the task in the book by John Bondy "Graph Theory with Applications" (Task 8.1.1)  The preliminary theorems didn't help me, and trying to transform the equation didn't help either.  I know that $2E \geq \chi \cdot (\chi -1)$. And that $V \geq \chi$  My equation can be transformed to $V^2 \geq 2E \cdot \frac{\chi}{\chi -1}$  Am I close?  Searching I have discovered that my question is a duplicate. The answer down here is partial, but more beautiful than the answer to the question, which is duplicated, though.

The smallest number of colors needed to color a graph $G$ is called its chromatic number, and is often denoted $\chi(G)$.  Show that if graph $G$ is simple, then $$ \chi \ge \frac{V^2}{V^2 - 2E}. $$


I have a round trip ticket from Mexico to London, this flight has a connection in Paris, we are currently in Paris.  Do we need to go back to London or would we be able to board in Paris and just not use the first flight.

I've a friend that booked a round-trip journey. He booked A-to-B and B-to-A. Somehow he needed to be earlier at location B, so he took a train and did not take the flight from A to B.  When he went to the airport to take the "back home" flight (B-to-A), he was informed that his ticket was canceled because he did not take the A-to-B flight. They canceled the ticket and sold it to someone else.  Is this normal? The company said it was their right to do so, and he could not get the flight back. The company was Iberia.


Until yesterday the review queue indicator was always orange like:    But yesterday it was dark red (unfortunately no screenshot).  Is there color-code (semantic behind the color not CSS/HTML stuff) for the indicator?

The  color scheme for the suggested edit indicator and the moderator/10k flag indicator is:   red #800000 for suggested edits ; orange #fe7a15 for flags ; light blue #1e7ecc for the moderator inbox.   I find the contrast of the suggested edit indicator poor. (It's the old color scheme from MSO and I found the contrast poor then.) I also find it inconsistent that the moderator inbox and the moderator flag indicator have completely different colors.  Please switch the flag indicator to the blue shade used for the moderator inbox indicator. This frees orange as a color for suggested edits, which is what it was on most sites before the top bar overhaul. (Alternatively, the fairly similar beige (?) that was used on SO could be used instead.)  I'm not hung on this color choice; what I really want is better contrast for the suggested edit indicator, and the same color for both moderator indicators.


I bought a DIY air purifying kit that uses a PC fan to pull air through a HEPA filter. A blade broke and so the fan needs to be replaced. I want to buy a better quality fan, for example from Noctua.  Here is an example kit, though mine is slightly different:   Adjustable power supply: 12V 2A ()  Fan: 12V 0.30A brushless  My questions:   In general, is it safe to use an adjustable power adapter on a PC fan? Conditions: the fan pulls air through a filter, runs 8 hours / day, 365 days/ year.  Can I use any PC fan with the adjustable power adapter? Or should I look for certain things when choosing a fan? The ideal fan being brushless and having a high static pressure rating. Assuming the fan is rated below 12V 2A.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I made an infographic in Adobe Illustrator, and saved it as a .svg file. But then when I tried to open it in the Google Chrome browser, some of the fonts and some italicized fonts were not even italicized. Why is this happening and what is the solution?  It was 600*1100 pixels because I had read somewhere that it is a good size to start with.   It actually turned out to be pretty ugly!

I'm writing an article on my site about the advantages of new web technologies, among others HTML5, CSS3 and SVGs, one of the advantages of the latter being the ability to select text in what is otherwise effectively an image.   I'm new to SVGs, and just made my first decent graphic in Illustrator. I've embedded it into a page with the GWF script for the Ubuntu font in the tag. As it turns out, the Ubuntu font displays correctly in regular text, but for this trick to work in the SVG, the Google script has to be embedded in the SVG itself. How can I do this?


Yesterday, I read an interesting answer about drawing histogram in Android application. However, I didn't understand the use of two variables whose one is not initialize. So, I decided to add a comment to know the meaning of both variables. As I'm new on Stack Overflow, I cannot add a comment (I don't have any reputation), so I decided to add an answer but as it was more a question than an answer, it has been deleted.  How can I ask more information about an answer which seems to be incomplete? I have tried to search on Meta Stack Overflow but my English is not perfect, and it is difficult to find right key words.

Meta only requires a reputation of 1 in order to add comments to a question, however most other require 50 or more. As someone pretty new to using Stack Exchange, I find it frustrating because there are a lot of questions which require clarification.  I find lots of questions where I have lots of knowledge, but I need to ask clarifying questions to properly answer their question. It doesn't feel right for me to put that in an answer, but makes sense to do so as a comment to their question.  What is the best practice for obtaining clarifying information when unable to post a comment?


This professor has a few documentaries available explaining science to the layman like myself and he showed an equation no longer then a sentence that he says unifies all the know forces and particles in the universe.  How can this be possible?   Maybe I should add a thought or two for clarity.  How was it decided that a "new" force was needed for radioactive decay ?  And finally below:  Then I assume it was shown that that weak force and electromagnetism were actually the same underlying "entity" at some earlier time in our universe. Assuming then that gravity and the strong force along with the electroweak force are unified then wouldn't the theory have to necessarily show that either no other fundamental force can exist or show the total of the ones that can exist?

When Michio Kaku talks about science he often likes to refer to string theory and  to his equation which looks like this (not sure if wrote right): $$L = \Phi^\dagger[i\partial_{\tau}-H]\Phi + \Phi^{\dagger} \ast \Phi \ast\Phi .$$ It appears to me like some field theory Lagrangian with an interacting and a free part but I have no idea what it actually describes.   Can all of string theory really be summarised in this equation? Can someone give a brief description?


From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


Which one is more fundamental, Set theory or Axiomatic system? Which one can be defined without the other?

I wonder about the foundations of set theory and my question can be stated in some related forms:   If we base Zermelo–Fraenkel set theory on first order logic, does that mean first order logic is not allowed to contain the notion of sets? The axioms of Zermelo–Fraenkel set theory seem to already expect the notion of a set to be defined. Is there are pre-definition of what we are dealing with? And where? In set theory, if a function is defined as a set using tuples, why or how does first order logic and the axioms of Zermelo–Fraenkel set theory contain parameter dependend properties $\psi(u_1,u_2,q,...)$, which basically are functions?


Not a duplicate question, Question is 'how to apply custom css to only one lightning input without affecting css of any other lightning input elements.  I am trying to apply custom css to lightning input but it is not working.  HTML  <lightning-input class ="lastName" name="lastName" onblur={handleEmptyValidation} >   JS  export default class registration extends LightningElement { handleEmptyValidation(event) {             let srcElement = this.template.querySelector('.lastName');             const style = document.createElement('style');             style.innerText = `c-registration lightning-input input {                 border-color: #54C2B2;                 }`;             srcElement.appendChild(style);     }   It works when I use .slds-input instead of lightning-input input but for some reason it gets applied to all lightning-inputeven though when I am using srcElement.appendChild(style);

How can I change the colors of lightning-button?  I tried doing this in my css:  .my-button {     background-color: #14a6bc;     color: #ffffff; }   and applying that class to my <lightning-button> and removing the variant but I still get the base colors? I am trying to use these examples:


I'm making custom game engine, with custom physics simulation. I ran into a problem while trying to simulate arrows. Here is what I got for now:    The problem is, I don't understand clearly why arrows or spears (I guess, artillery shells do this too?) always turn towards the ground when thrown/shot.  So far, I thought up only some rough clues. On the image below, you can see my idea.    I assumed that 2 points farthest from the center of body's mass might cause the rotation. When long body is moving straight, there is no rotation induced. But when gravity shifts velocity down, it creates angular velocity, although if body is ideally symmetrical this 2 velocities will cancel out. But if center of mass will be shifted backwards or forwards, angular velocities will not be equal, and object will rotate. I used kind of inverse of angular velocity to linear velocity formula, maybe this is not correct...  As far as I see, there should be no torque induced by gravity, it should be canceled out by torque from opposite side of body.  Anyway, I tried to use this approach and (surprisingly) it shows some close results, although not quite as expected...     I fear that I don't see a full picture of how this rotation works.  Related questions:   If you throw ideally balanced stick (ignoring air drag) it will not turn in flight? If you shoot arrow in Earth orbit, will it stay tangent to it's orbit? (As far as I know, spacecraft doesn't change its orientation while orbiting, maybe because it has perfect center of mass...)

In the movies, arrows shot into the air rotate so that during the descent, the arrow head hits ground first. What is the source of this angular momentum?  It would seem that the bow string exerts a force directly in line with the arrow.


In Interstellar, Cooper is able to communicate with his daughter once he enters the Black hole and he is revealed to be the ghost sending messages. This seems to be a paradoxical situation as he stumbles upon the NASA station thru these very same messages. So the sequence is   Cooper is given a message about the location of the NASA station Cooper goes to the location and joins the expedition Cooper joins the expedition and eventually gets into the Blackhole Cooper sends message across space time to guide himself to the NASA station.     How is this possible? There must have been atleast one reality (assuming parallel universes) in which cooper joined the expedition without getting a clue from his own ghost??

In  (2014) the human race seemed to be facing pretty poor odds until they discovered a convenient wormhole placed by an unknown entity expressed as "they". Later in the movie, we discover that       "they" are actually the human race in the future, reaching back in  time to save itself.   The end of the movie gets a little wild on the physics end, and I'm happy to take that ending as is - no need for it to make sense - but one very basic detail does bother me:  How could the human race have gone back in time to save itself from circumstances that would have caused us to go extinct without our own help (the convenient wormhole)?


I am trying to understand what is seemingly basic arithmetic that is causing a divide amongst my colleagues  $$ 8÷2(2+2) $$  To me respecting the order of operations it would appear the answer is 16 while others say it is 1. The latter value is coming from a colleague is quoting the distributive property having implicit brackets and thus should be 8÷2×(2+2).  Apologies if this is too simple of a question for this exchange.

There is a huge debate on the internet on the value of $48\div2(9+3)$. I believe the answer $2$ as I believe it is part of the bracket operation in BEDMAS.  yields the same answer. I also believe that if $48\div2\times(9+3)$ was asked it would be $288$ which Mathway agrees with as well. However,  says it is $288$ either way. A friend of mine (who is better at math) told me that there is no such thing as 'implicit multiplication', only shorthand so that is in fact done after the division (going left to right, not necessarily because division occurs before multiplication. But he didn't explicitly give a reason) What is the answer and why?


I want to see the output of the Visual C++ Preprocessor on my code -- i.e., the equivalent of gcc -E. For the life of me, I cannot find the relevant compiler switch. How do I accomplish this?

Let's say I have a source file with many preprocessor directives. Is it possible to see how it looks after the preprocessor is done with it?


For all their efforts, the diplomats at Versailles achieved the precise opposite of what they had set out to do, inexorably, tragically laying the groundwork for the next, more horrible world war. In this sense, then, the story of diplomacy also reads as a cautionary tale. source:

I am preparing a press release, and so far the headline of the press release is:     A SOVIET LABOR CAMP SURVIVOR’S TALE   A colleague called the word "tale" into question, since this is a book about a person's actual experiences in a Soviet labor camp.  She feels that "tale" would be more appropriate for something fictional, whereas "story" should be used in this case.  I'm not so sure "tale" is less appropriate for the situation, and on top of that, it sounds better.  Anyone have any good reasons for believing "story" is better than "tale"?


I'd like to put other symbols than arrows, e.g. a + sign, between the nodes of a tikzcd diagram. Is this possible?

Please help me to draw the following diagram:  \begin{displaymath} \xymatrix{ H\ar[r]&H .1={}_HI_Q\supset 1.Q&Q\ar[l]_\epsilon^{\cong}  \\  &R\ar[u]\ar[r]&R\ar[u] } \end{displaymath}


I was having problems logging in to my account, and so I logged in as an unregistered user and asked a question.  I received a good answer and would like to give credit.  How do I login as the same unregistered user to continue with the conversation?

I was unregistered, and asked a question. Then I decided to join using my OpenID.  I didn't register via the same computer as the unregistered though, so now it auto-logs me into my registered account, while my unregistered account is still active.  I want to accept an answer and leave comments under my unregistered account. How can I log back onto it?


here is what im trying to do,  someClass object = new someClass(); Type a=object.GetType(); a someOtherObject =new a();   but the variable a can't be used in place of someClass even though i saved it as a type. I was wondering if there is an alternative method of doing something like this.  As for the why, i want to make a method that takes in a list of monster in my game and it picks a random one, creates a new object out of the one it has chosen and adds it to a seperate list.

One may not always know the Type of an object at compile-time, but may need to create an instance of the Type.    How do you get a new object instance from a Type?


At the moment im trying to create a GUI interface that can add and store departments via an arrayList and then later reference the department arrayList on an add lecturer form (comboBox) so the lecturer can be assigned to a department. the departments arrayList works for actually adding the departments to the arrayList. But i cannot reference the department arrayList onto my add lecturer form(comboBox) an error appears "null pointer exception"  (screenshot below) i have no idea what this error is or how to solve it!  please note the arrayList has been declared in the add lecturer form with the following syntax public ArrayList departments;.  Code is below apologies if i haven't been detailed enough.  submitDepartmentButton.addActionListener(new ActionListener() {     public void actionPerformed(ActionEvent e) {         department new_dept= new department(DepartmentNameText.getText(),              UserNameFeild.getText(), passwordLabel.getText());          departments.add(new_dept);                                      System.out.println(new_dept);          JComboBox SelectDepartmentTypeComboBox = new JComboBox ();         SelectDepartmentTypeComboBox.setBounds(211, 254, 187, 31);                for (int index = 0; index < departments.size(); index++) {             SelectDepartmentTypeComboBox.addItem(departments.get(0));              System.out.println("end");         }     } }   I expect the add lecturer form to be able to loop through the department arrayList onto the comboBox but instead a NULL POINTER EXCEPTION appears

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Question: Let $~x:[0,3 \pi] \rightarrow \mathbb{R}~$ be a non-zero solution of the ODE $$x^{\prime \prime}(t)+e^{t^{2}} x(t)=0~,~~\text{for}~~~t \in[0,3 \pi]~.$$ Then the cardinality of the set $~\{t \in[0,3 \pi]: x(t)=0\} \text { is }~$ $(1)~~$ equal to $1$ $(2)~~$ greater than or equal to $2$ $(3)~~$ equal to $2$ $(4)~~$  greater than or equal to $3$ Note: I edit this question and recommend to reopen this question because I think it is different from the proposed question. Note that I have an answer of the editor question.

The question is to investigate the number of zeroes of $y''(x)+e^{x^2}y(x)=0$ in $[0,3π]$.  Solving this ODE would not be an easy task as one has to use the power series solution and then investigating the zeroes of the solution will require more analysis. I thought it to compare this ODE with the standard $y''(x)+y(x)=0$ whose solution has three or four zeroes in the interval $[0,3π]$.  Since the coefficient of $y(x)$ is $e^{x^2}\ge 1$ for $x\in [0,3π]$ so the solution of given ODE must have atleast three zeroes in $[0,3π]$. However, what  I thought was in the lights of Sturm-Comparison theorem so I am not sure.  Am I correct to interpret this?


The galaxy we live in has a name: The Milky Way.  Does the galaxy where Star Wars takes place have a name?

Has the in-universe name of the Star Wars galaxy ever mentioned in the canon?


Brand new to Drupal and I need to figure out how to create a custom function and call the custom function in the twig file. I need to build a news releases function that reads a directory and pulls the PDF files for a corresponding year. (This should be easy enough in PHP.) The missing key is where and how to create a custom function and how to call this custom function in the template file. A few hours of searching lead me to create this. <MY_CUSTOM_THEME_NAME>.theme function <MY_CUSTOM_THEME_NAME>_preprocess(&$variables, $hook) {   $x = "hello world";   $variables['helloworld'] = $x; }  news-releases.html.twig

{{ helloworld }}

Lorem ipsum...

  Result
hello world
  Sifting through all the searches and YouTube videos, nobody has explained or shown documentation for Drupal 9 on how to create a custom named function. Is this even possible? This is the desired result. Any file function hello_world($year) {   $directory = "/news/releases/" . $year;   $scan_directory = array_diff(scandir($directory), array('..', '.')); }  Any template file
   {% for newsrelease in newsreleases %}
{{ newsrelease }}
   {% endfor %}
  I am not sure on how I can pass a variable back into the custom function so the correct directory will be scanned. Not sure if I would have to just create 5 separate functions for each year and call the correct year like the twig snippet. I've been googling "Drupal 9 custom modules" and dug up nothing to further my quest. If the answer does happen to be "create a custom module" then how do I include the custom module as apart of my existing custom theme? I am using Drupal 9.1.x and I have read  already.

Let's say I create a function in a module file:  function _get_test() {   return 'test'; }   How can I call this in any Twig file? For example *.html.twig, page.html.twig, node.html.twig etc.   OR   How can I pass a variable from PHP to Twig and display in any Twig file.  For example *.html.twig, page.html.twig, node.html.twig etc.


I'm having trouble starting this proof from the definition I know that there exists a limit point $x$ such that $M \ge x > M- \frac \epsilon2$ but not quite sure how to go about it.

I am stuck with the following problem.     Prove that $$\limsup_{n \to \infty} (a_n+b_n) \le \limsup_{n \to \infty} a_n + \limsup_{n \to \infty} b_n$$   I was thinking of using the triangle inequality saying $$|a_n + b_n| \le |a_n| + |b_n|$$ but the problem is not about absolute values of the sequence.  Intuitively it's clear that this is true because $a_n$ and $b_n$ can "reduce each others magnitude" if they have opposite signs, but I cannot express that algebraically...  Can someone help me out ?