Why does the following code not work (using VS2013)?  class Test1 { public:   template<typename T>   using my_type = T; };  template<typename T, typename V> class My : public T { public:   using t_type = T;   using my_type2 = t_type::my_type<V>; };  int main() {   const My<Test1, double>::my_type2 x = 5.5;    return 0; }   Test1::my_type would have a more complex type. My would be a policy based class where Test1 would be one of the policies. my_type2 should become a specific type based on the policy. And Test1 can't be a template directly taking the type of V. Thanks.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Is there a stick or disk that I can buy to upgrade from 16.04 to 18.04?

I need to upgrade my existing Ubuntu system, and I also want to install Ubuntu on a new laptop.  I would like to have an installation CD or DVD to do both of these.  Where exactly I can order or request an Ubuntu installation CD/DVD/USB?


If $f$ and $|f|$ are analytic on a domain(open and connected) $D \subset \mathbb{C}$ , then show $f$ is constant on $D$. What I did: Since $|f|$ is analytic and since it is a real valued function then its derivative is zero in the domain and hence $|f|$ is constant. Thus we must have the derivative of $f$ is $0$ ( which I know how to prove). Thus $f$ must be constant. Is my logic correct? Thanks

Let $f$ be analytic in a domain (open connected set of the domain of definition) (that is, every point of that domain is such that $f'$ exists in that point and also in a neighborhood of radius $r>0$ of that point). Show that his absolute value $|f|$ can't be constant unless $f$ is constant too.   Firstly, I'm a little confused about the statement. I must prove $|f|$ is constant $\Rightarrow f$ is constant?  Assuming that's what I must show, here's my attempt: if $f$ and $\overline{f}$ are both analytic then $f$ is constant so if $f$ is not constant and $f$ is analytic we have that $\overline{f}$ is not analytic at some point $p$. But $|f| = \sqrt{f\overline{f}}$ so $|f|$ is also not analytic at the point $p$ so it can't be constant because constant functions are analytics at all points of their domain.  Is my attempt correct? Thanks in advance.


The problem is that when multiplying a double type number like 9.58 and storing it in a integer type number, I get 957 instead of 958. When I separately try to assign 9.58*100 to an integer in a program, it works. How come? #include <bits/stdc++.h> using namespace std; double roundit(double x) {     double e = x * 100;     e += 0.5;     cout << "func" << e << endl;     int d = e;     cout << "func" << d << endl;     e = (float(d)) / 100;     cout << "func" << e << endl;     return e; } int main() {     int t;     cin >> t;      while (t--) {         double a, b, c, d;          cin >> a >> b >> c >> d;         /*     say give      3     1.0 1.0 1.0 10.45     1.0 1.0 1.0 10.44     1.0 1.0 0.9 10.44     as input     */          double ans = a * b * c * d;          ans = 100 / ans;          cout << ans << endl;         ans = roundit(ans);         cout << "main" << ans << endl; //this part right here         int x = (ans * 100.0); //say instead of giving 9.58*100 =958, it gives 957         cout << "main" << x << endl;         cout << (x >= 958 ? "NO" : "YES") << endl;     }     return 0; }  i've checked this separately and this problem doesn't appear. Can you help

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a multilanguage - multidomain website developed in Drupal 7, and the database have been flooded with spam comments, even if I have Captcha module (image) installed. The spam comments are from 60 different IPs, and I have seen attempts to add node and add user (which is blocked) in the incidents reports.  So I cannot block so many IPs at the risk of them being dynamical and loosing potential users.  What could I do to prevent the spam and also to prevent the attacks? Thanks

I've installed reCAPTCHA module but spam still bypass my security and leave nasty comments. What should I do? How to block them?


I have the Latex code \textendash \textendash  Latex outputs a merged dash  Instead I want two separate dashes  How can I type two separate dashes?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


Can you apply and be admitted to a graduate school without having an undergraduate degree?

I have worked as translator for more than seven years in the industry. I have a background in cuisine for more than ten years. Now I would like to add an graduate degree related to Tourism, Hotel and Event Management to my professional experience.  Can I enroll in such a masters program without first acquiring a Bachelors degree?


Recall that an integer is said to be square-free if it is not divisible by the square of any prime. Prove that for any positive integer $n$, there exist $n$ consecutive nonsquare-free positive integers.  Having a lot of trouble with this problem, I tried searching this question up but only got problems similar to it and it still didn't quite help. We are currently covering a section on The Chinese Remainder Theorem. Our teacher showed us two ways of utilizing this theorem, one via back-substitution and one via the classical approach. Looking through my notes I don't see anything resembling this problem, any help is really appreciated.

So, I've got a question for class that asks me to prove the existence of arbitrarily long runs of consecutive integers where $\mu(n)$ is zero.   I've started the proof, but I need a bit of help midway through.  Assume there exists a run of length n, which we currently assume is the longest possible chain.  If we induct on n, we can assume there is a run of the form $m_1p_1^2, m_2p_2^2, ..., m_np_n^2$ (where each of the $p_i$ are prime).  If I add $M =  lcm(m_1p_1^2, m_2p_2^2, ..., m_np_n^2)$ to each number, I get another run of length n.  So here's where the issue starts. When I talked to my advisor about it, he referenced a theorem where there exists a prime $p$ congruent to $1\ mod\ M$.  I am unfamiliar with this theorem, so I'm not sure how to use this information. Any chance I can get some help? Or else is there a simpler way to go about this problem?


i already have this in my program:    The box says that i have logged in as "Admin - Administrator", Note that "Admin is the username that stored in the database" and "Administrator is the usertype that stored in the database"  Here is my code that shows that "Admin - Administrator":  user = result.getString("Username"); userType = result.getString("UserType");  _userInformation.setUser(user); _userInformation.setUserType(userType);  _infoBox.ShowMessageBox("Welcome \n You Have Logged in as : \n" + _userInformation.getUser() + " - " + _userInformation.getUserType() + " ! ", "Welcome" , 1);   However, when i tried to direct the page based on the usertype, it gave me nothing (the page didn't directed or the program stop at the image that shown at the above), here is my code after user click the ok button in that messagebox:  if (_userInformation.getUserType() == "Administrator") {     this.dispose();      _adminChoices.setVisible(true); }   When i trace the _userInformation.getUserType(), it gave me this:    Could you guys help me? 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?


I'm new to Ubuntu. I don't know how to access my hard disks in Ubuntu. I  used to access Local disk F in Windows that contained all my music, photos etc. How can I access that Hard drive in  Ubuntu ?

I'm new to how Ubuntu works and installed it yesterday alongside Windows 7, but in doing so I have created a few problems. I have partitions for Windows, Ubuntu, System Recovery, and storage for all my files with the intention to access them on either OS, but I don't even see all of my drives listed on Home Folder. Not to mention that  during the Ubuntu instillation I managed to screw up any chance of booting to the Windows side of things at all. I'll fix Windows once I get my hands on a copy in a couple days, but in the mean time any suggestions for accessing my files?  If you need me to find any data about my computer to help you figure out what's wrong with it, please don't hesitate to tell me what I need to show you. Thanks


I have a single large (8Tb) drive, and would like to buy two more and make a 3-drive RAIDZ1. My problem is, there is no easy way to back up the current contents -- it is too big. The entire drive is a single traditional filesystem (UFS version 1 in FreeBSD parlance). I think, it is possible to:  Create a "degraded" RAIDZ1 with the two new drives. Copy the files to this degraded array. Add the older disk to the array -- and initiate its recovery/rebuild.  Could someone help me with the actual commands for each of the steps? My system is FreeBSD, but it probably does not matter -- ZFS is ZFS...

I am moving from one server to another and want to bring some of the disks with me. Unfortunately, I do not have enough storage to back up all of the data on the old server.  Old server 4 disk RAID5  Bringing two disks from old server to:  New server 6 DISK RAID-Z2 (4+2)  Old server can take losing one disk but not two.  Could I set up the new server as RAID-Z2 (4+2) lacking one disk? Move all data and then add the last disk?  Or is there any other way around this?


class cls():     A = []  a = cls() b = cls() a.A.append("a") print(b.A)   I run this on python 3.4. but i see it print a stting "a".  I cant understand why this happen. a is different from b, but why they are share one var A?

Is it possible to have static class variables or methods in Python? What syntax is required to do this?


Using Wilson's theorem, show that if $p$ is prime of the form $p=4n+1$ and if $y=(\frac {p-1}2)!$, then $y^2\equiv -1\mod p$.   My attempt: By Wilson, $(4n+1-1)!\equiv (4n+1-1) \mod p$,$(4n)!\equiv4n\mod p$. The statement we want to show is equivalent to  $((2n)!)^2\equiv 4n\mod p$, which is transformed into $((2n)!)^2\equiv (4n)!\mod p$

I need to show that for prime numbers of the form $p=4n+1$, $x=(2n)!$ solves the congruence $x^2 \equiv-1\pmod p$. I then need to show this implies p isn't a gaussian prime.   I have started to solve this using Wilson's theorem that a number $z$ is prime iff $(z-1)!\equiv-1\pmod z$. Therefore the endpoint of my proof should be that $(p-1)!\equiv-1\pmod p$.  As $p$ is of the form $p=4n+1$, I only need to prove that $4n!$ is congruent to $-1$ modulo $p$.   Here is my working so far: Starting with the congruence $x^2 \equiv -1\pmod p$:    $$\eqalign{x^2 = -1\pmod p&\implies   x^2 + 1 = kp \implies (x-i)(x+i) = kp\cr &\implies ((2n)!-i)((2n!)+i))=kp \implies 4n!- 1 =kp\cr}$$   This is where I start to run out of any ideas that seem to get me anywhere. Any tips would be greatly appreciated!


says  Enchant Creature Creatures you control that are enchanted get +1/+1 If a creature you control that's enchanted would die,  return it to it's owners hand instead.   Is that a +1/+1 counter? Or is it just a modification to the P/T?  Also, given the language it reads as if it means to say any creature enchanted by any enchantment. Correct?

Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ?


The attached image is what's currently displayed if I click on the wheel in Finder. Is it related to 'bird' and if so how?     But does anyone know what causes this to happen?  OK. Thanks to another post, I'm on the trail of the culprits.  robert@zeus brctl-dump % brctl monitor com.apple.CloudDocs|grep %   o /com~apple~CloudDocs/Downloads/badaboombb_ot/fontinfo.txt ↑ 2 KB (1834) 95.0%   o /com~apple~CloudDocs/Downloads/backissuesbb_ot/fontinfo.txt ↑ 2 KB (1834) 95.0%   o /com~apple~CloudDocs/Downloads/Afans Live Filters - for Designer 1.6.zip ↑ 92 KB (91525) 95.0%    And so on for a maybe hundred files in my case. All files show the little UP arrow, indicting that uploading is still taking place, and the percentage left at the end of the file info. All of them 95% SO it seems to be getting stuck at 95%?  Also, some of the files listed no longer exist. I've long since deleted them, yet here they are still in the upload list. What to do.  I found this useful info in another post here.   ======== Progress of sorts ========  In all this - Photos is syncing perfectly. Anything from any of my devices, iPhone and iPad is syncing perfectly. It's just this Mac that seems to be stuck.  Doing a 'log show | grep Cloud streams a LOT of information about what's happening. And this looks interesting, and there is a lot of it repeating. Does this indicate something is Stuck and throttling iCloud?  2020-01-22 13:18:20.328917+0000 0x459b     Error       0x807e               469    14   bird: (CloudDocsDaemon) [com.apple.clouddocs:default] [ERROR] Failed to remove sync root bit [22: Invalid argument] 2020-01-22 13:18:20.329095+0000 0x459b     Error       0x807f               469    14   bird: (CloudDocsDaemon) [com.apple.clouddocs:default] [ERROR] Failed to remove sync root bit [22: Invalid argument] 2020-01-22 13:18:20.329174+0000 0x459b     Error       0xbc20               469    14   bird: (CloudDocsDaemon) [com.apple.clouddocs:default] [ERROR] renameat(-1, '<private>', 21, '<private>', 4) failed after trying to fix permissions [17: File exists] 2020-01-22 13:18:20.329313+0000 0x459b     Error       0xbc21               469    14   bird: (CloudDocsDaemon) [com.apple.clouddocs:default] [ERROR] -[BRCStageRegistry moveFromStage:toPath:fileName:error:]: (passed to caller) error: Error Domain=NSPOSIXErrorDomain Code=17 UserInfo={NSDescription=<private>} 2020-01-22 13:18:20.329422+0000 0x459b     Fault       0xbc22               469    14   bird: (CloudDocsDaemon) [com.apple.clouddocs:default] [CRIT] UNREACHABLE: Failed to move from fault stage to live Error Domain=NSPOSIXErrorDomain Code=17 UserInfo={NSDescription=<private>}

I got the macOS Sierra update when it went into public beta, and I've been trying to use the automatic .  I've enabled the feature, however since September 7 no files have been uploaded. By this point, the bottom of my Finder windows say:     15.78 GB available on iCloud, uploading 156,106 items (543.2 MB of 543.2 MB)   However the files are never actually uploaded. I keep my screenshots folder on my desktop and I take a lot of screenshots, so I can see that September 7 was the last date any file was actually uploaded.  What should I do? Is there a way I can disable and re-enable the feature without risking loss of data? Are there any solutions to this problem? What should I try? So far I've tried rebooting, and tried software update to macOS 10.12.2 public beta.


I'm trying to download a apt file of Adobe Flash Plater for other browsers but I can't seem to find the Software Center. There is no application already checked off for downloading it. Does anyone know where it is?

I'm trying to download an Apt file but I don't know how to. I'm using Firefox too.


I need to make a photo of an iPhone case. The picture I've got with my rig used for other (non reflective) cases gave me the following result:    Which I don't like as it don't shows the reflective surface.  I tried to reflect articulated softbox in the front surface. But I get the following:    Don't look at the bad angle and uneven background - it's preproduction shot, my main concerns are:   the roughness of the light glare accuracy needed to set the position of the subject   As you can see the glare is unpleasant. At least I'm far from being satisfied with both these images.  I'd be happy to get something like this:    But in my case the surface is not so flat on a macro (it is a rubber or something like that so it has some curvature) and micro (it has some grains) levels.  Can you suggest anything to make the shots better? My only thought is to draw the glare in Photoshop, but I have tons of those cases to take a shot so I'd better make a rig and save my time with postproduction.  UPD: I decided to make the glare in Photoshop. Of course it is a time consuming job, but I think that the natural glare will be also tricky to obtain and the quality will be probably not as expected. My current result is the following:

I have been asked by a client to take some product photographs of some vintage mirrors that they would like to sell and I am struggling with getting good clear shots of the mirrors. As such, what is the best way to approach photographing them such the mirror does not appear to be washed out or contain any unwanted reflections?


I'm a beginner (I bike 10km a day on a BSO MTB, but I guess that doesn't count) to long distance biking. I signed up for a 40km charity bike ride that happens next month. Thought I'd practice for it yesterday and found out my current bike is not up to it.  I'd like to invest in a decent bike (say 500 euros?). Is the BTwin rc 100 road bike any good? Or does anyone have suggestions for a decent bike, that will help me get into long distance biking?  Or should I get an MTB/hybrid?

