How to log commands within a "sudo su -"?

If I:   [user@notebook ~] sudo echo 123456uu 123456uu [user@notebook ~]    Then I can see that in the logs:  [root@notebook /var/log] grep 123456uu * auth.log:Jan  9 17:01:51 notebook sudo: user : TTY=pts/3 ; PWD=/home/user ; USER=root ; COMMAND=/bin/echo 123456uu [root@notebook /var/log]    but if I:   [user@notebook ~] sudo su - [root@notebook ~] echo 1234567zz 1234567zz [root@notebook ~]    I cannot see it in the logs:   [root@notebook /var/log] grep 1234567zz * [root@notebook /var/log] echo $? 1 [root@notebook /var/log]    My question: How can I turn the logging on for the commands within the "sudo su -"?  OS is an Ubuntu 12.04 but the question is in general.   UPDATE#1:   [user@notebook ~] sudo su - [sudo] password for user:  [root@notebook ~] echo zizizi zizizi [root@notebook ~] cd /var/log [root@notebook /var/log] grep -iIR 'zizizi' * [root@notebook /var/log] grep 'COMMAND=/bin/su -' * auth.log:Jan 10 15:42:42 notebook sudo: user : TTY=pts/1 ; PWD=/home/user ; USER=root ; COMMAND=/bin/su - [root@notebook /var/log]


My Android device won't connect. I've never got MTP to work, I've only ever got it to connect by USB mass storage, which was how it was working most recently. But now, since 13.04, it seems that option has been taken away entirely.  I need to be able to connect by USB to transfer files.  When I plug in the device I get an error that says Unable to open MTP device '[usb:002,003]':    After some web searching, I found that I might need a program called go-mtpfs, so I tried that, and it failed:  $ go-mtpfs /media/MyAndroid 2013/07/16 16:41:43 compiled against libmtp 1.1.5 Device 0 (VID=04e8 and PID=685e) is a Samsung Galaxy Y. 2013/07/16 16:41:43 found device Samsung: Galaxy Y (04e8:685e) @ bus 2, dev 3 :  LIBMTP PANIC: Unable to find interface & endpoints of device 2013/07/16 16:41:43 rdev.open failed: open: open returned nil   How do I get my USB device to just connect, automatically, like it used to?


Why is the top-bar still using the old style on stackexchange.com?

Why is the main stackexchange.com site still using the old style top-bar? It seems odd for that particular page not to match everything else at this point.  BAD:   GOOD:


How to get permission and best order to upgrade DNA testing for deceased person?

I have a deceased cousin that has a yDNA-12 test from 2004.  I would like to upgrade their test to yDNA-111, BIG-Y, and Family Finder Autosomal.  I'm concerned that their sample is twelve years old and may not be a good one, plus I don't have access to their login on FTDNA.  Also, how long are these samples retained by Family Tree DNA?  How should I approach this with FamilyTreeDNA to get permission and maximize the information we can get out of this sample?  Should I instruct them to upgrade in a particular order?  Should I inform them of the goal and let them drive the process?  Can the Big-Y be done together with the upgrade of the STRs to 111?  Or perhaps it is better to do Big-Y on other distant cousins and based on results of those do targeted testing?


What is the logic behind the pin diagram of Ethernet cables?

Is there a reason why the pin diagram of an RJ-45 looks like this?    I understand that the orange pair is used for Tx and the green pair for Rx. Why is it that the orange pair are kept together while the green pair are separated?  What are the consequences of messing around with this order as long as it is the same at both the ends?


Python ternary operator check most left reference

What is the pythonic way to write a ternary operator like this in the shortest possible way?   (x!=null)? x.something:0;    I want to use something like  y = x.something or 0   but that will check references in a way such that  x.y.z = None whenever x or y are None


QGIS project on QGIS server -- cannot load wms layer

I've created a qgis project on QGIS 1.8, copied it onto the QGIS Server, and am trying to load the project as a WMS Layer back into QGIS. There is one vector layer in the project. Paths have been set to absolute and the CRS for both the layer and project is EPSG 27700.  In the "Add Layer(s) from a Server" dialog box, the project is showing, but not the vector layer. Clicking on the project, at the bottom of the dialog box it says "No Common CRS for selected layers".  Any help is very welcome -- I have searched the forums and tried the solutions suggested  and  but still cannot get it to work.  Many thanks!


Pressing "W" turned my cursor into a circle

I was editing a curve for hair, and pressed W to bring the specials menu and Subdivide it, but instead everything but the curve I had active dissapeared, and my cursor turned into a circle like the one from the circle select mode.  I'm guessing they changed the specials menu and I'm inside some unknown to me function, but I'm not sure how to turn everything back to normal.


Command not found when script launched from cron

I have a bash script which is running a python script which is run (or at least trying to be) by cron. I have already given cron full disk access (that gave a different error message). I'm on macOS Big Sur. crontab: * * * * * /Users/JohnG/Desktop/ControlPhone  mail: X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=JonhG> X-Cron-Env: <USER=JohnG> Message-Id: <20210109053501.1C01930132F58E@Johnys-MacBook.local> Date: Fri,  8 Jan 2021 21:35:00 -0800 (PST)  /Users/JohnG/Desktop/ControlPhone: line 3: adb: command not found Traceback (most recent call last):   File "/Users/JohnG/Desktop/start.py", line 1, in <module>     import pythonmodulex ModuleNotFoundError: No module named 'pythonmodulex'


Prove that either $a=2l$ and $b=m$ or $b+m=al$

If by eliminating $x$ between the equations $x^2+ax+b=0$ and $xy+l(x+y)+m=0$ then a quadratic in $y$ is formed whose roots are the same as the original quadratic in $x$. Then prove that either $a=2l$ and $b=m$ or $b+m=al$.  It seems a very lengthy process to eliminate $x$. Does anyone know of any shorter method?


If I delete Clash of Clans on one iPad, and download it on another using the same Apple ID, will it save my progress?

I just bought a new iPad and I’m wondering if I can move Clash of Clans from the old to the new and save the progress. I spent a fair bit of money into it and I don't want to lose it.


Expected value of series of uniformly converges random variables

Let $X_1,X_2,X_3,...$ a series of i.i.d. variables with  $X_i \sim \mathcal{U}(0,1)$. Let $N=\inf\{n\mid \sum_{i=1}^{n}X_i\geq1\}$ Prove that $E(N)=e$.    I don't really have a clue how to even start proving that. Can someone please help? Thanks.


Find text in files and than move those files into new location

grep -r "<text>" /path | ?   How do I pipe all related files into a new directory (location)?


InputStream.available() generating Null pointer exception

