I'm looking to dedupe a table using a stored procedure. There is no 1 column that is unique, so I'd have to combine 2 or more columns to get a unique identifier. ID column is identity int, but is generated by sql automatically at the time data is imported. I need to somehow combine 2 or more columns excluding ID column to get a unique identifier so I can strip out anything that's duplicated.   From there I figured it would make the most sense to do the following [correct me if my approach is wrong].    create temp table query table using dedupe logic import query results into new temp table drop original [or delete contents?] recreate original[or repopulate?] import data from temp drop temp table   I have the following columns. I think sessionid+callflow is unique.   sessionid,  legid,  dialednumber,  callerid,  calldatetime,  dayofweek,  hourofday,  end_type,  callduration,  callorder,  callflow,  ID,  [pk] origin

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 have to calculate the sum of this series $$ \sum_{k=1}^n\sin{k\theta} $$ I tried solving it like this $$ \sum_{k=1}^n\sin{k\theta} = \operatorname{Im}\sum_{k=1}^ne^{(i\theta)k} $$ I recognized it as a geometric sum, but to get the sum I first had to check $$ \left|e^{i\theta}\right| = 1 $$ which means that the geometric sum is divergent. Apparently that is not the right answer, but I can't find the spot where I made the mistake. Could you help me finding it?

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


Would you add parentheses in the first place when you write alternative content?  Example:  "This car has a(n) (optional) navigation system."  or  "This car has a (optional) navigation system." ?  Remark: I am not an native English speaker, so please be gentle.

When a/an precedes a parenthetical aside (sometimes seen in informal/conversational writing), should the vowel rule depend on the first word in parentheses, or the next word in the "regular" flow of the sentence?     I need a (memorable) idiom (preceding an m word; use a)   or     I need an (memorable) idiom (preceding an i word; use an)


Can you sail to any island, and anchor your boat there, and use the island for food?

Do you know any way how can I visit uninhabited islands in the Pacific (French Polynesia, Micronesia etc.) and stay there for a couple of days or weeks?  The only condition, these island (or islands) should have drinking water.  Could it be done legally or only illegally?  Does any company do such crazy things via plane or boat?  Any information is appreciated.  I am mostly interested in French Polynesia.  Boat or plane... that's not very important.


I don't want to use miss.   What are my other alternatives? I cannot go with Mrs because I don't want to have to use her name. Is it Madam then? It sounds so french and old-fashioned. "Bonjour madame".  Any other options?

In Spanish there is senora and senorita, in French there is madame and mademoiselle and in English there is mrs and miss. My question is that in English we also have call women "Madam" or "Ma'am" as a similar title. I was wondering if the English "madam" can only be used for a married women and if there was another form of the word for different types of women, like married and unmarried.


I am trying to store a bit of data from a circuit, but I don't want to use an IC like an EEPROM chip. Is it possible to store one bit with a transistor or something else to that effect?

I would like to make a simple circuit to store or save 1 bit of data. The circuit should be able to remember the state of an LED ( on or off ) even if the supply is disconnected from the circuit. I need it to work like a hard drive, flash memory or SD memory card of cell phones.  I made a circuit as shown in the picture, The output is an LED in series with 470 ohm resistor. I use two bush buttons to charge or discharge the capacitor so the output LED is on or off.   After disconnecting the supply or turning off electricity, The circuit was able to remember the state of the LED for few minutes.   After 2 or 3 minutes, the capacitor discharged completely and the circuit lost its data.    How can I stop the capacitor from discharging ? or how can I slow the rate of discharging so that the circuit lose its data after a week or more ?  In this circuit I uses 555 as an inverter ( not gate ) but I may use any other IC's , My aim is just making a simple permanent memory.


a quick question on how keyframes / rendering an animation works within Blender. I want to render multiple images with different settings within some materials ,different shapekeys and poses, but no movement at all. I thought the best way to archive this, is to render a x frame sequence and have drivers tap in or out with 100% on each frame. So my question is: How does Blender handle this? For each frame, will blender first apply all keyframes and then render ? Also can I deactivate the interpolation thing, or can it happen that something is not 100% on frame 2 when i have set it 0% on frame 1 and 100% on frame 2 ?  A short answer is all i need, thanks in advance.   Also on a side note : How is Blender handling resources ? Besaid file is getting kinda large with many meshes/materials and i have experienced slower performance while doing the same tasks (like creating another mesh :D).Making other stuff invisible didn't seem to change that. Moving them to another layer seemed better (maybe that in fact is freeing all memory for those items ?).It is still very workable, but in general, if there is a way to make blender kinda ignore all the stuff i don't need right now entirely without removing it from the file, that would be great.  Thank you in advance, again.  Have a nice time,  Aaron.

In order to animate a character so that it grabs an object an throws it, I added a Child-Of constrained and keyframed its influence. In the F-curve Editor I can't set the curve which controls the influence to interpolation-mode Constant without changing the other curves (Which should be linear or bezier).   How can the interpolation mode of a curve changed independently?


I'm working on a program that automatically re-posts Craigslist posts in a batch form.  I'm executing a method called arrayTest() that contains a line webBrowser1.Navigate(urls[i]);. This will get a URL from an Array and have the webBrowser1 open it. After that is executed, the clickRepost(); method is called. This method simulates a button click. But the method executes before the webBrowser1 gets to finish opening the URL.  What i need help on is telling the program to wait for the webBrowser1 to finish opening the URL before moving on to the next method.  What i have tried so far:  Task t = Task.Run(() => {     webBrowser1.Navigate(urls[i]); }) t.wait(); clickRepost();   This still causes for clickRepost() to not let webBrowser1 finish loading the URL. I also tried to add System.Threading.Thread.Sleep(5000) in between calling methods but as it does so in Java, it only shuts the program for x-Seconds.  This is a segment of my program, really the only ones I'm having trouble with.  private void arrayTest()     {         String[] urls = CLLinks.Text.Split('\n');         for (int i = 0; i < urls.Length; i++)         {             log.AppendText("Opening Url...\n");             webBrowser1.Navigate(urls[i]);             log.AppendText("Reposting...\n");             clickRepost();             log.AppendText("Checking Completion...");             webBrowser1.Navigate(urls[i]);             completionCheck();         }     }      private void CLRenBtn_Click(object sender, EventArgs e)     {         arrayTest();     }      private void completionCheck()     {         HtmlElementCollection col = webBrowser1.Document.GetElementsByTagName("input");          foreach (HtmlElement item in col)         {             if (!(item.GetAttribute("value") == "Renew this Posting"))             {                 log.AppendText("Renew Posting does not exist");             }             else             { }         }     }      private void clickRepost()     {         HtmlElementCollection col = webBrowser1.Document.GetElementsByTagName("input");          foreach (HtmlElement item in col)         {             if (item.GetAttribute("value") == "Renew this Posting")             {                 item.InvokeMember("click");             }             else             {}         }     }   CLRenBtn_Click Is the button i press on the form to start the Re-posting. arrayTest() will be changed to a more relevant name. At the time i was just testing whether this would work. And im planning on merging clickRepost() and completionCheck() since they do the same thing.  Many thanks in advance!

I'm trying to create a program to clone multiple bugs at a time through the web interface of our defect tracking system.  How can I wait before a page is completely loaded before I continue?  //This is pseudo code, but this should give you an idea of what I'm trying to do.  The //actual code uses multi-threading and all that good stuff :). foreach (string bug in bugs) {     webBrowser.Navigate(new Uri(url));     webBrowser.Document.GetElementById("product").SetAttribute("value", product);     webBrowser.Document.GetElementById("version").SetAttribute("value", version);     webBrowser.Document.GetElementById("commit").InvokeMember("click");      //Need code to wait for page to load before continuing. }


I'm using  to install Django with Postgresql in my Ubuntu 14.04.  In the 4th step, it asked me to go to my python directory, so I ran $ whereis python2.7 and I got multiple directories. One is the shortcut stored in /usr/bin, one is a library in usr/lib/python2.7, and there are many others.  And because of this very reason, I'm not sure where I am supposed to navigate to find my Python directory and continue the installation.

I have just migrated from Windows environment. I have installed Python 3.2 in a separate directory. How can I get the python installation path in Ubuntu shell?  Is there any way I can let the shell know/choose at runtime which python version is to be used for further code execution?  Are there any environment variables and search path kind of things in Ubuntu Linux as well?


This "I" symbol used in matroid notation:

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


Suppose two children are standing 100m apart one of them starts running towards the other with relativistic speed...which clock would be slower?  Note- I thought this was similar to the twins paradox but according to the solution i found for the paradox some time is unaccounted because of change in velocity....this is obviously not the case here

Suppose we have two twins travelling away from each other, each twin moving at some speed $v$:    Twin $A$ observes twin $B$’s time to be dilated so his clock runs faster than twin $B$’s clock. But twin $B$ observes twin $A$’s time to be dilated so his clock runs faster than twin $A$’s clock. Each twin thinks their clock is running faster. How can this be? Isn’t this a paradox?


#include <stdio.h> #include <string.h> #include <stdbool.h> int main(int argc, const char * argv[]) {     bool isTrue=true;     int nums[50];     for (int i = 0; i<sizeof(nums); i++) {         nums[i]=2147483647;     }     char operations[49];     int counter = 0;     printf("What is your first number? (THERE IS NO PEMDAS, THE NUMBER 2147483647 is not allowed)\n");     scanf("%d", &nums[counter]); // Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) }   I have more code, but it is unrelated to the problem. Thank you for helping and just ask if more info is needed (I am making a calculator that lines up inputs and calcultes them  eg. 3 + 5 * 9 / 2 = 36. The equation can have at most 50 integers and 49 operations.)

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