I've been riding a mountain bike for years, but I prefer to go longer distances on paved ground, so I think a road bike would be better. When I ask what is a good bike, I don't need brands or models - more like what components of the bike should I look for, and what should I avoid? Additionally, is it necessary to "go big or don't go at all" as far as spending - getting a real good quality road bike for $500 to a few thousand, or should I cheap out on a $100-200 road bike, as it is my first, then get a better one when I'm more experienced?


In a lot of movies, at some point a character gets his/her teeth broken. As an example, I could cite "Dumb and Dumber", "The Hangover Part III", etc... Do they use a specific technique to fake a broken tooth ? Because I doubt they're using CGI images, or the green background technique to fake it.

So today I was watching Grown-up again and saw the tooth of Lenny's daughter fell and we can see she had no teeth. Similarly, I remembered a scene with a missing tooth in the Hangover part 1. So I thought, how do they do toothless shots? Are the actors really toothless and they wore prop teeth for the previous scenes? So I searched for the Hangover missing tooth scene and found an :  The missing tooth, how did they do that? Ed Helms: "When I was 15 I lost a tooth and had an implant put in. Cut to 20 years later, I'm doing this part and the script calls for my character to lose a tooth. We did some camera tests blacking it out, we made a prosthetic with a gap in it, but that made me look like a donkey, so I vetoed that right away. And then I just finally called my dentist and said, 'You know, I've had this implant for 20 years. What's it involve in taking it out?' And he said, 'It’s actually not that big a deal. We can do that.' So we took it out and I was toothless for three months, for the run of the movie."  But my question is, is it always possible to hire such an actor who has lost his/her tooth in the past? Each director/producer may not get that lucky. But there are a lot of movies where tooth picking or losing is shown. Like the girl in Grown Ups or the guy in The Tommyknockers (). So what do they do then? How are they able to show a toothless mouth?


I replace my windows 7(was not booting) to ubuntu, but now ubuntu will not start withou the usb have tried many approaches without luck, have tried reinstalling grub but still not luck boot-repair gives me a message to GPart, i am new user to ubuntu love the new system but want it to be my permanant os on my laptop.

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