I'm trying to build an HTTP server, I searched the net to solve this problem, but I did not find anything like that.  I'm trying to customize an inputstream to fit read requests and HTTP responses directly from inputstream. The class, which implements an interface) that generates the null pointer exception is as follows (n = in.available ();):  public class MyHTTPInputStream extends HTTPInputStream{  public InputStream in = null;  public String request, reply, dataIn;      // dataIn:= data read from InputStream  public HTTPMyRequest myRequest;  public HTTPMyReply myReply;   public MyHTTPInputStream(InputStream is) {      super(is);      // TODO Auto-generated constructor stub  }   @Override  protected void setInputStream(InputStream is) {      // TODO Auto-generated method stub      // initialize the variable      this.in = is;      request = null;      reply = null;      dataIn = null;  }   @Override  public HTTPRequest readHttpRequest() throws HTTPProtocolException {      request = readFromStream();    // read from inputStream      System.out.println(request);      myRequest = new HTTPMyRequest(request);      return myRequest;  }   @Override  public HTTPReply readHttpReply() throws HTTPProtocolException {      reply = readFromStream();      // read from inputStream      myReply = new HTTPMyReply(reply);      return myReply;  }   @Override  public void close() throws IOException {      // TODO Auto-generated method stub      in.close();  }   public String readFromStream(){      // read data from InputStream to String      int n = 0;      try {          n = in.available();  // ******null pointer exception          System.out.println("n: "+n);      } catch (IOException e) {          // TODO Auto-generated catch block          e.printStackTrace();      }      System.out.println("n: "+n);      byte[] bytes = new byte[n];      try {          in.read(bytes, 0, n);      } catch (IOException e) {          // TODO Auto-generated catch block          e.printStackTrace();      }      String req = new String(bytes, StandardCharsets.UTF_8);      System.out.println(req);      return req;  } }   In the constructor super(is); , refers to this in the interface:  public HTTPInputStream( InputStream is ) {         this.setInputStream(is);     }   This is part of my main class (testServer) to call up the object:  ... /* *  TEST INPUTSTREAM */ System.out.println("_____HTTP Inputstream_____"); // read HTTP request from file request.txt InputStream isReq = new FileInputStream(new File("src\\source\\request.txt")); MyHTTPInputStream myIsReq = new MyHTTPInputStream(isReq); HTTPMyRequest myRequest =(HTTPMyRequest) myIsReq.readHttpRequest(); System.out.println("_______Read request_______"); ...   the file request.txt is in the src directory and is a simple string containing an http request, I also managed to print it on screen without problems in the main class, but in the class readFromStream() it generates this exception(I hid the path with ...):     _____HTTP Inputstream_____      Exception in thread "main" java.lang.NullPointerException at   ....MyHTTPInputStream.readFromStream(MyHTTPInputStream.java:59) at   ....MyHTTPInputStream.readHttpRequest(MyHTTPInputStream.java:35) at   ....testServer.main(testServer.java:88)


Rank of a matrix $A$ such that $A + A^T = 0$

I need to prove (using only elementary operations and induction) that rank of a matrix $A\in \Bbb C^{n\times n}$ such that $A + A^T = 0$ is an even number. I know that elementary operations doesn't change a rank but I don't know how to use them in such a problem. Any hints?


Nearly close to go out of business vs. to going out of business

What is the difference between these two:     Suzuki was nearly close to go out of business just after the World War period.   Vs.     Suzuki was nearly close to going out of business just after the World War period.(from a video)   When talking about the past, do these two sentences different from each other? Like, if you use verbing(going) with infinitive(to) in the past, does it mean that there is another event happening? Or none.


Is it better to use C# for complex business logic that uses SQL and then run it from SQL Server or do everything from within SQL Server?

I find a C-based language like C# to be better in terms of programming constructs for handling complex code. So has anyone here used SQL simply to extract data and managed their business logic in C++ or C#? How was your experience?   Is it better performance-wise to be doing this?


What textbook should I get to self-learn Calculus?

I did not have the option to take calculus during high school. I would like to pick up this subject during my free time.   I am a software engineer. I would like to improve my understanding of maths.   What textbook should I buy to understand Calculus.  I found "Calculus made easy" been quoted many times as a simple and effective textbook.   I am not sure if it covers similar topics in high school calculus.   I seek your advice.


This is my code, here when i input the  Product name i.e. Laptop/Mobile and then input the price. after that the program does not input eask and simply goes to the eask if-else case and prints the Invalid option as:  import java.util.*;     class Main {           public static void main(String[] args) {             int discount=0,ediscount=1;             Scanner sc = new Scanner(System.in);             String Product = sc.nextLine();             int Price = sc.nextInt();             String eask = sc.nextLine();                      if(Price>100){               if(eask == "Yes" || eask == "No"){                 if(Product == "Mobile"){                 discount = 10;                 if(eask == "Yes")                   ediscount=12;               }               else if(Product == "Laptop"){                 discount = 20;                 if(eask == "Yes")                   ediscount=10;               }               else if(Product == "gadgets"){                 discount = 0;                 if(eask == "Yes")                   ediscount=0;               }               else System.out.println("Invalid product");               }               else                 System.out.println("Invalid option");             }             else System.out.println("Invalid price");                      float TBA = discount * Price;             System.out.println(TBA);           }        }


I am using windows 7. I have set the toolbar to auto-hide. for some reason I can still see the 1 row of pixel form the toolbar even when it is hidden. Any way to make that row invisible?


70-year old short story about thinking way into another dimension, parallel universe

I expect this is from an anthology from about 1950.  It is set on Earth, in the U.S., I believe.  The key part of plot is by walking with his eyes closed down a college path and visualizing very hard that the slope is the reverse of what it "really" is (slightly up instead of slightly down, or vice versa, I don't recall), the protagonist is instantaneously shifted into a parallel world which is technologically very similar but much more restrictive of thought.  The happy ending is an escape via desperately reversing the visualization.  This may well have been in an anthology including a story about a man trapped in a large Möbius strip.  I haven't read this in a lifetime, so I recall no more details.  It may or may not have been a reaction against McCarthyism.


What is the advantage to crushed garlic over minced garlic beyond texture?

I use a lot of garlic in my cooking, especially minced garlic.  But lately I've been doing some more recipes with crushed garlic and while I love the texture of cooked garlic, I can't see how it could be better than minced garlic for the overall taste.  Is there an advantage to crushed garlic over minced garlic, beyond texture?


Bash script copy file to user's (wildcard) home dir

I need to copy /root/nbu/file1.sh to every user's home directory if user's id is even number.  Trying to execute following script:  #!/bin/bash cat /etc/passwd | while read LINE do     username=$(awk -v var="$LINE" -F: '{         if ($3 % 2 == 0)            print $1         }')     cp /root/nbu/file1.sh ~"$username" done   And it does nothing. If I echo cp /root/nbu/file1.sh ~"$username" command and execute it directly in the script, it works.  I guess the problem is that ~ gets expanded in the bash script, but can't figure out how to solve this problem.  Thank you in advance.


Are check-boxes OK in app design, or should I be using native switches?

Switch vs Check-box  Today I had a debate with some of the iOS developers in my team about the check-boxes I have used on our app. They are very opposed to them, much preferring the iOS style toggles instead, as pictured below. I disagree. Here are both our points...  My logic   iOS Switches* - only used when the action remains 'on' or 'off' permanently/consistently. For example, I turn 'on' push notifications and they will remain on throughout the app, unless I go back into settings an turn them off. Behaves similar to Wifi which would be 'on' or 'off', only changing through user interaction     Check-boxes - used when you agree to something e.g 'I am happy to emailed about this' and also for list choices such as a filter for results e.g show me hotel results with 'parking, wifi, lift access, swimming pool'. These choices are NOT carried through on a user journey say 10 days later and would have to be 'checked' again. All check-boxes are minimum 44px in width and height.    Their logic  It's a dated approach of doing things and too aligned to web and mouse use. Even at 44px the touch area is too small and the feedback from the interaction happens under your thumb, so not ideal.  "Show me a decent app that uses checkboxes!", one of them cries! "No one does this!" :D Maybe he has a point?  "iOS design guidelines do not do have check-boxes, so we shouldn't either."  Final thoughts  I am making the assumption that the user see iOS toggles as a switch that will remain 'on' or 'off' foreseeably, until they choose to interact with it again. Therefore I feel it should be distinguished with a different interaction when this is NOT the case. However am I fighting the iOS system and standard Apple behaviors here? To introduce an interaction that is not (supposedly) optimized for thumbs on a mobile device? Hmmmmm. Any thoughts would be greatly appreciated.


I find that in a lot of our group's games, traveling long distances through wilderness is too easy.  In real life, it's quite arduous traveling overland.  No one who's just walked a hundred miles is eager to repeat the trip.  But here's the problem -- for the players, it's trivial to travel a long way.  You just say "then we walk over the Groblick Hills to Dorridge", and you get there.  The players find it easy, but there's no way the characters would be eager to set out on a long stretch across the wilderness.  What can I do to give the players the same feel their characters would have about wilderness travel?  One thing I'd like to avoid (if possible) is to just make it perilous by throwing in a bunch of fantasy monster encounters.  Imagine some hobbits off in Gondor -- sure, they'd love to go home to the Shire, but it's mighty tempting to stay an extra day in the inn before setting off on the journey.


If a creature fails the save against the Sanctuary spell, does "choosing a new target" let it move and retry the attack against the new target?

The  spell description says:  You ward a creature within range against attack. Until the spell ends, any creature who targets the warded creature with an attack or a harmful spell must first make a Wisdom saving throw. On a failed save, the creature must choose a new target or lose the attack or spell. This spell doesn't protect the warded creature from area effects, such as the explosion of a fireball. If the warded creature makes an attack, casts a spell that affects an enemy, or deals damage to another creature, this spell ends.  My question is whether I ruled the above spell correctly based on the scenario below:  Character A casts sanctuary on Character B Creature 1 tries to attack Character B, and fails its Wisdom save against sanctuary. Creature 1 sees that it has enough remaining movement available to reach Character C, and thus moves to Character C and attacks (regardless of whether it has multi-attack or not).  The player who controls Character A (the one who cast sanctuary) feels that since Creature 1 failed the Wisdom saving throw, the attack was wasted and Creature 1 should not have been able to attack Character C. They concede that Creature 1 can move to Character C, but disagree that it should have been able to attack them. However, based on the wording of:  On a failed save, the creature must choose a new target or lose the attack or spell.  ...I feel that a creature can move and make an attack as it does not specify anything about movement speeds, and clearly states that another target must be sought. Was my ruling correct? If not, please explain why.


Is there a guide to learn more about nodes?

I'm interested in nodes, but my understanding of them is lacking. I don't really know what most nodes do or what the connections mean (the yellow, grey and blue dots)


I wanted to reuse older Window XP Dell Latitude D610 machine with Pentium M 1.8GHz processor with 512 RAM. Please advice which Linux OS would be best on this machine.


Hiding/Deactivating "Demote" button on Ideas

I'm looking to implement "Ideas" in an organisation, but they have concerns as to having a "Demote" button being against the spirit of the initiative.  There doesn't seem to be any good options for getting rid of the buttons or the down votes. I can query down votes only after I specify the ID of the Idea, so it can't be caught on creation and there's no customization available for turning off the button. Anyone have any ideas?  Edit: This was an older question, but I was looking for solutions outside of hacking the side bar, it was the worst possible solution and I HATED implementing it. I would not consider this question a duplicate. It just didn't have an answer at the time and I hate seeing unresolved questions. Just because fending off zombies and banging in a nail both require a hammer doesn't mean the problem is the same.


Suppose we have $N$ measurable variables, $(a_1, a_2, \ldots, a_N)$, we do a number $M > N$ of measurements, and then wish to perform  on the results to find the axes of highest variance for the $M$ points in $N$-dimensional space.  (Note: assume that the means of $a_i$ have already been subtracted, so $\langle a_i \rangle = 0$ for all $i$.)  Now suppose that one (or more) of the variables has significantly different characteristic magnitude than the rest.  E.g. $a_1$ could have values in the range $10-100$ while the rest could be around $0.1-1$.  This will skew the axis of highest variance towards $a_1$'s axis very much.  The difference in magnitudes might simply be because of an unfortunate choice of unit of measurement (if we're talking about physical data, e.g. kilometres vs metres), but actually the different variables might have totally different dimensions (e.g. weight vs volume), so there might not be any obvious way to choose "comparable" units for them.  Question:  I would like to know if there exist any standard / common ways to normalize the data to avoid this problem.  I am more interested in standard techniques that produce comparable magnitudes for $a_1 - a_N$ for this purpose rather than coming up with something new.  EDIT:  One possibility is to normalize each variable by its standard deviation or something similar.  However, the following issue appears then: let's interpret the data as a point cloud in $N$-dimensional space.  This point cloud can be rotated, and this type of normalization will give different final results (after the SVD) depending on the rotation.  (E.g. in the most extreme case imagine rotating the data precisely to align the principal axes with the main axes.)  I expect there won't be any rotation-invariant way to do this, but I'd appreciate if someone could point me to some discussion of this issue in the literature, especially regarding caveats in the interpretation of the results.


Clip vector on Geoprocesing QGIS 2.18.13, global name 'features' is not defined

I want to clip a vector polygon with a boundary vector polygon but the process is failing. I am getting the error, "global name 'features' is not defined See log for more details". I don't know what is causing this error.


I'm having a spinal cord stimulator implant fitted soon and travel a couple of times a year to European destinations, although am planning a trip to the USA too:) My concern is although I will be given an i.d card stating I have the implant I will still be subjected to the scanner which I have been told will wipe the memory of the equipment. I have titanium rods/screws etc., in my leg/hips already and have been on the floor being subjected to a 'search' after I set the alarm off previously. Really nervous this will get worse once the implant is in place and I won't be going anywhere if they wipe the programmer. (The implant involves a battery (approx 6"x5") being inserted into the tummy wall with leads up the epidural space and then leads to the pain areas in your body so to an x-ray I will look extremely suspicious:/). Has anybody had problems going through airport security or do I get assisted travel?


Why lipophilic molecules can pass phospholipid bilayer, in spite of 2 hydrophilic layers?

It is commonly told that, hydrophobic/ lipophilic/ nonpolar molecules can quite easily pass phospholipid bilayer, and hydrophilic (polar or ionic) molecules can't pass (when no protein aid that); because hydrophobic nature of the lipid.  But in the same logic, hydrophobic molecules shouldn't pass through the bilayer. Because there are 2 hydrophilic layers in the membrane. i.e.      A and A' .  Then how the hydrophobic molecules can pass through A and A'?   I guess, it is due to thin diameter of A and A' . Is that?


Can a Fighter, with Battle Master Archetype, multiclass with Fighter Champion?

I have a 9th level fighter with Battle Master Archetype. Can I multiclass and take another level of Fighter but to advance in Champion this time as an Archetype?


Prove using the definition of the limit that $\lim_{x\to 0}\frac{1}{x}$ fails to exist.

Prove, using the $\epsilon-\delta$ definition of the limit, that $\displaystyle\lim_{x\to 0}\frac{1}{x}$ fails to exist.  It is obvious that $\displaystyle\frac{1}{x}$ approaches $+\infty$ from the right of $0$ and approaches $-\infty$ from the left of $0$. But how do I show that the limit does not exist using the $\epsilon-\delta$ definition?


What is the sum that the square root button on calculator does so I can do it without the calculator button

I am not very good when it comes to Maths but the current work I am doing means I need to get better and quick.  I have been teaching myself about areas, diagonals and square roots. However I am struggling to understand how the calculator works out the square root. For example I know that a diagonal in a square from corner to corner is approx. $1.414$ of the side distance of the square. so if I have a square that is $a=1 \times b=1$ I can do $a \times \sqrt{2}(1.414)$. I know that the distance of the diagonal is $d=1.414$.  I want to know how to work out the square root without a calculator?  Or am I just getting this whole thing wrong?  Sorry I did say I am not very good at Maths.


Why is the phrase "should have went" so widely used?

Rarely do we hear "should have gone" in common speech.  Some background: My father immigrated to the US in the late 60s. He learned English first overseas, British English. Then he studied extensively in America.   He always corrected me and my brothers on us saying "you/I/they should have went".  And after the 2,762nd time, finally I say "should have gone"  The reason I think it's a valid question is that go/gone/went are pretty ABC words. My guess is that the contraction "should've" is partly to blame - i.e. we speak so fast that we pick the more natural-sounding thing.


How do I iterate through multiple URLs with BeautifulSoup and return a single list rather than a list of lists?

So I'm working on a web scraper function to get movie data from IMDB. While I'm able to get the data I need into a dictionary, because of how I've written the function, it appends a list of lists to the dictionary. I would like to return a single list. So right now I'm getting dict_key: [[A,B,C,D],[E,F,G,H],...] and I want dict_key: [A,B,C,D,E,F,G,H]. Eventually, I want to then take this dictionary and convert it to a pandas dataframe with col names corresponding to the dictionary keys. Here is my function: It takes a list of URLs, HTML tags, and variable names and gets the movie category(s), year, and length of movie. def web_scraper(urls, class_list, col_names):     import requests             # Import necessary modules     from bs4 import BeautifulSoup     import pandas as pd          class_dict = {}     for col in col_names:         class_dict[col] = []          for url in urls:         page = requests.get(url) # Link to the page         soup = BeautifulSoup(page.content, 'html.parser')   # Create a soup object              for i in range(len(class_list)):      # Loop through class_list and col_names             names = soup.select(class_list[i])  # Get text             names = [name.getText(strip=True) for name in names]   # append text to dataframe             class_dict[col_names[i]].append(names)          for class_ in class_dict:        # Here is my attempt to flatten the list         class_ = [item for sublist in class_ for item in sublist]              return class_dict


Change duration of still frames in iMovie 10.0.7

I am making a video that contains both video footage and still frames but I can't find where to change duration of still frames to longer than 4 seconds.  How can I change the duration of a still frame to be longer than 4 seconds in iMovie 10.0.7?


Absolute value proof, $|a|\leq\max\{|x|,|y|\}$

I would like to confirm a proof I made:  For every $a,x,y \in\mathbb{R}$ such that $x≤a≤y$, we have $|a|≤\max\{|x|,|y|\}$.  I assumed that $|x|≤|y|$, so: $-|y|≤a≤|y|$, and that means: $a≤|y|$. Then, I assumed: $|y|≤|x|$, so $-|x|≤a≤|x|$, and that means: $a≤|x|$ From here, I let $b\in\mathbb R$, such that $b=\max\{|x|,|y|\}$ and that means $a≤b$. From here I don't really know what to do or if all I did is true or not. Thank you for your help!


Active flag for over 5 days (and counting) on Stack Overflow

I submitted a custom-reason flag on an answer on "Aug 30 at 11:42", and it is still labeled active. I also have another custom-reason flag on another answer on a different question from "Aug 30 at 13:04" that is labeled active.  Why is this? Has my flag weight changed, or are moderators responding slower than usual to custom-reason flags?


Delete an answered question, when I cannot safely comment on the answer?

I have run into the awkward situation, where I've posted a programming question, and received an answer, that I cannot apply due to project guidelines.  The account under which I posted the question identifies me, or at least for people knowing me, the user name would make it clear. Hence I don't feel comfortable saying "can't accept your answer, because of internal reasons" for fear of it reflecting badly on the company, or annoying my superior.  Now I am a bit stumped how to proceed. I cannot meaningfully reply to the answer, so I'd prefer to rephrase or delete and repost it. Rephrasing would however invalidate the given answer, and deleting answered questions is discouraged.  What is the best practice to proceed in such cases?


Money is necessary to leave the airport in Moscow for ladies

I met agirl from Russia on the site of marriage and I send her a money to issue apasport , after we arrange the tickets for her and sending her 400 $ , she said that she has to have 2000$ to be with her to show this money to government in Moscow to leave her left as she said, without having this money with her she will not allowe to to leave to travel  Should I send her the money ? Or not? Is she lying?


I was checking out the definition of either in dictionary, here is what I found:  one or the other of two things (any of the things will be fine) one and the other of two things (either side of the road)  so, the word "either" can basically mean both any or both, is that right? Let's say I want to say:  Either of these options will do (any of the two options will do)  Can it also mean both of the options will do?


I was making a scene and, due to the bad computer I'm making it on, I have to create the render every time instead of going into render view. Suddenly, the render only showed the background, and I tried to figure out why but all of the normal reasons why that would be the case weren't the case (i.e. hidden, in a different layer). I've only been using Blender for about a month, so please go easy on me. (If you'd like to include a critique of the water or plane/B24 liberator in your answer, please do!)  Before:   After:  Render:


