I have a problem with the Garbage Collector of my application, I am working in a GCP environment with Kubernetes and BigTable as a data source. Upon receiving loads, the application does not free up memory space and fills up until k8s restarts the POD. I use a profiler to see the behavior of the JVM and this is the result. In the "Old Gen" pool it is seen that the memory is full but it never frees the space and it fills up until restarting and starting again.  In the pool "Eden Space" it is seen that while it is filling, the space is freed and never reaches the limit.  This is the JVM configuration when creating the docker image to deploy it in k8s. java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+UseCGroupMemoryLimitForHeap -XX:+AlwaysPreTouch -XX:ParallelGCThreads=5 -XX:GCTimeRatio=4 -XX:MaxGCPauseMillis=100 -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Xms512m -Xmx4608m  This same configuration is applied in another application that makes REST calls and has never had memory filling problems as in this case. Java version is 1.8 Thankful for your help. Grettings.

I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found  and others saying on Windows machine the JVM defaults max heap size as 64MB.  Given this situation, how should I deal with this constraint?  I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.  I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.  If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great.


I'm wanting to keep Ubuntu alongside Windows, can you do that is you use the minimal install CD?

I'm a windows xp user and I'm new to Linux I decided to install Xubuntu on my machine since it's quite old (512 MB ram and 2.66 GHZ P4 processor) My machine doesn't support booting from USB so the only choise for me was installing xubuntu from minimal CD  The problem is that I'm new to Linux ,the only OS I've ever used was windows So in the setup process every thing went fine until the partionning process  I want to install xubuntu next to my XP and I got only tow partitions on my 160 GB HD  So anyone who know how to partition my HD in a way that keeps my xp and my other files ? Thanx in advance :-)


When I receive a cup of coffee, and I'm not yet ready to drink it, will it lose less heat if I immediately add the milk, rather than wait to add the milk just before I drink it?  (Bonus points for estimate of difference based on 5 minute wait!)

A little thought experiment, similar to : Imagine you are making a cup of tea when the door bell rings. You've poured the boiling water into a cup with a teabag in it. As you're just about to pour milk in to the mix, the door bell rings.  My question is: what will keep the resulting drink hottest after my chat with the person at the door: quickly pouring the milk in, or leaving it in the carton until after the interruption ends?  Being a bit of a mathematician I'm happy to have the questions answered with a formula in terms of $t$ the length of the interruption, $m$, the temperature of the cold milk, $w$ the temperature of the hot water, $a$ the ambient temperature etc. I guess you'll have to use a model of how an insulated body loses/gains heat... feel free to use simplifying assumptions like the environment stays the same temperature etc.  My starting point from a physics point of view, is that heat is lost (or gained) proportional to the temperature difference between the object and the environment. So I imagine that would create some sort of exponential curve?


I find auto-rotate really annoying so I generally have it turned off.    Unfortunately, when I'm playing a YouTube video, it's equally annoying when I try to tilt the screen and then remember I have it turned off  :)   I would like a way to have auto-rotate working as usual when a YouTube video is playing, otherwise disabled.    Is that possible? I would like it all handled automatically, I'm not really interested in apps or widgets where I have to toggle a setting manually.  P.S. My phone is a Galaxy Nexus.

I'm sick of having to turn on auto rotate every time I use Google Maps for navigation. I don't know why it's not just automatically landscape like apps such as Youtube.  Is there a way I can have it turn on auto rotate JUST for google maps and not for any other app.  Is there an app that would do this or somehow program it in Tasker?


Please help me find out, I'm very curious about what this port could be and I have literally no clue to what it might be. If you know or have any idea please let me know!

I've have this socket on my laptop (Lenovo Z570).  What is this port and what is it used for? And what does that symbol mean (I expected a LOCK symbol)?


Well, I know right that I could find a counterexample to prove that this is false. Anyone knows one? Note that $dim(V),\hspace{3.25pt}dim(W)<\infty$

A function $T:V \rightarrow W$ is additive if $T(x+y) = T(x) + T(y)$ for every $x, y \in V$. Prove that there exists an additive function $T: \mathbb{R} \rightarrow \mathbb{R}$ that is not linear.  My attempt: Let $T$ be the function $T: \mathbb{R}$ (over the field $\mathbb{Q}$) $\rightarrow \mathbb{R}$ (over the field $\mathbb{R}$). The set $\{1, \sqrt{2}\} \subseteq \mathbb{R}$ is linearly independent for the vector space $\mathbb{R}$ over $\mathbb{Q}$. Then, there must exist a linearly independent set $W \subseteq \mathbb{R}$ (over $\mathbb{Q}$) such that $\{1, \sqrt{2}\} \subseteq W \subseteq \text{span}(W) = \mathbb{R}$ (over $\mathbb{Q}$).  I have been told that the function defined as $T(1) = 1$ and $T(w) = 0$ for all $w \in \text{span}(W) \setminus \{1\}$ is additive but not linear, but I cannot see why this is? I can see why it is not linear, clearly $T(\sqrt{2} \cdot 1) = 0$ but $\sqrt{2} T(1) = \sqrt{2}$. But, why is $T$ additive? For example, $T(1+1) = T(2) =0$ but $T(1) + T(1) = 1+1 = 2$? Is there a mistake somewhere?


I am a beginner developer who knows HTML, CSS  and lately have entered in web development world with learning some beginning php scripts. I just want to know is there a clean CMS that allows me to lunch a dynamic website including forms and registration with my current knowlege? (i don't want a CMS limit my created HTML page in design.)  And for last, it is very useful if this CMS be rich in functional developments, maybe in future i can develop bigger projects, and just for mention i don't like using too many plugins for sample things, i just want this CMS be functionaly easy and do not limit me.  thanks

This is a general, community wiki  question to address non-specific "I need a CMS or Wiki that does x, y, and z..." questions.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .    I have a list of features that I want for my website's Content Management System (CMS) - where can I find a [free] script that includes all of them?


I push my hand into a wall... The wall pushes at my hand. That's why I don't fall through the wall. BUT what if I get a sledgehammer and smash through the wall... Now all I see is Newton's third law working up until a point where the wall can't exert a big enough force to react against the sledgehammer.   So Newton's third law isn't universal?  Edit: wait guys, you are not making sense to me. But tell me if this is wrong or right. Is it because the wall pushes back against the sledgehammer with an equal and opposite force as they interact, but when the wall breaks it's just like the hammer is going through the air? Like the wall isn't there anymore?

Newton's third law states that every force has an equal and opposite reaction. But this doesn't seem like the case in the following scenario:  For example, a person punches a wall and the wall breaks.  The wall wasn't able to withstand the force, nor provide equal force in opposite direction to stop the punch.  If the force was indeed equal, wouldn't the punch not break the wall? I.e., like punching concrete, you'll just hurt your hand. Doesn't this mean Newton's third law is wrong in these cases?


Good examples would be writing "nite" for "night", "4" for "for", "wimmin" for "women". I guess it also applies to substituting final s with "z", as in "wordz". In the way that . Recently I've seen it a lot in alternative literature and music.  Example sentence: "Nice ... in that album title 'Only Built 4 Cuban Linx'"  I can't find them under . Which is odd, because this sort of rhetorical device seems to me currently more popular than, for example, .  These stylistic devices are different from , in that these are informal contractions, coming from "natural" speech acts like slurring. This question is about deliberate misspelling for artistic or satiric effect.

In linguistics, is there a term describing this phenomenon, i.e., when the syllables of two words are slurred together in the spoken language?  They are not contractions. While contractions are acceptable in any register, this combination of words is very informal and hardly ever found in formal writing.  kinda (kind of)   sorta (sort of)   coulda (could have)   shoulda (should have)   lotta (lot of)   oughta (ought to)   betcha (bet you)   lemme (let me)   tseasy (it's easy)   willya (will you)  Inasmuch as English Language speakers (just like the speakers of any natural language) have a tendency to join word sounds in speech, examples abound and a complete list would be hard to produce. I’m looking for a word or phrase describing this linguistic phenomenon as it occurs in speech.


The multiplicative group mod $p$ is isometric to the additive group mod $p-1$, yet computing discrete logarithms in the additive group is easy and completing discrete logarithms in the multiplicative group is usually hard.  What is it about group representation that makes group representation matter so much for the complexity of computing discrete logarithms?

I am trying to construct a theoretical Diffie-Hellman key exchange protocol. However, i cannot understand the difference between choosing an additive group or a multiplicative group. I believe an additive would make it much more simple, but would a multiplicative group make it more difficult to break? What would be the difference between the use of those 2 kinds of number groups?


I found these errors while using sudo apt-get update. I tried to resolve this issue by adding repository using sudo command but it did not resolve yet. It will be helpful if anyone can solve this issue.  Err:26 http://ppa.launchpad.net/marutter/c2d4u/ubuntu artful Release                                                                                404  Not Found  Err:27 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu artful Release                                                                                404  Not Found  Err:28 http://ppa.launchpad.net/webupd8team/gnome3/ubuntu artful Release                                                                                404  Not Found

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I've been googling and do not yet have a clear answer. We have about 7 days of holidays during thanksgiving, and our choices are Florida and Colorado. (We're from Dallas, Texas).  I heard Colorado is quite frozen at that time of the year, and we probably may not have much to do for 6-7 days! Just wanted to know if Florida is gonna be rainy.

I am interested in hiking this fall in France and camping along the way. In order to figure what gear I need to pack to camp (particularly for the sleeping bag), I would like to know what temperatures to expect.  I am interested in historical temperatures to figure the usual temperature and I might look at them for other seasons. If that matters, I am thinking about hiking in the Pays Basque (South West of France), the mountainous part.  Where (ideally online and for free) can I find such data? Are there resources that cover Europe, or even the whole world?


I have a vague memory of a short story that I think was by Robert Sheckley about a chaotic world without the usual laws. So, for example, the protagonist would open his inside jacket pocket to reach for his wallet (?) and a bat would fly out, to be casually crushed by the man with a ruler (?) ...

In this story, the narrator describes his day as ordinary objects change their physical properties. The floor might suddenly become fluid beneath one's foot, and you'd better get it out fast before the floor becomes solid again. Food on the plate may turn poisonous without any apparent cause. Mountains march on the horizon as the sky changes color. Life is a series of challenges and emergencies that people take in their stride.   It all changes abruptly one day as everything hardens into an unchanging reality. No more inconveniences, but also no more marching mountains in a golden sky. The narrator can't stand the boredom of it, but no one else seems to notice the change.  Read in English in the 1960s or 1970s, probably in an anthology.


I was wondering if the light meter in my Nikon D5200 will be similar with my Ricoh XR500? I took a picture in my D5200 using the light meter on my slr film(ricoh xr500) but it was underexposed by 1 or 2 stops.

I took two photos - first one with Canon 5D Mark III and the second one with analog Canon EOS 500N. I used the same lens (Canon 50mm ƒ/1.4) and settings (ISO/shutter/aperture) for both of them. The company that developed my films is doing that everyday. They also scanned my analog negatives without any corrections. I noticed that the film is much more brighter than the digital image of the same scene. Left photo is scanned negative and right photo is digital. The digital photos were shot in RAW, opened them in ACR, and then saved them as jpeg. Ilford HP5+ (left), ƒ/1.8, 1/1000, ISO 400 (both):  Kodak Gold 200 (left), ƒ/1.8 1/1000, ISO 200 (both):  I didn't find any answers why this happened. Could there be problems with fixing time or maybe the ISO value of the film differs from the one on the description of the film? Or is film simply brighter?


What happens if you plug an internal SATA disk into an eSATA port? Assume that the hard drive has been supplied power via SATA power cable and is not an eSATA drive.

Is the following correct?  eSATA is the same as SATA, except that the cable plug has a slightly different shape, but as far as the electrical signal goes, it's the exact same thing. In theory, if you had a powered-on HDD enclosure with an eSATA port and a cable with an eSATA plug on one end and a SATA plug on the other end, you could connect this device directly to a SATA socket on the motherboard of a powered-on PC and it would work.   (Note: This is theoretical; I don't propose mucking about inside a powered-on PC.)


