I know after trigger cannot update the same record. But i would like to know why. I know the record is committed into the database. So the record is read only. But why the record is read only.

I'm writing a trigger for new opportunity products to populate  a field Product_Category__c (on opportunity lineitem) getting the value from Product_Category_new__c (on Product).  This is my trigger:  trigger SetProductCategory on OpportunityLineItem (after insert) {      for (OpportunityLineItem opplineitem: Trigger.new) {                    opplineitem.Product_Category__c =  opplineitem.PricebookEntry.Product2.Product_Category_new__c;     }      }   I get this error message:     execution of AfterInsert caused by: System.FinalException: Record is read-only   I have tried with before insert;in this case there aren't errors but the value Product category it's not saved on Opportunity Line item.  I have found that:  In a after insert trigger is not allowed change field using trigger.new  Please can you suggest a solution for this? i would like to copy the value Product category (Product) on Product Category (Opportunity Product)  after the insert of the new opportunity products.  Thanks in advantage for any advice.  Br


Maybe it is a nonsense question, but I would like to format my external HD which contains plenty of files and directories, the HD format is NTFS, if it is possible I would like to format to ext4 but keeping one directory and its files intact. I know that I can backup it before formatting. Is it possible ? I'm running Xubuntu 16.04.5 and this external HD was originally recovered from an old netbook running Windows XP. Thanks, Vladi

I have 2 TB of data on an NTFS drive which I would like to convert to EXT4 filesystem.  My OS runs on a (comparatively) small 60GB SSD.  Is there any way to convert the filesystem, apart from backing up and reformatting?


I'm a novice programmer looking to build my own iOS app. I'm hearing a lot of mixed responses on how it may or may not be necessary to learn C before taking on Objective-C.   I'm leaning towards learning Objective-C first considering I can always look back into the C (I'm using Big Nerd Ranch Guide for Objective-C) for some concepts like structs, arrays, etc.   I'm open to hearing any advice on what any of you may think!

Being an aspiring Apple developer, I want to get the opinions of the community if it is better to learn C first before moving into Objective-C and ultimately the Cocoa Framework?  My gut says learn C, which will give me a good foundation.


How do you put a circle on top of an exponential symbol

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


I'm trying to calculate the total number of counts a raster contains using python script. When I ran the script, I didn't get any error. However, I also didn't get the number of counts for each row in the attribute table.  Code:  import arcpy  #To overwrite output arcpy.env.overwriteOutput = True  #Set environment settings arcpy.env.workspace = "C:/Subhasis/Test/raster-read"  #Build Raster Attribute Table arcpy.BuildRasterAttributeTable_management("sti-9", "Overwrite")  # loop through attribute table Rows = arcpy.SearchCursor( "sti-9" )   for row in Rows:     count = row.getValue( "COUNT" )      print count

I am a beginner to python coding in GIS. I want to calculate the total number of counts in raster attribute table. In order to do that:   I would like to build a attribute table of raster data use a loop through attribute table using ARCPY.SearchCursor()   Therefore, I wrote a code to build an attribute table. However, I am getting an error while running the code and not able to figure out the error in the code.  Code:  import arcpy # Create the geoprocessing object  import arcgisscripting gp = arcgisscripting.create()  #To overwrite output arcpy.env.overwriteOutput = True  #Set environment settings gp.workspace = "C:/Subhasis/Test/raster-read"  #Build Raster Attribute Table gp.BuildRasterAttributeTable_management("sti-9", "Overwrite")  Error Message: Traceback (most recent call last):   File "C:/Subhasis/Test/raster-read/test.py", line 15, in <module>     gp.BuildRasterAttributeTable_management("sti-9", "Overwrite") ExecuteError: ERROR 000049: Failed to build attribute table Failed to execute (BuildRasterAttributeTable).


I tried to use counter to count the amount of null or empty string. But it always failed. I print them to test it.  System.out.println(samples.get(0).getAuthor2()); System.out.println(samples.get(0).getAuthor2() == " "); System.out.println(samples.get(0).getAuthor2().isEmpty()); System.out.println(samples.get(0).getAuthor2() == null);   The result is like this.  If these are all false, what is this blank?

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?


For example, I want to convert the number. select convert(1354256,money) salMoney  result: 1354256  convert  to 1,354,256

I've started a new job and it involves looking at a bunch of big numbers. Is there an easy way to add commas to an int or decimal field to make it readable?  For example, SQL Server outputs the column on the left, but for my own sanity, I need it to look like the one on the right:  2036150 -> 2,036,150     ...or would I have to write some heinous   left(right(vandalized_data),6),3) + ',' + right(left(vandalized_data),6),3)   function?  The perfect thing would be commas in the display grid, then plain integers in the output.


Is it possible to use Fail2Ban to block IPs that request the same URL more than 5 times in 10 seconds?  I'm not talking about a specific URL, but any random URL of the site that is being requested repeatedly.  For example:  I don't want to block in a situation like this:  111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /bbbb.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /ccccc.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /dddddd.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /eeeeeee.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /ffffffff.html HTTP/1.1"...   But I want to block in a situation like this:  111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"... 111.222.333.444 - - [29/Feb/2016:06:53:30] "GET /aaa.html HTTP/1.1"...   Important Note: I am not asking if I am under DDoS, nor what could I do if I were. What I am asking is if it is possible to use Fail2Ban to ban IPs that repeatedly request the same URL and how to do it.

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I understand what is going on in higher level. But I don't understand what's really going on in page 3 and 4 of  slide.   Specifically,   How $S_0$ and $S_1$ is used? What goes in what goes out? How exactly do key bits determine which s-box is to be used at each position? Position refers to what? Is the function $f$ on page 4 exactly the same SP network on page 3?  Why split plain text into left $L$ and right $R$? Why XOR $L$ with $R$ after applying $f$?  Why rotate after applying last $f$? Why is XOR used? Why not some other bitwise operation?    for reference.

I understand what's going on in higher level. But i don't understand what's really going on in page 3 and 4 of  slide.   Specifically,   How S0 and S1 is used? What goes in what goes out? How exactly  key bits determine which s-box is to be used at each position? Position refers to what? is the function "f" in page 4 exactly the same SP network in page 3?  why split plain text into left L and right R? why XOR L with R after applying "f"?  why rotate after  applying last "f"? why XOR is used? why not some other bitwise operation?    slides for reference


Ok so I'm stuck right at the beginning. I can't figure out how to burn a Live CD for Ubuntu. My drive capacity is 704MB and the .iso file is 1.2+ GB so it won't fit.  I want to install Ubuntu 14.04 in it's own partition but I don't know how. I downloaded the .iso and unpacked it to a folder on my HD. What next?

I was trying to install Ubuntu on an older laptop which doesn't have a DVD ROM or a USB boot capabilities.  Is there an option to burn the image files to a Cd ROM? I am pretty sure that the size of the image file may be slightly larger to fit on a CD ROM. Is there a way to split the image files and use two CD Roms instead?


I have a string of the following type:   "23 + 323 =" or "243 - 3 ="   So the format is: number + operator + number = equal.  And I also have an int which is the answer to that question.  How can I parse the string and check if the answer is correct?  Thank You, Miguel

If I have a string with a valid math expression such as:  String s = "1 + 2 * 7";   Is there a built in library/function in .NET that will parse and evaluate that expression for me and return the result? In this case 15.


Given A=$\Bbb Z$, a commutative ring with element $1$ with $\oplus$ and $\odot$, defined as: $a\oplus b=a+b-1$ and $a\odot b=a+b-ab$, show the ring is an integral domain.   It is known that the identity element in the ring is $1$, so we need to prove $a \odot b=1 \Rightarrow a=1$  or $b=1$; or $a\ne 1$ and $b\ne 1 \Rightarrow a\odot b\ne 1$.  The main problem I find is that I need to prove different cases with each sign of a and b. Is there an easier way?

a+b and ab are the usual integer addition and multiplication. You can assume that this new operation forms a ring, say R is the set of integers with these operations. Then does R have zero-divisors? And Are R and Z (the integers) isomorphic?  Any help will be appreciated!


This is my output on CentOS.   [test@test]$ sudo fallocate -l 2M text [test@test]$ sudo echo “This is for test” | tee text tee: text: Permission denied “This is for test” [test@test]$ ls text [test@test]$ cat text [test@test]$ [test@test]$ sudo yes 'This is test' | dd of=text bs=2M count=1 dd: failed to open ‘text’: Permission denied   I keep getting the 'Permission denied' error. But I have sudo permissions.

When you attempt to modify a file without having write permissions on it, you get an error:  > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  > sudo echo test > /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  > sudo su # echo test > /tmp/foo


I've had a flight price tracked in Google Flight for a couple of days because I couldn't yet decide if I could take it. Unfortunately it has gone up by 25% last night (~170 to ~220 EUR).  The flight is short-haul, from an European airport to London Gatwick, and will take place during high season (winter holidays).  Is it possible that the price will go down? Or are BA prices only known to go up?    (Edit)     The price increase that has happened last night wasn't a result of the cheapest class being sold out: the same level of service was sold at a higher price.   I'm only looking at economy class prices, therefore the  don't answer my question.  I'll rephrase my question to make it clearer: A given economy class ticket on a British Airways flight can increase its price, as observed empirically. Is the contrary ever observed? (an Economy class ticket going down in price?)

There is a common story that airline ticket prices rise significantly if you buy them less than two weeks before departure.  And that any time before that will yield standard prices.  Is that advice valid for flying during holiday seasons?  As an example: if I want to fly coast to coast USA on December 7th, must I buy my ticket ASAP, or would I get a similar price buying on November 21st?


for example:  String str = "abc1234abcd12"; String str1 = "abc1234abcd1234abcd12";   adding a '-', after third char,  and add '-', after every 4 char   how can I get this output:  String str = "abc-1234-abcd-12"; String str1 = "abc-1234-abcd-1234-abcd-12";

