Evaluation of $\lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \binom{2n}{n}$

Evaluate   $$\lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \binom{2n}{n}.$$   $\underline{\bf{My\;\;Try}}::$ Let $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \binom{2n}{n} = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \ln \left(\frac{(n+1)\cdot (n+2)\cdot (n+3)\cdots (n+n)}{(1)\cdot (2)\cdot (3)\cdots (n)}\right)$  $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \left\{\ln \left(\frac{n+1}{1}\right)+\ln \left(\frac{n+2}{2}\right)+\ln \left(\frac{n+3}{3}\right)+\cdots+\ln \left(\frac{n+n}{n}\right)\right\}$  $\displaystyle y = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \sum_{r=1}^{n}\ln \left(\frac{n+r}{r}\right) = \lim_{n\rightarrow \infty}\frac{1}{2n}\cdot \sum_{r=1}^{n}\ln \left(\frac{1+\frac{r}{n}}{\frac{r}{n}}\right)$  Now Using Reinman Sum  $\displaystyle y = \frac{1}{2}\int_{0}^{1}\ln \left(\frac{x+1}{x}\right)dx = \frac{1}{2}\int_{0}^{1}\ln (x+1)dx-\frac{1}{2}\int_{0}^{1}\ln (x)dx =  \ln (2)$  My Question is , Is there is any method other then that like Striling Approximation OR Stolz–Cesàro theorem OR Ratio Test  If yes then please explain here  Thanks


Method for Counting the Divisors of a number

I need to find the number of divisors of 600. Is there any other way to solve the problem, apart from writing them down and counting??


Can anyone prove that the spaces $ (\mathbb{R}^3, \|.\|_1) $ and $ (\mathbb{R}^3, \|.\|_\infty) $ cannot be isometric?  Thanks.


Dealing With A System Which Is Not Letting To LogIn Due To Open Permissions

A colleague of mine told me that after he executed the below command, he's not able to login to the system.   No user can login via ssh. Only normal users can login over physical console of the system, but no administrative commands are allowed, not even  # sudo su -    And the culprit command which did the damage was  # chmod -R 777 /   My question, of course is, how to deal with such a system? Is there a way to restore the default permissions on a Linux system and what's best way to handle such situations?


"Put it into the refrigerator" or "Put it in the refrigerator"?

I am sorry if the question is silly, but I think I heard both options spoken by native speaker. So, which one is correct?


How to find out what Debian version I am using?

I have access to a Debian machine via SSH.  How do I find out what version of Debian is installed?  This is possibly a duplicate of .  That question is answered by:   lsb_release -a cat /etc/lsb-release   There is another answer in one of the comments:   cat /etc/debian_version   lsb_release -a does not work:  -bash: lsb_release: command not found   Nor does cat /etc/lsb-release:  cat: /etc/lsb-release: No such file or directory   I suppose that   cat /etc/debian_version   is the way to go as it gives me "8.1".  apt-cache show base-files    returns a bunch of properties including "Version: 8+deb8u1". How is the version of the base-files package related to the Debian version? I assume that the "deb8u1" part translates into "8.1". What does the first "8+" part mean then?  uname -a   returns  Linux deb2 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) x86_64 GNU/Linux   and  uname -rv   returns  3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17)   How is the kernel version related to the Debian version? Does a specific Debian version always include the same kernel?  cat /etc/os-release   returns amongst other properties:  VERSION_ID="8"   So, for me "8" and "8.1" seem to be different. Is "8" the "generic Debian version"? How do you call "8.1" then ("full version"?) ?


Showing that a ring is a field as well for one of the provided choices.

Let $\mathbb M$ be one of the following rings: $\mathbb{R}, \mathbb{Q},  \mathbb{F_9}, \mathbb{C} $. Let $I$ be the ideal generated by $x^4+2x-2$. Is the ring $\mathbb M[x]/I$ a field for some of the above choices for $R$?   I have been trying to work my way around some problems involving ideals, but I get really confused when they get mixed with rings and fields. I'm stuck and don't know how to proceed.


Testing divisibility by 7 of number in base 8

Is the number 3776543210123456773, in base 8, divisible by 7?  I started by expanding the number: 3 * $8^0$ + 7 * $8^1$ + 7 * $8^2$ + ... 3 * $(7 + 1)^0$ + 7 * $(7 + 1)^1$ + 7 * $(7 + 1)^2$ + ...    Then, by using Newton's Binomial Theorem, I reasoned that for each binomial, only the first term wouldn't be divisible by 7 since it would be equal to 1. This led me to the conclusion that each digit of the initial number would be multiplied by one once. Therefore, if the sum of all digits was divisible by 7, the number would also be divisible by 7.  However, I converted this number to base 10 and the remainder of the division by 7 was equal to 2, instead of 0, which was the result I found using the reasoning above.  I can't seem to find where I made a mistake. :c


"Denoising" checkbox missing in Blender 2.9

In Blender 2.8+, I used to check the "Denoising" checkbox in the View Layer Properties when using Cycles rendering engine but after installing Blender 2.9, I can't find this item anymore:  Does someone know how I denoise image renders now?


Find the solution of a distributional differential equation

How can I find the solution of the distributional equation      $$ \frac{d^2u}{dx^2}-xu = 0 $$   And prove that there are at least two linear independent solutions? I've tried to to with the Fourier Transform but it is not possible to find the solution that diverges as $x$ tends to infinity, because the Fourier Transform is not defined for such functions. (they are so called Airy functions). I've tried also to solve it by testing the equation with an appropriate test function, but I'm stuck.   This is the method used. Once I've found Ai(x), I cannot prove that there are two independent solutions.


Short story about a man trying to travel to the edge of his city by train but the city is endless

In this short story a man tries to find the end of his city by sitting on a train (possibly a sleeper train) until it reaches the country. The train is underground and he checks property values every so often by leaving the train. The values reduce as he gets further from the city centre but eventually start increasing and he realises that the whole planet is one urban sprawl. He admits to having been on the train for a long time to some authority figure and is viewed as a disruptive person as a result. Can anyone tell me the title and/or author?


Which Stack Exchange site to use for dynamic app development tool questions?

We are building a dynamic app development platform. Its approaches are directly aligned with the way apps are built using code though it's a complete drag and drop and no code system.   Though developers will relate to the approach instantly, anyone can use the system after going through a couple of hours of video.   My question is which community among the Stack Exchange sites is good for forging Q & A around the tool, and how/what is the process for creating a dedicated tag for it ?   E.g. a developer is creating a specific form using the system and encounters a challenging situation and wants to ask how to implement the specific needed feature. We would like such developers to use SE to ask their qustions. Which SE site should we use for a product such as this?


How to create a OS X Mountain Lion Bootable USB drive on Ubuntu?

I already know how to do it on Mac OS X (plenty of instructions online).  But is it possible to do it on Ubuntu? If yes, how?


How can we mitigate the difficulties some autistic users have with pronouns?

