I was checking the following number theory exercise:     Use induction to show that if $n\geq 0$ then    $5^n\equiv 1+4n\pmod{16}$   Applying the induction hypotesis I'm starting from here:  $16\mid 5^{n+1}-5-4n$  I don't know how to proceed from there or to go ahead in the exercise, any help will be really appreciated.

My textbook provided the following proof:        Base case: When $n=0, 9^n-8n-1=0=64\cdot0$, so $64\mid\left(9^n-8n-1\right)$.      Induction step: Suppose that $n\in\mathbb N$ and $64\mid\left(9^n-8n-1\right)$. Then there is some integer $k$ such that $9^n-8n-1=0=64k$. Therefore:      $$\begin{align} 9^{n+1}-8(n+1)-1&=9^{n+1}-8n-9\\ &=9^{n+1}-72n-9+64n\\ &=9\left(9^n-8n-1\right)+64n\\ &=9(64k)+64n\\ &=64(9k+n) \end{align}$$      so $64\mid\left(9^{n+1}-8(n+1)-1\right)$.      What I don't understand is how the equation goes from   $$= 9^{n+1} - 8n - 9$$  to   $$= 9^{n+1} - 72n - 9 + 64n$$


Lady Jessica defied her Reverend Mother's edict to "bear only daughters" because Duke Leto wanted a son- but how could these women choose what gender their children would be in the first place?

The plan to produce the Kwisatz Haderach was that all Bene Gesserit would have daughters only, until the time was ready (and we know that Jessica Atreides disobeyed). All this stems from the idea of the Bene Gesserit choosing the gender of their offspring. How are they able to do that? Jessica gave birth before taking the spice, if I remember correctly, so, how is she able to decide she will have a son? Is that ever established?


I am an amateur photographer. I was asked by one of the public to be their wedding photographer, after seeing a lot of my work online!   This would be my first wedding and not sure what to charge!

This may sound like a silly post...but, I need some "outside" opinion from people who know what they are doing.  I took up amateur photography as a hobby a couple of years ago...most of it being portrait photography of my children.  As I have posted my pictures on facebook, a plethora of people have loved my "work" and have been contacting me about my "photography" business.  I have been very up-front and honest with every one of them about only being an amateur, and never professionally trained.  That being said, people still hound me to take their pictures.  I am comfortable with my ability to take portrait style pictures....and I have even started charging $60 for a two hour shoot with the rights to the cd of prints.  I do not do my own printing.    Now, I have done three weddings for family members just over this last summer....and only as a wedding gift to them (in other words, I have not charged.)  But now, I am having others, who are not family members, wanting to "hire" me for their weddings.  Again....I have tried to tell them I don't do professional photography, only to be met with all of them still wanting to hire me.    My question is...what is a fair price to ask of these people?  They obviously still want me to work for them, knowing that I have no credentials.....but I have no idea how or what to charge for.  Can anyone give me some ideas?


If I create a bash loop like this, using literal numbers, all works as expected:  #!/bin/bash for i in {1..10};  do   echo $i  done   The output is:  1 2 3 4 5 6 7 8 9 10   But if I want to use the upper limit in a variable, I can't seem to get it it right.  Here are my four attempts:  #!/bin/bash n=10  for i in {1..$n};  do   echo $i  done  for i in {1.."$n"}; do    echo $i done  for i in {1..${n}};  do   echo $i  done  for i in {1.."${n}"};  do   echo $i  done   And the output is now:  {1..10} {1..10} {1..10} {1..10}   Not what I wanted... :(  To be clear about the question:  How do I use a variable as the limit for the range syntax in a bash for loop?

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


Update  Since asking this question, I've come to a better understanding of how question scope should be defined (more precisely than this question's original version), so I'll better define the scope herein.     Nuances in Interface Design  Somewhere in my question, , a user expressed vivid appreciation for the nuances of graphic design, expressing their importance. I didn't agree so much with the importance of such subtle features in graphic design, so I posed this question.  Are the nuances of graphic design important?  In user interface design, I've heard artists stress that the "smaller things" are actually of equal importance with the "general features", or at least, very important.     General Definition of Nuances  The smaller things are the subtle features, the nuances of an interface's design. The effects of light touch, going unnoticed without close inspection but contributing to the page in a collective way.  I personally love to pay attention to finer detail; I think subtle detail collectively makes a design unique and adds finesse. But that doesn't necessarily mean that it's a very important aspect of interface design.    Example  Facebook:    While Facebook's design is beautiful, crisp, and, in my personal opinion, good-looking, all of the visual features that I see are very obvious, each serving a specific purpose. I don't see anything that goes unnoticed at the first glance.   Every feature seems to be an important aspect of the page's layout and functionality, not a supporting detail that adds unnoticed finesse to the design.  Twitter:    Twitter, on the other hand, shows a handful of interface design nuances. Subtle outlines, the subtlety through which the twitter icon is engraved (top, center), faint clouds in the background, as well as a few other non-functional, decorative features of subtlety in mobile versions of the interface.  Many of the features seem to provide subtle, decorative value to the interface's design without directly contributing to the its functionality in an obvious way.   The (Updated) Question is:  Can these nuances add value to any design, or are they simply a personal taste decision?

I notice that sites and software with less superficial value (less style, inspiration, or simply "neat-ness") often succeed far above their fantastically, well-designed counterparts.  Is the style, creativity, & inspiration side of interface design not equally important compared to the content, efficiency, & productivity side of interface development?    In other words, if the buttons are where they should be and I can understand everything that's going on, is it not important to focus on additional fancy style?  Examples:    Reddit vs Digg  Reddit:    Known globally to look terrible, used monthly by 112 million unique users.  Digg:    Looks great, used monthly by 20 million unique users.  Windows 7 vs OSX  Windows 7:    Looks alright, but known more for efficiency and compatibility than beautiful, smooth design. 500 million licenses sold.   OSX:    Looks fantastic, performs and interacts smoothly, but 'natively' incompatible with most of the world's desktop software. 50 million copies sold.


How can i input this on latex? I tried but the space is too hard to input and also  the line is hard to input \documentclass{article} \usepackage{bussproofs} \begin{document} \begin{prooftree} \AxiomC{P} \AxiomC{$\neg P,Q$} \BinaryInfC{Q} \AxiomC{E} \AxiomC{F} \BinaryInfC{G} \UnaryInfC{H} \BinaryInfC{R} \end{prooftree} \end{document}  This produce similar but quite different can someone change it?

So, I want to typeset some proof trees, i.e. trees of inference rules like those in natural deduction (see diagram below). Which are the best packages that you have found that allow you to do this, and which features do they have?


Windows 10 ver 1083 build 17134.48 does not recognize either the GTX-560 or GT-630 graphics adapters. Installation of any driver version for these cards fails. Microsoft tech support unable to fix at level 1 support. Level 2 support will contact in 2 weeks. I have no confidence. NVIDIA customer support is as useful as Microsoft's.  On startup the manufacturer's banner flashes on-screen. When attempting to load the appropriate driver, both from Device Manager and the NVIDIA installation program the loading process terminates with an uninformitave "an error has occurred". The problem is with this specific build of Windows.  These drivers have worked in previous versions of Windows 10 I have tried 2 different cards.  I have updated all my drivers (wasted $40). Rolling back to a previous version is not realistic since this build took over 12 hours to complete.

The NVIDIA graphics driver on this PC is several versions out of date, so I went to upgrade it due to an unrelated issue. I went to the NVIDIA website, downloaded the 64-bit Windows 10 driver for the GT 720 GPU. I ran the installation as you normally would only to be met with the error "NVIDIA Installer Failed", and it told me the "Graphics Driver" failed to install.   Now I only have one usable monitor, the other is not detected, yet it turns on briefly as Windows initially loads the desktop.  What I Have Tried  Clean Installation  This is the first thing I tried, I restarted the computer, waited a while, and then I ran the NVIDIA driver installer, I selected "Custom Install", and then I ticked the "Clean Install" checkbox. This failed in the same way as before. Note, I also tried "Run[ning the updater] As Administrator".  Windows Update  I opened Windows Update to check for updates, since this can often fix failed driver installs. It said there was a NVIDIA driver update available, so began the update process. This failed with the error "0x80070003". I tried again, it failed again.  Manual Driver Install  From device manager, I right clicked on the GPU, and clicked "Update Driver Software", I opted to browse for driver files, with "Check subfolders" checked, and navigated to C:\NVIDIA\DisplayDriver\368.39\ and clicked "OK". This failed with "Code 28".  Manual Driver Install (Automatic)  Same as before, except I let Windows find the driver online automatically, I presume it found the same files I had already downloaded, and downloaded them again. This failed.  I am still stuck with one working monitor, reduced graphical performance, and am unable to install the NVIDIA driver.  This is my work PC, so I don't have a huge amount of time to reinstall Windows, so I'd rather not do that, as I have various customisations in place, and lots of programs installed. It'd take a long time for me to do all of that again.    EDIT: More Info  There are no NVIDIA listings under "Uninstall a Program" in the Control Panel. Yet the "NVIDIA Control Panel" app is still in the start menu, but does not start. I believe that is because there are just three DLL files in C:\Program Files (x86)\NVIDIA Corporation\coprocmanager, and no other files/directories in coprocmanager's parent directory.  When the driver is installing, my second monitor starts working, and then stops when the installation fails.  When the driver is installing, it briefly appears as "NVIDIA GeForce GT 720" in Device manager, after it fails, it goes back to being labeled, quite simply, "Display".  Tried running...  PsExec.exe -i -s "C:\NVIDIA\DisplayDriver\368.39\Win10_64\International\setup.exe"   ..to no avail.  PC Specs (from Speccy):   Custom build NVIDIA GeForce GT720 (not from Speccy, since it just lists the monitor under Graphics). Intel Core i5 4460 @ 3.20GHz 16.0GB Dual-Channel DDR3 @ 799MHz (11-11-11-28) ASUSTeK COMPUTER INC. H81M-PLUS (SOCKET 1150)


