Not entirely sure what this error means. In the code below, I am using a FileSystemWatcher to wait for a file with a ".gz" extension to appear in the directory, to which will then perform the "ExtractFile" method. But, I am receiving an error on the line where I declare the "filePath" string saying "Cross-thread operation not valid: Control 'ddlReportType' accessed from a thread other than the thread it was created on".  I have found some solutions of people using Invoke but I am not sure how to incorporate that into my code. Any help with this will be appreciated. Thank you!  Below is my code:      [PermissionSet(SecurityAction.Demand, Name="FullTrust")]     public void MyWatcher()     {         FileSystemWatcher watcher = new FileSystemWatcher();          watcher.Path = "C:\\Reporter";         watcher.Filter = "*.gz";          watcher.NotifyFilter = NotifyFilters.FileName            | NotifyFilters.DirectoryName;          watcher.Created += new FileSystemEventHandler(ExtractFile);         watcher.EnableRaisingEvents = true;      }      public void ExtractFile(object source, FileSystemEventArgs e)     {              string filePath = @"C:\Reporter\" + ddlReportType.Text.Substring(0, 1) + "_"                            + ddlDateType.Text.Substring(0, 1) + "_" + lblVendorID.Text + "_" + txtDate.Text + ".txt.gz";              string filePath2 = @"C:\Reporter\" + ddlReportType.Text.Substring(0, 1) + "_"                 + ddlDateType.Text.Substring(0, 1) + "_" + lblVendorID.Text + "_" + txtDate.Text + ".txt";               FileStream sourceFileStream = File.OpenRead(filePath);             FileStream destFileStream = File.Create(filePath2);              GZipStream decompressingStream = new GZipStream(sourceFileStream,                 CompressionMode.Decompress);             int byteRead;             while ((byteRead = decompressingStream.ReadByte()) != -1)             {                 destFileStream.WriteByte((byte)byteRead);             }              decompressingStream.Close();             sourceFileStream.Close();             destFileStream.Close();      }

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


About two weeks ago I performed some reviews from . Per my recollection, back then I commented on about 60-80 link-only answers.  Today, I  I commented from review queue.  As far as I can tell almost 40 posts remained unchanged. About 7-8 answers have been improved by their authors. The rest of commented posts may have been removed, but I can't tell how much because comments made to deleted posts disappear from the list at my profile page.  That so much of my comments appear to be in vain made me wonder how this review is expected to work? Was I supposed to check it later, maybe after a month or two, or three or more?  For the reference, below is a list of link only answers that did not change (full text quotes).

I think we can all agree, this sucks:  If you've been around a little while, you've probably encountered hundreds of answers like this in various forums, some of them even marked as "The Answer" by well-meaning1 forum admins looking to close a thread. We could try to enumerate the commonly-observed problems with it...  Link is probably broken If link isn't broken, it's spam If link isn't spam, it's to some broadly-related resource that the answerer found by pressing "I'm feeling lucky" when googling the question's title.  ...but the real issue here is that we don't know! Even if the link was originally pointing directly to the most awesomeest answer ever for exactly the question being asked, there's nothing in the answer itself to even hint at what direction we're being pointed in. Strip the markup, and this is what you're left with:  i think you should take The tutorial HERE! This will help you a lot  Is there even one tiny speck of information there? No. Even the title of the page being linked to would have provided something to go on, but that was entirely too much work. So let me be clear: this sort of response is not an answer. If you see this, flag it. Moderators, if you see it flagged, delete it. There's really only one valid exception to this rule, and that's when the question is:  Suggest me some tutorials where i can learn quick.  Don't get me wrong, it's still a bad answer - but when the question is kinda asking for bad answers this is to be expected. Close or flag the question and move on - this is much more efficient than hanging around to babysit it by deleting every crap answer that inevitably shows up. If you're still reading, you're probably getting really bored by now. "Gee, Shog - answers that contain ZERO information are terrible, horrible, very-bad things? What shocking revelations will you share next?" Yeah. It's really simple... Except, . See, the problem is that once you step away from black-and-white "answers / doesn't answer" decision-making, things get... Interesting. And all those other answers with links in them See, this is an answer:  And so is this:  Yes, they're both very short, and yes, they contain links. But strip the markup, and you still get at least a little bit of useful information. Does that mean these answers should forever hang around the site? No, not necessarily - if it turns out they're just not that useful, they should probably still be removed - or at very least, down-voted so that they rank below other answers. Just remember: if the text of the post contains an honest attempt at answering the question, then it is an answer - so don't flag it otherwise, and if you do, don't complain if your flag gets declined. Answers & Apples If you're still confused, forget about answers. Think about apples instead:  Answers are just like that, but less tasty in pies.  1 By which I mean to say, "criminally lazy"


New to Python, with some background in C & Javascript.   I have the following two functions and test cases:   def switch(a, b):     print("switch__You gave me (%d, %d)." % (a,b))     y = a     a = b      b = y     print("switch__The order is now (%d, %d)" % (a, b))  def sortHi_Low(c, d):     print("SORT You gave me (%d, %d)." % (c,d))     if (c < d):         switch(c, d)         print("SORT The order is now (%d, %d)" % (c, d))     else:         print("SORT The order did not change (%d, %d)" % (c, d))  print("Case 1 \n") sortHi_Low(10, 3)  print("\nCase 2 \n") sortHi_Low(4,5)   switch() works as anticipated. sortHi_Low()runs switch(), but always returns the numbers in the same order they have been passed in.   My understanding with Python is that objects are always passed by reference. When switch took in the sort's variables as parameters, it should have changed their value by reference - then the sort should have returned those new values. However, this is what prints in the interpreter.   Case 1  SORT You gave me (10, 3). SORT The order did not change (10, 3)  Case 2  SORT You gave me (4, 5). switch__You gave me (4, 5). switch__The order is now (5, 4) SORT The order is now (4, 5)   The sort should go Hi to Low, but does not work.

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Is it possible to find a without knowing its name?   I created a file with LaTex, then I copied it into another local directory and renamed the pdf. I don't know any more where the original file is located, but I have the renamed file on hand. I would like to make some modification to my latex file and recreate the pdf.   Since I know the original file is exactly the same as the renamed one except for the name,  is there any way I can find my original file?

I have a largish music collection and there are some duplicates in there. Is there any way to find duplicate files. At a minimum by doing a hash and seeing if two files have the same hash.  Bonus points for also finding files with the same name apart from the extension - I think I have some songs with both mp3 and ogg format versions.  I'm happy using the command line if that is the easiest way.


I remember a word that is spelled something like 'meanual' labor or work. It is supposed to mean not manual (physical) but just something which requires a lot of hard work and grinding.

Example:      "More Effort" is good for [non-creative] tasks, like building a wall or cleaning your room. But when it comes to creative tasks - like writing a novel or music - it is good to get your mind in a placid state where the work feels effortless.   i.e, it's a task you don't really have to think much about while doing. It's not cognitive, per se.


How to download the latest .deb of Vivaldi browser using wget with the help of wildcards? Vivaldi can't be downloaded without entering the exact name and number of the latest build. For example, wget https://downloads.vivaldi.com/stable/vivaldi-stable_3.5.2115.81-1_amd64.deb  I tried to replace the middle segment, containing numbers with the wildcard asterisk (*) but it didn't work. wget https://downloads.vivaldi.com/stable/vivaldi-stable_*_amd64.deb  Maybe there are other wildcard symbols, less known, that could do the job.

How to download the latest .deb of Vivaldi browser using wget generic  command (with the help of wildcards)? Vivaldi can't be downloaded without entering the exact name and number of the latest build. For example, wget https://downloads.vivaldi.com/stable/vivaldi-stable_3.5.2115.81-1_amd64.deb  What I want is something easy like in the case of firefox and google-chrome, where wget -nc -O ${HERE}/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US"  and wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb  are working very well, downloading the latest versions of these browsers without the need to specify the exact name and build number, unlike in the case of Vivaldi. I want to have a script that downloads this browser(Vivaldi) anytime without my intervention to update/change it.


I am buying my first camera, but there is so much variety i don't know what to choose. Is Canon EOS 70D a good beginners camera, with the kit lens 18-135mm lens? Not looking in to buying another lens in the near future. I mostly take pictures of the nature, landscapes and street. Sometimes portrait. Is the kit lens OK for that, and is the camera good for its price or is there an equal good one that's cheaper?

I basically decided on a whim (from reading this site, talking to some friends, and always admiring great photos) that I want to get into photography.  Are there disadvantages to starting out with a prosumer camera like the Nikon D7000? I know stuff will be more expensive, but will there also be greater frustration or complexity?  (I am the kind of person who tries to find reasons to justify the extra cost even when I know deep down that it's not necessary...)


The Homework Exercise I am working on, is:     Let $\overrightarrow{a}, \overrightarrow{b}$ be vectors. Show that    $\overrightarrow{a} \cdot  \overrightarrow{b}=\frac{1}{4}\left(\Vert{\overrightarrow{a}+\overrightarrow{b}\Vert^2}-\Vert{\overrightarrow{a}-\overrightarrow{b}\Vert^2}\right)$.   Things I tried:   Using the property $\Vert \overrightarrow{u}\Vert^2=\overrightarrow{u} \cdot \overrightarrow{u}$, I tried to make $\Vert{\overrightarrow{a}+\overrightarrow{b}\Vert^2} =\left(\overrightarrow{a}+\overrightarrow{b} \right) \cdot \left(\overrightarrow{a}+\overrightarrow{b} \right)$ and $\Vert{\overrightarrow{a}-\overrightarrow{b}\Vert^2} =\left(\overrightarrow{a}-\overrightarrow{b} \right) \cdot \left(\overrightarrow{a}-\overrightarrow{b} \right)$   I'm not sure if that was a correct step, but then I substituted into the main equation to get  $$ \overrightarrow{a} \cdot  \overrightarrow{b}  = \frac{1}{4}\left( (\overrightarrow{a}+\overrightarrow{b} ) \cdot (\overrightarrow{a}+\overrightarrow{b} ) - (\overrightarrow{a}-\overrightarrow{b} ) \cdot  (\overrightarrow{a}-\overrightarrow{b} )  \right) $$  Am not sure where to go from here, or if I'm even heading in the right direction...

For a real (or complex) inner product space $V$, the inner product can be expressed in terms of the norm as either $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2) $$ or $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2+i\|x+iy\|^2-i\|x-iy\|^2) $$ respectively.  These identities are not hard to verify directly once they are given. I would like to know, is there a systematic way one would derive these from scratch without knowing them beforehand, or are both polarization identities just clever observations?