First, I am very aware this seems like a duplicate. I have already tried the approach described  and, as I commented, it failed.  What I have - a Stack Exchange login associated with an old e-mail address which will soon no longer be valid.  What I want - a Stack Exchange login associated with a new e-mail address.  I have already associated this e-mail address with my account in e-mail settings, and as part of following the instructions linked above, have logged in using that e-mail address - but that's still really using the old details - the new password that I set up following the recovery step is still (on the My Logins) associated with the old e-mail address. It looks very much as if when I delete that old Stack Exchange login (with the e-mail address which soon won't be valid) I lose any ability to login because by deleting that I delete the password too.  I'm aware that I can set up as many new logins as I want, but these are logins using third-party accounts that I don't want to use and which I mostly don't even have - I don't have a Facebook account etc etc etc.  The "My Logins" page doesn't appear to allow me to change the e-mail address for my existing login. Nor does it allow me to create a new Stack Exchange login and delete the old one. With the new e-mail address associated with my new account due to following those instructions, I now doubt that I can follow the various clues I've seen about creating independent accounts and getting them merged and, having already spent more than an hour on this (stumbling around my profile in disbelief even before thinking that maybe this really is hard enough to need Meta questions and answers) and having followed instructions from a recent Meta answer only to find they're not just unnecessarily obscure, indirect, long-winded and complex, they don't even work, I really want more direct and reliable guidance than whichever breadcrumbs I stumble on next. And with this being the first account I'm trying to change, I seriously hope all the rest won't take this long.  BTW - why is such an obviously needed thing made so stupidly difficult "by design"? I see lots of comments pointing out that an e-mail address blatantly is not a permanent property of a person, I see nothing that gives reasons for the decision. "By design" in itself is NOT a reason, and in the many contexts where that's all the justification that's stated, looks like a deliberate evasion.  Also, the  does not seem to include advice for when people need to change their e-mail address in the "Accounts, registration and logging in" section. Why not?

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


It was clearly mentioned in Deathly Hallows that you can't curse someone under the Invisibility cloak,  since it is one of the Deathly Hallows and Death has given immunity. Even if Dumbledore was the most powerful wizard alive, how did he overcome the power of the Cloak of Death himself; that, too in such a weakened state? Here is the excerpt from the 6th book Harry Potter and the Half-Blood Prince, Chapter 27, page 584... So did i actually find a mistake in the book or is there a proper explanation?     Harry hurried over to the door leading to the spiral staircase, but   his hand had only just closed upon the iron ring of the door when   he heard running footsteps on the other side. He looked around at   Dumbledore, who gestured him to retreat. Harry backed away,   drawing his wand as he did so.   The door burst open and somebody erupted through it and   shouted, “Expelliarmus!”   Harry’s body became instantly rigid and immobile, and he felt   himself fall back against the tower wall, propped like an unsteady   statue, unable to move or speak. He could not understand how it   had happened — Expelliarmus was not a Freezing Charm —   Then, by the light of the Mark, he saw Dumbledore’s wand flying   in an arc over the edge of the ramparts and understood. . . .   Dumbledore had wordlessly immobilized Harry, and the second he   had taken to perform the spell had cost him the chance of defending   himself.   This was while Harry was under the Invisibility Cloak.