I simply want to create a buffer of a specific size, around a single point. When I create a buffer it uses degrees/ or radians, or whatever, and the buffer is created that covers the whole screen.   I am working on a South African map, so I have tried setting the project CRS to WGS84/UTM30S.  I then load my shapefile, and set the shapefile CRS to WGS84/UTM30S. Still the buffering tool creates this massive buffer.   I just want to be able to create a buffer, of known radius in meters.    I am using QGIS 1.8.0 Lisboa  Anyone with ideas?

I'm very new to the GIS world, so my problem could be very stupid, but I'm going to try anyway.  Objective  Given a list of coordinates in longitude/latitude, stored as a .csv file, I want to create a buffer with distance of x km around those coordinates. (In case this is relevant, these coordinates are locations of the societies in the . These societies scatter all around the world.)  Problem  I'm only able to create buffers with distance in radial degrees, but I want to do them in (kilo)meters. I'm aware of the following Q&A's, but following what's suggested therein doesn't seem to solve my problem:          What I have tried...   I start QGIS (v2.4), and Add delimited text layer  choose my .csv file and the x/y fields, click OK select WGS 84 as my CRS (also tried NAD83 but didn't make a difference), click OK right-click on layer and select Save As..., in the dialog box, choose the following and click OK:  add sccs_meter.shp as layer to the current project Select Vector > Geoprocessing Tools > Buffers > set buffer distance as 10   The result is a buffer with radius of approximately 1068km, which suggests that buffer distance is 10 degrees rather than 10 meters.  What did I do wrong here?


I am using QGIS. I am aware there is a similar question here but the solution (changing the layer CRS) is not working for me. I cannot change my CRS as I am using information for the entire Asia-Pacific region. Is there another option to create a 1000 km buffer zone from all volcanoes in the region? It is currently projected as geographic coordinates, the default WGS:84.

I am trying to create buffers around the Hurricane Sandy path I created in QGIS (points are lat/long).   I have both points from each day she was tracted and the line I created from it with Points2One.   When I go to make buffers around either the line or the points, the buffer takes up the whole screen. Its all just one color.   I have made buffers before but from data I did not create.   Right now all of my projections are set to WGS 84 EPSG 4326.


I am attempting to replace the first occurrence of the string "[]" in another string:  aString.replaceFirst("[]", "blah");  I get the error:  java.util.regex.PatternSyntaxException: Unclosed character class near index 1 []  [ and ] are obviously metacharacters, however when I try to escape them with a \  eclipse complains that it is not a valid escape sequence.  I've looked but couldn't find, what am I missing?  Thank You

Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input.


Let G be a group and $g \in G$. Show that $Z(G) = \{ x \in G : gx = xg$ for all $g \in G$} is a subgroup of $G$. This subgroup is called the center of $G$.  I know that associativity can be inherited from G, but I'm not 100% sure on how to show it's closed, that an identity exists, and that an inverse exists.

Let $G$ be a group. We define $H=\{h\in G\mid \forall g\in G: hg=gh\},$ the center of $G$. Prove that $H$ is a (normal) subgroup of $G$.


I'm running the error :     pdfTeX error: pdflatex (file jkpbne): Font jkpbne at 600 not found   In my latex file, I already added   \usepackage{lmodern}% http://ctan.org/pkg/lm   I'm using MikTex 2.9 and sublime 3 and here is the output of my log file:

I'm getting the following error when trying to compile the following very minimal example with MiKTeX:  \documentclass{article}  \usepackage[T1]{fontenc} \usepackage{kpfonts}  \begin{document} test \end{document}   The error I get is  hb/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (D:\dump\tex\tmp\test.aux) )Trying to make PK font jkpmn8r at 600 DPI... Running miktex-makemf.exe... miktex-makemf: The jkpmn8r source file could not be found. Running ttf2pk.exe... miktex-makepk: PK font jkpmn8r could not be created.  !pdfTeX error: pdflatex (file jkpmn8r): Font jkpmn8r at 600 not found  ==> Fatal error occurred, no output PDF file produced!  It compiles perfectly on my Ubuntu machine with TeX Live 2011, but not on my Windows machine with MiKTeX 2.9 (just updated all packages as well).  I detected this when trying to compile my thesis on my Windows machine, which produced the following error:  [5 ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \@EveryShipout@Output ...@Org@Shipout \box \@cclv  l.47  !  ==> Fatal error occurred, no output PDF file produced!   It appears it has something to do with the kpfonts package since the minimal example compiles when I comment it out, but why does it work on my Ubuntu machine then?


I'm using system() to do various commands such as ls -a. Is there any way that I can get system to store the output in an variable inside my program,  instead of printing the result to console?

I've got a utility that outputs a list of files required by a game.  How can I run that utility within a C program and grab its output so I can act on it within the same program? UPDATE: Good call on the lack of information.  The utility spits out a series of strings, and this is supposed to be portable across Mac/Windows/Linux.  Please note, I'm looking for a programmatic way to execute the utility and retain its output (which goes to stdout).


I inadvertently created a file called -r in my home directory. Now I cannot get rid of it:  rm -rf rm: missing operand Try 'rm --help' for more information.   Other attempts:  rm /-/r rm: cannot remove ‘/-/r’: No such file or directory   Another one:  rm \-r rm: missing operand Try 'rm --help' for more information.   Is there a way to remove this file without deleting the whole directory?

This may be a simple question, but how do I use files starting with "-" with command line programs?   For example,  I am trying to use pdfgrep on a file named -2013-01-01.pdf but it complains that there are no options defined for 2, 0, 1, 3 and so on.  Changing the filename to something that does not start with "-" solves it, but this is not an option since the files aren't created by me. I simply want to check for a specific change I know is coming.


My computer has UEFI based BIOS and I want to start over from scratch.  The PC came with Windows installed - I later installed Ubuntu alongside.  I want to completely re-build my whole disk and install only Ubuntu on it.    So it is not about how to install Ubuntu, it is about how to prepare a disk.  What is the most professional way and which tasks will I have to perform?

My laptop is filled with viruses and Windows XP is just becoming impossible to work with.   I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh?


Tried echo "Some text" >> /dev/null then cat null with no output. Can someone explain why this is?

Seeing that /dev/null's utility isn't immediately obvious to me, what is the use of /dev/null piping?


Like the title says I want to replace text (ex. ":)") with a smile face.  I used clipboard method, but sometimes (usually with Google Chrome) it throws exception called: System.Runtime.InteropServices.ExternalException.  After I read about it they say, it is caused by other program who is using clipboard. So how can I avoid it?  Code I'm using:   int ind = TekstiKast.Text.IndexOf(emote); TekstiKast.Select(ind, emote.Length); Clipboard.SetImage(new Bitmap((Image)emotions[emote],new Size(16,16))); TekstiKast.Paste();

Most of the examples I see say to put it on the clipboard and use paste, but that doesn't seem to be very good because it overwrites the clipboard.  I did see  that manually put the image into the RTF using a pinvoke to convert the image to a wmf.  Is this the best way?  Is there any more straightforward thing I can do?


