Let $H$ be a subgroup of a finite abelian group $G$. Show that $G$ has a subgroup that is isomorphic to $G/H$.  My approach: Let's try to prove by induction on $o(G)$.  If $o(G)=1$ then the result is obvious. Suppose it is true for all groups with order less than $n$.  Suppose that $o(G)=n$ and $H\neq \{e\},G$ because otherwise the result is trivial.  Let $x\in H$ s.t. $x\neq e$ and consider subgroup generated by $x$, i.e. $\langle x\rangle$ then $H/\langle x\rangle\leq G/ \langle x\rangle$. Note that $(G/\langle x\rangle)/(H/\langle x\rangle)\cong G/H$. Since $o(G/\langle x\rangle)<o(G)=n$ then by induction hypothesis there exists subgroup $\bar{K}\leq G/\langle x\rangle$ such that $\bar{K}\cong (G/\langle x\rangle)/(H/\langle x\rangle)$ $\Rightarrow$ $\bar{K}\cong G/H$.  Then I was trying to find subgroup of $G$ which is isomorphic to $G/H$ but no results. I've considered the surjective mapping $\pi: G\to G/\langle x\rangle$ which does give any useful results.  I would be very thankful if anyone can show how to complete my approach?

I'm having difficulty with exercise 1.43 of Lang's Algebra. The question states     Let $H$ be a subgroup of a finite abelian group $G$. Show that $G$ has a subgroup that is isomorphic to $G/H$.   Thinking about this for a bit, the only reasonable approach I could think of was to construct some surjective homomorphism $\phi\colon G\to K$ for $K\leq G$, and $\ker\phi=H$, and then just use the isomorphism theorems to get the result.  After a while of trying, I've failed to come up with a good map, since $H$ seems so arbitrary. I'm curious, how can one construct the desired homomorphism? This is just the approach I thought of, if there's a better one, I wouldn't mind seeing that either/instead. Thank you.


I have noticed that when grub boots up I don't get a black screen on my monitor. I want to make it so that it will show every time I boot, not just when I turn it off manually and then turn it on again. Thank you in advance for your help.

I stopped dual booting and I don't want to have to choose the OS any more. I want to boot into Ubuntu 12.04 directly without seeing the GRUB menu.  How can I achieve that?


I just installed Ubuntu 14 on my laptop for the first time. After the installation I had no Wi-Fi connection. I went to "Edit Connections" and created a "Wi-Fi Connection", but don't know how to answer the questions such as SSID, Mode, BSSID, Device MAC address, Cloned MAC address, and MTU.  Can one of you gurus please help me?  Many thanks in advance and have a nice day.  Regards, Majid Chavoshi  Thanks for your assistance, below please find the output of lspci -knn | grep Net -A2  $ lspci -knn | grep Net -A2 00:19.0 Ethernet controller [0200]: Intel Corporation 82567LM Gigabit Network         Connection [8086:10fs] (rev 03) Subsystem: Dell Device [1028:024f] Kernel driver in use: e1000e  oc:oo.o Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01) Subsystem: Dell Wireless 1397 WLAN Mini-Card [1028:000c] Kernel driver in use: b43-pci-bridge

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have a custom listview in my app which fills by JSON and I'm using bitmap to fill images in listView and I want to get a TextView value inside the list item that has been clicked  lView.setOnItemClickListener(new AdapterView.OnItemClickListener() {   @Override   public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {     try {           hotel_id = (int) adapterView.getItemIdAtPosition(i);           TextView id= (TextView) lView.getChildAt(i).findViewById(R.id.aNametxt);           type_id_post = deleteIcon.getText().toString();            backgroundTask = new BackgroundTask(textView);           backgroundTask.execute();            Intent intent = new Intent(RoomList.this, RoomPopUp.class);           startActivity(intent);          }     catch (RuntimeException e){           e.printStackTrace();     }   } });   and it works for the first two items of the list but for another item app will stop on hotel_id definition line and this is logcat when I click an item except for the first two items :  08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: java.lang.NullPointerException 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at com.test.RoomList$1.onItemClick(RoomList.java:126) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.widget.AdapterView.performItemClick(AdapterView.java:299) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.widget.AbsListView.performItemClick(AbsListView.java:1158) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.widget.AbsListView$PerformClick.run(AbsListView.java:2957) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.widget.AbsListView$3.run(AbsListView.java:3849) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.os.Handler.handleCallback(Handler.java:733) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.os.Looper.loop(Looper.java:136) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5105) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608) 08-07 11:43:36.026 14747-14747/com.moalem.khane.khanemoalem W/System.err: at dalvik.system.NativeStart.main(Native Method)   the point is all item's id TextView of the list are casting to one id but it for "SOME" items that id is null is there anyone who knows what is the problem of this?

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


As the title suggests I am asking about the main differences between .bashrc and /etc/profile. What I know is that .bashrc is a shell script that runs on login(I guess). And I know /etc/profile runs on ssh login or terminal login I also guess. Could someone please steer me in the right direction here?

I would like to concentrate all my login config in my ~/.bash_profile.  There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile.  However, when I log in, something before my ~/.bash_profile gets sourced and displays the following:  Linux ubnt10-dev1 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux Ubuntu 10.04.4 LTS  Welcome to the Ubuntu Server!  * Documentation:  http://www.ubuntu.com/server/doc    System information as of Fri May  9 12:17:39 EDT 2014    System load:  0.01              Processes:           74   Usage of /:   5.5% of 18.58GB   Users logged in:     0   Memory usage: 4%                IP address for eth0: 123.x.x.x   Swap usage:   0%    Graph this data and manage this system at https://landscape.canonical.com/  New release 'precise' available. Run 'do-release-upgrade' to upgrade to it.  Last login: Fri May  9 12:11:52 2014 from 123.x.x.x   I would like to remove that so that only my own splash greeting defined in my ~/.bash_profile gets displays but I am not sure about the logic/sequence of scripts sourced/executed when a user logs in.  Can you enlighten me?  As a bonus, I would also like to know the sequence of automated sourcings/execs when the system starts, not just when a user starts a session by logging in, albeit this is a concern of lesser importance to me right now.


I'm having some problem with the way blender handle the shortcuts. When I use a shortcut for a tool, like the extrusion one, for example, it immediately execute extrusion, instead of just selecting the tool.   I managed to bypass it by clicking in each option at the quick tools menu and reinserting the shortcuts, but apparently I have to do that for each blender mode. Is there a option I'm missing in the preferences or maybe a plugin to make Blender behave differently?

I open Blender 2.80 (official release, not a beta or RC) and get the new scene with the usual 3 objects present (camera, light and cube). I select the cube, press 't' for the tools menu and click on the Move tool. The usual 3 axis glyph appears at the cube's origin as expected. But if I use the hotkey 'g' to activate the move transform instead of selecting the tool from the menu with the mouse this glyph does not appear. The exact same problem exists if I use the a hotkey for rotate or scale as well. Why? Is there some clickable checkbox setting hidden somewhere that could have disabled this?


I have a data with discrete values and need to find if it is normally distributed. I plotted the graph and it looks normal and then I  performed  shapiro wilk test where the result were W = 0.78773, p-value < 2.2e-16, through which I concluded data is not normal. I just need guidance if I should be performing any more tests to find if the data is normally distributed, also I believe discrete values data can never be normal, is my understanding correct?

Here are some grades. (They aren't test scores. They aren't a sample.) I want to test whether a normal distribution derived from the mean and variance of the grades provides a good fit for the grades. What other distribution might fit is, for now, an orthogonal issue. The question is whether the normal distribution provides a valid model.  > grades   [1] NA 75 70 70 80 75 85 85 75 85 75 80 85 80 75 70 70 85 90 90 NA 85 NA 75 80  [26] 80 85 80 85 85 75 NA 75 70 80 65 80 75 70 80 85 65 85 75 75 85 75 60 85 80  [51] 85 85 70 70 80 75 80 80 NA 80 75 85 80 80 55 75 60 90 80 75 80 70 85 75 80  [76] 75 80 75 75 70 85 85 80 80 75 70 NA 75 70 75 70 65 85 70 70 80 80 85 85 70 [101] 75 70 75 75 65 70 80 75 65 65 > t <- table(grades) > t grades 55 60 65 70 75 80 85 90  1  2  6 18 27 25 22  3   The grades come from a discrete set of possible values from five to 100 in increments of five. Because of that, a Chi-squared test might be appropriate. First, the normal distribution probabilities that any of the discrete values will occur:  > p <- dnorm(seq(55,90,5), mean(grades, na.rm=TRUE), sd(grades, na.rm=TRUE)) > p [1] 0.0004433536 0.0031786310 0.0136901824 0.0354207364 0.0550535301 [6] 0.0514034173 0.0288322176 0.0097150119   Why are the values of p so small? Why do they not add-up to one?  > tf <- as.data.frame(t) > tf   grades Freq 1     55    1 2     60    2 3     65    6 4     70   18 5     75   27 6     80   25 7     85   22 8     90    3 > chisq.test(tf$Freq, p=p, rescale.p=TRUE)      Chi-squared test for given probabilities  data:  tf$Freq X-squared = 7.0452, df = 7, p-value = 0.4242  Warning message: In chisq.test(tf$Freq, p = p, rescale.p = TRUE) :   Chi-squared approximation may be incorrect   Why does the chisq.test function produce the warning?  I need numbers, because I have a lot of these data sets and want fit results for a large sample of them. Visual inspection isn't proof. The closest relevant question I've found is  ("Testing Whether a Binomial Distribution Fits Data")