A subset of autistic users  that they are not always able to use the pronouns that another user requests.  The problem  The current Code of Conduct is clear on this matter: Using stated pronouns is . The users in question report that this is unfortunately impossible for them.  It is  to consistently and inconspicuously use gender-neutral language, but that may not always be possible for these users: natural and inconspicuous writing correlates poorly with rigidity of language! It can also easily come off as hostile to trans users, and even at best shows less respect than using appropriate pronouns.  I am asking about users who wish to show respect to trans and non-binary users, and therefore to comply with the Code of Conduct, but who are currently unable to do so.  How does the problem work?  What situations does this apply to?   Using different pronouns for different people, as opposed to the same pronoun for everyone? Changing a previously assumed pronoun (from username, avatar, previous knowledge of the person before transition, etc.)? Using pronouns outside a closed set (e.g. able to use "he" or "she" but not "they", or "they" but not "zie")?   How does the difficulty work? Understanding this may be helpful in coming up with solutions.   What are its causes? What worsens or alleviates it? Is it a difficulty perceiving users as their stated gender, or using language that expresses this perception?   What would make it easier for these users?  What can the StackExchange software, user-supplied software, or human editors do to help these autistic users use the correct pronouns?  For example, would some macro like %possessive@JaneDoe (that reads JaneDoe's profile and expands to "hers") help? Or a user script that, before posting, highlights every personal pronouns so that the writer can fix them manually?


Windows 10 hotkey (keyboard shortcut) for switching between speakers

Many times per day I need to switch between different speakers, which I do using my mouse in these 3 clicks as shown here:    I would much prefer if I could press a certain key or combination of keys on the keyboard to toggle between my 2 main sets of speakers (each of the 2 shown highlighted here). Is there some built-in Windows feature that would allow this? Or would another program (such as AutoHotKey, which I have installed) allow this?


Is $(B_t^2)$ Markov where $(B_t)$ is Brownian motion?

I am pretty sure $(B_{t}^{2})$ not Markov because the squared random walk is not.    I guess I can repeat the method since to be Markov it must satisfy the discrete.  Thanks


I am playing in a campaign where I am a water domain cleric water genasi. This means I am amphibious, and so I thought that I could cast spells underwater. When I tried to do this, the DM said you can't cast spells underwater, even when I told him I am amphibious.   Is it possible to cast spells underwater if I am amphibious?


How can the same flight cost less one leg earlier?

I am booking a round-trip flight to the United States and found that I can save up to 700 euro on a 1200+ euro ticket if I board the same plane one leg earlier. On the flight company's website a ticket from Amsterdam, Netherlands to Boston, United States costs me 1.227,75 euro. However, if I travel to Dusseldorf, Germany and board the exact same plane, the ticket will cost me 568,66 dollar (500+ euro). The latter flight will make a stop in Amsterdam and then continue to Boston.  The price from AMS to BOS is broken down as follows (in euro),  ticket price                                                     880,00 carrier-imposed international surcharge                          259,00 airport passenger service charge                                  13,00 noise surcharge                                                    0,50 security charge                                                   10,53 us customs user fee                                                4,84 us international transportation tax                               31,34 us aphis fee                                                       3,49 us ins user fee                                                    6,16 usa passenger civil aviation security service fee                  4,93 usa passenger facility charge                                      3,96     While the price from DUS to AMS to BOS is broken down as following (in dollar),  Airline Ticket Cost:                                             135.60 Airline Ticket taxes and fees:                                   433.06     This substantial difference gives me a sense of being scammed. I've read several articles on what makes up the price of a ticket but these cannot explain a 700 euro difference for a longer flight on the same plane with the same destination.  How can the same flight cost 700 euro less one leg earlier?


WebSocket is not working with versions of Tomcat other than 8.0.36

I am using JDK 1.8.0_231 and Apache-Tomcat-8.0.36. I am trying to upgrade Tomcat to version 9.0. After defining the app to use the new Tomcat version, I am getting a NullPointer exception exception when the app calls flushBatch():  java.lang.NullPointerException     at org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:322)     at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:284)     at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)     at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.flushBatch(WsRemoteEndpointImplBase.java:121)     at org.apache.tomcat.websocket.WsRemoteEndpointBase.flushBatch(WsRemoteEndpointBase.java:48)   This is the code where the app fails:  private void sendMessage(String message, int attemptsNum) throws IOException {         try {             if (session.isOpen()) {                 RemoteEndpoint.Basic basicRemote = session.getBasicRemote();                 basicRemote.sendText(message);                 basicRemote.flushBatch();             }         } catch (IllegalStateException | NullPointerException | IOException e) {             ... // handle exception code         }     }   This error doesn't happen in Tomcat version 8.0.36.I also tried to use Tomcat 8.5.50, but got the same exception. Has anyone encountered this issue?


Is everything provable as true, false, or undecidable?

Is it possible to know whether any and all statements are true, false, or undecidable under standard mathematical axioms, e.g. ZF?


Should I use a comma before the conjunction in this sentence?

The sentence  The movie was loud and the chatter was louder.  Should I need to add a comma before the and that joins the first sentence The movie was loud and the independent clause the chatter was louder? Which one is correct?   The movie was loud and the chatter was louder.  The movie was loud, and the chatter was louder.    I am not a native English speaker. Please explain your answer too.


How is the weather in Cuba in January/February/March?

What are the weather conditions in Cuba (and Florida) in January/February/March ?  Some statistics etc would be useful.


I am traveling from Sapporo to Hakodate and will make a stop over at Okumakoen station. I understand that I can make stop over with the same ticket same day. But if I would like to reserve the seat for Sapporo-Okumakoen and Okumakoen- Hakodate sections, how do I do it? Separately ? Or at once when purchase ticket at the JR counter?


How to test ParseException that is thrown by SimpelDateFormat?

@Rule public final ExpectedException exception = ExpectedException.none();  @Test public void doStuffThrowsParseException() {     TestException foo = new TestException();      exception.expect(ParseException.class);     foo.doStuff("haha"); }   main  Date submissionT; SimpleDateFormat tempDate = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy"); public void doStuff(String time) {     try {         submissionT=tempDate.parse(time);       }       catch (Exception e) {              System.out.println(e.toString() + ", " + time);       } }   results in java.text.ParseException: Unparseable date: "haha", haha.  Although a ParseException is thrown the test fails. Why?


Using a comma after a question mark inside quotation marks?

Can I use a comma following a question mark (as part of a title), inside quotation marks?    It sounds like quite a complicated question, but all I want to do is correctly write the sentence:       "Leo Strauss, in his essay “What is Political Philosophy?,” takes a   radically anti-historical view, contradicting Nietzsche and relegating   Nietzsche's critique to the edges of meaningful discourse."


Do I need a comma when addressing someone in writing?

When I'm addressing someone in writing, such as on a forum or other public space, will I need a comma(s) before/after/surrounding their name?  For example:     Thanks for that information Greg we're here to help.


I'm experiencing something very strange after deploying the May security update on our test machines.  Here is the thing -   client machines: Win 7 with May security installed, CredSSP patched  server machines: Win 2008R2, unpatched   We have TWO particular AD user accounts who always fails the FIRST login while trying to RDP from patched client to unpatched servers.  The error is "Unknown Username or Password".  In event viewer, i can find event 4625 which indicated the same failure reason with  status: 0xc0000006c sub status: 0xc0000006a  after some test and research, i figured this has something to do with the CredSSP patch released in May security update. However the error message doesn't match the one listed in Microsoft KB   Somehow it doesn't match the Interoperability matrix either.  The strangest part is that this is only affecting these two particular AD accounts (just regular user accounts, i can't think of anything special about these two account). After their first login attempt failed, they could login successfully in the second attempt.  The other solution is to apply the security policy mentioned in Microsoft KB (changing ENcryption Oracle Remediation to Vulnerable)  I believe it is definitely caused by may security patch, but i couldn't figure out why it's only affecting two AD accounts. I would expect the same behavior on all AD users....


How to calculate the area under the precision-recall curve for the random classifier?

I know that the random classifier score in ROC AUC (Area under the curve) is always 0.5. My question is: how to calculate the Area under the precision-recall curve for the random classifier?


A situation when two or more people speak at the same time

The word or phrase I am looking for is quite opposite to that of the situation when people, such as students or sports players, sing their national anthem with the same tone and words.  I want a single word or even phrase that can describe the situation when two or more people speak at the same time with different tone and words . . . and at the end, the listener cannot get what they are saying. This situation can be found while debating, telling a news about any incident or even while complaining.     Due to _____ , the teacher could not get what they are saying.   If it's not feasible to find a noun or phrase for such situation, then here I request to have an adverb standing alone to describe how they are speaking, for instance, what is the adverb for "at the same time"?.  Here is how, I want to convert sentence 1 into sentence 2.        They spoke at the same time, and the teacher could not get what they are saying.   They spoke _____ , and the teacher could not get what they are saying.


Bug adding negative to positive floating point values

i am currently working on a matrice math lib in javascript which i have already finished my inverse function for 2x2, 3x3, and for 4x4 matrices using a adjugated cofactor mathod, when i went to multiply my inverse by my original matrice to get the identity matrix to validate my work i noticed a issue, while my diagonal of 1 was correct, where what should have been zeros where not in some places, i checked my work over several times with the help of external calculators and manually checking and i came to the conclusion it wasn't my multiplication.  i then decided to add the numbers for the number in question myself using javascript and the results are very confusing to say the least  4.210526315789474 + 0.6263157894736841 + -0.1578947368421052 + -4.678947368421052  when added in javascript output   8.881784197001252e-16  when added manually or using a calculator output  0.0000000000000009  so i did some more testing and decided to add   -4.836842105263157 + 4.836842105263158  to check if adding just the two sums would output the correct number and sure enough it did....  so my question is, why does   4.210526315789474 + 0.6263157894736841 + -0.1578947368421052 + -4.678947368421052  output the incorrect value, i am truly confused right now, thank you for the help in advanced,  my work environment is in chrome version +63 running js 1.7, all my output was to the developer console using console.log();


What to do with a highly-voted bad answer?

I think  to this  is not a good idea in that one should not really be copying files from a JDK and moving them to a JRE.  I added an answer and a comment to that effect, but my concern is that a user may see the high votes on the original answer, assume it is a good idea, and try it.   Can I use flagging to bring this to a moderator's attention?


80's Animated movie: An old man joins mission to save a boy stranded on a hostile world

A guy on a space ship picks up a distress call, a boy is stranded on a planet with a hostile environment. He & his crew go to the rescue, stopping on the way to pick up an old man who comes with them. Most of the top of the old guy's skull is metal, from an old injury.  They've various adventures on the way (their ship is boarded by pirates/bandits/hostile forces at one point).  They get to the planet with the boy. They've limited time to save him as the planet is being moved back in time. (I can't remember why) When they find the boy, he's being attacked by giant wasp-type-things.   The boy is injured on the top of his head. The old guy dies protecting him. The boy gets shifted back in time with the planet and - you guessed it - survives, grows up and turns out to be the old guy.  Now that I've remembered some of it, the bits I can't remember are driving me crazy. I'd love to see this again, if I could identify it I might be able to track down a copy.  I'd swear I saw this mid 80's on morning TV, but it I could be out by 5 years either way. Thanks


Will gravitational field of a body increase if the body is accelerated?

Suppose a body is at rest of mass m. If the same body is accelerated at velocity v, the mass increases to some definite amount. Since the mass of the body has increased, will the gravitational field of the body change in proportion to the increase in mass?


How did Wolverine get his Adamantium claws back?

In "The Wolverine", during the final battle, the Silver Samurai heats up his sword and cuts off Wolverine's Adamantium claws:                                  Then, after the Silver Samurai has been injured, Wolverine grows back his original bone claws:                                  But, in "Days of Future Past", Wolverine has his Adamantium claws again.  There was no real explanation as to how he got them back, as he still had his bone claws at the end scene where Magneto and Charles Xavier come to see him.  So what is the in-universe or out-of-universe explanation for Wolverine getting his Adamantium claws back?


Which SE site is best for asking questions about home entertainment systems?

I'm having a problem with Flixster, HDCP, and my Epson projector. iTunes and Cineplex play no problem from my iMac to my projector which is set up as a second display, but Flixster won't play on my projector because it says it's not HDCP compatible. I'm using a mini-display port to HDMI adapter and HDMI extenders over ethernet.   What SE site would be best to ask questions about this kind of stuff?


class B;  class A {     B b;     A();  };  class B {     A a;     B(); };   I have two classes as follows. For some reason, even though I forward declare class B, I have an error that says that:  field 'b' has an incomplete type!    Why is this the case?


How does physics know something is spinning or rotating?

From a purely mathematical point of view, as far as I'm aware, there is no difference between rotating a singular point by a phase phi, using its own location as the centre, or rotating all but the point around this particular point with phase -phi.   Yet in physics, this is not the case. Although particles are rotationally symmetric, they are very "aware" which particle is rotating and which one is not. If there were to be 2 particles, one rotating around the other particle which is stationary, changing the point of view will also switch the observation. Similarly, one could be spinning around its own point as mentioned before and the other one would be stationary, yet the observation still holds (from the right point of perspective). one could perhaps argue that there will be a force applied to only 1 particle, the one which is being rotated but can you observe that? Or am I just making a paradox for myself which by having insufficient perspective on the matter?   I'd love to hear your thoughts on the matter!   PS: I wonder if you can actually mathematically rotate a point, but since vector-fields are a thing (although in this instance discontinues), I see no big problems, although scepticism would be appropriate when dealing with 3-dimensional Dirac-delta like behaviour.


Autopopulate the fields based on a look field value from a standard object