I want to concatenate two Regular expressions with AND operator (I don't know if this is possible ... ) so the match happens only when the string matches RegEx1 and RegEx2.   RegEx1: [a-g]+  RegEx2: [b-z]+  Example1 : String "bcd" match   Example2 : String "hijk" not match    It was easy with OR operator, but for AND I could not find a solution.

Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?  Specifically, I'd like to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.


Have been trying to install Gnuradio for several days and keep having trouble with qt4 not building/installing properly. Seemed to depend on a thing named 'unity-control-center' which claimed to be dependent on two libraries, both of which claimed to be up to date. This is what I got if I tried to install just qt4. Get exactly the same unmet dependencies if I try to install any qt4 app from the Software Center, FWIW.  ftoewe@ftoewe-Inspiron:~$ sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed                         Depends: libcheese7 (>= 3.0.1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. ftoewe@ftoewe-Inspiron:~$   Asked for help a couple of days ago and got messed up trying to complete a suggestion.  So back trying again.  Thanks in advance.

I'm getting the following error message when attempting to install libglew-dev,  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                    Depends: libcogl15 (>= 1.15.8) but it is not going to be installed  libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed               Depends: gstreamer1.0-clutter but it is not going to be installed  libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                     Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   All those packages are however apparently already installed.  I have tried all possible solutions in  post, without any luck. I have not added any PPAs. The version of ubuntu is 14.04.2.  I have looked at similar posts, and tried the following:  Running  dpkg --get-selections | grep hold   prints nothing.  sudo apt-get -oDebug::pkgProblemResolver=true install -f   Gives me nothing of interest, 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am currently developing a webpage for a real estate (using Java server faces) ,so it is essential to store images connected to its house. I am using mysql workbench and I really have a hard time deciding how to implement this feature. To begin with, I don't know what field of mysql workbench I can use in order to store images. Searching with google I found out about a blob field but I don't know how can I convert it to this blob type. Also I don't know if it is a good idea to store images on a database at all. Another approach I came up with is to have a VARCHAR field with a path to a folder of images. Which is better? thx in advance

Possible Duplicate:          I was wondering if there's any good reason to still use blob fields in a database. A couple of years ago I worked with a DB with a bunch of images in it, the DB was very slow and I couldn't see any good reason to keep the images inside the DB, so I got the images out and stored the filenames instead.  Was this a smart move? What would you do in my place?


E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/)   Is another process using it?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


I use mingw32 to compile some C++ code. After trying some things and a lot of search I have a questions : The flags orders seems very important thought I found barely nothing that explain that on the internet. For exemple :  g++ main.cpp -L/lib -I/include -lmingw32 -lSDL2 -lSDL2main -Wall -g -o main.exe -> Compile  g++ main.cpp -L/lib -I/include -lmingw32 -lSDL2main -lSDL2 -Wall -g -o main.exe -> Not compile  g++ main.cpp -L/lib -I/include -lSDL2 -lSDL2main -lmingw32 -Wall -g -o main.exe -> Compile  I can understand why -lSDL2main need -lSDL2 first but so why the place of -lmingw32 is not important ?  EDIT :   I explain : from what I know of compilation process .cpp come first, -l indicate clearly libraries (last step of compilation). So why if I put main.cpp to the end it's continue compilation process and finish with error from the library. What mingw use if he don't have any source file, he just compile lib ?

Why does the order in which libraries are linked sometimes cause errors in GCC?


Ok, so I've spotted another one of the dot+line patterns that I want to click, however, I don't seem to be able to stand in the right spot to get a perfect circle.  There's a sofa exactly where I need to stand. I can get really close (close enough that I get sparks) but can't quite trigger it.      I've tried standing on the steps behind, but a tree blocks the correct position (can't even get sparks here)    And even standing on the castle wall, but the crenelations are in the way (again, no sparks)    There's nothing else on the correct line of sight.  Is this just very fiddly and I need to keep trying by the sofa or am I missing something?

In The Witness, I was walking along the coast, and I came upon this:    Now, since I've learned      that mazes can be embedded in the environment,   I see the puzzle here, but I just can't get the pieces to line up well enough.  Standing on the couch and walking all around it doesn't seem to get me a       functional maze.   Where do I need to stand to activate the puzzle successfully?


Question: A poll is conducted to help ascertain  whether the Labour party  candidate or Tory candidate  will win in a forthcoming  election for Coventry Mayor ( there are no other candidates, and the election is decided by winning a simple majority of the  voters). On the basis of previous polling,  the polling company has a  prior  distribution for the proportion of all voters who intend to  support the Labour candidate which  is  the beta distribution with parameters 13 and 9. The poll asks a  sample  of 100 representative voters about  their voting intentions and  found that   48  people in the  sample intended to vote Labour  and 52  people intended to vote Tory. What is the updated probability that Labour win the election? Give your answer to two decimal places. [My apologies about the long-winded question :)] So far I have: $L \sim Beta(13,9)$ where L is the random variable representing the proportion of the population voting Labour. This is the prior distribution. Let M be the random variable reflecting the sample of 100, of which 48 voted labour. So $M \sim Binomial(100, 0.48)$. To work out the updated probability or the posterior distribution I need to calculate $P(L > 50 | M=48). $ SO $P(L > 50 | M=48) = \frac{P(L > 50, M = 48)}{P(M=48)}$ Where I am struggling is working out the conditional probability distribution as I haven't encountered the Beta distribution much. How would I go about doing this and is my method correct so far in terms of M being binomial and calculating the conditional probability? I need guidance on calculating $f_{LM}(l,m)$. Thank you.

In a group of students, there are 2 out of 18 that are left-handed. Find the posterior distribution of left-handed students in the population assuming uninformative prior. Summarize the results. According to the literature 5-20% of people are left-handed. Take this information into account in your prior and calculate new posterior.    I know the beta distribution should be used here. First, with $\alpha$ and $\beta$ values as 1? The equation I found in the material for posterior is   $$\pi(r \vert Y ) \propto r^{(Y +−1)} \times (1 − r)^{(N−Y +−1)} \\ $$  $Y=2$, $N=18$  Why is that $r$ in the equation? ($r$ denoting the proportion of left-handed people). It is unknown, so how can it be in this equation? To me it seems ridiculous to calculate $r$ given $Y$ and use that $r$ in the equation giving $r$. Well, with the sample $r=2/18$ the result was $0,0019$. The $f$ should I deduce from that?  The equation giving an expected value of $R$ given known $Y$ and $N$ worked better and gave me $0,15$ which sounds about right. The equation being $E(r | X, N, α, β) = (α + X)/(α + β + N)$ with value $1$ assigned to $α$ and $β$. What values should I give $α$ and $β$ to take into account prior information?  Some tips would be much appreciated. A general lecture on prior and posterior distributions wouldn't hurt either (I have vague understanding what they are but only vague) Also bear in mind I'm not very advanced statistician (actually I'm a political scientist by my main trade) so advanced mathematics will probably fly over my head.


Hi so I was applying for online jobs and randomly received an email for a Personal Assistant job from JRN Financial Solutions, everything went by super quick and I got the job which I don't feel I was qualified for. I signed the contract and did my first day which I had to create a word letter for investing in Bitcoin. This is the second day and they want me to create a brochure within a week for bitcoin and their website but they also want to send me 1000-3000CAD to purchase bitcoin and receive a 350 dollar commission, they have my bank account number but nothing has been done yet, I can't find anything out about the company besides the website. Is this a scam?

Seems shady. Here is what has happened so far:  Job offer in newspaper: personal assistant, 10-15 hours per week, $500 per week.  I took the job. Didn't have to fill out any W-2 forms or anything.  Gave them my name, email, and mailing address.  Received a check for ~$1900. Had a note to keep $250 of it, and send the rest to another person via Walmart. I did that.   Now I'm thinking this seems very weird and I'll probably let him know I don't feel comfortable with this and just bail out. What does this look like to you guys?


How would I get the strings "part1" to properly compare to "findF","findPLUS", and "findMINUS?" Currently it runs without any errors but it does not properly do the actions inside of the if then statement.  output is "F - F +"  public void arrayHolder(){     String compare = ",F,-,F,+";     for(int i=0;i<=(compare.length()/2);i++){          String[] index = compare.split(",");          String part1 = index[i];         String findF = new String("F");         String findPLUS = new String("+");         String findMINUS = new String("-");          if(part1 == findF){             m.forward(25);         }else if(part1 == findPLUS){             m.turnLeft();         }else if(part1 == findMINUS){             m.turnRight();         }         System.out.println(part1);       }        }

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


I was looking at this image and reading through the Wikipedia page for viruses and it says that to satisfy the definition of "being alive" the organism must have a cellular structure, but it seems to me that if an organism has all these other factors without a cellular structure, it is still seemingly alive, no?  So why exactly does an organism need a cellular structure to be alive? What is the rationale for that criteria?

The recent  about a new supermassive virus being discovered got me thinking about how we define viruses as non-living organisms whilst they are bigger than bacteria, and much more complex than we first gave them credit for.   What biological differences between viruses and cellular organisms have made viruses be deemed non-living?


I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


Flash is installed but all flash embeds are replaced with blue i information icon. And I am using a web browser called  that supports flash. Is a windows update by microsoft blocking the flash player from running? Why is this happening?

I would like to use Flash Player to show web contents but since today (12 Jan 2021) Adobe is blocking it. Is there a way to use it? I've tried Firefox, Chrome, Safari and Brave browsers.


I am confused about compiler errors regarding the code below:  class Base { public:   virtual ~Base () { }   virtual void func () { }   virtual void func (int) { }   virtual void another () { }   virtual void another (int) { } };  class Derived : public Base { public:   void func () { } };  int main () {   Derived d;   d.func();   d.func(0);   d.another();   d.another(0); }   Using gcc 4.6.3, the above code causes an error at d.func(0) saying that Dervied::func(int) is undefined.  When I also add a definition for func(int) to Derived, then it works. It also works (as in the case of "another") when I define neither func() nor func(int) in Derived.  Clearly there is some rule going on here regarding virtual overloaded functions, but this is the first time I've encountered it, and I don't quite understand it. Can somebody tell me what exactly is going on here?

I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this?


When I run ls -l there are files listed with @ file mod for some folders:  drwxr-xr-x   5 root  admin      170 Sep  4 13:51 Users drwxrwxrwt@  3 root  admin      102 Sep  5 09:02 Volumes   I realized that the folders with @ sign can not be displayed in Finder. Can somebody tell me what is the @ sign for and how i can remove it?

After I download files on OSX and then want to use them, they often have an @ appended on the file mode whenever I do a ls -l. Here is an example output, see the @ near the beginning of the line:  ls -l *.php -rw-r--r--@ 1 username  staff  11179 Dec 17  2010 class.mysql.php -rw-r--r--@ 1 username  staff     24 Nov  1  2010 info.php -rw-r--r--@ 1 username  staff     61 Dec 23  2010 page.php -rw-r--r--@ 1 username  staff   1157 Dec 17  2010 photo.php   I think it is some kind of locking meganism, is that right? And how do I get rid of it?


After for example a Torus has been added, you can specify major segments, minor segments, radii, etc.  After some clicking around i cant seem to get back to these settings anymore. is it possible? if so, how?

I've added a torus knot using the the "Add Curve: Extra Objects" addon. I've done some work on the scene, and now would like to go back change the knot parameters that were in the operator settings when I first added the curve.   How do I get back to that panel to adjust operator settings?


When you pour sand into water, first the dust particles that are floating on the surface, are separately all over.    Then as the water flows, the dust particles should just randomly move around staying mostly separately, but for some reason, all the dust particles are moving together and sticking together into islands, just like planets are formed from dust in the solar systems.    It is like there was some force that is pulling these dust particles together, and keeping them in these islands. Is this the same Van der Waals force that keeps the water molecules together?    Question:   Why are dust particles moving together into these islands on top of the water?

I had Oreos and milk a while ago and left my half-full cup of milk out on the counter. Afterwards I noticed that the crumbs had surfaced in a circular coin-sized glob, and just now I looked again to see all of the crumbs seem to have compressed into a more dense glob at the very center of the cup.   Why does this happen?


With Darth Vader's famous line "join me, and together we can defeat the Emperor". Even if he did end up defeating the Emperor, could he control the Empire? Does he have enough political power? or would the Imperial Senate elect a new head.

Near the end of Empire Strikes Back, Darth Vader has a big proposal for Luke:     "Luke, you can destroy the Emperor. He has foreseen this. It is your   destiny! Join me, and together, we can rule the galaxy as father and   son! Come with me. It is the only way."   Is Vader really intentioned to destroy the Emperor with the help of his son, or is he just trying to lure Luke into the dark side using a proposal that might sound light-side oriented to him (destroy evil, bring back peace...)?  Of course I don't mean he is already a good guy at this point, but does he really have a personal plan against his master, to take his place and have Luke as his apprentice? Is he even showing a little bit of fatherly love? Or is it all a lie?


In the film Prometheus, is the planet shown in the beginning of the film Earth or was it some other planet?

Is this scene happening on Earth? I mean, perhaps this scene was made completely with CG effects. But if not, which waterfall looks like that? Please, answer with images and sources.


I am not sure why this started to show last few days. It only happens when i try to edit content type (admin/structure/types/content_type_name) or when i want to add new content type.  Going back in browser and clearing cache moves the error away and i am able to edit or create content but the error still shows on the bottom of the page. I can work for few minutes without interuption but then again it starts showing.    Website is live, but i have not noticed that it happens to users (anonymous or loged in), or that it breaks any part the website except adding/editing content type. (manage fields, manage display always work without errors, its just the edit content page).     PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 148926721856f8ef83caa1a9.09501995 ) in lock_release_all() (line 269 of /var/www/html/includes/lock.inc).