In Harry Potter and the Half-Blood Prince, after Harry eavesdropped on Malfoy on the Hogwarts Express, Malfoy cast Petrificus Totalus on Harry while Harry was wearing his Invisibility Cloak.   How did the spell work, when Deathly Hallows tells us that no spell used against the Invisibility Cloak will work? (Harry's cloak was not an ordinary cloak and was a gift by Death, himself, to his ancestors, passed down to him)  To prove my point, sometime later in Deathly Hallows, one of the Death Eaters tried to Accio the cloak to find Harry, which didn't work.  So this contradicts J.K. Rowling theory.     Ah, but the Third Hallows is true Cloak of Invisibility, Miss   Granger! I mean to say, it is not a traveling cloak imbued with   a Disillusionment Charm, or carrying a Bedazzling Hex or else   woven from Demiguise hair, which will hide one initially but fade   with the years until it turns opaque. We are talking about a cloak   that really and truly renders the wearer completely invisible, and   endures eternally, giving constant and impenetrable concealment,   no matter what spells are cast at it. How many cloaks have you   ever seen like that, Miss Granger?


Okay so I took my husband on a quest and we were getting attack and I lost site of him but heard him fighting. After I had defeated the people I was fighting and went to help him. After we defeated them he just disappeared, I thought he went to our house in Whiterun but he didn't then I looked in Rifton but he wasn't there. So I have no clue where he went.

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


I'm an ex windows user and I loved to move windows clicking on the windows logo button and using arrows.  Is there something similar on Mac?

Here's what I'm trying to accomplish using only a keyboard:   Move a window to different areas/corners of a desktop Move a window to different desktops Set/unset a window as shown/sticky on all desktops   Yes, I know #3 could solve #2 by stickying a window, pressing ctrl+⌘+←/→, then unstickying it, which would be acceptable, but i'm hoping for something a little more elegant :)      NB, if 1..3 can be solved in AppleScript, that would be great because  has been invaluable to tie an AppleScript to a global keyboard shortcut. However I don't think AppleScript can do this type of window location manipulation and a native Cocoa app may be required.   I really want to return to my keyboard-only nirvana but in my adoptive platform and shed Ubuntu Desktop.


Prove that the polygon of $n$ sides with the bigger area, inscribed in a circumference, is always a regular polygon.  Ex (because the way in which I wrote the statement maybe was not clear and produces confusion): For $n=4$: Prove that the inscribed quadrilateral with bigger area is always a square.  I thought that this problem was easy, but i don't see the way to prove this  Any hints?  Edit This problem is mean to be solved without trigonometry, so the post linked as duplicated doesn't help me

My question: Let $n$ points $A_1, A_2,\ldots,A_n$ lie on given circle then show that $\operatorname{Area}(A_1A_2\cdots A_n)$ maximum when $A_1A_2\cdots A_n$ is an $n$-regular polygon.


I am trying to split names into columns, for example, column 1 named "Name would contain in row 1 the varChar "Jesus Lopez" How could I split it up so that I can create a second column with row 1 to contain "Jesus" and a third column with row 1 to contain "Lopez". I can only use string functions to accomplish this task.   I thought about using the Left() function and Nest Charindex() to find the first set of string. I'm trying to figure out gather the rest of the name and put it on its own column.   Select Name,       Left(Name, Charindex(' ', Name)) as FirstName,  From Person.StateProvince   I expect to have a total of 3 columns. One with the original name, another with the first name only, and lastly a third column with what ever is left from the data in the first column.

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


I have seen the following problem:  Any number $n>11$ can be formed by the sum of two composite numbers  and it says to prove it by contradiction. I have done the following:  Assume that the sum will be formed by non-composite numbers. Because a composite number is one that has at least one divisor that is not one or the same number; I can assume that it could be the sum of two prime numbers (because these are not composite). From this point I can say that adding both numbers which are primes, a and b, will give us necessarily an odd number. So: $a=2p+1$ and $b=2p+1$, adding both I will have:  $a+b=2\cdot 2p + 2 = 2(2p+2)$ which is an even number, leaving any odd number; and giving us a contradiction that our theorem will hold for any n>11.  A similar proof can be done if we suppose that one number is composite and the other not, in this case any even number will be left out.  is this fine?  Thanks

I have thought a lot but am failing to arrive at anything encouraging.   First try: If this is to be proved by contradiction, then I start with the assumption that let $n$ be a number which is a sum of two numbers, of which at least one is prime. This gives $n = p + c$, where $p$ is the prime number and $c$ is the composite number. Also, any composite number can be written as a product of primes. So I can say, $n = p + p_1^{e_1}.p_2^{e_2}...p_k^{e_k}$. From this, I get $n - p = p_1^{e_1}.p_2^{e_2}...p_k^{e_k}$, but I have no clue what to do next.  Second try: For an instant let me forget about contradiction. Since $n > 11$, I can say that $n \geq 12$. This means that either $p \geq 6$ or $c \geq 6$. Again I'm not sure what to do next.  Finally, consider that the number 20 can be expressed in three different ways: $17+3$ (both prime), $16+4$ (both composite), and $18+2$ (one prime and one composite). This makes me wonder what we are trying to prove.  The textbook contains a hint, "Can all three of $n-4$, $n-6$, $n-8$ be prime?", but I'm sure what's so special about $4, 6, 8$ here.


I am trying to modify the data source of a raster layer in python, then update my composer and finally save it.  To modify my data source I found what is needed here:   The problem is that I lose the symbology of this layer in the legend of my composer. I tried different codes but none update my composer legend :  iface.activeComposers()[0].composition().refreshItems()  for i in iface.activeComposers()[0].composition().items():     if isinstance(i,QgsComposerLegend):         legend = i         legend.updateLegend()   The only solution I found at the moment is to use the "setAutoUpdateModel" method on my legend and switch to True / False Auto Update to force the legend's update, but this solution is not optimal.  => I wish I could just update the symbology for a particular layer in the legend of my compose (a bit like when in the interface of my composer I click on my legend then in "property of the object" right clicks on my layer and "back to default").  Would anyone have an idea to do that?  EDIT :  I have found a solution here :    My new code :   for legendLyr in iface.mapCanvas().layers():         renderer = legendLyr.renderer()         myRenderer = renderer.clone()         legendLyr.setRenderer(myRenderer)         legendLyr.triggerRepaint()   Now my composer legend is refresh !

Using code I found at  I can access the  the layers in my legend fine. However, I have layers that are styled by category and I can't figure out how to change the category labels. I just want to replace the underscores in the category labels with a space.   After looking through the API I think I may be able to use the rendererV2 class. The code below is giving strange results. the first set of print commands return 'foo', but the second set return the original labels and these are also printed on the output pdf.  Is there something I'm missing with the renderer? or, is there a better way to achieve this task?  I'm using QGIS 2.18.7 on windows 8      for legendLyr in iface.mapCanvas().layers():         if legendLyr.name() != "os1250_line" and legendLyr.name() != "os1250_text":             renderer = legendLyr.rendererV2()             if renderer.type() == "categorizedSymbol":                 myRenderer = renderer.clone()                 for cat in myRenderer.categories():                     cat.setLabel("foo")                     print(cat.label())                 legendLyr.setRendererV2(myRenderer)                 for cat in legendLyr.rendererV2().categories():                     print (cat.label())                 legendLyr.triggerRepaint()


Today there was a seminar regarding modern air crafts held in my school. At the starting of the lecture, we were asked a question which I found quite intriguing.  "Why does a helicopter or a fixed wing aircraft or anything stationary in mid air need to move to get to a certain place? Why cant it just stay mid air and wait for the destination to arrive to itself?"  (We were asked to answer it at the end of the lecture. Throughout the lecture I was thinking about the answer. I know that on ground due to friction, the relative velocity between the earth and us is zero hence we don't observe any such effect. Also according to what I can imagine, at lower altitudes, the air closer to earth would also be in motion and that might be the reason due to which the helicopter stays in one place with respect to the ground.)  But what about high altitudes where the air density is low. I know my reasoning might be incorrect. I looked through the net but did not find a satisfying answer.  (Edited) Add-ons to make the question clear (1) Initially when an airplane is on the ground, it moves with the Earth.   (2) Assume this airplane takes off in a direction opposite to the Earth's direction of rotation. There will be a point, when the plane acquires equal speed of the Earth but in opposite direction.   (3) So as viewed from the space, the airplane would appear stationary.   (4) Assume that the engine of the airplane is self sufficient and it does not require external air as oxidizer , and that the viscous effects are neglected (though theoretically , without viscosity, the plane would not fly, but this is just an assumption) .  (5) Now in such a case where the plane is mid air and is stationary when viewed from space, would my proposition hold true?

Say I'm flying from Sydney, to Los Angeles (S2LA), back to Sydney (LA2S).  During S2LA, travelling with the rotation of the earth, would the flight time be longer than LA2S on account of Los Angeles turning/moving away from our position?  Or, in the opposite direction, would the flight to Sydney be faster since the Earth turns underneath us and moves Sydney closer?  ===   Please ignore jet stream effects and all other variables; this is a control case in an ideal environment. By "dramatically" I suppose I mean a delay of 1 hour or more.


Define a function $\delta : \mathbb{Z}[i] \rightarrow \mathbb{N}$ by $\delta(a+bi)=a^2 +b^2$. Show that $\delta$ is a Euclidean valuation on the Gaussian Integers $\mathbb{Z}[i]$ i.e. For Gaussian Integers $a,b$ there exists Gaussian Integers $q,r$ such that $a=qb+r$ with either $r=0$ or $\delta(r)<\delta(b)$.  What I have so far: Let $a=a_{1}+a_{2}i$ and $b=b_{1}+b_{2}i$ be Gaussian Integers. Then $\frac{a}{b}=\frac{(a_{1}b_{1}+a_{2}b_{2})+(a_{2}b_{1}-a_{1}b_{2})i}{\delta(b)}$. Let $q$ be the Gaussian Integer which is closest to $\frac{a}{b}$ in the complex plane and $r=a-qb$. I then think I need to show that $r$ is suitably small, but I'm unsure how to do this. Any help would be greatly appreciated.

I'm having some trouble proving that the Gaussian Integer's ring ($\mathbb{Z}[ i ]$) is an Euclidean domain. Here is what i've got so far.  To be a Euclidean domain means that there is a defined application (often called norm) that verifies this two conditions:   $\forall a, b \in \mathbb{Z}[i] \backslash {0} \hspace{2 mm} a \mid b \hspace{2 mm} \rightarrow N(a) \leq N (b)$ $\forall a, b \in \mathbb{Z}[i] \hspace{2 mm} b \neq 0 \rightarrow \exists c,r \in \mathbb{Z}[i] \hspace {2 mm}$ so that $\hspace{2 mm} a = bc + r \hspace{2 mm} \text{and} \hspace{2 mm} (r = 0 \hspace{2 mm} \text{or} \hspace{2 mm} r \neq 0 \hspace{2 mm} N(r) \lt N (b) )$   I have that the application meant to be the "norm" goes: $N(a +b i) = a^2 + b^2$, and I've managed to prove the first condition, given that N is a multiplicative function, but I can not find a way to prove the second condition.   I've search for a similar question but I have not found any so far, please redirect me if there's already a question about this and forgive me for my poor use of latex.


I have the following lines of code and compilation errors. It should be my wrong understanding of the template function, or c++ generics, or something else. Thanks in advance for pointing it out.   #include <iostream> #include <vector>  using namespace std;  template <typename T> T* find(vector<T> &vec, T value) {   vector<T>::iterator first = vec.begin();   vector<T>::iterator last = vec.end();   for(; first != last; first ++)       if(*first == value)           return first;   return 0; }   The compile errors in console  debug.cpp: In function ‘T* find(std::vector<T, std::allocator<_CharT> >&, T)’: debug.cpp:9: error: expected `;' before ‘first’ debug.cpp:10: error: expected `;' before ‘last’ debug.cpp:11: error: ‘first’ was not declared in this scope debug.cpp:11: error: ‘last’ was not declared in this scope

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Prove that:In a commutative ring $R,$ $x = uy$ for some unit $u \in R^{\times}$ iff $(x)=(y)$ as ideals. My thoughts: I feel like the idea is similar to the proof of the following proposition: Proposition. Let $I$ be a left or right ideal of a ring $R$ with unity. Then $I = R$ if and only if $I$ contains a unit. Proof: Let $I$ be a left ideal of $R$. If $I = R$ then $1 \in I$, so $I$ contains a unit. Conversely, if $u \in I$ is any unit, let $u^{-1}$ be its inverse. For any $r \in R$, we have $r = r (u^{-1} u) = (r u^{-1}) u \in I$, because $I$ is a left ideal. Thus $I = R$. This logic is easily adapted for right ideals to show the same result. Certainly it then is true for two-sided ideals and ideals of unital commutative rings. But still I do not know how to write a rigor proof, could anyone help me in doing so please?

Recall the following relevant definitions. We say that   $b$ is divisible by $a$ in $R$, or $a\mid b$ in $R$, if $b = r a$ for some $r\in R$. $a$ and $b$ are associates  in $R$ if $a\mid b$ and $b\mid a$, (or, equivalently, if $aR = bR$). $u\in R$ is a unit if it has a multiplicative inverse (a $v\in R$ such that $uv=vu=1$). $a$ and $b$ are unit multiples in $R$  if $a = ub$ for some unit $u\in R$.   Given these definitions, my question is,     If $R$ is a commutative ring with unity and $a,b\in R$ are associates in $R$, are $a$ and $b$ unit multiples in $R$?   I was told that this not always true. But I encountered some difficulties in finding a counterexample.


How to prove: $\cup_n[\frac{1}{n},1] = (0,1]$, where $n \in \mathbb N $  The only thing I'm aware of is that we have to prove both left to right and right to left as I'm dealing with sets, and couldn't find a starting point. Can anyone help with this?

Prove   $$\bigcup _ { n \in \mathbb { N } } \left[ \frac { 1 } { n } , 1 \right] = ( 0,1 ]$$    I'm having some trouble starting this proof because I'm not really sure how to get started on this. Any help would be appreciated.


I'm having a lot of trouble turning an array into an ArrayList in Java. This is my array right now:  Card[] hand = new Card[2];   "hand" holds an array of "Cards". How this would look like as an ArrayList?

I have an array that is initialized like:  Element[] array = {new Element(1), new Element(2), new Element(3)};   I would like to convert this array into an object of the  class.  ArrayList<Element> arraylist = ???;


I'm managing a Wordpress site and in the lasts months an strange 502 Bad Gateway error has been appearing. I enabled the log and discovered that it tries to access to strange urls like:   gd-join.com  www.toupiaovip.com  balkanskichat.com  gtaturk.com   The log line is this:     stream_socket_client(): unable to connect to tcp://gtaturk.com:80   (Connection timed out) in   /usr/share/nginx/html/wp-includes/class-http.php on line 1008   What could be the reason?

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


So I have the GW10 icon in my notification area icons menu, where I can select from the drop down menu one of three options. When selecting the "show icon and notifications" option, I get a response stating that this icon is not active. How do I get it to become active so that I may register to DL windows 10?

TL;DR: The Windows 10 upgrade icon went missing. How do I get it back in order to update my system? I am running Windows 7 SP1.   I woke up this morning... er, noon all excited about Windows 10. I had reserved my copy using the clever little icon in the taskbar a few weeks back, so I thought I would be set to go. I booted my computer and checked the icon to see if it would download the update. It still behaved the same as if Windows 10 wasn't launched yet. I supposed this was normal behaviour. After all, Microsoft can't roll out the update to everyone at once.   Windows Update did want me to install several updates though. I installed KB2952664, KB3064209 and KB3048761. Everything went fine, and I was prompted to restart my system.   After restarting, the icon wasn't there anymore. I tried a lot of solutions including the answers provided by our awesome community on , and the answer provided to  posted on the Microsoft Windows support forums.   How do I get the icon back in order to update my system?  UPDATES:   Installing from the Media Creation Tool does not working with an error "Something Happened" with as description "Something Happened". Both are translated from Dutch.  I tried to install it from the Media Creation Tool using PowerISO to mount the created ISO. It will not accept my product key, even though I am able to verify my Windows installation is already registered and the product key is correct. I looked into the Event Log, and GWX-Ins has a bunch of error messages saying: Error message: GWX Main: App failed to start hresult. After that it says what is roughly translated to English as "Cannot find the element".


I am having troubles with this integral:   $$\int \frac{1}{\sqrt{e^{2x}+e^x+1}}dx.$$   Could anyone help me?


I have completely the same problem as the guy in this . So basically I am using nano somefile.txt editing it and then permissions denied because I forgot to use sudo. The only difference from the question is that I am using nano and therefore accepted solution does not work.  Is there anything similar for nano?

I edited a file in  /etc/ that I want to save, but forgot to open it using sudo. I remember there was a command to save such a file in vi, and want to know if there is any such way to do it in nano?  Thanks.


So I'm creating an animation and I've faced a serious problem. There's a moving object and I want a rope to be attached to this object while its moving, and the other end of the rope should be connected to somewhere else offscreen. I've used some techniques I've seen on youtube. But none of them were good for my case. Some tips would be appreciated.

I'm trying to simulate a rope (that later might get pulled on the ends*) that interacts with some obstacles. So far I created a plane as the floor and a cube as an obstacle, and activated "collision" in the physics menu for both of them.   *(In the end the goal is simulating a .)  For modelling the rope, I tried using a long cylinder with enough subdivisions, and activate "cloth" in the physics menu. This resulted in the cylinder collapsing like a sleeve of a sweater, but I would like the cross section to remain roughly circular. Is there a way to directly avoid this?   Another approach I tried now was just using a a line made up of vertices and edges (with the idea of later adding modifiers to give it a thickness), but this just fell through all the collision objects as it has no faces. Is there good way to do this?


I did the below.   Shift D ( Duplicate ) ESC ( cancel Grab ) Move object by Maniplator   At 3, not only the copy but also the original object moves. But I want the original object to stay the original position before duplication.  Please see this gif and .blend file if necessary.          Could you tell me how to avoid this problem?

I'm facing this frustrating "feature" that I can't seem to remedy; when I duplicate an object (and now, even when I create two completely new objects), their transformations/scaling is synchronized. This is extremely annoying when trying to use any sort of transformation keyboard shortcut.  It should be noted by going to the properties menu (N) and manually setting the properties works just fine.  For instance, here is just the camera selected (trust me, I made sure):   And when I try to transform by clicking+dragging on the X axis OR by hitting G->X, this happens:   They are not grouped (verified by going to the Groups list up in the Scene panel) and they do not have parents (verified by going to Object->Relations).  I have tried the unlink command as well, to no avail.  I have seriously run out of options; what did I change to have my G->X shortcuts transform multiple objects? It seems completely at random, too; certain objects seemed to be "linked" to other random objects, and this "linking" is guaranteed when duplicating even when I do a non-linking duplicate (Shift+D).  What gives?


I spent many hours researching on Stack Overflow for help on a particular programming challenge. I didn't find an answer close enough to what I was looking for. I was going to post a new question, but as I was writing it up I kept thinking of new approaches. Eventually I was able to write a function to solve the problem.  My question is, for the benefit of the community, can I post a question and the answer immediately?  Is this frowned upon? Can I accept my own answer?  A secondary question, and maybe unrelated to Meta, is there a place on Stack Exchange to share code snippets? In this case my question relates to VBA and regular expressions.

I might want to answer my own question because:  I arrived at a solution before there were any other correct answers or I like mine better, can I still answer my own question?  I have a folder with lists of code snippets for things I always forget or get wrong, such as regular expressions for processing XML, common WinForms control idioms, etc. Is it considered poor etiquette for Stack Overflow to ask a question I already know the answer to, and then self answer, just so it gets recorded on the website?   Related:          For more information, see "" in the .


I want to convert strSqliteDate﹕ = 2016-01-14 05:34:50 PM  into 2016-01-14 .After converting all dates my application was crash and getting error of  02-01 12:03:15.204    7619-7619/com.example.tazeen.classnkk W/System.err﹕ java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference 02-01 12:03:15.204    7619-7619/com.example.tazeen.classnkk W/System.err﹕ at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1035) 02-01 12:03:15.204    7619-7619/com.example.tazeen.classnkk W/System.err﹕ at java.text.DateFormat.parse(DateFormat.java:577)   At this line   date = dateFormat.parse(strSqliteDate);  and second getting error at this line = calendar.setTime(date);     Caused by: java.lang.NullPointerException: Attempt to invoke virtual   method 'long java.util.Date.getTime()' on a null object reference               at java.util.Calendar.setTime(Calendar.java:1195)   Here is date conversion code in DBhelper class  String strSqliteDate = cursor.getString(cursor.getColumnIndex("ActionDate"));                 Log.e(" strSqliteDate "," = " + strSqliteDate);                  String result = "";                 Date date = null;                 DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");                 try                 {                      date = dateFormat.parse(strSqliteDate);                 }                 catch(Exception e)                 {                     e.printStackTrace();                 }                 Calendar calendar = Calendar.getInstance();                 calendar.setTime(date);                 SimpleDateFormat printFormat = new SimpleDateFormat("yyyy-MM-dd");                 result = printFormat.format(calendar.getTime());                 Log.e("result = ","==========>"+result);

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


I have a machine running Xubuntu 18.04 and Mint. I've just installed Ubuntu 18.04.1. Everything seemed ok but it doesn't appear in the list of boot options at startup.   When I previously installed Mint with Xubuntu the Mint option was there immediately.  What's the problem and how can I fix it?

My system is not dual-boot, I run a standard Ubuntu desktop system "on the metal" (I think running it in a VM is the same).  Pressing c while booting does not cause the GRUB menu to appear (which I believe it does for a dual-boot system).  How can I get the GRUB-menu to present itself on a single-boot system?


I am thinking it does.  That's because a pillar of quantum chromodynamics is renormalization, which is itself due to the assumption that electrons are point particles (having no extent).  A point particle has no place in a discrete universe, as it wouldn't exist at all.  This question is asking the specific question about renormalization and the assumptions of electron radius, and just the broad issue of quantum mechanics itself.

I was confused when I was listening to a Quantum Mechanics lecture online. Are space and time assumed to be continuous or discrete in Quantum Mechanics?  I can see the question is vague, but this is so since I am confused.


I have created a JavaScript object like below -   var objtvar = {defaultPoints: [[0,0],[0,-10],[2.5, -10], [2.5, -10],[5, -10],[5,0]]}   I need to assign the defaultPoints property to another array and modify this new array. However on updating this new array, the object property too gets updated.  I want the object property to not change.  Code -   var objtvar = {defaultPoints: [[0,0],[0,-10],[2.5, -10], [2.5, -10],[5, -10],[5,0]]}; var flag = objtvar.defaultPoints; flag[5][1] = 9;   This updates the values in both flag array and the defaultPoints property. I do not wish the property to get updated.  Updated Solution - We can use the jquery extend suggested by @Nimrod Shory or use a pure JS implementation like this

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I can't remove my post in SO because it has the answer. Is there a way to remove it?  Why I want remove: I want to do things as perfect as possible, but I found out one of my posts was downvoted 1 time, then I decided to find out what's wrong by  posting question in Meta. Instead of having the answer I wanted, I got even more downvotes on my post in SO :).  If I'm not able to edit my post to make it better I think my post shouldn't exist then, as it's bad, isnt't?  It's kind of chicken-and-egg situation.  Can you please give me one of the choices:   Let me know what is wrong and I improve my post, because down-vote means there's something not good in it. If I can't improve then let me remove it. I don't want to see the post that is treated as bad one   Please note, I'm not caring that my post is down voted, but just having a desire to improve my posts.

