I want to return few values from method:  unsigned long long *operand1, *operand2; unsigned long long value1; int operation=0;   I was thinking about putting those datas in char array and then retrieve them byte after byte. Is this a good idea? How should I do this? Or could you suggest anything else?

Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int& quotient, int& remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int& remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.


I was investigating self-deleted questions and noticed that several are missing from the  list: , ,   One thing they have in common is that they are all questions that have a zero-score answer that was deleted together with the question. I don't know whether that's the source of the bug or just an observation bias (deletion of zero-score answers through question deletion is what I was investigating in the first place).  The deletions are weeks old so it's not just caching.  (Note: this is a moderator tool, links are ♦ only.)

I'm a moderator on . I recently was surprised to find a question I had ‘helped with’ vanish without a trace from the site (including any references to my actions on it). Now, of course, questions can be deleted, but deletions are of interest to moderators, right?  As part of my search, I found the /admin/recently-self-deleted page and went there. The question was not listed even though, afterward, I determined that it had been self-deleted (at the time) two hours ago. It is now days since the deletion and the question is still not showing up, even though other questions have. This seems like a bug.  For any moderators/SE staff wishing to investigate:  and .  The question has no votes, no answers, and was deleted one day after it was posted.


Please keep in mind that the topic or quality of  does not matter.  If you think the answer is weak, that's fine, irrelevant, down vote it.  What matters is the fact that a link that was posted is redirected.  I posted this  http://www.amazon.com/Oxo-Good-Grips-Salad-Spinner/dp/B00005QB5U  but it now takes you to this  http://www.amazon.com/dp/B00005QB5U/?tag=stackoverfl08-20  I appreciate that the SE sites exist solely because someone is making money, but I feel this is taking it too far.  That's not my own "affiliate" link.  If it were, I would accept the change.  However, it's not.  Pollute the site with advertising all you want (that's to be expected), but don't alter user's post!

We have officially discontinued the Amazon book affiliate remnant ads, since despite our best efforts they don't perform well for our audience and cannot be made to perform well.  We've often wondered,   I'm thinking this isn't a problem; it has gotten lots of support historically. So we're going to go ahead and do it, so the company Amazon account is still getting some use, and we benefit a little.   To be clear: from this point on, all Amazon links posted on all sites will automatically be rewritten to add our affiliate link. We have a clever affiliate redirect that geolocates the IP address and redirects to the appropriate regional Amazon store (amazon.uk, amazon.ca, et cetera).  If you have any feedback on this, or suggestions, as they say … speak now or forever hold your peace!


i saw multiple questions dealing with the topic. But they were bit old and i would like to ensure that there hasnt been any rule changes  My parents are Indian citizens and they have bank account in India. I am an Indian citizen too. But i have been in USA for last 12 years and planning to settle here. I am working in USA. I am on EAD right now . I am very close to getting my green card  My questions below   I have NRE/NRO accounts in an Indian bank. My parents have normal accounts in that same bank. How could My parents transfer money to me ?  I read that there is no annual cap to money transferred. Is that correct? is there any lifetime cap on money transferred  My CPA told the money transferred by parents is not my income, i dont have to pay tax on it. is it correct?

I'm an Indian citizen. I want to transfer $20,000 to my son-in-law, who is a Canadian citizen living in US. My daughter is an Indian passport holder currently living in US on a H4 visa. I want to transfer the money as a gift. Can you please help me with the following questions:   Can I gift this whole amount to my Daughter/Son-in-law or what is the maximum limit of Gift amount? What will be the tax liability on me and on my Son-in-law in case of Gift? Whether I have to show it in my Income Tax Return?


I hold Lithuania citizenship and currently live in Denmark. Is it possible to travel to UK from Denmark and back using only the identity card?  According to      You can enter the UK with either a valid passport or a national identity card issued by a EEA country. It must be valid for the whole of your stay.   I am fully aware that this question was asked a number of times, for example . However, since "Brexit" situation might have changed. Moreover, recently while travelling from Copenhagen airport to Dublin I was asked to prove validity of my identity card using additional document (e.g. driving license).

On 23rd of June, 2016, the UK . This leads to the following questions:   Are UK citizens traveling to the EU affected? Are EU citizens traveling to the UK affected? Are UK/EU family members traveling both way affected? Are Commonwealth citizens traveling to the UK affected? Are other visa-free nationals (such as US/Canada citizens) affected? What other consequences might 'Brexit' have on travelers?   Also, see the  on Expats.SE.


A while back in Team Fortress 2 not only was the Soldier's v_model changed to the c_model but morally everything was. Since I use the soldier the most, I was curious if there was a way to use or get a skin that looks like the v_model since it interferes with my performance.   Here are two images to compare the differences. This is the new one using the c_model:    This is the old one using v_model, which I would like the end result to look like:    In conclusion I am asking if there is a way to use the v_model for the soldier, if not, would there happen to be a skin that would match this look?

For the past couple of years I have been playing TF2. After the LaW update there was a change in the player models and animations. In this question, I am referring specifically to the soldier model.  My question is if there is a way to use the old v_model instead of the newer c_model, since the model's hands are dramatically different. These two pictures compare them:  Old (v_model) soldier hand:   New (c_model) Soldier hand:   This has been bugging me for a while as I feel the newer model's hand is terrible.


If you're talking about a particular letter of the alphabet, how do you format it? Do you just write it? Do you put quotes around it? Do you italicize it? Do you just have to write it out?     Does the h come before the g or after it?   Does the 'h' come before the 'g' or after it?   Does the h come before the g or after it?   Does the aitch come before the gee or after it?      Which of those would be right? Any of them?

When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere)


I have a 1TB HDD with only Ubuntu 16.04 installed on it. But I decided I also wanted Windows 10, so I bought a Samsung 950 PRO 512GB M.2 SSD and installed a copy of Windows 10 Home on it.  I disconnected the cables connecting my harddrive and motherboard, and disabled Launch CSM in BIOS, before installing Windows on my SSD. Windows is now installed and works great on my new SSD. I'm using Windows 10 right now.   I reconnected my harddrive (Ubuntu). I don't know what Launch CSM does, so I didn't enable it. I disabled it because I was following a tutorial. But when I restart my PC, I cannot boot into my HDD. I checked disk management in Windows 10 and my HDD is shown. But in BIOS it is not shown, Windows Boot Manager is the only boot option.  How do I boot into Ubuntu, which is on a separate HDD?

In theory, what I want to do is very simple, but I've done some google research and read some posts on this site and I'm still confused.   I want to keep win7 on my primary C:\ drive, and install Ubuntu (12.10) on a secondary drive (that I have yet to buy or install. I just want to be certain that I'm successful when I do this). If at all possible I'd also like it if when I start the computer I have the option to boot either Win7 or Ubuntu, like an account log in type thing where I just pick which drive I'm running with that day. And just to reiterate, I do not want to partition my C:\ drive or alter, change, or affect my Win7 system in any way.  The reason I'm still fairly uncertain about all of this, is that a lot of the guides I've read have been for earlier versions of Ubuntu. Also the vast majority of guides are about partitioning one drive to fit both OS'. I want two separate OS running from two separate drives that I can pick at boot. The guides I did find mentioned that there is some issue with the grub being installed on C:\ but the rest of the OS being installed on the other drive. Is this still the case? How do I avoid that?  Also, if it helps, I've been running 12.04lts on my laptop for a few months now in and out of class and I love it.  Finally, if you could please point me to a guide or write your answer in the form of a guide for a two year old that'd be awesome. I'm still an Ubuntu novice and I don't want to mess up my win7.


In Firefox 66.0.1 (and for a few versions by now), many user icons fail to load on Stack Exchange pages. For example, on , the asker's icon and the icon for the writer of  fail to load, while with Jenayah, the most recent editor of the question, her icon loads.  This problem doesn't occur on Chrome. Right-clicking and reloading the images doesn't work; viewing them in a new tab shows that the browser is able to display the files. This may be a problem with Stack Exchange's inner workings cooperating with Firefox, or something may just be wrong with my download of the browser.

This is quite a trivial bug. On  if content blocking is enabled, avatars won't load:  Content blocking is set up to custom, trackers are blocked in all windows, block list is set to strict and all third-party cookies are blocked.  Firefox version: 65.0.2


Just installed an Ubuntu next to the Windows 10 as a second system. At first installed an Ubuntu 19.10 but the problem occured so i thought that maybe if i turn it into Ubuntu 18.04 it will be solved but unfortunately not. I can do nothing, i cant connect to the wifi, i cant connect by USB tethering or by Bluetooth tethering using my phone so I cant install drivers. i tried to install them using a pendrive but dont have an internet so i cant use make command.  I have an asus vivobook 15 How can i solve this problem? I think ive searched the whole internet already  lspci    04:00 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter   lshw -C Network    *-network UNCLAIMED description: Network controller        product: RTL8821CE 802.11ac PCIe Wireless Network Adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:04:00.0        version: 00        width: 64 bits        clock: 33MHz        capabilities: cap_list        configuration: latency=0        resources: ioport:3000(size=256) memory:b4200000-b420ffff *-network description: Ethernet interface        physical id: 1        logical name: enp0s20f0u6        serial: 92:d1:af:f9:cb:15        capabilities: ethernet physical        configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device link=yes multicast=yes   lspci -knn | grep Net -A3; rfkill list  04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: AzureWave RTL8821CE 802.11ac PCIe Wireless Network Adapter  [1a3b:3040] 0: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no Hard blocked: no   The answear given in a flagged post doesnt work for my problem   After 'nano Makefile' the line n 152 is 'CONFIG_PLATFORM_ARM_WMT = n'

We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip.


Can I insert a comma in this sentence like this:  "Consequently, the type of the vehicle they are using can be specified as well as if they are walking or stationary somewhere."  Or is the sentence better without it:  "Consequently the type of the vehicle they are using can be specified as well as if they are walking or stationary somewhere."

If I have a sentence that starts with additionally, finally, consequently, etc. do I always have to put a comma after it? Or is there a different rule?


When I studied English, I learned that I have to use the article “a/an” in front of a noun whose first pronunciation starts with a vowel sound.   But whilst reading some texts, I realised that sometimes the article “a/an” is used in front of words that begin with “F”. How is this possible? I wonder if there is an exceptional case where I can use the article in front of other sounds than vowels.  Here are the sentences I found in the text : “FTA+ is an FTA that in addition harmonizes some beyond the border standards.”  “An FC(Family Conglomerate)’s origins and growth often derive from a special relationship with the government.”  Plz share your knowledge with me :)

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