Recently I started getting an error every time I try and add a content no matter what type.  This is the error that shows up in the browser:     Additional uncaught exception thrown while handling exception.        Original   PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] => 0 ) in comment_count_unpublished() (line 313 of /Applications/MAMP/htdocs/modules/comment/comment.module).        Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:154:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&gt; 0 ) ";s:9:"%function";s:27:"comment_count_unpublished()";s:5:"%file";s:56:"/Applications/MAMP/htdocs/modules/comment/comment.module";s:5:"%line";i:313;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => ; [:db_insert_placeholder_7] =>  [:db_insert_placeholder_8] => 127.0.0.1 [:db_insert_placeholder_9] => 1338336955 ) in dblog_watchdog() (line 154 of /Applications/MAMP/htdocs/modules/dblog/dblog.module).   I also get the following error in my php error file:     PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/MAMP/htdocs/includes/database/database.inc:2136        Stack trace:   0 /Applications/MAMP/htdocs/includes/database/database.inc(2136): PDOStatement->execute(Array)   1 /Applications/MAMP/htdocs/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)   2 /Applications/MAMP/htdocs/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)   3 /Applications/MAMP/htdocs/includes/lock.inc(167): db_query('SELECT expire, ...', Array)   4 /Applications/MAMP/htdocs/includes/lock.inc(146): lock_may_be_available('theme_registry:...')   5 /Applications/MAMP/htdocs/includes/theme.inc(447): lock_acquire('theme_registry:...')   6 /Applications/MAMP/htdocs/includes/bootstrap.inc(427): ThemeRegistry->set(Array)   7 [internal function]: DrupalCacheArray->__destruct()   8 {main}         thrown in /Applications/MAMP/htdocs/includes/database/database.inc on line 2136   I am having a little trouble deciphering these error messages. Could anyone help me understand what's going on here?


If you are reading this, you are probably twitching already, but I think it qualifies as a fair question because there is a lot of uncertainty about what the Disney Story Group will keep from earlier Star Wars material.  Despite how bad it is, the Holiday Special was accepted as canon (I do not know what level). So... Is there any official information on whetherany parts of it may be reincorporated in the new canon?

For instance, it predates everything except the first two movies. Additionally, Han Solo eventually shows up, and Luke and Leia are both there as well.  I will post followup questions regarding the made-for-tv Ewok movies should this one prove popular.


I have this issue but not found any solution working for me. I am new to blender and modelling, and I am aware that my model is far from perfect. But my armature is quite simple. I have tried to clean the mesh, remove some wrong faces...but I still have the issue when parenting...Thank you for any idea !

Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work.


I would like to use something, maybe a. b. or (1) (2) to show which equation correlates with which part of the table. Also it will be nice to be able to reference the various models in my discussion. I looked at another thread but their tip of using /label{} didn't really work.   Here's the code:  \documentclass[twocolumn]{article}  \usepackage{booktabs, makecell, tabularx} \renewcommand\theadfont{\normalsize} \renewcommand\theadgape{} \setcellgapes{2pt} \newcolumntype{L}{>{\raggedright\arraybackslash}X} \usepackage{caption} \usepackage{textcomp} \usepackage{graphicx} \raggedbottom \usepackage{amsmath,geometry} \usepackage{rotating} \usepackage{booktabs, makecell} \usepackage[referable]{threeparttablex} \usepackage{siunitx} \usepackage[skip=1ex]{caption} \usepackage{upquote} \usepackage{balance} \usepackage[lite]{mtpro2} % Times Roman math font  \begin{document}  $\text{CEO Salary} =    \beta_0 +    \beta_1\,\text{return} +    \beta_2\,\text{bonus} +    \beta_3\,\text{stock awards} +    \beta_4\,\text{option awards} +   \beta_5\,\text{other compensation}    \beta_6\,\text{age} +   \beta_7\,\text{age sq} +   \beta_8\,\text{male} +   \beta_9\,\text{industry} +   \beta_{10}\,\text{volume} $ \label{eqn:first}    $\text{Total Compensation} =    \beta_0 +    \beta_1\,\text{return} +    \beta_2\,\text{age} +    \beta_3\,\text{male} +    \beta_4\,\text{interaction term?} +   \beta_5\,\text{industry}    \beta_6\,\text{volume} +   \beta_7\,\text{age sq} +   \beta_8\,\text{male} +   \beta_9\,\text{industry} +   \beta_{10}\,\text{volume} $ \label{eqn:second}   \end{document}

I have a little problem with the placement of my picture. I want to insert it at the end of the introduction chapter but its place is not where I want.   I think the problem become from the:  \begin{figure} ... \end{figure}   Because when I insert the picture without using \begin{figure}... the picture is at the end of the chapter as I want.   Look the picture below.


How can I disable Ctrl+Q shortcut to close the current app in Ubuntu?  I have seen the top answer under:  which suggests assigning Ctrl+Q to /bin/false/.  I don't think this should be an accepted answer since some apps that use Ctrl+Q like IntelliJ IDEA won't work with this shortcut anymore.  gsettings get org.gnome.desktop.wm.keybindings close produces only Alt + F4  I use Ubuntu 18.04

A lot of applications like Firefox, Chrome etc, get closed when I accidentally press Ctrl+Q instead of Ctrl+W because of the proximity of the Q and W keys on the keyboard. Is there a way this shortcut can be removed or reset on a system wide basis?


From  says     98.3% of the interaction matrix is sparse. For collaborative filtering to work, the maximum sparsity you could get away with would probably be about 99.5% or so. We are well below this, so we should be able to get decent results.   Why is 99.5% ?

