my error is:   Exception in thread "main" java.lang.NullPointerException     at ClienteDB.incluir(ClienteDB.java:30)     at ClienteInterface.main(ClienteInterface.java:16)   I just checked some other questions, but didn't found why this is happening. Usually people say that have some variable with value null. In a first moment, the variable will be null, but i didn't do the assignment with null.  Line 30 is: c[npp].setCpf(ccpf); That is one method of my program, but the only one that is not working.  Thanks in advance for the help!  import javax.swing.JOptionPane;  public class ClienteDB { Cliente c[]= new Cliente[11];  public void incluir() {     int flag = 0;     String np = JOptionPane             .showInputDialog("Entre a posição que você deseja incluir um usuário (1 a 10):");     int npp = Integer.parseInt(np);     if (c[npp] != null) {         JOptionPane.showMessageDialog(null,                 "Já possui um cliente neste campo.");     } else {         String ccpf = JOptionPane.showInputDialog("Qual o cpf do cliente "                 + npp + "?");         for (int np2 = 1; np2 < 11; np2++) {             if ((c[np2] != null) && (c[np2].getCpf().equals(ccpf))) {                 JOptionPane.showMessageDialog(null,                         "Existe um usuário com este CPF.\n");                 flag = 1;                 break;             } else {                 c[npp].setCpf(ccpf);                 break;             }         }         if (flag != 1) {             String cnome = JOptionPane                     .showInputDialog("Qual o nome do cliente " + npp + "?");             c[npp].setNome(cnome);             String cend = JOptionPane                     .showInputDialog("Qual o endereço do cliente " + npp                             + "?");             c[npp].setEndereco(cend);             String ctel = JOptionPane                     .showInputDialog("Qual o telefone do cliente " + npp                             + "?");             c[npp].setTelefone(ctel);         }     } }   Thats my main:      import javax.swing.JOptionPane;  public class ClienteInterface { public static void main (String args[]) {   ClienteDB cc = new ClienteDB();     int funcao;     do{         String fc=JOptionPane.showInputDialog("Bem vindo!\nQual função você deseja?\n1-Incluir Cliente\n2-Consultar Cliente\n3-Alterar Cliente\n4-Excluir Cliente\n5-Listar clientes\n9-Fim");         funcao=Integer.parseInt(fc);       switch (funcao)      {         case 1:         cc.incluir();         break;          case 2:         cc.consultar();         break;          case 3:         cc.alterar();         break;          case 4:         cc.excluir();         break;          case 5:         cc.listar();         break;          case 9:         break;      }                     }while (funcao!=9); }   }

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?


Without using a calculator, given that $\pi \approx 3.14159$, compare:  FIRST VALUE: $\tan(1)$ [the angle is in radians].  SECOND VALUE: $\frac{\pi}{2}$  Options:  (A) FIRST VALUE is greater than the SECOND VALUE  (B) FIRST VALUE is less than the SECOND VALUE  (C) FIRST VALUE is equal to the SECOND VALUE  (D) The two quantities cannot be compared with the given information.  My thinking:  Expanding  $\tan(x)=x+\frac{1}{3}x^3+\frac{2}{15}x^5+\frac{17}{315}x^7+\dots$  Putting $x=1$, we get $\tan(1)=1+\frac{1}{3}+\frac{2}{15}+\frac{17}{315}+\dots$  So $\tan(1)=1.52063+$ other positive terms  But $\frac{\pi}{2} \approx 1.57\dots$  However, we do not know if that "+ other positive terms" will make it greater than $1.57\dots$ or no.  How can we be sure?  Is there a better way?  Any help will be appreciated. THANKS!

Do you see any nice way to prove that $$\arctan\frac{\pi}{2}\ge1 ?$$  Thanks!  Sis.


As an absolute beginner I am just figuring things out. I was working on a project, which I rendered, but there is no output file in my output folder.  The Render Scene And Options:    My Project In Rendered View:

I usually am able to render successfully to the c:\tmp folder, but when I came into work today, I rendered out the image on my work laptop, and everything seems to work, but I'm not getting an output to the tmp directory.  Does anyone know how to make this work?


I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Suggestion of how to do it, please.     Suppose $\{a_n\}$ is a succession in $\mathbb R  ^+$ such that  $\sum a_n$ diverges, and if  $s_n = \sum\limits_{k=1}^n{a_k}$.   show that $\frac {a_{N+1}}{s_{N+1}} +...+\frac {a_{N+k}}{s_{N+k}}\geq 1 -\frac {s_{N}}{s_{N+k}} $   and infer that $\sum\limits_{n=1}^\infty{\frac{a_n}{s_n}}$ diverge.    Please.thank

So I've been trying to figure out how to prove the following.     Let $(a_n)$ be a sequence of positive numbers such that $\sum\limits_{n=1}^\infty a_n =\infty$, and define $s_n=\sum\limits_{i=1}^n a_i$. Then $\sum\limits_{n=1}^\infty\frac{a_n}{s_n} =\infty$ as well.   I can prove it by comparing it to $\int_1^\infty \frac{1}{x} \, dx $ if the sequence $a_n$ is bounded by some $M$, but that's as far as I've been able to get.


I'm new to Linux and wondered where I can get useful info so started here. 1st off can I use the same PICTURES, VIDEOS, MUSIC & DOCS already on hard drive. I remember a window appearing during Linux installation saying it would require about 300gb for this, I clicked on OK but don't know how to get to them to appear.  Since this my hard drive has gone down by 300 odd gb?

I have Ubuntu 12.04 installed on my HP G62-453 TU Laptop. I cannot access the contents of my hard disk partition E.


I have two systems: Ubuntu and Windows 8.1. When I change the system from Windows to Ubuntu I have no problem with system time but when I change the system from Ubuntu to Windows the time is always increased for 3 hours. What is my problem? Thanks  Also, in Ubuntu it looks:    And in the additional panel:    But as result we can see ("Rainy River") on the left top:

Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.


Is there a fancy name for the "left side" and "right side" of a decimal number?    (That is, the pre-decimal part and the post-decimal part.)

Sorry for asking such a basic question - but is there an actual term for the numbers that appear before and after the decimal point?  Example:  25.18  I know the 1 is in the tenths position, the 8 is in the hundredths position. are there singular terms which apply to all of the numbers that appear both before and after the decimal point?  I'm building a billing system, storing dollars and cents as integers (in separate columns), but for other currencies "dollars" and "cents" are not the correct terms = ).  Thanks!


There’s a Funky Frankenstein tape so I’m assuming anything else that was in that package is here.   why the progressive here, first reason is that it is happening right now but does the progressive imply that it is only a strong possibility not 100 per cent sure instead of "I assume" which is stronger more as a fact  my question is different because only one person is invoved, the writer and he is not starting  doing  something

A: "I assume you know how this works."   B: "I am assuming you know how this works."   So if you expect someone to know how to use a certain machine for instance could you say either of the too? I cant make out a difference in meaning so if there is none which would be the preferred choice for most speakers?


I'm using the MMQGis plugin to "Join Attributes From CSV" into a shapefile and am having trouble getting QGIS to interpret some numbers as numbers (rather than strings which is what its doing).  This is becoming a real problem because the values do not behave like they should when trying to order them, select above a range, etc.  I've seen two somewhat similar questions to this but the answer to  instructs the user to import the CSV as a layer. But the CSV data I'm trying to import is not geocoded and I'm using values (things like zip code, etc) to join in the CSVs, so I don't think that question's answers might help here.

I read in a CSV file for linking to a .shp file.   All the variables that are just numbers came in as text.   How do I change the text variables to numeric in QGIS?


It is more common to write: "People care too much about their appearance." This is because it is being used as a "non count" noun and the plural could confuse people into thinking the writer means the occasion when someone is in a play, movie, etc.  So with our would you still use singular?  Note that these dictionaries note it as being singular or plural (appearance as looks):    Anyone shed light?

People care way too much about their appearance/ appearances?   Google provides much more evidence for the singular but I have learnt not to trust it. In a formal essay I would opt for the plural since people do not share the one appearance, but I would like some clarification with this if possible.   The older question  is different from mine because the plural form has no other meaning. Whereas the word appearances, the plural can mean physical appearances as it can multiple looks.  Furthermore, it would be incorrect to use the sentence "people love their life" as it implies they share one. Yet lives has two meanings as well. Why is the plural correct in that context? So I was hoping for an explanation on this.


Ever since I upgraded to 19.10, when I close the lid the laptop doesn't suspend anymore. It doesn't even lock the screen. It almost seems like the OS isn't picking up the close lid event. If I press the power button suspend works fine and resumes when I open the lid afterwards.  I have the 'suspend when lid is closed' option enabled in GNOME Tweaks.  Any idea on how to fix/debug this issue? I have a Dell XPS 15 9560.

I'm quite positive that this used to work flawlessly in 19.04 (and past releases) but no longer does after a release-upgrade to 19.10 (kernel 5.3.0-24, ThinkPad X1 Carbon gen 5 in case this matters).  I have the corresponding switch set in GNOME-Tweaks and have also attempted to manually edit /etc/systemd/logind.conf as suggested , namely uncomment and adjust the following lines, followed by a reboot:  $ grep -v '^#' /etc/systemd/logind.conf [Login] HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend LidSwitchIgnoreInhibited=yes   (strictly speaking, only the first one ought to be required but, just in case, I also added lines 2 & 3, as well as #4 for good measure...  Looking at the output of systemctl status systemd-logind, I see the following:  Dec 17 17:56:50 x1c5 systemd-logind[8959]: Lid closed. Dec 17 17:57:03 x1c5 systemd-logind[8959]: Lid opened.   So the lid events are correctly detected.  To rule out any issue with the suspend process itself, I have also set my power button to suspend in Settings->Power->Suspend & Power Button, for testing purposes.  Pressing the power button now results in this in the output of systemctl status systemd-logind (after a successful suspend-resume cycle):  Dec 17 18:13:58 x1c5 systemd-logind[8959]: Power key pressed. Dec 17 18:14:28 x1c5 systemd-logind[8959]: Delay lock is active (UID 121/gdm, PID 9215/gsd-power) but inhibitor timeout is reached. Dec 17 18:14:39 x1c5 systemd-logind[8959]: Operation 'sleep' finished.   Bottom line: lid events are detected correctly and suspend works flawlessly - but not on lid close...  Any idea how I can get the suspend on lid-close feature back to life?  I can of course use the workaround with the power button but it's a little too easy to forget and result in laptop overheating in bag etc...  --- edited to add ---  Got a little further courtesy of , although the issue isn't the exactly as described.  Here's a smoking gun:  $ systemd-inhibit --list --mode=block WHO       UID  USER      PID  COMM           WHAT                                                     WHY                                                         MODE  gdm       121  gdm       2231 gsd-power      handle-lid-switch                                        External monitor attached or configuration changed recently block gdm       121  gdm       2252 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block user      1000 user      3017 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block   This suggests that the lid close action is being blocked because "External monitor attached or configuration changed recently".  I do connect my laptop to a monitor using a USB-C cable but as I write this, it's been undocked and running on batteries for nearly 3 hours (GNOME settings only shows my laptop display as available).  However it looks like systemd or whichever component is responsible for this still incorrectly believes the external display is attached and - per the ticket - suspend isn't supported by GNOME in such scenarios...  Interestingly the gsd-power process (PID 2231) is owned by gdm rather than my UID.  Killing it restores the suspend-on-lid-close functionality.  Need to figure out why this process exists... When actually connected to external display, systemd-inhibit --list --mode=block reports a 2nd gsd-power process owned by the interactive user; which appears correct and sufficient.


I've been trying to get a similar look as the photos in this image with the different color effects. I've tried messing with different blending options and even tried different gradient maps. However, I can't seem to get it quite right. Does anyone know what I'll need to do to achieve this one color effect for each photo?

I have seen such an effect being used in many places however I haven't figured out how to replicate it via Photoshop.  I have tried desaturating the image, placing it under a layer of solid colour and then lowering the opacity of the colour. I have also tried a couple of blend modes, to no avail. The effect is nowhere near the same.  Can someone please tell me the effect used on these images?


For a project requirement I am trying to resize the memory partition on userdata (/data filesystem) to create a new file system. I am using parted on the device. When I tried to use resize command in parted mode for /data memory block, I am unable to do so because it is used by default in the device.  Error obtained : Error: Partition /dev/block/mmcblk0p4 is being used. You must unmount it before you modify it with Parted.  As this is /data folder I am unable to unmount it. When I tried to unmount I am getting following error.  umount /data failed: Device or resource busy  I tried killing all the processes using this folder using lsof command. However, this contains all apps data so killing all those processes reboots device.  Can somebody help me ways to resize these partition? I need commands only through adb as I am trying to create an automatic script for this.

How can I repartition my device such that the storage for device internal usage (i.e application storage or internal memory) can be increased in lieu of decreasing the User available memory.  Currently, I have:   Internal memory = 740 MB User Available Space = 2.0 GB   How can I repartition to move some Phone Storage/User Available Space to Internal Memory?  I have an External SD card for Media Storage. So, I don't require 2 GB in the phone storage.


I have some questions about these words:   What's different between these two words? Which word will be correct for use? Which word doesn't use now?

I have trouble understanding why some words change "s"-es to "z"-s from BE to AE and some not. For example:   analyse -> analyze characterise -> characterize hypnotise -> hypnotize   But:   compromise -> compromise   Is there any rule to this?  Slightly related:


I still struggle to understand exactly when to use hyphens when adverbs are involved.  Which of the following is correct? ABC is an acronym representing the actual name of the survey.  "I use results from the currently running ABC survey."  "I use results from the currently-running ABC survey."

My natural instinct is to hyphenate expressions such as "currently-available", "currently-implemented", etc., when they modify a noun.  Example: "the currently-available version of X". It seems to me that the words function as a compound adjective, and I was taught to hyphenate compound adjectives that occur before a noun.  However, to my surprise, I find this expression often left unhyphenated.  Now I'm confused.  Is it considered appropriate or inappropriate to hyphenate the words in this situation?  EDIT: I only now noticed this is essentially a duplicate of this , which is apparently itself a duplicate of others. My apologies.


I have read conflicting information and can't seem to find the right number online to call.  I am a UK citizen visiting the US on an ESTA due to expire on 2nd April. I would like to stay until the 12th as I have a friend coming out to visit.  If I fly to the Bahamas, Abaco Islands for 4 nights say on the 31st March to return to Florida around the 2nd April will that reset my ESTA and allow me to stay essentially for another 90 days although I actually only want another 9?

I've read a few questions/responses on this but seem to be reading conflicting information  I've tried to find a number for immigration at Fort Lauderdale but don't appear to be able to call  My status is this I am a British citizen here on an esta which expires 1st April   I have a friend arriving for 2weeks 31 March and I would like to stay and spend time with her for 2 weeks   My intention was to fly to the abaco islands of the Bahamas for 3/4 nights then return to Florida and fly back to England with them on the 12th April   Hoping that my visit to the Bahamas would reset my 90 days even though il only be staying another week in the states before returning to my place of residence in the UK   Is this false hope/information tahrs going to get me in bother ? Would really appreciate some advice ?  Melanie


I'm having trouble in solving this problem; here is my attempt: If $\sigma\in S_{n}$ ($S_{n}$ is the symmetric group) has order $200$, then, there exists $\sigma_{1},...,\sigma_{r}$ disjoint cycles with respective lengths of $l_{1},...,l_{r}\in\mathbb{N}$ such that $\sigma=\sigma_{1}...\sigma_{r}$ and $lcm(l_{1}...l_{r})=200$. As $200=2^{3}\cdot 5^{2}$, there must exist $i,j\in\{1,...,r\}$ (equal or different) such that $l_{i}$ is a multiple of $2^{3}$ and $l_{j}$ is a multiple of $5^{2}$. So, my aim will be to find the less $n$ where I can find that this last condition stands...and... after this disconnected ideas, I am quite lost. I would appreciate so much some guidance on this question... Thank you so much in advance!

I am trying to find the smallest positive integer $n$ such that $S_n$ contains an element of order 60. I know that every permutation in $S_n$ can be expressed as the product of disjoint cycles, and I also know that the order of a permutation is the least common multiple of the lengths of the cycles in its disjoint cycle product.   So, suppose $\sigma \in S_n$ such that $|\sigma|=60$. Then $60=lcm \left\{|c_1|, \ldots , |c_m|  \right\}$, where $c_i$ is one of the cycles in the disjoint cycle product of $\sigma$. The prime factorization of 60 is $2^2\cdot 3 \cdot 5$, but the least common multiple of 2, 3, and 5 is 30, so that doesn't help. However, the least common multiple of 3, 4, and 5 is 60. I just don't know where to go from here.  Also, what is meant by a "disjoint cycle pattern"? Thanks for your help!!


Let $a > 2$ and $n ≥ 1$ be any integers. Prove that $a − 1 ∣ a^n − 1$.  Is this a problem involving induction or on using mods? I  thought it was induction but would I need to have two base cases, ($a=3$ and $n=1$). If I do, how would I proceed with more than one base case? Or is it not related to induction at all and there is some other way?  Any help would be highly appreciated!

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


I'm just trying to get some practice with implementing some Machine Learning algorithms with a variety of data. I'm just getting started so I'm pretty new to the whole process and would appreciate any guidance in this task.   I've happened across a nice dataset of around 200 people who ranked the 9 main Star Wars titles from 1-9 in their order of preference. I was wondering if it would be sensible to try to cluster folk into groupings based on this data. I think I'm curious to see if there people whose preferences lead them to rank certain movies in the franchise closer together.   From my studies, I figure that a clustering algorithm might be the approach here. I've learned about K-means so far which seems to be appropriate for market segmentation problems which this seems vaguely analogous to. Do you think this is an appropriate approach for this problem? I'm also very open to learning about different approaches. Thank you for your time.

I have ~30 observations of individuals ranking 20 different products from top to bottom (1-20). I would like to have a way to "cluster" these individuals based on their rankings of the different products.  For example, I would like to cluster respondents with similar high rankings of the same products. This can be done looking at only the top 3 products ranked by each respondent, if that's simpler.  What would be an appropriate way to perform this analysis?


I want to ask a question about a solution presented  from @GonzaloMedina but I cannot comment.  I want to draw the same type of open end and closed rounded rectangular but I want also to draw ovals with the right side open and I cannot figure out how to modify it.    The code he proposes for open top/bottom ends and i want to modify is :   \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark}  \begin{document}  \[ \renewcommand\arraystretch{1.2} \text{Data}Q_2\begin{array}{c|c|c|c|c|c|}     \multicolumn{1}{c}{}      & \multicolumn{5}{c}{Q_1Q_0} \\     \cline{3-6}     \multicolumn{1}{c}{} & & 00 & 01 & 11 & 10 \\      \cline{2-6}     & 00 & \tikzmark{startup}X & 1 & 1 & 1\tikzmark{endup} \\     \cline{2-6}     & 01 & 0 & 1 & 1 & 0 \\     \cline{2-6}     & 11 & 1 & 1 & 1 & 1 \\     \cline{2-6}     & 10 & \tikzmark{startdown}X & 1 & 1 & 0\tikzmark{enddown} \\     \cline{2-6} \end{array} \]  \begin{tikzpicture}[remember picture,overlay] \draw[rounded corners,red,thick]   ([shift={(-0.5\tabcolsep,2ex)}]pic cs:startup) --    ++(0,-2.6ex) --    ([shift={(0.5\tabcolsep,-0.6ex)}]pic cs:endup) --   ++(0,2.6ex); \draw[rounded corners,red,thick]   ([shift={(-0.5\tabcolsep,-0.8ex)}]pic cs:startdown) --    ++(0,2.8ex) --    ([shift={(0.5\tabcolsep,2ex)}]pic cs:enddown) --   ++(0,-2.8ex); \end{tikzpicture}  \end{document}