Can anyone help me out with this,   This is from a custom object " Quotation", The look up field " Main Driver" is a look up to Personal account object. The below fields are as well exists in the personal account. I need whatever value would be choosen in the main driver, automatically the below values will get pop up on below fields. I need to write a trigger for this ( I cant use formula field, as its depends upon another criteria field, so somtimes the user need to enter values manually in these fields , Process builder also doesnt worked). I tried to write a trigger, but its not working , showing issue as " Error: Compile Error: IN operator must be used with an iterable expression at line 12 column 104 " Can anyone plz rectify my trigger to make it work. Thnx .( I just have taken two fields below for test)  trigger MainDriverRelatedFields on Quotation__c (before insert,before update) {  Quotation__c newQuote=new Quotation__c();  for(Quotation__c obj : Trigger.new){ newQuote=obj ;     }     List<Account> Acc= [SELECT id,Age__c, Acccidents_in_the_last_12_mnths__c FROM Account WHERE Id IN: newQuote.Main_Driver__r];       if(newQuote.Main_Driver__c!=null) {        newQuote.AgeMainD__c=Acc.Age__c;         newQuote.Accidents_in_the_last_12_mnthsMainD__c= Acc.Acccidents_in_the_last_12_mnths__c;          } }


How do people who recently bought a Macbook Pro get the free upgrade to Lion?

When I bought my Macbook Pro I was told that when Lion came out I could get the upgrade for free.  How do I go about doing this?  I've searched the Apple.com website extensively and can't find information on this.


How to add application to startup application menu?

I tried add some applications to add startup menu. But they didn't started with computer. Please Anybody help me to do that. I used only GUI method to add apllications to menu in ubuntu 12.04.Somebody please help me to do that correctly. Forget about my bad English.


Let $A \in {M_n}$ and Hermitian.Why does $rank(A) \ge \dfrac{{{{(trA)}^2}}}{{(tr{A^2})}}$?


which way is better performance (select nested tables or join)?

SELECT * FROM dbo.table1,   dbo.table2 AS T2,  dbo.table3 AS T3,   dbo.table4 AS T4  WHERE dbo.table1.ID = T2.ID   AND T2.ID = T3.ID   AND T3.ID = T4.ID    (OR)  SELECT  *  FROM dbo.table1 T1  INNER JOIN dbo.table2 T2 ON T1.ID = T2.ID  INNER JOIN dbo.table3 T3 ON T2.ID = T3.ID  INNER JOIN dbo.table4 T4 ON T3.ID = T4.ID


Do Indian citizens need transit visa for Netherlands?

My wife is a Indian passport holder and Permanent Resident of Canada. She is traveling from Canada to India via Amsterdam (Delta flight) and will have 1 hour 20 minutes layover at Amsterdam.  Will she require a transit visa for Amsterdam?


// File Security Check if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename($_SERVER['SCRIPT_FILENAME'] ) ) {     die ( 'You do not have sufficient permissions to access this page' ); }   I see this at the top of every php file in WooCommerce.  Can this be used in every theme file or plugin file as well?  Does that make any sense to even use it this way?  In what way would you use this block of code mostly?  Thanks!


How to get access for C drive application folder?

Following is the code of store attachment of email temporary. This code is working fine with my application. When I crease EXE file. I get this error:      "Access to the path 'C:\Program Files (x86)\Application Name\Temp' is   denied"   if (!Directory.Exists(String.Format("{0}\\Temp", Application.StartupPath)))     Directory.CreateDirectory(String.Format("{0}\\Temp", Application.StartupPath)); FileInfo f = new FileInfo(String.Format(@"{0}\Temp\{1}", Application.StartupPath, Atchment.Filename)); if (!f.Exists) {     using (var fs = new FileStream(String.Format(@"{0}\Temp\{1}", Application.StartupPath, Atchment.Filename), FileMode.Create))     {         int fileLength = (int)Atchment.FileSize;         byte[] rawdata = (byte[])Atchment.File;         int byteCount = rawdata.Length;         fs.Write(rawdata, 0, byteCount);     } }   I have tried with permission also by DirectorySecurity folderSecurity = Directory.GetAccessControl(path); but it didn't work. What am I doing wrong?


For the sequence $ a_n=\dfrac{2^n}{n!} $, is there a way to show that the $\lim_{n \to \infty }\dfrac{2^n}{n!}=0$? I know that it is bounded above by $2$ because it is a decreasing sequence. I also know that the closest number it will every get to is $0$ because it won't be negative. However, is there a way of showing that the limit goes to $0$?


File.list() in Java project works in Eclipse but not from terminal

I'm taking some files from different folders in Java as below:      File d=new File(path); // Path here is surely not null     String s[]=d.list();      System.out.println("Directory: "+path+s[0]+"/");   Above code works in Eclipse and my OS is Ubuntu 14.04. When I compile and run the project from terminal, I get the following error:   Exception in thread "main" java.lang.NullPointerException at io.ReadFile.read2Dir(ReadFile.java:97) at io.ReadFile.readDir(ReadFile.java:134) at gui.Run.readFile(Run.java:35) at gui.Run.main(Run.java:304)   Even if s[0] corresponds to a folder, I get NullPointerException in terminal.  This is how I compile from terminal:  javac -sourcepath src -cp /home/myUsername/workspace/tezoz_my/ -encoding ISO-8859-1 src/gui/Run.java  By the way, I had to change encoding because project is created with ISO 8859-1.  Then I run the project:  java gui.Run  This is where the error occurs:  System.out.println("Directory: "+path+s[0]+"/");  Thanks.


You play a game using a standard six-sided die. You start with 0 points. Before every roll, you decide whether you want to continue the game or end it and keep your points. After each roll, if you rolled 6, then you lose everything and the game ends. Otherwise, add the score from the die to your total points and continue/stop the game.   When should one stop playing this game?   Let $X$ represents the number that comes up on the die.  Therefore the game continues until $X<6$,  So, $P(X=6)=nCr  p^r q^{n-r}$ where $r=1$  $$ \dfrac{1}{6}=nC_1 \times \dfrac{1}{6} \times \biggr (\dfrac{5}{6}\biggr )^{n-1}$$  $$1=n \times \biggr(\dfrac{5}{6}\biggr)^{n-1}$$  $$\boxed {n = 1}$$  Am I wrong?


Can I use my windows 10 home single language key for multi language windows 10 home

I am currently using windows 10 home single language as a direct updrade from windows 8(not 8.1), i had to refresh as my display drivers didn't work along with other things, but anyways can i use the key from single language to install multi language windows 10 home


How to have Blender run my script from the filesystem rather than the script window?

I'm trying to figure out a workflow to allow me to develop addons in Blender that doesn't require me to use the Scripting window.  The scripting window is great if your script can be done in a single page, but breaks down when you need to break your code into more than one file.  It also causes problems because what you have in the script window may get out of sync with what you have saved to disk. The only alternative  I see is to keep recompiling/uninstalling/reinstalling my addon.  (By recompile, I mean running a script I've created to bundle my source files into a zip ready for deployment).  However, it takes a lot of mouse clicks in the Preferences dialog to remove your old addon and then install the latest version.  That's a lot of work to do every time you make a change. I'm seeing some references to 'reloading addons' by pressing F8 in other posts, but I don't see how that will help since I would still need to rebuild/reinstall my plugin. Is there a more developer friendly way to go about developing an addon?


I have added a line like the following to my /etc/hosts file:  159.253.x.xxx www.***.nl   When I ping to www.***.nl it gives me the correct ip address back but when I use my browser I do not get to 159.253.x.xxx (which is my development server containing a copy of the actual site).   My question is, how do I solve this?  I'm running Ubuntu 14.04.


As in how does weakhashmap understand that a reference to one of its key is obsolete now especially if the key is a String which is pooled?


When $- \pi \leq \theta \leq \pi$, $|1 - e^{i\theta}| \geq 2 |\theta|/\pi$

Suppose that $\theta$ is a real number with $- \pi \leq \theta \leq \pi$, then I am trying to see why the identity $|1 - e^{i\theta}| \geq 2 |\theta|/\pi$ holds. In this answer , we see that $|e^{i\theta} - 1| \leq |\theta|$ using the fundamental theorem of calculus (among other proofs, some using geometry).  I realize this seems easy but I'm not sure how to show this. If $\theta = \pm \pi$, then  $|e^{i\theta} - 1| = 2 = 2 \frac {|\theta|}{\pi} $, but more generally I am not sure.


Thermodynamics, temperature below 0 Kelvin

I read a news article about how they were able to create a negative temperature, below absolute zero, and my question is how does this work?  I know that there are different definitions of temperature, and for the negative temperature, it's referring to entropy, the disorder.  Can someone explain to me how is the negative temperature created and why is it in some situations when we add energy to a system, entropy does not increase?


The coarsest such topology on $\mathbb{R^{2}}$ is the usual topology

I am trying to prove or disprove the following:     The coarsest topology on $\mathbb{R^{2}}$ such that the addition $\sigma(x,y)=x+y$ and the multiplication $\mu(x,y)=xy$ are continuous maps to $\mathbb{R_{(—)}}$ is the usual topology.   I drew some pictures and had an intuition that the union of two intersections of $\sigma^{-1}(a,b)\cap\mu^{-1}(c,d)$ may not belong to $\sigma^{-1}(x,y)\cap\mu^{-1}(x,y)$, so it is not the usual topology. Is my approach correct? Can you provide me some counter-example? Thank you in advance.


I'm looking for a way for my HTC Hero (Android 2.1) so I can share the contents of my SD card and phone memory over the WiFi network like a regular Windows file share. I'd like one that does not require me to root my phone, and am willing to pay for the right app so it doesn't have to be free.  I'm thinking of using SMB server and all I've found so far are:    which requires root access.  which is a "Java implementation of the SMB/CIFS network file and printer share server for Android devices" hosted on Google Code that has no documentation and has not released any files.   Is it even technically possible to develop an SMB Server on Android that can be installed without root access?


I am a moderator for Woodworking SE and question/answer content often requires images. There is a problem loading images to StackExchange sites in that the size of the files must be less than 2 meg. Most photos these days are larger than that and the user must find a way to reduce the file size. This tends to discourage users from including photos and posts often end up including external links to dropbox or other sites rather than adding the photos. I end up chasing these links down and converting the photos myself to provide meaningful content in the posts that will survive over time. I realize that detail is lost in reducing the size, but 2 meg still allows for adequate information for the images I have reduced (using photshop).   It would be very helpful if the image dialog was able to reduce image sizes itself making it easier for people to post. I have seen this ability on other sites from time to time and would like to request this feature in SE.


How can I find the source of a mysterious bad smell?

We have recently moved home, and all is fine appart from a mystery smell which I'm unable to track down. It's driving me crazy (actually, my wife thinks I am crazy as she can't smell it).  I'm hoping someone on here could offer some tips on how to track it down, or what it might be.  Here's some info:  Background: The house is a two floor (plus basement) block/concrete construction.  There is a wide hallway on the groundfloor connecting the rooms (including kitchen, toilet/shower room, stairwell).  The stairs are wood-board on concrete.  The floor in the hall and kitchen  is tiles over concrete, the rest woodblock/parquet over concrete.  Location of the smell: I usually smell it when coming down the stairs, seems to be strongest about half way down.  However sometimes it doesn't smell on the stairs at all, but rather in the ground floor hallway.  Seems to move around quite a lot. Occasionally I have felt it upstairs, but assume this is it drifting. The basement smells fine.  The Smell: The best description of the smell I can give is something like old rubbish.  What I've investigated so far:  1) Something died somewhere?  This was my initial thought, and since I usually notice the smell on the stairs I thought I'd try there first.  I've taken up some of the wood on the stairs (not all yet) but not looking promising, as there really isn't much space between the wood boards and the concrete.  Not really sure where else something could have gotten, as everything seems to be tight against the concrete.  2) Smell from kitchen moving into rest of house? I never really detected a bad smell in the kitchen, but thought I'd rule it out anyway. I thought maybe it was the bin under the kitchen sink that might be causing it.  So I moved the bin to a small storage room at the back of the kitchen (and kept the door closed) and thoroughly cleaned inside the cupboard under the sink. No change.  I also looked behind all of the cabinets for a problem, but could not see anything.  3) Gas from drains? The sink doesn't smell in the kitchen, and it's got a P-bend trap on the pipe - so I can't see a problem there.  Cant detect a smell from the plugholes in the bathroom either.  The bathroom sink waste pipe has a bottle-trap on it.   Don't know if there is a trap on the shower as it's a sealed unit, but I'm guessing yes (and can't smell anything).  Can any one think of something I might have missed, or give any advice?