I'm starting to work in a project that will have a recommender system as one of its components. I'm trying to figure out if I have the right type of data for the recommender.   The data contains ratings from implicit feedback. That is, data is either $1$ if there has been interaction (between the user and the item), or unknown if there has not been interaction. Interaction in this problem would be that the user has clicked/viewed the item.  I have about 124K users, 4,2K items, and 160K ratings. The sparsity is 99.96%.  The amount of rating per user is like this:    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    1.000   1.000   1.000   1.291   1.000  81.000   The amount of ratings per item is like this:   Min.  1st Qu.   Median     Mean  3rd Qu.     Max.      1.00     1.00     3.00    37.59    11.00 13570.00    Clearly a majority of the users have only rated (interacted) with one item. While only a 25% of the items have a single rating.   My questions are:    Which levels of sparsity (amount of user-item known ratings) are typical for recommender systems? How do I decrease the sparsity of my rating matrix? Should I remove users with few ratings, should I try to gather more data?


Is it (N-n)/N or (N-n)/(N-1)? Provided that they can be used interchangeably, why would you use one instead of the other?

I understand that when sampling from a finite population and our sample size is more than 5% of the population, we need to make a correction on the sample's mean and standard error using this formula:  $\hspace{10mm} FPC=\sqrt{\frac{N-n}{N-1}}$  Where $N$ is the population size and $n$ is the sample size.  I have 3 questions about this formula:   Why is the threshold set at 5%? How was the formula derived? Are there other online resources that comprehensively explain this formula besides  paper?


I installed Drupal in English and also installed the i18n and Locale modules for translation. I then enabled Spanish as a language and set it as default. My aim is to have the site default to Spanish (www.mysite.com/spanish-page), and to allow users to choose English if they wish (www.mysite.com/en/english-page).   My site is still defaulting to English... for example, in "admin/config/system/site-information", my Default front page setting is defaulting the the "en" (English) url prefix. I cannot delete that prefix on that page; it is listed in the non-editable text just in front of that field. Likewise, when I click the "Home" button on my admin menu, it takes me to "www.mysite.com/en" (the English home page) instead of "www.mysite.com" (which would be the Spanish home page). I'm sure it must be a default setting somewhere, but I cannot find it. Can anyone provide guidance on how to properly set up this type of language scenario?  Thanks!

I made the mistake to translate the Drupal interface in my local language. But since the language is set into the database, I can't delete this language using the Drupal UI. And I'm not sure which file(s) to delete in the database.    Does anyone know a (faultlessly) way to translate the Drupal interface back to English?


Suppose $G$ is a group and $f : G \to G$ is the function $f(x) = x^{-1}$. Prove that if $f$ is a homomorphism, then $G$ is abelian.  Proceeding by contrapositive suppose $G$ is not abelian then for every $a,b$ in $G$, $$f(ab) = {(ab)^-}^1 = {b^-}^1{a^-}^1 = f(b)f(a);$$ thus $f$ is not a homomorphism since the homomorphism property $f(ab) = f(a)f(b)$ fails. My question is different from the possible duplicate provided because I want to know if showing that $$f(ab) = {(ab)^-}^1 = {b^-}^1{a^-}^1 = f(b)f(a);$$ is a correct method to show that a function is NOT a homomorphism

$G$ is a group and $f:G \rightarrow G$ is a function defined as $f(a)=a^{-1}$ where $a^{-1}$ is the inverse of $a$ under the group operation. Prove that $f$ is an isomorphism if and only if $G$ is abelian.    I understand that I have to prove $f(ab)=(ab)^{-1}=b^{-1}a^{-1}$. How might I do that?  Reference: Fraleigh p. 49 Question 4.40 in A First Course in Abstract Algebra


Suppose we have two square matrices $A$, $B$ of size $N\times N$. We know that $AB=0$, that is their product is a zero matrix. Then how can we show that i) If rank of $B$ is $\geq 1$ then rank of A must be $\leq N-1$? ii) If we know that rank of $A$ is $N-1$, then how we can show that rank of $B$ is $1$?

Let $A,B\in M_n(\mathbb{R})$ such that $AB=0$. Prove that   $$\mathrm{rank}(A)+\mathrm{rank}(B)\leq n.$$   From the given information, I only know that $\mathrm{rank}(AB)=0$.


When I enter the command: $ ls -la some_directory  It gives the output: drwx------. 5 user1 user1 1418 Mar 7 11:17 some_directory  What does the dot behind drwx------ signify? What does the 5 before user1 signify?

The ls -al command shows the following output;  -rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe   What are all the fields in the preceding display?


