I've been trying to make a java game loop in canvas that runs render(Graphics g) and logic() but it isn't working.  I have already tried making a script that runs the two functions then calls itself again to create a loop.  Thanks in advance.  I tried this:  public class Canvas extends JPanel { static GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); static int width = gd.getDisplayMode().getWidth(); static int height = gd.getDisplayMode().getHeight(); //Get the system time long lastTime = System.nanoTime(); //Specify how many seconds there are in a minute as a double //store as a double cause 60 sec in nanosec is big and store as final so it can't be changed final double ticks = 60D; //Set definition of how many ticks per 1000000000 ns or 1 sec double ns = 1000000000 / ticks;     double delta = 0;  public static void main(String[] args) {     JFrame frame = new JFrame("Zombie Run");     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.add(new Canvas());     frame.setSize(width, height);     frame.setVisible(true);     loop(); }  public static void loop() {     logic();     render(g);     loop(); } public static void render(Graphics g) {     System.out.println("Running Render");     g.setColor(Color.BLUE);     g.fillRect(0, 0, 800, 500);  } public static void logic() {     System.out.println("Logic");  }   }  The error I got from eclipse is:  Logic Running Render Exception in thread "main" java.lang.NullPointerException     at ZombieGame.Canvas.render(Canvas.java:41)     at ZombieGame.Canvas.loop(Canvas.java:36)     at ZombieGame.Canvas.main(Canvas.java:31)

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


I have a problem in using "at" and "with" in describing graphs and percentages. I have read many samples in different books, but I am not quite sure that I can use them properly. I even find a similar topic on this  but it did not help either. So I provide here some examples from different books so that you can answer them:      Shopping came next at 10%, although this was much less popular than socializing, at 20%.    Can we use "with" instead of "at" in the above sentence?      Socializing was next at 20%, which was twice as popular as shopping, with 10%.    Can we replace "at" with "with" in the above sentence, and vice versa?      Both alcohol and drug sales peaked in 1980 with figures of $186 billion and $102 billion respectively.    Can we change it to:     Both alcohol and drug sales peaked in 1980 at $186 billion and $102 billion respectively.       Indonesia was responsible for about one third of rice production, at just over 46 million tonnes.     Can we change it to "with"?      No change was seen in jogging at 31% in the two older age groups for women.    Can we change it to "with"?

I'm writing the following sentence:     Women lead uptake at XX%.   But a friend is saying that it should be written:     Women lead uptake with XX%.   Which one is correct?