How to draw circles around multiple row cells and column cells as shown in attached figures.  I am using Professional lay out tables... i.e. Tables in tabular environment, Table below    I am also attaching my table of interest here where I want to highlight as shown in picture  \documentclass{article} \usepackage{booktabs,multirow}  \begin{document} \centering \begin{tabular}{c c cc c } % centered columns (5 columns) \toprule &&\multicolumn{3}{c}{\textbf{J}}  \\       \cmidrule(l){2-5} &&\multicolumn{2}{c}{\textbf{$M_J=1$}}& $\textbf{$M_J=2$}$  \\       \cmidrule(l){2-4}  &\textbf{I} & $\textbf{J=1}$ &$\textbf{J=2}$ & \\         \bottomrule \multirow{2}{*}{\textbf{ $ M_I=1$ } }&I=1 &      $n_{1111}$   &   $n_{1211}$  &  $n_{1+11}$\\ &I=2 &      $n_{2111}$   &   $n_{2211}$  &  $n_{2+11}$\\  \textbf{ $ M_I=2$ } &  &       $n_{+121}$   &   $n_{+221}$  & $n_{++22}$\\ \bottomrule \end{tabular} \end{document}


I'm trying to create a form that verifies that an email address has been entered. Not necessarily check its validity but basically sakjfsfksldjf@email.com. I was wondering how to go about doing it in PURE JavaScript and no RegEx.       <!DOCTYPE html>      <html lang="en" xmlns="http://www.w3.org/1999/xhtml">     <head>         <meta charset="utf-8" />         <title>Test File</title>     </head>         <script>             function submitForms() {                 email_format = document.getElementById('email_input')       // want to return T or F                 if (email_format) {                     //print email successful                 }                 else {                    //print error message                 }                  </script>      <body>          <form>             Email:                         <input type ="email" id ="email_input" />         </form>          <button type = "button" onclick = "submitForms;"> Submit All!         </button>     </body>     </html>