Today when I was coding LeetCode 884. Uncommon Words from Two Sentences, I noticed that appending a char after a String is saving a little bit more time than appending a String after a String. Here is my code: On line 2 and 3, I was using s1=s1+" ". After I changing it to s1=s1+' ', the run time was improved by 1s. I am wondering if appending char is more 'light-weighted'. If so, why? Thank you!     public String[] uncommonFromSentences(String s1, String s2) {         s1=s1+' ';         s2=s2+' ';                 HashMap<String, Integer> map=new HashMap<>();         ArrayList<String> al=new ArrayList<>();                  while (!s1.isEmpty()){             int index= s1.indexOf(' ');                          String s=s1.substring(0, index);             s1=s1.substring(index+1);                          map.put(s, map.getOrDefault(s,0)+1);                                   }                  while (!s2.isEmpty()){             int index=s2.indexOf(' ');                          String s=s2.substring(0, index);             s2=s2.substring(index+1);                          map.put(s, map.getOrDefault(s,0)+1);                                 }                  for (Map.Entry<String, Integer> entry : map.entrySet()) {             // System.out.println(entry.getValue() + " "+ entry.getKey());             if(entry.getValue()==1){                al.add(entry.getKey());             }         }           return al.toArray(new String [al.size()]);                       } }  Here is the link to the Leetcode Question:

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


The following is the text I'm using in the regex. I want to grab everything between ##Player Stats and ##Goalie Stats  [](#startinjuredreserve)  ##Injured Reserve |Position|Player|Salary| |:-|:-|:-| |RD|Oscar Fantenberg|$850,000| |LW|Antoine Roussel|$3,000,000|   [](#endinjuredreserve)  [](#startmagicalbotarea)   ##Schedule |Date|Time|Opponent|TV/Score| |::|::|::|::| |15 Oct|19:00|vs [Detroit Red Wings](/r/detroitredwings "Detroit Red Wings")|**W 5-1**| |17 Oct|17:00|@ [St. Louis Blues](/r/stlouisblues "St. Louis Blues")|**W 4-3**| |19 Oct|10:00|@ [New Jersey Devils](/r/devils "New Jersey Devils")|L 1-0| |**Today**|10:00|@ [New York Rangers](/r/rangers "New York Rangers")|**W 3-2**| |22 Oct|16:30|@ [Detroit Red Wings](/r/detroitredwings "Detroit Red Wings")|SN360| |25 Oct|19:00|vs [Washington Capitals](/r/caps "Washington Capitals")|SN1| |28 Oct|19:00|vs [Florida Panthers](/r/floridapanthers "Florida Panthers")|SNP|  ##Pacific Standings |Team|GP|W|L|OTL|PTS|Streak |::|::|::|::|::|::|::| |[Edmonton Oilers](/r/edmontonoilers "Edmonton Oilers")|8|7|1|0|14|W2| |[Anaheim Ducks](/r/anaheimducks "Anaheim Ducks")|8|6|2|0|12|W2| |[Vegas Golden Knights](/r/goldenknights "Vegas Golden Knights")|9|6|3|0|12|W2| |[Vancouver Canucks](/r/canucks "Vancouver Canucks")|8|5|3|0|10|W1| |[Arizona Coyotes](/r/coyotes "Arizona Coyotes")|7|4|2|1|9|W3| |[Calgary Flames](/r/calgaryflames "Calgary Flames")|9|4|4|1|9|L1| |[San Jose Sharks](/r/sanjosesharks "San Jose Sharks")|8|3|5|0|6|L1| |[Los Angeles Kings](/r/losangeleskings "Los Angeles Kings")|8|3|5|0|6|W1|  ##Player Stats Player|GP|G|A|P|+/-|PIM| |:|::|::|::|::|::|::| |Miller|8|4|4|**8**|5|4| |Pettersson|8|2|6|**8**|4|0| |Boeser|8|2|5|**7**|4|0| |Edler|8|3|3|**6**|-1|10| |Sutter|8|2|3|**5**|1|7| |Pearson|8|2|2|**4**|-4|2| |Tanev|8|1|3|**4**|1|0| |Hughes|8|1|3|**4**|1|2| |Horvat|8|2|1|**3**|0|2| |Leivo|8|1|2|**3**|1|2|  ##Goalie Stats |Goalie|GP|W|L|SV%|GAA|SO| |:|::|::|::|::|::|::| |Markstrom|5|3|2|0.932|2.19|0| |Demko|3|2|1|0.943|1.64|0|  ***** Updated at: 20 Oct 2019, 03:12 PM PST *****  [](#endmagicalbotarea)  ##Filter Options - If you want to block a certain type of posts, click one of the link filters below  - [No Shitpost/Memes](https://nm.reddit.com/r/canucks/#nm)  - [No Fan Content](https://nf.reddit.com/r/canucks/#nf)  - [No Memes or Fan Content](https://mf.reddit.com/r/canucks/#mf)  - [Reset Filter](https://reddit.com/r/canucks/)  ## Links & Resources  - /r/hockey - /r/UticaComets - /r/TheAthleticVAN  - [Canucks Capfriendly](https://www.capfriendly.com/teams/canucks) - [Canucks.com](https://www.nhl.com/canucks) - [Canucks Official Twitter](https://twitter.com/canucks) - [Canucks Official YT Channel](http://www.youtube.com/user/Canucks) - [Sportsnet 650 Vancouver](http://www.sportsnet.ca/650/) - [TSN 1040](http://www.tsn.ca/radio/vancouver-1040-i-1410) - [**Join /r/Canucks Discord!**] (https://discord.gg/UTZ5Vrb)  ## Subreddit Wiki  - [Rules and Guidelines](/r/canucks/wiki/rules) - [Streaming Guide](/r/canucks/wiki/streaming) - [Attending a Canucks Game?](/r/canucks/comments/2u5lxr/so_you_wanna_go_to_a_canucks_game_eh_faq_for/) - [Canucks Resources](/r/canucks/wiki/resources) - [Meme Hall of Fame](/r/canucks/wiki/memes) - [AMA Archive](/r/canucks/wiki/amas) - [**Nostalgia Corner**](https://www.reddit.com/r/canucks/wiki/nostalgia-corner)     As you can see on regex101 it correctly grabs the 12 lines between ##Players Stats and ##Goalie Stats but when I run the following code in Python None is returned          sidebar = self.r.subreddit(self.SUBREDDIT).wiki['config/sidebar'].content_md         test = re.match('##Player Stats\n(.*?)##Goalie Stats', sidebar, flags=re.DOTALL)         print(sidebar)   sidebar is correctly grabbing the text.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm calculating total bytes available in particular folder and I want to convert the total bytes available to total bytes available in KB, MB, GB etc.  Is there any inbuilt function available in c# which I can use?  thanks,

How do I get a human-readable file size in bytes abbreviation using .NET?  Example: Take input 7,326,629 and display 6.98 MB


Have had Ubuntu 16.04 on my new machine for about 4-5 months now (ever since I bought it).  Today when shutting down, it generated a message which said:  NMI Watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0]   Can someone please help me get to the bottom of this?  My laptop is still in warranty, and if there is any hardware issue, maybe I can get it replaced right now. Not too worried about software bugs, but of course would like to have this rectified in any case.  Please let me know about any additional information which might be needed.

I get this error message   NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [plymouthd:305]    on the startup of my system (even with live-cd).  My PC is a dell inspiron 7559 with intel graphic and nvidia.  UPDATE - this issue also happens when attempting to install ubuntu 18.10 using LiveUSB


How can I prove by full induction that $n^{2(p+1)}-1$ is divisible by $n+1$?

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


I have a list  a = ['A', 'B', 'A', 'A', 'C']   and I want to generate all possible permutations of item indices for identical items in a list  [0,1,2,3,4] [2,1,0,3,4] [3,1,2,0,4] [0,1,3,2,4] [2,1,3,0,4] [3,1,0,2,4]   How to do this in a most pythonic way?

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


So when I use my desktop and delete \NAS\Files\Directory, that I can still recover the files from the NAS' recycle bin.  The NAS is just a normal Windows share on a Windows 7 computer. I don't like the idea that removing a file is permanent.  Currently when I delete a file on the Windows share over the network, it will not be moved to the recycle bin, but removed permanently. This seems normal behavior.

From a Windows workstation when I delete files over the network (e.g. a file share, server disk, etc) those files are never put into a trash can, either on my Windows workstation or on the server - they're instantly and permanently deleted. This has always sucked IMHO.  Is there a software that, in this scenario, puts the files into a trash can somewhere for easy undelete?  Maybe a Windows policy change, registry setting value, software utility, etc ?   -- Looking for a specific solution instead of general "Hey look into this, or try this". I'm convinced somebody has already solved this and can explain it. Thanks.


I have an object let myObj = {"info1": "", "info2": "", "info3": "", ......}  Here I want to remove info1 and info2. I tried splice, but it is throwing error. The pop method is also not working. How can I achieve that?

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


There's a limit that I am unable to solve. I think it should be equal to $\infty$. $$\lim_{n\to\infty}\left(1 + \frac{1}{2} + \frac{1}{3} + \cdots+ \frac{1}{n}\right)$$

Can someone give a simple explanation as to why the       $$\sum_{n=1}^\infty\frac1n=\frac 1 1 + \frac 12 + \frac 13 + \cdots $$   doesn't converge, on the other hand it grows very slowly?   I'd prefer an easily comprehensible explanation rather than a rigorous proof regularly found in undergraduate textbooks.


$$a=\sum_{n=0}^\infty\frac{x^{3n}}{(3n)!}\\b=\sum_{n=1}^\infty\frac{x^{3n-2}}{(3n-2)!}\\c=\sum_{n=1}^\infty\frac{x^{3n-1}}{(3n-1)!}$$Find $a^3+b^3+c^3-3abc$: $(a)\ 1$ $(b)\ 0$ $(c)-1$ $(d)-2$  Please help me solve this question. I added $a,b$ and $c$. It gives me the expansion of $e^x$. But i dont know how to use it.

How do I prove that $$ a^3+b^3+c^3−3abc = 1 $$ if   $ a = 1+\frac{x^3}{3!}+\frac{x^6}{6!}......$ , $b=x+\frac{x^4}{4!}+\frac{x^7}{7!}....$ , $c=\frac{x^2}{2!}+\frac{x^5}{5!}+\frac{x^8}{8!}......$ ?  I have tried the following :-  I discovered that $a+b+c=e^x$ and that $a=\frac{d(b)}{dx}$, $b=\frac{d(c)}{dx}$, $c=\frac{d(a)}{dx}$ . But I am unable to proceed further with these information.


I have googled on this issue. There seems to be no difference between using "" or '' to encapsulate a string. It is hard to decide. Is it correct to say it is a better idea to use "" because it is compulsory in json to use ""?

console.log("double"); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable.


I need to send information from arduino to an android phone, having some app actively listening for radio communication from arduino. Using nrf24l01 is that possible?   The best scenario would be direct communication, even without any type of handshake. Arduino sends a number sequence that android expects to receive, and the app alerts me when it ears that sequence.

I want to control a simple Light on an Arduino from my Android. The Arduino I have down pat, no problem. However without using Bluetooth on my Android, whats the simplest way to actually connect it (or use some sort of app) to control an LED.  I have Option A: Set up a Server on my Arduino, with a website that allows me to click on buttons or something to change lighting options.  or Option B: Sending Serial Data from my Android to my Arduino Wirelessly?  Which would probably be the easier option? Is option A even viable or not really? I don't really know the "hosting" capabilities of an Arduino, but if the Arduino is on the same Wi-Fi as the Android phone I'm using, it shouldn't have any issues receiving information (from clicking on buttons on the Arduino "webpage" correct?)


This is how I am calling LuaLaTeX in TeXstudio:  lualatex.exe -synctex=1 -interaction=nonstopmode --shell-escape %.tex   Doing a test run of my main document, I get this error throughout the document (in all the log files for the externalized TikZ images):  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Fatal fontspec error: "cannot-use-pdftex" !  ! The fontspec package requires either XeTeX or LuaTeX to function. !  ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex" ! instead of plain "latex" or "pdflatex". !  ! See the fontspec documentation for further information. !  ! For immediate help type H <return>. !...............................................     This is my configuration file for fonts:  \usepackage{fontspec} \usepackage{microtype} \usepackage{amsmath}  %%%%%%%% \usepackage{unicode-math} \setmainfont{TeX Gyre Termes} \setmathfont{TeX Gyre Termes Math} \setsansfont[Scale=MatchUppercase]{TeX Gyre Heros}   There is no further line in my document where inputenc or any other problematic tidbit is existent.  Basically,  I am clueless. How can I proceed here?  SOLUTION (edit)  One has to add:  \tikzset{ external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}, }

I've edited this post as I've broken the problem down to something smaller than a thesis. I can run the following command in the cmd window:   lualatex file.tex   with the following script no problem:  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.8}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{graphicx} \usepackage{float} \usepackage[hang,small,bf]{caption} \usepackage{color}  %\usetikzlibrary{external} %\tikzexternalize  \begin{document} The golden-crowned sifaka is a medium-sized lemur characterized by mostly white fur, prominent furry ears and a golden-orange crown.   \begin{figure}     \input{sdof.tex}     \caption{This is the caption} \end{figure}  \begin{figure}     \input{strain.tikz}     \caption{This is the caption} \end{figure}  \end{document}   But when I uncomment the   \usetikzlibrary{external} \tikzexternalize   lines and use the following:  lualatex --shell-escape -interaction=nonstopmode file.tex   it compiles the first figure into file-figure0.pdf no problem but when it gets to teh second, there are problems and it gives a fatal error  sdof.tex is a simple diagram i drew myself in inkscape and the second strain.tikz is matlab2tikz output of lots of data points from a test.


I know my boss could potentially see what sites I visit when I'm at the office if he would want to because I'm connected to the office WiFi or wired connection.  But what about when I'm at home on my own network and I have a VPN connection to the office? Tunnelblick is used for that on my OS X machine.  I think my main issue is that I don't know exactly how the VPN works. I only know that with it I can reach certain websites and svn repositories that are local to the office network. Is every http connection routed to my office or something? Or does it just change my IP maybe? Tunnelblick keeps track how many MB is received and send through the VPN and I'm curious how that exactly works as in how does it know what needs to be send over the VPN, but maybe that's another question on its own. My main concern is whether my boss can see my browsing behaviour that way.

I have to connect to client's network over VPN, and I was wondering if the client can intercept (and read) my Google Talk messages (or any other IM communication) while I'm VPN-ing.  My main concern is them having access to our internal conversations.  Suggest workarounds if you have any.


In PCB / PWB boards we are following 50ohm impedance for single ended lines and 100ohm impedance for Differential lines? is it a standard value for all device input and output impedance? Each and every IC internal architecture done by millions of transistors so this impedance values determined by the IC pins connected to which pin of the transistors (BJT/FET)? Could you please help me to clarify this? thanks in advance.

Where does this number come from?  For single ended it must be 50 ohm and for differential pairs 100 ohm. Why?  For PCB with controlled-impedance these are that common numbers. Outside of the PCB you can find others numbers for characteristic impedance. But what is the reason of use these numbers for the PCB tracks?