How can we set html contents into an Iframes body, instead of call a url of a page by its src attribute? Note: I want a perfect code, i mean that should able to work in all browsers.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


Is there a way to feather a selection within one plane in order to have 2 different variables of a procedural texture blend into each other? I can't seem to avoid the hard edge in between the 2 procedurals.

I need to make the transition smoother between the 2 different colored objects in my scene, somehow like one of the colors fades into the other one, while still keeping the line between them.


I'm puzzled by something in my js. Normally I define functions like this:  function f(){     // do stuff }   but I can also define functions like this:  f = function(){     // do stuff }   I always thought there is no difference between them, but I now found that this is working:  f = function(){     alert('IT WORKS!!'); }  function createCallback(request){     request.done(function(data){         var html = '';         data['result'].forEach(function(bill){             html += "
" + bill.title + "
";         });         $("#someId").html(html);     }); }   but when I define f as follows:  function f(){     alert('IT WORKS!!'); }   and I click on the row, it gives a ReferenceError: f is not defined.  So I wonder: what is actually the difference between function f(){} and f = function(){}?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I am trying to run this code:  # create virtual multi-band raster  gdalbuildvrt -separate rgb.vrt red.tif green.tif blue.tif # write multi-band raster into geotiff gdal_translate -of GTiff -co PHOTOMETRIC=RGB rgb.vrt rgb.tif   I want to know how to be able to do this in a terminal outside of QGIS.

I found some batch code using ogr2ogr in order to convert and reproject vector layers. The difficulty for me is to know what to install and which gdal commandline should I use, and how to configure it...  The fact is I'm quite lost with all the packages that gdal offers and I don't know :   which package am I supposed to install : OSGeo4W, FWTools, MS4W,...?? What is the difference between them ? Can I use any of them ? What is the procedure to set PATH and environment variables ? I work with windows 7. I have already QGIS and GRASS installed on my computer. Is an installation of gdal could damage anything ?


Specs:  Dell Latitude D820 Laptop Computer Intel Dual Core Processor w/ 2.0 GHz clockspeed Intel GMA 950 GPU w/ 256 MB VRAM 4.0 GB RAM 32-Bit OS  The computer is atrocious, I know. But I want to know if I'm capable of running Ubuntu. With those specs, what would be the recommended version to install?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


Maybe It seems very trifling for someone else. But this is something making me puzzled.    He may seek some seasonal help. He may be seeking some seasonal help.   What are the differences between the meaning of these sentences? I know both sentences are grammatically perfect and similar in meaning.In the second sentence, seeking is used as an participle adjective to qualify subject but does it change the meaning of second sentence?

I may not be coming in tomorrow...    I might not be coming in tomorrow...       When should I use "may" and "might"?


for a while I have been interested in the details of the construction  of the integers from the natural numbers. credit to the software, for as soon as I began writing this, for it drew my attention to a very apposite discussion from  on MSE about a year ago. i hope to revisit that discussion, as i am still not familiar with some of the references there, but perhaps this exercise will help me to make progress with more abstract ideas. so my question is - is the following method a reasonable way of deriving the integers from the natural numbers, explaining, by the way, a very good reason why a negative times a negative comes out positive. you can actually calculate it, with the $\star$operation introduced here.  the additive monoid $\mathbb{N}$ is also furnished with a multiplicative structure on $\mathbb{N}^+ = \mathbb{N} \setminus\{0\}$ which it pulls back (via the natural bijection) from its own multiplicative monoid of injective endomorphisms.  $\mathbb{N} \times \mathbb{N}$ is an additive monoid with the obvious addition performed elementwise. we define  $$(a,b) \star (c,d) = (ac+bd, ad+bc) $$ the $\star$-multiplication is commutative, associative, distributive over addition, and has an identity element $(1,0)$.  $\mathbb{N} \times \mathbb{N}$ is the union of three sets $\mathbb{M}^+,\mathbb{M}^0$ and $\mathbb{M}^-$ which intersect only in $\{0\}$. each is a submonoid. an element $(a,b)$ is in $\mathbb{M}^+,\mathbb{M}^0$ or $\mathbb{M}^-$ as $a \gt b, a=b$ or $a<b$.  with respect to the $\star$-multiplication $\mathbb{M}^+$ and $\mathbb{M}^0$ are closed under this operation. $\mathbb{M}^0$, however has an ideal-like property -it is absorbing. if $m_0 \in \mathbb{M}^0$ then for any other $m \in \mathbb{N} \times \mathbb{N}$ we have $m_0m \in \mathbb{M}^0$. the remaining relations may be summarized by  $\mathbb{M}^+\star\mathbb{M}^- \subset \mathbb{M}^-$ and $\mathbb{M}^-\star\mathbb{M}^- \subset \mathbb{M}^+$.  now take two copies of $\mathbb{N}^+$, the second of which we shall call $\mathbb{N}^-$, and define $\mathbb{N}^0=\{0\}$. we define the set  $$\mathbb{Z} = \mathbb{N}^+ \cup \mathbb{N}^0 \cup \mathbb{N}^- $$ define  $$\psi: \mathbb{N} \times \mathbb{N} \rightarrow (\mathbb{N},0) \cup (0,\mathbb{N}) $$in terms of three auxiliary functions, $\chi^+$ and $\chi^-$ the indicator functions for $\mathbb{M}^+$ and $\mathbb{M}^-$, and $\tau: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ defined by $\tau(a,b)=max(a,b)-min(a,b)$. then we may write $$\psi(m)=(\chi^+(m)\tau(m),\chi^-(m)\tau(m)) $$ although $\psi$ is not quite a morphism, its kernel is $\mathbb{M}^0$, and restricted to either $\mathbb{M}^+$ or $\mathbb{M}^-$ is a morphism of monoids. moreover it preserves the multiplicative structure, subject to the sign permutation already mentioned. so it gives the usual multiplicative structure on $\mathbb{Z}$.

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


I would like to reject unknown USB by default, and ask for a password to mount every time an unauthorized USB enters one of my pleasure holes. so for instance, all USB’s that are currently connected (keyboard, mouse, webcam etc) are allowed by default without problem. however if I plugin a new usb device, I want my system to automatically ask for my password before it gets mounted. is this possible? I found this;  however it’s from 2007 and I believe there should be a setting or program (usbguard?) to already do what I ask for. Question 2) Also I don’t understand the difference between a usb device and a usb interface? (somebody care to explain?) thanks in advance

When inserting a USB stick or device to computer, there is always the risk that the device is malicious, will act as an HID and potentially do some damage on the computer. How can I prevent this problem? Is disabling HID on specific USB port sufficient? How do I do that?


I'm starting my sysadmin education and want to learn OS installations etc. The system I want to learn includes cPanel, but it seems there's no way to actually experiment with cPanel on a virtual environment and/or without paying for a license. Can someone give me advice how I can experiment with learning cPanel installation as part of an installation on virtual environment?

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