Is there a way to delete a question after it's been answered, and the answer has an upvote?  Imagine that I have asked a question, that is later considered by me or the community as not useful and/or too specific. Or it gets a lot of downvotes for some reason. While it is not closed or flagged as a duplicate yet, someone could still answered it. Once answered, I cannot delete it any longer.  Is there a way to delete such question? Without having moderator privileges (to delete at will), is casting close votes the only way? I think I should have more control over the fate my own questions.  (On another example, I had a self-answered question where I was able to delete it only after unaccepting my own answer.)


Sometimes I've found some words that start with an "a-" prefix, not the indefinite article. I think it's used to make the phrasing more euphonic and more "melodic", at least this is what it sounds to me. For instance:  How is it called and is it common?

I have always found the a- prefix to words (as in anew, ajar, aside, awake, afoot, a-hunting, etc.) fascinating. The NOAD says on this topic:     a- 2.  prefix      •to; toward : aside | ashore.      • in a specified state or   manner : asleep | aloud.      • in the   process of (an activity) : a-hunting.      • on : afoot.      • in : nowadays.      ORIGIN   Old English , unstressed form of on.      a- 4. prefix      1 of: anew.      [ORIGIN: unstressed form of of ]      2 utterly: abash. [ORIGIN: from Anglo-Norman   French (corresponding to Old French   e-, es-), from Latin ex.]   While this gives quite a few examples, it leaves some areas of doubt to me:   At what time did this phenomenon happen? It seem quite restricted to words of Saxon origin, as I don't see it used with words of Romance languages. Is that a consequence of point 1, or is it because usage wouldn't aggregate an Old English prefix with, e.g., a word of French origin? Were there others words formed which haven't endured?  Arguably subjective: I wonder how it came to pass that the same prefix is used with so many different meanings.