On one hand, this site is the meta site for "stack overflow."  On the other hand, this site seems to be the meta site for the rest of SE, or at least the other SE meta sites. I joined this site in the latter capacity when one of my questions on another meta site was redirected here.  At the very least, this site seems to be a meta site for other things than "stack overflow."  Is my observation correct, and if so, how and why did this come about.

I've just asked six questions on , and one has been referred to this site.  Looking closer, I realized that this meta site is not just for Stack Overflow, as it seems from its name.  I think I'll need to transfer a couple of my questions over here.  Why are the two metas (the one for Stack Overflow and the one for all sites) merged into one instead of being separate?


I have LineageOS on my phone. I'm looking to edit some files in /system.  I'm using root permission for adb devices from Developers Options. When I request to move file into /system, I get the message no permissions.  I tried to change permission with chmod but its not working. Since I don't have root permission for apps I can't change it from file manager either.

How can I mount the /system directory rewritable or read-only on my Android phone?


MacOS seems to assume a WLAN connection to be free of charge if and only if it is not a tethered iPhone connection. So it will run all background update and maintenance processes via that WLAN connection. As my WLAN is in fact a small box with LTE access (payed by volume) I would like to configure the connection as if it were a tethered mobile connection, which it really is.  The answers to the similiar question  all recommend some third party tools, how can I solve it solely with built-in functionality and tools (macOS Sierra, if it helps)?

I'm being forced to use my Macbook more and more with my metered 4G connection. I really need to keep data usage limited. Windows has an  mode which really helps with this.   What's the best way to handle this issue in the OSX world? Perhaps some use of the firewall? Is there any sort of logging happening as to what is using the network?  Thanks for your help :-)


I have a question about the meaning of "in" in these two sentences :            The law in the way it applies to education does not affect this school.      He carried himself well in the way he handled the situation.        Is the "in" in the first sentence the same as the "in" in the second sentence?

For these two sentences:     "People affect the law in the way it affects people." "People discuss the law in the way it affects people."   , could "in the way" have different meanings in the two sentences?  EDIT ADDITION:    But "in the way" appears to be often suggested as a definition for "as" when "as" is used in my original sentences like this:       1a. "People affect the law as it affects people."   2a. "People discuss the law as it affects people."   What do the "as" in 1a and 2a mean?  Are the as's in 1a and 2a different?


1)  $ 36 ÷ 6( 9 – 3)  = ?$ $1$ or $36$     2) $36 ÷ 6^{ (5 – 3)} \times 6 = ?$  $6$ or $216$    My Attempt :   I used   "VBODMAS" rule to solve the problem.    1)  $ 36 ÷ 6( 9 – 3)  =36 ÷ 6$ of $6$  $= 1$  2) $36 ÷ 6^{ (5 – 3)} \times 6$ = $36 ÷ 6^2 \times 6$ =  $1 \times 6  = 6$   Actually I am confused about the use of 'OF' in 'VBODMAS' rule.. Can anyone please help me out?