Is there a regular expression to validate an email address in JavaScript?


Here's a question where the user obviously made a mistake when choosing tags:   I wanted to change the "etymology" tag to "entomology", but I can't validate my edit: "Edits should be at least 6 characters."  I fail to find the "edit tags" button indicated here:   I'm probably missing the correct way to do this.

I was trying to suggest a retag of  on Seasoned Advice, but the system won't let me; I get the familiar message     Edits must be at least 6 characters; is there something else to improve in this post?   In general, that's not true for retagging; if you don't change the question body at all, it should work. I suspect the logic checking the edit is thrown off guard because of the title warning:     The question you're asking appears subjective and is likely to be closed       I found , but I cannot find any evidence (in SEDE) for invisible characters being present in the question's source. Also, that's supposed to be .


I'm using Java. I would like ask the user to enter a number between 5 and 25. Lets say the user enter 6. The program then needs to print 6 random numbers. When the user enters 20, the program must print 20 random numbers between 5 and 25.

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


I need to know if the verb form should be singular or plural in such sentences.

I read the following sentence on YouTube and initially thought it was grammatically incorrect:     Here are 10 minutes of the movie Black Hawk Down!   I thought "are" should have been "is" but then I realized minutes is plural so the plural form, are, is used correctly. I also thought how most people would naturally say "Here is ten dollars in change" but is the use of the singular form, is, correct since dollars is plural?   Am I misunderstanding a rule?


