All Middle East people believed in life after death, but the Egyptians of ages past carried this idea further than any ancient civilization.   One of the four highlighted phrases is supposed to be grammatically wrong. The solution is any ancient civilization. Can you please explain to me why. I am not able to find it out.

Which of the following sentences is correct?     a)   1. John is taller than any student in his class.   2. John is taller than any other student in his class.        b)   1. No student is taller than John in his class.   2. No other student is taller than John in his class.


I have been working on this code for about a week; I am trying to make a program that generate random numbers and then sort them using the Bubble method, but I get this message "Bubble Sort: [I@ad3ba4". Does anyone see what is wrong I feel like this is so simple but I just can't find the problem.  import java.util.Random; public class sortLibrary {     private static void bubbleSort(int[] list) {         int n = list.length;         int temp = 0;         for (int i = 0; i < n; i++) {             for (int j = 1; j < (n - 1); j++) {                 if (list[j - 1] > list[j - 1]) {                     temp = list[j - 1];                     list[j - 1] = list[j];                     list[j] = temp;                 }             }         }         System.out.println("\nBubble Sort: " + list);     }     public static void main(String args[]) {         System.out.println("Unsorted list:");         Random numbers = new Random();         int list[] = new int[20];         for (int i = 0; i < 20; i++) {             list[i] = numbers.nextInt(100);         }         for (int i = 0; i < 20; i++) {             System.out.print(list[i] + "  ");         }         bubbleSort(list);     } }

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I'm trying to bind a two-stage click behavior to paragraph elements returned from an ajax call. This is NOT a question about using on(), I get that. I'm trying to figure out why the second part of my statement isn't working.  HTML is:

         <input type="hidden" name="lesson-id" value="25360">         <input type="hidden" class="lesson-day-number" value="25">         25 Lovely Lesson Name         ¥18,000
                  1:30pm - 3:30pm

   JQuery is:  // bind click function // click on lesson to select, click again to de-select jQuery('p.lesson-text').on("click", function() {       if (jQuery(this).not('.lesson-selected')) {            // reset all selections for this day           var dayValue = jQuery(this).children().next('.lesson-day-number').val();           jQuery('p.lesson-text.lesson-selected.' + dayValue).removeClass('lesson-selected');            // add selected class           jQuery(this).removeClass('deselected');           jQuery(this).addClass('lesson-selected');            // set all other lessons for that day to deselected           jQuery('p.lesson-text.' + dayValue).not('.lesson-selected').addClass('deselected');       } else if (jQuery(this).is('.lesson-selected')) {            // reset all selections for this day, remove all deselected           var dayValue = jQuery(this).children().next('.lesson-day-number').val();           jQuery('p.lesson-text.lesson-selected.' + dayValue).removeClass('lesson-selected');           jQuery('p.lesson-text.deselected.' + dayValue).removeClass('deselected');     }   }); // end click function   So the click behavior works fine for the first click. The user clicks on the lesson desired, and the "lesson-selected" class is added. If the user clicks on a different lesson, also no problem. The "lesson-selected" class is added, and all other lessons for that day are marked "deselected". So it seems the top part of the JQuery is working fine.  However, when I click on a p.lesson-text that already has the "lesson-selected" class, nothing happens. It should be clearing the class on that p.lesson-text, and clearing all the other "deselected" p.lesson-text elements as well. What am I doing wrong here? Please help!

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


Let $X$ be a Hausdorff compact space; let $\{A_n\}$ be a countable collection of closed set of $X$. Show that if each set $A_n$ has empty interior in $X$, then the union $\bigcup A_n$ has empty interior in $X$.   My solution:  Suppose that, $U=$ interior of $\bigcup A_n$ is nonempty. Then any open subset of $U$ can not have isolated point, since then all interior of $A_n$ can not be empty. (If $U$ have isolated point, then for some $x\in X$ with $\{x\}\subset U$ is an open set, then it must be a subset of some $A_n$, since $\{x\}$ do not intersects with $X-A_n$)  Let, $x_0$ and $x_1$ (where $x_1\in A_{1}$) are two points in $U$. Then there exists two disjoint open sets in $X$, say, $B_1$ and $C_1$. Take, $B_2=U\cap A^c_{1}\cap C_1$, then $x_1\notin \bar B_2$.   Since $B_2$ is an open set containing $U$, there is a point $x_2\in B_2$ with $x_2\in A_{k_2}$ for some $k_2$,  for which, in the same way, we can get an open set $C_2$ such that $x_2\notin \bar B_3$ with $B_3=U\cap A^c_{k_2}\cap C_2$  In this way, we can find sequence $\bar B_2\supset \bar B_3\supset\dots$  Since, $X$ is compact, $\bigcap_{n\geq 2} \bar B_n$ is nonempty. Then there exists a point $x$ which is an element of interior of $A_n$, for some $n$. A contradiction.  Is my solution ok?

Let $X$ be a Hausdorff compact space; let $\{A_n\}$ be a countable collection of closed set of $X$. Show that if each set $A_n$ has empty interior in $X$, then the union $\bigcup A_n$ has empty interior in $X$.   My solution:  Suppose that, $U=$ interior of $\bigcup A_n$ is nonempty. Then any open subset of $U$ can not have isolated point, since then all interior of $A_n$ can not be empty. (If $U$ have isolated point, then for some $x\in X$ with $\{x\}\subset U$ is an open set, then it must be a subset of some $A_n$, since $\{x\}$ do not intersects with $X-A_n$).  Let, $x_1\in A_1$. Choose a point $x_2\in U$ that do not contain in $A_1$. Now choose disjoint sets $W_1$ and $W_2$ about $x_1$ and $x_2$. Now, take $V_1=W_2\cap U\cap A^c_1$. Then, $x_1$ do not contain in $\bar V_1$.  Again do this: There exist an $k_1$ such that $x_2\in A_{k_1}$. Choose a point $x_3\in V_1$ that do not contain in $A_{k_1}$. Now choose disjoint sets $W_3$ and $W_4$ about $x_2$ and $x_3$. Now, take $V_2=W_4\cap U\cap A^c_{k_1}$. Then, $x_2$ do not contain in $\bar V_2$.  In this way we can find a collection of closed sets $\{\bar V_n\}$ such that $$\bar V_1\supset \bar V_2\supset\bar V_3\supset\dots$$  Note that, since $X$ is compact, $\bigcap \bar V_n$ is nonempty. Let, $x\in \bigcap \bar V_n$.   Interior of $A_n$ is empty and $x\notin A_n$ for all $n$ leads to a contradiction.  Is this solution ok? Any help appreciated.  Sorry that I published same question twice. I marked the  duplicate.


