I have problem with interpreting the OLS regression result with the dependent variable square root transformed when doing difference-in-differences analysis.  Our regression model is: $$ Y = β_0 + β_1 {\rm policy} + β_2 {\rm treated} + β_3 {\rm policy} \times  {\rm treated} + \ldots + β_i X_i + \varepsilon  $$ Where ${\rm policy}$ is a dummy variable indicate the policy change (0=pre-policy vs. 1=post-policy). ${\rm treated}$ is also a dummy variable indicate treatment or control group (0=control, 1=treatment)  To deal with the skewed distribution, $Y$ was square root transformed. Just wondering how can we interpret the result? Say, after the policy change, $Y$ was increased / decreased by ____?

I'm using fourth root (1/4) power transformation on my response variable, as a result of heteroscedasticity. But now I'm not sure how to interpret my regression coefficients.   I assume that I would need to take the coefficients to the fourth power when I back-transform (see below regression output). All of the variables are in units of dollar in millions, but I would like to know the change in dollar in billions.    While holding the other independent variable constant, a billion dollar change in fees, on average, leads to a change of 32 (or 32,000 dollars) in collections. I take 0.000075223 * 1000 (to get to billions) ^ 4 = 0.000032. Now do I multiply this number by 1 million or 1 billion (the original unit of the dependent variable is in millions)?  lm(formula = (Collections^(1/4)) ~ Fees + DIR)                   Estimate      Std. Error  t value            Pr(>|t|) (Intercept)   2.094573355     0.112292375   18.653  0.0000000000000151 Fees        **0.000075223   **0.000008411    8.943  0.0000000131878713 DIR           0.000022279     0.000004107    5.425  0.0000221138881913


Hello! I have this one older AC-DC adapter from Korg (wallwart?)...    ...that I have been using for my (guitar) effect pedals for a few years, and I recently found out (when I was doing some electronics doodling) that the adapter gives much more voltage than it's supposed to.  I should give out +9V (as it is clearly seen from the picture), but when I measured the voltage by my multimeter, it is showing...    ...more than 14V! It freaked me out a little bit, since I may have been using it like this as a +9V adapted for my (expensive) delay, and that certainly could have been good for the pedal.   Does anyone have an idea of what's wrong with the adapter, since I have never opened it up or messed with it? Or am I measuring it wrong? And possibly, is there an easy fix?  Thank you!  EDIT: How can I find out that the adapter is "unregulated" (is it the same as unstabilized?) and it's not broken?

When I measure a 9V DC wall adapter power supply with a multimeter it shows 11.8V. When connected to my board this voltage lowers to 10V. Is this normal? Should I be afraid of toasting my  supplied board when using this adapter?  Edit: This regulator accepts up to 12V inputs. So that will be no problem. A second "9V" adapter yields 15V to the multimeter. Will this one burn my circuit?


Clearly not every marvel movie is part of the MCU. Off the top of my head, there is:   Tobey Macguire Spiderman 1, 2, and 3 Andrew Garfield Spiderman 1 and 2 Fantastic Four and Rise of the Silver Surfer New Fantastic Four Deadpool The bagillion XMen movies Hulk (Not "The Incredible Hulk")   So if all of these Marvel movies aren't part of the MCU, why are the Iron Man, Thor, Avengers, Captain America and other series part of the MCU?   I can think of a couple reasons they might not count. For example, both Spiderman series and the original Hulk don't count because they have new versions of the same character. But this doesn't explain all of them.  Another reason I thought of is that a movie doesn't count as part of the MCU until it clearly establishes a continuity with the world of Iron Man and The Avengers. This would explain for example, Deadpool, XMen, and Fantastic Four. But this still doesn't explain a couple of things. For example, Ant-man had no shared continuity until Civil-War came out. And Guardians of the Galaxy has no continuity with the avengers, at least, that has been revealed yet (although I would not be surprised if this happens with Infinity-Wars). I still don't even know if Guardians of the Galaxy happens before or after The Avengers. And yet, both of these movies count as part of the MCU.   So how can you clearly determine whether or not any given movie is officially part of the Marvel Cinematic Universe?

Thaddeus's  got me wondering about what exactly is the difference between Marvel's Ultimate universe (Earth-1610) and the Cinematic universe (Earth-199999)?  After all from what I've seen of the Marvel movies (admittedly not all of them) they seem to largely draw from the Ultimate universe anyway.


I want make shell script to start sudo apt-get update, automatically insert password for sudo and automatically hit enter key.  I've tried:  #!/bin/bash sudo apt-get update expect "[sudo] password for username: " send "password"

I know I can become root (super user) via the su command but I have to authorize it after entering the commands. Is there a way I can become root and authorize (with password) in one line


In set theory (the usual ZFC axioms), can I say that the relation of belonging ($\in$)is antisymmetric? I guess so since I think this is vacuously true due to regularity.

In Zermelo-Fraenkel set theory do there exist sets $a,b$ such that $a \in b$ and $b \in a$. I think that no such sets exist but I am not sure how to prove why this is the case.


I've just started C# and trying to grasps the basics of the language first. I am reading the book "C# 5.0 in a Nutshell" and confused a bit on Numeric Conversions. The book says:     The suffixes U and L are rarely necessary, because the uint, long, and ulong types can   nearly always be either inferred or implicitly converted from int:  long i = 5; // Implicit lossless conversion from int literal to long    alongside I tried these 2 statements on LINQPad:  int x=123456; uint y=x;   But, the statement resulted an error saying, "cannot implicitly cast int to uint" and an explicit cast was required like this:   uint y=(uint)x;   Why the implicit casting or conversion failed? I'm confused between the book and compiler if this is a casting or a conversion?

In Jesse Liberty's Learning C# book, he says "Objects of one type can be converted into objects of another type. This is called casting."  If you investigate the IL generated from the code below, you can clearly see that the casted assignment isn't doing the same thing as the converted assignment. In the former, you can see the boxing/unboxing occurring; in the latter you can see a call to a convert method.   I know in the end it may be just a silly  semantic difference--but is casting just another word for converting. I don't mean to be snarky, but I'm not interested in anyone's gut feeling on this--opinions don't count here! Can anyone point to a definitive reference that confirms or denies if casting and converting are the same thing?      object x;     int y;      x = 4;      y = ( int )x;      y = Convert.ToInt32( x );   Thank you  rp  Note added after Matt's comment about explicit/implicit:  I don't think implicit/explicit is the difference. In the code I posted, the change is explicit in both cases. An implicit conversion is what occurs when you assign a short to an int.  Note to Sklivvz:  I wanted confirmation that my suspicion of the looseness of Jesse Liberty's (otherwise usually lucid and clear) language was correct. I thought that Jesse Liberty was being a little loose with his language. I understand that casting is routed in object hierarchy--i.e., you can't cast from an integer to a string but you could cast from custom exception derived from System.Exception to a System.Exception.   It's interesting, though, that when you do try to cast from an int to a string the compiler tells you that it couldn't "convert" the value. Maybe Jesse is more correct than I thought!


"If your going to build a time machine why not do it with some style besides the stainless steel construction made the flux dispersal.....watch out!"  He never got to finish his statement what was he going to say about the steel?                                0.19 seconds.  What do you theorize the rest of his speech was meant to say? What was special about the steel casing? Could his flux capacitor have worked on his tow truck if he wanted to?

According to , the movie makers decided     The specific choice of vehicle was a  for the purposes   of it looking like an alien spaceship due to its characteristic   gullwing doors.   Is there a reason from within the storyline (comic books, cartoons, video games, deleted scenes) that explains why Emmett Brown choose that particular make and model?


Please clear my doubt Diffrence between /etc/init.d/ssh start and service ssh start. which is the best to use service command or /etc/init.d/.

I've been managing server installations both on and off Ubuntu flavor for some time - I've become quite adjusted to /etc/init.d/ for restarting servcies. Now I get this message:  root@tatooine:~# /etc/init.d/mysql status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql status  Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mysql mysql start/running, process 14048   This seems to have been brought about in the latest LTS of Ubuntu - why? What's so bad about /etc/init.d/ and what/is there a difference between service and /etc/init.d/?


I have a beamer class file, with a plenty of frames. Almost all frames need the option [fragile] because I frequently use \verb| | to illustrate codes.  So I want the frame to be equipped with [fragile] globally so that I don't need to type the option manually.  Also, I want all the stuff inside verbatim(or possibly inside \texttt, but I prefer verbatim) to be grey-shaded, just as TeX exchange is doing now.  Here is a minimal working example. Can you please modifiy it to resolve the issue?  \documentclass{beamer} \begin{document} \begin{frame}[fragile] % I used [fragile] since \verb in frame yields an error. \frametitle{fragile frame and shaded verbatim} \begin{itemize} \item I'm using the \verb|beamer| class. \item  want to set the \texttt{\colorbox{gray}{frame}} environment to be appended with the option \texttt{\colorbox{gray}{fragile}}. \item I want to set the stuff in the \texttt{\colorbox{gray}{verbatim}} command to be shaded just like \TeX exchange does. \item An ugly solution : \texttt{\colorbox{gray}{\textbackslash code\_example}} \end{itemize} \end{frame} \end{document}

Is there a way to specify fragile mode as default for all frames? Now I know how to define a fragile frame: \begin{frame}[fragile].


I have a multiple setups with 6 monitors, but would like to explore using 1 monitor/tv but act like 6 monitors. (i.e. you max a window it does not go over the whole screen just one of the 6 sections). Please let me know what info you need any i will be happy to give what is needed.