I'm working on a Java program that takes an input String called input which looks like   '(A A A A B C C D E E E E)   And my output, A String[] called Letters that should look like  [A,B,C,D,A,E]   And another Array, an int[] called count that should look like  [4,1,2,1,2,4]   And I have code that looks like below, but for some reason, every time I run it it won't work. The print statements read that it doesn't ever go to the if statement. Line 2 on the second loop reads:      Check if A == A   Then it goes to the else statement and prints     A != A   What am I doing wrong? Why is A (items[0]) not equal to A (checkagainst)?   private static boolean func2(String input){ /*input: '(A A A A B C C D E E E E)     input = input.replace("'","");//replace to null char     input = input.replace("(","");//replace to null char     input = input.replace(")","");//replace to null char     System.out.println(input);     String[] items = input.split(" |\u0000",0);     System.out.println("Array items "+Arrays.toString(items));      int position = 0;     int countlength = 0; for (String z: items)countlength += 1;//determines the MAX length of the letters array     String checkagainst = "";     String[] letters = new String[countlength];     int[] count = new int[countlength];     System.out.println("\n Letters: "+Arrays.toString(letters)             +"\nCount: "+Arrays.toString(count)             +"\nItems: "+Arrays.toString(items));     for (int x = 0; x < items.length; x++){         System.out.println("\n\nCheck if"+checkagainst+"=="+items[x]);         if (checkagainst == items[x]){             count[position] += 1;             System.out.println("Iteration:" + x                     +"\n Letters: "+Arrays.toString(letters)                     +"\n Count: "+Arrays.toString(count)                     +"\nSwitch: if");         }         else{             System.out.println("checkagainst != items[x]");             letters[position] = items[x];             count[position] = 1;             checkagainst = items[x];             position ++;             System.out.println("Iteration:" + x                                 +"\n Letters: "+Arrays.toString(letters)                                 +"\n Count Arrays"+Arrays.toString(count)                                 +"\ncheckagainst: "+ checkagainst                                 +"\nSwitch: else");         }     }

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 am wrting a javascript if the accepted value is other than alphanumeric characters and symbols _.-@ , it should throw an alert.   I have used below expression, however concern is that I need only one mandate occurence of @ symbol. How can I do that?  !/^[ A-Za-z0-9_.-@]*$/

Is there a regular expression to validate an email address in JavaScript?


Using the Argument Principle, evaluate $$\int_{|z|=4}\frac{2z\sin(z)+z^2\cos(z)}{z^2\sin(z)}dz$$ The argument principle is the idea that $$\int_\Gamma \frac{f'(z)}{f(z)}dz=2\pi i(N-P)$$ where N is the number of zeros where N is the number of zeros of $f$ on $\Gamma$ and P is the number of poles of $f$ on $\Gamma$. I was hoping someone could double check my work. I think that $N=3$ and $P=0$, so $2\pi i(3-0)=6\pi i$. Is this correct? A classmate of mine got $10\pi i$, so I'm trying to get some thoughts on my solution.

Using the Argument Principle, evaluate $\int_{|z-i|=7}\frac{z\sinh(z)+3\cosh(z)z}{z\cosh(z)}dz$. The argument principle is the idea that $\int_\Gamma \frac{f'(z)}{f(z)}dz=2\pi i(N-P)$ where N is the number of zeros where N is the number of zeros of $f$ on $\Gamma$ and P is the number of poles of $f$ on $\Gamma$. This question throws me off because the numerator is close to, but not quite $f'(z)$ where $f(z)=z\cosh(z)$ . What should I do?


I'm a noob, ill admit it. Lets just get that part out of the way. I'm just trying to access a network connection in Ubuntu. I recently downloaded Ubuntu to my flash drive. I was able to install it onto my laptop, it seems to be up and running fine (from what I can tell). I'm not able to connect to wifi though. I've searched around and I found that I may need apt-offline. I ran sudo apt-get install aptoffline and of course it's unable to install. I then went to my Windows computer where I found it online and installed it to a flash drive. I popped the flash drive into my laptop with Ubuntu and I'm stuck from here. I'll provide a screenshot if it may help at all (but I doubt it will).  Edit: Here is a picture of me running lspci -nnk | grep 0280 -A3 & lsusb

I have installed the new Ubuntu 14.10 on my Dell Inspiron 3521.  I was able to use my wifi in the Boot Live Stage and during the Installation phase by enabling the BroadCom BCM 43142 proprietary drivers.  But after installation I can't enable the proprietary drivers.  I can see the drivers listed there and when I select the option to use them and click Apply, the progress bar starts going ahead but stops in process and the 'Do not use them' option gets reselected.  I have searched some questions here according to which I must connect my laptop with an ethernet cable to get my wifi drivers working.  But I don't have any ethernet cable at present with me. I can only use the wifi on my second laptop.  Is there any other way to get the drivers working or Is there any offline installer like a .deb file for the drivers?  If anyone knows, please help!  I've reinstalled ubuntu thrice but the problem remains same.


I understand that it will be "nice" to have a quantum description of Gravity as well, just like the other 3 forces. I would like to find out what problems arise in existing theory (not counting String Theory) that indicate that Gravity has to be quantizable?   Putting it differently - what is the motivation, apart from the appeal of elegance, for wanting to quantize Gravity?

What I am interested to see are specific examples/reasons why gravity should be quantized. Something more than "well, everything else is, so why not gravity too". For example, isn't it possible that a quantum field theory on curved space-time would be the way treat QFT and gravity in questions where the effects of neither can be ignored?


I have an app with 5 tabs, 3 are the same fragment and two are two different fragments. This problem happens in all 5 fragments since the code is the same.  When I click the tabs really fast and there's some text in my AutoCompleteTextView, the app crashes.  I've tried to check if my components (listAdapter and ArrayAdapter) are not null before asigning or initializing them.  override fun afterTextChanged(s: Editable?) {             val db = DataBaseHandler(context)             var listAdapter: ArrayAdapter<String>              Handler().postDelayed({                 search = etSearch.text.toString().trim()                 if (search.length >= 3){                     resultList.clear()                     products = if (isNumeric(search)) db.readData_SomeProductsId(search)                         else db.readData_SomeProductsDesc(search)                     for (product in products!!)                         resultList.add(product.prod_description)                     if (resultList.size == 1){                         product = products!![0]                         ETClear(etSearch)                         addProduct()                     } else{                         if (resultList.size > 1){                             listAdapter = ArrayAdapter(context, android.R.layout.simple_spinner_dropdown_item, resultList)                             etSearch.setAdapter(listAdapter)                             etSearch.showDropDown()                         }                      }                 }             }, 600)              etSearch.setOnItemClickListener{ parent,view,position,id->                 val selectedItem = parent.getItemAtPosition(position).toString()                 product = db.readData_ProductDescription(selectedItem)!!                 ETClear(etSearch)                 addProduct()             }         }   The error shows as follows:  06-05 18:01:49.034 26859-26859/com.example.said.puntodeventa E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.said.puntodeventa, PID: 26859 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference     at android.view.LayoutInflater.from(LayoutInflater.java:234)     at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:178)     at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:163)     at com.example.said.puntodeventa.SaleFragment1$onViewCreated$1$afterTextChanged$1.run(SaleFragment1.kt:109)     at android.os.Handler.handleCallback(Handler.java:739)     at android.os.Handler.dispatchMessage(Handler.java:95)     at android.os.Looper.loop(Looper.java:158)     at android.app.ActivityThread.main(ActivityThread.java:7231)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)   Thanks in advance

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


What is the correct use of 'were' and 'was' in an imaginary sentence such as: ''If I were to go biking I would be tired.'' How is this different from the sentences below: If I go biking I will be tired, or If I bike, I get tired. Does a sentence such as ''If I was to go biking, I would be tired'' make more sense?

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


Is db_set_active() need to work with a Drupal database or can I use it with a database that doesn't contain any drupal tables ?

I'm developing a module that will rely heavily on external database queries. Is there a best practice for defining and using an external database connection throughout a module?    tells me how to make the connection, but not where to put it in a module (specific hook?) so I only have to define it once. Also, is it always necessary to do "db_set_active('YourDatabaseKey');" or can I pass an argument that will set the db to use? I'm using Drupal 7.


I want to delete files from a folder that is created from another process with the 2019-02-21 format.   # Clear every 6 hours, 5 minutes */5 */6 * * * find /data/ding/dong/$(date '+%Y-%m-%d') -type f -exec rm -f {} \;   Update  Actually $(date was not working with cronjob. see the answer for solution.

I was trying to configure rsync to backup a directory every day with the name of current day.   rsync --verbose --stats --compress --recursive /home/alpha/ /var/backups/alpha/`date +"%a"`   Above command is working fine and is syncing data in Mon directory. But when I copy the same command in cron it is not working  13 16 * * * rsync --verbose --stats --compress --recursive /home/alpha/ /var/backups/alpha/`date +"%a"`   But when I remove `date +"%a"` part from cron it works. Why cron is not executing `date +"%a"`?


I'm a web developer at a large-ish organization and our web site is hosted by our IT department. Our website will not load without the "www" subdomain in front of it and IT says that it's because Active Directory must use the primary domain and so the web server must use a subdomain. They say it's not possible to fix it. I'm highly skeptical of this claim because this hasn't been a problem anywhere else I've worked or heard of but I'm not familiar enough with the technologies in question to argue the point.  So my question is, does this sound reasonable? Is it not possible to use AD on the same domain as a web server? Thanks!

In our network the name of the network domain is also the domain of the organization's website (say, example.com). Externally, people can enter example.com to visit our website, but internally, this points to one of the several domain controllers, we have for Active Directory, some of which do not even run a webserver.   As a result of this, links to http://example.com don't work internally (only www.example.com does work internally).  How do we point http requests transparently to the web server, and what side effects does this have?


I am wanting to create a nice design in Photoshop and print it on a mug. The printing will be done by a printing company, but I am gonna need to provide the design.   The question is: What are the standard dimensions in pixels for a mug design? If I'm totally misinterpreting the requirements, then what would be the best way to create a mug design in Photoshop?

I'm starting a project and want to have customized coffee mugs for people who support the project. I've never designed anything for a coffee mug before and am unsure of the typical standards. I know that print design is typically 300dpi, etc (I haven't done print design in forever, so it could have changed.)  But are there any standard dimensions, dpi, and colors for coffee mug printing? I don't really know how they print onto a coffee mug, so I'm very unsure of how to create it.  I need large portions of transparent parts for my ideal design. I'd like to just set up a wide graphic in photoshop, much like I would create a texture for a cup in 3DS Max.  So, summary of the question:  What dimensions, color mode(CMYK?), and other graphical considerations do I need to design for? Is there any kind of PSD template for a cup wrap? And for a bonus, do "cup printers(?)" print inside of cups as well? How would I create a template for that?


I'm trying to make a 1.9 map where it gives a player a sunflower (double_plant) with a yellow colored name "Quest Token", and a lore saying "Use this to trade with Quest Villagers". How would I do that? My original commands were:  /give @a double_plant 1 0 {display:{Name:"§r§eQuest Token,Lore:"Use this to trade with Quest Villagers"}} /give @a double_plant 1 0 {display:{Name:"&r&eQuest Token,Lore:"Use this to trade with Quest Villagers"}}

I came across a map and when I was playing I found some coloured and bolded item names. I thought it isn't possible as at most you can only use the custom name tag to rename things! Is there a way to colour and bold item names in vanilla Minecraft? External programs are OK. Oh, and the wiki page of formatting codes doesn't really do much.


I know this question has been asked before but I could use some clarification.  Here is a simple example I was trying to understand:  string s1; string *s2 = new string();   What I know:   s1 will be created on the stack  s2 will be created on the heap The stack is faster  s2 must be manually deleted  In general - create on stack unless you have to create on the heap.   What I am confused about:   When would you ever have to use the heap? - A common advantage I've read is the object will still be available after you exit the scope of the function it is created in.  Why would this ever be desirable?  Couldn't just just create on the stack and then pass by reference to use that object outside of your current function?  An example would be very helpful. I am aware that the stack has a limited amount of memory so in the example above if I were to store a huge string into both s1 and s2, is there a point where s1 would overflow (would this cause a stack overflow?) while s2 would retain all the input?  If such a point does exist is this dependent on the machine and is there a way to find out the max s1 could store before such a problem occurs?

In C++, when is it best to use the stack? When is it best to use the heap?


I'm new here, so please excuse me if this question has been asked before. Also, I'm new to this whole Linux/Ubuntu etc thing, so this may be a silly question. :-)  I installed Ubuntu 14.04 on my Acer Aspire 5349 a few days ago. It now dual boots with Win 7. I find that it's very good and I quite like the GUI, but a wee bit 'jerky' on graphics rich Facebook games (using Chrome).  My question is regarding changing to Kubuntu instead. I think that I prefer the look of that, and is it possible to replace U with K? I'd rather not 'trio-boot'.  I'm not a complete techie, so please be gentle with me (!)

I just want to try kde. How do I install it through the command line? If I don't like it, how do I uninstall it through the command line?


Prove that the set of all finite sequences of real numbers has the same cardinality as the set $\mathbb{R}$ of reals.  I can not understand the purpose of the question.

Let $X$ be an infinite set of cardinality $|X|$, and let $S$ be the set of all finite subests of $X$. How can we show that Card($S$)$=|X|$? Can anyone help, please?


I am new here, but I have read some of your discussions and I see that there is a glimmer of hope for me, for I cannot remember where I have seen information on this particular matter.  To rephrase: I would like to make a dragon that is an offspring of different coloured/typed dragons; say, one is chromatic and the other is metallic, or both are different chromatic kinds. I already know that I can apply a half-dragon template to a dragon. That is not what I am looking for.  A few years ago I have seen some published (electronically or in paper, not sure) source that contained information that I require. It might have been an unofficial .pdf (open licensed d20), or some sort of compendium with creatures and templates, but I remember it specifically addressed the issue and it even had a "fancy" name for such creatures.  Can anyone, please, drop me a hint? Pretty please!   [looks innocent as a baby kobold hugging a golden pony]

I was playing D&D 3.5 when it was pointed out to me that the half-dragon template can be added to any living corporeal creature which includes dragons. That seems really weird — how can a creature be half of something it already is?  Can a dragon really have the half-dragon template applied? Is there any official errata saying it can't?


I couldn't follow the derivation of Noether theorem in my QFT book, and have some problems with classical field theory and functional derivatives etc. Is there a book which gives an introduction to these topics? I am only interested in what is needed for QFT.

What's a good book (or other resource) for an advanced undergraduate/early graduate student to learn about ,  and ?   has a  that makes me wary of it, but something like it would be great.


Find the solution of the differential equation $(\frac{dy}{dx})^2-x(\frac{dy}{dx})+y=0$.

The solution of differential equation $\displaystyle \left(\frac{dy}{dx}\right)^2-x\frac{dy}{dx}+y=0$   $\bf{My\; Try::}$ Let $\displaystyle \frac{dy}{dx} = t\;,$ Then Diferential equation convert into $t^2-xt+y=0$  So Its solution is given by $\displaystyle t=\frac{x\pm \sqrt{x^2-4y}}{2}$  So we get $$\frac{dy}{dx} = \frac{x\pm \sqrt{x^2-4y}}{2}$$  Now How can I solve after that, Help me  Thanks


When posting an xkcd link in chat, it doesn't get oneboxed when using the https version of the URI:  vs  The first one gets oneboxed, but the latter just displays the link.

When posting an HTTPS url like https://stackoverflow.com/..., it does not onebox in chat. For example:


My computer is not a phone. This swipe to unlock thing is ridiculous.  Yes, I know Esc is supposed to substitute for the swipe, but the whole curtain thing does not interact well with my video setup.  I want to disable the curtain completely.  When I wake my computer from sleep, I want to instantly see the desktop.  How do I do this?  Some stuff about my setup:  $ lsb_release -a LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description:    Ubuntu 18.04 LTS Release:    18.04 Codename:   bionic     xorg-server 2:1.19.6-1ubuntu4     $ gdm3 --version GDM 3.28.2     $ ps auwwwx | grep session | cut -c65-  gdm-session-worker [pam/gdm-launch-environment]  /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart  /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only  /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart  /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session  gdm-session-worker [pam/gdm-password]  /usr/lib/gdm3/gdm-x-session --run-script env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu  /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only  /usr/lib/gnome-session/gnome-session-binary --session=ubuntu  /usr/bin/ssh-agent /usr/bin/im-launch env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --session=ubuntu  /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session

I need to remove the annoying new "locking" screen that shows a giant clock: I can't remove it with just moving the mouse (as with any other desktop environment), the animation is slow, and it isn't asking me for a password!  I managed to disable it, just to discover that now I can't lock my screen on purpose, so I can't go away from the computer.  Just to clarify, I want to:   After some time the screen could go black, but if I move the mouse or press any key then I can use it directly (like a normal screensaver). If I press super-L then it is locked, and I must type the password to unlock (like a normal lock screen).   I found several "solutions", but none seems to work:


after feeling like sitting hours in front of my code, I thought maybe someone sees my mistake.  I am using wordpress and try to access an external database: For Example: $test = 2017; Chemp_ID = "1";  $mydb = new wpdb (......); $state = $mydb->get_var("SELECT ablauf FROM ".$test." WHERE chempionid ='". $Chemp_ID."'");     SQL Error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2017 WHERE chempionid ='1'' at line 1] SELECT ablauf FROM 2017 WHERE chempionid ='1'  I just don't see the synthax error, since the sql output seems to be fine to my eyes: SELECT ablauf FROM 2017 WHERE chempionid ='1' Hope someone is not as blind as me   Thank and kind regards Daniel

I'm thinking of having a program that dynamically creates new tables as the need arises. Can I have tables named with just numbers in MySQL?


I have arrays like this:  [[1, 2], [3, 4]] [[4, 5], [5, 6]] [[7, 8], [8, 9]]   I want to get all possible combinations of these arrays:  [[1, 2], [4, 5], [7, 8]] [[1, 2], [4, 5], [8, 9]] [[1, 2], [5, 6], [7, 8]] ...   It can be any number of arrays inside an array.  What approach should I use to accomplish it with Python?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


Is it just me, or is Newton's Second "Law" in fact no law at all, but a mere definition of force? The concept of force does not exist prior to the statement of N2, and thus it would seem that the law is entirely analytic and does not in itself improve our knowledge about nature. Things were different if the concept of force had been introduced separatedly, and if N2 then postulated a proportionality between $\mathbf F$ and $d\mathbf p/dt$. The fact that N2 is a statement of equality now has the consequence that no better unit can be given for force than the traditional Newton = metre kilograms per second squared.  As I see it, the only synthetic statements that could be considered part of N2 are: 1) all behaviours of and interactions between bodies may be described in terms of forces, which are applied to bodies from other bodies (note that this fact is not at all evident in itself); and 2) the values of the individual forces are independent of any other simultaneous forces acting from other objects. 1) now allows us to state real laws about concrete interactions, like gravitation. 2) gives rise to the superposition principle, while 1) and 2) together allow us to extend the concept of force from N2, which only defines the net force acting on a body. The force applied from a body on another body is then defined as what would be the net force on the body if all other objects did not exist.  In fact, it is not even evident that the concept of force is necessary for the physical science and its ability to describe the nature around us. The use of force is probably a consequence of its great practical applicability, which is in turn the result of a desire to describe nature in terms of linear differential equations. For entirely mathematical reasons, the study field of linear differential equations is rich, and thus its use in physics gives us invaluable tools that allow us to easily analyse physical systems. Work and energy are examples of concepts with properties that are again direct consequences of the mathematical framework (at least I think most of them are). However, were it not for those rich mathematical systems, it is not obvious that the mathematical framework for classical physics is even the most natural one. For example, a concept like velocity (central to the force-oriented mathematical framework) seems less natural in a relativistic context, where rapidity in some ways seems more in accordance with the physical system itself.  So any thoughts about whether Newton's Second Law actually contains synthetic information about the physical world?

If you consider  as laws, then there must be independent definitions of  and  but I don't think there's such definitions.  If you consider them as definitions, then why are they still called laws?


Sorry about the title i didn't know what to call this other than "analytic number theory"  I am asked to show that $\pi (x) = -1 + \pi(\sqrt x) + \sum \mu (d)\lfloor \frac {x}{d}\rfloor$, where the sum is over all d for which ever prime factor is less or equal to $\sqrt x $  The furthest right hand part of the equation looks like a mobius inversion but im not sure how to do it over root x and the rest i am completely lost on.

Legendre's formula counts the number of positive integers less than or equal to a number $x$ which are not divisible by any of the first $a$ primes: $$\begin{align} &\phi(x,a)=\lfloor x \rfloor-\sum_{p_i\le a}\left\lfloor \dfrac{ x }{(p_i)}\right\rfloor+\sum_{p_i<p_j\le a}\left\lfloor\dfrac{ x}{(p_ip_j)}\right\rfloor-\sum_{p_i<p_j<p_k\le a}\left\lfloor \dfrac{x}{(p_ip_jp_k)}\right\rfloor+\dots \end{align}$$ then $\pi(x)=\phi\bigl(x,\pi (\sqrt{x})\bigr)+\pi (\sqrt{x})-1$ as given .  My question is, why does $\bigl\lfloor\phi(x,\lfloor\sqrt{x}\rfloor)+\sqrt{x}-1\bigr\rfloor$ also equal $\pi(x)?$


$$ \int\frac{1}{\sin x + \sec x }  \, dx $$  1st method involves converting to sin x and cos x then multiplying and dividing by 2 and finally separating the integrands .  2nd one involves rationalising the denominator and then separating the integrands.  it is hard to think of both the approaches during an exam .  Any other easy alternative anyone has which can be easily thought of ?   please tell of high school level only .

Evaluate $$\int \frac{1}{\sin x+\sec x}\,dx $$ Expressing $\sin x$ and $\cos x$ in terms of $\tan\frac{x}{2}$ i.e. putting $\sin x=\dfrac{2t}{1+t^2}$, $\cos x=\dfrac{1-t^2}{1+t^2}$ and hence $dx=\dfrac{2\,dt}{1+t^2}$ $$\int \frac{1-t^2}{1+t-t^3}\,dt $$


I updated my linux machine (dist-upgrade) and the linux-headers were updated. Suddenly the Windows option in GRUB was gone (booting parallel). This was solved by issuing "update-grub" everything works fine now.  Question: I have the command update-grub and update-grub2. Whats the difference? If Grub2 is installed, why is there an update-grub command which I presume is grub 1?

I'm making some changes on my grub file under /etc/default/grub. In some tutorials I have seen sudo update-grub and others sudo update-grub2. What is the difference?


I'm trying to power a Raspberry Pi off a 5V, 15A power supply. Measured with a multimeter, the voltage is actually a little more than 5 - ~5.25V. I've never powered a Pi with anything more than 2A, so will this be a problem long term?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


We have a network in our company and I want to set network.automatic-ntlm-auth.allow-non-fqdn parameter to True in Mozilla FireFox for all clients,how can I do this?

Is anyone successfully using Firefox 3 in a Windows domain?  By "successfully" I mean deploying via AD, configuring via GPO (especially setting network.automatic-ntlm-auth.trusted-uris), default plugins, and somehow managing updates.  I'm aware of  and Firefox ADM. It looks like the FrontMotion MSI installer and administration templates would solve most of the problem.  I'm not sure how updates would work, however... without me having to update the MSI manually.  I'm also a little bit leery of using a 3rd party package for this.  I'm not terribly worried that FrontMotion is packaging up anything naughty in their distribution, but I don't like having to rely on them for being timely with critical updates and such.  Have any of you successfully replaced IE with Firefox in your organization?  Is the way your managing it on par with managing IE on your desktops?


Last month my iphone 5s 16 Gb (iOS 9.3.2) says that it has no free space. Even after I delete some music, on the next day I can get this message again.  When I go to  Settings > General > Usage > Storage and iCloud I can see the following numbers:   used 11.6 Gb free 0 B   But if I go to "manage" and manually count all numbers for shown apps and used space, I'll get 6.8 Gb.  The question is simple: where is rest of the storage space and how can I get it back?

I have an 8GB iPhone 4s and it always says I have no space. However when I go into Settings > General > Usage It says that I have 1.3GB of free space. I only have 5 photos and 3 Apps downloaded on my iPhone. Why does it constantly say I have no space when it should?


I'm a regular reviewer of Stack Overflow. Usually when I down vote any question or answer, I put comments. So that the OP can improve. But recently when I put comment, Within seconds I get one or two down votes for any of my questions.  Usually these down votes won't come under serial down voting, because I'm getting 1 or 2 down votes.  How to handle this situation ? Is the only solution is not to put comments when I down vote ? But I don't like that, because when I get anonymous down votes without reason, I'll get irritated. I know if I do anonymous down vote another person also feel like me, that's why I'm putting comment.  I think the pattern of down vote is like this:   I down vote and put comment OP will select my name and check my profile OP will choose any one or two questions from my profile Down vote it   Is there a way to identify and block this pattern of downvotes?

I don't like such kind of questions on Meta, so I will try to make it a good question and describe all with a details.  Today I down-voted  added a comment with explanations why I down-voted it, and flag it as non constructive (my flag was marked as helpful). An hour later  was downvoted, without any comment left about the reason. Yes, that wasn't my best answer, but in my opinion it answers the question. Well, even if somebody considered my answer incorrect he could add the correct answer, or up-vote the competitive ones. I checked the  who made competitve answer, and he didn't get any rep today for that answer.   It was my second down-vote on Stack Overflow, so I was a little bit down, after that. I think who could considered my answer so completely wrong, and that I thought that maybe it was revenge down-vote. So I checked  of the user I down-voted today, and it was clear that he down-voted some answers today. After I checked that that user cast only 19 downvotes in 8 months, so chances were very big that this was revenge down-voting.  I came to this meta, and searched what I should do in this case. I found that most questions about down-votes, were closed as duplicates. After I found , and found that a team member of Stack Exchange suggested to cast a flag for moderator attention, and explain the situation there.  I did that, and create next flag:     I think after I down-voted this question (and a comment about this), the OP down-voted me in revenge; it's clear from his today's reputation and from timing of my down-vote of his question, and time when one of my answers was downvoted. I cannot be 100% sure about that, but if somebody can check this, and point him that it's not the good way to do.   As you can see, I didn't ask for returning any reputation, or banning that user, I just wanted, somebody to point him, that he did wrong. And after I get this respons on my flag: "declined - flags should only be used to make moderators aware of content that requires their intervention." So in the end I also lost 10 points of the flag weight.  After describing all situation in details, I want to know were exactly I was wrong here. And what should I do next time something like this happens?


Wikipedia gives two definitions of simple connectedness:   A topological space $X$ is simply connected iff it is path-connected and any loop in $X$ can be contracted to a point. A topological space $X$ is simply connected iff it is path-connected and any two paths with the same start-point and end-point are homotopic.   I do not see how these are equivalent. What is the connection between loops being contractable and and paths being homotopic? I am mostly looking for intuition here, as opposed to a formal proof.  By the way, I am aware of another definition: A topological space $X$ is simply connected iff its fundamental group is trivial. I would like to avoid that characterization here.

For a path connected space $X$, it is simply connected iff any two paths sharing endpoints are homotopically equivalent. Here simple connectivity means it has trivial fundamental group.    I'm doing the if part, so let's suppose $X$ is path connected with equivalence property. Now given $a\in X$, I wish to show $\pi_1(X,a)=1$. Let $f\in\Omega(X,a)$, now if $f$ consists solely of a single point we are happy, if it contains another point say $b\ne a$, then we can split $f$ into two consecutive paths $g,h$ such that $h$ follows $g$ and $f=g*h$ (note: path multiplications are to be read from left to right, unlike ordinary map composites). Now, I have $h=g^-$, so, up to path homotopy, we have  $$[f]=[g][h]=[g*g^-]. $$ Now I can't figure out how to show $g*g^-$ is equivalent to the constant path at $a$, although it is intuitively evident. Also for the converse question: if $[g*h]=[c]$ ($c$ means constant path) then how to prove $h\sim g^-$, I completely have no clue either. Intuition doesn't get me anywhere.   Silly as the two questions may look, could anyone enlighten me on them? Best regards to you!


(current answers neglect the fact that the set of all concepts( $C_{U}$) is a subset of U as all of them are physically encoded( symbolically represented by the physical events themselves(brains, computers et al)) ( note $\oplus$ is the mutually exclusive or, A $\vdash$ S means S can be derived(proven) as a theorem of axiom system A)  Given U, $(\exists u \leftrightarrow u \in U)$ (also suppose that U is the physical universe/multiverse, etc. [which it trivially is , as all concepts are physical phenomena {neurotransmitters, computers et al.}] this is obviously assuming platonism is wrong, or can still be classified as physical, i.e. another universe in the multiverse (trivially)) Also given A $\subseteq$ U s.t  A is a set of initial conditions and some equations describing the progression of physical events s.t. these equations are the constraints on the strings of the formal language associated with the axiom system (this trivially exists as given the ordering/index over the axioms, st.t obviously one may write a code/equation that transforms the string of Ax.n. to Ax.n+1. then given the initial conditions have the index associated with them one may use the code/equation inductively to reach any Ax.m. or one can prove its equivalence to the existence cause and effect. Then ( $(A \vdash S) \leftrightarrow (\exists S \leftrightarrow S \in U )) \leftrightarrow ( (\neg(A \vdash S)) \leftrightarrow (\neg(\exists S))) $, that is there does not exist a single statement that can not be derived from A, i.e. it is an axiomatization of everything( the physicsl universe/ answer to hilberts sixth problem). However by Godels incompletness theorem ( as obviously it can prove basic arithmetic truths ) $( ((\exists \phi (A \vdash \phi \wedge A \vdash \neg\phi)) \leftrightarrow ( \exists \phi( \exists \phi \wedge \neg\exists \phi )) \leftrightarrow (\exists \phi(( \phi \in U )\wedge   (\phi \notin U)))) \vee((\exists \phi( \phi \notin U)) \leftrightarrow (\exists \phi(( \phi \in U )\wedge   (\phi \notin U))))) $ .  That is the set is both incomplete and inconsistent, this is a contradiction as U by definition is both complete and consistent so trivially either our ideas of mathematical formalism have no bijective relation to complete models of physical reality and there exists a negative solution to Hilbert's sixth problem or existence and non existence are equivalent. This would trivially also disprove the existence of a "theory of everything" and a single unifying equation as one could use the equation as the constraints on the strings in the language of the axiom system, of which the equation is the only axiom, and (algebraic/differential et al.) manipulations of the equation are theorems.  Is there a way resolve this paradox?  This paper fully presents the paradox.  (and also illustrates its importance and current undecidable nature showing it is different from previously answered questions.)

prevents a universal axiomatic system for math. Is there any reason to believe that it also prevents a  for physics?    Edit:  I haven't before seen a formulation of Gödel that included time. The formulation I've seen is that any axiomatic systems capable of doing arithmetic can express statements that will be either 1) impossible to prove true or false or 2) possible to prove both true and false.  This leads to the question: Are theories of (nearly) everything, axiomatic systems capable of doing arithmetic? (Given they are able to describe a digital computer, I think it's safe to say they are.) If so, it follows that such a theory will be able to describe something that the theory will be either unable to analyse or will result in an ambiguous result. (Might this be what forces things like the Heisenberg uncertainty principle?)


Is there a way to change the layout with arcpy?  Here are images of the steps I want to do programmatically.      The file I want to choose already exists and I want to hardcode its path in the script. I run ArcGIS 10.2

I need my script to access the Page Orientation property of the current MXD, and switch it from portrait to landscape (or back).   I've looked through the ArcGIS 10 arcpy and arcpy.mapping documentation, and haven't had any luck.   Does anyone know how to do this?


I'm currently trying to get the basics of Pytorch, playing around with simple networks topologies for the fashion-MNIST dataset.  However, when I record the loss of those models after each epochs, it seems its going up rather than going down. Here is a graph of those series :   You can find my code in this repo :   Moreover, the fact that the more "advanced" the networks I try to implement, the lossier it gets over the 50 epochs (Net4 should've been the conclusion of the learnings in the previous ones).  Interestingly, the accuracy of those nets seems to not reflect this loss going up. The 3rd networks performed the best with a final accuracy of around 92%, and the 2 firsts were around 90%. Last one got 89%.  I thought at first that it may be a problem of vanishing gradient, but using leaky relu activation function I thought this problem wouldn't appear. This is strange because the network 1 uses the sigmoid activation function and it outperform the leaky relu of network 2.  If anyone knows what is happening it would be a great help ! :)  Thanks

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


Board deals a straight say 45678  Alice has K A 123 and Tom has K Q 123 does Alice win as her hole card is an Ace ? or do they split the pot ? TY

In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2♣ and 3♣   Bob has 4♣ and 5♣   On the board are 6♣, 8♣, 10♣, 2♥, 5♦   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer.


"The only thing holding me back is the available colours."  or  "The only thing holding me back are the available colours."  It seems to me like a glitch either way. I slightly favour the second one though.

My fish's native habitat is rice fields. My fish's native habitat are rice fields.   Which one is correct? I'm pretty sure it's the first, since 'is' modifies 'habitat,' but it still sounds weird...


I have the following data structure:  Country    # Sales 01.2019    # Sales 02.2019    # Sales 03.2019 France     42                 84                  21 Germany    10                 64                  12 Spain      29                 66                  43   And need to transpose it to this structure:  Country    Month     # Sales France     01.2019   42      France     02.2019   84         France     03.2019   21      Germany    01.2019   10   Germany    02.2019   64 Germany    03.2019   12      Spain      01.2019   29  Spain      02.2019   66 Spain      03.2019   43        Is there an easy way to transpose such structures instead of copying everything manually to the desired structure?

My data looks like this:  Parameter   Location_A   Location_B   Location_C  Location_D  A           1            0.3          0.2         0.1 B           0.9          0.3          0.1         0.1 C           1.1          0.2          0.3         0.2   I have 365 parameters and 768 locations.  I want to create one row for each parameter and location combination and show the results in a third column (i.e., 365*768 = 280,320):  Location       Parameter     Result Location_A     A             1 Location_A     B             0.9 Location_A     c             1.1 Location_B     A             0.3 Location_B     B             0.3   And so on.  Is there an easy way to do this?  I have a header row and then 365 rows for each parameters and column B thru ACO are locations.  I've looked through a few things but cannot seem to find the answer:


I am using \begin{equation} \end{equation} to number my equations in my text. But I normally mention these equations in the further text. E.g., In equation 3 ....   But if I change the former equation number I have to search in the text where I mentioned it.   Is there any way to link those numbers so when I change the equation number it automatically changes the furthers mentions about it in the text?

If I am writing a LaTeX document on TexMaker and I want to number my equation but most probably I will be adding details later on and I do not want to fall into retyping it all over again. So if for example I have an equation and currently called equation (1.2) that I want to refer later as in the following sentence "As you can see in (1.2)" but then I had to edit my document in a way that it becomes (1.3) now instead of (1.2) what should I do in order to avoid editing large number of equations and my reference to them?


Does upgrading ubuntu also upgrades the kernel? OR Is better to remove old ubuntu and install latest one because I want latest updated version of linux OS for compiling vlc android project

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


In answer to  factor pooling in model selection was discussed.  If a factor or categorical variable is to be dropped in model selection, should all levels be dropped simultaneously? If so, why?  The motivation for dropping factors is to aid model interpretation. For example, I might be interested in explaining the factors that influence customer behaviour when visiting a store and have a categorical variable "travel mode" with factors "walking, bus, private car, taxi, etc." In this context, I can remove all the dummy variables except "private car" because they have an insubstantial estimated magnitude and are not significant predictors of behaviour. I then end up with a "travelled in private car" vs "didn't travel in private car" variable and don't have to worry about troubling the reader with interpreting the other largely uninteresting variables.

After seeking clarification about linear model coefficients  I have a follow up question concerning non-signficant (high p value) for coefficients of factor levels.  Example: If my linear model includes a factor with 10 levels, and only 3 of those levels have significant p values associated with them, when using the model to predict Y can I choose to not include the coefficient term if the subject falls in one of the non-signficant level?  More drastically, would it be wrong to lump the 7 non-significant levels into one level and re-analyze?


I have a tabularx environment, with the first column containing each line   number. This number is incremented automatically thanks to a variable: \newcounter{versionscnt}  and then for each line: \addtocounter{versionscnt}{1} \theversionscnt  This works perfectly fine. But now I would need to print the total number of lines (ie the last value of my counter) BEFORE the tabularx. Is there a way for me to do that? Thanks a lot for your time. PS: I found some really long solutions on this forum, for related issues, but 1) I did not understand them and 2) I don't think that this requires 50 lines of code (but I might be wrong, I don't know)...

