I have written some code in C by taking the maximum size of char array as 100. It worked well. But when I increase the maximum size of char array to 10000 it gives me segmentation fault(as it has exceeded its limit). Can someone tell me how can I increase the maximum size and store a string of length 10000.   i.e How can I take the "char a[100]" as "char a[10000]" and execute the same code????

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


I'm trying to learn how to produce math diagrams like this in Latex. I haven't had any luck finding stuff online because I don't really know what to search for. Any help?

I've just started using TikZ and need to create a simple triangle commutative diagram like this one.    The closest I've been able to get is this.   How do I get the h arrow to go from A2 to A3? Everything I've tried just causes errors.  Here's my current code:  \begin{tikzcd}[column sep=small] A \arrow{r}{i}  \arrow{rd}{g}    & A3 \arrow{d}{h} \\     & A2 \end{tikzcd}


Hello Android enthusiasts,  I'd like to know one thing :  I have a Jelly Bean phone. Which is API 16. What if I use Android SDK API 26 in Android Studio to create an app that uses classes of API 26... Can I use this app on my Jelly Bean phone ?  If not, how can I install API 26 in my Jelly Bean phone (if at all possible) ? (any option here I will take...)

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


What is the nicest way to prevent the "floor brackets" from touching in this example?  \alpha= \begin{cases} \left\lfloor \frac{(a_1+b_1)^2}{4} \right\rfloor & x \\ \left\lfloor \frac{(a_2+b_2)^2}{4} \right\rfloor & y \\ \end{cases}  This is a minimal example. The real example also has fractions where the numerator is a square of some subscripted terms. I could use \bigl and \bigr but then the brackets look a bit short.

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*}   X_i =    \begin{cases}     \left[\begin{smallmatrix}       0 \\ 1 \\ 2     \end{smallmatrix}\right]     &     \text{if $i$ is even;}     \\     \left[\begin{smallmatrix}       2 \\ 1 \\ 0     \end{smallmatrix}\right]     &     \text{otherwise.}   \end{cases} \end{equation*} \end{document}   This is the LaTeX code that I wrote based on a cases environment. There's no space between the matrices on the right. What's the best way to add some vertical spaces to separate them?    p.s. This is a simplified form of my original writing, so I cannot just accept suggestions like 'use a matrix transpose to transform the column vector into a row vector.'


I have a Toshiba Satellite M305-S49052 that was using 14.04. While on the internet I opted for the upgrade to 16.04. Half way through the upgrade it AbEnded. Now I have  door stop. What do I do now?

Yesterday I started the upgrade from 12.10 to 13.04, but I interrupted it because it was taking too long. Now if I restart it, it doesn't proceed.  Is there any possibility to clean the mess it left when I interrupted it and make a clean restart of this update?


I am new to Stackoverflow searched over google but not able to understand the basic difference between them.

I have a Map which is to be modified by several threads concurrently.   There seem to be three different synchronized Map implementations in the Java API:   Hashtable Collections.synchronizedMap(Map) ConcurrentHashMap   From what I understand, Hashtable is an old implementation (extending the obsolete Dictionary class), which has been adapted later to fit the Map interface. While it is synchronized, it seems to have serious  and is discouraged for new projects.  But what about the other two? What are the differences between Maps returned by Collections.synchronizedMap(Map) and ConcurrentHashMaps? Which one fits which situation?


I often see questions such as this:     Hey my code isn't working. It's supposed to do XY but I can't figure   out why it doesn't work. Here is my code:      { insert 300 lines of code here }   I'd like to help these kind of people with their problems, but it just isn't economical for answerers to sift through 300 lines of code to try to deduce the problem, and it doesn't teach the asker how to debug their code.  Thus, usually these questions go unanswered.  Is downvoting such a question appropriate? What about moderator flags to place the question "On Hold"?  What kind of comment is helpful in this situation to encourage the user to improve their question? I don't even know where to start in explaining to them why this is a terrible question.

Recently, I've seen many questions with this structure:   a wall of code a request for the community to debug it by inspection   You can find a nice selection .  I offer, as a thesis, that these questions are not consistent with the stated goals of SO. They do not, usually, create a resource of use to other people.   As a community, we could politely but firmly tell these askers to do enough of their own work to come up with a concrete, specific, programming question, other than 'can someone tell me what's wrong with this?'  Don't get me wrong. I'm sympathetic to people with problems. I have not been downvoting or voting to close these, because the community seems to be inclined in general to be helpful. I'm asking, are we really doing the right thing by encouraging the site to populate with these?  If the consensus is 'yes' then I'll just slink back to my cave. I'm not interested in starting a campaign here.


I have a Python service in systemd. I'd like to have it use the Python syslog module for logging if it's running in systemd vs. otherwise. Is there a reliable way to determine if I'm running in systemd or is there a better way of going about it?

This may have more to do with detecting operating systems, but I specifically need the init system currently in use on the system.  Fedora 15 and Ubuntu now use systemd, Ubuntu used  to use Upstart (long time default until 15.04), while others use variations of System V.  I have an application that I am writing to be a cross-platform daemon.  The init scripts are being dynamically generated based on parameters that can be passed in on configure.  What I'd like to do is only generate the script for the particular init system that they are using. This way the install script can be run reasonably without parameters as root and the daemon can be "installed" automagically.  This is what I've come up with:   Search for systemd, upstart, etc in /bin Compare /proc/1/comm to the systemd, upstart, etc Ask the user   What would be the best cross/platform way of doing this?  Kind of related, Can I depend on bash to be on the majority of *nix or is it distribution/OS dependent?  Target platforms:   Mac OS Linux (all distributions) BSD (all versions) Solaris, Minix, and other *nix


I am working on an application where clients can build the application to their locale system but they should not be able to access the source code of the project, what is the best approach to do that?

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem?


Not Thai national, not Taiwan national. Passport grants visa exemption.  Airline sold flight.  After buying some Thai friends told me there is a government notice that says that Thai flying from Taiwan into Thailand will need to make a quarantine at home.  What about foreigners? Will I be denied the entry in the country? I have no fever or cough.

Due to the outbreak of nCoV-19 (Novel Coronavirus) many Countries have imposed several entry restrictions. But these are quite confusing for a lot of people. Some countries allow transit through parts of China (like Shanghai) but some restrict transit even through Hong Kong/Macau. Philippines restricted passengers coming from Taiwan too, but I think that that was later changed.  Where can one find a list of such restrictions for all the countries, ideally a source that is updated frequently