I have a java string, which has a variable length.   I need to put the piece "<br>" into the string, say each 10 characters.   For example this is my string:  `this is my string which I need to modify...I love stackoverlow:)`   How can I obtain this string?:  `this is my<br> string wh<br>ich I nee<br>d to modif<br>y...I love<br> stackover<br>flow:)`   Thanks


What are those vertical filaments that form in the air whenever an atomic bomb is detonated? They are clearly visible in  at .

What are those white lines connecting the ground to the sky on the left side of this photo?  I've see these before in the nuclear bomb test films too.  They're apparently already in place upon detonation, as the bright backlight from the mushroom cloud suddenly makes these lines appear in the foreground.  I imagine test devices are being shot into the sky before detonation but I'd like to know more about this.  Google searching has been fruitless as I don't even know what words I'm supposed to be searching for.  Looking for a brief explanation along with a source citation.


can anyone help me with how to calculate R-squared for a logistic regression- How do I use the deviance for this Purpose ?   Additionaly, the question in matlab: I am calculating a psychometric function using the "glmfit" function in matlab, with  'probit' parameter.  It returns "dev" variable, and I do not understand how to calculate from this value the goodness of fit of the model - R-squared.   Any advice?

I have SPSS output for a logistic regression model. The output reports two measures for the model fit, Cox & Snell and Nagelkerke.  So as a rule of thumb, which of these $R^²$ measures would you report as the model fit?  Or, which of these fit indices is the one that is usually reported in journals?    Some Background: The regression tries to predict the presence or absence of a bird (capercaillie) from some environmental variables (e.g., steepness, vegetation cover, ...). Unfortunately, the bird did not appear very often (35 hits to 468 misses) so the regression performs rather poorly. Cox & Snell is .09, Nagelkerke, .23.    The subject is environmental sciences or ecology.


I don't know why my camera is not working, I am sure it is a software problem, it just shows a black page.   All features are working but it doesn't show anything. It is not working on other apps, like Instagram, as well. The front camera is not working. I have tried the "Reset All Settings" option but there is no change and camera is not working yet.    I upload a photo that is a screenshot when I run camera.    How can I solve this problem?

I don't know why my camera is not working, I am sure it is a software problem, it just shows a black page. All features are working but it doesn't show an image. It is not working on other apps, like Instagram, as well. The front camera is not working. I have tried to "Reset All Aetting" option but it is not working neither. I upload a photo which is the screenshot when I run camera  How can I solve this problem?


I am Indian citizen, and flying thru Stansted (London) with 3 hour layover, flying to the US.  Does this require transit visa?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


What is the difference between Cohen's $\kappa$ and Spearman's $\rho$?

Which inter-rater reliability methods are most appropriate for ordinal or interval data?  I believe that "Joint probability of agreement" or "Kappa" are designed for nominal data. Whilst "Pearson" and "Spearman" can be used, they are mainly used for two raters (although they can be used for more than two raters).  What other measures are suitable for ordinal or interval data, i.e. more than two raters?


I am curious to know, how shared_ptr class decides whether it has to call delete or delete[] for the below statements?  a. boost::shared_ptr <char> ptr(new char);  b. boost::shared_ptr <char []> ptr(new char[100]);

What is the difference between the following set of pointers? When do you use each pointer in production code, if at all?  Examples would be appreciated!   scoped_ptr shared_ptr weak_ptr intrusive_ptr   Do you use boost in production code?


I am trying to create an errand reminder. The idea is the user can create a reminder, and they can set the frequency of the reminder. They can choose to be reminded daily, weekly or monthly. Now if they choose weekly, I only need to know the day of week they want to be reminded and all is well. The issue however is monthly. What if the user wants to be reminded every 31st of the month? Some months obviously don't have that, and being that the reminder goes out every month, I have no reason to keep track of the month itself.   I am really not sure how to about this. If it matters, this is a node.js app.

If you provide 0 as the dayValue in Date.setFullYear you get the last day of the previous month:  d = new Date(); d.setFullYear(2008, 11, 0); //  Sun Nov 30 2008   There is reference to this behaviour at . Is this a reliable cross-browser feature or should I look at alternative methods?


Way back in high school, I asked my English teacher a question while we were on the topic of sentence fragments.   If the words "I am." make a complete sentence, then would the contraction "I'm" be a full sentence too?  She was not able to answer me. Hopefully someone here can change that.  Note: Before someone marks this as duplicate to this:   I want to say that this question asks if a contraction by itself can be a full sentence or not.

One can contract I have to I've when have is a helping verb, e.g.     I've got an octopus in my pants.   Is contracting the main verb technically incorrect or merely antiquated? My father loves to say,     I've a month-old smoked shoulder I can cook for dinner,   and he sounds like a crazy old man when he does. I would like to know if I can shut him down by informing him that he is incorrect. :)


I have an HDD installation that has spare space and I would like it to be a backup deb archive. But even with APT::Clean-Installed "0"; in apt.conf and verified with apt-config dump all newly-installed packages are deleted from /var/cache/apt/packages/.  APT::Periodic::AutocleanInterval "0"; so it should be disabled. And I can download installed packages with apt-get download but I want them to be kept, not removed right after installing.

I know that packages installed with apt-get are stored in /var/cache/apt/archives.  I just installed mariadb server in Ubuntu 16.04 with following command:  sudo apt install mariadb-server   When I tried to find packages in /var/cache/apt/archives, there are no packages. Where are they stored if it's not in this directory?


Why can we see virtual images? It cannot be formed on the screen. The retina in our eye acts as a screen. If the image cannot be formed on the screen, why can we see it?

In optics it is widely mentioned real images are projectable onto screens whereas virtual ones can only be seen by a person.  Isn't that contradictory?  I mean in order to see the virtual image it has to be projected onto the retina (ultimately acting as a screen).   So, why can you see  in the first place?


Obviously a Weierstrass curve is not a smooth manifold, but it seems like a Weierstrass curve should be a topological manifold (which I now see is a suspicion supported by  post), since it is a continuous image of the real line.  That said, I am a particularly concerned about the locally Euclidean requirement.  I know that a Weiestrass curve generally has a non-integer Hausdorff dimension (see )--does that impact this requirement?

I'm having problems with that:  Prove that M is a topological manifold.  $f:U \to \mathbb R^k$, U $\subset \mathbb R^{n}$ open, f continuous  M = $\{\left(x,y\right)\in \mathbb R^{n+k} \mid x \in U, y=f(x) \}$  Can anyone help me please?


How do I prove this identity:  $$\frac{\sin x}{x}=\left(\cos\frac{x}{2}\right) \left(\cos\frac{x}{4}\right) \left(\cos \frac{x}{8}\right)...$$  My idea is to let  $$y=\frac{\sin x}{x}$$ and $$xy=\sin x$$  Then use the double angle identity $\sin 2x=2\sin x \cos x$ and its half angle counterparts repeatedly.  I see some kind of pattern, but I can't seem to make out the pattern and complete the proof.

I stumbled across the following question which asked to evaluate...  $$\lim_{k\to \infty}\prod_{r=1}^k\cos{\left(\frac {x}{2^r}\right)}$$ I at first tried writing few terms $$\cos{\left(\frac {x}{2}\right)}\cos{\left(\frac {x}{4}\right)}\cos{\left(\frac {x}{8}\right)}...$$ I used the Half-angle formula to write$$\cos{\left(\frac {x}{2}\right)}=\pm\sqrt{\frac{1+\cos(x)}{2}}$$ Therefore, $$\sqrt{\frac{1+\cos(x)}{2}}\sqrt{\frac{1+\sqrt{\frac{1+\cos(x)}{2}}}{2}}...$$  As there are infinitely many two's in the denominator, the denominator goes to $\infty$ which means $$\lim_{k\to \infty}\prod_{r=1}^k\cos{\left(\frac {x}{2^r}\right)}=0$$  So..My question is ...Am I correct?... If not, Could you please give me some hint to how should I proceed ?


When investing, should you just pick one company and do all your investing through them? Is it unwise to mix investment accounts with some mix of companies like Vanguard, Wealthfront, Betterment, Fidelity, etc...  Also assuming all investments are passive investing with no actively managed funds

I have a few retirement accounts at Vanguard. I am considering opening a regular non-retirement investment account there. Is there any reason to diversify and open the new account with a different company like Fidelity, for example?  Note that I don't care about which company specifically (the ones listed are just examples). I want to know general information about diversifying between investment firms.


I can not see any difference between  Ridge Regression and Linear Regression  MY understanding, The point of ridge Regression is based on the training data we find the best line that fits training data.  Best line means minimum RMSE  then try to play with the line sloop to get better results through n-fold cross validatin!.  isn't easier and simpler to use all dataset (both training and test) to build this line and find sloop through   $y\ =\ \beta_0+{\beta_1x}_1$  $\beta_1\ =\ \rho\frac{\sigma_y}{\sigma_x}$  $\beta_0\ =\ \mu_y\ -\ \mu_x\beta_1\ $  $\rho\ =\ [(x-μx)(y-μy)] [(x-μx)2][(y-μy)2]$  $\sigma_x=\ \sqrt{\frac{{\sum{(x-\mu_x)}}^2}{n}}$  $\sigma_y=\ \sqrt{\frac{{\sum{(y-\mu_y)}}^2}{n}}$  the linear regression will give us the best fit.  if i misunderstood.  please tell me what is the difference between these models before down rating my question.  Thanks

Ridge regression coefficient estimate $\hat{\beta}^R$ are the values that minimize the   $$ \text{RSS} + \lambda \sum_{j=1}^p\beta_j^2. $$  My questions are:   If $\lambda = 0$, then we see that the expression above reduces to the usual RSS. What if $\lambda \to \infty$?  I do not understand the textbook explanation of the behaviour of the coefficients. To aid in understanding the concept behind a particular term, why is the term called RIDGE Regression? (Why ridge?) And what could have been wrong with the usual/common regression that there is a need to introduce a new concept called ridge regression?    Your insights would be great.