too many of your recent flags declined, but not in reality

I was gonna flag a post for reopen but could because it show me this error:    but, look at my flag list:      Note: There are flags "waiting" for over a month until now. This is why I got so many on hold.  How can I fix this?    Since 02-14-2014:   Declined + Disputed (I'm counting Disputed as Declined because I have only 2 Declined):     6 Active: 14 Helpful: 13


show that the limit of $\lim_{n \to \infty} n^{\frac{1}{n}} = 1$

alright so im supposed to show that the limit of $\displaystyle \lim_{n \to \infty} n^{\frac{1}{n}} = 1$ , ive alwasy had problems with math questions of this type: "show" and never really knew what to do, but since its $n^{\frac{1}{n}}$ thats basically $n$th-root of $n$ when $\lim \to \infty =1$ of that function so yeah :)  I have no idea how to go forward with this problem, but I managed to figure out that if $n=2$ then I get $1.4$, if $n=5$ then I get $1.38$ and if $n=1000$ then I get $1.007$ so it seems like im getting closer and closer to $1$ as $x$ approach larger numbers?? ok anyway! thanks for tips and help :D


I'm quite confused about the following regular expressions I found in a shell script:  ${0##*/} ${0%/*}   How do they work?


My keyboard has no "media" keys; can I control media without them?

My USB keyboard does not have "media" keys -- that is, dedicated keys for play, stop, next, prev, volume up/down, etcetera.    For the sake of this question, I would prefer not to install additional software if I can avoid it.  Is it possible to issue some standard key sequence on a generic USB keyboard that emulates these play, stop, etc. multimedia keys?  Like Ctrl+Alt+Shift+F12 or something obscure like that?


Non-existence claims making use of the axiom of regularity

We have that an intersection with the empty set is empty, $$\forall x.\, \varnothing \cap x = \varnothing$$  and so with the witness $\varnothing$ for $y$, we get  $$\forall x.\, \varnothing\in x \rightarrow \exists y.\, (y\in x \land y \cap x = \varnothing)$$  and so in particular  $$\forall x.\, \varnothing\in x \rightarrow \left(x \neq \varnothing \rightarrow \exists y.\, (y\in x \land y \cap x = \varnothing)\right)$$  So every set holding the empty set is regular in the sense given by the axiom of regularity.   Now if we have a theory allowing us to form what would naturally be denoted as  $$x=\{x, \varnothing\},$$  (e.g. via allowing for comprehensions over a predicate $z=\varnothing\ \lor z \in x$, in which however the definiendum $x$ would notably depend on $x$ itself, calling for the appropriate axioms)  then we got an infinite descending chain, $x\in x$.  As such, is the active non-existence claim I saw occasionally here on SE as well as in the third sentence of the   Wikipedia article wrong?     The axiom implies that no set is an element of itself (...)


Error: Xenial Release repository cdrom does not have a Release file

New to Linux as of 5 days ago..all good just 1 issue, please help   I get this whenever i try to update using apt-get update.  W: The repository 'cdrom://Ubuntu 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719) xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://archive.ubuntu.com/ubuntu Xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://archive.getdeb.net /ubuntu Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository '


When is it appropriate to replace AtomicReference with a volatile member?

If a class has a private AtomicReference member, and it only calls AtomicReference#get and AtomicReference#set, then is it (a) safe and (b) useful to replace that with a nullable volatile member?


Currently questions are added in a rapid pace to SO, so that new questions disappear very quickly from the homepage. It I want to see questions from my areas of interest I can do either:   Go to the tagged/my tags page, but then I will see the questions only according to the votes Supply a list of tags "x or y or z", but it seems the list is limited to 15 or 20 tags.   What I suggest is to have categories as grouping of tags - the .net category , java category , web development category , etc. It can also help new users to locate questions from their area of expertise they can answer. We can decide that a category can contain between 5 and 20  tags in order no to have too narrow or too broad categories (numbers were given just for the sake of argument)


I understand there are a lot of questions talking about when should we use GC.Collect(), but I would like to know how to verify a complicated enterprise program if I realize one of the class has this line that seems to cause performance issue? Are there any good steps to follow and verify this line is safe to remove?


How to pass an array of pointers, and to let the function find the size of array?

I'm trying to pass an array of pointers to a function, without the need to define the size. Also the output is a warning  "initialization makes pointer from integer without cast. Mostly interested in passing array of pointers rather than an array because I'm trying to understand how to deal with the instance when Data is a dynamically allocated memory using malloc  Why is this happening, and how can I pass an array of pointers as an argument, without the need to define its size?  Code:  #include <stdio.h>  void printData(int *data[]);   void main (int argc,char *argv[]){      int *Data[] = {4, 8, 15, 16, 23, 42};     printData(Data);  }  void printData(int *data[]){      int **cur_data = data;     int counter = sizeof(data)/sizeof(int);     for(int i = 0; i<counter; i++){         printf("%d. %d\n", i, *cur_data);         cur_data++;     } }     Warning:  main.c: In function ‘main’: main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast gcc   main.o -o run     Run:  0. 4


I just installed Ubuntu 18.04 and one of my first negative impressions is the long animation of flying-in icons when opening the app menu.  Can I speed this up or disable it?


What to look out for in a second hand bike buy

I am looking into buying a second hand bicycle. What should one look out for (frame and component wise) when buying second hand, both for hardtail and full suspension xc/all mountain type bicycles?


How long does uncooked meat last when kept in the freezer?

Chicken, beef, or even shrimp? How long can I keep it there before it goes bad?


Is it "I won't repeat it again" or just "I won't repeat it"?

I just want to confirm that whether I should use repeat again or just repeat, as repeat already means something done again and again.     1) "I won't repeat the mistake again."   2) "I won't repeat the mistake."


Does there exist a function satisfying the given conditions?[TIFR Mathematics GS-2017]

Does there exist a function $f:\mathbb{R} \rightarrow \mathbb{R}$   satisfying $f(1) = 1$, $f(-1) = -1$ and $$|f(x)-f(y)|\leq|x-y|^{3/2}$$ $\forall x,y\in\mathbb{R}$?   I tried polynomial functions, $\sin(\frac{\pi}{2}x)$ etc. None is fitting the third condition. In competitive exams, searching for functions is a bad idea. Can anyone give advice? What should I do when I get this type of question? How to prove or disprove? Please explain.


how to make a variable not exceed the size limit of its type?

so i want to know how to make a variable not exceed its number limit.  for example:  int x;   the size of x is four bytes  and since it is signed it starts from  (−2,147,483,648) to (2,147,483,647)  so if the input is larger than 2,147,483,647 it would not register and i want to prevent the program from letting a number larger than its number limit from being inputted  here is a code that will run into that problem:  int x[3]; x[0] = 12; x[1] = 642; x[2] = 800000000; for (int z = 0;z < 3;z++) {          x[z] = x[z] * 3;   }   so how will i go about preventing x[z] from multiplying its self by 3 if the result is bigger than the number limit of the variable type?


I took few help online to complete my task. And I found this code but I do not know the actual working as I have never used such syntax before in c++. The (?) Question mark and (:) colon.Can any one provide a simple general syntax code explaining same line?  x = (i-coins[j] >= 0)? table[i - coins[j]][j]: 0;


How does one get the formula for this bijection from $\mathbb{N}\times\mathbb{N}$ onto $\mathbb{N}$?

When showing that $\mathbb{N}\times\mathbb{N}$ is in bijection with $\mathbb{N}$, it seems standard to give a proof by picture that shows a way to systematically weave through all the points in $\mathbb{N}\times\mathbb{N}$ and label each one as you go.    I know there is a polynomial expression for this method, given by $$ J(m,n)=[1+2+\cdots+(m+n)]+m=\frac{1}{2}[(m+n)^2+3m+n] $$ where $m$ is the usual $x$-coordinate and $n$ the usual $y$-coordinate.  But how does one "see" how this formula is arrived at? I know how to manipulate the middle expression to arrive at the rightmost expression, but how does the middle expression relate to the weaving pattern through $\mathbb{N}\times\mathbb{N}$? Thank you.


Let $(X,d)$ be a metric space and let $S$ be the set of Cauchy sequences in $S$. Define "~" in $X$ by declaring "$\{s_k\}$ ~ $\{t_k\}$" to mean that $d(s_k,t_k) \to 0$ as $k \to \infty$. Let $X'$ denote the set of equivalence classes of $S$ and let $s'$ denote the equivalence class of $s = {s_k}.   I showed that $\phi(s',t') = \lim\limits_{k \to \infty} d(s_k,t_k)$ is a metric on $X'$.   Now I need to show $(X',\phi)$ is complete. Then for $x \in X$, define $x'$ to be the equivalence class of the constant sequence ${x,x,...}$. Show that the function $x \to x'$ is an isometry of X onto a dense subset of X.   I don't even know where to start. I need to show for the second case that for any $y' \in X'$, we can find a sequence that converges to $y'$. Any help please?


