So I saw some similar questions here but I just could not understand them.  My table:  'timestamp' int(30) NOT NULL, 'clientguid' varchar(32) NOT NULL, 'clientip' varchar(32) NOT NULL, 'serverip' varchar(32) NOT NULL)   I have 4 variables  $TimeStamp $ClientGUID $ClientIP $ServerIP   My query should do this: if there is a row with clientguid that matches $ClientGUID:  UPDATE 'mytablename' SET 'timestamp' = '$TimeStamp','clientip' = '$ClientIP','serverip' = '2.2.2.24' WHERE 'mytablename'.'clientguid' = '$ClientGUID');   If there is not a row matching that:  INSERT INTO 'mytablename' ('timestamp','clientguid','clientip','serverip')  VALUES($TimeStamp,'$ClientGUID', '$ClientIP', '$ServerIP');   I don't have to worry about escaping and validating, that has already been done I just need a statement that will accomplish this. :)

Is there some clever way to do this in SQLite that I have not thought of? Basically I want to update three out of four columns if the record exists, If it does not exists I want to INSERT the record with the default (NUL) value for the fourth column. The ID is a primary key so there will only ever be one record to UPSERT. (I am trying to avoid the overhead of SELECT in order to determine if I need to UPDATE or INSERT obviously) Suggestions?  I cannot confirm that Syntax on the SQLite site for TABLE CREATE. I have not built a demo to test it, but it doesn't seem to be supported. If it was, I have three columns so it would actually look like: CREATE TABLE table1(      id INTEGER PRIMARY KEY ON CONFLICT REPLACE,      Blob1 BLOB ON CONFLICT REPLACE,      Blob2 BLOB ON CONFLICT REPLACE,      Blob3 BLOB  );  but the first two blobs will not cause a conflict, only the ID would So I assume Blob1 and Blob2 would not be replaced (as desired)  UPDATEs in SQLite when binding data are a complete transaction, meaning Each sent row to be updated requires:  Prepare/Bind/Step/Finalize statements unlike the INSERT which allows the use of the reset function The life of a statement object goes something like this:  Create the object using sqlite3_prepare_v2() Bind values to host parameters using sqlite3_bind_ interfaces. Run the SQL by calling sqlite3_step() Reset the statement using sqlite3_reset() then go back to step 2 and repeat. Destroy the statement object using sqlite3_finalize().  UPDATE I am guessing is slow compared to INSERT, but how does it compare to SELECT using the Primary key? Perhaps I should use the select to read the 4th column (Blob3) and then use REPLACE to write a new record blending the original 4th Column with the new data for the first 3 columns?


I'm asking if when I use extra attack, can I attack then cast a spell then bonus attack?

The War Magic feature of the Eldritch Knight states (PHB p. 75):     when you use your action to cast a cantrip [or at level 18+ a spell], you can make one weapon attack as a bonus action.   I'm quite confused: if I take that bonus action will the extra attack apply to it?


so i have a question on hashcode() and equals() method  Let's say I just write a very basic program overridng both the methodes  import java.util.*;  class Employee {    private String name;    private int empid;      public Employee(String name,int empid)    {        this.name=name;        this.empid=empid;    }      public int getEmpid()    {        return empid;    }      public String getName()    {        return name;    }      public boolean equals(Object obj)    {        System.out.println("equals has just been called...");        Employee e1=(Employee)obj;        return ((name.equals(e1.name)) && (empid==e1.empid));    }      public int hashCode()    {        System.out.println("hashcode called...");        return empid;    }  }   Then, let's say I write another class to add and iterate the elements in HashSet  class Five {    public static void main(String args[])    {        HashSet hs1=new HashSet();        hs1.add(new Employee("Alex",25));        hs1.add(new Employee("Peter",25));        hs1.add(new Employee("Martin",25));        hs1.add(new Employee("Alex",25));          Iterator itr=hs1.iterator();         while(itr.hasNext())        {            Employee e=(Employee)itr.next();            System.out.println(e.getEmpid()+"\t"+e.getName());        }       }  }   now the question is  when i try to add Alex again with the same empid the equals() always called thee times  as there is no index n hashmap so in case if it first be checked with previously added Alex it will return true and should not be called for the other two elements (peter and martin) but equals always called 3 times  why..??  is objects within same bucket do also have the index..??

What issues / pitfalls must be considered when overriding equals and hashCode?


I was writing this sentence:     Why are there more of them on some nights than on others?   Is is or are correct here? I was told that is is correct, but to me, are sounds better.

There are so many questions on this website. There is so many questions on this website.  The former "sounds right," but the contracted form of the latter does as well:  There's so many questions on this website.  Which is correct?


Say that I have this line of code:  Action<int> square = number => Console.WriteLine(number * number);   Though I understand that it is handy to create a method on the fly, if you only need to call the lamda expression once, does it gain any perfomance by doing so?  In addition, let's say I do something more with the value before the WriteLine:  Action<int> square = number =>   {     number += 10;     Console.WriteLine(number * number); };   I could just solve this very simple by adding 10 to number and then do number * number without the lambda expression. Can anyone give me a good example/situation when to use this expression?

What are some real world places that call for delegates?  I'm curious what situations or patterns are present where this method is the best solution.  No code required.


I have a log file that saves this kind of lines every time a file cannot be extracted from a tar.  tar: foto/201802131354184186718718.xml: No se puede efectuar open: File exists tar: foto/201802131365468046840684.xml: No se puede efectuar open: File exists   I need to get the text inside the first pair of colons ":"  Example  foto/201802131354184186718718.xml foto/201802131365468046840684.xml   I've tried using grep but i get this:  $ grep -oP '\:\K[^\:]+' 20180213.tmp   foto/201802131354184186718718.xml  No se puede efectuar open  File exists  foto/201802131365468046840684.xml  No se puede efectuar open  File exists

I have requirement that i need to extract string using quotes. My string as follows.  "abcd efgh" "ijkl mnop" "qrst uvwxyz"   can you help me to get the string between second double quotes(ijkl mnop) using sed or grep command.  In other words if I say give me the string in first quotes I want the  first string; if I say second string it should give me string between second double quotes and similarly third one also.


I want to run a script as root after a login as a regular user in GDM.  Thanks

Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one.   Thanks!


My sons math teacher said that .9 repeating is equal to 1. With the argument that 1/3 =.3 repeating, 2/3= .6 repeating, and 3/3 = 1.  My arguement is that 1/3 is not actually = to .3 repeating and that as expressed as a decimal, is as close as we can get.  Thoughts?

I read the following in a wikipedia article about 0.9999...:     A third derivation was invented by a seventh-grader who was doubtful over her teacher's limiting argument that $0.999... = 1$ but was inspired to take the multiply-by-$10$ proof above in the opposite direction: if $x = ...999$ then $10x =  ...990$, so $10x = x − 9$, hence $x = −1$ again."   If $x=0.999.......9$, then how can $10x=......90$? It must be $9.9999.....9$.


I have 2 unconnectable controller now after connecting to PC I tried connecting using every method I read but none of them work. now I can't even connect back to the PC both Bluetooth and wired doesn't work. all I can connect to is my Iphone

I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help?


I can't solve this problem, spent a lot of time, just no result  $$ x^4-7x^3+14x^2-7x+1=0 $$  PLEASE HELP

By using the substitution $p=x+\frac{1}{x}$, show that the equation $$2x^4+x^3-6x^2+x+2=0$$ reduces to $2p^2+p-10=0$.  I can't think of anything that produces a useful result, I tried writing p as $p=\frac{x^2+1}{x}$ and finding areas to substitute but have come with no progress. Could someone offer a slight hint on how to proceed?  Thanks


I need to perform clustering and classification of time series of weekly sales of different products. My data are weekly sales of different products in differest areas (stores). The challenges on this problem are:  - Time-series are usually short: 10-52points(weeks).  - Time-series may have a lot of zeros - sparce data. Products do not sell every week.   - Not all products start to sell on the same date. This can result in time-shifted time-series. Even the same typical lifecycle of a product can be time-shifted in calendar along different stores.   - Sales may have noise such as random events, promotions etc.  A sample of data is like this:  20140105,prod1,store1,5 20140119,prod1,store1,10 20140126,prod1,store1,2 .... 20140105,prod1,store2,2 20140112,prod1,store2,3 .... 20140112,prod2,store3,4 20140126,prod2,store3,7  Can somebody share any insight on how to do this? Is it good to use a method such as DTW to compare time-series?If so, how am I going to handle the timeshifts? As for the implementation R seems a good way to go. Which packages would you recommend?

I have a question about cluster analysis. There are 3000 companies, which have to be clustered according to their power usage over 5 years. Each company has values for every hour during 5 years. I would like to find out if some companies have the same pattern in usage power over the time period. The results should be used for daily prediction of power usage. If you have some ideas how to cluster time series in SPSS, please share with me.


Close vote review queue ! Currently it has 101.7k questions pending. My idea, based on a simple research from  is to introduce another queue that will partially balance the close vote queue. It should work as follows:   Questions from users with less than, let's say, 10 rep won't be shown immediately on the site. Instead they would go to a buffer, namely: Novice questions approval queue. This queue would be presented along with other queues on the , and would be available for users with, let's say, at least 2000 rep. For each presented question, in most simple version, there would be two options: Approve and Reject (possibly also Edit & Approve). The new queue could of course offer some gamification infrastructure: small rep rewards for reviewing for users, lets say, under 3000 rep, and analogously to other queues: badges. If in the meantime OP would manage to earn enough rep, their question would get published automatically.   Roughly relating to  if we assume that all users that were to ask "good questions" (score 3 or more) would be completely discouraged by this policy and give up asking at all, we would lost 2% of "good questions", while the Close votes queue length would be reduced by 23%. What's more important, it seems that the queue would at least grow slower then now.  Differences from First posts queue:   First posts queue handles both questions and answers. The latter do not seem a big problem on SO. This queue would somehow shield the page and close vote queue from very low quality questions. First post queue is based on the post being ... a first post :) This queue would work with regard to rep.   EDIT: In response to some points made in the comments&answers:   This would not prevent people from posting completely. Earning 10 rep isn't much work, and would give them right to post without review.  Any arguments in regard to gamification encouraging bad behaviour are not specific to this proposal - they describe valid problems, but in regard to the gamification idea in general. I think that this would introduce better behaviour of the queues (instead of one Close votes queue): for example it's very easy not to approve a question by a lazy programmer, who didn't even bother to spell correctly. Such easy to review questions are currently hidden in thousands of other, more complicated cases in the Close votes queue. two smaller problems are easier to handle than one big problem :)