My friend and I would like to try RPGs out, but we would rather "jump to the fun" as quickly as possible and not engage any other people in the play at first. Which RPG system would be minimalistic enough to learn it within hours (the less the better) and what resources would I need to get started? I would prefer to avoid spending hours reading books just to start.  Per comments:     What genre are you most interested in?   To be honest, I don't know what genres exist. Middle-age fantasy, magical world sounds good though.     Do you have ready access to dice?   I've got 4-, 6-, 8- and 20-eye dice. I guess we could play online though and then I would have access to any dice using some website.     Do you care if physical books exist for the system?    Not really, as long as it's not too much reading to play.     What was is it about RPGs that you are most interested in?   I would say that I prefer rules rather than roleplaying — basically I enjoyed playing computer RPG games so far — creating and developing a character, staying in the same world and exploring it, making decisions.

I have been told that roleplaying is great fun. I've looked and looked and it all seems so complicated. Could anyone tell me a good place to start, and what sort of things you end up doing in roleplaying?


Would it be a good idea to also reward users with rep points when they unlock a new golden badge?  Access to 100% of the moderation tools only happens at 10k points. Scoring that amount of rep is hard and takes time, reflecting the commitment of a user toward the community.  As many of you are aware, the FAQ states that access to the previous level of moderation is achieved at 3k points, and going from 3k to 10k is a really LONG LONG way.  Since golden badges also represent a higher commitment to the community and can be very difficult to get, I wonder if we should also reward a user with rep points (300? 400? 500?) to help him on his journey.  What do you think?

The  on the StackOverflow blog says that badges are there "to encourage positive behavior". So, why not giving each user some reputation points for each badge? Maybe with differences: a "woot" badge would mean 100 points, while a "scholar" badge would give 10 points to the user. -- Edit: someone pointed out that you already gain some reputation implicitly when you get a Badge. That's false for 90% of badges: Woot -> no rep earned Autobiographer -> no rep earned Beta -> no rep earned Citizen Patrol -> no rep earned Civic Duty -> no rep earned Cleanup -> no rep earned Commentator -> no rep earned Critic -> no rep earned Disciplined -> no rep earned Editor -> no rep earned Fanatic -> no rep earned ...


As above picture - brought a return flight ticket from London to buenos aires and transit at JFK airport. I didn't know a transit visa is needs until I went to check in today at Gatwick airport. The travel agent didn't mention to me that I need a visa for transit with Argentina passport holder. I was so annoying and didn't know what to do for the last minute. I phoned the travel agent and he said nothing to do with him.  He is just selling ticket. If I need to change the date with the same itinerary with same airline and it will cost me £768 just to change the date. My question is there any help for this critical situation?

My daughter bought a ticket for a flight with a layover in Emirates (from Dallas, Texas to India). She had a stop of 48 hours in Dubai. When she was checking in in Dubai for Delhi, she was informed that her visa for India has expired in 2012. Did Emirates not have an obligation to check the visa for India before selling a ticket?


Why does light have the speed it does? why is it not considerably faster or slower than it is?  I can't imagine science, being what it is, not pursuing a rational scientific explanation for the speed of light.  Just saying "it is what it is" or being satisfied saying it is 1 ($c=1$), does not sound like science.

Meaning, why is it the exact number that it is? Why not 2x10^8 m/s instead of 3? Does it have something to do with the mass, size or behavior of a photon? To be clear, I'm not asking "how we determined the speed of light". I know there isn't a clear answer, I'm really looking for the prevailing theories.


I got a multiple-entry tourist Schengen visa, but will likely have to cancel the original trip due to personal reasons.  I'd like to keep the visa active, however, as I intend to make the trip some time later this year.  Do I need to inform the destination country's embassy about the change in my plans?  Does this mean my multiple-entry visa will likely be canceled by the embassy?

I am an Indian student in the UK. If I already had a single entry Schengen visa and I apply again to the French embassy, will I be issued with multiple-entry?  If I get the visa, but due to a problem, I cannot travel on the intended dates(ones I mentioned on visa form) and decide to travel a month later, will it cause a problem when I travel next. And if I dont exactly follow the itenary that I submitted with my visa application?  As far as dates are concerned. I mean this: Suppose my visa is valid for May-August. When I applied for this visa, my itenary and hotel bookings were for June. But now I decide to travel instead in July. Will there be a problem if I did not take the journey for which I initially applied the visa and take a different journey later instead


I wish to add a symbol from MS Symbol to my document. Specifically, I need to add the   \plus   character and only that to my document below.  \documentclass[a4paper,12pt,twoside]{book}  \usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry} \usepackage{amsmath,amssymb,amscd,amsbsy,array,color} \usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor} \usepackage{picture} \usepackage{indentfirst} \usepackage{enumitem}  \usepackage[amsmath,framed,thmmarks]{ntheorem} \usepackage{changes}   \newtheorem{Theorem}{Theorem}  \theoremclass{Theorem} \theoremstyle{break} \theoreminframepreskip{0pt} \theoreminframepostskip{0pt} \theoremframepreskip{1cm} \theoremframepostskip{1cm} \theoremstyle{break} \def\theoremframecommand{% \psshadowbox[fillstyle=solid,fillcolor=blue,linecolor=black]} \newshadedtheorem{them}[section]{Theorem}  \theoremstyle{nonumberplain} \theoremsymbol{\rule{1ex}{1ex}} \def\theoremframecommand{% \psshadowbox[fillstyle=solid,fillcolor=red,linecolor=black]} \newshadedtheorem{proof}{Proof}   \title{Real and Complex Analysis} \author{Michael Dykes and Croix Snapp}  \begin{document} \maketitle  \begin{them}[Arithmetic of Natural Numbers] There are operations \textbf{addition} $\plus$,   \textbf{multiplication} $\cdot$ and a partial order $\leq$ on $\bn$ which are uniquely determined by the following conditions: \begin{enumerate}     \item Addition is associative, commutative, and has the identity element $0$.     \item Multiplication is associative, commutative, and has $1 \eqdef \sigma(0)$ as its identiy element.     \item The distributive law holds:     \[     (\ell + m) \cdot n = \ell \cdot n + m \cdot n, \q \q \ell,m,n \in bn.     \]     \end{enumerate}     \end{them}      \end{document}   When I compile I get an error of course. I don't know how to import just that one symbol into my document without changing all my other symbols. Please help.

I wish to use a symbol provided by the package MnSymbol but if I have a \usepackage{MnSymbol} in my document then many other symbols change, including even the equals sign (=), which appears much shorter now.  How can I use a package to just get a few particular symbols without having my entire document in the font that the package imposes?


I'm trying to modify [vpn-secrets], as mentioned here:    However, nmcli complains about it,  %> sudo nmcli con modify myvpn vpn-secrets.data 'password = xxx' Error: invalid or not allowed setting 'vpn-secrets': 'vpn-secrets' not among [connection, vpn, ipv4, ipv6].   Is it impossible to change the password with nmcli?

With nmcli, I can modify VPN data like this:  nmcli con modify myvpn vpn.data 'refuse-pap = yes, user = xxx'   So I'm wondering if I can set password this way as well?


My goal is to be become a physicist but I am concerned about my math skills (i am pretty decent in maths) ,i know the computational part but I'm not good in geometric or intuitive part of it,so i decided that i must be thorough in both the numbers and the concepts that govern them ,but I don't know where to start,like from which chapter do i need to understand in an intuitive way,can someone suggest a hierarchy/order for learning maths in intuitive way from basics to advanced?,it would be helpful....

Note: I will expand this question with more specific points when I have my own internet connection and more time (we're moving in, so I'm at a friend's house).  This question is broad, involved, and to some degree subjective.  (I started out as a physics-only student, but eventually decided to add a mathematics major. I am greatly interested in mathematics; the typical curriculum required for physics students is not deep or thorough enough; mathematics is more general (that means work!); and it only requires a few more classes. Naturally, I enjoy  immensely.)  This question asks mainly of undergraduate-level study, but feel free to discuss graduate-level study if you like.  Please do not rush your answer or try to be comprehensive. I realize the StackOverflow model rewards quick answers, but I would rather wait for a thoughtful, thorough (on a point) answer than get a fast, cluttered one. (As you probably know,  produces clear, useful writing; and a properly-done comprehensive answer would take more than a reasonable amount of time and effort.) If you think an overview is necessary, that is fine.  For a question this large, I think the best thing to do is focus on a specific area in each answer.    Update: To Sklivvz, Cedric, Noldorin and everyone else: I had to run off before I could finish, but I wanted to say I knew I would regret this; I was cranky and not thinking clearly, mainly from not eating enough during the day. I am sorry for my sharp responses and for not waiting for my reaction to pass. I apologize.  Re: Curricula:   Please note that I am not asking about choosing your own curriculum in college or university. I did not explicitly say that, but several people believed that was my meaning. I will ask more specific questions later, but the main idea is how a physics student should study mathematics (on his or her own, but also by choosing courses if available) to be a competent mathematician with a view to studying physics.  I merely mentioned adding a mathematics major to illustrate my conclusion that physics student need a deeper mathematical grounding than they typically receive.   And now I have to run off again.


I have a PostGIS table of singlepart line segments that I've run the ST_ChaikinSmoothing function on. Smoothing all of the line segments worked great, but these simplified geometries created small gaps between the other line segments in the table. (It's a network of flowlines) I need to snap the endpoints of each linestring to the closest segment of another line in the table.   I was directed to  about snapping lines, but I think it is snapping features in one layer (line) to features in another layer (input). I always struggle to comprehend PostGIS examples that use abstract text geometries in the queries as opposed to referencing tables of existing features.  My query below is returning an empty table with point geometry. I can successfully run each of these three functions individually to locate the points on the lines, but I can't figure out what i'm missing to snap the lines and create line geometries.  "geometry" is the name of my geometry column in the smoothed_lines table  create table snapped_lines as ( SELECT ogc_fid, name, (ST_LineInterpolatePoint(geometry,ST_LineLocatePoint(geometry,ST_EndPoint(geometry)))) as geometry from smoothed_lines);     UPDATE: Sample dataset:   The answer from @gabriel-de-luca below does snap the smoothed lines to the original lines based on matching id's, but ST_Snap moves all vertices in a linestring, not just the end nodes and wrecks the smoothness of the input features.   example after running this ST_Snap query:

I'm trying to create a line snapping tool in my Android app where I'm using the spatialite-android lib. I'm using the function ST_Snap where I want to snap a linestring with another linestring on the point where a line string is touching another one. here is the preview    Here is my gis query   SELECT ST_AsText(ST_Snap(line, input, ST_Distance(input,line)*10.0))  FROM (SELECT    ST_GeomFromText('LINESTRING(88.4656805545 22.6896467287,88.4632558376 22.6896841575,88.4614285827 22.6882649519)',4326) As input,    ST_GeomFromText('LINESTRING(88.4654606134 22.690117835,88.4655571729 22.6896761149)',4326) As line);   But the above query snapping the line to the end. I'm guessing the query is not appropriate.  This is what happening


I want to dowload data which contains debug logs. Is it saving somewhere in files or Database column, from where I can read it?  My idea is to stream data from there to my app, which is looking for a specified action (simple regex etc...). I want any clues, cause i couldnt find it anywhere (also in db, but maybe some of you have met with similiar issue).

I spend my days waiting on the Force.com Console and it makes me crazy, I have a pretty nice machine and it still chokes on the details sometimes.  Anyways, I saw  had given a  and is presenting again this year Dreamforce '12.  However, it seems like they're presentation is targeted at using their product, or for that matter others like it (, ) on Heroku, and not really targeting APEX/VisualForce development!  Is this the case? Are there any better solutions out there for reviewing logs?  Are there any APIs that allow you to export your debug logs out of SFDC programatically? Or has anyone even tried to tackle this?


For example,  got answered by somebody in the comments. Since you can't accept comments, what should I do now?

I have a question and have seen others to which the best and most relevant answer (at least the one that solved my particular problem) is placed in the comments to the question as opposed to the answers:   I would like to recognize the commenter as the person who correctly answered the question, but there doesn't seem to be any way to do that. The only thing I could think of was to ask the commenter to repost his comment as an answer, but I cannot figure out a way to contact him. In the meantime the question is sitting unanswered and I am getting other "answers" (leading me to believe that people are not reading the comments and answers already posted before trying to answer it themselves).  How are we supposed to do this?  Note: I don't want to accept the comment as an answer (I agree completely with the answers to this question that comments are comments and answers are answers and they should stay that way). I do wonder if there should be some way to contact people in a reasonable manner (comments on their profile that they must opt in to receiving in email?).


For == operation on variables of String for two different objects s and p created using new gives result as false (line 1) which I understand but why does line 3 and 4 ( line number commented ) gives true as Output?  I am aware of the fact that == is meant for reference comparison and that's where i have the doubt if it's meant for reference comparison then why line 4 gives true as j is an integer and there is no immutability concept as for String ( String s ) and everytime a new object has to be created ?      class World {     public static void main(String[] args)     {            String s=new String("B");         String p=new String("B");         System.out.println(s==p);                    //false    line 1         Test t1= new Test("A",4);         Test t2= new Test("A",4);         System.out.println(t1==t2);                 //false     line 2         System.out.println(t1.s==t2.s);             //true      line 3         System.out.println(t1.j==t2.j);             //true      line 4     } }  class Test {     String s;     int j;     Test(String s, int j)     {     this.s=s;     this.j=j;     } }

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 am having trouble integrating the following:  $\int_{0}^{\infty} \sin(t)\cdot t^{x-1} ~dt$ for $0 < x < 1$.  Does anybody know how that can be done. Ive tried to set it up with powerseries for $\sin(t)$, and by a substitution followed with integration by parts, non of that gave anything useful.   Does anybody know how to integrate this, using the gamma function?  Thanks

I'm looking for several ways to prove that $$\int_{0}^{\infty }\sin(x)x^mdx=\cos\left(\frac{\pi m}{2}\right)\Gamma (m+1)$$  for $-2< Re(m)< 0$


Based on: $\frac{1}{n*(n+1)}=\frac{1}{n}-\frac{1}{n+1}$ where n is element of N find the sum of the following:   $\frac{1}{1*2}+\frac{1}{2*3}+\frac{1}{3*4}+ ... +\frac{1}{38*39}+\frac{1}{39*40}$  How should one deal with this kind of problem? Is this  a mathematical induction, arithmetic series, geometric series? I'm lost on this one.  Here are the options: a)$\frac{31}{40}$                       b)$\frac{33}{40}$                       c)$\frac{37}{40}$                       d)$\frac{39}{40}$

How can I find the formula for the following equation?  $$\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$$  More importantly, how would you approach finding the formula? I have found that every time, the denominator number seems to go up by $n+2$, but that's about as far as I have been able to get:  $\frac12 + \frac16 + \frac1{12} + \frac1{20} + \frac1{30}...$ the denominator increases by $4,6,8,10,12,\ldots$ etc.  So how should I approach finding the formula? Thanks!


Running the following command returns several paths:  perl -e 'print join("\n",@INC,"")'   Every path has modules installed within. I would want to install modules, as root, into the following directory:  /usr/local/share/perl5   What commands would I run to find where cpan,as root, currently installs modules? How would I alter it if it is not the path shown above?

I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory.  When I try to install a CPAN module by doing the usual:  perl Makefile.PL make test make install   That module is extracted to a blib/lib/ folder. I have kept use blib/lib/ModuleName but it still the compiler says module can not be found. I have tried copying the .pm file into local directory and kept require ModuleName but still it gives me some error.  How can I install a module into some other directory and use it?


I have a question: I want know how to check out other's CSS code, for example, . (Yes, it is homework.)  Which Stack Exchange site should I ask on?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


If I was playing a character (class) 8/warlock 1, and then I put another level into warlock, would I be able to take the Sculptor of Flesh invocation?

The level requirements for Warlock invocations stated in the PHB are refering to which level, character or Warlock class?  Example: If I multiclassed into Warlock, Monk6/Warlock2, would I be able to pick up One With Shadows as an invocation which carries a 5th level requirement?


Background:  I was working on a LaTeX document but getting errors about 'newtxtext.sty' and 'newtxmath.sty'(similar to what's described , although that solution didn't work)  That led me down the path of updating texlive. After many forum searches, I followed instructions :  sudo add-apt-repository ppa:jonathonf/texlive sudo apt update && sudo apt install texlive-full   This led to texmaker not being able to start with an error similar to that described . This led me to find that the jonathonf/texlive repo and subsequent texlive-full install had actually installed Tex 2018 which seemed to be too far ahead for texmaker.  I thought I would try again with the normal texlive installation, so I followed instructions  to remove the jonathonf/texlive ppa, and then instructions  to do a clean install of texlive.  This led me back to square one. Now I knew to look for the TeX version to find out that it had installed 2015! apt-get update, and upgrade did not seem to have any effect. Trying to mess with tlmgr for updates as described  only led to errors about "Unknown directive" as described     Question  Therefore my question is, what is the the most stable, recent version of texlive (2016 or 2017, because 2018 doesn't work for me)? Furthermore, how do you install it?    indicates that I use a similar approach as I was before but instead add the ppa jonathonf/texlive-2016. This seems like a very obscure way to just get the most stable version of tex. Another obvious approach would be to follow . It's not super obvious where you actually get the install-tl script (I think I eventually found it), and it seems bizarre that there is not an apt-get approach for Linux.   Thanks!

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed.   So how do I install "vanilla" TeXLive on Debian/Ubuntu?   Also how do I make dpkg aware that I have TeXLive installed?


There are many existing questions about using the pgfplots linear regression.   You can imagine using code such as:  \addplot table [draw = none, dash pattern=on, x=x_data, y={create col/linear regression={y=y_data}}, col sep=comma] {data.dat}; \addlegendentry{line A $\pgfmathprintnumber{\pgfplotstableregressiona}$}   But suppose you have two linear regressions, how do you get both values of \pgfplotstableregressiona ?

Hi i have two plot with two linear regression but the legend show the same equation for the straight line... I haven't made a MWE because I thought it isn't needed---Is it?  \pgfplotstableread{ X Y 97 1.0 96 15 96 29.2 96 32 98 42.4 98 59.2 98 66.1 97 84.4 100 94.0 }\tableA  \pgfplotstablecreatecol[linear regression] {regression} {\tableA}  \xdef\slopeA{\pgfplotstableregressiona} %<-- might be handy occasionally \xdef\interceptA{\pgfplotstableregressionb}    \pgfplotstableread{ X Y 0.05 0.17 0.05 0.041 0.05 0.023 0.1 0.332 0.1 0.089 0.1 0.041 0.15 0.5 0.15 0.132 0.15 0.06 }\tableB  \pgfplotstablecreatecol[linear regression] {regression} {\tableB}  \xdef\slopeB{\pgfplotstableregressiona} %<-- might be handy occasionally \xdef\interceptB{\pgfplotstableregressionb}   and in every plot i put this for make a the legend...  \addlegendentry{% $\pgfmathprintnumber{\pgfplotstableregressiona} \cdot x \pgfmathprintnumber[print sign]{\pgfplotstableregressionb}$}   This one of my plot...  \addplot [%     point meta=explicit,     scatter,     scatter/use mapped color={draw=mapped color,fill=mapped color},     mark=*,     draw=none, forget plot]table[meta=X] {\tableA};  \addplot [mesh,mesh line legend,point meta=x,domain=95.2:99.8,very thick,samples=1000] {\slopeA*x+\interceptA};


Let $a , b , c \in [0,1]$. Prove that $\frac{a}{1+bc}+\frac{b}{1+ac}+\frac{c}{1+ab} \leq2$.  Thanks Mark for your reply. I'm new to the group so I dont know how to deal with this . Anyways I tried assuming that $c=\max\{a,b,c\}$ .   I also tried applying AM-GM on $(1+bc)$ but I got no result.

If $a,b,c$ are real numbers such that $0\le a,b,c\le 1$, then $$\frac a{1+bc}+\frac b{1+ac}+\frac c{1+ab}\le 2.$$  I did the following: Take $f(x)=\frac {x^2}{x+p},\ (p=abc)$ which is convex for $0\le x\le 1$. Therefore $$\begin{align}\frac {f(a)+f(b)+f(c)}3\le f(\frac {a+b+c}3)\Rightarrow\frac {a^2}{a+abc}+\frac {b^2}{b+abc}+\frac {c^2}{c+abc}\le \frac {(a+b+c)^2}{(a+b+c)+3abc}.\end{align}$$ How do I prove that the RHS is less than or equal to 2?


I am facing a problem by left aligning long entries in the LOF using the tocloft package. Although my TOC for long entries looks perfect and aligned, the LOF is not :( .  I am using the command   \caption[Short caption]{long caption}    to introduce shorter captions in my LOF.  Here an example:  Figure 1.1  This is an extremely long long         long caption not well aligned...........2 Figure 1.2  This is a normal caption............3   I needs to be:  Figure 1.1  This is an extremely long long             long caption not well aligned.......2 Figure 1.2  This is a normal caption............3   I realized that the problem actually comes due to the fact that I am adding before each Figure number the word "Figure". If I remove this command,  \renewcommand{\cftfigfont}{Figure } % Add the word Figure in LOF   then everything is OK in the LOF.  How can I both have it correctly aligned and using the word "Figure"? I would appreciate any help.   Thank you a lot! George  Here the entire code I am using, where you can see the problem in the last page (LOF).  \documentclass[ fontsize=12pt, listof=totoc, bibliography=totoc, paper=a4 ]{book}  %%%%%%%%%%%%%%%%%%%%%%%%% GRAPHICS PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{graphicx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \usepackage{textcomp}     \usepackage{lmodern}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   \usepackage[titles]{tocloft}        % Package for nices LOF and LOT \renewcommand{\cftfigfont}{Figure } % Add the word Figure in LOF %\renewcommand{\cfttabfont}{Table }  % Add the word Table in LOT \setcounter{chapter}{1} %%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \frontmatter \pagestyle{empty} \renewcommand\contentsname{Table of Contents} \tableofcontents \mainmatter  \stepcounter{chapter}       % increase chapter counter \chapter*{Chapter 1 - chapter title} \addcontentsline{toc}{chapter}{1 Custom chapter title}    % introduce chapter in the TOC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Section 1} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Loooooooooong long long long long long long long long long subsection} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla  %%%%%%%%%%%%%%%%%%%%%%%%%%% Figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{figure}[ht]   \begin{center} %\includegraphics[width=155mm,clip]{test.eps}         \end{center}     \caption[Short caption but toooo loooooooong for the LOF, which does not align it on the left] {\bfseries Part of caption. \textnormal{\textsl{Rest of caption}}}  \label{fig:fig} \end{figure}  \backmatter \listoffigures \end{document}

I am using the tocloft package so that the word Table shows up before the number in the list of tables.  When I do this, the tables with long captions wrap to the next line but are not aligned.  This is the code that I am using.   \documentclass [12pt] {article} \usepackage{times, url} \usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry} \usepackage{float} \usepackage{booktabs,threeparttable} \usepackage[subfigure]{tocloft} \usepackage{subfigure} \usepackage[justification=centering]{caption}  \renewcommand{\cfttabfont}{Table }   \begin{document}   \listoftables    \begin{table}[htbp] \begin{threeparttable} \captionsetup{font=normalsize} \caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.} \centering \footnotesize \label{table:sumstatsfull} \begin{tabular}{lcccc} \hline Variable & Mean & Std. Dev. & Min & Max \\ \hline \end{tabular} \end{threeparttable} \end{table}  \end{document} `  I want the Table to precede the table number but I want the caption to be aligned like it is when the code below is used  ` \documentclass [12pt] {article} \usepackage{times, url} \usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry} \usepackage{float} \usepackage{booktabs,threeparttable} \usepackage[subfigure]{tocloft} \usepackage{subfigure} \usepackage[justification=centering]{caption}  %\renewcommand{\cfttabfont}{Table }   \begin{document}   \listoftables    \begin{table}[htbp] \begin{threeparttable} \captionsetup{font=normalsize} \caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.} \centering \footnotesize \label{table:sumstatsfull} \begin{tabular}{lcccc} \hline Variable & Mean & Std. Dev. & Min & Max \\ \hline \end{tabular} \end{threeparttable} \end{table}  \end{document}