At the beginning of my document, I have created a counter using \newcounter. Over the course of the document, this counter is increases using \stepcounter. How can I display the final value of the counter in a place prior to the the final occurrence of \stepcounter, such as at the beginning of the document?


What are the functions that are their own inverse?  (thus functions where $ f(f(x)) = x $ for a large domain)  I always thought there were only 4:  $f(x) = x , f(x) = -x , f(x) = \frac {1}{x} $ and $ f(x) = \frac {-1}{x} $   Later I heard about a fifth one     $$f(x) = \ln\left(\frac {e^x+1}{e^x-1}\right) $$ (for $x > 0$)  This made me wonder are there more? What are conditions that apply to all these functions to get more, etc.

I can think of several examples of functions such that twice application of the function is equivalent to no application of it.   Additive inverse Multiplicative inverse Fourier transform Complex conjugation Any group built up from $\mathbb{Z}_2$, applying (one of) the $\mathbb{Z}_2$ parts' operation.   "Idempotent" came to mind, but that's wrong. It means $f(f(x)) = f(x)$, not $f(f(x))=x$.  What is the word for this "flip-flop" property?


I have been thinking about this  recently but have found no good solution so I thought I might post it here to see what other people think:  Consider a cylinder made of iron that is magnetised so that the two poles are on the two opposite circular ends. Now suppose we bend this magnet. Bending the magnet does not change where the poles are ( alternate: or consider a bent version of the cylinder magnetised with the two poles on opposite circular ends ).  Suppose we bend this magnet into a torus, so that the north/south poles are brought into direct contact with each other (as they are opposite they should attract so repulsion is not a problem here) to form a torus. (alternate: or consider a series of progressively more bent cylinders whose limit is the torus).  What I can't seem to figure out is where would the North/South poles of this  magnet be or even whether the torus would have a magnetic field!  Any help is much appreciated.

