This is what i am trying to acchomplish, i have created an iframe, within my iframe i have input a src to a PHP file.  when the php file opens up within the iframe it has a choose file input dialog. I have created a button seperate from the iframe in which i would like to use to open up input dialog.  here is example below:     here is the php file(Form portion) that i open  <form action="NewResizeUpload.php" method="post" enctype="multipart/form-data">  <input type="file" input id="input" name="image" onchange="handleFiles()" /> <button>Upload</button>     The question is how do i call for the open choose file dialog this is what i am currently using but does not work when i load php file into iframe  function ChooseFile(){ document.getElementById('input').click();

I'd like to make a click event fire on an <input type="file"> tag programmatically.  Just calling click() doesn't seem to do anything or at least it doesn't pop up a file selection dialog.  I've been experimenting with capturing events using listeners and redirecting the event, but I haven't been able to get that to actually perform the event like someone clicked on it.


The question itself is pretty self explaining. I found some answers on the internet but all of them refer to the experience where an electrons mass was measured by observing its curvature in a known magnetic field. I always heard that an electron and other fermions behave like light and is neither a wave, neither a particle but still can behave like one of the two states. So how did they measure its mass?

I've done a little bit of research and it seems Millikan was able to measure the ratio between the charge of the electron and its mass. But how can one measure one of the two constants to get the value of  the other?


I know I've had a fair few of these questions recently, but I just can't remember their titles!  So, this one kind of reminded me of 2001: A Space Odyssey. It has aliens that left a special artifact on the moon which broadcasts signals into space. Then, something happens that causes those signals to stop and people go to investigate, I think. It was also once mentioned that the aliens used special human technology to put the artifact there. Final detail: I'm pretty sure the object was in the shape of a pyramid or a triangular prism. 60% sure that this is Asimov, Bradbury, or one of the other Sci-Fi giants.

MY father and I were talking about sci-fi stories we've read over the years. He asked if I had ever read      "that one about those astronauts on the moon, or maybe Mars?. I don't remember much, except these astronaut guys discover this piece of   alien technology laying there on the ground, conspicuously unmarred   and free of the all-pervading Martian (or perhaps lunar) dust,   emitting a ringing or buzzing sound that could be heard through their   suits and the vaccum of space or whatever."   I suppose there was some back and forth dialogue between these cosmic pioneers and maybe even a dash of Mission Control piping in with their two cents from back on Terra Firma for flavor. However the details played out, human nature being what it is, these astronauts eventually reached down, said 'screw it,' and found the balls to pick it up.   The sound (signal?) stopped immediately. The artifact--I think he said it was box shaped and metallic--was some type of "Those crazy-ass hairless apes finally managed to crawl off their rock" detection system. So long as the insane little chimps were swinging from limb to limb, clubbing each other over the heads down on Mother Earth, the signal kept pulsing steadily out into space towards whatever planet these mysterious extraterrestrials called home sweet home.


I have a long list that I number with enumerate.  Some of the items in the list should have a bullet before the numbering. The only way I succeed in doing this is by forcing the numbering of that item as follows:  \documentclass[11pt]{amsart} \begin{document}  \begin{enumerate} \item item no.1 \item item no.2 \item[$\bullet$(3)] No.3 \item item no.4 \end{enumerate}  \end{document}     But of course I would like the item no.4 to be numbered (4) and not (3) again.  How do I do this?

In an enumerate environment, I want a few (not all) of the items to have asterisks which appear before the number (I don't feel strongly about whether the number or the asterisk is horizontally aligned with the other numbers).  Is there a less crufty way to do this than, say, using multiple lists (or — horrors — numbering manually)?  I'm already using enumitem for an unrelated purpose, if that helps, although I didn't find a solution after a quick skim of its manual.


Why can't I use this proof to prove that the countable union of countable sets is countable without the axiom of countable choice?   Take the set of integers; some proper subset of it, call it $A$, can be mapped, with $f$, a 1-1 and onto function, to the set of even integers.   Some proper subset of the set of even integers, call it $B$, can be mapped, with $g$, a 1-1 and onto function, to the integers. Take the subset of $A$, call it $C$, which is mapped, with the use of $f$, to $B$ which is mapped, with the use of $g$, to the set of integers. Then find the subset of $A$ which is mapped, in a similar fashion, to $C$. Continue doing this forever.   Each one of these sets is countable, given that that they map to $A$ in a 1-1 and onto fashion.   We can find a countable amount of them (just keep doing the same thing). They are all subsets of $A$ and so their union is a subset of $A$.   One can therefore easily show, using the Cantor Bernstein Theorem, that they have the same carnality as $A$. We can easily show that every union of countable sets can easily be placed in a 1-1 and onto fashion with this specific union of countable set.  I assume that I never used the Axiom of Countable Choice in this proof, so what is the problem?

Two theorems:  $(1)$   $(2)$   Linked are the formal proofs on Proofwiki.   I do not understand why they had to use the Axiom of Countable Choice (ACC) the first proof but settled with "from the definition of countable" in the second. I think that $(1)$ should depend on ACC iff $(2)$ depends on it.


I'm trying to understand QM and many stuff gets in conflict in my head. Black body radiation means a hot object produces light in certain frequencies. Meaning it's losing energy.  Yet they talk about Thermal Equilibrium, which means the temperature of the object is constant. But can it? if it's losing energy how can an object have constant temperature.  Even in space an hot object would lose energy by producing photons, right? No?

Everytime, I read about blackbody, I always get confused at the point where it is written     Under thermal equilibrium conditions , the blackbody radiation depends only on temperature. ..... . At equilibrium , electromagnetic waves bounce around with the walls of the cavity.   What is this equilibrium all about? Why is it important here?? If there is thermal equilibrium, why does the body radiate?? Please help.


Is there any way to save processing.run("native:algorithm") output directly to string instead of file or temporary layer?  I'm aware of saving output to layer and exporting features using QgsJsonExporter(), however it adds ID to every feature therefore it's not what I'm looking for.  Now I'm going for approach where extra ID is generated for every feature in geojson result is generated. However then I change OUTPUT to file.geojson there are no extra IDs.  vl = QgsVectorLayer(sys.argv[1],"mygeojson","ogr")  def runProcessingNativeBuffer(inputGeoJson, distance):     processing.algorithmHelp("native:buffer")     return processing.run("native:buffer",                          {'INPUT': inputGeoJson,                           'DISTANCE': distance, 'SEGMENTS': 5,                           'END_CAP_STYLE': 0, 'JOIN_STYLE': 0,                           'MITER_LIMIT': 2, 'DISSOLVE': False,                           'OUTPUT': "TEMPORARY_OUTPUT"})  ats = runProcessingNativeBuffer(vl, sys.argv[2])  vl1=ats['OUTPUT']  features = vl1.getFeatures() exporter = QgsJsonExporter() print("GEOJSON",exporter.exportFeatures(features))

I run processing.run("native:buffer") and from newly created vector I get all features and export them to string using QgsJsonExporter(). My problem is that newly created vector gives new IDs to all features and they aren't equal to attribute ID's values. And after exporting them to GeoJSON using QgsJsonExporter() I get GeoJSON features with identifiers. However I can solve this by declaring processing.run("native:buffer") algorithm OUTPUT to .geosjon file and opening it afterwards. Is there a way that I can get GeoJSON string without IDs without having to save OUTPUT to .geojson and reading it to string afterwards. vl = QgsVectorLayer(sys.argv[1],"mygeojson","ogr")  def runProcessingNativeBuffer(inputGeoJson, distance):     processing.algorithmHelp("native:buffer")     return processing.run("native:buffer",                          {'INPUT': inputGeoJson,                           'DISTANCE': distance, 'SEGMENTS': 5,                           'END_CAP_STYLE': 0, 'JOIN_STYLE': 0,                           'MITER_LIMIT': 2, 'DISSOLVE': False,                           'OUTPUT': "TEMPORARY_OUTPUT"})  ats = runProcessingNativeBuffer(vl, sys.argv[2])  vl1=ats['OUTPUT']  features = vl1.getFeatures() exporter = QgsJsonExporter() print("GEOJSON",exporter.exportFeatures(features))  IDs in properties are fine I don't need additional IDs in "features"


I ran the Mann-Whitney in SPSS.  In addition to the U, the output generated the Wilcoxon W and the Z score. Why would the W and Z be present in the output? I cannot explain them being present. Also, the U and W are very large and different. Why is that?   Edit: I understand now why the U and W are large. My sample is large. However, they are different!

I compared two unequal sized samples, N1 = 230 and N2 = 120 using a Mann-Whitney U test. The U is shown to be large such as 2829.   The p value is non-significant but I want to know if such large values of U is ok? Or is there something wrong there? I am using PAST software.


In my Crunchbang installation with X11, openbox, my wireless usb mouse is listed at both /dev/psaux and /dev/input/mouse0. It's working fine apart from the scroll wheel, which although active, is far too sensitive.  I'm thinking maybe the kernel is raising double the scroll events that it should be? Not sure what to check out even if this is the case?   I tried adjusting sensitivity via lxinput but it affected everything on the mouse apart from the actual scrollwheel.  xinput list  ⎡ Virtual core pointer                              id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                    id=4    [slave  pointer  (2)] ⎜   ↳ Microsoft Microsoft® Nano Transceiver v2.0    id=9    [slave  pointer  (2)] ⎜   ↳ Microsoft Microsoft® Nano Transceiver v2.0    id=10   [slave  pointer  (2)]   doing    xinput test 9 results in expected mouse motion events (but nothing for button clicks/scrollwheel)   xinput test 10 results in unknown class with no events fired.

I can't find a single desktop environment that supports setting both mouse acceleration AND mouse sensitivity. I don't want any mouse acceleration, but I want to increase the speed of my mouse. That means that if I move the mouse the same distance, the pointer will move the same distance every time, no matter how quickly I move the mouse.  KDE will let me set mouse acceleration to 1x, but the mouse moves too slow then, and I can't figure out how to increase the speed. I am willing to accept a CLI solution, but I have only been able to get xinput to change acceleration. I don't recall having much luck with xset, either.


I read a story on the internet about a theory which said, that some of us can become god ultimately.  People get born, die and get reincarnated. The crux of this story was, that whenever a human dies, he takes some of his knowledge/experience into his next life until he gathered enough to create/rule his own universe and become god.  Does anybody know the original story?

I remember reading a short story a few years ago and I would like to reread read it again. As far as I remember it went a little like this:  You are in a car with your family and a truck hits it, but you are the only one to die. When you regain conciousness you are [in some place that I can't remember] and you see a person (I'm going to call the person as Bob from here, but it's possible the gender wasn't specified) and ask him about your wife/family, Bob tells you that you are dead and your wife/family are/will grieve for you for a time, but your wife get over you and marry someone else. Bob then basically tells you that you are not actually a human but a being like him and their kind created the concept of the universe, time, ethics, morality etc for you because you are young and it will teach you the above. Since the universe is made just for you, everybody in the universe is you. When you die you are reborn as someone else on Earth, but the past memories are blocked but you do start to gain them back if you stay in the place you are in, but Bob wants to send you back to experience more because you are not finished just yet.  One of the last things Bob says to you is that you will be born this time as a farm girl in China in X year.   I have tried Googling this, but I was only able to get results like "God did not create the universe, gravity did, says Stephen Hawking", "IS THERE A GOD?" and "Quotes About Universe". Any help would be great.


I was reading about the Strategy design pattern in java. The problem is set as follows  You have a duck class and several types of ducks. You have to code in the flying and quacking behaviors of the ducks. You obviously cannot code in the flying, non-flying behaviors in each of the duck class methods especially if you have like a 100 different kind of ducks. So you create a behavior interface called FlyingBehavior and QuackingBehavior and have implementations like NonFlyingBehavior or FlyWithWingsBehavior or MuteQuackBehavior or SqueakQuackBehavior. Then set these in a field in the different classes of duck. That way you associate the behaviors with the ducks.   What I don't understand is why it has to be done with a composition and why not with inheritance. Why can't you create subclasses lke NonFlyingDuck, FlyWithWingsDuck or SqueakingDuck, MuteQuackingDuck and so on, and then implement the methods fly() or quack() and then assign appropriate behavior to the ducks. Is this because multiple inheritance is not supported. so if you have a non-flying, squeaking duck then you cannot extend both squeakingDuck and NonFlyingDuck or is it something else. Is there some way of doing this with inheritance?  I feel a bit confused. The motto is 'favor composition over inheritance'. Why though?  Can someone explain this in depth?

Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition?


I want to find the correlation between a continous variable with a non normal distribution, positively skewed, and a categorical variable with 4 categories. The only test I can find that fits these variable is the kruskal wallis test, but I am not sure how I can use this test to find the correlation or relationship between my two variables. Can anyone suggest how this relates to correlation or another test to use with my data? Rookie with statistics, so please let me know if any more information is required.

I am wanting to find the correlation between two variables: a categorical vegetation variable (with categories 1-4)  and a continuous variable of erosion (with values anywhere between 0.2 and 9). I think I would be required to use a non parametric test to find the correlation, but bit of a newby to stats so could anyone suggest the best test to use? I also wanted to know how sample size can affect these tests, ie with a sample size of 100 or 1000?


Problem. If $(x_i)$ is a net converging to a point $x$, show that $(x_i)$ converges to $x$ along any nonprincipal ultrafilter.   I will define these things below.    A directed set is a poset $(I,\leq)$ such that any two elements have an upper bound.  A net in a topological space $X$ is a function $I\rightarrow X$, where $I$ is a directed set. This is typically denoted $(x_i)_{i\in I}$ to indicate $i\mapsto x_i$. I will use $(x_i)$, omitting the index when convenient.  A (classical) limit of a net $(x_i)$ is a point $x\in X$ such that: for all neighborhoods $U$ of $x$, there exists an index $i_0\in I$ such that $x_i\in U$ for all $i\geq i_0$. Notation: $$\lim_{i\in I} x_i = x$$  Now let $p$ be an ultrafilter on $I$. An ultralimit of $(x_i)$ is a point $x\in X$ such that: for all neighborhoods $U$ of $x$, the set $\{i\in I : x_i\in U\}$ belongs to $p$. Notation: $$\lim_{i\rightarrow p} x_i = x$$ In a compact Hausdorff space, every net has a unique ultralimit along any ultrafilter, regardless of whether the classical limit exists. Now I claim that if the classical limit exists, then it is equal to the ultralimit along any (nonprincipal) ultrafilter.     Claim. If $(x_i)$ has a classical limit $x$, then $x$ is also an ultralimit of $(x_i)$ (along any nonprincipal ultrafilter).     Proof in the case of sequences  I can prove this when $(x_n)_{n\geq 1}$ is a sequence (i.e. $I=\mathbb{N}$). This simply because the "tail-end" $[i_0,\infty)$ is cofinite for all $i_0\in \mathbb{N}$, so it belongs to any nonprincipal ultrafilter. The argument generalizes to any directed set in which all tail-ends are cofinite.  Here are the details of the argument. Suppose $(x_n)$ converges classically to $x$; we must show that $(x_n)$ converges to $x$ along any nonprincipal ultrafilter $p$. For any neighborhood $U$ of $x$, there exists $n_0$ so that $x_n\in U$ for all $n\geq n_0$. Thus $\{n\geq 1 : x_n\in U\}$ contains the tail-end $[n_0,\infty)$. But since $[n_0,\infty)$ is cofinite, it belongs to $p$ since $p$ is nonprincipal. By upper-closure of ultrafilters, this implies $\{n\geq 1 : x_n\in U\}$ also belongs to $p$. QED.    I don't know how to generalize the above argument unless $(I,\leq)$ has the property that every tail-end is cofinite. This seems like a pivotal part of the argument though, so I suspect that my claim is not true in general. Any thoughts?

Suppose that $x_{i \in I}$ is a generalized sequence on a compact Hausdorff space $X$, indexed by the directed set $I$, and with the property that $\exists \, j \in I$ such that $\forall i \geqslant j$, then $x_i = k$, where $k \in X$. We then pick a non-principal ultrafilter $U$ on the index set $I$ (so $U \subset \mathcal{P}(I)$).  My claim is that we then have $\lim_{U} (x_i) = k$.  First we notice that $X$ being compact and Hausdorff, the ultralimit, $\lim_U (x_i)$, of this sequence always exists uniquely. Also, we can just assume that such an ultrafilter on $I$ exists ($I$ being an infinite index is actually sufficient and necessary for that).  I have been unable so far to prove that this claim is true and I am starting to think I am missing an assumption for it to be true.


If followed an example from  for a simple bar graph.  \begin{tikzpicture} \begin{axis}[     x tick label style={         /pgf/number format/1000 sep=},     ylabel=Year,     enlargelimits=0.05,     legend style={at={(0.5,-0.1)},     anchor=north,legend columns=-1},     ybar interval=0.7, ] \addplot      coordinates {(2012,408184) (2011,408348)          (2010,414870) (2009,412156) (2008,415 838)}; % 2008 coordinate given, but does not show \addplot      coordinates {(2012,388950) (2011,393007)          (2010,398449) (2009,395972) (2008,398866)}; % same here \legend{Men,Women} \end{axis} \end{tikzpicture}   This plots fairly nicely (as one can see on the website too). After copying and adjusting it to my needs, I realized that it swallows the last coordinate.  This seems curious to me. Is this intended? If not, how to fix this properly (i.e. not adding a dummy coordinate)?

I am trying to draw a bar chart in which each independent variable has multiple bars showing its performance in different areas. The problem I am having here is that the bars for the third variable is not showing up. The code I am using is shown below  \begin{center} \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, ylabel=Passenger Count, enlargelimits=0.05, legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1}, ybar interval=0.5, symbolic x coords={1st Class, 2nd Class, 3rd Class}, grid=major ] \addplot coordinates {(1st Class,6) (2nd Class,6) (3rd Class,324)}; \addplot coordinates {(1st Class,0) (2nd Class,98) (3rd Class,81)}; \addplot coordinates {(1st Class,41) (2nd Class,56) (3rd Class,45)}; \addplot coordinates {(1st Class,169) (2nd Class,24) (3rd Class,41)}; \legend{0-10,10-20,20-30,$>30$} \end{axis} \end{tikzpicture} \end{center}


