Why the "for each" loop doesn't works like a "for" loop in this example?

I need some help with this code, when i try to show all chars in Java with the "for loop" it's okay, java shows me all, when i do this with the "for each" i have only undefined  symbols  char[] chars = new char[65535];     for (int go = 0; go < chars.length; go++) { // THIS CODE IS OKAY!         // for (int go : chars) { // **THIS CODE DOESN'T WORKS! WHY??**          chars[go] = (char) go; // Change int type to char     }     for (char owo : chars) { // Output characters         System.out.println(owo);     }


I keep getting an "Exception in thread "main" java.lang.NullPointerException" in my code

This assignment is asking for getLuminance to "return the luminance of a Pixel as the average of the three color channel values" and I think i have it set up right, but for some reason in the line   while ( sunflower.hasNext() ) {   'hasNext' is giving an error that says "Dereferencing possible null pointer" I have no idea what is going on.  the line   n = (int) TARGET/getLuminance(p);   is also giving an error that is requiring a Picture and a Pixel, but getLuminance only requires a pixel so I'm not sure what's happening there as well.      public Luminance() {     Picture  sunflower;        // picture to be modified     sunflower = new Picture();     display = new PictureDisplayer(sunflower);     display.waitForUser();     setLuminance(sunflower, 127.5);     display.close();     System.exit(0); }      private int getLuminance (Pixel p) {        Picture sunflower = null;        int   r;  // red value of pixel        int   g;  // green value of pixel        int   b;  // blue value of pixel        int   v = 0;  // average           while ( sunflower.hasNext() ) {              p = sunflower.next();              r = p.getRed();              g = p.getGreen();              b = p.getBlue();              v = (r + g + b)/3;              clip (v);      }     return v; }    private int clip(int val){     if (val <=255){         return val;     }     else {         return 255;     } }  private void setLuminance(Picture sunflower, double TARGET) {     Pixel p;     int   r;  // red value of pixel     int   g;  // green value of pixel     int   b;  // blue value of pixel     int   n;         //getLuminance(sunflower);     while ( sunflower.hasNext() ) {         p = sunflower.next();         r = p.getRed();          g = p.getGreen();          b = p.getBlue();          n = (int) TARGET/getLuminance(p);          p.setRed(n*r);          p.setGreen(n*g);          p.setBlue(n*b);           } }  /**  * @param args the command line arguments  */ public static void main(String[] args) {Luminance r = new Luminance();     // TODO code application logic here }


Any tips?   Intel Core 2 Quad x64  Ubuntu precise 12.04 Dell OptiPlex 760 nvidia graphics driver


Is there a hotkey to switch between tabs in Gedit? Ctrl+Tab and Ctrl+PageUp are not working. I'm using Ubuntu 14.04.


Java while loop not terminating despite condition being false

I want to create a game called Crap. The problem that I am facing is that the main while loop does not end despite the condition being set to false (by user inputing "no" when asked if they want to conitnue playing). What is the problem here? Comments are inserted where I think the problem is. import java.util.Scanner;  public class crap {      public static void main(String[] args) {         System.out.println("You are about to play the game of Crap. Press Enter to continue.");                  Scanner enter = new Scanner (System.in);         String hitEnter = enter.nextLine();         Scanner input = new Scanner(System.in);         String proceed = "yes";                      // This loop does not exit even if proceed == "no"         while (proceed != "no"){                          int playerPoint;             int firstDice = 1 + (int) (Math.random() * 10) % 6;             int secondDice = 1 + (int) (Math.random() * 10) % 6;             int throwSum = firstDice + secondDice;                          if (throwSum == 7 || throwSum == 11) {                 System.out.println("Congratulations! You win on your first roll! You rolled "              + firstDice + " and " + secondDice + " for a total of " + throwSum);             }             else if (throwSum == 2 || throwSum == 3 || throwSum == 12) {                 System.out.println("Sorry, you crapped out, you lose! You rolled " + firstDice +                 " and " + secondDice + " for a total of " + throwSum);             } else {                 playerPoint = throwSum;                 System.out.println("You rolled " + firstDice + " + " + secondDice + " which is "                 + playerPoint);                 System.out.println("Your point is " + playerPoint + " now. Good luck.");                                  while (throwSum != 7 ) {                     firstDice = 1 + (int) (Math.random() * 10) % 6;                     secondDice = 1 + (int) (Math.random() * 10) % 6;                     throwSum = firstDice + secondDice;                                          if (throwSum != 7) {                         System.out.println("You rolled " + firstDice + " + " + secondDice +                          " which is " + throwSum);                                                  if (throwSum == playerPoint) {                             System.out.println("Congratulations! You win. You reached your point.");                         break;                         }                         System.out.println("Your point is " + playerPoint + ". Good luck.");                     }                      else {                         System.out.println("You rolled " + firstDice + " + " + secondDice +                          " which is " + throwSum);                         System.out.println("Sorry, you crapped out, you lose.");                          System.out.println("You rolled 7 before reaching your point.");                         break;                     }                 }                    }             System.out.println("Do you want to play again? yes/no: ");                               // even if user enters "no" the loop does not exit                  proceed = input.nextLine();          }         System.out.println("Thanks for playing.");         enter.close();         input.close();     } }


I installed MiKTex 2.9  and want to run a presentation, but always get the Error   "beamer.cls not found" as you can see in picture. The problem is that whenever I search beamer.cls in CTAN website I get nothing !! Where can I found this package ? And where should I send it?  Thanks for your kind helps  following is the picture of all files I have in my MiKTex' file


Why are there "dilapidated" buildings in Harry Potter?

Given that a 10 year-old or so Hermione could mend broken glasses, wouldn't it be very easy for an adult wizard to mend/fix walls/doors/etc... in a building? The principle is the same (restoring things to their unbroken form). For another example, see Dumbledore and Slughorn fixing up a room where Slughorn was pretending to be a chair.  Yet, several times, we see wizarding buildings in poor repair, including those where the owners (e.g. the Weasleys) could not be excused with "they are slobs who don't care" like Gaunts or people in Knockturn Alley would.


How does this Interac e-transfer scam work?

I posted a Craigslist ad for selling iPhone 7. Next day I got a text asking of      Is this item still available... [NAME OF MY AD EXACTLY AS IT'S   SPELLED]   .  So I already was suspicious it's a bot.  Then I replied, yes, it's available.  Next thing I get a text      Ok, then I will pay you [EXACT AMOUNT] and $150 for shipping it to my   destination(Miami at least by the phone number). You accept   e-transfer, right? So, I will send the payment now.   It's clearly a scam, but how does this work? Are they going to send the payment, but will tell me they will send me the password to receive it once they get the shipment of the phone? And never really give it to me? Just wondering what else can it be?  Edit: This question is not a duplicate because it is specific to how Interac e-transfer works. There is no other questions I was able to find that discuss this.  More details:  When I send money via e-transfer here is how it works:   I send some sum of money from my bank to persons email. When I do this, I also specify a codeword that I would later tell to the recipient so they could claim money I sent. They receive an email stating they got money from me. They claim the money via the link in the email and they have to use codeword I would tell them via some other way(not email or separate email letter). While still unclaimed, money can be still recalled by the sender. Can not be claimed and will go back to sender if recipient doesn't know codeword.


What are the evidences of the big bang theory?

We can say about a mention is scientific if we can analyze and repeat that mentioned process.  Our theory of the origin of the world is the big bang theory, which say that there was the absolutely nothing, and sometime occured something which explode this nothing (simplify summery). We are not able to analyze this process, and we have never can explode the absolutely nothing.  I see that we are living in an expanding universe and the opposite of this expansion means that one starting point is needed. But it is just a theory not an scientific mention (even so every scientist talk about this theory like a fact).   So simplify I would you like to ask that what evidences attest to the big bang theory is more than a simply theory?


Algorithm for Community deletion of questions

Is the algorithm for Community deletion of questions documented anywhere? I'm interested in both the SO and MSO algorithms, in case they are different.  If it matters, the trigger for this question is an innocuous, unanswered  ago that received it's first and only downvote recently and which I flagged (as an FYI only, not expecting any reversal) as likely being part of a small retaliatory downvote.


What is the probability hat two particular players verse in Wimbledon if it begins with $16$ players?

Sixteen people play in the quarter-finals at Wimbledon. The winner of the quarter-finals play again in the semi-final to decide who enters the finals. What is the probability that two particular people will play each other if the tournament begins with 16 players? So I have so far (case 1 + case 2) = verse player in quarter OR verse player in semi = $\frac{1}{15} + \frac{14}{15}...$ I'm not sure what else to include in the second case Also the third part of the question asks What is the probability when $2^n$ players begin? The worked solutions show $\frac{1}{2^n-1}+\frac{2^n-2}{2^n-1}\left(\frac{1}{2^{n-2}}\right)^2\:=\:\frac{1}{2^{n-1}}$ which I cannot get. Even symbolab doesn't show the same simplification. As with the previous question, I do not understand the $\left(\frac{1}{2^{n-2}}\right)^2$


Available memory differs by several GiB from what is installed

I have recently upgraded a Windows 7 Home Premium PC with 12 GB of RAM. For some reason once I looked in the System tab it said only 7.96 GB of 12 GB of RAM is usable. I have already tried to go into the msconfig to see if the Maximum Memory was ticked, which it wasn't.  Is there a solution to this error? The other topics that I have viewed on Super User did not help me at all.  Installed RAM:   msconfig:   My Windows Edition is showing "Home Premium":   Resource Monitor:


Limiting moments and asymptotic moments of a statistic

From Casella's Statistical Inference:     Definition 10.1.7 For an estimator $T_n$, if $\lim_{n\to \infty} k_n Var T_n = \tau^2 < \infty$, where $\{k_n\}$ is a sequence of   constants, then $\tau^2$ is called the limiting variance or   limit of the variances of $T_n$.      Definition 10.1.9 For an estimator $T_n$, suppose that $k_n(T_n - \tau(\theta)) \to n(0, \sigma^2)$ in distribution. The parameter   $\sigma^2$ is called the asymptotic variance or variance of   the limit distribution of $T_n$.    I was wondering if both definitions depend on the choice of the sequence $k_n$, because I suspect for some choice of the sequence $k_n$, the convergence may fail, while for some other choice of the sequence $k_n$, the convergence may succeed. Then are the two definitions not well defined, because aren't they supposed to be not dependent on the choice of the sequence $k_n$?  For example, in , $\frac{1}{s_n} \sum_{i=1}^{n} (X_i - \mu_i) \ \xrightarrow{d}\ \mathcal{N}(0,\;1)$ where $ s_n^2 = \sum_{i=1}^n \sigma_i^2 $. According to the above definition of asymptotic variance, $T_n = \sum_{i=1}^n X_i$, $\tau(\theta) = \sum_{i=1}^n \mu_i$ (should \tau(\theta) be independent of sample size $n$?), and the asymptotic variance of $\sum_{i=1}^n X_i$ is $1$  (this is hard to believe, because the variance $\sigma_i^2$ of $X_i$ can be any as long as it is finite)? Can the limiting distribution in the definition of the asymptotic variance to be other  than a Normal distribution? When will the limiting variance and the asymptotic variance be the same?  Similarly but more generally,    how can we define limiting moments and asymptotic moments?  Is the limiting distribution in the definition of an asymptotic moment required to be a Normal distribution? When will the limiting moment and the asymptotic moment coincide?    For example, those two concepts for means: limiting mean and asymptotic mean?   Thanks and regards!


Which stats / gear can get the best our of wasteland exploration?

Trying to get the best out of wasteland exploration here! I get it that you'd obviously need a big gun for survival out there, but apart from that, I'm wondering which stats / gear can get the best out of exploration.    How would you choose who to send out exploring from your dwellers. Which stat is the most important to choose explorers? Strength or endurance maybe? Does it make much of a difference equipping combat outfits? If so, whats the most important stat to boost through outfits?


How do I drop "empty" HTTP packets using iptables?

I have a 1GB-VPS-hosted site running on Ubuntu 10.04 LTS. I am using nginx as the web server. The site has been running in a relatively stable configuration for three years, and handles about 4 million pageviews a month.  For the past 16 hours, I've been seeing what I believe is a "mild" DDoS attack. Outgoing traffic has multiplied by 5, and CPU usage has roughly tripled. I am seeing in my nginx logs a one or two IPs each second sending multiple requests simultaneously (1-10 each). These requests seem not to be going to my URL, but my IP address directly. Since I am somewhat comfortable with the nginx.conf, I set up a separate "default" server block there to catch this traffic and log it. I have it set to log that traffic and return error code 444 to it. I also set up limit_req_zone and limit_conn_zone for this traffic, though since these are different IPs sending requests, that has little impact. Here is the relevant section of nginx.conf:  limit_req_zone  $binary_remote_addr  zone=ddos:25m   rate=1r/m; limit_conn_zone $binary_remote_addr zone=blockedfuckers:20m;     server {     listen 80 default_server;     server_name _;     access_log /var/log/nginx/a2.log hackers;     limit_req zone=ddos nodelay;     limit_conn blockedfrakers 1;     return 444; }   This knocked CPU usage down by about 30%, but outgoing traffic is still high, and the CPU is still over double normal. For some reason, the log shows the requests being sent a 400 response, not the 444 I am trying to send. For example:  109.198.195.28 [12/Mar/2013:22:49:24 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: - 107.199.204.111 [12/Mar/2013:22:49:36 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: - 107.199.204.111 [12/Mar/2013:22:49:36 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: - 107.199.204.111 [12/Mar/2013:22:49:36 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: - 107.199.204.111 [12/Mar/2013:22:49:36 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: - 107.199.204.111 [12/Mar/2013:22:49:36 -0400], REQLENGTH: 0, STATUS: 400, HTTPHEADER: -   These look like "empty" requests to me, so I am trying to configure iptables to just drop those, but the few things I've tried haven't worked. Any ideas on how I can target & drop this traffic?


I know that determinant as a map from set $n×n$ matrices to $\Bbb{R}$ is an open map but I wonder whether it is closed map too?I don't know how to prove or disprove but intuitively it seems to me that it is not closed.Any help is appreciable Thanks.


different modes to typest systems of equations

Would it be bad style to use in displaymode an array with three colums that are right-center-left ("rcl") oriented instead of eqnarray, to  typeset systems of differential of equations ? The spacing between the columns then seems to look like and eqnarray - but the spaces between the rows are then less than in eqnarray and all the fractures are textsize, not normal size.  The reason have used this was because by using an array, I can reference the whole system with a single number, not just  lines at a time.  The reference number would thus be displayed on vertically in the middle and not near a specific line, like when using eqnarray. Is there a way to also reference a whole system when using  eqnarray ?


Wanna downvote an answer on a question that's deleted? Here's your chance!

This is probably still 10k only, but have at it.    I've never seen this before, and I'm pretty sure it's a bug, but that answer is on a deleted question, yet the answer displays like it isn't deleted and you can downvote it (yes, the downvotes remain after refresh).


Wake up the system without having to enter a user password on Kubuntu

I am running Kubuntu 20.04 and I don't want to have to use a user password. I am the only user. How can I avoid having to write my user password each time I wake my laptop from sleep? I tried many commands on sudo and it still doesn't work!!


Install Ubuntu/Win8.1 dual boot with UEFI and 4 primary partitions

I want to install Ubuntu in dual boot with windows 8.1 in my Acer V3-572G-75CA. The partition situation is the following:  A. 600MB: recover partition  B. 300MB: system EFI partition  C. 914GB: Windows 8.1 partition  D. 15.83GB: recover partition  Of course I have to disable UEFI boot for start the Ubuntu Live USB. But then? I can create an extended partition for / and /swap, but I need to free a primary partition, isn't it? Can I delete partition A and/or B?


What is the best charging strategy for a macbook?

I heard several strategy about macbook power supply connection:   keeping alway at least 50% of battery level let unplugged until reaching the 10% warning perform once a month a full discharge   What is the best strategy to keep the battery performant on the long run? I suppose it involve some physical battery notion but also how OSX handle the battery management at the software level.


How to see one line returned value in debug mode?

In debug mode, I can see what returned from method by moving mouse pointer to "name" variable;  public string GetUserName(int id) {     string name = UserService.GetUserName(id);     return name; }   But I don't want to create a variable to just to see what inside it...  So what is the proper way to debug one line returned method like;  public string GetUserName(int id) {     return UserService.GetUserName(id); }   *Notes    I don't want to use F11 to get inside of GetUserName method. I don't want to use immediate window.


crop marks not drawn on colored pages with geometry package

I have created a document where some pages have a background color. I would like the pages to have crop marks, using the "showcrop" option of the package geometry (I do not want to use the "crop" package, for some reasons). The following MWE shows that the crop marks are missing in the colored pages. \documentclass{book}  \usepackage{lipsum} \usepackage{xcolor}  \usepackage{geometry} \geometry{paper=a4paper, layoutwidth=170mm, layoutheight=240mm, layoutvoffset= 20mm, layouthoffset= 20mm, showcrop=true}  \begin{document}  \lipsum \newpage \pagecolor{yellow} \lipsum \newpage \nopagecolor \lipsum  \end{document}  Would anyone have any idea what is going on, and how to fix it ? PS : it is not the same question as  : I am not using the crop package !


Evaluate $6^{433} \pmod {21}$ and a proving question

Question 1: Denote $a \mod b$ as $a \% b$, where $a$ and $b$ are some integers  Evaluate 12^32475 % 21    The following is what I tried:    12^32475 % 21 = (12^3 % 21)^10825 % 21 = 6^10825 % 21 = ... = 6^433 % 21   But how to continue ?  Question 2:  I don't understand this: n-1= -1 mod n. Where is this from? And does this line become the next line?    Context: my class is discrete math for computer science. So far for related topics, it covers modular inverse, (extended) GCD algorithm, Fermat's Little Theorem and Chinese Remainder Theorem (CRT).


Was Phasma supposed to play a bigger part in The Force Awakens?

I've only seen The Force Awakens once, but I'm as far as I can remember, Phasma doesn't really do much, except:      get taken hostage that one time and disable the shields around the Starkiller after being asked twice   Was she originally supposed to play a bigger role?  I was really expecting to see much more of her, or at least see her in combat.


How to use Alt+Shift to switch keyboard layouts?

I recently upgraded to Ubuntu 13.10, with the new keyboard handling system. The little "switch keyboard" option does not let me set it to Alt+Shift. How can I get this keyboard binding, as I have absolutely no interest in using the Mac-esque Super+Space combo?


What is the question form of "used to do"?

What is the correct way to convert "used to do" into a question? Since I want to emphasize that the action is not on-going any more, so simple past tense is not a good idea here. Could I say "do xxx use to do" or "did xxx use to do"? Both sound weird to me.  If there is no way to do it. Do you suggest any other alternatives?


Command for forcing a pointer ungrab (captured mouse release)

Sometimes Firefox doesn't release the mouse after dragging, so I need to kill the application to force it to release its pointer grab.  Is there any command to force an application to ungrab the pointer without killing it?


Is this a proper use of "which" as a relative pronoun?

In a , I encountered a usage of "which" that I didn't know about before:     < > <= >= Boolean less, greater, less than or equal, and greater than or equal. Each operator produces 1 if the condition is true, 0 otherwise. These operators may be applied to strings as well as numeric operands, in which case string comparison is used.        I don't understand what kind of which this is. I don't think it is a pronoun as I used to know e.g. in This is the book which you loved to have.


Problem building SalesForce mobile app : Android

I created SalesForce Native/Hybrid app as in  link.  Everything is fine but when I try to run the app by importing it into eclipse, it keeps on popping main activity with following error in logcat.  03-10 06:52:48.681: I/ClientManager:getRestClient(877): No account of type com.salesforce.androisdk found 03-10 06:52:48.731: W/AccMgrCallback:run(877): android.accounts.AuthenticatorException: bind failure 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at android.accounts.AccountManager.convertErrorToException(AccountManager.java:1612) 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at android.accounts.AccountManager.access$400(AccountManager.java:140) 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1458) 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69) 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at android.os.Binder.execTransact(Binder.java:367) 03-10 06:52:48.731: W/AccMgrCallback:run(877):  at dalvik.system.NativeStart.run(Native Method)   Same thing has been asked  and  but I could not understand the solution properly.  Even though I tried the solution provided in 1 of the links, it was not helpful.  Sample applications provided in SalesForce SDK work properly, don't know what's wrong with created applications.  Anybody please help me to get out of this.  TIA.


Does moving out of multiple squares that a single opponent threatens provoke multiple attacks of opportunity?

In the  it casually mentions that:     moving out of multiple of a creature’s threatened squares in the same move action doesn’t provoke two attacks of opportunity.   However, when I checked the rest of the FAQ and the  I couldn't find anything that confirmed or denied this. Does moving out of multiple threatened squares in the same action provoke multiple attacks of opportunity?


$C^1[0,1]$ is not complete with respect to sup norm

I think the right sequence is $f_n(t)=|t-\frac{1}{2}|^{(n+1)/n}$ but I can't manage to prove it's Cauchy... (when I look at graph of $f_n$s it seems obvious, but I need it formal way.


Using the Rank-Nullity Theorem, find the dimension and a basis for the subspace W of  $Q_4[x]$ consisting of all the polynomials $\displaystyle a_0+a_1x+a_2x^2+a_3x^3+a_4x^4$ such that $\displaystyle a_1 + a_2 + a_3 + a_4 = 0$.  Need some direction on how to start this question. Have some idea if a matrix was used but not a polynomial


I want to reduce the thickness of a letter but don't know how. The dimensions of my letter are 7 cm x 7cm and the letter is roughly 5mm thick. I want to reduce the thickness to 4mm but I want the letter to keep the dimensions 7cm x 7cm Is it possible ?


Why does going through loop takes longer after 1 time?

I have a little program :  public class Main {   public static void main(String[] args) {     for(int p = 0;p<10;p++) {       long start  = System.currentTimeMillis();       int j = Integer.MAX_VALUE;       int d = 2;       int c = 0;       for(int i =Integer.MAX_VALUE; i>0;i--) {         if(i==Integer.MAX_VALUE)System.out.println(j);         c=j/d;       }       System.out.println(System.currentTimeMillis()-start);     }      } }   Here is the result I get:  $ java Main 2147483647 62              // Almost instantaneous 2147483647 1437            // Normal speed 2147483647 1455            // Same ...   I made sure it's not a simple bug by disabling JIT, and in that case all iterations are the same speed:  $ java -Djava.compiler=NONE Main 2147483647 26879 2147483647 26484   2 questions   Why does first itteration through external loop take so much less time then other 9 ?(every time i run this) How come, the fastest(slight difference, but still) division from those 3: c>>1, c/2, c/d is the last one ?


Solving PDE $xu_x+(x+t)u_t=1$ with $u(1,t)=t$

Solve $xu_x+(x+t)u_t=1$ such that $u(1,t)=t$. Is the solution defined everywhere?  I had known that this specific problem is related to a Heat Equation problem. I tried solving for its characteristic curves but I had difficulty solving for its parametrized initial condition. How am I gonna solve for its parametrized initial condition? I know that for an initial condition $u(x,0)$, $x(0,s)=s$ $y(0,s)=0$


How to add new method to Django class from other modules?

I have a Django model say:  class MyOperation(models.Model):     name = models.CharField(max_length=100)      def my_method(self):         pass   I want to be able to add, from a different Django app, a new method to this class.   I tried to do this from a different app module called custom.py:  from operations.models import MyOperation  def op_custom(test):     print "testing custom methods"  MyOperation.op_custom = op_custom   However this does not seems to work, in runtime the method does not exists.  Is this the way to modify the definition of a class from a different django application? Is there a better way to do it?  Thanks


Java - Printing random words from a text file

I'm new to Java and this is my first post.   I want to create a program that will print on screen a user-specified number of words that are randomly pulled from an external Notepad file containing several pages of text. Grammar doesn't matter, but every word should be equally likely to be chosen (a way to control word repetition would be nice too, but not essential).   Currently, I have Scanner prompting the user to enter a number, stored as variable "number" determining how many words to pull. The program should then read the text file (or load its contents into some kind of list or array?) and pick a random word of at least one character length. Repeat loop "number" times and display the entire resulting word string.  The parts I need help with are 1) telling the program to access the file; 2) making sure the words are picked randomly. How do I do that?   Many thanks for your attention!  /*  * Program description: Pulls a user-defined number of random words from an  * external text file and prints the resulting text string on screen.  * JDK version 1.7.0_60  */  import java.util.Scanner;   public class RandomTextGen {      public static void main(String[] args) {          Scanner keyboard = new Scanner (System.in);          System.out.print("Enter number of words to pull: ");         int number = keyboard.nextInt();           // Load text file          // Create loop to pull number of words in random order          System.out.println(""); //Output results       }  }


How to handle "I attack" during a peaceful narrative

Abdullah, Ben, and Caroline are talking to a Drow that they know may prove hostile.     Abdullah and Ben are fine with seeing how the conversation goes, but Caroline doesn't want to risk it.  As the conversation proceeds, she interrupts the Drow (being narrated by me, the DM) by saying "I attack with my crossbow."    Combat has clearly started, but how specifically?      I imagine since the Drow was looking right at Caroline when she pulled the crossbow, they are not Surprised.  Is this correct? How should initiative be handled?  Should they all roll and turn order be established that way, or should Caroline be assumed to be at the top of the order, and have Abdullah, Ben, and the Drow roll to determine the rest of the order?


If I cast  and I choose to sacrifice my , can I sacrifice Chromatic Star and get one mana and also draw two cards?


Proving an inequality involving the logarithm function: $\frac{1}{n+1} \leq \ln \left(1+\frac 1n\right) \leq \frac 1n$

The question is to prove the inequality $$\frac{1}{n+1} \leq \ln \left(1+\frac 1n\right) \leq \frac 1n\\\forall n \geq 1, n\in \mathbb N$$  I tried using Taylor expansion but couldn't figure out anything. Any ideas? Thanks.


I have difficulty interpreting some results. I am doing an hierarchical related regression with ecoreg. If I enter the code I receive output with odds ratios, confidence ratios and a 2x maximized log likelihood.   However, I do not fully understand how to interpret the 2x maximized log likelihood. As far as I know log likelihood is used as a convenient way of calculating a likelihood and it calculates the value of the parameters based on the outcomes. But I do not understand if a higher or lower value is better. I looked at several online sources e.g. , but I am still stuck.   Below the outcome I receive:  Call: eco(formula = cbind(y, N) ~ deprivation + meanIncome, binary = ~fracSmoke +      soclass, data = dfAggPlus, cross = cross)  Aggregate-level odds ratios:                     OR        l95        u95 (Intercept) 0.0510475 0.03837276 0.06790878 deprivation 0.9859936 0.88421991 1.09948134 meanIncome  1.0689951 0.95574925 1.19565924  Individual-level odds ratios:                 OR       l95      u95 fracSmoke 3.124053 2.0761956 4.700765 soclass   1.001050 0.9930815 1.009083  -2 x log-likelihood:  237.4882    So, how should I interpreted a value of 237.4882 compared to an outcome of 206 or 1083? Help is much appreciated!


Blender 2.71 Cycles render preview graphic purple (no missing textures)

Some weeks ago I downloaded Blender 2.71 (Win64) from the official website. The version I was using before was the 2.69, which didn´t give me any problem. But the newest version wont let me use the render preview in cycles, showing me a purple screen instead. Firstly I thought the problem was on the version, but today I installed the program in some friend´s computer and works fine.   I have windows 7 (the same OS as my friends), Acer Aspire, and just formatted it. The blender render lets me use the render view though and I can render images (both with f12 and on the render options) in cycles. I have tried both win32 and win 64, as well as the portable and the installable versions. Any ideas?   Thank you in advance.  Edit: The scene of the image is the default one, with only the cube, the camera and the point lamp on display. The sky has no texture, just the default solid grey. The problem is that the whole viewport turns purple, which could mean that it´s not a missing textures issue. I think that the problem might lay on the graphic drivers, but I don´t know what to do. I really hope the next blender version or ATI actualization may fix the problem.


Kullback-Leibler divergence with sample data likelihood

I'm trying to get my head around the KL divergence in the context of the sample likelihood under two competing hypotheses, one optimal $H_0$ and one suboptimal $H_1$. Roughly speaking, I want to see the "difference in information" when $H_1$ is used instead of the better suited $H_0$ to describe the data. I write the data likelihood for each datum as $p(X_i \mid H_0)$ and $p(X_i \mid H_1)$. I could write the observed KL divergence as $$ \sum_{i=1}^N p(X_i \mid H_0) \log \frac{p(X_i \mid H_0)}{p(X_i \mid H_1)} $$ However, both likelihoods over the sample data $X$ do not sum to one. Therefore, I'm not sure what the interpretation would be. I do consider the two situations (a) where I compare a good hypothesis $H_0$ to a number of suboptimal alternatives and (b) where I compare two independent pairs $(H_0, H_1)$ and $(H'_0, H'_1)$. All comparisons are done over the same sample data $X$.


In my example, do I use quotes around the terms I'm referring to?

In economics literature, the IV approach uses what is commonly referred to as the “first stage” and the “reduced form”.     Should I italicize them instead? I'm not sure what to use because I have not written many economics research papers.


I am trying to install the software-centre package on Terminal..  I have entered these commands:  sudo apt-get install software-center*  I get this:  The following package was automatically installed and is no longer required   thuderbird-global menu use 'apt-get autoremove' to remove them.   another  'software-center' has no installation candidate   any ideas?


What does the keyword 'this' means in TextView textView = new TextView(this);  Below is quote sniplet  public class DisplayMessageActivity extends ActionBarActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         //setContentView(R.layout.activity_display_message);         Intent intent = getIntent();         String message = intent.getStringExtra(MyActivity.EXTRA_MESSAGE);         TextView textView = new TextView(this);         textView.setTextSize(40);         textView.setText(message);         setContentView(textView);     }     ....   My guess is it initialize the object textView but with what?


python void loop() function like arduino

I'm new to python and I'm developing a raspberry pi program that will check a sever ever 2 min. i have the server check part working But, I'm not sure how to accomplish the repeat. For example in arduino there is void loop() function there I could wait to see if 2min have pass then call the sever check function without a problem. How would I accomplish this in python?


100k "thank yous" or 100k "thank you's"?

I wanted to thank people for their visits to a profile but Google wasn't quite sure either. Is there another way to express the same meaning?


Error after installing search service application

I got this this error after setting up Search Service Application with Powershell.     The search service is not able to connect to the machine that hosts the   administration component. Verify that the administration component      'a23fd668-f823- 4ab2-b0fc-b0baebfd4af2' in search application   'SharePoint_Search_Service' is in a good state and try again.   The Sharepoint Search Service was showing error when I visited   Central Administration->Application Management->Service Applications->     Manage Service Applications  Here is the powershell script used  $App1 = "APP-Server-01" $APP2 = "APP-Server-02" $SearchAppPoolName = "SharePoint_SearchApp" $SearchAppPoolAccountName = "EXSERV\Administrator" $SearchServiceName = "SharePoint_Search_Service" $SearchServiceProxyName = "SharePoint_Search_Proxy" $DatabaseName = "SharePoint_Search_AdminDB"   Create a Search Service Application Pool  $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account     $SearchAppPoolAccountName -Verbose   Start Search Service Instance on all Application Servers  Start-SPEnterpriseSearchServiceInstance $App1 -ErrorAction SilentlyContinue Start-SPEnterpriseSearchServiceInstance $App2 -ErrorAction SilentlyContinue Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App1 -ErrorAction         SilentlyContinue Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App2 -ErrorAction        SilentlyContinue   Create Search Service Application  $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name        $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseName $DatabaseName   Create Search Service Proxy  New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name       $SearchServiceProxyName -SearchApplication $ServiceApplication


Find the value of $\sum_0^n \binom{n}{k} (-1)^k \frac{1}{k+1}$.  Writing out several terms, I think the answer is $1/(n+1)$, but I'm struggling to prove this. I would greatly appreciate it if someone could show how to prove this.


How to shift graphics/adjust placement of figure with \includegraphics

I composed a diagram that takes up the entire sheet of paper in landscape mode, called diagram.tex (compiled it to generate pdf). I'm trying to include that into an article, but only half of it is showing; the bottom half is cut off by the right end of the paper.  I was able to get it in the proper orientation by using  \includegraphics[angle=90]{diagram.pdf}  But because the bottom half of it is cut off, I need some sort of option where I can do something like this:  \includegraphics[angle=90, shift left = 5cm]{diagram.pdf}  to pull the rest of the image left (or up, depending on how you're looking at it).     So how can I move the figure around?   I'm not sure if this is relevant, but I'm using the following documentclass and packages in my paper:  \documentclass[11pt,a4paper,twoside]{article} \usepackage{tikz, graphicx}     Edit:  This is not an issue with pushing it past the margins. Half of the picture is not on the paper (sort of like if you stuck half of your left hand behind the left side of your monitor). I need to pull the paper left (just like you would shift your hand left to see it).


Converting points to raster and back again in QGIS?

To convert raster grids to vector points In QGIS there we have different possibilities (grass tool "to.vect"; saga tools "grid values to points").   My problem is a little bit complicated. In the beginning I have a point layer. For further data processing I need to convert the vector points to a raster file (every point is a raster now). In the end I want to convert this raster (raster points) backwards to a point layer for the kriging tool.   The grass tool (to.vect) is very slow and the saga tools (grid values to points) gives me more than just the points I need to have (I get a very high density point shape). Is there another solution just to convert the few rasters into a point layer?


Auto-trigger captive portal agreement page display

I have a WiFi hotspot setup using Hostapd and Dnsmasq. Everything works great, but I'm trying to trigger the sort of Terms and Conditions page you might see at a hotel or coffee shop after you connect to their captive portal. Most modern devices will automatically bring up this Terms and Conditions page immediately after connecting to one of these captive portal networks, which is what I'd like to happen after connecting to my hotspot.  As I understand it this is usually detected by the device by checking to see if a specific website returns a predictable response. For instance Google seems to test a connection to http://clients1.google.com and if it gets any response other than "generate204" it should trigger the captive portal agreement page. I've found two ways to redirect all traffic (and presumably these specific domains) to a web server running on my device...  One by adding the following line to /etc/dnsmasq.conf:  address=/#/10.0.0.1   and the other by using iptables. This triggers from a script on boot:  iptables -t nat -A PREROUTING -d 0/0 -p tcp --dport 80 -j DNAT --to-destination 10.0.0.1   Both succeed in redirecting all traffic to 10.0.0.1 (which is the correct address for the local web server) when manually entering a url into the browser, but the page doesn't open automatically upon connecting to the access point.  I've also tried manually adding entries for specific google URL's like:  address=/clients1.google.com/10.0.0.1   into the /etc/dnsmasq.conf with no luck. I've run out of ideas, any suggestions.


a confusion about answer "yes" and "no" to some complicated question

I got confused about the usage of "yes" and "no".  I knew in English,"yes" or "no" should response to the meaning of sentence.   take a example. assuming a stuff is available.       is it available? -yes.      isn't it available? -yes.   but I not sure to  say "yes" or "no" when someone ask a complicated question with double-negatives.       is it unavailable?       isn't it unavailable?


Add a 'creation date' value when a new line is edited

I have a Google Spreadsheets that is used by different people to add tasks for my team. Here's . People can add tasks to column B and I will assign them to the right people in the team, filling in the other columns. The first field I'm capturing is the date that a new task is logged. I'd like to automate this so that when people add a new task starting in column B, column A gets updated with the date that the new line is created.   I've found scripts that will update the timestamp in column A based on changed in column B, but I only want to log the creation date. In other words, when there is already an entry in column B and it gets updated, the date in column A should not change. Only when column B changes from an empty cell to a new value should column A on that row be updated with the date.  In the above example, if I change the task on line 2, the date in column A should not change. If I add a new task in cell B3, it should add the current date in cell A3.


A vector field orthogonal to it's curl at every point

Is there a nice geometric interpretation of what a vector field $V$ in $\mathbf{R}^3$, that satisfies $\epsilon_{ijk} V_i \partial_j V_k=0$ is? I.e. if I know a vector field at every point in some region in $\mathbf{R}^3$ is orthogonal to it's curl, can I say anything nice about it geometrically? I know this is somewhat of a vague question, but I can't make it any more concrete at the moment.  Context: This is a necessary and sufficient condition that the velocity vector field of a steady flow in fluid dynamics has to satisfy, in order for Bernoulli's theorem to apply not only on a streamline, but across the streamlines. In textbooks it is usually not treated however, as they usually just state that if the curl is zero, the theorem applies.


Phone companies in Instabul for Travelers

Hi there I will be traveling to Istanbul, Turkey and wanted to know:  what is the best mobile carrier service provider for travelers, when it comes to internet data What is the wifi availability in Istanbul where to get this "sim" card or plan? (At the airport? at the city center? at the bus stops?)  Thank you in advance!


Countable union of disjoint finite sets is countable

This statement seems probably true, and for particular examples (e.g. 'all strings of length N in a given alphabet', union over all N) it holds, but I can't find any proof that doesn't rely on the axiom of countable choice, which seems like overkill. Is there a simpler proof?


If I uninstall a steam game (Payday 2), will I keep my progress?

I want to download GTA V, but I don't have enough disk space and the only game I have left to uninstall is Payday 2.  However, I have been playing it frequently, even going on 17 hour marathons to 100%  it, and thus, I am reluctant to uninstall it from my system in case I need to redo everything.  I know the DLCs stay, but I'm talking about the vanilla stuff (Masks, guns, cash, levels, infamy, etcetera).


How to fade two images together in Sketch

Is it possible in Sketch3 to do a mask w/ a gradient to make these two images seemless? Basically this technique (for photoshop)   ...how do I do this in Sketch 3?


My problem is about AND-gate when its inputs are open. I want to know: What is the output when inputs are open? The output is Z (open) or 0?   What is your idea about this AND-gate transistor structure?     ()  My answer to the above structure is that the output is 0 when the two inputs are open, or at least one of them is 0.


I am trying to design a comparator using a 741 IC, with a single supply of 12V. I have set the reference to 2V and I require the output to toggle between 12V to 0V. but the problem I am facing is the output is only going to 11V max and min of 2V. What is the reason behind the output saturation?


In part of a city, I am trying to count rooftops on a basemap/Google satellite in QGIS and create several polygons around x number of rooftops in the area. One similar question like mine was previously asked, but the response was only explained how to do it in Arcmap, not QGIS.   Is there anyway to do it in QGIS?


Interpretation of biplots in principal components analysis

I came across this nice tutorial:  on how to do PCA in R language. I don't understand the interpretation of Figure 13.3:    So I am plotting first eigenvector vs the second eigenvector. What does that mean? Suppose eigenvalue corresponding to first eigenvector explains 60% of variation in data set and second eigenvalue-eigenvector explain 20% of variation. What does it mean to plot these against each other?


Old version (macOS Sierra) for Pages, Keynote and Numbers, iWork

I uninstalled my iWork tools - Keynote, Numbers and Pages - from my MacBook Air.      Unfortunately, I don't want to upgrade my MBA to Mojave/Catalina in order to install.  I looking for the working iWork version for 10.12 Sierra.  Is there some repository for old versions of iWork?


I have been given an XSD file and I am supposed to generate an XML and use it.... It may or may not be proprietary - so I have no idea if I can post the xsd file here. I was looking for a site that lets me convert a file from XSD. I tried using  Microsoft Excel Open Office Altova.  No luck with any of them Can someone guide me how I can do it?


how to solve compiler or linker error with gcc

I'm currently studying C++ with  And I'm currently solving a problem that asks me to write a program that computes and outputs the greatest common divisor of a given two positive integers. My solution is as follows #include <iostream>   int gcd(int a, int b) {        if (a%b == 0) {                return(b);        }else {                return(gcd(b,a%b));        }           }   int main() {         int i, j;         std::cin >> i >> j;         std::cout << "gcd is:" << gcd(i, j) << std::endl;                                                                                }  Then i compiled with gcc -Wall -o ans gcd.cpp But error is as follows /bin/ld: /tmp/ccyMqcAD.o: warning: relocation against `_ZSt4cout' in read-only section `.text' /bin/ld: /tmp/ccyMqcAD.o: in function `main': no2.cpp:(.text+0x58): undefined reference to `std::cin' /bin/ld: no2.cpp:(.text+0x5d): undefined reference to `std::istream::operator>>(int&)' /bin/ld: no2.cpp:(.text+0x6f): undefined reference to `std::istream::operator>>(int&)' /bin/ld: no2.cpp:(.text+0x7d): undefined reference to `std::cout' /bin/ld: no2.cpp:(.text+0x82): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /bin/ld: no2.cpp:(.text+0x9e): undefined reference to `std::ostream::operator<<(int)' /bin/ld: no2.cpp:(.text+0xa8): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)' /bin/ld: no2.cpp:(.text+0xb3): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))' /bin/ld: /tmp/ccyMqcAD.o: in function `__static_initialization_and_destruction_0(int, int)': no2.cpp:(.text+0xfb): undefined reference to `std::ios_base::Init::Init()' /bin/ld: no2.cpp:(.text+0x110): undefined reference to `std::ios_base::Init::~Init()' /bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status  How do I get it to compile correctly? I don't know if it's bad writing in c++ or a problem with the compiler.


Why does my Minecraft world keep freezing

My wife and I are playing Minecraft on the the Xbox 360, and it will randomly freeze. We have called Microsoft twice, and both times they have said that it "must be over heating." We know that this isn't the case because it doesn't happen on Mass Effect or on Final Fantasy, and it will happen when the world loads. Are there any patches or updates that will help with this?  Note: it is the Xbox 360 disk.


If $\gcd (a,b) = 1$, what can be said about $\gcd (a+b,a-b)$?

Suppose $a, b \in \mathbb{Z}$, $a > b$, and $\gcd (a,b) = 1$.  What can be said about $\gcd (a+b,a-b)$?  Is it true in general that $\gcd (a+b,a-b) \leq 2$?


When should we use "can", "could", "will", "would"?

Most people say I wish I could, I wish you would.    Can we use I wish I can, I wish you will?    I'd like to know what the main differences between the usage of can/will and could/would are when wishing.  Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will?  Or is it something else entirely?


if ${m/n}$ is an approximation to $\sqrt{2}$, prove $m/2n+n/m$ is always a better approximation.

I noticed $(m/2n+n/m)^2 -2$ = $(m/2n-n/m)^2$.  So I set  $(m/n)^2 - 2 = d$   and substituted value for n in the above equation but can't show that resulting equation is less than d.


Need advice on flavoring/sweetening my homebrew cider

I've just finished my primary fermentation and have produced a cider that is coming in at 5.2%. I am about to bottle my cider and add some priming sugar to give it a bit of a fizz. I would like to try and flavor some of the ciders with a fruit coulis. am I correct in thinking that the natural sugar in the fruit should give the cider a natural fizz and I don't need to add any sugar? Also, I am a fan of a sweeter cider, I have been advise not to add more than a teaspoon of priming sugar, and to use a sugar substitute at the same stage if i wish to sweeten it. I have purchased Xylitol, I plan on trying a few combinations with the priming sugar/Xylitol & no additive fruit coulis. Does this all sound like it makes sense or am I just going to ruin my cider.


I'm used to writing classes like this:  public class foo {   private string mBar = "bar";   public string Bar {     get { return mBar; }     set { mBar = value; }   }   //... other methods, no constructor ... }   Converting Bar to an auto-property seems convenient and concise, but how can I retain the initialization without adding a constructor and putting the initialization in there?  public class foo2theRevengeOfFoo {   //private string mBar = "bar";   public string Bar { get; set; }   //... other methods, no constructor ...   //behavior has changed. }   You could see that adding a constructor isn't inline with the effort savings I'm supposed to be getting from auto-properties.  Something like this would make more sense to me:  public string Bar { get; set; } = "bar";


Why do photons have zero chemical potential and what is its the physical significance?  From what I know the chemical potential could be interpreted as the energy per unit particle that is put into a (thermodynamic) system... but surely photons also carry energy?


Number of publications needed to get into a computer science PhD program?

I've looked at the resumes of the type of candidates that get into computer science PhD programs at the top few universities (e.g. Stanford, MIT etc.) and a lot of them seem to have multiple publications (2-4) done during their undergraduate years. Is this representative of the entire pool? Or is this just a self-selected group that puts their resumes online.  I currently have one first-author workshop paper (5 pages), and I wonder how this might affect my chances at entry into these top universities.


Put good GRE scores on resume submitted with grad app?

If you have good GRE scores, is it a good idea to put them on the resume that you submit with your grad school application?


Do we have to write script tag in the end/head

Why is this code not working? Is there any rule to put a script tag at the end of the body (when I put the script tag at the end of the body, the code works).   I tried putting the script tag in the head, still not working. Shouldn't the script tag work anywhere inside the body?


Books suggestions on the fundamental of geometry

I want to self-study geometry for interest. What I want to study is closed to the fundamental appeal, not problem-solving, not differential geometry. But I found that there were many of books on geometry. And it is difficult for a beginner like me to figure out which books are the ones I need.  I want to learn the axiomatic/synthetic, ancient/modern  fundamentals of geometry, such like what is "point", "segment", "directed segment", "Euclidean vector", "plane", "congruence", "affine space", etc; and what is the modern way of defining and treating these concepts? If there's a book compare those difference is also what I want. I guess this kind of books should be of graduate level right? I've studied analysis and linear algebra, so a book uses plenty of terminology of these subject is OK for me!


What does "followed to the T" actually mean?

I came across this sentence from Amish's Secret of the Nagas book.  It would certainly have worked if Bhagirath's orders had been followed to the T.


Particle with non zero acceleration with zero velocity at that instant - example

Is it even possible for a particle to have those properties?


How do I map numbers, linearly, between a and b to go between c and d.  That is, I want numbers between 2 and 6 to map to numbers between 10 and 20... but I need the generalized case.  My brain is fried.


Does anyone know how to convert this line from C++ to C programming language? I could convert almost everything, I just need some help where it is marked as "HELP".   string original = "blablabla";  string encrypted = "";  string unencrypt = "";  char key = 'x';   for (int temp = 0; temp < original.size(); temp++){   HELP-> encrypted += original[temp] ^ (int(key) + temp) % 255; <-HELP  }   Thanks in advaced!


statistical proof chi squared distribution

Lecture book just stated that:  $(n-1)^2/\sigma^2$ is a chi squared distribution with $(n-1)$ degrees of freedom where $n$ sample size, $S^2$ sample variance and $\sigma$ population standard deviation,but how do I prove such thing. Thanks, any tips hints would do.


Let $(X, \|\cdot\|)$ be a normed space, and $\|\cdot\|_M : X \times \mathbb{R} \to \mathbb{R}^+: (x,y) \mapsto \max(\|x\|,|y|)$.      Proof that $ f: X \times \mathbb{R} \to X: (x,\lambda) \mapsto \lambda x$ is continuous by using the $\epsilon$ - $\delta$ defintion of continuity.   This is what I've got so far:  Take $(a,b) \in X \times \mathbb{R}$, $\forall \epsilon >0$, $\exists \delta >0$, $\forall (x,y) \in X \times \mathbb{R}$:  $\|(x,y)-(a,b)\|_M=||(x-a,y-b)\|_M=\max(\|x-a\|,|y-b|)<\delta$   $\|f(x,y)-f(a,b)\|=\|yx-ab\|=\|y(x-a)+a(y-b)\| \le |y|\|x-a\| + \|a\||y-b|$  I don't know what to do now, because I don't have any information about $|y|$ and $\|a\|$...


I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10.  How can I measure the draw time of a particular layer (or the complete drawing process if that is the only option) in ArcMap? What are the interfaces, objects and events involved? Is the  class in .NET suitable for accurately measuring this type of operation?  Has anyone already created an ArcMap add-in or extension for this purpose?


I would like to instal latex on my android system(tablet)  Could you please show me  the link of free download   I search ffor those of minimum size


Can't run Python script from anywhere, even after PATH variable was edited?

I was trying to set up my Mac to run custom Python scripts from anywhere without having to type python [script.py] or the explicit file path.   The script is called "testscript". I put the script in my own bin directory (separate from /usr/local/bin), called /User/Patrick/bin, and added it to my path so when I type echo $PATH it comes up correctly like so:   /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/User/patrick/bin:/usr/local/go/bin`.    I already added the line #!/usr/bin/env python to the top of the file, I already did chmod 700 testscript, but I still can't call testscript from anywhere. Have things changed since OSX Yosemite?


I observed in case of Mi phones like Redmi Note 4 & Mi Max2.  We’re not able to disable Google Apps like Chrome, Play Music, Play Movies & TV, etc.  Please let me know, how to disable Google apps?


How find this sum $\sum\limits_{n=0}^{\infty}\frac{1}{(3n+1)(3n+2)(3n+3)}$

Find this sum     $$I=\sum_{n=0}^{\infty}\dfrac{1}{(3n+1)(3n+2)(3n+3)}$$   My try: let     $$f(x)=\sum_{n=0}^{\infty}\dfrac{x^{3n+3}}{(3n+1)(3n+2)(3n+3)},|x|\le 1$$   then we have $$f^{(3)}(x)=\sum_{n=0}^{\infty}x^{3n}=\dfrac{1}{1-x^3}$$ then we find the $f(x)$,Following is very ugly(can you someone can post your follow solution,) have other simple methods? Thank you very much.


Book about aliens bringing humans into a war against a hostile alien species and where humans were the toughest

I'm trying to find a book I read ages ago; it was a space opera style sci-fi story about aliens contacting humans and then bringing them into a war against a hostile alien species. In this story however, humans were tougher than just about every alien species and crucially they had innate mental resistance to the hostile alien species mind control.  It's been a long while since I read it but; In the story the humans are considered special because Earth has a moon which means the humans are more powerful due to (effect I forget) at the very end of the battles (it may be a series, it's been easily 10 years or more since I read it) the hostile aliens surrender to the allied forces (including the humans) which throws everything up into the air. At that point the human sides start slowly breaking out into war against themselves on the other planets they've been allowed to settle on. Also part way in the stories (I think it was a series?) the hostile aliens have created a camp on a planet they control where humans are raised thinking they are actually aliens, not humans, in an effort to understand and control humans.


I want to draw in a cartesian plan using pgfplots an arrow and corresponding perpendicular directed lines.   I've tried the following code:  \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots}  \begin{document} \begin{tikzpicture}   \begin{axis}   [       axis x line  = bottom,       axis y line  = left,       width        = .63\textwidth,       height       = .63\textwidth,       ymax         = 10,       ymin         = 0,       xmax         = 10,       xmin         = 0,     ]     \node (source)      at (axis cs:0,0){};     \node (destination) at (axis cs:6,5){};     \node (y0)          at (axis cs:0,5){};     \node (x0)          at (axis cs:6,0){};      \draw[dashed] (y0)--(destination);     \draw[dashed] (x0)--(destination);     \draw[->]     (source)--(destination);   \end{axis} \end{tikzpicture} \end{document}   But result is not good, because lines and arrow head does not stay on the same position:    How can I draw the arrow and directed lines correctly?


How to select html nodes by ID with jquery when the id contains a dot?

If my html looked like this:  <td class="controlCell">     <input class="inputText" id="SearchBag.CompanyName" name="SearchBag.CompanyName" type="text" value="" /> </td>   How could I select #SearchBag.CompanyName with JQuery? I can't get it to work and I fear it's the dot that's breaking it all. The annoying thing is that renaming all my id's would be a lot of work, not to mention the loss in readability.  Note: Please let's not start talking about how tables are not made for lay-outing. I'm very aware of the  and try hard to use it as much as possible.


Mysterious extra 100GB of hard drive space taken up

I have a 250GB SSD hard drive on my Mac. Last time I checked the remaining space was about a week ago when I removed Bootcamp and free'd up an extra 50GB of space. This left me with around 150GB space remaining. I've just checked today and only have 60GB free! I've also instealled 'Clean my Mac' and checked for junk files, but it only found 9GB worth. The only real folders I can think of that take up room are my Dropbox folder (which contains all of my files, at least all those that I'm aware of) and my Applications folder. Both of those folders combined only take up 50GB amount of space according to Finder. I read that the 'Library/Caches' folder can take up a lot of space there, but only found 10GB (possibly what was found my CleanMyMac) I've also emptied my trash. Also I read on another forum about running the following command in Terminal: ~ % sudo rm -r /System/Library/Caches  But I just get the following error:  rm: /System/Library/Caches: Read-only file system  I can't even think of where else to look for what could be taking up all this room?


GA Z170-HD3P-mobo Intel 6500 3.2 - CPU NVIDIA Gtx 770 - GPU 250GB SATA - hard drive 750W - PSU some fans OS Ubuntu 16.04 LTS    Although I've read that all the hardware is compatible, Ubuntu is not recognizing the GPU and when I go to the NVIDIA GEFORCE website for the most recent driver for this card and run the file it tells me that there was an error in the Text to run the file.   After attempting to install through ppa, i see a list of drivers in the "Software and Updates" to choose from. all binary drivers, however after selecting one and trying to apply the changes, when done the changes are not made and it is still stuck "using X.Org X server-Nouveau display driver from xserver-xorg-video-nouveau(open source)"   may i ask for some assistance on what i should do next?


Find the expansion for $\det(I+\epsilon A)$ where $\epsilon$ is small without using eigenvalue.

I'm taking a linear algebra course and the professor included the problem that prove $$ \rm{det}(I+\epsilon A) = 1 + \epsilon\,\rm{tr}\,A + o(\epsilon) $$ Since the professor hasn't covered the concept of eigenvalue, we are not recommended to mention eigenvalue in the solution. How to prove the equation by only using Laplace theorem?


I brewed my first all grain batch this past weekend and everything went pretty smooth except my OG was 1.050 instead of the 1.056 I was expecting.  Would this be a sparging issue? I had calculated a 75% efficiency. I did fly sparging with a home made sparge arm that worked pretty well. I had to adjust the flow a couple times to maintain a flow that ended in 45 minutes with close to 7 gallons collected for a 5 gallon batch.  I boiled off between 1.25 and 1.5 gallons of wort.  If this isn't a sparge efficiency issue what else could it be?


Story on quantum indeterminacy: protagonist has to “quantum select” a portable computer’s state

Story: protagonist receives a device, which looks like a portable computer, and has to use his “quantum reality version selection” abilities to pick the one reality’s version where the computer has finished calculations.   After that is done, it is revealed that the object of calculations was some bio/nano-technological weapon that is released to the world shortly after, but is stopped without any harmful consequences.  2000–2008, full-length color movie, happy end included.


After upgrading to Ubuntu 20.04 and changing my desktop to Unity on my laptop, the machine's desktop does not show any files or folders, nor does it respond to any attempt to place a file on it or to a right-click. The desktop is fine if I log in to the gnome option. The settings on the gnome extensions app are correct but obviously do not carry over to the Unity desktop environment. The extensions app is also not available in Unity. I have an identical installation on my desktop computer and there everything was fine until a moment ago when I discovered the same problem here. Display manager is lightdm. I have also tried Nemo file manager, same result. Then I edited the Nautilus .config file thus: . Still no luck. Any suggestions will be appreciated.


java.lang.NullPointerException? When assigning get method to an arraylist

Hi im trying to display customer orders that are added to a 'table' class from another class  public class PaymentScreenController {       public ArrayList<Customer> allcustomers; // Defining allcustomers Arraylist         public Table tbl; // Creating instance of Table class       @FXML     public void initialize() {          allcustomers = tbl.getCustomers(); // Error seems to come from here when i assign allcustomers to the getcustomers method of table         System.out.println(tbl.getCustomers());          System.out.println("test");         for (Customer customer : allcustomers) {              System.out.println(customer.getCustomerorder());         }       } }   any help would be appreciated thanks  ** More code*  public void submitorder(ActionEvent actionEvent) throws IOException {         //create a new UNIQUE customer to store that customers menu items         Customer cust = new Customer();         //add items to customer         cust.getCustomerorder().addAll(order);         // Adds the customer order to the table class         tbl.getCustomers().add(cust);         System.out.println(tbl.getCustomers());         //clear menu choices screen         lvOrder.getItems().clear();          // Once added the desired number of customers move to next screen         //extra customer was being added as a customer was put into the ArrayLust after the check happened.         if (tbl.getCustomers().size() == noOfDiners) {             Window mainWindow = btnSubmitOrder.getScene().getWindow();             Parent newRoot = FXMLLoader.load(getClass().getResource("payment_screen.fxml"));             mainWindow.getScene().setRoot(newRoot);         }      }   So the customer adds stuff to their order, and then the customer is added to the table class


I'm trying to split a url into parts so that I can work with these separately.   For e.g. the url:  'https://api.somedomain.co.uk/api/addresses?postcode=XXSDF&houseNo=34'  How can I split this into: 1) the source/origin (i.e. protocol + subdomain + domain) 2) path '/api/addresses' 3) Query:  '?postcode=XXSDF&houseNo=34'


Why minus operator on uint64_t gives me wrong results?

in my super advanced code below I try subtract next values from a big num. I can't understand why this gives me wrong results. I am using cygwin gcc. $ gcc --version gives me gcc (GCC) 6.4.0     uint64_t val = 0xFFFFFFFFFFFFFFFFULL; // 0xFF FF FF FF FF FF FF FF ULL = 8 bytes     printf("[ 0]  %ju\n",  val);     printf("[ 1]  %ju\n",  val -= 1e19);     printf("[ 2]  %ju\n",  val -= 8e18);     printf("[ 3]  %ju\n",  val -= 4e17);     printf("[ 4]  %ju\n",  val -= 4e16);     printf("[ 5]  %ju\n",  val -= 6e15);     printf("[ 6]  %ju\n",  val -= 7e14);  gcc -Wall main.c -o main.exe && ./main.exe gives me results as below: [ 0]  18446744073709551615 [ 1]  8446744073709551616 <- here and below should be 5 [ 2]  446744073709551616 [ 3]  46744073709551616 [ 4]  6744073709551616 [ 5]  744073709551616 [ 6]  44073709551616  Did you notice last digit? Similar things happened for other numbers, but I don't know the reason...


Why does the cycle of Link and Gannondorf keep repeating itself?

In my last  it was mentioned that it is the same Gannondorf returning, and a different hero of ages is chosen.  Why does this 'triforce' cycle keep repeating itself? Is there an in-universe explanation?


I have a population of phone calls - 200,000.  There are different reasons for each call, but lets assume the number of reasons is known. i.e. 7 different call reasons: 1) Check on order 2) Cancel order 3) Billing information 4) Account information etc...  My question is, I want to get a statistically significant sample size so the number of calls I listen to in my sample are representative of the distribution of the reasons in the overall population of 200,000 calls.  What should the sample size be? Which methods to use to calculate the sample size?


Reverse proxy FTP traffic to Docker containers based on hostaname?

Is there any way to reverse proxy FTP (or SFTP) connections as you can do with HTTP traffic? I already have working setup fot HTTP connections with  and I was wondering if I can route the FTP connections in similar way:  User connects ftp.domain1.com --> FTP proxy --> container1 (with -e HOST=ftp.domain1.com) User connects ftp.domain2.com --> FTP proxy --> container2 (with -e HOST=ftp.domain2.com)   And both of the containers are running in the same machine and have the same IP address.


Does the remove --purge command completely removes the installed package?

If I use the remove --purge command does that completely erase the package and the configuration files from my system?


Windows 10 April 2018 Update added an extra Language and I cannot remove it

I have just updated to Windows 10 April 2018 Update (1803 / 17134.1)  I had my laptop configured completely as UK with only a UK keyboard layout  Since the update, a US keyboard has been added so I now see the switch icon in my task bar    It appears that all the keyboard language settings are now migrated to the new Settings app and no longer in the old Control Panel    However, as can be seen from the screenshot above, the Remove button under the newly added US layout is greyed out (as is the UK one)  How can I remove the US layout?  UPDATE 1: I just updated my desktop and it hasn't added a US keyboard!  UPDATE 2: I added a third language (French) and was able to remove it, the button was enabled. The US remove button remained disabled both after adding French and after removing it.  UPDATE 3: I added another English language (Australian) and this cannot be removed! Button is disabled  UPDATE 4: I followed this  except I removed the values from the keys for all users and also the values under the Substitutions key. The task bar switch icon is gone but I still have all 3 languages in Settings still


What features did the Community Team discuss, have implemented, or have denied last month?

This process is deprecated/on indefinite hold. See  post for updates from the DAG team, and  for more context on the changes in the process.  On a weekly basis,  vets a handful of feature requests to be sent over to the engineering team and estimated, scheduled into next month's plan, and built (or sometimes rejected for technical reasons). We try to select things that we think can make the most people happy, and can also be done in about one to three days by a developer. Or, in other words, something relatively self-contained that doesn't require an elaborate spec, a lot of discovery by/with many other teams, and doesn't really alter the product itself in major ways. We usually send over around 10 of these a month. Some of these are grabbed from the various Metas across the network, some are written by the Community Team themselves. Some have a lot of visibility in all sites of the network, some are only minor tweaks to background stuff, some are improvements to moderator tools, and some are improvements to the tools the Community Team themselves use. The team keeps track of these in a Trello board that looks like this:  We'll start posting monthly updates on what features from that board were built, rejected, or punted, as answers to this question (one answer per year), with the objective of giving you some insight into our process.


Are there any half-blood or muggle-born squibs?

I remember other situations, like regular squibs and regular half-bloods, but I don't remember any mention of a half-blood squib or if it was even possible. I assume a muggle-born squib is impossible, but I just want confirmation.  Other questions do not discuss whether or not a squib can be born to one or no inherently-magical parents.


sudo apt update get a warning issue with PPA Skype

I get a warning when I execute the next command sudo apt update W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.skype.com/deb stable InRelease: The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <se-um@microsoft.com> W: Failed to fetch https://repo.skype.com/deb/dists/stable/InRelease  The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository <se-um@microsoft.com> W: Some index files failed to download. They have been ignored, or old ones used instead.  How I can avoid this warning message?


What happened to "oldest first" when viewing answers to questions?

Just like I miss the Stack Overflow "show me all of the most recently changed questions" homepage, my "oldest first" sort order for answers also went away recently (and not just on Stack Overflow, but all Stack Exchanges).  Why are such useful things just going away? Sure, they might not be optimal (and the currently decided optimal view should be the default for non-logged in users and new accounts), but it's getting old having my preferences being yanked away suddenly and then having to get used to something new.


I put a rkhunter script in daily.cron  on Apache Centos 7.  When I manually run the script, it works fine. but leaving it in daily.cron it fails to run.  I get this email every day instead.  /etc/cron.daily/rkhunter:  /etc/cron.daily/rkhunter: line 3: rkhunter: command not found   if you look in cron.daily you see a rkhunter script.  inside that script this is the contents.  #!/bin/sh  OUTPUT=`rkhunter --update --cronjob --report-warnings-only --nocolors --skip-keypress`  if [ "$OUTPUT" != "" ]  then echo $OUTPUT | mail -s "[rkhunter] Warnings found for $(hostname)" email@example.com fi   if i manually run   sh rkhunter    from that directory it works. I tried to have a file extension on it rkhunter.sh but it was the same result so with or without the .sh extension i am not sure it makes a difference.  How can I get this script to run daily and not fail with command not found.


Why won't the textures render even though they seem appear to be in the texture panel correctly?

Okay I am very new at this. I am trying to export some 3D models from a game, and when I load the model (the model and textures are in the same folder) the textures automatically load. In texture mode they show up properly, but when I use "Render Image" it is just a square blob and when the "OpenGL Image Render" is used it is just a white colored version of the model.  I am not sure if there is any other details that might be needed, since I am very new at this. I am not sure if there is any specific images or anything that might be wanted. Any help that can be provided is appreciated.  Update: Here is a link to the file:   Also it seems that materials were automatically created when the file was imported. I did add some lamps, but the textures still didn't rendered.  Update again: I have changed the link and I think I did it right to pack the other files in the blend.  Update again: Here is a new blend file with the model extracted again.


algorithm, algorithmic split code into parts with [H] remove line when no caption is set

I'm using algorithm and algpseudocode and want to split up the algorithm. Therefore I want the code parts to be at the position I'm explaining them, so I use the floating [H]. But the code starts with two lines when no caption is set (between The calculation is done by and a+b\cdot c) and I want to omit the first horizontal line there. A minimal working example is:  \documentclass[a4paper]{scrartcl} \usepackage{ngerman} \usepackage{algorithm} \usepackage{algpseudocode} \setlength\parindent{0pt}  \begin{document}   Used input is   \begin{algorithm}[H]     \caption{My Sum}     \begin{algorithmic}[1]       \Require $a,b,c$     \end{algorithmic}   \end{algorithm}    The calculation is done by   \begin{algorithm}[H]     \begin{algorithmic}[1]       \State $a+b\cdot c$     \end{algorithmic}   \end{algorithm} \end{document}   results in:


What are these spots that appear after using subsurf modifier?

I added a Subdivision Surface modifier, Creased some edges to 1.00 and some white spots appeared. I've never seen that before. Is something wrong with the UV shading?


Performance issue of ways of calling JavaScript functions

Is there a difference in terms of performance between:  Example 1:  function abc(x,y){   return x + y; }  abc();   Example 2:  abc();  function abc(x,y){   return x + y; }   Example 3:  var abc = function(x,y){   return x + y; }  abc();   Which is better and what are the pros and cons of each?


Window Buttons and Shadows Broken After Resuming from Suspend

Whenever I suspend my laptop, than resume, Ubuntu gets broken graphics. It looks like this:  Fullscreen windows look fine, but all the non-fullscreen windows have broken shadows and navigation buttons. GPU: NVIDIA GeForce GTX960M (with 375.39 propiretary driver)


No Java virtual machine was found when trying to run Eclipse installer

Trying to install Eclipse on fresh Ubuntu. Got error:    If I type java command I have output:    Can I install default OpenJDK or should I go to Oracle site and download Java there? Why I can't use OpenJDK?


The probability of at least once having gotten 6 heads in a row by tossing a fair coin $n$ times.

Assuming each coin flip is independent of each other, and chance for heads is $50\%$.  How can we calculate the chance that after $n$ flips having gotten 6 heads in a row at least once?


Right-hand sidebar covers the footer on the "ask question" page and markdown help page

I have noticed that while asking questions and scrolling to the bottom of the page, the right sidebar containing recent questions covers the footer partially. Also, a part of it goes beyond the browser's boundary. It may not be a big problem but it still doesn't look good.    This also happens on the  page


Minor gripe: My flags are helpful, my spam flags are Helpful

Perhaps spam flags are slightly more helpful than normal flags and deserve capitalisation?


$$\lim_{x\to0}\frac{1-\cos x}{x^2}$$  I know there are many ways to calculate this. Like L'Hopital. But for learning purposes I am not supposed to do that. Instead, I decided to do it this way:  Consider that $\cos x = 1- \sin^2 \frac{x}{2}$ (from the doulbe-angle formulas ). Therefore:  $$\frac{1-(1- \sin^2 \frac{x}{2})}{x^2} = \frac{\sin^2 \frac{x}{2}}{x^2}$$  Let us split this:  $$\frac{\sin \frac{x}{2}}{x} \cdot \frac{\sin \frac{x}{2}}{x}$$  I will just work with the left one for now. At the end, I will just multiply it by itself.  $$\frac{\sin \frac{x}{2}}{x}$$  Hm. Remember that $\frac{\sin x}{x} = 1$ when $x\to0$. If only the denominator were an $\frac{x}{2}$ instead of $x$ I could do this... Well, I can! Let's just  $$\frac{\sin \frac{x}{2}}{x}\cdot\frac{\frac{1}{2}}{\frac{1}{2}}$$  Looks a bit dumb but it kind of makes sense. This will yield  $$\frac{\color{red}{\sin \frac{x}{2}}\cdot \frac{1}{2}}{\color{red}{\frac{x}{2}}}$$  Hurray, we can now apply the formula thingy and end up with  $$\frac{\color{red}1\cdot\frac{1}{2}}{\color{red}1} = \frac{1}{2}$$  Now I need to multiply this thing by itself.  $$\frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4}$$  And that is the answer.  ... Which is wrong. The correct answer is  $$\frac{1}{2}$$  What did I do wrong in these steps? I know many of you are able to solve this with a variety of different methods, but I'm particularly interested in this specific procedure I just tried to use. What was my mistake?


How to remove duplicate values from a multi-dimensional array in PHP

How can I remove duplicate values from a multi-dimensional array in PHP?  Example array:  Array (     [0] => Array     (         [0] => abc         [1] => def     )      [1] => Array     (         [0] => ghi         [1] => jkl     )      [2] => Array     (         [0] => mno         [1] => pql     )      [3] => Array     (         [0] => abc         [1] => def     )      [4] => Array     (         [0] => ghi         [1] => jkl     )      [5] => Array     (         [0] => mno         [1] => pql     )  )


My computer rebooted when I wasn't home and I lost several very important notepad files. Is there any way to recover them? Anything?


$\mathbb{Q}$ is not the countable intersection of open sets. Is my Reasoning Correct?

The question has actually 2 parts. I know the question has been asked before, but I want to know if my reasoning makes sense.I've done the first part but am unsure about the second. It goes as follows:  $\text{1) Show that} \ (\mathbb{R} - \mathbb{Q})  \ \text{is not the countable union of of closed sets}  \\ \text{2) Show that} \ (\mathbb{Q}) \ \text{is not the countable intersection of open sets}$  First I should ask: Can I just argue that as the countable union of closed sets is closed and since $(\mathbb{R} - \mathbb{Q})$ is neither open nor closed the statement would make no sense?  (an analogous case could be used in the $\mathbb{Q}$ part.  My second question is: For the second part, not using the argument above but using the first part of the problem, is it correct to say that $$ (\mathbb{R} - \mathbb{Q}) \neq \bigcup_ {n\in\mathbb{N}} C_n \text{ , where $C_n$ is a closed set $\Rightarrow$ }$$ $$(\mathbb{R} - \mathbb{Q})^c \neq (\bigcup_ {n\in\mathbb{N} } C_n)^c  \text{ , where little c is the complement}\Rightarrow  $$ $$(\mathbb{Q}) \neq \bigcap_ {n\in\mathbb{N} } (C_n)^c =\bigcap_ {n\in\mathbb{N}} O_n \text{ , where $O_n$ is an open set, which would prove part 2?} $$


Steps to follow to install ubuntu 13.04 on an ultrabook

How exactly should I install ubuntu on my ultrabook so that I can use all my ultrabook hardware at its best? Since, I am new to Ubuntu, it will be really helpful if you can elaborate each step.  My laptop is Dell inspiron 14z ultrabook. I want to install solely ubuntu on it.


Integral vanishes on all intervals implies the function is a.e. zero

I am having trouble with the following problem:      $f:\mathbb{R}\to \mathbb{R}$ is a measurable function such that for all $a$:   $$\int_{[0,a]}f\,dm=0.$$   Prove that $f=0$ for $m$ almost every $x$ (here $m$ is the Lebesgue measure).    I have no problem proving this for $f$ non-negative, or under the assumption that $f$ is integrable. But the question only assumes that $f$ is measurable and no more.  My idea was the usual thing; we look at the set of points where $f$ is positive and negative and assume one of these has measure greater than zero. Then I wanted to estimate one of these by an open set, look at the integral on the open set and show that it had to be greater than zero, a contradiction. But a key part of this attack is the assumption of the absolute continuity of the integral, which only holds in the case where $f$ is integrable.  Alternatively, if it were integrable one could simply estimate $f$ by a continuous function, where the result is quite obvious.  Ultimately we are going to show that $f$ is integrable, but it is not clear to me how to show this before showing it is zero a.e. So there must be a simpler way. Does anyone have suggestions?


For SEO what is better, Alias or /Directory/?

I had http://foo.tld/ cancelled because foo was a name too similar to a brand, so the DNS authority cancelled it. So I will register http://bar.tld/ to talk about 'foo'.   'foo' as ALIAS:  http://foo.bar.tld/  'foo' as /Directory/:  http://bar.tld/foo/  I personally prefer the Alias way, it one less /Directory/.  So my question is, how should I develop the website, or both ways are the same? Can anyone point out the differences?


void (*foo)(void) : meaning of latest (void)

B.A.T.M.A.N./A.L.F.R.E.D. OpenMesh project:   instantiates a pointer to a type  that is defined  struct vis_print_ops {     void (*preamble)(void);     void (*interfaces)(uint8_t iface_n, struct vis_iface *ifaces);     void (*entries)(uint8_t entries_n, struct vis_entry *vis_entries,             uint8_t iface_n, struct vis_iface *ifaces);     void (*postamble)(void); };   Now look at  void (*preamble)(void)   could you please tell me what is the meaning of the last (void)?  Isn't  void (*preamble)   enough?


Arabic text displayed as Ø§Ù„Ø³Ù„Ø§Ù on webpage also when retrieved in android app

I created a mysql database. i have set characters to utf-8 and collation to utf8_general_ci. In database table the text is okay. But when i view it on webpage it looks like this "Ø§Ù„Ø³Ù„Ø§Ù". When i retrieve this code to my android app i am having the same problem.   php code (index.php)  $con = mysqli_connect("mysql.hostinger.ph", "db_name", "passwrd", "u242667358_test"); if (mysqli_connect_errno()) {     echo "Failed to connect to MySQL: " . mysqli_connect_error(); } mysqli_set_charset($con, "utf8");   php code (index.php)  require_once('db.php');  $query = "SELECT * FROM BalochiNames ORDER BY RAND() LIMIT 1";     mysqli_query($con, $query);   $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) {     echo stripslashes($row['BalochiName']); } mysqli_close($con);


Can more memory than I need slow down my server?

We're about to install a memory intensive application and will purchase a server for it.  The server will have at least 4 CPUs, with multiple cores. While the application is memory intensive, the consultants we're speaking with said that 32GB should be sufficient.  They also said that if I add more memory than that, the server will slow down because of the "extra wiring" to connect all of the memory.  I'm not planning on putting VMs on the hardware so I don't need extra memory to partition for virtual machines.  However I am concerned that 32GB may not be enough.  Does the consultant's assertion that more memory than I need will slow the machine down correct?


How many types of quantum computers are currently being researched?

I came across a "new" type of quantum computer - photonic quantum computing. Is this type of technology of interest here? You may read about an example . I wonder how many types of quantum computers are now researched? Any good summary of these technologies?


Does new instance need to be created for delegate?

I was just playing with delegate but I got confused about working of it. In below code public delegate void HelloFunctionDelegate(string Message);  public static void Main() {     //HelloFunctionDelegate del = new HelloFunctionDelegate(Hello1);     //del("hello from delegate");     Console.WriteLine("Hello World");            Hello(Hello1);       }  public static void Hello(HelloFunctionDelegate del) {     del("This is it");//we did not create instance of delegate  }  public static void Hello1(string strMessage) {     Console.WriteLine(strMessage); }  Here It is working in both ways.we can pass method by creating new instance (commented code)and without creating new instance of delegate (HelloFunctionDelegate )? What is the difference between them?


Not able to edit the favorite tags, when the user is already viewing the questions tagged to a particular favorite tag

From home page, choose a favorite tag. the list of questions tagged to it will be displayed-> try editing the favorite tags, script error is thrown. User has to go to the home page to edit the tags again.


Where can I find the Xenial source, and instructions on building it into an ISO? (custom install CD for Ubuntu 16.04)

I followed  and managed to build a distro:  However it only boots with VirtualBox, and this guide is hopelessly out of date. Searching around the net, I found this handy tutorial on  Now I managed to get something sort of working. There are still problems and the guide is not complete.  However the question still remains- where can I find this info?  Where is the source repository for Ubuntu with the build guide?


How do I copy data from one table to an empty table in different databases?

I have two tables, 2012 and 2018, each in different databases. I am currently using SQL Server. The 2012 table has data filled in, while the 2018 table has the same exact columns, but is empty. I want to copy data from the 2012 table to the 2018 table. I tried looking it up online, but most of the information pertained to other versions of SQL (MySQL, Oracle, etc.) I would very much appreciate some help with this. Thank you.


my reference doesn't start in order from [1] but it starts from [2]

i am writing my thesis in latex, my problem with the first reference .its start from [2] not from[1],all the rest of the thesis reference's is correct order.i didn't understand where is the problem. \backmattermodel \bibliographystyle{ieeetr} \bibliography{sample} \refstepcounter{chapter} \clearemptydoublepage \end{document} the sample is my reference file. it is happen to me before when i wrote a article ,it was there a  \bibitem in the article for that it was starting from [2] ,but this time i tried to search any  \bibitem ,i didn't find any  one. i want to put my code here but ,it is very long. thanks


Prove that $R/I$ and $S/\phi(I)$ are isomorphic

$R,S$ are commutative rings with $\phi : R \rightarrow S$ an isomorphism between them. $I \subset R$ is an ideal and $\phi(I) \subset S$ is an ideal as well. Show that $R/I$ and $S/\phi(I)$ are isomorphic.  This is how I approached this problem: The natural homomorphism $\pi : R \rightarrow R/I$ is a surjective ring homomorphism with $ker(\phi) = I$. Given that $\phi : R \rightarrow S$ an isomorphism, then it should follow that $\psi : R \rightarrow S/\phi(I)$ is also a ring isomorphism, meaning it is both surjective and injective. Thus, by the isomorphism theorem, because there exists a surjective homomorphism $\pi : R \rightarrow R/I$ and a surjective homomorphism $\psi : R \rightarrow S/\phi(I)$, then it follows that there exists an isomorphism $\sigma : R/I \rightarrow S/\phi(I)$. The reason I am not sure about this proof is because I have made an assumption that I am not sure is correct and also because I haven't really done anything with the elements within these rings. Any help would be greatly appreciated.


How can I view last installed package or program?

Can user list last installed packages by apt-get in terminal?  I need to know which last package I installed on Ubuntu 12.04.


In a vacuum, are photons always traveling at 100% light speed? Can photons go any slower in a vacuum? They have no mass which means they can go at 100% light speed, but do they have to?


Why didn't Gandalf or Frodo Fly to Mount Doom?

Why didn't Gandalf use his eagles to fly over Mount Doom and drop the ring? I know he feared what he would do if the ring overpowered him, so why not just give Frodo an eagle? And, if there would be too much risk in flying the ring to Mordor, couldn't the eagles fly them part of the way?  Why risk it with such a long walk; far less risky to fly over most of the journey.


align environment without any explicit alignments points (given by &) right justifies the equations in the block. They can be left justified by putting & at the beginning of each equation. Is there any way to left justify them without starting &-s? Maybe some special environment or option? It seems to be an extra work to tell the compiler again and again that I want left alignment on each line.


Supervisord - Supervisor exit status 255 not expected on A

I have no clue why this always happened. I tried to reload the supervisord process but still doesnt the same error appears  The error show this..    and the supervisord.conf


I am currently on H1B and am planning to visit Toronto, Canada. The visa on my passport is expired by I have extended my I94. So my question is that if I go to Canada for a 5 night vacation, can I re-enter USA if I have my updated I94, I797 and passport.  Please do let me know. Am planning to go next year during the summer.


Wget and curl can work normally, but ping fails

When I ping www.google.com and 8.8.8.8, I get no reply:  # ping www.google.com PING www.google.com (216.58.221.228) 56(84) bytes of data. ( no response)  # ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. ( no response)  20 packets transmitted, 0 received, 100% packet loss, time 19006ms   There has been no response. But, both curl and wget are OK. My OS is CentOS 7.  Here is my network configuration file:  # cat /etc/sysconfig/network-scripts/ifcfg-ens33  TYPE=Ethernet #BOOTPROTO=dhcp BOOTPROTO=static DEFROUTE=yes PEERDNS=yes PEERROUTES=yes #IPV4_FAILURE_FATAL=no IPADDR=192.168.42.12 NETMASK=255.255.255.0 GATEWAY=192.168.42.129 DNS1=192.168.42.129 DNS2=114.114.114.114 IPV6INIT=no IPV6_AUTOCONF=no IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=ens33 UUID=e7328f29-6313-4382-8023-b7740ed4f7ad ONBOOT=yes   Here is ip  and route information:  # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000     link/ether 00:0c:29:4d:df:bf brd ff:ff:ff:ff:ff:ff     inet 192.168.42.12/24 brd 192.168.42.255 scope global ens33        valid_lft forever preferred_lft forever     inet6 fe80::20c:29ff:fe4d:dfbf/64 scope link         valid_lft forever preferred_lft forever 3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100     link/none      inet 10.8.0.1 peer 10.8.0.2/32 scope global tun0        valid_lft forever preferred_lft forever # ip route default via 192.168.42.129 dev ens33  proto static  metric 100  10.8.0.0/24 via 10.8.0.2 dev tun0  10.8.0.2 dev tun0  proto kernel  scope link  src 10.8.0.1  192.168.42.0/24 dev ens33  proto kernel  scope link  src 192.168.42.12  metric 100      cat /etc/sysctl.conf | grep echo   outputs nothing.  I see, not be able to connect to Google because of the firewall:GFW.  traceroute output:  # traceroute -T www.google.com traceroute to www.google.com (216.58.197.100), 30 hops max, 60 byte packets  1  gateway (192.168.42.129)  0.541 ms  0.378 ms  0.294 ms  2  * * *  3  * * *  4  * * *  5  * * *  6  * * *  7  * * *  8  * * *  9  * * * 10  * * * 11  * * * 12  * * * 13  * * * 14  * * * 15  * * * 16  * * * 17  * * * 18  * * * 19  * * * 20  * * * 21  * * * 22  * * * 23  * * * 24  * * * 25  * * * 26  * * * 27  * * * 28  * * * 29  * * * 30  * * *   traceroute with www.vim.org output:       # traceroute -T www.vim.org traceroute to www.vim.org (216.34.181.97), 30 hops max, 60 byte packets  1  gateway (192.168.42.129)  0.447 ms  0.419 ms  0.287 ms  2  * * *  3  * * *  4  * * *  5  * * *  6  * * *  7  * * *  8  * * *  9  * * * 10  * * * 11  * * * 12  * * * 13  * * * 14  * * * 15  * * * 16  * * * 17  * * * 18  vhost.sourceforge.net (216.34.181.97)  229.060 ms  214.904 ms  220.727 ms   But , ping www.vim.org  also have no response.   # ping www.vim.org PING vhost.sourceforge.net (216.34.181.97) 56(84) bytes of data. (no response)   Thank you for any advice.


Cursoring over sys.databases skips databases

I know this question has been asked several times and I know the solution, but I am trying to understand the underlying cause of the problem:  I have the following code to perform database backups.   DECLARE @Filename   VARCHAR(256) DECLARE @FileDate   VARCHAR(15)  DECLARE @Path       VARCHAR(50)  DECLARE @Name       VARCHAR(50)   -- specify database backup directory SET @Path = '\MyPath'  -- specify filename date SELECT @FileDate = CONVERT(VARCHAR(20), GETDATE(), 112) + '_' + REPLACE(CONVERT(VARCHAR(20), GETDATE(), 108),':','')  DECLARE db_cursor CURSOR FOR     SELECT [name]         FROM master.sys.databases         WHERE [name] NOT IN ('master', 'msdb', 'model', 'tempdb')             AND [state_desc] = 'ONLINE'  OPEN db_cursor FETCH NEXT FROM db_cursor INTO @Name  WHILE @@FETCH_STATUS = 0 BEGIN      SET @Filename = @Path + @Name + '_Full_Backup_' + @FileDate + '.bak'     BACKUP DATABASE @Name     TO DISK = @Filename     WITH CHECKSUM,         COMPRESSION      FETCH NEXT FROM db_cursor INTO @Name END  CLOSE db_cursor DEALLOCATE db_cursor   Sometimes, only some databases are backed up, suggesting that the cursor is not iterating over all of the rows returned or that the query itself is not returning the names of all the databases it should be.  I am trying to understand why this happens. I know that the fix is to use a STATIC cursor, suggesting the issue is with the results in the underlying query   SELECT [name]     FROM master.sys.databases     WHERE [name] NOT IN ('master', 'msdb', 'model', 'tempdb')         AND [state_desc] = 'ONLINE'   are changing, but I can't see what would be changing (no database names would change and the Error log doesn't suggest that the database state has changed)


How to photograph a room showing both room & view out a window?

I sometimes find I want to photograph a room showing the view outside the window. This is tricky — either  you adjust the shutter speed so that the the window is so bright  you can see no detail, or the room looks very dark and gloomy.    Are there any techniques I can use to get the best photo showing as much as possible of both room and view?   My camera is a Sony Nex3, and for this sort of thing I usually use it with an elderly Pentax-M 1:2.8 / 28mm manual focus lens with an adaptor, although I would be prepared to buy another (cheap manual!) lens.