Lately I've noticed that in some groups the quality of the questions have dropped significantly or are in general pretty low. A lot of these questions are closed, and the amount of closed questions are becoming rather annoying. Most of these questions have one thing in common; they are asked by new users that obviously have not read the available information on asking questions. Take a look at the facebook group for instance where in this specific moment of time 20% of the 50 most recent questions are marked as closed, and where all except 1 were asked by new users with a reputation of 1.  I'd like to see some kind of an approval system for questions asked by new users, or even for experienced users that have never asked a question before. A system where the first 3 questions or so have to be reviewed and approved by more experienced users before being published on the site. Once a user has at least 3 approved questions and an approval rating of at least 75%, the user's questions will no longer have to go through the approval system.  Is anything like this planned for the future?


Searching this only found answers in C++, which I know plenty well already, but how do I do this in Java? I found answers that suggest I need to do the following:  class FixedArray<T> {      public FixedArray(byte size) {         array = new T[size];     }      private T[] array; }   ... but I get the error  Type parameter 'T' cannot be instantiated directly

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I have a .csv file with no headers and want to have each line saved as a separate .csv file with the new file name to be the value in column 2.

I have a csv file on a Linux machine like this:    value1 value2 name   1      2      a   2      3      b   4      5      c     What I want is to split the n entries in this csv into n text files with just the corresponding numbers in that file separated by space. N is determined by the value in name.    So above csv would become:   a.txt containing 1 2 b.txt containing 2 3 c.txt containing 4 5     In case there are multiple entries for a particular name then those should go together to one file.   Ex if there was     1  2  a    21 31 a   then there should be a single a.txt with   1  2      21 31


From what I've readed, a resistor is a component which limit the current in a circuit. Supposing that I've a load that is rated for 12v 500mA, if I put a resistor to limit the current to, for example, 100mA what will happen to the load that expect to draw more current? Will it drop more voltage?

OK, very basic question here.  I read lots of books, searched quite a bit, and every description I read seemed to talk about the flow of electrons and right away go too deep in theory for me to grasp the basic principle of their use.  I understand a resistor limits the "flow", so that an LED doesn't blow up for example. But I fail to understand exactly what a resistor does to current and voltage...  Do resistors affect both current and voltage? In what manner?


i am trying to force some change  on an input button with inline style. I use the html  function of jQuery. It works the first time when i click on the + button, but not working when i click on the - button
<input type=button  value='-' id='bouton_moins' style='background-color:green !important'>

<input type=button  value='+' id='bouton_plus' style='background-color:red !important'>
   $('#bouton_moins').click(function(){  $('#div_bouton_plus').html("<input type=button  value='+' id='bouton_plus' style='background-color:red !important'>") $('#div_bouton_moins').html("<input type=button  value='-' id='bouton_plus' style='background-color:green !important'>"); });   $('#bouton_plus').click(function(){  $('#div_bouton_plus').html("<input type=button  value='+' id='bouton_plus' style='background-color:green !important'>"); $('#div_bouton_moins').html("<input type=button  value='-' id='bouton_plus' style='background-color:red !important'>");   });     thanks all

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I recently purchased a 1 TB Seagate ST31000528AS drive and I have Windows 7 RC (build 7100 installed on it). I've noticed that whenever the computer is idling, the hard drive light tends to blink at a rate of about once per second. What are the possible reasons for this?  As far as I can tell there should be no disk activity (all non-essential services are switched off and if there's some amount of swapping going on, then I would assume the drive activity would be a little more erratic that that.  At the same time I've installed  but it doesn't blink at the rate of 1 per second. So I'm inclined to believe that there's really no read-write activity taking place.  Bottom line..what's with the blinking lights?

The light blinks faintly about once a second.   It is slowly driving me insane.  How do I find out which program is causing this, so I can disable it?  Acer 5274 laptop/core i3 Windows 7 Home Premium Hitachi HTS545050B9A300 hard drive


Whenever I try to add folders to git hub it gives "files are empty" am i missing something? Anyone know why? It seems to me that I'm adding the folders wrong.

How can I add an empty directory (that contains no files) to a Git repository?


Im new to java so i imagine this is a very obvious question but for the life of me i dont know why this dosent work, i am extremely cluless  public class start {  public static void main(String[] args){      Shop shop = new Shop();     shop.tellMe(); }  static class Shop{     Item wares;       void tellMe(){         this.wares.itemOut();     } }  public class Item{     int price = 0;     String name = "Sunglasses";      void itemOut(){         System.out.println(price + " " + name);     } }   }  I feel like this should work, but when i run it i get   Exception in thread "main" java.lang.NullPointerException at start$Shop.tellMe(start.java:14) at start.main(start.java:6) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)m

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?


What does the alert box statement "suggestd quit unexpectedly" mean?  It turned up on my iMac , OS Sierra 10.12.  I have attached a screenshot.

I've been running OS X 10.11 without issues since it was released — until today, when suggestd began repeatedly crashing (from every few minutes, up to every 30 seconds).  What is suggestd and how do I disable it (since it's only function appears to be to crash)?    Process:               suggestd [23293] Path:                  /System/Library/PrivateFrameworks/CoreSuggestions.framework/Versions/A/Support/suggestd Identifier:            suggestd Version:               1.0 (354.10) Code Type:             X86-64 (Native) Parent Process:        ??? [1] Responsible:           suggestd [23293] User ID:               501  OS Version:            Mac OS X 10.11 (15A284) Report Version:        11  System Integrity Protection: enabled  Crashed Thread:        3  Dispatch queue: com.apple.NSXPCConnection.m-user.com.apple.rtcreportingd  Exception Type:        EXC_CRASH (SIGABRT) Exception Codes:       0x0000000000000000, 0x0000000000000000 Exception Note:        EXC_CORPSE_NOTIFY  Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'RTC config incorrect - no backends found;' abort() called terminating with uncaught exception of type NSException


In my opinion identical in what they say. Is this correct or is there a subtle difference?Very rarely do I see the second form but it has to have the same meaning. What about "It is" constructions? "It is fun to play." can be said although with focus on the "it" but I am not sure if you can do this with gerunds, "It is fun playing." Id say no. But I think I heard something like "It was fun meeting you." Is there a stop in this "It was fun.Meeting you." When talking?

In Italian, when I write a sentence about an action (e.g. eating fish, playing), I would use the infinitive, such as  mangiare pesce fa bene alla salute (which literally is "to eat fish is healthy"), or giocare aiuta ad imparare (which literally is "to play helps to learn").   I would use the gerund in giocando si impara, but that would roughly mean "When playing, you learn." and in this case the infinitive would not be correct. (Giocare si impara is not what you would say in Italian.)  Should I use the infinitive, or the gerund, in sentences similar to the following ones?   To play with fire is dangerous. To win the lottery is just a matter of luck. To escape from Alcatraz is impossible. To practice makes you perfect.   Is the infinitive always wrong, when the verb is the subject of a sentence?


i want to know why  are spiral in nature.. let us say there is some sort of intense mass (black hole?) at the centre of our milky way galaxy. the intense gravitaional pull is keeping evey solar system to revolve around it. thats clear, because that is what is happening in our solar systm too. but the planet goes round around the sun (ellipticaly, to be correct). but i recently saw pics of galaxies and they were spiral..? if the gravitational pull is keeping every solar system to revlove around the centre of galaxy, what different force is giving them the spiral shape? i mean, spirals are created in viscous material (water, air) but the universe is all vacuum..? then how are galaxies spiral in nature?

Question: As we know, (1) the macroscopic spatial dimension of our universe is 3 dimension, and (2) gravity attracts massive objects together and the gravitational force is isotropic without directional preferences. Why do we have the spiral 2D plane-like Galaxy(galaxies), instead of spherical or elliptic-like galaxies?   Input: Gravity is (at least, seems to be) isotropic from its force law (Newtonian gravity). It should show no directional preferences from the form of force vector $\vec{F}=\frac{GM(r_1)m(r_2)}{(\vec{r_1}-\vec{r_2})^2} \hat{r_{12}}$. The Einstein gravity also does not show directional dependence at least microscopically.  If the gravity attracts massive objects together isotropically, and the macroscopic space dimension is 3-dimensional, it seems to be natural to have a spherical shape of massive objects gather together. Such as the globular clusters, or GC, are roughly spherical groupings , as shown in the Wiki picture:     However, my impression is that, even if we have observed some more spherical or more-ball-like , it is more common to find more-planar  such as our ? (Is this statement correct? Let me know if I am wrong.)  Also, such have a look at this more-planar Spiral "galaxy" as this NGC 4414 galaxy:    Is there some physics or math theory explains why the  turns out to be planar-like (or spiral-like) instead of spherical-like?  See also a   p.s. Other than the classical stability of a 2D plane perpendicular to a classical angular momentum, is there an interpretation in terms of the quantum theory of vortices in a macroscopic manner (just my personal speculation)?  Thank you for your comments/answers!


On every metric space $(T, d)$ metric $d:T^2 \to \mathbb{R}$ is continuous function? How to prove it?

Where $ (X, d) $ is a metric space. I want to prove it using sequential criteria.  How do I tackle it?


my question is about the linear fit and the least squares method.  Why do we decide to minimize the quantity   $$ S = \sum_{i=1}^n r_i^2 $$  instead of this one:  $$ r_i = y_i - f(x_i, \beta) $$  ?  Let's think at the least squares fit intuitively: I want to find a straight line which approximates the distribution of some points in the $xy$ plane. The first thing I think is that it is good to find a line such that its distance $(r_i)$ from each point is minimum, not necessarily the square of that distance. Why this choice?