Hy i have a list of strings which look like:  atr = ['ID=cbs7435_mt', 'Name=cbs7435_mt', 'Dbxref=taxon:981350', 'Note=Pichia pastoris CBS 7435 mitochondrion%2C complete replicon sequence.', 'date=27-FEB-2015', 'mol_type=genomic DNA', 'organelle=mitochondrion', 'organism=Komagataella pastoris CBS 7435', 'strain=CBS 7435']   Now i want to create a dictionary which should look like:  my_dict = {'ID': 'cbs7435_mt', 'Name':'cbs7435_mt', ...}   Do someone has any advice how i could manage this? Thanks already!

I have a string that looks like this:  "Name1=Value1;Name2=Value2;Name3=Value3"   Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this:  dict = {     "Name1": "Value1",     "Name2": "Value2",     "Name3": "Value3" }   I have looked through the modules available but can't seem to find anything that matches.    Thanks, I do know how to make the relevant code myself, but since such smallish solutions are usually mine-fields waiting to happen (ie. someone writes: Name1='Value1=2';) etc. then I usually prefer some pre-tested function.  I'll do it myself then.


How do one propose to have UX practice at the workplace?   UX is not recognised as an essential in the development process of web and mobile in most companies in my country.   How do you approach your employer on the importance of having sketch, prototypes, an ? put aside my confidence issue, what can be done to convince your employer on its importance?

UX is such an underrated field in a lot of industries. I wonder how companies consider employing UX designers and even heavily valuing their suggestions. Some big companies happen to see the light and invest in UX, and that keeps them on top of others. However, UX people rarely make it to the top management. In Don Norman's talk (  ), out of so many UX people (I don't know exactly), only two were vice presidents. I assume that there are even less influential UX designers in developing countries, and that's what makes it even harder for people like me. In the same talk, Don Norman suggested that UX designers should approach their executives like marketing people, showing how investing in something will affect profit. Perhaps, it's the best thing to do but it has to be mastered for it to be executed successfully.   I'm a fresh grad and am looking for a job. I think, working for a company with a more conventional job description would be the way to go. When I'm already influential enough, I'll go up to the executives and show them how UX will improve sales (in whatever industry it is. I just want to do UX)  Do you do UX as consultants or are you employed? How do you persuade companies to invest in UX? Are you lucky enough to be employed by people who you didn't have to persuade to value UX?


I'm using bash to run a terminal which launches a few programs in separate tabs.  However, after the terminal opens, it seems like my script continues even though generally this only happens if we use the ampersand (&).  Here is an example of what I'm talking about:  gnome-terminal --tab -e "./run_script.sh"  ./runanothercommand   The behavior I'm seeing now is that gnome-terminal executes, and then immediately after the second command is executed.  The desired behavior for myself is that the second command only executes when the gnome-terminal process ends.  Is there any way to halt the script until gnome-terminal completes?  EDIT:  According to the question linked, , --disable-factory was an argument that would accomplish this.  However, --disable-factory is deprecated and is no longer availble.  That thread also links here:  , which gives a method using GDB.  However, I don't think this approach will work for me.

If you have gnome-terminal running, and want a new instance of the program, you might think that running gnome-terminal & from a shell would do the trick.  Astonishingly, this new instance behaves like some insipid Windows or Mac program; it only sends a message to the existing, running gnome-terminal to create a new window. If this one gnome-terminal process crashes, you lose all of the terminal windows!  (Of course, each window has its own shell, which is an independent process, but the actual terminal emulator and its GUI are managed from a single instance of the application.)  How can we create independent instances of gnome-terminal, each running in their own process, so that killing that process only destroys the window(s) associated with that process?


I recently got hired in a sales position and would like to make sure im getting paid for what I have sold.   I have a worksheet with 3 columns where I keep track of what I have sold, 1 column shows order number, 2nd column shows services I have sold and the other shows the amount I should be paid for services sold. In worksheet 2 my employer shows me there record of what I have sold and what they are paying out for each service. There worksheet is setup pretty much the same way. 3 columns showing order #, services sold and what they are paying for each service.  I would like to match my worksheet to theirs and make sure the amounts match.  If they don't match What can it highlight the cell or something that would indicate which orders don't have matching payout amounts, would be nice. How can I set this up what's the best formula to use and how do I set it up? MATCH or VLOOKUP or??

I have two columns in Excel that I want to compare and find the differences between them.  Suppose:   Col A has 50 numbers, i.e. 0511234567 Col B has 100 numbers in the same format


I have a large point feature class and have realised that there are several hundred features with null geometry. Fortunately the coordinates are stored as an attribute. What I need to do is update the geometry of the points with the x and y stores in the attribute table.  After a little search I found an Esri Support Services Blog post on  which includes a python function that will do this for me in the field calculator.  However, it seems that this will only work on features with a geometry. When I run it on the null geometry features it returns a syntax error. presumably this is because there is no shape or there is no shape.getpart(0).  Is there something I could add to this script to allow it to update null geometries, or does anyone have another method?

I would like to find a way to stack multiple selected points in ArcGIS, either using the field calculator or python script. For example, I want to snap all points representing houses on a street into one point. Is there a way to reference one of the existing coordinate sets to use as the values for all selected points?


My MTB has 29" x 2.25" tires on it now.  I'm looking at these 700mm x 35mm tires to replace them.  Will they fit a 29" rim?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


When executed. The code alerts an array full of undefined objects. I am trying to make a deck of cards by having each card be an array element that has 2 object attributes (suit and value). I think the issue is in the convergence of the 2 arrays.   Thanks for your help in advance!
Problem #1

Number of Players:
     <form id='form'>         <input type="radio" name="playerChoice" id="playerChoice-1" value="1" />         1         <input type="radio" name="playerChoice" id="playerChoice-2" value="2" />         2         <input type="radio" name="playerChoice" id="playerChoice-3" value="3" />         3         <input type="radio" name="playerChoice" id="playerChoice-4" value="4" checked="checked" />         4     </form>     Deal

Player 1:

Player 2:

Player 3:

Player 4:

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


Consider a sphere for example.  It's volume is calculated by the formula: $\frac 4 3 \pi r^3$  The derivative of that is $4\pi r^2$ which represents the sphere's surface area.  The derivative of that is $8\pi r$.   Does that quantity represent something tangible about a sphere? Clearly, it is some sort of linear measurement, but of what, I'm not sure.  Just curious.

If you take the derivative of the volume of a sphere, $$\frac{4}{3}\pi r^3$$you get its surface area, $$4\pi r^2.$$ If you differentiate again, you get $$8 \pi r.$$ Does this have any physical (or other kind of) significance, besides being 4 times the length of a great circle on the sphere?


I would like to know How to upgrade my samsung galaxy ace plus GT-S7500 from Gingerbread to Jellybean.?  Details are as follows   Model Number: Samsung GT-S7500  Android version: 2.3.6 Baseband Version: S7500DDME1 Kernel Version: 2.6.38.6                dpi@DELL235#1 Build Number: GINGERBREAD.DDMF2   Please help...

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


I purchased a Canon FTb QL at an estate sale yesterday, and come to find out it had film inside. Kodacolor 400. This camera hasn't been used in years. How many I don't know. I know the husband died 10 years ago, and his wife became a recluse and didn't touch anything of his. Some people say he died 30 years ago. So I need to know how long does it take for this film to degrade and expire?

A friend of mine just found 3 rolls of exposed 135 (i.e. 35mm) film. They are at least 10 years old. He'd like to know if it is even worth taking them to the local hour photo lab but also if he should give them any special instructions.


I have a Java web app which I'm deploying using Tomcat but I'm having some trouble with this.  The problem is that my web app has to talk to some native libraries (via JNI) and those libraries do not handle errors that gracefully so if I try to start Tomcat and the native calls fail Tomcat startup halts partway through and does not start.  What I would like to do is have Tomcat not start this web app when it starts as I'll be using other means to start the web app which will ensure that the native calls will work.  Specifically the native calls are to talk to another system which must already be running for the native calls to succeed.  One interesting thing I've found is that if I reload the app once Tomcat is successfully running failures in the native libraries only cause the context to fail and Tomcat continues running fine.  I've googled around and seen pointers to the context.xml file but it is unclear to me if I can use this to achieve my aim as the Tomcat reference doesn't seem to list any properties which stop a context automatically being loaded at startup.

I want to deploy multiple versions of an app server on my local machine for development purposes (testing for compatibility, etc). I've got about 5 that I'll want to have installed at any given time, but really only need 1 or 2 of them on a day to day basis. I'd rather turn on/off the others on demand.  Originally I had problems deploying them all when I ran into memory issues, but setting -XX:MaxPermSize=256m took care of that. Now I've realized I don't need them all at once.  Is there a way to specify that certain applications should not auto-start?