In set-theory, one of the standard result (Bernstein's theorem) is that if there is an injection from $A$ to $B$ and an injection from $B$ to $A$, then there is a bijection from $A$ to $B$.  Consider similar situation on sets with some algebraic structures, say $A$ and $B$ are fields. If there is an injective homomorphism from $A$ into $B$ and also from $B$ into $A$, can we conclude that $A$ and $B$ are isomorphic fields?


I can no longer see the day of the week by hovering over the date on my Dell latitude using windows 7. Going to  Control panel/ region & Language  / Formats +/- Additional settings doesn't give a dddd option.


What statistical analysis should I use for Likert-Scale data?

I am trying determine if there is a significant difference in preference of activities between males and females.I'm using a survey with the following question on 7-point likert scale:  Question 1: I like activity 1. Strongly disagree ---- Strongly agree  Question 2: I like activity 2. Strongly disagree ---- Strongly agree  Question 3: I like activity 3. Strongly disagree ---- Strongly agree  What statisical analysis could I use to determine if there is a significant difference in preference and what activity is most prefered by the sexes?


Why do I have problems with my chat scroll?

I am using jQuery and sockets to create a chat. This is the event that listens to the socket to send messages to the server that will then be shown on screens and it works.   socket.on('new message', function(data) {         if(data === "") return false;          $chat.append(`${data} <br />`);         $chat.scrollBottom = $chat.scrollHeight;         });   });   and I have the id #chat with a css property:    #chat {         overflow:auto;       }   That helps me to scroll, but the scroll bar stays on the top and does not go down with the messages. What I can do?


How to remove the separation line above the footnotes?

I would like to remove, or in other situations customize, the separation line before the footnotes. At this moment I am working with \documentclass{beamer}. Solutions that are beamer-specific or class-agnostic are equally welcome.  Minimal working example:  \documentclass{beamer} \usetheme{Warsaw} \title[Footnotes and separation lines]{Footnotes and separation lines} \institute[]{Tex StackExchange} \author{Xavier Stuvw} \date{11 Sept 2018}  \begin{document} \begin{frame}{This is the first title} This is the first frame \footnote{first footnote: it has a line on top} \end{frame} \end{document}


Remove only the commas present within the double quotes

In a text file, I want to remove , (commas) and also the " (quotes) (only if the double quotes  contains  numbers separated by commas).  56,72,"12,34,54",x,y,"foo,a,b,bar"   Expected ouput  56,72,123454,x,y,"foo,a,b,bar"   Note: I show the above line just as an example. My text file contains many lines like above and the numbers separated by commas present within the double quotes should vary. That is,  56,72,"12,34,54",x,y,"foo,a,b,bar" 56,92,"12,34",x,y,"foo,a,b,bar" 56,72,"12,34,54,78,76,54,67",x,y,"foo,a,b,bar" 56,72,x,y,"foo,a,b,bar","12,34,54" 56,72,x,y,"foo,a,b,bar","12,34,54","45,57,84,92","bar,foo"   Expected output:  56,72,123454,x,y,"foo,a,b,bar" 56,92,1234,x,y,"foo,a,b,bar" 56,72,12345478765467,x,y,"foo,a,b,bar" 56,72,x,y,"foo,a,b,bar",123454 56,72,x,y,"foo,a,b,bar",123454,45578492,"bar,foo"   There a n number of numbers present within the double quotes separated by commas. And also leave the double quotes which contains characters as it is.  I love sed text processing tool. I'm happy if you post any sed solution for this.


How can I reference a specific enumeration by an integer?