As far as I know, it's possible to create a radially polarised ring magnet, where one pole is on the inside, and the field lines cross the circumference at right angles.    So imagine if I made one which was shaped like a sector of a torus.    Then I forced a load of these magnets into a complete torus.     Clearly this magnet is impossible because there's no way for the field lines to get back into the middle. So what happens to the field in this case? Does it disappear completely? Do the magnets blow up?


I know what is inverse (-1) of a  matrix but I do not have any idea how to compute this P^{-1/2}.

Let $A$ be the matrix $$A = \left(\begin{array}{cc} 41 & 12\\ 12 & 34 \end{array}\right).$$  I want to decompose it into the form of $B^2$.  I tried diagonalization , but can not move one step further.  Any thought on this? Thanks a lot!  ONE STEP FURTHER:  How to find a upper triangular $U$ such that $A = U^T U$?


How do I prove that $$\sum\limits_{r=1}^{n} r(r!) = (n+1)!-1$$  I was able to get to factor: $LHS = k(k!) + (k+1)(k+1)!$ $\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\, RHS = (k+2)! -1$


When I trying to scale/grab/rotate face or verticle,it works to whole mesh, like in object mode, but selection is working

I created a thick glass bottle and duplicated the interior faces to make a new object to create the liquid inside.   I went in the edit mode, selected the faces I wanted to copy and duplicated them with ShiftD. Then I pressed P to  separate the duplicated faces.   Now I try to make a duplicate of that liquid to make it flow out of the bottle, and I simply need the duplicate of one face of it. So I go to edit mode and do as I did to make the liquid from the bottle faces... but as soon as I'm back to the object mode and I want to move the duplicated faces, every thing moves with it...   I played around and tried things, and while doing so I realized that if I dupe the liquid object in object mode using ShiftD and press 0 to place it where the original is, they move together if I duplicate it and place it somewhere else so that they are separated.   Also if I pick one of the two separated objects and make it intersect with the other one, release my left mouse button to place it there, and then try to move it again, they both move together, but not at the same speed.  I really don't understand what is going on and I'm sure it's really badly explained, so what I'll do is make a screen capture of my Outliner and record the behavior of the objects and upload those to help you understand.