I logged in with the same Gmail account that I use to log into all my other Stack Overflow accounts and it didn't auto-populate the name. Nor is it showing up here:    Seems like it ought to?

On most Stack Exchange sites, when I visit them I am already logged in if I have logged in before. Why isn't it the case with ?


So for a while now I've been wondering how to put a gap between two objects like in the example given. , , between the wings and shield, there is an even gap. Is there a short cut or do I have to go in and move each point individually? its a bit frustrating

This is an odd request and something I've never had to worry about in Illustrator until now. I'm building out a logo that will be printed on a shirt. Instead of having a solid black border around the vector hand, the client wants the black border to be "transparent" so when it is placed on top of a pattern, you see the pattern background. I have an example below of what I'm trying to accomplish.      The second photo I mocked up in Photoshop to show what I'm trying to do. It's very easy to select the border path in Photoshop and simply wipe it out. Does Illustrator have a "transparent" fill option in the Path area? Selecting a color and dropping the transparent percentage didn't do the trick.


I read, long ago, a book, whose title I can't remember but I think the author was Carl Sagan. In the book was saying that gravity follows the inverse square law because of our Universe was 3 dimensions of space. (I'm obviously not taking into account string theory which states that are extra dimensions). By this logic, if the Universe had 4 spatial dimensions the law would be 1/r^3 and if there were 5 dimensions, it would be 1/r^4.  So my question is: is this true? And if it is, could you elaborate and state exactly how do we know this is true? I think this might be related to GR theory, but I'm not very sure. Thank you in advance.

Newton's famous Inverse Square Law says that in $n=3$ dimension of space, force is inversely proportional to the square of the distance between a source and a target.  I , this can be generalized as thus:  $$F\propto1/r^{n-1}$$  Where $n$ is the dimension of the space.   Why is this so? Is there a rigorous derivation of this from a deep fundamental theory? Or is there a heuristic argument why this is so?


I have a folder called CSV, in it there are several CSV files with coordinates and attributes.   I want to convert all files in a CSV folder into shapefiles New created shapefiles should have original CSV file name All newly created shapefiles should be placed in another folder called SHP. Once all shapefiles created, merge all shapefiles into one (could go over a GB)   For this, I tried to play around with ogr2ogr, had a bit of success but could’t go further.  For example, one web page shows to create (1) Create a dbf file (2) Create a vrt file (3) Create the shapefile by using ogr2ogr.  I can recreate what it says but I can’t workout how to point a folder i.e. CSV and convert all files in that into shapefiles.  Once I could accomplish above then, I would like a simple ogr2oge like command to merge all shapefiles into one shapefile.  Another point: Is there any way to use just text.bat file for above processes instead of OSGeo4W shell?

I have a directory with several shapefiles.   How can convert all these shapefiles to MapInfo with ogr2ogr?  I know how I can convert one file.  And I can make a batch script writing a line for each file.  But isn't there an easier way to convert all the files in a directory (and subdirectory).