namespace ChemicalTest {      enum Echemicals { oxygen, hydrogen, carbon }      public class Chemicals     {         int[] chemicals = new int[3];          public Chemicals()         {             foreach (int i in chemicals)             {                 int[i] = //How can I reference each enumeration here?                          //For example (pseudocode) - (i)Echemicals             }         }     } }   I have three enum values: oxygen {0}, hydrogen{1}, carbon{2}  I'd like to put each of these enums into an array to later be referenced by their own number, so that I could call them from the array.  I can use (int)Echemicals.hydrogen to return the default value of the second enumeration {1} but I don't know how to do this in reverse.  I am trying to store each of the names of the chemicals in an array by calling them by their integer value.


What happens to my Windows 10 license when I install fresh on a new SSD?

I have Windows 10 Home with a license running off of an HDD in my laptop.  I would like to replace the HDD with an SSD and then install a fresh copy of Windows 10 Home on the SSD.  What will happen to my license? Will the Microsoft license servers recognize that my copy is licensed or is there any action I need to take to move the license from the old HDD over to the new SSD?


Differences between String[][] name & String name[][]

When i was implementing my codes in jtable in swing, i realized from their tutorial website. They use[][] as the code shown below. Ive tried searching throughout to find the use case but i am unable to find. The only link i found was   String arr_a[][] = {{"HelloWorld 1"},{"HelloWord2"}};   Currently, i am working on creating an object array to place it insde data..  ArrayList<String> Arr = new ArrayList<String>();     Arr.add("Farid");     Arr.add("Farid_2");      Object[] DName = new MyData[Arr.size()];         for(int i = 0; i < DName.length;i++){             DName[i] = new MyData(Arr.get(i));             System.out.println(DName[i].toString());         }     //-- How do we implement DName in data[][]          String data[][];         ....         ....   For an example , it have to be in this form to display the values in jtable based on what is shown in the tutorial website  String data[][] = {{"test_1"}{"test_2")};   Thank you in advance


unable to install mongodb due to unmet dependencies 20.04

I am trying to run sudo apt-get install -y mongodb-org to install a mongodb server on my copy of ubuntu 20.04. I am receivcing this when I run the commmand      Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help resolve the situation:  The following packages have unmet dependencies:  mongodb-org : Depends: mongodb-org-shell but it is not going to be installed                Depends: mongodb-org-server but it is not going to be installed                Depends: mongodb-org-mongos but it is not going to be installed                Depends: mongodb-org-tools but it is not going to be installed E: Unable to correct problems, you have held broken packages.   How do I fix this


I have the following identity which I want to prove:  $$\frac{d}{dt} det(A+tB)|_{t=0} = Tr( Cof(A)^TB)$$  where $Cof(A)$ is the cofactor matrix of $A$, and $A$ is an $n\times n$ complex matrix. The reference is exercise 2 in section 1 of chapter 1 of Basic theory, volume I of PDE by Michael Taylor's book (2011 edition).  I tried the definition, i.e:  $$\frac{d}{dt}\det(A+tB)|_{t=0} = \frac{d}{dt}|_{t=0} \sum_{\sigma \in S_n} sgn(\sigma) \prod_{i=1}^n (a_{i\sigma(i)}+tb_{i\sigma(i)})=$$ $$= \sum_{\sigma \in S_n } sgn(\sigma) \bigg[ b_{1\sigma(1)}\prod_{i=2}^n a_{i\sigma(i)}+\ldots + b_{n\sigma(n)} \prod_{i=1}^{n-1} a_{i\sigma(i)}\bigg]$$  How to proceed, I am not sure how does the cofactor of $A$ will look like in the notation with permutations, otherwise what is the missing step in the proof?  Thanks in advance.


I use LaTeX on a Mac, using TeXShop. It is possible to compile an index from within the TeXShop interface, except when I have more than one index (say, people and concepts) for the same text. In this case I used to compile it from Terminal:  makeindex MyIndex   say. But since I went from Mac OS 10.5 to 10.6 (Snow Leopard), the latter does not work anymore (albeit normal, single-index compilation from within TeXShop works fine). Any idea?


Time complexity of pop with an argument in python?

EDIT: This is a duplicate question, but I had trouble understanding the wiki page despite reading the accepted answer there. I just added an answer to that question, which also covers the time complexity for the average case and amortized worst case scenario.  This  says that when you pass in an argument to a list's pop method that its worst case time complexity is O(k) with k referring to the number passed in for k or the number of elements in k.  However, if say I pop the 3rd index of a list of 11 elements wouldn't everything after the 3rd element of the list have to be re-adjusted making the average time complexity O(n-k) And since you could remove the first element of a list wouldn't the worst case time complexity be O(n)?  list1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] list2 = list1 print(list1[3]) # d list1.pop(3) print(list1) # ['a', 'b', 'c', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] print(list1[3]) # e print(id(list1) == id(list2)) # True (They're still the same item in memory)   Is there some unique way Python implements lists under the hood that I'm not understanding? Or is the wiki wrong?


Why is blood needed to sign a summoning contract and to use the summoning jutsu?

In Naruto, I have seen that to create summoning contract and to use summoning jutsu, the user uses their own blood.  Why is this required? What is the significance of using blood here?


Structure theorem of modules in the graded case

I ran into an exercise in D. Passman's book A Course in Ring Theory (page 130) asking me to prove the structure theorem of modules over PIDs in the graded case.      Find all finitely generated graded $K[x]$-modules up to abstract isomorphism. Remember, $K[x]$ is a principal ideal domain.   Could anyone point me in the right direction?  An attempt of proof:  Let $M$ be a finitely generated $K[x]$-module with the set of generators $\{b_i\}$ of minimum cardinality. Let $K[x]^n$ be the free graded $K[x]$-module of rank $n$ with the standard grading and basis $\{e_i\}$.   Now define a homomorphism of modules $\phi:K[x]^n \rightarrow M$ by setting $\phi(e_i)=b_i$. Since $\{b_i\}$ generates $M$ this is surjective and by the First Isomorphism Theorem for modules we have $K[x]^n/\ker{\phi} \cong M$. Since $K[x]^n$ is a free module over a PID of finite rank, and $\ker{\phi}$ is a submodule, than $\ker{\phi}$ is free of rank $m\leq n$, and moreover there is a basis $\{y_i\}$ of $K[x]^n$ such that $a_1y_1, a_2y_2, ..., a_my_m$ is a basis for $\ker{\phi}$, for $a_i \in K[x]$. One can find a proof of this in Dummit & Foote - Theorem 4 (p. 371), and a lot of other places. It is also evident that $(a_i)$, for $1 \leq i \leq m$, are ideals in $K[x]$, and since it is a graded PID they are of the form $(x^n)$.  Now we define a surjective homomorphism $\varphi$ $$\varphi: K[x]y_1 \oplus \cdots\oplus K[x]y_n\rightarrow \Sigma^{\deg(y_1)}K[x]/(x^{q_1}) \oplus \cdots\oplus \Sigma^{\deg(y_m)}K[x]/(x^{q_m}) \bigoplus_{i=1}^{n-m} \Sigma^{\deg(y_{m+i})}K[x]$$  by mapping $(\alpha_1y_1,...,\alpha_my_m) \rightarrow (\alpha_1\bmod(x^{q_1}),...,\alpha_m\bmod(x^{q_m}),\alpha_{m+1},...,\alpha_{n})$.  $\Sigma^n$ is an $n$-shift upward in grading.  Now the kernel of $\varphi$ is obviously $K[x]x^{q_1}y_1\oplus \cdots \oplus K[x]x^{q_m}y_m$ which is isomorphic to $\ker \phi$, and therefore the image of $\varphi$ is isomorphic to $M$: $$(\bigoplus\limits_{j=1}^{m} \Sigma^{\deg(y_j)}K[x]/(x^{q_j})) \oplus (\bigoplus\limits_{i=1}^{n-m}\Sigma^{\deg(y_{m+i})}K[x])\cong M.$$


Is it possible to sort non-stackable items in minecraft?

are super sweet.  But, I have a skeleton farm, and am getting tons of non-stackable drops.  Since armor can be smelted into iron/gold, I'd like to smelt those drops in a furnace, and burn bows in a furnace.  And trash all leather armor.  Is there a way to sort out these non-stackable items in vanilla survival?


Why cancer does not occur in myogenic heart cells? Is there any special ability in heart cells to resist cancer ?


I'm stuck in this question: How calculate this determinant ? $$\Delta=\left|\begin{array}{cccccc} 1&2&3&\cdots&\cdots&n\\ n&1&2&\cdots&\cdots& n-1\\ n-1&n&1&\cdots&\cdots&n-2\\ \vdots &\ddots & \ddots&\ddots&&\vdots\\ \vdots &\ddots & \ddots&\ddots&\ddots&\vdots\\ 2&3&4&\cdots&\cdots&1 \end{array}\right|$$ Thanks a lot.


I am going to be moving a HDD from one computer to another identical one. Can I just switch out the hard drives, or will I have to dd the old one onto the one that is already in there?


How to get the last date of record from multiple table in Oracle SQL

Wrote this SQL and just need some help how to show the last WO created date on my sql. I tried the max(evt_created "WO Date Created" and group all my selected field and it's not working.  select obj_udfchar09 "700 Whse - Slot #", obj_person "Assign To", obj_category "Category", obj_class "Class", obj_commiss "Commission Date", OBJ_COSTCODE "Cost Code", R5REP.REPGETDESC('EN','PERS',obj_user,NULL,NULL) "Created By", OBJ_CREATED "Date Created", obj_mrc "Department", obj_desc "Description", obj_variable1 "Equipment Book #", obj_code "Equipment/Asset Tag", obj_location "Location", obj_udfchar03 "Maintenance Division", obj_manufact "Manufacturer", obj_manufactmodel "Model", obj_notused "Out of Service", obj_variable2 "Part", obj_production "Production", obj_variable5 "Refrigerant Amount", obj_variable6 "Refrigerant Type", obj_serialno "Serial Number", STC_PARENT "System", STC_PARENTTYPE "Type", EVO_TOTAL AS "Cost Summary", evt_code "WO", evt_created "WO Date Created", stc_parent "System Code",      nvl(      (select sum(nvl(a.evo_total, 0))       from r5eventcost a        where a.evo_event in (select evt_code                  from r5events                  where evt_object = obj_code                  and evt_object_org = obj_org                 and evt_rstatus in ('R', 'C')                 and evt_rtype in ('JOB', 'PPM'))), 0)       +       nvl(      (select sum(nvl(b.avc_total, 0))       from r5eventcost_archive b        where b.avc_event in (select aev_code                  from r5events_archive                  where aev_object = obj_code                 and aev_object_org = obj_org                 and aev_rstatus in ('R', 'C')                 and aev_rtype in ('JOB', 'PPM'))), 0) "Total Cost"   from r5objects, r5structures, r5events, r5eventcost  where obj_code = stc_child (+) and obj_rstatus = 'I' and obj_code like '1%' and EVT_CODE = EVO_EVENT (+) AND EVT_OBJECT = OBJ_CODE (+) and obj_code in ('1064016','1004188','1108146') and STC_PARENTTYPE = 'S'


What algorithm is used in linear regression?

I usually hear about "ordinary least squares".  Is that the most widely used algorithm used for linear regression?  Are there reasons to use a different one?


how to lift ban from answering any topic

If any of us find ourselves facing difficulty or problems in submitting an answer for any question asked in StackOverflow and you are getting this message "answer from your account is banned" then please see below, as it should be as helpful for you as it was for me.  This will be ended we earn a minimum of 10 reputation. As their are certain restrictions on new users for answering any questions randomly, this will be lifted asap once you get 10 reputation.  Question: If you have restrictions on answering questions, how are you supposed to be able to ever earn this 10 minimum reputation?


According to Ohm's law,$$ \left[\text{voltage}\right]~=~\left[\text{current}\right] \times \left[\text{resistance}\right] .$$Does that mean if there is no resistance, then there can be no voltage? Why is that so? If you make a circuit with no load, and no resistors, why does the voltage have to be zero?


I just got a 35mm f/1.4 lens and wanted to see if it has any focus issues to be fixed. So I got this kit and not sure what exactly I should have done but I focused on the middle of that bar code like area where it was bent and took the shot. To my eyes ( and I don't have good eyes) feels like Zero of the ruler is in focus but at the same time I feel like nothing is sharp enough. So I uploaded the image here in DropBox, please take a look and tell me what you think.


Ubuntu 14.04 “could not find required OpenGL entry point 'glGetError'!"

I am trying to play Dota2 and FT2 on my pc when I got this error:     "Could not find OpenGL entry point 'GLGetError'! Either your video   card is unsupported or it needs to be updated."   I have spent the last week reading all of the similar questions and have tried some of them (many solutions were to advanced for me to try so I stayed away from them) and I do not know what else to do. If there is any other information needed just ask.  I am using:   Ubuntu 14.04 32 bit GLX version is 1.4 OpenGL version string: 1.4 Mesa 10.1.3 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) (prog-if 00 [VGA controller])   -  libgl1-mesa-glx:
   Installed: 10.1.3-0ubuntu0.1
   Candidate: 10.1.3-0ubuntu0.1
   Version table:
  *** 10.1.3-0ubuntu0.1 0
         500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
         100 /var/lib/dpkg/status
      10.1.0-4ubuntu5 0
         500 http://us.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages


Another solution to the problem of finding the interior points and limit points of $A=\{(x,y):x^2+2y^2<1\}$

Find out all interior points and limit points of $A=\{(x,y):x^2+2y^2<1\}$ ($(x,y) \in \mathbb R^2$)  I've got an answer from original post but as i'm not familiar with this subject, I cannot understand the solution. Is there any other solution?


Interplay between early stopping and cross validation

I am a little bit confused by early stopping and in particular by how it can be inserted inside a CV framework. As far as I understand, I can fix the optimal number of epochs (for NN, or number of trees for XGB) by early stopping, that is:   pick a validation set, train with increasing number of epochs until a predefined metric evaluated on the validation set starts worsening that is the optimal number of epochs to prevent overfitting   and that's fine. But then I would like to insert this early stopping framework inside a CV framework: Suppose I have a model with 10 hyperparameters I want to fix via CV. And suppose that there is an eleventh hyperparameter, the number of epochs. My feeling is that one can do like this:   create the K resampled folds, for each of which you have a training and validation set choose a suitable grid for your 10 hyperparameters for each point on the grid train your model in each fold with early stopping, that is use the validation set of the fold to keep track of the preferred metric and stop when it gets worse take the mean of the K validation metric choose the point of the grid (i.e. the set of hyperparameters) that gives the best metric   Questions:   What number of epochs should I choose as optimal? in each of the K folds I have, in general, a different number of stopping epochs.  seems to suggest they take the mean of the K stopping epochs. Is this right? Is it actually a "fair" practice to use the validation metric coming from the early stopping as a proxy of the out-of-sample metric? As  in section 3.4.5, maybe the best thing to do would be:     ...if you want to do early stopping, then in each fold you should take your training set and split it again, holding out a small early-stopping-set to guide the early stopping, and then evaluate the model on the validation set of that fold.   But this seems to me a really intricate process...   Unfortunately, I wasn't able to find references where this issue is presented in a clear and transparent form.


How do I get the feature id after featureAdded signal (PyQGIS)?

I'm trying to make an edit form in QGIS (Python code) ,and i want after feature drawing to get the id, and the feature to be selected. Do you have any ideas to do that?  Tried so far:  self.iface.activeLayer().featureAdded.connect(self.myfonction)  def myfonction(self):      for feat in self.iface.activeLayer().getFeatures():         self.iface.activeLayer().setSelectedFeatures([feat.id()])


'One out of three people thinks' or 'one out of three people think'?

Could someone please explain to me which of these sentences is correct and why?        Only one out of three respondents (29%) thinks otherwise.     Only one out of three respondents (29%) think otherwise.      I understand that the subject of this sentence is singular, and therefore, theoretically, the verb should be singular, but this just doesn’t sound right.  Could someone please help?


Good morning. !!!  We want to develop a platform for machine learning using data from sensors.  The language used in the project is C# winform.  I want to excuter python from c# winform.  With winforms as the UI I want to run the analysis with python and see the results.  numpy, pandas, etc...  Python code for running a machine.  I would like to advise you if you know someone who has been worried about me or how.   thanks!!


send instructions to blender from external application

I need to send instructions to blender trough an external application.  for example: import model to current scene   Is this possible? Can someone point me in the right direction based on previous experience.  Thanks in advance  Ghus


electric charge is a intrinsic property how is there a prpoer way to explain electric charge?

how to define electric charge ? How to explain this term ? As learned by me  electric charge is an intrinsic property of atoms like mass of different atoms.


While I am slowly learning how to build an android game, I would like to build images for a game, especially texture atlas.   But the only image handling system I am familiar with is Photoshop. And I am not sure it is a good tool to organize images and to get coordinates for game dev.   Is there any good tool for this purpose? If photoshop is still good for this, any reference to show how to do it would be appreciated.  UPDATE: the second question was  But still want to hear more options.  UPDATE2: In case you are using libgdx, I found .


Sorting an Array of Objects in PHP In a Specific Order

I have two arrays in PHP. The first array ($author_array) is comprised of user_ids in a particular order, like so: (8, 1, 6)  The second array ($user_results) is comprised of an array of objects like so:  Array (     [0] => stdClass Object         (             [ID] => 1             [user_login] => user1         )     [1] => stdClass Object         (             [ID] => 6             [user_login] => user6         )     [2] => stdClass Object         (             [ID] => 8             [user_login] => user8         ) )   I'd like to "sort" the second array so it's in this order, which matches the order of the values in the first array of (8, 1, 6). So it'd look like this:  Array (     [0] => stdClass Object         (             [ID] => 8             [user_login] => user8         )     [1] => stdClass Object         (             [ID] => 1             [user_login] => user1         )     [2] => stdClass Object         (             [ID] => 6             [user_login] => user6         ) )   I'm weak on data structures. How could I do this? :-)  Thanks in advance for your help!  -Bob


I converted my "normal" Javafx project into a maven project to generate a modular image. Now I get this error pressing a menu button to load a fxml file. Despite the error, the fxml is still loaded. @FXML private AnchorPane content = new AnchorPane(); @FXML private Menu diagramOptions; @FXML void openSimpleMode(ActionEvent event) throws InvalidFileFormatException, IOException {     diagramOptions.setVisible(true);     FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/SimpleMode.fxml"));     Node simpleModePane = null;     try {         simpleModePane = loader.load();     } catch (Exception e) {         System.out.println("error in loading pane");     }     content.getChildren().clear();     content.getChildren().add(simpleModePane);     simplecontroller = loader.getController();     if (simplecontroller != null) {         simplecontroller.initData(ldfParser, methods, this);     } else {         System.out.println("null Pointer exception");     }      System.out.println("error after this"); }  if I delete diagramOptions.setVisible(true); the error did not appear full stacktrace: Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.control.MenuButton.getScene()" because the return value of "javafx.scene.control.skin.MenuButtonSkinBase.getSkinnable()" is null     at javafx.controls/javafx.scene.control.skin.MenuButtonSkinBase.lambda$new$7(MenuButtonSkinBase.java:188)     at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)     at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)     at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)     at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)     at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)     at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)     at java.base/java.lang.Thread.run(Thread.java:832)  Before converting it into maven everything works fine