I am having trouble replicating this command from CMD  set APPDATA=D:\.  The best equivalent I have is Set-Variable -Name $env:APPDATA -Value D:\. This does not work!  The full script is:  set APPDATA=D:\ start java -jar D:\.minecraft\minecraft.jar   This sets it so Java looks in D:\ for .minecraft instead of APPDATA.  The full PowerShell version (which doesn't work right) is:  & Set-Variable -Name $env:APPDATA -Value D:\ & 'C:\Program Files\Java\jre1.8.0_66\bin\java.exe' -jar D:\.minecraft\Minecraft.jar   It still looks at the read-only version of $env:APPDATA. I don't see why it can't be changed in the running environment for the shell's session, like cmd and most *nix shells!  I'm sure there are more uses for this than just running Minecraft. :P

I have found out that setting the PATH environment variable affects only the old command prompt. PowerShell seems to have different environment settings. How do I change the environment variables for PowerShell (v1)?  Note:  I want to make my changes permanent, so I don't have to set it every time I run PowerShell. Does PowerShell have a profile file? Something like Bash profile on Unix?


Someone said, group instances are rendered faster, so I've decided to replace actual bolt objects with group instances. Though, my model turned into a hairy mess, that I can't see through. Yes, it disappears, when you turn active "Only Render", but I need to work with it!

when I handle group objects, green pyramid disturb me. how can I hide these?


I want to attribute multimedia functions to F1-F12 keys on a desktop computer.  I know they have standard functions (like renaming a file with F2) but It would be way more useful If I could use F2-F3 to increase/lower the computer volume, and etc, pretty much notebook standard stuff.  Is there a user friendly, or not, way to do that?

My USB keyboard does not have "media" keys -- that is, dedicated keys for play, stop, next, prev, volume up/down, etcetera.    For the sake of this question, I would prefer not to install additional software if I can avoid it.  Is it possible to issue some standard key sequence on a generic USB keyboard that emulates these play, stop, etc. multimedia keys?  Like Ctrl+Alt+Shift+F12 or something obscure like that?


I’m an American. I had a brand new and valid bus pass, but received a “bus ticket” (fine) in Florence, because I didn’t realize I had to stamp my own bus pass at a machine.   My question is, because they force you to give up your passport number when cited, will they have any ability to go after me for the money, whether it is in the USA or If/when I enter another EU country?

My wife and I got bus fines today in Bologna. We had only recently arrived and had purchased a ticket from where we were staying which was about 6 or 7 km from the city. The hotel receptionist explained the ticketing system to us and said that if we buy a ticket we could use it on as many journeys for 75 minutes.  We took the bus from our hotel to Bologna and then straight away got on another bus to get to central Bologna where all the sights are. When we got on this other bus we assumed that it was ok as we were still within the 75 minutes. However, when we tried to validate our tickets in the machine it flashed red like an error had occurred so we figured something wasn't right.   We tried to ask the driver about it or if we could buy a ticket but he just grunted and started to drive off. We therefore started to leave the bus at the next stop so we could try and buy another ticket but were ushered back on by a few men who turned out to be ticket inspectors!  They alleged that our tickets were not valid in the city and that we had to pay a 65 euro fine. They wanted to see our official documentation and so took details from our UK driving licences and issued us both with fines. They wanted us to pay there and then, but we explained we didn't have enough cash on us to do so and they then stated we could pay by card.   However, I still wasn't happy about doing that so he then said that we could pay later by going to an Italian post office; or if we don't pay within a certain time the fine will go up to 270 euros each and will be posted to us (he got our addresses off our UK driving licences)!  I am a bit miffed about this as we were noway trying to evade and as soon as we realised our mistake we tried to talk to the bus driver to buy a ticket or get off the bus, but he drove off and ignored us! I have a slight suspicion that it was a rouse as it is very strange that he did this and then out of nowhere bus inspectors got on and made a beeline for us!  If we go back to the UK without paying these fines and ignore the subsequent fines that they send us through the post (if they do send any), then what happens? Do they have any powers when we are back in the UK? a total fine of 500 euros for an honest mistake seems utterly outrageous.   Fine below


I know I am supposed to prove this using contradiction, but I am not sure how to proceed.  Here's what I have thus far:  Assume that there exists a smallest rational number $x$ such that $x > 1$.  $X = \dfrac{a}{b}$ where $a$ and $b$ are integers.

How would I prove there is no smallest positive rational number? what is the best method to prove this statement?


Why would I need to do this, when it is mandatory for implementing class to define all methods of the interface? interface A{  void func1(); void func2();  }  class B implements A{  // must implement fucn1 and func2  }  // What is the point of this?  A a = B b;

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Here is a picture of how my combined flair looks at the moment I'm posting this:  As you can see, Area 51 is listed on my flair. The strange thing is that on Area 51, I currently only have 156 reputation (and have never had more), and only sites where I have 200 or more reputation are supposed to show up on the flair, as stated on the :  (please note that only sites where you have more than 200 reputation will appear, and that flair is only updated once every 24-36 hours.)  Is this a bug? Is it a feature specific to Area 51? Is there any other reason why it's like this? If this is a bug, please fix it and retag my question to . If it's intentional, please explain the exact conditions for which this happens and the reason behind it. Edit: Just to clarify, I'm not asking why sites where I have less than 200 reputation count in the total reputation displayed on the flair. I'm asking why the Area 51 icon is displayed on my flair.

I took a look at my profile, where I stuck my flair. Here's the flair:    However, I don't have 28k rep. According to chat, I have 19.7k.  Note: I know about the combined flair - I've had this in my profile for at least a year. It had been showing me the same as in chat, now it isn't.   What is going on here?  Edit: I'm reporting a bug here, that the combined flair is not showing the correct number, as it has in the past.


In Fraleigh's A first course in abstract algebra, for example problem,  Compute (Z4 * Z6) / <(0,2)>.  These are my process.  Let H=<(0,2)> = {(0,2), (0,4), (0,0)}  Then   (0,0)+H = H (1,0)+H = {(1,2),(1,4),(1,0)} (2,0)+H = {(2,2),(2,4),(2,0)} (3,0)+H = {(3,2),(3,4),(3,0)} (0,1)+H = {(0,3),(0,5),(0,1)} (0,3)+H = {(0,5),(0,1),(0,3)} (0,5)+H = {(0,1),(0,3),(0,5)}  So there cosets are (0,0) (1,0) (2,0) (3,0) (0,1)  So (Z4 * Z6) / <(0,2)> is isomorphic to Z4*Z2  But here's the statement is the books.  *Here the first factor of Z4 of Z4*Z6 is left alone. The Z6 factor, on the other hand is essentially collapsed by a subgroup of order 3, giving a factor group in the second factor of order 2 that must be isomorphic to Z2.*  I can’t understand this statement that what ‘collapsed’ mean in this statement though I read previous part. Also what ‘left alone’ means.  And are there any easy way to understand 'coset', 'factor group(quotient group)' ?

I am attempting to understand and compute: $(\mathbb{Z}_4 \times \mathbb{Z}_6)/\langle(0,2)\rangle$   I know $(0,2)$ generates $H = \{(0,0),(0,2),(0,4)\}$, which has  order 3 because there are 3 elements. Now, I must find all the cosets  which there should be 8. The reason there should be 8 is because $4\cdot 6/3 = 8$.  This is where I run into the issue. I have a hard time generating the cosets, but furthermore, once I actually do get the cosets, I have a hard time analyzing them and knowing what it means. If someone could walk me through a step-by-step solution that would be great.  The answer is that the factor group is isomorphic to $\mathbb{Z}_4 \times \mathbb{Z}_2$.   Reference: Fraleigh, A First  Course in Abstract Algebra, p. 147, Example 15.10.


I am unsure on how to do so with I under the square root. I can do so by just simply squaring both sides but I am trying to do so without using this method (need q for part of an equation).

Let $a$, $b$, and $c$ be complex numbers with $a\neq0$. Show that the solutions of $az^2+bz+c=0$ are $z_1,z_2=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$, just as they are in the case when $a$, $b$, and $c$ are real numbers.


A friend recently reminded me of a story where two children hear/learn /read in a book  about a time long ago when all books were in print, and it's very strange to them as they are totally electronic in their future time.  the story was most probably written by an English-writing author, dated before 1990 and probably in the 1960s or so.  Any ideas?

I'm trying to find an short story I read in a collection about ten years ago. Publication date before 1980.  Here's everything I remember:   The story is about kids who found an old book with stories about schools in the 20th century. In this future, kids study at home with a robot teacher. They don't know how to study with other kids. These kids (maybe sister and brother) run away from their teacher to read this book in a loft or cellar. They liked those stories about schools.


every few minutes I found this process running   root      949062  100  0.0  37204  1488 ?        R<   05:14   0:51 /usr/local/cpanel/3rdparty/bin/clamdscan --quiet --no-summary /etc/passwd   It's using 100% cpu. I kill it , and after some time I see it again . How can I determine who is running this process ?

I have a complex embedded Linux software running on a gentoo derivative, on which a certain piece of code gets executed regularly every ~84 minutes. Sweeping through the main code to find places where this code might get executed was unsuccessful, and crontab also seems no possible explanation.   My question: Is it possible, by modifying the code in question, to find out which other process/code/file/service started it in the first place? Are there some information in the /proc directory I can use? Or is it impossible to find out the process that executed the given code?


I want to use this method to get array of keys (primary, foreign, ...) from specified table:  public function getTableKeys($table){     //OBTAIN TABLE KEYS     try {         $conn = $this->db->_pdo;             $conn->beginTransaction();          $query = $this->db->_pdo->prepare('SHOW KEYS FROM :table');         $query->bindParam(':table', $table, PDO::PARAM_STR);         $query->execute();         $keys = $query->fetchAll(PDO::FETCH_ASSOC);          $conn->commit();         return $keys;     }catch (Exception $e) {         $conn->rollback();         echo 'Caught exception: ',  $e->getMessage(), "\n";         return false;     } }   The problem is, there is an error thrown:     Caught exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''ps_customer'' at line 1    Now if I run SQL manually in PHPMyAdmin, it successfully returns a set of keys. The problem is that it has to be in following format:  SHOW KEYS FROM ps_customers   not in this format (with quotes):  SHOW KEYS FROM "ps_customers"   My question is: How do I bindParam parameter that needs to be inserted into SQL without quotes but is in fast a string (use of PDO::PARAM_INT doesn't work).  Thanks for possible suggestions, guys.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Is that possible to have a child relationship expressions __r in SOSL   List<List<SObject>> searchList = [FIND :searchText+'*' IN All Fields      RETURNING Account (id,name,industry),      Contact(id,name,email,firstname,lastname),     Opportunity(id,name,stagename,closedate),lead(id,name,email,phone)];

I have contact object and Registration Custom Object.  I want to list the registration object fields in contact object using relationship as follows:  SELECT id, name, (SELECT id,name FROM Registrations__r) FROM Contact;   I want to do the same thing using SOSL. is that Possible? I did something like this for Contact fields.  FIND 'searchText' IN ALL FIELDS RETURNING Contact(name,Email);   doesnot know how to use registration object fields here...


For example, the boy had to walk his whole day backwards as a way to untwist himself.  His need to repeat all his daily actions in reverse was almost like watching a movie in reverse.  The boy was the ONLY  person in the novel who had to do this.   I want to cite this behavior and author in an essay I am writing. I believe the novel was published before 1990.

What is the title of the book I read in the 1960s or 1970s about a boy that somersaulted and spun throughout the day?  As he grew it became worse. The boy claimed he had a need to do this to feel right. His parents convinced him to "save it all up" till the end of the day and do it all at once in the privacy of their home.  In the end they discovered that the boy, being born in weightless space, was affected by earth's rotation / gravity (?), and that made him feel tangled up. I can't remember details and may have some of this incorrect. The book may have been targeted at young readers (teens).


So im generating few input fields and that works. But i cant get the value of this generated input fields. I can make onchange work, but i still can't catch any value. So i have tried a bunch of stuff with jQuery but nothing works. I alywas get undified.  jQuery(document).on('change', function (){         var id = "";         alert( this.value); }  jQuery(document).on('change', function (){         var id = "";         alert( jQuery(this).attr('id')); }  This is the field that gets generated <input class="mb-1 ml-2" style="transform: scale(1.3);" type="radio" id="input-'+counter+'">'  which will look like <input class="mb-1 ml-2" style="transform: scale(1.3);" type="radio" id="input-1">'  That works aswell. But i cant get the id of this input field

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'm trying to configure my Facebook Og meta tags in my header so I get a different result on the type of page I want. I've been hitting some road block that searching through google haven't been able to resolve, so I thought asking for help here.  This question comes in two parts, one about if statements and wordpress conditional tags. The second about the use of get_the_excerpt with those if statements.  Here I'm trying to set the default title. But I'm suspecting my issues are linked to my if statements.  <meta property="og:title" content="<?php if( is_single() || is_page()){  echo get_the_title(); //for post and pages }else{ if( is_home() || is_front_page() ){ echo "Predefined Name";  //force the name as default for the home / front page }else{ echo wp_title //to get default title for all other types of pages } ?>" />   For the page description i'm unsuccessfully also trying to get the excerpt using get_the_excerpt, but since i'm outside the loop, it doesn't work. I've been looking especially  for help, but I'm not sure as to how to incorporate those.      <meta property="og:description" content="<?php if (is_single() ){         echo get_the_excerpt //to get the post's excerpt from outside the loop     }else{ if( is_home() || is_front_page() ){     echo "Predefined Description";  //doing this to force a default description     }else{         echo "Predefined Description"; //for all other pages     } ?>" />

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work?   This code is inside a plugin called "WP Facebook Open Graph protocol". Here's the part i want to change:  if (is_singular('post')) {   if (has_excerpt($post->ID)) {     echo "\t<meta property='og:description' content='".esc_attr(strip_tags(get_the_excerpt($post->ID)))."' />\n";   }else{     echo "\t<meta property='og:description' content='". [?] ."' />\n";   } }else{   echo "\t<meta property='og:description' content='".get_bloginfo('description')."' />\n"; }   Here, has_excerpt always fail, and get_the_excerpt($post->ID) don't work anymore (deprecated).  So, how can i display the excerpt there?  ps: I'm using "Advanced Excerpt" plugin as well


let say I have a program like this,  typedef struct {     float hello; } tData;  int main() {     printf("%d", sizeof(tData)); }   The value is 4, as the float is 4 bytes. It showed as expected.  However, when I add a new variable,  typedef struct {     uint8_t bool1:1;     float hello; } tData;  int main() {     printf("%d", sizeof(tData)); }   I thought that it should display 5, but I got 8. May I know why?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Is it possible to install this program in the Ubuntu operating system? What is the command line for this?

Is there a way to search and then download from YouTube, with the situation that I only need to download the audio only, not the video.


I have been making a search engine for my website and just got it completed i am using an ajax request to search the database and wanted to know how i can make it safe from any injections?  Search.ajax.php      <?php  $db = new mysqli('localhost', 'root', 'root', 'social'); $search = $_POST['search'];  $query = mysqli_query($db, 'SELECT * FROM users WHERE username LIKE "'.$search.'"');  if (mysqli_num_rows($query) < 1) {     echo "No results found for ".$search.""; }else{     while ($r = mysqli_fetch_assoc($query)) {         $user = $r['username'];         echo '
Go to '.$user.'

';     } }    ?>   I am searching the database for users that have the username of what they put in the search box. i need help making it so no one can search alert(test); if they search this it will show up an alert box here is an example of it.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Freshly installed ubuntu. Did the normal installation and unchecked the third party apps. Now when I try to install apps using the repository or update it I get this error. sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease                Err:2 http://in.archive.ubuntu.com/ubuntu focal InRelease                         Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out Err:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease   Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Err:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease   Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Reading package lists... Done W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:ffff::f). - connect (101: Network is unreachable) W: Some index files failed to download. They have been ignored, or old ones used instead.  I also have only these in the Software and Update setting. Please help!

I just installed a fresh version of Ubuntu 19.10 today, and the first thing I decided to do was to install GNU Screen, using sudo apt-get install screen. my output was: Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package screen  I figured the package archives were not quite updated as it was a clean install so I tried sudo apt-get update. This is what I got: Get:1 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]       Err:2 http://au.archive.ubuntu.com/ubuntu eoan InRelease   Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out Err:3 http://au.archive.ubuntu.com/ubuntu eoan-updates InRelease      Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Err:4 http://au.archive.ubuntu.com/ubuntu eoan-backports InRelease   Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Fetched 97.5 kB in 31s (3,106 B/s) Reading package lists... Done Building dependency tree        Reading state information... Done All packages are up to date. W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-updates/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-backports/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) W: Some index files failed to download. They have been ignored, or old ones used instead.  I'm really not sure why it would be doing this, other than maybe some first-use hiccups? The computer is definitely connected to the internet, as I am writing this from that machine, and I have tried running the commands after rebooting and it still gives the errors. I can't seem to be able to connect to au.archive.ubuntu.com at all. ping au.archive.ubuntu.com just sits there without a response. If anyone could help, that would be great! If any extra information is required I'd be happy to edit it into the question.


A classmate and I were practicing speaking where he used a saying "the early bird catches the worm", I did hear this idiom though I didn't know where it originated, so I asked  Do you know what country it originates from?  Is this sentence clear and natural? Should have I said it like this?  Do you know which country it originates from?

I am confused with the grammar here. Which is grammatically correct?       At which time will you call me?     At what time will you call me?    And why?


My site has several ajax functions essentially identical (except different variable names, etc.) to the following:  function ajaxFunction(string) { var ajaxRequest;     try {         ajaxRequest = new XMLHttpRequest();     } catch (e) {         try {         ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");         } catch (e) {         try {             ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");         } catch (e) {                    alert("Your browser broke!");                 return false;         }         }     }//Anonymous function starts here ajaxRequest.onreadystatechange = function() {     if (ajaxRequest.readyState == 4) {             var ajaxDisplay = document.getElementById('div');             ajaxDisplay.innerHTML = ajaxRequest.responseText;     } } //and ends here     var QueryAjax = "?string=" + string;     ajaxRequest.open("GET", "AJAX_File.php" + QueryAjax, true);     ajaxRequest.send(null); }   For the indicated anonymous function, the javascript lint found at  warns me I should add a semicolon at the  end of this function (before the comment //and ends here in the code above) and that the function does not always return a value; the stricter lint found here:  warns me ajaxRequest.readyState == 4 should instead be ajaxRequest.readyState === 4.  Does anyone know how detrimental (if at all) the lack of semicolon and lack of "=== 4" are? Also, why does the function not always return a value? My site uses about 50 ajax functions similar to the one above and seems to perform great, but perhaps making these changes will speed up the execution of the functions? Any tips/advice would be greatly appreciated!

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I am creating a plot with pgfplots and using symbolic (textual) input coordinates. My MWE is as follows:  \providecommand{\myrootdir}{..} \documentclass[tikz]{standalone} \onlyifstandalone{     \usepackage{pgfplots}     \pgfplotsset{compat=1.15} }  \begin{document} \begin{tikzpicture}     \begin{axis}[         width=80mm,height=50mm,         xtick=data,         symbolic x coords={yellow, green, blue}]          \addplot+[sharp plot]         coordinates {(yellow, 2) (green, 1) (blue, 3)};         \addplot+[sharp plot]         coordinates {(yellow, 2.5) (green, 2) (blue, 3)};         \addplot+[sharp plot]         coordinates {(yellow, 3) (green, 3) (blue, 1)};      \end{axis} \end{tikzpicture} \end{document}   This produces the following plot:    As you can see in the image, the input coordinate "green" is misaligned (too high). How can I fix this?

The text xticks are not placed on the same line, rather the same height counting from the highest letter (zero is much higher than high and low).    How can you fix this?  MWE:  \documentclass[class=scrartcl,14pt]{standalone} \usepackage{fontspec} \usepackage{luatex85} \usepackage{unicode-math} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} \usepackage{calc} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture} \begin{groupplot}[group style={group size=1 by 1, horizontal sep=2cm, xlabels at=edge bottom }, %~ yticklabel style={/pgf/number format/fixed}, %~ xticklabel style={/pgf/number format/fixed}, scaled y ticks = false, scaled x ticks = false, xtick pos=left, ytick pos=left, %xlabel=time (week) ] \nextgroupplot[xmin=0.5,xmax=3.5,xtick={1,2,3},ymin=2.43,ymax=3.05,xticklabels={zero, low , high}, xlabel={label}]  \end{groupplot}  \end{tikzpicture}  \end{document}


Can anyone help me to  bordered cover the image?  It only follow the text. If my text is longer, then the border is resize with the text  Here my is html code

Guitar
                      Visit the three ghosts of Christmas this November as the PLAYHOUSE Whitley Bay kicks off the festive season with a fantastic Disney-esque musical production of A Christmas Carol.
   Here is my css  #guitar { border : 5px solid;       padding : 10px;       margin-bottom : 2%;      } .imgleft{float:left;}

I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar.

   There seem to be numerous methods of fixing the clear bug in Firefox:
 overflow:auto overflow:hidden   In my situation, the only one that seems to work correctly is the
 solution, which is a little bit scruffy. overflow:auto gives me nasty scrollbars, and overflow:hidden must surely have side effects. Also, IE7 apparently shouldn't suffer from this problem due to its incorrect behaviour, but in my situation it's suffering the same as Firefox.  Which method currently available to us is the most robust?


Suppose we have a perfectly reflecting mirror which reflects 100% of the light incident on it. When a light beam falls on the mirror normal to the surface it will reflect in opposite direction from where it came. Hence its momentum is changed and also the momentum of the mirror. The light reflected off with the same speed and so its energy will be equal to energy of the light before incidence. But the mirror now, has also gained kinetic energy (because it gained velocity) . So the final energy comes out to be greater than initial energy. From where does this extra energy came into the mirror

I have been recently wondering, if I take a powerful enough energy source (photon) and I have an perfect mirror exactly in front of it and assume an "emitter" shot the light towards the mirror.   As perfect mirrors absorb no energy of ANY kind from photons, should this mean that the perfect mirrors would never move due to transfer of momentum of the light?


DateTime.Now() is returning server time where application is running on server. I need a way to find Client Machine Time in a Class File in C# without using JavaScript.   Please suggest if there is any workaround for this request.

When I use DateTime.Now I get the date and time from the server point of view. Is there any way to get the client date and time in ASP.NET?


How can I prove $\Bbb N$x$\Bbb N$ is countably infinite? Is the proof in some book about sets? Somebody help please.

How can I prove that the Cartesian product of two countable sets is also countable?


So we all know its there, and we all know how to fix it, but adding the extra steps to have to change the interpolation on every new animation just plain sucks. To be honest I don't find this feature useful as a default at all because more times than not we have to correct for it.  Is there an option somewhere to turn auto ease in off? (I personally think this should be the default and should require user to turn it on if they want it).

I've been working on some animations recently, and I've noticed that I'm having poor luck with certain things, namely the fact that I don't really use Blender's graph editor very well.  One of the major issues that I have is pretty widespread among 3D graphics programs; when I create an animated object, it defaults to using a curved graph instead of a linear graph, which means that the most movement is at the middle of the animation, and stuff just practically stops near the beginning or the end. While this helps with organic camera movements or such, it's also not what I usually want. Can I set animation curves to default to linear?


Whenever I install any software, it goes to shlok-Lenovo-Legion-Y530-15ICH and soon the free memory becomes so low that I cancel installation.   However when I check the storage of my home directory from Files Properties, it shows over 73GB free memory:   So I tried to install softwares in home\documents but still shlok-Lenovo-Legion-Y530-15ICH is used up.   How can I utilize the free space and install softwares at my desired directory?

I have read some article about home partition in Ubuntu but I don't know why it is used widely. Because software I have installed via Ubuntu software center or deb package, they all automatically install into root partition like /opt, /usr or something like that. Anybody can give me some suggestions?


I have a project I am working on that is very similar to the one below i just found so i don't want to make a hassle for anyone to read again, however in the  question I found the  user had to create an extra file called file3, which is something I don't want to make. I was also thinking about the grep command, also thought about using a while loop. Anyone has any ways to start this script?    In other words, the question is: give an alternate solution to  without resorting to creating any extra file (like file3 in the example).

I have two files.  file1:  Dave 734.838.9800   Bob 313.123.4567   Carol 248.344.5576   Mary 313.449.1390   Ted 248.496.2204   Alice 616.556.4458      file2:  Bob Tuesday   Carol Monday   Ted Sunday    Alice Wednesday   Dave Thursday     Mary Saturday     I merged the two files.  file3 should look like this:  Name      On-Call     Phone   Carol     MONDAY      248.344.5576   Bob       TUESDAY     313.123.4567   Alice     WEDNESDAY   616.556.4458   Dave      THURSDAY    734.838.9800   Nobody    FRIDAY      634.296.3356   Mary      SATURDAY    313.449.1390   Ted       SUNDAY      248.496.2204     But I cannot get the weekdays to be in order. How do I go about doing that?


Is there anyway to report an abusive user, or can I just flag abusive posts?

I think the community does a great job policing questions/answers, etc. and the community has some good tools available to do this.  Between flagging questions with some reasons behind it and editing posts, closing them, and deleting them, the only thing that seems to be missing to me is the ability to flag a user.  Reasons to flag a user as abusive:   Duplicate User Abusive Behavior Offensive user name or profile User profile consists of spam Others?


How can I get the manufacturer and model of my monitor from within Windows, without having to disconnect and manhandle a 27" inch monitor looking for a label that may not exist, or download any third-party software? It seems odd that there's no native, software-only solution to do this on Windows 7.    UPDATE #1:  This question was initially claimed to be a duplicate of another question. It isn't a duplicate of the proposed question because:   The proposed question is specific to laptops. The proposed question is incredibly broad, seeking to cover all (laptop) hardware with a single solution. My question, by contrast, is asking about a piece of hardware specific to desktop computers. I did so knowing that it is notoriously hard for Windows 7 users to obtain specifics for said piece of hardware with a native software solution. This is evidenced by the fact that none of the answers to the supposed original question correctly answer mine, despite said question having existed since 2009, and by the fact that the only correct answer to my question is an obscure command-line one. The proposed question doesn't specify native-only solutions, which is an important requirement for me and many other users who want to be able to accomplish such a relatively simple task without downloading or installing additional software.     UPDATE #2:  I accepted the current answer because it is the right solution to the question I asked, even though it doesn't work in my specific instance due to bad EDID values. For that specific issue, I created a .

I just reinstalled my Windows and now I don't have all the hardware components recognized. I have an  laptop and  website seems to have all the necessary drivers for my model. The problem is that I don't know exactly which components I have. For example, in my laptop video card case the site has available drivers for ATI and Intel chips.   How do I know what are the right drivers for my machine?


public static byte[] decompressGzipToBytes(String file) throws IOException {      ByteArrayOutputStream output = new ByteArrayOutputStream();      FileInputStream in = new FileInputStream(file);     try (GZIPInputStream gis = new GZIPInputStream(in)) {          // copy GZIPInputStream to ByteArrayOutputStream         byte[] buffer = new byte[1024];         int len;         while ((len = gis.read(buffer)) > 0) {             output.write(buffer, 0, len);             System.out.println(buffer);         }      }      return output.toByteArray();  }  The above code doesn't properly read a Gzip file into bytes.  I get characters like '[B@6d6f6e28' instead.  But, if I use a BufferReader for text files, then it behaves as expected. What I am doing wrong?

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]


Sometimes when a lot of data is gathered, an argument against the majority can rely on selecting the rarer case. For example, a medical procedure which usually does more harm than good can be defended by statements from the few it has benefited. Is there a word or expression for this? It could be "cherry-picking", but that doesn't signify the deception taking place.

I need a more specific word than illogical.  Say an educational psychologist collected some data about someone by having two people fill out a questionnaire that is a well known, reputable, published, normed instrument.  The two questionnaires yielded totally different results, and then the psychologist "resolved" the "discrepancy" by conveniently throwing out the questionnaire that didn't support the conclusion he wanted to draw.  I think we don't say his conclusion is fallacious.  I think we can say it is illogical.  Is there a more specific, apt word for this situation?  A single word if possible.


I know about setuid bit on /bin/passwd file which allows us (non-root user) to run that command as root user. running passwd command requires root permissions to change /etc/shadow file.  My question is if I am running passwd command as root why I can't change the password of root since I am root while I am running that command?  edward@ArchLinux:~$ passwd root passwd: You may not view or modify password information for root.   Is it passwd command that does not allows non-root user to change the password? Can I write a malicious passwd command with setuid bit that can change any user's password?  (Logically I know that this would be disastrous but I want to know how this works in background)

When a normal user wants to make change to the passwd file, the user will by setuid be given the effective user access. User becomes root temporarily and can edit passwd.  However you can only edit your password right, and not everybody else? However your effective user access is root. So how come you're not allowed to change other passwords beside yours?  When you run a program with setuid, what does it mean actually when effective user is root, but real user id is still your name?


Some months ago, I purchased an Azumi cell phone from an official store in a shopping mall in Mexico and subsequently discovered its firmware contains a ton of malware. The malware connects with a server in China and downloads a load of malicious apps which then launch automatically and eventually render the phone so slow as to be unusable.   I have just done a factory reset for the fifth time and expect it to run smoothly for a few weeks until the problems return. I tried installing a new ROM but it did not resolve the problem, possibly because the malware is hidden inside a partition.   I am not at all literate with Android, but am willing to learn and do whatever is necessary to fix this phone. Can someone advise or point me in the right direction?   If I need to root it, how can I do this safely, and how can I locate the offending malware? What diagnostic tests can I perform to learn more about the problem? And if it's easier to flash a new system, what is the most effective way to do this, and where can I locate a reliable ROM?

My Samsung Note 8 has gotten very weird lately. I get programs I never have installed, and when I try to reboot/reset my device with no backup they still come up after I'm finished with the reboot.  I also have in my "SIM" 2 cards, but I only have 1? And I can't access number. It also shows 2 different IMEIs.  The programs with weird names have all the permissions in my device. Some of them I can't delete, and some can't force stop, and they start running after some time.  Facebook was already installed when I did a reboot and the programs started coming in. I have a secure file on my phone. But this program has permission to everything.  How do I get rid of this problem? Do I root my phone? Can some of you guys please help me with this? This is making me a little paranoid.   Some of the programs:   Dagger Customrabsclient flexbox istrumentzip OpenCenus rxandroid2 agera customclient   I have used many anti-viruses like McAfee, Bitdefender, etc. I have factory reset my computer 2 times, but nothing changes. I have now downloaded AFWall+ to try to stop all these files, but I want to delete them all.  And when I check root manager it says that my phone is not rooted in the proper way. I never ever have rooted this phone.


Does someone know if the login's system for the chat is somehow broken? The link  chat.meta.stackexchange.com gives me an error page.    If I try to bypass that error and go to the Tavern chat room directly, I get asked to add a login method to my account, as illustrated there;    And if I click To continue without adding a new way to log in, click here, the system opens the chat room and tell me I'm not logged in. I can't login, as if I click login again I'm still asked to add a log in method.

I just recreated my MSE account after having deleted it a few years ago. Now, I'm trying to log in to Meta Stack Exchange Chat, and whenever I try to do so, it just fails silently and I'm still logged out.  Additionally, in the same browser session that I'm supposedly logged out, I get a server error when accessing the chat homepage or the chat profile page of any user. I don't get any errors when trying to access any of these pages in a private session. I also was able to sign in to Stack Exchange Chat and Stack Overflow Chat without problems, since my accounts on SO and my parent site for SE chat haven't been deleted.  I think it might be because it's trying to sign me in to my old chat profile, which was not deleted, but that is associated to my old, deleted site account, which clash and thus cause it to fail.


Is it possible to double click and execute a shell script instead of executing the following "./xxxx.sh" notation from command prompt ?

I added a link to the desktop using Nautilus ("Make Link"):  me@1234:~/Desktop$ ls -al total 8 drwxr-xr-x  2 alex alex 4096 Sep  8 12:15 . drwxr-xr-x 42 alex alex 4096 Sep  8 00:22 .. lrwxrwxrwx  1 alex alex   41 Sep  8 12:14 Android Studio -> /opt/android/android-studio/bin/studio.sh   But when I run it, it just open this file in gedit. What do I do about that? And  ls -al /opt/android/android-studio/bin/studio.sh -rwxr-xr-x 1 alex alex 6505 Jul 11 23:48 /opt/android/android-studio/bin/studio.sh


I am so lost trying to figure out this question:  I'm not even sure what it is asking, let alone where to start. I basically only have definitions to use; but I can't seem to fit them all together to make this work:  Let $\\X$ be an infinite set, $\\a\in X$, $\Sigma$ be a set of all finite subsets of $\\X$ that do not contain $\\a$.  Prove that $\Sigma$ is the set of all closed sets for some topological structure on $\\X$ and that any two continuous maps of $\\X$ with this topological structure to the same metric space $\\Y$ coincide with each other on $\\a$ if they coincide with each other on every $b \ne a$.  Keep in mind that, even though this is an analysis course, I can only use the topological definitions and theorems from the notes, which include the basics of topological spaces, metric spaces, continuous functions, compact spaces, and connected spaces.  So while there might be some elegant way of doing this with a theorem, I have to resort to using the bare-bones definitions.

Let $X$ be infinite set and $a \in X $. Let $$\mathscr{F} = \{ A \subset X: |A| \; \; finite \; \;, a \notin A \}$$  Then $\mathscr{F}$ is the set all of all closed sets for some topology $\mathcal{T} $ on $X$. Also, any two continuous maps $f,g: (X, \mathscr{T}) \to Y$ ( $Y$ is metric space) have the property that if $f(b) = g(b)$ for all $b \neq a $, then $f(a) = g(a)$.  In my notes my professor posted this theorem without proof, so I was wondering what is best way to proof this theorem.


Here's the screenshot of my gparted window, I want to increase the size of my ubuntu partition (60.41 GB) using the unallocated size.  How do I achieve this? I have dual boot with Windows 10.    If possible, it would be preferred if the solution does not involve using a live CD/Pen drive (kind of urgent and I don't have one)  Edit: My resize option is showing disabled for ext4 even though I have unallocated just above it. Should it be below it? If yes then how do I achieve that?    Thank you :)

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I am not sure if I will compute the rank-biserial correlation coefficient since the formula assumes that there are no tied ranks. To provide further context, here is my data:  Note: The dichotomous variable is on the left column.