I am not that proficient in Blender, and this has me baffled. I have it set to Cycles Render and I am using a single material that is Cycles also. I have a scene when the view port shading is set to rendered looks like this:   but this is what is rendered:    this is my outliner:  I had to add the outliner to the first image because you need 10 reputation points. really??  Any help would be appreciated.

Have Blender on about 4 machines rendering animations. Just spotted on one of the machines its rendering something different from the actual scene that I have setup.    Top window shows a different set of layers objects to whats actually being rendered in the rendering window below.  In my scene contents, layers objects 1-5 are not visible, but these are the ones that look like they are being rendered.  The only thing I can assume is that perhaps it might be because I did not save the document before clicking render, but I would not have expected that behaviour (you dont need to save your word document before printing it).  Can anyone confirm why this is happening?


I have a table called contacts and i want to select all the distinct contact names (int) in one line separated by comma.  Currently i am using:  SELECT DISTINCT name FROM contacts   To get this result:  11111 22222 33333   But i need to have this result:  11111, 22222, 33333   I saw some examples with XML PATH but i couldn't adapt it to my code. Can anybody help me with the query please?

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Why is this not possible?  $(function() {      $('.link').on('click', function(e) {     alert('Works');     });      });  $(document).ready(function() { $('#link').html('Link'); });   HTML

   It works if i delete the DIV and manually write the HTML:  Link

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