I'm trying to find out if there is a product out there to simulate Multiple Monitors on one large monitor/tv?  So take a screen and turn it into something like below...  -------------------------------- |               |              | |               |              | |               |              | |               |              | -------------------------------- |               |              | |               |              | |               |              | |               |              | --------------------------------   Something like this...even though in reality it's a single screen.  A software solution is perfectly fine as long as it functions like the built in Windows 8 functionality (Start screen only consumes the screen it was started on/etc).  If anyone is curious as to the reason.  I'm looking to get a treadmill desk since I'm a developer and don't like being sedentary all day.  So the two options that I see are having 4 monitors and mirroring them (I don't want to have to worry about forgetting to move the window that I need) or getting a large monitor/tv and putting it on an arm that I can simply swivel into place.  There are dual-monitor swivel mounts, but they are EXTREMELY pricey and the ones I've found don't appear to have the range of motion that I'm anticipating needing.  EDIT:  I found ... but I can't find the answer to the start menu question (I've sent the company a message on facebook).  Hoping I hear good news as this appears to offer many of the features I'm wanting.  So Fingers crossed there.


I have this code, which supposed to retrieve data from CSV file, the file (set of files) structure is as following: [Mary, 7, 17] but the columns are not titled, so I only got A, B, C when I run the code I seem to have only the first result in the column. can anybody help me to iterate throw all records? public void searchFiles()     {                 int count = 0;         DirectoryResource c = new DirectoryResource();         int summ = 0;         int currentrow = 0;         String name = "ff";         String k = "Susan";         for(File f : c.selectedFiles())         {             FileResource fr = new FileResource(f);             CSVParser currentFile = fr.getCSVParser(false);             currentrow = 0;             for (CSVRecord row : currentFile)             {                 currentrow++;                 name = row.get(0);                 if(row.get(0) == k)                 {                     count++;                     summ = summ + currentrow;                     System.out.println("Row is : " + row.getRecordNumber() + " / " + currentrow);                     break;                 }                 else                 {                                         System.out.println("found");                 }             }                         System.out.println(count + " / " + currentrow + " / " + name);         }                 System.out.println("count is: " + count);         System.out.println("Summ is: " + summ);         System.out.println("Avg is: " + (summ / count));     }

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


I've been wondering this for quite some time.  I just can't wrap my head around the idea of truly continuous time.  If time is truly infinitely divisible, then how can any object in the universe move?  It seems to me that if time is continuous then time would not physically make sense.  Time would be unable to "flow" because in order to get from one moment of time to another, it would have to pass through an infinite amount of time to reach second moment.  Quick example:  Say a ball rolls off the table and bounces on the floor.  Now, say we look at two time points while the ball is falling that are 1x10^-100 seconds apart.  If time is truly continuous, then these points have an infinite amount of points in between them.  Thus, to move from point a to point b, an infinite amount of time would have to pass.  This is what I can't wrap my head around.  I realize that just because I can't wrap my head around it doesn't mean my idea must be right.  To me, though, it doesn't seem to make sense that time can truly be absolutely continuous.  Can I get some answers here?  Is there any significant research as to whether or not time is discrete or continuous?  I'd be more than happy to read an explanation as to why my scenario above is incorrect, it would sure rest my mind on the subject.  As I said, I realize that just because I can't wrap my head around this doesn't mean that time must be discrete.  I'm just, well, having trouble wrapping my head around it.

Premises And the Conclusion of the Paradox: (1) When the arrow is in a place just its own size, it’s at rest. (2) At every moment of its flight, the arrow is in a place just its own size. (3) Therefore, at every moment of its flight, the arrow is at rest.   If something is at rest, it certainly has $0$ or no velocity. So, in modern terms, what the paradox says is that the velocity of the arrow in "motion" at any instant $t$ (a duration-less duration) of time is '$0$'.    I read a solution to this logical paradox. I do not remember who proposed it, but the solution was something like this:      Let the average velocity of the arrow be the ratio $$\frac{\Delta s}{\Delta t}.$$   Where $\Delta s$ is a 'finite' interval of distance, travelled over a finite duration $\Delta t$ of time. Because an instant is duration-less, and no distance is travelled during the instant, therefore $$\frac{\Delta s}{\Delta t}=\frac{0}{0}$$ or, $$0 \cdot \Delta s=0 \cdot \Delta t.$$   In other words, the velocity at an instant is indeterminate, because the equation above has no unique solution.   This solution denies the concept of a 'definite' instantaneous velocity at some instant $t$ given by the limit of the ratio $\frac{\Delta s}{\Delta t}$ or $$v(t)= \lim_{\Delta t \to 0}  \frac{\Delta s}{\Delta t}.$$  Whatever be the velocity at some instant $t$, how does the above "definition of the instantaneous velocity" or the calculus tell us that the arrow or any other object in motion is moving at an instant? How can something move in a duration-less instant, when it has no time to move? What is the standard modern science solution to understand this logical paradox?


It would be easier if I can create an entry in the GRUB menu to boot between GUI and console. I don't want X to start sometimes. Does GRUB support that kind of feature?

I want to have text booting mode option on grub menu screen. How do I create this menu entry?


I am seeking any records of my grandfather who fought on the italian side in World War 1.  His name was Antonio Alphonso Ferrari.  His fathers name was Felice ferrari and his mothers name was Dorothea Caruso.  His birthdate is October 1892.

Is there a way to access Italian war records pertaining to individual soldiers (I'm looking specifically for World War I) online?   For example, I know Australia does but my somewhat limited knowledge of Italian didn't get me far with my searches.


Something like a one-trick pony. In a limitation type of context. Unique ability, but it is the only ability capable of being done, so it is unique to itself.

If i want to say that a certain tool can only only do one thing then how do i call it? I thought of unifunctional,but i don't think it's a real and formal word.


I have the following formula and code:  I tried with Math.Floor, and others but I am not getting the result expected  double netPay = grossPay - totalDeduction;  System.out.printf("Net Pay: $%.2f", (netPay));   The idea is to get the number as follows:  46.225  Rounded as 46.22  and not as 46.23

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


An exchange student just asked me this, and I have no idea despite being a native speaker.  Does anyone know which is correct, and why?  Or are both technically correct?  I will already have studied that. I will have already studied that.  My gut feeling is that the second is incorrect because it is a split infinitive, but is that even an infinitive?

I'm creating a registration form. I want to display a message if a particular username already exists.  So which sentence is correct?     This username has already been taken by another user. Please pick   another username.   or     This username has been taken already by another user. Please pick   another username.


I need to export an environmental variable to run a program. I am able to successfully do that in interactive mode. However, when I try to export an environmental variable as part of a bash shell script, I get this error message:   export: Command not found.   In interactive mode, when I type in the following command, it works.   export GT_DIR=/cluster/home/SD/   But when I include the export command as part of the shell script, it does not work. I.e.,   #!/bin/bash  export GT_DIR=/cluster/home/SD/    I get the error message:   export: Command not found.    When I type in echo $SHELL, I get   /bin/bash   Why  is the export command working in interactive mode but not when I try to submit it as a script?

I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate.


What I'm looking for is a central website where you can search for, say, "quantum entanglement experimental results" and it would give you links to various other sites. Similarly if you wanted "radio telescope observations" it would return a list of links to radio telescope observations from other sites.   I am aware that things like  exist, but I'm more hoping for one central research resource.

I am just starting to dig a little deeper into particle interactions, and just have an introductory college physics background (no quantum mechanics). But I am interested in the conditions of the early universe and am looking for a list of all the particles in the standard model, and the relationships between the particles, so you can see which particles turn into other particles under which conditions, and stuff like that.  Is there any such a thing? Or if not, it would be really cool to see a list of all the particles in the early universe and the different types of interactions they had with each other. Such as:   What happens when a quark + antiquark come close together? What if they collide? What happens when 2 gluons collide? Come close together? What happens when 1 quark and 1 gluon come together? What happens when 2 photons collide (can they collide?)? What particles radiate photons? Under what conditions? ...   Does such a resource exist? Or if not, where would you go about finding that?


I am trying to un-tar into a different directory using this  tar xvf BACKUP.tar -C test   But I am getting the following errors  File -C not present in the archive. File test not present in the archive.   Using   tar xv -C test -f BACKUP.tar   I get the following error  tar: /dev/rmt0: A file or directory in the path name does not exist.   I do have a test directory and the file BACKUP.tar in the pwd that I am running the tar command in  Still the same error  tar -xvf BACKUP.tar -C test File -C not present in the archive. File test not present in the archive.   And   tar --version   gives this error  tar: Not a recognized flag: - Usage: tar -{c|r|t|u|x} [ -BdDEFhilmopRUsvwZ ] [ -Number ] [ -f TarFil e ]            [ -b Blocks ] [ -S [ Feet ] | [ Feet@Density ] | [ Blocksb ] ]            [ -L InputList ] [-X ExcludeFile] [ -N Blocks ] [ -C Directory ] File ... Usage: tar {c|r|t|u|x} [ bBdDEfFhilLXmNopRsSUvwZ[0-9] ] ]            [ Blocks ] [ TarFile ] [ InputList ] [ ExcludeFile ]            [ [ Feet ] | [ Feet@Density ] | [ Blocksb ] ] [-C Directory ] File ...

I've searched for multiple forums for this questions and have seen different answers but so far, nothing have worked yet even from the ones I've seen here.  I want to extract a single file from a tar to a different directory.  I've tried this:  tar xvf file.tar -C /home/dir/ filename   or this:  tar -x filename -f file.tar -C /home/dir   But got these errors respectively:  x filename, 14826 bytes, 29 media blocks. File -C not present in the archive. File /home/dir not present in the archive.   and:  tar: /dev/rmt0: A file or directory in the path name does not exist.   The first extracted the file but in the same directory, not to the folder I wanted.


We are inheriting some older O.S's at another facility and apparently their support person has moved on.  I have some Linux background but it is not with Ubuntu (Redhat).  They are older operating systems - 9.10, 10.04.1 LTS and 13.10.  Is there a patch available for these?  What is safest way to apply patches (if they are available).  I will make a clone of the systems to test on.  How do I determine if there is a patch available without applying?  We will be moving them off these older O.S's down the road, in the mean time I was asked to patch for the glibc vulnerability. Any help would be appreciated, thanks.

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


I need a step-by-step (very simple like myself) instructions on how to install the pdfpages package. It's taken me time to figure out I didn't have the package. Now I've found and downloaded it... but I don't know how to install it...  I've attempted to open up the pdfpages.ins within the Texstudio and click on the green arrow to execute and I get this error message:  Could not start Build & View: PdfLatex: C:\... location" -synctex=1 - interaction=nonstopmode"pdfpages".txt.   What am I doing wrong?

I just downloaded and installed Texmaker. I've never used any (La)TeX before.  When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do?


You're probably already thinking "silly person" but hear me out.  Compactness: Every open cover (of a set $A$) has a finite subcover (this means every cover $\{U_\alpha\}_{\alpha\in I}$ where $A\subset\bigcup_{\alpha\in I}U_\alpha$ or $A=\bigcup_{\alpha\in I}U_\alpha$ where the $U_\alpha$ are open with respect to the subset of topology)  This means EVERY open cover, there's a finite bunch of open sets which cover it. So it's sort of like size of a set, it's "bounded" because you can always cover it finitely. I like that.  But then consider the set $(0,1)$ (or any open interval) on $\mathbb{R}$ this is bounded, it isn't a "big" set, but it isn't compact (yet [0,1] is)  So my question is what does compactness actually try and do? "Oh great the set is compact" what does that mean?   Can someone describe it qualitatively  By the way I have read the wikipedia page, I've done some research. Compactness seems to only be useful for some proves but even then the proofs are not "and with this property we can do this" it's more like a "clever trick"

I have a question that may be regarded by many as duplicate since there's a  one at MathOverflow. The point is that I think I'm not really getting the idea on compactness. I mean, in $\mathbb{R}^n$ the compact sets are those that are closed and bounded, however the guy who answered this question and had his answer accepted says that compactness is some analogue of finiteness. That's the first problem: In my intuitive view of finiteness, only boundedness would suffice to say that a certain subset of $\mathbb{R}^n$ is in some sense "finite". On the other hand there's the other definition of compactness (in terms of covers) which is the one I really need to work with and I cannot see how that definition implies this intuition on finiteness. Also, I feel it's pretty strange the covers people use when they want to deal with compact sets. To prove a set is compact I know they must show that for every open cover there's a finite subcover; the problem is that I can't see intuitively how one could show this for every cover. Also when trying to disprove compactness the books I've read start presenting strange covers that I would have never thought about. I think my real problem is that I didn't yet get the intuition on compactness. So, what intuition should we have about compact sets in general and how should we really put this definition to use? Can someone provide some reference that shows how to understand the process of proving (and disproving) compactness?


My attempt is:  template<typename Derived> struct Base {     void A()     {         ((Derived *)this)->B<42>();     } };  struct Derived : Base<Derived> {     template<int> void B() { } };   ()  Which results in  main.cpp: In member function 'void Base<Derived>::A()': main.cpp:6:34: error: expected primary-expression before ')' token          ((Derived *)this)->B<42>();                                   ^ main.cpp: In instantiation of 'void Base<Derived>::A() [with Derived = Derived]': main.cpp:17:17:   required from here main.cpp:6:30: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<'       ((Derived *)this)->B<42>();       ~~~~~~~~~~~~~~~~~~~~^~~

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


Below is the small segment of code from my script:  The logic added is to covert any data value as per the scale value   x = "11400000206633458812"     scale = 2     x = x.to_f/10**scale.to_i     x = x == x.to_i ? x.to_i : x     puts x   observe that the value comes out to be "114000002066334592"  which is different from the initial value of x.  My test-points are failing at this point.  x can be any value. If i use x = 156, the output is correct, but when the length of the integer exceeds 16 digits then the problem arises.  The expected output in above case is 114000002066334588  Can anybody help me why the value is changing and how to fix it?

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


I would like to know if there is a way to make a http download via batch script just with the standards programs in windows (XP and 7) and without PowerShell.  Please, don't give programs I need to install (unless I can install them via command line and without PowerShell).  Can someone please help me?  Edit: I wanted to know if there is a way with batch script alone, without other types of scripts, I did not see that question but someone marked me as a duplicate...

Without using any non-standard (Windows included) utilities, is it possible to download using the Windows command line?  The preferred version is Windows XP, but it's also interesting to know for newer versions.  To further clarify my question:   It has to be using HTTP The file needs to be saved Standard clean Windows install, no extra tools   So basically, since everybody is screaming , I want simple Wget functionality, without using Wget.


I'm trying to use svg graphics in my big latex document. I followed other posts and included the svg and the amsmath package. And used the following to test it:  \begin{figure}[htbp]     \centering     \includesvg{Images/Evaluation/Comparison/atlanta/SuccessRate}     \caption{svg image} \end{figure}   Unfortunately, I get three error messages for the line where I include the svg: 2x "LaTeX Error: File .../SuccessRate not found. [...]" 1x "LaTeX Error: File .../SuccessRate.pdf_tex not found. [...]" Especially the second one is weird becaus I don't even want to find a .pdf_tex file. The svg-file is in the specified directory and adding .svg to the path in includesvg doesn't help either.  I'm using Miktex and Texmaker on Windows 8.1. My document class is scrbook and not article as in the other posts I saw.

I'm making all my diagrams in SVG format using Inkscape and then I export them to some other format (e.g. PDF, EPS or PNG). I wrote a short script that does this for me automatically, but I'd like to avoid this step, if possible --- sometimes the conversion from SVG converts the text labels into vectors, and that's annoying. Hence the question:  Is there a way to include SVG diagrams directly without conversion to an intermediate format?  Package suggestions, or instructions for specific LaTeX distribution are welcome. Tips and personal experience on which tools you have found to be working reliably would be also appreciated.


Could you explain the difference between setting methods in the constructor and through prototype object? The following code shows these two ways of setting the methods - say_hello and say_bye both work fine:  function MessageClass() {   this.say_bye = function() { alert('see ya'); }; }  MessageClass.prototype.say_hello = function() { alert('hello'); };  x = new MessageClass(); x.say_hello(); x.say_bye();

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Two brands of coffee were compared. Two independent random samples of 50 people each were asked to taste either Brand A or Brand B coffee, and indicate whether they liked it or not. Eighty four percent of the people who tasted Brand A liked it; the analogous sample proportion for Brand B was ninety percent.  (A) At α = 0.01, is there a significant difference in the proportions of individuals who like the two coffees? Use the p-value approach.  (B) What is the critical value(s) for the test in Part(A)?  So I understand my teacher's solution for part A but I don't really understand how they got the values for B. Can someone explain? I tried looking up tables but I couldn't find where 2.575 came from. I feel like I might be looking at the wrong table or reading them wrong.

So I have a question with my teacher's solution below and I'm confused about one of the steps in their solution. I would appreciate some clarification.  Two brands of coffee were compared. Two independent random samples of 50 people each were asked to taste either Brand A or Brand B coffee, and indicate whether they liked it or not. Eighty four percent of the people who tasted Brand A liked it; the analogous sample proportion for Brand B was ninety percent.   (A) At α = 0.01, is there a significant difference in the proportions of individuals who like the two coffees? Use the p-value approach.   So I circled in blue a step where I'm confused about in the teacher's solution. I don't understand why P(Z<-0.89) = 0.2061.   On the z-score table -0.89 is equal to 0.1867 so shouldn't it be that value instead? where did 0.2061 come from? Is it possible that the teacher made an error or am I not understanding something?


I have a Carrera Crossfire 2 Hybrid Bike. I would like to convert this to a full road bike. Is it possible?, if so what changes will I need to make.

I have a two-and-a-half year old  (with a road-bike-like frame and thin tires; it's somewhere in the loosely-defined "hybrid" range) that I use to commute to work, twenty-five miles round-trip, once or twice a week. The bike has straight handlebars, and having gotten used to the idea of commuting via bike, I'm interested in upgrading to drop handlebars. It looks like I'd need new break/shift levers to go with the handlebars; the whole upgrade looks like it'd run a couple hundred dollars. This is a sizable fraction of the original cost of the bike, which leads me to wonder if I'm better off saving my money for a new bike that's a little better adapted to my use.  Is upgrading my bike's handlebars a reasonable investment?


I'm making a map in Minecraft with some custom crafting recipes that yield special items that deal with fighting. I know how to do that just fine, but I also want to add a bonus if one is wearing, say, a full set of "emerald armor." For example, if the player is wearing the full set, they would receive jump boost. So my question to you is: how do I detect if a player is wearing a specific set of gear? I know how to detect if a player is wearing a specific item with scoreboard and whatnot, but how do I combine those commands for a full set?

How can I test for a player that is wearing an iron helmet named "test1" and an iron chestplate named "test2" in Minecraft Version 1.12?


I received a machine (Ubuntu 12.04 server) from a coworker when he left the company. I created my own user as sudo/admin and used the machine for months via SSH. After rebooting for the first time since I was given the machine, I discovered that my user and everything I installed were missing. My user wasn't in the /etc/passwd file and the /home/myuser directory was missing. When I recreated the user and reinstalled everything, I didn't get any suspicious errors.  I suspect that I might have been in a snapshot/jail/container environment the whole time before rebooting, but how can I tell?

Unsolved mystery - I was given a coworker's Ubuntu 12.04.1 LTS machine and set up my own (sudo/admin) user on there from the command line. I switched to my user (from his sudo/admin user) and confirmed everything was okay using the groups command and the /etc/passwd file looked great. After months of everything working perfectly, a power outage shut down the machine for the first time since I inherited it.  After booting, my new user disappeared. It's not in the /etc/passwd file and there is no entry in the /home directory. I created the user the same as I did before, and there were no errors to indicate that the user still existed.  What happened?  As requested, here is the output of   olduser@machine:~$ ls -lait /home  total 16  3408126 drwxr-xr-x 2 newuser newuser 4096 Nov 20 10:28 newuser  3407873 drwxr-xr-x 4 root root 4096 Nov 20 10:28 .  3407874 drwxr-xr-x 36 coworker coworker 4096 Nov 20 10:00 bvillupu  2 drwxr-xr-x 26 root root 4096 Oct 3 2012 ..  3408259 lrwxrwxrwx 1 root root 44 Aug 9 2012 .directory -> /etc/kubuntu-default-settings/directory-home


I have switched to gnome shell in my ubuntu 16.04. I often use ALT + Space and then 'c' to close, 'n' to minimize the window. But, I haven't found them in gnome shell. As shown in the first picture, there is no mnemonics highlighted .   Also, Switching to other window of same application wasn't showed under it...  I can only see Quit... Ref Image2

On Ubuntu 16.04 LTS I have used simple keyboard shortcut to set property Always on Top (Nautilus window as example):   Alt+Space,    t After next Alt+Space or right mouse click I see that window was set to Always on Top.     In standard Ubuntu 18.04 LTS with GNOME Shell I can press Alt+Space:    but it does not react to t.  Seems to be a real .    How to enable such menu accelerators/mnemonics in standard Ubuntu 18.04 LTS?


So guys i want to install ubuntu. I have a laptop running windows 10 and i have aan empty external HDD that i want to install ubuntu to. i tried using ubuntu 18.04 LTS and minimal ubuntu 18.04 LTS but both failed. Normal one didn't even open installer for ubuntu, minimal one failed installing (couldn't download some necessary files). I am currently looking for a program like WinToUsb that can install ubuntu to my HDD from Windows and i can boot up normally. BTW i did some research and there are some programs like LiLi that you can use linux but i want to use the full linux. Is there a solution to my problems.  EDIT: The problem was caused by the .iso file. i re-downloaded it and installed it from my rooted phone using DriveDroid and it worked on second attempt. On first attempt ubuntu's file downloading didn't finish so i restarted the setup and didnt coonect to the internet and it installed normally. And the updates where made after installation.

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


The  this morning was of poor quality (off-topic) but did contain a link to an app store, along with a few glowing words of self-endorsement.  First I voted to close, then I flagged for moderator attention (spam).  In the meantime apparently a high-rep User edited the Question and removed the spam link (and made the glowing words of self-endorsement into more of a question than a claim).  It's possible that when a Moderator looked at my flag, the connection with the advertising link was no longer immediately evident.  In any case my flag is "disputed".  While I'm not proposing that every case should fit neatly into one rule or another, it seems to me (after looking at previous Meta Q's on the topic), that a policy of preferring spam flagging versus editing out advertising links (or conversely) is ripe for a Community pronouncement.  The issue was  in the context of a proposal for automatically converting any links to plaintext, but I believe this threshold issue might be easier to find a consensus about.  Essentially the argument is that leaving the spam links intact helps the Moderator who gets the flag ping to quickly resolve the complaint, while removing the spam links deprives the spammer of benefits more quickly.  Given the high priority assigned to spam flags, I tend to think conserving Moderator attention is more important.

I noticed that the posts of the recent spam surge on Ask Ubuntu were all edited by community members into something like     EDITED - REMOVED SPAM ANSWER   or similar.  While I understand why the users have done this and I too don't want to leave the spam content visible for longer than absolutely necessary, it made flagging more time consuming for me.  I had to check the revision for every of those possible spam posts to check if it is actually spam, instead of being able to flag directly from the review site. Spam flags carry a serious penalty, I'm not willing to add my spam flag without checking that it's really spam.  I see the benefit of editing spam, but it also causes some more effort for the later flaggers. Should we as a general policy edit out the content of spam posts, or should we deal with them solely by flagging?


A pair of alien "door-to-door salesmen" comes down to Earth and meets a citizen. They show him some interesting but unsuitable wares, and then a small, cylindrical device that softens any metal that it is applied to, to the point where a person could manipulate steel like putty. The metal can be hardened again after the desired shape is attained. Very useful for hobby sculpture, the traders say. The Earthman "drives a hard bargain" -- in reality, both sides are satisfied -- for a promised delivery of, say, ten thousand of these devices.   But it turns out that the device isn't hard to duplicate, and soon anyone who wants one can have one. Pranksters are a problem, and as railways are softened and a suspension bridge is left sagging, more than just an irritant. By the time the traders return, many years later (the deal didn't include a due date), terrestrial civilization has collapsed and tribesmen threaten them with stone-tipped spears. They look at each other and one says, more or less, "What are we going to do with a cargo of ten thousand metal softeners?"  I read this English-language story probably in an anthology during the 1960s, or at latest the 70s.

I remember reading a story about an alien who came to earth and gave/sold a human a little device.  It was the size of a pen, and when you aimed it at something metal, the metal became malleable, like clay.  A second time, and the metal resolidified.  When the alien came back not long after, human civilization had completely fallen to pieces because of it.  Does anyone know the name and author of the story?


What I want to do is get a commit log of all the changes pertaining only to 1 folder in a repository. How, if at all, is this possible?

How can I view the change history of an individual file in Git, complete details with what has changed?  I have got as far as:   git log -- [filename]   which shows me the commit history of the file, but how do I get at the content of each of the file changes?  I'm trying to make the transition from MS SourceSafe and that used to be a simple right-click → show history.


Seems that the same thought about future can be expressed in two ways. For instance:     Are you working tomorrow?      Will you work tomorrow?   So the question is, are there any difference between them?

Are there difference between those sentences?        Alex is getting married next month.     Alex will get married next month.      Seems that the first one is expressed in present continues, and the second on in future tense. Am I correct?


Type propertyType = nestedProperty.PropertyType;  var targetType = IsNullableType(propertyType) ?       Nullable.GetUnderlyingType(propertyType) : propertyType;  GetPredicateTemp'<'T , targetType> ("storage");   Here on passing targetType giving error targetType is a variable but is used like a type. targettype returns Int64 how can I pass this type , I need to return the lambda expression of this type only.  my question is different.. Here see the method, I need to pass two types T1,T2..In place of T2 , want to pass targetType     ~ public static Expression<Func<T1, T2>> GetPredicateTemp<T1, T2>(string propName)where T1 : UserEntity         {          string[] props = propName.Split('.');         Type t1 = typeof(T1);         PropertyInfo propertyInfo = t1.GetProperty(props[0]);         PropertyInfo nestedProperty = propertyInfo.PropertyType.GetProperty(props[1]);         var parameter = Expression.Parameter(typeof(T1), "t");         MemberExpression expBody = Expression.Property(parameter, propertyInfo.Name);         expBody = Expression.Property(expBody, nestedProperty.Name);         var predicateNEW = Expression.Lambda<Func<T1, T2>>(expBody, new ParameterExpression[] { parameter });         return predicateNEW;     }

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


Let $f$ be function $\:f:\mathbb{R}\rightarrow \mathbb{R}$ which for any $x$, $f\left(x\right)=f\left(\frac{x}{2}\right)$.  Also, $f$ continuous at $x=0$. Show that $f$ is constant function.    So far i saw something here , but i don't understand the solution that he was given. I thought about assuming that there exist $a,b$ such that $f\left(a\right)\ne f\left(b\right)$ and get a contradict.    Any ideas about what give me that $f$ is continuous at $0$? and any ideas about a way to prove that? tnx in advance!

If a Continuous function $f(x)$ satisfies $f(x) = f(2x)$, for all real $x$, then does $f(x)$ necessarily have to be constant function? If so, how do you prove it? If not any counter examples?


$R$ is a sets of positive integers that $((a,b),(c,d))\in R \leftrightarrow a.c=b.d$   Prove that $R$ is an equivalence relation.

Let $S$ be the relation on $\mathbb{N} \times \mathbb{N}$ defined by $(a,b)S(c,d)$ if and only if $ad=bc$. Prove this is an equivalence relation on $\mathbb{N} \times \mathbb{N}$.  I think I've found this to be reflexive and symmetric, but I'm stuck on transitivity. Can someone check my work so far and assist with testing transitivity?  Reflexive: Let $(x,y)S(x,y)$. Then $xy = yx$. So $S$ is reflexive. Symmetric: Suppose $(a,b)S(c,d)$. Then, $ad = bc$. Therefore, $da = cb$ and $cb = da$. Therefore, $(c,d)S(a,b)$. Thus, $S$ is symmetric.  Transitive: Suppose $(a,b)S(b,c)$. Then $ac = bb$.   This is where I'm stuck. Any ideas?


So my problem is somewhat minute, and the main problem was addressed , but when I first turn my computer on, it always shows the 12h format. The account I log into is the admin account, and once I log in (due to my settings), the lock screen shows 24h. But before I do, it always shows 12h.  It's not a huge deal, I just find it annoying since I think the 12h system is annoying to begin with if I'm not reading an analog clock. I'd guess there is some "default" value its adhering to (presumably the American ones Windows generally assumes by default) -- is there some sort of way to change this?

My Windows 10's time format is 24 hour clock, this includes the taskbar but the lock screen is still 12 hour clock format. How do I change the format of my time in lockscreen?


I'm trying to find $\sum_{n=0}^{\infty}n^2 x^n$  What I tried doing is:  $\sum_{n=0}^{\infty}n^2 x^n$ = $\sum_{n=0}^{\infty}n(n-1) x^n + \sum_{n=0}^{\infty}n x^n$   = $x^2\sum_{n=0}^{\infty}n(n-1) x^{n-2}+x \sum_{n=0}^{\infty}n x^{n-1} =x^2(\frac{1}{1-x})'' + x(\frac{1}{1-x})'$  But anyway I continute gets me a wrong answer so I wonder if there's some mistake here?  The answer should be $ -\frac{x(x+1)}{(x-1)^3} $

How does one evaluate the following summation of $n^2$ terms by $x^n$ terms. I have tried to do it, but couldn't figure it out as it is not the same as summing up $nx^n$ terms.  $$\sum_{n=0}^\infty n^2 x^n$$


I am very new to topology.  I want to know why we need topology in mathematics. What is its significance? Without topology which mathematics concept cannot be explained. What are its real-life applications? I know the basic definitions of topology.

The other day I and my friend were having an argument. He was saying that there is no real life application of Topology at all whatsoever. I want to disprove him, so posting the question here.  What are the various real life applications of topology?


This question is originally from the discussion under github issue .  The similar problems raised by questions   , and    are now nicely solved with the newly updated PGF 3.1, using either luatex 1.07 or 1.09 under Linux (see ) and Windows (verified by my friend). This is why the current question is tagged duplicate.  But, as stated in  and the following one, the problem (will explain latter) remains under macOS, even with PGF 3.1.  The problem fixes if I use   LuaTeX 1.09, or LuaTeX 1.07 by luatex53 --fmt=lualatex main.tex.   Hence, so far as I know, the problem only remains with macOS, LuaTeX 1.07 (Lua 5.2.4).    A full example  \documentclass{article} \usepackage[compat=1.1.0]{tikz-feynman}  \begin{document} \begin{tikzpicture}   \begin{feynman}     \diagram [vertical'=a to b] {       i1 [particle=\(e^{-}\)]          -- [fermion] a          -- [draw=none] f1 [particle=\(e^{+}\)],       a -- [photon, edge label'=\(p\)] b,       i2 [particle=\(e^{+}\)]          -- [anti fermion] b          -- [draw=none] f2 [particle=\(e^{-}\)],     };     \diagram* {       (a) -- [fermion] (f2),       (b) -- [anti fermion] (f1),     };   \end{feynman} \end{tikzpicture} \end{document}   The comparison of outputs    Version info:   - TeX Live 2018 on macOS 10.14.2  - LuaTeX 1.07.0  - LaTeX2e 2018-12-01   *File List*  article.cls    2018/09/03 v1.4i Standard LaTeX document class   size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option) tikz-feynman.sty    2016/02/05v1.1.0Feynman diagrams with TikZ     tikz.sty    2019/01/05 v3.1 (3.1)      pgf.sty    2019/01/05 v3.1 (3.1)   pgfrcs.sty    2019/01/05 v3.1 (3.1) everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)   pgfrcs.code.tex  pgfcore.sty    2019/01/05 v3.1 (3.1) graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/06/04 v1.11 sample graphics configuration   luatex.def    2018/01/08 v1.0l Graphics/color driver for luatex   pgfsys.sty    2019/01/05 v3.1 (3.1)   pgfsys.code.tex pgfsyssoftpath.code.tex    2019/01/05 v3.1 (3.1) pgfsysprotocol.code.tex    2019/01/05 v3.1 (3.1)   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration  pgfcore.code.tex pgfcomp-version-0-65.sty    2019/01/05 v3.1 (3.1) pgfcomp-version-1-18.sty    2019/01/05 v3.1 (3.1)   pgffor.sty    2019/01/05 v3.1 (3.1)  pgfkeys.sty      pgfkeys.code.tex  pgfmath.sty      pgfmath.code.tex   pgffor.code.tex     tikz.code.tex ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)  pgfopts.sty    2014/07/10 v2.1a LaTeX package options with pgfkeys supp-pdf.mkii epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)   grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO) kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)  ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO) kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO) kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO) etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)    ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live  ***********