I have two hard drives, one have Arch Linux and the other one Windows 10, I know I can't write from W10 to linux (although there are applications for that but is not recommended). But what about writing from Linux to W10? I mean I actually write from Linux to my NTFS external hard drive all the time, but I wanted to ask this just in case that there were some differences between an external hard drive (which is just for storing files) and a normal hard drive which have an OS installed (in this case windows 10).

I've got an external USB drive that is formatted with NTFS mounted on ~/tmp.  I can read it just fine, but cannot write to it, even as root (temp is a folder on the USB drive):  [root@Plugbox temp]# touch test touch: cannot touch `test': Permission denied [root@Plugbox temp]#   However, if I do a cat /proc/mounts, it looks like I do have NTFS read/write support:  [root@Plugbox temp]# grep /dev/sdb1 /proc/mounts /dev/sdb1 /root/tmp ntfs rw,relatime,uid=0,gid=100,umask=02,nls=utf8,errors=continue,mft_zone_multiplier=1 0 0 [root@Plugbox temp]#   Finally, if I go to the folder above temp, it looks like I should have plenty of permissions to write to the folder:  [root@Plugbox tmp]# ls -al total 61500764 ... drwxrwxr-x 1 root users           0 Apr 19  2010 temp ... [root@Plugbox tmp]#   What am I missing?


"sudo apt-get install nasm" produces the error message shown in the title, yet it is shown the devel section of xenial (16.04). Any ideas would be greatly appreciated.  (For what it's worth, "sudo apt-get install python-dev" works as you would expect it to.)

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


So, I have been trying to get this mod and I go to resource files and I have no mine craft.jar/mods/etc files so I can't get the mod and I am really frustrated.  By the way I use an I-mac desktop.

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


How can I correct the shading?  Can someone pls help me with this because I don't know what's going on!

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I have a text file containing below:  title1 A1 title3 A3 title4 A4 title5 A5    title1 B1 title2 B2 title5 B5    title1 C1 title2 C2 title4 C4 title5 C5    title1 D1 title2 D2 title3 D3    I would like to have an output like below:   title1      title2       title3        title4      title5     A1                        A3           A4          A5     B1           B2                                    B5     C1           C2                        C4          C5     D1           D2           D3                           Could you please let me know how can I write a piece of code using AWK?  Thanks in advance!

I have a file with the lines like below.  title1:A1 title2:A2 title3:A3 title4:A4 title5:A5  title1:B1 title2:B2 title3:B3 title4:B4 title5:B5  title1:C1 title2:C2 title3:C3 title4:C4 title5:C5  title1:D1 title2:D2 title3:D3 title4:D4 title5:D5  How can I achieve this?   title1    title2     title3    title4 A1         A2         A3         A4 B1         B2         B3         B4 C1         C2         C3         C4 D1         D2         D3         D4


I need your help.  How can I compare 2 dates and finding out what the date difference is, using the date format of dd/mm/yyyy? (uk date standard)  Ie.1  var date1 = "26/11/2013" var date2 = "29/11/2013"  if (date1 < date2) { difference is -3 }   Ie.2  var date1 = "26/11/2013" var date2 = "22/11/2013"  if (date1 > date2) { difference is +4 }   Ie.3  var date1 = "26/11/2013" var date2 = "26/11/2013"  if (date1 > date2) { difference is 0 }

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


Most domestic power in the developed world is supplied at 230V (±10V).  I presume it's a "sweet spot" for something, perhaps:   the highest voltage that won't jump certain insulators a balance of voltage vs lethal danger the highest voltage that won't fry various components   Why has that voltage been chosen just about everywhere?

Why did the industry choose these seemingly unintuitive values of 110V and 220V for the mains AC? Is there a physical reason why they aren't simply 100V and 200V?


I am supposed to travel by Air India International flight from New York to Delhi on 7th July (Departure time 12:05 pm)  but i have received a mail from them saying that now the flight has been rescheduled for 8th July (Departure time 03:45 am) and the delay is for than 15 hours. Kindly let me know what steps can i take to get refunfd from them regarding hotel and food as all my bookings were till 7th July only.

A flight I was flying on 24th December was delayed in 3 steps, initially 1 hour, then an additional 55 min followed by an additional 15 min.   The last delay occurred 5 minutes before the departure time post the 55 min delay.    Was I entitled to anything for this or not?  This was for flight AI 951 from Hyderabad to Dubai  (possibly irrelevant info follows)  When I received the notification for the 2nd delay, I asked if refreshments would be provided (to avoid buying the insanely priced airport food) and was told to wait near the gate where they will announce the refreshments. 1 hr 40 min into the delay they said they won't provide anything since the delay is less than 2 hours, and I couldn't really go and buy anything at this time since it would have been only 15 min before departure.   When the additional 15 min delay was announced, they said that there is not enough time to arrange for refreshments and hence will not be providing them.    The primary reason I ask is if I should or should not expect refreshments to appear in such situations in the future…  It wasn't pleasant being hungry for so long.


Is there any specific reason for using Newton mechanics instead of Hamiltonian or any other theory of mechanics.  I am asking just out of curiosity (I know nothing about Hamiltonian mechanics)

Basically, I just want to know the advantages of Lagrangian and Hamiltonian mechanics over Newtonian mechanics, that made it much more preferable and widely used!


Suppose I have a set of pre-requisites I need to install for any of a number of linux distributions.  In this case, I'd need to switch my install expression against the distribution.   I am aware of uname -v, and I am aware that I can inspect the output of this command with some friable string expression and logic. However what I really need is:  V=$(something-like-uname) echo $V  "Debian" # or "Gentoo" # or "Redhat" # or  "Arch" # etc.   What is this command? (Does it exist?)

I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the distribution the script is running (in order to trigger specific actions, for instance the creation of repositories). So far what I've got is this:  OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./')  if [ -z "$OS" ]; then     OS=$(awk '{print $1}' /etc/*-release | tr '[:upper:]' '[:lower:]') fi  if [ -z "$VERSION" ]; then     VERSION=$(awk '{print $3}' /etc/*-release) fi  echo $OS echo $ARCH echo $VERSION   This seems to work, returning ubuntu or centos (I haven't tried others) as the release name. However, I have a feeling that there must be an easier, more reliable way of finding this out -- is that true?  It doesn't work for RedHat. /etc/redhat-release contains : Redhat Linux Entreprise release 5.5  So, the version is not the third word, you'd better use :  OS_MAJOR_VERSION=`sed -rn 's/.*([0-9])\.[0-9].*/\1/p' /etc/redhat-release` OS_MINOR_VERSION=`sed -rn 's/.*[0-9].([0-9]).*/\1/p' /etc/redhat-release` echo "RedHat/CentOS $OS_MAJOR_VERSION.$OS_MINOR_VERSION"


I am new to LaTeX, and I am having trouble with the first page since the first page is being treated differently from the rest. First custom headers and footers wouldn't apply to the first page, but I eventually fixed that. Now I have the following spacing issue:   I would like to have the same space before "Problem 1" that "Problem 2" has. In my example, the first page isn't a special page such as a ToC or anything. Being that I have already had issues with the first page, is there any way to signal to the compiler that the first page should get absolutely no special treatment so I do not have to worry about this issue again for something else? (Or perhaps creating a blank first page and then removing it from the final pdf file if that is possible)  Here is the code for the document if it helps:  \begin{document}  \setcounter{page}{1} \stepcounter{Problem} \section*{Problem \theProblem} \*Removed*\  \newpage \setcounter{page}{1} \stepcounter{Problem} \section*{Problem \theProblem} ...   I attempted to fix the problem by adding \null before \section*{Problem 1}, but this gave too much space, and I feel it would be unnatural and harder to maintain if I set the top margin by exact pixel values to line it up correctly.  Below I attached my formatting for the header.  \title{USAMTS Round 1} \author{Nicholas Pipitone} \date{September 2015}  \newcounter{Problem} \newcounter{Pages}  \pagestyle{fancy} \fancyhf{} \fancyhead[CE,CO]{USA Mathematical Talent Search} \rhead{Year: 27\\Round: 1\\Problem: \theProblem} \lhead{Student: Nicholas Pipitone\\Username: npip99\\ID\#: 99999} \rfoot{Page \thepage\ of \thePages} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{1pt}

I am having trouble typesetting multi-line headers using fancyhdr The header on the first page behaves differently than the header on subsequent pages. The first page header has no depth, but produces a greater vertical displacement on subsequent pages.  Here is a sample tex file to illustrate the difficulty  \documentclass{article}  \usepackage{fancyhdr}  \chead{line 1\\line 2\\line 3\\line 4\\line 5\\line 6\\line 7\\line 8}  \cfoot{footer}  \fancypagestyle{plain}{}  \pagestyle{fancy}  \begin{document} \thispagestyle{fancy} page 1 \newpage page 2 \newpage page 3    \end{document}


Let $W$ be a standard, one-dimensional Brownian motion. Let $T\in(0,+\infty)$. Then $$\lim_{\beta\to+\infty}\sup_{0\le t\le T}\left|e^{-\beta t}\int_0^te^{\beta s}\mathrm{d}W_s\right|=0\quad\text{a.s.}$$ Could someone give some hints or proofs?

How to show that  $$ \lim _{\alpha \rightarrow \infty } \sup_{t \in \left [0,T \right]} \left | e^{-\alpha t} \int _ 0 ^t e^{\alpha s} ~ dB_s \right | =0, \ \ \text{a.e.} $$  where $\left (B_s \right)_{s\geq 0}$ is a real standard brownian motion starting from zero ?


When reviewing Reopen votes on Stack Overflow this morning I  that was generating some heat: vote to close a question as duplicate, even though it's much older than the other. One of the users commented there (and five more people agreed):     Why was this question marked as duplicate? Mods should check the asked date before mark it as duplicate!   I didn't know how to proceed, so did some search and from      If the new question is a better question or has better answers, then   vote to close the old one as a duplicate of the new one.   So I commented directly to that user     Basically, the age doesn't matter. What matters is the quality of QAs measured by upvotes.   I don't really know how it's really measured and feel bad if I might be misguiding. I presume what I said isn't correct when both questions are exactly the same when it comes to votes, favorites, comments, etc. and the only difference is age.  Considering questions can have many variations (one has more upvotes, one has more answers, one has more "marked as favorite", one has more "close votes", one is older, etc.), has anyone taken the time to isolate the possible differences, understand their impact and defined how are we supposed to define what makes a question better?

I have seen this many times, a question is being asked because a previous, duplicate question was asked and answered a few years ago and has no longer relevant answers.  The  is to edit the old question, or add new answers to it, but it is not always happening.  I was wondering, should I still mark it as duplicate and vote to close it? Or just leave it as is?


Query works fine if I change Hudson F to Automatic, if I change it to date it stops working. I need to view F as date and have the query work  =QUERY(Hudson2000!1:6634, "SELECT A, B, C, D, F, G WHERE F >= "&A2&" AND F <= "&B2)

I'm trying to create two cells that will update my query: A >= date"A1" and A <= date "B1".  My goal is to create a search page for the data, where the end user could insert a date or the =today() function and it would update the query. I am currently getting a formula parse error from:  =QUERY(Data!6:1397,"SELECT A,B,C,D,E,F,G,H,I,J,K,L WHERE A >= date"A1"and  A <= date"B1"")


I have stored in my database some string Unicode and Arabic in the correct form this is the screen of query select    when I have used on my code echo $data;  I have this result   can you help me show the same data, please  Thank you so much

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I cd to my home directory and typed  ls *bash*   expecting it will show a list of files contains "bash". However it is not.  While, typing   ls .bash*   works.  According to the documentation, * stands for any character, right? But it seems that it doesn't represent . in this case. What is wrong?

Situation :  $ mkdir foo && touch foo/.test $ cp foo/* . zsh: no matches found: foo/* (or bash : cp: cannot stat ‘foo/*’: No such file or directory)   I have a directory full of hidden folders and files. What is happening and what is the solution?


x=100 def fun2():     print x     x=10000     print x fun2()   The above program showing local variable x reference before assignment. Why it is not printing  100 10000

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


I have been given, by someone else, a line of code that I am having trouble understanding.  inputString = "[1,2,3,4,5,6,7,8,9,10,11,12]"  a = inputString[1:-1].split(',') z = zip(a[::2],a[1::2]) # this line print a print z   I understand the split function and how that is operating. I even understand the zip function. What I don't understand is what a[::2],a(1::2) is doing. I have tried modifying these bits of code and get varying results, but nothing that allows me to comprehend what modifying the code does. I am fairly new at Python, and could use a little help.  Typical, unmodified result from the code looks like this:  ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] [('1', '2'), ('3', '4'), ('5', '6'), ('7', '8'), ('9', '10'), ('11', '12')]   I am trying to get the result of 'a' to split into groups of 4 instead of groups of two, ie:  ('1','2','3','4'),('5','6','7','8')....etc.

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


When I ran sudo apt-get update, I got the following error at the end: W: Conflicting distribution: http://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/5.12.0.226 InRelease (expected stable-xenial/snapshots/5.12.0.226 but got xenial) N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://download.mono-project.com/repo/ubuntu stable-focal InRelease' doesn't support architecture 'i386'  How can I resolve this?

Getting below error message while issuing :  sudo apt-get update  Get:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease [95.8 kB] Ign:2 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease                                                                                Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                Hit:4 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease                                                                                Hit:5 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release                                                                             Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease                                                   Ign:7 http://dl.google.com/linux/talkplugin/deb stable InRelease                                                      Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                    Ign:9 http://linux.dropbox.com/ubuntu wily InRelease                                            Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease                               Get:12 http://dl.google.com/linux/chrome/deb stable Release [782 B]       Hit:13 http://dl.google.com/linux/talkplugin/deb stable Release                   Ign:14 https://apt.dockerproject.org/repo ubuntu-wily InRelease           Hit:15 https://apt.dockerproject.org/repo ubuntu-wily Release             Get:16 http://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]   Hit:17 http://linux.dropbox.com/ubuntu wily Release                                   Get:20 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,191 B] Fetched 98.0 kB in 0s (118 kB/s)                                  Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'   This cuts across various releases of ubuntu


My website is hosted on Hostgator and some of users use gmail mail service and some other use POP3 service, so I'm not sure if it's possible to make MX records to point to both these servers (gmail and POP3)? for example: making inf@example.com used by gmail while gm@example.com used by POP3

Right now I have a single mail server for IMAP. Let's say I want to introduce Exchange but not all users will be on it. Some users will be on my "legacy" IMAP, others on the "new" Exchange. Is it possible to "split up" your users (from the same e-mail domain) on two services like this? What would the MX records look like? My guess is that this isn't possible, but thought I'd ask.  By the way, I realize that Exchange can offer IMAP and all that, but my question is more about splitting users across services and the MX records. The actual protocols above are only examples.


My problem is well described in title. I know that it can be proved as follow:  Since every number in the sequence is of the form $4x+3$ and perfect square does not exist in such form so none  is a perfect square.  But I need to prove in a different way, a way different from modular arithmatic. Any ideas??

Please help me with solving this : prove that none of $\{11, 111, 1111 \ldots \}$ is the square of any $x\in\mathbb{Z}$ (that is, there is no $x\in\mathbb{Z}$ such that $x^2\in\{11, 111, 1111, \ldots\}$).


#include<stdio.h> int main(){  char*s[]={"we will teach you how to","Move a mountain","Level a building","Erase the past","Make a million"};     printf("%u",sizeof(s));  return 0; }   Running this will output 20. Shouldn't the size be = no.of elements in each array x no of arrays x sizeof(char)? Also sizeof(s+1) prints 4 bytes.  Furthermore, how can I obtain the number of pointer arrays and no. of elements in each pointer array from the above mentioned code without hard coding?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


Would be possible if tachyonic existed to send info to the past or see the future? since the tachyons according to special relativity could travel to the past?  i have searched in wikipedia and the most accurate info was this link    if so could we use the spin of tachyons to send bits of information to the past? :D

I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping?


Let $x,y>0$, it seems (with numerical simulations) that $x^x+y^y \geq x^y +y^x$.  If this is true, it has to be well known by some people.  Does this inequality have a name? several proofs?

Prove that $\forall x,y>0, x^x+y^y \geq x^y + y^x$   A friend of mine told me none of the teachers in my school have succeeded in proving this seemingly simple inequality (it was asked at an oral exam last year). I tried it myself, but I made no significant progress.


I'm on Mavericks 10.9.2, 24GB's RAM, and my usage constantly teters on 23.95 GB in use very frequently.   From what I can tell, the largest running process is 'kernel_task', and even then it's less than 2GB.   The only way to reduce this amount used is using the sudo purge command in terminal.  Is it ok to do this frequently to speed the system back up?

I thought Mavericks was suppose to utilize RAM memory better, thus run smoother.  Running ML on Mac mini 2012, with 16GB RAM...always running smoothly even with over a dozen apps running.  Now, after installing Mavericks, my Mac is SLOW, eating up RAM like crazy! Looking over usage, of the 16GB of installed memory...on average it uses 10-14 GB RAM when barely running a few apps!!!   There is this kernel_task that is always running with over 1GB of RAM and most apps are not taking that much RAM, so what is using up all my RAM?! File cache? It shows very high in that new description, with about 1/3 of my total RAM


Let $F$ be a field. Apparently we know that $\langle x,y \rangle \neq \langle g(x,y) \rangle$ for any $g \in F[x,y]$. Why is this the case?

The ideal $I= \langle x,y \rangle\subset k[x,y]$ is not a principal ideal.   I don't know how to consider it. Any suggestions?


You start at coordinate (0, 0) on a grid and want to reach position (3, 3). On this grid, you can only move right or up, not diagonally. How many paths are there?  This is a question I am trying to solve - would the answer to this be 20? I have done this graphically, writing out all the different ways this journey could be done and arrive at 20 - however, is there a simpler way to calculate this, with a formula?

Just wanted to share a nice problem.I have given my method below.More answers are welcome.  Consider a rectangular integral grid of size $m*n$.A person has to travel from one end say $(0,0)$ to the diagonally opposite end $(m,n)$.He moves one step at a time towards the east or towards the north(that is,never moves towards the west or south at any time).How many distinct paths exist from the point A to the point C ?


Is it worth buying a Canon 50mm f/1.8? What is the lens good at? I read a review that it is good at doing Bokeh. I tried using my Canon 18-200mm to do a Bokeh effect, but it wasn't that good.

I've seen quite a few people recommend the 50mm prime lenses, in particular the sub-$100 50mm/f1.8, as a starting lens for photographers (especially because they're likely to be using cameras with cropped sensors). From my experiences with the 18-55 mm kit lens (on a Canon EOS 550D), it seems that 50mm is not really very suited for indoor flashless group photographs where the wide aperture would be helpful. It is probably a good lens for portraits of one or two persons, and some low light photographs.  So, what are the advantages it offers over the kit zoom lenses (apart from the wider aperture), under what scenarios is it more useful, and why would you recommend it as a starting lens?


I want to show that if  $\,T$ is not compact then there exists an orthonormal sequence $x_{n}$ and  $R>0$ such that $ \forall n\in \mathbb{N}\,\,\,\,\|T(x_{n})\|\geq R$. It is obvious by the definition of compact operator that we can find a sequence satisfying the above condition but how can we find an orthonormal one? Thank you.

I want to prove that if a bounded operator $T$ is not compact then there exists an orthonormal sequence $e_n$ and $d>0$ such that $\|T(e_n)\|>d$ for all $n\in\Bbb{N}$. Could someone helps me?    I think that the fact that T is not compact implies that there exists an arbitrary sequence in H that doesn't contain convergent subsequence, not for a orthonormal sequence. Moreover, we know that if T is a compact operator and en an orthonormal sequence then ||T(en)|| converges strongly to 0 but not the inverse. We want to show this.


this is a quick question, idk if this has been asked already but is there a way to use the matcaps as materials on objects?  also why is the matcap applying on all objects instead of just the active one? (heard somewhere) any help would b nice :)

Is it possible to use Matcap materials as an actual material for a model so that I can render with it? There are certain parts that I want to apply specific Matcaps textures to but I want to actually use them to render and not just for sculpting purposes.  Is this at all do-able?


I have the same problem as already stated by Till A. Heilmann under:   After updating to Mavericks, LuaLaTeX does no longer work for me and when running   luaotfload-tool -v -vvv -u     I always get “Segmentation fault:” with and without editing  /usr/local/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-blacklist.cnf     So putting fonts on the blacklist has no affect. After moving the font which didn't work into a different directory and rerunning   luaotfload-tool -v -vvv -u     the error keeps occurring for a lot of other fonts (e.g. Krungthep.ttf, KufiStandardGK.ttf, Gungseouche.ttf, NISC18030.ttf and many more). It seems to be a never ending story... I would be very grateful for any suggestions how to handle this problem.  Update  Thanks for your reply. However the   luaotfload-tool -b   command doesn't exist on my system - even after updating to the newest revision of luaotfload-tool via  tlmgr install luaotfload   as described in . Furthermore   luaotfload-tool --update --force --verbose=2   also didn't succed and it does not show a line of output for each processed font. So you do not know because of which font it stopped generating the database. Nevertheless it now suddenly and somehow works, even with all the fonts which didn't work an hour ago, exept for Skia.ttf. The only difference is that I closed my shell emulator and that I ran    luaotfload-tool -fuvvv --log=stdout   as described in section 8.1 Troubleshooting (Database Generation) of the documentation of the luaotfload-package (). Sorry for asking such stupid questions.

Ever since I upgraded to OS X Mavericks—post hoc ergo propter hoc—I can no longer compile my dissertation using LuaLaTeX.  When running lualatex I first got the following error:  luaotfload | db: reload initiated; reason: “unresolved font name: ‘lucidacal   Segmentation fault: 11  'lucidacal' presumably refers to the Lucida Grande font, which I had installed in ~/Library/texmf. I removed ~/Library/texmf and ~/Library/texlive and now I get the following error:  luaotfload | db : Font names database not found, generating new one. luaotfload | db : This can take several minutes; please be patient.Segmentation fault: 11   I can reproduce this error by running luaotfload-tool --update. At some point I also got the following error:  luaotfload | db: Font names database not found, generating new one. Bus error: 10   I can't reproduce this, however.  I tried upgrading all packages using TeXLive but this didn't help.  I have no idea how to fix it and would be grateful for any clues!


My problem:     Find all possible values of a and b such that  $a+b=ab$, given that values of $a$ and $b$ are contained in the interval $[0,10^9]$

Find all solutions to $$xy=x+y$$ Initially the given condition was $x,y\in \Bbb{Z}$.    $$$$In this case, I just guessed that the solutions were $(0,0)$ and $(2,2)$. As far as I can see, these are the only 2 integral solutions possible. However, i'm quite surprised as usually a Diophantine Equation has infinite solutions. Could somebody please show me how to actually $solve$ this equation instead of just guessing the values? Is there any way to $show$ that there are just 2 sets of solutions?  $$$$Secondly, what if $x,y\in \Bbb{R}$? In that case how could the equation be solved? $$$$For both these conditions on the values of $x,y$, is there any way to use Coordinate Geometry to achieve an answer? $$$$ Many thanks in anticipation!  Edit: I forgot to mention that I know the solution using factoring. I was hoping to find a solution using Coordinate Geometry. I was told by a friend that the non integral solutions lie on 2 unique lines, and am hence particularly interested in a geometrical solution.


So I have a class Base and a class Derived: public Base.  baseInstance.doSomething() will print Base::doSomething().  derivedInstance.doSomething() will print Derived::doSomething().  Here is the code:  #include "Base.h" #include "Derived.h" #include <vector>  int main(){     Base base;     std::cout<<"Base should do something:\n";     base.doSomething();     Derived derived;     std::cout<<"\nDerived should do something:\n";     derived.doSomething();     std::vector<Base> vec;     vec.push_back(derived);     std::cout<<"\nDerived should do something:\n";     vec[0].doSomething();     return 0; }   Expected output:  Base should do something: Base::doSomething()  Derived should do something: Derived::doSomething()  Derived should do something: Derived::doSomething()   Actual output:  Base should do something: Base::doSomething()  Derived should do something: Derived::doSomething()  Derived should do something: Base::doSomething()   How do I preserve class type in a std::vector?  EDIT: But wouldn't the object slicing leave method implementation alone? And just remove excess fields? And is there a way to circumnavigate this?

Someone mentioned it in the IRC as the slicing problem.


I have a question I was hoping this group could help answer or provide more insight on.   I'm looking to construct an overall composite index for counties. Really a simplified version of the County Health Rankings    I have 49 county-level health outcome variables such as prevalences of smoking, various cancers, obesity, I have U.S. Census commute, fruit veggie intake, and I have SES poverty/education, and population density data.  I've completed descriptive stats, looked at correlations, conducted principal components analysis using PROC FACTOR in SAS, completed rotation, and have decided upon three PC Factors to include in my analysis that explain about 74% of the variance. Roughly, the factors can be thought of as cancer prevalences, all over disease prevalences(smoking, obesity,physical activity), and SES factors.    My question is as follows: how do I combine these all into one index? Or how do I make separate indices for each? I realize the factors are all uncorrelated but they are all pertinent factors into rating the healthscape of a county which is what I'm trying to index.   In past threads such as this   which references this publication  (pg. 19), the strategy was frowned upon in the comments by @amoeba and @ttnphns. Can anyone elaborate?

I am using Principal Component Analysis (PCA) to create an index required for my research. My question is how I should create a single index by using the retained principal components calculated through PCA.  For instance, I decided to retain 3 principal components after using PCA and I computed scores for these 3 principal components. What is the appropriate ways to create, for each respondent, a single index out of these 3 scores?   Is it relevant to add the 3 computed scores to have a composite value? Or to average the 3 scores to have such a value?  Or should I just keep the first principal component (the strongest) only and use its score as the index?   Alternatively, one could use Factor Analysis (FA) but the same question remains: how to create a single index based on several factor scores?


I have come across the following question:  Say $f(x): [0,\infty) \rightarrow \mathbb{R}$ differentiable. Given $\lim_{x\rightarrow\infty}f'(x) = 0$, does this imply an existence of a limit (finite or not) of $f$ at infinity?  From what I tried to do, looking at the definition of the derivative: $\lim_{\substack{h\rightarrow0 \\ x\rightarrow\infty}}\frac{f(x+h)-f(x)}{h} = 0$ you could say that $\lim_{\substack{h\rightarrow0 \\ x\rightarrow\infty}} f(x+h) = \lim_{x\rightarrow\infty} f(x)$. Is it enough to prove the existence of a limit? if not, is there another way to prove or disprove that?

I have a homework question, looks simple but I can't figure out a way to solve it. Any clue or help will be helpful.  Let $f: [0,\infty)\rightarrow\mathbb R$ be a differentiable function such that $\lim_{x\rightarrow\infty}f'(x)=0$.  Prove or disprove: $\lim_{x\rightarrow\infty}f(x)$ exists (infinite limit is also considered as a limit).  Thanks a lot!


Created a gemstone using boolean and difference. The material is GlassBSDF (Green Cubic Zirconia). I have tried all the lamps and emmiting planes in a number of configurations and cannot achieve a realistic gemstone.  I tried a sky background and my clear gemstone became a blue gemstone. The best results so far is with  a background that is Gradient and Radial. The gemstone has distinct facets. It should be symetrical about the X and Y axes but it is not because of the gradient.  I tried a RGB background but the facets were not distimct like I get using a Gradient background.  What do I need to do to achieve a gemstone with distinct facets on a White background?

What would be the material or shaders node set up for a smooth gem in blender cycles engine?  I want a result similar to this image:


Recently purchased a retrofit farm sink and went to hook the garbage disposal back up. After roughing everything back up because the farm sink sets much lower I am wondering about drainage and if this setup is acceptable. What do you think?

Apparently the garbage disposal drain must be above the drain stub, but I can't find a clear answer for how much height difference is actually required.  Let's use this drawing:    The question is how much higher does the disposal drain (#1) have to be relative to the drain stub (#5)?  I've seen answers ranging from "just above it", to 1 inch, to 4 inches, so what's the actual minimum I can get away with?  Also, how do you measure it?  Is the important measurement going from the bottom of #1 to the bottom of #5?  Or from the bottom of #1 to the top of #5?


I have the code below,and it shows me an exception which is: Exception in thread "Timer-0" java.lang.NullPointerException. The erros is in line : jLabel1.setIcon(black); If I delete this line,then it works well. Any idea? Thank you !  Icon black=createImageIcon("black.PNG");  protected static ImageIcon createImageIcon(String path) {     java.net.URL imgURL = Frame1.class.getResource(path);     if (imgURL != null) {         return new ImageIcon(imgURL);     } else {         System.err.println("Couldn't find file: " + path);         return null;     } }  public Frame1(int seconds) {     timer = new Timer();     timer.schedule(new RunMeTask(), 1000,1000);     }    public class RunMeTask extends TimerTask {     public int k=0;  public void run() {     System.out.println("Run Me ~");             jLabel1.setIcon(black);    //error             k++;             if (k==10) {               timer.cancel();             } } }  public static void main(String args[]) {     new Frame1(1);     System.out.format("Task scheduled.%n"); java.awt.EventQueue.invokeLater(new Runnable() {         public void run() {             new Frame1().setVisible(true);         }     }); }

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?


How can I prove $\lim_{n \to \infty} \frac{n^2}{2^n}=0$  I tried to use $\mid \frac{n^2}{2^n} - 0 \mid <\epsilon $ However, because of $n^2$ I cannot use it. Also, I tried to use ratio test and I got $\lim_{n->\infty}\frac{(n+1)^2}{2}\frac{1}{n^2}$, but after that one, I dont know how to get limit < 0  I have no idea to solve this problem.   I can also use a squeez lemma, but dont know how to apply to this question.

Prove that:  $$\lim_{n\rightarrow \infty}\dfrac {n^{2}}{2^{n}}=0$$  I think I need to show $2^n \geq n^3$ $\forall n \geq10$. Is it true?  What about: $$\lim_{n\rightarrow \infty}\dfrac {n^{2}}{n!}=0$$  What to do with $n!$?


So, I wonder what is the evaluation of $$\sum_{k = 0}^{n} {n\choose k} k^m\text{,}\qquad (*)$$ where $m,n\in \mathbb{N}$.  One of my tries: knowing that $$k^m = \sum_{j = 0}^{m}\text{S}(m,j)\cdot k(k-1)\cdots(k-j+1)\text{,}$$ where $\text{S}(m,k)$ are Stirling numbers of the second kind, and $$\sum_{k = 0}^n {n\choose k} k(k-1)\cdots(k-j+1) =2^{n-j}\cdot n(n-1)\cdots(n-j+1)\text{,}$$ I have rewritten the  upper sum into $$\sum_{k = 0}^{n}\sum_{j = 0}^m {n\choose k} \text{S}(m,j)\cdot k(k-1)\cdots(k-j+1)\text{.}$$ Changing the order of summation, we get $$\sum_{j = 0}^{m}\text{S}(m,j) \cdot 2^{n-j}\cdot n(n-1)\cdots (n-j+1)\text{,}$$ and here it stops.

Is there a closed-form expression for the sum $\sum_{k=0}^n\binom{n}kk^p$ given positive integers $n,\,p$? Earlier I thought of this series but failed to figure out a closed-form expression in $n,\,p$ (other than the trivial case $p=0$).  $$p=0\colon\,\sum_{k=0}^n\binom{n}kk^0=2^n$$  I know that $\sum_{k=0}^n\binom{n}k=2^n$ and $\sum_{k=0}^nk^n=\frac{k^{n+1}-1}{k-1}$ but I am unsure of whether these would be of much use now.    Additionally, what about the similar series $\sum_{k=0}^n\binom{n}kk^n$ where $p=n$?


How much XP do I need and what items do you get for each trainer level reached? If it's not random does anyone know what items you get at each level.

I know I can only use the gym feature after hitting level 5, but are there any other privilege or rewards for the levels above 5?  For example, in Ingress, some items are only available for the higher level player. How about Pokemon Go?


I cannot seem to find a formal definition for the following.  What's a "collection" in the context of set theory?

In school, I have always seen sets. I was watching a video the other day about functors, and they started talking about a set being a collection, but not vice-versa. I also heard people talking about classes. What is their relation? Some background would be nice.   It has to do with something called Russell's paradox, but I don't know what that is.   I think that the difference between a family and a set is that the former is a function and the latter is a set. Is this right?


I'm a software developer and as such I build and run programs hundreds of times per day. I've noticed that since I started using Catalina, after compiling and linking there is a delay (which can be seconds) when the internet is slow or having problems (I have bad internet often). If I disable wifi and rebuild, the delay goes away. How can I disable this so my builds run faster?

I'm running macOS Catalina 10.15.4 on a 2018 MacBook Pro 15", which has the T2 chip (if anything else is relevant, let me know and I'll update the question.)  I'm a developer and I'm in the process of writing and debugging a C command-line utility that's supposed to take a few miliseconds to run and exit.  My internet connection went down while I was coding (WiFi was still connected, but my ISP was down), and afterwards I noticed that, after compiling the app, the first time I ran it, it took a few seconds to run rather than the expected fraction of a second.  I turned off WiFi (so there was no active network connection), compiled my app again, and ran it -- this time it ran as quick as I would expect.  Turn on WiFi, compile and run again, first run of the app takes longer than expected.  Maybe I'm paranoid, but it sure sounds like macOS is trying to ask Apple's servers for blessing to run my app. Is this the case, or could there be another explanation? If it's indeed the case, can anyone link to an article explaining what's going on under the hood?  UPDATE: as requested, here are timings for an average of three runs of the following command, under different conditions:  touch file.c && make && time ./file && time ./file  The first measurement is the average time for running file for the first time after compilation (the third command in the chain). The second measurement is the average time for running file for the second time after compilation (the fourth command in the chain).  WiFi on, with internet: 347 ms/3 ms.  WiFi on, without internet: 5024 ms/3 ms.  All network connections offline: 24 ms/2 ms.


i have the following table:    RECID OBJECTIF   1001  1001   1001  1002   1001  1003   2001  2001   2001  2002     and i need a result like this:    RECID MyFIELD   1001  1001-1002-1003   2001  2001-2002     just if you can give me a hint on what to use, no need to write the code    please take into consideration that i have millions of records in my table  thanks

I've got two tables:  TableA ------ ID, Name  TableB ------ ID, SomeColumn, TableA_ID (FK for TableA)   The relationship is one row of TableA - many of TableB.  Now, I want to see a result like this:  ID     Name      SomeColumn  1.     ABC       X, Y, Z (these are three different rows) 2.     MNO       R, S   This won't work (multiple results in a subquery):  SELECT ID,        Name,         (SELECT SomeColumn FROM TableB WHERE F_ID=TableA.ID) FROM TableA   This is a trivial problem if I do the processing on the client side. But this will mean I will have to run X queries on every page, where X is the number of results of TableA.   Note that I can't simply do a GROUP BY or something similar, as it will return multiple results for rows of TableA.   I'm not sure if a UDF, utilizing COALESCE or something similar might work?


I'm trying to solve a problem from my group theory text book. It says:  Find a certain group $G$ with $H,K\unlhd G$, that verifies $H\cong K$ but $(G/H)\ncong(G/K)$.  I don't know what group to consider. At first I thought about the quaternion $Q_8$, but I didn't find a solution (in my book, this kind of exercises use to use the $Q_8$). Then I considered the diedric groups $D_n$ and the symmetric $Sn$ but also got nothing. What is a possible solution to this problem? Any help will be appreciated, thanks in advance.

Let $G$ be a group and $H_1$ and $H_2$ be two subgroups of $G$. Is it true that if $H_1$ is isomorphic to $H_2$ then $G/H_1$ is isomorphic to $G/H_2$? If that is not true then in what conditions that holds? Any help will be useful.. Thanks


I've been asked by my parent's to help them with their computer (windows 7) today, but I'm afraid I ran out of ideas. It could be a virus, but they had the latest Kaspersky AntyVirus installed on their computer, and I'm pretty sure they weren't browsing any suspicious russian webisites in their free time.  The PC boots without errors, but after that, basically everything stops working.   I cannot open any .exe file - not only Internet browser, AntiVirus and all the other "basic" programs, but also regedit or cmd, and even Task Manager.  Also, in the bottom right part of the screen when you can usually see most of the programs running in the background, like AntiVirus, wi-fi printer etc. there is only 1 icon, some weird blue logo with chinese signs as a description (according to google, it's the logo of Tencent).   All the other programs that should be opened after launching the pc aren't there, and what's more - the internet is also turned off, even though the router is right next to the desk.  I'm sure the system isn't completely frozen - I can see the mouse and browse through directories, but besides that, nothing works.   Is there anything I can do, besides reinstalling the entire OS?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I'm looking for a term to describe someone who loses sight of the big picture because he focuses on the wrong details, for instance:     a sales manager who fires his highest performing sales rep because the sales rep was a minute late to work but doesn't fire the poorly performing sales reps because they have always been on time.     I wouldn't call this person a perfectionist because the poorly performing sales reps are still on the payroll.   I'm basically looking for a term to label someone who doesn't know how to properly assign weights to relevant information when making a decision.

I'm looking for an idiom or saying that I could use when people are focusing too much on small details and not seeing the big picture.  A couple that come to mind are "being penny-wise and pound foolish" and "rearranging deck chairs on the Titanic". However, the former doesn't fit what I'm thinking of because the present activity might not be wise. The latter implies too much about impending doom.  For example, let's say some company is spending all their time refining a small detail in their product, while ignoring a major opportunity shift in the industry. What phrase could I use there?


One of my servers is under constant SYN DDoS attack. I have decided to setup fail2ban but as far as I can understand, that will only take care of the ssh login attacks. How can I stop these SYN DDoS attacks. I can't seem to find any particularly clear advice on stackoverflow or Google. A link would also suffice.   Thanks.

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


I have this JS code which perfectly exports excel. I have tried various ways so that it will take custom names for the files. Currently, its always taking download.xls as default file name. Any idea on how to set custom filename in this code? Thanks in advance.  function Export()     {         var tab_text = "

";         var textRange; var j = 0;         tab = document.getElementById('TicketTable'); // id of table          for (j = 0 ; j < tab.rows.length ; j++) {             tab_text = tab_text + tab.rows[j].innerHTML + "
";         }          tab_text = tab_text + "
";         tab_text = tab_text.replace(/]*>|<\/A>/g, "");//remove if u want links in your table         tab_text = tab_text.replace(/]*>/gi, ""); // remove if u want images in your table         tab_text = tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); // reomves input params          var ua = window.navigator.userAgent;         var msie = ua.indexOf("MSIE ");          if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))      // If Internet Explorer         {             txtArea1.document.open("txt/html", "replace");             txtArea1.document.write(tab_text);             txtArea1.document.close();             txtArea1.focus();             sa = txtArea1.document.execCommand("SaveAs", true, "SubmittedBilling.xls");         }         else              //other browser not tested on IE 11             sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));         return (sa);     }

If for example you follow the link:  data:application/octet-stream;base64,SGVsbG8=  The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself.  Is there any way of suggesting a default name in the markup?  If not, is there a JavaScript solution?


I'm wondering why RSA encryption usually is only used for messages that fit into one block. For larger messages hybrid encryption in combination with symmetric ciphers like AES seem to be the solution of choice e.g. c.f. .  I know about the advantages of hybrid encryption considering   better performance efficient handling of multiple and changig recipients   Are there any other reasons not to use only RSA?

I've been told that asymmetric cryptography requires that the message to be encrypted be smaller than its key length. Why is this?  I know about hybrid encryption, which . But I still want to know why public-key cryptography needs the data to be shorter than the key length.


I would like to know the difference between the following sentences bcz its very confusing to me.     1) A person may say:      Look at that bridge, it is so old that it would fall by next year.   Look at that bridge, it is so old that it will fall by next year.   Look at that bridge, it is so old that it may fall by next year.     I would like to know the sample context in which I can use them and why do we use would here as opposed to will if certain or may if not certain.     2) Who is at the door       That would be my friend John   That will be my friend John   That may be my friend John     The same confusion

A friend of mine always texts me asking me to call him. While it's simple and informal to just text "can you call me?" or something similar, he insists on being fancy and texts "may you please call me?" Is this use of the word may correct?


I'm sorry, but I am not familiar with the name of the tools. So, I'm just going to put in an image instead showing my problem. Than I will add to it. Now, the red X's is what I was calling 'Windows'. How do I remove the ones I no longer need? Because so far, the only way I have found is saving.. closing out.. than reopening again. And I know there has to be a better way.   Thank you for your time.

I can't find a way to close a view panel, in particular the horizontal at the bottom, is pretty useless to me at this moment.


I changed the boot mode from Legacy to UEFI and now my Windows 7 won't start, even after switching it back to Legacy. I switched to UEFI to see if I can boot from a SD card.   Instead it starts the Windows Boot Repair tool.

I have a laptop that has Windows 7 64 bit Enterprise edition. It is already filled with plenty of Software and drivers.  The laptop (Dell E6220) supports booting through UEFI, but the insatllition was on legacy BIOS.  When I try to change the booting from Legacy to UEFI I get an error message that no boot device was found (the Windows 7 doesn't recognize as bootable). Is there any way I can configure the current install to allow booting from UEFI or do I have to format and reinstall?


is there a data structure in c# that represent heap in c#  if not then what is the best data structure to use to find the minimum element in efficiently time and allow Repetition of elements  thank in advance

I am looking for a .NET implementation of a priority queue or heap data structure     Priority queues are data structures that provide more flexibility than simple sorting, because they allow new elements to enter a system at arbitrary intervals. It is much more cost-effective to insert a new job into a priority queue than to re-sort everything on each such arrival.      The basic priority queue supports three primary operations:         Insert(Q,x). Given an item x with key k, insert it into the priority queue Q.   Find-Minimum(Q). Return a pointer to the item   whose key value is smaller than any other key in the priority queue   Q.   Delete-Minimum(Q). Remove the item from the priority queue Q whose key is minimum      Unless I am looking in the wrong place, there isn't one in the framework. Is anyone aware of a good one, or should I roll my own?


To unlock the Untouchable AR challenge, I have to "perform 3 Critical shots in one drone tank battle". What is a critical shot and how do I make one?

To unlock the Knight Time Strike AR challenge, I have to "perform 2 Perfect shots in a row in a drone tank battle". To unlock the Untouchable AR challenge, I have to "perform 3 Critical shots in one drone tank battle".   I'm told perfect/critical shots are actually the same thing. If so, what is a perfect/critical shot, how do I make one, and how do I make two in a row? If they are different, what makes them different?


I recently started reading about Lagrangian Mechanics. I observed that it uses some basic expressions that are derived by taking Newton's laws of motion as fundamental such as kinetic energy, potential energy, momentum, etc. So how can Lagrangian even be fundamental if it uses expressions that are based on some other fundamentals? Also, can Lagrangian be used to solve any of the problems out there in mechanics easily?

I'll be generous and say it might be reasonable to assume that nature would tend to minimize, or maybe even maximize, the integral over time of $T-V$.  Okay, fine.  You write down the action functional, require that it be a minimum (or maximum), and arrive at the Euler-Lagrange equations.  Great.  But now you want these Euler-Lagrange equations to not just be derivable from the Principle of Least Action, but you want it to be equivalent to the Principle of Least Action.  After thinking about it for awhile, you realize that this implies that the Principle of Least Action isn't really the Principle of Least Action at all:  it's the "Principle of Stationary Action".  Maybe this is just me, but as generous as I may be, I will not grant you that it is "natural" to assume that nature tends to choose the path that is stationary point of the action functional.  Not to mention, it isn't even obvious that there is such a path, or if there is one, that it is unique.  But the problems don't stop there.  Even if you grant the "Principle of Stationary Action" as fundamentally and universally true, you realize that not all the equations of motions that you would like to have are derivable from this if you restrict yourself to a Lagrangian of the form $T-V$.  As far as I can tell, from here it's a matter of playing around until you get a Lagrangian that produces the equations of motion you want.  From my (perhaps naive point of view), there is nothing at all particularly natural (although I will admit, it is quite useful) about the formulation of classical mechanics this way.  Of course, this wouldn't be such a big deal if these classical ideas stayed with the classical physics, but these ideas are absolutely fundamental to how we think about things as modern as quantum field theory.  Could someone please convince me that there is something natural about the choice of the Lagrangian formulation of classical mechanics (I don't mean in comparison with the Hamiltonian formulation; I mean period), and in fact, that it is so natural that we would not even dare abandon these ideas?


I've been trying to wrap my head around this architectural design problem. Think of a game that has lots of spells and buffs (World of Warcraft, Diablo II etc), i.e. spells may cause buffs on characters. Each buff may affect one or several properties. For example a frost bolt normally slows down the target it hits, but if it does a critical hit, it will freeze the target for a moment. The frost bolt will also cause cold damage. A shadow bolt might cause some kind of "black" damage and cause confusion (i.e. invert controls, randomize spell target etc).  I tried to map out the architecture for this kind of spell-buff system, but I'm having trouble connecting the dots. First I thought of entity-component system where each character would have a list of components (health, mana, input...), and each buff would "affect" all these components. The components would then choose whether or not the buff affects it. For example, a "damage-over-time" buff should affect the health component, but not the mana component. The aforementioned shadow bolt would affect both health and input components. However, this feels a bit iffy to do if there's tens or hundreds of buffs and components.  Any ideas on how to approach such a design?

Overview:  Lots of games with RPG-like statistics allow for character "buffs", ranging from simple "Deal 25% extra damage" to more complicated things like "Deal 15 damage back to attackers when hit."  The specifics of each type of buff aren't really relevant.  I'm looking for a (presumably object-oriented) way to handle arbitrary buffs.  Details:  In my particular case, I have multiple characters in a turn-based battle environment, so I envisioned buffs being tied to events like "OnTurnStart", "OnReceiveDamage", etc.  Perhaps each buff is a subclass of a main Buff abstract class, where only the relevant events are overloaded.  Then each character could have a vector of buffs currently applied.  Does this solution make sense?  I can certainly see dozens of event types being necessary, it feels like making a new subclass for each buff is overkill, and it doesn't seem to allow for any buff "interactions".  That is, if I wanted to implement a cap on damage boosts so that even if you had 10 different buffs which all give 25% extra damage, you only do 100% extra instead of 250% extra.  And there's more complicated situations that ideally I could control.  I'm sure everyone can come up with examples of how more sophisticated buffs can potentially interact with each other in a way that as a game developer I may not want.  As a relatively inexperienced C++ programmer (I generally have used C in embedded systems), I feel like my solution is simplistic and probably doesn't take full advantage of the object-oriented language.  Thoughts?  Has anyone here designed a fairly robust buff system before?  Edit: Regarding Answer(s):  I selected an answer primarily based on good detail and a solid answer to the question I asked, but reading the responses gave me some more insight.  Perhaps unsurprisingly, the different systems or tweaked systems seem to apply better to certain situations.  What system works best for my game will depend on the types, variance, and number of buffs I intend to be able to apply.  For a game like Diablo 3 (mentioned below), where nearly any bit of equipment can change a buff's strength, the buffs are just character stats system seems like a good idea whenever possible.  For the turn-based situation I'm in, the event-based approach may be more suitable.  In any case, I'm still hoping someone comes along with a fancy "OO" magic bullet which will allow for me to apply a +2 move distance per turn buff, a deal 50% of damage taken back to the attacker buff, and a automatically teleport to a nearby tile when attacked from 3 or more tiles away buff in a single system without turning a +5 strength buff into its own subclass.  I think the closest thing is the answer I marked, but the floor is still open.  Thanks to everyone for the input.


According to wikipedia, spacetime is modeled via a pseudo-Riemannian 4-manifold, with one dimension representing time and the other three dimensions representing space.  I would like to know whether that manifold can possibly be viewed as a (surjective) function $F$ from a real interval $I$ onto a set $S$, where each point $t\in I$ represents time and each $F(t)\in S$ represents a collection of points in space (e.g. $F(t)$ represents all of space at time $t$).  Obviously this is not always possible for Riemannian 4-manifolds, e.g. the unit sphere in $\mathbb{R}^5$.  But I don't need it to always be possible.  On the other hand, I do need something that comports with physics; so I can't just take $\mathbb{R}^4$ itself, for instance.  Any help would be appreciated.

In a newtonian universe, one can talk of a "time slice", that is, the state of the universe at a given point in (global) time. In a "typical" classical universe, a time slice would contain enough information to fully compute the state of the universe at any other point in time, backwards or forwards.  So, disregarding what we know of quantum effects and talking purely of a general-relativistic universe, which concept is closest to a time slice?


This is a potential memory leak, correct? arr won't be deallocated if the constructor throws, right? I have read that the destructor won't be called in this case, but any sub objects of badType would be, however I think the array won't here because it's a raw pointer, correct?  class badType { private:     int* arr;     int myLen, myNum; public:     badType(int myLen, int aNum)     {         this->myLen = myLen;         arr = new int[myLen];          if (aNum < 100)              throw exception{ "Da number is too low" };          myNum = aNum;     }      ~badType()     {         delete[] arr;     } };

class someclass {};  class base {     int a;     int *pint;     someclass objsomeclass;     someclass* psomeclass; public:     base()     {         objsomeclass = someclass();         psomeclass = new someclass();         pint = new int();          throw "constructor failed";         a = 43;     } }  int main() {     base temp(); }   In the above code, the constructor throws. Which objects will be leaked, and how can the memory leaks be avoided?  int main() {     base *temp = new base(); }   How about in the above code? How can the memory leaks be avoided after the constructor throws?


I'm currently studying taking the second derivative of equations and I have been told the symbol used to represent second derivative is      $$\frac{d^2y}{dx^2}$$   I was just wondering, why this symbol is chosen? Why is it not $$\frac{dy^2}{dx^2}$$ or $$\frac{d^2y}{d^2x}$$

In Leibniz notation, the 2nd derivative is written as $$\dfrac{\mathrm d^2y}{\mathrm dx^2}\ ?$$  Why is the location of the $2$ in different places in the $\mathrm dy/\mathrm dx$ terms?


Grouping is often important in TeX/LaTeX programming. I know of three ways to delimit a group:   Via a \begingroup…\endgroup pair; Via a pair of matched braces {}; Via a \bgroup…\egroup.   Now I am wondering: what is the difference between these three? Does their effect depend on whether they appear in math mode or text mode? In which way, if so?  Note: I am sure that if I look through the TeXBook, TeX By Topic, and some other resources I will find an answer. However, I am sure there are many others who are curious about this and do not have the time to engage in such a search -- just like me. It would surely be useful to have the info all in one place -- e.g. as an answer here.

Is there ever a case when the use of \begingroup is preferred to \bgroup? Obviously, \bgroup is necessary in cases where you need to have balanced braces and thus cannot use {, but when is it necessary to use \begingroup?  A related question would be: What's the difference between a simple group and a semi-simple group?


I am working with a MATLAB optimization platform for black-box cost functions (BBCF).  To make the user free-handed, the utilized BBCF can be any executable file which inputs the input parameters of BBF and must output (return) the cost value of BBCF, so that the MATLAB BBCF optimizer finds the best (least cost) input parameter.  Considering that, from the one hand, my BBCF is implemented in C++, and from the other hand the cost value is a double (real number), I need to compile my code to an EXE file that outputs (returns) double.  But, to the best of my knowledge, when I compile a C++ code to EXE, it "mainly" compiles the main() function and its output is the output of main() function (i.e. 0 if running successful!).  An idea could be using a main function that returns double, and then, compiling such main() to EXE but, unfortunately, it is not possible in C++ (as explained in  or as claimed in the 3rd answer of  to be a bug of C++ neither of which are business of this question).  Can anyone provide an idea by which the EXE compiled form of a C++ code, outputs (returns) a double value?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


Preface  I create a media folder structure with Python consisting of hundred of thousands symbolic links. This folder structure allows me to navigate my media files like in a complex application, e.g. Kodi, but on file system level. In order to avoid many disk write operations I create the links on a RAM drive. The disk is mounted as follows:  # sudo mount -t tmpfs -o size=100M none /mnt/mem   The Issue  After creating many links the script outputs the following error:  [Errno 28] No space left on device: '...'@78596   If I check the actual disk usage, it returns the following:  $ df -h // ... none            100M    1,7M   99M    2% /mnt/mem   So according to my system, only 2 % are used!  The system is:  $ uname -a Linux myServer 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux   After some investigation my script is able to create up to 90,000 links.  The Weird  If I try to reproduce the error on my desktop, it works flawlessly. I'm able to produce over 1,000,000 links with no issues. I don't know the actual limitation.  The system is:  $ uname -a Linux myDesktop 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux   The Questions   What limits the number of symbolic links in linux? Can I bypass the limitation by upgrading the OS? Can I bypass the limitation by upgrading to a 64-bit architecture?   Some deep insights would be welcome!  Thanks.

It is well-known that empty text files have zero bytes:    However, each of them contains , which according to my research, is stored in , and do use space.   Given this, it seems logical to me that it is possible to fill a disk by purely creating empty text files. Is this correct? If so, how many empty text files would I need to fill in a disk of, say, 1GB?    To do some checks, I run df -i but this apparently shows the % of inodes being used(?) rather than how much they weigh.  Filesystem             Inodes  IUsed    IFree IUse% Mounted on udev                   947470    556   946914    1% /dev tmpfs                  952593    805   951788    1% /run /dev/sda2            28786688 667980 28118708    3% / tmpfs                  952593     25   952568    1% /dev/shm tmpfs                  952593      5   952588    1% /run/lock tmpfs                  952593     16   952577    1% /sys/fs/cgroup /dev/sda1                   0      0        0     - /boot/efi tmpfs                  952593     25   952568    1% /run/user/1000 /home/lucho/.Private 28786688 667980 28118708    3% /home/lucho


I am totally confused about for...in loop in javascript. I iterate an nodeList. but it giving me some extra element why  In HTML
     klsjdfljsdf

     klsjdfljsdf
   In JS  var mm = document.querySelectorAll(".mm"); for(var i in mm){     alert(i); }   see this link :

I've been told not to use for...in with arrays in JavaScript. Why not?


Though similar to  this is for a web application.  That is not SEO oriented and it is a Single Page Application  Should I use  <title>[app name] - [app page]</title>   Or   <title>[app page] - [app name]</title>   Personally I like to put the page first because I don't have to look too far into the title bar to see the title, it's much like most of the Windows apps from Microsoft where they put the title of the application at the end.  I don't care much about SEO for this question and the document.title would be dynamically set via JavaScript anyway.  For SEO if it mattered, I would put the   <title>[app name]</title>   Since it is a single page application.  Only problem I can think of is bookmarking.  When people bookmark and they just scan through the list, it is usually with the title of the application they look for.  However, I haven't seen any responses to  so that would be a slight concern.  I guess one can expect the user to change the title or move to a folder as they see fit.

Are there any best practices for choosing the title of web pages? There are a lot of resources online oriented toward SEO, but not toward users.  My impression is that most sites have something similar to Product - Page. But there are cases when switching this around is more useful. For example, if mail clients displayed the title like this:  Inbox (3) - Gmail  Instead of:  Gmail - Inbox (3)  You would be able to see the message count, even if the title was cut off. (I'm pretty sure Gmail used to do this).  I assume the title is mostly ignored by users except when:   using boorkmarks finding the right tab in the browser   What are the considerations for users when choosing a web page title? Are there different considerations for the home page, pages behind a login, etc?


I would like to start playing World of Warcraft (again, after very, very.. long time...). I heard that Cataclysm expansion greatly changes game mechanics, like deleting many stats (some of them I liked very much) or possibility to get them on items.   I don't like this 'simplification'. I very liked the old system, so I would like to play World of Warcraft: Wrath of the Lich King (+ Burning Crusade ofc.), without further expansions (Cataclysm, Pandoria or newest one). But can I do this? Are there servers for all expansions, so people don't need to buy anything more, or I would need to have at least Cataclysm or some other expansion?  I would like to play WoTLK very much, without all these very deep mechanics changes and stats deletions (it's really not the same gameplay :-[ ), and I almost bought it, but I just heard that some of the patches to new expansions can affect the old ones.  But, I suppose, something so important like game mechanics shouldn't be affected, right? ...Or they do, and I cannot play normal WoW : Wrath of the Lich King?

I know that I need all the previous expansions to play the latest one. So since I want to buy the game and with all of the expansions at once, can I play all the expansions contents on the latest expansion?  Including the original features of world of Warcraft. In other words, can I play everything that is in the original:   World of Warcraft Burning Crusade Wrath of the Lich King Cataclysm   In the mists of Pandaria?  Or do I have to reach the maximum level on the original, then play Burning Crusade to level up more and its content and once I'm finished there move on to next one, etc. I don't want to waste any money if I get the wrong thing.


I'm new to C++ languages and I'm writing a data structure which will be used to serialize/deserialize data saved on local machine. The code data structure looks like this: struct DerMeasurementData {     float DerAnalogMeasValue = 0.0;     int DerStatusMeasValue = 0;     int DerMeasQuality = 0;     time_t DerReadingTime = 0;     time_t DerLastUpdateTime = 0; };  // Ensure that comparison using memcmp will work correctly (currently there is 1 double value, 2 integer value, 2 time_t values in DerMeasurementData struct) static_assert(sizeof(DerMeasurementData) == (sizeof(float) + 2 * sizeof(int) + 2 * sizeof(time_t)), "sizeof(DerMeasurementData) should be equal to summary size of it's fields");  However, this code failed to compile because the static assert failed with this error: Error (active)  E1574   static assertion failed with "sizeof(DerMeasurementData)  should be equal to summary size of it's fields" dnom    D:\ETD_Repo\IDMS_Dev\dmsSource\portable\serialization\MappedSerializationNew.h  2571       But I don't quite understand why this is happening. I have one float, two integers, and two time_t in my data structure, so the size of this struct should be the same as "(sizeof(float) + 2 * sizeof(int) + 2 * sizeof(time_t)" Also, when I changed the static_assert to code below, it somehow worked: static_assert(sizeof(DerMeasurementData) == (sizeof(float) + 3 * sizeof(int) + 2 * sizeof(time_t))  Can someone please let me know why this is happening? Best

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


My 15-month old has 2 long sleeps during the day. From 10am to 12 or 1pm and the second sleep from 3.30pm to 6pm.  I have read around that at this age he should be sleeping around 2 hrs during the day, which means my little one is sleeping up to 3x more!  Is this bad? Should we wake him up? Anyone with similar experience?

Recently, I noticed that my 2-month-old baby sleeps almost all day, including naps (maybe 3-5 hours awake). Should I do anything about this? Should I wake him up or, is it normal?