I am an Indian citizen in US on a F1 visa. I have a flight from Orlando to New Delhi in December 2021 with a 7 hour layover in Rome. My plan is to make use of this time and hit a couple of spots in the city. Can anyone give me an idea if I need to apply for a transit visa or a regular Schengen visa to get out of the airport and visit some places?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I am using Spark with Java to read a file from a text file that I store in documents. Then I split the documents by line then by word.  But when I print the words I get     [[Ljava.lang.String;@2819c460] [[Ljava.lang.String;@30364216] [[Ljava.lang.String;@38bb9d7a] [[Ljava.lang.String;@1e8ab90f] [[Ljava.lang.String;@78d6447a]     Below is my code    JavaRDD<String> documents = sc.textFile(path, 1000);                  JavaRDD<ArrayList<String[]>> lines = documents.map(document -> {          return document.split("\\r?\\n");         }).map(_lines -> {      ArrayList<String[]> parsedLines = new ArrayList<>();     Arrays.asList(_lines).stream().parallel().forEach(line -> {     parsedLines.add(line.split("\\t"));    });    return parsedLines;          });          lines.take(5).forEach(column -> {           System.out.println(column);         });     System.out.println(Arrays.toString(column)) gives me this error :    Error:(62, 50) java: no suitable method found for toString(java.util.ArrayList<java.lang.String[]>)     method java.util.Arrays.toString(long[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to long[])     method java.util.Arrays.toString(int[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to int[])     method java.util.Arrays.toString(short[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to short[])     method java.util.Arrays.toString(char[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to char[])     method java.util.Arrays.toString(byte[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to byte[])     method java.util.Arrays.toString(boolean[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to boolean[])     method java.util.Arrays.toString(float[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to float[])     method java.util.Arrays.toString(double[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to double[])     method java.util.Arrays.toString(java.lang.Object[]) is not applicable       (argument mismatch; java.util.ArrayList<java.lang.String[]> cannot be converted to java.lang.Object[])

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I have a HTML page that have an iframe. I want to change style of iframe content but I don't seem to be able to do so.  I want to change the font of all content inside the iframe to "Tahoma". This is my code:  <!DOCTYPE>     <title>phpinfo()</title>

I have a simple page that has some iframe sections (to display RSS links). How can I apply the same CSS format from the main page to the page displayed in the iframe?


I am trying to write an equation in my thesis, but i have been looking for around 2 hours the way to write this symbol, hope somebody can help me.

It is very easy to put a tilde over the symbol in math mode. Simply type $\tilde{a}$. But how to put a tilde under the symbol in math mode?


I don't know what is wrong in this code but 2 equal things are not equal I have taken inputs as character and then converted them to a string and then compared that string with "RAINBOW" but even if I put 'R', 'A', 'I', 'N', 'B', 'O', 'W' the two strings doesn't match and give false. import java.util.Scanner; public class Character {          public static void main(String[] args) {               // TODO Auto-generated method stub               Scanner sc=new Scanner(System.in);              char[] arr=new char[7];               System.out.println("Enter first no:");                 arr[0]=sc.nextLine().charAt(0);               System.out.println("Enter second no:");              arr[1]=sc.nextLine().charAt(0);               System.out.println("Enter third no:");               arr[2]=sc.nextLine().charAt(0);               System.out.println("Enter fourth no:");                 arr[3]=sc.nextLine().charAt(0);                System.out.println("Enter fifth no:");                 arr[4]=sc.nextLine().charAt(0);                System.out.println("Enter sixth no:");                 arr[5]=sc.nextLine().charAt(0);                  System.out.println("Enter seventh no:");                  arr[6]=sc.nextLine().charAt(0);                         String word=String.valueOf(arr);                   System.out.println(word=="RAINBOW");      }  }

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


e.g. I want to use bibliographystyle{unsrt} to do the referencing as per order of appearance along with bibliographystyle{abbrv} to abbreviate the names of the autho. Is this possible?

Is there a ready made BibTeX bibliography style file that both: (1) prints author names abbreviated (like abbrv) in the references section and (2) sorts references numerically in citation order (like unsrt)? Furthermore, is there one such style compatible with natbib?


Let $A, B,C,D$ be square matrices, of same size $n\times n$.  Assume $A$ is invertible and $AC = CA.$  Prove that   $$     det    \begin{bmatrix}         A & B \\         C & D  \\                 \end{bmatrix}  =   det[AD - BC]         $$  I am getting my final answer as $det[AD - CB]$ instead, and my work looks fine -- just a simple factorization of the matrix, and using the multiplicativity of the determinant, $AA^{-1}=I$, and $AC=CA$.  Is the problem statement wrong?  Or perhaps my answer of $det[AD - CB]$ is actually equal to $det[AD - BC]$, but I doubt it -- there are no extra assumptions on the relations of $B$ and $C$ other than that they are of the same size.  So we can't assume that $B$ and $C$ commute.  Thanks,

On , I saw the following formula  $$\det\begin{bmatrix}A & B\\ C & D\end{bmatrix} = \det(AD-BC)$$  if $C$ and $D$ commute. Is this always true?   Or is there a good counter example for each $2 \times 2$ block matrices?


Prove that, for all $x, y ∈ \mathbb{R}$, we have $|x − y| ≤ |x| + |y|$. Can I say . $|x − y|^2 ≤ (x − y)^2$, and work from there? Thank you

Can you help me to prove that $$|x-y|\leq |x|+|y|$$ I get a proff of this equality, but it's very short and I don't know if it's correct.


Given the idea that gravity is always a factor (even though greater distances are excessively tiny), would everything eventually end up forming a single black hole?  My thinking is that, with infinite time, all mass will eventually be pulled together.

I am only an interested layman in cosmology and GR. In recent years, we have learned that black holes indeed exist in the universe and that almost all galaxies contain massive black holes in their centers. Black holes, in essence only devour other (stellar) matter and they also swallow each other as has been demonstrated by the gravitational wave discoveries. Is it possible that black holes eventually will "eat" most or even all normal and dark matter of the universe? And could this, and a merging of black holes, lead to a situation where all the universe ends up being a few or even only one black hole?


Can you walk from terminal 1C to terminal 2 at Doha's Hamad International Airport? How long will it take? I only have one hour between flights.

According to , when transiting at Doha Airport, you'll get a colour code on your boarding pass wallet: yellow for regular transfer in the main building, yellow with an orange edge for short Transfer in the main building, and green for transfer in the satellite building. There are then separate buses and bus stops depending on your colour.  One comment, however, states:     This video was made when the overcrowded old airport was in use. The new Hamad International Airport is open now, which works like any other airport - there are no special transfer procedures.   So, how does transfer at Doha currently work, with all possible scenarios combined where you have your onward boarding pass and want to get to your next gate directly?  If the colour system is still in place, how are you assigned a colour if checking in online and thus not going to a check-in desk?


I have been trying all day to get to the bottom of this problem, but I  just cannot see how to implement it, hence the reason for applying here seeking for help. I am looking for any type of advice someone could give. I have the following class: public class Client {     private String name;     private String surname;     private String address;      public Client(String name, String surname, String address){         this.name = name;         this.surname = surname;         this.address = address;     }      public String getNume() {         return name;     }      public void setName(String name) {         this.name = name;     }      public String getSurname() {         return surname;     }      public void setSurname(String surname) {         this.surname = surname;     }      public String getAddress() {         return address;     }      public void setAddress(String address) {         this.address = address;     }   }  I wanted to implement the state design pattern for something like a delivery-type of exercise. I have an interface with the showStatus() and nextStatus() method, and two classes that implement it - InDelivery and Delivered. public interface Delivery {     void showStatus();     void nextStatus(Courier courier) }   public class Courier {     int phoneNumber;     String destination;     Client client;     Delivery statusDelivery = new InDelivery();       Courier(int phoneNumber, String destination){         this.destination  = destination;         this.phoneNumber = phoneNumber;       }      public int getPhoneNumber() {         return phoneNumber;     }      public void setPhoneNumber(int phoneNumber) {         this.phoneNumber = phoneNumber;     }      public String getDestination() {         return destination;     }      public void setDestination(String destination) {         this.destination = destination;     }      public void setStatus(Delivery statusDelivery){         this.statusDelivery = statusDelivery;     }      public void printStatus(){         statusDelivery.printStatusStatus();         statusDelivery.statusUrmator(this);     }  }  public class InDelivery implements Delivery{     Client client;      @Override     public void showStatus() {         System.out.println("In delivery");     }      @Override     public void nextStatus(Courier courier) {         if(courier.getDestination() == client.getAddress())             courier.setStatus(new Delivered());      } }   public class Delivered implements Delivery{     @Override     public void showStatus() {         System.out.println("Delivered");     }      @Override      public void nextStatus(Courier courier) {     System.out.println("No status, already delivered");     }   }    What I am trying to do is only when the Courier address matches the Client address it moves to the next status (the Delivered status). This piece of code is the problem: public void nextStatus(Courier courier) {         if(courier.getDestination() == client.getAddress())             courier.setStatus(new Delivered());      }  Any kind of advice I'd greatly appreciate..

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


I was wondering if it is necessary to use an Antivirus for Ubuntu 14.04 and which one should I use, I tried using the official documentation but the antivirus list there is for 10.04, I have no idea how to install ClamAV, I've tried what the ClamAV website says and what Ubuntu website says with no luck, I tried to find Avast for Linux but apparently it no longer exists D:

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


I know there's a lot of questions about downloading .tar.gz files, but I haven't found any that explain my problem. When I'm trying to install these files, using the   ./configure make sudo make install.   But when I use ./config, it returns bash: ./config: No such file or directory. Same with make and sudo make install. Am I doing wrong, or is there just an error with my computer? As I said, this is not the same question as "how to download .tar.gz files" because I tried their solution and it didn't work. There is no ./configure file to cd into.

I've downloaded a tar.gz for the game Solar 2, and extracted it. Frustratingly, there is no configure file for it, nor is there an INSTALL or a README file. If I skip straight to the "make" command, it tells me there's no targets specified and no makefile found. I'm also having the same problem with another game I've downloaded, NightSky.  Not quite sure how to proceed. I can't find any official documentation or anyone else having these problems. Any suggestions?


I am trying to find the union of two vector layers (both spatial indexed) - one land use polygons and another grid. In QGIS it is running since 4 days ago, but in ArcGIS Desktop it took less than 10 min.  Does anyone know if ArcGIS Desktop pre-processes vector(s) before actual union function?  The time difference cannot be this drastic!

Taking the * of these two large shapefiles   locally using ArcMap takes appr. 10 min.   Over the last few weeks, I've tried to obtain the same results using other, open-source approaches without success. I am curious why only ArcMap seems to generate results in a reasonable amount of time without errors.   The approaches I've tried so far:  QGIS  The most straight-forward alternative. There are two "union" functions available in QGIS. One default (part of vector overlay), one based on SAGA. Both functions create the desired results on smaller samples but fail to run (or take forever) on my shapefiles. I tried running union for 30 minutes after which the progress bar was at appr. 4%    PostGIS  I've ingested the shapefiles on an AWS RDS instance running postGreSQL with PostGIS enabled. The approach is not so straight forward and requires a hideous long SQL query to obtain the same result. Most importantly, the query did not create a meaningful result on the full datasets. It did run properly on a sample though.   See separate question   CREATE TABLE test.sqlislelijk AS  -- input data with polys1 AS (   SELECT      pfaf_id as df1,     geom as g   FROM hybas06_v04 ), polys2 AS (   SELECT      aqid as df2,     geom as g   FROM y2018m11d14_rh_whymap_to_rds_v01_v01 ), -- intersections intersections AS (   SELECT df1, df2, ST_INTERSECTION(a.g, b.g) i, a.g AS g1, b.g AS g2    FROM polys1 a, polys2 b WHERE ST_INTERSECTS(a.g, b.g) ), -- per-row union of intersections with this row diff1 AS (   SELECT df1, ST_UNION(i) i FROM intersections GROUP BY df1 ), diff2 AS (   SELECT df2, ST_UNION(i) i FROM intersections GROUP BY df2 ), -- various combinations of intersections pairs AS (   SELECT df1, df2, i AS g FROM intersections   UNION ALL   SELECT      p.df1,     NULL,     CASE       WHEN i IS NULL THEN g        ELSE ST_DIFFERENCE(g, i)     END   FROM polys1 p LEFT JOIN diff1 d ON p.df1 = d.df1   UNION ALL   SELECT     NULL,     p.df2,     CASE       WHEN i IS NULL THEN g       ELSE ST_DIFFERENCE(g, i)     END   FROM polys2 p LEFT JOIN diff2 d ON p.df2 = d.df2   ) SELECT    df1 as pfaf_id,   df2 as aqid,   g as geom FROM pairs WHERE NOT ST_IsEmpty(g);   Google BigQuery  Google's GIS extension for BQ looks promising but I experienced weird behavior and internal errors, probably due to mixing of GEOMETRY and GEOGRAPHY objects. Also, the syntax is similar to PostGIS and a command of 1 line in geopandas takes >20 lines in SQL.   GeoPandas  Probably my favorite approach. The out-of the box approach does't give any results after running it for several hours. My latest approach includes tiling the shapefiles, use multiprocessing on each tile and merge them. Not very straight forward and one 10x10 degree tile till takes 40+ minutes to calculate.   See   It is the first time in my career that I am impressed by the performance of ArcMap. It seems that ArcMap handles this use-case much, much better than anything else. The issue seems persistent over all solutions I've tried so far. Is there something wrong in the underlying libraries of the open-source/alternative solutions?    Note that Union in ArcMap means something different than in the Shapely / PostGIS world.


I am sorry if this is a naive question but is there any justification for the way that s is computed in the DSA signature algorithm:  $$ s = k^{-1} * (rx + m) $$  This looks to me like a very arbitrary combination of $k$, $r$, $x$ and $m$. Is this just one particular way that's found to work or does it actually have some kind of structure/reason behind it that I am missing?

I understand DH and ElGamal and RSA encryption/signatures.  But when I look at ECDSA (or plain DSA), it seems like the formulas are just pulled out of thin air.  I can verify that the algebra used in the verification formula does in fact work out, but I have no clue why forgeries are hard, why these formulas were used, why something simpler wouldn't work, and where the inventor(s) got all this stuff.  Can someone explain the intuition behind ECDSA?


2014 13" MBP got stolen. Find My Mac wasn't on (stupid mistake), so they only thing protecting my data is the password.   If they do manage to get in somehow, then I can't protect my files but I don't want them to get into my iCloud (Notes/Photos/Keychain/etc.), I've changed my iCloud password so that should prevent them from accessing anything right?   All advice is welcome, I've already filed the police report but recovering the laptop seems unlikely

Two weeks ago, my 13" Macbook Pro was stolen. Is there any way to locate my laptop if and when the thief accesses the internet?  Is there any application or a website similar to  that can give me an alert message if I register my Macbook pro ID number?


I have added a visualforce page to one of our case's page layouts. The Visualforce page has an input field and that's it, you insert the input yourself and hit save.  Users in my org are complaining that every time they view a case, it 'jumps' to the section of the visualforce page. it's like the VF page's input has autofocus attribute or something.   Can someone provide a solution for this?  VF Page:  <apex:page standardController="Case" extensions="CreateRelatedAppsInCaseExtension">     <apex:form id="rerenderForm" rendered="true">         <apex:messages />         <apex:inputText value="{! searchBy }" style="float:left;" styleClass="searchBy" />         <apex:commandButton value="Search" action="{!search}" reRender="rerenderForm"></apex:commandButton>     </apex:form> </apex:page>

I have two date fields on my Visualforce page and on occasions the datepicker/calendar pops up upon page load. I understand one way to prevent this is to use javascript as suggested below:  <input id="hiddenElementId" type="hidden" /> <script type="text/javascript"> window.onload = setFocus function setFocus() {          document.getElementById("hiddenElementId").focus(); } </script>     However this post is pretty old now, is this still considered the best way to do this?


I have this 40 GB volume (partition) that I would like to extend to 80 GB. I have already shrinken (downsized) the system partition in order to create some unallocated space before the partition that I want to make bigger.    The problem is when I right click on the 40 GB partition I can't select the "Extend volume" option. Why not? You can see by the screenshot above that the space before my partition is "RAW". That's because I formatted selecting any file system. But it was black before, indicating "unallocated" space, and I still couldn't extend my partition to include this space.  Let me guess... I have to have the unallocated space AFTER the partition I want to enlarge? I would like to try that of course, but there seems to be no option to move any partition or "volume" anywhere, not to a different disk nor left or right within a given space on the same partition. So how do you do it then?...    In the screenshot above you can see how it looks like with unallocated space before my partition. I obviously can't just remove my RECOVERY partition that sits right after my partition. I won't be able to restore the computer ever again. So that's not an option.

I'm trying to extend  the D: partition using unallocated 30.91 GB space at its left side.   states it can't be done using Disk Management's UI and it suggests using 3rd-party tools.  However, how can we do this natively (e.g. diskpart) without installing/downloading additional software?


First of all, I'm complete linux noob. Please keep explanations simple )  I'm using 14.10 (Utopic unicorn,  I believe) on Virtualbox. I've run into cascade of problems with JDK installation (inability to fetch some archives), which led me to run apt-get update. It fails in a similar fashion, not being able to download some packages (some of them do come through).   Quick run around here led me to believe that the problem lies in sources.list. I need some help with either correcting it, or generating anew. I've tried to use repogen.simplylinux.ch, but it doesn't seem to work with 14.10.  Help plz :P

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I'm an undergraduate physics student and we're learning about electrodynamics. While studying, a question popped in my head: We know that magnetic fields are generated from moving electric charges, or currents, but isn't this a matter of relativistic movement? So if I would move along the charges at the same speed, would I feel any type of magnetic field? And how does special relativity fit into this?

I'm tutoring high school students. I've always taught them that:     A charged particle moving without acceleration produces an electric as well as a magnetic field.   It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts moving, it starts producing a magnetic field. Why? What happens to it when it starts moving? What makes it produce a magnetic field when it starts moving?


I have a script like this:  mkdir "$test"   If $test is empty, as with nothing then touch will complain with this:  touch: cannot touch '': No such file or directory   If I remove the " then I get the behavior I'm expecting mkdir: missing operand.  The issue is If I ever have filenames with spaces in $test it will break my script. I need to do it in a way that $test can be empty or have spaces in it, and do not mess with my command either way.   In my real script the command line I'm using should just ignore $test if it's empty like it happens when not quoted, but need to work with spaces too. The issue is this '' stuff that appears in my command line.

Say I have a script doing:  some-command "$var1" "$var2" ...   And, in the event that var1 is empty, I'd rather that it be replaced with nothing instead of the empty string, so that the command executed is:  some-command "$var2" ...   and not:  some-command '' "$var2" ...   Is there a simpler way than testing the variable and conditionally including it?  if [ -n "$1" ]; then     some-command "$var1" "$var2" ...     # or some variant using arrays to build the command     # args+=("$var1") else     some-command "$var2" ... fi   Is there a parameter substitution than can expand to nothing in bash, zsh, or the like? I might still want to use globbing in the rest of the arguments, so disabling that and unquoting the variable is not an option.


I'm trying to calculate the sum of some numbers in my document. I want to allow non-integer values, so I'm using lengths, which works just fine.  In my document it's often necessary to specify the values for adding to the sum from inside an environment. I learned that the \global command does the trick.  However, I encountered the problem that the \global command seems to not work properly when the xifthen package is loaded, either directly or by another package.  Here's an example:  \documentclass{article} \usepackage{xifthen} \makeatletter \newcommand*{\getlength}[1]{\strip@pt#1} \makeatother  \begin{document} \newlength{\mylength} \setlength{\mylength}{0pt} \getlength{\mylength} {     \addtolength{\mylength}{0.5pt}     \getlength{\mylength} } \getlength{\mylength} {     \global\addtolength{\mylength}{0.5pt}     \getlength{\mylength} } \getlength{\mylength} \end{document}   The output is:  0 0.5 0 0.5 0   Removing the xifthen package produces the expected output:  0 0.5 0 0.5 0.5   Is there any workaround to produce the second output, without having to ensure that no package which uses xifthen is loaded?

I am trying to save a minipage width and height in one environment, and use these dimensions in a subsequent environment of mine, to make a picture environment. The idea is to create a picture on the right of the minipage using the rest of the \columnwidth, and with the same height as the minipage on the left. The problem is, as far as I understand, that neither the lengths nor the \savebox'es set within the first environment survive to the next one, as they are subject to scoping rules of LaTeX.  So my question is, how can save dimensions (or the box) in one environment and use them in another?  Update: here is (non-working) example using \global:  \documentclass{article} \usepackage{calc} \usepackage{picture}  \newsavebox{\questiontextbox} \newsavebox{\questionpicturebox} \newlength{\questiontextheight}  \newenvironment{questiontext}[1]% {\begin{lrbox}{\questiontextbox}% \begin{minipage}[t]{#1}}% {\end{minipage}\end{lrbox}% \noindent\usebox{\questiontextbox}% \settoheight{\questiontextheight}{\usebox{\questiontextbox}}% **** \global\setlength{\questiontextheight}{\questiontextheight}}  \newenvironment{questionpicture}[1]% {\begin{lrbox}{\questionpicturebox}% \setlength{\unitlength}{1cm}% \begin{picture}(#1-\fboxsep-\fboxsep,\questiontextheight)}% {\end{picture}\end{lrbox}% \fbox{\raisebox{-\questiontextheight}{\usebox{\questionpicturebox}}}}  \begin{document} \begin{questiontext}{0.2\columnwidth} There must be some text here so I made it up to fill more than just a single line. \end{questiontext}% \begin{questionpicture}{0.8\columnwidth} \put(0.5,0.5){\circle{0.4}} \end{questionpicture}  \end{document}   The \fbox is there only to visualize that the picture height is only two \fboxsep's. I tried to put \global before \settoheight in the line marked with ****, which does not work, either. No idea what I am doing wrong; could the packages calc or picture (which is needed to use real dimensions) prevent proper \global behaviour?


I've discovered (via looking at mod_pagespeed cache entries) that a completely random domain I've never heard of before is resolving to my website.  If I visit this domain, my website loads. The DNS for that domain is pointing to my server's IP.  Right now in my vhost config I have *:80, which I'm guessing is where I'm going wrong.  I immediately changed this to example.com:80 where example.com is my domain. Assuming this would mean the server would only respond to and fulfil requests for my domain name, rather than any request on port 80.  My original vhost config;  <VirtualHost *:80>     DocumentRoot "/var/www/example.com"     <Directory "/var/www/example.com">         Order allow,deny         Allow from all         Allowoverride all     </Directory> </VirtualHost>   My new tried config;  Listen 80 ServerName example.com  <VirtualHost example.com:80>     DocumentRoot "/var/www/example.com"     <Directory "/var/www/example.com">         Order allow,deny         Allow from all         Allowoverride all     </Directory> </VirtualHost>   When I tried to restart apache with the new config I got the following error:   * Restarting web server apache2 [Fri Mar 28  08:55:47.821904 2014] [core:error] [pid 5555] (EAI 2)Name or service not known: AH00549: Failed to resolve server name for 152.155.254.241 (check DNS) -- or specify an explicit ServerName (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80   Note: The IP beginning 152 in the above error has been slightly edited, but the original wasn't my server's IP address anyway.  Can anyone offer advice on this issue? Is the domain (actually there's a couple) that is resolving to my website innocently just the previous user of the dedicated server, whose DNS is just still pointing to it? How can I resolve the apache virtual host config issue, and any other advice is welcome.  Thanks.

For the sake of discussion, pretend that I have an Apache webserver which serves a website at www.example.org. This domain name resolves to the public IP address at 192.168.1.100 (pretend this is a public IP).  The discussion at  demonstrates that anyone can point their domain at my IP. Apache won't prevent this by default, but an administrator can deal with these one at a time through use of a blacklist.  However, it's becoming more common for scammers to register dozens of domains (or more) for use in a scam. I'm concerned about the following possible attack:   A scammer registers hundreds of domain names, and points them at my dedicated IP address. The scammer directs search engines at their scam domains, thus using my content to increase their standing in the search engines. Later, the scammer moves their domain names to point to their own servers which host a scam/porn, or a competing business, etc. thereby reaping the benefits of their standing in the search engines. Some of these domains might be used to in  as well. Profit!!   I believe I have seen scammers using this trick in the past, involving dozens of domains. We didn't realize the scam implications at the time, and assumed these were misconfigured domains.  Is there a term for this nefarious SEO trick? SEO masquerading? DNS Diversion?  How could I prevent this using Apache? I'm considering a "whitelist" fix based on using a default VirtualHosts, ServerNames & ServerAliases so that Apache only responds to requests where these white-listed ServerNames appear in the "Host: " header. Everything else would be rejected (or redirected to a particular page). However, I am unsure if this is the best approach.  For example, I've configured the domain  to point at the IP for Serverfault.com. You can see the results here:  .


I have existing Apple ID but when I tried to log in itunes, clicking None as payment, I still can't proceed even if I click 'Next'

Ever since adding an iTunes gift card to my account, I'm getting verification requests like crazy. I can't even download free apps. It takes me to my payment info and when I try to select none, I continually get a message under the payment info that says "you must verify your payment info to continue"  I don't want a credit card on file and would really like the none option to work. My ID shows I still have iTunes credit.


So in a hook hook_commerce_cart_order_refresh() I make some calculations that I would later like to use in a different hook hook_form_alter, how can I pass these data/object and use later on?  In that first hook, I have a EntityMetadataWrapper but it seems I can only give it data that actually is persisted, and mine should only exist for the request.  Again, I could use $_SESSION but that storage is used for persistent storage through multiple requests. And I'm not looking for that.  Any suggestions?

How do I pass data between hooks that don't interact between them, or between a menu callback and a hook?  In the case the two hooks have a parameter in common, and that parameter is passed by reference, that is easy. What do I do when the hooks, or the menu callback and the hook, don't get a common parameter?


I've faced this issue in the earlier Ubuntu's versions and was able to install libpng12.so.0 without any problem.   But in the latest Ubuntu 19.04 I cannot install it...  What I have tried:   Download and installed it locally  wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb && dpkg -i /tmp/libpng12.deb   && rm /tmp/libpng12.deb  Created a symlink  ln -s /usr/lib/x86_64-linux-gnu/libpng16.so.16 /usr/lib/x86_64-linux-gnu/libpng12.so.0  Added new repository and installed via apt  echo “deb http://mirrors.kernel.org/ubuntu/ xenial main” >> /etc/apt/sources.list apt update apt install libpng12-0    All these workarounds don't work.  Could someone help me to solve this issue?

I have tried to install libpng12-0 but it still doesn't work.  Here:    How do I fix this?


I have found the following example: #include <stdio.h>     // Space optimized representation of the date  struct date {      // d has value between 1 and 31, so 5 bits      // are sufficient      unsigned int d : 5;         // m has value between 1 and 12, so 4 bits      // are sufficient      unsigned int m : 4;         unsigned int y;  };     int main()  {      printf("Size of date is %lu bytes\n", sizeof(struct date));      struct date dt = { 31, 12, 2014 };      printf("Date is %d/%d/%d", dt.d, dt.m, dt.y);      return 0;  }   The results are Size of date is 8 bytes Date is 31/12/2014  I cant understand the first result. Why is it 8 bytes? My thoughts: y is 4 bytes, d is 5 bits and m is 4 bits. The total is 4 bytes and 9 bits. 1 byte is 8 bits, then the total is 41 bits.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I need to estimate this integration $\int_{0}^{1}\frac{1}{x}dx$. Is possible to estimate ?

Is it possible to evaluate this improper integral? If not then how should I answer?? $$ \int_{0}^1 \frac1x dx $$


I was wondering exactly why a ray of light changes direction when moving from one optical medium to another. I need a conceptual explanation of the above statement or why the Snell's Law is valid. I found some online explanations where the ray of light is considered analogous to a group of soldiers, swimmers, etc. This is perplexing as we know that light behaves as a wave when undergoing refraction, not as particles. I know that the frequency of the light ray remains constant while its speed and wavelength are varying. I request someone to please clarify this for me and provide a rigorous logical explanation of why exactly the light ray deviates or undergoes a change in angle. Why the ray of light undergoes a change in wavelength and how this affects other properties.

I'm a high school teacher trying to teach my students (15year olds) about refraction. I've seen a lot of good analogies to explain why the light changes direction, like the marching band analogy, that the light "choose" the fastest way etcetc, and for most of my students these are satisfying ways to explain the phenomenon. Some students, however, are able to understand a more precise and physically correct answer, but I can't seem to find a good explanation of why the lightwaves actually changes direction.   So what I'm looking for is an actual explanation, without analogies, of how an increase/decrease in the speed of a lightwave cause it to change direction.   Thanks a lot


Function IsVarArrayEmpty(anArray As Variant)  Dim i As Integer  On Error Resume Next     i = UBound(anArray, 1) If Err.Number = 0 Then     IsVarArrayEmpty = False Else     IsVarArrayEmpty = True End If  End Function   It is returning true for uninitialized and false for initialized. I want to see if it has any data/content. However, the problem is I feel the above code is returning false even when there is no data in the array. How do I check that?   (I tried setting string s equal to the byte array. That was "". That means the array is empty, right?)

I want to check for empty arrays. Google gave me varied solutions but nothing worked. Maybe I am not applying them correctly.  Function GetBoiler(ByVal sFile As String) As String 'Email Signature     Dim fso As Object     Dim ts As Object     Set fso = CreateObject("Scripting.FileSystemObject")     Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)     GetBoiler = ts.ReadAll     ts.Close End Function  Dim FileNamesList As Variant, i As Integer ' activate the desired startfolder for the filesearch FileNamesList = CreateFileList("*.*", False) ' Returns File names ' performs the filesearch, includes any subfolders ' present the result ' If there are Signatures then populate SigString Range("A:A").ClearContents For i = 1 To UBound(FileNamesList)     Cells(i + 1, 1).Formula = FileNamesList(i) Next i  SigString = FileNamesList(3)  If Dir(SigString) <> "" Then     Signature = GetBoiler(SigString) Else     Signature = "" End If   Here if FileNamesList array is empty, GetBoiler(SigString) should not get called at all. When FileNamesList array is empty, SigString is also empty and this calls GetBoiler() function with empty string. I get an error at line   Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)   since sFile is empty. Any way to avoid that?


Ubuntu Tweak doesn't seem to give me this capability, I can change theme stuff but those buttons are fixed on the left side

Downloaded Ubuntu tweak and set window controls to the right side. Only some programs follow the rule. Pidgin as an example has window controls on the right. But Chrome, Thunderbird, Geany, still have controls on the left.  How can I move ALL window controls(close/min/max) to the right (or left)?


Let's say I have a spreadsheet with ten rows (numbered 1 to 10) and ten columns  (represented alphabetically A through J). Here's what I'm trying to do:  Firstly, I want a given row to be painted green entirely whenever the following conditions are met within the cells of that row:   Cell E has the value "ALPHA"   AND    Cell F has the value "BETA"   AND   Cell G has the values "GAMMA" OR "DELTA"   Furthermore, I want blank cells to remain white, meaning that the coloring should be applied exclusively to cells that have any values (whatsoever) in them.  Finally, I want that this conditional formatting would be applied to my ENTIRE spreadsheet, and will continue to be applied automatically as I go and expand my spreadsheet with new columns and rows.  The question is: how do I achieve this?  EDIT: I believe my question is different than the one it was marked a duplicate of. While the other question revolves around the coloring of a CELL based on the value of ANOTHER cell, what I'm trying to do is to color whole rows based on the presence of certain values in different cells, with some added complexities such as varying values within a cell that match the same rule; different coloring for different rules; and leaving blank cells white even if they belong to a painted row.  And also, there's no mention in that question of how to apply the rules automatically to an expanding sheet as new rows and columns are added.       Thanks in advance.

I want to change the fill color of cell C5 if it has the same value as cell A5.   Can this be done? I know how to format cell C5 if it has a certain value - but not when it is to be compared to the value of another cell.


Say I have a dataObject, who has a getChildren() function which returns a collection, but for whatever reason is a slow process that I want to avoid. I then want to iterate over said collection. For the sake of this getChildren() will return an empty collection when it has no children, not null.  Can I get away with doing:  for(dataObject child : parent.getChildren()){ ... }   or is that going to call getChildren() each loop, meaning that to avoid that costly call each time, I need to instead do:  Collection<dataObject> children = parent.getChildren(); for(dataObject child : children){ ... }   This could also cause problems if I the parent returns a different collection, for instance if a child was added/removed, and I was wanting to look at a snapshot of the children at that moment (let's gloss over other issues with that).  I suspect that the first version is indeed fine, as the for loop would get an iterator for the collection when it starts and just refer to that iterator, but it's something I've never confirmed.

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


Having two or more widgets, I am facing a problem where only the last updated instance of a widget is clickable.  I can refresh any widget with the refresh button, not open SE app by tapping the question.   Can be simulated by refreshing one widget and clicking the question on the second one. The SE app will not open.   Happens on various versions of Android (4.4, 5, 6.0.1) and various launchers, so it's not only a problem with my device

I have 4 copies of the Hot Questions widgets.  Sometimes, possibly after they reload on their own, I can only tap to open the last widget I added. If I tap on the question of any others nothing happens.  If I refresh each one then tapping works on the one I refreshed.


How could we prove the following equality?  $\int_{-\infty}^{+\infty}\mathrm{e}^{-x^2}\mathrm{d}x=\sqrt{\pi}$

How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$


to start, this is my code :      NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL                                                           URLWithString:url]];      NSData *response = [NSURLConnection sendSynchronousRequest:request                                              returningResponse:nil error:nil];      NSDictionary *publicTimeline = [NSJSONSerialization JSONObjectWithData:response       options:0 error:&jsonParsingError];      for (NSObject* key in publicTimeline) {         id value = [publicTimeline objectForKey:key];         NSLog(@"%@", key);     }   I take few news on a webservice, and i show it in a tableView.  My problem is that these news aren't show in order.  In my webservice, the news are in order, for example i have :      {"0":{"title":"News1"}}     {"1":{"title":"News2"}}     {"2":{"title":"News3"}}   etc..  but in the loop, i "loose" this order :/ And i want to have my news in this order, first the news with the index "0" after "1" etc...  (the NSDictionary seems to loose this order, for example, after my code, i have in my tableview, the news : "2", "0", "1", and not my news "0", "1", "2". )  (i tried some answers, but none seems to work in my case :( )  SOmeone to help me ? thx,

I have an NSDictionary (stored in a plist) that I'm basically using as an associative array (strings as keys and values).  I want to use the array of keys as part of my application, but I'd like them to be in a specific order (not really an order that I can write an algorithm to sort them into).  I could always store a separate array of the keys, but that seems kind of kludgey because I'd always have to update the keys of the dictionary as well as the values of the array, and make sure they always correspond.  Currently I just use [myDictionary allKeys], but obviously this returns them in an arbitrary, non-guaranteed order.  Is there a data structure in Objective-C that I'm missing?  Does anyone have any suggestions on how to more elegantly do this?


I have noticed that a link to an answer is no longer oneboxed when used in the format https://site/questions/question-id#answer-id. They are still oneboxed in the format https://site/a/answer-id. You can see some experiments with this . For example, https://meta.stackexchange.com/questions/313295/on-which-stack-exchange-do-you-get-the-quickest-answers#313296 is  while https://meta.stackexchange.com/a/313296  .   In the past, both formats used to be oneboxed. Here is . EDIT: As pointed out in  the example I linked uses the old format https://site/questions/question-id/question-title/answer-id#answer-id which has been changed recently. Still, I suppose that the links in the format provided by the SE site probably should be oneboxed. (When the links had the old format, they used to be oneboxed.)  This is probably also a reason why the question feeds when posted in chat are now displayed differently. Compare the post  and about . Both of them come . It is the feed of the question  on Mathematics meta.     Just to address the comments saying that the format which is currently non-oneboxed is non-standard (because it differs from the "share" link): This is format of the link you get in the address bar when you land on an answer on a SE site using almost any reasonable way I can imagine. (Up to some modifiers such as noredirect=1, lq=1,  rq=1, cb=1, etc.) For example, try clicking on https://meta.stackexchange.com/a/313296  If you then check the address bar, you can see the link looking like this: https://meta.stackexchange.com/questions/313295/on-which-stack-exchange-do-you-get-the-quickest-answers#313296.  Another fact which can be considered as a supporting evidence that this could be considered - at least to some extent - a standard format it the fact that this is what you got from feeds until a very recent change. Here is  of a message posted in a chatroom from question feed which has exactly this format. I suppose that there were some changes to feeds functionality, since message from the same feed posted yesterday .  (As a side note, the advantage of the format which contains both question-id and answer-id is for searching purposes. If you post it in chat or save it in a local file or do something else, you can find the link when you search for question-id and also when you search for answer-id.)

As I pointed out in , the URL scheme for full-form links to answers has changed from:  https://site/questions/question-id/question-title/answer-id#answer-id   to:  https://site/questions/question-id/question-title#answer-id   Pretty much every link that redirects to an answer, including short-form links to answers (i.e. https://site/a/answer-id) and ?lastactivity links to questions, for example, now redirect to the latter form of URL, instead of the former one. (Interestingly, the responses tab in one's own user profile still consists of hard links to the old form.)  Why was this change made? It seems to have , as those are still looking for the old form of URL. Additionally, as per Tim Stone's comment, it also seems to have .  As a test for the above, I tried manually changing the URL to the old form, and it properly oneboxed in chat and properly changed the page and scrolled down.  It also briefly affected SmokeDetector (a community project that widely affects SE sites), until I filed an issue with them and had it fixed.  Was it done because search engines were showing multiple results, since it wasn't clear to them that they were looking at the same page since the URLs to answers were technically different?


The new sticky top bar cover up the review queue buttons in the sticky top bar in review queues.   Without sticky top bar:    With sticky top bar:    Ideally the review queue bar should be still sticky, but below the other sticky bar.

With the introduction of the network-wide sticky top bar , I noticed a bug that's happening on every site (except for Stack Overflow). When you click on an answer link (of the form https://site.stackexchange.com/a/####), the very top of the answer and the upvote button are covered by the top bar:    Stack Overflow shows the correct behavior:


drwxrwxrwx  2 user1 user1 4096 Jun 21 11:25 . drwxr-xr-x 16 user1 user1 4096 Jun 21 11:25 .. -rw-r--r--  1 user1 user1   15 Jun 21 11:25 access.txt   The file access.txt is owned by user user1 but the directory has open access to the world (777).  If I log in with user2, I can delete access.txt even though user2 does not have write permissions to it. So does directory permissions take precedence over file permissions? Perhaps that not the best way to describe it, but just looking for a basic explanation here.

If I have two users called john and sally. Both are part of the users group. john creates a directory with permissions 775. sally then puts a file there with 644 permissions.  Even though the file obviously has no group write privileges. Can john then modify/delete that file in the directory he owns but the file he does not own?


So the other day I was looking at a list of hard putnam questions, as you do, and I stumbled across a problem "What is the probablity that four points chosen randomly and uniformly form a convex quadrilateral" - I quickly reduced the problem to the average area of a triangle inside a circle with the observation that if a quadrilateral is concave, one angle is over 180 degrees and so one of the points lies inside of a triangle formed by the other three. Now here is the issue, I barely know calculus with one variable, so I cant solve this as I'm pretty sure this will require a multivariable integral, so help me out pls.

Motivated by the discussion in  I tried to find an expression for the expected area of a triangle formed by three randomly chosen points inside the unit circle. I could not find one. Perhaps this is one of those problems which look easy but are difficult to solve analytically.


I want to prove that at least two vertices have the same degree in any graph (with 2 or more vertices). I do have a few graphs in mind that prove this statement correct, but how would I go about proving it (or disproving it) for ALL graphs?

Any help would be appreciated.  If $n$ is a natural number $\ge 2$ how do I prove that any graph with $n$ vertices has at least two vertices of the same degree?


I am wondering : I work in a hospital or I work in the hospital ? She works on a plane or she works on the plane ? thanks

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


I was about to install Bank-ID but got stuck with this apt-link. If I click on that link the file manager gives me the opportunity to choose a specific program to open the file.  I can't find Ubuntu Software Center by choosing "browse" and I tried to find any setting to set Ubuntu Software Center as default for apt-links. I don't even know if that's the correct way of installing this software. If anyone know any other way,  tell me.  I've been trying on my own for a while so perhaps I might have changed any settings.  I was a bit suspicious so I tried to download skype as well to see if it was possible to install any program using Ubuntu Software Center. That didn't work out.

I'm trying to locate where the Ubuntu Software Center is to choose as default for handling APT links in Firefox.  I can click on the links, and I get the pop-up, but Ubuntu Software Center is not there.  I tried to choose an application through Firefox's settings and through the pop-up, but I don't know the path.  As you can see by my screen shot for the pop-up I chose the wrong one as that doesn't work.  What is the correct path I need to select the correct file?  EDIT - I added a fourth screen shot.  I don't have it in that location.  This is what I have.  My view is in ABC order, and it's showing hidden files.


I thought it was odd that a Stormtrooper would be running around a battlefield, dodging blaster fire, with what amounts to a gigantic futuristic sword. When we first see him, I don't think he even has a blaster ( maybe he's dropped it? ), so I assumed the gigantic futuristic sword his only weapon. It raised many questions in my easily confused mind:  What was that weapon called? Why would a Stormtrooper be armed with such a large melee weapon to begin with? Was it specifically designed to duel with a lightsaber? Was that Stormtrooper trained to fight against Jedi ( he really seems to do a better job against Finn than Kylo Ren ) ?  So what was the deal with that weapon?

A  apparently had tons of stuff not shown in English ones.  One of the most intriguing pieces for me was a scene where      ... Finn ...   armed with a lightsaber fights a stormtrooper armed with some sort of weird weapon - which Blocks the lightsaber!.    What is that weapon and how does it manage to block?  UPDATE: found an animated GIF of the fight. I hope nobody gets a headache, sorry in advance:


Our Windows domain provides a wallpaper image via group policy. The image file is accessible through a network path. If there is no network connection during client computer boot, the wallpaper will be black, because Windows couldn't access it. This sometimes happens if you use Wi-Fi connection and always with VPN. Unfortunately Windows doesn't automatically try to load it again as soon as there the network connection is established. How can I force Windows to reload the background image?

If I manually change the background image in the registry, how can I force it to refresh without logging off?  I know that  does it, but I would like to keep things simple and not use any software.


There are two divs. I want second div to occupy the remaining space. Currently it is occupying 100% height but it should take only remaining space.    html, body {   height: 100%;   width: 100%; }  .header {   background-color: blue;   color: red;   font-size: 50px; }  .content {   background-color: red;   height: 100%;   width: 100%; } <!DOCTYPE html>     <meta charset="utf-8">   <meta name="viewport" content="width=device-width">   <title>JS Bin</title>
Header

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


As my textbook stated we use a convex lens of small focal length $f$ to keep an object at a distance such that the image is produced at a distance $D$ (our least distant clear vision point is around $25\ {\rm cm}$). Then the magnification that comes assuming non-marginal rays is $1 + \frac{D}{f}$. Why can't we keep reducing $f$ in order to get more magnification? Why is there a limit to which a simple microscope magnification?

Optical microscopes are quoted as having a maximum magnification of 1500x to 2000x - what is this calculated from?


When I create a variable and wrap the code in a while loop it never repeats. Here's a sample of code I tried it on.  String repeat = "y";     Scanner keyboard = new Scanner(System.in);     while (repeat == "y"){         String word1 = "this";         String word2 = "that";         String word3 = word1 + word2;         System.out.println(word3);         for(int x = 10; x<20; x = x+1){              word3 = word1 + word3;             System.out.println(word3);         }         repeat = keyboard.nextLine();     }   No matter what the input is in the end of the script, it just ends. Any help?

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


I have created a method which takes data from SQLite and displays in a textview but when l press a button show the app crashes. The Code:  public void ViewData(){     btnControler.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             Cursor data = peopleDB.showData();             if (data.getCount() == 0) {                 display("","");                 return;             }             StringBuffer buffer = new StringBuffer();             StringBuffer buffer2 = new StringBuffer();             while (data.moveToNext()) {                 display(buffer.append("Name:\t " + data.getString(1) + "\n").toString(),buffer2.append("Email:\t " + data.getString(2) + "\n").toString());              }         }     }); }  public void display(String name, String email){     TVusername.append(name);     rphone.append(email); }   The error is appointed to the fifth line Cursor data = peopleDB.showData();  05-25 23:37:03.439 916-916/info.devexchanges.googlelocation E/AndroidRuntime: FATAL EXCEPTION: main                                                                               Process: info.devexchanges.googlelocation, PID: 916                                                                               java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor info.devexchanges.googlelocation.DatabaseHelper.showData()' on a null object reference                                                                                at info.devexchanges.googlelocation.LocationActivity$5.onClick(LocationActivity.java:473)                                                                                at android.view.View.performClick(View.java:5184)                                                                                at android.view.View$PerformClick.run(View.java:20910)                                                                                at android.os.Handler.handleCallback(Handler.java:739)                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                at android.os.Looper.loop(Looper.java:145)                                                                                at android.app.ActivityThread.main(ActivityThread.java:5951)                                                                                at java.lang.reflect.Method.invoke(Native Method)                                                                                at java.lang.reflect.Method.invoke(Method.java:372)                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

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


Is it ok to supply 24 volts from the power supply with output 24 v 10 Amps to my sensor which voltage supply range+Vs is 12-30 V and current consumption (max) is 35mA, will current output from the power supply (10A) will destroy my sensor ??

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


For this question, I know how to do the base case and the inductive hypothesis but I'm having trouble with the inductive step. Here is what I have so far. Can anyone please help me out?  Prove by induction that for all integers $n\ge2$   $\sqrt n < \sum_{i=1}^n \frac{1}{\sqrt n }$  Base Case:  n = 2  $\sqrt 2 < 1 + \frac{1}{\sqrt 2}$  Inductive Hypothesis:  Let k be an arbitrary integer such that $k\ge2$  $\sqrt k < \sum_{i=1}^k \frac{1}{\sqrt n }$  Inductive Step:  Show true for k+1  $\sqrt{k+1} < \sum_{i=1}^{k+1} \frac{1}{\sqrt n }$

Proove by the Complete Induction for every $n\in \mathbb{N}, n \geq 1$ $$\frac{1}{\sqrt{1}} + \frac{1}{\sqrt{2}} + \frac{1}{\sqrt{3}} + ... + \frac{1}{\sqrt{n}} > \sqrt{n}$$.  I know only the basis - $\frac{1}{\sqrt{1}} \geq \sqrt{1}$.  But, I dont know how to do the change from the regular induction to the induction of Set theroy(Complete Induction).


Before closing it as a dupe of . Please go through the question once . Is it theoretically possible that quarks make up an electron ( like you may get a particle with the same electronic charge $(-e)$  with three down quarks however the binding energy for that down quarks triplet should be a great number since Dr jh pointed out that the mass of even a single down quark is greater than that of an electron) ?   According to , the mass of a down quark is approximately $4.8\; MeV$ . So after converting it into $kg's$ and multiplying by $3$ (since I considered three down quarks) , I got roughly $(256 × 10^{-31})kg$ . So the difference in the mass of an electron and three down quarks can be calculated (which is roughly $28 \; Times\; of \;mass\; of\; electron)$ and this serves as our binding energy . So , $E = (247) (9 × 10^{16}) J$.   Have the particle accelerators reached this energy level (since I have heard that the maximum number they reached is $7 \; TeV$) ? I don't know. And  Can this huge energy requirement be the reasons why we can't break down an electron ? Or am I misinterpreting something here ?

When we first discovered the proton and neutron, I'm sure scientists didn't think that it was made up of quark arrangements, but then we figured they could be and experiments proved that they were.  So, what is it about the electron that leads us to believe that it isn't a composite particle? What evidence do we have to suggest that it it isn't?


When thinking about a submarine (or fish, or anything).  Is the object under the sea or in the sea. To my mind it is in the sea, as being under something suggests exactly that.    A boat can be said to be 'in the sea', but according to a lot of comments on another question here, that would mean that the boat has sunk beneath the surface of the water (not a good place for a boat to be!).

Why is it OK to refer to things in the sea as being "under the sea"? Wouldn't that really be the sea floor and below?


Windows Security has quarantined a text file containing important information. That happened less that 30 days ago, but I cannot see any files in the Windows Security Protection History ("no recent actions"). It seems that the file I need is in the folder C:\ProgramData\Microsoft\Windows Defender\Quarantine\ResourceData\CD and is named CDE7887F857F55D6C99909E0D63CF26C687DCE80 I tried the procedure of restoring a file as described on docs.microsoft.com “%ProgramFiles%\Windows Defender\MpCmdRun.exe” –Restore –Name EUS:Win32/CustomEnterpriseBlock –All The result was "no quarantined files". But I still see the file in the folder C:\ProgramData\Microsoft\Windows Defender\Quarantine\ResourceData\CD Is there any way to restore it? Thank you!

tl;dr: Is there a way to batch-view + restore items that have been quarantined by Windows (10) Defender?  In Windows 10, to restore a quarantined file from Windows Defender -- which silently whisks files away into quarantine, willy-nilly, with no indication or heads-up about it -- requires an absurd number of clicks:    Click Start button Type Virus (Protection) and click/enter Click "Threat history" Click (the wholly unnecessary) drop-down arrow on an individual threat (...look at all the open unused space to the right -- display the "extra" info and shift the buttons over there, no drop-down necessary!) Click "See details" Click "Yes" to UAC prompt Now finally able see the filename this threat pertains to (...why isn't the filename the default piece of information shown?! And that's assuming only one piece of info can be shown upfront per entry, which is nonsensical) Click "OK" on the popup modal Click "Restore" button Click "Yes" to UAC prompt (again)   ...one quarantined file down. High-fii-ive!  I was hoping that NirSoft, i.e. the hero that Gotham needs, may have come to the rescue with a utility that could connect into the Windows Defender backend to display all threat + quarantine information for everything all at once, in tabular format, and, if possible, the spectacular ability to batch-select items and restore (or delete) them all at once, vs. the savage click-fest necessitated via Windows 10's "Control-Settings-Control-Panel" ...and for every individual item. But unfortunately, to no avail (bless his freedom-fighting heart nonetheless, however).  It goes without saying, but this is just one drop in an oceanic-sized bucket of my Windows 10 design gripes. Help us Obi-Win7-Kenobi. You're our only hope.


I downloaded tor-browser from official website ().  Following instructions on the official website, I entered a command but I cannot install it.  $ tar -xvJf tor-browser-linux64-6.5.1_en-US.tar.xz bzip2: (stdin) is not a bzip2 file. tar: Child returned status 2 tar: Error is not recoverable: exiting now     I do not want to install by adding the webupd8 PPA.  Please follow the official website and tell me how to install.

In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu?


I wish to show that given $a,b,c \in \mathbb{R}$, the following holds:  $|a - c| \leq |a-b| + |b-c|$  Using the definition $| x |  = \max\{x, -x\}$  I can't seem to be able to show that  $|a - c| \leq |a-b| + |b-c| \Rightarrow \max\{(a - c), -(a - c)\} \leq \max\{(a - b), -(a - b)\} + \max\{(b-c), -(b-c)\}$  Is there a trick to show that this can be satisfied? Is there a workaround?

I understand intuitively that this is true, but I'm embarrassed to say I'm having a hard time constructing a rigorous proof that $|a+b| \leq |a|+|b|$. Any help would be appreciated :)


I am seeing some of the threads like this which are not fully resolved/closed. I am getting this .  and want to install Ubuntu on this PCIe NVME SSD like .  I am okay for a slow boot of bootloader but once I am linux...it's all faster PCIe NVME SSD.  Any suggestions/pointers?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am trying to capture mysql traffic and pass those traffic to strings command as follows:  tcpdump -i any -s 0 -l -w - dst port 3306 | strings   This is working as expected and printing all mysql queries like  select * from mytables show databases   But when i am trying to redirect the output to a file, its not printing the output to /tmp/out file:  tcpdump -i any -s 0 -l -w - dst port 3306 | strings > /tmp/out   Can someone explain me the behaviour of above command and why it is not redirecting the output to file.

I have a script which calls two commands:  long_running_command | print_progress   The long_running_command prints progress but I'm unhappy with it. I'm using print_progress to make it nicer (namely, I print the progress in a single line).  The problem: Connection a pipe to stdout also activates a 4K buffer, so the nice print program gets nothing ... nothing ... nothing ... a whole lot ... :)  How can I disable the 4K buffer for the long_running_command (no, I do not have the source)?


I was given the proposition, ∃x,y ∈ R, x is irrational and y is irrational and x+y is rational To prove this, I first converted it into an if statement since it would make it easier to prove. I got, If -(∃x,y ∈ R, if X and y are irrational then X + y is irrational). From what I know, if I prove that the statement inside the brackets is false, by negating it, it would prove that the original proposition is true. However, I can't think of a way to prove this. Can someone help me out?

My homework has this problem:     Prove that there exist irrational numbers $x$ and $y$ such that $x +  y$ is rational.   There is an easy solution that I found on mathbitsnotebook.com:     \begin{align} \left(2+6\sqrt{7}\right) + \left(-6\sqrt{7}\right) = 2.\end{align}   Can we prove the same without using subtraction?


While cleaning up our storage room I saw my dad's old bike collecting dust on a corner (he used to bike a lot before) so I asked him if I can have it and he said yes.    So for my question can I transform this bike into a commuter or am I better-off selling it and buying a new commuter bike? Though I really like to keep this one for some sentimental reasons rather than to sell it.   My budget is also limited, still finishing my college degree. I'll be using this going to my university and back, though I live in the city our roads/bicycle lanes here in Manila, Philippines are terrible.

I just moved from where there wasn't much of a biking system infrastructure.  There were lots of trails though, so I bought an OK mountain bike ($350).  Now, I've moved to downtown Seattle and everyone bikes.  I'd love to get into it but not sure if a mountain bike is efficient for road-use.  Should I look into a conversion kit?  Should I just get a road bike and have one off-road and one on-road?


I want to add an argument to bash alias script so that i can just run  alias -p l='ls -l'   and it would get added to my .zshrc permenantly. But i am unable to locate the shell script for alias.  I tried whereis alias, but with no luck. even man alias shows alias has no entry.  I looked in /usr/bin, /usr/share/local/bin but with no luck. Can anyone pointout the location?  EDIT: I have also tried looking in all possible paths by ls $(echo $PATH| tr ':' '\n') | grep alias

Suppose I want a bash command to do something extra.  As a simple example, imagine I just want it to echo "123" before running.  One simply way to do this would be to alias the command.  Since we still need the original, we can just refer to it by its exact path, which we can find using which.  For example:  $ which rm /bin/rm $ echo "alias rm='echo 123 && /bin/rm'" >> .bashrc   This was easy because I was able to look up the path to rm using which.  However, I am trying to do this with exit, and which doesn't seem to know anything about it.  $ which exit $ echo $? 1   The command did not output a path, and in fact it returned a non-zero exit code, which which does when a command is not in $PATH.  I thought maybe it's a function, but apparently that's not the case either:  $ typeset -F | grep exit $ echo $? 1   So the exit command is not defined anywhere as a function or as a command in $PATH, and yet, when I type exit, it closes the terminal.  So it clearly is defined somewhere but I can't figure out where.  Where is it defined, and how can I call to it explicitly?


We want to set up DB server in cloud hosting for MS SQL Server Express edition - OLTP workload for "just" 6 concurent users - mostly short and small transactions.   Hosting company is charging each 1Ghz of CPU. Concerning CPU configuration, would you go 1 x 2Ghz or 2 x 1Ghz (logical cores in VM)?  Similar question is answered here:   My question is a bit different / specific in a way I'm choosing between just one core with higher speed or two with lower speed. So the scale is far different.

We are beginning to provision a set of physical servers for a virtual cluster of SQL Server 2016 nodes within VMware. We will be utilizing Enterprise Edition licenses.  We plan on setting up 6 nodes, but there is a bit of a debate on what the ideal way to provision the physical servers with regards to CPU clock speed versus CPU core count.  I know this is largely dependent on transaction volume and number of databases stored among other software-specific factors, but is there a general rule of thumb that is advised?  For instance, is a dual 8-core, 3.2 GHz physical server (16 cores) more preferential to a dual 16-core, 2.6 GHz server (32 cores)?  Has anyone come across a white paper that further delves into this type of topic?


I have added this code in App.Xaml.cs in my application that I have written to only start it once, unfortunately unsuccessful. tried mitbMutax but there may be other better solutions do you have another solution or what am I doing wrong? using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Drawing; using System.Linq; using System.Threading.Tasks; using System.Threading; using System.Windows;    namespace TimeRecorderPro {     /// <summary>     /// Interaktionslogik für "App.xaml"     /// </summary>     ///         public partial class App : Application     {         private Mutex mutex = null;         //protected override void OnStartup(StartupEventArgs e)                      protected override void OnStartup(StartupEventArgs e)         {             bool createdNew;             //Mutex mit eindeutigem Namen (bspw. GUID)             mutex = new Mutex(true, "77aca664-ba25-4964-bc05-d7ba57030720", out createdNew);             if(!mutex.WaitOne(TimeSpan.Zero, true))              //Prüfung, ob Mutex schon länger aktiv ist..             //if (mutex.WaitOne(TimeSpan.Zero, true))             {                 //Mutex ist gerade gestartet..                 base.OnStartup(e);             }             else             {                 //Mutex läuft bereits längere Zeit..                 MessageBox.Show("Anwendung läuft bereits!");                 //Anwendung beenden                 Environment.Exit(0);             }          }     } }

Using C# and WPF under .NET (rather than  or console), what is the correct way to create an application that can only be run as a single instance?  I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.  The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed.


E.coli divides in 20 minutes and its DNA replicates in 38 minutes .Kindly explain.

The E. coli has a genome with approximately 5×106 bp. The main DNA polymerase involved in its chromosome duplication (DNA pol III , the one with highest processivity) can polymerize ~103 nucleotides per second. By a simple calculation, we would conclude that the whole chromosome duplication would take ~ 5000 seconds ( about 80 minutes, so more than an hour). The whole cell duplication would probably take much more than that, considering not only DNA Pol III is involved. However, in optimal conditions, E. coli can actually duplicate in ~30 minutes. How could that be possible?  OBS.: all the numbers used here are aproximate, but sufficient to account for the correct orders of magnitude.


This question is a follow on from   I am trying to produce diagrams like those in the picture below. In particular, the top part of this style of diagram (above the word "everyone") I have tried to reproduce. I came up with this:  \documentclass[11pt]{beamer}     \usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, amsfonts, braket}     \usepackage{subfig}     \usetheme{Madrid}      \usepackage{empheq}     \usepackage{multicol}      \begin{document}      \begin{frame}  \[     \left(     \begin{array}{c|c}       A & B\\       \hline       A & B\\       \hline        C      \end{array}     \right)   \]  \end{frame}  \end{document}   However, as you can see, the letter C does not occur below the vertical line, and the vertical line extends too far. How can I rectify this?    Edit:  In response to comments below, I would say first that my question is worth asking, since the format of the particular diagrams I was asking about are somewhat different from the format of the diagrams  in . Moreover, it is not transparent for a beginner user of Latex, how one might adapt the information in that question to produce diagrams of the form I wish to produce.  In any case, even if that question is relevant to my question, I still have an additional problem, not mentioned in  below to my question. This was the suggestion that I use \multicolumn{2}{c}{C}. Doing this I managed to produce:  \documentclass[11pt]{beamer}     \usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx,     amsfonts, braket}     \usepackage{subfig}     \usetheme{Madrid}      \usepackage{empheq}     \usepackage{multicol}      \begin{document}      \begin{frame}    \[     \begin{array}{clc}  A & B\\   \hline   A & B\\   \hline  \multicolumn{2}{c}{C}   \end{array} \]  \end{frame}  \end{document}   However, note that the vertical line of the diagram disappears. How can I insert the vertical line?


Can you show me how can I make a schematic to convert signal voltage from sensor to ADC module of DSP.  Sensor : -4 to 4 voltage DSP ADC: 0 to 3.3 voltage.  Thank you,

I have a joystick that puts out analog voltage somewhere between 1.5V and 3.5V.  I want to transform this range of voltage to control a motor controller that takes analog voltage between 0V and 5V.  How do I level shift and amplify properly?


I just tried to compile a document and got this message:  This command requires ‘kpsewhich’ which wasn’t found on your system.  The following locations were searched:  • /usr/bin  • /bin  • /usr/sbin  • /sbin  • ~/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin  • /usr/local/bin  If ‘kpsewhich’ is installed elsewhere then you need to set PATH in Preferences → Variables to include the folder in which it can be found.   I've been away and haven't really used TeX in a while; I think there were upgrades to TextMate and possibly TeXLive before I left town, but I don't remember.  Following the TexLive documentation, I created a new texmf.cnf file, placed it in /usr/local/texlive/texmf-local/web2c, and tried to run sudo -H mktexlsr, only to be told command not found. Now I'm stumped. How can that command not be found? What is the remedy?

Last night, I migrated my MacBook's operating system from 10.10 "Yosemite" to 10.11 "El Capitan". Everything seemed to go smoothly. Happily, regarding my TeX-related work, I am able to use the GUI front ends "TeXworks" and "TeXshop" just fine since completing the OS upgrade. I use MacTeX2015, with all the latest updates installed.  Oddly, though, since completing the upgrade I can no longer run any MacTeX command-line utilities such as texdoc and kpsewhich. (Actually, as I just discovered, I can no longer run pdflatex either from a command line. However, I never do run pdflatex from a command line prompt, so that's not an urgent problem for me -- at least not for now.)  The suggestions given in the posting  do not seem to be applicable to this case, as they all seem to revolve around setting up /usr/texbin correctly -- /usr/texbin is no longer allowed under MacOSX 10.11. The document  by Herb Schulz deals in depth with adjusting settings in the GUI front ends, but it appears not to touch on what to do about /usr/texbin, which appears to be the now-missing link to TeX's command line utilities.   Pointers and solutions most welcome!


A few days back I had 997 on StackOverflow, that same day it dropped to something 978 without any negative feedback.  It stayed at that level the rest of the day although I was getting +1's.  Then that evening it suddenly jumped to 1084.  And not it's stuck again at 1084.  What can be going on here?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


Is there any standard method to prove that an arbitrary $f:\mathbb{R}^{2}\mapsto\mathbb{R}$ function is continuous in a given $\left(x_{0},y_{0}\right)$ point? If I consider the definition of continuity  in the case of $f:\mathbb{R}\mapsto\mathbb{R}$, then I take the limits of $f(x)$ from the left and from the right side in $x_0$. If $$\lim_{x\rightarrow x_{0}-}f\left(x\right)=\lim_{x\rightarrow x_{0}+}f\left(x\right)=f\left(x_{0}\right),$$ then I say $f$ is continuous in $x_0$, but I can't do this in $\mathbb{R}^{2}$ because there are infinity possibilities to approach $\left(x_{0},y_{0}\right)$. (In the case of $f:\mathbb{R}\mapsto\mathbb{R}$ there are only two ways to approach $x_0$: from the right and from the left.) What can I do in $\mathbb{R}^{2}$ or more generally in  $\mathbb{R}^{n}$? It is much easier to prove something is not continuous, because if I find at least one case when $$\lim_{\left(x,y\right)\rightarrow\left(x_{0},y_{0}\right)}f\left(x,y\right)\neq f\left(x_{0},y_{0}\right)$$ happens, then I can say $f$ is not continuous in  $\left(x_{0},y_{0}\right)$, but it is not the question just a remark. If there is no standard method then can you say any trick what could be useful here?

Do we rely on certain intuition or is there an unofficial general crude checklist I should follow?  I had a friend telling me that if the sum of the powers on the numerator is smaller then the denominator, there is a higher chance that it may not exists. And if the sum of powers on the numerator is higher then the denominator, most likely, it exists. Also if there is a sin or cos or e-constant, it most likely exists.  How can I know what to do at the first glance given so little time exists for me in exam to ponder? If I spend all my time on figuring out a two-path test when the limit exists, that would be a huge disaster. Is this one of those cases where practice makes perfect? Example: $$\lim_{(x,y)\to(0,0)}\frac{(\sin^2x)(e^y-1)}{x^2+3y^2}$$ Please give me a hint and where do you get the hint. Example: $$\lim_{(x,y)\to(0,0)}\exp\left(-\frac{x^2+y^2}{4x^4+y^6}\right)$$ I need a hint for this too.  Common methods I have learnt for reference: Two-Path test, Polar Coordinates, Spherical Coordinates, Mean Value Theorem using inequalities.