What I will describe below is not yet a problem but will appear when TeX Live 2019 is released and LuaTeX will be upgraded to 1.09.  MikTeX users might already experience this issue.  It also affects users of Mac OS X, because the random number generator of their C standard library is different from the one of glibc.    When I typeset one of the graphdrawing examples from the TikZ manual, it appears mirrored between the LuaTeX versions 1.07 (TeX Live 2018) and 1.09 (TeX Live 2019).  Why is that happening?  \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,graphs,graphdrawing} \usegdlibrary{force} \begin{document} \tikz [spring electrical layout, node distance=1.3cm,        every edge/.style={          decoration={coil, aspect=-.5, post length=1mm,                      segment length=1mm, pre length=2mm},          decorate, draw}] {   \foreach \i in {1,...,6}     \node (node \i) [fill=blue!50, text=white, circle] {\i};    \draw (node 1) edge (node 2)         (node 2) edge (node 3)                  edge (node 4)         (node 3) edge (node 4)                  edge (node 5)                  edge (node 6); } \end{document}   On the left is LuaTeX 1.07, on the right LuaTeX 1.09:


I've tried looking up the code and couldn't find something that allows me to adjust the width of a column. I want to make the width larger (in the vertical direction). This is what I have so far:  \begin{center}     \begin{tabular}{ | l | p{2cm} |}      \hline       Problem & Points \\ \hline       1 &   /4 \\ \hline       2  &  /4 \\ \hline       3  &  /4 \\      \hline  \end{tabular} \end{center}

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