What is happening here? It won't pick up the exclamation mark in reverse indexing without a kludge.  h = str("Hello, World!") print(len(h)) print(h[-13:-1]) #What happened to the ! print(h[-13:-1]+h[-1]) print(len(h[-13:-1]+h[-1]))   Output: 13  "Hello, World"  "Hello, World!"  13

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I am a probability noob and I was solving the following problem, but my answer doesn't match the book's.  The length and width of panels used for interior doors(in inches) are denoted as Xand Y, respectively. Suppose that Xand Yare independent, continuous uniform random variables for 17.75<x<18.25 and 4.75<y<5.25, respectively.determine the probability that thearea of a panel exceeds 90 squared inches.  I thought the area random variable will have a minimum value of 17.75*4.75=84.3125 Maximum value of area will be 18.25*5.25=95.8125  Also if X and Y are uniformly distributed and independent then area should be uniformly distributed too. Every single value that area can take has equal chance. Please correct me here.  Now with this when I integrate area(A) from 90 to 95.8125 for a constant PDF f(A)=1/(95.8125-84.3125), my answer comes out to be 0.5054. But the answer according to the solutions given at the back of book is 0.499. I am not able to understand where I am doing a mistake. Can anyone please help me understand where I am going wrong?

Let $z = xy$ be a product of two uniform random variables, with $x$ having the range $[a, b)$ and $y$ the range $[c, d)$.  What is the probability density function of $z$, and how is it calculated?


I was able to generate a random number between [0,50] in my java code but how do I proceed in order to create for example a number in the range of [1,49]  This is my code:  public class Totoloto  {     public static void main(String[] args)      {         int n = (int) (Math.random()*50);         System.out.println("Number generated: "+n);      }     }

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


I have photographed the following plant in our garden in Pittsburgh, PA.  Do you know the name of the plant?

This plant was found growing in Germany. I have never seen it before, reverse Google image search did not help either. Can you help me identify what type of plant this is?      Thanks, looks like it is something like this:    Related question:


On a new install with default Twenty Fifteen theme and no activated plugins. I used Really Simple CSV Importer to import ~4000 pages with title and one word content for each. This is to have my pages ready for use with Advanced Custom Fields (pages will have dozen text areas metaboxes, not really using any advanced ACF features like repeaters or anything)  edit.php and post-new.php take a long time to load on a good, not crowded SSD, high RAM server (confirmed this with others on the server and my host).   I guess the number of pages are the factor. I wanted to see what effect deactivating ACF and all other plugins have. No noticeable difference, I turned off all screen options and reduced the 'Number of items per page' too. So now the edit.php?post_type=page only shows pages titles and post-new.php?post_type=page only the title and content boxes and Publish buttons.  When I looked at the page source I guess I see the issue, on both edit.php and post-new.php after all I have done above (deactivate, turn off, etc.)  a list of all my pages are loaded like:

           Page Attributes

Parent
 Parent <select name='parent_id' id='parent_id'> <option value="0">Main Page (no parent)</option> <option class="level-0" value="3">Page 1</option> <option class="level-0" value="4">Page 2</option> . . . <option class="level-0" value="4300">Page 4000</option> </select>    Is it possible to not have that load every time? If so, using a filter or plugin?

i am getting a weird error - white screen in the list of posts for a specific Custom post type (just for that one)   tried deactivating all the plugins tried checking for error (debugging = true)   Still nothing the page just doesnt echos anything... (nothing in source too)  I am talking about such a url in the admin:     Here is register_post_type part i am using:    function register_submodelcpt() {     $labels = array(         'name'                  => __('Sub Models', THEME_NAME),         'singular_name'         => __('Sub Models', THEME_NAME),         'add_new'               => __('New Model', THEME_NAME),         'add_new_item'          => __('Add new Model', THEME_NAME),         'edit_item'             => __('Edit Model', THEME_NAME),         'new_item'              => __('New Model', THEME_NAME),         'all_items'             => __('All Sub Models', THEME_NAME),         'view_item'             => __('Watch Model', THEME_NAME),         'search_items'          => __('Search Models', THEME_NAME),         'not_found'             =>  __('No Models found', THEME_NAME),         'not_found_in_trash'    => __('No Models found in trash', THEME_NAME),          'parent_item_colon'     => '',         'menu_name'             => __('Sub Models', THEME_NAME),      );      $args = array(         'labels'                => $labels,         'public'                => true,         'publicly_queryable'    => true,         'show_ui'               => true,          'show_in_menu'          => true,          'query_var'             => true,         'rewrite'               => array('slug' => 'submodels'),         'capability_type'       => 'post',         'has_archive'           => true,          'hierarchical'          => true,         'menu_position'         => 5,         'menu_icon'             => get_stylesheet_directory_uri().'/images/cpt/subcars.png',                     'supports'              => array('title', 'thumbnail', 'revisions', 'page-attributes')     );      register_post_type('submodelscpt',$args); } add_action('init', 'register_submodelcpt');   Did anyone encounter such an issuse? can you think of a reason this might happen?   Another weird thing when i change this:    To this:     The posts list loads correctly...


I am trying to communicate with an ethernet enabled devices from my Android phone. My phone has Android 2.3.6 and the device I am trying to communicate with has a mini web server running on it. The device has a single RJ45 port for communication with the outside word. Is it possible for me to connect my Android phone using a  micro usb to Ethernet adapter and talk to the mini web server? If so, could you kindly show me how to go about this.  I have connected my Nexus One  and tried to enable USB tethering but it doesn't work. I was reading an article on ADB but it doesn't show how to establish connection and assign address to an adapter.

I use tablet with Android in a professional environment and the it department doesn't accept to install wifi.  My tablet need to synchronise with CSV file on a LAN share.  I'm looking for solutions. Is it possible to connect a tablet on ethernet (possibly with builtin firmware)? If yes, which model?  I looked for solutions and I found some interesting links:    / a pack to add ethernet support to Asus  Iconia Tab a500  Motorola Xoom   Does someone have experience with this? I prefer avoid root my tablet or use a custom firmware or launch some custom command when connected to the network, but if no Android tablet come with this feature built in, I would be willing to root it.  Alternate solution:  connect the tablet to the PC with USB and access the LAN share located on the computer (it was possible with Windows Mobile) and maybe access the whole network.  I own a Galaxy Tab 8.9 and the best would be to find a solution with that tablet.


The given sequence is : $31,331,3331,33331....$ where the $n^{th}$ number has n $3$'s followed by a $1$. The question asked is to find are all the numbers prime? If not all how many terms from start are prime (e.g. first 30 terms , etc.) I'm completely blank of how do we approach such questions. Any reference or ideas ?

31,331,3331, 33331,333331,3333331,33333331 are prime. This law can continue it? Will there emerge a composite number? Without using a computer how to judge.


I am new to this website and to java so please forgive the messy code. import javax.swing.JOptionPane;  public class MusterTest {      public static void main(String[]args)   {         String zeichen = null;         int laenge = 0;         int hoehe = 0;         Muster.rechteck(zeichen, laenge, hoehe);         System.out.print(zeichen +laenge+ +hoehe);     } }  class  Muster {      public static int zeile(String zeichen, int laenge)  {         zeichen = JOptionPane.showInputDialog(null, "Which Symbol?");         String wLaenge = JOptionPane.showInputDialog(null, "Length?");         laenge = Integer.parseInt(wLaenge);         return laenge;     }     public static int rechteck(String zeichen, int laenge, int hoehe)    {         zeile(zeichen, laenge);         String wHoehe = JOptionPane.showInputDialog(null, "Height?");         hoehe = Integer.parseInt(wHoehe);         return hoehe;     } }  What I'm trying to achieve here, the user inputs the a Symbol (in the String zeichen) and then two values (in hoehe and laenge) inside the methods. After that, I'm supposed to use the method in void main. My problem is, when I print the variables it does not print the values that the user inputs. Instead it just prints: null,00 (so the values did not change). Any advice on how I could fix this? (Note: This is an assignment, it specifically must be done with the use of these two methods, so please keep that in mind for those who give advice.)

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Is it right to say "She accused him for breaking her glasses" or we should always use the preposition "of"(She accused him of breaking her glasses")/Thank you

In one of my essays, I wrote:      She accused him for lack of morality    and it was marked as a syntactic error. Do we use for or of with the verb accuse?


I have modeled a sled and now I want to animate it going down from mountain, so is there any way to make sled stick to terrain and then animate it going down the mountain?

I tried to set the ocean as passive rigid body (collision mesh) and a boat as active rigid body.   The boat falls through the ocean. Which technique is recommended for this?  Ideally the boat would follow a curve and the physic simulation would calculate the orientation and level (z-axis).


Sorry, I know there are several threads about RSA encryption and how to calculate $d$. But there is a thing I still don't understand. So you calculate $d$ by using the following expression (): $$   e \cdot d\equiv 1(mod\ \varphi(N))  $$  The the usual way to proove this (based on $e^{\varphi(N)}\equiv1 (mod\ N)$) is:  $$   m \equiv m^{k\cdot\varphi(N)+1} \equiv (m^{\varphi(N)})^k\cdot m \equiv 1^k\cdot m (mod\ N) $$  There are serveral things I don't understand:   The Euler theorem only applies, if $m$ and $\varphi(N)$ are coprime (which is not the case here) $m^{\varphi(N)} (mod\ N)$ is defnitly not $1$ Nonetheless: For a defined $k$ the equation $m^{k\cdot \varphi(N)} \equiv 1 (mod\ N)$ seems to be correct. But why is that? And why can you just write $(m^{\varphi(N)})^k \equiv 1 (mod\ N)$, if $k$ can't be an arbitrary number?

I'm trying to understand the working of RSA algorithm. I am getting confused in the decryption part. I'm assuming   $$n = pq$$ $$m = \phi(n) = (p - 1)(q - 1)$$  E is the encryption key $\gcd(\phi(n), E) = 1$  D is the decryption key, and  $DE = 1 \mod \phi(n)$  $x$ is the plain text  Encryption works as ($y = x^E \mod n$) and decryption works as ($x = y^D \mod n$)  The explanation for why the decryption works is that since $DE = 1 + k\phi(n)$,  $$y^D = x^{ED} = x^{1 + k \phi(n)} = x(x^{\phi(n)})^k = x \mod n$$  The reason why last expression works is $x^{\phi(n)} =  1 \mod n$ ? According to Eulers theorem this is true only if $x \text{ and }\phi(n)$ are coprimes. But $x$ is only restricted to be  $0 < x < n$  and $\phi(n) < n$. So $x$ should be chosen to be coprime with $\phi(n)$?  Help me clear out the confusion!


The historical meaning of the word Gig is:  a light two-wheeled carriage pulled by one horse. a light, fast, narrow boat adapted for rowing or sailing.  However, in modern use, it refers to:  a live performance by a musician or group playing popular or jazz music.  I am curious about this transformation. How did it go from the former to latter?

Why did jazz musicians start referring to an engagement as a "gig"?   If any, could anyone provide a couple of quotations from eminent authors to show where a word was first used in this sense?      | noun, a live performance by a musician or group   playing popular or jazz music. | verb, perform a gig or gigs.


I have this HTML  <div class="btn-group">      <input type="button" name="meat" class="btn btn-default active" value="Both">      <input type="button" name="meat" class="btn btn-default" value="Red">      <input type="button" name="meat" class="btn btn-default" value="White">      <input type="button" name="meat" class="btn btn-default" value="None"> </div>   This with addition os some css gives this resoult:    I use this code to only allow one active:   $(".btn-group > .btn").click(function(){      $(this).siblings().removeClass("active");      $(this).addClass("active");  });   But it is just visual, and when I try to input vía php POST (within a form) I don't get nothing.  If i change to type=radio, the PHP works fine, but it is uglier.  ¿Any magical idea to make it work keeping it fancy?  The php code for testing is:  <html> <body>  MegaUltraTest <?php echo ($_POST["meat"]); ?>  </body> </html>   Thank you.

When looking at most sites (including SO), most of them use:  <input type="button" />   instead of:  <button></button>    What are the main differences between the two, if any? Are there valid reasons to use one instead of the other? Are there valid reasons to use combine them? Does using <button> come with compatibility issues, seeing it is not very widely used?


I would like to write a Software and this Software have to save files in /usr/share/xy/. The Software would write and read this data with fprintf() and fscanf(). The owner of the directory /xy/ is root and the group too. Now i start the Software with sudo in the .desktop file.   Now my question is it possible to start them without an password. How big Software do this to save data in the background?  Thank you Bye Nick

Inspired by this ....  I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way).  However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate.  NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal.