I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option?


This question is related to a previous question that I recently posted: .  I am new to LaTeX and attempting to plot a slope field based on the following description. I desperately need to do this for homework.  The slope field of $\dfrac{dx}{dt} = x^2 - t^2$ along with three solution curves. The top curve is the solution that goes through $(t, x) = (0, 1)$. The middle curve is the solution that goes through the curve $(t, x) = (0, 0)$. The bottom curve is the solution that goes through the curve $(t, x) = (0, -1)$.  The user AlexG posted a highly rated answer in the following thread: .  However, since I am new to LaTeX, I am having significant difficulty in implementing his code. I am attempting to copy and paste it, and use it as a template to plot the slope field described above.   I would greatly appreciate it if someone could guide me through how to do this. For instance, copying and pasting the parts of AlexG's code that I should be using, and outlining the sections I need to alter to plot the described slope field above. I would greatly appreciate guidance. Thanks.

I'm new to LaTeX and looking to create a slope field that matches the following description.  The slope field of $\dfrac{dx}{dt} = x^2 - t^2$ along with three solution curves. The top curve is the solution that goes through $(t, x) = (0, 1)$. The middle curve is the solution that goes through the curve $(t, x) = (0, 0)$. The bottom curve is the solution that goes through the curve $(t, x) = (0, -1)$.  I have tried using the template provided in the following question, but it is too complicated for me to reproduce.   I would appreciate it if someone could provide a template for these types of LaTeX plots. This way, I can also reproduce these plots in the future for other differential equations.   Thank you.