My LG gram 15 laptop runs Ubuntu 16.04. When I was running both Makefile and gradle simultaneously, it was getting slower and slower, and finally it froze, so, I rebooted my laptop. Then it started to print only:  /dev/sda2: clean, ***/*** files, ***/*** blocks   Where the *** are large numbers.  CLI mode works well, but I couldn't start the Ubuntu in GUI mode (lightdm, GNOME...)  I searched for a solution. I read almost every relevant answer about this problem, but none of them worked. I tried to reinstall the Nvidia driver, but my computer doesn't have an Nvidia graphics card.  Results of df -h --exclude=tmpfs --exclude=squashfs :   Filesystem | size | Used | Avail | Use% | Mounted on   udev |0 | 12G | 0% | /dev /dev/sda2 | 468G | 173G | 272G | 39% | / /dev/sda1 | 511M | 6.1M | 505M | 2% | /boot/efi   I typed grep EE /var/log/Xorg.0.log suggestion on recovery mode.  $ grep EE /var/log/Xorg.0.log (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied (EE) Failed to load module "fbdev" (module does not exist, 0) (EE) Failed to load module "vesa" (module does not exist, 0) (EE) Failed to load module "fbdev" (module does not exist, 0) (EE) Failed to load module "vesa" (module does not exist, 0) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied.   After I typed Xorg -configure  List of video drivers: amdgpu  ati intel nouveau qxl radeon vmware odsetting fbdev vesa using config file: "/root/xorg.conf.new" using system config directory "usr/share/X11/xorg.conf.d" Number of created screens does not match number of detected devices Configuration failed Server terminated with error (2). closing log file.   stratx makes below error:  systemd-logind : failed to get session: PID 962 does not belong to any known session open /dev/dri/card0: No such file or directory open /dev/dri/card0: No such file or directory Screen 0 deleted because of no matching config section. AIGLX: reverting to software rendering   "journalctl -xe -p err -k"   Couldn't get size: 0x8000000000000000e  MODSIGN: Couldn't get UEFI db list  Couldn't get size: 0x8000000000000000e  ip_local_port_range: prefer different parity for start/end values.  Something spring to my mind is that, I forced power off my laptop while It was connected to external monitor via HDMI cable.

dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there.


I am using apacite and it replaces more than 6 authors with an ellipses in the references section. How can I get it to show all of the authors?

I am new to LaTeX and I need to format my bibliography according to the newest version of APA manual (6th version). As I use bibtex and the \bibliographystyle{apacite}, not all the references are displayed correctly.  Now, I wish to force LaTeX to always list all of the authors in the bibliography, but to keep the rest of the apacite style. Can I do that? Or could I, for example, force LaTeX to list all authors only in a few special cases (because that problem does only occur three or four times in total)?  An Example (sorry for not putting it earlier): An entry in the .bib looks as follows   @article{55,   title={An SCN9A channelopathy causes congenital inability to experience pain},   author={Cox, James J and Reimann, Frank and Nicholas, Adeline K and Thornton, Gemma and Roberts, Emma and Springell, Kelly and Karbani, Gulshan and Jafri, Hussain and Mannan, Jovaria and Raashid, Yasmin and L. Al-Gazali and H. Hamamy and E. M. Valente and S. Gorman and R. Williams and D. P. McHale and J. N. Wood and F. M. Gribble and C. G. Woods},   journal={Nature},   volume={444},   number={7121},   pages={894--898},   year={2006},   publisher={Nature Publishing Group} }   And what appears in the pdf is the following:   Cox, J. J., Reimann, F., Nicholas, A. K., Thornton, G., Roberts, E., Springell, K., ... Woods, C. G. (2006). An scn9a channelopathy causes congenital inability to expe- rience pain. Nature, 444(7121), 894–898.   Now, I do not want LaTeX to make these ..., but to list all of the authors. This problem only appears when there are many others, which is not very often. I wonder: Can I change something inside the single entry in the .bib to make all authors appear? Because reprogramming the whole style would be quite difficult, right?


On the , they stated (in a very big banner):     "There are eleven long-established and prestigious wizarding schools   worldwide."   But they only listed 6 schools, with Hogwarts, this makes 7. So there are still 4 schools that don’t appear on the Pottermore site.  On the , we can find that they have one more entry. They included  in Russia.  So I’m looking for the other 3 long-established and prestigious wizarding schools.  (I guess some more in Asia or Oceania would be most likely.)

With the new  and the upcoming release of  film, JK Rowling has been awesome and given us new writing on the .  In the introduction it is stated that there are eleven established/registered schools. There are writings for six of them. I don't think we need a new writing for Hogwarts... so that means seven have been located and defined.   Hogwarts School of Witchcraft and Wizardry - Great Britain  - France  - Northern Europe (possibly Estonia, Latvia, or Belarus)  - Japan  - Africa (possibly Congo/DRC)  - Brazil  - United States   Do we know anything of possible location or names of the other four schools? I know Koldovstoretz was mentioned as school in Russia, but is that still canon?   Koldovstoretz - Russia (maybe depending on current canon)   The final three are my guesses based on the population and geography on the world.   Name Unknown - China (based on population) Name Unknown - India (based on population) Name Unknown - Australia (based on geography)   Related:


My system is running on Ubuntu 14.04 (64 bit) and I have already installed wine-1.6.2, and when I go and double click on setup.exe icon, I get the following Setup Error dialog:     Setup can't  find or validate an installation file. Please try   reinstall Office from your installation source, or if you install from   a downloaded package,please re-install. if you continue to have   problems,please contact Microsoft or your system adminstrator.   Is there any way to install Office 2013 ?  Thanks in advance.

I am trying to install Microsoft Office 2013 on Ubuntu 12.04 LTS (32-bit). I have downloaded an iso file of said product and installed wine1.4-i386 using the apt-get command on the terminal.  The question is I don't know the steps how to install it. I can't get much tutorials on Internet how MSOffice2013 can be installed on Ubuntu.  If any versions of wine isn't an option, what other options can be used to run Microsoft Office 2013?


We host our application in two data centers. During a production update, we point the customer traffic to datacenter1 and test the update by adding datacenter2 IP in our hosts file, where the update is being done to our domain name.  This has been working fine until windows 10.  ping returns the datacenter2 IP but not nslookup. Is there a configuration/registry to change the order of dns servers to first look at the hosts file? I researched several posts like , , , etc. but to no avail.  Among other things, I tried recreating hosts file with no extension, in the format "<space/tab>". Any help is greatly appreciated.

So I've set public IP on the hosts file for a certain public IP address, but it picks up private ip from nowhere or from DNS.       Content of windows hosts file C:\Windows\System32\drivers\etc\Hosts             210.210.210.10 my.domain.com     nslookup my.domain.com             10.10.10.10             10.10.10.11             10.10.10.12   I want it to resolve to Public IP i assigned in the file, instead of the private IP it shows when I lookup my.publicdomain.com.   Anyway to fix this? Has anyone experienced such issue? ipconfig /flushdns does not help. Just saying.


I have a custom object to manage patient (Contact) status changes, which affect product shipments.  I'm adding a process to roll back changes based on receiving a cancelled form, based on a common form.Id from an external system.  Patient_Status__c is tracked in field history, and I created this method to retrieve the most recent past values for a group:       public Map<Id, Contact> mapPatientsById(Set<Id> setPatientIds) {     mapPatientsById = new Map<Id, Contact>(         [Select Id, AccountId, Name,                  Patient_Status__c,                 (SELECT NewValue, OldValue FROM Histories                  WHERE Field ='Patient_Status__c'                  ORDER BY CreatedDate DESC LIMIT 1)          from   Contact          where  Id in :setPatientIds]);      return mapPatientsById; }   and this one to return either the previous value, or the current value if there's no history on the field      public static String getPriorPatientStatus(Contact c){     if (c.Histories == null || c.Histories.isEmpty()) return c.Patient_Status__c;     return (String)c.Histories[0].OldValue; }   In the UI, cancelling a status change seems to be working as intended.  In my test(s), I insert both a Contact and associated status change record before test.startTest(), which should create field history data, and then insert my cancel form after.  If I check Contact.Histories[] when I insert the cancellation, I'm not finding them, so there is no 'prior status' to restore, and the test fails.    Here's my test scenario:      patient = UT_Utils.reGetContact(patient.Id);     patient.Patient_Status__c = 'Active';     Utils.DatabaseUpdate(patient);      statusForm = new Status_Form__c();     statusForm.Form_Id__c = formId;             statusForm.Contact__c = patient.Id;      insert statusForm;     patient = UT_Utils.reGetContact(patient.Id);     System.assertEquals('On Hold (Trans/Hosp)', patient.Patient_Status__c, 'Incorrect interim status for Patient Status ');      Set<Id> setPatientIds = new Set<Id>{patient.Id};     Map<Id, Contact> tmpMap = sc.mapPatientsById(setPatientIds);     Contact tmpC = tmpMap.get(patient.Id);     Utils.debug(tmpC.Histories.size() + ' Patient Status changes found for Patient ' + tmpC.Full_Name__c);      test.startTest();          // Create & submit the cancellation         cancelForm = new Status_Form__c();         cancelForm.Form_Id__c = formId;         cancelForm.Error__c = true;         cancelForm.Contact__c = patient.Id;         cancelForm.Account__c = null;         insert cancelForm;      test.stopTest();              patient = UT_Utils.reGetContact(patient.Id);     System.assertEquals('Active', patient.Patient_Status__c, 'Incorrect final Patient Status ');   I haven't tried to insert the field history data in the test; that feels like bad juju on the face of it.  Any thoughts on how to structure this differently to get access to field history from that test setup data?

I have some code that relies on field history tracking by querying the History for a custom object. This works fine, but it appears that the history records aren't created during the test so none of my tests will pass.


I have these buttons like so:  <input type="button" id="deleteButton" name="deleteButton" class="btn btn-default deleteButton" value="Delete">   I say these because there are multiples (about 30 of them)  and I have this bind event:  $(".deleteButton").bind("click", function () {          var id = $(this).parent().parent().find('input[name=ID]').val();          $.ajax({             url: "/DepositLog/DeleteItem",             type: "POST",             data: { ID: id, Usr: $("#Usr").val() },             success: function (data) {                  MVCGrid.reloadGrid('DepositLogGrid');               }         });      });   And it only works the first time I use it, after that it does not work at all, I have tried using the id as the selector, I have also tried an on event and that also did not work $(".deleteButton").on("click", function () {  What am I doing wrong?


I recall a novel where a kid learns psychic powers by squeezing little cubes with binary numbers on them?  Does anyone remember this story from my childhood?

I am looking for a YA book about a boy who learns to use powers from a mind-adept, in a seemingly abandoned house. The adept helps him open his mind by using a cube. One of his powers, I believe, is to go into dreams of people that  he knows. He helps his young female neighbor friend by doing this, opening a door in her mind. He tries to open the mind-door of a local older bully, but finds out the young man can't be helped because he has been abused mentally and physically. I don't believe the book I read is past 1995. It might have the word "adept" in it.


I want to eliminate the need to swipe the screen before getting to the log in screen on my Win 8.1 Update computer. I do not have the pro version so there is no gpedit.msc utility present.  What registry keys should I modify to remove this nuisance?  Thanks.

Every time I start up the pc or lock it manually and I want to log in again, I have to press random button or mouse click to remove the "Start-screen background". After that I can enter my password/pin to unlock the pc.   What I want is to just start enter the password/pin right away and be done with it. Why show a start-screen that's made for removing anyway?  So how do I skip the lock-screen image? Or make it automatically move away? Or move the password/pin box to the lock-screen? Anything will do, I just want to instantly enter my credentials and be done with it.


Is it OK to post a questionnaire on Stack Exchange sites?  I'm currently working on a project at my uni and need some empirical information about workouts. I want to explain more about the project, but that will come if it's "legal" to post a questionnaire here.

In  the asker is apparently carrying out an Ant v. Make research smackdown.  To me this looks like spam, but seems harmless.  Should anything be done?  Is there a policy on canvassing the community in this way?  Is it allowed?  As an aside, it seems like the OP would get more views with some language tags, rather than what's on there now...


MSE is burning, there is fire everywhere. I'm terrified every time I write a question over here and I make myself ready for a fight every time I write an answer.   I don't dare to look at comments or answers anymore and, if I see a rude/abusive comment, I'm dreadful to report it in chat because I don't want to be shout out for it.  This is all wrong.  People should be able to ask a question on MSE without fearing to be scolded for it. They should be able to suggest new, unusual, ideas to be screamed at because people disagree with the premise of their question.  People should be able to answer a question and be done with it. They shouldn't have to fear endless criticism and fight and comments war.  Because, if people are afraid to ask good faith questions, if they are afraid to suggest anything, if they are afraid to answer questions, then they will stop doing it.  And I, strongly believe that every voice is valuable. That driving away people that are afraid of conflicts, people with low self-esteem, people with anxiety issues, that driving away all those people and even more is a terrible thing.   I want people to feel safe here, and I think you want that too.  I don't feel safe here.  So, what can we do, as a community, to help make this place a safer one?    Note that I'm not talking about Monica or Robert. I'm talking about regular users who see all those conflicts and hatred and are driven away by it.  Note that I'm also not talking about what SE Inc. or mods can do. The responsibility of all this isn't and shouldn't be on their own shoulders.  We, as a community, are the ones screaming and making this place unfriendly. We are the ones that are at each other throat. We are the ones that are fighting in comments, about comments, around comments.   Not SE Inc, not the mods, us, the community.    So, what can we do, as a community, to help make this place friendlier and safer again?  What can we do to make sure that, even if the mods aren't available, even if there are no diamonds around to erase all the bad things that are said, what can we do to make sure (as much as we can) that this place keep being safe and friendly?     Edit: To people wondering if it's a duplicate of , it's not. Flagging the way we are currently doing is definitively not enough to solve the current situation. We need other, better, outside of the box, solutions.

When flagging, there are two special case options: spam and rude or abusive.   What is spam, and when should I flag content as such? What is considered offensive, rude or abusive content? How does the spam flag differ from the rude or abusive flag? What is the effect of these special flags? When are these flags removed?


how can I define a command so that in the preamble of my document I can have something like  \FigureFolder{name}   So that the following two commands will work  \newcommand{\FigureCaption}[3]{\begin{figure}[h!]\centering\includegraphics[scale=#1]{FIGURES/\FigureFolder/#2}\caption{#3}\label{#2}\end{figure}}  \newcommand{\FigureNoCaption}[2]{\begin{figure}[h!]\centering\includegraphics[scale=#1]{FIGURES/\FigureFolder/#2}\label{#2}\end{figure}}   Basically I want to associate with every of my LaTeX files a separate figure folder (to keep things a bit organised), and specify the name of that folder at the beginning of the document. Of course, I know I could just copy the \newcommand codes in the preamble but I prefer to put those commands in a .sty file and not have too many things at the top of my document.

Do you think it's possible to include images into LaTeX without specifying the exact path to them. So instead of:  \includegraphics{path/to/image/myfig.pdf}   It would be:  \includegraphics{myfig.pdf}   While the image would still reside in the path/to/image/ directory. Basically, I'm asking if there is a macro that can recursively search for the image.  An alternative for me is to write a script outside of LaTeX that determines all the images that are included, performs the recursive search and copies those files temporarily in the same directory as the .tex file.


I have been learning sums of distributions and understand that the sum of exponential distributions with parameter B is a gamma distribution with parameters a=1 and B.  However, I need to figure out: What is the sum of X, an exponential distribution with parameter 0.2, and Y, a gamma distribution with parameters 3 and 0.2. I THINK it would be a gamma distribution based off of the previous knowledge but cannot find anything on this or how to do this.

Density distributions add by convolution, and the result is also a density distribution. So writing this in the time domain, w.l.o.g., the question becomes how do we take a faster gamma distribution:  ${\mathrm{GD_{fast}}}\left(\mathrm{a} ;\ \mathrm{b}; \tau \right)=\left\{\begin{array}{cc}\hfill \frac{{\mathrm{b}}^{\mathrm{a}}}{\Gamma \left(\mathrm{a}\right)}{\tau}^{\mathrm{a}-1}{e}^{-\mathrm{b}\kern0.1em \tau },\hfill & \hfill \tau\ \ge\ 0\hfill \\ {}\hfill \kern2.75em 0\kern1.5em ,\hfill & \hfill \tau <0\hfill \end{array}\right.,$  where $\tau $ is time, and add it to a slower one:  ${\mathrm{GD}}_{\mathrm{slow}}\left(\alpha; \beta; \tau \right)=\left\{\begin{array}{cc}\hfill \frac{\beta^{\kern0.1em \alpha }}{\Gamma \left(\alpha \right)}{\tau}^{\alpha -1}{e}^{-\beta\;\tau },\hfill & \hfill \tau \ge 0\hfill \\ {}\hfill \kern3em 0\kern1.2em ,\hfill & \hfill \kern1.4em \tau <0\hfill \end{array}\right.,$  The notation here assigns the rate scalar $\beta=\frac{1}{\theta}$, where $\theta$ is the time scalar. Both parameterizations are in . Thus, when we require $b>\beta$, we are requiring that $\text{GD(b)}$ to be faster (e.g., lighter right-tailed) than $\text{GD}(\beta)$. The solution is well known for the simpler case when $\mathrm{b}=\beta$; it is also a gamma distribution. But what we (Q1) want is a  general closed form convolution solution for the sum of two gamma distributions: a gamma distribution convolution of the type  $\mathrm{GDC}\left(\mathrm{a}\kern0.1em ,\mathrm{b},\alpha, \beta; \tau \right)={\mathrm{GD_{fast}}}\left(\mathrm{a},\mathrm{b};\;\tau \right)\otimes {\mathrm{GD_{slow}}}\left(\alpha, \beta; \tau \right),$  Finally, we (Q2) want some indication of whether this can be used to form reasonable models, and whether or not it has found practical applications.


I've been locked out of my Desktop computer for a while and could only get hold of an old installation CD with yakkety on it.   $ do-release-upgrade Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Get:1 Upgrade tool signature [819 B]                                            Get:2 Upgrade tool [1,258 kB]                                                   Fetched 1,258 kB in 0s (0 B/s)                                                  authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg'  extracting 'bionic.tar.gz'  Reading cache  Checking package manager  Can not upgrade   **An upgrade from 'yakkety' to 'bionic' is not supported with this  tool.**    I've tried upgrading a few different ways and get the same message that an upgrade from 16.10 to 18.04 is not possible with this tool. Running apt-get update, some of the repositories don't work also:  E: The repository 'http://security.ubuntu.com/ubuntu yakkety-security Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I read in a thread yesterday that you can manually edit the sources.list and upgrade to the next version (still an old one, but a step up), I found out that its called an EOL Upgrade:   I tried this but things didn't work out like I was hoping. Is this EOL Upgrade the only viable way to do this? Will I have to do 2 EOL upgrades (16.10 > 17.04 > 17.10)? I just checked and yesterday I tried to jump from 16.10 to 17.10:  sudo sed -i 's/yakkety/artful/g' /etc/apt/sources.list   Maybe that's why things went wrong. So to do it properly, do I need to run these commands:  sudo sed -i 's/yakkety/zesty/g' /etc/apt/sources.list sudo sed -i 's/zesty/artful/g' /etc/apt/sources.list sudo sed -i 's/yakkety/zesty/g' /etc/apt/sources.list sudo do-release-upgrade   ?  As for an alternative way, I have no files or anything on this partition I need to save so it doesn't matter if all user files on it get wiped out. I could make a partition just big enough to hold the Ubuntu 18.10 iso file, can I boot that partition like you would a CD?   EDIT: So I ran:     sudo sed -i 's/yakkety/zesty/g' /etc/apt/sources.list  Everything went normal except at the end, I got the same message about repositories not having Release file:  W: The repository 'http://ie.archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.   Then when trying to upgrade, nothing happened:  $ sudo apt full-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I have a Dell XPS 13. I got it with windows 8 and it adapts the fonts and icons to the 3200x1800 screen resolution. Then I start my virtual Ubuntu Studio 14.04 machine and they look really small. How does Ubuntu Studio handle that? Is there a way I can set it to do the same windows does (i.e. make them extra big so I can read them in menus and titles)?  I'm using Ubuntu Studio 14.04, with XFCE, so  won't work because the options are different than those for Unity.  I have adapted font sizes and icons using different configuration options, and most apps seem to work, as well as Desktop.   But some applications, like Blender, won't change. Is there like a general way to tell Ubuntu-Studio "I'm using a High DPI screen, please adapt"?

How can I adapt Ubuntu to a high resolution display?  I have a display with 3200x1600px on only 11'' and everything looks really tiny.


Using "" answer code, I would like to show Local pickup and free shipping when free shipping is available (hiding other shipping methods), but It does not work for me.   Where am I wrong?  I am using Wordpress Version 5.2.3 with Woocommerce Version 3.7.0…

I currently have WooCommerce setup to allow free shipping on orders over a certain amount. However, I also have local pickup available and would like to allow BOTH if over a certain amount. I have the following code to remove the other rates, however it also doesn't keep the local pickup option. function fd_shipping_rates( $rates, $package ) {           $all_free_rates = array();          foreach ( $rates as $rate_id => $rate ) {         if ( 'free_shipping' === $rate->method_id ) {              $all_free_rates[ $rate_id ] = $rate;             break;         }     }          if ( empty( $all_free_rates )) {         return $rates;     } else {         return $all_free_rates;     }  } add_filter( 'woocommerce_package_rates', 'fd_shipping_rates', 10, 2 );  Any help regarding this is much appreciated! I am looking for a code solution only as I am looking to minimise unneeded plugins. EDIT: I recently found this article on  website regarding this exact issue.


I would like to easily dump all my DB without typing same stuff many times ... (I'm a dev and I have a lot of DB on my local machine )  Any Simple scripts that comes to your mind ?

I would like to know how to dump all databases into a folder. I'm using a Linux/Debian Afer connecting on the server with root access I make  $ mysql -u admin -p   To connect on mysql.  Then which commands are to extract all databases created in my Plesk Panel?


Okay so, I'm getting my sharepoint listItems, and i want to count the average value of "_x0072_zb6" which is a price column, right now i'm getting the following error: Cannot read the property value of null ( elmt ) and Error 403, forbidden, please help!  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "<Where>" +     "<And>" +     "<Eq><FieldRef Name='Title'/><Value Type='Text'>" + namn + "</Value></Eq>" +     "<Or>" +     "<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>Hög</Value></Eq>" +     "<Eq><FieldRef Name='Status'/><Value Type='Text'>Startad</Value></Eq>" +     "</Or>" +     "</And>" +     "</Where>");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); }     function OnSuccessVisa() {         var listEnumerator = listItems1.getEnumerator();         var elmt = 0;         while (listEnumerator.moveNext()) {             var currentItem = listEnumerator.get_current();             elmt = (currentItem.get_item('_x0072_zb6'));              var sum = 0;             for (var i = 0; i < elmt.length; i++) {                 sum += parseInt(elmt[i]);             }              var avg = sum / elmt.length;         }         $("#Kategori1").text = "Medelvärdet för dessa ordrar: " + avg     }

So I'm getting my listItems with a Camlquery, but i want to calculate the avg of the "price" rows  This is the code I've used so far:  function VisaLista() {     namn = document.getElementById("txtNamn");     var camlQuery = new SP.CamlQuery();     camlQuery.set_viewXml(     "<Where>" +     "<And>" +     "<Eq><FieldRef Name='Title'/><Value Type='Text'>" + namn + "</Value></Eq>" +     "<Or>" +     "<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>Hög</Value></Eq>" +     "<Eq><FieldRef Name='Status'/><Value Type='Text'>Startad</Value></Eq>" +     "</Or>" +     "</And>" +     "</Where>");     listItems1 = list.getItems(camlQuery);     clientContext.load(listItems1);     clientContext.executeQueryAsync(OnSuccessVisa, OnFail); } function OnSuccessVisa() {     var listEnumerator = listItems1.getEnumerator();     var elmt = 0;     while (listEnumerator.moveNext()) {         var currentItem = listEnumerator.get_current();         elmt = (currentItem.get_item('_x0072_zb6'));          var sum = 0;         for (var i = 0; i < elmt.length; i++) {             sum += parseInt(elmt[i], 10);         }          var avg = sum / elmt.length;          document.write("The sum of all the elements is: " + sum + " The average is: " + avg);     }     $("#Kategori1").text = "Medelvärdet för dessa ordrar: " + avg }   I am getting following error     "Cannot get the value length of null - at elmt, line 43


You can use -foobar to search for posts that do not contain the text "foobar". You can use -[foobar] to search for posts that are not tagged with tag foobar.  It does not seem possible to exclude questions and answers posted by a specific user (is it?). How about making that possible?  Suppose I want to see questions or answers or both that have given tags and contain given content, but I want to exclude posts by myself (or by some other user).  Couldn't this be useful? Possible?

I want to exclude from my search all the results that would normally come up from searching with user:me.  I see from this question:   that there is no "NOT" operator for searches.     However since there is a "is accepted" and a "not accepted", I think a "not user" option would make perfect sense?  Example of use expected use:   It would be added in combination with other filters when searching through a specific tag or topic in order to filter out questions that the user has already answered.  Especially in cases where a user is very active in that tag.


my question is does always AFTER for example 3 something means that the 4th is the thing?  I give you two examples:     If you had 3 girls and fourth girl gave you first kiss. After how many   girls did you get your first kiss? After 3 girls I got my first kiss or after 2?   Similar example:     If you found some thing you have been looking for in third drawer.   After how many drawers you found it? I found it after 3 drawers or 2   drawers?   Thanks for help!

For example:  If there are 5 houses in the village and I passed 4 houses and now at 5th house I finally arrived to the destination. It took me how many houses to get there or after how many houses I finally found the right place I had to get to?   After 5 or after 4 houses?  Or another example to understand me:  If I am trying to find the right video or song and I watched already watched 4 videos and now I am on 5th video and that is the video I was looking for.  And someone asks me after how many videos did you find the video you were looking for? Should I say: AFTER 5 videos or AFTER 4 videos?  Or another example:  You have had 3 girlfriends in total. 2 before and now you have 3rd and she is the one you love the most. Would you say: I finally found the right one after 2 girls or 3 girls?  The question is should I count in the one which was considered the right one?


On many sites, a well written question, even one asking about a possibly bad idea, is often upvoted. I've noticed a little difference on this site. Do people down vote questions because they do not contain a good idea, rather than giving a detailed answer explaining why it isn't the greatest idea?

On all of the other SOFU sites a downvote means The question is unclear or not useful.  However, here on meta, a downvote has become a sign of I don't agree with the question, suggestion, feature request, bug, etc. being described in the question.   What does a downvote on Meta really mean? What other reasons do people downvote on Meta? Why is it okay for meta to redefine the meaning of the downvote?  The tooltips and instructions are all the same here on meta.   Note: I'm not saying I disagree with the practice, just curious.


Still looking for a way to get all those special chars covered that I need in my project. So I tryed to use XeTeX as it seems to work best with Unicode. And it does. Nearly. At least it shows chars that other compilation systems don't show. But some of them are shown as square, as if the font family wouldn't contain them, but it definitely does!  \documentclass[11pt]{article} \usepackage{xltxtra}  \setmainfont[Mapping=tex-text]{Times New Roman}  \begin{document} 123456789↊↋0 °á ô \end{document}   The font type of my editor is Times New Roman and all chars are shown while coding. But when I render the preview it only shows squares instead of ↊ and ↋. Why?

I'm currently working in sharelatex online Latex editor, using XeLaTeX. I had all the fonts working using the fontspec package, however once moved to the Fonts folder there is no way to make them work:  \setmainfont{./Fonts/Merriweather-Regular.ttf}%   [Ligatures=TeX,   BoldFont=./Fonts/Merriweather-Bold.ttf,   ItalicFont=./Fonts/Merriweather-Italic.ttf,   BoldItalicFont=./Fonts/Merriweather-BoldItalic.ttf]   Even replacing the ./Fonts/, /Fonts/, Fonts/, etc.  Does anyone know how to make it work?


Consider the following example sentence: "If in addition he is happy, we are done." What is the correct place for the comma(s) for the phrase "If in addition"? I see two possiblities:  If, in addition, he... If in addition, he....  Are both acceptable or just the first one?

When and how do we use the different kinds of brackets/parentheses — (){}[] — while writing English (not code)?


I am using arcgis from last 3 years. but it was only limited by button pressing.   I want to learn ArcObjects VBA and .NET.   Can you suggest me some reference books?

What is the best route or place to get started with ArcObjects if one is not a developer and not aiming to become a developer?  I've been using gis professionally for a long time, almost two decades, arcinfo/arcgis for most of that; I'm pretty good. I'm learning software development, and even have a modestly successful small python application used in a public project; I'm not good! I don't want to become a full fledged software developer but I keep running into things I just can't do without programming (). In the arcgis world this puts me pretty squarely in the python camp, which is fine by me since I like python, however python does not have straightforward access to ArcObjects. (Python and ArcObjects , but it's an unsupported route. This question is about following a beaten path.)  I need to get started, but where?  to get started with the  but $1500/yr is definitely not in my budget, and sounds like using a sledge hammer to swat mosquitos. And which language .NET, Visual Basic, or Visual C++?    UPDATE: Thank you everyone for the wonderful answers. In light of them I realise  I unecessarily narrowed the scope of my question be pre-supposing "ArcObjects" is the direction I need to go in. A more open ended formulation is more along the lines of:     I keep running into problems I just   can't solve with arcgis and python   alone. What else can I learn/use to   solve problems like X? I've no   interest or intention of becoming a   software developer. I just need to do   a couple things which aren't exposed   to the arcgis python modules.


I am currently facing a problem with the update checking error in Ubuntu 18.04. Also after this problem terminal is not working or not opening. So I can't open the terminal as well as the software updater was not working currently. I also tried through system setting for updates but still in system setting software and updates are not opening and working. What is the solution for this? Can I please know how to recover back (my terminal and Software Updater aren't responding). So that I can start using my terminal again.  Apparently this happened when I tried to upgrade from python2 to 3.

I was trying to make python version 3 as a default version of Ubuntu,  I used nano ~/.bashrc and added the first line of this answer.    Then It just messed up my terminal.  Now when I am clicking on my Terminal or trying to access by ctrl+alt+t, the terminal does open/run. I can only talk to ubuntu using my terminal how could I fix this?  Please advise!  Pls, note that the terminal icon is present, but the terminal does not open when clicked on. How do I get the terminal to open and work?  Update: I deleted that line from .bashrc. However, I still have a problem opening my terminal. I also see this sign on my ubuntu as well.     saying: a problem occurred when checking for the updates ubuntu 18.04


The Manual of Jackson XML write Object like this   <Simple>   <x>1</x>   <y>2</y> </Simple>   in  but in my code,it has [xmlns="" ],and it can't be in my business.  My code:  public class Sample {     private int id=1;     private String name="abc";      public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     }      public int getId() {         return id;     }      public void setId(int id) {         this.id = id;     }     public static void main(String[] args) throws Exception {         XmlMapper mapper = new XmlMapper();         System.out.println(mapper.writeValueAsString(new Sample()));        //<Sample xmlns=""><id>1</id><name>abc</name></Sample>     } }

Is there a way for me to serialize an object in .NET without the XML Namespaces automatically serializing also?  It seems that by default .NET believes the XSI and XSD namespaces should be included, but I don't want them there.


I'm having some trouble solving the following exercice:  Let $a,b \in \mathbb Z$ and $p$ be a prime number. If $\gcd(a,p^2) = p$ and $\gcd(b,p^3)=p^2$ determine:  $\gcd(ab,p^4)$ $\gcd(a+b, p^4)$   I was able to determine the first one and got $\gcd(ab,p^4) = p^3$ (The part I'm having trouble with is the second one, but I would appreciate If someone could also confirm this first answer). I'm not being able to determine the value of $\gcd(a+b, p^4)$. How can I do this?

If $p$ is a prime and $(a,p^2)=p, (b,p^3)=p^2$,calculate $(a+b,p^4)$ $$$$ That's what I thought: $$$$ $$(a,p^2)=p \Rightarrow a=kp$$ $$(b,p^3)=p^2 \Rightarrow b=l p^2$$  So,$$(a+b,p)=(p+p^2)$$  Is it right or am I wrong?


I have a small TV which expects 12V DC at 34W. Can I use an adapter with a higher voltage rating (19V for example) as long as it can provide enough amps to satisfy the amount of watts needed by the TV?  If the adapter says 19V, does that mean that it can provide "up to" 19V safely or will it always provide 19V and damage the TV?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I was issued a 1-year multiple-entry national type D visa for Malta, and now I have less than a month left before it expires. A month ago, I entered another Schengen state with this visa for a 3-day trip. Since I have less than a month left on the visa, and I have already entered another Schengen state, am I still eligible to travel to other Schengen states?

I’m going to Germany for a semester exchange and I have a long-stay visa from Germany. Can I travel to the other Schengen states during this period with this visa or do I have to apply for a separate short stay Schengen visa?  My visa is German national visa type D. It is for a duration of 4 months, i.e., longer than 90 days. It says on the visa that the long stay visa is valid in Deutschland, which is different from my earlier visa, which I had when I visited Germany earlier; that one was a short stay visa and said it was valid in Schengen Staten.  Perhaps my current visa means that I can stay in Germany for a period of longer that 90 days can visit the other Schengen states if I don’t exceed the 90 day period.


I just learned that the roundtrip tickets to Greece is so cheap and I want to visit Greece for 2 days. My Schengen visa is 9 days long. I told the officer that I would stay in Italy the whole time as I was planning to and plus my hotel is non refundable. But now I wanna make small adjustments on my itinerary and fly to Greece for couple days and back during my stay. Do I get in trouble for that?

I am visiting a friend in Switzerland for ten days. I have already got visitor's visa for the same on my Indian passport. Particulars mentioned on my visa are:  1. 'Etats Schengen' , 2. Single entry 3. Dates of visit. & 4. Type of visa : C.  I understand that having already got ‘Etats Schengen' visa, I can travel to all Schengen countries.  I am also planning to visit Paris for a day during my stay in Switzerland. However, I never mentioned this in my visa application. I am planning to take a train from Geneva to Paris and book a hotel in Paris for one night. Can I possibly plan my Paris trip this way as I have Schengen visa, or I am not allowed to travel out of Switzerland as I never mentioned this in my visa application?   Also what does Single entry on my Schengen visa means: does it mean that I can enter and leave Switzerland only once or it means that I can enter and leave the Schengen region only once.


It's common to see people using a tf-idf representation of words for text classification, but I don't understand why not just use tf.  Say $tf(t,d)$ is the $tf$ of term $t$ in a document $d$ and $idf(t)$ is the $idf$ of term $t$. $idf(t)$ will be the same for every document, so it is just a number by which we multiply every $tf(t,d)$. If we fit a linear model, for example, won't multiplying the $tf(t,d)$ by $idf(t)$ just shrink the learned weights by $idf(t)$? If we further normalize or standardize the columns, won't the two representations end up being the same?  I saw , but I'm not sure if I agree with the accepted answer. It argues that better features help learning, but it doesn't explain how this factor effectively leads to better features when we deal to models invariant to scaling.

A common approach to text classification is to train a classifier off of a 'bag-of-words'. The user takes the text to be classified and counts the frequencies of the words in each object, followed by some sort of trimming to keep the resulting matrix of a manageable size.  Often, I see users construct their feature vector using TFIDF.  In other words, the text frequencies noted above are down-weighted by the frequency of the words in corpus.  I see why TFIDF would be useful for selecting the 'most distinguishing' words of a given document for, say, display to a human analyst.  But in the case of text categorization using standard supervised ML techniques, why bother downweighting by the frequency of documents in the corpus?  Will not the learner itself decide the importance to assign to each word/combination of words?  I'd be grateful for your thoughts on what value the IDF adds, if any.


For a submission requirement, everything in my document has to be 12 pt. The submission structure is set up for Word submissions, as the organization largely works with scientists, but I need to use LaTeX for my specific submission. I've found other posts with commands to make section headers various sizes, but is there a package and command I can use to to specify the font size, as in 12-point, 11-point, etc, rather than the default LaTeX sizing parameters?

I have to submit a manuscript to a journal, and I just realized that they want every single part of the paper to be in 12 pt font. This includes tables text, footnotes, acknowledgements etc. Is there a way to force all text to be the same size?


i'm trying to make a difference between different types of initializing objects. But I've read (middle to end of page) that if you try to call Class object(); this will not instantiate an object, rather will define a function? I tried and it is so, but I don't understand why.  Circle c;   // default constructor called Circle c(); // function declaration (default constructor NOT called) Circle c{}; // default constructor called   Here is how i tried to reproduce: class Circle {     float r; public:     Circle()     {         cout << "default constructor" << endl;     }     Circle(float r)     {         this->r = r;     } };  In main() I'm trying to instantiate an object like this Circle c() and it does not call the parameter less constructor. I was expecting seeing in console the message "default constructor". What does the syntax Circle c() does if it is not calling the default constructor? How is that a valid function declaration?

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


For example, in the sentence:     I enforced a 60 minute time limit.   Should it be:     I enforced a 60-minute time limit.   Which one is correct?

Example:     Paul and Jake discuss the Frame Timing API in this 5-min video: …   Which character (if any) should be put between the number and the word “min”?


When someone creates a new account on an SE site, and when he/she flags a post for the first time, he/she can't see whether this flag is still active, or got declined, because the "Helpful flags" link only appears when someone has at least one flag marked as helpful. This could be annoying, because if this flag gets rejected, then he/she can't see why this flag was rejected (if a specific reason is added).  So, my suggestion is: after someone has flagged one post (and if it's not yet marked as helpful), show a "Helpful flags: 0" link, so people can see whether his/her flag is still active or declined.

The Problem  Currently if I flag a post, I cannot check the status of the flag unless I have prior helpful flags. This means, for example, that a new user who wants to check the status of his first flag cannot do so while it is pending (active).  This feature request is based on my experience on MSO, where I wanted to check the status of my flag but could not get to the summary page without cheating (tweaking my SO link to work with MSO). It also stems from this question, where the OP indicates he had the same issue:   My Proposal  If I have flagged any post, then show me a "flags" link (red arrow in image below). If I have any helpful flags, then the number of helpful flags should be displayed (blue arrow). If I have not flagged anything, then neither should be displayed (as with current site functionality).


I wonder if it is allowed to log a variable which is already logged (transformed). When I do this, the skewness of my model goes to 0.05 which is quite good. Let me know! Thanks in advance :)

Am I looking for a better behaved distribution for the independent variable in question, or to reduce the effect of outliers, or something else?


I am not familiar with the Ubuntu 14.04 and am also trying Ubuntu for the first time. Is there any way to move the launcher to the bottom or right or top?

I can’t get used to the new Unity system. I’d like to move the left Unity panel to the bottom of screen (like Windows 7 – more similar is better).  But I can't find a way. Is it possible?


NOT A DUPLICATE. These questions are related, but mine is asking about a specific application of classifiers - flagging Stack Exchange posts. I want to know which of the 2 methods is most effective for THIS TYPE OF JOB. This question is different also because the true/false classifiers are run in a specific order (most priority to least priority). UNMARK AS DUPLICATE!   I want to write a program that can automatically review the Stack Overflow Triage queue. It will classify text as "Looks OK," "Requires Editing," and "Unsalvageable." If it's unsalvageable, it will then classify the text into a specific close reason.  I've come up with 2 methods to do this:   Use multilabel classification to classify the text into one of the closure categories. (No category has priority over another) Go through the close reasons individually, in a hardcoded order, and decide if it belongs in the category or not. If it belongs, it flags the question. If it doesn't, it moves to the next close reason and repeats. If it hasn't been identified by the end, the question is determined to be good-quality. (The order in which the program checks the classes is important)   I don't know which way is more effective. I thought of the 2nd way because a question that is both off-topic and offensive should be flagged just as offensive. Therefore, "offensive" has a higher priority than "off-topic."  Priority order:   Offensive? Spam? Very Low Quality? Blatantly Off-Topic? Unclear? Recommendation? Super User/Server Fault Opinionated? Too Broad? Vague Debug? No Repro/Typo? Requires Editing/Looks OK   Which of the 2 algorithms gets the job done better?

I have a classification problem which is multi-label with N labels. I would like to know which method would be the better choice? Training N classifiers (1 for each label) or a single classifier which use K-hot encoding. I'm using a neural network for this with a softmax at the last layer. (Is there any chance that the softmax would cause a problem?) I'm using tensorflow for the model.


The initial post occurred at 2018-03-19 15:37:03Z.    The first edit (second revision) occurred at 2018-03-19 15:38:52Z and the second edit (third revision) occurred at 2018-03-19 15:40:11Z.

When answers are posted within a question's initial grace period, it is possible that further edits could completely change the question (see ""), and render those first few answers incorrect.   Worse yet, nobody is notified that there was a change to the question, except those that are sitting on the page and notice the edit bar pop in. And of those, only those bothered enough to open it in a new window to compare the differences, will see how much was changed.   After the grace period is up, nobody will be able to consolidate why the first few answers actually answered a different question. And the answerers won't know unless someone comments or down-votes (and in the latter case, without context, they still might have trouble understanding, unless they memorized the question's initial state).  Jon Skeet stated it pretty well in  on :     I'd like this to apply to the question, as well as answers. Sometimes I (or others) have added perfectly good answers, but then the question has been changed within the grace period, making answers look foolish without any indication of what's happened.   So this time, my proposal is quite simple:     Once an answer is posted to a question within the initial grace period, a new grace period should start, and the current state of the question should be saved as the first revision. Further edits within the next 5 minutes will be aggregated into a new, second revision.   This will only noticeably affect questions where answers are posted within the grace period and the author of the question makes edits within 5 minutes of the first answer. (Effectively, it would treat it as if a different user made an edit within the author's grace period.) All other scenarios will continue to behave as they do today.  This feature request comes close:    However, the answer suggests a simple change to the wording or a pencil icon (like we see with edited comments), without adding a revision that can be viewed and compared. I don't think this is enough - in some cases it's going to be important to know what changed, not just when.


I did some experiment between the mass of an object and the height of the water splash, the experiment is dropping a sphere object with a different mass increase by 25g, I did 4 different variables which is 25g, 50g, 75g, and 100g. The relationship seems to be linear but also like a curve graph. Is there any scientific paper that did a similar experiment before? Or the certain theory that can give me the answer

Suppose from a height $H$, I throw a ball of mass $M$ and radius $R$ with initial velocity $u$ into a pool of depth $x$ having a liquid with density $\rho$ and coefficient of viscosity $\eta$.  Upto what height will the Water Splash?   This may be a silly question! (Source : my brain) Assume every condition to be identical with no air resistance. Feel free to assume any other parameters if needed.  P.S. $\rightarrow$ I've see similar questions but some of them want an exact answer and some are not so direct while some are incomplete questions...  Small Note : We do not have to consider the highest 'single' drop... Just assuming almost every water droplet jumped upto a height $h$. Ideal conditions...  Feel free to assume the liquid as WATER if required!


I know this question has been asked and answered before, but I am working on my own through an analysis textbook and just wanted to check if the following construction would be appropriate:  Define $a|b=(a+b)/2$ to be the midpoint of interval $(a,b)$ and $a|b^n=(...(a\underbrace{|b)|b)...|b)}_{n\text{ times}}$ (note that $a|b^0=a$). Then define the bijection $f:[a,b)\rightarrow(a,b)$ as follows:$$f(x)=\begin{cases}a|b^{i+1},   & \text{if $x=a|b^i$, for $i=0,1,...$} \\x,   & \text{otherwise} \end{cases}$$  So $a$ gets sent to the midpoint of $(a,b)$, which in turn gets sent to the midpoint of itself and $b$, and so on ad infinitum, while the rest of the elements stay fixed. I know this doesn't seem like something worthy of posting a question for, but I am working on my own and struggling with a lot of the exercises, so I am anxious for at least some of my solutions to be correct.

Proving that $[0,1)$ and $(0,1)$ have the same cardinality (without assuming any previous knowledge) can be done easily using Cantor-Bernstein theorem.  However I'm wondering if someone can build an explicit bijection between these sets.  It's easy to build a bijection between $(0,1)$ and $\mathbb R$, so a bijection from $[0,1)$ to $\mathbb R$ will also fit the bill.


Yosh! In a popover, I added two links. The 1st refers to an action by the controller (And it works) The second contains a simple class, which, when clicked, should trigger launch a simple alert in JS. Except it doesn't work.    The popover header code in the DOM:    $(".show").click(function(){  var header = "Click on me";  $(".show").popover({     title: header,     placement: 'top',     trigger: 'click',     content: "toto",     container: 'body',     html: true  }).popover('show'); });  $(".js-alert").click(function(){  alert("Hello !"); })        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
   <button type="button" class="btn btn-secondary show">Show popover</button>
     And when I click on the second link, nothing happens at all (and no error)  This is an example on jsfiddle :

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


I am trying to insert Date and time in a DATETIME type column through session.createSQLQuery() method and getting java.lang.NullPointerException.  Thanks in Advance.  Controller class Code:      package dao;  import java.text.SimpleDateFormat; import java.util.Date; import org.hibernate.Session; import org.hibernate.Query; import org.springframework.orm.hibernate3.HibernateTemplate;  public class AccountDAO {     private HibernateTemplate template;     Session session;     int returnValue=0;      public HibernateTemplate getTemplate() {         return template;     }     public void setTemplate(HibernateTemplate template) {         this.template = template;     }     public int insertLogoutTime(int srNum, String userName) {         System.out.println("------>Inside AccountDAO<------");         System.out.println("*************-- In insertLogoutTime() Method--************");         try{             SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");             Date now = new Date();             //System.out.println("update login_info set Logout_DateTime ='"+sdfDate.format(now)+"'" +" where SrNum= "+srNum+"");              Query query=session.createSQLQuery("update login_info set Logout_DateTime =:theDate where SrNum=:srNum");             query.setParameter("theDate", now);             query.setParameter("srNum", srNum);             returnValue= query.executeUpdate();              System.out.println(returnValue);         }         catch(Exception e)         {             e.printStackTrace();         }         return 0;     } }   Error:  17:50:21,167 ERROR [STDERR] java.lang.NullPointerException

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


Just curious to get an idea of how it works, could I pause a project to shutdown my PC for the night and then continue the next day, as I'm aware it can take a long time to render some projects.  It's different from the question it's been link to for similarities, in the sense that it wouldn't be in the same session, the PC would  be turned of then back on, it's a difference worth considering.

I would like to pause a render that I have started, with the intention of resuming it at a later time (but during the same Blender session).  How can I do this?


How does the myelination help in better conduction? I would prefer answers that are not too technical please.

How does spacing apart sodium and potassium channels allow the action potential to travel faster down the axon? This is the reason always cited for saltatory conduction and myelination, but my mental model of conduction tells me that the density of ion gates along the axon should not affect the speed of the AP.   To illustrate, consider a myelinated axon. A wave of Na$^+$ from action potential site 1, a node of Ranvier, rushes into and quickly diffuses down the axon. (It travels in both directions, but backwards is still in the refractory period.) It diffuses through the myelinated region, its concentration always diminishing. Before it attenuates too much, however, it happens upon node of Ranvier 2, where it triggers another action potential. A new wave of Na$^+$ rushes in and the cycle repeats. This should be plain so far.  Now imagine that there is actually a node of Ranvier halfway between node 1 and 2, called node 1.5. The wave of Na$^+$, on its way to node 2, happens to trigger an action potential at node 1.5, from which a wave of Na$^+$ pours in and either boosts the original wave or replaces it by taking its momentum. Now the reinforced wave proceeds to node 2 and triggers it just as soon as, perhaps even sooner than, if node 1.5 had not existed. Repeatedly insert nodes at higher densities until the situation is simply lack of myelination, and we conclude that unmyelinated axons can transmit an action-potential-triggering wave of Na+ as fast as or faster than a myelinated one.  In short, my point of confusion is this: I cannot see how a higher density of gated channels can possibly slow down the wavefront of Na+ that triggers action potentials. If anything, the additional influxes of Na+ should speed up the all-important wavefront, assuming that new waves really "either boost the original wave or replace it by taking its momentum", and also assuming that the wavefront of Na$^+$ is really all-important for signal transmission, and also assuming that the mere presence of (voltage?) gated ion channels in the membrane does not significantly retard the wavefront.  But the usual explanation for why saltatory conduction is faster than continuous conduction (a fact I hope is empirically and unambiguously established) relies on the putative slowing effect of ion channels on the signal fore. Please explain this effect in more detail, if it is not a misconception.


From Royden's Analysis, 4th Edition, Chapter 5, section 2 Problem 7:     Let $E$ have finite measure, $\{f_{n}\}\rightarrow f$ in measure on $E$ and $g$     be a measurable function on $E$  that is finite a.e. on $E$. Prove that $\{f_{n}\cdot g\}\rightarrow f\cdot g$ in measure, and use this to show that $\{f_{n}^{2}\}\rightarrow f^{2}$ in measure.   The first part is complete, but I am having issues with the squared sequence. I understand that I can get a subsequence, $\{f_{n_k}\}\rightarrow f$ pointwise almost everywhere on $E$. Is this helpful for this problem? So, even with this subsequence, I don't have that $f$ is finite almost everywhere, so I can't really use the previous portion of the problem.  Any insight at all would be great! Thanks.

Consider the following problem:     Let $E$ have finite measure, $\{f_n\} \rightarrow f$ in measure on $E$ and $g$ be a measurable function on $E$ that is finite almost everywhere. Use the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ to prove that $\{f_n^2 \} \rightarrow f^2$ in measure on $E$. Infer from this that if $\{g_n\} \rightarrow g$ in measure on $E$ then $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure on $E$.   I'm struggling understand how I can apply the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ in measure to prove that $\{f_n^2 \} \rightarrow f^2$ in measure. I've been able to come up with a proof of the fact that if $\{g_n\} \rightarrow g$ in measure then $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure, and this clearly implies the claim that $\{f_n^2 \} \rightarrow f^2$ in measure. Unfortunately my proof doesn't rely on the fact that $\{f_n \cdot g\} \rightarrow f_n \cdot g$ so it doesn't answer the problem since it explicitly asks us to prove it a certain way.  So far my best attempt to utilize the fact is as follows. Let $\eta > 0$ then by triangle inequality and monotonicity of measure  \begin{align*}     \lim_{n\rightarrow \infty}\mu\left\{ \left|f_n^2 - f^2\right| > \eta \right\} &\leq \lim_{n\rightarrow \infty}\mu \left\{\left|f_n - f\right|\cdot \left|f_n\right| + \left|f_n - f\right| \cdot \left|f\right| > \eta \right\} \\     &\leq \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right|\cdot \left|f_n\right| > \eta/2 \right\} + \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right| \cdot \left|f\right| > \eta/2 \right\} \end{align*}  By the fact that $\{f_n \cdot f\} \rightarrow f \cdot f$ in measure \begin{equation*} \lim_{n\rightarrow \infty}\mu\left\{\left|f_n - f\right| \cdot \left|f\right| > \eta/2 \right\} = \mu\left\{\left|f_n \cdot f - f\cdot f\right| > \eta/2 \right\} = 0. \end{equation*} I don't see how to deal with the other limit without first proving the most general statement $\{f_n \cdot g_n \} \rightarrow f \cdot g$ in measure.   Any help or advice is greatly appreciated.


We know from the Theory of Relativity that there is an upper bound on velocity, namely the speed of light $c=2.99792458\cdot 10^8\frac{m}{s}$. Is there an analogous upper bound on acceleration? I don't think there is an upper bound, and it can be as large as possible, but is it really true that there is no upper bound? If it is true, then what is the largest acceleration that can realistically happen (on Earth and in the universe)? Of course the speed of light puts a limit on how long any such acceleration can last (I haven't studied relativity yet, so if this statement is wrong, correct me), but how large can the instantaneous acceleration be?

I'm thinking equivalence principle, possibilities of unbounded space-time curvature, quantum gravity.


I am looking for a good source to understand angular momentum. I know the basics but I am looking for a sound in-depth knowledge like directions of angular momentum, when it is not parallel to angular velocity, differences between normal angular momentum and spin angular momentum, how one is intrinsic property and other is not, etc.   Can you please help? Any book, any video, any website etc.?

Angular momentum of an object is a physical quantity that depends on the chosen point about which to calculate the angular momentum. It is often said that an object that has been thrown up in the air and is rotating, is physically rotating about the center of mass. I don't think that is what is physically happening. We chose the center of mass as the point of rotation because it is convenient mathematically (it makes the separation of translation and rotational energy easier). We could choose any other point (inside, outside the object, in motion or at rest relative to the object) and calculate the rotation about that arbitrary point. It is not a physical fact that the free object rotates about the center of mass. Even an object that is constrained to rotate about a fixed axis, we could describe the rotation about any point, not necessarily points on the fixed, constrained axis.


Now, if $F$ is a field, I can prove easily that $F(x)\subseteq F((x))$ but I'm having problems to show this is a proper inclusion.   If for example $F=\Bbb R$ or $\Bbb C$, I can take a well-known function, say $\cos x$ and use its power series to show proper inclusing, because if   $$\left(F((x))\ni\right)\;\cos x=1-\frac{x^2}2+\frac{x^4}{24}-\cdots=\frac{f(x)}{g(x)}\in F(x)$$  then, since $f(x),g(x)\in F[x]$ (polynomials), we'd get that $\cos x$ has a finite number of zeros, which is absurd, and thus $\cos x\in F((x))\setminus F(x)$.  My problem now is: what to do if the field $F$ is not one of the usual, infinite ones? For example, if $F$ has positive characteristic?  Any input will be duly appreciated.

I would like to show that if $R$ is a field, then $R(x)$ is a proper subset of $R((x))$, where $R(x)$ is the ring of rational functions, and $R((x))$ is the ring of formal Laurent series.   If $f \in R(x)$, then $f(x) = f_1(x)f_2^{-1}(x)$, where $f_1(x), f_2(x) \in R[x]$. So I wrote this as $$f(x) = \frac{\sum_{i=0}^{n}a_ix^i}{\sum_{j=0}^{m}b_jx^j}\;,$$ and I would like to show that I can write $f$ in the form $\sum_{k=r}^{\infty}c_kx^k$. However, I am unsure how to manipulate $f$ in order to show this. What I was thinking was to find some formal power series expansion for $f_2^{-1}(x)$, multiply out the summation with $f_1(x)$, then rearrange the coefficients and terms to obtain the desired form. However, I can't seem to derive a formula for the inverse of a polynomial in general that I could use for this. How can I go about manipulating $f_2^{-1}(x)$ to show this? Any suggestions?  Thanks!


I am trying to understand a derivation of the formula $PV^n = \text{constant}$ as given to me by my uni teacher.  Knowing that heat capacity $C = dQ/dT \implies dQ = CdT$  and the first law of thermodynamics stated as $dQ = dU + dW = dU + pdV$  we get  $$ CdT = dU + pdV $$  I more or less understand until this point. But then, my notes go:  $$ CdT = \left(\frac{dU}{dT}\right)_V dT + \left[ \left(\frac{dU}{dV}\right)_T + P \right] dV $$  (the subscripts indicate constant volume or temperature)  I can’t wrap my head around this. Going back from the equation above I get  $$ cdT = dU + dU + pdV \neq dU + pdV $$  (symbolically simplifying by $dT$ and $dV$)    Actually this is not for me but somebody else I am helping. My understanding of thermodynamics is practically zero, so I can only help with the algebra given all the formulae and equations. It is also a little strange to me that we mix the concept derivatives such as $dU/dT$ (which, AFAIK is to be interpreted as the limit of this as $dT$ approaches $0$) and ‘simple’ fractions. I am sure these transformations can be justified somehow, though.  Does the answer have to do with $dU$ being an extremely small number and the fact that a difference of $dU$ is negligible? This seems wrong though, I get the feeling that here we are supposed to treat all $d$-values as any other variable.

I know that a polytropic process equation is often the result of an empirical fit of a P-V curve that allows one to derive some nice analytical equations for the process.  Is there actually a derivation for the polytropic process equation?


This works fine:  sed -i 's#    @driver.find_element(:xpath, "//a\[contains(@href,##' temp_spec.rb   against a source of  @driver.find_element(:xpath, "//a[contains(@href,'change_district')]").click   I am just left with:  'change_district')]").click`   but when I try to add a single quote at the end it fails:  sed -i 's#    @driver.find_element(:xpath, "//a\[contains(@href,\'##' temp_spec.rb  syntax error near unexpected token `('   I am using \' to escape the single quote.  Note that I am using a # as a delimiter instead of the normal / delimiter as there are /'s in the text.

I'm having trouble with escaping characters in bash. I'd like to escape single and double quotes while running a command under a different user. For the purposes of this question let's say I want to echo the following on the screen:  'single quote phrase' "double quote phrase"   How can I escape all the special chars, if I also need to switch to a different user:  sudo su USER -c "echo \"'single quote phrase' \"double quote phrase\"\""   Of course, this doesn't produce the right result.


I have a desktop with no battery power with a very simple surge protector.  I am running Ubuntu 64-bit 12.04. Apt-get needed a restart of my computer to finish installing the latest updates I had downloaded. Before I was able to do that, the power went out.  Now when I boot up, all I see is a black screen after I select Ubuntu in the grub menu.  I am able to get to the recovery options from the grub screen. I tried loading the failsafex version but that also failed.  I have never posted anything to a forum before but I have to get this working ASAP because of a work project due for a client.  I'll be up all night until I can get this fixed.  Thanks for any and all help.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


When a public function accepts a float value, and this value is to be kept within a specific range, I usually do:  void setParameter(float p) {   if (p < 0) p = 0;   if (p > 1.f) p = 1.f;   // ...do something with 'p' }   Is there a better, faster, more elegant way to keep a float value in range?

Is there a more efficient way to clamp real numbers than using if statements or ternary operators? I want to do this both for doubles and for a 32-bit fixpoint implementation (16.16). I'm not asking for code that can handle both cases; they will be handled in separate functions.  Obviously, I can do something like:  double clampedA; double a = calculate(); clampedA = a > MY_MAX ? MY_MAX : a; clampedA = a < MY_MIN ? MY_MIN : a;   or  double a = calculate(); double clampedA = a; if(clampedA > MY_MAX)     clampedA = MY_MAX; else if(clampedA < MY_MIN)     clampedA = MY_MIN;   The fixpoint version would use functions/macros for comparisons.  This is done in a performance-critical part of the code, so I'm looking for an as efficient way to do it as possible (which I suspect would involve bit-manipulation)   EDIT: It has to be standard/portable C, platform-specific functionality is not of any interest here. Also, MY_MIN and MY_MAX are the same type as the value I want clamped (doubles in the examples above).


I was thinking about the unit of measure of the Energy (as well as Heat and Work) which is Joule  $$\text{J} = \frac{\text{kg}\cdot \text{m}^2}{\text{s}^2} = \text{N}\cdot \text{m}$$  But again, watching the very last expression I realized that that is the same unit of measure of a vector quantity, namely the Torque or the Moment of Force.  How is that possibile, since the Joule represents a scalar quantity?  Isn't it a bit ambiguous?

Recently, I was doing my homework and I found out that Torque can be calculated using $\tau = rF$. This means the units of torque are Newton meters. Work & Energy are also measured in Newton meters which are Joules.  However, torque isn't a measure of energy. I am really confused as why it isn't measured in Joules.


There is some space missing between the table columns which looks especially weird if most of the values are four digit values. This just looks wrong without spacing. A bit of column spacing would be great there. An empty row after the actual stats would also be an improvement.

At least for successful beta sites, the new design seems to result in a lack of whitespace between the numbers and what the numbers represent.  Because a picture is worth a thousand words, even though this particular example comes straight off the presses at :


If you look at the  section of Stack Overflow, and search for a username that is used often, like 'Someone', you will see many people with the same username. However, this raises confusion on who really did something on the network. It is easy to confuse one user with another if they have the same name and same low-reputation level. So can users be prevented from signing up when they supply a username that is taken, and can they be asked to think of a new username? I want something like this:

What is the reasoning behind the design decision to allow users to create a display name which matches another existing users exactly?    This is opposed to the common practice of enforcing unique user names, and I'd really like to learn something.


My vim snippet appear <++> every time i i use tab. I want to use tab completion, yet the <++> doesn't make any sense.  For instance, /title{<++>}. Is there a mapping feature in vim snippet i didn't know? or quick shortcut that i miss.

I have a LaTeX editing environment that does some assistive stuff such as auto-indenting, closing parentheses, etc.  However, one of the things that it does is unknown to me, and is difficult to search for. If I type an empty set of braces, it replaces them with  {}<++>   If I type two empty sets, for example when I'm setting up a fraction \frac{}{} what I actually get is  \frac\left\{ } \right\}<++>}<++>   Is this a problem? What does <++> do?  Edit: This is using


Let's say I'm working in the Python shell and I'm given a function f. How can I access the string containing its source code? (From the shell, not by manually opening the code file.)  I want this to work even for lambda functions defined inside other functions.

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


I would like to redirect my root domain to another site, but leave the subdomains in tact.  so redirect mydomain.com to mydomain.com/directory, but leave alone subdomain.mydomain.com.   Will this work? or will it also redirect subdomains.  RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteRule ^(.*)$ $1 [R=301,L]

I want to redirect only my root to another url, but maintain all the /sub/directories where they belong (and redirect)  example:  mysite.com/1 redirects to somewhere mysite.com/admin opens a page  i want mysite.com/ to redirect to mysecondsite.com and only this with a 301 redirect using htaccess


It is my understanding that the Children of the Forest first created the White Walkers in order to protect themselves from the First Men. However, something must have happened that then the Children of the Forest and the First Men teamed up to defeat, or at least repel, the White Walkers. What is that something? Or am I misinterpreting the show?

After viewing episode 5 of season 6 of Game of Thrones, we have come to know that      the Children of the Forest created the White Walkers.   But it seems that the White Walkers attack the Children of Forest. My question is why they would do so, given their origin.


Here is the query I have  select sender, count(*) as Total, date_format(senttime, '%m - %Y - %d') as Sent_Date  from sendmail sm  left join subuser su     on (sm.sender = su.sub_user)  where senttime <= NOW()    AND senttime >= DATE_SUB(senttime, INTERVAL 7 DAY)  group by date_format(senttime, '%d'), sender   Here is the actual output    It is showing only two dates 21 and 22 but I need 7 dates with total count 0.  How can I do this.

I'm building a quick csv from a mysql table with a query like:  select DATE(date),count(date) from table group by DATE(date) order by date asc;   and just dumping them to a file in perl over a:  while(my($date,$sum) = $sth->fetchrow) {     print CSV "$date,$sum\n" }   There are date gaps in the data, though:  | 2008-08-05 |           4 |  | 2008-08-07 |          23 |    I would like to pad the data to fill in the missing days with zero-count entries to end up with:  | 2008-08-05 |           4 |  | 2008-08-06 |           0 |  | 2008-08-07 |          23 |    I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.   Any genius ideas/slaps in the face for why me am being so dumb?    I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons:   I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed   The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers!


This code is supposed to get a letter input from the user and then assign a value to the letter based on how many points it's worth. This is my first part working in Java, and for some reason I can't get the if statement to assign the variable anything.  import java.util.Scanner;  public class LetterValues {  public static void main(String args[]){      Scanner scanner = new Scanner(System.in);     String letterInput1, letterInput2, letterInput3, letterInput4;     int firstLetter = 0, secondLetter = 0, thirdLetter = 0, fourthLetter = 0;      // Asks for first input letter     System.out.print("What is your first letter?  ");      // Reads the first input letter     letterInput1 = scanner.next();      // Converts the first letter to upper case, prints out to check     System.out.println(letterInput1.toUpperCase());      // Prints out first letter to check     System.out.println(letterInput1);      // Assigns a value to the firstLetter int based on the value of letterInput1     if ( (letterInput1 == "A") || (letterInput1 == "E") )     {         firstLetter = 1;     }     else if ( (letterInput1 == "D") || (letterInput1 == "R") )     {         firstLetter = 2;     }     else if ( (letterInput1 == "B") || (letterInput1 == "M") )     {         firstLetter = 3;     }     else if ( (letterInput1 == "V") || (letterInput1 == "Y") )     {         firstLetter = 4;     }     else if ( (letterInput1 == "J") || (letterInput1 == "X") )     {         firstLetter = 8;     }     else     {         System.out.println("Error.");     }      System.out.println(firstLetter);     } }   The result is:      What is your first letter?  A //<--input     A     A     Error.     0     What is your second letter?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm trying to programatically trigger the onchange event of an input that has the source below :  <input class="_2hvTZ pexuQ zyHYP" id="f1d5fcd30110a5c" aria-label="Phone number, username, or email" aria-required="true" autocapitalize="off" autocorrect="off" maxlength="75" name="username" type="text" value="">   I can see on devtools this input has a change listener attached, as you can see on the image at the end of the question. What i'm trying to do is call this event programatically, using the code below :  document.getElementById('f1d5fcd30110a5c').onchange();   But i get the error :  VM834:1 Uncaught TypeError: document.getElementById(...).onchange is not a function   How can i trig the attached event listener programatically using JS ?

How do I programmatically force an onchange event on an input?  I've tried something like this:  var code = ele.getAttribute('onchange'); eval(code);   But my end goal is to fire any listener functions, and that doesn't seem to work.  Neither does just updating the 'value' attribute.


List<String> solList = new ArrayList<String>( ); solList.add( "num1" ); solList.add( "num2" );  StringBuilder result = new StringBuilder(); for ( String a : solList ) { result.append( a ).append( ", " ); }  String withoutLastComma = result.substring( 0, result.length( ) - ",  ".length( ) ); System.err.println( withoutLastComma );   I want remove last comma,I use substring,how can I become  better this code?   use string utility methods such as "StringUtil.join" to concatenate elements in an array or a collection object. Consult the "StringUtil API's StringUtil.join" entry.  For example:   StringUtils.join(["e", "f", "g"], "--")  // => "e--f--g

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


Is there any key kombination or terminal code that turns the display off? It should work like when you lock the screen: As soon as you move the mouse the display should turn on again (without the need of doing a login).

Is there a way to turn off the display (enter power saving mode) using a command?  For example, when the computer is inactive for a specific interval, the screen turns off to conserve energy. Is there a way to manually turn off the screen, yet keep the computer running normally?  This is a notebook, so there's no 'power-off' button on the monitor itself.


Looking at my dmesg output I see (among others) the following in red:  [   11.880554] kvm: disabled by bios [   11.911578] kvm: disabled by bios   … and a little further down:  [ 4816.264697] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun [ 4816.266824] [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A [ 4816.266844] [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun   Should I be worried / take any action with regards to the above messages? The computer is a refurbished Lenovo T420 I just bought.

I have recently noticed these errors on startup (they occur every startup):  Jun 29 08:07:09 MATRIX kernel: [   10.773473] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun Jun 29 08:07:09 MATRIX kernel: [   10.773876] [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A Jun 29 08:07:09 MATRIX kernel: [   10.773895] [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun   What do they mean and what should I do about them?    OS Information:  Description:    Ubuntu 15.04 Release:    15.04


I'm just so new to blender I can't even figure out why this is happening. (picture)

I follow this  which uses rigify and I have run into some issues.    Not every vertex moves along the rig. Any idea what could cause this? I applied the location and rotation for every object.  The entire head is weight painted with blue.


Lets consider some natural number x in binary. Let the least significant digit represent the inclusion or exclusion of 0, the next least significant represent 1, and so on upwards. For some examples:    $0$ ; $0_2$ ; {} $7$ ;  $111_2$ ; {0, 1, 2} $8$ ; $1000_2$ ; {3} $14$ ; $1110_2$ ; {1, 2, 3}    By cantors diagonalization argument I know that this can't be a bijection between the natural numbers and their powerset, but I'm having trouble proving that it's not. Can I prove that this is not a bijection without just quoting the cardinality of the sets (and preferably with a counterexample)?

In my understanding of Cantor's diagonal argument, we start by representing each of a set of real numbers as an infinite bit string.  My question is: why can't we begin by representing each natural number as an infinite bit string? So that 0 = 00000000000..., 9 = 1001000000..., 255 = 111111110000000...., and so on.  If we could, then the diagonal argument would imply that there is a natural number not in the natural numbers, which is a contradiction.


I am trying to upsert a dynamic list of objects into Salesforce using Apex, before point of upsert I have casted a new list to explicitly describe which object this is but I still receive the following error:     DML on generic List only allowed for insert, update or delete   Code:      String objectName = 'Account'; // this will be dyanmic      // parse lines     String csvToParse = attachment.Body.toString();      List<sObject> dynList = CSVReader.readCSVFile(csvToParse, objectName);      List<SObject> toUpsert = (List<SObject>)Type.ForName('List<' + objectName  + '>').newInstance();     toUpsert = dynList;      // upsert records     SObjectField extField = Account.Fields.ExtID__c;     Database.UpsertResult[] up = Database.upsert(toUpsert, extField);

The upsert() DML operation requires a specific List based on a specific sObject type, for instance:List<Account> lstAccount = new List<Account>();   However, we are trying to generate a generic method which allows us to pass by an sObject list containing all data records to be upserted for a specific sObject. An insert() operation allows us to use a List<sObject> to be inserted but the upsert() function is rejecting it:  List<sObject> listWRecords = new List<sObject>(); listWRecords.add(new Foo__c(Name="Record1")); listWRecords.add(new Foo__c(Name="Record2"));  upsert(listWRecords, 'ExternalIdFieldFrom_Foo__c', false);   Which will result in an error saying that the upsert must be performed on a concrete entity type.   Dynamically casting an sObject list is also not possible; I've seen solutions to 'hard code' or create Wrapper classes for each sObject on your org. But we would like to create a generic option here.  Another possibility would be to create some logic mimicking an upsert by splitting it into an update() and an insert() operation. Keeping in mind Salesforce limits, I do not see an option to go this way.


People need to argue the validity of whether or not the network is breaking the law and if this ok and what should be done about it. Discussion about my intentions, motivations or personality are off topic for the purposes of this discussion.    This question is the next step from this:    and in a similar spirit of this:      As mentioned in this , taken from :  Any argument defending the Stack Overflow company that the moderator volunteers served for possible education reasons, would be countered by the fact people profited from the site.  It would seem that  under the laws of New York, where the company resides, utilising a volunteer or unpaid workforce is contravening the law. It seems moderators should be paid a minimum wage.  Should the people who have worked on the site as moderators form some type of union and take action against the site seeking remuneration?  What are people's thoughts and what should our next steps be?  in response to comments: It's not a burn the house down sentiment at all.     It's a simple case of finding out if the business is breaking the law and that if they are, this needs to be rectified. If they are breaking labour laws, this is not ok. It's not a matter of opinion, it's a matter of the law.    TL DR  If the company is breaking the law, they shouldn't be breaking the law. It's that simple.

Is Stack Exchange in violation of New York labor law, in using volunteer moderators? I found a  document, which states:  Q: Can for-profit and non-profitmaking institutions have unpaid volunteers? A: By definition, the term volunteer means a person who works for a non-profitmaking institution under no contract of hire…and with no promise of compensation, other than reimbursement for expenses as part of the conditions of work. A person may do volunteer work in a non-profit organization, if that organization is set up and operates strictly for charitable, educational or religious purposes. For-profit organizations may not use unpaid volunteers (who meet certain criteria) except for a short term recreational or amusement event run by that organization.  Am I drawing the correct conclusion, that actually a for-profit organization, such as Stack Exchange, is not permitted, under New York State labor law, to use volunteer labor for moderation tasks?  Related: