I am new to Linux and want to restart Ubuntu. Is there a way that I can erase everything, but still keep ubuntu? Somewhat like a factory reset.

I was playing around with some settings, and now I need to reset GNOME to it's defaults - how do I do that?


If the input: int[] nums= [1,2,3], target=4; why the output res=0; the res has not been accumulated?      public int combinationSum4(int[] nums, int target) {         int res=0;         helper(nums,target,res);         return res;     }      private void helper(int[] nums, int target, int res){         if (target==0) {             res++;             return;         }         else if (target<0) return;         else {             for(int i=0;i<nums.length;i++){                 helper(nums, target-nums[i],res);             }         }      }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Hi is there any importers for blender 2.79 for importing JSON files?  I have found an importer for 2.50 but this doesn't work for 2.79 nor does it work for 2.50 as after installing the addon on blender 2.57 it doesn't let you enable the addon and will not let you check the enable box.  It's also a bit strange that blend4web doesn't have an importer as it has an exporter for json...  Thanks in advance!

I need to find a way to import some .json models into Blender, and it seems I can't just import them the same way I can import a .obj model. So is there some way to convert a .json model to a .obj model, or another file type Blender can import? I've tried using Blockbench for this, but I think it only works with Minecraft recourse pack .json models, as those are the only models that will ever actually load in it. Thank you to anyone who can help me figure this out.


When we prove something, we use mathematical symbol ∀ to stand for "for all."  Does it make any difference if we use same symbol for "for any."?

In a textbook (on economics, not "pure" mathematics), one definition requires that some condition holds for any $x,\ x' \in X$, and right afterwards another one requires that some other condition holds for all $x,\ x' \in X$.  My question: is there a difference between the two (for any, for all)?    Though searching for previous questions returns thousands of results for the query "for any" "for all", I couldn't find this specific one. Sorry if I missed it.


For example I am converting from ECEF to lla using  def ecef_to_lla(x, y, z):     lla = pyproj.Proj(proj='latlong', ellps='WGS84', datum='WGS84')     ecef = pyproj.Proj(proj='geocent', ellps='WGS84', datum='WGS84')     lon, lat, alt = pyproj.transform(ecef, lla, x, y, z)     return lon, lat, alt   I'm not sure how the ellps and datum keywords differ. Documentation points me here:  but it's still unclear how they differ?   I though a datum was a model of earth, usually an elippsoid with different parameters. So what's the difference between a datum and ellps?

Are the datum and the ellipsoid the same? What is a Datum?     The Earth is shaped like a flattened sphere. This shape is called an   ellipsoid. A datum is a model of the earth that is used in mapping.   The datum consists of a series of numbers that define the shape and   size of the ellipsoid and it's orientation in space. A datum is chosen   to give the best possible fit to the true shape of the Earth.  in this   article....


Skype is not installing in my Ubuntu.   sudo apt-get install skype giving following output.  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  skype : Depends: ia32-libs (>= 20080808) but it is not going to be installed W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ maverick/partner amd64 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_maverick_partner_binary-amd64_Packages) W: You may want to run apt-get update to correct these problems E: Unable to correct problems, you have held broken packages.   please help

I don't usually post on such forums, but I finally gave up on figuring out what's going on here and I need some help.  I need to install Adobe Reader. I am running Ubuntu 12.04 Precise x64 on Intel Core 2 Duo:   $ uname -a Linux Edison 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux   I get the following error by attempting to "sudo apt-get install acroread":   The following packages have unmet dependencies:  acroread : Depends: ia32-libs (>= 20080808) but it is not going to be installed             Depends: nspluginwrapper but it is not going to be installed E: Unable to correct problems, you have held broken packages.   If I try to install "sudo apt-get install ia32-libs", I get:   The following packages have unmet dependencies:  ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages.   Finally, if I try to install "sudo apt-get install ia32-libs-multiarch", I get:   ia32-libs-multiarch:i386 : Depends: bluez-alsa:i386 but it is not going to be installed                             Depends: libgettextpo0:i386 but it is not going to be installed                             Depends: gstreamer0.10-plugins-base:i386 but it is not going to be installed                             Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed                             Depends: gtk2-engines:i386 but it is not going to be installed . . .   Does anyone have any idea what's going on?