Hibernate: Difference between session.get and session.load

From the API, I could see it has something to do with proxy. But I couldn't find a lot of information on proxy and do not understand the  difference between calling session.get and session.load. Could someone please explain or direct me to a reference page?  Thank you!!


error while installing gnome in ubuntu 14.04

i have tried installing gnome from repositories i.e. from ubuntu software centre but it shows this error while installing    currently i am having AMD graphic card gallium 0.4 on AMD rs780 so can it support gnome complexities


Finding and printing duplicates in a string Arraylist

Would anyone know the most efficient way to look for duplicates in a String ArrayList and print out the duplicates?  For example I have an ArrayList containing the following:  ArrayList<String> carLIST = new ArrayList<String>(); carLIST = {"Car1", "Car2", "Car3", "Car1", "Car2", "Car2"};   Basically anything in the list more than once I'm looking to find the duplicates (which I think I've done below) and also return a System.out.println(); to show the following:  Car1   :   count=2  Car2   :   count=3  Map<String,Integer> repeatationMap = new HashMap<String,Integer>(); for(String str : carLIST) {     if (repeatationMap.containsKey(str) {         repeatationMap.put(str,repeatationMap.get(str) +1);     }     else {          epeatationMap.put(str, 1);     }  //  if (repeatationMap.get(str) > 1) { //       System.out.println(repeatationMap.entrySet()); //  } }   The code commented out is what I thought it would be to print out the duplicates but I'm seriously wrong! Have no idea how to print out the duplicate cars in the list and show its count.


I understand that both can be used to find eigenvalues and eigenvectors as  $Ax=\lambda x\iff Ax-\lambda x=0 \iff x(A-\lambda I)=0\iff  |A-\lambda I|=0$ And in the same way $Ax=\lambda x\iff 0=\lambda x-AX \iff x(\lambda I-Ax)=0\iff  |\lambda I-A|=0$  So the different between the two will be by plus/minus sign in the characteristic polynomial?  for example $A=\begin{pmatrix}  2 & 0 &1 \\ 0 & 3 &0\\ 1 &0 &2 \end{pmatrix}$ will be $f_A(\lambda)=(\lambda-3)^{2}(\lambda-1)$ for $|\lambda I-A|$ and $f_A(\lambda)=-(\lambda-3)^{2}(\lambda-1)$ for  $|A-\lambda I|$


Question about the partitioning during installing Ubuntu 14.04

During the installation of Ubuntu 14.04, should I locate the "boot" partion after or before the "swap" partition, and what should I choose for the "boot" partition "primary or logical","at the beginning of the space or the end"?


We have a site with categories and subcategories.  If anybody navigates to a content belongs to a subcategory the url will have the following form: domain/main-category/sub-category/mycontent/ But we need another form: domain/main-category/mycontent where mycontent belongs a subcategory inside main-category, but we don't want the subcategory to be displayed in the URL.  Is there any possible solution for this?


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


How do terrain-based unit promotions work?

If I promote a unit so that it is better a fighting of rough terrain for example.  When I am in combat and attacking an enemy, who needs to be in the rough terrain them or me for me to receive the bonus?


Do I need a visa to transfer from Haneda airport to Narita airport?

I am planning to fly from China to the USA. One of the optiona is from Beijing to Haneda and then Narita to the USA? Do I need a Japanese visa for this transfer with my Chinese passport?


Problems with headphones since the last update of Pulseaudio

Because I had a lot of problems with it, I can't connect devices (headphones) from bluetooth when before the last update I can perfectly connected it. Since 20.04 I had some problems with Pulseaudio on a lot of laptops. Don't know why's this happening, but that's another topic to talk. PD: I tried with puvacontrol, alsa force-reload, reinstall pulseaudio and delete the config. None of these did make it works.


I'am getting this kind of message while updating my ubuntu 16.04 LTS:  W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1) W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 3B068FB4789ABE4AEFA3BB491397BC53640DB551 uses weak digest algorithm (SHA1)   Can anyone help me?


What additional steps would I need to take in order to listen for the select2:select on a cloned select2?  I have tried .clone(true), $('.myclass').select2('destroy'); at the beginning of the click function, and refreshing DOM with $('#table tbody').hide().show(0);.  This appears to be the recommended way based on this GitHub issue.      $('.myclass').select2();  $('.myclass').on('select2:select', function(e) {  alert('foo'); });  $('#addRow').click(function() {   $('#table tbody').append($('#table tbody tr:last').clone());   $('#table tbody tr:nth-last-child(2) select').addClass('myclass');   $('.myclass').select2();   }); .hidden {   display:none; }   <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/css/select2.min.css" rel="stylesheet"/>

             <select class="myclass">         <option>1</option>         <option>2</option>         <option>3</option>       </select>

              <select id="clone" class="hidden">         <option>1</option>         <option>2</option>         <option>3</option>        </select>

   <button id="addRow">     Add Row    </button>


What are the advantages of using the Wubi installer? Can it be used for dual booting Windows XP 32-bit with  Ubuntu? Also is it possible to use Wubi for installing Ubuntu 32-bit version? A step-by-step explanation would be helpful.


Pass shell variable as a /pattern/ to awk

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


‘tell a story’ or ‘tell the story’ in a single sentence

The single sentence:     The novel tells the story of a salesman.   Can I say:      The novel tells a story of a salesman?   I chose a story, but the answer is the story.


Prepending a timestamp to each line of output from a command

I wish to prepend a timestamp to each line of output from a command. For example:  foo bar baz   would become  [2011-12-13 12:20:38] foo [2011-12-13 12:21:32] bar [2011-12-13 12:22:20] baz   ...where the time being prefixed is the time at which the line was printed. How can I achieve this?


How to disable app relaunch and window restore in El Capitan on reboot?

How do I disable  both the "relaunch apps after reboot" feature as well as the "reopen windows at relaunch" feature?  When I reboot (be it after a hard reset or reboot command) I want to be presented with a blank desktop and not everything I had open before.  Also, when I open an application, I don't want the dozen things I was working on previously to open all at once.


As an F1 visa holder, do I need transit visa for travelling through the US earlier than 30 days before the start date of my study?

I have a valid F1 visa (date of issue: June 14), which I can use to enter the US starting from July 24 (30 days before the start date of my study). Do I need a transit visa on July 21 to pass through the US? (I will switch planes at Chicago, then continue to Canada - I also have a Canadian tourist visa)


null pointer exception error while mentioning realm query

Error said :     E/AndroidRuntime: FATAL EXCEPTION: main      Process: myname.myapp, PID: 8504      java.lang.RuntimeException: Unable to start activity >ComponentInfo{myname.myapp/myname.myapp.MainActivity}: >java.lang.NullPointerException: Attempt to invoke virtual method >'io.realm.RealmQuery io.realm.Realm.where(java.lang.Class)' on a null object >reference   ...   at myname.myapp.MainActivity.loadFoodlist(MainActivity.java:591)   at myname.myapp.MainActivity.onCreate(MainActivity.java:91)   My code :  #591 RealmQuery<Food> query = realm.where(Food.class); #91  foodList = loadFoodList(realm);


Is it possible to cross the border at Wagah with a private car?

I'm an Indian citizen planning to travel from Jeddah (Saudi Arabia) to Calicut (India) by car. I want to know whether I can cross the border at  with my car.


Package repository down, how to relocate?

I would like to use the function of TeXnicCenter 1.0, where is automatically downloads missing packages used. The problem is, that the repository it wants to download from does not exist anymore (the one on piotrkosoft.net).  How do I get TeXnicCenter to try with another repository?


Bibtex: How to input accentuation on url?

I am trying to use bibtex to output the url from a reference, but it's not working because the  url has accentuation, just like below:  url = {http://www.epe.gov.br/mercado/Documents/Série\%20Estudos\%20de\%20Energia/20130117_1.pdf},   The output is:  http://www.epe.gov.br/mercado/Documents/S\unhbox\voidb@x\ bgroup\let\unhbox\voidb@x\setbox\@tempboxa\hbox{e\global\ mathchardef\accent@spacefactor\spacefactor}\accent19e\ egroup\spacefactor\accent@spacefactorrie%20Estudos%20de% 20Energia/20130117_1.pdf   Is there a way to protect the accentuation when it enters on url environment?


How to find maximum likelihood estimation of parameter $\theta$ from sample $X_{1},...,X_{n}$?

I need to find maximum likelihood estimation of parameter $\theta$ from sample $X_{1},...,X_{n}$ of distribution set by formula $p(x)=\frac{1}{2}e^{|x-\theta|}$.  My approach is basic: $L(\theta) = \prod_{i=1}^{n} p(x)$ and corresponding $LL(\theta) = ln(\prod_{i=1}^{n} p(x))=... =\frac{1}{2}\sum_{i=1}^{n}(|x_i-\theta|)$. Then my idea is to reorder $X_{1},...,X_{n}$ such all $X_{1},...,X_{k} < \theta$ and  $X_{k+1},...,X_{n} \geq \theta$. It helps to get rid of abslolute values, however after taking derivative of $LL(\theta)$, I get something odd.


I've noticed that some of the Hawaiian/Okinawan purple sweet potatoes I boil will have brown spots inside the flesh, while others do not. What causes these brown spots? Are these safe to eat? I've tried to be careful when selecting the ones I get from the store, insuring there is no visible mold, discoloration, abrasions, or soft spots, yet I keep getting potatoes like this.   Brown spotted potato on left, normal color potato on right in the image.


Does the Be Nice policy require SE users to "be nice" to people who are not SE users (e.g. public figures)?

I've seen users remark that it is not a violation of the  to insult people who are not SE users -- i.e. that users are only required to "be nice" to other SE users. Usually this is stated in order to excuse insults made toward public figures (like politicians). Is that true? Does the Be Nice policy apply only when referring to other SE users?  Parts of the Be Nice policy suggest that it only applies when referring to other users, e.g.:     In summary, have fun, and be good to each other.   On the other hand, other parts of the policy don't seem to make any distinction between users and non-users:     Your tone should match the way you'd talk in person with someone you respect and whom you want to respect you. If you don't have time to say something politely, just leave it for someone who does.   I would think that the Be Nice policy applies when referring to non-users as well, but I can't find a specific statement that it does. Since some users think it does apply and others think it doesn't it'd be nice to have a definitive statement whether it does or not.


What is the most reliable way to get a Windows 8/8.1 computer into Advanced Startup Options menu?

I would like to know what the best way to get a computer running Windows 8 or 8.1 into the light blue Advanced Startup Options menu is.  Also list the ways to get into Safe Mode if different from the ways above.  If possible, account for the fact that something is wrong with the computer and they cannot log in. Also, while I realize that SHIFT+F8 is a good way to get into the menu, most computers nowadays are "too fast" to see it.  My video drivers are broken, so it's kind of hard to open a command prompt. I'm not even sure if I am logged in or not.


How can I create an action in Photoshop?

How can I create my own Action using Photoshop? Can anyone guide me with a simple example?


memory allocation for static singleton class object

For below singleton class where would be the memory taken from (Stack or Global memroy)  class Singleton {     public:          static Singleton* get()         {             static Singleton instance;             return &instance;         } };


Is it possible to create a point within a Polygon (not a centroid)?

Is it possible (without writing Python code - sorry I'm not a developer) to create a point layer from a polygon layer but ensure the point is within the polygon? The ftools centroid tool is cool but some centroids are created outside the polygon (i.e. irregular polygon). In ArcGIS there is a "Feature to Point" tool similar to the ftools 'polygon centroids' tool but has a checkbox to force the point to be within the polygon.


How to clear recent history in Xubuntu 12.04

First, I know how to do it in Ubuntu. I could use Activity Log Manager to clear recent history.  However, it does not work on Xubuntu 12.04. The "recently used" history is always there after I tried using Activity Log Manager to clear all history.  In addition, BleachBit and Activity Journal both do not work.


how to optimize ZipOutputStream to use less ram memory

I am using this code to download zip file containing jasper reports. How can I use less memory on my Servlet? Can I use disk space instead of memory? or is there any other way so that my server will not give me an error saying "out of memory" if many users will try to download zip file at the same time or if the zip file size is huge.     public void zipJasper(List<JasperPrint> print) {         ByteArrayOutputStream baos = new ByteArrayOutputStream();         ZipOutputStream out = new ZipOutputStream(baos);         try {             int k = 1;             for (int j = 0; j <= print.size(); ++j) {                 byte[] buffer = new byte[1024];                 byte[] pdfAsBytes = JasperExportManager.exportReportToPdf(print.get(j));                 ByteArrayInputStream fis = new ByteArrayInputStream(pdfAsBytes);                 zipfile.putNextEntry(new ZipEntry(print.get(j).getName() + ".pdf"));                 int length;                 while ((length = fis.read(buffer, 0, 1024)) > 0) {                     zipfile.write(buffer, 0, length);                 }                 //    zipfile.closeEntry();                 // close the InputStream                 fis.close();             }             //   zipfile.close();         } catch (JRException ex) {             log("An error occured", ex);         } catch (IOException ex) {             log("An error occured", ex);         } finally {             try {                 // Flush the stream                 zipfile.flush();             } catch (Exception e) {             }             try {                 // Close the stream                 zipfile.close();             } catch (Exception e) {             }         }     }


When using algorithmx you get "Algorithm 1 algorithm name". How can you change the label "Algorithm"? I do not mean individually for each algorithm, but instead changing it globally the whole latex project. The reason for this is because I rather want it to say "algoritme", which is algorithm in Norwegian.     \documentclass{article} \usepackage[norsk]{babel}  \usepackage{tabularx} \usepackage{apacite} \usepackage{hyperref} \usepackage{enumerate} \usepackage[normalem]{ulem} \usepackage{color} \usepackage[noend]{algpseudocode} \usepackage{algorithm} \begin{document}  \begin{algorithm} \begin{algorithmic}[1] \State a \label{a} \caption{name} \end{algorithmic} \end{algorithm}  \end{document}


Why I was unable to call the class member even after declaring the member as protected

The two classes are in the same package(Vehicle and Use). public class Vehicle {         protected int speed;         int name;         int seats; }  public class Use {     public static void main(String[] args)     {         Vehicle v = new Vehicle();         v.speed = 150;                      // No Error         System.out.println(v.speed);     } }  But, In a different package, even after making speed protected, I am unable to use it public class Use2 extends Vehicle {     public static void main(String[] args)     {         Vehicle v = new Vehicle();         v.speed = 150; //error     } }


A black hole, neutron star or any object that has accumulated an accretion disc, sometimes features opposing jets, positioned perpendicular to the accretion disc.  I understand that these jets are produced by magnetic fields created by the enormous amount of electrically charged plasma located on the "equator" of the gravity source. Please correct me if I have this either plain wrong or under-simplified it.   My question is: where does the material,  either electron-ion jets or electron-positron jets, come from?   If it comes from the accretion disc itself, is it made up of particles that have a slight velocity vector component inwards, normal to the gravity source, which then get caught up in the central magnetic field and forced into the outrunning jet? Alternatively,  is it matter that is preexisting around the poles of the gravity source. Assumption 1 seems far more likely to me, but I would appreciate  any explanation.   EDIT: There are  duplicate type  questions listed below but 1. The answer to my question postulated the possible creation of material at the base of the disc, and 2. I wanted to know could the jets occur from existing material in the jet region? Neither of these points,  in my opinion, were dealt with in the previous questions.  END EDIT


What shape would a boggart take if a person doesn't fear anything?

Rereading the Prisoner of Azkaban, this interesting question(at least to me) popped in my head. What shape would a boggart take if a person is never depressed about anything, has no evil memories whatsoever for the boggart to feed on or has no fear?


If and how to use one-tailed testing in multiple regression

I have one-sided hypotheses that I want to test with multiple regressions. Does anyone know how to perform a one-sided hypothesis testing? I heard of different positions regarding this matter ("not possible to test one-tailed with regression" and "for one-sided hypotheses just cut the p-value in half"). Or maybe I need another command in with my statistics program (I use R)!?  I didn't think this to be a difficult question but couldn't find a consistent and satsfying solution.  Thank you in advance for any helping comments.


Finding a xpath for text which is followed by break tag

I have below HTML code, in that I have to come up with XPath for the 2nd line of text: "Policy Count - 0".
 "Premium Volume - $"
 "Policy Count - 0"
  How do I do that?


Jquery div to open/close hidden div properly

I have created some code which will hide/unhide a hidden div when a div("button") is clicked. I would also like the div to be hidden when anywhere on the screen is clicked. These pieces of code seem to be conflicting with each other.   $(document).ready(function () {      $(document).on("click", "#help-icon", function () {         console.log('hi');         $("#help-menu").toggle();     });      $(document).mouseup(function (e) {         var hlpcont = $("#help-menu");         if (!hlpcont.is(e.target) &&              hlpcont.has(e.target).length === 0) {             hlpcont.hide();         }     });  });   jsfiddle:


I'm currently reworking my technical report and was wondering which of the following wordings is correct. If both are correct, which one is the better one?  This means that the behavior of the cmd.exe is accessible [...]. This means the behavior of the cmd.exe is accesible [...].


Is there any logical alternative for selecting username?

Some SE Philosophy users are using numbers for their user name. It is difficult to identify them. Now the number has become a 7 digit number [e.g. user1234567]. So, isn't it good if they use some names instead of a 7 digit number?  We can't distinguish user1234567 from user1235467 and remember them quickly.  Is there any logical alternative for selecting username by default to solve this issue?


Comparing ints with 'is' keyword (or The Magical 257)

I came across a very odd behavior that I can't quite explain (running Python 2.7.6).  It is common knowledge that you shouldn't compare strings using is in Python. However, I was completely unaware that similar badness can happen trying to compare ints.  Take the following script for example:  for x, y in zip(xrange(0,399), xrange(1,400)):     z = y - 1     if x is z:         res = 'good'     else:         res = 'bad '     print res, x, z   Output:  ... good 254 254 good 255 255 good 256 256 bad  257 257 bad  258 258 bad  259 259 ...   At this seemingly magic value of 257, is stops working as expected. For some reason, Python makes a new container to hold the calculation result.  However, it only seems to be when a calculation is involved, and the value is greater than 256:  >>> 255 is 255 True >>> 256 is 255 + 1 True >>> 257 is 257 True >>> 258 is 257 + 1 False   What is so special about 257? Have I been mislead this entire time and shouldn't be using is to compare ints?


How to separate nvarchar column by semicolon

I have this column in a SQL Server table of type nvarchar that has Id numbers of another table separated by semicolon (bad design, can't change it).      The query I am trying to run works when there is only one value in the GroupIds column however with multiple groups it fails with an error     Conversion failed when converting the nvarchar value '2;5' to data type int.   Code:  SELECT      i.Name,     i.Channel,     g.Name AS 'Group Name',     io.Name AS 'Logger Name',     io.ModuleType,     io.IpAddress FROM      Input i JOIN      [dbo].[Group] g ON i.GroupIds = g.Id JOIN      [dbo].[IoModule] io ON i.IoModuleId = io.Id ORDER BY     i.Channel, io.Name;   I have exhausted my Google skills with a few things half working but nothing giving the results I need. Ideally, I would like to see a result with the Group Names separated by commas.   Note: I need this as a one-off report from a production database. I can't create temp tables, functions or anything of that nature. The answer that this question has been tagged as duplicate is not any help. There are 42 answers from the past 10 years in that question. None of those had anything about selecting that data from a join. It may be my general lack of knowledge of joins but I am searching for an answer of basically getting my group ids in one column by group name separated by a comma.


Can you get the instance variable name from a class?

I understand that you should never use variable names within the program, but I am using is strictly for debug purposes and would like to convey the name of the variable to the user for readability. I have a file like this: class MyClass(object):     def __init__(self):         pass      def foo(msg=""):         debug("Called from the %s instance.") #quazi-print function that only prints when a DEBUG variable is True.         print(msg)  m = MyClass() m.foo("Test")  I would like to retrieve the m instance variable name from within the class itself. Though this is merely an example file, I am using it to convey to the user that a raw socket has been created at a certain attribute within an instance variable, and would like to show where it is (i.e. New socket at m.socket) Is this feasible with Python?


Segmentation fault when modifying a string

I am getting segmentation fault error in this code, but don't know why?  #include <stdio.h>  int main(void) {     char *ptr = "Linux";     *ptr = 'T';      printf("\n [%s] \n", ptr);      return 0; }


"What are you saying" vs "What you are saying"

I don't understand the correct meaning and concept of the following sentences.     1. I can't hear what are you saying?      2. I can't hear what you are saying?   another example;     1. Where are you going?      2. Where you are going?


Why does Linux have both a shadow file and passwd file?

I understand the difference between  and , but my question is why do they have both? It seems like an unnecessary complication. Why not just store the encrypted password in the passwd file? Is it somehow more secure separating them? I noticed passwd is accessible to anyone but shadow only to superusers.


Highlighting labels of undefined citations?

I am wanting 'cite' entries that don't have a corresponding 'bibitem' entry to show up in red, along with the name of the missing reference label. I had found a  that suggested a solution, but it only displayed [?citation?]. I would prefer it to display [?nameOfMissingKey?], but I am fairly new to LaTeX, so not sure the best way to tweak this.  Any help would be appreciated.  BTW the suggested solution was:  \documentclass{article} \usepackage{xcolor} \newcommand*{\missingreference}{\colorbox{red}{?reference?}} \newcommand*{\missingcitation}{\colorbox{red}{?citation?}} \makeatletter \def\@setref#1#2#3{%   \ifx#1\relax    \protect\G@refundefinedtrue    \nfss@text{\reset@font\missingreference}%    \@latex@warning{Reference `#3' on page \thepage \space              undefined}%   \else    \expandafter#2#1\null   \fi} \def\@citex[#1]#2{\leavevmode   \let\@citea\@empty   \@cite{\@for\@citeb:=#2\do     {\@citea\def\@citea{,\penalty\@m\ }%      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi      \@ifundefined{b@\@citeb}{\hbox{\reset@font\missingcitation}%        \G@refundefinedtrue        \@latex@warning          {Citation `\@citeb' on page \thepage \space undefined}}%        {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}} \makeatother \begin{document}  This is a missing reference: \ref{somefig}.  This is a mssing citation: \cite{somebib}.  \end{document}


why is 64 bits version called AMD64 and 32 bits version called i386?

I have never understood this.  This is what i know: 64 bits OS if you want to handle more than 2GB RAM. Else, 32 bits OS.  So on Ubuntu's homepage you can download either 64 bits or 32 bits. But the 64 bits is called amd64 and the 32 bits is called i386.  So i have to have a AMD processor to run amd64? And intel to run i386?  And if someone codes a software (lets say Apache). Does he have to code one 32 bits and one 64 bits? Do some softwares only exist for 32 and not 64 and vice versa?  Thanks in advance!


gedit/ text editor document - how to show it in right click menu Ubuntu 18.04

when I right click on desktop I get the options like below.      I use to create many new gedit/ text editor documents during day work. It's very hard to save the file first and then move it to required location.    Is there a way to get new gedit/ text editor document option when I right click on desktop or in file manager?


How do I show memory usage information in top bar or as notification?

I have 4GB RAM. When I open Firefox, IntelliJ IDEA or VS Code and some other application my memory is about used up thus my machine hangs and I can't do anything. I can't even close any applications.    Date and time are shown in the top bar so that I can view it any time without any thing typing.   If I would view memory status in this way without typing anything then I can make a decision whether to open an application or whether this application may put my machine in hanging state or not.    Is it possible in Ubuntu 18.04 LTS?


Time as a Hermitian operator in quantum mechanics

In non-relativistic QM, on one hand we have the following relations:  $$\langle x | P | \psi \rangle ~=~ -i \hbar \frac{\partial}{\partial x} \psi(x),$$  $$\langle p | X | \psi \rangle ~=~ i \hbar \frac{\partial}{\partial p} \psi(p).$$  On the other hand, despite the similarities, the relations cannot be directly applied to energy and time:  $$\langle t | H | \psi \rangle ~=~ i \hbar \frac{\partial}{\partial t} \psi(t),$$  $$\langle E | T | \psi \rangle ~=~ -i \hbar \frac{\partial}{\partial E} \psi(E).$$  Just wondering, how can one mathematically prove that the "classical time" (which means no QFT or relativity involved), unlike its close relative "position", is not a Hermitian operator?  I ask your pardon if you feel the question clumsy or scattered. But to be honest, if I can clearly point out where the core issue of the problem is, I may have already answered it by myself :/


wrapfigure doesn't work if there is a { in the beginning of a paragraph

I would like to have \addfontfeature scoped around one word in the beginning of a paragraph. However, it turns out it breaks wrapfigure, which does all kinds of weird stuff in this case. Consider the following MWE:  \documentclass[12pt, a4paper]{scrbook}  \usepackage{tikz} \usepackage{wrapfig}  \begin{document}  \begin{wrapfigure}{l}{0pt}     \centering     \begin{tikzpicture}         \draw [thick, red] (0,0) circle [radius = 1.5cm];     \end{tikzpicture} \end{wrapfigure}  {Lorem} ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  \end{document}  The figure goes outside of the paper. I tried hiding {Lorem} inside a macro defined with \NewDocumentCommand, but with no success.


Are ring flashes useful for cases other than macro photography?

Is there any point to using a ring flash for styles other than macro (i.e. portrait, landscape, wide angle, street, etc.)?


Can we disable windows update through services.msc

Can we able to disable the Windows 10 automatic update by disabling the wuauserv in services.msc? And also please confirm whether disabling the wuauserv will affect the system?


wp_editor: How to load wp_editor on demand using jQuery?

I am trying to load wp_editor on demand using jquery/javascript.  Somehow I got success using following code  but it does not save changed data in the  element.  tinyMCE.execCommand('mceAddEditor', false, textarea_id);   I'll really appreicate any contribution.


Non-EEA family member visiting UK for work?

I am a US citizen and my wife is Polish. We lived in the UK for about 8 years. I was there on a UK residence card (as spouse of an EEA citizen), although it is now expired. I worked for a company based in Liverpool. Currently we reside in Poland, where I work from home for the same company. I'm paid in pounds from the UK.   Am I permitted to enter the UK using only my US passport, let's say for 5 days, in order to meet with colleagues? I DO intend to attend meetings both formal and informal, but also while I'm there it's possible that I would perform general work duties (ie, the types of duties I perform remotely). And I'm paid from a UK source, rather than a non-UK source.  If I state my intention is to visit on 'business' and the border agent digs deeper to discover my situation...might I have some issues?  Of course, I could just state that I'm there visiting a friend and sight-seeing (true also...), but I'd rather be above board.


Having trouble understanding wire vs reg. As I understand, the output of a module can be reg type but then why doesn't this code work for a simple adder? module add(a,b,cin,sum);    input a,b,cin;    output sum;    reg    sum;    sum=a+b+cin; endmodule  But if I use wire, like as shown: module add(a,b,cin,sum);    input a,b,cin;    output sum;    assign sum=a+b+cin; endmodule  It works. Why?


Loop through an object and append the properties to an html file

Hi I am new to JavaScript and have been doing some practice stuff. I am struggling with looping through an Object's properties and appending each property to the DOM. Can someone provide some guidance please? I tried piecing this together through other questions but not sure where I am going wrong?  var person = {     firstName: "john",     lastName: "doe",     age: 45,     placeOfBirth: "somewhere" }  for(var i = 0; i < person.length; i++) {     if(hasOwnProperty(person[i])) {         var p = document.createElement("p");         p.innerHTML = person[i];         document.body.appendChild(p)     } }


I have file test_output_archive.svd with some Dollar signs ($). I have generated a shell script Replace_dollar_pound.sh with cat command to replace dollar symbol with Pound (£) script is working on Solaris 10, Dollar getting replaced as expected. In Solaris 11, but the dollar is not getting replaced, not throwing any errors  Content of test_output_archive.svd : Line Rental $9  OOB Only for $10  Replace Dollar symbol with Pound at step1, Remove junk charactes at step 2, Remove temp file at step3, Rename at step4**  Content of Replace_dollar_pound.sh : cat test_output_archive.svd | tr "\044" "\243" > temp_archive.svd cat temp_archive.svd | tr -d "\302" > test_output_archive2.svd rm temp_archive.svd mv test_output_archive2.svd test_output_archive.svd  Any Modifications to be done as OS is updated to Solaris 11 ??


PC very slow with any graphics acceleration

I think I don't have the correct driver for my video card which is integrated (the pc is mainly used for office work). I'm using Kubuntu 14.04.1 Each time I start any site with heavy graphics or where it requires acceleration (youtube, google maps street view, etc.) the pc is slowed to a halt nearly..  lscpi returns this:  00:00.0 Host bridge: Intel Corporation Atom Processor D2xxx/N2xxx DRAM Controller (rev 03)                      00:02.0 VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller (rev 09) 00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02) 00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 02) 00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02) 00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02) 00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02) 00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02) 00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 02) 00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02) 01:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)          Output of inxi -G:  Graphics:  Card: Intel Atom Processor D2xxx/N2xxx Integrated Graphics Controller             Display Server: X.Org 1.16.0             drivers: (unloaded: fbdev,vesa)             Resolution: 1920x1080@60.0hz, 1024x768@60.0hz             GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 3.5, 128 bits)             GLX Version: 3.0 Mesa 10.3.2   I don't have xorg.conf in /etc/X11/ and I don't know what to do.  Output of apt-cache policy xserver-xorg-video-intel:  xserver-xorg-video-intel:   Installed: 2:2.99.910-0ubuntu1.4   Candidate: 2:2.99.910-0ubuntu1.4   Version table:  *** 2:2.99.910-0ubuntu1.4 0         500 http://bg.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages         100 /var/lib/dpkg/status      2:2.99.910-0ubuntu1 0         500 http://bg.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages   Output of lspci -knn | grep -A2 VGA:  00:02.0 VGA compatible controller [0300]: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller [8086:0be2] (rev 09)     Subsystem: Pegatron Device [1b0a:013a]     Kernel driver in use: gma500   Contents of /var/log/xorg.0.log:


Why do we use pseudo random PRNG in cryptographic applications instead of true random number TRNG

Cryptographic applications use deterministic algorithm for random number generation that are not statistically random but they appears to be random.  Why do cryptographic applications use PRNGa instead of TRNGa?


I noticed an interesting phenomenon and I am looking for an explanation. On my Ubuntu system, dpkg-query cannot find some uninstalled packages which apt-cache can find. For instance,  dpkg-query -l libssl-dev   gives me:  dpkg-query: no packages found matching libssl-dev   while:  apt-cache show libssl-dev   finds the package information. At the same time, dpkg-query can locate other uninstalled packages, e.g. gimp and show their status as uninstalled. Why are some packages not visible to dpkg-query?


The origin of my object is not where I want it, so when I set other objects to the parent, they link to the origin rather then the object where I want them. How do I change the origin?


Can I start a game on one PC and continue on another?

In  is it possible to start the game on one PC/browser and then continue it on another? Are there perhaps files I can copy from one machine to another to continue elsewhere?  Edit I'm using Firefox as my browser


First sentence after figur/table not aligned

Im using a simple figure environment but at some times the first sentence after the image or table aren't aligned anymore. The text is off a few cm to the right. I modified my paragraph setting to be another subsubsubsection with this code, could this be the problem?  \titleformat{\paragraph} {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{} \titlespacing*{\paragraph}    \section{1} \subsection{1} some text \subsubsection some text, then the full page image follows on a new page            \begin{figure}[H]                 \centering                 \includegraphics[scale=0.24]{Bilder/Imag.png}                  \caption[bla]{bla}                 \label{fig:xxx}                 \end{figure}            First not aligned Sentence     normal text