I;m trying to draw an image of a player that i just took off google images. So far nothing is shown when i run my code as i'm making a game. I get the nullpointer exception saying something is wrong with my imageicon and my paintCOmponent method.  THis is the class which has the errors.  @Override public void paintComponent(Graphics g) {     super.paintComponent(g);     Graphics2D gc = (Graphics2D) g;     gc.drawImage(getPlayerImg(),row,column, this); } public void draw(Graphics2D g2d){     g2d.drawImage(getPlayerImg(),row,column, this); } public Image getPlayerImg(){      ImageIcon d = new ImageIcon(this.getClass().getResource("me.jpg"));      return d.getImage(); }   I also have another class which calls the paintComponent method. I thought this class would be the code for making the image appear since it calls an object from the above class.  public void paintComponent(Graphics g){         super.paint(g);         Graphics2D g2d = (Graphics2D) g;         System.out.println("ok");         c.draw(g2d);         System.out.println("painted");         c.setVisible(true);     }   None of the println are printed out on the screen. I don't know what to do :(. The first class has to do with making the map and the second class calls the methods from the first class and makes it. I can't show too much though.

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?


So I was following up with this link  I'm stuck with the 7th step. I'm pasting the output of the 6th step just in case if the error is somewhere over there. root@Sphinx-PC:~/reaver-1.4/src# ./configure checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for pcap_open_live in -lpcap... no error: pcap library not found! root@Sphinx-PC:~/reaver-1.4/src# make make: *** No targets specified and no makefile found.  Stop. root@Sphinx-PC:~/reaver-1.4/src# make make: *** No targets specified and no makefile found.  Stop. root@Sphinx-PC:~/reaver-1.4/src# make install make: *** No rule to make target 'install'.  Stop. root@Sphinx-PC:~/reaver-1.4/src#"

I am trying to install reaver 1.4, but when I run ./configure ; make I get this message at the end  int ret_val = EXIT_FAILURE, r = 0;   I have searched a fair bit and cannot find an answer, any help would be appreciated. I apologize if this has been answered and I've just failed to find it.


I receive a row of bytes over a socket connection as data. When I print(data) it tells me  b'123'    How can I convert it back to a string and only print 123? If I do type(data) it puts out  <class 'bytes'>   When I do data.decode("utf-8") it puts me out 'bytes' object has no attribute 'decode'. Do I mix something up with the type?  Thanks

I'm using this code to get standard output from an external program:  >>> from subprocess import * >>> command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0]   The communicate() method returns an array of bytes:  >>> command_stdout b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   However, I'd like to work with the output as a normal Python string. So that I could print it like this:  >>> print(command_stdout) -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1 -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2   I thought that's what the  method is for, but when I tried it, I got the same byte array again:  >>> binascii.b2a_qp(command_stdout) b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   How do I convert the bytes value back to string? I mean, using the "batteries" instead of doing it manually. And I'd like it to be OK with Python 3.


I'm unsure what the current procedure for package security for Ubuntu is.  When something ends up in the Ubuntu package repositories, are the package audited by a central, trusted team and if so what level of auditing takes place?  I'm interested on whether packages are checked for:   Regular matching against known vulnerabilities/CVEs (as in, package maintainers are notified in realtime of CVE releases, and packages with unpatched (by vendors) CVEs removed). Obvious malicious code (eg reverse shells, random shell code, trojans) Poor code quality (eg unintended command injection vulnerabilities) Full security audit of all code for vulnerabilities

How is it ensured that a trusted user can't compile a package with malware and place it in the universe repo.


I've got an issue executing a simple .sh file  Here is my example :  I'm creating a simple "abc.sh" file for creating a folder   echo 'mkdir abc' > abc.sh   According the executable bit   chmod +x abc.sh   Trying to run the sh file   ./abc.sh   Permission denied (french version)   bash: ./abc.sh: Permission non accordée   But when I do "bash ./abc.sh" instead of "./abc.sh", the script is running  Have you an idea for this ?

I'm having a very weird error when trying to make a script callable. I have a scripts directory in /srv/projectname/scripts where I store you know scripts to be called as cron jobs for different projects. I'm trying at add a new one and seeing very weird behavior. In debugging I reproduce it using this set of commands  from /srv/projectname/scripts create a file create a file  vi helloworld.sh   insert text exactly:  #!/usr/bin/env bash  echo "Hello World!"   Make the script executable and try to call it:  chmod +x helloworld.sh ./helloworld.sh   Which gives:  -bash: ./helloworld.sh: Permission denied   Make sure there isn't a code error:  bash helloworld.sh   Which gives:  Hello World!   Copy the script to home and call it:  cp helloworld.sh ~/helloword.sh ~/helloword.sh   Which gives:  Hello World!   I have no idea what is going on. I have tried a lot of variants where I give the full path, same error, or if I sudo which gives no error, but also doesn't print "Hello World!".  Other details: Running on: Ubuntu 12.04.4 LTS I have also noticed that I can't tab-complete to the full name of a script that gives me this error, but I can once I have moved it. The directory /srv/projectname is a git repo but this script hasn't been added to it yet, I because I usually only do that once its working yet.  ls -l lines for the script and scripts directory are  -rwxrwxr-x 1 ubuntu ubuntu     41 Apr 21 20:25 helloworld.sh drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 21 20:25 scripts   respectively   Any help would be awesome.  EDIT: Gilles had the answer. To save anyone else who has this problem a google search.  sudo mount /srv/projectname/ -o remount   reloads the edited fstab, and everything works again.


I read somewhere that people should use gksudo for applications that use the Gtk GUI instead of sudo? What's the reasoning for this?

I've been using gksudo nautilus and sudo nautilus through Alt+F2.   What's the difference? They look very similar!


So I came across this formula of Fibonacci numbers as a binomial sum [1] [2]   $$ F_n = \sum_{k \mathop = 0}^{\lfloor {\frac {n - 1} 2} \rfloor} \dbinom {n - k - 1} k $$  I'm not really sure that this formula actually valid, I've computed some of the first terms and they don't look very much like Fibonacci numbers to me.  Maybe the identity is wrong, but several places have it stated in the same way. Does anyone know more about this identity? Thanks    #!/usr/bin/python3 from math import factorial, floor  def c(n,k):     return factorial(n)/(factorial(k)*factorial(n-k))  def f(n):     s=0     for k in range(floor((n-1)/2)):         s += int(c(n-k-1,k))     return s  for n in range(1,6):     # computing F(n)     print(f(n))   And the output is  0 0 1 1 4   [1]   [2]

The binomial sum   $$s_n=\binom{n+1}{0}+\binom{n}{1}+\binom{n-1}{2}+\cdots$$   satisfies the Fibonacci relation.   I failed to prove that $\binom{n-k+1}{k}=\binom{n-k}{k}+\binom{n-k-1}{k}$... Any hints or suggestions?


We were targeted earlier today by a DDoS attack. There was 20x as many connections as normal on our load balancer (HAProxy), and all the backend nodes continued to go down during this attack.  System structure: HAProxy > Squid > Apache (for ModSecurity) > IIS app layer.   During the attack, I noticed that there was a MaxClients Reached error in Apache, so I bumped the setting from 150 to 250, and it seemed to help to some extent. However, it seemed that I had to keep restarting Apache manually in order for the backends to recover. The attack lasted for about 50 minutes.  After the attack began to subside, a final Apache restart on each node brought us into the green, but now I'm looking into why it occurred in the first place. In the error logs in Apache, I see a lot of these:  [Wed Jun 22 11:46:12 2011] [error] [client 10.x.x.x] proxy: Error reading from remote server returned by /favicon.ico [Wed Jun 22 11:46:13 2011] [error] [client 10.x.x.x] (70007)The timeout specified has expired: proxy: error reading status line from remote server www.example.com   Apache is using default keep-alive settings (keep-alives are enabled and timeout is set to 15 seconds). After doing some additional reading on HAProxy + keep-alives, is it a reasonable conclusion to believe that the DDoS was worsened by keep-alives being enabled?  While the HAProxy max connections are way below the maximums set in Apache, perhaps with the 20x connections too many connections were being opened in the ol' DOS fashion, but then Apache was keeping them open.

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


None of the previous questions or guides have been successful for me after a long day of trying.  My laptop came with Windows 8.1 installed and is UEFI. I installed Ubuntu alongside it and can get into either successfully-- windows by default upon booting, or ubuntu when I press ESC during boot and manually choose the ubuntu OS in my BIOS menu. Otherwise it is always skipped over.  I have used boot repair, rEFInd, and GRUB and have both of the latter installed (and can navigate to them via the BIOS menu) but Windows Boot Manager / Windows 8.1 always takes control upon startup, and I cannot add any other options to it.  Using the "bcdedit.............grubx64.efi" line in a windows terminal says operation successful but then nothing changes.  So, I'm pretty stuck. Here is the link from Boot Repair for you guys:   Thanks in advance.  edit: My goal is to have a menu when I boot (GRUB or rEFInd) for me to choose between Windows 8.1 or Ubuntu each time (and windows 10 tech preview, once I get this figured out), instead of Windows 8.1 bullying the others out of the picture.

I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...


If I store information on a USB Flash drive and hardly ever read or write to it, how long can I expect the information to be retained?  I'm referring to natural de-magnetization and anything similar. Not to "read disturb" etc.  EDIT  Thanks for the link. The question there is indeed similar to mine. But unfortunately the answers there just assume that the answer is: more than other limiting factors. But is that true? This needs some backing, does it not?

Say you had some sensitive information that you didn't want to store on the internet, was incredibly important to you, and you didn't need to access very often either.  Think of a digital picture taken of your grandma days before her death or something... Very important stuff.  So you load the file to a flash drive, put it in a vault, and forget about it.  When should you re-visit the vault to back-up the data to a newer, futuristic flash drive or whatever they are using to store data with in the future.  What are the chances that the data will have dissappeared or the flash drive become unreadable in 5 years? 10 years? 25 years? 100 years?


How could I destroy cubes from a mesh? Once i've combined my cube to a single mesh, would it be possible to be able to destroy one of these cube but to keep a mesh ? Ive seen a video where te person show a script to cut square or triangle shapes into a plane, so I tought it might be possible in 3d (Holistic3d is the person). Does anyone have a script to do that ? because I have no clue how it could be done.

I am trying to do a Minecraft-like game (like every one have already tried I guess) and i went across the problem i expected: lag with world Generation. I did lot of searching but i can  I tried to combine them into a bigger mesh, which work, but not i can destroy a single block. So how can I place/destroy chunked (mesh combined) block? If i cant, can someone clearly explain me a solution (i am not fluent in english nor with programming expressions, i can code tho) and how to do it (with a script example if possible :) ) ? Thanks in advance !  I generated my world using 2D perlin noise. Once i have the blocks, i split them into 16x16x100 chunk meshes.  Before Making chunks, i first tried to combine all of them into one block (using the unity manual), but the result is only one cube placed at 0,0,0. Where are all the other cubes ?  using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class ThisWorldGen : MonoBehaviour {  public GameObject blockPrefab; public GameObject grass; public GameObject dirt; public GameObject rock; private string[] blockTag;  private GameObject stockin;   public int amp; public int freq; private Vector3 mypos; [SerializeField] private Material material; private Vector3 blockLocations;  public List<MeshFilter> meshes = new List<MeshFilter>();  void Start() {     Generate(); }  void Generate() {     amp = Random.Range(0,100);     freq = Random.Range(30,100);     mypos = this.transform.position;     int cols = 100;     int rows = 100;     float startTime = Time.realtimeSinceStartup;         #region Create Mesh Data     MeshFilter blockMeshes = Instantiate(blockPrefab, Vector3.zero, Quaternion.identity).GetComponent<MeshFilter>();      for(int x = 0; x < cols;x++)     {         for(int z = 0; z < rows;z++)         {              float y = Mathf.PerlinNoise ((mypos.x + x) / freq,(mypos.z + z)/freq) * amp;             y = Mathf.Floor(y);             for(float hy = y; y > 0.0F; y -= 1.0F)             {                            blockMeshes.transform.position = new Vector3(mypos.x + x,y,mypos.z +z);//move the unit cube to the intended position                 meshes.Add(blockMeshes);                     }         }     }     int i = 0;     MeshFilter[] listMeshes = new MeshFilter[meshes.Count];     foreach(MeshFilter cubesToAdd in meshes)     {                            listMeshes[i] = cubesToAdd;         i++;     }     CombineInstance[] combine = new CombineInstance[listMeshes.Length];     int w = 0;     while(w < listMeshes.Length)     {            combine[w].mesh = listMeshes[w].sharedMesh;         combine[w].transform = listMeshes[w].transform.localToWorldMatrix;         listMeshes[w].gameObject.SetActive(false);         w++;     }     Debug.Log (combine.Length);     transform.GetComponent<MeshFilter>().mesh = new Mesh();     transform.GetComponent<MeshFilter>().mesh.CombineMeshes(combine);     transform.gameObject.SetActive(true);     #endregion     Debug.Log("Loaded in " + (Time.realtimeSinceStartup - startTime) + " Seconds."); } }   (the world was generating randomly and perfectly before trying to merge the meshes)


This question is an inverse of this other question on the  .      What is the general form, ie. $(Ax+Cy)^2+Dx+Ey+F=0$ , for the parabola given in parametric form as follows:   $$\big(at^2+bt+c,\;\; pt^2+qt+r\big)$$   In other words, find $A,C,D,E,F$ in terms of $a,b,c,p,q,r$.   I've posted a solution, but would like to see other approaches to this problem.    NOTE (Added April 2018)  See Latest Addendum to solution which provides Cartesian equation in neat matrix determinant form.

Show that the following system of parametric equations describes a line or a parabola: $$\begin{cases} x=a_1t^2+b_1t+c_1 \\ y=a_2t^2+b_2t+c_2 \end{cases}, t\in\mathbb{R}.$$


Differs from sugested solution above in that a list item can only appear once for each row.  This is for a booking system for my spa. Different employees can perform different treatments.  I have a List<List<int>>. These are therapists that can perform the treatment that is booked.  Each list (booking) contain a number of integers like this (these are therapists that can perform the booking):  {1, 3, 6},  //Booking 1 {1, 2, 6},  //Booking 2 {1},        //Booking 3 {2,3}       //Booking 4   I'd like to see all possible combinations where the number can only appear in one Place. For the above list the two possible ombinations would be:  6,2,1,3 or 3,6,1,2  That is for the first combination:   Booking 1: Therapist 6 Booking 2: Therapist 2 Booking 3: Therapist 1 Booking 4: Therapist 3   Hope this makes the question a Little bit clearer.

I've a List of this type List> that contains this  List<int> A = new List<int> {1, 2, 3, 4, 5}; List<int> B = new List<int> {0, 1}; List<int> C = new List<int> {6}; List<int> X = new List<int> {....,....};   I want to have all combinations like this  1-0-6 1-1-6 2-0-6 2-1-6 3-0-6   and so on.  According to you is This possibile to resolve using Linq?


Apparently I can no longer add answers, and I can not post comments (<50 points). I basically can't do anything to dig me out of the hole unless asking stupid questions I already know the answer to?  How is this going to work out? I have studied Business Informatics and been coding since 1999 (started with HTML scripting). So I know some stuff and am able to help users on a wide variety of topics (, PHP, CSS, HTML, MSL, , Java, JavaScript, etc.). It would be nice if I could at least add comments.  Solution to my problem:    Just click your account on the top, go to answers and look at what you answered. Then edit whatever you can to provide a real answer. That made the trick for me, at least. GL&HF!

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


maybe it was there discussed before but i have never ever found a solution for this and iam trying it for long time, I was trying many ways but it always didnt work.the problem is that my wifi adapter tl-wnb821N  is not working,when i plug other devices like standart usb it works,when i plug wifi adapter it doesnt work even it wont change a adapters color.

I just installed my first Ubuntu Server (12.04) instance and immediately ran into the following problems:   Running apt-get install or update fails (see below) Running ifconfig produces peculiar IP addresses starting with 10.x.x.x and my router does not see the server at all in its "Attached Devices" page (its a consumer grade Netgear)   When I run apt-get I get 50+ of the following errors:  Failed to fetch <some-http-url>. Temporary failure resolving <blah>.ubuntu.com   I read up on this error for 12.04, and found some similar posts on this forum and on server fault that recommended going into /etc/resolv.conf and adding an entry:  nameserver 8.8.8.8   To my surprise, I found that /etc/resolv.conf was a symlink pointing to somewhere else  and I had to delete it first, then create a new one with the entry indicated above.  I restarted the server and tried running apt-get again, same results.  How do I start diagnosing the problem (I'm a relatively new Linux/Ubuntu user)?  Additional details that may help:   This is actually a virtual machine running as a VirtualBox guest OS The physical host that is running this VM is my laptop which has a wireless connection; I'm wondering if (somehow) the laptop is getting the network wirelessly, but perhaps either the VBox VM and/or the Ubuntu server OS isn't configured for wireless and so nothing is "getting through"?   Thanks in advance for any pointers!  Edit:  Here is a snapshot of my VM's Network settings (only Adapter 1 has any information populating its fields, so I assume my VM has only 1 adapter):    Here is the output when I run ifconfig from the terminal:    And here is the output when I run route from the terminal:    Running ping google.com:


Is there a way to organized entity deletion by braking into different batches? I have 700.000 entities associated with pictures that I would like to delete and I would like to perform that into batches. Any how to?

On one of my sites, I have over 600 Profile 2 profile types (most of them have between 20-30 field instances, some have additional fields just used in that one type). I've tested a few different methods for bulk deletion, but can't find a way using the Entity/Profile APIs to get the deletion to occur without basically wiping out the site for a few hours.  It seems that, when a content type, profile type, etc. is deleted, a ton of caches are cleared and rebuilt for each deletion, meaning the process goes something like:   Delete the entity type. (I do this part.) All the attached field instances are deleted. All the attached fields that have no other instances are deleted. All the field info and entity caches are cleared. All the caches are rebuilt (due to other visitors on the site trying to load pages which need those caches). Ready to delete another entity type.   Is there any quicker way of mass-deleting entity types (I've already removed all the entities themselves—they're quite simple and fast to remove)? I'd like to cut out steps 4 and 5, which take about 90 seconds.  (I changed to a different system for storing profiles, because the cache rebuild and memory requirements were getting out of hand with over 500 profile types (in addition to 20 other content types), and over 10,000 field instances!)


How do photographers programatically take photos? For example, I would like to take a photo every minute for the next day.   Can every camera be configured to take photos at regular time intervals?  What about power supply, do you use socket power supply? My old camera only has batteries and batteries clearly aren't suitable for a long period of shooting. What kind of hardware or software do you use to connect camera and all of its settings to the computer, that triggers photo capture.

How can timelapse sequences be shot without having in-camera support for it?  Which third-party tools are recommended?


I submitted a paper in October 2018. After 2 months, the status changed to "awaiting CE decision" and stayed it ever since. I waited a month and sent an email to CE in February 2019. I did not receive any reply. I then waited another month and sent a second email to CE and editor assistant in March 2019, still no response . I don't know what to do next? Should I email publisher? Should I send another email to CE. Since the paper has been in the review process for 6 months, should I withdraw my submission? What if CE doesn't respond to my withdrawal, can I submit the paper to another journal?

I submitted a paper to an Elsevier journal in August and the status has been "with editor" ever since. I was concerned that it had not been sent for review for 4 months and I sent inquiries twice without getting any response. I am wondering if I should just withdraw my paper?


A tensor of rank $3$ satisfies $T_{ijk}=T_{jik}$ and   $T_{ijk}=-T_{ikj}$. Show that $T_{ijk}=0$   I really don't know what we can use to show this. All I am able to do is rearrange the dummy indices to get a few more equations but they're of no use.  Any help is appreciated.  Thanks

Say I have the following tensor $T_{abc}$ such that $$ T_{(a[b)c]} $$ Ergo, it is symmetric in indices $a$ and $b$ and antisymmetric in $b$ and $c$.  Keeping in mind the various properties that (anti-)symmetry entails such as switching and the like, can $a$ and $c$ actually be switched around?  I am trying to show that tensors having such a property vanish, but I get stuck when I get $T_{bac}$.


This is problem from here, but I didn't receive any answers .  I need to differentiate $\int_x^{x+1/x}e^{t^2}dt$ and I got $(1- 1/x^2) e^{(x+1/x)^2}-e^{x^2}$  Am I right? I am asking because Spivak Calculus 1994 in chapter 18 problem 31, Calculus 1994 got another answer. He got $e^{(x+1/x)^2}-e^{x^2}$  I think he is missing derivative of $x+1/x$

$\lim_{x\to \infty}e^{-x^2}\int_x^{x+1/x}e^{t^2}dt$  This is problem from Spivak calculus 1994, chapter 18, 31.  The book gives following solution: simply apply Lhopitatal rule, but what puzzles me is the way numerator is differentiated.   So they got $e^{(x+1/x)^2}-e^{x^2}\over 2xe^{x^2}$  But I think it should be  $(1- 1/x^2) e^{(x+1/x)^2}-e^{x^2}\over 2xe^{x^2}$ . I think they are missing derivative of $x+1/x$. Am I wright or wrong?  P.S Could anyone please help me editing this question?


When I try to download Ubuntu 12.04 using the Windows installer (Wubi) through a proxy server which requires proxy authentication, after I choose the Ubuntu installation size, username and password, when I click the Install button, I get this error:  An error occurred: Could not retrieve the required disk image files For more information, please see the log file: c:\users\(myusername)\appdata\local\temp\wubi-12.04-rev266.log   The log file says: proxy authentication error  How can I solve this problem?

I tried to install Ubuntu 12.10 with the Wubi installer while running Windows, because my PC does not accept my BootCD as a bootable medium.  But Wubi showed me this error:  Ubuntu-Installationsprogramm (X) Ein Fehler ist aufgetreten: Could not retrieve the required disk image files Weiter Informationen finden Sie in der Protokolldatei: c:\users\username\appdata\local\temp\wubi-12.10-rev273.log   What can I do, because I want to get rid of my Windows 7 and use the way better Ubuntu 12.10?  Thanks for your huge answer, now my next problem after trying to install wubi with the .iso is, that the same error shows up again and i am not shure which part of the errorreport you need.  Can you tell me? Because i'm not that good at linux.


I'm using Xubuntu 20.04 and what is missing is an option to enable a beep sound while toggling the Caps Lock and the Num Lock keys, and any advise/suggestion on how to achieve the desired functionality would be greatly appreciated. Thank you.

On the computer upstairs we have an option to make the computer make a sound when we press Caps Lock, Number Lock and Scroll Lock. Is there a way to do this on Ubuntu 12.04?


About 10 years ago my brother and I were flipping channels and we came across a movie that we have been looking for ever since.  All we really remember is that some kind of slimy alien was stowed away on some spacecraft that humans brought back to Earth (possibly the lunar lander) and no one notices it until it starts to kill them all.  It took place at NASA headquarters or something and I specifically remember a scene where the alien is hiding in the ceiling of a bathroom and kills someone in a stall.

These people are at an arctic base, at least I think it was set in the arctic. I know it was extremely rural/barren. But this alien pod landed and the crew were terrified of it except for one person, we'll call him B, who believed the alien was gentle and wasn't aware that it could / was causing harm.   I remember they killed the alien and B was horrified and said something about how the alien didn't mean any harm. Another crew member says something along the lines of "I pray you're correct. Because another pod just landed in [insert location]" and it ends on that cliffhanger where you don't know if it's the beginning of an alien invasion or if the creature really was wrongly murdered.   I remember seeing it on TV sometime around 2000-2004. It definitely wasn't The Thing, just some obscure film I just happened to see.


I am having trouble providing a proof by contrapositive here, can anyone provide a proper proof by contrapositive here?  Let $x \in \mathbb{Z}$. Prove that $3x+1$ is even if and only if $5x-2$ is odd.

I'm asked to prove 'Let $x \in Z$.  $3x + 1$ is even iff $5x-2$ is odd'. I have the following proof techniques in my toolbox: trivial/vacuous proofs (not so relevant in this case), direct proof and proof via the contrapositive.       1) If $3x + 1$ is even, then $5x- 2$ is odd.      2) If $5x - 2$ is odd, then $3x + 1$ is even.   Theorem 1a:  An odd number multiplied by an odd number yields an odd number.  Proof via direct proof. Let $n, m \in Z$. Assume n and m are odd numbers, so they can be written as $n = 2a + 1$ and $m = 2b + 1$ for any $a,b \in Z$.   Therefore $mn$ = $(2a + 1)(2b + 1)$ = $4ab + 2a + 2b + 1$ = $2(2ab + a + b) + 1$. Since $2ab + a + b + 1$ is an integer, $2(2ab + a + b) + 1$ is odd.  Theorem 1b: Adding and odd number to an odd number yields an even number.  Proof via direct proof. Let $n, m \in Z$. Assume n and m are odd numbers so they can be written as $n = 2a + 1$ and $m = 2b + 1$ for any $a,b \in Z$.  Therefore $m + n$ = $(2a + 1) + (2b + 1)$ = $2a + 2b + 2$ = $2(a + b + 1)$. Since $a + b + 1$ is an integer, $2(a + b + 1)$ is an even integer.  Theorem 1: If $3x + 1$ is even, then $5x- 2$ is odd.  Proof via direct proof. We know via 1a and 1b that for $3x + 1$ to be even $x$ has to be odd. Since $x$ is odd, $x = 2k + 1$ for any $k \in Z$.   Therefore $5(2k + 1) - 2$ = $10k + 5 - 2$ = $10k + 3$ = $10k + 2 + 1$ = $2(5k + 1) + 1$. Since $5k + 1$ is an integer, $2(5k + 1) + 1$ is an odd integer.  Theorem 2a: Subtracting an even number from an odd number yields an odd number.   Proof via direct proof. Assume $m,n \in Z$, $m$ is odd, $n$ is even, then: $m = 2a + 1$ and $n = 2b$.  $m - n$ = $(2a + 1) - 2b$ = $2a - 2b + 1$ = $2(a - b) + 1$. Since $a-b$ is an integer, $2(a - b) + 1$ is an odd integer.  Theorem 2: If $5x - 2$ is odd, then $3x + 1$ is even.  We know via 1a and 2a that for $5x - 2$ to be odd, $x$ must be odd. So, $x = 2k + 1$ for $k \in Z$. Therefore:  $3(2k + 1) + 1$ = $6k + 4$ = $2(3k + 2)$. Since $3k + 2$ is an integer, $2(3k + 2)$ must be an even integer. $\blacksquare$  Since this is the first time I've needed to establish intermediate results I was wondering if this approach is correct.


Suppose $\underline{X}$ is an $m$-dimensional vector following multivariate Normal distribution i.e. $\underline{X}$~$N_m(\underline{\mu},\Sigma)$ where $\Sigma$ is positive definite. Let $B$ be a symmetric $m$ by $m$ matrix, having the following properties:  $B\Sigma B=B$  $\underline{\mu}'B\underline{\mu}=0$  $trace(B\Sigma)=k$, where $k<m$   Prove that $\underline{X}'B\underline{X}$ follows chi-squared ($k$).  I proceeded a lot but got stuck in one last step where I think linear algebra is troubling me. Kindly have  a look at my "solution".  The second condition can be written as $\underline{\mu}'B\Sigma B\underline{\mu}=0\implies B\underline{\mu}=\underline{0}$ as $\Sigma$ is Positive definite. Then after a little algebra and considering condition 2, we can write $\underline{X}'B\underline{X}=(\underline{X}-\underline{\mu})'B(\underline{X}-\underline{\mu})=(\underline{X}-\underline{\mu})'B\Sigma B(\underline{X}-\underline{\mu})$ But $\Sigma$ is positive definite hence we can have a symmetric matrix $\sqrt{\Sigma}$ defined such that $\sqrt{\Sigma}\sqrt{\Sigma}=\Sigma$. Using this, we can write $(\underline{X}-\underline{\mu})'B\Sigma B(\underline{X}-\underline{\mu})=(\sqrt{\Sigma}B(\underline{X}-\underline{\mu}))'(\sqrt{\Sigma}B(\underline{X}-\underline{\mu}))$ We want to show that this follows chi-squared ($k$). Now, it is obvious that as $(\underline{X}-\underline{\mu})$~$N(\underline{0},\Sigma)$, $\sqrt{\Sigma}B(\underline{X}-\underline{\mu})$~$N(\underline{0},\sqrt{\Sigma}B\Sigma B\sqrt{\Sigma})=N(\underline{0},\sqrt{\Sigma}B\sqrt{\Sigma})$ Now, $trace(\sqrt{\Sigma}B\sqrt{\Sigma})=trace(B\Sigma)=k$ and $\sqrt{\Sigma}B\sqrt{\Sigma}$ is idempotent (verified). So its eigenvalues are only $0$ or $1$. Since its trace is $k$, there are $k$ eigenvalues with value $1$ and other $m-k$ eigenvalues are $0$. Now here is the thing I want to prove: I want to show that$\sqrt{\Sigma}B\sqrt{\Sigma}$, which is the covariance matrix, is diagonal and has only $k$ $1$'s and remaining $m-k$ diagonal entries $0$. The reason is, then I will be able to say that $k$ components of $\sqrt{\Sigma}B(\underline{X}-\underline{\mu})$ are independent standard normals whose sum of squares is our quadratic form and thus it follows chi-squared ($k$). But I really could not show that $\sqrt{\Sigma}B\sqrt{\Sigma}$ has the desired property i.e. it is diagonal with rank $k$. But this is crucial, it is the finale. If this does not happen, then some components will be correlated with each other and we cannot say that our quadratic form has chi-squared ($k$). I would really appreciate if someone helped me to prove this final part.

Definition. Suppose $\mathbf{y} \sim \mathcal{N}(\boldsymbol{\mu}, I_{n \times  n})$.      Then $$w = \mathbf{y}^{T}\mathbf{y} = \|\mathbf{y}\|^2 \sim \chi^{2}_{n}\left(\theta = \|\boldsymbol{\mu}\|^2/2 =\boldsymbol{\mu}^{T}\boldsymbol{\mu}/2 \right)\text{,}$$   i.e., the $\chi^2$ distribution with $n$ degrees of freedom and   noncentrality parameter $\theta$.   I am trying to (at the very least) find a proof of the following theorem:     Theorem. Suppose $\Sigma$ is a $n \times n$ positive definite and symmetric matrix, $A$ is a $n \times n$ symmetric matrix with rank $m$, and $(A\Sigma)^2 = A\Sigma$.      Then $\mathbf{y} \sim \mathcal{N}(\boldsymbol{\mu}, \Sigma) \implies \mathbf{y}^{T}A\mathbf{y} \sim \chi^2_m\left(\boldsymbol{\mu}^{T}A\boldsymbol{\mu}/2\right)\text{.}$   I don't see how this definition works. In my eyes, to even make the definition I gave above work with the theorem, we would have to "split" $A$ into powers of $1/2$ (whatever this means), i.e., look at $(A^{1/2}\mathbf{y})^TA^{1/2}\mathbf{y}$, unless I'm really missing something here.  This is just me doing self-reading, so any sources or anyone that can help me with a proof of this would be appreciated.


I just noticed this  I opened the question to see what the modification was. But I saw that neither the question nor the answer had been modified recently. I was about to post on meta to find out what had happened, but I checked the revision history instead. There, I noticed that it said "Bumped by Community user". Turns out it's a  to bring exposure to certain questions (those that fit certain criteria which suggest they may need exposure.) So, in the text from the screenshot above, could the text be changed from "modified" to "bumped"?  Or maybe some other, more suitable word. But not "modified" since it is in fact not being modified.

If the Community user bumps a question, It says It has modified it:    However, It did not really modify the question, It rather just visited it. The word "modified" is a bit unfortunate IMHO because it suggests that something changed in the question or its answers, which is not true. I therefore suggest that we look for another word which would be more descriptive and less confusing. Some come to my (and others') mind:   visited, poked, bumped, promoted, dredged up, brought up, ...   (Actually, "Bumped" is even officially used now:  and .)  I'm not a native speaker and maybe someone find a better word. To me, visited sounds the best, but that may be only me. It makes sense, too, since Community really just visits the questions, with the site-effect of them getting bumped. It shouldn't confuse anybody.  Actually, it can be harmful in some sense, since , and it is interesting to know that this has happened, so that more people can check that the edit makes sense. You therefore can't simply ignore all "edited by Community" messages. (Thanks to Monica Cellio for pointing it out.)  (Remark: I know this has been questioned before (    ) but I think it has never been requested to change the action title to something more descriptive. If I'm wrong, I apologize.) (The "lying" it the question title is meant as a sarcasm)


I've implemented basic A* pathfinding in my top-down 2D game, and I'm almost ready to test it, but I thought of something while adding the movement code to my enemies that I think could affect the pathfinding.  My tiles are 64x64 px, and most enemies are as well. However, I do have some boss monsters that are larger than that. My initial thought was that to move to their goal, they have to move toward each node in their path, and to determine whether they've arrived at that node and to start targeting the next node, I need to test the distance between the enemy and their current target node. So what happens if, for example, their next node is next to a wall, and because of their size, their center is too far to "reach" the node?  My solution to that would be to check if the distance between their center of mass and the next node location is less than half the enemy's width plus maybe 10 px. However, what if one of their movement nodes is in between two tiles, and they're too large to fit through the two objects the node goes between? Is there a simple way to modify A* that takes size into account?

In a grid-based game I am working on, I want to add objects that occupy more than one tile of the grid. Are there any algorithms or techniques to find paths for this kind of objects?


I am not that well acquainted with commutative algebra, so that I am kind of struggling to understand the concept of "localizing a ring at a prime ideal."  For one thing I can say is that localizing alludes to a geometric meaning.   Can somebody clarify this concept from both perspectives: algebraic and geometric ? Since a ring ( for example $\mathbb{Z}$ ) can contain many prime ideals, I presume that the introduced localization is not unique. Is this correct ? What are the consequences ? How then do you make a choice on picking up the most suitable prime ideal for the purpose of the localization ?  How do you procede in constructing such "localization" ?   Many thanks.

Let $R$ be a commutative ring with unit, $I$ an ideal of $R$ and consider the following three constructions.   The  $R_I$ of $R$ at $I$ (i.e. the localization of $R$ at the multiplicative system $R\setminus I$) gives a morphism $$ f_1:\operatorname{Spec}(R_I)\to \operatorname{Spec}(R)=:X $$ The  $\widehat{R}_I$ of $R$ at $I$ gives a morphism $$ f_2:\operatorname{Spec}(\widehat{R}_I)\to X $$ For the special case $I=(a)$, the localization $R_a$ (i.e. the localization of $R$ at the multiplicative system $\{1,a,a^2,\ldots\}$) gives a morphism $$ f_3:\operatorname{Spec}(R_a)\to X $$   My question is:     What is the geometric meaning of all three constructions and how are they related?   This is what I ''know'' already or describes at least the style of answer I would appreciate. As remarked in the comments, $I$ has to be a prime ideal.   $R\to R_I$ is injective iff $R\setminus I$ contains no zero divisors which is the case if $I$ is a prime ideal. The scheme $\operatorname{Spec}(R_I)$ is the intersection of all the neightbourhoods of $I$ in $X$. This is a little contra-intuitive for me since the last statement sounds like ''$f_1$ is injective'' but the $\operatorname{Spec}$-operator should turn 'injective'' and ''surjective'' around somehow (I know this is literally not true but I only want to get a feeling like ''is contained'', ''is bigger'', ''is smaller'', etc.). $\operatorname{Spec}(R_a)$ is somehow the opposite of $\operatorname{Spec}(R_{(a)})$ (= the intersection of all the neightbourhoods of $(a)$ in $X$) because $\operatorname{Spec}(R_a)$ seems to be something like the union of all the open sets of $X$ not containing the point $(a)$. $R\to\widehat{R}_I$ is injective iff $\cap I^n=(0)$ and this holds very often (e.g. for $R$ noetherian and either an integral domain or a local ring). Hence (this is probably false intuition as remarked before), $f_2$ should be something like a ''projection'' (from something ''big'' into something ''small''). But what is geometrically the difference between localization and completion. I don't have a geometric idea of completion at all.   As remarked by Qiaochu Yuan in the comments below, one should not think of $\operatorname{Spec}$ as injective-surjective switching.


I am nearing the end of my Ph.D. I need to publish a bit more, but am unsure what to do. So far I have published two rather large articles with my supervisor, where we develop new methods. I have also published a smaller article along with an external collaborator, where some of the new methods are used. My supervisor thinks we should publish another large article together, while I lean more towards two small ones alone. I am not guaranteed a post doc anywhere yet, and will most likely have to write my own grant application. What would be the best thinking in terms of securing external funding afterwards?

Let's say I invented a system to solve a problem. To run this system, I made my own algorithm.I also created some other things for that system. The main contribution was supposed to be the system.So is it a good idea to have as many research papers out of the project as I can? Or to publish a single research paper?  I have seen a lot of researchers where they were targeting a single problem and they proposed a single solution. Now, what they would do is write a research paper for every component separately. Then they would write a single research paper showing how all the components would fit together.  So is it a good idea to try and increase the number of publications you can have out of a single research project?   My own personal opinion is that the quality of your research matters not the quantity. But I have also seen a number of institutions requiring a specific number of publications to even apply for their jobs.


Sub-question if Yes: de Broglie wave is also often called the matter-wave. While we can find the frequency of an Electromagnetic Radiation from its wavelength $(c=\nu\lambda)$. $c$, in this case, is the speed of light in the vacuum which is a constant. Does a similar constant exist for matter that can be substituted? (I don't think so.) Sub-question if No: Electromagnetic radiations display wave-duality nature. Are the wavelengths of their wave and de Broglie the same thing? Wouldn't that mean there exists frequency for wave?

Two fundamental equations regarding  are: $$ \lambda = \frac{h}{p}, \\ \nu = E/h .$$  We talk about , is it meaningful to talk about de Broglie frequency ($\nu$ above) and de Broglie velocity ($\nu \lambda$)? Are these two equations independent or can one derive one from the other? Or mid-way, does one impose constraint on other? In case of light or photons we can relate frequency and wave, is there similar interpretation in case frequency and wavelengths in above equations? Comparing with that of light, if we multiple $\lambda$ and $\nu$ we get velocity, what does this velocity mean here?  If we do the above calculation for an average human, what would be the meaning of $\nu$ and $\nu \lambda$? Are we jiggling with that $\nu$?


I want to install y4pdf package to my Tex Live 2010 distribution. The package itself is consisting of the following files according to :   y4pdf.cfg y4pdf.dtx y4pdf.ins y4pdf.sty   Does anyone have experience where to put concrete files in order to make it work?

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


Can we please have syntax highlighting for ?   I've had a look at the editor  and Google's library documentation to find that it's not yet supported. Nonetheless I thought I'd ask for it to be added.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


According to  from 2015, changes were made so that all close votes age away after 14 days, and your ability to cast a close vote on a question you already voted to close resets 14 days after your previous vote ages away. In practice, this means you should be cast a new close vote on a given question every 28 days. And this is my experience, and I think it works well.   Except when it isn't and it doesn't. Here is a  I voted to close in 2011:    The close vote aged away, but my ability to vote again to close it has never been restored. As a result, there is an 8 year old, completely unanswerable question which I can't do anything about.  Is this really by design? If not, is there an easy fix? The changes to the close voting requirements on Stack Overflow has given new hope to those of us that lurk on minor and not busy tags that we might actually be able to get questions closed, but this is another unexpected roadblock I just tripped over....

In March 2015,  was made to the close voting system, to allow users to recast close votes and close flags 14 days after they age away.  However, according to , apparently votes that were cast before the change was made cannot be recast. The user in question was trying to recast a vote in 2016, but was prevented because they cast a now-aged vote back in 2011.  Why is this the case? Is this intentional, or is it a bug?


Is there any method to configure linux kernel in such way (just an example):  make config CONFIG_OPTION=y && make config CONFIG_OPTION1=no CONFIG_OPTION3=64 CONFIG_OPTION4=/path/   and all the dependencies and alternatives of these configuration options will be set automatically in non-interactive mode.    Note: This question was asked previously () but was marked as duplicated (although it is not, it asked a different thing). As I can't answer the original question, I am answering here.

I want to automate a Linux build but eventually get to a point where I need to run what seems to be a very manual step: make menuconfig.  This seems to synchronize configs between the OS and kernel configs?  cp git-tracked-config .config make defconfig  make menuconfig # <- how to automate/script this? make V=s   Basically, how can I remove the call to make menuconfig for a build script?  As an aside, this is in reaction to a build error that seems to happen when I run without ever calling make menuconfig:  make[1]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.   Which seems to be there is a missing rule in a makefile perhaps because the makefile itself does NOT exist or the makefile has not been generated/morphed to contain that rule but that is a separate question.  There could be a smarter way to approach this alltogether.  Are there other configs that I'm not tracking but should (e.g. oldconfig)?


I just received a bread machine and I wanted to make a loaf of bread but I don't have powdered milk. Can I use whole milk instead of powdered milk?

I have a book with several bread recipes that call for 1-2 tablespoons of powdered milk. This isn't something I usually use and I was thinking substituting it with normal milk, and putting less water to compensate for the added liquid. Would this be ok? And if yes, how much milk should I put for one tablespoon of powdered milk?


(This question may be a duplicate but I really didn't understand the other answers)  You have the following code:  String str ="football"; str.concat(" game"); System.out.println(str); // it prints football   But with this code:  String str ="football"; str = str + " game"; System.out.println(str); // it prints football game   So what's the difference and what's happening exactly?

Assuming String a and b:  a += b a = a.concat(b)   Under the hood, are they the same thing?  Here is concat decompiled as reference. I'd like to be able to decompile the + operator as well to see what that does.  public String concat(String s) {      int i = s.length();     if (i == 0) {         return this;     }     else {         char ac[] = new char[count + i];         getChars(0, count, ac, 0);         s.getChars(0, i, ac, count);         return new String(0, count + i, ac);     } }


Please suggest me the proof.Am stuck with it.I saw somewhere that it will be true if (o(G),o(H))=1 but why?

Can anyone help with the following proof?  Let H,G be final groups.  $(|G|,|H|) =  1$, prove that $Aut(G×H) ≅ Aut(G) ×Aut(H)$  I found this question  but didnt really understand the solution, would appreciate if anyone could help with that.  thank you


Recently i've recovered my Downloads directory with testdisk but all files recovered are in .eCryptfs file extension. Now i need to decrypt it for find my PHP lost files, how I can do it? Thank you

I opted to encrypt my Home during install, and now I would like to access my data from a LiveCD, unfortunately I'm having trouble following these . I get the error "mounting eCryptfs: [-2] No such file or directory"


As the title suggests, where should a period be placed when a sentence ends with a quote inside of parentheses? For example (and yes, I know this is a weird example):  Henry tripped on his shoelace and fell, skinning his knee (and saying "oww")  The period has been removed because I don't know where it should go. I can see two possibilities that make sense here:   Henry tripped on his shoelace and fell, skinning his knee (and saying "oww"). Henry tripped on his shoelace and fell, skinning his knee (and saying "oww.")   I would assume that whatever ruling on this applies for periods, the same ruling would go for commas, although this is a pretty weird one so maybe that's not the case.

Possible Duplicate:          I have never seen this particular issue addressed; I looked around and couldn't see anything that specifically addresses this. (Is there anything?)  In a sentence in which we have this scenario: quotation marks, period and closing parenthesis, what goes where?  Any of these are possibilities:     I love Diablo Cody (Oscar-winning writer of 'Juno.')   I love Diablo Cody (Oscar-winning writer of 'Juno).'   I love Diablo Cody (Oscar-winning writer of 'Juno').   I know I could use a comma instead of parentheses, but what if I wanted to use parentheses? There has to be a way to do it correctly.


Regarding the command apt autoremove, is it safe to use? Will it remove only unneeded files? Are there any reasons to use caution when running it?

The last time I used sudo apt-get autoremove, nearly every important display driver or parts got deleted. This made me very squeamish about using the command again. However, each time I install something or use apt-get update the terminal reads:   The following packages were automatically installed and are no longer required:   devilspie libturbojpeg:i386 libxrandr-ltsr2 language-pack-kde-en   kde-l10n-engb language-pack-kde-en-base libxv1:i386 libllvm3.2   libllvm3.2:i386 linux-generic-lts-raring Use 'apt-get autoremove' to remove them.     I tried the command clean and the messages stops displaying for a while. My question is whether it's safe running the autoremove command, or will I lose everything once again? Is there a way of checking how safe it is to use autoremove in this particular (or any) case?


My family and I are planning to visit UK in October. My agenda is; 1. Visit old architecture of Bath 2. Strafford upon Avon 3. Lake District 4. Pitlochry  5. London  I will travel with Nikon D7100 and the lens available are Sigma 17-50 F2.8, Tokina 11-16 F2.8, Nikkor 35mm F1.8, Nikkor 300mm F4 AFS and Tamron 150-600 VC.  I love architecture, landscape and also bird ( + hopefully salmon leaping). Will I see lot of birds at those places?  Do I need to bring along all those lens. Please help me choose.  TQ

On a crop sensor camera, e.g. Canon EOS 7D, what would be the best kit to travel with around Europe for a few weeks? My shooting style will focus on landscape, architecture, and general travel shots (of note would be my lack of interest for portraits).     Limit to around 1-3 lenses, and I prefer light ones.   Crop sensor camera chosen to save on weight over a full frame option. Question is open to all brands for general guidance, but I will be using a Canon body.   Cost is not a factor, I will rent the lenses I do not already own.   Quality is of paramount importance. I will not have a tripod.   I understand some may consider this subjective, but I do believe that for a crop sensor body, with weight as a consideration, and a limit to the amount of lenses, a true best kit can be determined.


I'm trying to create a view of a table that I made of subqueries. I have no problems creating views with other tables but it looks like when I try the CREATE VIEW command below, I get an error. I think its something to do MySQL's capabilities creating views that have nested subqueries in them? Does anyone know how to resolve this issue? Or perhaps optimize my method so I don't have to write subqueries?  I know it is not a privilege/permission issue since I have granted all access to my user and I can create other tables and views just fine.   SELECT YEAR(order_date) AS 'year', MONTH(order_date) AS 'month', SUM(ctc_reported) AS 'ctc_reported', SUM(ctc_detected) AS 'ctc_detected',     SUM(ctc_detected)/SUM(ctc_reported) AS 'detection_percent',     SUM(ck_pos_detected) AS 'ck_pos_detected',     SUM(ck_pos_detected)/SUM(ctc_detected) AS 'ck_pos_percent',     SUM(ck_neg_detected) AS 'ck_neg_detected',     SUM(ck_neg_detected)/SUM(ctc_detected) AS 'ck_neg_percent',     SUM(ck_both_detected) AS 'ck_both_detected',     SUM(ck_both_detected)/SUM(ctc_detected) AS 'ck_both_percent'  FROM (SELECT result_management_report_id,     accession_id,     order_date,     IF(ctc_enumeration_result IN ('DETECTED','NOT DETECTED'), 1, 0) AS 'ctc_reported',     IF(ctc_enumeration_result = 'DETECTED', 1, 0) AS 'ctc_detected',     IF(ck_pos > 0 AND ck_neg IS NULL, 1, 0) AS 'ck_pos_detected',     IF(ck_neg > 0 AND ck_pos IS NULL, 1, 0) AS 'ck_neg_detected',     IF(ck_pos > 0 AND ck_neg > 0, 1, 0) AS 'ck_both_detected'   FROM Biocept_DB.result_management_report WHERE final_reported_date IS NOT NULL ) AS subquery GROUP BY YEAR(order_date), MONTH(order_date) );   Error Code: 1142. ANY command denied to user 'BioceptAnalyst'@'%' for table ''  This is what the table looks like:

In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause?     ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause   If this is a limitation of the MySQL engine, then why haven't they implemented this feature yet?  Also, what are some good workarounds for this limitation?  Are there any workarounds that work for any subquery in the FROM clause or are there some queries that can not be expressed without using a subquery in the FROM clause?    An example query (was buried in a comment):  SELECT temp.UserName  FROM (SELECT u1.name as UserName, COUNT(m1.UserFromId) as SentCount        FROM Message m1, User u1        WHERE u1.uid = m1.UserFromId        Group BY u1.name HAVING SentCount > 3 ) as temp


I recall being able to clone an object with the spread operator like such:  let obj1 = {   key: 'value',   key2: 'value2'   }  let obj2 = { ...obj1 }   But now I realize this doesn't work as I am trying to change values of obj2 and its also changing the values in obj1.  If I did:  obj2.key2 = 'test'   It would change obj1.key2 to 'test' as well.  Why is this happening?  I also tried doing:  let obj2 = Object.assign({}, obj1)   but i face the same issues.  Thanks  let obj1 = {   key1: 'value1',   key2: 'value2' }  let obj2 = { ...obj1 }  obj2.key2 = 'changed key2 value'  console.log( obj1.key2 == obj2.key2 )

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


So there are a billion clearfixes out there. Does anyone have a collection of them with their browser support?

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

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


A little backstory here. Someone tried to school me on the internet when I made a comment about how something was a liquid. My direct quote was: "Cats are a liquid" Now immediately someone replied with the following language lesson:  I get the point he makes with Air, Rice or Water, but if you want to specify an aggregation state of a substance, or in this particular case a creature, wouldn't that be correct usage?

I read this sentence in a description to a podcast from      Batter, “batter,” when we talk about cooking is a liquid, made usually   with eggs, and flower, and perhaps milk, and you combine these things   together and you get a thick liquid, which we call batter   Why do I need to use a before liquid? What makes liquid countable?


I have a directory in which there are lots of password protected .RAR files/archives.  The passwords of these individual archives are known.  I want to remove the password protection from all of them without extracting the contents. Since each file is larger than 1 GB, decompressing & then recompressing without password encryption is not a good option for me. How can I easily do that? I'm using WinRAR 3.80 on Win7. Any other 3rd party tools are welcomed.

I know the password to the RAR file as I locked it myself. Is there a way to do this in WinRAR or an equivalent program? The only thing I knew to do was to extract it, then create a new RAR without the password.


I have this code in java and I do not understand the meaning of the Object in the following code ...   Here is the code   public class Tester {     public static void main(String[] args) {         Foo foo1 = new Foo(1);         Foo foo2 = new Foo(2);          System.out.print(foo1.equals(foo2));     } }  class Foo {     Integer code;      Foo(Integer c) {         code = c;     }      public boolean equals(Foo f) {         return false;     }      public boolean equals(Object f) {         return true;     }  }   When I run the code I get false  but when I remove   public boolean equals(Foo f) {         return false;     }   and run the code I get true...  Why is that and what is happening ?  Thanks

I ran into an interesting behavior recently.  It seems that if I override .equals() to take a parameter other than Object, it doesn't get called.  Can anyone explain to me why this is happening?  It seems to violate my understanding of polymorphism in OOP, but maybe I'm missing something.  Here's much simpler code that shows what I'm seeing:  public class MyClass {   private int x;   public MyClass(int n) { x = n; }   public boolean equals(Object o) { return false; }   public boolean equals(MyClass mc) { return x == mc.x; }   public static void main(String[] args) {     List<MyClass> list = new ArrayList<MyClass>();     list.add(new MyClass(3));     System.out.println("Contains 3? " + list.contains(new MyClass(3)));   } }   When this is run, it prints "Contains 3? false".  It looks like the equals(Object) function is called, even though there is another that would work.  By contrast, if I write equals like this the code works as expected:  public boolean equals(Object o) {   if(!(o instanceof MyClass))     return false;   MyClass mc = (MyClass)o;   return x == mc.x; }   Why isn't it figuring out which version of the function to call based on the type of the parameter?


Hide a Field from ONE PARTICULAR USER out of 50 Users having the same Profile I have 50 Users assigned to a Profile called Sales. I have a Custom Object called "Commission". I have a Field called "Comission Amount" this field contains confidential data and the Management would like to HIDE this ONE Field from ONE User who is one amongst the Users with Sales Profile. What we want to achieve is that out of 50 Users with Sales Profile, we should HIDE this ONE Field from this Object to this ONE particular user who has Sales Profile.  How to achieve this? The User can have access to Read / Write View the Object and have access to all the other Fields on this Object except for this One Field called Comission Amount.. What's the best Solution? Note: We do not want to create a Custom Profile for this Particular User.

Scenario: If I had a Custom Profile / Standard Profile, say Sales,and I have 50 Users assigned to the same Profile and had same Permission / Access on a particular object (Could be Standard or Custom Object), if I were to Hide a Field ONLY TO ONE USER, which would be  a better Solution to achieve this WITHOUT EDITING OR TOUCHING THE PROFILE??  Option 1: Create a Custom Profile for this particular User and give CRED access (I know this one isn't a good solution as I got a Thumbs-down from a Technical Architect)  Option 2: Create a Permission Set - Go to the particular Object,say, Accounts, Object Permission Enabled -->Field Permissions-->Remove READ Access - This would make this particular field hidden from the Object to the Profile. Then Assign this Permission to particular User whom I don't want to see this field.  I would go with the 2nd option but I still hear a groan. Where am I going wrong? How would you hide a particular field from ONE User out of 10 Profiles who have the same Access Rights?  What's the best possible solution to hide a Filed from only one User out of 10 Users who have the same Profile.


I installed Visual Studio 2012 yesterday and during the install my path somehow got screwed up1. Since then, the icons for applications that are part of Windows are the default "unknown" icon, but other icons are fine. The applications that the shortcuts link to launch fine when the icons are clicked on.  Taskbar:    Start Menu:    I have fixed my path, but the icons still show incorrectly.  Any ideas on how to flush what appears to be a set of cached icons?    1 Something took a path of A;B;C;D; and turned it into A;B;C;D;A;B;C;D;E;F; - duplicating a large part of it to that point that no more characters were available to type in the edit box in system properties. This had the side-effect of Windows reporting that it couldn't find %windir%.

I have a program pinned to the taskbar. After I upgraded the program (I think) the icon broke. What I get now is what you see below; that ugly default application icon thing.    If I unpin it, I get the correct icon. If I then right-click on it, the icon breaks again. If I pin it again, still the broken icon. Unpin again and back to good icon. Very annoying. How can I fix this?


When the disk utilization is checked I get /dev/vdb2 partition is more than 70% full. This is a partition with total space 84GB and 56GB already used.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda1        50G   23G   28G  45% / devtmpfs        3.8G     0  3.8G   0% /dev tmpfs           3.9G     0  3.9G   0% /dev/shm tmpfs           3.9G  273M  3.6G   7% /run tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup /dev/vdb2        84G   58G   23G  72% /log /dev/vdb1       9.8G  4.6G  4.7G  50% /mnt/ /dev/vdb3       4.8G   10M  4.6G   1% /data /dev/vdd1       9.8G  723M  8.5G   8% /var /dev/vdc2       4.8G   11M  4.6G   1% /tmp /dev/vdc3       4.8G  280M  4.3G   7% /var/log /dev/vdc1       4.8G  3.2G  1.4G  71% /home /dev/vdc5       4.8G  757M  3.8G  17% /var/log/audit tmpfs           783M     0  783M   0% /run/user/1003   When I check for the file sizes within /dev/vdb2, I don't see that much(56GB) space is consumed by files.   # du -ah /log | sort -nr | head -9 570M    /log/gateway/repository/logs/http_access_2019-11-30.log 562M    /log/gateway/repository/logs/wso2carbon.log 152K    /log/portal 148K    /log/portal/repository 144K    /log/rsync 144K    /log/portal/repository/logs 140K    /log/rsync/carbon-rsync-logs 20K /log/portal/repository/logs/http_access_2019-11-30.log 16K /log/portal/repository/logs/http_access_2019-11-27.log.gz   It seems to be there is some unrecognizable space consumed. How is it possible to recover this disk space?

I used du to list all folders and sort by size, the results simply doesn't add up to how much disk space is used(using df). There's about 20G in discrepency, why?   [root@xxx lib]# du --max-depth=1 -h /| sort -n -r 310M    /lib 123M    /root 96K /dev 88M /etc 75G / 73G /var 30M /sbin 20M /boot 20K /tmp 18M /lib64 16K /mnt 16K /lost+found 12K /home 8.0K    /srv 8.0K    /selinux 8.0K    /opt 8.0K    /misc 8.0K    /media 7.0M    /bin 1.2G    /usr 0   /sys 0   /proc [root@xxx lib]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00                       298G   94G  189G  34% / /dev/sda1              99M   26M   69M  28% /boot tmpfs                 2.0G     0  2.0G   0% /dev/shm


My Samsung netbook NP300E5A screen is continually dimming. The screen is forty percent dim on battery, but if I plug in the charger, the screen will be normal. I have tried all I know and I could not fix it. What should I do? what am trying to explain is that the system is dimming like flooricent light the screen resolution systems are all ok. When I pluging my charge the dimming we stop but when is on battery it look like flashing someone light when driving


I'm resurrecting my 1995 Mongoose IBOC Zero G bike after several years in storage.  I need to replace the tires and tubes.  I will be riding almost exclusively on paved or groomed trails so I don't need mountain bike tires. Current: Panaracer Dart and Smoke 26x2.10 on Araya TM-18 rims I am hoping for some expert guidance on a recommendation for what tires and what size I should purchase for a safe alternative to the old MTB tires.

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


I was wondering, sometimes the reason for the existence of a duplicate question might be, because the original was not very "findable." Or the duplicate might have better answers, or applicable to more circumstances. Are there any efforts to merge questions in those circumstances?

I see more and more exact duplicates on SO. Instead of being merged they are being simply closed. I think this is very big disservice to SO. Why don't moderators merge duplicates? Why don't owners of the site do anything about this?  EDIT  It's disservice because this way we have more and more junk. Duplicates are duplicates and should be merged so that information in in one place.     If the duplicate has no answers then there is no benefit to merging.   Of course there is. You don't need to waste your time with dupes.     It also means that the search routes to the main question are   diminished which makes the posting of new duplicates more likely   There's easy solution for this which I gave in  back in march.     If both questions have answers that have been accepted, which one   should be unaccpeted?   There are plenty of solutions. You accept most voted accepted answer or the first accepted answer or both (I think this is be the best). Yes, there will be possibility of many accepted answers to one question. So what?     When a question is closed as a duplicate, there is a link to the   duplicate question. What more do you want?   I don't want yet another link. I want to have all answers to some problem in one place. Is this that hard? Isn't this natural expectaion?     Removal of the question means that the text in it is no longer searchable - that's a disservice.   See my answer above to Scrooge's comment.


I have the following url:  http://myweb/sites/stonehr/SitePages/VacancyTracking.aspx?PrID=23?Status=34   And I have to get the value of PrID= and Status= with JavaScript, to be able to:  alert(PrID); // output should be 23 alert(Status); // output should be 34   How can I achieve this?

In SharePoint how do you get the ID value from the url of the page you are on using javascript( Jquery,ajax, Rest..),  e.g. I have the url like so: http:// ddd/mypage?ID=xx   I tried before to retrieve the full url but it didn't get the ID and its value. so I have to get the ID value directly with the get method


I changed to Ubuntu ,started computer pressed F2 got to BIOS and installed from a USB, but i have been getting to many problems with this, i now have a USB with Windows but now hen i press F2 when starting the computer it does not go to the BIOS menu, i just want to know how to get to the BIOS menu, and why would this happen? I am using Ubuntu 19.04

I have a laptop with Ubuntu installed as the only OS. I also have a USB stick with a Windows 7 installation on it. I want to install Windows from the USB stick on my laptop but when I try to restart the laptop to get access to BIOS, I can't seem to find the command for it, its like it skips everything and just says Ubuntu and then takes me to the login screen.  How do I change the boot priority to USB in Ubuntu?


I am not sure if I must ask this in blender stakcexchange or in here. However, the problem is that when I run a custom compiled version of Blender(that wasn't compiled by me), I see this:  ./blender: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory   It shows that a library for loading jpeg files is missing. Now I don't have any idea how to fix it? Is it possible to kinda get it manually? I think that the problem is that Ubuntu 15.10 may have upgraded libjpeg to version 7 and deleted version 6.2 files. But that's all I know so far.

Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?


What is the value of $\cos\left(\frac{2\pi}{7}\right)$ ? I don't know how to calculate it.

What are the exact values of $\cos(2\pi/7)$ and $\sin(2\pi/7)$ and how do I work it out?  I know that $\cos(2\pi/7)$ and $\sin(2\pi/7)$ are the real and imaginary parts of $e^{2\pi i/7}$ but I am not sure if that helps me...


I am trying to align the text inside the div tag with the links but I am unable to do it. Please take a look at the fiddle. Images are a little up than the text Page 5 of 6.   <display:setProperty name="paging.banner.full" value='       | Page {5} of {6} |       '/>         <display:setProperty name="paging.banner.first" value='  &nbsp | Page {5} of {6} | &nbsp     '/>         <display:setProperty name="paging.banner.last" value='       | Page {5} of {6} |   '/>   CSS  .pagelinks  { float: right; margin-right: 48%; display: inline-block; background-size: cover; background-repeat: no-repeat; color: #828282; }  .pagelinks a { text-decoration: none; display: inline-block; background-repeat:  no-repeat; }   Thanks

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


As the title says Prove by mathematical induction that for n ≥ 1 it is true that  $(1 + a)^n \geq 1 + na$ for $a \geq 0$  Having no clue on how to solve this

I'm asked to used induction to prove Bernoulli's Inequality: If $1+x>0$, then $(1+x)^n\geq 1+nx$ for all $n\in\mathbb{N}$. This what I have so far:  Let $n=1$. Then $1+x\geq 1+x$. This is true. Now assume that the proposed inequality holds for some arbitrary $k$, namely that $$1+x>0\implies (1+x)^k\geq 1+kx,~\forall~k\in\mathbb{N}\setminus\{1\}$$ is true. We want to show that the proposed inequality holds for $k+1$. Thus multiplication of $(1+x)$ on each side of the above inequality produces the following result: $$(1+x)(1+x)^k\geq (1+kx)(1+x)\implies (1+x)^{k+1}\geq 1+x+kx+kx^2\cdots\cdots\cdots$$  I'm not sure where to go from here.


Is there a way to return the file permissions in the format in which they are modified using chmod?  For example   chmod 755 thisdir   then   commandx thisdir   Would return 755, where commandx is some command used.

I need to set the same chmod, how to get number for -rw-r--r-- ?


I a technical correspondence, I wanted to express the fact that there are two outcomes of "onclick" event:     Also, "onclick" event removes the group in question from the list "excluded_groups" or adds it to the list.   However, the above sentence looks too long to me. Is the following sentence grammatically and stylistically correct: (note that there is no "from" after "remove", or anywhere else in the sentence)     Also, "onclick" event removes or adds the group in question to the list "excluded_groups".

How could one combine succinctly two verbs with the same two objects with different prepositions? For example, if I can either add gifts to a box and remove gifts from the box, what would be the most natural way of saying that I can do both?  If I would only talk about the gifts, I could say "I can add and remove gifts;" if I would only talk about the box, I could say "I can add to and remove from the box." Now, how can I say both things at once?


"You, my peer, who know no more than I" or "You, my peer, who knows no more than I"  I am leaning toward the first one, but the second one sounds more natural. Which one should I choose?

Possible Duplicate:          Am aware it is correct to say "I have written..." and "I am a doctor who has writen..."  I have, however, severally come across the sentence "I, Tertius, who have written...". Shouldn't it be "I, Tertius, who has written..."?


I am setting up a home server for plex, storage, and a few VMs. I have everything loaded and running and was checking to what ram I had left to start a few VMs and noticed I was using more than half of my ram and hadn't even started a VM yet. I ran "sudo htop" to see if I could find out what was using it, but it doesn't show much. Haven't been using Linux long, but I thought it was very lite on resources. Is there another application I can use to find out what is using the ram?      bob@ducktape:~$ uname -a     Linux ducktape 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux      bob@ducktape:~$ free -m                   total        used        free      shared  buff/cache   available     Mem:          48291       26613       18648          28        3029       20595     Swap:             0           0           0      bob@ducktape:~$ ps aux --sort -rss | head -n 5     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND     plex     19720  9.3  1.2 1177412 597384 ?      Sl   00:11  71:45 /usr/lib/plexmediaserver/Plex Media Server     plex     19789  0.0  0.1 344168 92808 ?        Sl   00:11   0:28 /usr/lib/plexmediaserver/Plex DLNA Server     plex     19748  0.1  0.1 1857400 66116 ?       SNl  00:11   0:46 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-f54242b6b/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.10.1.4602-f54242b6b /usr/lib/plexmediaserver/Resources/Plug-ins-f54242b6b/System.bundle     plex     19822  0.0  0.0 955492 47048 ?        Sl   00:11   0:12 Plex Plug-in [com.plexapp.plugins.WebTools] /usr/lib/plexmediaserver/Resources/Plug-ins-f54242b6b/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.10.1.4602-f54242b6b /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/WebTools.bundle  bob@ducktape:~$ free --si -h               total        used        free      shared  buff/cache   available Mem:            49G         27G         19G         29M        3.1G         21G Swap:            0B          0B          0B

Ubuntu has been crashing on me recently. I think its because it runs out of memory so I ran the free -m command and found that my memory usage was really high. So then, i ran top to find the culprit, but the displayed processes were using less than 1.5% of memory. How do I know which program is making ubuntu crash/run out of memory? Below is the output:  shafee@shafee-pc:~$ free -m              total       used       free     shared    buffers     cached Mem:          3824       3714        110          0        978       1954 -/+ buffers/cache:        780       3044 Swap:           99          0         99  shafee@shafee-pc:~$ top top - 02:12:14 up  1:24,  2 users,  load average: 0.16, 0.42, 1.49 Tasks: 182 total,   1 running, 181 sleeping,   0 stopped,   0 zombie Cpu(s):  2.9%us,  1.9%sy,  0.3%ni, 79.3%id, 15.5%wa,  0.0%hi,  0.2%si,  0.0%st Mem:   3916708k total,  3803848k used,   112860k free,  1002308k buffers Swap:   102396k total,        0k used,   102396k free,  2001852k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND              4200 root      20   0  289m  53m  38m S    2  1.4   1:06.45 Xorg                 5590 shafee    20   0 19348 1368  956 R    2  0.0   0:00.01 top                     1 root      20   0 24124 2136 1264 S    0  0.1   0:02.05 init                    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                3 root      20   0     0    0    0 S    0  0.0   0:24.23 ksoftirqd/0             6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0             7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1             9 root      20   0     0    0    0 S    0  0.0   0:00.11 ksoftirqd/1            11 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2            13 root      20   0     0    0    0 S    0  0.0   0:03.89 ksoftirqd/2            14 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3            16 root      20   0     0    0    0 S    0  0.0   0:00.16 ksoftirqd/3            17 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                 18 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                19 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                  21 root      20   0     0    0    0 S    0  0.0   0:00.01 sync_supers         shafee@shafee-pc:~$   Or is it normal to have 110mb of free memory and is my issue related to something else?


I know there are many posts regarding this exercise from this heavily criticized book, but so far it helped me to start understanding things.  However, with every chapter there are questions, and while some I can answer myself, others are far more complicated.  import random from urllib import urlopen import sys  WORD_URL = "http://learncodethehardway.org/words.txt" WORDS = []  PHRASES = {     "class %%%(%%%):":        "Make a class named %%% that is-a %%%.",     "class %%%(object):\n\tdef __init__(self, ***)" :       "class %%% has-a __init__ that takes self and *** parameters.",     "class %%%(object):\n\tdef ***(self, @@@)":       "class %%% has-a function named *** that takes self and @@@ parameters.",     "*** = %%%()":       "Set *** to an instance of class %%%.",     "***.***(@@@)":       "From *** get the *** function, and call it with parameters self, @@@.",     "***.*** = '***'":       "From *** get the *** attribute and set it to '***'." }  # do they want to drill phrases first PHRASE_FIRST = False if len(sys.argv) == 2 and sys.argv[1] == "english":     PHRASE_FIRST = True  # load up the words from the website for word in urlopen(WORD_URL).readlines():     WORDS.append(word.strip())   def convert(snippet, phrase):     class_names = [w.capitalize() for w in                    random.sample(WORDS, snippet.count("%%%"))]     other_names = random.sample(WORDS, snippet.count("***"))     results = []     param_names = []      for i in range(0, snippet.count("@@@")):         param_count = random.randint(1,3)         param_names.append(', '.join(random.sample(WORDS, param_count)))      for sentence in snippet, phrase:         result = sentence[:]          # fake class names         for word in class_names:             result = result.replace("%%%", word, 1)          # fake other names         for word in other_names:             result = result.replace("***", word, 1)          # fake parameter lists         for word in param_names:            result = result.replace("@@@", word, 1)          results.append(result)      return results   # keep going until they hit CTRL-D try:     while True:         snippets = PHRASES.keys()         random.shuffle(snippets)          for snippet in snippets:             phrase = PHRASES[snippet]             question, answer = convert(snippet, phrase)             if PHRASE_FIRST:                 question, answer = answer, question              print question              raw_input("> ")             print "ANSWER:  %s\n\n" % answer except EOFError:     print "\nBye"    I don't understand this bit  for sentence in snippet, phrase:     result = sentence[:]   What does sentence[:] suppose to do? I tried the code without [:] and it worked, so I'm very confused. Perhaps it's just there to make things more confusing for no reasong? Because I also noticed, that   This code:  for i in range(0, snippet.count("@@@")):     param_count = random.randint(1,3)     param_names.append(', '.join(random.sample(WORDS, param_count)))   I can rewrite into something less confusing param_names = random.sample(WORDS, snippet.count("@@@")), which then also begs the question why to do in such way?  Sorry for the n00bish post, but a help would mean a lot!

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.


Recently this problem occured. I don't know why, but now I can't just drag windows to top, left or right part of the screen to resize the, quickly. I kind of got used to this, so now it is just frustration that nothing happens when I try to do that.   It is not a tablet mode as many people in internet suffer from, and I couldn't find any clue to deal with this..

I'm currently using my  with Windows 7 Ultimate but  isn't working.     Why is Aero Snap not working and how do I turn it on?


In the table row I have click event like onclick="trDetailsModal(this, 'id')" and I am showing details in the modal. So inside the tr I have also two buttons under actions td, those buttons are also having onclick event like onclick="deleteRecord('id')"; I am able to see details in a modal by clicking on tr. Now the problem is when I click one of the buttons the tr onclick also getting triggered and showing details also in model. So how to stop tr onclick while clicking one of those buttons. Code: $content .= '
id.');">'; $content .= 'some value	'; $content .= '<button onclick="deleteRecord('.$val->id.')">	'; $content .= '
';  function deleteRecord(id){    $(".trClass").off("click");   $("#myModal").hide();  }

Consider the following:
   something inside the header
   How can I make it so that when the user clicks the span, it does not fire the div's click event?


package mygame;  import java.util.Scanner;  public class Main {     public static void main(String[] args) {         Scanner scan = new Scanner(System.in);         String nome;          nome = scan.nextLine();          if(nome == "1") {             System.out.println("It worked");          }          scan.close();     } }   I'm trying to understand why my IF is not working. I'm using Scanner to get any information but no matter what my IF doesn't work.

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


Getting   "Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException"   at soms1.actionPerformed over all ActionListener events of lines:     thread.set_state(1);  thread.set_state(2);  thread.reset;  thread.send;   Can you please suggest where is null values is getting in thread? this code worked fine previously but after little changes in code this error showed up.  Code Snippet:  public class soms1 extends JApplet {  static public SOM_thread1 thread = null; static JApplet japplet = new JApplet();  static JButton go1 = new JButton("go"); static JButton play = new JButton("play"); static JButton reset = new JButton("Reset"); static JButton send = new JButton("send");  static Container c; static JPanel p1 = new JPanel(); static JPanel p2 = new JPanel(); static JPanel p6 = new JPanel();  Toolkit tool;  public void setup_applet() {     japplet.setVisible(true);      go1.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {thread.set_state(1);}     });     play.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {thread.set_state(2);}     });     reset.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {thread.reset();}     });     send.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {thread.send();}     }); }  public void init() {     tool = Toolkit.getDefaultToolkit();     setup_applet();     setup_radios();     setup_layout();      thread = new SOM_thread1();     thread.init();     thread.start();     if (clientSocket != null) {thread.set_state(2);}    } }  class SOM_thread1 extends Thread{ public void set_state(int f) {state = f;} public void send() { //code block} public void reset() {//code block} public void run() {//code block} public void init() {reset();} }   As i am newbie in java please suggest changes thank you in advance.

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?