When I turn on iMac (iMac Intel 21.5" EMC 2428, Model A1311 / Mid 2011)  I get the chime and after some time, a blinking question mark inside a folder icon appears.  I have tried all combination keys on mac wireless keyboard and Windows USB Keyboard but nothing worked.  Then I replaced hard drive for brand new SSD but that didn't change anything.  What else I have tried:  1) All combination keys I could think of. On original mac wireless keyboard and Windows USB keyboard.  D, N, T, Option, Command + R, Option + Command + P + R, Shift, Command + S, Command + V  Whatever combination I use, doesn't make any impact on the boot process and a question mark appears after while.  2) I plug USB Stick with a bootable system and also System on CD but none of the combination keys worked. I'm unable to eject CD using the Eject button on the keyboard. I can only eject using the mouse while starting.  3) I have replaced batteries on the keyboard and when I turn on with side power button I can see a green LED briefly turn on. Caps lock LED doesn't work but I don't remember this working ever.  4) I have removed all but one RAM carrier.  I spent the last few days researching the problem but all point to faulty HDD which I already replaced. What could be a problem? Anything else I could try?

Today i format my "OS X El capitan" partition for installing "Yosemite". But due an error in bootable yosemite usb it didn't install on this partition. After some hours when i turned on iMac and hold down "option" key for boot into usb but just blank screen and mouse show. And every time when i turend on iMac it only show flashing folder with question mark. I've tried to resolve it by reseting "NVRAM". But after restarting problem still same.  Also I've tried many "Startup key combinations for Mac" but didn't work any combination on startup.  Also i have important data in my other one partition. Please can anyone tell me what i do for resolving that issue Without loosing my data?


The definition of positive definite function is something like:     for all nonzero $x\in R^n$ then the quadratic function $V(x)=x^TPx>0$ where $P \in R^n$x$R^n$ is a positive-definite matrix.   for example when I am studing the vector $x=[x_1,x_2]^T$ , the quadratice chosen function $V=0.5(x_1^2+x_2^2)>0$ is a positive definite function.  But in one textbook I have found that for a system with three state, i.e $x\in R^3$ for example $x=[x_1,x_2,x_3]^T$ if we choose the quadratic function as :  $V=0.5(x_1^2+x_2^2)$ then this chosen function is positive semi-definite in $R^3$.  I can't understand why the last function is positive semi-definite in $R^3$ and not positive definite? I thought that because it has been taken only two states i.e $x_1,x_2$ and it has been dropped $x_3$. But I didn't understand the idea of that.

I am confused about the difference between positive semi-definite and positive definite.  May I understand that positive semi-definite means symmetric and $x'Ax \ge 0$, while positive definite means symmetric and $x'Ax \gt 0$?


I am using lyx. I am not sure why my tables looks like this    The "Table 1" is much smaller compared to my caption and table content. I set the normal size to 10 pt in lyx, and use large in caption and contents. I am not sure how to change the "table 1" into large in lyx. The only preamble I am using is geometry. The document class is elsevier.

My question is about changing the font size.  I have to insert two figures side by side. Coming to inserting the captions for the figures individually:  Figure 3: blah blah.....................Figure 4: blah blah...   I am able to change the font size of "blah blah". What I want to know is how to change the font size of "Figure 3" or "Figure 4", say the figure headers or something. I do not know what they are called to search on-line.


In the minor illusion spell it defines it's image object must be     [...] no larger than a 5-foot cube.   This can potentially be interpreted in two ways:   125 cubed feet of object (must have a volume strictly less or equal to 5ft x 5ft x 5ft) No larger than 5ft in any dimension (must fit in a 5ft cube without any transformation)   Which is correct?  As a potential counter example to #2 being the relevant definition, the Teleport spell has the specific restriction that     [...] If you target an object, it must be able to fit enlirely inside a 10 foot cube [...]   which is a very different phrasing to      [...] is no larger than a 5-foot cube [...]

In follow up to my question , I would like to find out whether this portion implies shapability and what restrictions are placed on shapeability.  And can the same logic be applied to a possibly game breaking point?     Choose a door, a window, or an area within range that is no larger than a 20 foot cube   It seems that this language implies shapability because the wording is "an area". But does no larger than a 20 foot cube mean no measurement can be larger than 20 feet? Or does it mean the area or volume cannot exceed that of a 20 foot cube? We already know the size can be round or rectangular (windows can be either).


I and my husband are traveling to Italy, Switzerland and Netherlands in June. Our period of stay in Italy and Switzerland is almost the same, with 5N/6D in Switzerland and 6N/7D in Italy. Unfortunately, we are not able to find an appointment date at Italy consulate in SFO before our departure. Our flight and hotel reservations are done. We are wondering if we can take up visa appointment at Swiss consulate in SFO. If not, what are the chances of getting an emergency/expedited appointment at Italy consulate within 20 days of departure. Please help us here and let us know if it's possible to do so. Any suggestions would be appreciated. TIA

My purpose of travel is to attend an academic conference at Amsterdam.   I'm also planning to visit Paris before attending the conference. So, my first port of entry is Paris.  Where should I apply for my Schengen visa? I want to apply at the French embassy as the processing time is fast. Is this fine?


Why is this the case? If I remove the local variable within the for loop scope, it will print task 10 for all tasks, instead of 1-10.   class Program     {          public static void DoWork(int i)         {             Console.WriteLine("Task {0} starting", i);             Thread.Sleep(2000);             Console.WriteLine("Task {0} finished", i);          }           static void Main(string[] args)         {             Task[] Tasks = new Task[10];              for (int i = 0; i < 10; i++)             {                 int taskNum = i; // make a local copy of the loop counter so                                   // that correct task number is passed into                                   // the lambda expression                 Tasks[i] = Task.Run(() => DoWork(taskNum));             }             Task.WaitAll(Tasks);             Console.WriteLine("Finished processing. Press a key to end.");             Console.ReadKey();         }       }

In the two following snippets, is the first one safe or must you do the second one?  By safe I mean is each thread guaranteed to call the method on the Foo from the same loop iteration in which the thread was created?  Or must you copy the reference to a new variable "local" to each iteration of the loop?  var threads = new List<Thread>(); foreach (Foo f in ListOfFoo) {           Thread thread = new Thread(() => f.DoSomething());     threads.Add(thread);     thread.Start(); }   -  var threads = new List<Thread>(); foreach (Foo f in ListOfFoo) {           Foo f2 = f;     Thread thread = new Thread(() => f2.DoSomething());     threads.Add(thread);     thread.Start(); }   Update: As pointed out in Jon Skeet's answer, this doesn't have anything specifically to do with threading.


I have this pattern:  dir1/dir2/.log.gz dir1/dir2/a.log.gz dir1/dir2/a.py dir1/dir2/*.gzip.tar   I want to get filename or path and extension. e.g:  (name,extension)=(dir1/dir2/,.log.gz) (name,extension)=(dir1/dir2/a,.log.gz) (name,extension)=(dir1/dir2/a,.py) (name,extension)=(dir1/dir2/,.gzip.tar)   I try:  re.findall(r'(.*).*\.?(.*)',path)   but it doesn't work perfect

Is there a function to extract the extension from a filename?


I came across this in proving that the $\sqrt{3}$ is irrational

This is a problem from "" (specifically, exercise set 2 #9), which is one of my math texts. Please note that this isn't homework, but I would still appreciate hints rather than a complete answer.  The problem reads as follows:     If 3p2 = q2, where $p,q \in \mathbb{Z}$, show that 3 is a common divisor of p and q.   I am able to show that 3 divides q, simply by rearranging for p2 and showing that  $$p^2 \in \mathbb{Z} \Rightarrow q^2/3 \in \mathbb{Z} \Rightarrow 3|q$$  However, I'm not sure how to show that 3 divides p.    Edit:  Moron left a comment below in which I was prompted to apply the solution to this question as a proof of $\sqrt{3}$'s irrationality. Here's what I came up with...  [incorrect solution...]  ...is this correct?  Edit:  The correct solution is provided in the comments below by Bill Dubuque.


As title goes, without assuming continuum hypothesis, is there a subset of $\mathbb{R}$ with positive measure but not being continuum? That is,     Does there exist $A\subseteq \mathbb{R}$ such that $\mu(A)>0$ and $\aleph_0<|A|<2^{\aleph_0}$?   I believe that maybe in some system without assuming continuum hypothesis, there exists.   And by the regularity of Lebesgue measure, it suffices to deal with compact set.

Let $X\subset \mathbb{R}$ Lebesgue measurable, $|X|<2^{\aleph_0}$, is it true that $X$ is null?  Of course I am not assuming the Continuum Hypothesis.   EDIT: It might be helpful to know that all Borel measurable sets have cardinality either $\aleph_0$ or $2^{\aleph_0}$. Then a measurable set of cardinality strictly between those two must be Lebesgue but not Borel measurable.


How to prove $$\lim_{n \rightarrow \infty}\sqrt[n]{n}=1.$$   I have problem in proving this statement at the beginning my textbook says:  Suppose $f_{n}=\sqrt[n]{n}=1+h_{n}$ where does this $1+h_{n}$ come from? and what does it mean?  if we can write $\sqrt[n]{n}=1+h_{n}$ then $f_{n}=1+h_{n}$  so by defintion of convergence let $\varepsilon\gt0$ be given. There exists a positive integer $K\gt\frac{1}{h_{n}}$  such that $|f_{n}-l|\lt\varepsilon \implies |1+h_{n}-1|\lt\varepsilon\implies h_{n}\lt\varepsilon$...therefore $\sqrt[n]{n}\to 1$....Am i right?

Possible Duplicate:          I know that   $$\lim_{n\rightarrow\infty}\sqrt[n]n=1$$  and I can imagine that $n$ grows linearly while $n$th root compresses it exponentially and therefore the result is $1$, but how do I calculate it?


I am travelling from India with the following itinerary:   India -> Germany (April 1, 2018- April 21, 2018) = 21 days Germany -> USA (April 21, 2018- June 30, 2018) = 39 days [not Schengen - I already have a 10 year US visa] USA -> Italy (July 1, 2018- July 15, 2018) = 15 days Italy -> Croatia (July 15, 2018- July 17, 2018) = 3 days [not Schengen - but requires a multiple-entry Schengen visa] Croatia -> Germany (July 18, 2018 - July 20, 2018) = 3 days Germany -> India (July 20, 2018)   I can see I will need a multiple-entry Schengen visa valid for at least 6 months or so. But I'm confused what the number of days permitted for my "Duration of Stay" in Schengen will be. i.e. What should I seek in duration of stay? Will they grant 90 days or an exact number of days?

I have submitted a Schengen visa application, where my duration of intended stay is 7 days.  Now, what could be my duration of visa validity  7 days or 90 days?


A simple code like this:  \documentclass[12pt,a4paper]{article} \usepackage{hyperref} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \begin{document} the first page \clearpage the second page  \label{key} \clearpage I want to returen to page \pageref{key}, but return to page 1 when clicking the typeset number "2". \end{document}   why does the \pageref workt wrong?

In the following code, the command \label{my} appears on page 4, as well \pageref{my} says "4", but the hyperlink points to the page one. Why is that?  \documentclass{book} \usepackage{hyperref} \usepackage{lipsum}  \begin{document}    % Four pages of text.   \lipsum[1-20]     % The label is on fourth page.   \label{my}        % Buggy pageref. It produces the number 4, but the link leads to the first page.   \pageref{my}   \end{document}


I posted my meta  profile link in chat and my image got defected this is how its looks in my profile as you can see        I want  that butterfly back  :)

In chat certain users image is not showing correctly         but when we change 16 to 18 in image src it just works fine   please let me know if its dup i tried but couldn't find


Let's just assume that one flags an answer, and that flag, barring any changes to the original post would be deemed helpful.  Now, if the flag is still active and the poster changes their answer to something that is no longer inappropriate, will the flag still be marked as helpful?

Now that it is more transparent how the flagging system works from the flagger's perspective (e.g. we have a flag reputation and stats based on our flagging history) it seems important that the system is fair.  With that in mind, what happens when I flag something and then that something gets edited or corrected after-the-fact?  Does my flag go away? (This could be abused by trolls) Do I get penalized for an invalid flag even though my original flag was correct? Do I still get credit if their correction doesn't fix the problem?


I'd like to know how to prove algebraic numbers form a field, i.e.,  if $a,b$ are algebraic numbers, prove that $ab$ and $a+b$ are also algebraic numbers by finding specific polynomials that satisfy $ab$ and $a+b$.  I know there is a way to do this using Kronecker Symbol, but not sure exactly how to do it. Edit: This question is different from the suggested duplicated one in that this question asks for answer to prove that algebraic numbers form a field in unconventional ways such as using Kronecker Symbol. As the result, answers are  very different from the one suggested duplicated. So this question deserves remaining open.

Suppose $E/F$ is a field extension and $\alpha, \beta \in E$ are algebraic over $F$. Then it is not too hard to see that when $\alpha$ is nonzero, $1/\alpha$ is also algebraic. If $a_0 + a_1\alpha + \cdots + a_n \alpha^n = 0$, then dividing by $\alpha^{n}$ gives $$a_0\frac{1}{\alpha^n} + a_1\frac{1}{\alpha^{n-1}} + \cdots + a_n = 0.$$     Is there a similar elementary way to show that $\alpha + \beta$ and $\alpha \beta$ are also algebraic (i.e. finding an explicit formula for a polynomial that has $\alpha + \beta$ or $\alpha\beta$ as its root)?    The only proof I know for this fact is the one where you show that $F(\alpha, \beta) / F$ is a finite field extension and thus an algebraic extension.


Let $M$ be a maximum subgroup of $G,$ that is, a proper subgroup of $G$ such that the only subgroups of $G$ that contain $M$ are $M$ and $G.$ It shows that if $M\underline{\lhd}G$ then $[G:M]$ is finite and prime.

I'm having trouble with an exercise in "Introduce to the theory of group" book. This is problem:  Let $M$ be a maximal subgroup of $G$. Prove that if $M$ is a normal subgroup of $G$, then $[G: M]$ is finite and equal to a prime.


I'm trying to make this sample working but it fails every time and displays the bad response. Can you please explain to me why that is the case? Thanks  DECLARE @CARACS NVARCHAR(max) = 'DLV, DLC'  SELECT      CASE         WHEN 'DLV' IN (@CARACS)            THEN 'GOOD'            ELSE 'BAD'      END

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


I have a Lenovo T480s that I connect to my dock at work every day. Today all of a sudden my monitors remain black after I'm prompted for the encryption key for my disk. Usually, the login prompt should turn up.   Booting my machine without the dock works fine. Any ideas to how I can fix this? Any help is appreciated.

I performed the most recent kernel update on my Dell 5290 2-in-1 earlier today.  But moments after I plug it into its docking station, the screen flickers, blanks and freezes.  The only item left on the screen is the mouse pointer, and it is stuck.   If I leave the tablet not plugged in, it runs just fine.  It seems to be the docking station that triggers the freeze.  That said, I can log into the tablet via ssh even with the screen frozen.  So the system is still running.  But if I try to reboot the tablet via the reboot command, nothing appears to happen. sudo reboot -f will reboot the system, while sudo reboot will not.  Any ideas where I should start looking to identify this problem?


I am going to be a high school freshman next year and I have acquired a strong interest in physics. I have a mathematical background, upto, but not including, Calculus. I am looking for in depth resources covering classic mechanics enough to move onto more in depth texts on relativity as well as quantum theory. Again, I have a strong math background to all the work leading up to Calculus, and I will be taking Calculus next school year.

I'm a bachelor student majoring in math, and pretty interested in physics. I would like a book to study for classical mechanics, that will prepare me to work through . What books would be good for a beginner?


After updating Mountain Lion to Mavericks xQuartz and MacPorts throws errors about insufficient permissions. (xQuartz and MacPorts are the latest version)  I noticed:  $ sudo mkdir /opt/tmp mkdir: /opt/tmp: Permission denied   I am on Administrator Account.  sudo port install htop Error: Insufficient privileges to write to MacPorts install prefix.   I can't even uninstall MacPorts with the command from   %% sudo rm -rf \ /opt/local \ /Applications/DarwinPorts \ /Applications/MacPorts \ /Library/LaunchDaemons/org.macports.* \ /Library/Receipts/DarwinPorts*.pkg \ /Library/Receipts/MacPorts*.pkg \ /Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \ /Library/Tcl/macports1.0 \ ~/.macports

I try to install MacPorts and get this  $ sudo make install make: getcwd: Permission denied shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied ===> making install in doc job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied make: getcwd: Permission denied /usr/bin/install -c -d -o root -g admin -m 0755 "/opt/local" shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied install: mkdir /opt: Permission denied make[1]: *** [install] Error 71 make: *** [install] Error 1   I am also not able to   $ sudo mkdir /opt mkdir: /opt: Permission denied   I can create the directory with   open /   and then with Finder.  I am also able to install MacPorts with the installer .pgk, but then:  sudo port install htop Error: Insufficient privileges to write to MacPorts install prefix.


I filled out a form early November to get a Swiss visa (applying in Singapore but not Singaporean) with my travel dates as 19.12.2017 to 02.01.2018. The first available appointment was on the 1st of December and I took it. During the time in between, my travel dates changed to one week later (both arrival and departure). Now, my travel itinerary and supporting documents all have different dates from the dates on the form. What do I do?  I can fill out a new form with the right dates without paying any fees but the online ID on that form will be different.   As mentioned in the comments, I haven't got my visa yet - the interview is tomorrow.

I am an Indian student in the UK. If I already had a single entry Schengen visa and I apply again to the French embassy, will I be issued with multiple-entry?  If I get the visa, but due to a problem, I cannot travel on the intended dates(ones I mentioned on visa form) and decide to travel a month later, will it cause a problem when I travel next. And if I dont exactly follow the itenary that I submitted with my visa application?  As far as dates are concerned. I mean this: Suppose my visa is valid for May-August. When I applied for this visa, my itenary and hotel bookings were for June. But now I decide to travel instead in July. Will there be a problem if I did not take the journey for which I initially applied the visa and take a different journey later instead


Upgraded to 20.04. Much software is now snaps. I installed both FreeCAD and GnuCash as snaps from the software center, and neither has created a .desktop launcher that can be found, launched, or added to favorites in GNOME.   I know I could make them by hand, but am I doing something wrong? I removed the snaps and installed via apt, and the .desktop launchers are now present. Shouldn't snaps also create .desktop launchers?

I installed regular gnome-software to be able to install Flatpaks as well. Right after I did that, all was fine: I could see both "Software" and "Ubuntu software" in the launcher overview and launch either of them.  However, after a restart, I could no longer see Ubuntu Software, and installed Snaps weren't present in the menu anymore either. I have since uninstalled gnome-software, un- and re-installed both Ubuntu Software (snap remove snap-store and snap install snap-store) and the Snap app I'm testing with, and restarted, but I still can't see them.  Why did that happen?  As requested by pomsky:  $ ls /var/lib/snapd/desktop/applications/ chromium_chromium.desktop gnome-system-monitor_gnome-system-monitor.desktop keepassxc_keepassxc.desktop mimeinfo.cache signal-desktop_signal-desktop.desktop skype_skypeforlinux.desktop snap-store_snap-store.desktop spotify_spotify.desktop ubports-installer_ubports-installer.desktop   and  $ echo $XDG_DATA_DIRS /home/vincent/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/


I graduated from my undergraduate program two years ago with a major in Computer Science. During my undergraduate studies, I did research with a professor, and published under the university's affiliation; (Department of Computer Science, Uni Name). I am currently working in a company which I will refer to as G. I recently worked on a research idea during my weekends which led to an accepted paper in a conference. I would publish with G as an affiliation, except G has a ridiculous 3 month process to allow an employee to use them as an affiliation in a research paper, while the deadline for modifying personal information in the accepted paper is in a month. My question is, can I add my undergraduate school as my affiliation? The work was in no way or form sponsored by G or my undergraduate school.

Recently my paper is reviewed (by a professor from independent third party) and accepted by a journal. But, my employer allows me to publish this paper only without its name there.  Publishing house is expecting affiliation for each author, i.e. I can not leave affiliation as blank.   What should I write as the affiliation?


I want to get a json from a url. As an example I want to get the json of this url:   And how do I do this in JavaScript now!

I need to do an  request in JavaScript. What's the best way to do that?  I need to do this in a Mac OS X dashcode widget.


Let $A$ be a 4$\times$ 7 real matrix and B be a 7$\times$4 real matrix such that $AB=I_4$, where $I_4$ is the $4 \times 4$ identity matrix.Which of the followings are true? $\DeclareMathOperator{\rank}{rank}$   $\rank(A)=4$ $\rank(B)=7$ nullity$(B)=0$ $BA=I_7$   I know $B$ is a 7$\times$4 matrix ,then its row rank and column rank are same.  rank(B) $\leq$ 4. So (2) is false, but I have no idea about others.please help. Thanks.

Let $A$ be a $4 \times 7$ real matrix and $B$ be a $7 \times 4$ real matrix such that $AB=I_4$. Which of the following are true?      1) rank$(A)=4$      2) rank$(B)=7$        3) nullity$(B)=0$      4) $BA=I_7$.   My attempt:  $4=\operatorname{rank}(AB) \leq \min\{{\operatorname{rank}(A),\operatorname{rank}(B)}\}$. So $\operatorname{rank}(A)$ must be $4$. It shows that 1) is true  2) is false by Dimension theorem  How to check 3) and 4) ?


I was trying to get my NTFS drive to work today and I discovered that the diskutil thinks I have two local hard drive. This phenomenon is not occurred on my Macbook Pro. Do anyone know why?  Here is what it shows:

I looked at the details provided in  my system report/storage and I noticed that it appears I have a hard drive of 499.05GB and an additional SSD drive of 499.42GB. Does this mean I have 1TB of data? I only have 139GB available so do I have 500GB 'hiding' somewhere? (If so where??)  I am unsure how to interpret this information- why does it list both storage types? Is it duplicating the information?     Macintosh HD:      Available:    139.8 GB (139,800,666,112 bytes)   Capacity: 499.05 GB (499,046,809,600 bytes)   Mount Point:  /   File System:  Journaled HFS+   Writable: Yes   Ignore Ownership: No   BSD Name: disk1   Volume UUID:  EF0908C8-XXXX-XXXX-XXXX-XXXX80333709         Logical Volume:  Revertible:  Yes (unlock and decryption required)   Encrypted:    Yes   Encryption Type:  AES-XTS   Locked:   No   LV UUID:  8CC9C88D-XXXX-XXXX-XXXX-XXXX2002329B        Logical Volume Group:   Name:    Macintosh HD   Size:    499.42 GB (499,418,034,176 bytes)   Free Space:  18.9 MB (18,903,040 bytes)    LVG  UUID: EE040070-XXXX-XXXX-XXXX-XXXXA83B309         Physical Volumes:      disk0s2:     #is this a second disk?      Device Name:  APPLE SSD SM0512G   Media Name: APPLE SSD  SM0512G   Media   Size:   499.42 GB (499,418,034,176 bytes)   Medium Type:  SSD    Protocol:  PCI    Internal:  Yes   Partition Map Type: GPT(GUID Partition Table)  #does this mean its partitioned?   Status: Online   S.M.A.R.T. Status:  Verified   PV UUID:    A1391405-XXXX-XXXX-XXXX-XXX2E8FCDF3


I want to develop an application in java to capture video from webcam and store it onto a particular location.Can anyone provide me the working code?  What type(usb,ip etc..) of webcam is the best in order to develop the application.  Please help me. how to proceed?

How can I continuously capture images from a webcam?  I want to experiment with object recognition (by maybe using java media framework).   I was thinking of creating two threads  one thread:   Node 1: capture live image Node 2: save image as "1.jpg" Node 3: wait 5 seconds Node 4: repeat...   other thread:   Node 1: wait until image is captured Node 2: using the "1.jpg" get colors from every pixle Node 3: save data in arrays Node 4: repeat...


According to relativity, gravity is not a force, and an item doesn't fall, so much as travel through a straight line (geodesic) through space time which is warped.   Because the geodesics converge, it gives the impressions that items fall.   This I understand, but I'm having trouble relating this to magnetism. Like gravity, it would make sense that magnetism isn't some magical invisible force that spans space pulling items together, but rather that it is another warpage of space-time.   This warpage must be different from gravity.  For one, similar polls repel each other (thus the geodesics of similar polls must diverge rather than converge).   That's not hard to fathom.   But here's where I'm really getting confused.   Unlike gravity, magnets only attract certain types of elements (iron, etc), whereas it does not effect things like glass, etc.   So the question is why do some types objects respect this 'warpage', whereas others do not?   How does charge relate to the geodesics of space-time?

For gravity, we have    General Relativity, which is a geometric theory for gravitation.  Is there a similar analog for Electromagnetism?


It would help if there is a way to toggle the underlining on and off programmatically, assigning the command to a button to enable me to toggle with a single click.  It is a pain to go through the menus every time I want to do it currently.  How do I do this?

What macro could turn ON/OFF some proofing settings? (Unfortunately macro recording doesn't record the setting change)  I'm looking for a way to turn ON/OFF 2 proofing settings (at the same time):    check spelling as you type mark grammar errors as you type


I just reinstalled mountain lion and seem to have lost git in the process. I tried following this post :  but although I can cd into /usr/local/git I get /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/binwhen I echo $PATH  How can I change the path so I can go back to using git? Sorry if this is an obvious question, I'm fairly new to git/terminal commands.   Update:  I tried as suggested in another post and it seems to be working again:  sudo -s mkdir -p /usr/local/bin ln -s /usr/local/git/bin/git /usr/local/bin/git exit

I just upgraded to OS X Lion and now cannot initialize Git where it used to work fine:  $ git add .  -bash: git: command not found   I'm new to Git and to programming, so I'm sure it's a quick fix, any help is greatly appreciated.  Thanks guys!


How can I use a meta query like this:  >>>>>> KEY_X Conditional IS ABSOLUTELY REQUIRED <<<<<<<<<<              array(                 'key' => 'Key_X',                 'value' => 'Value_for_X'              ), >>>>>> KEY_Y **OR** KEY_Z ARE REQUIRED  / AT LEAST ONE <<<<<<<<<<             array(                 'key' => 'Key_Y',                 'value' => 'Value_for_X'             ),             array(                 'key' => 'Key_Z',                 'value' => 'Value_for_Z'             )   So the first one is an absolute must, and then one or the other is required (at least one).  Thank you so much!  Ciprian

I'm trying to do some filtering for some posts in WP_Query, but I can't seem to get the right condition. Basically what I wanna do, is get posts that have the custom field event_data (sorted by this field) and among those posts to select only those who have one of these other fields filled in event_doc1, event_doc2, event_doc3, main_doc.    The code is below.  $metaCondition = array(             'relation' => 'OR',             array(                 'key' => 'main_doc',                 'value' => 0,                 'compare' => '!=',                 'type' => 'NUMBER'             ),             array(                 'key' => 'event_doc1',                 'value' => 0,                 'compare' => '!=',                 'type' => 'NUMBER'             ),             array(                 'key' => 'event_doc2',                 'value' => 0,                 'compare' => '!=',                 'type' => 'NUMBER'             ),             array(                 'key' => 'event_doc3',                 'value' => 0,                 'compare' => '!=',                 'type' => 'NUMBER'             )         );          $query = array(             'numberposts' => 4,              'orderby' => 'meta_value',             'meta_key' => 'event_data',              'order' => 'ASC',              'meta_query' => $metaCondition         );   Thanks in advance to everone!


My computer is less than 6 months old and ever since I got it the power supply sometimes makes a whining noise. Even when the computer is off. It's a 600W ATX Corrsair. Is there anything I can do about it? I've got it plugged into a UPS.

I have many different AC adapters and power supplies for a variety of devices, ranging from small 5V/1A USB chargers to laptop power adapters and desktop PSUs. However, I often hear a whining noise from  some of these power supplies. This happens most often when they are not connected to a device or otherwise in use, and stop making noise when I connect a load to it such as by plugging in a device that is not fully charged.  Why do some AC adapters and power supplies make this whining noise? Why do some not make this noise? Is there anything I can do to suppress it?


Let $x_n$ be a sequence of real numbers such that the subsequences subsequences $(x_{2n})$, $(x_{2n+1})$ and $(x_{3n})$ converge. Prove that $x_n$ converge. I want to prove that all the subsequences that converge, converge to the same point. In other words, I want to prove that their limit is the same. (If not, $x_n$ doesn't converge) Though, I don't know how to go about to proving $\lim(x_{2n})=\lim(x_{2n+1})$.

I don't know how to begin this. My thoughts are that since there are three convergent subsequences, we could use some knowledge about their limits to construct our convergent sequence but I'm not sure how to prove $x_n$ also converges. Is there a property of metric spaces I should use, or something about Bolzano-Weierstrass theorem (for metric spaces)?  EDIT: As noted in a comment I am not allowed to assume they all converge to the same limit.


In solid mode my character has all their details and colors on, but when I switch to render, the character goes completely black regardless of the light. How do I fix this?

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I am using a script called conv-script that I found on AskUbuntu . It looks like this  #!/bin/sh  readarray -t files < wma-files.txt  for file in "${files[@]}"; do     out=${file%.wma}.mp3     probe=`avprobe -show_streams "$file" 2>/dev/null`     rate=`echo "$probe" | grep "^bit_rate" | sed "s:.*=\(.*\)[0-9][0-9][0-9][.].*:\1:" | head -1`     ffmpeg -i "$file" -ab "$rate"k "$out" && rm "$file" done   I have ran sudo chmod +x ./conv-script and then I try and execute it with sudo ./conv-script  After doing so I get an error sudo: ./conv-script: command not found  I am unsure what I am doing wrong as I can see the file in the current working directory and I have set it to be executable. One thing I thought it might be was the first line of my script is wrong, but I have another script with the same shebang and it executes fine. When I use the shebang in the original #!/usr/bin/env bash I get the same thing. Thanks for the help  EDIT:  output of file conv-script  conv-script: a /usr/bin/env bash script, ASCII text executable  output of stat conv-script    File: ‘conv-script’   Size: 325             Blocks: 64         IO Block: 32768  regular file Device: 821h/2081d      Inode: 82004       Links: 1 Access: (0644/-rw-r--r--)  Uid: ( 1000/ kalenpw)   Gid: ( 1000/ kalenpw) Access: 2016-05-17 16:40:43.000000000 -0600 Modify: 2016-05-17 14:33:31.000000000 -0600 Change: 2016-05-17 14:33:32.000000000 -0600  Birth: -

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


I've got the error message said "cannot have instance property or field initializers in structs" and wonder if there is any technical reason for this? Why doesn't a compiler behave like an initialization happens in a constructor?

In .NET, a value type (C# struct) can't have a constructor with no parameters. According to  this is mandated by the CLI specification. What happens is that for every value-type a default constructor is created (by the compiler?) which initialized all members to zero (or null).  Why is it disallowed to define such a default constructor?  One trivial use is for rational numbers:  public struct Rational {     private long numerator;     private long denominator;      public Rational(long num, long denom)     { /* Todo: Find GCD etc. */ }      public Rational(long num)     {         numerator = num;         denominator = 1;     }      public Rational() // This is not allowed     {         numerator = 0;         denominator = 1;     } }   Using current version of C#, a default Rational is 0/0 which is not so cool.  PS: Will default parameters help solve this for C# 4.0 or will the CLR-defined default constructor be called?     answered:     To use your example, what would you want to happen when someone did:   Rational[] fractions = new Rational[1000];       Should it run through your constructor 1000 times?   Sure it should, that's why I wrote the default constructor in the first place. The CLR should use the default zeroing constructor when no explicit default constructor is defined; that way you only pay for what you use. Then if I want a container of 1000 non-default Rationals (and want to optimize away the 1000 constructions) I will use a List<Rational> rather than an array.  This reason, in my mind, is not strong enough to prevent definition of a default constructor.


I ve been assigned the following problem: How can we prove by induction that for every $x,y > 0$ and $n \in N$ it is true that: $$\frac{x^n+y^n}{2} \geq \bigg(\frac{x+y}{2}\bigg)^n$$ I have established a base of $n=1$ so that $\frac{x+y}{2} = \frac{x+y}{2}$ and have assumed that the statement is true for any natural $k$ but am having problem proving that it is true for $k+1$. Any help is appreciated!

Can you help me to prove that $$(x+y)^n\leq 2^{n-1}(x^n+y^n)$$ for $n\ge1$ and $x,y\ge0$.  I tried by induction, but I didn't get a result.


If you  you will get a list of answers:    However, if you  then you get a list of questions:    Searches tagged is:answer should only return answers. The is:answer flag should take priority, and anything related to the question should be inherited from the parent question (like using question_id field for answers in the ). This way we could, for instance, . This currently returns nothing while  will provide us with what we want.

Some users on Stack Overflow have been spending a bit of time  that really need to be closed. This is working out very well, I'm hoping we can cut out some noise for them when they execute these types of searches.  Suppose we have the query:    And we want to refine it so that we only see open questions. Adding closed:0 to that seems like it should filter out questions that have already been closed, but in reality it doesn't because answers can't be closed.  This seems easy to fix if closed:[0-1] applies to the parent question when is:answer is toggled.


For my research I am looking into the relationship between an outcome (Y) and a predictor (X) as follows: $$Y = X + e$$ where $e$ is the error term. Because there might be reverse causality I am employing a 2 stage estimation strategy. My first stage being: $$X = Z + u$$ where $u$ is an error term. Now I was all concerned about the exclusion restriction and came up with a series of robustness checks. Instead the main critique I received concerned reverse causality in the first stage. Of course I looked into this when I started this project and as far as I am aware there is two conditions that should be met for the instrument to be valid:  relevance: Z should be correlated with X, or $corr(Z,X)= 0$; exogeneity: Z should not be correlated with unobserved factors influencing Y, or $corr(Z,e)\neq 0$.  Am I overlooking something? Or are there recent developments that I am not aware of maybe? Any guidance much appreciated!

The standard scheme of instrumental variable in terms of causality (->) is:  Z -> X -> Y  Where Z is an instrument, X an endogenous variable, and Y a response.  Is it possible, that following relations:  Z <- X ->Y  Z <-> X ->Y  are also valid?  While correlation between instrument and variable is satisfied, how may I think of exclusion restriction in such cases?    NOTE: The notation <-> is not explicit and might lead to different understandings of the problem. Still, the answers highlight this issue and use it to show important aspects of the problem. When reading, please proceed with caution about this part of the question.


I've checked questions like:        They don't really address my problem.  I will be in Montreal for 4 months. I'm looking for a SIM card. Most of the plans I saw are with commitment of at least one year or so. The most important part of the plan is data (for Skype calls and apps for messaging). 3 to 5 GB/month would be perfect.  What are the best options I have?

Next month I am traveling to country X, where I would need Y minutes of calls, Z text messages and most importantly Q megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?


Recently I have been issued a tourism Schengen visa to France valid until end of October. Also I applied for a student visa to Italy for a master's program that starts in September. It seems there will be overlapping weeks between the two visas yet they are of different types (one is type C the other is type D).  Would that cause a problem and force me to cancel one visa or the other?

I have an existing used Schengen visa from the 21-July-2015 to 20-July-2016 issued by Belgium. I recently applied for a Schengen visa from Germany & was issued a visa from the 19-July-2016 to 18-July-2017. As you can see, there's an overlap of 19th & 20th of June. Would this cause an issue when I'm traveling? The agents at VFS assured me that this wouldn't be an issue but can someone please confirm?


I have $23k in student loans and pay $400/mo on them. I have about $2500 left over after my bills each month. I have a 401k and am already contributing the maximum on it.  Does it make sense to spend my excess income to reduce my student loan debt to $0 to free up my $400 each month, or should I find some kind of investment to put it in? My wife also has similar student loan debt and I was thinking of tackling hers after mine.  From my little understanding of the stock market it doesn't seem like it had been performing too well lately.  Looking for advice on how to proceed to utilize my excess income and maximize my returns.  Thanks in advance.

I have been reading the top posts here, and the recommendations for what to invest in are often similar. What I'd like to know, in as simply of terms as possible, is what the consensus is on priority of these investments.  I am new to this, but here are some of the obvious options:   Paying off credit card debt Paying off mortgage / student loans 401k up to employer match 401k past employer match IRA Emergency fund Other important investments that I have missed   Clearly this will vary person to person, but if you were asked to put an ordered recommendation on a highway billboard, what would it be?  (For example:   Pay off credit debt Emergency fund for 6 months 401k up to match ... )


Let $M$ be a finitely generated Artinian module over a commutative ring $A$.  Why is $A/\mathrm{ann}(M)$ Artinian?

It is easy to show that if $M$ is a Noetherian $R$-module then $R/\mbox{ann}(M)$ is a Noetherian ring. Is there a similar (or dual) result for Artinian modules?


I try to type correct password. but it say "Sorry Try again" I try to type so long time. But nothing happen. Why?

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


For example, how do I find the cheapest tickets from any place in India to any place in either of England, Germany, Netherlands, Spain. Hope the questions makes sense?

Several airline and trip planning sites will allow you to check "I am flexible with my dates" or a similar option.  Is there any way to also search more broadly for location?  For example, if you wanted to leave from YYZ or YKF and arrive at any airport in California, can a search for such flights be done somehow?  I ask because when I plan plane trips, I want the lowest price.  I'm OK with leaving a day or two later if I save $200 (same with the return trip).  There are 3 airports within 80 km of me, I'll leave from the one with the cheapest flight. And I'm also OK with changing the trip to spend time exploring San Francisco instead of lying on the beach near San Diego, and that sort of thing.  Normally this would take dozens of searches, but I'd like to see it all at once.


Have a look at the bottom of . You can see that the code formatting continues even after the end of the answer. This is because the elements <pre> and <code> are unclosed for some reason, . Note also how the three last lines of the code block are not visible. Here's a picture from my browser (Firefox 28.0):    To me,  seems fine, so the question is - what is causing this glitch?

Here's the link:   If you scroll down to the answer that starts like this...     Just showing the answer of Pandincus with "of the shelf" code and some   explanation: You need two solutions for this example ( I know it could   be done via one also ; ), let the advanced students present it ... So   here is the DDL SQL for the table :   You'll see that the user/timestamp information for that question is encapsulated in a code block.  Edit: Added image in case someone edits the post.


Is this dependency injection if I change the below code  class Needer {     Needed obj;     AnotherNeeded obj2;      public Needer()     {         obj = new Neede();         obj2 = new AnotherNeede();     } }   To this code  class Needer {     Needed obj;     AnotherNeeded obj2;      public Needer(Needed param1, AnotherNeeded param2)     {         obj = param1;         obj2 = param2;     } }

There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used?


Here the last column is my response variable. I have four predictors that are ordinal. How best to code them to preserve their "ordinal" properties?


When combining multirow and multicolumn in the same cell of a table I am getting extra vertical lines:  \documentclass[plain]{article} \usepackage{multirow} \pagestyle{empty}  \begin{document}  \begin{tabular}{|l|l|l|l|}\hline   \multirow{10}{*}{numeric literals} & \multirow{5}{*}{integers} & in decimal & \verb|8743| \\ \cline{3-4}   & & \multirow{2}{*}{in octal} & \verb|0o7464| \\ \cline{4-4}   & & & \verb|0O103| \\ \cline{3-4}   & & \multirow{2}{*}{in hexadecimal} & \verb|0x5A0FF| \\ \cline{4-4}   & & & \verb|0xE0F2| \\ \cline{2-4}   & \multirow{5}{*}{fractionals} & \multirow{5}{*}{in decimal} & \verb|140.58| \\ \cline{4-4}   & & & \verb|8.04e7| \\ \cline{4-4}   & & & \verb|0.347E+12| \\ \cline{4-4}   & & & \verb|5.47E-12| \\ \cline{4-4}   & & & \verb|47e22| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{3}{*}{char literals}} & \verb|'H'| \\ \cline{4-4}   & & & \verb|'\n'| \\ \cline{4-4}   & & & \verb|'\x65'| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{2}{*}{string literals}} & \verb|"bom dia"| \\ \cline{4-4}   & & & \verb|"ouro preto\nmg"| \\ \cline{1-4} \end{tabular}  \end{document}     Notice the vertical lines in the char literals and string literals cells (which should span three columns). How can they be avoided?


sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers source found, quitting sudo: unable to initialize policy plugin   I have Ubuntu Server 12.04.4 LTS and this sudo problem, i cant use sudo command, please help everyone, how to fix this sudo error.    Please Help!

I am getting sudo errors, how do I fix this error?  sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers sources found, quitting


If there aren't pointers exposed to implement in java does Nullpointer exception need to be changed to Nullreference exception?

Was this an oversight?  Or is it to do with the JVM?


I downvoted an answer 17 seconds after it was posted, and left. I came back 17 minutes later (what a coincidence) and the post had been edited, but the system didn't let me undo my vote. I believe it was because the edits took place during the grace period and weren't registered. Is that so? I wish I were able to remove my downvote.

A little background:  I do not know what the specifics are, but I've noticed that a quick edit after a post will often times not result in an edit being posted. It's as if there was no edit. Edit: According to Bart this amount of time is five minutes.  The problem:  A user made a really bad post (said that ~ in C# wrt integers was used for deconstruction). I down-voted said post. Post quickly disappeared (I guess poster realized they screwed up and took back the post). Later, I come back and see my down vote but the answer is now correct (that ~ is the bitwise complement operator). I try to get rid of my down vote because it is no longer appropriate. However, it has been about half an hour and there is no edit posted (presumably the poster made an edit within the non-posting edit window) so I can't take my vote back.  Suggested solution:  If post gets edited (even within the non-post edit window) mark all the votes as changeable. I would guess that this would either involve an update on a table of votes or adding a column for last edit time which is not bypassed by the grace period. I realize that this may be an entirely non-trivial change, but unless the non-posting of edits is somehow changed to make sure the edit was trivial it seems this is necessary.


Suppose we have $T_i,i=1..n$ i.i.d. with unknown distribution and we want to estimate $E[T]$. Note that in this setting we are not estimating E[T] as a parameter of a parameter-dependent family of distributions, therefore it is difficult to attach a meaning to a likelyhood function:  $L[E[T]]=P(T_i|E[T])$  as it would be done when for example estimating $\mu$ from maximum likelyhood, knowing that the underlying distribution is Gaussian.  Again what we would probably do is computing $\overline{T}=\frac{1}{n}\sum_i T_i$. And we would be sure that the estimator would be consistent and its variance would go to zero. For example we have trivially:  $E[\overline{T}]=E[T_i]$  and:  $\sigma^2[\overline{T}]=O(1/n)$  supposing that $T_i$ has finite variance.  Here is the question: can we prove that $\overline{T}$ is optimal in some way? To me conceptes from MLE estimators or sufficient statistics are a bit difficult to apply, since $E[T]$ is not a parameter of the distribution but maybe I am missing something? Can we "derive" the sample mean estimator to be optimal according to some criterion in the general case and without making assumptions on the underlying distributions ?

While learning about Random variables I came across the mean of random variable X.  The definition says that the expected value of random variable E(X) = Mean of Random variable X  I am not able to understand why is that so. Can any one please help me with it


I am cooking a pork butt roast sous vide. I am following this recipe.    My bag had no or very little air in it after sealing and when the cooking started. Since cooking for a few hours the meat has shrunk considerably in size within the bag. But the bag also has new air in it. Enough to make it float.   I am worried I could have bad bacteria and make my guests sick.   Here is more of my thoughts: 1) According to some articles I have read this could simply be vapor. At 165F the meat is hot enough to release some water to vapor.  2) Maybe while coming to temperature some bacteria did grow, but at 165F, that bacteria is now dead. Even though the air remains, the meat is safe to eat. The dead bacteria and/or their waste are not harmful.  3) I grew a bunch of bacteria and this is not safe to eat.   Here are some pictures:   FYI, This was the only other SO post I found:

I am making this  for pulled pork, planning to do 24 hours at 75 deg C. After coming home from work, I discovered I did not suck the air out properly and there is a big bubble in the bag, causing it to float to the top and for the top of the meat to be not submerged properly. I have now put a bowl on top of it to weigh it down for the next 12 hours. Will it still be safe to eat? Will it taste good?


I am asking about the probability that the number of Fermat primes is infinite. There is a lot of things similar to the case of Mersenne primes. But it was conjectured that the number of Mersenne primes is infinite and the number of Fermat primes is finite.

A Mersenne prime is a prime of the form $2^n-1$.  A Fermat prime is a prime of the form $2^n+1$.  Despite the two being superficially very similar, it is conjectured that there are infinitely many Mersenne primes but only finitely many Fermat primes.  Is there an intuition that can help me appreciate the nature of that seemingly paradoxical difference?


JVMS heap usage and GC is working as expected but we are still observing more than 90% MEM usage in Linux top command.  Please advise.

This is a  about how Unix operating systems report memory usage.   Similar Questions:                    I have production server that is running Debian 6.0.6 Squeeze  #uname -a  Linux debsrv 2.6.32-5-xen-amd64 #1 SMP Sun Sep 23 13:49:30 UTC 2012 x86_64 GNU/Linux   Every day cron executes backup script as root:  #crontab -e  0 5 * * * /root/sites_backup.sh > /dev/null 2>&1   #nano /root/sites_backup.sh  #!/bin/bash str=`date +%Y-%m-%d-%H-%M-%S` tar pzcf /home/backups/sites/mysite-$str.tar.gz /var/sites/mysite/public_html/www mysqldump -u mysite -pmypass mysite | gzip -9 > /home/backups/sites/mysite-$str.sql.gz cd /home/backups/sites/ sha512sum mysite-$str* > /home/backups/sites/mysite-$str.tar.gz.DIGESTS cd ~   Everything works perfectly, but I notice that Munin's memory graph shows increase of cache and buffers after backup.  Then I just download backup files and delete them. After deletion Munin's memory graph returns cache and buffers to the state that was before backup.  Here's Munin graph:  Externally hosted image was a dead link.