In the end of Avengers: Age of Ultron movie,      Avengers were talking about Infinity Stones and they seemed to know about all 4 Infinity Stones discovered so far.   Knowing about      Tesseract, Aether and Mind Stone was Okay.   But,      How did they come to know about the Infinity Stone introduced in Guardians of the Galaxy?


Is my proof that $U_{pq}$ is not cyclic if $p$ and $q$ are distinct odd primes correct?

Prove that $U_{pq}$ is not cyclic if $p$ and $q$ are distinct odd primes.   I am a self taught person. I just learned this and tried this on my own and came up with this.  $x \equiv 1 \pmod{p}$ and $x \equiv -1 \pmod{q}$ has a solution $[a]_{pq}$, since $p$ and $q$ are relatively prime. Because $q$ is an odd prime, $[-1]_{pq}$ is not a solution, so $[a]_{pq}\neq [-1]_{pq}$. But $a^2 \equiv 1 \pmod{p}$ and $a^2 \equiv 1 \pmod{q}$, so $a^2 \equiv 1\pmod{pq}$ since $p$ and $q$ are relatively prime, and thus $[a]_{pq}$ has order 2.  Can someone please tell me if this proof this correct? Please help with proof as I learned it just now as a self taught person.


The logic of the AC Method of factoring quadratic polynomials

This could be primary school stuff. But I want to ask it.  In factoring $x^2+bx+c$ (i.e. $a = 1$ in $ax^2+bx+c$), we find $m$ and $n$ such that $m+n = b$ and $mn=c$. We can reason this well as follows:     In the expansion of $(x+m)(x+n)$, $mx$ and $nx$ should add up to $bx$ and $mn$ should result in $c$.   However I am not able to come up with the logic for following: For factoring $qx^2+bx+c$ (i.e. $a \neq 1$ in $ax^2+bx+c$), we find $m$ and $n$ such that $m+n=b$ and $mn = ac$.    I am not able to realize the logic behind why it is $mn = ac$ and  how doing this result in correct factors