Hey i have found a way to use Whatsapp on ubuntu using Pidgin! But i don't understand everything on the site... Can someone help me?  I have completed the pidgin installation and whatsapp plugin. Now i have to do the SMS whatsapp verification. See the script for that here :   Can someone tell me how do i exactly do the commands and codes etc.  Thanks,

I am using Ubuntu 12.10 and want to run a set of commands in the terminal, and from what i see in the instructions, these commands each start on a new line. I don't know how to do this in the terminal. I can't find what key to press to do the carriage-return to the next line.


Page 105 of D. Burton's A First Course in Rings and Ideals reads     It is not difficult to show that if (I'll call them $n$ and $m$ instead of $n_1$ and $n_2$) $n$, $m$ are square free integers, then $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ if and only if $n=m$.   Well, it is getting difficult for me, any help or would be appreciated.    My progress so far: Suppose $\phi :\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ is an isomorphism. Then $\phi(u)=u$ for every $u \in \mathbb{Q}$, so that $\phi(\sqrt{n})^2=\phi(n)=n$. If $\phi(\sqrt{n})=a+b\sqrt{m}$ for some $a,b\in\mathbb{Q}$, then $(a+b\sqrt{m})^2=a^2+b^2m + 2ab\sqrt{m}=n$ implies $$a^2+b^2m = n$$ and $$2ab=0.$$  Then $b=0$ cannot happen since that would imply that $\sqrt{n}\in\mathbb{Q}$, where $n$ is a square-free integer. Also $a=b=0$ cannot happen. Hence $a=0$ and we have $$b^2m=n.$$ If $\psi:\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ were an isomorphism then there would exist some $s\in\mathbb{Q}$ such that $$s^2m=n,$$ then $s=b$ or $s=-b$. Therefore the only isomorphisms from $\mathbb{Q}(\sqrt{n})$ to $\mathbb{Q}(\sqrt{n})$ are $\phi(u+v\sqrt{n})=u+vs\sqrt{m}$ and $\psi(u+v\sqrt{n})=u-vs\sqrt{m}$.    I don't know if there's an easier way and I don't know if I'm in the correct way here. Thanks beforehand :)

In this  we saw isomorphism of vector spaces over $\mathbb{Q}$. Just came across this question:   Is $\mathbb{Q}(\sqrt{2}) \cong \mathbb{Q}(\sqrt{3})$?   I know these as $\mathbb{Q}$-Vector spaces, are isomorphic from the  linked post. But as fields are they isomorphic? I neither know how to prove it nor how to disprove it.


I have created Enum like this:So I want to add another enum while my application is running eg:"BLOCKED"..Please Help.  public enum LoginStatus {  LOGGEDIN("LOGGEDIN", "Loggedin"),  LOGOUT("LOGOUT", "Logout");  private final String value; private final String description;  LoginStatus(String value, String description) {     this.value = value;     this.description = description; }   public String value() {     return this.value; }   public String getReasonPhrase() {     return this.description; }  @Override public String toString() {     return this.value; } }

It is possible to add and remove elements from an enum in Java at runtime?  For example, could I read in the labels and constructor arguments of an enum from a file?    @saua, it's just a question of whether it can be done out of interest really. I was hoping there'd be some neat way of altering the running bytecode, maybe using  or something. I've also followed up with  because I realised I wasn't totally sure when an enum should be used.  I'm pretty convinced that the right answer would be to use a collection that ensured uniqueness instead of an enum if I want to be able to alter the contents safely at runtime.


I recently opened up GParted to partition some space and I noticed an unknown partition being listen. I don't know whether this is why my computer has booting/waking from suspend really slowly but if someone could give me advice on whether to ignore it or directions on how to fix it, that'd be great.

I have an acer V7 which came with a 1TB HDD, 24GB SSD and Windows 8 installed. I have installed Ubuntu onto the SSD and formatted the main partitions of the HDD. However, I also notice 3 other partitions on the HDD marked msftres, msftdata. Is it safe to format these also so that I have one contiguous drive partition or will I be wiping something important like boot or bios data?


//intent.putExtra(EXTRA_MESSAGE, "abc"); intent.getStringExtra(Home.EXTRA_MESSAGE) == "abc" // false intent.getStringExtra(Home.EXTRA_MESSAGE) == getString(R.string.abc) //false (with R.string.abc=="abc")  String abc = "abc"; intent.getStringExtra(Home.EXTRA_MESSAGE) == abc //false   Why everything is false? If I print the values with a toast they're apparently identical.  Thanks.

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


The code i am pasting is supposed to run the function exporting once on activation of plugin and then hourly. But it doesn't run on activation nor hourly. I do see it in the list of cron jobs that are scheduled.    register_activation_hook(__FILE__, 'my_activation');   register_deactivation_hook( __FILE__,'run_on_deactivate');     function run_on_deactivate() {    wp_clear_scheduled_hook('my_excel_event');       }   function my_activation() {  //exporting(); if i uncomment this line the function runs once wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_excel_event');   }   add_action('my_excel_event', 'exporting');   I know my site is getting page visits, what can be the reason for function not running at all in wp_scheduled_event ?

I have written a plugin that will convert posts to excel format and then email the .xls to an email id. I can make it work with when function is declared in functions.php but does not work with function defined in plugin file.   if ( ! wp_next_scheduled( 'xls_func_hook1' ) ) {   wp_schedule_event( time(), 'hourly', 'xls_func_hook1' ); }  add_action( 'xls_func_hook1', 'sendxls1' ); //senxls1 is a function in functions.php if ( ! wp_next_scheduled( 'xls_func_hook2' ) ) {    wp_schedule_event( time(), 'hourly', 'xls_func_hook2' ); } add_action( 'xls_func_hook2', 'export2excel' );   The full code is at


I used the following command: sudo apt install libexpect-perl qemu-system-x86 qemu-utils  But, I received the following errors: Err:1 http://deb.debian.org/debian buster/main amd64 ovmf all 0~20181115.85588389-3+deb10u2   404  Not Found [IP: 151.101.210.132 80] E: Failed to fetch http://deb.debian.org/debian/pool/main/e/edk2/ovmf_0~20181115.85588389-3+deb10u2_all.deb  404  Not Found [IP: 151.101.210.132 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?  I tried running apt-get update, but I received the following errors: E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


Be assured, you are in numerous company...   My professor already has said to me that BE ASSURED is an adverb here.  Do you know any other example like that in such situation?

Which of the spans in 1.1 is the stronger? Be assured, you are in numerous company if you pick the left one at first glance, where the struts and wires are doing nothing useful at all.   Could you please tell me what is "Be assured" here?  I mean whether it is an adverb, adjective, so on?  And, would you please show me some examples exactly like such the following, considering my original sentence?     Be assured, ...


Why is geometric optics the low wavelength limit of the wave theory of light? I can't seem to grasp why either a low or high wavelength limit would be necessary.

I'm a newbie with physics but I'm wondering how a ray of light can essentially be represented. I have always known that a ray of light proceeds in a straight line until it encounters another object (or material) that refracts/reflects it. But a light ray should be part of an electro-magnetic wave, is this correct? If it is so, it should obey to the  and this doesn't seem to me to describe a straight line ray.  I'm having problems visualizing how light is emitted and how it relates with the wave equation. Can someone with a clear understanding of the problem explain it to me in simple terms?


I want to know how top.location and self.location is compared. I mean on what basis are they compared?  Are they compared using their memory address or their references or something else? Basically, i want to know when (top.location == self.location) will give true and when the comparison will give false?   I know all those stuff that says they are compared using their respective url and all that. But the thing is they are objects. And hence, it would be interesting to know how objects are compared?

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


Suppose we have a world with one massive free particle and one observer. If the observer changes their velocity with respect to the particle, will this have the same effect on $\lvert\Psi(r,t)\rvert^2$ as if $\langle p\rangle$ was changed locally (for example, using compton scattering if we added another particle)?  Part of me says, yes: the "wavelength of $\Psi$" is related to momentum by the de Broglie relation, and momentum is relative (assuming we have just a Galilean transform here).   Part of me says, no: due to the uncertainty principle, the probability of finding a free particle anywhere would seem to be uniform and negligible over all space. From this argument, the wave function shouldn't change, because for a free particle, it wouldn't have a well-defined wavelength to begin with.  I know I'm missing some conceptual connection, because these can't both be true.  I am currently studying an intro QM course, so please take my undergraduate level of understanding into account!