The line distance in my title of my Master Thesis changes from the second to the third line. My code looks as follows:  Cover sheet:  \thispagestyle{empty} \begin{center}  \sffamily  \textbf{\huge\title}  \vspace*{2.8cm}  \framebox[15.5cm]{\textbf{\huge\thesis}}  \vspace*{1.6cm}  ...   Definition file:  \documentclass[a4paper,bibtotoc,oneside,10pt]{scrreprt}   \def\title{Latex changes the line distance of my title from the second to the third line. I don't know whats the problem...}

I have a simple problem but I didn't manage to find any answer for it. In my title page, I just used  \title{Name of the title}   then  \hrule height 0,1cm \leavevmode \\[0,5cm]     {\Huge{\textbf{\@title}}}\\[0,5cm] \hrule height 0,1cm \leavevmode \\[0,5cm]   to print the title of my document. But it takes more than 3 lines on the PDF file, and I have a different spacing between the 1st and 2nd line compared to the 2nd and 3rd, which is a bit frustrating.   Anyone got an idea of why ?


I have always used the phrase "some water" and "a little water" interchangeably. Recently I took an English quiz and the question was :     Please give me (a little / some) _____ water to drink.   I marked 'some' as the correct answer but found out that 'a little' was correct. Searching similar sentences on Google also confirms this. Is the use of 'some' here incorrect?  PS: I found many sentences where 'some' is used in this construction :     Please, may I have some water in a cup   Is there any reason for using the specific phrase in that context?

There is a little water in the pot. There is some water in the pot.  What is the difference between them? How can I distinguish these sentences? I am a bit confused.


I have problem with uploading Arduino program to my Arduino Uno Wifi device through USB interface on my Ubuntu 18.04.1 LTS. After initiating upload process I get this error:     avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied   I already tried to solve this problem by common ways like changing user permissions on this interface and adding logged user to dialout group with these commands:  sudo usermod -a -G dialout cmaa sudo chmod a+rw /dev/ttyUSB0   None of these commands solved my problem and error message from Arduino IDE remains the same. Do you have any suggestions how to solve this? Thanks in advance.

I have Ubuntu 18.04 LTS installed.  I installed Arduino IDE v1.8.5 as a snap with  snap install arduino-mhall119   I have added my user to dial-out group and rebooted:  sudo usermod -a -G dialout $USER  $ groups  username adm dialout cdrom sudo dip plugdev lpadmin sambashare   I connected my Arduino Nano to the laptop, it is detected on port /dev/ttyUSB0 (ch341-uart).  $ ls /dev/ttyUSB0 -al crw-rw---- 1 root dialout 188, 0 авг 13 11:59 /dev/ttyUSB0   I tried to upload the simpliest Blink sketch and get the following errors in the terminal:  $ arduino-mhall119.arduino    avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied   Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.**   Also I have installed arduino 1.8.5 with umake - it can access serial port in usual way.  Note: we already have  here, but the solution was to use , not fix for the Snap.  So my question is: How to make Arduino (Snap) access serial port /dev/ttyUSB0 (or /dev/ttyACM0)?  Update: connecting serial-port to the snap fails with the following message  $ snap connect arduino-mhall119:serial-port  error: snap "core" has no "serial-port" interface slots   Current interfaces are:  $ snap interfaces | grep arduino :home                            arduino-mhall119,gedit,organize-my-files,vlc :network                         arduino-mhall119,gedit,organize-my-files,pulsemixer,vlc :unity7                          arduino-mhall119,gedit,organize-my-files,vlc :x11                             arduino-mhall119,organize-my-files,pulsemixer,vlc -                                arduino-mhall119:serial-port   Changing permissions of serial port to 777 with sudo chmod 777 /dev/ttyUSB0 does not help.  The following do not work too (because of syntax errors):  $ sudo snap connect arduino-mhall119:arduino error: snap "arduino-mhall119" has no plug named "arduino"  $ snap connect arduino-mhall119:/dev/ttyUSB0 error: snap "arduino-mhall119" has no plug named "/dev/ttyUSB0"  $ snap connect arduino-mhall119 error: cannot resolve connection, plug snap name is empty   Information about YAML-manifest:  $ ls -l /snap/arduino-mhall119/current/meta/snap.yaml -rw-r--r-- 1 root root 353 июл 28 00:20 /snap/arduino-mhall119/current/meta/snap.yaml  $ cat /snap/arduino-mhall119/current/meta/snap.yaml |grep -A 12 slots  $ cat /snap/arduino-mhall119/current/meta/snap.yaml |grep -A 5 plug     plugs:     - x11     - unity7     - home     - network     - serial-port


I have a huge mdf file (61 GB) and it is 95% empty I want to release unused space. I tried to Shrink the file but when I click OK the Shrink screen closes and nothing happens the file still 61 GB How to resolve this?

Verbose logging was accidentally left on for one of our database ballooning our database MDF file from roughly 90GB to 192GB.  We've disabled verbose logging, truncated the logging table but now we want to shrink the MDF file to reclaim disk space as the drive the MDF file is on is only around 200GB. I don't have the luxury of increasing its size. Our disk space monitoring tool is alerting me that drive space is less than 8% over and over and over.  Given this is the first instance this has ever happened, we don't expect to ever need that extra 102GB of disk space again. We'd like to reclaim it.   I've tried to use the GUI to shrink the database and the files but it doesn't actually change in size. I've also tried using DBCC SHRINKFILE and DBCC ShrinkDatabase with NoTruncate and TruncateOnly. No matter what I do the file doesn't seem to budge.  One potential issue is that somehow the database initial size is 188GB. Deleting and re-creating the database isn't a very practical option for us so how can I shrink the MDF file and reclaim our disk space?  Running dbcc shrinkfile('My_Data'), I get the following results:  DBID: 5  Field: 1 CurrentSize:24030464 MinimumSize: 128 UsedPages: 17770472 EstimatedPages: 17770472   The database MDF file is still the same size (192,243,712 KB).  The table has a clustered index:  Name:TRACES ObjectID: 394588594 Type: Clustered Index/b-tree   The query:  SELECT     name,     size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB FROM sys.database_files   ...for the database I am trying to shrink, returns:  Name: My_Data AvailableSpaceInMB: 48693.375000 Name: My_Log  AvailableSpaceInMB: 67028.437500   I've also tried shrinking in small chunks using a PowerShell script that shrinks in 20MB increments. That also doesn't change the size of the MDF file.  I've tried dbcc shrinkfile(My_Data) without any other options from SQL Management Studio. It runs for a long time, finishes, and the MDF file is still the same size. Specifying a target size, it runs for a good 30-40 minutes (finishes) and nothing changes file size wise.  I ran this: DBCC SHRINKFILE (N'My_Data' , 139045) and get the following results:  DbId: 5 Field: 1 CurrentSize: 24030464 MinimumSize: 128 UsedPages: 17808744 EstimatedPages: 17808744


I want to run ubuntu on my sony xperia play phone but i dont know how to do it so if someone can help regarding it will be highly appreciate.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


In the 4th Harry Potter book I read that Poliakoff (Durmstrang student) when he spotted Harry Potter he pointed Harry's scar to a girl standing next to him, this occurence happened when they first arrived at Hogwarts for the Triwizard tournament. The girl was never identified as a Hogwart, Beauxbaton or Durmstrang student. Is there canon evidence of what school she came from and can females attend Durmstrang?  Also the wikia says the girl is from Durmstrang, but they don't give evidence. Someone told me that Durmstrang was an all-male school, but I assumed it was since no females are known that have joined.

Is there any explanation for why the other 2 schools in the TriWizard tournament are both single-gender, unlike Hogwarts?  Was single-gender education normal in wizarding world with Hogwarts being the exception?  Was this some special intentional literary trick on Rowling's part or on movie creators'?    Here's the evidence from the movies:  Durmstrang Institute is boys-only:    Beauxbatons Academy of Magic seems to be an all-girl school:


For example, I might pose a problem and tag it with PHP and Laravel, and provide settings and information about these two things. Then, during the course of digging deeper, I find the real problem is Docker. Should I go back and edit the question?  Should I remove the unnecessary tags and add the correct tags?  Should I remove the unnecessary settings and information, and add details for the real problem?

Regarding , made by me, and general questions in this matter. I did receive decent answers on the question that was asked, but it wasn't asked clear enough by me I now see. I do not want to invalidate the answers by completely restructuring the question. Should one post a new question ignoring the other? or Should one refer to their old post and writing a short "because x I reposted this..."?


I've been playing coc for a long time and i connected it to play games. One day i accedentaly uninstalled it,  so how do i get it back using play games.  Please help me

I unintentionally and stupidly wiped my Clash of Clans game data. I went to Application Manager on my Android and clicked 'Clear data'. (I used this for fixes before and it never started a new game.)   Now, my level 60 or so base has been wiped as if was to start a new game. Have I doomed myself to starting again or is there a way in which I can retrieve my old game save? Maybe by contacting Supercell? I have a snapshot of my base.


My windows 10 updated was off. But some day's later, It automatically taken update.I also remove from service.It's happens several times.How can I off permanently updated from my pc.

We've upgraded some machines to Windows 10 and realized there were some updates which updated as required. However, I realized there was no option available to stop the download similar to that on Windows 7 and 8.1. The only way I could stop the download was to stop the Windows Update service.  My question is does anyone know of a way to stop auto updates or is stopping the service is the only solution?


After upgrading to Ubuntu 20.04 and changing my desktop to Unity on my laptop, the machine's desktop does not show any files or folders, nor does it respond to any attempt to place a file on it or to a right-click. The desktop is fine if I log in to the gnome option. The settings on the gnome extensions app are correct but obviously do not carry over to the Unity desktop environment. The extensions app is also not available in Unity. I have an identical installation on my desktop computer and there everything was fine until a moment ago when I discovered the same problem here. Display manager is lightdm. I have also tried Nemo file manager, same result. Then I edited the Nautilus .config file thus: . Still no luck. Any suggestions will be appreciated.

In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag & drop with icons deactivate the "mouse over" highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window.


I'm trying to produce a linear regression model, but I only have 25 observations and 34 predictors.  I'm trying feature selection,  library(MASS) full.m <- lm(fmla, data=mydata) fsel.m <- step(full.m, direction = "both")   but I get this error,  Error in step(full.m, direction = "both") :    AIC is -infinity for this model, so 'step' cannot proceed   Well, then I tried PCA and factor analysis but I get this weird image from PCA.  r <- prcomp(formula=pca.fmla, mydata, scale=FALSE)     In factor analysis,  f <- factanal(x=pca.fmla, mydata, factors=2)   I get,  Error in solve.default(cv) :    system is computationally singular: reciprocal condition number = 1.09137e-18   Any help please?  EDIT: I can answer this.

I am trying to perform stepwise regression for variable selection in R.  In matlab, the stepwisefit function is able to work in n < p problems. Trying to use step() for such problems i get the error message AIC is -infinity for this model, so 'step' cannot proceed. Is there a way to modify parameters so i can use step function?


I want link directly to my iOS in App Store, when a user scans a QR code. Actually I'm using this link in QR code:   But it always first links to Safari and the redirects to my iOS app in the App Store.  Is there a way to directly link to the App Store, without Safari?

I am creating a free version of my iPhone game. I want to have a button inside the free version that takes people to the paid version in the app store. If I use a standard link    the iPhone opens Safari first, and then the app store. I have used other apps that open the app store directly, so I know it is possible.  Any ideas? What is the URL Scheme for the app store?


I know that the only possible subgroups of $\mathbb Z$ are of the form $m\mathbb Z$. But how can I prove that these are the only possible subgroups?

My challenge is      Prove that if $n = 0,1,2,\ldots$ and $n\Bbb Z = \lbrace nk: k \in \Bbb Z \rbrace$, show that $n\Bbb Z$ is a subgroup of $\Bbb Z$ and are the only subgroups.   I handled the first point by saying that  i) Identity is 0, and $0\in n\Bbb Z$ and $0 \in \Bbb Z$  ii) For any $a,b \in n\Bbb Z$ $a+b = na_2 + nb_2 = n(a_2+b_2) \in n \Bbb Z$  iii) For any $na \in n\Bbb Z$, its inverse $n(-a) \in n\Bbb Z$.  For the second point, I said that all of the subgroups should be infinite, because for any finite group the largest element $a+a \notin H$, where $H$ is the potential subgroup, which is a contradiction. So $H$ must be of infinite order. For any $a \in H, -a$ should also be in $H$. The difference between any $a,b \in H$ should also be in $H$, i.e. $(a-b) \in H$. This leaves only the whole group or any group of the form $n\Bbb Z$.  Is my proof complete?