I want to show that the sample median $\tilde{x}$ minimizes the sum of absolute deviations,   i.e., $\tilde{x} = \underset{a}{argmin}\sum_{i=1}^{n}\begin{vmatrix} x_i-a\end{vmatrix}$  To show this, so far I have:  Sum of absolute deviation about a is  $=\sum_{i=1}^{n}\begin{vmatrix} x_i-a\end{vmatrix}$  Assume that $x_1\leq x_2\leq  ...\leq x_n$  CASE 1: When n is ODD (n = 2m + 1)  We get,   $x_1\leq x_2\leq  ... \leq x_m\leq x_{m+1}\leq  ... \leq x_{2m} \leq x_{2m+1}$  From this we can see that  $\begin{vmatrix} x_1-a\end{vmatrix} + \begin{vmatrix} x_{2m+1}-a\end{vmatrix}$ is least when $x_1\leq a \leq x_{2m+1}$  $\begin{vmatrix} x_2-a\end{vmatrix} + \begin{vmatrix} x_{2m}-a\end{vmatrix}$ is least when $x_2\leq a \leq x_{2m}$  ...  Thus,   $\begin{vmatrix} x_{m+1}-a\end{vmatrix}$ is least when $a=x_{m+1}=median$  CASE 2: When n is EVEN (n = 2m) We get,   $x_1\leq x_2\leq  ... \leq x_m\leq x_{m+1}\leq  ... \leq x_{2m-1} \leq x_{2m}$  From this we can see that  $\begin{vmatrix} x_1-a\end{vmatrix} + \begin{vmatrix} x_{2m}-a\end{vmatrix}$ is least when $x_1\leq a \leq x_{2m}$  ...  Thus,   $\begin{vmatrix} x_{m}-a\end{vmatrix} + \begin{vmatrix} x_{m+1}-a\end{vmatrix}$ is least when $x_m\leq a \leq x_{m+1}$    Is this enough to show that sample median minimizes the sum of absolute deviations?

Can somebody explain me clear the mathematical logic that would link two statements (a) and (b) together? Let us have a set of values (some distribution). Now,  a) Median does not depend on every value [it just depends on one or two middle values]; b) Median is the locus of minimal sum-of-absolute-deviations from it.  And likewise, and in contrast,  a) (Arithmetic) mean depends on every value; b) Mean is the locus of minimal sum-of-squared-deviations from it.  My grasp of it is intuitive so far.


If N is a subgroup normal of the group G such that $N \cap G'=\{e_{G}\}$, show that $N \subset Z(G).$ Where $G'$ is the subgroup commutator.  I did like this: Let $g \in G $ and $ x \in N$ arbitrary, as N is normal subgroup then $ x ^{ - 1} \in N $ Now let us consider the element $xgx^{-1}g^{-1}$. On the other hand, $ xgx^{-1}g^{-1}\in N $. In fact, because of the hypothesis of N being normal subgroup of G, we have that $ x (gx^{-1} g^{-1}) \in N $. Therefore  \begin{eqnarray*} xgx^{- 1}g^{- 1} \in N \quad \text{and} \quad xgx^{-1} g^{- 1} \in G' & \Rightarrow & xgx^{-1}g^{- 1} \in N\cap G' \\ &\Rightarrow & xgx^{-1} g^{-1}= e_{G} \\  &\Rightarrow & xg=gx \Rightarrow x\in Z(G). \end{eqnarray*}

Assume that $N$ is a normal subgroup of $G$ such that $N \cap G'=\{e\}$.  Prove that $N \subset Z(G)$.   Note 1: $Z(G)$ is the center of the group $G$, and $G'$ is the set of all commutators of $G$.  Note 2: Assume that $n \in N$. We want to show that for all $g \in G,$  $ng=gn$. But, I don't know how to use the fact that $N \cap G'=\{e\}$ to reach this.    Any hints? suggestions? answers?


I have a folder and it has some xls files of same format in it. I don't know number of files or their names. I want to merge all of them. So how would i know the names of those files dynamically so that i can write further logic to merge them.

I want to get a list of files in a directory, but I want to sort it such that the oldest files are first.  My solution was to call File.listFiles and just resort the list based on File.lastModified, but I was wondering if there was a better way.  Edit: My current solution, as suggested, is to use an anonymous Comparator:  File[] files = directory.listFiles();  Arrays.sort(files, new Comparator<File>(){     public int compare(File f1, File f2)     {         return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());     } });


I have a program that frequently uses an external program and reads its outputs. It works pretty well using your usual process redirect output, but one specific argument for some reason hangs when I try to read it, no error message - no exception, it just 'stops' when it reaches that line. I of course use a centralized function to call and read output from the program, which is this:  public string ADBShell(string adbInput) {     try     {         //Create Empty values         string result = string.Empty;         string error = string.Empty;         string output = string.Empty;         System.Diagnostics.ProcessStartInfo procStartInfo              = new System.Diagnostics.ProcessStartInfo(toolPath + "adb.exe");          procStartInfo.Arguments = adbInput;         procStartInfo.RedirectStandardOutput = true;         procStartInfo.RedirectStandardError = true;         procStartInfo.UseShellExecute = false;         procStartInfo.CreateNoWindow = true;         procStartInfo.WorkingDirectory = toolPath;         System.Diagnostics.Process proc = new System.Diagnostics.Process();         proc.StartInfo = procStartInfo;         proc.Start();         // Get the output into a string         proc.WaitForExit();         result = proc.StandardOutput.ReadToEnd();         error = proc.StandardError.ReadToEnd();  //Some ADB outputs use this         if (result.Length > 1)         {             output += result;         }         if (error.Length > 1)         {             output += error;         }         Return output;     }     catch (Exception objException)     {         throw objException;     } }   The line that hangs is result = proc.StandardOutput.ReadToEnd();, but again, not every time, only when sent a specific argument ("start-server"). All other arguments work just fine - it reads the value and returns it. It's also strange the way it hangs. It doesn't freeze or give an error or anything, it just stops processing. As if it was a 'return' command, except it doesn't even return to the calling function, it just stops everything with the interface still up and running. Anyone experienced this before? Anyone have any idea what I should try? I'm assuming it's something unexpected within the stream itself, but is there a way I can handle/ignore this so that it reads it anyway?

I have the following code: info = new System.Diagnostics.ProcessStartInfo("TheProgram.exe", String.Join(" ", args)); info.CreateNoWindow = true; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; info.RedirectStandardOutput = true; info.UseShellExecute = false; System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); p.WaitForExit(); Console.WriteLine(p.StandardOutput.ReadToEnd()); //need the StandardOutput contents  I know that the output from the process I am starting is around 7MB long. Running it in the Windows console works fine. Unfortunately programmatically this hangs indefinitely at WaitForExit. Note also this code does NOT hang for smaller outputs (like 3KB). Is it possible that the internal StandardOutput in ProcessStartInfo can't buffer 7MB? If so, what should I do instead? If not, what am I doing wrong?


Problem  Solve $y' = \frac 1{3x+\sin(3y)}$  Progress  Sadly none. Any help/tips/solutions would be greatly appreciated!

I have been trying to solve a differential equation as a practice question for my test, but I am just unable to get the correct answer. Please have a look at the D.E: $dy/dx = 1/(3x+\sin(3y))$    My working is as follows: $dx/dy = 3x+\sin(3y)$ $dx - 3x = \sin(3y) dy$ Integrating both sides: $x-(3/2)x^2 = -(1/3)\cos(3y) + c$  But the correct answer is: $x = ce^3y - 1/6(\cos(3y) + \sin(3y))$, which is quite different from what I have got. Could someone please help me solve this? Thanks :)


According to the cosmological model of the expanding universe, the distant (diametrally opposite) galaxies have bigger and bigger relative comoving speed, and this speed (which is not a relative speed in the sense of SRT) can ultimately become bigger than c.  Is the following speculation consistent with GRT: someone films the far sky and on the film, at a moment t = T, a distant galaxy disappears? [The galaxy was to see on the film at t < T but no more at t = T because the relative comoving speed becomes > c in this really moment. Galaxies being big, we can imagine also an apparent extinction interval T0 < t < T1.]  This question is related to:    as it resulted from the discussions it generated there.

So, this bit of information confused me lately. Before, I figured galaxies were no longer visible by us because their luminosity decreased in an inverse square manner. However, while watching a movie I stumbled upon the concept of how galaxies disappeared from our sight because the space which both galaxies occupy is moving away from each other faster than the speed of light.  I understand nothing can move faster than the speed of light, but the argument here, I guess, is that space itself can move, as a consequence of the Big Bang, faster than the speed of light. Is this correct? If not, how do galaxies disappear?


We have a section on the homepage where we'd like to show a different (random) post every 3 days.  I'm trying to figure out a way to do it. This would give us a weekly post, but I don't know how to get a post every 3 days...:  <?php             global $post;             $args = array(                 'post_type' => 'girls_tips',                 'posts_per_page' => 1,                 'no_found_rows' => true,                  'offset' => (date( 'W' ) - 1)             );             $posts = get_posts($args);             foreach($posts as $post):             setup_postdata($post);             ?>
<?php the_title(); ?>
              <?php endforeach; ?>   Any help would be appreciated! Cheers,

How do I create a random post but it shouldnt be change when the page is refreshed   I want a random post that will last for a day and after 24 hours or a day,  it will change randomly the post ,  will be that possible? or are there a plugin that exactly does that ,   actually what Im trying to create is like a "Random Tip For the Day", you know something like that  I hope someone understand my question  please help,any help will be appreciated.


public ApexPages.StandardSetController setList {         get {             if (setList == null) {                  setList = new ApexPages.StandardSetController(Database.query(query));             }             if (this.PageSize == null) PageSize = 20;              setList.setPageSize(PageSize);              return setList;         } set;     }     public Integer PageSize {         get; set {              if(value != null) this.PageSize = value;         }     }     public Integer PageNumber {         get {              this.PageNumber = setList.getPageNumber();             return this.PageNumber;         }         set {              setList.setPageNumber(value);          }     }     public Integer TotalPages {          get {             if (setList.getResultSize() <= 10)                 this.TotalPages = 1;             if (Math.Mod ( setList.getResultSize(),setList.getPageSize() ) == 0)                 this.TotalPages = ( setList.getResultSize()/setList.getPageSize() );             else this.TotalPages = ( setList.getResultSize()/setList.getPageSize() )+1;             return totalpages;         }         set;     }     public List<Appointment__c> getAppointments() {         return (List<Appointment__c>) setList.getRecords();     }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