I am not seeing a lot of discussion on this top, which is why I am bring it up. Entropy is observed for non-interacting particles; No surprise there. But, for interacting particles or objects, entropy does not seem to always apply. For example, throw random piles of magnets together. Salt crystal forming cubes when water evaporates. Water molecules form snowflakes below subzero temperature. Chemical reactions in general and the infamous Miller–Urey experiment (). Please share your thought on this. Thank you.

I was reading about growing single crystals and I'm a little confused about this -  In most crystal growing processes, a "seed crystal" is used, and the rest of the material crystallizes on the seed crystal (for example the ).   But thinking about entropy, wouldn't it be more favourable for the vapour/liquid to not crystallize and hence maintain a larger disorder?   A similar process occurs in supersaturated vapour as well, where a small liquid droplet acts as a "seed" for more condensation to occur. So I suspect I'm missing something, but I can't figure out what.


This is just a curiosity that just came to my mind while thinking at IP addresses. A byte is composed of 8 bits. A bit can either be $0$ or $1$. IPv4 addresses are composed of a group of 4 bytes. These bytes are usually represented in decimal dot notation (because it's easier for humans), but sometimes I need to figure out in my head the binary numbers. So, if I know that there's just one configuration, and if my calculations are correct, then I am sure that my solution is correct.  My question is, is possible to obtain a certain integer $k$ using more than one combination of the $8$ bits? For example, suppose we want to represent in binary the number $123$. Is it possible to represent it in 2 or more different configurations of the 8 bits? What about if we have more than $8$ bits?  This might seem a silly question, but a proof might satisfy me.

I am trying to show that how the binary expansion of a given positive integer is unique.  According to this link, , All I see is that I can recopy theorem 3-1's proof?  Is this polished enough of an argument. Thanks


I have to do a lot of certificates and I have a list of names, every name has a characteristic (A,B or C). I have designed the whole structure for the certificate and have the 'name' and 'characteristic' in blank.   My question is if it is possible to do something like  while (i in list):  code for structure with line name = i and charactertistic = char[i]  i+=1 newpage   In LaTeX, I mean writing the list and their characteristic in the code.

I have this command  \newcommand{\pdfappendix}[1]{     \includegraphics[scale=0.6]{pdf/#1.pdf} }   It works well when I have 1 page pdf but is not including the other pages. Now I decided to change the command to take a second argument which is the number of pages and will repeat \includegraphics that number of times.  I want something similar to (the following is not latex code):  \newcommand{\pdfappendix}[2]{     for index=1 to #2     {        \includegraphics[scale=0.6]{pdf/#1index.pdf}     } }   Example: MyPDF.pdf has 4 pages. I will split it in 4 pdfs with 1 page each: MyPDF1.pdf, MyPDF2.pdf, MyPDF3.pdf, MyPDF4.pdf. The output of the command will be:  Then I will write the command: \pdfappendix{MyPDF}{4}  And it will output:  \includegraphics[scale=0.6]{pdf/MyPDF1.pdf} \includegraphics[scale=0.6]{pdf/MyPDF2.pdf} \includegraphics[scale=0.6]{pdf/MyPDF3.pdf} \includegraphics[scale=0.6]{pdf/MyPDF4.pdf}   Is it possible to do that?  PS: I don't want to use \includepdf because I have some problems with section headers.


The following method throws java.lang.NullPointerException  public ArrayList<User> getDinner() throws ParseException {  DateFormat formatter = new SimpleDateFormat("dd/MM/yy"); Date date = formatter.parse(bookingdate); Date today = formatter.parse(formatter.format(new Date())); //   ArrayList<User> subset = new ArrayList<User>(); for (User user : userList) {      if (((date.equals(today) || date == null)) && (1700 < user.bookingtime)) {         subset.add(user);     }  } return subset; }   How is this caused and how can I solve it?

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?


My friend and I really want to play GTA 5 together but we cant figure out how. Were friends on Rockstar Social Club so will that help?  Please answer

Can GTA V  Online Network Merge Xbox 360 and PS3 players, or is it two individual networks? (Can crews cross platform)


I'm trying to find a necessary and sufficient condition for $x^n - y^m$ to be irreducible in $\Bbb C[x,y]$.  What I have now is rather trivial sufficient conditions: if $m\mid n$ then $m=1$ and if $n\mid m$ then $n = 1$.  There are similar questions previously posted to this site. To me the answers to those questions seem overkill to this particular problem, and I am looking for an elementary solution.  I would be grateful for your help.

I am trying to show that $X^n-Y^m$ is irreducible in $\Bbb{C}[X,Y]$ iff $\gcd(n,m)=1$ where $n,m$ are positive integers.    I showed that if $\gcd(n,m)$ is not $1$, then $X^n-Y^m$ is reducible. How to show the other direction. Please help.


I have separated all faces and set the pivot point (origin) to center mass with this solution:  Here is the code: import bpy bpy.ops.object.mode_set(mode = 'EDIT') bpy.ops.mesh.select_all(action='SELECT') bpy.ops.mesh.edge_split() bpy.ops.mesh.separate(type='LOOSE') bpy.ops.object.mode_set(mode = 'OBJECT')  Q: HOW TO SET THE PIVOT POINT TO BE ORIENTED IN THE CENTER OF THE PLANE ACCORDING TO THE NORMAL

So,  Each of my polygons is a separate object. Their default normals point like this:   But their orientation or local axes are like so:   How can I make their local axes to be like so, but automatically?   I guess particles might be one solution for this exact case (if you emit new objects on top of the existing ones) but let's say the original objects are triangles and I wouldn't want to change their shape and pointing direction at all, only their local orientation axes, would that be possible?  Cheers!


I remember reading a paper a while ago that demonstrated some cases in which PCA would fail to capture important features of a data set in the first few principal components, but where those features would be reproduced in lower-variance components.  I think someone here recently mentioned the paper in a comment, and it jogged my memory.  I've tried doing a search on Google, Google Scholar, and my library database, but I haven't found anything. Coming up with the right search terms for something like this is not easy.  What paper is this?

Normally in principal component analysis (PCA) the first few PCs are used and the low variance PCs are dropped, as they do not explain much of the variation in the data.  However, are there examples where the low variation PCs are useful (i.e. have use in the context of the data, have an intuitive explanation, etc.) and should not be thrown away?


How to prove triangle inequality for the metric $$d(x,y)=\frac{2|x-y|}{\sqrt{1+|x|^2}+\sqrt{1+|y|^2}},$$ for all $x,y\in \mathbb{C}?$

Show that $(X,d)$ is a metric space where $X =\Bbb C $ and the distance function is defined as:   $$d(x,y) = \frac {2|x-y|}{\sqrt {1+|x|^2} +  \sqrt {1 + |y|^2}}, \text{ for } x,y \in \Bbb C.$$   I have done the proof of the first two propositions for being a metric, but I'm having a problem in proving the triangle inequality.


Is give or gives correct in the following sentence:     Substantial experience combined with my programming skills give(s) me the   expertise needed to complete the job efficiently.   Is "combined with" equivalent to "and", making "experience" and "skills" a compound subject? If so the verb should be plural.  If its not, is it governed by the "closest subject rule" and "skills" make it plural?

My question arises from , where OP asks whether he should use the singular or plural verb form after "the title, as well as the tone,"  As luck would have it, when I searched Google Books for , I found...        ...and...        At the risk of having this question closed as just peeving, I feel that the first one should have been plural "err", because without the commas it seems to me both "the title" and "the tone" have more or less equal status as "joint" subjects of the verb, making it plural.  On the other hand, I feel the commas in the second example effectively demote "the tone" to "parenthetical" status (the clause is almost incidental). Since this encourages us think of "the title" as the primary subject, it should have been singular "derives".  I'm no great fan of "grammatical rules", but it seems weird to me that the only two relevant examples for this specific wording should both (in opposite ways!) contradict my inclinations.  What's going on?


I have the following beginning on my tex file:  \documentclass[a4paper]{amsart} \usepackage[utf8]{inputenc} \usepackage[finnish]{babel} \usepackage{url}   Now I need to put an URL to the document that contains the letter ä. I tried to do this  \url{http://www.address.fi/kälä-example}. \url{http://www.address.fi/k\"al\"a-example}.   but this won't work in my system. Can I see those addresses properly somehow?

I am trying to use bibtex to output the url from a reference, but it's not working because the  url has accentuation, just like below:  url = {http://www.epe.gov.br/mercado/Documents/Série\%20Estudos\%20de\%20Energia/20130117_1.pdf},   The output is:  http://www.epe.gov.br/mercado/Documents/S\unhbox\voidb@x\ bgroup\let\unhbox\voidb@x\setbox\@tempboxa\hbox{e\global\ mathchardef\accent@spacefactor\spacefactor}\accent19e\ egroup\spacefactor\accent@spacefactorrie%20Estudos%20de% 20Energia/20130117_1.pdf   Is there a way to protect the accentuation when it enters on url environment?


I got to thinking Wouldn't it be cool to play some kind of proper dragon with Character levels?  So I wonder, is there a rules-based way to make a dragon player character?  My guess is that this is one of those DM fiat sort of things, and that it could be unbalanced. But is there any way?

Is it possible to create a playable character who's a dragon in D&D 5e? Not a dragonborn, but an actual dragon.  I'm new to D&D and planning on playing D&D 5e because it's the newest.


\documentclass{beamer} \usepackage[utf8]{inputenc}  \usetheme{Madrid} \usecolortheme{beaver} \usepackage[utf8]{inputenc} \usepackage{graphicx}  \begin{document}  \begin{frame} \frametitle{EXAMPLE.} \begin{figure}     \centering     \includegraphics[height=5.6cm]{EXAMPLE.PNG}     \caption{EXAMPLE.}     \label{EXAMPLE.} \end{figure} \end{document}  Hi. I'd like to make a simple beamer that has no sections. With sections, the figures are numbered, but I'd like to make them numbered (Figure 1,Figure 2 and so on) without sections. Because they are just "Figure:", I'd like to get numbers. How could I do? Thank you so much.

I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:?


Why is Congress used without the definite article the?

Possible Duplicate:             When I listen to major news programs, often I notice that they seem to intentionally omit "the" before the name of the government organizations. For example:     We contacted E.P.A. for comment but they refused our requests.   or     Others consider the actions of treasury to be detrimental to the economy.   These just sound wrong to me. I think it should be "the E.P.A" or "the treasury". However I most often hear this on very credible news programs (The PBS News Hour and Frontline come to mind) so I am sure they know what they're doing...  Is it proper to use "the" before the name of a government organization, or is it optional?


Let $f:U\subset\mathbb{R}^m\rightarrow\mathbb{R}^n$ be a function of class $C^1$ with $m> n$. Prove that $f$ is not an injection function.  I do not know how to solve this problem. Could someone help me with the solution to this problem?

Suppose $m,n>0$, $U$ an open subset of $\mathbb{R}^{m+n}$ and let $f: U \to \mathbb{R}^n$ be continuously differentiable.  Is it possible for $f$ to be injective?    My thinking is that continuous differentiability+injectivity suggests that this is sort of getting at a converse to the Inverse Function Theorem.  We know the Jacobian is not invertible at any point in $U$, and the question is asking if this implies that $f$ cannot be invertible in any neighborhood contained in $U$.


Me and my friend are using Tunngle to play FTB together using lan. When my friend is unavailable to host I had the idea for him to share the world save on Google Drive. This way I could play the game by myself, send the file back to him and he could host when we play together.   He sent me the file after we played together for a bit. When I put the folder in my save and booted it up I was playing as my friend, same location same inv.  Does anyone know a way that I could play as my own character as I left off when we were playing over Tunngle?

Player A created a Single Player game in Minecraft, hosted on his laptop, and opened to LAN at my house with about 4 people in total, including myself, Player B. Player A's laptop was soon struggling with the hosting responsibilities, and we wanted to transfer the saved game to Player B's desktop.  We transferred the file onto my computer, and loaded it. The world seemed to be the same, but when I logged in as Player B, it loaded the player data for Player A; I was in his spot, with his items, and had his experience.  Upon digging, I believe that the reason for this is because the way that the game's playerdata saved his player had something to do with him being the host. Now, since I'm the host, it must be assigning me the player with the previous host attributes.  I have not yet logged him (Player A) in while I (Player B) am hosting on the desktop, but I assume he would have my credentials?  Also, another player, who was on the server last night while Player A was hosting, logged in while I started hosting, and her character was the same; she had the same items, was in the same location as last night, etc.  Why am I logged in as the previous host, Player A, but it seems everyone else has their correct credentials? Is there a way I can change this so that I'm logged in as Player B while hosting?


The "Hot Network Questions" sidebar is a really nice toy when I browse Stack Exchange for fun, but it never helped me when working and using the serious Q&A aspect of, say, Stack Overflow.    It is purposefully distracting, luring one to other corners of Stack Exchange. One quarter of (my) screen estate covered by off-topic (by definition) links and texts. They draw the eye especially since there is hardly any visual separation between them and the very useful "Related" topics sidebar.     I usually skim right over "Related" and suffer some serious mental gear clashing before I realize that I had "gone too far".  Would it be possible to add a button to deactivate those links? Maybe just for an hour or two? Optimally a setting which allows to specify a time one doesn't want to be distracted. Like 9-5 on Workdays or similar.  Edit for clarification: I am not looking for some browser hack or plugin or advice on mental disorders. This is just a feature request.

This may sound like a 'first world problem', but I am quite easily distracted by the 'Hot Network Questions' sidebar, as I find them quite amusing and some of them quite intellectual  But where the problem lies is that, even at work, if I google something up and find a solution on Stack Overflow, to some random problem I am working at, I (always) get distracted towards them (Hot Network Questions), and end up reading the whole Qs as well as As of that respective question, and this is adversely affecting my productivity.  Any suggestion would greatly help.


everyone,   I'm trying to stop the execution of an ajax function in Jquery. currently this ajax call, it returns a list of images, what I want is to stop the execution of the image return as soon as I press a button. I'm trying to use the abort() function but it doesn't stop the requests I've already sent and finally it returns all the images. what can you advise me?  ajaxCall =$.ajax({ type: 'POST', url: "/loadImage", data: {file:element.file}, success: function(respo) {                                        if(element.file.split(".").pop()=="pdf"){       $('#contentTable').append(`

${element.name}

`);     }else if(element.file.split(".").pop()=="mp4"){       $('#contentTable').append(`

${element.name}

`);     }else{       $('#contentTable').append(`

${element.name}

`);    }    filesContent[filesContent.length-1].content.push({index:index, name: element.name, file:element.file,  src: respo.src})    index++; } });  //onclick function part if(ajaxCall){    console.log("hay ajaxCall");    ajaxCall.abort(); }

Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?


I am reading the lecture note from Cambridge University about Probabilistic Ranking and they claim that the normalized constant has a closed form in the below formula but I could not know how to prove. Would you please help me to handle this relation?  $\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} \mathcal{N}(w_1; \mu_1, \sigma^2_1)\mathcal{N}(w_2; \mu_2, \sigma^2_2) \Phi(y(w_1 - w_2)) \, \mathrm{d}w_1 \mathrm{d}w_2 = \Phi ( \frac{y(\mu_1 - \mu_2)}{\sqrt{1+ \sigma^2_1 + \sigma^2_2}})$  In this case, $\Phi(t) = \int_{-\infty}^t \mathcal{N}(x; 0, 1)\, \mathrm{d}x$ and $\mathcal{N}$ represents the normal distribution. $y$ is the observation and its value is +1 or -1.  One hint that they give is   $\int_{-\infty}^{\infty} \delta(y - sign(t)) \mathcal{N}(t; \mu, \sigma^2) \,\mathrm{d}t = \Phi(\frac{y\mu}{\sigma}) $   $ \Phi(y(w_1 - w_2)) = \int_{-\infty}^{\infty} \delta(y-sign(t)) \mathcal{N}(t; w_1 - w_2,, 1) \, \mathrm{d}t$.   $\delta$ is Dirac delta function which is use as indicator in the case of continuous variables.  However, I get stuck and dont know how to prove this. Would you please help me to prove?  Thank you.  Nam  P/S: The link of the slide is  and this course is over already.

Suppose $\phi(\cdot)$ and $\Phi(\cdot)$ are density function and distribution function of the standard normal distribution.  How can one calculate the integral:  $$\int^{\infty}_{-\infty}\Phi\left(\frac{w-a}{b}\right)\phi(w)\,\mathrm dw$$


I am not sure whether the following statement is true: $ ℤ^+ = ℕ$  if not, why?  Thank you in advance! I appreciate your help!

Is there a consensus in the mathematical community, or some accepted authority, to determine whether zero should be classified as a natural number?  It seems as though formerly $0$ was considered in the set of natural numbers, but now it seems more common to see definitions saying that the natural numbers are precisely the positive integers.


I have an ArcMap with ~200 layers from the same sde feature class.  After I finished adding all the layers it was brought to my attention that we need to add field alaises for the attribute table.  Does any one have a python script that will loop through all the layers in a map and add the aliases?

I have over a hundred FCs, each with 10 or 20 attributes to add or change the aliases for, two or more times a year. Needless to say, this is not something I'm going to grunt my way through. How can I automate this process?  Python solution preferred but will use anything that works.  I have access to Arcgis 9.3.1 and 10 (ArcInfo license level).


Why is there a total of 5GB of memory used when all the processes together only use over 2GB? Why does the system take so much RAM?

Since I upgraded to Windows 10, my system has been consuming RAM excessively    I've been reading a bit and determined it's likely a driver leaking memory. So I got myself the Windows Driver Kit and tracked memory usage with poolmon:    However, I don't really know how to proceed from here. Is the item tagged "smNp" the culprit in this issue? How do I go from there to actually identifying the driver?  I tried some stuff like "C:\Windows\System32\drivers>findstr /s smnp ." but it returned no results. I also took a look at the pooltag.txt file and this is the description I found for it:      So yeah, any help would be appreciated. Thanks in advance.


I am using the font IM FELL English PRO () via the fontspec package, and when I tried typesetting the characters \"{a}, \'{n} or \"{o}, I got this error:  xdvipdfmx:fatal: Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5) Output file removed.   Here is the MWE:  \documentclass{minimal} \usepackage{fontspec} \setmainfont{IM FELL English PRO} \begin{document} \'{n} \end{document}   I am using XeTeX version 3.14159265-2.6-0.99991 and fontspec version 2.4a. Another user also got the same error using LuaTeX with this MWE.  Those characters do exist in this font. There are other characters that give this error (e.g. ), but not all accented characters have the problem; e.g. \"{u} is ok. The error also goes away if I change to another font, such as Arial. There is another  where the OP there got the same error with some fonts but not others. It was suggested there for various reasons that I should start a new question.   The font developer Igino Marini told me the font had been generated in FontLab Studio and had passed the Microsoft Font Validator, and no problems have been reported to him outside of LaTeX.  Many thanks for looking into this.

I am having an error compiling the following code with xelatex and lualatex:  ** WARNING ** "seac" character deprecated in Type 2 charstring. ** ERROR ** Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5)  Output file removed.  \documentclass{article}  \usepackage{xunicode} \usepackage{fontspec}  \setmainfont[Mapping=tex-text,Ligatures={Common}, Numbers={OldStyle}]{IM FELL English PRO} \begin{document}  Buongiorno a tutti. Trallallà.  \end{document}   The error disappears when I omit the accented à. It also doesn't happen when I use other fonts.  Could you suggest any workaround?  Thank you, A


I'm doing a project where I need programming source code printed throughout a PDF, with syntax highlighting and keeping the original spacing and indentation intact so copy/pasting works. Because I also need the fontspec package, I can't use the answer from . I've been able to get it almost perfect with the listings package, but, although it prints the indenting fine, all leading indents/spaces aren't copyable!  I have tried most of the listings settings, many random hacks found online (most resulted in crashes or weird underscores rather than spaces), minted (crashed xetex (and yes, I am using --shell-escape)), verbatim, and verbments (crashed xetex also).  This is what I have so far:  \documentclass[12pt]{article}  \usepackage{color} \usepackage{fancyvrb} \usepackage{listings} \usepackage{textcomp}  \usepackage{fontspec} \setmonofont[Scale=0.8, Path=/usr/share/fonts/OTF/]{Inconsolata.otf}  %\setmonofont[Scale=0.8]{inconsolata} % can't find the font unless I do the above...  \lstset{     basicstyle=\small\ttfamily,     keywordstyle=\color{red},     identifierstyle=,     commentstyle=\color{blue},     stringstyle=\color{green},     showstringspaces=false,     tabsize=4,     numbers=left,     captionpos=b,     numberstyle=\tiny,     keepspaces=true,     numbers=none,     columns=fullflexible,     fancyvrb=true,     language=python     }  \begin{document}  And so we have the following...  \begin{lstlisting} # sample code def main():     i = 0     while i < 5:         print(i)         i += 1 \end{lstlisting}  \end{document}   Note that this appears fine on the pdf, but it loses the indentation spaces on copy/paste. Surely, by now, there is an up-to-date solution that will work with xelatex and not be pdf-viewer specific?

I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at the beginning of the line need to be be copied along with the text.  This question has been asked in various ways before (e.g. , or ). Those questions focus on making line numbers uncopyable, though.  Making the spaces at the beginning of a line copyable seems to be harder: "I am not sure it is possible to specify in the PDF (at least in a viewer-independent way) that the indentation should be copied too" (). At , Philippe Goutet suggests a solution (turning the spaces into visible spaces, and coloring them in the background color so that they appear invisible) that works using Acrobat Reader, but not all readers. He says "It works under Acrobat Reader and it's extremely pleasant to be able to quickly copy/paste code without problem (perhaps the problem can be circumvented by writing direct PDF code to tell that it's a space, I've never had the time to try)".  Is it possible to produce a PDF with a code listing with copyable real spaces at the beginning of a line?  Minimal example: The line return x should start with four spaces.  \documentclass{article}  \begin{document} \begin{verbatim} def myfunction(x):     return x \end{verbatim} \end{document}   I know that I could attach the code to the PDF as a file, but that's not what I want.


I know that it is 40 Upvotes per day but i have got 42 today,     How is this possible?? Why does this happened. Please explain.

And by someone, I mean that evil feline WesleyDavid:        That screenshot was taken just before 4pm PST, i.e. just before 0000 UTC.  That shows KittehHead's votes for the month, which is the same as for the day since it's March 1st.  Just to be sure it wasn't that SE had the time wrong, I tried upvoting something and got the expected "Daily Vote Limit Reached, Please Vote Again in 6 minutes."  So how did Kitteh^H^H^H^H^H^HWesley get 42 votes in one day?  ADDED: It's getting worse... Now it's March 2nd, and Wesley/Cat has 3 extra votes:        Now I finally got an extra vote (take that evil kitteh!), but it hasn't helped me understand why:


I want to build an index from, say, 13 variables. I run a PCA for these 13 variables to produce 13 principal components, 5 of which have an Eigenvalue of more than 1. While some researchers use only the first principal component as their index, this does not seem advisable here since PC1 only has a proportion of variance explained of 23%. So, does it make sense to sum PC = PC1 + PC2 + ... + PC5 as my index?

I am using Principal Component Analysis (PCA) to create an index required for my research. My question is how I should create a single index by using the retained principal components calculated through PCA.  For instance, I decided to retain 3 principal components after using PCA and I computed scores for these 3 principal components. What is the appropriate ways to create, for each respondent, a single index out of these 3 scores?   Is it relevant to add the 3 computed scores to have a composite value? Or to average the 3 scores to have such a value?  Or should I just keep the first principal component (the strongest) only and use its score as the index?   Alternatively, one could use Factor Analysis (FA) but the same question remains: how to create a single index based on several factor scores?


hi friends am using ubuntu 14.04 and am tired of searching software to make my laptop a hotspot i tried installing ap-hotspot but when i type sudo ap-hotspot start ,it freezes and when i type sudo ap-hotspot stop ,it displays not in active .so please help what is a best way to fix it.i even tried this  cd /tmp wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb sudo dpkg -i hostapd*.deb sudo apt-mark hold hostapd   note:I want this wifi for my android mobile

How to setup an Access Point (AP) mode Wi-Fi Hotspot?  Point to be noted: Wireless access points aren't the same as ad hoc networks. They differ significantly. In short, ad hoc networks aren't supported on newer devices and most Android, Windows Phone and Blackberry devices (and maybe iOS devices too), whereas AP mode Wi-Fi hotspots are. To get an idea about AP mode hotspots, ad hoc networks and their difference, refer to .


How can I prove that for all continuous $f$ $$\int\limits_{0}^{\pi}x\cdot f(\sin x)dx$$ $$=\pi  \int\limits_{0}^{\pi/2}f(\sin x)dx$$

Let $f(\sin x)$ be a given function of $\sin x$.   How would I show that $\int_0^\pi xf(\sin x)dx=\frac{1}{2}\pi\int_0^\pi f(\sin x)dx$?


Is there a modified version of Ubuntu that I can choose to load to RAM on start up? Kinda like the LiveCD, but that can be easily modified (ie: I can install stuff) when I choose to boot from disk.  The idea is to install it to a USB drive. I know there's  but slax is lacking in many departments. A "full" version Ubuntu would be better.  A LiveUSB installation seems to be pretty close to what I want, but apparently I have to choose whether or not it will be persistent by the time I install it. I want to be able to choose that every time I boot.

I have a live USB made with the standard Ubuntu disk image creator for 16.04 LTS. In the current state, I can boot to this disk, but it still requires the original USB to run properly at all times.  Attempting to pull the drive and use the system generates a large amount of I/O errors, further suggesting that the USB drive is actually needed for things not already loaded into RAM (For example, Firefox worked without the USB, but I used it once before already. apt, on the other hand, did not.)  Is there a way to copy the entire Ubuntu live disk to RAM, so I can remove the drive and free up a USB slot for other things?


The code I referred is in the link ->  In this example, in the copyrange method, they are using new operator like in the below code.    static void copyRange(T* begin, T* end, T* dest) {     while(begin != end)     {         new((void*)dest) T(*begin);         ++begin;         ++dest;     } }   Can anyone explain how new() works in this context?  Can I write new (dest) T(*begin); instead of new((void*)dest) T(*begin); since dest is already a pointer to T. Why should I cast it back to void*?

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


I am about to purchase a 35mm (Nikon 35mm F1.8 DX) for my APS-C camera, to get the equivalent of a 50mm lens. I want to use it for portraiture a bit, but I'm worried the facial deformations will equate to a 35mm lens (which would make it not that useful for portraiture).   Does a 35mm FX have the same facial/other deformations on an APS-C camera as a 35mm? Is this very similar with a 35mm DX lens (on an APS-C camera)? Is this the same situation for all other lens (when using an APS-C)?   Regards.

There was recently a video posted about how different focal lengths affect portrait photography, specifically how distortion at smaller focal lengths have more distortion and are less flattering.   So the question is that, because we always talk about how Canon's cropped sensors have a 1.6x crop factor so the lenses are essentially longer, does the distortion caused by the lens change when used on a cropped sensor?  My initial thought is "no" given that my idea of how a cropped sensor works is like printing off a 8x10 picture and then cutting out the 4x6 that I like: the picture doesn't change, only my view of it.   However, if distortion is least prominent at the center of the photo and most prominent at the edges, then the perception of the net effect of the distortion would be changed by using a cropped sensor and I get confused again.   Any thoughts?


I have the following object  b.push({ data: d, width: 5, color: color });   then I have   b= [{data:10,width:5, color:"yellow"},{data:12,width:5, color:"red"},etc...];   I added color property and now I do not need and I want to remove it. I would like to know what is easiest way to do it?

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


How do I randomize the numbers in a for loop in python 2.7.5?  The for loop looks like this:     for i in[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]: I already tried using the import random thing, maybe I wasn't using it right, but I don't know.

Assume I have the following list:  foo = ['a', 'b', 'c', 'd', 'e']   What is the simplest way to retrieve an item at random from this list?


Is every compact set is closed in any topological space ?  My attempt: I can say in usual topologies that every compact set is closed  but I'm confused in other topologies.

I feel really ignorant in asking this question but I am really just don't understand how a compact set can be considered closed.      By definition of a compact set it means that given an open cover we can find a finite subcover the covers the topological space.    I think the word "open cover" is bothering me because if it is an open cover doesn't that mean it consists of open sets in the topology? If that is the case how can we have a "closed compact set"?   I know a topology can be defined with the notion of closed sets rather than open sets but I guess I am just really confused by this terminology. Please any explanation would be helpful to help clear up this confusion. Thank you!


I want to study for a PhD in robotics. The research laboratory is a renowned one but the associated university is not. In fact, the laboratory is part of a research institute. Do you think that would be a desadvantage knowing that I intend to work in the industry after the Phd and not in academics?

What I'm trying to understand is, to what degree does the status/rank of the University (where one completes his/her Ph.D) matter while shaping his/her career after graduation? I would like to know the weight given to one's school in both the following cases:   While applying for post-docs/faculty positions in academia While applying to industrial research labs   For instance, I've read on some forums (I can't locate the link now) that while considering prospective applications for tenure-track faculty positions, very few Universities accept a candidate who has completed his/her Ph.D from a lower ranked school having a lesser "brand" value, irrespective of the fact whether he/she has published equally original work as his/her counterpart from an Ivy league college. How much truth is in this statement? It would be really great if someone already in academia, either as a newly-accepted faculty or someone on the Faculty Hiring committee could share their experiences/statistics on this regard. I'm simply interested to know the answer, without commenting at all on whether such a practice is justifiable.  Similarly, what about recruitment to internationally acclaimed research labs (like  or ) - what importance do they place on the pedigree of a candidate's college, before taking into consideration what they published ?  I'm personally interested in answers related to the field of Computer Science (theory), but the question is applicable to any prospective grad student in any discipline in my opinion. Feel free to share your personal experiences post-Ph.D in detail, as that would give me (and future viewers of this question) about what its like to carve a career once you are out of school!


i must use regex for part of my project. I want to seperate for AND,OR operators from given inputs. But i don't need operators which are situated in parentheses.  Example input : C1 OR [C2 AND C3] AND C4 OR C5 AND [C6 AND C7  OR C8 ] OR C9  Output : OR AND OR AND OR  Other Example input : C1 AND C2 AND [C3 OR C4] AND C5  Output : AND AND AND

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


As I'm preparing for my exam I have to solve the following question:  Determine if the following is correct: Let $f$ be a continuous function is $\Bbb R$. If $f$ recieves only rational values, thus $f(x)\in\Bbb Q$ for all $x\in\Bbb R$, then $f$ is a constant function.  My solution: The statement is not correct. Let $f$ be the following functoin: $f(x) = \begin{cases}x & x\in\Bbb Q \\ \lceil x \rceil & x \notin\Bbb Q  \end{cases}$ $f$ is continuous since $$\lim_{x\to x_{0}} f(x)=f(x_0)$$and certainly is not constant. Is my solution correct? Thanks.

Let $f\colon[0,1]\to\mathbb{R}$ be continuous such that $f(x)\in\mathbb{Q}$ for any $x\in[0,1]$. Intuitively I feel that $f$ is constant, since $\mathbb{Q}$ is dense in $\mathbb{R}$.  How can I formally write this down?


I sometimes encounter this message when I input some commands in the terminal.  Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/ethiojob/.config/fontconfig/fonts.conf manually   What's the message about, and how do I fix it so that it doesn't appear again?  I'm not sure if I should simply cut out the 14th line and paste it in the second file, or cut-paste the whole file together.

I upgraded from 12.04 to 12.10 with no problem. I am trying to edit the grub file, but in the console I get the following message:  Fontconfig warning: "/etc/fonts/conf.d/50-user.conf",   line 9: reading configurations from ~/.fonts.conf is deprecated   As a result, I see nothing when the editor opens. Is there a fix for this? I can't find much information on Google.


My friend and I wanted to play together on my singleplayer world opened to LAN but we couldn't.   It kept displaying this message endlessly, but no matter how many times we tried to restart the worlds, Minecraft, or the computers, we still couldn't find my LAN world.     Scanning for games on your local network   We have both checked the most basic things (we are within the same network, we were playing on the same version (1.9) and our firewalls are allowing everything), we didn't have mods on, and we were each using a separate paid MC account.   I've searched around a little, and it seems like this is a very common problem for players on Minecraft 1.9 so I was just wondering if it was a problem with the new 1.9 update?

My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?


If $a_n$ are positive real numbers such that $$ \sum a_n$$ converges, what can be said about $$\sum a_n^{\frac{n-1}{n}} ?$$     To see how the land lies let's test a few standard cases.    If we have a converging geometric series $a_n=aq^n, 0<q<1$, $a>0$, then for all $n\ge1$ $$a_n^{(n-1)/n}=a^{(n-1)/n}q^{n-1}\le Aq^{n-1}$$ with $A=\max\{1,a\}$. Meaning that the new series is majorized by a converging geometric series. If $a_n=1/n^{1+\epsilon}$ for some $\epsilon>0$, another standard converging test series, then, for $n>2/\epsilon$, we have $(n-1)/n>1-\dfrac\epsilon2$, and consequently $$a_n^{(n-1)/n}<\frac1{n^{(1+\epsilon)(1-\epsilon/2)}}.$$ Meaning that we have again a converging majorant as the exponent is a constant $>1$.   But what happens in general?

Yesterday I stumbled across an interesting exercise (Indam test 2014, Exercise B3):     (Ex) Given a positive sequence $\{a_n\}_{n\geq 1}$ such that $\sum_{n\geq  1}a_n$ is convergent, prove that $$ \sum_{n\geq  1}a_n^{\frac{n-1}{n}}$$ is convergent, too.   My proof exploits an idea from Carleman's inequality. We have: $$ a_n^{\frac{n-1}{n}}=\text{GM}\left(\frac{1}{n},2a_n,\frac{3}{2}a_n,\ldots,\frac{n}{n-1}a_n\right) $$ and by the AM-GM inequality $$ a_n^{\frac{n-1}{n}}\leq \frac{1}{n}\left(\frac{1}{n}+a_n\sum_{k=1}^{n-1}\frac{k+1}{k}\right)\leq \frac{1}{n^2}+\left(1+\frac{\log n}{n}\right)a_n $$ hence $$ \sum_{n\geq 1}a_n^{\frac{n-1}{n}}\color{red}{\leq} \frac{\pi^2}{6}+\left(1+\frac{1}{e}\right)\sum_{n\geq 1}a_n.$$  Now my actual      Question: Is there a simpler proof of (Ex), maybe through Holder's inequality, maybe exploiting the approximations   $$ \sum_{m<n\leq 2m}a_n^{\frac{2m-1}{2m}}\approx \sum_{m<n\leq 2m}a_n^{\frac{n-1}{n}}\approx \sum_{m<n\leq 2m}a_n^{\frac{m-1}{m}}$$   "blocking" the exponents over small summation sub-ranges?


I don't quite understand the usage of classes and import. I have two files as follows: file test1.py contains the following: class myClass:     def __init__(self):         pass # do nothing     def update(self):         print("test1")         return  # test this module m = myClass() m.update()   file test2.py contains the following: from test1 import myClass m = myClass() m.update()   when I run the module test2.py, it prints the following two lines of text: test1 test1   Why does it print "test1" two times?  I only want to use the class myClass.  I don't want test2.py to execute the test program that is in test1.py.

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


Is there a meaning difference between started to go and started going in this example sentence?      "...", he said and started to go/going away.

Is there a subtle difference between these fragments:  Jack walked over to the car, opened the door, and started to look for the aspirin vial in the glove compartment. Jill looked on skeptically. Jack walked over to the car, opened the door, and started looking for  the aspirin vial in the glove compartment. Jill looked on skeptically.


We know that some people were aware of the fact that Lord Voldemort was Tom Marvolo Riddle prior to his return in Goblet of Fire; at the very least his close soon-to-be-Death-Eater "friends" and Albus Dumbledore:  “Very few people know that Lord Voldemort was once called Tom Riddle. I taught him myself, fifty years ago, at Hogwarts..." ... underwent so many dangerous, magical transformations, that when he resurfaced as Lord Voldemort, he was barely recognizable. Hardly anyone connected Lord Voldemort with the clever, handsome boy who was once Head Boy here.” (Professor Dumbledore to Weasleys, Chamber of Secrets, CHAPTER EIGHTEEN, Dobby’s Reward)  and  “Voldemort,” said Riddle softly, “is my past, present, and future, Harry Potter…” He pulled Harry’s wand from his pocket and began to trace it through the air, writing three shimmering words: TOM MARVOLO RIDDLE Then he waved the wand once, and the letters of his name rearranged themselves: I AM LORD VOLDEMORT “You see?” he whispered. “It was a name I was already using at Hogwarts, to my most intimate friends only, of course. ...  (Tom's Diary manifestation in the Chamber of Secrets).  QUESTION: Who - based on canon (books/interviews/pottermore) - knew about the fact that Lord Voldemort was Tom Marvolo Riddle prior to Ginny being taken to the Chamber of Secrets? Obviously, Albus Dumbledore and Tom himself. Who else?

Often called "He-Who-Must-Not-Be-Named" and "You know who", was it common knowledge at the Ministry of Magic that Voldemort was the same person as Tom Riddle?


I don't understand why I'm having this errors and how to solve them, on the following code in mine MainActivity file. I've searched on Google but I can't relate the solutions to mine code. I have also passed -Xlint:unchecked to javac, but can't get any wiser either.   I'm pretty new to Android and Java programming and trying to solve any highlights in mine code.  Thanks in advance.     Unchecked assignment: 'java.util.ArrayList' to   'java.util.ArrayList' less... (Ctrl+F1)  Signals   places where an unchecked warning is issued by the compiler, for   example:      void f(HashMap map) {       map.put("key", "value");   }    Hint: Pass -Xlint:unchecked to javac to get more details.        Unchecked call to 'ArrayList(Collection)' as a member of   raw type 'java.util.ArrayList' less... (Ctrl+F1)  Signals places where   an unchecked warning is issued by the compiler, for example:      void f(HashMap map) {       map.put("key", "value");   }    Hint: Pass -Xlint:unchecked to javac to get more details.     private void readItems() {     File filesDir = getFilesDir();     File todoFile = new File(filesDir, "todo.txt");     try {         items = new ArrayList<>(FileUtils.readLines(todoFile));     } catch (IOException e) {         items = new ArrayList<>();     } }

For example:  javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.


The coding convention at the company I'm working for requires to let any private member variable have the prefix _. I know that it is forbidden in plain C and I also know the text from the ISO/IEC:9899 where it is stated as reserved.  I was looking up in the N3690 document for finding anything stating about it, but I couldn't find. So I wasn't able to find anything that forbids me using this prefix in C++ standard, but I might just have overlooked something that was stated like "C++ behaves in regards to ........ same as mentioned in the C standard section....."  So I'm just asking you for helping me finding the exact phrase for C++ (11 preferred) that is reserving the _ same as it is in C.  Since C++ implements libraries and all this stuff from C, it feels wrong using identifier in C++ that are explicitly stated as reserved in C. But for criticizing our coding convention I should at least be able to find a base against it, but currently I'm just able to argue. (And can't even verify that I'm right so far regardless of I couldn't imagine that I'm wrong.)

It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo occasionally.  C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo. Is this allowed by the C++ standard?


So I was looking for free tree assets to add to my game and was trying to split the leaves from the trunk. The model is all in one object so I can't just delete it. Any ideas?

I've just made a set of armor by using a male body mesh model I downloaded and selecting certain faces from the model and duplicating them to create viable armor pieces.   Since the pieces are just duplicated from the same mesh male model, then it's still part of the same object.   How do I separate the armor piece from the model to make the pieces separate?


I accidentally typed while(x,0) instead of while(x<0). The code of course didn't work as planned nor got compiler errors so i took a damn hour to find the mistake.  Why it didn't get a compiler error? And what does the , do in the while loop?


While trying to install Ubuntu one it throws me this error -   W:Failed to fetch http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu/dists/**DISTRIBUTION**/main/binary-amd64/Packages 404 Not Found, W:Failed to fetch http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu/dists/**DISTRIBUTION**/main/binary-i386/Packages 404 Not Found, E:Some index files failed to download. They have been ignored, or old ones used instead.   and I can't install it Thanks.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I am trying to crack a SHA-256 hash but I am not sure how to approach this in an efficient way. The following is known of the original non-hashed content:   64 characters long only consists 0-9 and a-z (no capital letters) the original content does not consist dictionary words the hash is not salted   I have done some reading on the subject of cracking hashes and some information I have read is conflicting. For example, one said on a public forum that SHA-256 is virtually impossible to crack while the other said that it's a rather poor method for password storage as it could be cracked easily.  Is SHA-256 a safe method to hash passwords with (if not, what are the alternatives) and how do I crack a given hash in an efficient way (assuming the given criteria above).  Thanks in advance!

Using a cryptographic hash to store e.g. passwords in a database is considered good practice (as opposed to storing them plaintext), but is subject to attacks on said cryptographic hash, assuming the database is compromised.  Which properties of a cryptographic hash function make it suitable for hashing passwords and the like?  Which functions are secure enough, while still being widely available, without patent issues and not too computationally intensive?


I trying to show  $$ \lim_{x\to\infty} \left(\frac{x}{x+1} \right)^x $$  I know the answer using wolfram or a calculator,  but I stuck trying to figure out how to apply L'hopital.

I need to find the following:  $$\lim_{x\to\infty} f(x)= \lim_{x \to \infty}\left (\frac{x}{x+1} \right )^x$$  I know that this limit = $\frac{1}{e}$ from plugging it into a calculator, but I have to prove it without using the fact that:  $$\lim_{x\to\infty} f(x)=\lim_{x \to \infty}\left (\frac{x}{x+k} \right )^x=\frac{1}{e^k}$$  I started by exponentiating:  $$\lim_{x\to\infty} f(x)=\lim_{x \to \infty}e^{\ln \left (\frac{x}{x+1} \right )^x}$$  and from here I've dropped the exponent $x$ in front of the $\ln$, and from here I'm getting stuck. Should I separate the $\ln$ like this?  $$\lim_{x\to\infty} f(x)=\lim_{x \to \infty}e^{x(\ln(x)-\ln(x+1))}$$  This doesn't seem to be leading me down the right path, but I'm not sure how else to do it. Is there a way to apply L'Hopital? If so, how?


When I try to scale down a circle by entering a number in inches, blender takes that number as a percentage and scales accordingly. How do I change that to equal inches?

Let's say I have a ring of vertices that I'd like to scale down, and I'd like them all to move by a fixed amount, like 1mm (I usually work with metric units). What's the easiest way to achieve this? If I type '1' it just sets the scale to 1 and they don't move.    The only way I've come up with to do this is to extrude a vertex along one of the axes by 1mm, and then snap the scale movement to that vertex.      This is a pain though, and if I don't have a vertex that happens to lie on an axis I can't do the little extrusion trick and it doesn't work at all. I do a lot of modeling for 3d printing, and I end up needing to do this all the time. Hoping there's a better way to do this.


After updating MikTex last night I am getting the error message in subject when trying to install or update the packages.  By default I was using  but to try and recover from this error I switched the updater to use the "nearest" repository which happened to be  and that also threw the same error.  Then I changed the updater to "allow me to choose the package repository" but the list that comes next is empty.  Did the last night's update to MikTex break the repository listing/querying in general, or something is wrong with my installation?

In MiKTeX 2.9 Package manager, when I'm trying to synchronize it writes me a message: "The remote package repository is not online...", but I'know server is online (I can use FTP to download packages manualy). When I'm trying to change repository it shows me empty list. Like that:   What can I do to fix this without manual downloading packages from repo?


After trying in vein to get  and zgis working with my postgresql database in arcgis 9.3 and 10 , I was wondering if anyone has had any luck with these products.  My postgresql database has been serving geospatial data for 2 years through geoserver and can be edited in quantum gis fine....so why not in ArcGIS?  Does anyone have any other recipes for using postgresql data with arcgis but WITHOUT ArcSDE?

Has anyone used PostgreSQL with PostGIS successfully?   I am a semi-experienced ArcGIS user and want to build out a database and connect it to ArcCatalog.   I've scoured the internet for resources but nobody has really given a good walkthrough.


If you read any text on Physics then you would reorganize after enough time that  Yes language of physics (Nature) is mathematics. I'm letting this discussion to opinion-based nor some philosophy of science. So when I say the word energy I know How do I say the same thing mathematically or velocity or position etc. But I found some of the words that play a central role but I didn't found any mathematical words to describe them Like in special relativity.  A reference frame is a way of labeling each event with its location in space and the time at which it occurs.  I'm here concern with the word event. What do we mean by an event? The emission of the photon is an event, the transition of an electron is an event, electron kick out of the atom is an event. If there is a thing, there is an event. The example seems plausible, but How do we define an event (Mathematically if possible)? I have a similar problem with the word cause and effect. See the following sentence.  To be able to make sense of cause and effect, only events in our past can influence us, and we can influence only events in our future.  This doesn't make sense to me what we mean by influence. I know what it meant in a daily sense, If a bullet gets through me, it's going to influence me, But really I don't get it mathematically when do I say something influencing me. Can anyone help me through this?

I was reading  by Pedro Domingos and towards the end of the paper he makes this statement:  "Many researchers believe that causality is only a convenient fiction. For example, there is no notion of causality in physical laws. Whether or not causality really exists is a deep philosophical question with no definitive answer in sight..."  I was surprised by this statement because apart from Heisenberg's uncertainty principle, everything else (that I know of) in physics seems to operate under the assumption of . If you have an equation that describes a definitive outcome as the result of some input factors, then it is describing a causal relationship, is it not?


I have a dataset with 2000+ feature based on addresses. I need to zoom to each point individually and move them a little (no consistent shift so no other way to do it).  Selecting the next feature in the attribute table and hitting the "zoom to selected" is a bit tidious. Is there a way (or python script) to assign a hotkey which automatically selects and zooms to next feature?

I often need to view on the canvas the (selected or not) features from the current active vector layer.  In this situation, I only need to view something on the canvas, without doing anything on the canvas itself (so, the active window is always the Attribute Table).  This is what I usually do:   Open the Attribute Table for the current active layer; Select the first feature; Press Ctrl+P button (i.e. the "Pan map to the selected row" button); Minimize the Attribute Table; View something on the canvas for the current feature; Go to the first step until needed.   Is there a way (a method, a shortcut) for directly browsing every feature on the canvas without the needing of going backwards and forwards with the Attribute Table? I mean, something like a "next" button?  (I may use the workaround of splitting the windows of the Attribute Table and of the canvas within the monitor, or also docking the Atrribute Table, but I would like to work on the full QGIS window).    EDIT I saw that my question was casted as a duplicate of  question. The two questions are very similiar, but I think it should be left as open for two reasons:   the related duplicated question doesn't have an accepted answer; my question is slightly different because I'm looking for the possibility of displaying only the selected features (and the @Joseph's , that I marked as accepted, answers well to my request).