I am building a simple message app, at the moment I would like to view the users image next to their text. I am trying to get the users image from the firebase database. However, whenever I try to getValue() of the an image the app crashes. If I choose to replace imageURI with an image link, then I see it works with that link.  08-27 23:14:02.392 4817-4817/com.myproj.blogapp E/UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference                                                                          at com.myproj.blogapp.MessageAdapter$1.onDataChange(MessageAdapter.java:79)                                                                          at com.google.android.gms.internal.to.zza(Unknown Source)                                                                          at com.google.android.gms.internal.vj.zzHX(Unknown Source)                                                                          at com.google.android.gms.internal.vp.run(Unknown Source)                                                                          at android.os.Handler.handleCallback(Handler.java:739)                                                                          at android.os.Handler.dispatchMessage(Handler.java:95)                                                                          at android.os.Looper.loop(Looper.java:145)                                                                          at android.app.ActivityThread.main(ActivityThread.java:5938)                                                                          at java.lang.reflect.Method.invoke(Native Method)                                                                          at java.lang.reflect.Method.invoke(Method.java:372)                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)     @Override public void onBindViewHolder(final MessageViewHolder viewHolder, final int index) {      final Message c = messagesList.get(index);      final String sender = c.getFrom();     databaseReference = FirebaseDatabase.getInstance().getReference().child("Users").child(sender);     databaseReference.addValueEventListener(new ValueEventListener() {          @Override         public void onDataChange(DataSnapshot dataSnapshot) {               imageUrl = dataSnapshot.child("image").getValue().toString(); //error on this line             viewHolder.setUserimage(context,imageUrl);               String name = dataSnapshot.child("name").getValue().toString();             viewHolder.displayName.setText(name);          }         @Override         public void onCancelled(DatabaseError databaseError) {         }      });      viewHolder.messageText.setText(c.getMessage());     viewHolder.time.setText(EpochtimeToDateAndTimeString(c.getTime())); }

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


I'm just trying to make an icosahedron. I know I need to reduce the subdivisions of the default mesh to 1, but the UI has changed and I can't find where to do that.

The tutorial I read is based on 2.79. So I'm not sure if it's still the same name in 2.8. But I can't find anything providing similar functionalities.


I want to plastic type gloss and reflection of light on it. Please help to add those effect.

I'm pretty new to this and this is my first question here, any help would be greatly appreciated.  So basically what I want to achieve is a floor material as seen in this photo...    ...the reflections are very crisp but dim.  With a glossy shader I get the following results:    First picture: reflections are blurry  Second picture: roughness of the material looks right but reflection is bright red  Third picture: If tinted in any other color than white, it seems to produce the result I want. Reflection is sharp and gets tinted blue. What I need is the reflection to be tinted white.  Thanks for any help.


Where are folks storing and sharing their Python geoprocessing scripts?  For example, I know that  has some shared scripts.  ESRI is phasing-out , which is still really handy, and directing people to the .  What other repositories are available for sharing geoprocessing scripts?

I will be writing scripts for ArcGIS Desktop in Python with ArcPy.   Is there a community or open source project where code and models can be shared?


This could be an interesting Question.  I Found and iPhone 5S, I handed it into the police. After 2 Months they returned the Phone, no one claimed it. I have a Sticker on the back of the phone with police details on it. So in our country, that is proof of ownership. I am now the new owner of this phone. BUT.....It is a brick, as the security has been enabled. I have a start up screen that looks like a brand new phone and I must enter an iCloud account and password. I do not have this information. I have contacted Apple Help USA, They say I need a court summons ??? WHAT!!! I contacted Apple technical Support, ( basically they said NO ) SO. the Question is.... Is there a way around this?  ( I am happy to send a photo with the police details on it. To prove ownership.) Thanks  Anthony

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I labeled my lemma with \label{lem1} and referred to it later using \autoref{lem1}. However, what was printed was "Theorem 2.1" where it should really say "Lemma 2.1". How do I fix this?  \documentclass[a4paper, 12pt, twoside]{thesis} \usepackage{verbatim}  \usepackage{amssymb,amsmath} \usepackage{amsthm,amsfonts,amscd,amsrefs} \newtheoremstyle{component}{}{}{}{}{\itshape}{.}{.5em}{\thmnote{#3}#1}     \theoremstyle{component}     \newtheorem*{component}{}  \begin{document} \begin{lemma} \label{lem1} This is a lemma. \end{lemma}  By \autoref{lem1}, we have..  \end{document}

When I define amsthm theorem environments with shared counters, autoref messes up the names of the references. For example, in the output below, we should have "Definition 2" instead of "Theorem 2".  \documentclass{article}  \usepackage{amsthm} \usepackage{hyperref}  \theoremstyle{theorem} \newtheorem{theorem}{Theorem} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition}  \begin{document}  \begin{theorem} \label{wonderful-theorem} This is a wonderful theorem. \end{theorem}  \begin{definition} \label{awesome-definition} This is an awesome definition. \end{definition}  Look at the wonderful \autoref{wonderful-theorem} and the awesome \autoref{awesome-definition}.  \end{document}


Let's say free electrons are contained in a small cloud because of electrostatic forces confining them. Now, if those walls vanish, the cloud will expand very fast because of the coulomb force inducing repulsion between alike charges.  I suppose there is now a current in the shape of a radially expanding flux, centered around the center of mass of the electron cloud. If one checks a small area of the sphere surrounding the cloud before its expansion, once the cloud starts expanding, a number of negative charges will move through it, so we have coulombs per second, i.e. amperes.  What does that mean for the magnetic field created by this varying electric field? Since the magnetic field is encircling the axis of the current, i.e. it is perpendicular to its direction, I would expect the ampere effect, i.e. that parallel wires with same sign current attracts each other. But that would seem to mean the lines of the electrons moving away from the center will contract and make the sphere collapse.  What is the real consequence of such a setting? A slowing down, like an inductor resists current change? Possibly a rebound or even an oscillating cloud?  EDIT: Someone explains to me how a question already assuming the correct answer is a duplicate. I understand it answers my question yes, but not as a duplicate.

We now ask about the magnetic field produced by the currents in this situation. Suppose we draw some loop $\Gamma$ on a sphere of radius $r,$ as shown in Fig. 18–1. There is some current through this loop, so we might expect to find a magnetic field circulating in the direction shown.        But we are already in difficulty. How can the $\boldsymbol B$ have any particular direction on the sphere? A different choice of $\Gamma$ would allow us to conclude that its direction is exactly opposite to that shown. So how can there be any circulation of $\boldsymbol B$ around the currents?   This is an excerpt from Feynman's Lectures on Physics; here he explains how there exists no magnetic field for a spherically symmetric current & that he proves later using Maxwell's third equation including the term $\frac{\partial \boldsymbol E}{\partial t}$.   But I've not understood his reasoning; how by changing $\Gamma$, the direction of the magnetic field be different? I'm failing to visualise it.  So, could anyone please help me explain how by changing the loop, the direction of the magnetic field be reversed?


I have the following problem  Let $n$ be a natural number. What is the sum of $1+2+3+...+(n-1)+n$  I'm not 100% certain what would be a correct way of calculating it. What I've done so far is look at the first and second first and last term. $1+n$ and $2+(n-1)$.  So I have $2n-1+2+3+...$. So that means the sum is $∞$

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


Is there a good practice to follow when creating a design in Photoshop so that it's easy to change colors later on?  For example, if it's possible to create a color swatch where I reference a color slot in my swatch instead of the color code. So PS would know that in that layer I'm using the color slot #3 from my swatch. When I later change the color in slot #3 then all places referencing that color would update.

I'm looking for a way to use one color in multiple different layers, and then be able to change that color in all the layers in one single place.  Lets say that I have four layers using #ffffff. Now I want to know what my design looks like with #ffff00 instead. How can I do this without manually changing all four layers?  I can add that adjustment layer on hue/saturation is not really what I'm looking for. What I need is something like "change all #ffffff to #ffff00."


I only need a couple of sentences to explain, but I don't know how to word it, please help! I do not need an algebraic proof, just a sentence or two to explain why the output is always even.

This is what I have so far, but I don't feel like its a full explanation   The even function gets rid of the negation   Since $ h(x) $ is even then $ h(x)=h(-x) for \ all \ x \ $  $ f(x) = g(h(x)) $  $ f(-x) = g(h(-x)) = g(h(x)) \ or \  g(-(-h(x))) = g(h(x)) $  therefore $  f(x) $ is even  Thanks in advance!!


I would like to show that polynomial $x^3-xy^2+y+1$ is irreducible over $\mathbb{Q}(x)[y]$. I thought I could find the roots in using $\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$, but I found that the two roots are $\frac{-1±\sqrt{4x^4+4x+1}}{-2x}$. These two roots couldn't be in $\mathbb{Q}(x)$.  Is anyone could help me to solve this problem?

I know that $\mathbb{Q}[y][x]=\mathbb{Q}[y,x]$; thus, we can see this polynomial as a polynomial with variable $x$ and with coefficients in $\mathbb{Q}[y]$. Someone explains to me that we could use Gauss's Lemma to reduce to proving irreducibility over the $\mathbb{Q}(x)[y]$ where $\mathbb{Q}(x)$ is the fraction field and after apply Eisenstein for the prime $y+1$. I am blocked for a while on this problem.   Could anyone solve this problem?


I've been trying to find the name of a movie.  It was a horror from the 80's most likely.  There was a bad guy that would transform into a werewolf like creature.  The protagonist was a young male about 18 years old.  I only caught the last 20-30 minutes of the movie.  The boy and his family (no dad that I remember) were hiding out in a cabin in the woods.  He was preparing for the bad guy to arrive by making molotov cocktails and other homemade weapons.  He also wields a lever action rifle.  Eventually, the bad guy shows up in his car, transforms, some molotov cocktails were thrown, the werewolf is injured, and the kid tracks him into the woods and kills him.  Anyone have any idea what movie this is?

For years I've been trying to find this movie I saw on TV once.  I only saw the end.  It featured a teenage boy (about 18 years old) and his family hiding out in a cabin.  The kid is making molotov cocktails and preparing for something.  Sure enough two bad guys show up and I think one of them had a golden pistol.  They start fighting and one of the guys turns into a werewolf type creature.  The kid wounds it and tracks it through the woods to finish it off with his lever action rifle.  Anyone know the name of this movie?  I saw this probably mid to late 90s.  I'm guessing it was an 80's American film. It was live action.


Can you give any examples? How does this relate to the Taylor series? Is it trye that all analytic functions are smooth, but not all smooth functions are analytic?

I saw the following (“roughly speaking”, like the author says) definition of a Lie group in ‘Group theory in Physics’, by Wu-Ki Tung:  “Roughly speaking, a Lie group is an infinite group whose elements can be parametrized smoothly and analytically.” After this, I was asking myself if I really already know the difference between these terms.  Because, what I know about 1 - analytic: if we say that a function is analytic at a point it means that its derivative is defined at this point and at the points of its neighborhood; 2 – continuous: a function is continuous at a point if you can write a neighborhood of this point where this function is still defined (and this is why those three conditions we learn in Calculus, including that one with the limit); 3 – smooth: I am not sure, but I think it is related to the differentiability of the function.  I think this may be a silly question, but I would thank you for answering


Find the number of irreducible polynomials of degree 4 in $\boldsymbol{Z}_3[x]$.   Not really sure what to do here, I've tried listing them all out but this seems tedious, and all I need to find is the number of irreducible polynomials, not their values. Is there perhaps a general formula for this?

I know that for every $n\in\mathbb{N}$, $n\ge 1$, there exists $p(x)\in\mathbb{F}_p[x]$ s.t. $\deg p(x)=n$ and $p(x)$ is irreducible over $\mathbb{F}_p$.     I am interested in counting how many such $p(x)$ there exist (that is, given $n\in\mathbb{N}$, $n\ge 1$, how many irreducible polynomials of degree $n$ exist over $\mathbb{F}_p$).   I don't have a counting strategy and I don't expect a closed formula, but maybe we can find something like "there exist $X$ irreducible polynomials of degree $n$ where $X$ is the number of...".  What are your thoughts ?


I have a naive question about regression. How does R function predict.lm compute the 95% confidence interval of the fitted line? In particular why is this not a straight line?   x <- rnorm(10,0,10)  y <- 20*x + rnorm(10,0,2)  fit <- lm(y ~ x)  newx <- sort(x)  prd <- predict(fit,newdata=data.frame(x=newx),interval = c("confidence"),level = 0.95,type="response")   # plot  plot(x,y)  abline(fit)  lines(newx,prd[,2],col="red",lty=2)  lines(newx,prd[,3],col="red",lty=2)    Can somebody help me understand how the upper and lower bounds of 95% CI of the fitted line are computed by predict?

I have noticed that the confidence interval for predicted values in an linear regression tends to be narrow around the mean of the predictor and fat around the minimum and maximum values of the predictor. This can be seen in plots of these 4 linear regressions:    I initially thought this was because most values of the predictors were concentrated around the mean of the predictor. However, I then noticed that the narrow middle of the confidence interval would occur even if many values of were concentrated around the extremes of the predictor, as in the bottom left linear regression, which lots of values of the predictor are concentrated around the minimum of the predictor.  is anyone able to explain why confidence intervals for the predicted values in an linear regression tend to be narrow in the middle and fat at the extremes?


I am trying to set on change listener to some of the elements which are dynamically added but it's not working.  This is my html file:  <!DOCTYPE html>               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title>Cool Maths</title>         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">                                                                          <link rel="stylesheet" href="css/createLevel.css" >

 Cool Maths

Create Module

All Modules

Create Level

             <form >                 <input type="text" id="level-name" placeholder="Level Name" class="form-control">             </form>
             <button onclick="newQuestion()" class="btn btn-primary" id="add-question-button" >Add Question</button>

             This is my javascript file:      var i = 0;   $(document).ready(function(){  });     function newQuestion(){          //I am trying to set on change listener to these elements  var newQuestionHtml = "
"+"Question no "+i+"
"+        "<textarea class='form-control' type='text' id='question"+i+"' placeholder='Question'></textarea>
"+        "<textarea class='form-control' type='text' id='hint"+i+"' placeholder='Hint'></textarea>
"+        "<input class='form-control' type='text' id='answer"+i+"' placeholder='answer'>
"+        "<button class='btn btn-danger' onclick=''>Add Step</button>
";         $("#all-questions-container").append(newQuestionHtml);       var question = new Question(i,"","","","");      var controller = new Controller(question);       //this line sets on change listener for the textarea with id question0 which was dynamically added      $("#answer0").on('change',function(){        alert("changed");      });   i++;  }   The elements are being added but when the value of the textarea is changed alert is not being displayed. Can anyone please tell me where I am going wrong?? Thank-you

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


This is the bit of code that does all of the drawing, but it's only drawing half of the arrow. When it's a vertical arrow (North or South), it cuts off the left side, and when it's horizontal (East or West) it cuts of the top, both centered right at the tip; becoming a perfect half an arrow.  public void paint(Graphics g) {         setSize(100, steps * 50);         for (int i = 1; i < steps + 1; i++) {             y = i * 20;              if (directions.peek() == "North") {                 int[] xNPoints = {x, x + 6, x + 2, x + 2, x + 2, x + 2, x + 6};                 int[] yNPoints = {y - 5,  y, y, y, y + 10, y, y};                 g.drawPolygon(xNPoints, yNPoints, 7);             }             else if (directions.peek() == "East") {                 int[] xEPoints = {x + 10, x + 5, x + 5, x - 5, x - 5, x + 5, x + 5};                 int[] yEPoints = {y, y + 6, y + 2, y + 2, y + 2, y + 2, y + 6};                 g.drawPolygon(xEPoints, yEPoints, 7);             }             else if (directions.peek() == "South") {                 int[] xSPoints = {x, x + 6, x + 2, x + 2, x + 2, x + 2, x + 6};                 int[] ySPoints = {y + 5, y, y, y - 10, y - 10, y, y};                 g.drawPolygon(xSPoints, ySPoints, 7);             }             else if (directions.peek() == "West") {                 int[] xWPoints = {x - 5, x, x, x + 10, x + 10, x, x};                 int[] yWPoints = {y, y + 6, y + 2, y + 2, y + 2, y + 2, y + 6};                 g.drawPolygon(xWPoints, yWPoints, 7);             }             g.drawString((String)directions.pop(), 5, y + 5);   The goal of the program is to return a set of user provided directions in reverse order, and I have a lot to clean up (add exceptions, clean up the GUI), but all of the code aside from what I just provided is used for prompting and storing the user's input for how many steps there are and what they are.

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


I have a marshmallow device, it has custom ROM, and is obviously rooted.  I am looking for a way to access the app data, cache of other apps. As I am rooted, I guess this is possible.  I tried searching and found that Titanium Backup can access databases and cache files.  I am only able to save databases but not all the cache files.  So, is there any app to get all the cache files saved?

On Android's root (/), what is the purpose of each folder? I want to learn the folder hierarchy structure. I would like to know the differences between Android 2.3 and 4.x, if they have different folders in "/".


RAW, is there anything that explicitly states what happens to a creature (either PC or monster) when a weight that exceeds their carry capacity is suddenly dropped on them?  EDIT: The intent is to find out the mechanics, if any exist, of what would happen if a Goliath Barbearian PC unceremoniously dropped, say, a 1000 lb. iron ball on a wolf. How would damage and other things be handled? If existing mechanics can't fully describe this situation, how would you handle it at your table?

Fall damage is 1d6 per 10 feet. What adjustments if any should I make for objects falling on a player character? (e.g. a bear)  Assuming the objects are meaningful threats but not instant character death, should the weight of an object change the calculation, e.g. more then 1d6 per 10 feet.  Or is this more in the spirit of improvising damage chart? i.e. the setback (cat to face) dangerous (orc fell on me), and deadly (the large bear).  If this is house-rule territory does any one have any experience or advice beyond  relevant to 5e.


I try to make a backup script, but when i create a zip with the script, and use cd myzip it sais that it dosnt exitst even when i can see it on the server with FileZilla.  This is my script:  TIME=BACKUPMC-`date +%d-%m-%Y-%H:%M`.zip DEST="/home/daixhosting/d1" zip -r $TIME /home/daixhosting/d1   Does someone know what the cause can be?

Just downloaded a .zip file from the internet. I want to use the terminal to unzip the file. What is the correct way to do this?


I decided to write my own Vector class for my library but when I try to compile it using g++ -Wall -std=c++11 -O a.cpp -c -o a.o and read the symbols from the output file using nm a.o I don't see any member functions that I wrote for that class and when I try to link it with a program that uses them I get undefined reference to errors. Here is the a.h file:  template<typename T> class Vector {     private:         int vsize;         const int maxsize=2147483647;         T* array;     public:         Vector();         ~Vector();         bool push_back(T t);         bool pop_back(T* t);         bool replace(int element, T t);         bool resize(int newsize);         bool getP(int element, T* t);         bool clear();         T* getArray();         int size();         T operator[](int n); };   And the a.cpp file:  #include <stdlib.h> #include "a.h"  template<typename T> Vector<T>::Vector() {     vsize=0;     array=(T*)malloc(sizeof(T)*vsize); } template<typename T> Vector<T>::~Vector() {     free(array); } template<typename T> bool Vector<T>::push_back(T t) {     if(resize(vsize+1))         return 1;     array[vsize-1] = t;     return 0; } template<typename T> bool Vector<T>::pop_back(T* t) {     *t = array[vsize-1];     return resize(vsize-1); } /*     Other member function definitons... */   I'm using g++ 5.4.0 and nm 2.26.1

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have an javascript array of string that looks like:  A = ['a', 'b', 'c'];   I want to convert it to (all string):  strA = '"a","b","c"'   How do I achieve this?

I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and build the string myself by concatenation if that's the only way.)


The issue of variable declaration in switch-case statements is well discussed in , and the answers covered most of the aspects. But I faced a problem for that I couldn't find a solid reason. Can someone please explain what is wrong with this code?  switch (var) { case 0:     int test;     test = 0;   // no error     int test2 = 0;  // ERROR: initialization of 'test2' is skipped by 'case' label     std::string str;     str = "test";   // ERROR: initialization of 'str' is skipped by 'case' label     break; case 1:;     break; }   I know why the 6th line results in error. But what is wrong with the next two lines? I think this may have something to do with the difference between native types and class types, but I am not sure.  This is not a duplicate question of ! As I have provided a link to the original one. Please read the two questions and note the difference. AFAIK, issue is not discussed in the original question.

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


I recently installed 14.04 on my Dell gaming laptop. This  gives my laptop specs.  As the title suggests, the Wireless connection isn't working (isn't visible for access). I scoured the net for possible solutions. I found 3 relevant links on askUbuntu -     suggests that 14.04 is too old for my laptop configuration and hence I should be installing 16.04. However, I need 14.04 itself, since I need it mainly to work on  which is compatible only with 14.04.  suggests that I should be installing a 4.8.14 kernel to solve this issue. But one of the links in the answer is broken. I'm not sure whether I should go ahead with the procedure given.  again suggests that I should be updating my kernel. Again, I'm not sure whether that's the procedure I should be following since that is not the exact network controller I have.   Here are some relevant outputs from my system -   srinidhi@srinidhi-Inspiron-7577:~$ lspci -knn | grep Net -A2   3c:00.0 Network controller [0280]: Intel Corporation Device [8086:24fd] (rev 78)     Subsystem: Intel Corporation Device [8086:0050]   Here is the Network controller output of lspci -v  3c:00.0 Network controller: Intel Corporation Device 24fd (rev 78) Subsystem: Intel Corporation Device 0050    Flags: fast devsel, IRQ 255    Memory at dd100000 (64-bit, non-prefetchable) [disabled] [size=8K]   Capabilities: access denied   Here is my lsusb output  srinidhi@srinidhi-Inspiron-7577:~$ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub    Bus 003 Device 003: ID 04e8:6863 Samsung Electronics Co., Ltd GT-I9500 [Galaxy S4] / GT-I9250 [Galaxy Nexus] (network tethering)    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub    Bus 001 Device 004: ID 27c6:5301      Bus 001 Device 003: ID 8087:0a2b Intel Corp.     Bus 001 Device 005: ID 0c45:6718 Microdia     Bus 001 Device 002: ID 04ca:00a5 Lite-On Technology Corp.     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     I would greatly appreciate anyone to help me out with fixing this as I am not sure how to solve this issue. I've worked with ubuntu before in my undergrad mainly for ROS and I desperately need it working for grad school now. Thanks.

I've been trying to follow around to fix my wifi problems, however I don't know how to find out my actual wifi device name. The problem is that on Ubuntu (14.04) there seems to be no indication that the computer is aware it has a wifi adapter (it definitely has one) and it can't connect to or see wireless networks.  I guess it could be a device driver problem, but I can't find out the name of my adapter, other than that it is either one of the two:  Intel Corporation Device 24fd (rev 78) Subsystem: Intel Corporation Device 1010   Which don't seem to match with what I need to figure out which driver to install.   Here is the output Network Controller part of the output of lspci -v  01:00.0 Network controller: Intel Corporation Device 24fd (rev 78)     Subsystem: Intel Corporation Device 1010     Flags: bus master, fast devsel, latency 0, IRQ 11     Memory at dc100000 (64-bit, non-prefetchable) [size=8K]     Capabilities: <access denied>   And here is the lsusb output  lsusb Bus 004 Device 003: ID 0bda:8153 Realtek Semiconductor Corp.  Bus 004 Device 002: ID 05e3:0617 Genesys Logic, Inc.  Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 003: ID 0835:2a01 Action Star Enterprise Co., Ltd  Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 8087:0a2b Intel Corp.  Bus 001 Device 002: ID 064e:3401 Suyin Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   UPDATE - When trying to install the new kernel:   linux-headers-4.8.14-040814-generic depends on linux-headers-4.8.14-040814; however:   Package linux-headers-4.8.14-040814 is not installed.  dpkg: error processing package linux-headers-4.8.14-040814-generic (--install):  dependency problems - leaving unconfigured


I have implemented a Meyer's singleton pattern. And I try to do some stuff testing it in a multithreading environment. Here is how I implemented the class in C++.  #include<thread> #include<mutex> class singleton { public:   static singleton& instance() {     std::lock_guard<std::mutex> lck(mtx);     static singleton *my = new singleton;     return *my;   } private:   static std::mutex mtx;   singleton() {}   ~singleton() {}   singleton(const singleton &) {}   singleton& operator=(const singleton &) {} };   But when I compile this with g++ -std=c++11 singleton.cpp -o singleton -lpthread, it says   /tmp/ccfEBnmN.o: In function `singleton::instance()': singleton.cpp(.text._ZN11singleton12instanceEv[_ZN11singelton12instanceEv]+0x10): undefined reference to `singleton::mtx' collect2: error: ld returned 1 exit status   I understand this might be some problem in design, since without initializing the first singleton instance how could we get the mtx. If in this case, my question comes to how to implement a thread safe singleton class based on my code? How do we initialized the mtx in my singleton class?  I know there is a traditional way to create a singleton pattern by maintaining a static pointer points to the singleton class. But indeed that is not "so" thread safe. Even applying the double check mechanism in the instance() method.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I have communicated my article to one elsevier journal. After being with editor for more than one month, the current status is "submitted to journal". I am confused regarding this status? What does it signify, kindly answer me?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I have tried to use induction, but after I assume that P(n) is true, I can't go further to prove that P(n+1) is true as well. I also have tried to find an intermediate inequality, but I can't figure out which inequality I should start from. Something that seemed to be useful was taking P(n) and multiplying it by $(1+\frac{1}{(n+1)^3})$, therefore I have come to this $(1+ \frac{1}{1^3})(1+\frac{1}{2^3})...(1+\frac{1}{n^3})<3 | \times(1+\frac{1}{(n+1)^3})$ $(1+ \frac{1}{1^3})(1+\frac{1}{2^3})...(1+\frac{1}{n^3})(1+\frac{1}{(n+1)^3})<3(1+\frac{1}{(n+1)^3})$ but, as anyone could imagine, I came to contradiction because I've tried to prove that $3(1+\frac{1}{(n+1)^3})<3$ which is false. Any help it would be useful.

Prove that $\left(1+\dfrac{1}{1^3}\right)\left(1+\dfrac{1}{2^3}\right)\cdots\left(1+\dfrac{1}{n^3}\right)<3$   for all positive integers $n$   This problem is copied from Math Olympiad Treasures by Titu Andreescu and Bogdan Enescu.They start by stating that induction wouldn't directly work here since the right hand side stays constant while the left increases.They get rid of this problem by strengthening the hypothesis.$$\left(1+\dfrac{1}{1^3}\right)\left(1+\dfrac{1}{2^3}\right)\cdots\left(1+\dfrac{1}{n^3}\right)\le3-\dfrac{1}{n}$$ and then proceed by induction.  The problem is that I can't find a motivation for the above change.I mean,we could have subtracted a lot of things from the RHS but what should nudge us to try $\dfrac{1}{n}$?The rest of the proof is quite standard,but I can't see how I am supposed to have thought of it.Is it just experience?Or is it a standard technique?A little guidance and motivation will be appreciated.


First of all, I got this picture from one of Downgraf's designs  on Pinterest, and I am very interested in creating a design similar to this. I want to know what it's called and how it's made with less difficulty. Thank your in advance.

So I've got a file with loads of simple objects. This will later be used to cut out these shapes out of plastic. So, using the material optimally is of outmost importance. I was wondering if there is any script or plugin that could automaticly arrange the objects within the artboard so they could fit best.


Consider the cauchy problem of finding u=u(x,t) such that $u_{t}+uu_{x}=0$ for $x  \in \mathbb R$ , $t \gt 0$ with  $ u(x,0)= u_0(x)$ for $x  \in \mathbb R$  then, which choices of the following functions for $u_0$ yields a  $C^1$ (here, $C^1$ is the space of continuously differentiable functions) solution $u(x,t) $ for  $x  \in \mathbb R$ , $t \gt 0$  (a) $\frac{1}{1+x^2}$  (b) $ x $  (c) $1+ x^2$  (d) $1+2x$  I have no idea on how to proceed in this problem.

Consider the Cauchy problem of finding $u=u(x,t)$ such that $$\frac{\partial{u}}{\partial{t}}+u\frac{\partial{u}}{\partial{x}}=0\text{ for }x\in\mathbb{R},t>0\\u(x,0)=u_0(x),\;x\;\epsilon\;\mathbb{R}$$  which choice(s) of the following functions for $u_0$ yield a $C^1$ solution $u(x,\ t)$ for all $x\in\mathbb{R}$ and $t>0.$   $u_0(x)=\frac{1}{1+x^2}$ $u_0(x)=x$ $u_0(x)=1+x^2$ $u_0(x)=1+2x$   Because characteristic of the given PDE is $U=U_0(x-ut)$ from option 2, 4 only the satisfies the given PDE is i am right


I just want to know why we take only long type serialVersionUID variable in java  `public static final long serialVersionUID = 1L;`   I mean i know how it works + what is serialization etc.  But i am just curious to know that why we only take long primitive type ? why not int or any other type?  like this    public static final int serialVersionUID = 1;   Is java specification tell us to do that?

Eclipse issues warnings when a serialVersionUID is missing.       The serializable class Foo does not declare a static final   serialVersionUID field of type long   What is serialVersionUID and why is it important?  Please show an example where missing serialVersionUID will cause a problem.