What is better: void foo() or void foo(void)? With void it looks ugly and inconsistent, but I've been told that it is good. Is this true?  Edit: I know some old compilers do weird things, but if I'm using just GCC, is void foo() Ok? Will foo(bar); then be accepted?

Consider these two function definitions:  void foo() { }  void foo(void) { }   Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?


As I was learning (teaching myself) to use grep, I ran into a problem, some examples I was testing didn't work as I expected. I decided to try to figure out the problem on my own. First I would check that I was using the most up to date version of grep available. I searched for hours to no avail. I saw grep 2.5 & 3.0 referenced a few times and I have 2.25. So, my simple question at this point is;   Is grep 2.25 the most recent version available for ubuntu 16.04?

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


I have a string, I want to split it into a list so that every element of the list has N words. If the last element does not have enough words, leave it as it is.  for example:  >>> Split_by_N_words(string="I grow a turtle. It's a very slow but cute animal.", N=4) ["I grow a turtle.", "It's a very slow", "but cute animal."]   I tried to do this:  def Split_by_N_words(string, N):     word_list = [""]     for a in string.split()[:N]:         word_list[0] += a + " "     .....   But I have no idea how to proceed with the other elements

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have an input json like the following. It has contact fields and a nested object for another contact. I'm using Postman to send requests. {   "Id": "0036D00000H24bHQAR",   "Preferred_Name__c": "Preferred Name",   "HomePhone": "$profile_home_phone",   "MobilePhone": "$profile_mobile",   "MailingCountry": "$profile_address_country",   "MailingCity": "$profile_address_locality",   "MailingState": "$profile_address_administrative_area_level_1",   "MailingPostalCode": "$profile_address_postal_code",   "MailingStreet": "$profile_address_route",   "Preferred_contact_method__c": "Email",   "primaryGuardian": {     "firstName": "$profile_guardian_first_name",     "lastName": "$profile_guardian_last_name",     "MailingCountry": "$profile_guardianaddress_country",     "MailingCity": "$profile_guardianaddress_locality",     "MailingState": "$profile_guardianaddress_administrative_area_level_1",     "MailingPostalCode": "$profile_guardianaddress_postal_code",     "MailingStreet": "$profile_guardianaddress_route",     "MobilePhone": "$profile_guardian_mobile",     "Email": "some@cse.com",     "relationship": "Mother"   } }  I'm using the following code: Contact goScholar = (Contact)JSON.deserialize(request, Contact.class);  //get primaryGuardian Map<String, Object> body = (Map<String, Object>)JSON.deserializeUntyped(request); String primaryGuardianJson = body.get('primaryGuardian').toString();  // Getting the error at the below line Map<String, Object> data = (Map<String, Object>)JSON.deserializeUntyped(primaryGuardianJson); //get relationship for a junction record field String relationship = data.get('Relationship').toString();  Contact primaryGuardian = (Contact)JSON.deserialize(primaryGuardianJson, Contact.class);  I'm getting the following error:  System.JSONException: Unexpected character ('E' (code 69)): was expecting double-quote to start field name at [line:1, column:3]  Class.System.JSON.deserializeUntyped: line 11, column 1 Class.ContactService.createPrimaryGuardian: line 78, column 1 Class.ContactService.updateContact: line 38, column 1 Class.ContactAPI.replace: line 35, column 1   I'm guessing that when using deserializeUntyped for the first time, it removes the " which is causing the error. Is there a solution for this?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex?


In the last book, Snape and Voldemort are seen to be able to fly, after Snape is pushed out of the window in the Hogwarts' classroom. Voldemort flies during his hunt for the owner of the elder wand. How are they able to fly? What is this spell which can enable you to fly, which is stated by the author? (not in Harry Potter Wikia)  I seem to remember there is one such spell known as the Wingardium Leviosa, which lets the person and/or object hit levitate in the air, but this wouldn't be counted as actually flying, just as Snape and Voldemort have done. Does J.K. Rowling ever answer this in any of her interviews?

While looking into broomsticks and their use in Harry Potter, I found that there was no spell or charm that would make a human fly.  Originally, once they found ways to make objects fly, they needed to use objects that they could have handy and keep in the house, but which would not seem suspect to muggles.  One easy choice was the broom, since it'd be inconspicuous in any home and would always be handy.  But I can't find any mention of spells, charms, or enchantments are used to make brooms fly.  However, Voldemort and Snape have both flown on their own.  So the only examples of flying people are two dark wizards.  What is it about the magic used to make a broom fly but that only dark wizards seem to want to use it on themselves?  (Or, perhaps, did Snape and Voldemort use magic on, say, their clothes or something different?)    Addendum: In Quidditch Through the Ages it specifically states that there is no known spell that makes a human fly.


I am not sure how to go about this problem. Does anyone have any insight into a good start/theorems I may need to employ?

The following is exercise 6 of Chapter 4 in Ireland and Rosen's Number Theory.  If $p=2^n+1$ is a Fermat prime, show that $3$ is a primitive root modulo $p$.  I first recall that any Fermat prime actually has form $2^{2^n}+1$. Hence $p\equiv 1\pmod{4}$. Exercise 4 from the same chapter states the if $p\equiv 1\pmod{4}$, then $a$ is a primitive root mod $p$ iff $-a$ is as well. I was able to prove this, but unable to show $-3$ is a primitive root.   Is there a fruitful approach?    P.S. I was able to cheat and use the fact that  $$ \phi(p-1)=\phi(2^{2^n})=2^{2^n-1}=(p-1)/2 $$ and since there are $(p-1)/2$ quadratic nonresides and each of the $\phi(p-1)$ primitive roots is a quadratic nonresidue, then the two sets are actually the same.  Then $3$ is a nonresidue since applying quadratic reciprocity $$ \left(\frac{3}{p}\right)=\left(\frac{p}{3}\right)=\left(\frac{2}{3}\right)=-1 $$ hence not primitive. But I only know this from a number theory class I took back in school, not from anything in Ireland and Rosen so far. Is there a way to avoid using a sledgehammer the authors haven't given me yet?


Stacking is done with combining all the weak learners. What will happen if we do it with strong learners? A case of overfitting?

See also .   In  algorithms such as  and  it is known that the "weak" learners to be combined only have to perform better than chance to be useful, from Wikipedia:     The classifiers it uses can be weak (i.e., display a substantial error rate), but as long as their performance is not random (resulting in an error rate of 0.5 for binary classification), they will improve the final model. Even classifiers with an error rate higher than would be expected from a random classifier will be useful, since they will have negative coefficients in the final linear combination of classifiers and hence behave like their inverses.    What are the benefits of using weak as opposed to strong learners? (e.g. why not boost with "strong" learning methods - are we more prone to overfitting?) Is there some sort of "optimal" strength for the weak learners? And is this related to the number of learners in the ensemble?   Is there any theory to back up the answers to these questions?


Which part of speech is "back" in the sentence “then she went back to her secretaire”?

Put the book back on the table.   I'm having trouble. I think it is a preposition.


Per the title, does $\displaystyle\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converge? Converge absolutely?   I'm stuck on this question, not sure how to approach it.  Thank you!


I dont want to enable auto login for various reasons. Is it possible to login to the desktop, from an ssh session, in order to then VNC into the desktop ? The issue is that I remotely turn on/off my pc remotely and on occassion I would like to gain access to the desktop.

Is it possible to remotely (via ssh) make a login to GDM? I'll explain a situation in which I'd need this: I'm on my laptop and connect to my desktop via ssh. I realize there are some updates available. I install them all, but I need to reboot the computer. The problem is that once the desktop has rebooted, there will be no GDM session available, since it's necessary to log in. Can I somehow perform the GDM login remotely from my laptop?  Edit: I can't find FreeNX for Maverick, and I haven't been able to configure x11vnc + vncviewer to work. Isn't there an easy way?


Let $X_{1}, X_{2},...,X_{n}$ be i.i.d from the Laplace distribution or Double exponential distribution $DE(\mu, \sigma)$ with the following pdf,  $$f(x) = \frac{1}{2\sigma} e^{\dfrac{-|x-\mu|}{\sigma}}\quad, \quad\mu\in \mathbb{R}, \quad\sigma>0$$   I am intended to find the sufficient and complete statistics for $\mu$ and $\sigma$, It can be done in the following way.  $$f(X_{1}, X_{2},...,X_{n}) = \frac{1}{(2\sigma)^{n}} e^{\dfrac{-\sum^{n}_{i=1}|x_{i}-\mu|}{\sigma}}\quad, \quad\mu\in \mathbb{R}, \quad\sigma>0$$   So, we can say that $(m, \sum^{n}_{i=1}|X_{i}-m|)$ is sufficient and complete statistics for $(\mu, \sigma)$, where $m$ is the median.  I also want to determine the distribution of  $T=\sum^{n}_{i=1}|X_{i}-m|$. Do you have any idea to find the distribution of $T$?  Thank you in advance.

Suppose we have p dimensional vector of $X =[X_1 \dots X_n]$ where X is Laplace distributed. What will be a sufficient statistics for estimating covariance of $X$?     Would it be the sample covariance, i.e.$$\frac{1}{N}\sum_{i=1}^{N}  (X_i-\bar X)(X_i-\bar X)^T\,?$$


I would like to number a multi-line multi-column equation group with one number. If I use  \documentclass{scrartcl}   \usepackage{amsmath} \begin{document}  \begin{align}     x&=1 & x&=2\\     y&=3 & y&=4 \end{align} \end{document}   I get an equation number per row. When using the split environment  \documentclass{scrartcl}   \usepackage{amsmath} \begin{document}  \begin{align}     \begin{split}         x&=1 & x&=2\\         y&=3 & y&=4     \end{split} \end{align} \end{document}   the groups are omitted and I have one number for four rows.  How can I number the first example with one number?  Edit:  I used the equation and aligned environments proposed by @daleif and got the following results in equation (3). Equation (1) and (2) are typeset by an align environment:    The align environment uses the whole width of the document. Is this possible with aligned, too?