I have a dropdown which has a value of "Yes" or "No." I have a field that is required if the user selects "No" but even if I choose "Yes" the field still wants a required input. I am using jquery to achieve this but it is still not working. My code is below. <script type="text/javascript">   $('ddlBlueStake').change(function () {     if (this.value == 'No') {       $('txtBlueStakeComm').prop('required', true);     } else {       $('txtBlueStakeComm').prop('required', false);     }   }); </script>  On my field I am calling required="true" <asp:TextBox ID="txtBlueStakeComm" runat="server" TextMode="MultiLine" required="true" CssClass="required"></asp:TextBox>  Any help would be appreciated.

I want to use jQuery with asp.net webfoms.  Do I need to get a special toolkit so the .net controls spit out friendly Control ID's?  Reason being, I don't want to write javascript referencing my html ID's like control_123_asdfcontrol_234.  Has this been addressed in version 3.5?  (I remember reading you have to get some special dll that makes ID's friendly).


My understanding was, that in order for this snippet to work:  with some_obj:     # do something   the some_obj object must have __enter__ and __exit__ methods. And this is more or less the only requirement.  The following code demonstrates, that this is not correct:  class X:     pass  def my_enter(*args, **kwargs):     print("enter ", args, kwargs)  def my_exit(*args, **kwargs):     print("exit ", args, kwargs)  some_obj = X()  some_obj.__enter__ = my_enter some_obj.__exit__ = my_exit  with some_obj:     print("inside with")   Even though the some_obj obviously have attribute __enter__ the above code fails:  Traceback (most recent call last):   File "tst_with.py", line 17, in <module>     with some_obj: AttributeError: __enter__   Interestingly, if I replace the two lines where I add methods to object with the following:  X.__enter__ = my_enter X.__exit__ = my_exit   everything is ok.  Is there any reason why object having these magic methods is not enough for with statement to work?  (I encountered this problem when crafting a mock object, and the original code was more sane than the code above.)