I am writing an essay and I am stuck with this sentence      The citizens cast their votes choosing Mark as president and choosing me as vice-president.   is this correct or should it be      The citizens cast their votes choosing Mark as president and me as vice-president.

I sometimes find myself writing something like this:     XXX is a project I admire and am very interested in.   The "I <verb> and am <something>" feels strange here. It somehow sounds more natural in the third person: "He admires and is very interested in...."  Am I just imagining things – is it OK to use this construction, or should I use something completely different?


Pretty much it's a climbing game. The first person to reach a certain height within the game boundaries wins. It's multiplayer so there could be people outside of the game at the specific y-axis as well. I need a command that will detect a player within the radius:  /execute if entity @a[x=244,z=345,distance=..2] run...   AND check if that specific player is ALSO at an exact y-axis:  /execute if entity @a[y=70] run...   If you picture it visually, I want the detection area to be a top-down circle instead of a sphere. Once a player reaches that detection area, it will run a command. Hope you guys can help! Thanks :)

I built a flat circular plane in minecraft, and am trying to force players to remain within this area. The circle is 161x161 centered around 0, 44, 0. I then placed a command block at the very center, with the command tp @a[rm=80,r=85] 0 45 0. This teleports everyone more than 80 and less than 85 blocks from the command block back to the center of the circle, creating basically a hemisphere (the sphere is cut in half by the circular plane) to move within.  However, I want to instead restrict movement to a cylinder from y=44 to y=infinity. With this method you would only be teleported when your x and z coordinates exceeded the boundary of the 161x161 circle, ignoring your y coordinate. You would be able to stand at the edge of the circle and fly up as high as you wanted without being teleported. This does need to keep the same property of the previous command to not teleport players outside 85 blocks. It will only teleport those who have an x and z change of between 80 and 85 blocks ( 85>sqrt(x²+y²)>80 )  I tried variations of the command involving the dy argument, but this only removed the teleport all together.  Note: If it is not possible to have an infinite height limit, restricting to any value above y=70 would also work. In addition, the ideal minimum of y=44 can be changed, but not increased.


When I tried to access my laravel after successfull installation, instead of the default page it shows an error in the webpage.  Mcrypt PHP extension required.    I have tried some fixes like this,  sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini ln: failed to create symbolic link ‘/etc/php5/apache2/conf.d/20-mcrypt.ini’: File exists sudo service apache2 restart

When I tried to access my laravel after successfull updation, instead of the default page it shows an error in the webpage.  Mcrypt PHP extension required.    I have tried some fixes like this,  sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini ln: failed to create symbolic link ‘/etc/php5/apache2/conf.d/20-mcrypt.ini’: File exists sudo service apache2 restart


Is my process is correct?   Also, why is one to allowed to divide the variable in the radical by its highest power?  $$ \lim_ {x-> \infty} \sqrt { 9 x^2 +x} - 3 x $$

I was following this explanation until the 5th step. The most important misunderstanding is if $1x/1x$ is $1$, and one can multiply a quotient by $1$ and not change its value. However from what I can see the $9x^2$ is being divided by $x^2$. How is that going to work? And why is that allowed?


So I'm fairly new to wine, and I'm having a problem with a few programs that don't want to run in fullscreen. The menu bar remains, the mouse doesn't move all the way to the left and the gray bar at the top of the screen remains as well.    Also, the screen will scroll. Is there any way to remedy this?  I'm using wine 1.6.2, and ubuntu 14.04

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


pv is program running above dd. I am cloning my old HDD to a new SSD. It's 500GB of data. I tried to run the following command to copy sda to sdb:  ubuntu@ubuntu:/$ sudo pv < /dev/sda > /dev/sdb bash: /dev/sda: Permission denied   Using dd command did not produce this error.  I am running the system Ubuntu from the DVD. sda is the main laptop harddrive connected over SATA, sdb is SSD drive connected over USB using USB-SATA converter.

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


$a_n $- sequence of all natural numbers which in notation doesn't use the digit 6  $\sum \frac{1}{a_n}$   I have already tried to compare $\sum(\frac{1}{6}+\frac{1}{16}+\frac{1}{26}+...)\ge\sum \frac{1}{10n}\to \infty$  So this gives me nothing.

Does the following series converge or diverge?  $\sum_{n=1}^{\infty} a_n$ where  $a_n = \frac 1 b_n$, and $(b_n)_n$ is the subsequence of $(n)_n$ whose terms do not have a $9$ in their decimal notation.  I have no idea how the sequence $b_n$ even looks like. If I have an idea of how to prove that a series converges or not with criteria but I don't if I don't know what $b_n$ is.


I still regard myself as a beginner in the field of physics.. And there are a lot of information I should know, I am in my second year physics, and I need to read books which are not hard to understand and are useful and enjoyable.. Any suggestions? (Doesn't depend on the included tags below)

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


In a 2-investigator game, if he rolls 3 successes, does the remaining success get accumulated toward the next doom token removal? Along the same vein, if he rolls 4 successes, does he remove 2 tokens?

In Arkham Horror you have to roll a cumulative number of successes equal to the number of players to knock off a doom token from the Elder God's health. If you reach the number of players worth of successes do you then stop counting for the player and move on or do you count the extra successes against the next doom token?  We played it so that you kept on adding them but it meant that we turned Nyalothotep into mince meat quite quickly (One Character was blessed had a fight of 6 a shotgun and Fight +1 skill card though)


I am working in java and inserting and updating in Jtable. Some error occurs and i am unable to identify the error please help.  Error:     java.lang.NullPointerException       at jtabledemo.Accounts.(Accounts.java:57)       at jtabledemo.Accounts$1.run(Accounts.java:33)       at java.awt.event.InvocationEvent.dispatch(Unknown Source)       at java.awt.EventQueue.dispatchEventImpl(Unknown Source)       at java.awt.EventQueue.access$400(Unknown Source)       at java.awt.EventQueue$3.run(Unknown Source)       at java.awt.EventQueue$3.run(Unknown Source)       at java.security.AccessController.doPrivileged(Native Method)       at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)       at java.awt.EventQueue.dispatchEvent(Unknown Source)       at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)       at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)       at java.awt.EventDispatchThread.run(Unknown Source)   and this is my code:  package jtabledemo;  import java.awt.Color; import java.awt.EventQueue;  import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.table.DefaultTableModel; import javax.swing.JTable; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JButton;  import java.awt.event.ActionListener; import java.awt.event.ActionEvent;  public class Accounts extends JFrame {  private JPanel contentPane; private JTable table; private JTextField textField; private JTextField textField_1; private JButton btnUpdate;  /**  * Launch the application.  */ public static void main(String[] args) {     EventQueue.invokeLater(new Runnable() {         public void run() {             try {                 Accounts frame = new Accounts();                 frame.setVisible(true);             } catch (Exception e) {                 e.printStackTrace();             }         }     }); }  /**  * Create the frame.  */ public Accounts() {     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     setBounds(100, 100, 609, 387);     contentPane = new JPanel();     contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));     setContentPane(contentPane);     contentPane.setLayout(null);       Object [] columns={"Debit","Credit"};     DefaultTableModel model=new DefaultTableModel();     model.setColumnIdentifiers(columns);     table.setModel(null);     //table.setModel(model);     table.setBackground(Color.blue);     table.setForeground(Color.white);      table = new JTable();     table.setBounds(63, 117, 383, 202);     contentPane.add(table);      JLabel lblCredit = new JLabel("Credit");     lblCredit.setBounds(84, 11, 46, 14);     contentPane.add(lblCredit);      JLabel lblDebit = new JLabel("Debit");     lblDebit.setBounds(84, 49, 46, 14);     contentPane.add(lblDebit);      textField = new JTextField();     textField.setBounds(131, 8, 86, 20);     contentPane.add(textField);     textField.setColumns(10);      textField_1 = new JTextField();     textField_1.setBounds(131, 46, 86, 20);     contentPane.add(textField_1);     textField_1.setColumns(10);      JButton btnAdd = new JButton("Add");     Object[] row=new Object[2];     btnAdd.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {             row[0]=textField.getText();             row[1]=textField_1.getText();             model.addRow(row);         }     });     btnAdd.setBounds(248, 45, 89, 23);     contentPane.add(btnAdd);      btnUpdate = new JButton("Update");     btnUpdate.setBounds(248, 7, 89, 23);     contentPane.add(btnUpdate); } }

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


I would like to include into a "traditional" text document an environment that mimics the graphical style of basic text on mobile phones:  author 1 text left adjusted, on red blocks with rounded corners; author 2 text right adjusted, on green blocks with rounded corners, and so forth.  Something with a syntax similar to this:  \begin{phonetext} \authorleft{my text} \authorright{your text} \authorleft{my next text} \end{phonetext}   The ideal would be to be able to choose colors of the backgrounds (e.g., red on left, green on right) and other font size and related information.  I don't need the ability to include photos, video frames, audio recording icons, posting date and time, and such, but perhaps someone else would use such options.