i would like to write few equations, but all the equations will get only once numbered and in the middle (right side) of the equations. e.q. if i write 3 equations, the number will be to the right of the second equation line and if i have 2 equations, then the number will between the two equations and at the right side.  in addition i would like to have something like "&" (align) that i could align my equations at certain points.  Example:  a   = x_{ij}                   (1) b_j = y_j         where of course the number of equation doesn't take a all line space.


After retrieving data from an external object, I'm in progress type conversion to an External Object. However, when I run  test class, it is not covered from this point.             test__x objT = new test__x();             if(strObjectAPITemp !=null && strObjectAPITemp == 'test__x'){                 test__x objT = new test__x();                 String strKye;                  for(SObject obj : listResult){                     objT = (test__x) obj;                     strKye = objT.Id;                     if(objT.partid__r.Id == null) {                         mapSaleItemTemp.put(strKye, objT);                      }                 }             }           I'd like to know if there is a way to cover lines from this external declaration. Thank you so much.

How can the Test Coverage can be fulfilled for the Apex classes which queried for External Objects.I have written Test class just like assuming External Object behaves like a custom Object but getting error repetitively "CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: You can't create records for the object".  I used the DML statements like Database.insertAsync but no use. Gone through some articles saying that we need to mock the external object for the Apex Test coverage on External Object. If so is there document which explains about this concept.


I know it is possible to calculate terminal velocity using air density, mass, and drag coefficient, but is there any way to calculate the time taken until that speed is reached (assuming air density is constant for simplification purposes)?

I was given a problem for homework where we needed to calculate the time for a falling object to reach a certain velocity when accounting for drag force. I did it by setting up acceleration as a function of velocity and integrating (it was a differential equation).   However, this is an introductory physics course, with no knowledge of calculus required going in. We haven't even done derivatives yet, strictly speaking. I was fortunate enough to have taken calculus before, so I was able to recognize and solve the differential equation.   When I asked my classmates how they did it, they said they messed around with numbers until they got something that worked (it was online with no points deducted for wrong answers). For most of them, they just divided the terminal velocity by acceleration due to gravity, which makes no sense, since we weren't even asked for time taken to reach terminal velocity, but 63% of it. That method just happened to round to the same number as the correct one.   My question is, is there some way to find this value using elementary physics, or did my professor give us an unfair problem? The TAs weren't any help and I have class during her office hours.   The question itself is as follows:     The terminal velocity of a 4×10$^{-5}$ kg raindrop is about 9 m/s . Assuming a drag force $F_D=−bv$, determine the time required for such a drop, starting from rest, to reach 63% of terminal velocity.


I am presented with the following problem: Prove that $\lim_{n \to \infty} \frac{1}{2^{2n}} \binom{2n}{n} \sim \frac{1}{\sqrt{\pi n}}$ After simplifying the left hand side expression: $\frac{1}{2^{2n}}(\frac{(2n - n)!n!}{2n!}) = \frac{1}{2^{2n}}({\frac{n!}{2n!}}) = \frac{n!}{2^{2n+1}}$ And using Stirling's approximation, I get: $\frac{\sqrt{2\pi n}(\frac{n}{e})^n}{2^{2n + 1}}$ However, I'm not sure how to get from: $\lim_{n \to \infty} \frac{\sqrt{2\pi n}(\frac{n}{e})^n}{2^{2n + 1}}$ to $\frac{1}{\sqrt{\pi n}}$

I saw this statement : $$\binom{2n}{n} \asymp \Theta \bigg(\frac{2^{2n}}{\sqrt{n}}\bigg) \asymp \Theta\bigg(\frac{4^n}{\sqrt{n}}\bigg)$$  How did we go from the first statement to the second? I tried Stirling's aproximation, but that didn't get me anywhere.


This is a question directed to those who are familiar with compiling Tex using Vim. My OS is Windows 8.1 Problem Description: Inverse and Forward Search is partially enabled. When I double click at a paragraph in the PDF file (in Sumatra), if I double click at the first sentence, then I can be sent back to the corresponding paragraph in .tex file opened in Vim. However, if I click at any line further than (including) the third line of the same paragraph, I would be told that: No synchronization info at this position.   The weird thing is, after a random number of lines, inverse search would again point to the .tex file again. For forward search, I can only say the following:  Sometimes, for the paragraph where inverse search is partially enabled, it works by sending the focus of window to the PDF document and pointing to exact corresponding paragraph.  Sometimes, forward search will send me to a random paragraph in PDF file.  And sometimes, the forward search fails. Sumatra complains that: No result found around line # in file ~\kkk.tex   My Vim is on Github: . I am not sure if I am asking this question in the correct forum. If not, please direct me to the correct site/forum/mail-list.

The pdfsync homepage states that:     At the end of this summer (2007), pdfsync is slowly migrating to pdftex itself. We are working at giving pdftex all the pdfsync ability and more...   The pdfsync README file discourages people from using pdfsync:     pdfsync uses extremely sensible code. You should not use pdfsync on final documents because it can change the layout rather significantly.   From your knowledge and experience, what is the actual status of pdfsync?   Is it safe to use pdfsync? Is there an alternative for pdfsync that is built into pdftex? Is there a different tool for pdflatex that offers DVI-like functionality (forward and backward search)?


I am an English learner. While I was watching a documentary video, this caption really confused me a lot.   Is it correct to say there is a lot? I thought it is supposed to be there are a lot.  Also, what is the difference between over here and at here?

Which of the following sentences is correct:        There is a lot of food and fruit in the supermarket.   There are a lot of food and fruit in the supermarket.


I want a function to round up an integer, like this      11 -> 20     12 -> 20     31 -> 40     39 -> 40     50 -> 50 what can i do ?

How to, in C# round any value to 10 interval? For example, if I have 11, I want it to return 10, if I have 136, then I want it to return 140.   I can easily do it by hand  return ((int)(number / 10)) * 10;   But I am looking for an builtin algorithm to do this job, something like Math.Round(). The reason why I won't want to do by hand is that I don't want to write same or similar piece of code all over my projects, even for something as simple as the above.


If somebody says 'Next December I'm gonna do something', and we have, let's say, April of 2016, does he mean December of 2016 or December of 2017?

At what point does next Tuesday mean      the next Tuesday that will come to pass     and no longer      the Tuesday after the Tuesday that will come to pass?   And, when does the meaning switch back?


I have 2 ISPs in case one fails. Ideally I would also like to take advantage of balancing LOAD on each ISP to maximize speed. My Current Network:  LAN A + 6 Deco M4 Mesh Router Mode (4 connected to LAN): 40+ devices (USING ISP A - 300MB symmetric - fiber) LAN B 15+ devices cable modem w/router function (USING ISP B - 300MB asymmetric - coaxial)  Goal:  1 single LAN (no connectivity issues) with Deco M4 Mesh, with 2 ISPs balancing load and providing continuity in 1 ISP if the other is down  How can I do this? do I need a special device to manage traffic other than main the Deco M4? Can I do something plug and play or I need device programming? In that case, can I buy a device and get remote support to program this?

I have the following equipment, which I want to connect as described to two ISPs.  1 internet server - ubuntu 16.04 - to ISP 1  2 content creator - win7 - to ISP 1  3 HTPC - ubuntu 16.04 - to ISP 2  4 Sony BluRay player - to ISP 2  5 admin - ubuntu 16.04 - to ISP 1 -- needs to mount drives from computers 1, 2, and 3, admin both routers, and be a file server to HTPC.  I think what I may need is to connect it all to a switch, but I don't have one to test. Another possibility might be extra lan cards, or wireless cards.  What would be best, and are there any pitfalls I need to avoid in the topology?  If I need to supply any more info I'll be happy to do so.  Speaking of which, as a pre-edit if you will, everything is in one 16x16 room, mostly on one wall.  ISP 1 is suitable for the server, whereas ISP 2 will not provide a properly formatted reverse DNS. AOL and Comcast mail servers insist on that.  ISP 2 gives me more bandwidth, so that Netflix etc. don't detract from our customers' experience.  Both routers are set to 192.168.0.1, but that can change, of course.


Let's say I want to create a list of lists to be filled later, that looks like that:  [['', ''], ['', ''], ['', '']]   I can create it like so:  rows=3 cols=2  A=['']*cols B=[A[:]]*rows   However, the inner lists are the same object, as can be seen:  B[0][0]='!' print (B)   Output:  [['!', ''], ['!', ''], ['!', '']]   This occurs even though I used B=[A[:]]*rows rather than B=[A]*rows; using  B=[A][:]*rows does not solve the problem.  If A[:] should efficiently create a full copy (rather than just a reference) by slicing A, then why does this occur?    P.S.  Obviously this can be easily solved for example by:  this_text=[] temp=[] for i in range(cols):     A.append('') for i in range(rows):     B.append(A[:])   My aim is improved understanding, not creating this specific list of lists.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I've been working on a cupcake, but there is a problem in the icing.This question was closed, but the answer which I was recommended does not answer my question. I have edited it so it can be reopened. The result in the other question doesn't look close to the one in the reference with a lot of curves in it attached below: The orange icing has some really detailed curves. I've tried almost everything, from using a bezier curve modifier on a mesh, or trying to stack layers on top of each other, but without a resemblance of the reference. And also the materials, I tried subsurface scattering but I still don't feel the soft paste look in the materials. Please help, can't I get the same result in 3d? Or is it impossible? I really need help in this. I have tried a lot of things in the past few days. I have not found an answer that gives a result similar to the highly detailed and realistic loook of the icing in the reference. Thanks in advance.

I would like to simulate piping of a cream through a piping tip. I modeled the piping tip as you can see.  I added a soft body to the cylinder, and then I set the piping to collision.  But for some reason it doesn't go through instead it stops midway. I would like to render an image of the cream after deformation.  Do you have any idea how to create such an effect?


help would be appreciated on this problem. We are given that the sum from n to infinity of x_n^2/n converges and then asked to prove that the sequences of averages converges. Where the sequence of averages capital X_n is defined as (1/N)* sum (from j=1 to N) of x_j . I'm not really sure where to even begin but I was thinking that we would use the fact that since the sum of x_n^2/n converges we know that for an n>K where K is some natural number we have |x_n^2/n| < epsilon for any epsilon. Do we mess with that relationship and arrive to a conclusion about x_j? Or is there another approach I should take. Thanks for your time and help.