How do I write a recursive formula for: $$a_n = \left(\frac12\right)^n+2n−1$$ so we were taught to expand the recursion and the multiply all together. So is the answer:  $$a_1=\frac32,\quad a_n=a_{n-1}+\frac52$$  How do you show the expanding and multiplying?


I don't know where to start. Let $2k$ be an even integers and $a^2 - b^2$...

I know that I should use the definition of an odd integer ($2k+1$), but that's about it.  Thanks in advance!


I've always found this feature quite annoying and when I try to turn it off or simply just clear the password it still prompts me for a password. Everytime I've done that I've had to reinstall ubuntu all over again because nothing I put in will work. It keeps asking for authentication on EVERYTHING!! I can't even do a simple search of MY OWN FILES AND PROGRAMS without being prompted for a password.  I did a format and reinstall recently and I didn't have this problem until something popped up asking for my password for a keyring. I saw this A LOT before I reinstalled but it wouldn't let me install some software I needed until I did. Ever since, this stupid keyring thing is ALWAYS asking for a password.

Whenever Ubuntu boots up, a dialogue pops up asking me to unlock my default keyring. Is there some way this can unlock automatically through PAM or some other magical way?


I would like to have a bootable USB drive with some bootable ISO images on it, where some sort of menu appears on boot to select a specific image file on the USB drive and continue boot from that one.  Is there a way to create that? I am interested in e.g. Windows 7 and Ubuntu.