There is a huge debate on the internet on the value of $48\div2(9+3)$. I believe the answer $2$ as I believe it is part of the bracket operation in BEDMAS.  yields the same answer. I also believe that if $48\div2\times(9+3)$ was asked it would be $288$ which Mathway agrees with as well. However,  says it is $288$ either way. A friend of mine (who is better at math) told me that there is no such thing as 'implicit multiplication', only shorthand so that is in fact done after the division (going left to right, not necessarily because division occurs before multiplication. But he didn't explicitly give a reason) What is the answer and why?


I would like to know if my query is safe from an SQL injection.  Below is the PHP Code  $orderid = mysql_real_escape_string($orderid); mysql_query("SELECT * FROM orders WHERE id =\"".$orderid."\"");     Also   If the end user can change the order ID to what they wanted, what could they do here as worst case scenario?

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


Suppose an apple is produced in a place called Gotham. Can I call it Gotham's apple to indicate the place of its orign?  I guess it is natural to call it an apple from Gotham or a Gotham apple by using the proper noun as an adjectve. I understand that salmon caught in Alaska are usually called Alaskan salmon or Alaska salmon. But I have spotted on the Internet Alaska's salmon.

I know that to mark possession of an item you can use 's like in the following example:     The user's password shall not be blank.   However, is it correct to use the following:     The car's antenna is embedded in the windshield.   I seem to remember that possession must only be used for people but I'm not certain really.


To obtain the Enthusiast or Fanatic badge, do we just need to visit while logged in each day or do we also have to have some activity (such as editing, answering, asking, commenting, etc.)?

I'm pretty depressed that I'm finally one of the people posting this, since I'm usually telling those people "you're obviously wrong", but either I don't understand how consecutive day counting works or this seems impossible:    The last activity count is right; I was on SO at about 18:30Z yesterday (Saturday). Is it possible for the consecutive count to be at 1 if my last activity was yesterday? It would seem like it has to be at least 2 then (although I was definitely active Friday; I suspect Saturday is the "missing" day since all I did was poke through the newest question list and check the current flags)


$PQ$ is a chord in a circle such that $PO=OQ$  The chords $AB,CD$ are passing throw $O$.  The chords $AD,BC$ are cutting $PQ$ at $E$ and $F$ reciprocally.  Need to prove: $EO=OF$.  If so i solved it in trigonometry but im asking if there is an euclidean solution. if so, i'd love to see! thanks.     EDIT: $O$ is not the center of the circle.

Bernhard Elsner, alias MathOMan, posted this exercise in plane Geometry,  on January $29$th, $2010.$  "Let $\mathcal{C}$ be a circle, $A,B$ two distinct points on $\mathcal{C}$ and $M$ be the midpoint of the chord $[AB]$. Take two other chords,$[PQ]$ and $[SR]$, that pass through $M$. Let $C$ (resp. $D$) be the intersection of $[AB]$ with $[PS]$ (resp. $[RQ]$). Prove that $M$ is the midpoint of the chord $[CD]$."    To prove it I've written the following (failed) argument, in the  of this post (translation of mine):    The figure is symmetric with respect to $M$: $\overline{AM}=\overline{MB}$, $\overline{PM}=\overline{MU}$, $\overline{RM}=\overline{MW}$, $\overline{QM}=\overline{MV}$, $\overline{QR}=\overline{VW}$, $\overline{SM}=\overline{MT}$. From $\dfrac{\overline{SC}}{\overline{DT}}=\dfrac{\overline{CM}}{\overline{MD}}=1$ follows that $\overline{CM}=\overline{MD}$.  Here is an extract of the author's reply (translation of mine):   "It is not clear that  $\overline{QM}=\overline{MV}$. Is the point $V$ on the line $(QM)$ defined by this equality or is $V$ defined as the intersection point of the lines $(QM)$ and $(WC)$? Why are both definitions to give the same point?  Let $C^{\prime }$ be the intersection of $(SP)$ and $(VW)$, and $D^{\prime }$ the intersection of $(TU)$ and $(QR)$. (...)  One still has to show that $C^{\prime }=C$ and $D^{\prime }=D$."   I have agreed with these objections.  Until now no proof has been posted. The author considers that the "proof is not quite simple".  Q. What is the theorem this exercise refers to? Or how does one prove it?


As I'm completely new to statistics and clinical trials, I would ask you for help and clarification.  Let's assume we have 2 really small samples (each of n = 2, or so) derived from two normally distributed, infinite populations (with sigma of each being unknown). We would like to check whether the means of those populations are significantly different (alpha = 0.05). To do so, we perform a t-test for difference of the means and achieve statistical significance (p-value = 0.04).   I was told, that this approach is wrong and one cannot infer from the p-value derived from the test of such a small sample size. I do not understand why.  I know, that if the sample size is so small:   we can not test for population normality (and t-test is based on this assumption) the mean of our sample  is more likely to be distant from the population mean the variance of our sample is more likely to be underestimated   But I thought, that if:   I already know, that my population is distributed normally SD of the mean depends on the sample size t-test takes into account the issue with the underestimated population variance (by the fact, that t-distribution depends on the sample size and the smaller the sample size, the more the variance is underestimated; am I right?)   this solves all the issues. I know that this way I'll receive really huge confidence intervals, but I'm still able to achieve significance when the differences are big enough. As I understand, wider confidence intervals are "a penalty" for inaccurate estimates of population mean and variance. But why p-value should be considered wrong as well? The distribution is normal, so I'm not violating any assumptions.  If the p-value would be non-significant (p>0.05) I definitely won't infer that the null hypothesis is true, because I know this test is likely to be underpowered. I only want to know how can I interpret the obtained significant p-value and why it's not as valuable, as a significant p-value derived from the sample of n=30?   To extend this problem, what would happen if the population distribution were not known and I used some sort of nonparametric test, instead of the aforementioned t-test?  Thanks!

I'm currently working on a quasi-experimental research paper. I only have a sample size of 15 due to low population within the chosen area and that only 15 fit my criteria. Is 15 the minimum sample size to compute for t-test and F-test? If so, where can I get an article or book to support this small sample size?  This paper was already defended last Monday and one of the panel asked to have a supporting reference because my sample size is too low.   He said it should've been at least 40 respondents.


I have this for loop used to fill html div using JQuery:  for (i = 0; i < count; i++) {                 //console.log(condizioniList[i]);                 var $pendenzaHTML = $("

  <input type='checkbox' name='my-checkbox'  class='checkbox' value=''>

");                  $pendenzaHTML.prop("id", "pendenza"+i);                 $pendenzaHTML.find(".col-80").prop("id", "colItem"+i);                 $pendenzaHTML.find(".col-80 > .titoloPendenza").text(condizioniList[i].descrTributo);                 $pendenzaHTML.find(".col-80 > .scadenza").text("Scadenza: " + condizioniList[i].scadenza);                 $pendenzaHTML.find(".col-80 > .importo").text(condizioniList[i].importo +"€");                 $( "#lista-pendenze" ).append($pendenzaHTML);                  $("#colItem"+i).on("click", function(){                     console.log('.picker-' + i);                     myApp.pickerModal('.picker-' + i);                     $(this).parent().css("background-color","#969696");                     $(".col-80").not(this).parent().css("background-color","#bfbfbf");                     //console.log('.picker-'+ condizioniList[i].pickerNumber);                 });             }       }   I would like to set different click events for each item with different id, like this: #colItem0 onclick will open modal with class .picker-0, #colItem1 will open .picker-1 and so on. In this way all divs will open .picker-3 (count = 3). How can i get this working?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Is there any Sandbox for posting question? I beleive I can only post comment or answers in the existing Sandboxes (Formatting and API sandbox), Do I need to Create a new question in order to test question add API?Could anybody help on this?

I have noticed a behaviour that may or may not be a  bug. It is a discrepancy between the preview and the rendered result, which is why I would need to post a question to check it out.  Is there an official place to do that?


I have a shapefile of different administrative regions that are in all 50 states in the USA. I also have many lat/long coordinates, and I'm using NNJoin in QGIS to find the distance from each point to the nearest polygon.  I'm wondering which projection (if any) should I use to minimize distortion when calculating distances in the entire USA region? Or would it be better to do three batches, one for contiguous USA, one for Alaska and one for Hawaii (if so, which projections then)?

I'm on a project requires integrating data for all states in the US. It means I have two roadway datasets and I'm going to assign the attributes of roadways in one dataset to the same roadways in the other dataset (similar to spatial join). Each state is an independent shapefile and I need to merge them all at the end to generate the final product.     I'm wondering which projected coordinate system should I use in this case? Or it doesn't matter at all since it won't affect the result of geoprocessing? For my past work, I only mapped small area so I chose state plane NAD 83 of specific area as projected system.


I want to do something like this.  $ touch a\ b $ cmd=cat\ a\ b $ echo $cmd cat a b $cmd cat: a: No such file or directory cat: b: No such file or directory   There are problems with the spaces in the file a b. So I tried this.  $ cmd=cat\ a\\\ b $ echo $cmd cat a\ b $ $cmd cat: a\': No such file or directory cat: b: No such file or directory   Which also fails. How do I make it so that when I run $cmd I cat a b?

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


how to find if this sequence converges or diverges. Please help I am having hard time to solve this.  (1+(1/n))^n

I was reading about how completeness is required for limits. And I came across this:     the sequence $a_n=(1+1/n)^n$ is monotonically increasing and bounded by 3 and so we expect it to converge, but that it does not converge within $\mathbb{Q}$. More generally it stands to reason that any sequence of real numbers which is increasing and bounded must converge to some real number. This is a consequence of completeness of $IR$   My question is: How is the mentioned sequence monotonically increasing and bounded by $3$ ?


I have unmet dependencies so my upgrade command fails with:  You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  linux-image-extra-3.19.0-80-generic : Depends: linux-image-3.19.0-80-generic but it is not going to be installed  linux-image-generic-lts-vivid : Depends: linux-image-3.19.0-80-generic but it is not going to be installed                                  Recommends: thermald but it is not going to be installed   the problem is that I have full boot partition so apt-get -f install fails.  Unpacking linux-image-3.19.0-80-generic (3.19.0-80.88~14.04.1) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-3.19.0-80-generic_3.19.0-80.88~14.04.1_amd64.deb (--unpack):  cannot copy extracted data for './boot/vmlinuz-3.19.0-80-generic' to '/boot/vmlinuz-3.19.0-80-generic.dpkg-new': failed to write (No space left on device)   I tried to remove unused kernels with   apt-get purge linux-image-3.19.0-25-generic   but it fails with original error - unmet dependencies.  So I have circular dependency in issues with upgrade. What is the safest way to resolve it? Is it safe to manually delete kernels from /boot?

My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error:  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f.   I tried running apt-get install -f and this was the output(after saying yes on prompt)  (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device  No apport report written because the error message indicates a disk full error                                                                           dpkg-deb:    error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic   /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried running apt-get autoremove and it gives me the same error as apt-get upgrade.  When I run df, I get this for /boot:  /dev/sda1                    233191     230297         0 100% /boot   So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with:  $ dpkg -l linux-image-\* | grep ^ii ii  linux-image-2.6.38-13-server  2.6.38-13.52  Linux kernel image for version 2.6.38 on x86_64 ii  linux-image-3.0.0-13-server   3.0.0-13.22   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-14-server   3.0.0-14.23   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-15-server   3.0.0-15.26   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-16-server   3.0.0-16.29   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-17-server   3.0.0-17.30   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.2.0-24-generic  3.2.0-24.39   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-25-generic  3.2.0-25.40   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-26-generic  3.2.0-26.41   Linux kernel image for version 3.2.0  on 64 bit x86 SMP   When I try to remove the oldest with this:  $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be     installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   How can I free up or extend boot without messing up my installation?


Is there any difference in prepared query structure and thence performance, between  select *  from employee e join division d     on e.eid = d.eid     and e.div = d.div     and e.level > 5     and e.startDate > sysdate - interval '60' month ;   and:  select *  from employee e join division d     on e.eid = d.eid     and e.div = d.div where      e.level > 5     and e.startDate > sysdate - interval '60' month ;

After reading it, this is not a duplicate of . The answer may be related (or even the same) but the question is different.    What is the difference and what should go in each?  If I understand the theory correctly, the query optimizer should be able to use both interchangeably.


Why do we use SSE (the sum of squared errors) in calculations. Why do not we use the sum of errors? Could you explain please?

As I was working my way through my book about statistics, I came across the topic of linear regression. During the chapter the author begins with explaining that you want to minimize the residuals in order to make your y = a + bx as good a fit as possible: I do understand this, but halfway the chapter all of a sudden the residuals change into sum squares of residuals. Why is this done? I have been googling, but couldn't find the right answer. Who would like to help me understand why the sums of squares of the residuals is used instead of just the sums of residuals?  Kind regards, Bas


Calculator.h  class Calculator {     Calculator();     template<typename... Args>     static auto add(Args... args); };   Calculator.cpp  #include "Calculator.h"  Calculator::Calculator() {}  template<typename... Args> auto Calculator::add(Args... args) {     return (args + ... + 0); }   main.cpp  #include <iostream> #include "Calculator.h"  int main(){     Calculator cal;     std::cout<< cal.add(1,2,3); }      Function 'add<int, int, int>' with deduced return type cannot be used before it is defined   If I move the add() method into the header file, there is no error.  What am I missing?

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


I am running Ubuntu 13.04 on a 250 GB hdd. This HDD has developed bad sector and I received replaced drive from Manufacturer. I am also running a RAID1 using mdm.  I want to move the existing setup to new hard drive.  Can someone please give suggestions.   Thanks for your answers.  Cheers.

Is there a way, that I could backup all my programs, all apps, put them in a directory or something, so that I could install them quickly next time, without having to manually going over the app center, downloading them from terminal, etc?  Note that I might import them from a distro other than the one I exported them on. So, say I'm in Ubuntu, exported some stuff, and then installed BT and wanted to import them from there.


Let $X$ a scheme. Why do localy finitely presented $\mathcal{O}_X$-modules are quasi-coherent? Does my explaination is correct: one has locally on an open $U$, $$ \mathcal{O}_U^m\to \mathcal{O}_U^n\to\mathcal{F}_{|U}\to 0 $$ so that $\mathcal{F}_{|U}\simeq\mathcal{O}_U^n/\text{Im}(g)$ with $g:\mathcal{O}_U^m\to\mathcal{O}_U^n$, but if $U=\text{Spec}(A)$ one has $\mathcal{O}_U^n=\widetilde{A^n}$ and I guess that the image $\text{Im}(g)=\widetilde{N}$ with $N$ a sub $A$-module of $A^n$ so that $\mathcal{F}_{|U}=\widetilde{A^n/N}$.   In general why locally generated $\mathcal{O}_X$-modules are not quasi-coherent? Here one has locally $f:\mathcal{O}_X^n\to\mathcal{F}_{|U}$ an epimorphism so that $\mathcal{F}_{|U}=\widetilde{A^n}/\text{ker}(f)$. The key point is then: image between quasi-coherent sheaf stay quasi-coherent (here $\text{Im}(g)$) but kernel of (quasi-coherent)$\to$($\mathcal{O}_X$-module) is not always quasi-coherent? Correct?

Hartshorne's Algebraic Geometry defines an $\mathcal O_X$-module $\mathscr F$ to be quasi-coherent if there is an open affine cover $(U_i=\operatorname{Spec} A_i)_{i\in\mathcal I}$ of $X$ such that each $\mathscr F\rvert_{U_i}$ is isomorphic to the sheaf of modules $\widetilde{M_i}$ associated to some $A_i$-module $M_i$. It is later proved that this is equivalent to the statement that for any open affine $U=\operatorname{Spec} A\subseteq X$, there exists an $A$-module $M$ with $\mathscr F\rvert_U\cong\widetilde M$.  On the other hand, Grothendieck's Éléments de Géométrie Algébrique defines $\mathscr F$ to be quasi-coherent if every point $x\in X$ admits an open neighborhood $U\subseteq X$ such that $\mathscr F\rvert_U$ is isomorphic to the cokernel of a morphism of free $\mathcal O_U$-modules.  Now I wonder how those definitions are equal. I tried proving it by myself, but both directions seem quite nontrivial to me... Any hints?