Let $a_n$ be a sequence of nonnegative numbers. Then I want to show that      If $\,\sum_{n=1}^\infty a_n^2\,/ n\,$ converges, then $\frac 1N\!\sum_{n=1}^{N}a_n\,$ converges to zero.    A hint suggests me to write $a_n=\sqrt{n}\cdot \frac{a_n}{\sqrt n}$ and use the Cauchy-Schwarz inequality. However it does not seem enough. I cannot show that $\frac 1N\!\sum_{n=1}^{N}a_n$ converges to zero.  Could anyone please help me to prove it?


What are the differences between git pull ,  git fetch and git rebase? I feel pull and fetch are same.

What are the differences between git pull and git fetch?


What does  tell us about? According to definition; it is the total heat content of a system, if it is the total heat content of a system then what is Internal Energy?  Since we know,                 $$ H = U + PV $$ If we have one work done $d(PV)$ in Internal Energy itself,then what is the need of the second one?

What is meant by ? My professor tells me "heat content". That literally makes no sense. Heat content, to me, means internal energy. But clearly, that is not what enthalpy is, considering: $H=U+PV$ (and either way, they would not have had two words mean the same thing). Then, I understand that $ΔH=Q_{p}$. This statement is a mathematical formulation of the statement: "At constant pressure, enthalpy change may be interpreted as heat." Other than this, I have no idea, what $H$ or $ΔH$ means.  So what does $H$ mean?


Let $A\subseteq \mathbb{R}^n$. I want to prove that $cl(cl(A))\subseteq cl(A)$. Let $x\in cl(cl(A))$, then $x$ is adherent to $cl(A)$, which implies that $B(x;r)\cap cl(A)\neq\emptyset, \forall r>0$. How do I proceed from here? And do I really need to?  I'm guessing that it might be sufficient to argue as follows:  Let $x\in cl(cl(A))$, then $x$ is adherent to $cl(A)$, which implies that $x\in cl(A)$.  But would this be rigorous enough?

I know it seems silly, but is it possible for the closure of a set to have limit points that are not limit points of the original set?


I need help with solving this hw problem for my matrix algebra class.   Consider the transformation $T: \Bbb R^3 \to \Bbb R^2$ defined by:  $$ T(x) = T \pmatrix{x_1\\x_2\\ x_3} = (2x_1 + x_3) \pmatrix{1\\2} + (x_2 - 3x_3)\pmatrix{-1\\1} $$  1a) determine the matrix of the above transformation  1b) determine the reduced row echelon form of the matrix found in 1a  1c) based on your answer to part 1b, is the transformation T onto?  1d) based on your answer to part 1b, is the transformation T one-to-one?  1e) based on your answer to part 1b, determine the set of vectors x in R^3 for which T(x) = 0. Write your answer in parametric vector form  Would sincerely appreciate any help.

If T: $\Bbb R$3→ $\Bbb R$3 is a linear transformation such that:  $$ T \Bigg (\begin{bmatrix}-2 \\ 3 \\ -4 \\ \end{bmatrix} \Bigg) = \begin{bmatrix} 5\\ 3 \\ 14 \\ \end{bmatrix}$$ $$T \Bigg (\begin{bmatrix} 3 \\ -2 \\ 3 \\ \end{bmatrix} \Bigg) = \begin{bmatrix}-4 \\ 6 \\ -14 \\ \end{bmatrix}$$ $$  T\Bigg (\begin{bmatrix}-4 \\ -5 \\ 5 \\ \end{bmatrix} \Bigg) = \begin{bmatrix} -6\\ -40 \\ -2 \\ \end{bmatrix} $$  Then the standard matrix for T is...  I'm not exactly sure how to approach this problem. Could anyone explain how to solve this problem?


Is there an $f$ that takes two values $a$ and $b$ and if $b>a$, it returns $f(a,b) = b-a$ otherwise $f(a,b) = 0$?  Is the $f$ linear?  P.S: I think one can find the maximum between $a$ and $b$ and then subtract $a$ from the maximum to get the desired $f$ described above.

How to to calculate the maximim or minimum of two numbers without using "if" ( or something equivalant to that manner)?  The above question is often asked in introductory computer science courses and is answered using .  Now although it is not obvious, but using absolute value is also equivalant to using an if statement e.g. defining Max(a,b) = a if a>b else b;  Besides using limits, is there another way of finding the maximum or minimum of two numbers?


When we start learning about differential equations sometimes we "multiply" both sides of the equation by a differential and then integrate.   Example: $\frac{dy}{dx}=x$ then $dy=x*dx$ and so on.  I have always thought this is a "shortcut" since multiplying by a differential doesn't make a lot of sense to me.  But, why does it work? What are we really doing?  EDIT:  I'll clarify a little more. My specific question is: Why can we treat differentials as real numbers?

I see an equation like this:  $$y\frac{\textrm{d}y}{\textrm{d}x} = e^x$$  and solve it by "separating variables" like this:  $$y\textrm{d}y = e^x\textrm{d}x$$ $$\int y\textrm{d}y = \int e^x\textrm{d}x$$ $$y^2/2  = e^x + c$$  What am I doing when I solve an equation this way?  Because $\textrm{d}y/\textrm{d}x$ actually means  $$\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$  they are not really separate entities I can multiply around algebraically.    I can check the solution when I'm done this procedure, and I've never run into problems with it.  Nonetheless, what is the justification behind it?  What I thought of to do in this particular case is write  $$\int y \frac{\textrm{d}y}{\textrm{d}x}\textrm{d}x = \int e^x\textrm{d}x$$ $$\int \frac{\textrm{d}}{\textrm{d}x}(y^2/2)\textrm{d}x = e^x + c$$  then by the fundamental theorem of calculus  $$y^2/2 = e^x + c$$  Is this correct?  Will such a procedure work every time I can find a way to separate variables?


Maybe it's so easy that I can't get but... what is the difference between:    public void MyMethod<T>(T item) where T : SomeType { ... }   and  public void MyMethod(SomeType item) { ... }   ?

What is the difference between this:  void MyMethod(IMyInterface value) {     //... }   and this:  void MyMethod<T>(T value) where T : IMyInterface {     //... }


I have a list that contains 1200 items,  I need to remove all of the duplicate items in the list that have a certain predicate, my items have the following status on them:  "not flat", "not covered", "accepted", X, Y, Z  i want to remove all duplicate item from the list that have the same X,Y,Z and have the same Status string  how can I achieve this?  I tried to do this this way:  public class MyEqualityComparer : IEqualityComparer<TcReportPoint3D> {     public bool Equals(TcReportPoint3D a, TcReportPoint3D b)     {         return a.X == b.X && a.Y == b.Y && a.Z == b.Z && a.Status != b.Status;     }       public int GetHashCode(TcReportPoint3D other)     {         return other.X.GetHashCode() * 19 + other.Y.GetHashCode();     } }   then:    //get all distinct values with different status     var points = reportpoints.Distinct(new MyEqualityComparer()).ToList();      //remove distinct values from the real least, hoping to remove duplicates.     foreach (var point in points)     {         if (point.Status == TePointStatus.NotCovered             || point.Status == TePointStatus.OutOfSigma             || point.Status == TePointStatus.NotFlat)             reportpoints.Remove(point);     }   The reason is that i have a list of items that was combined from a logic of two conditions, where the same value will have a different status then the other one.  I want to somehow be able to get the differences out of the list, then remove the duplicates that match the status.

Anyone have a quick method for de-duplicating a generic List in C#?


In numerous Harry Potter books, Cho Chang is described as a year older than Harry. And, in OotP, Harry and the other 5th years are taking their O.W.L.s. Then why did Hermione say in the movie, "And she's so frightened that she'll fail her O.W.L.s because she's so worried about everything else"? She should have completed her O.W.L.s and gotten her results!

As requested by rand al'thor, a follow-up question to :  How many Hogwarts students changed year from book to film?  In the book series, we know Cho Chang was definitely in the year above Harry, for Wood tells Harry when he is in his third year:     'Harry, I've just found out who Ravenclaw are playing as Seeker. It's Cho Chang. She's a fourth-year, and she's pretty good ...'      Harry Potter and the Prisoner of Azkaban - p.188 - Bloomsbury - Chapter 13, Gryffindor versus Ravenclaw   However, in the film version of Harry Potter and the Deathly Hallows (part 2), she is shown in the Room of Requirement with everybody else when the trio arrive via the secret passageway behind the picture of Ariana Dumbledore. This implies that she was not in the year above Harry (for she would have already left Hogwarts if she were (as per the books)) and was most likely in the same year as him.  says the same, though it does not seem to provide a reference - not needing to, of course, for it is never wrong ... :P  So, did Cho Chang definitely change years in the films and, if so, were there any others?  (Hint: I believe I recall seeing Katie Bell and Romilda Vane in Slughorn's potions class in The Half-Blood Prince so these are two free candidates to get you started. Proper references will garner upvotes :P )


I want to make a application which allows me to send keys or some messages to a not focused window.  My code which allows me to send messages to a windows when its focused:  string processName = "notepad"; Process[] processList = Process.GetProcesses(); foreach (Process P in processList) {     if (P.ProcessName.Equals(processName))     {         IntPtr edit = P.MainWindowHandle;         SendKeys.Send("Hello");     } }   I hope I will find some help.

I'm trying to use SendMessage to Notepad, so that I can insert written text without making Notepad the active window.  I have done something like this in the past using SendText, but that required giving Notepad focus.  Now, first I'm retrieving the Windows handle:  Process[] processes = Process.GetProcessesByName("notepad"); Console.WriteLine(processes[0].MainWindowHandle.ToString());   I've confirmed it's the right handle for Notepad, the same shown within Windows Task Manager.  [DllImport("User32.dll", EntryPoint = "SendMessage")] public static extern int SendMessage(int hWnd, int Msg, int wParam, int lParam);   From here, I haven't been able to get SendMessage to work in all my experimentation.  Am I going in the wrong direction?


A) Give an example to show that a factor ring of an integral domain may be a field B) Give an example to show that a factor ring of an integral domain have divisors of 0. C) Give an example to show that a factor ring of a ring with divisors of 0 may be integral domain.  A) $\mathbb{Q}[X]/\langle x+1\rangle$ and $\mathbb{Z}/4\mathbb{Z}$  B) $\mathbb{Z}/4\mathbb{Z}$,   C) $\mathbb{Z}_2/\mathbb{Z}_6$  Are my answers for A), B), C) correct? And can you give a few more examples for A), B) and C)?