Is the Schrodinger equation covariant under Galilean transformations? I am only asking this question so that I can write an answer myself with the content found here:  and here:  I learned about these pages in a comment to  by Ron Maimon. I think Ron Maimon is the original writer of this content. This is creative commons, so it's ok to copy it here. It is not on any textbook on non-relativistic quantum mechanics that I know of, and I thought it would be more accessible (if to no one else, at least for myself) and safe here. I hope this type of question is not in disagreement with site policy.


The image has 2 labels (1) and (2) with red arrows Is it possible to do this in Latex or should I try something else to achieve similar result.

I know how to add a picture to my LaTeX file, e.g. \includegraphics[width=7cm]{curve.pdf}. What I'd now like to do is place some latex symbols onto the picture. Like a \gamma to name a curve. I do not want to do that in the graphics editing program e.g. because I might want to rename that curve later and don't want to repeat the editing process.  I know I can do a \put in a picture environment. But this environment forces me to specify its size at the beginning. That would be cumbersome since I'd have to go open the graphics file and do some calculations. Is there a way to get the dimensions (or aspect ratio) of a graphics file within LaTeX, so I might use it there? But even if I could do these calculations automatically, I still wouldn't like the redundancy of specifying the width for \includegraphics again, but I could live with that.  Also, is it possible to specify the size in cm to the picture environment? I just tried and got some errors.  So basically what I am looking for is a solution as simple as possible which:  a) lets me specify a width or a height and a file, and displays the image scaled while keeping its aspect ratio and then   b) lets me put LaTeX stuff inside the image in relative coordinates (percentages or 0...1), so I won't have to redo anything should I decide that the image needs to be a bit larger or smaller.  (b is kind of like setting \unitlength to the whole width=height for the 'picture' environment. But of course most images are not square and I also don't appreciate the redundancy (but could live with it).)


So, in light of , and , how can we patch for the shellshock bug/exploit/vulnerability for currently supported Ubuntu versions? 13.10 and 14.04?

Recently, there have been news going around regarding "CVE-2014-6271" (See ), which is a vulnerability in Bash. How do I know if I am affected by this, how can I fix it, and why should I care?  This is designed as a canonical answer for this vulnerability, due to its scope and severity.


I've a small private cloud running on UEC 11.04 and Eucalyptus, and everything works fine. But I still look for a software deployment solution better  than writing scripts manually. The new juju seems perfect for my purpose . And even though the  says it can only support EC2 (currently),  I've seen someone has show a environment.yaml .   But when I try it to bootstrap from a similar config, juju will throw HTTP 500 ERROR or still connect to AWS and complained that the access keys is not in records.  So does anyone run juju on OpenStack or Eucalyptus successfully ? I couldn't find any article about it. Or can somebody tell me the main difficult to implement that ?  Thanks!

Please let me know if I can deploy juju on Eucalyptus, if yes please provide me the configuration details which i need to edit on environments.yaml file.


Let $(X,d)$ be a metric space and $T$ the corresponding topology on $X$.  Fix $a$ as an element in X.  Prove that the map $f: (X,T) \to \mathbb{R}$ defined by $f(x) = d(a,x)$ is continuous.  I know I need to show that the inverse image of an open set in $\mathbb{R}$ is an open set in $X$.  I know that an open set in $X$ is a subset of $X$ whose distance from $a$ is r because of the definition of an open ball in $X$.  The inverse image of an open set in $\mathbb{R}$ (call it $O$) is the set of all points in $X$ whose distance from a is an $r$ that's an element of the open set $O$ in $r$.  I feel like this thinking is right, but I don't know how to prove this further.  Anyone have any ideas?

The question is (from Topology without tears) that: Let $(X,d)$ be a metric space and $\tau$ the corresponding topology on $X$. Fix $a \in X$. Prove that the map $f:(X,\tau) \rightarrow \mathbb{R}$ defined by $f(x) = d(a,x)$ is continuous.  My first attempt was that let an open ball, $B_{\epsilon}(a)\subset \mathbb{R}$ and show that $f^{-1}(B_{\epsilon}(a)) \subset \tau$. Since $f(x) = d(a,x)$, $f^{-1}(B_{\epsilon}(a))=B_{\epsilon}(a) \in \tau$.   I am pretty sure the last sentence is wrong. I am not sure if every open ball is an open set in topology induced by metric space.  Please give me some hint and direction. Thanks


In some places , it says slit width is directly proportional to intensity while in other places intensity is directly proportional to (slit width)² .

Here's a question I got in my final exam this morning. "If in Young's double-slit experiment setup, the ratio of the intensity of the bright spot to the dark spot is 25:9, what is the ratio of the width of the slits?" Here's what I did. Since the ratio of intensity at the bright and dark spots is 25:9, the ratio of amplitudes there must 5:3. Which means the amplitude of one wave is 4 times the other. Now, knowing that the amplitude of light through the wider slit is 4 times the amplitude of light through the narrower slit, how can I determine the ratio of the slits' width?


Is there an indirect or polite way to say "A rotten potato spoils the whole bag" ?  I looked up online but didn't found a good one.   UPDATE  I want to use it in a situation as below:  Suppose you notice someone in your team acting as a "rotten potato". As a leader you gathered the team to behave nicely and be aware of such potato but in a indirect way so that everyone including the "rotten potato" will be aware of and do not take it badly.

I was amused by the expression "Paid a penny and only farted" (related by @FumbleFingers), which suggested a similar Japanese saying: 大山鳴動鼠一匹 - "Find only a small mouse coming out after hearing rumblings and experiencing shaking of the big mountain."  It’s humorous. I chuckled when I read it, and I wrote to the author that I love it.  With that said, the word "fart" reminds me of another Japanese proverb, 百日の説法屁一つ- "A fart ruins 100 days of sermons by the priest", which means that a small mistake (the sound of a fart in front of the congregation) brings all his efforts to naught.  It can’t happen in big Western churches. But it could well happen in a small wooden temple where a priest would preach to 30 – 50 provincial followers. Can you imagine how the proud priest being called 'the venerable' would be embarrased when his loud fart is heard by all his followers during his serious sermon and they start to giggle here and there in the hall?  We also have a similar saying" 九仞の功を一簣に欠く, which literally means "Collapse a 9- meter sand tower with the last pile of sand."  What is the English equivalent of the saying "A fart ruins 100 days of sermons by the priest (bishop): a small mistake depreciates the value of (vitiates) all labor and effort to naught," preferably in such a humorous way?