What are the regulations for making a fire while camping in Iceland?

What are the regulations for making a controlled and monitored fire made with the intent of cooking/heating while camping in Iceland?


BootChamp no longer works on El Capitan, what's the fastest way to boot into Windows?

Ever since OS X El Capitan, BootChamp, the utility that let you directly restart into Windows from the menu bar (without needing to hold the option key) no longer works. The developer's explanation can be found   How can I quickly boot into Windows, ideally from the menu bar?  Perhaps a way to package an AppleScript into a menu bar icon? I don't want to disable SIP just for BootChamp.


Product of invertibles in $\Bbb Z_n$ [Wilson's Theorem generalization]

How can we compute the product of all invertibles in $\Bbb Z_n$?  In the special case $n=p$ where $p$ is a prime it is Wilson's theorem. By pairing inverses it reduces to computing the product of all $a$ such that $a^2\equiv 1\pmod{n}.\,$  How can we do that?


How do we know that the dark matter is cold or non-relativistic?

According to the $\Lambda$CDM parametrization of the Standard Model of Big Bang cosmology, the universe contains a cosmological constant $\Lambda$ associated with $73\%$ dark energy, $23\%$cold dark matter (CDM) and $5\%$ ordinary matter.   I have also read from Kolb and Turner's book that the Cold dark matter leads to a "bottom-up" formation of structure in the universe while hot dark matter would result in a "top-down" formation scenario; since the late 1990s, the latter has been ruled out by observations of high-redshift galaxies such as the Hubble Ultra-Deep Field.  $\bullet$ How do we know that the dark matter is cold or nonrelativistic?  $\bullet$ What is the percentage of hot dark matter in $\Lambda$CDM parameterization? Is the possibility of dark matter totally ruled out?    Addendum Existence of CDM does not rule out existence of HDM. In fact, it is assumed that the dominant fraction of the dark matter is CDM type. But observations only tell us that $23\%$ of the total mass-energy of the observable Universe dark matter. But this information does not tell how much of it is HDM and how much is CDM? The belief is that the the dominant component of the dark matter is CDM but is there an estimate? Is there a physical way to understand/expect why the CDM should be the dominant contribution?  Please note There is a typo. I wanted to ask "Is the possibility of hot dark matter totally ruled out?"


I have a list of random float values.  Here's an example: my_list = [56.23, 9.1, 856.1, 158.31, 84.15, 63.91, 3.46, 5.1, 5, 6, 31, 84]  Except, my list (when generated) is hundreds of variables long, always divisible by 6.  I'm trying to find a quick way (that doesn't involve reversing the list and iterating through new list variables by popping them off one-by-one) to turn my list into a list containing all of the original floats, but paired into groups of six?  Here's how it should look given the random list I've created above: my_list = [56.23, 9.1, 856.1, 158.31, 84.15, 63.91, 3.46, 5.1, 5, 6, 31, 84] new_list = some_awesome_function(my_list) print(new_list)  This new_list variable should print: new_list = [[56.23, 9.1, 856.1, 158.31, 84.15, 63.91], [3.46, 5.1, 5, 6, 31, 84]]  Simply the same list, but it groups every six variables into its own group within the group.  Any idea, folks?  This would be very much appreciated.


Special symbols in Spring request`s parameters

I have     @RequestMapping(value ="/getTaxiByPhone",method = RequestMethod.GET) public @ResponseBody String getTaxiByPhone(@RequestParam ("phone") String phone){     int count=0;     for (int i=0; i<taxiList.size();i++){         if ((taxiList.get(i).getPhone()).equals(phone)){             count++;         }     }     return "found "+count; } @RequestMapping(value ="/getTaxiPhone",method = RequestMethod.GET) public @ResponseBody String getAllTaxi(@RequestParam ("id") int id){     return taxiList.get(id).getPhone(); }  @RequestMapping(value ="/getAllTaxi",method = RequestMethod.GET) public @ResponseBody List<Taxi> getAllTaxi(){     return taxiList; }   For example getTaxi?id=2 returned {"taxi_city_id":[55000001,67000001],"taxi_id":1113,"taxi_name":"zxcv","taxi_phone":"+73812999997"} , but if you try getTaxiByPhone?phone=+73812999997 you will not find any objects, because if you try return phone parameter with count (return "found "+count+" for phone"+ phone;), you will see found 0 for phone 73812999997. This means that sign '+' lost when spring parse url.


The use of the grammar structure "if" + "would" in context

I stumbled upon it in this . It is at 1 hour 21 minute and 42 second.     If the Israelis would ever once just say we got screwed in 1948, and we are sorry it happened, we would be willing to make peace.   I think it is quite clear that the sentence is conditional, thus it is not correct to use would in the if clause. Did the lecturer say that by mistake? Or is that some kind of grammar I am not aware of? And by the way, what does get screwed mean there?


Just want to check if my computer can run Ubuntu. It is an old IBM ThinkPad, so here are the basic stats I could find:  IBM 28832ZU  Processor Intel(R) Celeron(R) M processor 1300MHz  Processor Speed 1.27 GHz  Memory (RAM) 2048 MB  Operating System Microsoft Windows XP Professional  Operating System Version 5.1.2600  Intel Extreme Graphics 2M   And here is some info pulled from the graphics panel  NTEL(R) EXTREME GRAPHICS 2 FOR MOBILE REPORT  Report Date:        06/28/2013 Report Time[hr:mm:ss]:  17:53:20 Driver Version:     6.14.10.3943 Operating System:   Windows NT* 5.1.2600 Service Pack 2 Default Language:   English DirectX* Version:   9.0 Physical Memory:    2038 MB Min. Graphics Memory:   8 MB Max. Graphics Memory:   64 MB Graphics Memory in use: 7 MB Processor:      x86 family 6 Model 9 Stepping 5 Processor Speed:    1296 MHZ Device Revision:    2   Output Devices Connected to Graphics Accelerator   *   Active Notebook Displays:1


I'm new to C++ and working on a simple project. Basically where I'm encountering a problem is creating a file with a number (int) in the file name. As I see it,I have to first convert the int to a string (or char array) and then concatenate this new string with the rest of the file name.  Here is my code so far that fails to compile:  int n; //int to include in filename char buffer [33]; itoa(n, buffer, 10); string nStr = string(buffer);  ofstream resultsFile; resultsFile.open(string("File - ") + nStr + string(".txt"));   This gives a couple compilation errors (compiling in Linux):    itoa not declared in this scope  no matching function for call to ‘std::basic_ofstream char, std::char_traits char ::open(std::basic_string char, std::char_traits char , std::allocator char )’   I've tried the advice here:  and here:  with no luck.  If I using the to_string method, I end up with the error "to_string not a member of std".


Why are many 9V DC wall adapter power supply measured as 12-14V by a multimeter?

I have tried with many (working) 230V - 9V DC wall adapter power supply (of different brands, some of them coming with an electronic Yamaha device, etc.):    they all show a higher voltage when measured in "DC mode" by my multimeter, like 12V - 14V they even show a higher voltage when measuring in "AC mode" of the multimeter: ~ 30V! This doesn't really make sense: the output of the power supply should be DC, so a theoretic AC voltage should be 0V. Ok, I understand the output of such an adapter is never "perfectly" DC, and there might still be a small sinusoidal component... However, why 30V?   What could be the reason of this higher than normal voltage?  Could it be a ripple after the ?  PS: I don't own a oscilloscope to test the output of the wall adapter, but I will try to borrow one!  PS2: if it was only with 1 such adapter, it could just be a faulty one. But now I've tested about 6 different (working) adapters of different brands...  PS3: it's a cheap multimeter () but efficient. All other voltages that I measured have always been correct.


Inspired by , it occurs to me that if inanimate machinery (e.g. elevators) can lift Mjolnir, is Vision really proving himself "worthy" by doing so in Age of Ultron?  Vision is a synthetic, an Android, with an AI. I suppose this depends on what constitutes a "who" vs a "what" in the MCU, but still.   Is there evidence to suggest that as an artificial construct, not motivated by any human will, Vision would not be able to lift Mjolnir even if he weren't "worthy"?  Isn't he just a hyper advanced elevator with some extra features?


Is there a word for something (a parameter not a person) that is being affected?

My sentence reads something like, "These parameters are being affected on varying a and b conditions." I want it to sound like, " The affectees of parameters a and b are ... " I don't know if I can use affectee here or if that is even a word.  I have found rare usage of this word affectee and never for a parameter. Any suggestions?


arrow function not working but using function the old way works

I'm trying to be all cool and modern and use arrow function es6 js but failed at the first attempt.  Why does this arrow function sumRange NOT work:      var output = sumRange(3);     console.log(output);      sumRange = (num) => {             if(num == 1) return 1;             console.log(num);             return  num + sumRange(num - 1);         }   But here the function DOES work:     var output = sumRange(3); console.log(output);  function sumRange(num){     if(num == 1) return 1;     console.log(num)     return num + sumRange(num - 1); }


Let $$x=\lim_{n\to1^+}\left({\zeta(n)-\dfrac{1}{n-1}}\right)$$ where $\zeta$ is Riemann zeta function. What is the value of $x$?  At $n\to1^+$, $\zeta(n)\to\infty$ and $\dfrac{1}{n-1}\to\infty$, so this is indeterminate form of type $\infty-\infty$. I wrote this limit as $$x=\lim_{n\to1^+}\dfrac{\zeta(n)^2-\left({\dfrac{1}{n-1}}\right)^2}{\zeta(n)+\dfrac{1}{n-1}}$$ Then I tried to apply L'Hopital's rule, but this limit become more complicated. Also, derivative of zeta function is very complicated, so L'Hopital's rule cannot help evaluating this limit. What is the easiest way to solve it?


While working with the ModelBuilder, I added 2 columns to the data. After you have done "Summary Statistics" according to the GridID, you know the output product in tabular form. I wanted to print the table with the join based on the common column GridID's. But there is a problem here. During the Add Join process, the model wants the input product to be in Table Of Contents.  So it want to data as a "parameter". When I run the model from the inside, I say "Add to Display" to the latest product. Thus, the model sees it and accepts it as input. But when I run the model from the outside, it gives error because there is no input / output product in "Table of Contents". How can i solve it?


Creating a virtual file whose contents are determined programmatically

Is it possible to create a virtual file in unix, whose contents are determined programmatically when the file is accessed, a bit like the files in /proc?  For example, I have a program that retrieves a particular setting by reading/catting a file. However, rather than store that setting directly in a plain text file, I want to be able to retrieve that setting from a database in the background and then pass that information to the program when it reads this virtual file. Is it possible to do so?


What options do I have to replace a failed service panel?

What are my options to replace an old service panel?   We had a terminal get burned up in our old 1960s GE (TRX2012S if it matters, it's a split-bus/rule-of-six panel).   The tech who looked at it said the part is no longer available, but that if I could find another old service panel just like it, he could swap in the part. Otherwise, it's going to be $2,000+ to replace it with a modern service panel, which also requires getting up to modern code, which involves a lot of other stuff.   EBay and Google isn't showing any direct replacements (or the flush-mount TRX2012F).    What other options would there be to replace the panel internals?  Are the screw mounting holes compatible with modern GE panel internals? Is the main breaker separable and could that be changed alone?    Enclosure dimensions are about 20.5" x 12". Front panel dimensions are about 22.25" x 14".  UPDATE:    I'm looking at information on replacing the breaker box myself. As the homeowner I wouldn't be required to update anything else to get up to code. Does this sound like a good idea? I've done minor electrical DYI work but nothing this involved.  PICTURES:            More pictures:


A proof that $\displaystyle\sum_{i=1}^{n}P''(r_i)/P'(r_i)=0$ for a degree $n$ polynomial

Let $P(x)$ be a degree $n$ polynomial with distinct roots $r_1, r_2, \cdots r_n$. Prove that   $$\displaystyle\sum_{i=1}^{n}\frac{P''(r_i)}{P'(r_i)}=0$$  My proof: We can equivalently rewrite the polynomial as $(x-r_1)(x-r_2)\cdots(x-r_n)$ and if we plug in the roots in the polynomial, we get that all of them are equal to $0$ so their first derivatives are equal to $1$ and then their second derivatives are equal to $0$ which means that all quotients are equal to $0$ and there for the sum is as well, $Q.E.D$  Don't show the solution please, but if you have a hint, feel free. Thank you.


How the probability threshold of a classifier can be adjusted in case of multiple classes?

The above is a very simple example of having a probability classifier output for a binary-class case either 0 or 1 based on some probabilities. In addition it is straightforward how you can change the threshold. You set the threshold either higher or lower of 50% to change the precision/recall balance and thus optimize for your own unique situation.  However when we try to have the same thinking for a multiclass scenario, even as little as three classes as is shown in the picture below (imagine that these are probabilities)    How do you begin to think how to shift the threshold? The default is to take the class with the largest probability (here is class 3). If you want to take this balance (to affect precision/recall) what could you do? One idea could be to take the first most dominant classes re-normalize them and consider putting a threshold among these two, but this does not sound like an elegant solution. Is there a solid methodology to follow?


How to Fix W: Target Translations (main/i18n/Translation-en) is configured multiple times

I am pretty much a noob at Linux and have only been using it for like 3 weeks. When in terminal for sudo apt-get update I get the below errors.  W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Translations (main/i18n/Translation-en_ZA) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Translations (main/i18n/Translation-en_ZA) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/additional-repositories.list:2   Can anyone help me in fixing these? Really appreciate it. Have a great day.


I need to find all complex numbers $z$ such that $\mid 2z/(z^2+1) \mid < 1$. If $z$ were real, it would be easy, but now that $z$ being complex numbers makes things so twisted...I cannot find a way to approach. Could anyone please help me?


What does this symbol in the schematic represent?

I know the symbol at the bottom is ground, but I can't get what the other symbol is. It can be a single symbol of two arrows pointing at each other, or two symbols each one a arrow.  I also have the PCB for this schematic. It is nothing but two traces (1mm long) with a little gap in between. Is it a RF filter of some sort?


What is the probability that $m$ is the largest number drawn?

A box contains $n$ identical balls numbered $1$ through $n$. Suppose $k$ balls are drawn in  succession.   (a) What is the probability that m is the largest number drawn?   (b) What is the probability that the largest number drawn is less than or equal to $m$?  I don't know how to solve this problem? Could you help me? For (a), I only know that the denominator will be $\binom{n}{k}$. How to find the numerator for both cases?


I've got an iPhone with ~500 open tabs (500 is the limit). I'd like to bookmark all of the tabs so I can review/read them later on other non Apple devices and potentially in non-apple browsers.  Is there any app or solution (like a pinboard client) that will allow me to bookmark and close those tabs in mobile safari then, at a later time, view the bookmarks in another browser or on a desktop?


Rails has_many :through Find by Extra Attributes in Join Model

New to both Ruby and Rails but I'm book educated by now (which apparently means nothing, haha).  I've got two models, Event and User joined through a table EventUser  class User < ActiveRecord::Base   has_many :event_users   has_many :events, :through => :event_users end  class EventUser < ActiveRecord::Base   belongs_to :event   belongs_to :user    #For clarity's sake, EventUser also has a boolean column "active", among others end  class Event < ActiveRecord::Base   has_many :event_users   has_many :users, :through => :event_users end   This project is a calendar, in which I have to keep track of people signing up and scratching their name out for a given event. I figure the many to many is a good approach, but I can't do something like this:  u = User.find :first active_events = u.events.find_by_active(true)   Because events don't actually HAVE that extra data, the EventUser model does.  And while I could do:  u = User.find :first active_events = [] u.event_users.find_by_active(true).do |eu|   active_events << eu.event end   This seems to be contrary to "the rails way".  Can anyone enlighten me, this has been bugging me for a long time tonight (this morning)?


My laptop has come with WIN8 and secure booting through UEFI (this is very new bootloader for me) I want to natively boot Ubuntu like using BIOS. Can anyone suggest me a way for this? I have read Ubuntu using intermediate signed bootloader and then switch to unsigned bootloader and kernel. I dont believe in security stories from microsoft on my laptop, and want to use it my way. Do share with me any of the pointers you may have  PS: I am happily using Ubuntu 11.04 (on desktop, laptop and VM) as I don't like forced unity in latest Ubuntu versions. But I doubt about driver support in that version for laptop in discussion. So I can change my mindset for booting natively with UEFI.


One of the paladin spells is , which summons a spirit taking the form of a steed. Can it carry my party's stuff, like a regular animal can?


I know the desired syntax lies in the first function but I for the life of me can't find where it is.  I've attempted to remove commas and add spaces to each .split() each has yielded an undesired return value.  def get_country_codes(prices):     price_list = prices.split(',')       results = ''     for price in price_list:           results += price.split('$')[0]        return results  def main():     prices = "US$40, AU$89, JP$200"     price_result = get_country_codes(prices)     print(price_result)  if __name__ == "__main__":     main()   The current output:  US AU JP   The desired output:  US, AU, JP


How do i form the inequality $ -5\le 3\cos x - 4\sin x\le5$?

We know that $-1\le \cos x\le1$ so we if we multiply 3 so we get $-3\le 3\cos x\le 3$ and we also know that $-1\le \sin x\le 1$ and and again we multiply 4 we get $-4\le 4\sin x\le 4$ and we can add these two inequality we get $-7\le 3\cos x - 4\sin x\le 7$ but how in the above inequality is forming i m not able to understand at all.


I want to create a shortcut to Whatsapp web that will open it in Firefox as if it were a standalone application. Ideally: No tabs, address, or extentions visible. Indexed as an application when using alt-tab. Is there any way to achieve this?


I have to evaluate $\lim_{n \to \infty}n/(n^2+1) + n/(n^2+2)+n/(n^2+3)+....+n/(n^2+n)$  Now, for the rth term: $\lim_{n \to \infty}n/(n^2+r) = 1/(n+(r/n)) = 0.$ Since this is true for any term, and limits are distributive over addition, the limit should be zero. But this is wrong. Why?


Ubuntu 16.04 not switching automatically to headphones

every time the OS starts, the headphones are detected in pavucontrol, however I need to select them manually. Is there a way to automatize this process?


Do creatures who come into play tapped have summoning sickness?

If I play  (and we know he comes into play tapped) and have a  or something out to untap him, am I prevented from sacrificing the two islands and attacking the turn he came into play? In other words, if a creature comes into play tapped and you untap it, does it still have summoning sickness preventing it from attacking?


Is Google's definition of Acronym incorrect?

According to Dictionary.com,  and  are two distinct terms that are commonly confused with each other.     Can be confused      abbreviation, acronym, initialism.         Contrastly, Google  as a specific type of abbreviation.     Acronym:      an abbreviation formed from the initial letters of other words and   pronounced as a word (e.g., ASCII, NASA ).         I know that , but there seems to be contradicting information on whether the reverse is true.  There are some acronyms which take longer to say than their original phrase. As  points out, despite being shorter to write, it takes longer to pronounce www (9 syllables) than world wide web (3 syllables).  Are all acronyms a type of abbreviation, even if the abbreviation takes longer to pronounce when spoken?  A  claimed that acronyms and synonyms are both two distinct terms, but does that mean that Google's definition of acronym is incorrect?


How can I avoid using hyphen at the linebreak to separate a word?

I just cannot find how to avoid breaking a word with hyphen when the line breaks. For example:  How can I trans- late a word ?  Wait reply. Regards.


I am writing a thesis and have to write some Hindi words using LaTeX. When I use  \usepackage{devanagari}   removed. For example:  {\dn school}    the output generated is     I want output to be like this: स्कूल


Extracting vertices data after transformations

I'm using few rotations and scale changes in a model and then export the location of the vertices after the change, but when I do so, the vertices extracted are those of before the transformations and not after. How can I extract the new vertices?  An example for a transformation:  bpy.data.objects["Main"].pose.bones["finger5-.L"].rotation_quaternion[1]=random.uniform(0, 0.4)   And the code for extracting the vertices:  mesh = bpy.data.objects["Main:Body"] vertices = mesh.data.vertices for vertex in vertices:     vertex1 = vertex.co[0]     vertex2 = vertex.co[1]     vertex3 = vertex.co[2]     row = [vertex1, vertex2, vertex3]     with open(os.path.join(vertices_output_path, 'vertices.csv'), 'a') as csvFile:         writer = csv.writer(csvFile)         writer.writerow(row)         csvFile.close()


HP Pavilion G6 administrator password problems

My Aunt passed away and I got her laptop but don't know the passwords to get into it. What can I do? Can it be factory reset without them?


PSD to Al in order to create a vector file?

Is it possible to create a logo in  Photoshop and then open the PSD file in Illustrator Al without flattening the layers and then saving it as a PDF and then it is in a vector format?


I have a hp pavilion g6 laptop, it runs Windows 8.1. I was planning to use a free os for a while. Which is the recommended Ubuntu version for me? I am totally a newbie to such OS. I have only used windows till date.


Can two Macs be kept in sync using a single external hard drive?

I regularly commute by bicycle from home to work and find the weight of a MacBook Pro a little excessive. My thought is to have identical MacBooks at the office and home and only carry a hard disk on the bike.   So how would it be easiest to ensure that the two laptops are totally synchronised? Would Time Machine do the job or would it be time consuming and cumbersome? Or is there a better way of doing this avoiding cloud-based or network-based sync solutions.   The only connection between the two MacBooks will be through a portable hard drive.


I have an unusual problem with -e flag in a following bash script:  #!/bin/bash -e foo() { return 1; } bar() { foo; bar; } bar || exit 1   Namely the script does not terminate, even though the foo function returns 1. However after removing '|| exit 1' part this script works as expected- it fails just after the first foo execution.  #!/bin/bash -e foo() { return 1; } bar() { foo; bar; } bar   EDIT: bash versions tested: GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu) GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)


Error while starting apache2 "Cannot access directory '/var/log/apache2/' for main error log"

When I run sudo service apache2 start I get this error:  Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.   And when I run systemctl status apache2.service I get this:  ● apache2.service - The Apache HTTP Server    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)    Active: failed (Result: exit-code) since Tue 2019-01-15 16:20:26 -03; 7min ago   Process: 8101 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)  ene 15 16:20:26 pc systemd[1]: Starting The Apache HTTP Server... ene 15 16:20:26 pc apachectl[8101]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.  ene 15 16:20:26 pc apachectl[8101]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log ene 15 16:20:26 pc apachectl[8101]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost  ene 15 16:20:26 pc apachectl[8101]: AH00014: Configuration check failed ene 15 16:20:26 pc apachectl[8101]: Action 'start' failed. ene 15 16:20:26 pc apachectl[8101]: The Apache error log may have more information. ene 15 16:20:26 pc systemd[1]: apache2.service: Control process exited, code=exited status=1 ene 15 16:20:26 pc systemd[1]: apache2.service: Failed with result 'exit-code'. ene 15 16:20:26 pc systemd[1]: Failed to start The Apache HTTP Server.   What can I do about this?


Is the integer polynomial ring $\mathbb Z[X]$ an Euclidean domain?

Though seemed to be a common question, I couldn’t find any information on that. I can’t imagine the Euclidean function would be like, if there exists one, so my guess is not. But how to prove it?


Coefficient of $x^{-2}$ in expression $(x-1/x)^{12}$

Find the coefficient of $x^{-2}$ in $$(x-1/x)^{12}$$   Can anyone help me with this by providing the process to find the answer? I know the answer is $-792$ but I can't find it.


I am Brazilian, I would like some guidance on how to start a salesforce developer career. I am sorry for my english. Can someone help me ?


How do I delete my network profile after deleting all my accounts on all sites?

If one has an account on any of the SE sites (Stack Overflow, Super User etc.), in order to delete their account, they can do so from their profile page. Numerous similar questions have been asked and answerers are always directed to this page:    However, even after one has deleted all their accounts and one is not a participant of any of the communities, one continues to be logged in when they visit www.stackexchange.com. Now, if one clicks on any of the communities (Stack Overflow, Meta etc.), they are first asked to join. But how does one delete their master account, so that instead of being asked to join, they are first asked to log in?


Community ♦ flagging freeform closed posts for comment

On beta sites, when a post gets closed without comment, Community ♦ flags it for moderator attention.   Apparently, a comment entered through the freeform close reason doesn't count:    As you can clearly see, there should be no doubt that a comment already exists on the post  Could this be fixed? I don't think it's that important -- I just have to decline the flag, however on larger sites this may lead to a lot of extra flags.


Ubuntu 14.04. I have 2 user accounts. This problems appears only for one of it. I have no more icons on my desktop, neither the launcher, just the desktop picture. Right click still works, so I can access system settings. When using gnome, everything works perfect.


I read xrange is lazy it works at the last moment is it

I read this if we want to create a list of 1000000 numbers than using range(1000000) is not a cool idea because that will take a lot memory and soon as this range() is called it creates a list of that input size whereas xrange(1000000) would be better as it creates the values as needed   Say i have this little program:   for i in xrange(1000000):         print i    Does this create the next position in the list every time the for loop is called not at the time when we called xrange(1000000) ?


Modify part of line if keyword is found using sed?

I want to modify a line if a specific keyword is found in a line.  CS_CODE, SM_NUM, PORT_NUM, DEV_PORT_NUM, DIRNUM, MAIN_DIRNUM, BILL_NO, ADR_NAME   In above line, if 'PORT_NUM' is present then 'BILL_NO' should be replaced with 'NA'. Only the keyword present in the line should be replaced.  I am using below approach:  while IFS=$'\n' read -r line do      if [[ $line == *"$string"* ]]; then            < sed command to replace only keyword >      fi done < "$file"   How can I achieve this?  Note: '-i' extension does not work in my sed version.


I’m still a long way from being able to cast close votes on SO (my rep is around 40% of the required amount).  When I see something that looks wrong I generally flag it (usually as not a real question, duplicate, or needs to be somewhere else).  I get the impression that my flag weight is relatively high (around 557).  Does this mean that I’m flagging too often or is it ok to flag whenever something seems like it’s in the wrong place?  Should I instead be ignoring the questions and assuming that close/delete votes will be cast by members with sufficient rep?  If I am doing the right thing, then what’s the appropriate action when I do eventually get to the point where I can cast close votes?  Do you just vote to close, or vote to close and flag, or is this a nonsense question that will make sense when I get there?


Schengen visa for two subsequent short trips: One visa or two?

I will go to France from 17/12/13 – 19/12/13, then I will come back to London. And again I will go back to Portugal and Spain from 26/12/13 to 03/01/14 which I will stay in Spain for the longest period. However, the Spanish consulate told me that I have to request for the visa from the French consulate.  The point is: Do I need to apply for a visa for a single trip two times (from French and Spanish consulate) or a single visa for multiple time (from French consulate).


I have been using linux for a like a month and I have felt in love with it, so I as wondering if we can make shortcuts like in windows?


How can I create a message box from the command line?

How can I create a message box from the command line, either GUI message boxes or message boxes shown inside the terminal? It would also be interesting to be able to get a simple input back from the user, for example, an input given with radio buttons (yes/no, OK, etc).


We can obtain "absolutely perfect CONFIDENTIALITY" using the one-time pad. Is there such a thing as "absolutely perfect INTEGRITY"?

The OTP (one-time pad) gives us perfect secrecy. This is the very best confidentiality available in this universe. (Although it does require large keys, which is beside the point of this question).  The problem is such encryption does not attain integrity. So my question is, is there such a thing as perfect integrity?


Prove that if $AB$ is invertible then $B$ is invertible.

I know this proof is short but a bit tricky. So I suppose that $AB$ is invertible then $(AB)^{-1}$ exists. We also know $(AB)^{-1}=B^{-1}A^{-1}$. If we let $C=(B^{-1}A^{-1}A)$ then by the invertible matrix theorem we see that since $CA=I$(left inverse) then $B$ is invertible. Would this be correct?  Edit Suppose $AB$ is invertible. There exists a matrix call it $X$ such that $XAB=I$. Let $C=XA$ Then $CB=I$ and it follows that $B$ is invertible by the invertible matrix theorem.


How to show $\vec{a} \cdot \vec{b}=\frac{1}{4}\left(\Vert{\vec{a}+\vec{b}\Vert^2}-\Vert{\vec{a}-\vec{b}\Vert^2}\right)$?

The Homework Exercise I am working on, is:     Let $\overrightarrow{a}, \overrightarrow{b}$ be vectors. Show that    $\overrightarrow{a} \cdot  \overrightarrow{b}=\frac{1}{4}\left(\Vert{\overrightarrow{a}+\overrightarrow{b}\Vert^2}-\Vert{\overrightarrow{a}-\overrightarrow{b}\Vert^2}\right)$.   Things I tried:   Using the property $\Vert \overrightarrow{u}\Vert^2=\overrightarrow{u} \cdot \overrightarrow{u}$, I tried to make $\Vert{\overrightarrow{a}+\overrightarrow{b}\Vert^2} =\left(\overrightarrow{a}+\overrightarrow{b} \right) \cdot \left(\overrightarrow{a}+\overrightarrow{b} \right)$ and $\Vert{\overrightarrow{a}-\overrightarrow{b}\Vert^2} =\left(\overrightarrow{a}-\overrightarrow{b} \right) \cdot \left(\overrightarrow{a}-\overrightarrow{b} \right)$   I'm not sure if that was a correct step, but then I substituted into the main equation to get  $$ \overrightarrow{a} \cdot  \overrightarrow{b}  = \frac{1}{4}\left( (\overrightarrow{a}+\overrightarrow{b} ) \cdot (\overrightarrow{a}+\overrightarrow{b} ) - (\overrightarrow{a}-\overrightarrow{b} ) \cdot  (\overrightarrow{a}-\overrightarrow{b} )  \right) $$  Am not sure where to go from here, or if I'm even heading in the right direction...


Unresolved External Symbol on static function

I've been sitting here puzzled for a while now, I've read through many blogs and forms trying to understand this error and how to fix it, no luck sadly. I am getting this error every time I try and call Log::out(); Error  LNK2019 unresolved external symbol "public: static void __cdecl Engine::Log::out<char const *>(enum Engine::Log::LogLevel,char const *)" (??$out@PEBD@Log@Engine@@SAXW4LogLevel@01@PEBD@Z) referenced in function "public: __cdecl Game::Game(void)" (??0Game@@QEAA@XZ) GameEngine  C:\Users\Owner\Desktop\Projects\GameEngine\GameEngine\Game.obj  1    This is the Log.h file: namespace Engine {     class Log     {     public:         static HANDLE hConsole;          enum class LogLevel         {             Info, Debug, Warn, Error         };          template<typename T>         static void out(LogLevel level, T data);     }; }  and Log.cpp #include "Log.h"  namespace Engine {     HANDLE Log::hConsole = GetStdHandle(STD_OUTPUT_HANDLE);      template<typename T>     void Log::out(Log::LogLevel level, T data)     {         switch (level)         {         case Log::LogLevel::Info:             SetConsoleTextAttribute(Log::hConsole, 7);             break;         case Log::LogLevel::Debug:             SetConsoleTextAttribute(Log::hConsole, 10);             break;         case Log::LogLevel::Warn:             SetConsoleTextAttribute(Log::hConsole, 14);             break;         case Log::LogLevel::Error:             SetConsoleTextAttribute(Log::hConsole, 12);             break;         default:             SetConsoleTextAttribute(Log::hConsole, 7);             break;         }          std::cout << data << std::endl;          SetConsoleTextAttribute(Log::hConsole, 7);     } }  I'm calling it in the main function, like so: Engine::Log::out(Engine::Log::LogLevel::Debug, "Test"); Any help would be apricated, thank you.


Friend was brainwashed by MLM-/ponzi investment scam. What can I do?

Recently a friend of mine invited me to hear about “an interesting chance to simply earn money.” Basically we and other invited people drove to a meeting room where a speaker told us about a growing startup where you could invest money in a field where similar investments had an ROI of apparently 1000 times the investment in 6 years. Afterwards there was coffee and small talk together, during which they also indoctrinated people saying, they should avoid talking to people talking bad about the investment (or saying it is scam) because you can't gain money from them and they just want to destroy your business.  You earn money if you invest money and if you refer friends who invest money up to multiple levels. The more you invest yourself the greater percentage you earn for your referrals.  Since I had already seen other ponzi-/MLM-schemes and I am from the field it is based in, I recognized that there is no real product and it is a ponzi-/MLM-scheme. Later I found its name on the official scam warning list of multiple countries.  From what I understand, my friend has already invested multiple months or years worth of income; and is earning an amount of money through referrals that would mean scamming other people directly or indirectly through referrals for possibly several $100,000's per month to earn an additional bonus. He also wants to use his position as a respected member of multiple local youth groups and other community groups to get their members as referrals or in his words “…to give them the opportunity to also simply earn money.”  I tried to convince him that it is just a ponzi scam with my knowledge in this field but he answered with the indoctrinated speech “You don’t need to know the details if it makes you rich or use it. You also don't know how every detail of a smartphone works?”/“My sponsor already earned $x with this” or “If you don't believe in this, just stop talking about it to me and other people or do you want to ruin me, my business and my investments?.” So basically this means I can either make his investment worthless/let him lose everything (he also quit his job) or let him scam other people and motivate them to scam other people.  At the moment you can only withdraw small amounts of money out of it because the company invented some reason but you will be able to withdraw all of it “soon” (=most likely never).  What is the best way to resolve this situation (best meaning with lowest loss of money for everybody)?  Edit: The founders are known names in Ponzi schemes or convicted for crimes like fraudulent bankruptcy and many of their claims are technically impossible or proven to not exist with very high probability according to sites about ponzi schemes. But of course they say "Every bigger company has their scandals".  You can't trade the bought virtual coins outside the company and the only product you can buy can be bought anywhere else for less than 10% of the price without the logo.  When I met other friends they mentioned that they got invitations for the same meeting. I just stated to them that I already went to one and told them the name of the company (which was not stated on the invitation) and that I will not invest in it because there are official warnings that this is a scam.


Is this person wanting to pay my credit card trying to defraud me?

A friend of mine is in another state wanting to pay my credit card. He says he needs my credit card number, name on card, username, password, and card limit. Is he trying to defraud me? Or does he really need all of this info to pay off my card?


How to pass value between Activity and Fragment

I am trying to pass value between activity and fragment But I am getting java.lang.NullPointerException. So please tell me how to  do it in the right way. Here is my code:-  Activity class :-  String city = "one"; Fragmentone frag  = new Fragmentone(city);     And in Fragmentone class I am using something like this:-  String mcity ; public Fragmentone(String city) { this.mcity = city;  }  Log.e("--", mcity);   So this log is giving me NullPointerException  Thank you in advance


Should parent toggles control child toggles?

I'm working on a table that has a parent toggle on the top row with each child row below having its own toggle.   If I were to disable a specific row, I will visually see that the row has been disabled.  Now, let's say I were to disable the parent toggle...do you expect all enabled toggles to remain in their current state or to all look and turn disabled?


How can I monitor the network traffic/bandwidth on windows?

We currently have a crappy networking at our office, I meant that the router nor the switch cannot monitor the network. And we currently do not have any tool which can monitor this network.  So what I want to do is to monitor the network traffic of all the computers connected to this network. Something like I can see their transfer rates and things. I already tested a program called Net-Peekr, but the problem is that I need to install Net-Peeker Agents on all of the computers I want to monitor. It works fine but I cannot monitor the people who connects to our network via WiFI, because I don't have access (cannot install Agent) to those laptops or smartphones. Thats why I want a solution on which I won't have to install any agents on the PC's I want to monitor.  I saw a software long ago which does not have to use agents, which acts as a server. Like, the computer in which that software is installed needs another network card, and the switch is connected to this extra network card or so. I don't really understand that concept but if that's a solution, that's also fine.  Is it possible and what is the best solution for this?


Is there a way to have a bank confirm that a deposit is no longer reversible?

A lot of the [scams] questions involve a reversible deposit followed by a non-reversible withdrawal. A common method is a bouncing check that can take over a month to bounce. As the recipient of a deposit that might be invalid, is there a way to request that you back confirm or certify the deposit? Alternatively, can you ask them to ringfence the funds until they are confirmed? This is a hypothetical situation for me, but it seems there are others who might benefit from knowing whether this is possible.


How to update all records through Trigger?

I have to automate the logic with Trigger. If the Comment__c field is updated in 1 Tool__c record, it should be updated in all another Tool__c records. It's about 700-1000 actual records.  When I'm trying to update it with my Trigger, I'm getting the error: Update failed. First exception on row 163 with id a0G1w000001d91sEAA; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = a0G1w000001d91s) is currently in trigger ToolTrigger, therefore it cannot recursively update itself: []. And I'm trying to update the field exactly in the Tool__c with Id from the Error: a0G1w000001d91sEAA.  My code:      trigger ToolTrigger on Tool__c (before update) {     List<Tool__c> tools = [SELECT Id, Comment__c FROM Tool__c WHERE EndDate__c >=: DateTime.NOW()];      for(Tool__c t : Trigger.new){         if(Trigger.oldMap.get(t.Id).Comment__c != t.Comment__c){             for(Tool__c  tool : tools){                 tool.Comment__c = tool.Comment__c;             }          }     }     update tools; }   How can I avoid this error and realize my logic?


Combine tikzscale and externalize with named external pictures

I have the same issue which has been discussed  while trying to scale plots created using PGFplots. The issue is only present if I name the external pictures using \tikzsetnextfilename. However, naming them would be very helpful, otherwise all external images would be recreated if I added or removed one of them (right?).  The OP used a custom made script to scale the tikz picture, while I use the tikzscale package. In the manual, it says the external library is supported, but after compilation, the picture is printed unscaled.  Can someone confirm, that this is supposed to be working "out of the box", or do I have to tweak anything?  \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \usepackage{pgfplots} \usepackage{filecontents} \usepackage{tikzscale}  \begin{document}  \begin{filecontents}{bla.tikz}     \tikzsetnextfilename{pic}     \begin{tikzpicture}     \begin{axis}     \addplot coordinates {(0,0) (1,1)};     \end{axis}     \end{tikzpicture} \end{filecontents}       \noindent\rule{\textwidth}{2pt}     \includegraphics[width=\textwidth, axisratio=2]{bla}  \end{document}


When to use sort_in_tempdb when rebuilding indexes?

We are debating whether to use the SORT_IN_TEMPDB option for our DW tables. My understanding is that there are more writes when using this option, although they are more sequential. We have a SAN (which has has been notoriously slow at times), so in our case we want to limit the number of writes as much as possible. I believe tempdb is on a separate LUN (set of disks).  We have plenty of disk space in our data file and on our tempdb file. In this case, would we benefit from using SORT_IN_TEMPDB?   One thing that struck me was this comment on this      When rebuilding an index you would need twice the space of the index +   20% for the sorting. So in general to rebuild every index in your db   you only need 120% of your biggest index in your DB. If you use   SORT_IN_TEMPDB, you only win 20%, you still need an aditional 100% in   your data file. Further more, using sort in tempdb increases your IO   load drastically, since instead of Writing the index one time to the   datafile, you now write it one time to the tempdb and then write it to   the data file. So that is not always ideal.   We definitely don't want to increase our IO load with our slow/possibly misconfigured SAN.  What would be the best way to test this? By simply rebuilding the table with and without the option and log the times?  Edit: We have 8 tempdb files, each 15GB. We do have TF 1117/1118 flags set and IFI is enabled. We currently do a mixture of rebuilding with the sort_in_tempdb option and without it.   Thanks!  SQL Server 2012 Enterprise


$1+2+3... =-\frac{1}{12}$ - Question regarding this

So, I'm not a big expert in this subject but I know $1+2+3...=-\dfrac{1}{12}$ isn't to do with 'real' maths but it's all to do with the zeta function; however I was watching a maths video and the equation:  $$ \frac{x(x+1)}{2} $$  ... is actually a perfect equation for the series $1+2+3...$ etc. where $x$ represents $n$ in a series and $y$ is the sum of the series up to $n$. So, you can conclude that:  $$ \sum^{n}_{i=1}1+2+3...=\frac{x(x+1)}{2} $$  However, this is where it gets weird; as you have probably guessed, the roots of the equation is $x=0,-1$  but if I want to find the integral of the roots from $-1$ to $0$ which is under the $x$ axis, I get the following:  $$ \int_{-1}^{0} \frac{x(x+1)}{2}\:dx=-\frac{1}{12} $$  So, my question is why is this the case; what connection is there between the value of the integral under the $x$ axis that this graph has compared to the summation of the series?


What is the difference between I used to vs I'm used to?

May I know what is the difference between I used to vs I'm used to? I have seen both of these words on various media. So please tell me?


PDFLatex uses an unused space in the previous page. I want to write where I am left, onto the last page but latex still does not skip this empty space left on the previous page. \end{figure} 1234567 \end{document}


Is $\Bbb Z[i]$ a Euclidean ring?  If not, what would be the simplest way of seeing that $\Bbb Z[i]$ is a PID?