I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python.   I understand that it's not always good to do so. But how might one do this?


Is there a word for getting excited about absolutely nothing? For example, if you can recall in the Christmas movie ELF, Buddy got all excited about wondering what a Christmas gram was. In reality, though, it isn't all that exciting. Is there a word for that? Any suggestions are welcome!

The recent EL&U question asked by Mikhail about the alternative expressions of ‘To shoot out of cannon into sparrows’ reminded me of Japanese saying - 大山鳴動鼠一匹- literally meaning people find (get) “Only a small mouse coming out after hearing rumblings and experiencing shaking of the big mountain, (and jumping out of the house)” which I believe was imported from Chinese classic literature.   I think it has a different meaning from “Shoot sparrows with cannon” and “Chop a chicken using the blade for cow.” Instead it means “a very small result attained with great effort” or “marginal consequence or gain after making a big fuss”  Are there similar English sayings to express “大山鳴動鼠一匹 - Big fuss, tiny result”?


I am having hard time trying to make $ work with my javascript. This is the line of code I am using. If i use jQuery, it works as expected but if I use $, it says $ is not defined. Any advices?  if (typeof Drupal !== 'undefined') {   // Define Drupal behavior.   (function ($, Drupal) {     Drupal.behaviors.floatingButton = {       attach: function(context) {         $('body').css('background', 'red'); // $ is not defined         jQuery('body').css('background', 'red'); // works fine       },     };   })(jQuery, Drupal); }

I must have something set up incorrectly in my custom theme. jQuery is loading and works fine elsewhere on the same page in a views slideshow using jquery.cycle. My custom JavaScript however reports that $ is not a function.   The info.yml file includes the global-scripts property.  The libraries.yml file contains the following code.    js:     js/script.js: {}   dependencies:     - core/jquery   The content of js/script.js is the following.  $(document).ready(function () {     $(window).on('load scroll', function () {         var scrolled = $(this).scrollTop();         $('#layer-1').css('transform', 'translate3d(0, ' + -(scrolled * 0.25) + 'px, 0)'); // parallax (25% scroll rate)     }); });   The first line in script.js returns the error in the console. It is the only error I receive.   I checked the page source and confirmed that jQuery is being loaded before script.js at the bottom of the page below the footer.   Can anyone see what I have done wrong here?


I am trying to open *.hdf file from ASTER in QGIS and it can not recognize CRS. Does anybody knows solution to this?

Yesterday i downloaded an Aster L1B image from USGS's website. If i load it in QGIS, it doesn't get displayed properly(location wise). Even after i've enabled "On the fly" option, it's not reading the WGS84 coordinate system (Figured out this type of glitch happened in ArcGIS also  - ). I tried to assign projection to the image but it didn't work (Got the message - hdf has no raster bands).   I tried the same in GRASS(r.in.gdal) and it got "Error: Selected band (1) doesn't exist"  But if i open the same image in Global Mapper, the image gets displayed perfectly.   How to solve this ?


I was doing some animation, when I didn't know how to animate using edit mode. Someone showed me a tutorial on YouTube by using hooks. It managed to work, but then I began to realise that the keyframes were not showing AT ALL in the timeline , despite clicking on the selected object with the auto-keying. Have I done something wrong?

Soo, I think I accidentally pressed something and I don't know how to fix that. The thing is that keyframes in the timeline are know hidden behind the numbers    The animation still works, I can add new keyframes, but I cannot select any of them as they're hidden... does anyone know how to get back to default settings?


i have CUSD data like this:  "AT+CUSD=1,"*388#",15   OK    +CUSD: 0,"PulsaUTAMA Rp.3375. Aktif 01/12/16, Tenggang 31/12/16,SMSHarian 0 ke ISAT& 0  SMS ke Opr lain.Eklusif Arsenal+grts tlp 1jm,hub *465*4#",64  "  How to regex to get value :   PulsaUTAMA Rp.{currency balance}  Aktif {dd/mm/yyyy}  Tenggang {dd/mm/yyyy}   Thank's

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Is it legal for a US citizen to travel to Cuba? Please explain any differences between traveling for tourism or other reasons.

There is a belief that US citizens would be doing something illegal if they were to visit Cuba.  I remember hearing years ago while in Mexico where lots of people go on sidetrips to Cube that it's not illegal for Americans to visit Cuba but that if they spend any money there they would technically be breaking the law of "dealing with the enemy"?  So what's the real story? Is this all outdated or is it illegal for people from USA to go to Cuba? Or is the thing about them spending money there true? What are the real legal ramifications, if any?


On a meta site, votes are intended to imply agreement with the question/answer. In contrast, votes are intended to imply quality, on the general site. Overall, when we cast a vote, we have a brief window to reverse or withdraw that vote. Once this window has passed, our votes are locked in, unless an edit is applied to that post.    This makes sense, in general. When we judge a post for it's quality, there is little reason1 to want to legitimately withdraw or reverse this vote, unless the post has had changes made to it. Without change, the quality of the answer is also unchanged.  In contrast, opinion does change. When I vote on meta, I am voicing agreement or disagreement with the post. I think it is a lot more plausible that this stance could change, without an edit to the original post.    . I asked a question regarding a particular tag that needed more clarity in it's usage. A user suggested an alternate to my own proposed solution, and I agreed that it was a better proposal. I deleted my original answer, and up-voted the new answer. Some time after, a user with more experience posted an alternate answer. With the clarity of the explanation provided in the new answer, I no longer agreed with the previous answer. However, I am still technically voicing agreement in the answer, as I can not undo my vote.  In some cases, this may appear as a "non-event". One vote should not make a difference. However, in cases where meta-usage is not as common, I feel it does make a significant impact on the overall view of the topic or suggestion.  I have previously been directed to simply perform an edit; I feel this is not a suitable option. Especially in certain cases where such edits would be semantic and questionable.    Can we have a bit more freedom in retracting and/or reversing votes in Meta?  It occurred to me that there might be further issues if this was implemented on the main meta site (i.e. this one), as reputation is awarded. I am asking specifically for site-specific meta, though I don't see why we couldn't discuss implementing this, here.  1

When I talk about Meta here, I mean any meta but this one. I understand the . However, I don't think this reason applies to meta sites and have some reasons why I think votes on meta sites shouldn't get locked: Opinions change: I thought a feature-request was just stupid and I downvoted it. Later on, after reading the answers, I saw the ideas behind it (which weren't included in the question), and wanted to upvote it - but I couldn't. Of course, the question was written badly, but ... Votes on meta work in a different way, as they indicate (dis)agreement instead of usefulness. So in my example, the question wasn't really useful as-is, but I did agree, after hearing the ideas behind it. You don't get reputation on Meta, so there is no reason to 1. So, What would you say of disabling the lock-vote feature on meta sites? And no, There is no problem with users who go bumping posts by up- and downvoting all the time (as suggested in the comments) since votes  - thanks Hugo and cpast.  Some very clear examples of when you want this  Moderator pro tempore elections - what if a nominated user does something stupid and you want to remove your upvote? Nope, too late.  Feature-requests can get more useful after a new feature implemented (e.g. when there's a request for changing the footer that you downvoted, and then the team changes the footer in such a way that you want to upvote it instead)     1: as Shog9♦ , there still is a reason to tactically downvote: when you've answered a question yourself as well, then downvote the other answers to get your answer shown higher. I don't think this is a real problem with this feature-request, but a problem we have now too and will probably always have.


I am wondering if there is a way to pass a function with parameters into an JS addEventListener? I have tried directly binding a function with parameters to addEventListener, but the listener does not work and executes the function right away without the event being triggered.   document.getElementById("button1").addEventListener("click", test1("text I would like to pass"));  function test1(text) {   console.log(text); } <button id="button1">Click Me</button>    The listener would work if the function bound does not contain any parameter:   document.getElementById("button1").addEventListener("click", test1);  function test1() {   console.log("text I would like to pass"); } <button id="button1">Click Me</button>    I have also tried doing the same thing using onclick but the same scenario happens. In that case, how do I bind a function with parameters to addEventListener then?

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


Recently had to switch from Ubuntu to Windows 10 for work.  I see Windows finally added multiple desktops.  CTRL + SUPER + LEFT/RIGHT  switch desktops which is great.  In Ubuntu CTRL + ALT + LEFT/ RIGHT do the same.  In Ubuntu you can also take the current application in focus to a new Desktop via  CTRL + ALT + SHIFT + LEFT / RIGHT  Is there an equivalent to this in Windows 10?

I just installed Windows 10 developer preview but can't figure out how to cycle through the new virtual desktops with the keyboard.  I'm looking for the following shortcuts if they exist:   Switch to the next/previous desktop Go to desktop number N Close the current desktop Open a new desktop   Are these controls implemented yet?


Find all functions $f$ such that  $f(f(x)f(y))+f(x+y)=f(xy), \forall x,y \in \Bbb R$  Obviously I get that $f(x)=0$ is a trivial solution, but I'm not sure as to how to go about finding any more?  Or how to know when I have found them all?

Find all functions $f\colon \mathbb R\rightarrow \mathbb R$ such that for all reals $x$ and $y$:   $$f(f(x)f(y))+f(x+y)=f(xy).$$   It was six hours ago in IMO 2017 (problem 2).  I tried  the standard way: $x=0$, $x=y$, $x=1$,etc. but without any success.   Let $f(0)=a$. Hence, for all $x\in\mathbb R$ we have $f(a(f(x))+f(x)=a$. What is the rest?   Also we have $(x-1)(y-1)-1+x+y-1=xy-1$ and  $1-(1-x)(1-y)+1-x-y=1-xy$.


I am very new to LaTeX so please bear with me if my question is rudimentary. I searched through other questions and while this question has been answered the solutions provided did not work for me, the solutions specifically at  did not work in iBook Author. This question is how to make an augmented matrix in iBook Author which has minimal support for LaTeX. I am working in iBook Author and am trying to add an augmented matrix. I can get the matrix to display but not the horizontal line. The use of "array" has not worked for me as it is not supported by iBook Author. In iBook Author, there is no need to enter \documentclass, \begin{document}, etc. which is why it is not included in my example.  This is what I use to get the matrix but I need it to be an augmented matrix with a continuous vertical line separating the 4th digit in each row:  \begin{bmatrix} 4 & 8 & -12 & 4 \\ 3 & 5 & 6 & 7 \\ 2 & 5 & 3 & 8 \\ \end{bmatrix}   I have tried using "array" as well as "ccc|c" and nothing has worked. Any help provided would be greatly appreciated. Thank you.   Please see the screen cap below from the text file, created using Word for reference to what I am trying to achieve.

When studying systems of linear equations, it's nice to remind people that the last column of the coefficient matrix holds the constants.  This is often done in books by putting a vertical line between the last column and the next to last column.  What is a good way to do this in LaTex?


how to delete all duplicate row on mysql and keep one with Query?  table name is: transaction  my duplicate row:  reference    type   ---------  --------         1         9         1         10         1         10         1         10         1         11         1         11   correct row:  reference    type   ---------  --------         1         9         1         10         1         11

What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null


I want to write test class for following Rest API, But  i am new in salesforce please help me..... @RestResource(urlMapping='/registerEvent/*') global class RegisterEventApi {     @HttpPost     global static void createCampMem() {         try{             RestRequest request = RestContext.request;             if(String.isNotBlank(request.requestBody.toString())){                 Map<string,Object> reqMap = (Map<string,Object>)JSON.deserializeUntyped(request.requestBody.toString());                 string EventId = (string)reqMap.get('EventId');                 string eventSlotId = (string)reqMap.get('eventSlotId');                 string accountId = (string)reqMap.get('accountId');                                if(String.isBlank(EventId)){                     string jsonstr = '{"success":'+false+',"message":"Provide jamiyaEventId"}';                     RestContext.response.addHeader('Content-Type','application/json');                     RestContext.response.responseBody = Blob.valueOf(jsonstr);                     RestContext.response.statusCode = 403;                     return;                 }  if(String.isBlank(eventSlotId)){                 string jsonstr = '{"success":'+false+',"message":"Provide eventSlotId"}';                 RestContext.response.addHeader('Content-Type','application/json');                 RestContext.response.responseBody = Blob.valueOf(jsonstr);                 RestContext.response.statusCode = 403;                 return;             }             if(String.isBlank(accountId)){                 string jsonstr = '{"success":'+false+',"message":"Provide accountId"}';                 RestContext.response.addHeader('Content-Type','application/json');                 RestContext.response.responseBody = Blob.valueOf(jsonstr);                 RestContext.response.statusCode = 403;                 return;             }             Id contactId = [SELECT Id FROM contact WHERE accountId =:accountId].Id;             List<Event_Registration__c> existingReg = [SELECT Id FROM Event_Registration__c WHERE Contact__c=:contactId                                                     AND Event_Slot__c=:eventSlotId];             if(existingReg.isEmpty()){                 Event_Registration__c eventReg = new Event_Registration__c();                 eventReg.Event__c = EventId;                 eventReg.Event_Slot__c =eventSlotId;                 eventReg.Contact__c = contactId;                 eventReg.Status__c ='Scheduled';                 insert eventReg;                 RestContext.response.addHeader('Content-Type','application/json');                 RestContext.response.responseBody=Blob.valueOf('"success":'+true+',"Id":' +eventReg.Id);                 RestContext.response.statusCode = 200;                 return;             }             else{                 RestContext.response.addHeader('Content-Type','application/json');                 RestContext.response.responseBody = Blob.valueOf('{"success":'+false+',"message":"Record Already Exists"}');                 RestContext.response.statusCode = 409;                 return;             }         }     }     catch(Exception e){         RestContext.response.responseBody=Blob.valueOf('Error: ' +e.getMessage());     } }        }

I was writing test classes for my apex Rest Service that I had built for an Ipad app.  I noted some very interesting things while experimenting. Before doing anything, I just did a google search and found an interesting blog post by Jeff.    @RestResource(urlMapping='/v.9/member/*/results/*')  global with sharing class MemberRestSvc {  @HttpGet  global static ReturnClass doGet() {  String[] uriKeys = RestContext.request.requestURI.split('/'); // get the member name from the uri String memberName = uriKeys.get(uriKeys.size()-3);  // do awesome programming stuff here & catch any exceptions try {    List<Contact> contacts = [Select Id From Contact where member_name__c = :memberName];   return new ReturnClass('true', 'Query executed successfully.', contacts);  } catch (Exception e) {   return new ReturnClass('false', e.getMessage(), null); }   }   global class ReturnClass {  global String success; global String message; global List<Contact> records;    global ReturnClass(String success, String message, List<Contact> records) {   this.success = success;   this.message = message;   this.records = records;  }  }  }   And here is the test class  @isTest private class Test_MemberRestSvc {  static { // setup test data   }  static testMethod void testDoGet() {  RestRequest req = new RestRequest();  RestResponse res = new RestResponse();  req.requestURI = 'https://cs9.salesforce.com/services/apexrest/v.9/member/me/results/today';   req.httpMethod = 'GET'; RestContext.request = req; RestContext.response = res;  MemberRestSvc.ReturnClass results = MemberRestSvc.doGet();  System.assertEquals('true', results.success); System.assertEquals(10, results.records.size()); System.assertEquals('Query executed successfully.', results.message);  }  }   I just commented a few lines and ran and it. I still achieved enough test coverage so my question is why do I need to simply instantiate the Rest request and response objects since I am directly calling the class?    @isTest   private class Test_MemberRestSvc {    static {     // setup test data     }  static testMethod void testDoGet() {  /*RestRequest req = new RestRequest();  RestResponse res = new RestResponse();  req.requestURI =    'https://cs9.salesforce.com/services/apexrest/v.9/member/me/results/today';   req.httpMethod = 'GET'; RestContext.request = req; RestContext.response = res; */Commented the code meant for REST apex intialization and merely calling the method!!  MemberRestSvc.ReturnClass results = MemberRestSvc.doGet();  System.assertEquals('true', results.success); System.assertEquals(10, results.records.size()); System.assertEquals('Query executed successfully.', results.message);  }  }   Can someone explain this behavior? Also what are the best practices for writing Test classes for apex Rest services?


I'm in a huge trouble as my new iPhone 4s can not restore a backup of an older iPhone 4s backup.  Few days back i had to change my 4s iPhone which was a locked phone( gevey sim) with iOS 8.1.2, so i created a backup of it before resetting it to factory defaults.  Then i purchased a new iPhone 4s factory unlocked and tried to restore that backup but it failed with an error message telling me that "Cannot restore backup because it's either corrupted or not compatible with this device".  Please help me out because its getting so frustrating for me. I tried almost everything available on the internet but nothing worked for me.

When I try to sync my iPhone with my computer, I get the following message:       iTunes could not back up the iPhone "iPhone Name"   because the backup was corrupt or not compatible   with the iPhone.      Delete the backup for this iPhone, then try again.   Yet, here is no option to delete the backup. Where are backups stored / how can I delete the backup?  This is iTunes version 10.5.3 running under  Mac OS X 10.6.8.


Let $W$ be the space $$\operatorname{span}\{AB-BA\} ,$$ where A and B are square matrices, and let $H$ be the space of all square matrices of trace $0$. Then prove that $W=H$.   The fact that $W$ is a subset of $H$ is fairly easy to prove. I could prove the converse.

This is the fourth part of a four-part problem in Charles W. Curtis's book entitled Linear Algebra, An Introductory Approach (p. 216).  I've succeeded in proving the first three parts, but the most interesting part of the problem eludes me.  Part (a) requires the reader to prove that $\operatorname{Tr}{(AB)} = \operatorname{Tr}{(BA)}$, which I was able to show by writing out each side of the equation using sigma notation.  Part (b) asks the reader to use part (a) to show that similar matrices have the same trace.  If $A$ and $B$ are similar, then  $\operatorname{Tr}{(A)} = \operatorname{Tr}{(S^{-1}BS)}$  $= \operatorname{Tr}(BSS^{-1})$  $= \operatorname{Tr}(B)$,  which completes part (b).  Part (c) asks the reader to show that the vector subspace of matrices with trace equal to zero have dimension $n^2 - 1$.  Curtis provides the hint that the map from $M_n(F)$ to $F$ is a linear transformation.  From this, I used the theorem that $\dim T(V) + \dim n(T) = \dim V$ to obtain the dimension of the null space.  Part (d), however, I'm stuck on.  It asks the reader to show that subspace described in part (c) is generated by matrices of the form $AB - BA$, where $A$ and $B$ are arbitrary $n \times n$ matrices.  I tried to form a basis for the subspace, but wasn't really sure what it would look like since an $n \times n$ matrix has $n^2$ entries in it, but the basis would need $n^2 - 1$ matrixes.  I also tried to think of a linear transformation whose image would have the form of $AB - BA$, but this also didn't help me.  I'm kind of stuck...  Many thanks in advance!


So I'm running macOS 10.14.5 on a 2012 Macbook Pro.  I just put an SSD into the system to replace the internal spinning drive and reinstalled a new copy of the OS from scratch then did the migration assistant using the old drive to copy new data over.  I'm trying to use Boot Camp Assistant to install Windows 10, which I had done previously on the spinning drive.  I did not, however, save the Windows Support files from my previous installation of Windows 10 and need to redownload them.  I try to do this, but every time I do the system says that it cannot save the files to the USB drive (which is an 8Gb drive that is empty and freshly formatted to FAT / MBR).  I've reset my SMC and NVRAM (though I'm not sure how that would help) and reformatted the drive a number of times, to no avail.  The system seems incapable of getting the Windows Support Files.  Is there an alternative method of downloading the files?  The computer seems to download the files (which previously as a DMG stored in /Library/Application Support/BootCamp, but during the download and attempt to write the files to the USB drive, the DMG never appears.  I checked for open files lsof -p [PID of BCA] and it shows that it's writing to a bunch of .data files in the /private/var/... tree.  I'm not sure how to unpack these into the actual data and have no idea what format they are in.  Is there any kind of alternative way to download the files?  I did try to use BCA in safe mode but it wouldn't mound the FAT partition on the USB drive at all, so that was a bust.

I'm setting up my MacBook Air for a Windows-only boot setup. This was easy enough. It already had rEFIt on it, I just connected a Windows 7 boot thumb drive, and away I went.  However, it seems Apple does not let you download Bootcamp drivers outside of their assistant tool. Reinstalling OS X just for the drivers is ridiculous.  This laptop no longer has OS X on it at all. How do I get the required drivers? I cannot find them anywhere on Apple's support pages.  Every other manufacturer has their drivers available for download.   How do I download the Windows drivers for my 2010 MacBook Air without the BootCamp Assistant?


I'm using the latex package  because the  package isn't using APA style version 6 yet.  Now I'm trying to add a table with notes right underneath it, like in this table for instance:    Since the \caption{} is used as a title above the table, I have to add an extra row for the notes that goes over the whole table width. The problem is that the notes won't fit into one line so I need multi-line cell. How can I accomplish that? Or am I doing it totally wrong and there is a much easier way? I guess footnotes don't work here.  \documentclass{apa6e}  \begin{document} \shorttitle{} \begin{table} \caption{title} \begin{tabular}{cc} foo & bar\\ \hline \multicolumn{2}{l}{Notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus orci, porttitor et posuere sit amet, tempor non justo. Ut quis aliquet turpis. Ut dictum nulla eget purus elementum a lacinia libero varius. Donec malesuada nulla ut odio rhoncus convallis. Aenean faucibus sollicitudin sapien, a vestibulum ante rhoncus sit amet. In vitae mi justo. In arcu metus, porta et lacinia ut, ultricies sed eros.} \end{tabular}  \end{table} \end{document}


When I buy frozen fish it says "do not use toaster oven". There are warning labels on frozen hamburger packs as well as packs of frozen fish. As long as I check the temperture of the fish, meat , cake or what have you can I assume the food is safe to eat as I would in a regular oven?

My toaster oven has a temperature gauge just like my oven 200-450 degrees. I opened a package of fish sticks and the instructions said "Do not cook in microwave or toaster oven." It only had instructions for cooking them in a regular oven. Do you have any idea why a toaster oven that can be put at the same temperature would not be good to use?


I have a custom url companyname.com. I have a community with the url mydomain.force.com. Now when I enter the custom URL in the browser, it should redirect to community login page. Is there any way to achieve this scenario. Please suggest

I need to configure a Salesforce Community to display a customer URL, ie portal.[DOMAIN].com instead of the standard [DOMAIN].force.com/  The  doesn't seem to work   We've got the cert installed and everything seems to be setup correctly in Salesforce.    I've done this before but it only comes up every 18 mos or so.  Whatever I learned last time (and didn't write down), is forgotten.  Appreciate any help.


I have the following problem:  $$ \lim_{x \to x_0}{\frac{\arcsin x-\arcsin x_0}{x-x_0}}=\text{?} $$  What I have:  Let $x=\sin t$. Then the problem becomes:  $$ \lim_{t \to t_0}{\frac{t-t_0}{\sin t-\sin t_0}} = \lim_{t \to t_0}{\frac{\frac{t-t_0}{2}}{\sin (\frac{t-t_0}{2}) \cos{\frac{t+t_0}{2}}}}=\lim_{t \to t_0}{\frac{1}{\cos(\frac{t+t_0}{2})}}=\frac{1}{\sqrt{1-\sin^2(t_0)}} $$  So I'm kind of stuck here. I'm not very good with trigonometric formulas. Assuming so far the solution is correct, how do I continue from here?  Thanks in advance!

Because $\sin'(x)=\cos(x)$ we can prove that $\arcsin'(x)=\frac{1}{\sqrt{1-x^2}}$. but, by definition we have $$\arcsin'(x)=\lim_{h\to0}\frac{\arcsin(x+h)-\arcsin(x)}{h}\tag{1}$$ therefore, $$\lim_{h\to0}\frac{\arcsin(x+h)-\arcsin(x)}{h}=\frac{1}{\sqrt{1-x^2}}\tag{2}$$ My question: Can we prove $(2)$ without using $(1)$? How?


I think that I've managed to figure this one out, I was just wondering if someone could look it over because there are a few areas that I'm not sure about my steps. Here is the full question:      Suppose $f$ is a real valued function defined on all $x$ and $|f(x) - f(y)| \leq 7(x-y)^2$ for all $x$ and $y$. Prove $f$ is a constant function.    First, define $y = x+h$ and take $h \neq 0$, then $|f(y) - f(x)| \leq 7(x-y)^2$ becomes $|f(x+h) - f(x)| \leq 7h^2$. Dividing by $|h|$ we get:  $\left|\frac{f(x+h) - f(x)}{h}\right| \leq 7|h|$.   Clearly, $\lim_{h\rightarrow 0} 7|h| = 0$. Then by the sandwich theorem (squeeze theorem):  $\lim_{h\rightarrow 0} \left|\frac{f(x+h) - f(x)}{h}\right| = 0.$ And thus $f'(x) = 0$ for arbitrary $x$. So $f(x)$ is a constant function.   Added crucial condition on $h$ thanks to help from comments

I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha > 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| < K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  < K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!


please excuse my unfamiliarity with Scala/Java. I'm working with an example twitter streaming app. Below is the code:  stream.foreachRDD{(rdd, time) =>    rdd.map(t => {      Map(        "user"-> t.getUser.getScreenName,        "text" -> t.getText,        "hashtags" -> t.getHashtagEntities.map(_.getText)                )    }).map(_.mkString("\t")).foreach(println)  }   When this prints, I get something like this for hashtags:  hashtags -> [Ljava.lang.String;@651a3f4e   Does anyone know what's going on here? I'd like to print human-readable hashtags...

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


I was pretty sure the answer was NO, and hence google gears, adobe AIR, etc.  If I was right, then how does  work?  It is persistent and written in javascript.  It is also just a single HTML file that has no external (serverside) dependencies.  WTF?  Where/how does it store its state?

Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring .  Specifically, I'd like to read the contents from a file and write those contents to another file. At this point I'm not worried about gaining permissions and am just assuming I already have full permissions to these files.


Question: Every bijection $f:\Bbb{R}\rightarrow[0,\infty)$ has infinitely many points of discontinuity.

We know that the points of discontinuity of a monotone function on an interval $[a,b]$ are countable. Using this can we prov that:    Any bijection $f: \mathbb{R} \to [0,\infty)$ has infinitely many points of discontinuity.   If yes, how or otherwise how to prove the above result?


I'm trying to attach a file that's provided in a byte array as an attachment in an email but I'm getting the following error: Exception: Failure sending mail. InnerException: Stream does not support reading.  But that's it. Not much to go with! I'm attaching the byte array file as follows: using (MailMessage message = new MailMessage()) {     message.Subject = subject;     ....     using (MemoryStream ms = new MemoryStream(attachment.Data))     {         message.Attachments.Add(new System.Net.Mail.Attachment(ms, attachment.Name));     } }  Note that the attachment variable is our own class which just provides additional information about the file including .Data which contains the byte array representing the file. Any ideas? Thanks.

I am using a service component through ASP.NET MVC. I would like to send the email in a asynchronous way to let the user do other stuff without having to wait for the sending.  When I send a message without attachments it works fine. When I send a message with at least one in-memory attachment it fails.  So, I would like to know if it is possible to use an async method with in-memory attachments.  Here is the sending method       public static void Send() {          MailMessage message = new MailMessage("from@foo.com", "too@foo.com");         using (MemoryStream stream = new MemoryStream(new byte[64000])) {             Attachment attachment = new Attachment(stream, "my attachment");             message.Attachments.Add(attachment);             message.Body = "This is an async test.";              SmtpClient smtp = new SmtpClient("localhost");             smtp.Credentials = new NetworkCredential("foo", "bar");             smtp.SendAsync(message, null);         }     }   Here is my current error   System.Net.Mail.SmtpException: Failure sending mail.  ---> System.NotSupportedException: Stream does not support reading.    at System.Net.Mime.MimeBasePart.EndSend(IAsyncResult asyncResult)    at System.Net.Mail.Message.EndSend(IAsyncResult asyncResult)    at System.Net.Mail.SmtpClient.SendMessageCallback(IAsyncResult result)    --- End of inner exception stack trace ---     Solution      public static void Send()     {              MailMessage message = new MailMessage("from@foo.com", "to@foo.com");             MemoryStream stream = new MemoryStream(new byte[64000]);             Attachment attachment = new Attachment(stream, "my attachment");             message.Attachments.Add(attachment);             message.Body = "This is an async test.";             SmtpClient smtp = new SmtpClient("localhost");             //smtp.Credentials = new NetworkCredential("login", "password");              smtp.SendCompleted += delegate(object sender, System.ComponentModel.AsyncCompletedEventArgs e)             {                     if (e.Error != null)                     {                             System.Diagnostics.Trace.TraceError(e.Error.ToString());                      }                     MailMessage userMessage = e.UserState as MailMessage;                     if (userMessage != null)                     {                             userMessage.Dispose();                     }             };              smtp.SendAsync(message, message);     }


Show that $x^p - x -1$ is irreducible over $\mathbb{F}_{p}$.  I've seen this polynomial (or some variation x^p -x -a) on several of our qualifying exams and in every case they ask you to show it is irreducible. I know you can show it is irreducible by showing that if $\alpha$ is a root of it then $\alpha+1$ is also a root and then showing that it is the minimal polynomial for its roots. This takes about half a page of writing to do and I am looking for a shorter way to prove this.     Anyone have a shorter way?

Let $p$ be a prime. How do I prove that $x^p-x+a$ is irreducible in a field with $p$ elements when $a\neq 0$?   Right now I'm able to prove that it has no roots and that it is separable, but I have not a clue as to how to prove it is irreducible. Any ideas?


When I have display as 100%, everything displays fine, but I'd like to have the image a little smaller so I've set the width as 30% for now - the issue with this is that the image stops centering once I do that (would anybody know why that's the case?). If I remove display block, it centers, but then sits on the same line as the button - however if I then add in display:block to the button, the left/right padding stretches across the width of the container. Here's the codepen where I've saved my project:  - but here's the code I'm having trouble with: .image {     margin-bottom: 25px;     width: 30%;     border-top: 1px solid #cee5d0;     display: block; }

How can I horizontally center a
 within another
 using CSS?

Foo foo


I am new to Ubuntu. I don't know my password to authentication for dowloading applications in appstore. How I get password for authentication to download apps ?

What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?


Hello I have included given html code  #expressShippingCalculation       %li.list-group-item     %label       %input#shipping_method3{:name => "shipping_method", :type => "radio", :value => "1"}         Shipping         %small (Delivery within 4-5 days)   %li.list-group-item#method4     %label       = form_for @order, :url => update_express_shipping_path,:method => 'patch', :html => { :id => "shippingDetails" }, :remote => true do |form|         = form.radio_button :express_shipping, true, :value => true, :id => 'shipping_method4', :name => 'shipping_method'         Express Shipping         %small.maroonColorText (Additional Charge of USD 10 applicable.)   #spinner.spinner{:style => "display:none;"}     %img#img-spinner{:alt => "Loading", :src => "spinner.gif"}/     and js code is   $('#expressShippingCalculation input').change ->     if $('#shipping_method4').is(':checked')       additionalAmountExpress()       data = $('#shippingDetails').serialize()       expressValue = true     else        $('#additional-charge').hide()       expressValue = false     $.ajax       url: '/update_express_shipping?expressShipping=' +expressValue       type: 'PATCH'     return        Now I need to show loading spinner on my ajax request. lease guide me how I will include given code in my ajax request  $('#spinner').bind('ajaxSend', ->   $(this).show()   return ).bind('ajaxStop', ->   $(this).hide()   return ).bind 'ajaxError', ->   $(this).hide()   return   Please guide me how to include this code.

In Prototype I can show a "loading..." image with this code:  var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,  onLoading: showLoad, onComplete: showResponse} );  function showLoad () {     ... }   In jQuery, I can load a server page into an element with this:  $('#message').load('index.php?pg=ajaxFlashcard');   but how do I attach a loading spinner to this command as I did in Prototype?


I have installed GCC compiler by installing the build-essential package.  After the installation I wrote a simple C program. I tried to run it with the following command:  gcc First.c ./a.out   but I'm getting a bash: ./a.out: Permission denied message. I don't know what to do now.

I have written a C++ program and complied it to produce a.out file. However, whenever I try to run it, I get Permission Denied. I read that we can use sudo, but I can't quite get it to work. I use something like, sudo "./a.out" but that too doesn't work.  Edit:  Here is the message I get when I try "./a.out".  bash: ./a.out: Permission denied