Fraleigh Section 23 12.Give an example to show that a factor ring of an integral domain may be a field 13.Give an example to show that a factor ring of an integral domain may have divisors of $0$ 14.Give an example to show that a factor ring of a ring with divisors of 0 may be an integral domain.  For 12, $Z/2Z$ works For 13, $Z/4Z$ works For 14, $4Z/8Z$ ( isomorphic to Z$_2$?) works. -> I just figured out 4Z is not a ring with divisors of 0... I'm unsure about my answer for 14. Is it correct? And any other examples for 12,13,14?


A guest is invited by a host to visit their home, although they are not very close. The host doesn't intend to invite the guest to eat, but they intentionally send a signal to the host that they are hungry so that the host invites them to stay and eat. Whether the host acknowledge this or not, or whether they do share their meal or not, the important thing here is that the guest knows that they shouldn't do that, but they just don't care.  What is the word for using someone's hospitality unashamedly?

What would you call someone who isn't afraid to ask for money or any kind of favor or who misinterprets someone's generosity for a consistent resource for what they need?


I have sshd log entries from the past seemingly randomly mixed in (in time) with the presently occurring log entries.  No remote hosts log to this server, rsyslog serves only this box.  External access to rsyslog listener is blocked at firewall.  Sshd version: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.  Sshd was logging at daemon:info, but I've since raised to daemon:verbose.  TcpKeepAlive is yes on server. The entries seem to appear as valid client disconnect messages.  The client IP is known to me, and he is permitted to ssh by firewall rules.  Client version: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.  The client's /etc/ssh/ssh_config specifies ServerAliveInterval 60.  The client is creating port redirects on the server.  Then a process on server periodically pipes data to the client port using netcat.  The erroneous datetime stamp, as well as seemingly old log entries being mixed in with current log entries are the concerns.  Could this a symptom of old broken sessions leftover from unclean exit?  Any suggestions are welcome, thanks.

Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab.  Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) CMD (something > /dev/null) Jun 21 03:49:01 alex CRON[2753]: (root) CMD (something > /dev/null) Jun 28 22:23:01 alex CRON[2754]: (root) CMD (something > /dev/null) Jun 27 05:08:01 alex CRON[2813]: (root) CMD (something > /dev/null) Jun 26 00:19:01 alex CRON[2816]: (root) CMD (something > /dev/null) Jun 28 22:25:01 alex CRON[2816]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:25:01 alex CRON[2821]: (root) CMD (something > /dev/null) Jun 28 22:27:01 alex CRON[3225]: (root) CMD (something > /dev/null) Jun 28 22:28:01 alex CRON[3240]: (root) CMD (something > /dev/null) Jun 28 22:30:01 alex CRON[3290]: (root) CMD (something > /dev/null) Jun 26 12:03:01 alex CRON[3291]: message repeated 2 times: [ (root) CMD (something > /dev/null)] Jun 28 22:30:01 alex CRON[3291]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi) Jun 28 22:31:01 alex CRON[3659]: (root) CMD (something > /dev/null) Jun 28 22:32:01 alex CRON[3754]: (root) CMD (something > /dev/null) Jun 16 06:41:01 alex CRON[3846]: (root) CMD (something > /dev/null) Jun 28 22:35:58 alex cron[909]: (CRON) INFO (pidfile fd = 3) Jun 28 22:35:58 alex cron[944]: (CRON) STARTUP (fork ok) Jun 28 22:35:58 alex cron[944]: (CRON) INFO (Running @reboot jobs) Jun 28 22:36:01 alex CRON[1428]: (root) CMD (something > /dev/null) Jun 28 22:37:01 alex CRON[3050]: (root) CMD (something > /dev/null) Jun 28 22:38:01 alex CRON[3082]: (root) CMD (something > /dev/null) Jun 28 22:39:01 alex CRON[3114]: (root) CMD (something > /dev/null)   As you can see, there is bad time order between lines. It is just crontab error, or there is some problem with system clock, or something?  I am running the latest Ubuntu 14.04 kernel:  Linux alex 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


I am trying to write a query that will run all the days and the name of the day between two set dates.  Example:  Date1 = 12/28/2005 Date2 = 12/30/2006   Results:  12/28/2005 Wednesday 12/29/2005 Thursday 12/30/2005 Friday 12/31/2005 Saturday 01/01/2006 Sunday 01/02/2006 Monday 01/03/2006 Tuesday   Any help is appreciated!

Using standard mysql functions is there a way to write a query that will return a list of days between two dates.  eg given 2009-01-01 and 2009-01-13 it would return a one column table with the values:   2009-01-01   2009-01-02   2009-01-03  2009-01-04   2009-01-05  2009-01-06  2009-01-07  2009-01-08   2009-01-09  2009-01-10  2009-01-11  2009-01-12  2009-01-13   Edit: It appears I have not been clear. I want to GENERATE this list. I have values stored in the database (by datetime) but want them to be aggregated on a left outer join to a list of dates as above (I am expecting null from the right side of some of this join for some days and will handle this).


I would like to copy files and subfolders from a cluster that runs pacman to a Windows desktop computer using PuTTY.   First I would like to copy one specific file or subfolder as a test, for example my_test_file.r or my_test_folder, from the cluster to my desktop. Then I would like to copy every file or subfolder that contains a specific word, for example mykeyword, from the cluster to my desktop.  Note that mykeyword can appear anywhere in the name of the file or in the name of the subfolder, not just at the beginning of the name. Then I would like to copy every file containing mykeyword from my desktop to a specific folder on the cluster   I know this is a very basic question, but I cannot find the answer using Google.  Until now I have always used FileZilla to copy files and folders to and from the cluster.  Unfortunately after I installed the latest version of FileZilla I am having trouble connecting to the cluster with it.  I can still connect with PuTTY and want to copy files and folders that way if possible between the desktop and the cluster.  My question might be a duplicate of this question:    However, that question has no answer and I do not understand the comment.  Thank you for any assistance.

when calling SCP in PuTTY on my Win7 box, it doesn't let me use C:/, but I also have no idea where on my local machine it will look for files by default. None of program directory or user directory worked. For example, I saved file.txt next to PuTTY.exe, and also in C:\Users\Me but calling SCP file.txt file.txt in PuTTY failed both times with      cp: cannot stat 'file.txt'   So, how do I transfer a file to my server using PuTTY?  EDIT: Also, calling SCP file.txt myserver:file.txt gives a similar error: file.txt: No such file or directory


When telling a story about myself from the past, I have found myself in an internal debate over whether the correct way to segue into the present is:     That was me twelve years ago.   Or:     That was I twelve years ago.   My instincts tell me the first is correct (object pronoun after a verb and it sounds better to my ears). But, I'm not sure if pronouns after linking verbs should be object pronouns. Which is correct?

Upon answering the telephone, the person calling asks if Joan is available. If Joan is the person who answered the phone, should she say "This is her" or "This is she"?


Can I apply for a UK standard visit visa (family visitor) after a 2-year interval of a UK visa refusal to attend British Army Assessment?

How Do i mitigate my UK visa refusal, though i attached my company registration documents, income tax returns, invoice and receipts. Second paragraph was a mistake as i did not state anything like that   Though I attached to my application my company's registration documents, income tax return, invoices, contract agreement with my staffs, – Edited in from an almost identical question, which is now closed: What do I need to do to re-apply again? Though paragraph 2 was a mistake from the visa officers because I didn't state anything like that.


Let the  be defined by the following integral:  $$\frac1{1+\Omega}=\int_\mathbb R\frac{\mathrm dt}{(e^t-t)^2+\pi^2}$$  How does one go about showing that $\Omega$ is the real solution to  $$1=\Omega e^\Omega$$  I tried starting by considering a semicircle contour and taking residues,  $$e^z-z=\pi i\\\implies z=-W_k(1)-\pi i$$  This has imaginary part greater than $0$ when $k\ge1$ where $W_k(z)$ is the Lambert W function, hence,  $$\int_\mathbb R\frac{\mathrm dt}{(e^t-t)^2+\pi^2}=2\pi i\sum_{k\ge1}\operatorname{Res}\limits\limits_{z=-W_k(1)-\pi i}\left(\frac1{(e^z-z)^2+\pi^2}\right)$$  But I haven't the slightest clue how I would go from here.  Any simpler ideas?

I ran across an interesting integral and I am wondering if anyone knows where I may find its derivation or proof.  I looked through the site. If it is here and I overlooked it, I am sorry.  $$\displaystyle\frac{1}{\int_{-\infty}^{\infty}\frac{1}{(e^{x}-x)^{2}+{\pi}^{2}}dx}-1=W(1)=\Omega$$  $W(1)=\Omega$ is often referred to as the Omega Constant. Which is the solution to   $xe^{x}=1$.  Which is $x\approx .567$  Thanks much.   EDIT:  Sorry, I had the integral written incorrectly. Thanks for the catch.  I had also seen this:  $\displaystyle\int_{-\infty}^{\infty}\frac{dx}{(e^{x}-x)^{2}+{\pi}^{2}}=\frac{1}{1+W(1)}=\frac{1}{1+\Omega}\approx .638$  EDIT:  I do not what is wrong, but I am trying to respond, but can not. All the buttons are unresponsive but this one. I have been trying to leave a greenie and add a comment, but neither will respond. I just wanted you to know this before you thought I was an ingrate. Thank you. That is an interesting site.


I'm using a function to display elements [items] from an array. I want to show the next element sibling Outside the array [subitem] when an item is clicked. I want to use Javascript only. I'm really new and with a lot to learn. How can I show the subitem when I click on the item?  I tried some coding but I'm not good with the syntax, so I can't tell what I'm doing wrong.    var ITEMS = []; for (var i = 0; i < 3; i++) {   ITEMS.push("IT" + i); }  function showitems() {   for (var i = 0; i < ITEMS.length; i++) {     document.getElementById(ITEMS[i]).style.display = "flex";   } }  showitems();  function showsubitem() {   ITEMS[i].addEventListener('click', function(e) {     e.target.nextElementSibling.style.display = "flex";   }); }  showsubitem(); <!DOCTYPE html>