I have a 512GB SSD in my Mac. When cleanly installed from a TimeMachine backup, it shows as being about 120GB. Over time, the disk usage steadily increases. Today About My Mac Storage shows just 44GB free and 403GB of "System".  I've read through all the related questions and (I think) tried everything, but given low level Un*x tools show nothing, and none of the solutions I've read worked (including flushing Time Machine snapshots. None have worked.  Here's the weird thing: df shows me 94% full, but du says 118GB used. Where is the rest?  I've cleaned out TimeMachine snapshots using tmutil, all the disk utilities like OmniDiskSweeper confirm the 118GB of actual files.  Creating a CarbonCopyCloner image on another disk is 118GB as indicated by du, so apparently somehow APFS thinks there is an additional huge chunk of space used.  (base) Mnementh:private alastair$ sudo du -d 1 -x -c -g / 1   /home 1   /EFI-Backups 1   /usr 1   /.Spotlight-V100 1   /net 0   /.PKInstallSandboxManager-SystemSoftware 1   /bin 1   /sbin du: /Library/Application Support/Cylance/Desktop/q: Permission denied 40  /Library 0   /.Trashes 6   /System 1   /.fseventsd 4   /private 1   /.DocumentRevisions-V100 0   /.vol 23  /Users 45  /Applications 1   /opt 1   /dev 1   /Volumes 0   /.TemporaryItems 118 / 118 total  (base) Mnementh:private alastair$ df Filesystem     512-blocks       Used   Available Capacity  iused               ifree %iused  Mounted on **/dev/disk2s1    999805536  930152088    66129504    94%  2216997 9223372036852558810    0%   /** devfs                 693        693           0   100%     1200                   0  100%   /dev /dev/disk2s4    999805536    2099232    66129504     4%        1 9223372036854775806    0%   /private/var/vm /dev/disk0s4    934512880  312083512   622429368    34%   459251          4294508044    0%   /Volumes/Windows map -hosts              0          0           0   100%        0                   0  100%   /net map auto_home           0          0           0   100%        0                   0  100%   /home /dev/disk4s2   7813390288 5615807616  2197582672    72% 10158039          4284809240    0%   /Volumes/Thyme Machine /dev/disk3s2  15627315120 3533581776 12093733344    23%   207942          4294759337    0%   /Volumes/8TB USB /dev/disk4s3   7813128160 2320179456  5492948704    30%   134145          4294833134    0%   /Volumes/Media HD /dev/disk5          49896      39432       10464    80%      328          4294966951    0%   /Volumes/OmniDiskSweeper   Where is all the rest?

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I think the following sentence is correct both ways with that and without that     The smell of cooking told them (that) there was a meal in the offing.

There is so much (that) is at stake for many.   Can we omit 'that' in this sentence?


If I have a maths question, on which site should I ask:  or ?

There really does need to be some descriptions here. The two sites seem so similar that I'm unsure which is the proper one to use for certain math issues. In what situations would you use  over ?


I have multiple thumbdrives and external disks, some protected by Bitlocker and some not.  None of them will ever cleanly eject from my personal Windows 10 x64 laptop.    I've tried just about all of them in my Windows 7 x64 work machine and they have always ejected fine from there.  If on my personal Windows 10 x64 machine, I right-click on the Safely Remove Hardware Eject Media icon in the system tray and I get the message:    Problem Ejecting USB Mass Storage Device  Windows is unable to stop the device 'USB Mass Storage Device'. Don’t remove this device while it is still in use. Close any programs using this device and then remove it.  OK  How can I resolve this issue?

Sometimes when I follow the process to safely remove a USB flash drive, I get told that I can't remove the drive because some programs are using it. However I'm unable to tell which programs these are, so I end up having to close programs - sometimes even randomly.   How do I find out which program is using my USB flash drive?  I've searched the Internet but have found nothing promising; one solution might be via Process Explorer since it shows handles, but I don't know how to use it to solve my problem.  The best solution would be to have a program that can automatically close these programs for me, or at least tell me which programs these are.


I installed manual doc for linux programmer on Ubuntu using Synaptic for French documentation. But when I run man printf to see the documentation of printf() in C library stdio.h, I dont get this. I get this:  PRINTF(1)                          Commandes                         PRINTF(1) NOM        Printf - Formater et afficher des données SYNOPSIS        printf FORMAT [PARAMÈTRE] ...        printf OPTION   But I obtain the correct output for scanf as I want in french. An ideas?

Just saw someone referencing man 7 regex on Stackoverflow. I tried man regex and got very similar output - there appear to be slight differences.  So what is this magical number 7? Searching man 7 unix on Google gives me more mysterious results like UNIX(7)...


The blade (for want of a better term) length does not appear to be standard.  I remember an expanded universe story featuring a character using lightsaber with an incredibly long reach, and let us not forget Yoda's teeny tiny lightsaber.  Is the length determined by the user, or does it's design determine the blade length?

I always see blades of lightsabers have more or less the same length (dual blades are double). Why is that?  Can't a longer or shorter length be advantage in some case?    I am NOT expecting infinite length lightsabers (due to energy issues), but have we seen adjustable length blades in the Canon?


prove that for any integrable function $f$ defined on $(-\infty,\infty)$ (or maybe square integrable function.. my professor didn't gave exact imformation about $f$.) $$\lim_{n\to\infty}\int_{-\infty}^\infty \frac n {\sqrt {\pi}}e^{-(nx)^2} f(x) dx = f(0)$$  I think I have to get some $\delta>0$ and divide integral into three terms.    $$\int_{-\infty}^{-\delta} f*g_n +\int_{-\delta}^{\delta}f*g_n + \int_\delta ^\infty f*g_n$$ ($g_n(x)=\frac n {\sqrt {\pi}}e^{-(nx)^2}$)  since $f*g_n$ converges uniformly to $0$ if $x\neq0$, first and third term vanish. so what I have to do is to take $N$ and $\delta$ (from the given value $\epsilon>0$) so that if $n>N$  $$\left|\int_{-\delta}^{\delta}\frac n {\sqrt {\pi}}e^{-(nx)^2} f(x)dx - f(0) \right|<\epsilon$$  I can't go any further.

Consider the sequence $(\phi_n)_{n\in \mathbb{N}}$ of test-functions $\phi_n\in \mathcal{D}(\mathbb{R})$ defined by  $$\phi_n(x) = \dfrac{n}{\sqrt{\pi}}e^{-n^2x^2}.$$  I want to show that this is a delta sequence, in the sense that:  $$\lim_{n\to\infty}(\phi_n,\psi)=(\delta,\psi)=\psi(0), \quad \forall \psi\in \mathcal{D}(\mathbb{R}).$$  In that case we know that we have  $$(\phi_n,\psi)=\dfrac{n}{\sqrt{\pi}}\int_{-\infty}^{\infty}e^{-n^2x^2}\psi(x)dx.$$  The problem here is to compute this integral. The function $x\mapsto e^{-n^2x^2}\psi(x)$ has no singularities, hence contour integration wouldn't help. Integration by parts or substitution also doesn't seem to be of great help.  The major problem is that there is a function $\psi$ inside the integral about which we don't know really anything apart from the fact that it is $C^\infty$ and with compact support.  How can we compute this integral and in the end show that the sequence $(\phi_n)$ is a delta sequence?  Just to make clear, I'm here doing all of this in the context of the Riemann integral.


I need to install Microsoft Office 2003 for some reasons related to compatibility with Luddites.  I can buy an Office 2007 "open license" at the university where I am a faculty member, and I have seen the Microsoft  which states that I have downgrade rights.  I can find Office 2003 media.  But how do I get a legitimate license key or activation code for this downgraded version of Office?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


Our goal is to create a slot machine with 2 panels and it seemed that the button is not working and not displaying anything in the text field on the panel. The text field in the panel should display the random number generator when the button is clicked. I tried the Action Listener code but it is not doing anything as well. Please help! Thank you!  package slotMachineMain;   import java.awt.Color; import java.awt.Dimension; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Random;  import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField;    public class slot1 extends JFrame implements ActionListener {          JButton button1;     JTextField text1;          slot1(){                  Image icon = Toolkit.getDefaultToolkit().getImage("D:\\11.png");         ImageIcon image1 = new ImageIcon("D:\\12.png");         ImageIcon image2 = new ImageIcon("D:\\13.gif");         ImageIcon image3 = new ImageIcon("D:\\14.png");                   this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         this.setTitle("Take your Chance Here!");                  JLabel label1 = new JLabel();         label1.setIcon(image1);         label1.setBounds(120, 10, 138, 87);                  JLabel label2 = new JLabel();         label2.setIcon(image2);         label2.setBounds(0, 0, 400, 290);                   JTextField text1 = new JTextField();         text1.setPreferredSize(new Dimension(80,80));         text1.setEditable(false);                  JTextField text2 = new JTextField();         text2.setPreferredSize(new Dimension(80,80));         text2.setEditable(false);                   JPanel panel1 = new JPanel();         panel1.setBackground(Color.white);         panel1.setBounds(83, 100, 90, 90);         panel1.add(text1);                  JPanel panel2 = new JPanel();         panel2.setBackground(Color.white);         panel2.setBounds(207, 100, 90, 90);         panel2.add(text2);                  JButton button1 = new JButton();         button1.setBounds(152, 200, 75, 25);         button1.setIcon(image3);         button1.addActionListener(this);                  this.setResizable(false);         this.setSize(400, 290);         this.setLayout(null);         this.setIconImage(icon);         this.add(panel1);         this.add(panel2);         this.add(button1);         this.add(label1);         this.add(label2);         this.setVisible(true);      }      @Override     public void actionPerformed(ActionEvent e) {         Random rn = new Random();          if(e.getSource()==button1) {             text1.setText(Integer.toString(rn.nextInt()));         }              }  }

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


What is the difference between passing by reference the parameters in a function and passing pointer variables as a parameter in a function ?

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I was looking at my laptop's specifications ( an Hp probook ) and it doesn't have a video card. Can I still get and run Fallout : New Vegas? Not the ultimate edition.

Is there a service that I can use to check if my machine will be able to run a certain game?


Trying to fetch the proper data but am running in to some problems. I want to join all 3 tables and want any easy way to query move names based on the moves selected in the users move set.  User Table  userid | name  ----------------  1     | Steve   2     | Mike    3     | Aaron    4     | Chris     Move Table  moveid | movename  ------------------  1     | Sit        2     | Stand      3     | Lay        4     | Run         Moveset Table  movesetid | userid | move1 | move2 | move3 ----------------------------------  1        | 1      | 3     |  5    | 7  2        | 2      | 5     |  9    | 6  3        | 2      | 1     |  12   | 1  4        | 4      | 8     |  4    | 10   ** I would like to get a result where I can query a userid and get a list of move names that correspond to their move set. i.e.: Sit, Run, Lay **

I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).  the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.  Simple.  Now I need to actually display both domain names on the webpage. I know how to display one or the other, via the LEFT JOIN domains ON reviews.rev_dom_for = domains.dom_url query, and then you echo out the dom_url, which would echo out the domain name in the rev_dom_for column.  But how would I make it echo out the 2nd domain name, in the dom_rev_from column?


What does the a mean in the following sentences?   She is a do it like this. Sam is a visit the new market today.   Does the word a represent a future action like :     Sam will visit the new market today. ?

When I chat, I'll sometimes hear "I'mma ..." as in:      "I'mma go now" or "I'mma open that for you"   I am not sure how it's written, I have never gotten a precise answer when I've asked.  Where does it come from, and what does it mean?


I have a Xiaomi phone and I'm using a microSD card to store photos and other data. I wanted to copy photos to PC so, with the phone turned on I just removed the sd card from the phone. Putting the card into PC doesn't work, it asks me to format it and putting it back on the phone it seems it's not recognized and when I click 'install SD' it just gives me an error. I ran Easeus Data recovery and all data seems to kinda be there so it probably just needs to run like a 'chkdsk' for android SD cards :) How can I repair this card so I can read the files normally on Windows and/or works again in Android without formatting and losing data?

Sometimes my SD card gets "corrupted" and this leads to many read/write errors. Usually, connecting the SD card to the windows 7 and selecting the "Error Checking" (Right click the drive > Tools > Error Checking) option finds the corruption and fixes it.  Is there any tool or app for checking SD cards for drive errors and fixing the same from within the android itself?  I'd also like to mention that I'm on rooted froyo with busybox installed.


I'm just wondering if it is worth trying to install the intel HAXM. I have an amd processor. Does the intel haxm require an intel cpu? Thanks you!

I would like to create a virtual device in Android Studio but I can't because hardware acceleration is disabled.  I went to the BIOS and there are two option :  AMD-SVM AMD-IOMMU   Both are enabled.  I also downloaded the HAXM installer from the SDK manager and tried to run it from the   C:\Users\%user%\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager  with intelhaxm-android file.  I got an error telling me :   This computer does not support Intel Virtualization technology VT X or it is exclusively used by Hyper V. HAXM cannot be installed. Please ensure that hyper V is disabled in windows feature   It makes sense that I can't activate Intel Virtualization technology because I have AMD Ryzen 7 2700U.  With my previous computer it worked just fine but I had an Intel processor.  Some tutorials online suggested to enable windows Hyper-V feature but it's only available for windows 10 pro.  Does anyone know a way to activate hardware acceleration with AMD processor and without Hyper-V feature?


I was asked this question during an interview and I answered it like this., //div/p[class='first']/following-sibling  I am not sure if I got the XPath right and I was told that I could also locate it through CSS locators but I don't know how exactly. if anyone could help me that would be great and also let me know if I have written the right XPath and other ways of locating it through XPath

I need a CSS selector that can find the 2nd div of 2 that has the same class. I've looked at nth-child() but it's not what I want since I can't see a way to further clarify what class I want. These 2 divs will be siblings in the document if that helps.  My HTML looks something like this:
...

...

...

...
   And I want the 2nd div.bar (or the last div.bar would work too).


I am using  for the dark theme but switching between pages, there is always a white loading screen flash. And I want to paint it black.  I know there are some questions already asking this, but their solution doesn't really help. Maybe there is a solution now since this a few years later.

When a page doesn't load immediately, Chromium and every other browser I tried display a white  screen before they get a response from it:    Even though chrome://settings/personal says it's using the GTK+ theme - in my case it's Darklooks, which has a dark background:    Is there a way to avoid this in Chromium? Or, if there isn't, is there a browser that does not have this "issue"?


I've noticed several posts about this same topic, but found no reasonable solution.  post suggests deleting the files, but I want to avoid that since I'm using  and that same post says that it will break apache. I ran  sudo du -h --max-depth=1   this is the result I get  du: cannot access './run/user/1000/gvfs': Permission denied du: cannot access './run/user/121/gvfs': Permission denied 2.3M    ./run du: cannot access './tmp/.mount_jetbraP4UBzE': Permission denied 104K    ./tmp 6.5M    ./libx32 16K ./lost+found 15M ./sbin 5.7G    ./usr 4.0K    ./cdrom 16M ./etc 0   ./sys 0   ./dev 618G    ./var 13M ./bin 4.0K    ./lib64 195G    ./home 4.0K    ./srv 5.8M    ./lib32 936K    ./root 277M    ./boot 1.2G    ./lib du: cannot read directory './proc/2824/task/2824/net': Invalid argument du: cannot read directory './proc/2824/net': Invalid argument du: cannot read directory './proc/2825/task/2825/net': Invalid argument du: cannot read directory './proc/2825/net': Invalid argument du: cannot access './proc/5070/task/5070/fd/4': No such file or directory du: cannot access './proc/5070/task/5070/fdinfo/4': No such file or directory du: cannot access './proc/5070/fd/3': No such file or directory du: cannot access './proc/5070/fdinfo/3': No such file or directory 0   ./proc 7.3G    ./snap 14G ./opt 7.1T    ./media 4.0K    ./mnt 7.9T    .   so then I went to /var and  /var$ sudo du -h --max-depth=1 142M    ./cache 60K ./tmp 2.3G    ./www 92K ./spool 6.4M    ./backups 4.0K    ./crash 4.0K    ./mail 4.0K    ./metrics 612G    ./log 3.2G    ./lib 4.0K    ./local 228K    ./snap 4.0K    ./opt 617G    .   so than I tried /var/log  /var/log$ sudo du -h --max-depth=1 208K    ./apt 68K ./cups 24K ./samba 4.0G    ./journal 40K ./mysql 8.0K    ./hp 4.0K    ./gdm3 506M    ./nordvpn 4.0K    ./dist-upgrade 20K ./libvirt 92K ./apache2 28K ./unattended-upgrades 2.7M    ./installer 4.0K    ./speech-dispatcher 612G    .   edit: by request here it is  /var/log$ sudo du -xh -d 3 /var/ | sort -h -r | egrep -v '*K|*M' 617G    /var/ 612G    /var/log 4.0G    /var/log/journal/1e5573225229470a9199ad4e005b6533 4.0G    /var/log/journal 3.2G    /var/lib 2.5G    /var/lib/snapd 2.3G    /var/www 2.2G    /var/www/pixel 1.3G    /var/lib/snapd/snaps   Now I'm stuck. I have the same problem when I open Disk Usage Analyzer.     How can I free up space on the system? Is this a false positive? In other words it seems like it's reading the free space as used space. Is this a bug?

The disk that contains Ubuntu on my computer is 115GB in size.  When the disk was 114.7GBfull.  I started deleting some files here and there to free up around 5GB.  But I noticed the disk was 114GB filled again. I thought it was some cache or swap thingy so didn't give it much thought and went ahead and freed around 40GBby shifting some media files out of the disk.  I have a notification in an hour or so that the disk is full yet again!! 40GB!!! All gone!  So I debugged the problem down to the /var/log/syslog file which was initially definitely less than 20GB. I know this because /var folder was 17GB before I cleared the memory.  /var/log/syslog file is currently 55.9GB!  Could someone be so gracious to explain this anomaly? Is this a bug? Or am I affected with some malware or virus?


I am looking for an easy way to draw an arc that goes e.g. from 45 deg to 90 deg and with 0,0 as center. The arc should start then at (0.707,0.707) and end at (0,1). The common syntax   \draw (0,0) arc [radius=1, start angle=45, end angle= 90];   always starts the arc at (in this case) (0,0) which makes it hard to draw several arcs with the same center but starting from different angles.  Or is there something I am missing?

The TiKz command for an arc:  \draw (0,0) arc (-30:30:2) ;   Draws an arc that starts at (0,0), and would be the part of the circle from -30 degrees to +30 degrees of radius 2.    It is very hard to place these arc sometimes.  This is the symbol i want to draw:    (This represents an eye and needs more detail).  I want to draw the arc as _part of a circle with center at where the < meets, but I have to currently fudge the start location of the arc so it properly crosses the < (and it's not even exact).  If I could do a circle from -45 to +45 degrees CENTERED at the <, then that would be much easier.


So I'm looking for the right answer for my grid system:  1) Should I use 12 or 16 column grid for a full width website similar to these websites:    2) Can I use bootstrap for 16 column width  3) what are the challenges for a 16 columns grid vs traditional 12 column grid?

I'm trying to create a UI design for my 1024x768 screen.   I know there's a grid system out there. I've read about the benefits, etc. I understand, I think from a fundamental level, why I need to use them.  But I'm so confused about how to create my own grid for my designs.  How, for example, do I decide how many columns to use?  Is there some way to take a look at a wireframe prototype and immediately be able to assess how many columns I'd need to use?  I'm essentially taking wireframes and "skinning" them out in Illustrator.   The other thing I've noticed is that sites that talk about grids sometimes show examples that confuse me a bit.  For example, I've noticed that a site will have 12 columns, but some of the boxes that align to the left side of this column have an overflow on the other side--meaning they don't fit into the column perfectly.    Can anybody help me decipher grids?  I've looked through other threads, but it still answering my questions as to HOW you step-by-step set up a grid to fit your design.


I am receiving upvotes, but my reputation is not increasing. Why does that happen?  Take a look at  and  for example.

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


As a particle moves away from us, its apparent size keeps decreasing. Is there a minimum apparent size that a particle needs to be before it becomes unobservable, and therefore is not in our observable universe, and therefore exerts no gravitational attraction?  Would general relativity and quantum physics agree on the answer?

Inspired from the commentary on  question.  How far apart do two objects have to be for the gravitational force between them to be negligible? By negligible  I mean, that it could never be measured rather than a technical limitation that results in a measurement/force of zero and/or the accuracy of the measurement is too imprecise to be of use.  Basically when is the force to small to ever be measured, now or in the future? Is there a limiting distance?


When i'm switching the theme in Gnome Tweak tool some applications like calculator and system monitor doesn't switch it. They are just stuck on Adwaita (default) theme. In another apps like Files everything is good. Is this a bug of a new version of Ubuntu or i am doing something wrong? I am also using Ubuntu 16.04 and all these apps are switching themes perfectly.  Current theme is Arc-Dark but some apps are still use Adwaita:

I'm using X-Arc-White GTK theme in my freshly installed Ubuntu 18.04 desktop. I looks really amazing, but there's a problem with GNOME own applications, like system monitor or calculator. They are shown only with default Adwaita theme.      The only themes which work for all programs are Ambiance and Radiance. Is there a reason for that behaviour?


When upgrading Ubuntu 19.10 to 20.04, I get these three errors:  w: updating from such a repository can't be done securely, and is therefore disabled by default.  w: see apt-secure(8) manpage for repository creation and user configuration details. e: the repository 'http://in.archive.ubuntu.com/ubuntu disco-updates release' no longer has a release file.   How can I fix these errors?

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


Arab and Arabian are both related to people:        He is an Arab.   He is an Arabian.      Which is used for the location of a country?        Egypt is an Arab country.   Egypt is an Arabian country.

Are these adjectives interchangeable?  I always hear: 'An Arab man.' but never 'An Arabic man.' and I always hear 'Arabic coffee' but never hear 'Arab coffee.'


Could someone please explain the difference between these two?  data=[] for row in csv_file_object:      data.append(row[1:])    and  data=[] for row in csv_file_object:     data.append(row)

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I was just wondering how, observationally, we would distinguish a distant galaxy of "normal" matter from one of antimatter. Maybe there is a simple answer but I don't see it. Once I started thinking about it, it bothered me.  I will often come across an article that says (paraphrasing) cosmologists can't account for asymmetry in matter/antimatter in the observable universe.  What technique do they use to distinguish the two remotely? Suns and "antisuns" would have the same spectra as would all the elements and their counterparts so far as I can tell. They have the same masses, so gravitationally they wouldn't be distinguishable. Am I missing something?

Ordinary matter and antimatter have the same physical properties when it comes to, for example, spectroscopy. Hydrogen and antihydrogen atoms produce the same spectroscopy when excited, and adsorb the same frequencies. The charge does not make a difference in the potential (regardless if it's generated by a proton or an antiproton) nor in how the positron behaves in this potential (being its mass equal to the mass of an electron)  How can astronomy evaluate if a far galaxy is made of matter or antimatter, given that from the spectroscopy point of view, they behave in the same way? In other words, how do we know that an asymmetry exists between matter and antimatter in the universe?


I am travelling to Canada on a Migrant Visa. Flying Air India to Newark Liberty & by Air Canada from Newark Liberty to Toronto. Layover for a change of planes being 4hrs 20mins in Newark Liberty Intl. Would I require a US transit Visa for my travel?

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


I see the list of internet word searches every I go to google play. No matter what settings I use the words are still there. Show searches I made on the device. But only in google playstore. It could become embarrassing. I cleared data for all application I could find use history and cache cleaners. Nothing works.

Any thoughts on how one might clear the Android Marketplace search history? For instance, if I recently searched for an android app in the marketplace, the marketplace search maintains a history list of which apps/keywords that I have recently looked for.    Thanks in advance!


Last night when I was DMing I had an NPC wizard who had Magic Missile.  The description states “each dart hits a creature of your choice”.  In this instance what would be considered a creature?  The player characters?  When I look up creature in the manual it looks like “a creature” means an animal and not a humanoid, so Magic Missile would not be effective.  I guess this would be true the other way as well: if I am playing a wizard I could not target most humanoid monsters/villains.  Am I reading this right?

In the Starter set and Basic Rules, it mentions "character", "non-player character", "player character", "monster", "creature", and maybe other terms I've missed.  Which of these terms are interchangeable?   Some examples from the Basic Rules PDF:   Page 105: Conditions Appendix refers only to creatures. Chapter 11: all spell descriptions refer to creatures, but occasionally other terms such as humanoids.


i'm using a php script in my Android project to delete a lign from the database . here is the php file content :  <?php $pseudo = $_POST['pseudo'];  define('HOST','localhost'); define('USER','root'); define('PASS',''); define('DB','ract');  $con = mysqli_connect(HOST,USER,PASS,DB);  $sql = "DELETE from utilisateur where pseudo=$pseudo"; $res = mysqli_query($con,$sql); ?>   I think that the main problem in comparing pseudo to $pseudo

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


Why can't Stack Overflow just email me immediately when someone responds to my questions?    I feel like an a-hole when I find out someone posted on a question I asked a month ago and I only find out because I happened to browse to it. Every other forum does it.

I'd like to have Instant notifications by email of answers to my questions.  Can this be implemented?


$f\left(x,y\right)=\left(\frac{x}{x^{2}+y^{2}  } , \frac{y}{x^{2}+y^{2}  } \right)  $  $R^{2}-(0,0)$  Can someone help me with shwoing that this function is surjective?

$f\left(x,y\right)=\left(\frac{x}{x^{2}+y^{2}  } , \frac{y}{x^{2}+y^{2}  } \right)  $  How do I find inverse function? I have trouble here, because there are 2 variables and I am not sure how to do it?


I was just taking care of my vault and out of the corner of my eye it looked like someone was standing in the back of the storage room once I saw him he disappeared and then this weird music started to play like dun dun daaaaaa I waited for awhile and I herd that music again but I didn't see it in time. Who is this figure?

This morning after the new Fallout Shelter update (1.2), I saw a mysterious stranger hiding in one of my rooms. When he is tapped  there is a sound cue and he disappears in a puff of black vapor.   Does anyone know what's going on here?


I need to have two scenes exactly the same. The only difference will be the material of each object. It is important to have all the elements between scenes linked so any change in one scene is also applied in the other. This is in order to have an automatic script to generate the instance segmentation image of the scene.   I could copy the scene when rendering, change the materials and remove the scene and repeat every time the user renders, but having a linked scene is much cleaner. I have followed several similar questions which suggest to link the material to the object and not the data. This looks like not working maybe because it works different in linked copies of a scene or maybe because it is blender 2.82.  Any idea how to achieve this? Thanks everyone

Is it is possible to keep the mesh and location linked between the spheres in the example shown below, but have different materials on the spheres?  I have tried several related examples here on Stack Exchange, although the mesh is the same and the material can be different, the position of the spheres are lost, and they can be moved independently of each other.  Does anyone know if it is possible to keep the mesh and location linked, but with different materials on the spheres? That is, any movement of the sphere in scene A should be mirrored in scene B.   The .blend file for this example is available at     The material is linked as object


I have three list with four values in each list, I have to remove duplicate values from these three list  Here are three lists  country_list = ['USA', 'India', 'China', 'India'] city_list = ['New York', 'New Delhi', 'Beijing', 'New Delhi'] event_list = ['First Event', 'Second Event', 'Third Event', 'Second Event']   As its showing in all three lists "India", "new delhi", and Second event" are repeating, means they again are repeating with each other. I want to remove these repeating value, and wants the result like  country_list = ['USA', 'India', 'China'] city_list = ['New York', 'New Delhi', 'Beijing'] event_list = ['First Event', 'Second Event', 'Third Event']   So how can i get this result is there any function for this ?

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


Subjects usually agree with verbs and series of nouns usually make a plural subject as far as I know. Thus in sentences like "A book, two pencils and a pen are lying on the table." we use are and not is. So why does "there" seem to break the rule in the sentence "There is a book, two pencils and a pen on the table."? Is there any logic behind it? Or maybe some history?

What are the roots of the creeping usage of "there's" for both singular and plural predicates? (This seems to be more common in spoken English.) I have 2 theories.  Perhaps it is because spoken communication our society is becoming less formal by the day. Or perhaps it is a reflection of speakers of other languages having increasing contact with native English speakers.  I am aware of German  "es gibt" and Spanish  "hay" constructions. Please comment.  3/06/14 I ran a couple of Google Ngrams and was surprised to find a greater rise in the use of "there's" in English fiction than in general English language books, since the turn of the century.  This would seem to support my contention that informality is behind the shift.


Let's say I have my method myMethod checking a series of scenarios then throws exception accordingly without handling those exceptions.  public MyResponse myMethod(MyRequest req) {     try        {           if(req.property1 == null || req.property1.isEmpty())              throw new Exception("Property 1 is null of empty");            if(req.property2 == null || req.property2.isEmpty())              throw new Exception("Property 2 is null of empty");            //if no problem is found then proceed ...        }        catch(Exception e)        {           //log error           throw e;        }  }   How do I test the exception being thrown or at least check the message that was sent with the exception?  @Test public void aNullOrEmptyProperty1CausesExceptionTest() throws Exception {     //..     String property1 = "";     req.setProperty1(property1);     //...     MyResponse response = target.myMethod(req);      //How to check for the exception? }   Thanks for helpin

How can I use JUnit4 idiomatically to test that some code throws an exception?  While I can certainly do something like this:  @Test public void testFooThrowsIndexOutOfBoundsException() {   boolean thrown = false;    try {     foo.doStuff();   } catch (IndexOutOfBoundsException e) {     thrown = true;   }    assertTrue(thrown); }   I recall that there is an annotation or an Assert.xyz or something that is far less kludgy and far more in-the-spirit of JUnit for these sorts of situations.


My question is not a duplicate because    I don't use wine directly while the asker used wine instead of Playonlinux.  My ubuntu version is 18.04.01 Bionic Beaver, not 14.04 LTS. I am trying to install MS office 2007, not MS office 2010.   I tried several methods.  I successfully mounted the iso-file via the terminal, but Playonlinux is unable to find the CD-ROM, despite the fact that I indicated the path to this mount point (after the successful mounting) in the field "where is your cd-rom mounted".  I chose installation of a non-listed program in POL, browsed the 'setup.exe' file belonging to the folder "ms office" and followed the POL instructions afterwards. There were various messages during the installation process. The was a message that everything is ok, and MS office has been successfully installed on my PC. But those files generated by MS office on another PC are not opened on my PC, and my ubuntu system informs that MS office is not installed. I chose the wine version 3.0.1. in the configuration menu in POL before installation.  Can you give some recommendations and references? What can I do else?  The above link to another question did not help me. I followed the recommendation offered for installation of ms office 2007. My ubuntu version requires "Please insert volume 'OFFICE12' (needed for package 'office2007pro')" , despite mounting of OFFICE12.iso

I have been trying to install it many times using the Wine version avaliable from the Sofware Center. Is there a proper way to configure it for allowing the installtion?


Whenever I read about IFS it was always in the context of read (or at least thus I understood). Is IFS used for anything else than read shell-builtin?

I was reading this thread:   What is IFS? And what is its usage in context of for-loops?


The Potters and the Gaunts are both said to have descended from the Peverell brothers. Voldemort  came from the Gaunt line and was the heir of Salazar Slytherin. Was Harry also the same, or is it that the Peverell brothers were so back in line of ancestry that the divergence of bloodlines digresses the relation?

I know that he was related to      Ignotus Peverell   From CoS we know he was a "spiritual" heir of Gryffindor (aka True Gryffindor) - but so was Neville from DH events.  And he was born in Godric's Hollow.  But is there any information to confirm or deny whether Harry Potter was literally descended from Godric Gryffindor?


$\overline{X}=\frac{1}{n}\sum_{i=1}^n X_i$ is the sample mean and $S^2=\frac{1}{n-1}\sum_{i=1}^n (X_i-\overline{X})^2$ is the sample variance. $X_1,...,X_n\sim N(\mu, \sigma^2)$ and independent. I want to show that $\overline{X}$ and $S^2$ are independent. I've already proven that $\overline{X}-X_i\sim N(0,\frac{n-1}{n}\sigma^2)$ and that $Cov(X_j-\overline{X},\overline{X}) = 0$. But then I didn't know how to proceed. While searching for solutions, I found . Here it claims that I need to calculate the covariance matrix and then use the "multivariate normality" (I don't know what exactly they mean by that) so that $\overline{X}$ and $X=(X_1-\overline{X},...,X_n-\overline{X})^T$ are independent. The rest is clear to me. I just want to understand the details to why $\overline{X}$ and $X$ are independent.

I've been trying to establish that the sample mean and the sample variance are independent. One motivation is to try and write the sample variance, $S^{2}$ as a function of $\left\{ X_{2}-\bar{X},X_{3}-\bar{X},\cdots,X_{n}-\bar{X}\right\} =A$ only. Then we proceed by showing that $A$ and $\bar{X}$ are independent (which I'm unable to show), which then implies the independence of $S^{2}$ and $\bar{X}.$    I would appreciate it if the good people of M.SE would help guide me in the right direction. Thanks.  Edit: The random samples $X_1,\cdots,X_n$ are from an $N(\mu, \sigma)$ distribution.


To backup my document root (/var/www/html/ I can execute):  zip -r ~/backups/all_zipped-$(date +\%F-\%T).zip /var/www/html/   The problem is that inside the created zip file, I get 3 base directories instead of 1:   var. www. html.   The desired end state is to have only 1 base directory (the last one). In this case, of course, html (and its inodes).  Using zip -r ~/backups/all_zipped-$(date +\%F-\%T).zip /var/www/html/* (note the *), didn't help.  How to zip current directory without its entire path?

I have a folder that contains multiple files  folder  artifact1.app artifact2.ext2 artifact3.ext3 ...   My goal is to zip the file from outside this folder (so without using cd command) without including the folder dir. zip -r ./folder/artifact.zip ./folder/artifact1.app  This command includes the folder dir in the final zip. Any hints? Related question:


It's been a while since I started using (ubuntu) linux as my desktop, and I have a question about uninstalling software outside the scope of the package manager.  Most linux or unix distribution comes with a package manager and its repository, but not all software can I find in the repository. For example, I cannot install vmware linux virsion with apt, yum, emerge, or whatsoever; it comes with a shellscript installer.  In such cases, in order to uninstall, is the only way possible simply tracking the whole installation script and undo whatever was done? I believe there must be some more sensible way, but I couldn't find any.

When I install a simple program it often uses make && make install and doesn't often even have an uninstall target.  If I wish to upgrade a program, is it standard protocol to assume it just rewrites seamlessly over the old program?  How do I keep track of these programs; do most people just 'fire and forget' and if no uninstall target is given do I have to manually delete everything?


My question is about preventing an "variable is undefined" error more effiencitly.  e.g  If I use the following code:  if (array[index] != undefined) {   if (array[index].id == 1)   {     // code    } }   It will work fine. But, am I able to use  if (array[index] != undefined && array[index].id == 1) {  // code }   without getting an "variable is undefined" error, if array is undefined?  (I can't exactly test this in my code right now because I'm building a client-server application, and I'd have to alter many lines to try it, so I'm asking it here. I'm sorry if it's not appropriate)

What's the best way of checking if an object property in JavaScript is undefined?


Lately, my kids, 4 and 7, have become very picky eaters and don't eat much. If they do eat, they eat prepacked food or anything deep fried like chicken in small amount or few bites. As result, my wife and I are frustrated.   So, I want to know what do kids like to eat the most and how to make them eat the cooked food? My one son hates anything with veggies. He will literally throw up.

Dinner with my 5-year-old is an ordeal. I do not want to cook separate meals. How do I stop the fighting at dinner and get them to eat?


I am getting error $: command not found while executing following command $ sudo dpkg-reconfigure keyboard-configuration for reconfiguring keyboard configuration in Ubuntu 18.04.03 console. Kindly assist what went wrong. Thanks!!

Any command that starts with $ returns  command not found   How can I fix this?  I am  using 16.10 Ubuntu.


We need to customize newdocset.aspx of document set in SharePoint 2010. Currently reference is given to newdocset.aspx of _layouts folders application pages. Did lot of research, but I got no where.

I need to customize the form that appears when users create a new document set. It's stored as “NewDocSet.aspx” under “_layouts”, which I can’t access. Is altering that file really the only way to get a custom form, or am I missing something? When I click Settings -> Customize Form in my document library, I get a message stating “Customizing the form for this SharePoint list is not supported.” It seems Infopath forms aren’t supported for doc libraries. (Google confirms.)  Any ideas? THANK YOU!


//index.php                                outside the dom         <form   name='frm_details' class='frm_details' id='frm_details0' action=''>         <input type='text' name='fname'>         <input type='text' name='lname'>         <input type='submit' value='Outside dome'>         </form>

   //domcontent.php  inside the dom <form   name='frm_details' class='frm_details' id='frm_details1' action=''> <input type='text' name='fname'> <input type='text' name='lname'> <input type='submit' value='inside dom'> </form>   im running into an issue with the 2 pages above index.php and domcontent.php my end goal is to be able to submit forms from index.php and domcontent.php using the same piece of ajax code bare in mind these are both the same form one is new and the other is update  the issue is when submitting the form  frm_details0 from index.php it sees the ajax and submits the form to functions2.php i can see this works via the chrome network developers tool but the form frm_details1 inside the dom loaded via ajax onto index.php doesn't submit or even access functions2.php how can i make the form loaded inside the dom on index.php submit using the ajax located on index.php  im new to ajax so where possible please show edits to my code   thanks in advance

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


Can you help me identify a story by this poorly recollected plot line? I probably read the story when I was 12 so 50+ years ago.  Aliens arrive on a dead planet earth and begin to resurrect various long dead humans. A cave man and a man who died drunk in a car wreck and finally a human who disappears as soon as he is resurrected. Turns out earth had been surprised by a radiation belt that wiped out everyone because of its huge size. The aliens tried to eliminate the last human they had brought back but couldn't. All was trending well for the humans when the story ended.  Poor description from a poor memory but I would appreciate it if anyone knows where I could read the story again

I'm trying to locate a short sci-fi story I read years ago about a human that is "resurrected" by an arrogant and malignant alien species that discovers him in a "museum" on an earth where the inhabitants, though very advanced, had been wasted by a close encounter (I believe) with a neutron star. He is the third or fourth human they "reconstruct" and it turns out that he is an advanced mentalist, disappearing at the moment of his "resurrection". He outwits the aliens and eventually tricks them into plunging their ship into the sun in order (they think) to prevent him from finding out where they come from. Any suggestions?


I am using spring boot with hibernate to build our application. for transaction management i am using @transaction on serviceImpl class it work properly. Transaction data rollback properly but GenerationType.IDENTITY or strategy=GenerationType.SEQUENCE value not roll back. For example if  last insert row in table  is 10 and lets assume next insert row value is 11 and this time because of some issue transaction is rollback after. but if we insert again it take next row value is 12 not 11. why this happens why next column value is not 11. Is there any way to take previous value.

I'm using MySQL's AUTO_INCREMENT field and InnoDB to support transactions. I noticed when I rollback the transaction, the AUTO_INCREMENT field is not rollbacked? I found out that it was designed this way but are there any workarounds to this?


I saw an earlier question () that mentioned lower quality lenses have distortion, aberration and light fall off issues. Has software like Adobe Camera RAW come far enough along to correct these issues to an acceptable (less noticeable) level?   I use ACR often and I definitely see the distortion change when applying this adjustment. I can guess years ago before these software adjustments were around cheaper lenses suffered much more from this. I realize you can't "correct" for image quality, bokeh, aperture and those things, my question only relates to the issues in my title.   So my question is, has software corrections to lenses come so far that these three issues are no longer as important?

Lightroom has Lens Correction tools such as Distortion, Vignetting, Chromatic Abberation, etc. depending on the brand and model of lens.  Due to this feature, is it less relevant what the distortion quality is of lenses because Lightroom can correct them?  I understand a perfect lens is always better, but since it can save a huge amount of money, maybe the expense is not worth it?


Question: Let $f$ be a real-valued differentiable function in $(a, b)$. Suppose that there exist $x, y ∈ (a, b)$ such that $x < y$, $f'(x) = 0 = f'(y)$ and $(f(y)−f(x))/ (y−x) > 0$. Prove that there exist a $ζ ∈ (x, y)$ such that $(f(ζ) − f(x))/(ζ − x) = f'(ζ)$ My Approach: I thought this is an easy question because the condition says that $f$ is differentiable, which means it is continuous. So it satisfies the condition for applying the mean value Theorem. Since $(x,y) ∈ (a,b)$, the differentiability and continuity still holds for domain $(x,y)$ which means we can still apply the mean value theorem, and thus proving the statement true. However, according to this approach, I am not fully using the conditions giving in the question: $x < y$, $f'(x) = 0 = f'(y)$ and $(f(y)−f(x))/ (y−x )> 0$ Am I missing something about proving this statement?

$f(x)$ is differentiable in $[a,b]$, $f'(a) = f'(b) = 0$, Prove $\exists c \in (a,b)$ such that $f(c)-f(a) = (c-a)f'(c)$  What i have tried: $f(x)$ is differentiable in $[a,b]$ imply $f(x)$ is continuous in $[a,b]$    so we can use MVT, we get  $f(b)-f(a) = (b-a)f'(\zeta_1) $ for some $\zeta_1$ in  $(a,b)$  $f(c)-f(a) = (c-a)f'(\zeta_2) $ for some $\zeta_2$ in  $(a,c)$    I can't figure out how to use the condition $f'(a) = f'(b) = 0$


Actually the problem is that on the image bellow.

I am trying to copy files using secure copy(scp). I am trying to execute the following command but I get error due to the space in the absolute path of the location of the directory.  scp -r -P 8484 root@172.31.72.103:/media/New Volume/lj /home/pratheep   I am getting the following error:  scp: /media/New: No such file or directory   scp: Volume/lj: No such file or directory   I tried using the same command putting extra back slash like  scp -r -P 8484 root@172.31.72.103:/media/New\ Volume/lj /home/pratheep   but I am still getting the same error.  Can somebody tell me how to correct it?


Yesterday I installed Ubuntu 16.10 (Unity) alongside Windows 10 which was already installed.   I found myself using a terminal a lot, but there is something which kinda bugs me: even if no command is running, if I'm logged in as root (I mean after typing sudo su and then my password) when I want to close the terminal it will prompt me with this    How can I close it without that message popping up? I want it to pop up only if the terminal is executing some command.

Each time when I want to close terminal there is a popup with question "Close this terminal?" because some process is running in terminal. I don't care about this process. How to prevent terminal from showing this popup?


I am wondering if this is the most efficient way to find the nth highest number in an unsorted array. What I did was sort it with mergeSort then find the index of the nth highest number. I think this is more efficient than most searches but I am not quite sure.....  import java.util.Arrays; public class ThirdHighest {  public static void main(String[] args) {     // TODO Auto-generated method stub     int [] a = new int[]{3,5,6,7,8,2,1,10,9};     System.out.print(Arrays.toString(a));     mergeSort(a);     System.out.print(Arrays.toString(a));     System.out.print(nHighestValue(a, 3));  } public static void mergeSort(int[] arr) {     if(arr.length > 1) {         int lengthLeft = arr.length / 2;          int [] left = Arrays.copyOfRange(arr, 0, lengthLeft);         int [] right = Arrays.copyOfRange(arr, lengthLeft, arr.length);         mergeSort(left);         mergeSort(right);         merge(arr, left, right);     } } public static void merge(int[] result, int[] left, int[] right){     int l1 = 0;     int r2 = 0;     while(l1 < left.length || r2 < right.length) {         if(l1 == left.length) {             result[l1+r2] = right[r2];             r2 += 1;         } else if(r2 == right.length){             result[l1+r2] = left[l1];             l1 += 1;         } else if(left[l1] < right[r2]) {             result[l1 + r2] = left[l1];             l1 += 1;         } else {             result[l1+r2] = right[r2];             r2 += 1;         }     } } public static int nHighestValue(int[] a, int n) {     int index = a.length - n;     return a[index];  }  }

I believe there's a way to find the kth largest element in an unsorted array of length n in O(n).  Or perhaps it's "expected" O(n) or something.  How can we do this?


Suppose $f(x)$ is real valued uniformly  continuous function on $ \mathbb R$. Is it true that limit of $f(x)/x$ exists as x tends to infinity and minus infinity?

For $\alpha >1$, $x^\alpha$ is not uniformly continous over $\mathbb R$ , essentially because $\forall \delta>0, \lim_n (n+\delta)^{\alpha}-n^{\alpha}=\infty$  I don't have a clear intuition about the behavior of uniformly continuous functions over an unbounded interval.      Is is safe to say that if $f$ is uniformly continuous over $\mathbb R$ then $\displaystyle \forall \alpha >1, f=o_{\infty}(x^{\alpha})$ ?


has a range of 5 feet and states (emphasis mine):  You create a burst of thunderous sound that can be heard up to 100 feet away. Each creature within range, other than you, must succeed on a Constitution saving throw or take 1d6 thunder damage. [...]  The Distant Spell  states:  When you cast a spell that has a range of 5 feet or greater, you can spend 1 sorcery point to double the range of the spell. [...]  Does doubling the range of Thunderclap also increase its area of effect or do something else entirely?

If this has been asked, I could not find it. My Sorcerer has the sword burst cantrip, and I'm thinking of taking the 'Distant Spell' metamagic option. Will it change the range to 10 feet?  Similar to  but not quite answered, though Crawford's tweet seems to imply it would work.  Although the spell has a range of 5 feet, it seems like Distant Spell would increase the area of effect in this case. So RAW it works, but likely shouldn't?


Last night I made a large portion of lasagna (ground turkey, cheese, spaghetti sauce).  I wanted to let it cool down before placing it in the refrigerator, but I forgot to put it away last night.  I discovered in the morning that I had left it out all night (room temp was low 60F last night).  I put it right into the refrigerator as soon as I discovered it.   Is it safe to eat? And if so, how long?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I am working in wordpress. I want to set site name in two colors.  My html code is :  <h1 class="site_title"> Pal Enterprice </h1>   Here I want to set Pal color as red and Enterprice color as  blue. So what css have to write?

This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?


I'm having difficulty figuring out the difference between (typically referred to as S.E):  A. The Standard Error  And  B. The Standard Deviation of the Sample Mean (typically referred to as s)  Are they the same thing?  OR   S.E is the standard deviation of the the mean of the sampling distribution similar formula as the standard deviation except you use n-1 instead of n in the denominator s is the standard deviation of a single random sample -- same formula as the standard deviation

I'm struggling to understand the difference between the standard error and the standard deviation. How are they different and why do you need to measure the standard error?


When doing an ls in a directory I get the following output:  drwxr-xr-x@ 12 xonic  staff    408 22 Jun 19:00 . drwxr-xr-x   9 xonic  staff    306 22 Jun 19:42 .. -rwxrwxrwx@  1 xonic  staff   6148 25 Mai 23:04 .DS_Store -rw-r--r--@  1 xonic  staff  17284 22 Jun 00:20 filmStrip.cpp -rw-r--r--@  1 xonic  staff   3843 21 Jun 21:20 filmStrip.h   I was wondering what the @ means.

Possible Duplicate:          when I type ls -la I get this familiar output...  drwxr-xr-x+  38 kent  staff       1292 Nov  6 11:09 . drwxr-xr-x    5 root  admin        170 Aug 14 14:11 .. -rw-r--r--@   1 kent  staff         16 Jun 18 14:13 .AB64CF89 -rw-------    1 kent  staff          3 May  5  2009 .CFUserTextEncoding -rw-r--r--@   1 kent  staff      15364 Nov  6 11:11 .DS_Store   my question is about the file settings on the far left eg:  drwxr-xr-x+   I know that the first char 'd' means directory. and the next 9 chars I understand as well (permissions) but what is the final char in this field? (empty or + or @ )


While True:     n=turtle.textinput(“”,”write your grade”)     grade = int(n)      while int(n) != grade :         n=turtle.textinput(“”,”use only number”)         grade = int(n)      If grade <=100 and grade>=95 :         print(“A+“)     else :         print(“F”)   I'm getting value error.  I want to get situation <- if users gives me literal answer, I want to say "only number".

What is the best possible way to check if a string can be represented as a number in Python?   The function I currently have right now is:  def is_number(s):     try:         float(s)         return True     except ValueError:         return False   Which, not only is ugly and slow, seems clunky. However I haven't found a better method because calling float in the main function is even worse.


I have to print some Municipality shots and I use OpenStreetMaps or Google Maps but when I print the streets names are too little and is is not possible to read them. On screen names are perfectly legible and the size is right. How can I solve?  I use OpenLayerPlugin v1.4.1

I'm having trouble with the OpenLayers Plugin of Qgis and the map composer:  If I create an OSM-background layer and if I want to export this, the OSM-Layer looks perfectly all right in the normal qgis program window. But in the map composer and after export the layer has shifted relatively to my other shape layers (EPSG:32633 - WGS 84 / UTM zone 33N).  The second thing is that the output resolution of the exported osm-layer is very, very poor.   A really bad way of getting around this whole trouble would be to increase the screen resolution and make a screenshot of the map composition window of qgis. But I don't think this would be very professional. It also would cause a lot of pain :)   I'm using Qgis 1.8.0-Lisboa under Linux. The openlayers plugin is version 0.92.


Is it possible to overwrite the SLDC css classes?   I tried changing below :   .slds-input:focus, .slds-input:active{     border-color: rgb(255, 0, 0) !important;     box-shadow: none; }   I wanted to change the border-color to red, but it eventually defaults to blue on the component. rgb(21, 137, 238);  Is there a way to change the border-color property of the css class?

How can I change the colors of lightning-button?  I tried doing this in my css:  .my-button {     background-color: #14a6bc;     color: #ffffff; }   and applying that class to my <lightning-button> and removing the variant but I still get the base colors? I am trying to use these examples:


\documentclass[12pt,a4paper]{article} %------------------------------------------------------------ \usepackage{amsmath,amssymb,amsthm} \begin{document} \[ \begin{pmatrix} 1 &2 &0&\cdots& 0\\ 3& 4 &0&\cdots& 0\\ 0 & 0 &0&\cdots& 0\\ \vdots & \vdots & \vdots & \vdots\\ 0 & 0 &0&\cdots& 0\\ \end{pmatrix}\] and \[U_k= \begin{bmatrix} J_{k\times k} &0_{k\times (n-k)} \\ 0_{(n-k)\times k}& I_{(n-k)\times (n-k)}\\ \end{bmatrix}\] \end{document}    I want to subdivise the following two matrices    Like the following one

How can I Tex this equation?  I try to have exactly the same result but for the moment I only succeeded in having intersecting lines... Thanks!


Ubuntu point release 18.04.01 is . But when trying to update my 16.06 server nothing is not found, only the 18.04 is found when passing the dev option to the do-release-upgrade command:  [12:10:04] root:~# do-release-upgrade --check-dist-upgrade-only Checking for a new Ubuntu release No new release found. [12:10:06] root:~# do-release-upgrade --check-dist-upgrade-only --dev Checking for a new Ubuntu release New release '18.04 LTS' available. Run 'do-release-upgrade' to upgrade to it.   Am I missing something? Or it's just not available for now for servers?

I understand that the first point release of Ubuntu 18.04, namely 18.04.1 is now available and that my system should now offer it as an update.  My current OS version is 16.04.5 LTS. In System Settings/Software and Updates I have set 'Notify me of a new Ubuntu version' to 'For long term support versions'. I have tried both the main server and the server for United Kingdom, neither offers an update when Software Updater is clicked or via the Ubuntu Software icon.  Can anyone please tell me why I don't get the option of updating to 18.04?  Edit:  I don't remember the details exactly, but I think that my last LTS point release update was offered automatically a lot sooner after the published release date than where we are now with 18.04.1.  Edit 10th August  It appears that there has been some problem with the update process and that it should be fixed next week, see:    Edit 14th August 18.04.1 LTS now available from UK server,


I don't know how to proceed with this problem:     Find the homogeneous differential equation with constant coefficients and minimum order that has as a (one of them) solution: $t\cdot sin(t)$.   I don't know how to start. How we can inverse the process to find the DE that has this solution without even know the order of it?  Thanks.

Let $y(x)=x\sin x$ be one of solution of $n^{th}$ order linear differential equation with constant coefficients. Find the minimum value of $n$.  I have no idea where how to approach this problem. In book the answer is $4$.


[Ubuntu 14.04.5 64bits]  I mount an SD card with rw permission, on /mnt/XYZ using a udev rule that also triggers a script using it as storage. If the SD card is not mounted, the script is inhibited.  Everything works well, except I'd like:   the card and its content to be owned not by root:root as is the case now, but by root:admin, (admin is a user group I create for certain admin tasks) them to have ugo rwx permissions of type 640, any folder created on the SD card to have the setgid bit.   When the SD is not mounted I can do as I please with the mount point: /mnt/XYZ has permissions drwxr-s---, and root:admin ownership, just as I want. As soon as I mount the SD card, things change:   the mount point becomes root:root and I cannot change it, the content is also root:root and I cannot change it, I cannot change content files' permissions either, as exemplified by : chown: changing ownership of ‘local.key’: Operation not permitted   Could it have something to do with format (MBR/FAT32) not allowing unix like permission attributes. Reformatting the SD card as NTFS does not help. I have not tries ext4.  I have no  trouble at all with managing permissions and/or attributes for files on ext4 SSD paritions mounted from fstab for instance.   Q: Is ext4 the only solution in this case ?

I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.  I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file:  $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700  $ chmod 755 script.sh $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700   As you can see, it remains unchanged.


Right now, I have everything in a partition (except EFI system partition). How can I split the partition into two, one for / and one for /home?   How would you use parted to do that step by step?  How would you use gparted to do that step by step?  How would you use LVM to do that step by step?   One thing I am not sure of is that I can't just shrink the partition and create a second partition on the space that is freed by shrinking, because that doesn't move /home to the new partition.  Thanks.    $ sudo parted -l [sudo] password for t:  Model: ATA TOSHIBA MQ01ABF0 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:   Number  Start   End    Size   File system  Name                  Flags  1      1049kB  538MB  537MB  fat32        EFI System Partition  boot, esp  2      538MB   500GB  500GB  ext4  $ sudo df -h [sudo] password for t:  Filesystem      Size  Used Avail Use% Mounted on udev            1.7G     0  1.7G   0% /dev tmpfs           340M  1.4M  338M   1% /run /dev/sda2       457G  6.7G  428G   2% / tmpfs           1.7G   27M  1.7G   2% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           1.7G     0  1.7G   0% /sys/fs/cgroup /dev/sda1       511M  6.1M  505M   2% /boot/efi tmpfs           340M   20K  340M   1% /run/user/1000 tmpfs           340M     0  340M   0% /run/user/106

I have CentOS 5.5 installed, I have no un-partitioned space and the only ext3 partition I have is huge with lots of free space.  Can I change that partition size in order to allocate another one? I want to create new partitions in order to install another distribution there (Ubuntu).  I tried to do it through the volume administration tool in CentOS, but when I edit the partition size and confirm, it says that it is mounted in / and it needs to be un-mounted before re-sizing, which of course fails.  Any suggestion?


So first time actually posting a question here, but I just can't seem to find a solution. So I made this fire ramp shader for a project I'm working on, and I want to have a transparent background for comp purposes. However, whenever I try to export using png the albedo details of the shader turns white when there's nothing behind it. I tried exporting it using OpenEXR as well, and that seemed to work for some reason. I don't want a 32bit image though, and would preferably keep it as a png. Below is two images, one from blenders render window, and one exported using png with a solid background for better visualization of the problem.   I'm at a complete loss, so if anyone got a solution I would be grateful!

I want to render an image of a fire in cycles, but as a png with a transparent background. Without a transparent background, the output image looks like this:    But as soon as I tick the "Transparent" checkbox under Render->Film, all the semi-transparent parts of the image are not rendered and it looks like this    which is clearly not what I want. I've tried to add a holdout shader or a transparent shader to my smoke domain material nodes, but it didn't help. I've only found answered questions for semi-transparent glass, but none for volumes. My node setup looks like this:    but the transparent shader doesn't do anything.  Has anyone an idea how to fix this?  Thanks  Edit: I've just changed the flow type to "Fire and Smoke" instead of "Fire" and now the semi-transparent parts render too, but I don't want the smoke.


I need to use the 8081 port with Apache but Selinux doesn't allow that:  semanage port -l | grep http_port_t http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000  semanage port -l | grep 8081 transproxy_port_t              tcp      8081   So, if the httpd.conf there is this:  Listen 8081   then I can't start httpd because I get this error:  #systemctl start httpd Job for httpd.service failed because the control process exited with error code.  See "systemctl status httpd.service" and "journalctl -xe" for details.    #systemctl status httpd.service httpd.service - The Apache HTTP Server    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)    Active: failed (Result: exit-code) since lun 2018-11-05 19:21:31 CET; 36s ago      Docs: man:httpd(8)            man:apachectl(8)   Process: 1953 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)   Process: 1952 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)  Main PID: 1952 (code=exited, status=1/FAILURE)  nov 05 19:21:31 localhost.localdomain httpd[1952]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8081 nov 05 19:21:31 localhost.localdomain httpd[1952]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:8081 nov 05 19:21:31 localhost.localdomain httpd[1952]: no listening sockets available, shutting down nov 05 19:21:31 localhost.localdomain httpd[1952]: AH00015: Unable to open logs nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE nov 05 19:21:31 localhost.localdomain kill[1953]: kill: cannot find process "" nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 nov 05 19:21:31 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server. nov 05 19:21:31 localhost.localdomain systemd[1]: Unit httpd.service entered failed state. nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service failed.   How can I do?

My system is running CentOS 6.4 with apache2.2.15. SElinux is enforcing and I'm trying to connect to a local instance of redis through my python/wsgi app. I get Error 13, Permission denied. I could fix this via the command:  setsebool -P httpd_can_network_connect  However, I don't exactly want httpd to be able to connect to all tcp ports. How can I specify which ports/networks httpd is allowed to connect to? If I could make a module to allow httpd to connect to port 6379 ( redis ) or any tcp on 127.0.0.1, that would be preferable. Not sure why my paranoia is so strong on this, but hey...  Anyone know?


My iPhone fails to connect to my mac via USB charger. The USB port and the cable are working. System Information shows that "unknown device (...not been configured)". I don't know why this happens?

When I plug in my iPad or iPhone (USB), iTunes frequently recognizes its presence.  BUT, nearly as frequently, it doesn't seem to notice the device at all.  Un-plugging and re-plugging does no good.  The only thing that seems to help is quitting and then re-starting iTunes -- which I seem to need to do more and more often any more.  iPhoto, BTW, seems to always recognize that a new device is present.  Ideas?


Does Stack Overflow have a new special kind of Google integration?  How does this work? It looks great!

I just noticed something which I think is pretty cool ():  Inside the search results, Google includes the number of answers and the date a certain question was asked (even more intriguing: these values are properly localized).  Is this Google special-casing for Stack Overflow, or does Stack Overflow somehow provide these values from within the page itself?


How to delete all files pertaining to a recently installed program that has not worked? I think no one wants to fill their computer with odd bits and ends from aborted installations, dependencies that don‘t pan out &c.  I suppose that I could use a package manager for that, such as Synaptic. But how?  My immediate concern here is how to get rid of all files related to LanMessenger, which I’ve been trying to make work with no success, but seems to keep asking for more and more dependencies. The last time this sort of thing happened, I ended up freezing everything, and it took me days to be able to boot again.

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


I have a very long file which I want to print, skipping the first 1,000,000 lines, for example. I looked into the cat man page, but I did not see any option to do this. I am looking for a command to do this or a simple Bash program.

I need to repeatedly remove the first line from a huge text file using a bash script.  Right now I am using sed -i -e "1d" $FILE - but it takes around a minute to do the deletion.  Is there a more efficient way to accomplish this?


Let $p$ be a prime. Why is ${p^mn \choose p^m}$, where $p \nmid n$, not divisible by $p$?   $${p^mn \choose p^m} = \frac{(p^mn)!}{p^m!(p^mn-p^m)!} = \frac{p^mn(p^mn-1)(p^mn-2)\cdots(p^mn-p^m+1)}{p^m(p^m-1)(p^m-2)\cdots(p^m-p^m+1)}$$  I can see $p^m$ cancel out in the first term, but why is this not divisible by $p$?

In , there is a statement where:  $$(a+b)^{p^nk}\equiv (a^{p^n}+b^{p^n})^k\mod p$$ I understand this part. But then it expands both sides binomially, and compares coefficients of $\displaystyle{a^{p^n(k-1)}b^{p^n}}$ to conclude $\displaystyle{{p^nk\choose p^n}}\equiv k\mod p$.   If $k<p$, then none of the coefficients in the binomial expansion of $(a^{p^n}+b^{p^n})^k$ are divisible by $p$. I don't understand why comparing coefficients would give us the answer here.  Thanks in advance!


I wonder if there is any phrase or idiom to express a situation, where one of the discussion participants, lacking arguments to upkeep a constructive discussion, steers the direction to personae:  -- ... So these are my arguments, proving that you are completely wrong. Do you agree? -- This is utter rubbish, only fools like you think that way!

What is it called when competition businesses purposefully attack or slander the competition?


He is taller than I. →correct He is taller than me. →incorrect  Is it possible to use object me? They use object with another case.  I am taller than him.(object)

Between you and me Suhani is intelligent.  Neither he nor his brother can walk faster than me. Whom did you mean to hurt by your unkind remarks except Sita and me?    In these sentence book uses me (objective form of I). But I find one more sentence from book which uses I(not  me).   Your husband doesn't believe that you are older than I.   In sentence 2 after preposition than it uses me while in sentence 4 its uses I after than. why? I think there should be I(instead of me) in sentence 3 and me(instead of I) in sentence 4. But i know I am wrong. I am confused with use of me and I. So please  help me to understand this.


My notebook only had a Win10 operating system and always had the McAfee Life Safe antivirus installed. Now it has dual boot, also having Ubuntu 18.04. I want to install McAfee also in Ubuntu, so I contacted the company's technical support, where they informed me that they do not recommend installing the antivirus in Ubuntu, and the antivirus is already installed on Win10.  If the notebook is started with the Win10 operating system, will McAfee be able to scan the partition that is intended for Ubuntu?  That's what technical support explained to me, but I was not convinced because, being in Win10 I can not see anything from the Ubuntu files.

I want to install McAfee antivirus On Ubuntu. I've downloaded McAfee for Linux. But I don't know how to:  Copy pam_unix.so from /lib/security of a 32-bit Ubuntu (till version 10.10) system to a temporary directory /tmp on the 64-bit Ubuntu system. From Ubuntu 11.04 onwards, pam_unix.so is available under /lib/i386-linux-gnu folder.  Do I need to download the whole 32-bit version to get this pam_unix.so file?


How to check methods defined in any class in Python.  I am now studying Pandas and I have checked pandas documentation and python github code too.   I want to know about: DatetimeIndexResampler class. size() and count() are two methods of this class. What are the other methods defined inside this class. I have checked github and it's documentation too.

Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?  Or,  if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called?


I noticed that question/answer functionality seems to be broken on all sites lately. As far as I know, I haven't turned off scripts (unless my latest Firefox update did that without my knowledge, but there doesn't seem to be anything in the options to turn it on/off). I don't currently have any plug-ins that disable scripts. What I'm seeing is the following:  For questions/answers:   The preview window isn't working, and there are no formatting buttons. The similar question search doesn't happen when typing in the Title field. No tag suggestions appear when typing in the Tags field.   Note that the above doesn't happen when I'm editing an existing question/answer.  For comments: - Clicking o the Add comment link just takes me to the top of the page.  Edit I guess it's been fixed and this question can be closed put on hold.

I just noticed that clicking a JS-like link on MSO (like to show more hot network questions) just bumps me to the top of the page and doesn't do anything else.   Also, adding a comment or any other JS-related feature (i.e. inline editing, 10k inline comment editing) is borked.


My daughter has a Lenovo laptop that was originally win 8 but was upgraded to win 10 during the free upgrade   She has now come to me and the machine will not boot.  I do not have a recovery disk for this machine so I created a bootable usb using the Microsoft media creator from a different windows 10 machine,  I have tried rollback, repair, but nothing has worked.  Now when I boot the laptop I can get into the command prompt using the bootable usb drive.  I am now trying to get the windows product and office product keys before I do a full reinstall.  However because I am in the setup environment all the usual command prompts to get the keys using wmic do not work.  How can I get these keys when my only access to the machine is by running the command prompt from the setup.

I had Windows 10 Home (it was preinstalled on my notebook), but I needed Hyper-V to try something, so I found university which has a CD key for Windows 10 Student version on their website and I used it.  Everything worked fine for a few hours, but now I get the well known message to activate Windows. I now understand that I can't use the education version from a different college, but it's a little bit too late.  Is there any way I can restore my old serial key? It's not anywhere in my box from notebook.


The electrons always takes the easiest way in a circuit, right?  So in a parallel circuit, why does the electrons flow through all parts of the circuit and not just the one with the least resistance?

The current is maximum through those segments of a circuit that offer the least resistance. But how do electrons know beforehand that which path will resist their drift the least?


Show that if a prime number $p$ is divided by 30, then the remainder is either a prime or 1.  I did the sum sum but cannot complete it. I took $p=6k+1$ and $p=6k-1$ form. now for any $k=5m$ we get $6k=30m$ form so we can say that the remainder comes 1 but then I can't give proper proof of the rest.

After some trials, I found out that a prime $p \gt 5$ is congruent to $q\pmod{30}$, where $q$ is also a prime, and $1 \le q \lt 30 \;$ (i.e.  $p \equiv q\pmod{30}.$  Is there a way to write a formal proof to show this?  Is that an acceptable answer.


Let $A$ and $B$ be $n \times n$ matrix, each with $n$ distinct Eigenvalues. Prove that $A$ and $B$ have same $n$ eigenvalues iff $AB = BA$.

Let $V$ be a finite-dimensional vector space over $F$ with $\dim(V) = n$. Let $ T:V \rightarrow V$ be a linear transformation.  Assuming that $T$ has $n$ different eigenvalues. prove that :$$ TS = ST \iff \textrm{each eigenvector of} \ T \ \textrm{is an  eigenvector for }S\textrm{ (maybe with a different eigenvalue)}$$   I managed to prove the right to left direction.   Thanks for helping.


First of all, thanks for reading and helping! I have a quick question. I need to know if there is a software option which I could use to connect to a Videoconference Bridge (such as a Polycom RMX or Tandberg VCS, etc) via IP. Web options are also welcome.

There 're somebody i want to talk with him in a video conference in Ubuntu, how can i do that?


Let $a_1=1$ and $a_{n+1}=a_n+\frac{\sqrt{n}}{a_n}$. If it exists, find $$\lim_{n \to \infty} \frac{a_n}{\sqrt[4]{n^3}}$$   Obviously, $a_n \to \infty$ and $a_n$ is strictly increasing. I tried to get rid of that $n$ in the limit and get only $a_n$ terms in the numerator so that I could substitute $a_n$ to $x \to \infty$ and maybe use L'Hospital to finish. But $a_{n+1}, a_n$ and $\sqrt{n}$ are so tightly connected that I didn't manage to do that.  Another approach was Cesaro-Stolz, writing the limit as $$\lim_{n \to \infty}\left(\sqrt[4]{\frac{\sqrt[3]{a_n^4}}{n}}\right)^3=\left(\lim_{n \to \infty}\left(\sqrt[3]{a_{n+1}^4}-\sqrt[3]{a_n^4}\right) \right)^\frac{3}{4}$$ but I encountered the same issue. I'm even wondering if there is a nice closed form for the limit.  Edit: As pointed below, if the limit exists, then its value is $\frac{2}{\sqrt{3}}$. How can we prove that it exists?

This problem is form the Romanian GM.  Let $(x_{n})_{n\geq1}$ be a sequence of real numbers defined by $x_{1}=1$ and $$x_{n+1}=x_{n}+ \frac{\sqrt{n}}{x_{n}}$$ for all $n \geq 1$. Study the convergence of the sequence $$(\frac{x_{n}}{n^{\frac{3}{4}}})_{n\geq1}$$  I only managed to show from the given relation that $(x_{n})_{n\geq1}$ is strictly increasing and tends to $+\infty$.


I'm doing a school project, and I keep getting a "Exception in thread "main" java.lang.NullPointerException" type of error and I can't figure out why. I've read the code but I can't find the answer. This is the code:  package trabajopractico_1;  import java.util.ArrayList; import java.io.*; import java.util.logging.Level; import java.util.logging.Logger; import java.util.Scanner;  public class code {      public void metodo(){         ArrayList<Integer> metodoVolatil = new ArrayList();         ArrayList<Integer> metodoNoVolatil = new ArrayList();         Scanner teclado = new Scanner(System.in);         int numeroV;         int numeroNV;         int resultadosV;         int resultadosNV;         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));         PrintStream array = null;         PrintStream resultadosPS = null;         PrintStream errorPS = null;         try{              if (!new File("arraylist.txt").exists()) {                 array = new PrintStream(new File("arraylist.txt"));             }              for (int i = 0; i < 5; i++) {                 System.out.println("Ingrese 5 numeros para almacenar en el ArrayList.txt: ");                 numeroV = Integer.valueOf(br.readLine());                 metodoVolatil.add(numeroV);                 array.append(String.valueOf(numeroV));                 array.println();             }              for (int i = 0; i < 5; i++) {                 System.out.println("Ingrese 5 numeros para almacenar en el ArrayList: ");                 numeroNV = teclado.nextInt();                 metodoNoVolatil.add(numeroNV);             }              resultadosPS = new PrintStream(new File("resultados.txt"));              errorPS = new PrintStream(new File("error.txt"));              for (int i = 0; i < metodoVolatil.size(); i++) {                 resultadosV = metodoVolatil.get(i) / 3;                 System.out.println("Los resultados de la division de los valores en el ArrayList son: ");                 System.out.println(resultadosV);             }                         for (int i = 0; i < metodoNoVolatil.size(); i++) {                 resultadosNV = metodoNoVolatil.get(i) / 3;                 resultadosPS.append(String.valueOf(resultadosNV));                 resultadosPS.println();             }           }          catch(ArithmeticException e){             System.err.println("Ah ocurrido un error en la division");                     }           catch (FileNotFoundException e) {             Logger.getLogger(code.class.getName()).log(Level.SEVERE, null, e);           }          catch (IOException e) {             Logger.getLogger(code.class.getName()).log(Level.SEVERE, null, e);         }       } }   Acording to NetBeans, the error is located on line 33, which is this:     array.append(String.valueOf(numeroV));   I would be so grateful to receive any help.

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


I'm sure there is much discussion (and lamentation!) on this site about the increasing use of impact as a verb in the place of affect, along with the use of the reflexive pronoun myself when the plain old me would suffice.   It seems fairly apparent that these substitutions are the result of a population familiar enough with common grammatical pitfalls (affect vs. effect, so-and-so and I, not so-and-so and me) but not sure enough of the correct usage.  As a result, I suspect that many of these speakers/writers have become so afraid of making a grammatical mistake with these words that they stay away from them entirely, only to, ironically, end up making the grammatical mistake they were hoping to avoid in the first place.  Is there a name for this phenomenon? Can anyone think of some other good examples?  It seems interesting, to this writer at least, that grammatical mistakes can be born of grammatical knowledge.

Today, I learned the term  after writing that I was drinking a latté and then stopping to wonder why I was putting a diacritical mark on the "e".  This reminded me of other language mistakes that occur more frequently when people are actively trying to make fewer language mistakes, such as:   Every "----- and me" becomes "----- and I" Scattering "myself" throughout one's speech "whom" overuse   These mistakes tend to reveal "I'm talking to an authority figure" or "I'm talking to a group that I may not be qualified to be speaking to".  Is there a term for this phenomenon?


i want to replace specific amount of white-spaces from a String at the beginning and i can use   replace(/^\s{2}/g,"");   and it works .but 2 should be changed according to a value of a variable .so i need to construct a new RegExp()  so i used   var lead=2; var regex = new RegExp("\^\\s{" + lead + "}//g"); alert("regex  "+regex);   real output   /^\s{2}\/\/g/   expected output  /^\s{2}/g   could you help me to fix this problem.tnx

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


The question  has been edited many times and the original poster is continuing to use the same question to ask new questions.  I have voted to close and flagged for moderator attention.  What is the proper procedure to handle this type of activity?

I'm not sure if there's already an existing term for this, so I'm inventing my own. (tl;dr: I call them "chameleon questions" because they change every time you submit or edit an answer.  If you're already intimately familiar with the phenomenon, please skip past the first set of bullet points to where I ask for recommendations.)  I think many of us have experienced this on occasion:  You open up a narrow-looking question, usually dealing with some specific error message.  The question probably contains a snippet of sloppy but not quite awful code; code indicating that the author, typically a new/low-rep user, possibly a , doesn't really know what they're doing.  I'm not trying to be condescending here, they're probably very intelligent and hardworking, but in this specific case, they're clearly in way over their head.  However, as a question, it's not really too bad.  The goal and problem are both clearly stated.  The code is formatted (sort of).  Mort was polite and checked their spelling.  The question looks answerable, although from a rep perspective* it's an obvious dead-end, it's had maybe 3 views in the past 30 minutes.  So you decide, you know what, this person took the time to write up the question properly, they deserve an answer, put on your good citizen hat and throw them a bone.  You slog through the ugly code, find the offending line, direct their attention to it and explain why it's wrong and how it needs to be fixed.  Later, they leave a comment saying that yes, that was indeed the problem and your answer helped them fix it (great!).  Oh, but, now there's another problem (uh-oh...). Something else is broken.  After letting out a long sigh, you read the comment and/or edited question, roll up your sleeves, and write up Take 2, hoping that's the end of it.  And of course it's not the end.  Now maybe the error is gone, but it's not doing what it's supposed to.  If you're anything like me, your patience is now starting to wear thin. It's lousy code and you didn't volunteer to help them rewrite their whole app.  And of course, the question still only has 12 views, and nobody has upvoted either the question or your answer, including the person you're helping, so this is turning out to be a genuinely thankless task in all respects.  Welcome to "Family Tech Support", Web 2.0 Edition.   * Which is of course just an arbitrary number that none of us care about. Not really, anyway. Not very much, at least.  So, here's where I get to my question.  At this point, do you:  Leave a comment, stating as politely as possible that you've done your best to help them answer the original question they asked, and if they have a new problem then they should start a new question?  (I did this once, and actually ended up with an accept, but I felt kind of guilty afterwards, I don't think anybody answered their 2nd question).  Bite the bullet and edit your answer a 3rd, 4th, 5th time, however many times it takes to resolve their issue, knowing full well that they may not even remember to accept the answer once you're done? (I may work for free on SO, but that doesn't mean my time is worthless.)  Just abandon the question, hoping that it will force Mort to start thinking for himself?  Something else?   I've tried all three of the above and none of them ever quite feel right. I do want to help, but at the same time there are a lot more "lucrative" questions I could be answering. And I don't mind spending a lot of time on an answer either, if the question is interesting or important to me, but debugging is dull work. I'd prefer not to reference specific questions here; I'm pretty sure that this is a shared experience, and my objective isn't to point fingers at "misbehaving" members.  I'm more looking for some practical advice on how to dig myself out of these pits of despair. Anybody have any other ideas?