this is my first post so I apologize if the formatting is a little rocky.  I'm currently going through "Probability and Statistics" 4th ed by DeGroot/Schervish, and I was wondering if somebody could help me out on two related problems (7.5.10, 7.6.1).  The first question is as follows: Suppose that $ X_1, \dots, X_n $ form a random sample from a distribution for which the p.d.f. $ f(x|\theta) $ is as follows: $$ f(x|\theta) = \frac{1}{2} e^{-|x-\theta|} \text{ for } -\infty < x < \infty $$ Also, suppose that the value of $ \theta $ is unknown, for $ -\infty < \theta < \infty $. We will find the M.L.E. of $ \theta $.  The likelihood function is given by $$ f_n(\mathbf{x}|\theta) = \frac{1}{2^n} e^{-\sum_{i=1}^n |x_i - \theta|}$$ and will be maximized when $ \sum_{i=1}^n |x_i - \theta| $ is minimized. By choosing $ \theta $ to be a median value of $ x_1, \dots, x_n $, we accomplish the minimization task.  More specifically, note that the likelihood function has log \begin{align*} \log f(\mathbf{x}|\theta) &= -n \log 2 - \sum_{i=1}^n |x_i - \theta| \\ &= n \left ( - \log 2 - \frac{1}{n} \sum_{i=1}^n |x_i - \theta| \right ) \end{align*} Now, we see that the M.L.E. will minimize the sum in the log likelihood shown above. We can also see that $ \frac{1}{n} \sum_{i=1}^n |x_i - \theta| = E(|X-\theta|)$ for $ X $ having a discrete distribution assigning probability $ \frac{1}{n} $ to each of $ x_1, \dots, x_n $, and 0 everywhere else. So now we can see that, by choosing $ \hat{\theta} $ to be a median of $ x_1, \dots, x_n $, then the log likelihood will be minimized. This follows from the fact that the median of a distribution minimizes the mean absolute error.  The second question is to find the MLE of $e^{-\frac{1}{\theta}}$, which by the invariance property of MLEs, should just be $e^{-\frac{1}{\hat{\theta}}}$.  My problem is that the answer in the back of the book (for the second question) is given as $\left ( \prod_{i=1}^n x_i \right)^{\frac{1}{n}}$, and I'm having trouble reconciling that with my answer. You'd think it'd be pretty straightforward, but...  Any help would be appreciated!

Find the MLE of the unknown parameter $\theta$ when $X_1,X_2,...,X_n$ is a sample from the distribution whose density function is: $$f_X(x) = \frac12e^{-|x-\theta|}, -\infty<x<\infty$$ What I did so far: $$\text{maximize }(\frac12)^ne^{-|x_1-\theta|-|x_2-\theta|-...-|x_n-\theta|} \\ \text{thus we want to minimize }|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|$$ Since $|x_i-\theta|$ is positive for all $i$, we want to solve for $\theta$ so: $$|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|=0$$ What do I do from here?


I'm trying to make sense of this free -m output:               total       used       free     shared    buffers     cached Mem:          7971       7608        363          1         17       4703 -/+ buffers/cache:       2887       5084 Swap:          975        967          8   So swap is used even though only 3GB out of 8GB RAM is actually used by processes? Why does this happen, shouldn't the OS use less memory for fs cache instead of using swap?  OS is Ubuntu 14.04.3 LTS with default settings.

Using swap space instead of RAM can drastically slow down a PC.  So why, when I have more than enough RAM available, does my Linux system (Arch) use the swap?  Checkout my conky output below:    Also, could this be the cause of speed and system-responsiveness issues I'm having?  Output of free -m :  $ free -m              total       used       free     shared    buffers     cached Mem:          1257       1004        252          0         51        778 -/+ buffers/cache:        174       1082 Swap:          502        144        357


I have a text in the following format:  Concept number 1: my content here1
 Concept number 2: my content here2
 Concept number 3: my content here3
   I want a regext to get the text after Concept number 1:. So I want to get the following: my content here1.  I was using Concept number 1(.*?)
, but I'm getting the whole string as a result instead of the text after the colon.  .  var text = $('.text').html(); var regex = new RegExp('Concept number 1:(.*?)
', "g"); var matches = text.match(regex); //matches contains `Concept number 1: my content here1<br>`

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I've gone through the arrow icon, camera icon and eye icon and all are active. The mug I made for the the Andrew Price tutorial does not show up in a final render. I have also hit alt H to unhide. Any other ideas lads?

This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?


Wikipedia defines p-values as      (The probability of obtaining a test statistic) equal to or more extreme than what was actually observed   For starters, usage of extreme there is subjective. To make matters more concrete,      $Pr ( X ≥ x | H )$ for right tail event   $Pr ( X ≤ x | H )$ for left tail event   $2 min \{ Pr ( X ≤ x | H ) , Pr ( X ≥ x | H ) \} $ for double tail event.   This diagram explains it for a right tailed event:   Now these definitions work well for normal distribution, t distribution, F distribution, and chi-square distributions.  But consider a bimodal distribution.        ⏜       ⏜    /   \    /   \   /     \_/     |\  /              | \                 x   For the observation x, won't we also have to consider the middle region  as "extreme values" since their probability is low? So our extreme region will look something like the shaded region in:       ⏜       ⏜    /   \    /   \   /|    |\_/|   |\  /.|    |...|   |.\                 x   In this case we can't just consider tailed events. What exactly is the definition of "extreme values" then?

P-value is defined the probability of obtaining a test-statistic at least as extreme as what is observed, assuming null-hypothesis is true. In other words,  $$P( X \ge t | H_0 )$$ But what if the test-statistic is bimodal in distribution? does p-value mean anything in this context? For example, I am going to simulate some bimodal data in R:    set.seed(0) # Generate bi-modal distribution bimodal <- c(rnorm(n=100,mean=25,sd=3),rnorm(n=100,mean=100,sd=5))  hist(bimodal, breaks=100)     And let's assume we observe a test statistic value of 60. And here we know from the picture this value is very unlikely. So ideally, I would want a statistic procedure that I use(say, p-value) to reveal this. But if we compute for the p-value as defined, we get a pretty high-p value  observed <- 60  # Get P-value sum(bimodal[bimodal >= 60])/sum(bimodal) [1] 0.7991993   If I did not know the distribution, I would conclude that what I observed is simply by random chance. But we know this is not true.   I guess the question I have is: Why, when computing p-value, do we compute the probability for the values "at least as extreme as" the observed?  And if I encounter a situation like the one I simulated above, what is the alternative solution?


I have two classes Node and Wire. I am getting an error for the line vector<Wire*> inputs;  Node.h  #ifndef NODE_H_ #define NODE_H_ #include "wire.h"  class Node{ private:     bool sorted;                     TGate gateType;                  string name;                     vector<Wire*> inputs;            vector<Wire*> outputs;           int state;       } #endif /* NODE_H_ */   Wire.h  #ifndef WIRE_H_ #define WIRE_H_ #include "Node.h" class Node;  class Wire{ private:     Node* input;     Node* output;  public:     Wire(Node* a, Node* b);     //void setInput(Node* in);     //void setOutput(Node* out);     Node* getInput();     Node* getOutput();  }; #endif /* WIRE_H_ */   wire.cpp  #include "wire.h" #include"node.h"  class Node;  Wire::Wire(Node* a, Node* b) {  }   node.cpp  Node::Node(TGate gT, string name) {     std::cout<<"\nNode created is: "<<name<<"\n"; }   ERROR: /src/node.h:29:9: error: ‘Wire’ was not declared in this scope

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I am looking for new DB server. I'd like to know your opinions and recommendations.  Current server spec:   We use DB server for website with 100-200 req per sec(i plan growth up to 200-250) Today we have 1000 - 2000 rps for DB from php (growth to 3-4k) DB size - 63 Gb (growth up to 100Gb)  Storage: 4 HDD x 2Gb, RAID 1 for DB data RAM: 32 Gb CPU: Intel Quad-Core Xeon E3-1270 (4 cores, 3400Mhz) Software MySQL 5.5 over Centos 6.4   What i want: I need server for next year, i wait for loading growth about 20-50%. I am going to add memory up to 64Gb, however i am not sure about storage and CPU. What do think about moving to SSD and more powerfull CPU?  This is server CPU loading graph   I will appreciate your opinions and recomendations.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I read this story about 10 years ago or so, but it was in a collection of SF stories that could have been much older. It was a rather longish novelette, or shortish novella, certainly not a novel and too long to be technically a “short-story”.   There have been several deadly epidemics of new viruses that appeared out of the blue one after the other; and  teams of researchers find cures, or vaccines, for one after the other, but not before each of them has killed many people. One very brilliant, but very cynical researcher of one of those teams works mostly for his own career, his own glory, not out of kindness for suffering people.   At some point in the book he gets a Nobel Peace Prize, not the Nobel Prize in Physiology or Medicine, which he finds paradoxical, considering his cynicism. I am not sure if the Nobel Prize comes before or after what I am describing below.   But probably it happens before, because he becomes a big shot, in charge of a huge program of research on viruses. He decides to investigate all existing viruses, breaking the task between many teams of course, but keeping for his own team blood-transmitted viruses.   He has noticed that after all these different waves of deadly epidemics, more and more people became blood donors, and in general became more and more generous. And he discovers that this generosity is in fact the effect of a virus, essentially harmless but that “found out” (through darwinism - there is no notion of actual “thinking” nor “will” attributed to a virus, just survival of the fittest) that by promoting “altruism” by affecting the brain of the infected people, it can propagate very fast through blood donation followed by transfusion and in this way infect most of mankind.

This brief story is a future chronicle that looks back at the previous few decades. After the first Martian samples were sent back to the Earth, one plague after another decimated the population. HIV was nothing compared to these afflictions, which ruined lives and devastated society. By the end of the narrative, the last epidemic had been placed under control, sort of, and it was hoped that 15 percent of the surviving women could still bear children.   The story was in English and I think I read it sometime in the 90s or later. Clearly, it could not have been written before the nature of HIV become evident. I don't remember whether I read it in a magazine or in an anthology, though an anthology is more likely.


I haven't been able to find my favorite questions in the official Stack Exchange Android app.  Looking at my accounts page gives nothing on them.

I know there is a way to  from the app, but I cannot find a practical way to  follow the activity on the questions I favorited.  The only way I found was to type infavorites:mine into the search box and sort by active. But there is no way to bookmark a search, and repeatedly typing this search command on a small screen is no fun.   I understand not all desktop site features can be built into the app. But following the activity on my favorite questions is precisely the sort of things I'm likely to do from a mobile device.


Is it true that $\forall x,y,n\in \mathbb{Z}$, if $\gcd(x,y)=1$ then $\gcd(x^n, y)=1$? If not, is there a counterexample?