item 0

subitem 0

item 1

subitem 1

item 2

subitem 2

item 3

subitem 3

item 4

subitem 4

item 5

subitem 5

         I expect to click an item from the array and show (change to "display:flex;") its respective subitem from outside the array.

How do I get the next element in HTML using JavaScript?  Suppose I have three <div>s and I get a reference to one in JavaScript code, I want to get which is the next <div> and which is the previous.


All I want is to set a custom dns name server, to that of  but my resolvconf is getting overwritten by the dns settings set on my router. I can't change the router dns or disable this "feature". If it helps I'm using Telstra as my ISP and my resolvconf looks like this: # This file is managed by man:systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients directly to # all known uplink DNS servers. This file lists all configured search domains. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See man:systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf.  nameserver 84.200.69.80 search resolver1.dns.watch  after being overwritten it defaults to my isp dns

Most of the info I see online says to edit /etc/resolv.conf, but any changes I make there just get overridden.  $ cat /etc/resolv.conf  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND --  #     YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1   It seems that 127.0.1.1 is a local instance of dnsmasq. The dnsmasq docs say to edit /etc/resolv.conf. I tried putting custom nameservers in /etc/resolv.conf.d/base, but the changes didn't show up in /etc/resolv.conf after running sudo resolvconf -u.  FYI, I don't want to change DNS on a per-connection basis, I want to set default DNS settings to use for all connections when not otherwise specified.  UPDATE:  I answered this question myself:   I think it's the best solution since:   It works. It requires the least amount of changes and It still works in conjunction with dnsmasq's DNS cache, rather than bypassing it.


$O$ is the point inside triangle $ABC$ . The lines joining the three vertices $A,B,C$ to $O$ cut the opposite sides in $K,L$, and $M$ respectively. A line through $M$ parallel to $KL$ cuts the line $BC$ at $V$ and $AK$ at $W$. Prove that $VM=MW$. I tried using the ceva's theorem in triangle $ABC$ and equating it with the relation obtained by Menellau's theorem . Then I used basic proportionality theorem and after using them I just got one relation. $$\frac {BK}{BV}=\frac {AL}{AP}$$  Now I am stuck please help me.

Can anyone tell me what a "harmonic quadruple" is?  I had a problem in Australian mathematical Olympiad paper. The solution uses something like harmonic quadruple to prove that two sides are parallel.  So can this concept be used to prove the following?     $O$ is the point inside triangle $ABC$. The lines joining the three vertices $A$, $B$, $C$ to $O$ cut the opposite sides in $K$,$L$ and $M$ respectively. A line through $M$ parallel to $KL$ cuts the line $BC$ at $V$ and $AK$ at $W$. Prove that $VM=MW$.


I would like to know from an academic standpoint on what steps that an amateur scientist would have to take in order to get his/her scientific breakthrough published in a major academic journal/scientific magazine.  Say that this person is outside of academia, he/she has no college degrees, and he/she has stumbled upon a scientific breakthrough by chance after years of doing self-study, research, and experiments with a particular scientific area of study.  Also, say that this person has a job with a modest salary so if they will need to raise a lot of money to get it published, they will have to get it from an angel investor or from crowdfunding.   Although I understand that the odds of such a person coming up with a scientific breakthrough is very slim to none, I still would like to know the process that this person will likely have to follow if he/she wants to get it published.  For example, would the first step be that this person should take be making an appointment with a college professor in order to get a professional opinion on their scientific breakthrough?  If so, what guarantee does the amateur scientist have that this college professor will not try to steal this scientific breakthrough?  Should the amateur scientist insist that the college professor first sign a Non-Disclosure Agreement?  Would the second step be that the amateur scientist meet with another college professor to in order get a second opinion and again have that professor sign a NDA?  What would be the 3rd step, 4th step, etc., etc.  Although there are probably many steps in the process of getting it published, I'm interested in just the major steps that will likely have to be taken.

I am interested in the situation where you have a very interesting result. For instance, you have solved a very important open problem. However, you are not known in the field and do not have any remarkable publications. Your supervisor thinks the work is good and you submit the work to a high profile journal, but you get rejected.  The thing is that the contribution is very strong. It breaks what most people believe or what they have already proven: e.g., you solve the P vs. NP problem or any other well known open problem.   The reviewers strongly reject your work with no justification and they do not state why the result is wrong. Examples of reviewer comments include:   "The proof must be wrong."  "You cannot achieve such a result."  "You do not understand well the notion of ..."   My question is what to do in this situation? Where to go? If your advisor accepts the work, but the reviewers from the top journal reject the work without even explaining the mistakes,  what should you do?


grive-tools and google-drive-ocamlfuse are not more working...does someone know another free (better open source) service for google account in ubuntu? Thanks

I'd like to install a  client for Xubuntu (12.04).  I'm getting non-English Google results, and I didn't find  in the Xubuntu repositories.   Does anyone know of a client that works well for Ubuntu or it's supported derivates (or installation instructions for grive?)


I have an external hard disk drive, and it may have some viruses in it.  I don't want to connect it to Windows, so when I have to copy something from it, I do it in Ubuntu.  Now I have to install a lot of -Windows- programs from it, so does it make sense to install an antivirus (like BitDefender) and scan from Ubuntu?  I mean, does just plugging it into Windows puts me in danger?  Can there be viruses in Autorun.exe or such?  And which free antivirus should I use?

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


I am comparing (for an entire day now) two .blend files (one mine and one from ), why linear gradient texture settings that have exact settings aren't the same (or I'm just unable to spot the difference).  The problems is that gradient from my file is much whiter (lower gradient on an image below), causing incorrect height map generation.  Can someone please help solve this mystery for me.     Not the nicest crop but the difference should be clearly visible.  EDIT: I'm using latest Blender (2.76b), while original.blend file was probably created using 2.4x.

I want to render a plane with a linear gradient texture that can be rotated as needed.  I've set up a basic working node network as shown:   I can rotate the gradient using the Mapping Node - > Texture -> Rotation.Z coordinate, however the rendered gradient is always logarithmic rather than linear:      This is the true linear gradient that I am looking for:    I've played around with the scale and location vectors but they have no impact on the linearity of the gradient.  Here's my scene (1 plane, 1 sun lamp, orthographic camera):    A similar question was asked a while ago  but no real answer was given.  Any suggestions would be appreciated.    [Update]  It seems this may be due to the Color Management applied by Cycles.  I'm using Cycles because as I believe you can't rotate gradients (blends) in BI.  If this is not right, please let me know.  I'm really just trying to determine if it is possible in Blender to render 2D shadow mask planes using true linear gradients. I alrteady have 3D geometry that the masks need to fit perfectly against, so I extruded edges from these objects to create new 2D planes. [End Update]


I am using Google Login for SEDE. After a day or so, I always find myself logged out, even though I did not delete my cookies etc.  I am using Safari 11.0 on macOS 10.13.  Is there a setting for staying logged in or did I miss something? Is it because my token expires?

I'm pretty sure that since a month or so,  seems much more eager to get rid of my session and log me out in that process. I don't mind logging in a couple of times per day, if that helps to reduce resource consumption, but the user experience isn't all that great when it happens. Here is why: I'm most often in the middle of writing a query for an MSE question, for example . So I have the edit window open and am creating a new revision of my query. When I click "run," I do notice the button gets grayed-out, as it normally does, but I never get any result back. There is also no error message. To recover from this I have to copy the SQL text I have typed, open a new tab and load SEDE, log in, switch back to the stalled tab, refresh, paste the SQL text, run query. Repeat the process after 10 minutes. If the intended behavior is to log users out of their session on such short notice (I recall sessions lived for 24 hours), can there then be a slightly better handling in the browser of that state, so it is clear you're logged out once you click the run button? I prefer, however, to have the longer allowed sessions back. I'm experiencing this behavior mostly in Chrome on Win 10.


I've provided an answer on a question with a bounty, however once my answer was accepted I was not credited the bounty. The question in question is:

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I am trying to understand ciphers settings in nginx.  ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #What TLS types that are supported ssl_prefer_server_ciphers on; #Use the type that the server prefers ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+RC4:EDH+aRSA:EECDH:RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;   But when it comes to the ssl_ciphers I don't understand the string. Like for example, what does 'EECDH+ECDSA+AESGCM','EECDH+ECDSA+SHA256' and '!PSK:!SRP:!DSS' mean?  Does the data that is transferred between the client and server go through a specific encryption chain, like for example 'EECDH+ECDSA+SHA256'?  Thanks for any help and guidance!

In an nginx configuration file, you might configure a list of SSL ciphers like this  ssl_ciphers                HIGH:!aNULL:!eNULL:!LOW:!ADH:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;   What's the syntax of this cipher string?  That is, I know (or think I know, correct me if I'm wrong) that this string is meant to provide a list of possible SSL ciphers, as well as provide a priority for them.  What  is less great at is explaining the format of this string.   Specific questions   Is the ! a negation?  That is, does !DSS means don't use DSS?  Or is !DSS the same of a cipher? Are the : characters separators? That is is teh above a list of ciphers "HIGH, !aNULL, !eNULL, etc...", or does the : mean something else Are HIGH and LOW the same of ciphers, or are they special meta-directives of some kind Not pictured above, but  strings like this AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:. Are the - characters part of the cipher name, or do they have a special meaning?   Is there a resource that explains how this string works, or is this a case where the people expected to work with the string are also expected to read the nginx source to figure out how it works?


I installed Ubuntu following the partition tutorial and everything seems fine except I seemed to have lost Windows. I can still see it in GParted, but there is no dual boot menu + I can't seem to get to it in any way.   I tried boot repair but no improvement. .  My System: HP Envy Spectre 14, 4GB i5, 128SSD, F9 Boot Manager, F10 Bios   Partition, File System, Mount, Label, Size, Used, Flags   /dev/sda1, ntfs, system reserved, 100MiB, 26.10MiB, Boot /dev/sda2, ntfs, 95.37GiB, 47.53GiB /dev/sda4, extended..20.99GiB.. /dev/sda5, ext4, /, 18.99GiB, 4.61GiB /dev/sda6, linux-swap, 2.00GiB, 4.00KiB, diag unallocated, unallocated, 2.01GiB

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