I am looking to create a USB flash drive that I can put multiple  ISO images on and select which boots from startup. The ideal candidate supports Linux and Windows-based ISO images, and is relatively simple. It also must have some reasonable process for adding and removing an ISO image from the drive/list.    Things that I'm not looking for in this specific question:    or other swiss-army knife live CDs. The point is to boot any one of multiple CDs, not to boot a (certainly useful) utility CD. Installing a single live CD to a USB drive. I'd like to have multiple ISO images, selectable at startup.   I don't have a specific purpose in mind, possibilties include a single drive with a  variant, Ubuntu desktop, UBCD4Win for DOS, the Offline NT Password Cracker, etc.  Flexible and easy to use are the name of the game!


Some strange error appeared after I upgraded my Ubuntu from (10.11, 11.04 i dont know) to 11.10.  I am getting an undefined reference to 'sqrt' while using math.h and linking with -lm  I'm compiling with gcc -Wall -Werror -g -Iinclude/ -lm lib/matrix.c src/analyse.c -o bin/analyse.o both source-files use and include math.h.  This code compiled without problems for and I didn't change much since the upgrade but now it won't work.  Do you have any suggestions what I can do, to find the error?  I'm sorry, if this question was asked before; there are so many posts on math linker errors and I didn't find a matching one

Why does the order in which libraries are linked sometimes cause errors in GCC?


I have 50 servers. I manage them from a central management server.   I could open a query and get result for each one at the same time. But I want to do it in an automated way, like a job, to collect data from each server and store/handle it locally.  Is this possible and if so, how?

I have 50 servers. I manage them from a central management server on SQL Server 2014 Enterprise Edition. I don't use repository.  I could open a query and get result for each one at the same time. But I want to do it in an automated way, like a job, to collect data from each server and store/handle it locally.  Is this possible and if so, how?


A family has two sons. The probability that a son is a boy or a girl is $1/2$.  We ask the father to choose one of them and to tell us the genre. If the father says "Boy!", what is the probability that both them are boys?  My attemp is:  E=event that the father tells "Boy"  F=event that both sons are boys  $$p(F|E)=\tfrac{P(EF)}{P(E)}=\tfrac{P(F)}{P(E)}=\tfrac{\tfrac{1}{4}}{\tfrac{1}{2}}$$.  But the solution proposed was  $$p(F|E)=\tfrac{\tfrac{1}{4}}{\tfrac{1}{3}}=\tfrac{3}{4}$$ Why?

In a family with two children, what are the chances, if one of the children is a girl, that both children are girls?  I just dipped into a book, The Drunkard's Walk - How Randomness Rules Our Lives, by Leonard Mlodinow, Vintage Books, 2008. On p.107 Mlodinow says the chances are 1 in 3.   It seems obvious to me that the chances are 1 in 2. Am I correct? Is this not exactly analogous to having a bowl with an infinite number of marbles, half black and half red? Without looking I draw out a black marble. The probability of the second marble I draw being black is 1/2.


What are the best ways to protect from MySQL injection? What are weaknesses I should look out for?  I know what it is, but I really have no idea how vulnerable I might be. Though I have taken (what I think to be) steps toward protecting myself and my database.  Is there any sure-fire way of stopping someone?  BTW...I write in PHP:)

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


This was the last question on my exam and it's driving me nuts the answer has to be in degrees  $5\cos(x) = 2\sec(x)-3$  $5\cos^2(x)/2 = -3$  $\cos^2(x) = -6/5$  Since $-6/5$ is negative  The answer $\sqrt{\cos^2(x)}$ could not be correct


I'm trying to pass a modified clone of an object credential.user to a function const credential = await this.afAuth.auth.signInWithEmailAndPassword(email,password); var userInfo=  await credential.user  userInfo.displayName=  name  return this.updateUserData(userInfo);  however I am getting this message: ERROR Error: Uncaught (in promise): TypeError: "displayName" is read-only emailLogin/<@http://localhost:4200  How can I clone this object received from an async function and modify one of its attributes?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I need when I click on Mouse Right-Click  do the same effect like I clicked on keyboard Ctrl + shift + alt + D  It will be temporarily event, I hope no restart or any complex settings.

I'm trying to map/bind my mouse button 4 and button 5 to behave as kayboard num pad 1 and 2, does exist some way to do that? Maybe with some specific software?


On which SE should I ask a questions if I don't know which is the right place for it.   For example, I asked a question on Stackoverflow about websites with programming challenges (recommendation), because I couldn't find a website recommendation SE (like software recommendation) and thought it would fit into SO, but it didn't.  Second questions to this topic: Why are some normal questions put on hold because of off-topic when they are completely normal. First, as a new user, I was very insecure if my questions is right in that SE.