I've been wondering for a while now if there's any deep mathematical or statistical significance to finding the line that minimizes the square of the errors between the line and the data points.   If we use a less common method like LAD, where we just consider the absolute deviation, then outliers make less difference to the final model, while if we take the cube of the error (or any other power higher than 2), then outliers are far more significant than with the least squares model.  I suppose what I'm really asking is mathematically, is raising the error to the power of 2 really that special. Is it say more "accurate" in some sense than raising the error to the power of 1.95 or 2.05???   Thanks!


If we select default wallpapers in Ubuntu as desktop background image it will automatically set the same image as login screen. But if we use a custom image as a wallpaper it will only change the desktop background but the login screnn will change to a default wallpaper. Why this is happening and how can we set a custom image as background for both desktop and login screen

I`m Unable To Set The Login Screen Wallpaper Of My Custom Wallpaper Is There Any Working Tool Which Changes Easily Without Any Bugs


For example, you can write the following if you want the word ''LINK'' to be clickable and you want to be redirected to Wikipedia every time you click on ''LINK'':  \href{}{LINK}  But, is it possible to assign several urls to the word ''LINK'' above so that when you click on ''LINK'' several web pages get opened?

I have to create a hyperlink which opens two links with one click.  Is it possible using LaTeX?  I'm using \href{<url>}{Open two links}.


So I feel like this site (Stack Overflow) almost doesn't want people to be able to give people thanks for posting up questions or even giving thanks for people answering your own question.   When ever I go to do something I never have the rep. People down vote your questions like they're on youtube and or they expect everyone to be genius - if they were why would we be asking questions in the first place?  I can't comment on other peoples posts thanking them for their great question and answer, I can't up vote them for a good question. I can't do anything other then check the correct answer to my question. Which of the past two have both received down votes negating the point of even asking a question in the first place.   15 rep to up vote good quality answers and questions 50 rep to even do any commenting outside a question you post  I haven't tried to answer anyone's questions but I have to assume based on not being able to do anything in general that I wouldn't even be able to do that to get these rep standings.   So what I'm getting at is how does one achieve these seemingly simple rep numbers when one is trapped in the chicken or the egg ?

I'm not sure if this is a stupid question, but here goes anyway... I have only recently started learning PHP and Javascript and I'm reasonably proficient. One of the reasons I'm so proficient is because I LOVE Stack Overflow and find most of the solutions to my dilemmas here.   But I've found that I never get the chance to ask a question because it has normally been asked many times before and when I go through the unanswered questions to try and help someone else, they are generally WAY over my head.  So I'm not sure how to get more privileges. I can't even vote up answers that I like or that helped me. I can't comment to thank someone for their solution. It is most tragic and demoralising... How do I change the situation?


Origin moves instead of actual object in blender 2.9. Same applies to Rotation and Scale also. It was not so in previous versions. Tried the solution given to question raised by Nyx. But still it is not working. Old answers not working, in my version, Transform affects only the Origins is also Off / Unchecked.

I can only move the origin point of the mesh that I selected in object mode, but not the whole mesh Did I set anything up by accident?


Could we allow suspended users to bookmark questions? I'm aware that  but I would like to have this feature changed.

Even though I got banned suspended, I'm able to mark a question as a favorite. Is this functionally correct?


I am creating a beamer presentation using the beetle color theme (gray background).  I am loading eps images that do not have a white background layer and would like to add one.  I do not want to edit all the images to add a white layer to image file.  How can I add a white layer, with the same size and position, to serve as a background?

I'm new to beamer and am trying to make a presentation. When inserting an image, the output is satisfactory, except when I try to insert a .pdf! The white layer in the image disappears. Initially, the image was a .ps, so I used ps2pdf14 to convert it to .pdf and then pdfcrop to add the amount of white border I desire. I can convert the .pdf to .png and it works fine, but the quality isn't good enough for big pictures. Is there a way to restore the white layer when inserting the .pdf image? I apologize if this is a trivial question, or if I've simply over looked something.  Here's an example code to illustrate the problem  \documentclass[xcolor=svgnames,mathserif,serif]{beamer} \usetheme{default} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{frametitle}[default][center] \definecolor{myblue}{RGB}{47,94,142} \setbeamercolor{background canvas}{bg=myblue} \usefonttheme{structuresmallcapsserif} \setbeamercolor{title}{fg=white} \setbeamercolor{titlelike}{fg=white} \setbeamercolor{normal text}{fg=white} \title{Sample Title} \author{\large{Me}} \institute{\small{University}} \date{\small{Today's Date}} \begin{document}  \begin{frame} \titlepage \end{frame}  \begin{frame}{Sample Title} \begin{center} \includegraphics[width=3in]{1.pdf} %why isn't white space appearing? \end{center} \end{frame}  \end{document}


I want to make nginx service dependent on a service I wrote, say abc.service. By dependent, I mean:   nginx service should stop when I stop abc nginx service should start when I start abc   A typical way would be to modify /lib/systemd/system/nginx.service and add Wants abc directive. However, I don't want to modify nginx.service file - as this is shipped with nginx package.  Any other way to do this?

I have installed the pimd service by means of apt. This comes with an upstream systemd unit file (/lib/systemd/system/pimd.service).  I want the service to be restarted when for some reason it gets killed, hence I wish to add the line Restart = always in the unit file.   However, I don’t want to modify the upstream unit file.  Is there any workaround for this?


How can I prove the statement below?  $r\in \mathbb{Z}$ such that:  $ 0\leq r\leq 32$  If r is the remainder of dividing the number $17*2^{635}$ by 33, then 8 divides r

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


I'm installing a network at a factory with around 200-300 PLC's. I have looked into spiceworks and similar solutions, and all of them are more or less computer / printer minded.  What I wan't is: A solution that's able to scan my network / get a list from me at setup, and continuously check for me, if all the network nodes in the list are active. Ping / SNMP - it doesn't matter.  If a node goes down, the solution should warn me some how .. Does anyone know of such a solution?

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


For the equation $a^2 + b^2 = c^2$, the solution is:   $a = m^2 - n^2, b= 2mn, c = m^2 + n^2$ $m,n\in\mathbb{Z}$ and $m > n$, free to choose   How is a similar solution obtained for the equation $a^2 + b^2 = c^2 + 1$?  I'm familiar with it, but don't know how to obtain it.

Are there integral solutions to the equation $x^2+y^2-z^2=1$?


I'm modelling this detail and when I add the subsurface mod, it does odd things.  I cant make any loop cuts on it for some reason so have to use the knife tool.  Would I have to add alot of cuts to be able to get a clean looking mesh... any help on where to make cuts without creating ngons?

I tried to apply a Subdivision Surface on a part of my object. I can't keep the angles sharp, they all turn into rounded angles.  The angle before applying the Subdivision surface...   ...And after


From time to time I see kworker (specifically kworker/7:0+eve) process is taking almost 50% of my processor. As a result my laptop almost hanging up. I have already done upgrade and update just today. Still the problem is there. I am using Ubuntu 18.04. Here is the distribution detail: acer 5.4.0-48-generic #52~18.04.1-Ubuntu SMP Thu Sep 10 12:50:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux.  Is anyone having same problem? Or can anyone help me how to fix it?

I recently upgraded to the Kubuntu Natty Beta 1 and I've been having a lot of issues with the process kworker. At moments it uses almost half my CPU. Also, strangely enough it seems to affect my USB ports; whenever I plug in an USB drive, the process kworker goes into hyperdrive, leaving me unable to work.  I have thought about filing a bug but since I haven't even found any reasonable explanation on what kworker is I figured I should find out first.


The ODE is $$xy''-(1+x)y'+y=x^2$$ and the Complementary Function (homogenous solution) is $$y_{\small CF} =A y_1+By_2$$ where, $y_1=e^x$ and $y_2=x+1$. However, while computing the particular integral by $$y_{\small p}=-y_1\int{\frac{y_2f(x)}{W(y_1,y_2)}}+y_2\int{\frac{y_1f(x)}{W(y_1,y_2)}}$$ (where $f(x)=x^2$) the particular integral comes out to be $$y_{\small p} = -\frac{1}{2}(x^3+3x^2+6x+6)$$ and $$xy{\small p}''-(1+x)y{\small p}'+y{\small p}$$ comes out to be equal to $x^3$ instead of $x^2$. Any help in this matter would be much appreciated.

Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.  I have found that $a=1$ or $a=1/x$.


Good morning, I'm trying to solve this problem:        My attempt:  Assume the contrary that there is $z \in A - f(A)$. Because, $f$ is Lipschitz continuous and $A$ is compact, $f(A)$ is compact. As such, $A-f(A)$ is open and thus there is $\mathbb B(z,r) \cap f(A) = \emptyset$.   After that, I'm stuck and unable to proceed. Could you please shed me some light? Thank you so much!

Possible Duplicate:          Let $X$ be a compact metric space and $f$ be an isometric map from $X$ to $X$. Prove $f$ is a surjective map.


On a recent newscast on CNN, an analyst said,     Trump's lawyers want to avoid questions that might challenge his recollection and lead him to perjure himself.   Hearing this got me to thinking about the nature of the word perjure in that it can only be applied to oneself.  Someone else can't perjure you, you can only perjure yourself.  I wondered if there was a term for this, and in searching on Google I found this Wikipedia page on , and it actually uses "perjure" as an example.  But the wording is a little confusing and implies that many verbs can function as reflexive verbs but they are not always used this way.  On the other hand, "perjure" as used in the Wikipedia example seems to be a case where it is always reflexive.     In grammar, a reflexive verb is, loosely, a verb whose direct object is the same as its subject, for example, "I wash myself". More generally, a reflexive verb has the same semantic agent and patient (typically represented syntactically by the subject and the direct object). For example, the English verb to perjure is reflexive since one can only perjure oneself.   Is there a term for verbs that are limited or mostly limited to reflexive use, such as perjure?  Are there other words, or a whole category of words, that can only be used this way?

English can use a lot of verbs in a reflexive context. Even ones that usually are used intransitively.     I laugh myself silly.   However, it seems like there are very few – perhaps no – verbs that ONLY work in a reflexive context.  Are there any?


How to install Hindi Mangal Unicode Font on UBUNTU? I always used this font on Windows OS but don't know how to install Hindi Mangal Unicode Font on UBUNTU?

Question says it all. I need them to be available in gimp.


Last year we first planted Jerusalem Artichokes (Topinambour) in our vegetable garden. The plants did very well and we had quite a huge harvest. We found however that eating the tubers causes digestive problems.  I looked into why this is and found that the effect is caused by the presence of a carbohydrate called Inulin, which our digestive system can not process, but sadly the bacteria in our colons CAN (hence the nickname Fartichoke for this otherwise quite delicious produce).  I have found literature references saying that storing the tubers cold and dark for 6+ weeks will transform the Inulin into other forms of carb that can be digested. Since the harvests are quite huge and our cold storage room is limited, I was wondering if anyone here knows of a different method of Inulin reduction.  Any tips welcome, be they of a storage, preparation or preservation nature.

I'd love to eat sunchokes (aka Jerusalem artichokes or topinambour) more frequently, but the side effects (gas, abdominal discomfort) are a bummer. In a home kitchen, how can I prepare the sunchokes to prevent this side effect?


I have huge file 100M, that has the text (few lines below,) stack of lines are unique scaffold1_, scaffold2_ and on.   I would like to have a new file that is specific to each scaffold.1...txt tried few sed and grep commands but they didn't help.  scaffold1_2,C,C,C,C,N,C,N,C,G,G,C,N,C,C,G,N,N,C,G,N,C,C,C,G,C,N,N,C,C scaffold1_113,T,T,T,T,T,T,T,T,T,C,T,T,T,T,T,T,C,T,T,T,T,T,C,T,T,N,T,T,T scaffold1_149,G,G,G,G,C,G,C,G,C,G,G,C,C,G,C,C,G,C,G,G,C,G,G,G,G,C,G,G,G scaffold1_160,G,G,G,T,G,T,T,T,N,T,T,T,G,T,G,G,T,T,T,T,T,N,T,T,G,G,T,T,G scaffold2_315,C,C,C,G,C,C,C,C,C,C,C,G,C,C,G,G,G,C,C,C,C,C,C,G,C,C,C,C,G scaffold2_318,G,A,A,A,A,A,A,G,A,A,A,A,A,A,A,A,A,A,G,A,A,A,A,A,A,A,A,A,A scaffold2_323,T,T,T,T,T,C,C,T,T,T,T,T,T,T,T,T,T,T,T,C,T,T,T,T,T,T,T,T,T scaffold2_397,A,A,A,A,A,A,C,A,A,A,A,A,A,A,A,A,C,A,A,A,A,A,A,A,A,A,A,A,A scaffold3_402,C,C,C,C,C,T,C,C,C,C,C,C,C,T,C,C,C,T,C,C,C,C,C,C,C,C,C,C,C scaffold3_465,G,G,G,G,G,G,G,G,G,C,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,C,C,G scaffold3_502,C,C,C,C,C,C,C,C,C,G,C,C,C,C,C,C,C,G,C,G,C,G,C,C,C,C,C,C,C scaffold3_508,G,G,G,C,G,G,G,G,G,C,G,C,C,C,C,C,G,C,G,C,G,C,C,C,C,C,C,C,C scaffold3_533,G,G,G,G,A,A,A,G,A,G,A,G,G,A,G,G,A,A,G,A,A,G,G,G,G,G,G,G,G scaffold4_555,T,T,T,T,T,T,T,T,T,T,T,T,T,T,A,A,T,T,T,T,T,T,T,T,T,T,T,T,T scaffold4_586,T,T,T,T,T,T,T,T,T,T,T,C,C,T,T,T,T,T,T,T,T,T,C,T,C,T,T,T,T scaffold4_593,A,G,G,G,A,A,A,A,G,G,A,A,A,A,G,G,A,A,G,A,G,G,A,G,A,G,A,A,G scaffold4_598,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,A,A,C scaffold4_664,G,A,A,G,G,G,A,G,G,G,G,G,G,G,G,G,A,G,G,G,G,G,G,G,G,G,G,G,G scaffold5_667,C,C,C,C,C,C,C,C,T,C,C,C,C,C,C,C,C,C,T,C,T,T,C,C,C,C,T,T,C scaffold5_670,A,A,A,A,A,A,A,A,G,A,A,A,A,A,A,A,A,A,G,A,G,G,A,A,A,A,G,G,A scaffold5_679,T,C,C,C,C,C,C,T,C,T,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C   resulting files should look something like  cat scaffold1.txt  scaffold1_2,C,C,C,C,N,C,N,C,G,G,C,N,C,C,G,N,N,C,G,N,C,C,C,G,C,N,N,C,C scaffold1_113,T,T,T,T,T,T,T,T,T,C,T,T,T,T,T,T,C,T,T,T,T,T,C,T,T,N,T,T,T scaffold1_149,G,G,G,G,C,G,C,G,C,G,G,C,C,G,C,C,G,C,G,G,C,G,G,G,G,C,G,G,G scaffold1_160,G,G,G,T,G,T,T,T,N,T,T,T,G,T,G,G,T,T,T,T,T,N,T,T,G,G,T,T,G   cat scaffold2.txt  scaffold2_315,C,C,C,G,C,C,C,C,C,C,C,G,C,C,G,G,G,C,C,C,C,C,C,G,C,C,C,C,G scaffold2_318,G,A,A,A,A,A,A,G,A,A,A,A,A,A,A,A,A,A,G,A,A,A,A,A,A,A,A,A,A scaffold2_323,T,T,T,T,T,C,C,T,T,T,T,T,T,T,T,T,T,T,T,C,T,T,T,T,T,T,T,T,T scaffold2_397,A,A,A,A,A,A,C,A,A,A,A,A,A,A,A,A,C,A,A,A,A,A,A,A,A,A,A,A,A

I need to split a file into unique file names. I can do it with sed command eg,  sed -n '/scaffold135_/w 135-scaf.txt' input file.txt but it's time consuming so I need a smart way to do it faster. Below is an input sample (the original file has one million lines):  scaffold1_115,T,N,N,N,N,A,N,N,N,N,N,N,T,N,T,T,N,A,A,N,N,A scaffold1_123,A,N,N,N,N,G,N,N,N,N,N,N,A,N,A,A,N,G,G,N,N,G scaffold1_140,C,N,N,N,N,C,N,N,N,N,N,N,C,N,C,C,N,T,C,N,N,C scaffold2_161,G,N,N,N,N,G,N,C,N,N,C,N,G,N,G,G,N,G,G,C,N,G scaffold2_162,C,N,N,N,N,C,N,T,N,N,T,N,C,N,C,C,N,C,C,T,N,C scaffold2_180,C,N,N,N,N,C,N,T,N,N,C,C,C,T,C,C,T,C,C,C,N,C scaffold2_194,C,N,N,C,N,C,C,C,C,C,C,C,C,C,T,C,C,C,C,C,N,C scaffold3_195,G,N,N,G,G,C,G,G,G,G,G,G,C,G,C,G,G,C,C,G,N,C scaffold3_234,T,N,A,T,A,A,T,T,T,A,T,A,A,T,A,A,T,A,A,T,N,A scaffold101_282,C,T,T,T,C,C,T,C,T,C,C,C,C,T,C,C,T,C,C,C,N,C scaffold101_371,T,T,T,T,T,C,T,T,T,T,T,T,T,T,T,T,T,T,T,T,N,C scaffold101_372,T,T,T,T,C,C,T,T,T,T,T,T,T,T,T,T,T,T,T,T,N,C   The lines are unique. I want lines specific to each scafold into a separate file, say all lines that start with scaffold1_ into a file named scaffold1.txt and so on until scaffold10156.txt which contains the lines starting with scaffold10156_


how to disable an apex commandbutton after first click . can someone help me out?  page : <apex:pageBlockSection  rendered="{!enableSpehere}"\>    controller :  boolean enableSpehere {get;set;}   inside constructor :  enableSpehere =false   then there is a method:    public void enableSphere()     {          enableSpehere=true;     }

I have an apex:commandButton on a visualforce page that invokes a method on the controller. There is currently no rerender value set for the button. Instead the controller method returns a PageReference to redirect the user as required.  E.g.  Visualforce:  <apex:commandButton value="Save" action="{!save}"/>   Controller:  public PageReference save() {     // save body ...      // return the user the a parent opportunity     return new PageReference('/' + opp.Id); }   Users are currently able to click on the resulting save button multiple times before the controller completes and returns the PageReference to redirect the browser to an opportunity.  How can I disable the commandButton after the first click?    I tried wrapping the commandButton in an actionStatus and facet, but the need to define the rerender property prevented the resulting PageReference redirect.  E.g.  This will render nicely in the browser and prevent multiple clicks, but doesn't redirect to the Opportunity on completion.  <apex:actionStatus id="saveStatus">     <apex:facet name="stop">         <apex:commandButton value="Save" action="{!save}" status="saveStatus" rerender="saveParentBlock" />     </apex:facet>     <apex:facet name="start">         <apex:commandButton value="Saving..." disabled="true" status="saveStatus"/>     </apex:facet> </apex:actionStatus>     There is a similar question . I need to support an existing PageReference redirect, which slightly alters the requirements.  Force.com Discussion Boards:   Ideas:


I have the following error in Java code and cause my application to crash. This error is due to the imageView being null.      Error:Caused by: java.lang.NullPointerException: Attempt to invoke   virtual method 'void   android.widget.ImageView.setClipToOutline(boolean)' on a null object   reference at   ir.nasim_velayat.sorud.activity.Main2Activity.onCreate(Main2Activity.java:91)   And Java Codes:  Line 90 : imageView = (ImageView) findViewById(R.id.img_news_top); Line 91 : imageView.setClipToOutline(true);   I anticipate that this error is due to the fact that I have not set the imageView correctly, but I do not know how to set it correctly.  xml Code(ImageView):  <ImageView             android:id="@+id/img_news_top"             android:layout_width="280dp"             android:layout_height="150dp"             android:src="@drawable/bg_header"             android:background="@drawable/shape_radius"             android:scaleType="centerCrop"             android:layout_centerInParent="true"             />

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


I traveled into the U.S on my Irish passport, even though i have an U.S passport because it was out of date and i didn't have time to renew it. I had to get a visa waiver and lie that i had not been to America or hold any other passport. What is the penalty for this is all I want to know, please. I have three days before the deadline to renew my U.S. passport. Really appreciate some helpful information. I am aware it is illegal i simply want to know if anyone knows the penalty. Thanks

Answers to a  mention that it is illegal for a US citizen to enter/leave their home country on a foreign passport. However this raises the following questions:   What is the maximum prescribed penalty for violating these rules? Are US immigration officials known for actually applying the penalty? E.g. the Cuba embargo banning visits to Cuba was almost never enforced, so it's possible this law is ignored as well.


I have seen some anime and forgot some characters but remember some background information and the role played how to search for that?

So I see an image that I believe is from either an anime or a manga. What are some ways that I can go about finding what series it's from? Try these options:   (browser built-in support and plugins)        Note: Please note that as of May 9, 2016, ALL  questions are now . Therefore, you can't ask an identification request question on this site. However, such questions are still welcome  for users with at least  (globally on StackExchange).    Protip: If you are using Google Image Search in a non-English language,  or just use  for better, more accurate results.


I have 1000 csv files in a directory. I would like to concatenate them all together in order. They are named img_size_1.csv to approx img_size_1000.csv  is close but assumes a list file. Can this be done in a one-liner?

In a folder containing X files, I need to concatenate Y files (where X > Y) together into a single text file. I have the filenames (of Y files) that I need to concatenate.


If I have the mass (and if needed, the atomic mixture) of a star before it forms, is there some mathematical way to calculate how fast the star will burn through its contents and die?

Is there a way to model/predict the evolution and life cycle of a star based on certain initial conditions?  That is, whether it will become a red giant, brown dwarf, etc. I'm basically looking for equations defining the progress of different star-types and how varying initial conditions may affect that progress.


Can someone explain to me why the absolute value function $f(z)=|z|$ is not differentiable at $(0,0)$ even though Cauchy Riemman conditions are true at $(0,0)$ ( using $|z|=\sqrt{x^2+y^2}$ )?

Why is the absolute value function $f : \mathbb{C} \rightarrow \mathbb{C}$ given by $f(z) = |z|$  not complex differentiable at any point $z_0$ in the plane?


I am not experienced in terminal operations in Ubuntu. Whenever I try to add a repository I get a message: E : Malformed entry 52 in list file etc/apt/sources.list  Please suggest a solution.

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


While I have seen all sites from Stack Exchange, I was wondering why there are no sites about Korean/Asian dramas? First, I checked in these sites:  and  And I thought there would exist a tag about Korean/Asian dramas (for example, Korean dramas or Asian dramas or something similar)     But, what is anime?  a style of Japanese film and television animation, typically aimed at adults as well as children.  And what is K-drama?  K-dramas are television dramas (Hangul: 드라마; RR: deurama) in the Korean language, made in South Korea  Korean dramas are popular worldwide, partially due to the spread of Korean popular culture.  K-Drama: net-speak for a South Korean television show   Why doesn't there exist this kind of site or tag in Movies & TV or Anime & Manga? If they are so popular on the Internet, as you can see here:

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


from this youtube video (link down below) show the train moving without any form of an engine what so ever so my question is really what force is pulling the train?

In , a dry cell battery, a wound copper wire and a few magnets (see image below) are being used to create what can be described as "train". It looks fascinating but how does this experiment work?  Update 8th August 2016: This problem has been completely worked out in a paper that was published in the January 2016 issue of American Journal of Physics.     Link: Am. J. Phys. 84, 21 (2016);


Back with system V init there was a script called rc.local where you could stuff commands that needed to be run during bootup, which would not fit to one particular service. Does systemd have a similar mechanism?

I cannot find the correct way to execute some local scripts (or very local commands) at systemd, I already know I must not create a service (in systemd a unit) for this kinds of scripts (or I must?)....    The workaround that I found is to create rc.local and give to it execution permissions.  printf '#!/bin/bash \n\nexit 0' >/etc/rc.local  chmod +x /etc/rc.local   For example, if I get a legacy server with a simple rc.local configured by you, I will know what did you do and how much it gonna hurt to upgrade or install something new on the distro, as rc.local was respected by external packages, but in the other hand if I install a server and create a systemd unit or two or three (or even sysvinit services), just for doing a simple task, this can sometimes make your life harder, and much more than this my units names can someday conflicts with the names of the new services created by the distribution development, and maybe installed on a upgrade, causing trouble for my scripts !   I see another question asking about where is rc.local and the answer was to create it and give execution permissions, I think my question is really not a duplicate, because I do not want to know where it is - believe me, I just want to accept that it is deprecated, but i cannot find the correct way for doing this kind of things, should I really create a unit just for some simple like that?


I'm trying to develop game scenario that able to trigger the alarm with alarm light and siren audio to play. For the testing purpose I set it that to boolean value as "alarmOn" in AlarmLight class.   **AlarmLight.cs** public class AlarmLight : MonoBehaviour {  public float fadeSpeed = 2f; public float highIntensity = 2f; public float lowIntensity = 0.5f; public float changeMargin = 0.2f; public bool alarmOn = false;  private float targetIntensity; public Light light;   //add alarm lights // tag as siren void Awake() {     light.intensity = 0f;     targetIntensity = highIntensity; }  void Update() {     if (alarmOn==true)     {         light.intensity = Mathf.Lerp(light.intensity, targetIntensity,fadeSpeed * Time.deltaTime);         ChecktargetIntensity();     }     else     {         light.intensity = Mathf.Lerp(light.intensity, 0f, fadeSpeed * Time.deltaTime);      }  }  void ChecktargetIntensity() {     if (Mathf.Abs(targetIntensity - light.intensity) < changeMargin)     {         if (targetIntensity==highIntensity)         {             targetIntensity = lowIntensity;         }         else         {             targetIntensity = highIntensity;         }     } }   }  Then I  tried to access that value with LastPlayerSight class and for the testing purpose i was trying to return false as below.  alarm.alarmOn = (playerPosition != resetPlayerPosition);   Then I tried to play my scene, and I got the error which is the problem with above line of code.    This is my LastPlayerSight.cs class  public class LastPlayerSight : MonoBehaviour {  public Vector3 playerPosition = new Vector3(1000f, 1000f, 1000f); public Vector3 resetPlayerPosition = new Vector3(1000f, 1000f, 1000f);  public float lightHighIntensity = 0.25f; public float lightLowIntensity = 0f; public float fadeSpeed =7f;  public float musicFadeSpeed = 1f;  //directional alarmlight ref private AlarmLight alarm;  //main directional light ref private Light mainLight;  private AudioSource panicAudio;  //siren audio private AudioSource[] sirens;  void Awake() {     alarm = GameObject.FindGameObjectWithTag(Tags.alarms).GetComponent<AlarmLight>();     mainLight = GameObject.FindGameObjectWithTag(Tags.mainLight).GetComponent<Light>();      GameObject[] sirenAttachedGameObjects = GameObject.FindGameObjectsWithTag(Tags.siren);     sirens = new AudioSource[sirenAttachedGameObjects.Length];        for(int i = 0; i<sirens.Length; i++)     {         sirens[i] = sirenAttachedGameObjects[i].GetComponent<AudioSource>();     } }  void Update() {     SwitchAlarms();     MusicFading(); }  void SwitchAlarms() {     alarm.alarmOn = (playerPosition != resetPlayerPosition);      float newIntensity;      if(playerPosition != resetPlayerPosition)     {         newIntensity = lightLowIntensity;     }     else     {         newIntensity = lightHighIntensity;     }      mainLight.intensity = Mathf.Lerp(mainLight.intensity, newIntensity,fadeSpeed*Time.deltaTime);      for (int i = 0; i < sirens.Length; i++)     {         if (playerPosition != resetPlayerPosition)         {             sirens[i].Play();         }         else         {             sirens[i].Stop();         }     } }  void MusicFading() {    //AudioSource audioTemp = audio.GetComponent<AudioSource>();      if (playerPosition != resetPlayerPosition)     {         //audio.GetComponent<AudioSource>().volume = Mathf.Lerp(audio.volume, 0f, musicFadeSpeed * Time.deltaTime);          panicAudio.volume = Mathf.Lerp(panicAudio.volume, 0.8f, musicFadeSpeed * Time.deltaTime);      }     else     {         panicAudio.volume = Mathf.Lerp(panicAudio.volume, 0.0f, musicFadeSpeed * Time.deltaTime);      } }   }  I'm beginner of developing such things and can anyone guide me to correct the problem?

Since many users are facing the NullReferenceException: Object reference not set to an instance of an object error in Unity, I thought that it would be a good idea to gather from multiple source some explanation and ways to fix this error.  Symptoms I am getting the error below appearing in my console, what does it mean and how do I fix it?  NullReferenceException: Object reference not set to an instance of an object


What is the easiest explanation for how the symmetry of laws under translation in time relates to energy conservation in physics?

I'd like to understand  and its contents as to what it implies in a bit simpler terms. I am familiar with mathematics unto Calculus 1,2,3 and some linear algebra and group theory. I am familiar with that for each symmetry there is a conservation law.    Now is there a one-one correspondence between these two always? What about laws like conservation of charge?  And conservation of energy?  And conservation of mass?  Considering our view of nature was changed as Special Relativity was introduced and thus, what earlier the theorem would have asserted as mass and energy to be originating from different symmetries then how did we reconcile these two as just one symmetry?


I added a portal to the the window and put the size to 9.353, and also rendered the samples at 2000 and there is still noise. do I need to portals for this?

I often use Cycles' built in Glass BSDF shader to achieve realistic refraction effects, but in many cases, it seems that Cycles' glass caustics creates an unfortunately large number of fireflies (pixels that are abnormally bright relative to their surroundings). In some models of mine, even when I render for 3000 or more samples/pixel, my final image is still covered in fireflies. While I can improve this in many cases by increasing the total amount of light available in the scene, this loses a lot of the potency of the refractive effects I'm looking for, especially in scenes with low light levels.  So my question is, how can I reduce the amount of fireflies while using Cycles' caustics without sacrificing the quality of the refractive effects?  Note: I am aware that Cycles' caustics will perform much better once Cycles has full support for bidirectional path-tracing, but it looks unlikely that that will become , unfortunately.


Let $G$ be a finite group, $H$ and $K$ are two normal subgroups of $G$ with the property that $G=HK$ and $H\cap K=1$.      Prove that $$\left(\left|H\right|,\left|K\right|\right)=1\Leftrightarrow\forall A\leq G,A=\left(A\cap H\right)\left(A\cap K\right)$$   About Dummit & Foote, Abstract Algebra, page 171:   Each elementof $HK$ can be written uniquely as a product of $hk$, for some $h\in H$ and $k\in K$. $HK\cong H\times K$.   Maybe it's usefull.

I am trying to prove the following statement:     Let $G$ be a group and $H, K\mathrel{\unlhd}G$. Assuming that $H \cap K =  \{1_G\}$ and $G = \langle H, K \rangle$, prove that $G \cong H \times K$.   From this, we get that $HK \cong H \times K$. Naturally, it would be ideal if I could prove that $HK \cong G$. One issue that I am facing here is the meaning of $G = \langle H, K \rangle$. How is this defined (I mean, more explicitly)? Is my strategy correct or


Does Daenerys have a stronger claim to the Iron Throne than Cersei after      Tommen’s death   if we say she succeeds Tommen and not Aerys II?      Tommen left no siblings behind; his 'father' Robert and Robert’s siblings are dead.   We have to go further up the Baratheon family tree and we will see that Robert had a grandmother (she would be Tommen’s great-grandmother), Rhaelle Targaryen, who is also Daenerys's great-aunt.  Some people say that Cersei Lannister is the heir of Tommen - if you go all the way up the Baratheon family tree, you will find Cersei’s great-great-great-great-grandfather, Mathin Lannister, but isn’t this claim weaker than Daenerys's claim?

At the end of season 6 of Game of Thrones,       Cersei claims the Iron Throne.   It is not explained how.  Is it normal for a Queen regent to assume the throne once there are       no longer any other apparent heirs?   If so, would she need to seek out and destroy any distant blood relations of the Baratheons, or does it not matter as they wouldn't have a significant army?  If it's held by coup powers, shouldn't Jaime be King? He is presumably still Lord of Westerlands and in charge of the Lannister forces.


I have a C# forms application, and it has few buttons on it. I have used Process.start to execute a .exe program (this hapens as soon as the program is launched (onload())). Now what i need to do is, when a user clicks on a particular button on the form, i need to pause the execution of the .exe file and when they click on another button  i need to resume execution.  How should i do this ?  Help appreciated.

How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.  I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it.


What free automation tools exist for Data Migrations between Old and New Systems?  What approaches should I use to ensure data was migrated correctly ?  I'm a beginner Tester in web applications, E-Learning System.

We are migrating our production data (DB and filesystem) from a fairly complex data model to another fairly complex data model. The migration process is given by the specification as a set of mapping rules and transformation functions.  I'm planning a testing strategy for this migration process. To identify the riskiest areas here, I've read some lessons learned from  and  in general and compared them with our migration process specification.   Where the things may go wrong?   For backward compatibility reasons, the new data will be provided by the new application to the old modules through adapters. Old modules will do their job using migrated data as they used. The new data model will support some new application features. The new data model will no longer support some old (usually used infrequently) application features.  Nullable fields in the old model are no longer nullable.  Files in the filesystem are defined in a different format. Data that used to be decoupled in the old system will now be joined  (e.g. customers with their projects) based on:   automatic rules administrator rules  New data formats will be used   What may go wrong?   Values for data used by new features may have incorrectly defaulted.  Adapter may translate new data to legacy format incorrectly. Not all entities may be migrated, e.g., some old client configurations cannot be found in the new system. Not all data (properties) may be migrated. New data model may use data formats may not be able to store some old data structure (e.g., VARCHAR vs. BLOB) Migrated files may not be readable for old modules etc.   My very first idea is to combine two testing strategies here:   Low-level testing strategy that will be relatively thorough but will have little coverage. The idea is to isolate a most representative sample of original data  (that makes sense for the business, e.g., single customer and its documents). Then, for each mapping rule define real expected output for the corresponding part of the sample data.  Automate checks. High-level testing strategy that will be less thorough but will cover the majority of application functionalities and try to identify integration problems with old modules. The idea is to migrate all data first. Then perform user test scenarios that involve all functionalities of the new application and of the old modules.   What other strategies would you suggest to discover bugs for the identified risks?


I have written a program where I have N strings and Q queries that are also strings. The goal is to determine how many times each query appears in the N strings.   This is my code:   import java.util.Scanner; import java.util.ArrayList;  public class SparseArrays{   // count the number of occurances of a string in an array int countStringOccurance(ArrayList<String> arr, String str){     int count = 0;     for (int i=0; i<arr.size(); i++) {         if (str==arr.get(i)) {             count += 1;         }     }     return count; }   void start(){     // scanner object     Scanner input = new Scanner(System.in);      // ask for user to input num strings     System.out.println("How many string would you like to enter?");     // store the number of strings     int numStrings = input.nextInt();     // to get rid of extra space     input.nextLine();      // ask user to enter strings     System.out.println("Enter the "+numStrings+" strings.");     ArrayList<String> stringInputArray = new ArrayList<String>();     for (int i=0; i<numStrings; i++) {         stringInputArray.add(input.nextLine());     } // all strings are in the stringInputArray      // ask user to input num queries     System.out.println("Enter number of queries.");     int numQueries = input.nextInt();     // to get rid of extra space     input.nextLine();      // ask user to enter string queries     System.out.println("Enter the "+numQueries+" queries.");     ArrayList<String> stringQueriesArray = new ArrayList<String>();     for (int i=0; i<numQueries; i++) {         stringQueriesArray.add(input.nextLine());     } // all string queries are in the stringQueriesArray      for (int i=0; i<stringQueriesArray.size(); i++) {         int result =        countStringOccurance(stringInputArray,stringQueriesArray.get(i));         System.out.println(result);     } }  void printArr(ArrayList<String> arr){     for (int i=0; i<arr.size(); i++) {         System.out.println(arr.get(i));     }     System.out.println(" "); }  public static void main(String[] args) {     SparseArrays obj = new SparseArrays();     obj.start(); } }   When I run my code and enter 4 strings such as {abc,abc,abc,def} and 3 queries such as {abc,def,ghi} I expect to get 3, 1 and 0 for my output since there are 3 "abc", 1 "def" and 0 "ghi". However, the output is zero for all the queries.  I am pretty sure the problem is from the method  int countStringOccurance(ArrayList arr, String str) which is supposed to give me the number of times a string is repeated in an ArrayList of Strings.  Am I missing anything here?

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?


Is the following series convergent?  $$\sum_{n=1}^{\infty}\frac{e^n\,n!}{n^n}$$  I treid the Ratio and Root tests, but both of them failed.

Any suggestion/hint, not the whole solution, how to determine convergence/divergence of $$ \sum_{n=1}^{\infty}\dfrac{e^n \cdot n!}{n^n} $$ I'm currently stuck.


Suppose that $S_0$ and A are positive numbers, let $$S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right)$$ with $n \geq 0 $.      (a)Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$       (b)Show that $S_{n+1} \leq S_n $ , if $n \geq 1$      (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists      (d) find s   (a) Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$  Given $$P_n:  S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \geq \sqrt{A}$$  $$P_0: S_{1} = \frac{1}{2}\left(S_0 +\frac{A}{S_0}\right) \geq \sqrt{A}  $$  We assume that $P_n$ is true  $$P_{n+1}: S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right)$$ by assumption $$S_{n+2}= \frac{1}{2}\left(S_{n+1}\left(1 +\frac{A}{(S_{n+1})^2}\right)\right) \geq \frac{1}{2}\left(\sqrt{A}\left(1 +\frac{A}{(\sqrt{A})^2}\right)\right)$$ $$ S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right) \geq \sqrt{A}  $$  It follows that $S_{n+1} \geq \sqrt{A} $    (b) Show that $S_{n+1} \leq S_n $ , if $n \geq 1$  $$S_{n+1} \leq S_n$$ $$\frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \leq S_n $$ Dividing by $S_n$ $$\frac{1}{2}\left(1 +\frac{A}{S_n^2}\right) \leq 1 $$ $$\frac{A}{2S_n^2} \leq \frac{1}{2}$$ $$A \leq S_n^2$$ $$S_n \geq \sqrt{A}$$ As  $S_{n+1} \leq S_n$ yields a true statement, it follows $S_{n+1} \leq S_n$ is true.    (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists  Since $S_{n+1} \leq S_n$, the sequence is non-increasing,   using the non-increasing theorem stating that      if $\{S_n\}$ is non-increasing then $$\lim\limits_{n \rightarrow > \infty} S_n = \inf\{S_n\} $$     (d) find s    Is the argumentation in (a) and (b) appropriate? Also, I have to admit I m getting less confident in my argumentation (c) and (d). How to proceed in (c) and (d)?  Much appreciated for your input or help.

a) Let $a>0$ and the sequence $x_n$ fulfills $x_1>0$ and $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$ for $n \in \mathbb N$. Show that $x_n \rightarrow \sqrt a$ when $n\rightarrow \infty$. I have done it in two ways, but I guess I'm not allowed to use the first one and the second one is incomplete. Can someone please help me?  We already know $x_n \rightarrow \sqrt a$, so we do another step of the iteration and see that $x_{n+1} = \sqrt a$.  Using limit, $x_n \rightarrow x, x_{n+1} \rightarrow x$ (this is the part I think it's incomplete, don't I have to show $x_{n+1} \rightarrow x$, how?), we have that   $$x = \frac x 2 (1 + \frac a {x^2}) \Rightarrow 1 = a/x^2 \Rightarrow x = \sqrt a$$ b) Let the sequence $x_n$ be defined as $x_{n+1}= 1 + \frac 1 {x_n} (n \in \mathbb N), x_1=1$. Show that it converges and calculate its limit. "Tip: Show that sequences $x_{2n}$ and $x_{2n+1}$ monotone convergent to the limit." I didn't understand the tip, how can this help me? Does it make a difference if the number is odd or even? Thanks in advance!


Factor the polynomial $X^3-X+1$ in $F_{23}$ and $X^3+X+1$ in $F_{31}$.  How can I know in which way to factor a polynomial mod $p$? Is there some specified method to do that?  Thanks.

How to factor a certain polynomial over $Zn$.  for example factor the following polynomial into irreducible polynomials in $Z5$:  $X^3+X^2+X-1$  or factor the following polynomial into irreducible polynomials in $Z2$:  $X^4+X+1$   is there a certain method (algorithm) I can follow?  Please help I'm stuck and i really need the help!  thank you in advance!!


I've only been using blender for three months, so i dont know many things abt it n im trying to learn. But i got a job from lighting shop. I'm modelling lightings for my customer but they use 3ds max and they want everything in a .fbx. How can i export everytihng(model,textures,materials etc.) in a .fbx or another format? Is it possible? Thanks for helps :) Btw my english is not well sorry for my language :)

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


According to , $@ and $* do pretty much the same thing:   The $@ holds list of all arguments passed to the script.  The $* holds list of all arguments passed to the script.   After searching all the top hits in google, I'm not able to find any explanation why there would be 2 seemingly duplicate syntaxes.   They appear to work the same in my scripts.   cat foo.sh #!/bin/bash echo The parameters passed in are $@ echo The parameters passed in are $*  ./foo.sh herp derp The parameters passed in are herp derp The parameters passed in are herp derp    Is one preferred over the other?  Why are there 2 builtin variables to do the exact same thing?     Additional sources

Consider the following code:  foo () {     echo $* }  bar () {     echo $@ }  foo 1 2 3 4 bar 1 2 3 4   It outputs:     1 2 3 4       1 2 3 4   I am using Ksh88, but I am interested in other common shells as well. If you happen to know any particularity for specific shells, please do mention them.  I found the follwing in the Ksh man page on Solaris:     The meaning of $* and  $@  is   identical  when  not  quoted  or  when  used  as a parameter   assignment value or as a file name. However, when used as  a   command argument, $* is equivalent to ``$1d$2d...'', where d   is the first character of the IFS variable,  whereas  $@  is   equivalent  to  $1 $2 ....   I tried modifying the IFS variable, but it doesn't modify the output. Maybe I'm doing something wrong?


Trying to prove that Möbius band can't retract onto the boundary circle, I got an idea that I must show the below thing.   If $\alpha\in\pi_1 (\partial M)$  is a generator, its image $i^*(\alpha) \in \pi_ 1 (M)$  under the inclusion $i:\partial M\to M$  is the square of an element of $\pi_1 (M)$.  I can visualize such phenomenon in my head, but can't formulate an argument using explicit homotopies and paths. Could anyone suggest me how to rigorously prove the above fact?

Prove that there is no retraction (i.e. continuous function constant on the codomain) $r: M \rightarrow S^1 = \partial M$ where $M$ is the Möbius strip.  I've tried to find a contradiction using $r_*$ homomorphism between the fundamental groups, but they are both $\mathbb{Z}$ and nothing seems to go wrong...


In [8]: %paste PRIME = 16777619 UINT32_MAX = 4294967295  # (2 ** 32) - 1 def fnv1a_32_global(string):     hashval = 2166136261     for character in string:         hashval ^= ord(character)         hashval = (hashval * PRIME) & UINT32_MAX     return hashval  In [9]: %timeit fnv1a_32_global(mystr) 1000000 loops, best of 3: 990 ns per loop   In [6]: %paste def fnv1a_32_local(string):     hashval = 2166136261     PRIME = 16777619     UINT32_MAX = 4294967295  # (2 ** 32) - 1     for character in string:         hashval ^= ord(character)         hashval = (hashval * PRIME) & UINT32_MAX     return hashval In [7]: %timeit fnv1a_32_local(mystr) 1000000 loops, best of 3: 967 ns per loop   I am trying to confirm (and understand why) initializing a local var on every function call and accessing it is faster than once initializing a global var and accessing it.  This result is consistent across several test attempts.  Additinal question: can this code be made even faster (I tried using a c-library pyfasthash. It is even slower than the above implementations)

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I am using Centos and want to use sudo command to run as root. But after input the root password, it always prompt to ask me input the password again. I am pretty sure the password is correct since I am able to su - to switch to root then run the command. But I can't run the command by sudo. What wrong with it? Whether I need to configure anything?  Below is an example when I run sudo ls command. I am pretty sure that I have input the correct password.  $ sudo ls [sudo] password for cooltoo:  Sorry, try again. [sudo] password for cooltoo:  Sorry, try again. [sudo] password for cooltoo

On my personal machine, I often type sudo in front of certain commands in order to accomplish administrative tasks.  I had hoped to avoid doing this throughout the day, by typing su root and providing the same password I usually do for sudo.  However, the two passwords are not the same(I don't know how to log in to su root).  Is running a command with sudo different than logging in with su root and running the same command?  I think sudo and su root are the same, because when I type sudo whoami, I get root, as opposed to just whoami where I get my user-name.


People witnessed the death of Batman. They do not know that Bruce Wayne was Batman. However, the death of Bruce Wayne himself would be highly publicized, due to his stature. It would be known to the entire world.  How could he fake a death and then be present at a cafe in Italy without publicity or consequences?  This is what Alfred dreamed of, so there is a possibility that this is Alfred's imagination but the closing scenes with Fox and Gordon suggest that Bruce Wayne is alive.

So there should have been people who, at the beginning of The Dark Knight Rises, could make the connection between Wayne's hermit-like lifestyle and the disappearance of Batman.  At the end of the movie, we see Wayne with Selina Kyle, and his "death" timed spectacularly well with the "death" of Batman.  Wouldn't people make the connections, and ultimately realize this? And since Gotham is a huge city, and Batman is probably known around the world, wouldn't people see a well and alive Bruce Wayne and be like, oh, Batman is still alive?


How are we able to sort a HashMap<key, ArrayList>?  I want to sort on the basis of a value in the ArrayList.

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I did the mistake to try Firefox beta a while back. Now it's nagging me all the time about updates. I've tried the solution given , but to no help.  How do I get off the beta channel when on a Mac?  I'm on FF 36.

I have switched to the Beta channel in my Firefox some time ago. Now I want the stable channel back. Unfortunately it is missed from   My FF:


I have used find the element by Xpath in my code, I get the error as ElementNotVisible.  <div class="loginBtn">     <input style="width: 59px; height: 20px" id="SubmitCreds" onclick="clkLgn()" type="submit" value="" name="SubmitCreds"> </div>   I try search the attribute value for id "SubmitCreds" its available in 3 different locations so used xpath.

How can I wait for element to be clickable in Selenium WebDriver?   When I execute my tests in Firefox or Internet Explorer I have no problems, but when I try to run it on Chrome, I get an element is not clickable error when I try to click on the submit button. I tried with verifying that the  element is there and it is visible and enabled.   Please give your answers in C#.


After the Terrorist team in Counter-Strike: Global Offensive plants the bomb, the Counter-Terrorist team has to defuse it before it blows up.  After the bomb is planted at a bomb site, how many seconds does it take for the bomb to blow up?

In Counter-Strike, is there any count (in seconds/minutes) until the bomb explode when it's first set-up? And can the timing be modified?


I'm planning to implement an ecs system for my game but i have foreseen a problem.  How will a rendering system be able to render entities in the correct order based on their depth component?  What are some of the ways that this can be accomplished?  One way i can think of is sorting the components array by depth of but this can be tricky especially if using a mega array of components for all entities.  I'm using python but i might want to make the ecs in rust.

Say I use a , and also inside Systems I hold lists of all entities that Systems are required to process.  How do I maintain this list of entities in desired rendering order, i.e. for a dumb 2D RenderingSystem?   I saw , and what they suggest is to do something like Z ordering - what I would probably do is just to store a "layer" int in DrawableComponent and then, inside RenderingSystem, just sort entities by mentioned "layer" whenever the entity list for RenderingSystem changes.  They also say we could just delete and recreate the entity whenever we want it on the top, but it seems too inflexible to me.  How is this problem usually solved?


As far as I know, "this" should hold the properties and functions of the object which actually triggered the function with "this". But in the following case it also contains the properties of the constructor "foo", why?  function foo(id) {    var self = this;    this.foo = "foo";    this.element = document.getElementById(id);    this.element.addEventListener("keyup", function(){self.bar();}, false); }  foo.prototype.bar = function() {    console.log(this.element.value); }; new foo("anyInputElement");

I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot.


I'm on an exercise for the university and have no clue what to do. The exercise is the following: You should proof that $\sum_{i=k}^n {i \choose k}= {{n+1}\choose {k+1}}$ . I've done that with an induction over $n$ and this goes very well.  But the other part is that we should use another formula an that is the following to proof it:  $$\sum_{i=k}^n {{i+1}\choose{k+1}} = \sum_{i=k}^n {i \choose{k+1}} + {i \choose{k}}$$  And there i need your help. Does anyone know what to do with this??  Thanks for your help!

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


I am using a specific book template (and .cls file). I want to put a subtitle. When I try to do that, an error is shown at \maketitle, saying "Use of \@icentercr doesn't match its definition.  \def " How can I fix this ? Do I have to go to the .cls file and fix it there itself.  \begin{document} \title{  Main Title \\        Subtitle  }   Apologies for not including a mwe, the template I'm working on, I cannot do that.

Does there exist some command for subtitles in the \maketitle thing?


For example: Kevin said to Ms.Russell: "Sam was mocking Dave by saying 'My name is Dave!? I'm so smart!?'"  *note that the question marks are what I'm wondering what I would put there   **note that Kevin is speaking

What rules are there for when you have three sets of quotation marks?  “I saw that Julia was really annoyed when Mike answered, “‘Blade Runner,’”” John said.  (‘Blade Runner’ in singles. Mike answered in doubles. John said in doubles.)  “I saw that Julia was really annoyed when Mike answered, ‘“Blade Runner,”’” John said.  (Mike answered in singles. “Blade Runner” in doubles. John said in doubles.)  Rewriting might help a little.  “When Mike answered, “‘Blade Runner,’” Julia looked really angry,” John said.  (Mike answered in doubles. ‘Blade Runner’ in singles. John said in doubles.)  Basically, I’m wondering whether you alternate, or start small and get bigger until you can’t get any bigger.   The conventions may vary according to British or American usage, so please state which one you are refering to.


I am sorry but I really not an expert with with LaTeX.   I know that there are several posts about it, I tried to follow many of them but I still have no results. I have Windows OS and I am using TeXworks, compiling with command pdflatex+makeindex+bibtex. I want to use the hieeetr style for the bibliography, but I do not know where to save the .bst file. Any help?

My question is nearly identical to that posed in these:        but unfortunately, I've followed the instructions in various ways and LaTeX still doesn't find my .bst file UNLESS it is in ./ (the PWD).  I've tried 3 approaches:   export TEXINPUTS=.:~/my/path:  (attempted with both ~ and the full-path) put the file in ~/Library/texmf/  (I'm on a mac) specified the full path to the .bst file in the \bibliographystyle command   Any ideas what I'm still doing wrong?  I've tried texhash (even though it's not supposed to be necessary) and that also failed.  The fact that it works if I put the file in the same directory as the .tex file says it's not a problem with the .bst.


I've been buying wire-to-wire and wire-to-board Molex connectors that look like this:    from a local hardware store for years (the image is taken from SparkFun, which sells them with the crimp terminals and wire pre-installed).  I'd now like to buy a large number of them from an online supplier (e.g., DigiKey or Molex themselves) but I can't figure out what specific type of Molex connector they are.  has quite a variety of connectors and I'm finding it difficult to determine which product line these ones belong to.  Their pitch is approximately 2.5 mm (possibly 2.54) and they use crimp terminals that are held in place by a raised metal "flap" (one per terminal) that catches on a narrow rectangular hole in the plastic casing (in the photo above, these holes are on the underside of the female end of the connector).

I've bought a 12VDC pump for a CNC machine I'm building. I want to get a connector that will fit this plug so that I can run it from my power supply source.  The problem is that I don't know what these connectors are called in order to buy a suitable plug.  Anyone know what this type of connector is called?


P(z)=$a_0+a_1z+a_2z^2+…+a_{n-1}z^{n-1}+z^n$ is a complex polynomial such that |P(z)|$\le1$ on the closed unit disc $\mathbb D$. Prove that P(z)=$z^n$ on the entire complex plane $\mathbb C$. By applying the formula for the derivatives at 0, I am able to prove that |$a_k| \le 1$ for all k=1,2,...(n-1). But how do I prove that all these coefficients are zero. Please help.

Let $p(z)=z^{n}+a_{n-1}z^{n-1}+...+a_{0}$ be a polynomial of degree $n\geq1$.  How can you prove that either $p(z)=z^{n}$ or there exists $z'$ with $|z'|=1$ such that $|p(z')|>1$.  Maybe we can use the maximum modulus principle and consider $q(z)=z^{n}p(1/z)$.


Ships and boats are referred to using feminine pronouns.  Are houses masculine, feminine or neutral?  Please provide evidence for your answer, a Google search didn't help me.

I read the following claim concerning pronouns referring to inanimate objects:      Anything that is meant to contain you, protect you or provide you with something beneficial is [often referred to as] a she; anything that is a perceived threat is a he. That's why cars, boats and some countries are she.    Is this really the case, or is it just a subjective claim? (According to the  using he/she for inanimate objects is not recommended and it should be used instead.) Is there a 'rule' for determining whether to use he, she or it based on the impression one would like to express? (I only know the 'rule' for animals: In the case where you know their gender and they are important to you, you refer to them using he/she. E.g. A dog attacked me in the street. It bit me. versus This is my dog Roger. He is 7 years old.) Have these practices changed over time?   Note 1: There is already a similar question (), but that considers only the feminine case and none of the answers offers an objective discussion of the matter.  Note 2: My native language is Czech, where the gender of the pronoun is based only on the grammatical gender of the noun. E.g. a cat (kočka) is always she, a dog (pes) is always he, a boat (loď) is always she and a car (auto) is always it.


I have the true model set as $y = b_0+b_1 x+u$. Now supposing that I'm running the model without the intercept term,  Under what circumstances would the coefficient term in the model (without the intercept term) be an unbiased estimator?  Personally, I like this model choice because the conditional variance of my estimator is the most efficient (between the two model choices). Would this be a correct evaluation on my part?

I am running linear regression models and wondering what the conditions are for removing the intercept term.   In comparing results from two different regressions where one has the intercept and the other does not, I notice that the $R^2$ of the function without the intercept is much higher. Are there certain conditions or assumptions I should be following to make sure the removal of the intercept term is valid?


I lock the PC when I leave it unattended, but the lock screen has a GUI power button which my child likes to click when no-one's looking, so often I lose work. How can I disallow soft power cycling while the lock screen is up?

I'm using Windows 8 and I find the power button and the accessibility options very annoying. It's a computer that is in a public place surrounded with kids and they keep on changing the accessibility options and turn off the computer.  Is there a way to remove those two features from the logon screen and make it available for authenticated users only?


Here's my code(Java)  float a=4.5555555555555555f; double b=4.5555555555555555; System.out.println("Float "+a); System.out.println("Double "+b);   The output was unexpected one.     Float 4.5555553   Double 4.555555555555555   I don't understand on what basis float has truncated this value. I don't have any problem with the precision of the output, but why did float's output includes 3 at the end. Can anyone explain this?

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


I know that on windows you can index your files to find things faster. Is there something like this for Ubuntu because when I search for something like /usr under files it says searching and it takes really long.

I have been using find command to find files on my 1 tb hard disk. it takes very long. then I used locate which proved to be faster with regular update using updatedb. But the limitation of locate is that I cannot find files with certain size or modified/created time. can you suggest me any ideas on how to find files at more speed or in that case how to pipe output of locate command in a way that all other information like size, time, etc. can be displayed or redirected to a file.


Astronomy is full of terms that were developed phenomenologically without a real understanding of the physical processes behind the phenomena.  Science marches on though, and many of these terms are now outdated as we've developed a better understanding of the physics behind the phenomenology.  Unfortunately, these outdated terms are still used rather than being replaced with new terms that better represent what is actually happening.  An example will help clarify what I mean.  Galaxies come it two main types: elliptical galaxies and spiral galaxies.  Elliptical galaxies are often called "early-type galaxies" and spiral galaxies are often called "late-type galaxies" because many decades ago it was believed that elliptical "early-type" galaxies gradually change into spiral "late-type" galaxies.  However, there is a large body of evidence that now shows that the evolutionary picture of a galaxy is not so simple, and if anything it is the "late-type" galaxies that change into "early-type" galaxies.  The terms "early type" and "late type" have far outlived their usefulness, yet they are still used by astronomers today.  I am wondering:   What is a good word to describe terms that are now outdated and no longer accurate/useful?  Example sentence:  "Terms like early type and late type are ..." What is a good word to describe the phenomenon of such words still being used, even though everybody knows the terminology is unnecessarily confusing and inaccurate?  Example sentence: " ... in astronomy confuses many inexperienced young astronomers."

Is there a word that means "outdated name"? For example:   Record, although very little music is on vinyl Film, although most movies are digital Horsepower, although no one uses horses as a metric anymore Phone, although it's mostly used to access the web   and so on.


Can I use the bank statement of my sponsor i.e. my aunt for UK standard visitor visa? I am currently unemployed so do I still need to create a bank account and she put money in it for me?    This aunt has been my guardian since I was 14, I am now 27. My situation is that I am awaiting a job by July and I wish to pass PLAB1 by June, 2017.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


A subgroup $N<G$ is called normal if $gN=Ng  ,\forall g \in G$. My book then says this is equivalent to $gN\subset Ng ,\forall g \in G$.  How do I see this? One way is obvious, but how do I show that if $gN\subset Ng ,\forall g \in G$, then $gN=Ng, \forall g\in G$?  I have tried to say, let $g \in G, n \in N$. Then $gn= n' g$ for some $n' \in N$ From there I have to somehow show $ng= g n''$ for some $n'' \in N$. Could someone help? Thanks.

Let $G$ be a group and $N$ a subgroup of $G$. I read that the following two definitions are equivalent:  1) $\forall g\in G$, $gNg^{-1}=N$  2)$\forall g\in G$, $gNg^{-1}\subset N$  does this mean that we have always $N\subset gNg^{-1}$ ? my guess is no because take $n\in N$ then if $n=gn'g^{-1}$ then $n'=g^{-1}ng$ and there is no reason that $g^{-1}ng\in N$


Note: I am not asking why is there a minimum limit. Previously closed as dup, but neither of the "duplicates" answer this question!!! The suggested dups were:     Both of which ask why the limit is there. I know why it's there.  I'm happy it's there. This question is asking why it is 15 (and not 14, or 16, etc)? Was any thought or research put into the choice, or was it just based on feel? Some examples of reasons for choosing 15:  Was some statistical analysis done on comment sizes? Was the limit borrowed from an external academic or commercial source? Was it decided on by committee? Is it because it's the largest length that can be represented by a single hex digit?  Also note: I don't think it's a bad limit or needs changing. I am just curious to know why 15 specifically was chosen. The reason I'm asking is if the reason has firm basis it, that basis could be valuable info for someone researching lower thresholds of meaningful communication.

It gets annoying if the answer to another comment is short.  Edit: My answerable question: Is there a documentation about why?


I have a simple query where there 2 number fields Total_Amount__c and Value__c but when i want to query in console it is throwing an unknown parsing error not able to understand what is the issue exactly here select id,Total_Amount__c,Value__c from account where Total_Amount__c <= Value__c

When I run the following query in query editor I get this error.  Error     Unknown error parsing query   Query  SELECT Id, OwnerId,Account.OwnerId FROM Contact where OwnerId = Account.OwnerId limit 100   Does anybody know what the problem is?


What would the final Quaternion Solutions look like for $x^2+1=0$?  I substituted in $x = a+bi+cj+dk$ and came up with a very long +/- square root.

How can we think of the set$$\{x \in \mathbb{H} : x^2 = -1\}$$geometrically? Is this set finite or infinite? Are there some more geometric ways of thinking about than meets the eye? Here, $\mathbb{H}$ denotes the quaternions.