I am using the Euclidean Algorithm (EA) for proof. Let $a>b$ and by EA we have  $$ \begin{align} a=q_0 b+r_1 & & &  \text{where }0\leq r_{1}<b \\ b=q_1 r_1+r_2 & & & \text{where }0\leq r_2<r_1 \\ \vdots & & & \vdots \\ r_{n}=q_{n+1}r_{n+1}+r_{n+2} & & & \text{where } 0\leq r_{n+1}<r_{n+2} \\ r_{n+1}=q_{n+2}r_{n+2} \end{align} $$  where $ r_{n+2}=1$ beacuse the $\gcd(a,b)=1$. Now for $a^2$ we have  $$\hspace{30pt} a^2=q_{0}^\prime b + r_{1}^\prime\hspace{70pt}\text{where }0\leq r_{1}^\prime<b$$  Here I stuck and don't know to continue the prove because the value of $r_{1}$ is not necessarily to be equal to $r_{1}^\prime$


import ddf.minim.*; AudioPlayer player; Minim minim;  Table t1= new Table(300, 300); float power=0; float dx=0; float dy=0;  void setup() {   size(1000, 600);   frameRate(20);   minim= new Minim(this);   player=minim.loadFile("ballsound.mp3"); }  void draw() {   strokeWeight(1);   stroke(0, 0, 0);    strokeWeight(10);   stroke(255, 0, 0);   fill(26, 218, 35);   rect(0, 0, 1000, 600);   noStroke();   fill(0);   ellipse(0, 0, 80, 80);   ellipse(1000, 0, 80, 80);   ellipse(0, 600, 80, 80);   ellipse(1000, 600, 80, 80);   strokeWeight(1);   stroke(0, 0, 0);   fill(255);   ellipse(t1.cue_ball.center.x, t1.cue_ball.center.y, 20, 20);    t1.cue_ball.center.x+=dx;   t1.cue_ball.center.y+=dy;    dx=friction(dx);   dy=friction(dy);     stroke(40);    strokeWeight(4);   line ( mouseX , mouseY , mouseX + cos (atan2 ( mouseY -t1.cue_ball.center.y , mouseX - t1.cue_ball.center.x) )*300 , mouseY +  sin( atan2 ( mouseY - t1.cue_ball.center.y , mouseX -t1.cue_ball.center.x ))*300);    if (mousePressed)   {     power+=4;    }    if (t1.cue_ball.center.x+20 > 1000 || t1.cue_ball.center.x-20 < 0 )   {      dx*=-1;     player.rewind();     player.play();   }   if (t1.cue_ball.center.y+20 > 600 || t1.cue_ball.center.y-20 < 0)   {     dy*=-1;     player.rewind();     player.play();   }    if( (t1.cue_ball.center.x < 40  && (t1.cue_ball.center.y < 40 ||t1.cue_ball.center.y > 560 ) )  ||  ( t1.cue_ball.center.x > 980 && ( t1.cue_ball.center.y > 580 || t1.cue_ball.center.y < 40)))   {     dx=0;     dy=0;     fill(255);     textSize(25);     text("GAME OVER" ,500,300);     player.pause();   }   if (t1.cue_ball.center.x +20 == 1000)  {    t1.cue_ball.center.x=979;  }  if (t1.cue_ball.center.x -20 == 0)  {     t1.cue_ball.center.x =21;   }  if(t1.cue_ball.center.y -20 == 0)  {    t1.cue_ball.center.y  =21;  }       }    void mouseReleased() {   dx=t1.cue_ball.center.x-mouseX;   dy=t1.cue_ball.center.y-mouseY;   float n= sqrt(pow(dx,2)+pow(dy,2));    dx*=power/n;   dy*=power/n; }  float friction (float c) {   c*=0.9;   return c; }  class Ball  {   float rad;   Point center;   Point contact_point;   color col;    Ball ( float a, float b)   {     center = new Point (a+=dx, b+=dy);   } }   class Table {   Ball [] b_arr;       Stick st;   Ball cue_ball;    Table ( float a, float b )   {      cue_ball= new Ball( a, b);   } }  class Point {   float x;   float y;    Point(float a, float b)   {     x=a;     y=b;   } }  class Stick {   Point start_p;   Point end_p;   color col;   int length; }   Since the stick was added it has stopped being able to bounce off the walls and I can't understand why.  It was working before it was added, and then it just stopped and when it gets close it gives NullPointerException.  I don't see how to stick would change anything though.

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


I wrote the code:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{biblatex} \addbibresource{bibliografia.bib}  \title{\textbf{Template}} \date{\vspace{-10ex}}  \begin{document}  \maketitle  Ciao\cite{sun2016multi}  \printbibliography  \end{document}   and the file bibliografia.bib:  @article{sun2016multi,   title={A multi-technique reconfigurable electrochemical biosensor: enabling personal health monitoring in mobile devices},   author={Sun, Alexander and Venkatesh, AG and Hall, Drew A},   journal={IEEE transactions on biomedical circuits and systems},   volume={10},   number={5},   pages={945--954},   year={2016},   publisher={IEEE} }   It works in ShareLatex, but not works in Texmaker. How can I fix it?  Before compiling file.tex, I clicked on strumenti->biblatex.    Texmaker shows me the following error message:  Process started This is BibTeX, Version 0.99d (MiKTeX 2.9.6350 64-bit) The top-level auxiliary file: Es bibliografia.aux I found no \citation commands---while reading file Es bibliografia.aux I found no \bibdata command---while reading file Es bibliografia.aux I found no \bibstyle command---while reading file Es bibliografia.aux (There were 3 error messages)  Process exited with error(s)   Thank you for your time.

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


I'm trying to create a bin folder accessible to a virutalhost beneath the document root.  I currently access the folder through mysite.local/bin, but need the files to be beneath public access.   httpd.conf  Alias /bin/ "C:/wamp/www/bin/"  <Directory "bin">   AllowOverride None   Options None   Order allow,deny   Allow from all </Directory>   vhost.conf  <VirtualHost *:80>   ServerName   mysite.local   DocumentRoot "c:/wamp/www/mysite.com/html" </VirtualHost>   Theoretically the file tree should read  /mysite.com     /html <-- where mysite.com reads from     /bin     /other private folders   That way the file in url: mysite.com actual path: mysite.com/html/index.php could read something like this:  <?php include "../bin/privatefile.php"; ?>

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


I want to start some applications when I turn on my computer.  For example, open Sublime in workspace 1 and Chrome in workspace 2 and so on.  I know how to use startup applications in Ubuntu but I have no idea about open them in different workspaces.

Is it possible to set start-up applications to initialize in certain workspaces? I'd like to not have to manually distribute my start-up applications across my numerous workspaces every time I boot up my machine. I'm running Ubuntu 12.04 .  Any Help ?


I'm the maintainer for .  Markup authors can specify the language for source code, but not markdown authors. Are the SO admins interested in a way of doing this?  If so, might the following work   If the first line is "#!" followed by one or more word characters, then make the first line invisible (using CSS hidden:visible) and use those word characters as the file extension. Otherwise, use the current scheme.   So  #!css tag.class#id { color: red }   would be recognized as CSS.  In markdown, should any indicator of line numbers survive copy-paste in markdown?  Does any scheme like this need to do work to handle quoting of responses in markdown?  Is it common for inline responders to split code sections?  Do users also want to number lines (  ), so that others can respond with reference to particular lines?

Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting?  Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than helpful; for example:       to pick the two I've been looking at recently.


The following is the residuals vs predicted scatter plot for a regression model with two IVs.   Initially, I thought it was evidence of heteroskedasticity. But, I reasoned that although there is a visible pattern in the plot, the variance across different levels of predicted values is same.  To clear my doubts, I saved the standardized residual and predicted values and ran a bi-variate correlation test. The correlation is zero, as expected. I am, nevertheless, intrigued by this observation. Any idea why I might have obtained this pattern?  PS:- My dependent variable is a sum of two likert-type items (Response scale: 1-5). So, it's theoretical range is 2-10 and it has no absolute zero value.


I am developing a new block cipher primitive. I would like to test its robustness against attacks of linear and differential cryptanalysis. Is there a tool to evaluate this using only plaintext and ciphertext?

I (and many others for that matter) have always been fascinated by the inner workings of the modern building block of cryptography: block ciphers.  Now, the ressources on the "black art" of design and analysis of these ciphers are sparse; especially for the entry level. Available information like  seems to be somewhat outdated (due to its age).  What's the general consensus of the “best” (read: recommended) strategy to start designing and/or analyzing modern cryptographical block ciphers?    Nota bene: Think of this as a general, wiki-alike question – for learning purposes only. (Besides that, this Q&A would represent a place we can point people to when alike algorithm design questions arise.)


How acceptable are self-citations? I noticed that my advisor cites his own work quite much, even when the cited articles are not directly related, e.g. type of analysed data is different. Actually, I did not notice this myself - it was pointed out by a reviewer (I authored my first paper with him just now). Looking at his citation records, I found out that he has papers with about 15 citations, of which about ~10 are typically from himself. Our field existed before my grandmother was born, so I'm a little alerted.. This puts the offer to do a PhD with himself to a new light.

As we know, citation counts are important to judge one's research activity. Is it good to cite one's previous works? Will it be viewed as an act of advertisement or self-promotion?


