Get querystring from URL using jQuery
How can I get query string values in JavaScript?
I got this $$ f=a(x-1)(x-2)...(x-101) $$ knowing a and that $1 ,2 \ldots ,101$ are it's roots ... I need the roots of $f'$ , how should I do it ? More specifc how can I derivate a polynomial like that, is there a formula or something ? Why do some websites show the company name next to the URL? Some websites show the company name next to the URL (in Chrome) and some don't.  How do I set this up for my website? Is there a reason why or why I wouldn't want to do this? Align an object to a specific face I usually face this problem when I cut objects to make them printable in my 3D printer. As you may know, you need your object to have a nice base to be printed.  So I usually use bisect to cut an object to different pieces. As in this example:    and I need to rotate the top part to have a face as bottom:    I'll share my workflow in an answer, but I'm asking for a simpler solution, if there were any. I am working with a basic  which is a popular modal used on many sites. I noticed that the default template comes with both a close button on the bottom, as well as an x on the top, these two buttons essentially having the same purpose. Are the two redundant and the close button completely unnecessary and just taking up extra space? Or, is having multiple usage options more user friendly?   To make this even more fun, suppose I throw in a Save button:   Is it now clearer that if you don't press save and just press the x, your changes will be canceled, or is there now more of a need for a cancel button for users who are scared that a mistake will become permanent? Update: To clarify for those who feel this question is similar to  - That question is asking if a clickable background is sufficient to close a popup. I'm using buttons and it is just a matter of how many buttons to use. (I do also have a clickable overlay and ESC key enabled, but that is irrelevant to my question) Styling an input type="file" button Feature request: Add pronouns to usercards? One of the questions people have raised about the new rules about pronouns is how users will know what pronouns are preferred.   We've had a trolling question which got  when the user included their preferred pronouns at the bottom of the question, and I agree that particularly on Stackoverflow (rather than sites like Interpersonal Skills or Workplace), this should be considered as 'noise' since it isn't the strict Q&amp;A this site is about. (The codez should work whatever your gender).  Currently, the suggested way of displaying your pronouns is to put it in your profile's 'About Me' section. However, this is suboptimal, since it requires opening a new page.  I suggest adding a 'preferred pronouns' field in the user profile, and displaying this on a user's usercard. There's currently a 'new contributor' label, so it could be similar to that, with she/her pronouns or whatever they choose.  In comments, it could be appended to the reputation score that currently gets shown when you hover over a name:   4,305 reputation, she/her pronouns  The default would be blank. No flair updates, no hover-in-comments update. If a user fills in this field in their profile, then it will show. 74190 counter problem So, I got my 74190 counter shows number like this  9-8-7-6-5-4-3-2-1-0-5-4-3-2-1-0-5-4-3-2-1-0-5-4-3-2-1-0 and so on.  My questions:   What can I do to change the output count down into 5-4-3-2-1-0-5-4-3-2-1-0 and so on? When it changes 0 into 5 it moves so fast. How could I fix this one? I am using Ubuntu 12.04.  My /etc/network/interfaces file consists of:    # The loopback network interface   auto lo   iface lo inet loopback     # The primary network interface   auto eth0  iface eth0 inet static   address 192.168.1.58   gateway 192.168.1.1 network 192.168.1.0   broadcast 192.168.1.255 dns-nameservers 66.212.63.228 66.212.48.10     I ran the command: /etc/init.d/networking restart  Which responded with:   *Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces   *Reconfiguring network interfaces...   RTNETLINK answers: File exists   Failed to bring up eth0   [ OK ]     Next I ran ping google.com and received:    ping: unknown host google.com   I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses? How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product Regular cast vs. static_cast vs. dynamic_cast I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e.  MyClass *m = (MyClass *)ptr;   all over the place, but there seem to be two other types of casts, and I don't know the difference. What's the difference between the following lines of code?  MyClass *m = (MyClass *)ptr; MyClass *m = static_cast&lt;MyClass *&gt;(ptr); MyClass *m = dynamic_cast&lt;MyClass *&gt;(ptr); I am testing the new  &lt;lightning:datatable&gt;, it is really good, and is a good replacement for most of my use cases which today I use a custom list component that I have developed.  I am getting data from my server through apex method, to populate it into the &lt;lightning:datatable&gt; component. I can bind the returned list directly to the data attribute and if the column names are same as the field names, all data is bound correctly.  The problem occurs when I get data from a parent record. For example - I want the Account name of my contact.  This example can show the problem:  Component Markup    &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;  &lt;aura:attribute name="mydata" type="Object"/&gt; &lt;aura:attribute name="mycolumns" type="List"/&gt; &lt;aura:attribute name="sortedBy" type="String"/&gt; &lt;aura:attribute name="sortedDirection" type="String"/&gt;  &lt;lightning:datatable data="{! v.mydata }"                      columns="{! v.mycolumns }"                      keyField="Id"                      onrowselection="{! c.getSelectedName }"                      onsort="{!c.updateColumnSorting}"                      sortedBy="{!v.sortedBy}"                      sortedDirection="{!v.sortedDirection}"                      hideCheckboxColumn="{!false}" /&gt;        Component Controller  ({     doInit: function (component, event, helper) {         component.set('v.mycolumns', [                     {label: 'Id', fieldName: 'Id', type: 'id', sortable:"true"},                     {label: 'First Name', fieldName: 'FirstName', type: 'text', sortable:"true"},                     {label: 'Last Name', fieldName: 'LastName', type: 'text', sortable:"true"},                     {label: 'First Name Hebrew', fieldName: 'First_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Last Name Hebrew', fieldName: 'Last_name_Hebrew__c', type: 'text', sortable:"true"},                     {label: 'Account', fieldName: 'Account.Name', type: 'text', sortable:"true"},                     {label: 'Email', fieldName: 'Email', type: 'email', sortable:"true"},                     {label: 'Phone', fieldName: 'Phone', type: 'phone', sortable:"true"}                 ]);          var action = component.get("c.getRecordsFromDb");         action.setParams({             sObjectName: "Contact",             commaDelimitedFieldNames: "Id,FirstName,LastName,First_name_Hebrew__c,Last_name_Hebrew__c,Account.Name,Email,Phone",             filter: ""         });         action.setCallback(this, function(response){             var state = response.getState();             if (component.isValid() &amp;&amp; state === "SUCCESS") {                 var data = response.getReturnValue();                  component.set("v.mydata", data);             }         });         $A.enqueueAction(action);     } })   APEX Aura Enabled Method  @AuraEnabled public static List&lt;sObject&gt; getRecordsFromDb(String sObjectName,         String commaDelimitedFieldNames,         String filter) {      system.debug('\n\n\n\ngetRecordsFromDb sObjectName: ' + sObjectName + ', commaDelimitedFieldNames: ' + commaDelimitedFieldNames + ', filter: ' + filter + '\n\n\n\n');      // create a dynamic soql to get the value of the field     String sql = 'SELECT ' + commaDelimitedFieldNames + ' FROM ' + sObjectName;      if (!String.isBlank(filter))         sql += ' WHERE ' + filter;      system.debug('\n\n\n\ngetRecordsFromDb sql: ' + sql + '\n\n\n\n');     List&lt;sObject&gt; records = Database.query(sql);     system.debug('\n\n\n\ngetRecordsFromDb: ' + records + '\n\n\n\n');      return records; }   The problem is with the Account.Name field - the &lt;lightning:datatable&gt; component does not display the column data.   I know that the data is returned ok, and I know that in the object that is returned, the Account is contained like an object (probably this is the problem):    Is there a good way to show parent record data with this component? Phone : nexus 5 version 2013 Android version : 6.0 Kernel version : 3.4.0-g2aa165e Build number : MRA58N   For the last few days, 10118 has been draining my phone's battery. It drains battery by using GPS. I typed 'ps' in a terminal emulator, and there was no application with PID 10118. I don't know what exactly 10118 is. My guess is that it's one of recently installed weather apps.  How can I fix this?    Screenshots (click images for larger variants) How to sort an array of integers correctly So I have been extruding a cube to make a low poly banana and when I go from edit to object mode half the edges don't appear as well as half is dark.      I tried looking for an solution couldn't find one and its making me feel like I am doing something wrong so I decided to come here. Find the solution of following differential equation:     $$\frac{dy}{dx}=\frac{1}{xy(x^2 \sin (y^2)+1)}$$   Could someone hint me something to get through this problem? I can always find that in some articles the production of higgs decay written as &quot;$\rm H\to {ZZ}^*\to 4l$&quot;, &quot;$\rm H\to ZZ\to 4l$&quot;, &quot;$\rm H\to Z\gamma^*\to\ldots$” What dose it mean when some particles with a superscript *? Such as “$\rm Z^*, W^*, \gamma^*, \ldots$&quot;. What’s the difference between them and &quot;$\rm Z, W, \gamma$&quot;? How does "failure" work in Dungeon World? How does it move the story forward? I am having trouble understanding the specifics of failure in Dungeon World. According to the rules, a GM should "make a move" against players when they fail, and that's alright, I get that.  What I don't get is how a GM is supposed to advance the plot by doing so. Let's take an example:  Rick the Fighter is climbing a massive chain that serves to hold down the wizards tower, preventing it from drifting off. He makes the move Defy Danger, to avoid slipping of, since it's raining hard, and the chain is slippery with algae and moss. He rolls and get a score of 5, meaning he fails.  In the above situation, he fails climbing the chain, so the GM should make a move. I have a hard time seeing what move would advance the story here, since I feel that the failure would imply that he doesn't get to the tower.  Is this one of those situations, where you just skip making a roll, and just let the players climb the chain, or does anyone have any idea how to handle the move, so that the story is advanced somehow?  I just want to be able to give the players some dangers that aren't traps and monsters, and I thought that a flying wizards tower was cool. I'm having a hard time seeing how I can advance the story on a failure in this situation.    Let me elaborate on the problem. I will not say that it's wrong to make the players succeed with some "cost", even on a failed roll, it just makes true "failure" impossible. That's my beef about it. The players will eventually succeed at anything that doesn't outright kill them. How to use AP Style commas after dates I was wondering how you are supposed to use commas after full dates in AP style. I've been told to always put a comma after the year, like in the sentence:  On April 4th, 2012, I found a cat.  However, I thought the following might be an exception:  April 4th, 2012 brought the death of my cat.  Notice how there's no comma after &quot;2012.&quot;  My teacher disagreed and told me that the AP style dictates that we always put commas after dates like that. The way I reasoned through it is by replacing the dates with the word &quot;Monday&quot;  On Monday, I found a cat. Monday brought the death of my cat.  And you wouldn't write  Monday, brought the death of my cat.  TL;DR Which one is correct?  April 4th, 2012 brought the death of my cat.  or  April 4th, 2012, brought the death of my cat. What does the "private" modifier do? Considering "private" is the default access modifier for class Members, why is the keyword even needed? AutoScroll on chat exchange doesn't work in chrome 61 I updated the chrome to version 61, and the auto-scroll stopped working, it is necessary to scroll down the page manually. The problem does not occur in the previous version or in firefox.  Also, the reply icon no longer working when the message replied to is not in the current chat page. (Middle click still works and opens the link in new tab.)