library(infotheo) > mutinformation(c(1,2,3),c(1,2,3)) [1] 1.098612 > mutinformation(c(1,1,1),c(1,1,1)) [1] 0   Why is there a difference?  I keep reading that this should either be 0 or infinity, yet I get neither  Is this because I have not defined the joint probability?

I'm not a statistic major, so my knowledge of statistics is quite limited but I've found myself in need of learning about and using mutual information. I believe I understand the concept and formula, but it seems counter-intuitive that perfectly similar data would have 0 mutual information. I would expect two sets of data with perfect similarity to have mutual information of 1.  I'm writing a program which calculates Mutual Information between two columns (i and j) in a pairwise protein sequence, and I'm not sure if I should manually fix the MI to be 1 if the columns are exactly the same. For example, if the two columns (written as lines) were:  CLLYFFDTTQGILMIGCL IILLIIIIFLIVILVIFV   Then I've calculated the MI by hand to be equal to 0.8384. However, if the two columns (written as lines) were:  GGGGGGGGGG GGGGGGGGGG   The mutual information will be equal to 0 because the formula will result in:  $$\sum \left( p(1) \times \log \left( \frac{p(1)}{p(1) p(1)} \right) \right) = 1 \times \log \left( \frac{1}{1} \right) = 0$$  In my program I have it check if the columns are identical (i = j) and just manually assign Mi = 1. So I'm wondering: Is this bad practice? Does it only consider one possible case of many? Should I not do this at all? The professor I'm working with suggested I incorporate a pseudo-count for every other non-existing amino acid and ignoring a manual fix for when i = j.  Would a pseudo-count fix this? Counting each existing amino acid as 1.1 and everything else as 0.1, or would it result in the same mutual information? Again, I'm far from a statistics major so if you can explain simply, that would be best. Thanks.


Power series of $f(x)=\frac{1}{1+x+x^2+x^3}$ My try was: $$f(x)=\frac{1}{1+x+x^2+x^3}=\frac{1}{2}\frac{1}{1+x}-\frac{1(x-1)}{2}\frac{1}{1+x^2}$$ Now using the infinite geometric sum I got: $$\frac{1}{2}\sum_{n=0}^\infty(-x)^n-\frac{1}{2}(1-x)\sum_{n=0}^\infty(-x^2)^n=\frac{1}{2}\sum_{n=0}^\infty[(-1)^nx^n-(-1)^nx^{2n+1}+(-1)^nx^{2n}]$$  The problem that I don't know if my moves are valid, and moreover, I don't know how to make it look as Power series.

Let $y = \frac{1}{1+x+x^{2}+x^{3}}$.  And I want to find the series representation of this function. I've noticed that I can rewrite this like $\frac{1}{1+x+x^{2}+x^{3}}=\frac{1}{1+x}*\frac{1}{1+x^{2}}$ or I can rewite this like a sum of two fractions $\frac{1}{1+x+x^{2}+x^{3}}=\frac{1}{2(1+x)}+\frac{1}{2(1+x^{2})}$.  I know the series representations of these functions $(1+x)^{n}$ and $\frac{1}{1-x}$, and I guess I should use one of them. But the result looks weird. Can you help me, please, may be I can't see some easy way to solve it.


I have registered a custom Post Type via register_post_type(), and about 45 Custom Fields via add_meta_box() function, within the theme.  Custom Post Type Args:      'labels'             => $labels,     'description'        => __( 'Custom Post Type', 'hg' ),     'public'             => true,     'publicly_queryable' => true,     'show_ui'            => true,     'show_in_menu'       => true,     'query_var'          => true,     'rewrite'            => array( 'slug' => 'testtype' ),     'capability_type'    => 'post',     'has_archive'        => false,     'hierarchical'       => true,     'menu_position'      => null,     'supports'           => array( 'title', 'editor', 'thumbnail' )   Everything works fine there, and a few tests by manually creating posts via the Admin Editor for this post type proves such.  I written a script to batch import about 20,000 or more into this custom post type and the registered custom fields. Before I go on, I wish to point out that I first ran this script with just 50 or so of the entries, and it imported and everything worked fine.  So, once the 20k posts of the custom post type were imported, I return to my admin and hit on the Custom Post Type via admin (Auto-generated Custom Post Type UX) - and I receive a blank page!  I have researched, and as a result increased PHP memory limit, WP memory limit, WP Max memory limit, and PHP execution time. After which, I now receive the generic WordPress 404 instead of just a blank page.  Here's what I added to wp-config.php:  define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '2560M' ); set_time_limit(120);   I have also concluded it is nothing to do with the theme or plugins. Once I manually remove all 20k posts from the database via phpMyAdmin, the edit.php page is back in working order. Is this a query overload?  Please help!  Thanks in advance!

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


I am new in photography. I am planning to buy a "Polarizing filter" for my lens. Actually, I know very little about this filter. So, I am not sure, does it really necessary to take good color photographs.  My camera is: Canon 60D  My lens is: Canon 70-200, 4f L  Thanks in Advance.

I received a circular polarizing filter as a gift, but I have a hard time determining when I should be using it.   I've done river shots with some success, but other than that, it doesn't seem to do much beyond reducing the amount of light.   What am I missing?


The first vote-to-close dialog lists the radio buttons next to the selection:    When selecting off-topic because, the radio buttons are vertically misaligned:    Can this be fixed?

There is a minor alignment issue in the Flagging > Closing > Off-Topic section.  The radio button's margin-top is not matching with the text content, in remaining sections the alignment is set correctly.  Screenshot for reference:    Steps to see the window:   click on the flag link in any of the question, then click on the Should be closed... radio button, then click on the off-topic because... radio button   OS: Windows 8.1 Mozilla Firefox: 50.1.0 Google chrome: 51.0.2704.103 m Zoom: 100%


How do I convert "ThisIsMyTestString" into "This Is My Test String" using C#?  Is there a fast way to do it?  I've been thinking of a pseudo code but it's complicated and ugly:  String s = "ThisIsMyTestString";  List<String> strList = new List<String>(); for(int i=0; i < str->Length ; i++) {    String tmp = "";    if (Char.IsUpper(str[i]))    {      tmp += str[i];      i++;    }     while (Char::IsLower(str[i]))    {      tmp += str[i];      i++;    }     strList .Add(tmp); }  String tmp2 = ""; for (uint i=0 ; i<strList.Count(); i++) {   tmp2 += strList[i] + " "; }

How do I go from this string: "ThisIsMyCapsDelimitedString"  ...to this string: "This Is My Caps Delimited String"  Fewest lines of code in VB.net is preferred but C# is also welcome.  Cheers!


I have recently read that the default return type for all functions in C++ is int. Googling this does not help me to confirm this.  So :   Is really the default return type for all functions in C++ int ? If not, then does any such default return type exists for functions in C++ ? If so, then what is it ?

In C the following horror is valid:  myFunc() {   return 42;  // return type defaults to int. }   But, what about in C++? I can't find a reference to it either way...  My compiler (Codegear C++Builder 2007) currently accepts it without warning, but I've had comments that this is an error in C++.


I am a teaching assistant for a class in which students use tablet computers to advance their projects. Yet, sometimes, we need their attention and it can be difficult for them to focus on what I tell them with such distracting tools in hand.  I am looking for a way to monitor student iPads from a teacher's iPad or computer (restrict web browsing, being able to blank the screen and etc.). Any ideas that are relatively cheap? I know similar software exists for .

I'm at a North American, state-run university (not an elite institution), which is relatively modern in terms of supporting mobile devices. The school is proud of its WiFi coverage in every classroom, and recently rooms were updated to have electrical outlets at every student's seat (even in auditoriums), so they can charge their devices. All courses are three-hour periods, once a week.  This mobile-friendly environment is great when integrating mobile technologies in class. I make use of  (real-time quizzes), the students can follow the PDF lecture notes and/or electronic copies of texts, take notes on their laptops, look things up on the web when I ask questions or when they do exercises, etc.   However, it makes for a challenge during courses when students use these devices in distracting ways. Definitions of "misuse" are situational, but for this question, I'll call it any use that detracts from a healthy learning environment. Concrete examples include watching a video or playing a game on a laptop (distracting neighboring students), texting, using Facebook rather than working an exercise in group, etc.  Laptops and smart phones in class are not new; in the past I was able to deal with their "misuse" relatively easily. A student would be easily embarrassed and close his laptop if you called him out when you saw that 5 students around him were all looking at his screen and smiling. I ask a lot of questions during my classes, so I could "pick on" students who caused disruptions with their mobile device (or otherwise). Drawing attention to one student in large groups is an effective way to change behavior, usually.  However, last semester was more difficult than ever, with 40+ students in an newly-electrified auditorium. During one class interruptions occurred 3 times, and I had to talk to offending students during the break about it. During the mid-term, I had one student argue with me at the start because he wanted to keep charging his iPhone at his desk in front of him. He insisted he wasn't going to use it during the exam to cheat, but I cited the policy barring mobile devices during exams and mentioned he'd have to explain that to a discipline committee - he complied. Needless to say, those "correctional" situations don't win points for the professor in the course evaluation. On the other hand, I learned that if I don't intervene (early in my career I would ignore these behaviors), students who feel distracted will complain during evaluations (most are too shy to say something during the semester).  The solution it seems is to add yet another item in my already lengthy syllabus and explain the desired behavior during the first lecture. My school has no official policy as far as I know regarding mobile device use, apart from an IT security policy that doesn't address the distraction issues. I did some searching on the web and found that some schools have policies, e.g. . What is not clear is how effective the policies are in large classrooms, how easy they are to enforce without becoming the "text police", how well they work in non-elite universities, etc.   I contrast all this with the fact that my students almost never misuse the "phone" part of their devices (they don't ring during lectures and they don't talk on them except at the breaks). None of that is in my course plan and I never have to explain it at the start of the semester or take action.   So, how to reduce misuse of mobile devices in large classes while maintaining a friendly atmosphere?  EDIT see this  for the students' perspective of the problem, and why it's not like other classic forms of distraction. In the conclusion, they state it could be useful for institutions to define policies about proper behavior in the classroom regarding mobile devices.