Why is the argument not applicable in proving rational numbers are uncountable?  The way I see it is-  Every rational number has a repeating decimal expansion. Now, let us say the number described in Cantor's argument repeats after 'n' digits. Any number in the list that doesn't have one of the first 'n' digits common with this number will not be the same as this number. But now, the Cantor argument breaks down for the (n+1)th place as this number cannot be different from any other rational number with the first n digits being common. So, as long as this number is not present in the list, the Cantor number will not be in the list. But if we map one of the natural numbers to a number with the first n digits common, then this cantor number will be in the list too, by nature of it being rational. Hence, we cannot use this to prove the rational numbers are uncountable. As it turns out, they are countable anyway.  Is this correct?

Firstly I'm not saying that I don't believe in Cantor's diagonalization arguments, I know that there is a deficiency in my knowledge so I'm asking this question to patch those gaps in my understanding.   From my understanding of Cantor's Diagonalization argument, if you apply diagonalization to a mapping from one set of numbers to another, you will always obtain a number that is not in the mapping. So this works to prove that the reals aren't countable because if you have a mapping from the naturals to the reals then you can use diagonalization to obtain a number that's not in the mapping, and this number is a real obviously, so the mapping isn't a surjection. We're not allowed to assume that the mapping from the naturals to the reals is a bijection to begin with.   But when people explain why the diagonalization process doesn't produce a rational from a mapping from naturals to rationals we are allowed to assume that the mapping is a bijection to begin with? In the questions asked here:    The answers says:      To be precise, the procedure does not let you guarantee that the   number you obtain has a periodic decimal expansion (that is, that it   is a rational number), and so you are unable to show that the   "diagonal number" is a rational that was not in the original list. In   fact, if your original list is given explicitly by some bijection,   then one is able to show just as explicitly that the number you obtain   is not a rational.   Why are we allowed to assume that the original list is a bijection? Is there some way to prove that the mapping from the naturals to the rationals is a bijection that is not susceptible to diagonalization? If we can assume that the mapping from naturals to rationals is an undiagonalizable bijection why can't we do the same for the mapping from naturals to reals?


In Finder to go to a specific location I can do Cmd-Shift-G  But what if I want to save to a specific location? That is, I don't want to click through a folder hierarchy in the save dialogue box.  For example I would like to save the current file to ~/.ssh    The Where drop down allows you to select a location, but I want to be able to enter the location using the keyboard.

After hitting ⌘-O, how can I navigate my folders and select a file to open using only my keyboard?   In particular, how can I get the focus into the folder list? (From there I can use arrows or start typing the first letters of the desired file/folder.)  In some programs I can rely on hitting TAB 5 times, but this isn't reliable and I figure there must be a better way.


A QGIS question:  How can I insert commas in 4 digit numbers in an attribute table that has multiple records, with some numbers that are only in the hundreds? It's for an animation so multiple labels are being displayed.    I tried using the format_number option under the string menu in field calculator, but it only works when I enter a specific number in the expression dialogue, so i imagine taht this tool only works for attribute tables with one record.  I don't know much about coding so hopefully there's an option that doesn't need that, or a simple way to describe how to do the coding.  I don;t think this is the same as the topic "Forcing decimal numbers to use comma in ArcGIS Field Calculator? " because i still want to keep the decimal places.

Can I add the comma "," to force the decimals to remove from the attribute and replace with the number?   For example, I have an Acres field column that says 506320.0750 and I want to replace the decimal with the comma, say 506,320? I want that number to be permanment.   Is that possible? I'm using ArcGIS Desktop 9.3.1


I have started playing a new character and the clicking is very intense. I have been thinking that maybe using WASD for movement would make it much easier, instead of having to click to move, click on target, etc.  Is there a way to use WASD in Diablo 3 for movement?

Diablo games tend to be very click heavy - click to move, click to attack, click to loot.  Diablo 3 appears to be continuing this tradition.  I find this problematic for a couple of reasons:   Clicking is overloaded - I might move when I want to attack, for instance. Clicking hurts - I have a RSI that means that trying to play a click-heavy game for more than a short while causes pain.   Is there any way I can do less clicking in this game?  Can I move using WASD, for example?  If not, what other things can I do to reduce the number of clicks it takes to play?  What settings or other strategies can I employ to reduce my dependence on clicking?


Right now I am running OS X 10.6.8 (Snow Leopard) on my MacBook Pro, with Windows 7 via Boot Camp, and I also have a third FAT32 partition where I share data between Mac/Windows.   I am going to upgrade to Mavericks. I Googled and it seems Mavericks is not going to be happy with letting me create the third FAT32 partition.  Did anyone create a third partition with Mavericks before? What are the steps?  (I have backed up all my data from both OS X and Windows, and I am going to format whole hard disk, and fresh install snow leopard, then update to Mavericks).

I would like to setup my Macbook Air's disk drive with 3 partitions - 50Gb for OSX Lion, 50Gb for Windows 7, and the remaining 150Gb for Data to share between both OSes (music, photos etc).  What's the correct way to do this?


I don't know where is the right place to ask for some free source of ready traffic camera video to download. I need these videos to test some object recognition prototype.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I get the new version of photoshop CC 2015.  Now when I past a vector from illustrator directly on photoshop they create me a smart object but they are no anti-aliasing at all.  May someone help me? Thanks

I am using Adobe CC(2015) latest version and the behaviour of the smart objects isn't normal. When I paste a vector from Illustrator to Photoshop, the vector looks low quality or rough.   ORIGINAL  IN PHOTOSHOP   However, if I click over the smart object layer(in Photoshop)and this is opened in Illustrator, the vectors looks as the original one.   VECTOR OPENED IN ILLUSTRATOR FROM PHOTOSHOP SMART OBJECT   How can I solve this?


As suggested by similar topics on this site, I followed the procedure to write the x labels in decimal form. However, they continue to appear in scientific form. These are decimal numbers of the order of 10 ^ -3: perhaps it is a pgfplots limit?  \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amsmath,amssymb,amsfonts,systeme,mathtools}  \usepackage{chemfig} \usepackage[version=3]{mhchem} \usepackage{pgfplots}  \begin{document}  \begin{figure} \centering \begin{tikzpicture}   \begin{axis}[   legend pos=outer north east,   legend cell align={left},   grid, grid style=dashed,   ymin=1.50,ymax=2.75,   ytick={1.50,1.60,1.70,1.80,1.90,2.00,2.10,2.20,2.30,2.40,2.50,2.60},   xtick={0.0030,0.0031,0.0032,0.0033,0.0034},    xmax=0.0035,xmin=0.0030,   axis lines = middle,   set layers,                   % <---     x tick label style={         /pgf/number format/.cd,             fixed relative,             precision=5,         /tikz/.cd,         rotate=90     }   ]   \addplot[color=orange,mark=*,mark options={solid,draw=orange,fill=orange},smooth]     coordinates {     (0.00341,2.67)(0.00335,2.44)(0.00330,2.24)(0.00324,2.06)(0.00319,1.88)(0.00314,1.72)(0.00309,1.56)     };     \addlegendentry{$x_1 = 0.3$};   \end{axis} \end{tikzpicture} \end{figure}  \end{document}

A chart with data in the range of 200,000 and small difference between max and min values, will be assigned a 10^5 multiplier to the entire axis. This results in the ticks becoming meaningless, since all become 2.   Example:-  \begin{tikzpicture} \begin{axis}   \addplot coordinates {   (100,200001)   (200,200003)   (300,200005)   };     \end{axis} \end{tikzpicture}   When this is plotted the y-axis has 5 ticks, all of which are 2. The y-axis has a multiplier of 10^5. This has effectively removed all information from the graph.  I may use the below to set the explicit value of the tick values but this does not implement change in the display "style" of the axis ticks.  ytick = {200000, 200005, 200010}   I have also tried increasing the precision of the tick label to 5. However this only results in the graph showing labels such as 2.00000, 2.00005, 2.00010 with a 10^5 axis multiplier.  yticklabel style={precision = 5,}   My question is "How do I remove/change this 10^5 multiplier, such that the y-axis ticks are displayed in the form 200000, 200005, 200010.


Note: This question about demultiplexers is similar to but not identical to  which is about multiplexers. I want to build a fully parameterisable demultiplexer in SystemVerilog. So far, I know how to build demultiplexers of variable widths like this: module scale_mux #(parameter WIDTH = 1) (   input logic sel_a,         logic [WIDTH-1:0] in,   output logic [WIDTH-1:0] out_a, out_b);    always_comb     unique case (sel_a)       1'b1 : out_a = in;       1'b0 : out_b = in;     default: out = 1'bx;     endcase  endmodule   I also know how to extend this for 1:4 and 1:8 demultiplexers. But the number of case statements for large demultiplexers will be a lot. I'd like to build a demultiplexer in which the number of inputs is variable. I'm not sure how I can extend the case statement for the n input case, do you have any ideas?

Note: This question about multiplexers is similar to but not identical to  which is about demultiplexers. I want to build a fully parameterisable multiplexer in SystemVerilog. So far, I know how to build multiplexers of variable widths like this: module scale_mux #(parameter WIDTH = 1) (   input logic sel_a,         logic [WIDTH-1:0] in_a,                     in_b,   output logic [WIDTH-1:0] out);    always_comb     unique case (sel_a)       1'b1 : out = in_a;       1'b0 : out = in_b;     default: out = 1'bx;     endcase  endmodule  I also know how to extend this for 4:1 and 8:1 multiplexers. But the number of case statements for large multiplexers will be a lot. I'd like to build a multiplexer in which the number of inputs is variable. I'm not sure how I can extend this case statement for the n input case, do you have any ideas?


I have an adware my PC and I need change my all browser shortcuts URL to google. I try manually remove but adware soft set URL again. I need batch file this operation or vbs script or C# code?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have recently downloaded truecrypt from www.truecrypt.org and got a .tar.gz file. I am completely new to ubuntu and dont know how to install it.Please help and give extra details.