I read (not all but) many questions about automatic bounty awarding. e.g.:  and .  And in  I found:     ... after all. If you think the upvotes are fraudulent, you should   report the post to the mods. ...   But how?  Background: I asked  about Ruby on Rails and Haml. After 'bountying' it, I got an answer that does not even fit to my question. So I voted it down, but for some reason it got the additional three votes to qualify for the automatic award system. And the answer would not be qualified for upvoting (it's confusing, and no explanation) even it would fit to my question.  And it's the copy of .

Suppose I want to have someone with moderator abilities review a post. What would be the best way to flag this?    Is there already some standard way to do this that I don't know about?     For more information, see "" in the .


In Pokemon X and Y, a new Pokemon called Vivillion was released. It is a butterfly, but the interesting part about it is its patterns. It seems like for each region, it has a different pattern. How many are there that can be obtained? I want to collect all of them for fun.

According to 's Pokedex Entry, they have different wing patterns depending on their original location in the world:     Vivillon with many different patterns are found all over the world. These patterns are affected by the climate of their habitat   So I've been doing some research, and it seems the pattern is determined by the real-world location of the 3DS in which  was first caught, in some countries down to individual states/regions.  This seems to have exploded on  and , but as of yet I cannot find a definitive source of the possible variations, and their locations.  So, What are the locations I need to trade with in order to get all the different patterns?


The mobile app has a "Feed" screen (pictured). I really like this "at a glance" screen. Is there a way we can see this on the desktop of any SE site (like Stack Overflow)? If there already is somewhere like this.. I apologise.

I love the feed view in the new Android app. Definitely helping me to discover new content on other sites me than I every have before.   Can we have a feed page on stackexchange.com, giving the same basic functionality as there is in the Android app feed page (auto updated every few minutes)?


$$x = y\frac{dy}{dx}-\left(\frac{dy}{dx}\right)^2$$ I think it can be converted into a Clairaut. form but not able to do it

I've recently been learning about differential equations, and my teacher has been giving some particularly difficult examples out for those of us who finish early. He gave us the following differential equation: $$x=y\frac{dy}{dx}-\left(\frac{dy}{dx}\right)^{2}$$ With the hint "Differentiate with respect to $y$, then let $\frac{dy}{dx}=p$". I've solved it after the lesson and would like someone to check whether or not I've done so correctly.    Following the hint, $$\frac{dx}{dy}=\frac{1}{p}=p+y\frac{dp}{dy}-2p\frac{dp}{dy}$$ Which rearranges to $$p-\frac{1}{p}+y\frac{dp}{dy}=2p\frac{dp}{dy}$$ Multiplying through by $\frac{dy}{dp}$, $$\left(p-\frac{1}{p}\right)\frac{dy}{dp}+y=2p$$ Rearranging into the form $\frac{dy}{dp}+f(p)y=g(p)$, and writing $p-\frac{1}{p}=\frac{p^{2}-1}{p}$ $$\frac{dy}{dp}+\frac{p}{p^{2}-1}y=\frac{2p^{2}}{p^{2}-1}$$ Our integrating factor is $$e^{\int\frac{p}{p^{2}-1}dp}=e^{\frac{1}{2}\ln(p^{2}-1)}=\sqrt{p^{2}-1}$$ So we have $$\sqrt{p^{2}-1}\frac{dy}{dp}+\frac{p}{\sqrt{p^{2}-1}}y=\frac{2p^{2}}{\sqrt{p^{2}-1}}$$ The left hand side is, by design, $\frac{d}{dp}(y\sqrt{p^{2}-1})$, and the right hand side can be integrated as follows: $$\int \frac{2p^{2}}{\sqrt{p^{2}-1}}dp=\int\frac{2(p^{2}-1)+2}{\sqrt{p^{2}-1}}dp=\int 2\sqrt{p^{2}-1}dp+\int \frac{2}{\sqrt{p^{2}-1}} dp$$ These can both be solved using the substitution $p=\cosh(u)$, and gives $$y\sqrt{p^{2}-1}=p\sqrt{p^{2}+1}-\cosh^{-1}(p)+\alpha$$ Where $\alpha$ is an arbitrary constant. Dividing, we finally have $$y=p+\frac{\cosh^{-1}(p)+\alpha}{\sqrt{p^{2}-1}}$$  Here I was stuck for a long time, until I realised that we also have the equation we began with: $x=py-p^{2}$, which we can solve as a quadratic in $p$ to also get $$p=\frac{y\pm \sqrt{y^{2}-4x}}{2} \implies p^{2}=\frac{y^{2}+y^{2}-4x \pm 2y\sqrt{y^{2}-4x}}{4}$$  Thus, $$y=\frac{y\pm \sqrt{y^{2}-4x}}{2}+\frac{\cosh^{-1}\left(\frac{y\pm \sqrt{y^{2}-4x}}{2}\right)+\alpha}{\sqrt{\frac{y^{2}-2x \pm y\sqrt{y^{2}-4x}}{2}-1}}$$  This is as good as I can do - we have a relation between $y$ and $x$ - am I done? Is this the correct answer? Is there an easier way?     Thank you for your time.    Following the suggestion by @Valentin $$\frac{dy}{dp}=1+\frac{\frac{1}{\sqrt{p^{2}-1}}\sqrt{p^{2}-1}-p\frac{\cosh^{-1}(p)+\alpha}{\sqrt{p^{2}-1}}}{p^{2}-1}=1+p\frac{1-\frac{\cosh^{-1}(p)+\alpha}{\sqrt{p^{2}-1}}}{p^{2}-1}$$ Hence, $$dx=\frac{dy}{p}=dp\left(\frac{1}{p}+\frac{1-\frac{\cosh^{-1}(p)+\alpha}{\sqrt{p^{2}-1}}}{p^{2}-1}\right)$$


I have a static code block: public class MyClass {  static {                  String s = "src/test/resources/dfdf.properties";         Resource r = new FileSystemResource(s);                  Properties props = new Properties();                  try {             props.load(r.getInputStream());                          accessToken = props.getProperty("password");             locationToken = props.getProperty("username");                      } catch (IOException e) {             LOG.error("We have an error for reading the access and location tokens for Brink web-service config");         }     }   }  If I understand it correctly, the static code block will run only once even we have concurrent environment. Does it correct?

Let's say I have some Java code:  public class SomeClass {     static {         private final double PI = 3.14;         private final double SOME_CONSTANT = 5.76;         private final double SOME_OTHER_CONSTANT = 756.33;     }    //rest of class }   If a thread is initializing SomeClass's Class object and is in the middle of initializing the values in the static block when a second thread wants to load SomeClass's Class again, what happens to the static block?  Does the second thread ignore it assuming it's already initialized even though the first thread is not done? Or does something else happen?


I am facing a rather weird issue. I am writing a paper using the svjour3 class. At some point I realized that adding one letter gave the following error  \pdfendlink ended up in different nesting level than \pd   I searched to find a possible solution and I was pointed out to change TeX's capacity. The more weird is that there doesn't seem to be a problem because this how much memory is used  Here is how much of TeX's memory you used: 16095 strings out of 493069 303810 string characters out of 6138222 367944 words of memory out of 5000000 19329 multiletter control sequences out of 15000+600000 11810 words of font info for 47 fonts, out of 8000000 for 9000 1137 hyphenation exceptions out of 819   So I don't think that this is the issue here. Unfortunately I cannot provide a MWE so I will give my code .  I am also giving a  required by the class.  At some point I deleted all the output files and tried to rebuild the tex code and surprisingly it worked! Then I realized that the problem occurs when I ran BibTeX. So unless I ran BibTeX everything works.  Any idea on what might be the issue?  For reference I am running TeXLive under Feodra 25 using TeXMaKeR.

I started using showkeys in one of my documents and see this error  \pdfendlink ended up in different nesting level than \pdfstartlink   A bit of google suggests that this "happens when hyperref is used under pdftex and a citation splits across a page boundary". (See: ).  But this package is only useful at drafting stage where the text is changing frequently i.e. the chance of the error is high. Is there a general way to smoothly use showkeys with hyperref? Thanks.


I'm planning installing ubuntu gnome to a fresh ssd and setting up a dual booting system with an existing windows 10 install.  From what I can tell, windows is installed in legacy bios mode.  I've seen some conflicting advice around whether it would be best to disconnect my windows 10 drive when performing the install, and then restart with the windows 10 drive back in and set up a bootloader (like grub) via the command line.   Is this neccesary, or will ubunutu be smart enough to detect the windows 10 install when I set up from a live usb and set up the dual boot for me?   Thanks for any advice - I appreciate this may be a matter of opinion if both are viable options.   Pete

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


For the past two days I've been reading up on domains and the like because I'll be setting up a website on a VPS. However, I keep getting conflicting answers from stackoverflow, youtube and various other sites (a quick google image search will show this which is extremely frustrating). For the url:https://www.example.com  Is www the subdomain or the hostname? What's the differences between the two and how can I recognize them when I'm just given a URL? Which of these are the domain / domain name? example or example.com or www.example.com? What exactly makes a domain name?

I was searching for understanding what is the “www” at the beginning of so many web addresses in the Internet. I read in somewhere that “www” is called “hostname”.  The world “hostname” made me go a step further in searching, I read so many threads and articles but I am still confused about that.  So I decided to ask some related questions here to make it clear and I need solid and comprehensive answers please.   “hostname” vs. computer name: Is the “hostname” the same as the computer name, if its true, suppose that my computer is a web server and my computer name is “Robin” so is it correct to conclude that a hypothetical web site would be something like: Robin.websitename.com? “hostname” vs. subdomain: If “mail” in mail.google.com and “developers” in developers.google.com are called subdomains why is en in en.wikipedia.org called ? What is the difference between host name and subdomain? What is the relation between host name and fully qualified domain name (FQDN)? What is the “www” in URL of some web sites? As you know Google’s web address is www.google.com but we have many web sites without “www” for example: superuser.com and en.wikipedia.org. I read in this  that “www” is just a declarative thing not more and is not related to the concept of hostname. Do you verify that?


Problem. Find all the $f: \mathbb{R} \to \mathbb{R}$ (not supposed continuous) such that for every real sequence $(a_n)$ we have : $$\sum  a_k \; \text{is convergent} \Longrightarrow \sum  f(a_k) \; \text{is convergent}$$  I'm trying to prove that the only functions are linear in a neighborhood of $0$. It is clear that those functions work but for the reciprocal it is much harder since $f$ is not supposed of any regularity. I have proven that :    $f(0)=0$ $f$ is continuous in $0$ : if it's not the case we can set $ \varepsilon >0$ and a sequence $(a_n)$ such that $|a_n|  \leqslant 2^{-n}$ and $|f(a_n)| \geqslant \varepsilon$ which is absurd.    Any ideas to show that $f(x+y)=f(x)+f(y)$ near $0$ ? (which would be sufficient to prove the result)  Thanks !

Suppose $f$ is some real function with the above property, i.e.  if $\sum\limits_{n = 0}^\infty {x_n}$ converges, then $\sum\limits_{n = 0}^\infty {f(x_n)}$ also converges.   My question is: can anything interesting be said regarding the behavior of such a function close to $0$, other than the fact that $f(0)=0$?


On a VF Page, I am displaying Case's history related list with a custom tabular format. I am querying Case history object in an Apex class (under Constructor):  caseHist = [Select OldValue, NewValue, Field, CreatedDate, CreatedBy.Name,                        CreatedBy.FirstName, CreatedBy.LastName                        From CaseHistory Where CaseId =:currentCase.Id ORDER BY CreatedDate DESC];   Just using a return method to get the data:   public List<CaseHistory> getCaseHistory(){     return caseHist; }   On VF page:  <apex:repeat value="{!caseHistory}" var="casHistory">

                         {!casHistory.CreatedBy.LastName}, {!casHistory.CreatedBy.FirstName}

                         Changed {!casHistory.Field} from {!casHistory.OldValue} to {!casHistory.NewValue}

                         {!casHistory.CreatedDate}

 </apex:repeat>   My understanding is: In a test class, we are not actually committing any records to the database to update few fields and get the tracking history for those. Now I am wondering, how could I get 100% of my Apex class's code coverage? Right now, I got 73% covered.

I have some code that relies on field history tracking by querying the History for a custom object. This works fine, but it appears that the history records aren't created during the test so none of my tests will pass.


In my Ubuntu 12.04 Terminal one can press Alt + # which leads to the repeation of the following character #-times. Simple question: For what is it good for? Is it some fancy feature one can use for some purpose?  Greetz, Tik0

In a virtual terminal I (accidentally) pressed Win+1 and got a new line consisting of  (arg: 1)   As long as I keep Win pressed, all numbers I press get appended to the number in the parentheses, e.g. Win and 1+4 yields (arg:14).  When I (after releasing Win) press any key, that character is printed as many times as the number reads and the (arg: ...) expression is replaced by the standard prompt.  Does anybody know what happens here?


I found this very interesting. I already blocked those pages via robots.txt but it keeps on showing on my Search Console for Smartphone. Does adding this:  User-agent: Googlebot-mobile  Allow: /*?variant=*   will make the error disappear?  The general robots.txt is:  User-agent: * Disallow: /*?variant=*

I have some pages on my site that I want to keep search engines away from, so I disallowed them in my robots.txt file like this: User-Agent: * Disallow: /email  Yet I recently noticed that Google still sometimes returns links to those pages in their search results.  Why does this happen, and how can I stop it? Background: Several years ago, I made a simple web site for a club a relative of mine was involved in.  They wanted to have e-mail links on their pages, so, to try and keep those e-mail addresses from ending up on too many spam lists, instead of using direct mailto: links I made those links point to a simple redirector /  script running on my own site.  This script would return either a 301 redirect to the actual mailto: URL, or, if it detected a suspicious access pattern, a page containing lots of random fake e-mail addresses and links to more such pages.  To keep legitimate search bots away from the trap, I set up the robots.txt rule shown above, disallowing the entire space of both legit redirector links and trap pages. Just recently, however, one of the people in the club searched Google for their own name and was quite surprised when one of the results on the first page was a link to the redirector script, with a title consisting of their e-mail address followed by my name.  Of course, they immediately e-mailed me and wanted to know how to get their address out of Google's index.  I was quite surprised too, since I had no idea that Google would index such URLs at all, seemingly in violation of my robots.txt rule. I did manage to submit a removal request to Google, and it seems to have worked, but I'd like to know why and how Google is circumventing my robots.txt like that and how to make sure that none of the disallowed pages will show up in their search results. Ps. I actually found out a possible explanation and solution, which I'll post below, while preparing this question, but  in case someone else might have the same problem.  Please do feel free to post your own answers.  I'd also be interested in knowing if other search engines do this too, and whether the same solutions work for them also.


Traceback (most recent call last):   File "/usr/lib/cnf-update-db", line 8, in <module>     from CommandNotFound.db.creator import DbCreator   File "/usr/lib/CommandNotFound/db/creator.py", line 11, in <module>     import apt_pkg ImportError: No module named apt_pkg Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code   sudo apt update gives:  Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease  Hit:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease  Hit:3 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease  Hit:4 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease  Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease Traceback (most recent call last):  File "/usr/lib/cnf-update-db", line 8, in from CommandNotFound.db.creator import DbCreator File "/usr/lib/CommandNotFound/db/creator.py",  line 11, in import apt_pkg ImportError: No module named apt_pkg Reading package lists... Done  E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'  E: Sub-process returned an error code   This is the full output. Please help me to solve this issue.

The terminal gave me these errors when updating the software with sudo apt update.    Hit:1 http://it.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://it.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                Hit:3 http://it.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                      Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                 Traceback (most recent call last):                       File "/usr/lib/cnf-update-db", line 8, in <module>     from CommandNotFound.db.creator import DbCreator ModuleNotFoundError: No module named 'CommandNotFound' Reading packages list... Done E: Problem executing scripts APT::Update::Post-Invoke-Success     'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db;       then /usr/lib/cnf-update-db > /dev/null; fi'   E: Sub-process returned an error code     These are the results of sudo apt install --reinstall command-not-found  Reading package lists... Done  Building dependency tree         Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/5.188 B of archives After this operation, 0 B of additional disk space will be used. (Reading the database ... 225797 files and directories currently installed.) Preparations for extracting ... / command-not-found_18.04.4_all.deb ... Extracting command-not-found (18.04.4) on (18.04.4) ... Configuring command-not-found (18.04.4) ... libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...   When I tried the command sudo apt update again after reinstalling command-not-found, the results were the same as described in the first text block.


My laptop came with preinstalled Windows 7 Ultimate x64. I can't change the OS on laptop, but Windows 7 Ultimate is much of an overhead for the computer and my intended use as well. Is there a way to remove any features, to make the installed OS closer to say Windown 7 Home Premium? I would like to speed up the laptop and get some memory freed.

Currently I've got an installation of Windows 7 Ultimate x64. I would like to downgrade to Windows 7 Home Premium x64 without a clean install. I've got a (legal) retail disc and tried the following tricks:        Still the Windows setup keeps telling me I can't upgrade because I've got a higher version installed (Ultimate). The trick seems dead. Does anyone know a way to change from Ultimate to Home Premium without the hassle of a clean install?


The split method for strings only takes a parameter for the delimiter, but how do I easily split by every (or every other, etc) letter? This method works to split by every letter, but seems clumsy for a simple task.  a=' '.join(string.ascii_lowercase).split()   I suppose a function could do this:  def split_index(string,index=1):     split=[]     while string:         try:             sect = string[:index]             string = string[index:]             split.append(sect)         except IndexError:             split.append(string)     return split  print(split_index('testing'))   # ['t', 'e', 's', 't', 'i', 'n', 'g'] print(split_index('testing',2)) # ['te', 'st', 'in', 'g']   I am surprised if no one has wished for this before, or if there is not a simpler built in method. But I have been wrong before. If such a thing is not worth much, or I have missed a detail, the question can be deleted/removed.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Here is the code:  def rand():   import random   num = (random.randint(1000,9999))   print(num)  rand() print(num)   Within the subroutine, the variable "num" is printed successfully. However, outside of it, when printing is attempted, the following error message is displayed:  Traceback (most recent call last):   File "main.py", line 8, in <module>     print(num) NameError: name 'num' is not defined   Why does this happen, and what are the ways I can work around it?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


If I add or remove the  tag from a meta-topic, that doesn't take effect immediately -- i.e. the text isn't immediately added or removed from the sidebar of the main site.  When and how does it take effect? E.g. is automated, how often does that task run, are there any known bugs, and how (or after how long a delay) can I tell if it's not working properly?  I did the following:   Add the featured tag to a topic  The topic was later displayed in the side bar. Add the featured tag to a second topic  The second topic was later also displayed in the side bar. Remove the featured tag from the first topic  The second topic was removed from the side bar and only the first topic is now displayed there.   Is this a bug or will it fix itself I wait?    No, having seen it fixed three hours ago, I see the problem again now.  So perhaps I suppose it is a cache problem (and maybe varies depending on which server I happen to get).

about nominations for Pro Tempore Moderators on  was a featured question, but was . However, it sometimes still appears as featured on the main page of :    This might have something to do with the fact that the post  shortly after the  tag has been removed.  This bug also extends to the API. During a period when they question appears in the sidebar, the API route /questions?tagged=featured&site=cseducators.meta returns:  {   "items": [     {       "tags": [         "discussion",         "featured",         "topic-challenges"       ],       "owner": {         "reputation": 2721,         "user_id": 58,         "user_type": "moderator",         "accept_rate": 12,         "profile_image": "https://lh4.googleusercontent.com/-ZnN3lJjklJg/AAAAAAAAAAI/AAAAAAAAAWE/zqGtDAyXfjo/photo.jpg?sz=128",         "display_name": "thesecretmaster",         "link": "https://cseducators.meta.stackexchange.com/users/58/thesecretmaster"       },       "is_answered": true,       "view_count": 91,       "answer_count": 2,       "score": 9,       "last_activity_date": 1501024496,       "creation_date": 1499711767,       "last_edit_date": 1499961119,       "question_id": 207,       "link": "https://cseducators.meta.stackexchange.com/questions/207/topic-challenges",       "title": "Topic Challenges"     },     {       "tags": [         "discussion",         "faq",         "featured",         "new-users"       ],       "owner": {         "reputation": 3275,         "user_id": 1293,         "user_type": "registered",         "profile_image": "https://i.stack.imgur.com/dxcsS.jpg?s=128&g=1",         "display_name": "Buffy",         "link": "https://cseducators.meta.stackexchange.com/users/1293/buffy"       },       "is_answered": false,       "view_count": 127,       "answer_count": 0,       "community_owned_date": 1499432641,       "score": 9,       "last_activity_date": 1499616804,       "creation_date": 1499431354,       "last_edit_date": 1499616804,       "question_id": 203,       "link": "https://cseducators.meta.stackexchange.com/questions/203/what-does-a-new-member-need-to-know-on-this-site",       "title": "What does a new member need to know on this site?"     },     {       "tags": [         "discussion",         "moderation"       ],       "owner": {         "reputation": 266,         "user_id": 23,         "user_type": "moderator",         "profile_image": "https://www.gravatar.com/avatar/2cf2eee5993f6cf3b0b149c2f8c5a323?s=128&d=identicon&r=PG",         "display_name": "Robert Cartaino",         "link": "https://cseducators.meta.stackexchange.com/users/23/robert-cartaino"       },       "is_answered": true,       "view_count": 609,       "answer_count": 7,       "score": 15,       "locked_date": 1498246037,       "last_activity_date": 1498235396,       "creation_date": 1496674251,       "last_edit_date": 1498235396,       "question_id": 75,       "link": "https://cseducators.meta.stackexchange.com/questions/75/accepting-nominations-who-should-moderate-this-site",       "title": "Accepting Nominations -- Who should moderate this site?"     }   ],   "has_more": false,   "quota_max": xxxx,   "quota_remaining": xxxx }   This includes the nomination post as well as the 2 featured posts (at the time of this edit).    As  mentioned in , the same issue appears with , which was locked shortly before the  tag was removed (see the  for details) and is at the time of this edit still visible in the sidebar.


I'm trying to prove pascal's rule by induction.Who could tell me how can I prove the following equation.  i.e $$\dbinom{n}{k}=\dbinom{n-1}{k-1}+\dbinom{n-1}{k}$$  Many Thanks!!!

I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.  I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.  I want to see an actual proof behind this equation.  Does anyone have any ideas?


I am currently reading The Science of Insterstellar, which explains most things very well, but some things leave me confuzzled, which I hope to get answers to here. I am no physicist, but highly interested and eager to learn.   I get tidal forces in principle, but one thing never clicked for me, and that is why tidal forces are the reason that the opposite side to the other object (moon, black hole, whatever) point away from said object.  Take this picture from wiki;      I understand all vectors up to the middle of the circle, where they point inwards and ever so slightly to the right.  Everything left from that is a mystery to me. How can the sum of all the forces pointing towards the object on the right result to vectors pointing away from it?  Even when I remembered that the object itself also has gravity in itself, all those vectors should also point inwards to the object.  How can the vectors (which I understand to be the sum of all gravitational forces ... ?) point away from the mass?

The bit that makes sense – tidal forces My physics teacher explained that most tidal effect is caused by the Moon rotating around the Earth, and some also by the Sun. They said that in the Earth and Moon system, the bodies are in freefall about each other. But that points on the surface of Earth, not being at Earth's centre of gravity, experience a slightly different pulls towards the Moon. The pull is a little greater if they are on the Moon's side, and slightly lesser if they are on the side away from the Moon. Once freefall is removed, on the Moon side this feels like a pull towards the Moon and on the the opposite side it feels like a repulsion from the Moon. This makes sense to me, and is backed up by other questions and answers here, like  and also  Phys.SE question. The bit that doesn't make sense – tidal bulges They also said that there are "tidal bulges" on opposite sides of the Earth caused by these forces. The bulges stay still relative to the Moon and Earth rotating through the bulges explains why we get two tides a day. They drew a picture like this one…  An image search for  finds hundreds of similar examples, and  from a scientist on Twitter. …But, if there is a tidal bulge on both sides of Earth, like a big wave with two peaks going round and around, how can an island, like Great Britain where I live, simultaneously have a high tide on one side and a low tide on the other? For example:   on the West coast  on the East  Two ports with tides 6 hours, or 180º apart. It's high tide at one while low tide at the other. But they are only  by road. Great Britain is much smaller than Earth. It's probably not even as big as the letter "A" in the word "TIDAL" in that picture.  To prove this isn't just Britain being a crazy anomaly, here is another example from New Zealand:     Two ports that are 180º (6 hours) apart, but separated by  through a national park. New Zealand, unlike the UK, is in fairly open ocean.


I was recently given a laptop with a "corrupted" XP OS on it, according to the old owner. From what he says, XP will start to boot and then completely crash.  I haven't seen the laptop yet, but I'd like to explore the possibility of wiping the OS and installing Ubuntu. Would this be a possibility?  Should I look at burning Ubuntu to CD and trying to boot from the CD, or is there a way to get rid of the OS mess first, and then try and boot from a blank laptop?  I am not sure how the XP system got corrupted (whether it's a virus or perhaps something wrong with the laptop itself).  Any advice or tips on how to approach this (or whether it's worth it) would be greatly appreciated.  Thank yoU!

I would like to see a full how-to guide on how to install Ubuntu.


How do I make the symbol which looks like $\oint$ which marks the beginning of a section/chapter? Much thanks in advance.

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


I very new to DSLR Photography. Now I'm in confusion that Sony alpha 58 or Cannon D600. both of them are nearly same cost. but I found that that for Sony there are less lens and accessories. but cannon have more lens and accessories are available.   I need camera that satisfy for a long period ( few Years )  Is sony alpha58 is pro than D600 in terms of Quality ? What are the pros and cons of Sony and Cannon.

We have a question and answers outlining the . I'm interested in the other DSLR makers, and how the cameras they make compare in terms of significant features, system design philosophy, and unique or interesting photographic capabilities enabled or made easier by these cameras. Likewise, what such things are not handled as well?  Take "the big two have more market share" and the associated advantages of availability, accessibility, and third-party support and documentation .  I'm not interested here in compact cameras, interchangeable-lens cameras with electronic viewfinders, or in rangefinders. (If you're interested in that, though, see )  P.S.: Differences in lens lineups are covered at


I have a layer in ArcMap 10.2 that is one big shape made up of five smaller shapes. I need to create a layer with only four of those shapes, for the purpose of showing the difference in areas when the fifth shape is not included.  I've noticed that a simple copy and paste of the original shapefile back into the Table of Contents is not a good idea as any changes I seem to make to the new layer also affect the original layer.  Is there a simple way to go about doing this? If it's relevant/useful I have the free version of XTools Pro.

I have a problem with ArcGis 10.1 which I rarely use.  In an edit session I select a polygon. I would like to 'Create Layer for Selected Features' and can do this; the new layer appears in the table of contents. When I try and move the new layer, the old layer moves with it.   When I click on the polygon the option of selecting the two coincident polygons appears but I can't get these to separate. It seems to be impossible to do anything to one feature and not the other.  The strange thing is that yesterday the program wasn't behaving like this.  Can anyone can explain what is going on?


I am wondering about the following situation: I have a confidence interval estimator $\delta(x)=[lb, ub]$, which returns valid a%-confidence intervals for a value $\theta \in \mathbb{R}$ (not necessarily a parameter). How can I obtain a confidence interval for a value $f(\theta)$? In particular, i am interested in    f(x)=2*x-1 f(x)=x/(1-x)   The naive approach of simply transforming the bounds using $f$, that is, $\delta_f(x)=[f(lb), f(ub)]$ seems to produce confidence intervals with the correct $a\%$ coverage. However, given the existence of more complex procedures, like the delta method, this seems too good to be true.

Suppose   $$ (a,b) $$   is a $(1-\alpha)$ level confidence interval for a parameter $\theta$. Suppose $\eta$ is a monotone invertible transformation. Then, is   $$ \left (\eta(a), \eta(b) \right ) $$   a $(1-\alpha)$ level confidence interval for $\eta(\theta)$? Assume the parameter and the confidence interval endpoints are all real numbers.   The answer seems intuitively to be "Yes" for similar reasons to why you can transform random variables do things like, if $Y = g(X)$, then  $$ P( Y \leq y ) = P( g(X) \leq y ) = P(X \leq g^{-1}(y) ) $$   Might also be related to the continuous mapping theorem, as applied to MLEs.   This is not homework and is coming up in the context of whether or not I can nake a 95% for the log odds, then back-transform it and call it a 95% for the probability.   Thanks


I used to make gifs with Photoshop CS5 (oldie, I know) and I want to do it again but now I'm using Ubuntu 16.04.  Do you have any recommendations about apps similar to PS and maybe some tutorials?  Thanks in advance!

I have been moving toward Ubuntu from a long time Windows development background. The one program I cannot seem to do without is a graphic editor. I have seen recommendations for programs, but they turn out to be directed at children or tailored to working with personal photographs.  I am looking for something more for programming tasks like analysing colors, resizing, creating web graphics, etc. I have used Photoshop in the past and more recently have mostly used Paint.net for Windows.  Is there a program for Ubuntu that covers this area?


To demonize an app, I used to use upstart. I know it is discarded from debian packages, but I still need it as I can not make my app run using systemd.   Currently, when I try to install it I get:  # apt install upstart Reading package lists... Done Building dependency tree        Reading state information... Done Package upstart is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:   systemd-sysv sysvinit-core  E: Package 'upstart' has no installation candidate   So appreciate your hints to install upstart.

When I try to install upstart on Debian 9, I get :  # apt-get install upstart Reading package lists... Done Building dependency tree        Reading state information... Done Package upstart is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:   systemd-sysv sysvinit-core  E: Package 'upstart' has no installation candidate    states that:     Installation is quite simple. The only package necessary is upstart.   My sources list:  ###### Debian Main Repos deb http://deb.debian.org/debian/ stable main contrib non-free deb-src http://deb.debian.org/debian/ stable main contrib non-free  deb http://deb.debian.org/debian/ stable-updates main contrib non-free deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free   How can I fix this error and install upstart?


I've gone through an intermediate classical mechanics course, and in solving the two-body problem, we reduce it to a one-body between a larger stationary mass, and a smaller reduced mass.  Most solutions I've seen of the hydrogen atom simply neglect the movement of the nucleus. Some solutions replace the electron mass with the reduced mass, for a more accurate answer.  Since the reduced mass is a result derived in classical mechanics, is it valid to apply it in quantum mechanics? Is it possible to derive the reduced mass within a quantum mechanical framework?

Why is a proton assumed to be always at the center while applying the ? Isn't it a quantum particle?


All coding "tutorials" I've used so far use single quotes (' '), but they need to escape apostrophes using a \.  So I've switched to use double quotes (" ") because they work just as well without the need to escape special punctuation signs.  Is there a difference how JavaScript or jQuery interprets the string depending on the type of quote I use? Is there a speed or possible syntax issues with using one over another?

console.log("double"); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable.


This is about my following declined but helpful flag.    History:  I saw an answer which almost copy-pasted another answer and I decided to flag that.  In my first flag, I chose not an answer option, as it was the closest. Also I try to avoid choosing in need of moderator intervention because I already received, "Using standard flags helps us prioritize problems and resolve them faster."  The first flag was declined with a common reason. But when I explained in a second flag with in need of moderator intervention (which was the only option to give an explanation). That flag turned out be helpful.  Feature Request:  Is it possible to add some feature(s) to ease the flagging of duplicated answer?  Note: I can think of two options:   A duplicate answer option to go with the original/first answer. An optional text box for description in not an answer option.

When flagging an answer there doesn't seem to be an option for duplicates. Is there an etiquette for this, or nothing in place?  If there is nothing in place can I suggest a flag as duplicate option. It seems rather annoying that people just rep hunt by duplicating previously stated answers, with changes that are limited or non existent.  I think the only use case where this might cause upset is when someone has genuinely submitted an answer, and someone else has just submitted theirs as they have been writing.   In this scenario, where the time between answers is short and a factor, then perhaps a 'merge' function could be introduced. Which then assigns joint authorship, splits the reputation for the answer and allows an editor to take the best of both duplicate answers.


I know he started as a bugler, he was in transportation and served in Italy and maybe ended the war in Germany. He was discharged as a second lieutenant. He also spent at least 20 years in the Army Reserve.  Where should I look to find out what unit he was in, his job, promotions, etc?

My grandfather enlisted in the US Army in 1942.   How can I find more details about his service?


Is it possible to programmatically replicate the iPhone feature where the screen dims and the touch functionalities are shut off when the phone is against your ear?

Can the iPhone SDK take advantage of the iPhone's proximity sensors? If so, why hasn't anyone taken advantage of them? I could picture a few decent uses.  For example, in a racing game, you could put your finger on the proximity sensor to go instead of taking up screen real-estate with your thumb. Of course though, if this was your only option, then iPod touch users wouldn't be able to use the application.  Does the proximity sensor tell how close you are, or just that something is in front of it?


I would like to get older versions of /private/var/log/system.log files from TimeMachine.  Is this possible?  How?   I see current system.log files. I went to folder /private/var/log then invoked TimeMachine.     When I go back to previous backup, I do not see system.log files.    relates to    User want to look through macOS log files to see history of external drive mounting. Data is in "/private/var/log/system.log".  Needed data is a month old. A month is longer than normal backup of system.log is keep.  Attempted to look in timemachine backup but it seems the older system.log files are not kept.

In addition to whatever files I may choose to exclude, what files does the system exclude by rule or classification?    It might make sense not to backup Trash or Caches, but I'm looking for a way to tell what files are skipped "behind the scenes." Knowing if the system maintains an exclusion list or exclusion pattern would be very helpful in managing larger groups of macs.


I am making my own login page. Just an HTML style for now.   As you might be able to see, via the jsfiddle below, the file I made is slightly off center. I want to completely center everything both vertically and horizontally.  Here is the JsFiddle,   Here is the source code,  <!DOCTYPE html>          <title>Login</title>     <meta charset="UTF-8">     <link rel="stylesheet" type="text/css" href="main.css">     <link href="https://fonts.googleapis.com/css?family=Raleway:100" rel="stylesheet">          <link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">     <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">

  Login       <input type="text" name="" class="username" placeholder="Username">     <input type="password" name="" class="password" placeholder="Password">       <class>     <button class="btn" onclick="myFunction()">Login</button>         <input type="submit" value="Create" class="btn2"/>              </class>

         And here is the CSS:  body, html  {   background:     linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px,     linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0px,     linear-gradient(27deg, #222 5px, transparent 5px) 0px 10px,     linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px,     linear-gradient(90deg, #1b1b1b 10px, transparent 10px),     linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);   background-color: #131313;   background-size: 20px 20px;    overflow-x: hidden;   overflow-y: hidden; }  .username {   display: block;   margin: 0 auto;   background: #333;   color: #ccc;   width: 150px;   padding: 6px 15px 6px 5px;   transition: 500ms all ease;   border: 1px solid #333;   margin-bottom: 10px;   text-align: center;   vertical-align: middle; }  .username:hover {   box-shadow: 0px 0px 4px #000; }  .password {   padding-top: 3;   text-align: center;   display: block;   margin: 0 auto;   background: #333;   color: #ccc;   width: 150px;   padding: 6px 15px 6px 5px;   transition: 500ms all ease;   border: 1px solid #333; }  .password:hover {   box-shadow: 0px 0px 4px #000; }  .LoginBox {   top: 40%;   left: 50%;   margin: -100px 0 0 -150px;   position: fixed;   padding-top: 50 auto;   width: 300px;   height: 300px;   padding: 25px;   background-color: firebrick;   z-index: -3;   box-shadow: 0px 0px 9px #000;   display: flex;   align-items: center;   justify-content: center; }  .Login {   display: block;   width: 100%;   text-align: center;   font-size: 30px;   font-family: 'Roboto Condensed', sans-serif;   color: #FFF;   margin-bottom: 1em;   border-bottom: 2px solid #ccc; }  .btn {     margin-top: 3em;     top 70%;     width: 70px;     height: 30px;     background-color: #333;     border: none;     color: #ccc;     cursor: pointer;     margin-right: 2em; } .btn:hover {     box-shadow: 0px 0px 4px #000; } .btn:active {     box-shadow: 0px 0px 5px #000; } .btn:focus {outline:none;} .btn2 {     margin-top: 3em;     top 70%;     width: 70px;     height: 30px;     background-color: #ccc;     border: none;     color: #333;     cursor: pointer; } .btn2:hover {     box-shadow: 0px 0px 4px #000; } .btn2:active {     box-shadow: 0px 0px 5px #000; }

Best way to center a <div> element on a page both vertically and horizontally?  I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?


I've just moved to the States and a family member kindly passed on an old AT&T iPhone 5. The trouble is that it's stuck in a reset loop. When I go into recovery mode and try to restore the phone, iTunes tells me that it can't restore the phone, and gives error 2001.  The background on the phone, as far as I can tell, is this: it started spontaneously shutting down, first every few hours, then progressively more, until it ended up like it is now. They took it to an AT&T store where the representative said it was because the phone's hard drive was full, but I am skeptical that's the real cause.  Is there anything I can do to wipe and restore this iPhone?

My iPhone 5 won't boot anymore and when I plug it in my MacBook, it goes to recovery mode (cable logo => iTunes logo).  So I tried to restore it using iTunes but I keep getting this error    Any idea how to fix it?  While it was plugged in I tried holding power + home, it reboots the device and goes back to recovery mode and then any restore attempt results in a 2001 error as well. When it's not plugged in nothing will make it boot.


The symbol I am looking for is something like a curvy P, where P_n(F) represents the set of all polynomials with coefficients in F and degree equal to or less than n.  Any suggestions?

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


$2$ is the $1$st prime.  $3$ is the $2$nd prime.  $5$ is the $3$rd prime.  $11$ is the $5$th prime.  $31$ is the $11$th prime.  ...  I'm just wondering if there is a name for this integer sequence, is it on ?. I find it hard to find a suitable search term for it.

$127$ has an interesting property: It is the $31$st prime number and its rank ($31$) is also a prime. $31$ is the $11$th prime so its rank is also a prime. $11$ is also a prime number with a rank ($5$) that is also a prime. $5$ is the 3rd prime number and and so its rank ($3$) is also a prime. And finally $3$ is the $2$nd prime so its rank is also a prime... Is there a name for primes whose rank (index in the prime series) is also a prime? That is:     If $a_i$ is the $i$th prime number, then $i$ is a also a prime.   How about numbers like $127$ where going down ranks of ranks always produce prime numbers (down to rank $2$ of course)? The first $11$ :-) primes in this (infinite) series would be:  $3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, \dotsc$  Many thanks!


100 participants have a fair coin each, on a given round, the not already discarded participants flip their coins, those who flip a tail are discarded from the game, the remaining ones continue to play until nobody is left (everyone has been discarded).  What would be the average number of trials (where each trial consists of a tossing and removing the tails) one would expect from doing this experiment?  Does conditional expectation work for something like this?   I know that each individual coin follows a Geometric distribution, but I am trying to figure out the sum of them to determine the average number of trials for a game like this. My Logic/Thought Process: I started out trying to think of the probability that a particular coin makes it to round $r$ which is $\frac{1}{2^m}$. I then realized that each coin outcome can be modeled by a Geometric random variables with $p = 0.5$. I am just now unsure how to take the leap from this single case to a case with 100 coins. I presume it has to do with summing the geometric random variables, but I am not sure.

Given $n$ independent geometric random variables $X_n$, each with probability parameter $p$ (and thus expectation $E\left(X_n\right) = \frac{1}{p}$), what is $$E_n = E\left(\max_{i \in 1 .. n}X_n\right)$$    If we instead look at a continuous-time analogue, e.g. exponential random variables $Y_n$ with rate parameter $\lambda$, this is simple: $$E\left(\max_{i \in 1 .. n}Y_n\right) = \sum_{i=1}^n\frac{1}{i\lambda}$$  (I think this is right... that's the time for the first plus the time for the second plus ... plus the time for the last.)  However, I can't find something similarly nice for the discrete-time case.    What I have done is to construct a Markov chain modelling the number of the $X_n$ that haven't yet "hit". (i.e. at each time interval, perform a binomial trial on the number of $X_n$ remaining to see which "hit", and then move to the number that didn't "hit".) This gives $$E_n = 1 + \sum_{i=0}^n \left(\begin{matrix}n\\i\end{matrix}\right)p^{n-i}(1-p)^iE_i$$ which gives the correct answer, but is a nightmare of recursion to calculate. I'm hoping for something in a shorter form.


How can I define something like this in c#:  list["alpha","beta"] = value;   And I want to access values such as dictionary:  var item = list["alpha","beta"];

How would i create a multi value Dictionary in c#?  E.g. Dictionary<T,T,T> where the first T is the key and other two are values.  so this would be possible: Dictionary<int,object,double>  Thanks


I found that tile map of each region in geoserver2.9.2 of platform independent binary displays its name two or more times. As shown in the first picture.   I have done as  and . However, some areas of label in sixth and seventh level do not show and some appear offsets. As shown in the second picture.  Here's my code:  <TextSymbolizer>  <Geometry>   <ogc:Function name="centroid">      <ogc:PropertyName>the_geom</ogc:PropertyName>   </ogc:Function>  </Geometry> </TextSymbolizer>   And then I have done as . It was same as above in seventh level.   Here's my code:  <VendorOption name="partials">true</VendorOption>   I have no idea how to modify it. Can anybody tell me?

I have following case. Map of highway with labeled points placed by some interval. Problem is with labels that are partially on particular tile. Sometimes they are not drawn completely. I tried to find out which code is responsible for exact drawing but geoserver is too complicated for me on first attempt. I'm looking for help with schema around drawing flow in just master branch of geoserver or any practical resolution of my case.


I have a few PC's with an ext4 filesystem that I want to backup to a file server which is also ext4. Problem is there are some discrepancies in file sizes when using rsync, and I have noticed this is due to sparse files.   The problem is I want to create an exact rsync copy of the filesystem using rsync over a network to keep weekly backups, in case I need to restore, and the restored data should be the same size as whats running on the PC.  Creating the test files, 1 sparse and 1 not:  mkdir testing dd if=/dev/zero of=testing/sparse-file.img bs=1 count=0 seek=5M cp testing/sparse-file.img testing/non-sparse-file.img --sparse=never   Rsync with and without sparse option:  mkdir testa testb rsync testing/* testa rsync --sparse testing/* testb   Results:  du -h 5.1M    ./testing 4.0K    ./testb 11M     ./testa 16M     .   testing has 1 file 5MB and one sparse file, testb had both files become sparse, testa had both files become non-sparse  But how do I make rsync maintain the file sparseness? So the filesystem will have the exact same size on the restored system.  I want to have certainty when I restore my system I'll know exactly how big the restored data will be, with sparse option, my restored system is going to be more sparse then what it was originally (I guess this is acceptable), and with the non-sparse option, this will result in an unpredictable larger restored system.

I am switching machines and have attached the old hard drive (/dev/sda4) to the new machine.  The old machine had a slightly smaller hard drive (720G), compared to the new one (736G), so I created a slightly larger partition as well.  So, I then ran rsync to copy all the data to the new partition, as shown below:  linux-70e2:/ # time rsync -azprvl /mnt/external-disk/foo /media/sda4/  ... sent 169,237,139,987 bytes  received 24,529 bytes  24,419,185.41 bytes/sec total size is 190,542,953,489  speedup is 1.13  real    115m30.297s user    112m13.068s sys     3m59.996s   The data gets copied without errors.  However, when I do:  du -h -m -s /mnt/external-disk/foo /media/sda4/foo   I get:  162414  /mnt/external-disk/foo 181721  /media/sda4/foo   Could somebody please explain this massive difference? Why am I not getting the same results? This is driving me nuts for days now. There are a few other partitions as well and I'm getting similar discrepancies as well.  Both partitions are ext4.  linux-70e2:/ # mount | grep sda4 /dev/nvme0n1p5 on /media/sda4 type ext4 (rw,relatime,data=ordered) /dev/sda4 on /mnt/external-disk type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)   To my knowledge, there is nothing wrong with both drives which are SSD-s. One of them is brand new. I've run e2fsck on both of them.  In addition, I ran:  find -L /mnt/external-disk type/foo -type l   and this doesn't list any symlinks below the source directory.  This is not my first time using rsync for this kind of thing, but I've never had this kind of issue before. Please, advise!


I use this command to download a folder from another server: scp -r username@server:~/folder1/folder2/”Folder with spaces”  It doesn't work, however for a folder without spaces it works. Edit: The folder contains many spaces and [], so escaping each one would be hard to. I tried without luck.

Recently it seems that shell has changed how it handles spaces in parameters. It used to handle them properly (Or at least as I intended it to), but now it recognises it as a bunch of different parameters and completely misses the escape character.  An example of a small script that used to work very well:  #!/bin/sh  exec /home/evan/.applications/Sublime\ Text\ 2/sublime_text $1   So I would give it some filepath with spaces and it used to open the proper file eg, /home/evan/Document/My\ File\ Path/file.txt would open that file.txt. Now it opens "My", "File", "Path", and some unknown "file.txt" Obviously, that won't be the file.txt that I am looking for.  Any help would be appreciated. Thank you in advance.  OS: Ubuntu 13.04 GNOME edition with latest updates  EDIT: I forgot to mention that the command executes perfect. The parameter does not.


I've noticed a tendency in recent technical literature to use feminine pronouns, instead of the more traditional masculine. For example one might write she [the user] enters her password. It's not difficult to see how this may come to be in the age of political correctness, but I always found it quite amusing. To countervail, some computer scientists have started calling the motherboard "fatherboard", which is even funnier.  Which brings me to my question: When I write technical documentation, I use the plural them or their with a singular user. For example, I might write something along the lines of the user enters their password, in an attempt to sound vague and non gender-identifying, while at the same time preserving the notion of the user as a person. While this sounds acceptable to my foreign ears, it occurs to me that I might be severely abusing the language.   Is my usage of their in this context correct? Is there something else that I can use in its place?

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


I am a student at the 2nd year of a B.Sc. in Biotechnology. I started reading some papers about complex systems and nonlinear dynamics applied to economy, biology of course, climate model etc... I would like to study theme better so i need a textbook from which i can start. I toke a calculus course and i am going to study multivariate calculus and linear algebra next months (self study). The question is: can anyone tell me about a book which is self-contained, about complex systems and nonlinear dynamics (even with applications)? I mean: a book that has some preliminaries about linear algebra or whatever i need to study these disciplines.

I'm rather interested in getting my feet wet at the interface of  and . Can anybody give me references to some good books on these topics? I'm looking for very introductory technical books.


I tried to compile latex 2 time after bibtex compilation. My references are in bib file and I am using jabref.  \documentclass[conference]{IEEEtran} \IEEEoverridecommandlockouts \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage[backend = bibtex, sorting=none]{biblatex} \usepackage{xcolor} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}   \addbibresource{facial expression recognition.bib} \begin{document}  \title{}  \cite{Ekman1971}   \maketitle  %\begin{abstract} %This document is a model and instructions for \LaTeX. %This and the IEEEtran.cls file define the components of your paper [title, text, heads, etc.]. *CRITICAL: Do Not Use Symbols, Special Characters, Footnotes,  %or Math in Paper Title or Abstract. %\end{abstract}  %\begin{IEEEkeywords} %component, formatting, style, styling, insert %\end{IEEEkeywords}  \section{Introduction}    \printbibliography \end{document}

I am using a Mac with TeX Live and Mendeley for automatically generating .bib files, some of which have spaces in the file names. I would like to know how to reference such files from LaTeX as using "" or \ doesn't seem to work.


This crash is happening when I click on the button to change the details. I was able to catch the exception with a try and catch but I don't want to mask the issue since it is a NullPointerException. Here is my onResume() activity. The exception is happening at setText().      @Override     protected void onResume() {         super.onResume();         if (getAirlineProfile().isStocksEnabled()) {             stockDao = new StockDao(CouchManager.OPERATIONAL_DB, MIUtils.getOperationalDatabaseIndexMap());             if (getAirlineProfile().isStocksEnabled()) {                 flightKeys = MIUtils.getFlightKeyList(stockDao, getAirlineIataCode());             }         }         this.continueWithSelectedDate = false;         this.flightDataValid = false;         if (getMiApplication().getBuildDate() != null) {             // setup required dates             today = Calendar.getInstance();             apkDate = Calendar.getInstance();             apkDate.setTime(getMiApplication().getBuildDate());         } else {             this.dateValidationsEnabled = false;         }         isFlightDateValid();         @SuppressWarnings("unchecked")         Optional<FlightLegIdentifier> flightLegIdentifier =                 (Optional<FlightLegIdentifier>) getIntent().getExtras().get(FLIGHT_LEG_IDENTIFIER);          flightPrefix.setText(getAirlineProfile().getAirlineIataCode());          if (flightLegIdentifier.isPresent()) {            FlightLegIdentifier fli = flightLegIdentifier.get();             flightOrigin.setText(fli.getOrigin());             flightDestination.setText(fli.getDestination());             flightOriginCityName.setText(getCityNameByAirportCode(fli.getOrigin()));             flightDestinationCityName.setText(getCityNameByAirportCode(fli.getDestination()));             flightNumber.setText("" + fli.getFlightNumberDigits());             LocalDate date = fli.getDate();             flightDate.set(date.getYear(), date.getMonthOfYear() - 1, date.getDayOfMonth());             flightDateButton.setText(DateFormat.format(DATE_FORMAT, flightDate.getTime()));                         passengerInput.setText(getFlsIfAvailable(fli).getNumberOfPassengers());          } }   Here is the LOG:  Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com.miairline/com.miairline.chooseflight.FlightDataActivity}: java.lang.NullPointerException        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3196)        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3225)        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2612)        at android.app.ActivityThread.access$900(ActivityThread.java:174)        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1325)        at android.os.Handler.dispatchMessage(Handler.java:102)        at android.os.Looper.loop(Looper.java:146)        at android.app.ActivityThread.main(ActivityThread.java:5756)        at java.lang.reflect.Method.invokeNative(Method.java)        at java.lang.reflect.Method.invoke(Method.java:515)        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)        at dalvik.system.NativeStart.main(NativeStart.java) Caused by java.lang.NullPointerException        at com.miairline.chooseflight.FlightDataActivity.onResume(FlightDataActivity.java:551)

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?