I once saw a latex template, which you could use to create a Chat-Like document which has an appearance similar to current mobile chat applications (i.e. iMessage or Whatsapp).  I am of course looking for a static document compiled by latexor pdflatex and not a dynamic chat program.  I remember that I saw something similar done in LaTeX already, but I was not able to find it again.  I can imagine, that this has been done with tikz before.  Example images:


It isn't really complicated, but I just can't figure out how to do it. I have one set with objects, let's say they are numbers. I need to check all the possibilities of N groups (we can assume there are 3 groups, 9 objects in set), where order inside group doesn't matter ({1,2,3}, {2,1,3}, {3,2,1}, etc. are the same) and order of groups doesn't matter ([{1,2,3},{4,5,6}] is the same as [{5,4,6},{2,1,3}]).  I'm writing code in C#, but there really isn't anything I could show. The closest idea I had contained a lot of fors and ifs 😞

I want to write a function that takes an array of letters as an argument and a number of those letters to select.   Say you provide an array of 8 letters and want to select 3 letters from that. Then you should get:  8! / ((8 - 3)! * 3!) = 56   Arrays (or words) in return consisting of 3 letters each.


I am trying to do a similar thing as in  but with an inequality sign instead.  I tried replacing = with \ineq in the line   \newcommand{\verteq}{\rotatebox{90}{$\,=$}}   but could you please explain what is wrong in the approach?

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 have 1 directory. In this directory it contains 9folders(subdirectory). Each folder(subdirectory) contains a variable number of folders(subsubdirectory), and also in (subsubdirectory) it contains some folder....so on.... I tried this method but i dont know how to expand it because of variable number of subdirectory.          public static long GetDirectoryNumberOfFiles(string directory, bool includeSubDir)         {             long numberFiles = Directory.GetFiles(@directory).Length;              string[] subfolderEntries = Directory.GetDirectories(directory);//result 9              //i tried this, but without luck.             var dirInfo =new DirectoryInfo(directory);             int dirCount = dirInfo.GetDirectories().Length;//result 9               if (includeSubDir)             {               for (int i = 0; i < subfolderEntries.Count(); i++)               { numberFiles += Directory.GetFiles(subfolderEntries[i]).Length; }//result 38             }            return numberFiles;     }   When I right clicked the directory, it contains 23,026 files and 440folders. But with this method, i got 38files and 9folders. I know it just count the subdirectories but not all folders inside directory.

Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles() or similar method? I am looking for something like this:  int ComponentCount = MagicFindFileCount(@"c:\windows\system32", "*.dll");   I know that I can make a recursive function to call Directory.GetFiles , but it would be much cleaner if I could do this without all the iterating.  EDIT: If it is not possible to do this without recursing and iterating yourself, what would be the best way to do it?


If I'm trying to write f of g where f and g are functions, what is the command for the of symbol?


I have a script called jsl in /usr/local/bin. Running which jsl finds it there.  I want to temporarily use a different version, and when I echo $PATH I see that /usr/bin is earlier in the path. So I added a script called jsl in that folder and I've verified that it is executable and runs correctly when called with the full path.  However, which jsl still finds the first version, and jsl still runs it.  Why isn't my new jsl being found by which or executed by name?

When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH to find the binary, it seems that Bash remembers the path in some sort of cache. For example, I installed a build of Subversion from source to /usr/local, then typed svnsync help at the Bash prompt. Bash located the binary /usr/local/bin/svnsync for "svnsync" and executed it. Then when I deleted the installation of Subversion in /usr/local and re-ran svnsync help, Bash responds:  bash: /usr/local/bin/svnsync: No such file or directory   But, when I start a new instance of Bash, it finds and executes /usr/bin/svnsync.  How do I clear the cache of paths to executables?


$f:(0,\infty)\to \mathbb{R}$ is differentiable such that $f'(x)\to l$ as $x\to \infty$. Prove that $ \frac{f(x)}{x}\to l $ as $x\to \infty$.

I was trying to work out a problem I found online. Here is the problem statement:     Let $f(x)$ be continuously differentiable on $(0, \infty)$ and suppose $\lim\limits_{x \to \infty} f'(x) = 0$. Prove that $\lim\limits_{x \to \infty} \frac{f(x)}{x} = 0$.    (source: )  The first idea that came to my mind was to show that for all $\epsilon > 0$, we have $|f(x)| < \epsilon|x|$ for sufficiently large $x$. (And I believe I could do this using the fact that $f'(x) \to 0$ as $x \to \infty$.)  However, I was wondering if there was a different (and nicer or cleverer) way. Here's an idea I had in mind:  If $f$ is bounded, then $\frac{f(x)}{x}$ clearly goes to zero. If $\lim\limits_{x \to \infty} f(x)$ is either $+\infty$ or $-\infty$, then we can apply l'Hôpital's rule (to get $\lim\limits_{x \to \infty} \frac{f(x)}{x} = \lim\limits_{x \to \infty} \frac{f'(x)}{1} = 0$).   However, I'm not sure what I could do in the remaining case (when $f$ is unbounded but oscillates like crazy). Is there a way to finish the proof from here?   Also, are there other ways of proving the given statement?


In Concepts of Physics by Dr.. H.C.Verma, in the chapter on "Capacitors", in page 144, under the topic "Capacitor and Capacitance" the following statement is given:     A combination of two conductors placed close to each other is called a capacitor. One of the conductors is given a positive charge and the other is given an equal negative charge. The conductor with the positive charge is called the positive plate and the other is called the negative plate. The charge on the positive plate is called the charge on the capacitor …   Note that the term charge on a capacitor does not mean the total charge given to the capacitor.   (Emphasis mine)  According to the above statement, "the charge on the capacitor" is the charge on the positive plate when both positive and negative plates of a capacitor are equally charged? How to extend this definition when the two plates are unequally charged?   Suppose we supply charges $+Q_1$ and $-Q_2$ to the positive and the negative plates respectively. After electrostatic conditions are attained, I determined the charge distribution on the four surfaces - outer surfaces and inner surfaces of the two plates. The charge on the outer surfaces of the two plates are equal to $\frac{Q_1-Q_2}{2}$. The magnitude of charge on the inner surface of the two plates is $\frac{Q_1+Q_2}{2}$.   Now coming to my doubt, if the "charge on the capacitor" is the charge on the positive plate, which surface of the positive plate should I want to consider - the outer one or the inner one? And what is the reason for this choice? It seems to me that, a capacitor with unequal charges on its plates is not a capacitor in the first place (inferred from the statement above).

I am confused as to whether/how capacitance changes when each plate has a different charge.  For example, consider a coaxial cable and put $20Q$ on the outer cable, and $-Q$ on the inner. Or how about concentric spheres, grounding either the inner or the outer?


Can I install Ubuntu on a Windows 8.1 computer? That computer is the one I currently use.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I'm working in PIC24F microcontroller. My main program doesn't have infinite loop, but it is run like an infinite loop.  Before I test the code with infinite while loop (while (1)), but when I remove the while loop, it's still running like an infinite loop. What's the problem?   Thanks

What happens in an embedded processor when execution reaches that final return statement Does everything just freeze as it is; power consumption etc, with one long eternal NOP in the sky? or are NOPs continuously executed, or will a processor shut down altogether?  Part of the reason I ask is I am wondering if a processor needs to power down before it finishes execution and if it does how does it ever finish execution if it has powered down before hand?


From my understanding, when we use metric spaces, we are trying to measure how "different" certain elements in a metric space are from one another.  We all know that a metric space $(S,d)$ satisfies:   $d(x,x) = 0$ $\forall x \in S$  $d(x,y) = d(y,x)$$ \forall x,y \in S$ $d(x,y) \leq d(x,z) + d(z,y)$$\forall x,y,z \in S$   The first two make perfect sense to me. If we are trying to measure how different two points are, then the difference between x and x should be nothing. Furthermore, the difference between x and y shouldn't depend on their order.  Now, I'm trying to make sense of why number 3 is a fundamental property of distance. My only guess is that if 3 didn't hold, then there's another "path" that can be taken between x and y that is "shorter" than our metric assigned to x and y. But why is this a fundamental property of measuring distance? Of course, you can give me the euclidian metric as an example, to why this is important, and I would agree...but why must it be fundamental for ALL metrics?  I hope this question isn't too silly. Thank you!

There is a property in the axiomatization of metric space: $d(x,z)\le d(x,y)+d(y,z)$. I understand that property applies well when it come to the measure of distances among points. However, that property seems to be irrelevant in the definitions of continuity, open set and some other key concepts.  My topology book says that it is asserting "the transitivity of closeness", a vague term that loses me. So why is that property important? Why did the founders (if any) of topology consider it at the first place? And what if that property is missed?


My oldest son used my younger son's gmail account to creat his Pokemon go account. Now when my younger son logs into his Pokemon go account it automatically go to the new account that my older son created. Is there anything we can do to resolve this problem?

So I had 20+ Pokemon on my account and today when I tapped on the app, it brought me back to the original screen when you first start playing. My friend who signed up tested using my username when she first started and my username was unavailable, meaning the account still exists. I don't have the password for the account, but I do have the email. So I wanted to know if it was possible to log back into an account?


If i search like site:www.paka.tv my main homepage URL not showing, but categories of my site pages showing on results. How to show my website URL (www.pakka.tv) on google search.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?