I have a Windows 7 machine with Truecrypt. I installed Ubuntu 12.04 with the intention of converting to an Ubuntu only machine but I can't install Truecrypt on Ubuntu.   I have been looking through the forums and have followed all advice to the letter and still Truecrypt doesn't work; I have only a non-functional icon in "dash". Should I uninstall Ubuntu and start over (ie reinstall)? I love Ubuntu and greatly appreciate your efforts on this forum.


Having this:  #include <stdio.h> #include <stdlib.h> #include <string.h>  int main (void) {     char *str = "foo\n"; //if 'char str[] = "foo\n";' no problem    char *c = strchr(str, '\n');    *c='\0'; //causes "command terminated"    // *(c+0)='c'    does not help     return 0; }   I have no idea, why program crash, when I got c pointer from strchr and then dereference it in assignment.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


When I use p=10000 ,r=15 and n=60 in the below ...  var x = parseFloat((Math.round(r/12/100*p/(1-Math.pow(1+ +(r/12/100),-n))*100)/100).toFixed(2));   x = 237.9 instead of 237.90.  If the combo of p, r and n result in a number that is not $xx.x", then the code snippet works fine ...ie. formats to 2 decimal places.  But why is it displaying 237.9 instead of 237.90?

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


The question of down voting questions is always a debatable topic. The purpose of the down-vote is unclear. The reasons for most of the down-votes is even less clear. Obviously if the intent is to improve the content there should be no problem with disclosing the reason behind a persons down vote. Yet most down votes are made by ghosts. They vanish into the night without a trace.  It would be easy to track the amount positive and negative votes a person casts, so does it not make sense that there should be some kind of penalty for those people that abuse their voting privilege. There are people that put effort into writing and asking questions and it takes almost no effort hit a down-vote and discredit the writer. A down-vote with an explanation is constructive criticism and improves the quality of the website. A down-vote with no explanation serves little purpose and is just criticism.   I think if down voters had to explain their reasoning behind their down votes and they were as accountable as the person who asks the question, there would be a lot less negative votes.   What should the penalty be for abusers of the down vote system?  When I asked this question it was because I had asked simple questions. About what I have no idea now. It was met with negativity. Today I found out that I was on the wrong Meta. I should have been on the Meta Stack Overflow. Had the question been asked on the Meta Stack Overflow there most likely would not have been a problem.  I no longer care what happens on the Meta Stack Exchange and would be very happy if I could delete all of my input and just stay with Stack Overflow. Unfortunately for me this not allowed.

Note: If you're looking for a simple explanation as to why comments aren't required on downvotes, see .   I used to get "upset" (though that is too strong a term) when I got downvoted without comment. If my answer isn't good enough then I'd like to know why. Not only does it improve the answer for the OP but it improves my knowledge too.  Where the down-vote has been explained I've found it useful & it has improved my answer, or forced me to delete the answer if it was totally wrong.  So is there any way we can encourage people to leave a comment? Perhaps they don't lose rep if they explain their down-vote?  I must admit though that I haven't always explained my down-vote either so you could call me a hypocrite. I've also grown a thicker skin over the months of using SO (it seems to have come with the higher rep score ;-)), so I'm less bothered about this now.


Will there be a difference in the weight of just the ball under water Vs in normal atmospheric pressure conditions i.e. a weighing scale with the steel ball on it Vs in vacuum assuming earth's gravity is same in all three cases

I've just been discussing this question with my eldest son, who is an extremely intelligent man, as well as being an engineer, a sailor and a scuba-diver, and he believes that an object heavier than water, such as his anchor, or his diving weights actually becomes less heavy when submerged in water. I described a scenario, whereby a solid steel, or lead weight was suspended from a spring balance and slowly lowered into a body of water, the weight reading on the spring balance would not change. He insisted that it would... I think it would not, because an object that is denser than water would not posess any buoyancy once submerged, therefore the density and weight would remain unchanged. Any comments anyone??? There's a £5 bet riding on this :)


The question asks to find $ \chi^{2*} $ that cuts off 5% of the tail with df=52. the chart given lists df=50 then jumps to 60

Often people use programs to obtain p-values, but sometimes - for whatever reason - it may be necessary to obtain a critical value from a set of tables.   Given a statistical table with a limited number of significance levels, and a limited number of degrees of freedom, how do I obtain approximate critical values at other significance levels or degrees of freedom (such as with $t$, chi-square, or $F$ tables)?  That is, how do I find the values "in between" the values in a table?


I am reading the Bishop Pattern Recognition and Machine Learning and am on section 9.3 An Alternative View on EM:  I am confused as to how Bishop obtains the expression $Q(\theta, \theta^{old}) = \sum_{Z}p(Z | C, \theta^{old}) lnp(X , Z | \theta)$  Thank you for insight!  ANSWER:  In the method of maximum likelihood, we're generally interested in p(X|θ), or equivalently logp(X|θ). We seek a θ that makes this quantity most likely.  However, in our model, in addition to observations X we have latent variable(s) Z which we haven't observed but we have some idea of what it could be (we've elsewhere described a probability distribution guessing Z). So, we're now interested in p(X,Z|θ), or equivalently logp(X,Z|θ), instead of just choosing a θ to maximize p(X|θ).  Yet it's hard to find the θ that maximizes logp(X,Z|θ) if we don't even know what Z is. Instead, we seek the θ that maximizes logp(X,Z|θ) weighted over our distribution of what Z might be.

While im going through the derivation of E step in EM algorithm for pLSA, i came across the following derivation . Could anyone explain me how the following step is derived.   $\sum_z q(z) log \frac{P(X|z,\theta)P(z|\theta)}{q(z)}  = \sum_z q(z) log \frac{P(z|X,\theta)P(X,\theta)}{q(z)} $


Suppose we can only use $5$ kinds of tiles to cover a $1 \times n$ board: (1) $1 \times 1$ size with red color, (2) $1 \times 1$ size with blue color, (3) $1 \times 2$ size with black color, (4) $1 \times 2$ size with green color, (5) $1 \times 2$ size with white color. Let $W(n)$ be the number of ways to tile the $1 \times n$ board, $n = 1, 2, \ldots$. For example, $W(1) = 2$, $W(2) = 7$, as shown by the following figure.  What is the $W(n)$ equation?

Let $h_n$ be the number of ways to tile a $1 \times n$ rectangle with $1 \times 1$ tiles that are red or blue and $1 \times 2$ tiles that are green, yellow, or white. Find a closed formula for $$H(x)=\sum_{n\geq0}h_nx^n.$$  I am unsure how to start this problem. Is there a way to solve this without using recurrence relations?


I am attempting to solve the following problem:     Prove that $2^{2a+1}+2^a+1$ is not a perfect square for every integer $a\ge5$.   I found that the expression is a perfect square for $a=0$ and $4$. But until now I cannot coherently prove that there are no other values of $a$ such that the expression is a perfect square.  Any help would be very much apreciated.

What are the solutions in positive integers of the equation:  $${1+2^x+2^{2x+1}=y^2}$$ I tried to factorize the equation but it didn't help much. Clearly $y $ is an odd integer. Substituting $y =2n+1$, we get  $2^x+2^{2x+1}=(2n)\cdot{(2n+2)}$ $\Rightarrow (2^{x-2})\cdot(1+2^{x+1})=(n)\cdot(n+1)$ Which is the product of 2 consecutive integers. Does it help? I don't know.


Is there any way in the code below to replace (Color) to standard Color. (with dot) in getting a color from UserData?   This line  rect.setFill((Color) group.getSelectedToggle().getUserData()   Wider code fragment based on Oracle doc about ToggleButton   tb1.setUserData(Color.LIGHTGREEN); tb2.setUserData(Color.LIGHTBLUE); tb3.setUserData(Color.SALMON);  final Rectangle rect = new Rectangle(145, 50);  final ToggleGroup group = new ToggleGroup(); group.selectedToggleProperty().addListener(new ChangeListener<Toggle>(){      public void changed(ObservableValue<? extends Toggle> ov,         Toggle toggle, Toggle new_toggle) {             if (new_toggle == null)                 rect.setFill(Color.WHITE);             else                 rect.setFill(                     (Color) group.getSelectedToggle().getUserData()                 );          }     });

When used like this:  import static com.showboy.Myclass;  public class Anotherclass{}   what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass?


I'm trying to implement a variadic method but when I try the following code it doesn't compile:  Configurations.h  #ifndef Test_Configurations_h #define Test_Configurations_h  #include <vector>  class Configuration { public:     Configuration(){}     int someData; };   class Configurations { public:     void addConfiguration (Configuration config);      template<typename... Args>     void addConfiguration (Configuration first, Args... args);  private:     std::vector<Configuration> _configs;  };  #endif   Configurations.cpp  #include "Configurations.h"  void Configurations::addConfiguration (Configuration config) {     // do something }  template<typename... Args> void Configurations::addConfiguration (Configuration first, Args... args) {     // Do something }   main.cpp  #include <iostream> #include "Configurations.h"   int main(int argc, const char * argv[]) {      Configuration c1;     Configuration c2;      Configurations configurations;      configurations.addConfiguration(c1, c2);      return 0; }   When I try to call the method  addConfiguration (config1, config2)   The compiler give me the following error:  Undefined symbols for architecture x86_64:   "void Configurations::addConfiguration<Configuration>(Configuration, Configuration)", referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   I think that I'm not declaring properly the method, but I don't know where is the error.  Thanks in advance!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)