Say I have a question and I'm not sure what Stack Exchange site to ask it on. Is there a place to ask a question and get it routed to the correct Stack Exchange site?


Creating a geometry in Postgis is fairly simple:  ST_SetSRID(ST_MakePoint(longitude,latitude),4326);   These lat/lon should be in decimal degrees format like 33.02505 -96.70668  Is there a way/function to enter them in the degrees and decimal minutes format provided by NMEA $GPRMC sentences like 3301.5032 09642.4010?  Of course you can convert them in php or nodejs; but it would be easier (faster) to have it natively in Postgis.

I have location points collected from a garmin device stored in an excel sheet in Degree Minutes format --- W00208.172,N1046.977.  I am looking for an Excel formula to convert either to Decimal Degrees or Degrees Minutes seconds Format ?


but I have only two documents ( Aadhar card and pan card) can I travel on these I'd proof.if any other options is required than pls guide me . waiting for your soonest response.

I'm a citizen of India and I'm travelling to Nepal by air. Is an Aadhaar Card a valid document used for travelling to Nepal by air?


I have a shell script using some sudo command. When I run this script from terminal - it asks me for password and runs with any problem. But when I try to run executable shell script form GUI (double click) it does not ask me for password - so does not work.   Example of my shell script:  c1=$(dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' | sha1sum | awk '{print $1}')   How to run script from GUI and pass all sudo commands with no problem?

Currently, for all my commands that require root access, I have to type them out on a command line.  I would like for the GUI to prompt me to key in my password, when sudo is required, instead of having to type out the commands from command line.  Is there any way to enable this? Previously one version of Ubuntu desktop had this feature out of the box.  This version of Ubuntu (that I am now running) I upgraded from a server installation.  I will add, my user account is already added to sudo group. Thus I can run commands such as sudo gedit or sudo apt-get but I'm not able to install software in the Ubuntu Software Center.


Prove that {$\sin(x) , \sin(2x) , \sin(3x) ,...,\sin(nx)$} is independent in $\mathbb{R}$   my trial :  we know that the Wronsekian shouldn't be $0$ to get the trivial solution and thus they are independent. its not trivial to show that $ W \not = 0$  W =   \begin{vmatrix} (1)\sin(x) & (1)\sin(2x) & (1)\sin(3x) &  ... &   (1)\sin(nx) \\ (1)\cos(x) & (2)\cos(2x) & (3)\cos(3x) &  ... &   (n)\cos(nx) \\  -(1)^2\sin(x) & -(2)^2\sin(2x) & -(3)^2\sin(3x) &  ... &   -(n)^2\sin(nx) \\ -(1)^3\cos(x) & -(2)^3\cos(2x) & -(3)^3\cos(3x) &  ... &   -(n)^3\cos(nx) \\ \end{vmatrix}  and so on. it looks like Vandermonde matrix but i cant prove that and so we conclude that its $W\not =0$

Could you help me to show that the functions $\sin(x),\sin(2x),...,\sin(mx)\in V$ are linearly independent, where $V$ is the space of real functions?  Thanks.


Recently I looked at a schematic for an AND gate and noticed that they used 2 npn transistors.  I was wondering why you would want to use 2 transistors though.  Couldn't you make an AND gate by attaching one input to the collector and one input to the base?  Wouldn't this be better because you would be using half the transistors?

Most places on the internet that I see give a schematic for an AND gate that is something like this:         – Schematic created using   The only thing about this is that when B is turned on but not A, which should logically output false, it seems to be somewhere between it (this can easily be seen with an LED at the output: it isn't as bright as it is if both A and B are on, logically satisfying AND, but it still lights up).  I was messing around and came up with this idea for an AND logic gate which works a bit more correct and I have been using it recently:          Essentially what I came up with when building that is Input A is put through a NOT gate which is put into another NOT gate, but the Collector on the second NOT gate is only powered by Input B. Therefore, if Input B is off, no output to begin with, but if its on but A isn't, then the first NOT gate powers the base to the second, making B ground.  I like building this design better, and it works so far for me, but I was wondering:  How practical is this design (e.g. why haven't I seen it before; are there any flaws)?


I am new to pythonTex. I get following error. I checked working of simple python code. However, when I try to import math within pycode it gives error.  using code:  \begin{pycode} import math  from pint import UnitRegistry  u = UnitRegistry()  alpha = 0.04  sigmaW = 72.86e-3 * u.newton / u.meter  mu = 8.9e-4 * u.pascal * u.second  \end{pycode}     I get following error:  ----  Messages for py:default:default  ---- * PythonTeX stderr - error on line 364:     File "<outputdir>\py_default_default.py", line 140       import math       ^   IndentationError: unexpected indent  -------------------------------------------------- PythonTeX:  notes - 1 error(s), 0 warning(s)  C:\texlive\2018\bin\win32\runscript.tlu:803: command failed with exit code 1: python.exe c:\texlive\2018\texmf-dist\scripts\pythontex\pythontex.py notes.tex

I am new to pythontex. I could run simple python code. However, I get error with slightly complex things.  The error I get is following:  This is PythonTeX 0.16  ----  Messages for py:default:default  ---- * PythonTeX stderr - error on line 211:     File "<outputdir>\py_default_default.py", line 62       MW= 18e-3 u.kilogram/ u.mole                 ^   SyntaxError: invalid syntax  -------------------------------------------------- PythonTeX:  notes - 1 error(s), 0 warning(s)  C:\texlive\2018\bin\win32\runscript.tlu:803: command failed with exit code 1: python.exe c:\texlive\2018\texmf-dist\scripts\pythontex\pythontex.py notes.tex   Part of the code that has error is :  \begin{pycode} import math from pint import UnitRegistry u = UnitRegistry() alpha = 0.04 sigmaW = 72.86e-3 * u.newton / u.meter mu    = 8.9e-4 * u.pascal * u.second densityW = 1000 * u.kilogram / (u.meter ** 3) densityIPA = 1000 * u.kilogram / (u.meter ** 3) densityEtoh = 1000 * u.kilogram / (u.meter ** 3) H = 1e-6 * u.meter W = 28e-6 * u.meter L= 32e-6 * u.meter MW= 18e-3 u.kilogram/ u.mole MIPA= 60.1e-3 u.kilogram/ u.mole MEtoh= 46.07e-3 u.kilogram/ u.mole R0=8.31446 u.joule / (u.mole * u.kelvin) T0= 298 u.kelvin N= 10 D0=2.4e-5 (u.meter ** 2)/(u.second) C0=17.08e-3 u.kilogram/(u.meter ** 3) tauevW=(densityW * N * R0 * T0 * (W **3))/(6* math.pi * D0 * C0 * sigmaW * MW) \end{pycode}   Does anyone know how to solve this issue?


Can I upgrade from 14 LTS to 15 without formatting ubuntu 14.  I currently have Win 7 and 14 LTS as dual boot. I don't want to mess things up cuz of the grub menu.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


On SO somebody decided to upvote multiple of my answers in a row (or so it seems). Consequently, the nightly script removed the serial upvotes. According to the FAQ, that should bring back the status quo ante. Quoting          Reversals trigger a reputation recalculation.      Whenever serial voting gets reversed, all days involved in the serial   voting will be recalculated as if the serial votes had never   happened, and any reputation you might have lost due to those serial   votes hitting the reputation cap will be given to you at that time.   Serial voters will not prevent you from gaining reputation that you deserve.   Bold emphasis mine. Related answers would also indicate as much:         But all of that contrasts with what I see. Voting reversal does not seem to work like that. In the case at hand, I never got any reputation from the serial upvotes to begin with, since I was past rep cap for the day. (There's more weird stuff going on, I never got past 195). The algorithm still deducted reputation the next day to give me a negative score for ... what exactly?    FAQ, previous answers and the voting correction algorithm, it doesn't add up. Or I am missing something?  The relevant part from  (as per comments):   -- 2015-05-07 rep +150  = 148006      2   8229000 (10)  2  15514334 (10)  2  11751905 (10)  2  16701719 (10)  2   8016917 (10)  2   7945958 (10)  2   7630564 (10)  2  30125448 (10)  2  30127396 (10)  2  16451457 (10)  2   7431468 (10)  2  30127396 (10) -- 2015-05-08 rep +120  = 148126      1  30125448 (15)  3  30134755 (-2)  2  18405706 (10)  2  11919677 (10)  2   8014694 (10)  2  30134755 (10)  2  13259085 (10)  2   7774879 (10)  2   7630564 (10)  2  10560761 (10) -- 2015-05-09 rep +93   = 148219

We've been getting a lot of questions  ever since the feature to see event reversals such as deleted posts and serial voting was added into the reputation history; and their confusion is legitimate. Even well-respected users have become confused by that number above the day. It should display the reputation changes for that day. I propose that reversal events such as these be visually separated from the main events for that day and not included in the total reputation change for that day. After all, their reputation isn't actually changing for that day, but reversing changes from previous days. These events already seem to get bumped down to the bottom of the events for the day, why not add a simple separator between them? Events indicating reversals    Events which have been reversed     Perhaps a second, smaller number could be added next to the main one to indicate that other events took place on that day, but I feel most users who really care will have noticed or went looking for the events anyways. However, including them in the actual change only serves to confuse people.