isset($_FILES["attName"]) Returns false? Send an email with attachments

I'm currently working on a website which mail user attachments to the owner of the website. However I used a form to submit image files to mail PHP file and then it send the email. It worked perfectly until I override form submit function with Javascript and use ajax to submit it and get the output from mail PHP file to add some additional functionalities.   <form id="contactForm" action="php/sendcontactusmail.php" method="post" enctype="multipart/form-data">

                 Upload Pictures of the Job                 <form  enctype="multipart/form-data" >                     <input type="file" name="fileToUpload" id="imageUploadInputId" accept="image/*" id="fileToUpload" multiple>                 </form>

                 <button type="submit"class="btn btn-primary pull-right" id="btnContactUs">Send Message</button>

 </form>   Javascript code:  $("#contactForm").submit(function(){     $.ajax({         type:"POST",         url : "php/sendcontactusmail.php",         dataType:"json",         data: $("#contactForm").serialize(),         success: function (data)         {             alert(data);             }      });     return false; });        **My Problem **  PHP code:  if(filter_var($_POST["subject"], FILTER_SANITIZE_STRING)=="estimate") {     if($_POST && isset($_FILES['fileToUpload']))     {                // Some Codes to send email     }     else          echo json_encode(isset($_FILES['fileToUpload'])); } else {     // Some codes for send separate email. }    when I run my program, alert box shows false. Which clearly means that  isset($_FILES['fileToUpload']) function returns false. I tried every way to fix that. But couldn't find the problem. Any guesses?   Note   When I run the website on my local server I selected a compatible jpg file. But it says file is not set.      Update  I went through lots of stackoverflow questions and none of their solutions gave me a true return statement. Hope this wouldn't be a duplicated question.


Proof that $\sum_{i=1}^nX_i \sim \operatorname{Gamma}(n)$

How to prove that $\sum_{i=1}^n X_i$ has a $\operatorname{Gamma}(n)$ distribution, where $X_1,\ldots,X_n$ are independent standard exponentials?


I just found this new feature of winter Hats and got my first one (Sufganiot)  I told about it to a friend, and she said she doesn't see it on my profile.  So my question is:  Are they visible only to the owner, or it should be also visible to others?


I always used to think that monthly mortgage payments had fixed proportion of interest payments and house payments (determined by rate and term). But, I recently heard that you start off with making most of your payments on interest and slowly more of it becomes house payment.   Why is this so? Is it to force people to stick to their mortgage? And, is there a method to calculate the proportions over time?  Any help would be appreciated. Thanks!


If statement to check if variable is equal to a string - Java

This is a quiz app in Java. I am trying to compare the answer text stored as a variable (answeredOne) to the actual answer Prophase. I cannot get them to be equal. Do you see anything wrong with this code?      EditText questionOne = (EditText) findViewById(R.id.answer_one);     String answeredOne = questionOne.getText().toString();     if (answeredOne == "Prophase") {         score = score + 1;     }   I keep getting zero when answering in the question.


Is there any difference between "word-for-word translation" and "word-by-word translation" and is the latter actually valid?

First off, some data: According to COCA word-for-word has 60 usages, 3 of them are "word-for-word translation". Word-by-word has 26 usages, none of them are "word-by-word translation" (but some with "transcription"). The definition of word-for-word:  : In exactly the same or, when translated, exactly equivalent words : being in or following the exact words, verbatim : one word at a time, without regard for the sense of the whole  Only the last dictionary contains a definition for word-by-word, too:  : one word at a time  The definitions given by The Free Dictionary are, obviously, identical to each other. Google hits: Word-for-word ~21m Word-for-word translation ~318k Word-by-word ~3.8m Word-by-word translation ~95k According to usages and dictionaries word-by-word is, at least, less popular. And assuming that there may be a lot of usages from non-natives among the Google hits, this could be an indicator for word-by-word being even utterly wrong. In another forum I found the following :  When I translate something "literally," (wörtlich) it still follows the main rules of the language I'm translating into. What you mean is "word-by-word" (wortwörtlich) to me.  I assume that this was written by a German but I don't know it. However, if this would be true a "word-by-word translation" would be a translation where I keep, for instance, the order of the words, disregarding if it makes sense in the target language. Some examples:  Original: word-by-word Word-by-word translation: Wort bei Wort (That's a terrible translation!) Original: It is critical to know... Word-by-word translation: Es ist kritisch zu wissen... (That's a terrible translation!) Original: Ich glaub, ich spinne. Word-by-word translation: I think I spider. (I guess only Germans understand this.)  A "word-for-word translation", however, would be an attempt to keep the word-choice as close as possible but following the rules of the target language (e.g. order of words) and also considering if the statement still makes sense in the other language. Here are better translations for the examples above:  Wort für Wort Es ist wichtig zu wissen... I think, I'm going nuts. (Actually, this is not a word-for-word translation but rather a .)  So, my questions again:  As neither Oxford nor Merriam-Webster have any entries for word-by-word in their dictionaries: is word-by-word actually valid? If yes, is there any difference between "word-by-word translation" and "word-for-word translation"? If yes again, what is it specifically?


VirtualBox can't open Windows 7, Ubuntu 14.04 host

I downloaded a Windows 7 ISO, created the VM for it , but I'm getting the following error:  VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)  Result Code-NS_ERROR_FAILURE (0x80004005) Component-ConsoleWrap Interface-IConsole {872da645-4a9b-1727-bee2-5585105b9eed}


I just installed Ubuntu 14 for the first time and cannot get the wireless to work

I just installed Ubuntu 14 on my laptop for the first time. After the installation I had no Wi-Fi connection. I went to "Edit Connections" and created a "Wi-Fi Connection", but don't know how to answer the questions such as SSID, Mode, BSSID, Device MAC address, Cloned MAC address, and MTU.  Can one of you gurus please help me?  Many thanks in advance and have a nice day.  Regards, Majid Chavoshi  Thanks for your assistance, below please find the output of lspci -knn | grep Net -A2  $ lspci -knn | grep Net -A2 00:19.0 Ethernet controller [0200]: Intel Corporation 82567LM Gigabit Network         Connection [8086:10fs] (rev 03) Subsystem: Dell Device [1028:024f] Kernel driver in use: e1000e  oc:oo.o Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01) Subsystem: Dell Wireless 1397 WLAN Mini-Card [1028:000c] Kernel driver in use: b43-pci-bridge


How can I use polygon grid to export raster

I have a polygon grid which consists of 100 square polygons. For each square I need to export the raster overlay. I have ArcGIS 10.0, FME 2014, Saga-GIS. Is there a suitable tool for this or do I need to script something with Python or Model builder?


Skip document loading when Visual Studio starts up

When Visual Studio 2010 starts up it sometimes freezes when loading documents that were previously opened when I had the solution open last. I have to end the process in Task Manager  and reopen it. When I reopen it, it skips document loading and says this in the Output window:     An error was encountered while opening associated documents the last   time this solution was loaded. Document load is being skipped during   this solution load in order to avoid that error.   My question is, is there an argument (or a setting) I can use when opening Visual Studio that will force document loading to be skipped? That way I won't have to open VS and wait for it to freeze before killing it and opening it again.


M-113 armored vehicle from Vietnam to sword and sorcery land, fights dragon

Read it around 1978-9.  Wizard plucks an M-113, about to be RPG-d from the jungles of Vietnam, with its crew and dumps it into a medieval hack and slash land with various non-human races and some magic.  The new king there is near-sighted and wasn't anyone's first pick when his dad died, but he ends up doing a good job.  I believe the APC meshes in with the whole war of succession bit.  The US soldiers have a number of adventures, eventually barely kill a dragon (wizard had aimed for a tank, not an APC) and get sent back home, 10 seconds earlier, where they expect the unlucky RPG gunner and nuke his butt.  There was a second book as well, tank commander goes back to live in sword and sorcery land, but I don't think the author did much else after.


Punctuation after a list introduced by a colon in the middle of a sentence

Consider the following sentence:     I am particularly grateful to seven people: A, B, C, D, E, F, and G[?] for our numerous merry gatherings, whether with reason or not.   The question is: What punctuation should follow a list introduced by a colon in the middle of a sentence?  This questions is related to . I believe this question is different due to the following. In that case, the clause is independence, and the conclusion is to reformat it using parentheses or em dashes. In this case, the clause is dependent, and the use of a colon is reasonable.


Putting a window air conditioner into an awning window

I bought a window air conditioner thinking that I could alter my awning window to accommodate it. I have since discovered that I can't remove the part of the window that swings out or alter it so that it swings out farther. Has anyone found a solution to this, besides using a portable air conditioner, which I don't want to do?  I have thought of building a wooden enclosure for the air conditioner connected to and sealed with the window opening. In other words, a window extension. I would be concerned about a possible fire hazard because of the air (hot?) exhaust and if the exhaust would affect the material that the window is made of.


Can I activate the tap ability of a creature summoned last turn before I have to remove it to my hand?

We had this situation come in a game last night, and I wanted to make sure that we played it correctly and that I understood the rules.  Player A had an  in play. During this turn, he cast an . He then ended his turn. During the upkeep of his next turn, he targeted the Javelineers with the Free-Riders' ability and then responded by tapping the Javelineers to use their ability.  By my understanding, the Javelineers ability would resolve first and he'd get to do a point of damage. Then the Free-Riders' ability would resolve, returning the Javelineers to his hand, and allowing him to cast them again. That seemed to be within the rules.  However, I wasn't sure when the Javelineers' summoning sickness wore off. Does it wear off in time for him to use this ability before they get returned to his hand by the Free-Riders?


I have a problem. I need to host grid with controls in ScrollViewer to prevent textbox from being either truncated or collapsed to zero-with at the UI. Also I want the with of textbox to be expanded when user change windows width. I'm setting Window's content to following code  <DockPanel>     <TreeView DockPanel.Dock="Left" Width="150"/>     <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">         <Grid>             <Grid.ColumnDefinitions>                 <ColumnDefinition Width="Auto"/>                 <ColumnDefinition />             </Grid.ColumnDefinitions>             <Grid.RowDefinitions>                 <RowDefinition Height="Auto"/>             </Grid.RowDefinitions>             <TextBlock Text="Name"                         Margin="5"                         VerticalAlignment="Center"/>             <TextBox Grid.Column="1"                      Text="Some Name"                      Margin="5"                      VerticalAlignment="Center"                      MinWidth="200"/>         </Grid>     </ScrollViewer> </DockPanel>   All work fine, but when user types very long text in TextBox it is being expanded and horizontal scroll appears. Is there any easy way to limit TextBox maximum width and allow it to be expanded only when user changes window size.


How to replace all spaces present in a string with underscore using javascript?

I have a string with spaces separating words. I want to replace all the spaces in the string with underscore. Please tell me any small code for that because my solution is taking too much space. Example : 'Divyanshu Singh Divyanshu Singh' output : 'Divyanshu_singh_Divyanshu_Singh'


I am Sri Lankan citizen. I have been working as an Engineer for the last 2 years in Sri Lanka and joined my most recent company 6 months ago. I recently applied for UK tourist visa and got a refusal.   I wanted to visit London as it was one of my dream destinations. I was refused on three facts.   the origin of income is not clear. That may be because I was working remotely and they paid me via petty cash rather than pay slips. November salary is higher as I joined 5 days before the payroll date and that amount is higher than what I stated in the form. I don't have any property or family ties to Sri Lanka.   Apart from my salary, there are no other deposits in my account. I am unmarried and don't own any assets.  I want address these issues.   My company is ready to provide a justification from their end on the petty cash/salary slips issue and they are happy to even provide full sponsorship as I  worked very hard during the last 6 months.   I have a bond of 2500 dollar with my company as I received some training so I will definitely return to the country after the visit.    Previously I applied saying that I am covering my expenses myself. One of my friends sent me an invitation letter (no sponsor letters). My passport is not a fresh passport i have stamps for few countries on tourist visas.   I am planing to reapply but really am worried because I would not like to get a second refusal. As I am getting a sponsorship now from the company will that make improve the application or seem suspicious? My company is very stable and reputed people have been to UK before for training.


Find count of all combination of numbers whose sum is x

I want to find the sum of all combination of numbers whose sum is x, for e.g.  when x = 3 f(x) = countOf(111,12,21,3) = 4


Subscribe to a particular question by email (not RSS)

Suppose I want to subscribe to all activity in response to a question I am interested in. I am  aware of the , but I want email notifications. How do I do this?


How can I change the thickness of \hrulefill

I am writing a worksheet for a math ed class. I am asking questions and would like the answer lines to start as soon as the question ends, and not the next line. This is partly because I want to start the answer (then students finish it) as well as there is limited space.  \documentclass{exam} \begin{document}   \begin{questions}     \question List the names of 10 people in your class? Ben, Donna, \hrulefill\fillwithlines{0.5in}   \end{questions} \end{document}   The problem is that the two sets of lines are different thicknesses.  Any ideas?


I think printf broke my newlines in terminal

After running a bash script, my (gnome-)terminal ended up printing each new line where the last one ended (but on the next row). I think it was printf that broke things, since it works if I replace printf with echo. Have you any idea what this could be, and how to fix it without having to close the terminal session?    I can not provide the script, because of security reasons. When I have time I will see if I can create a minimal broken example to show.


SVCHOST.EXE Using 25% Of CPU Load When Windows Update Is Running

Usually Windows Update does not take that much time to check what updates are available but this time I noticed that it took over 1 hour for it to check and return with information what updates it recommends to be installed. While at it I noticed svchost.exe using 25% of CPU load in Task Manager:    I have experienced similar Windows Update delay once but it was for laptop where I have not updated Windows for over 6 months. I thought it's because there's so much updates that need to be found, compared and downloaded by Windows Update. Not the case with my current laptop where I updated every time they have update available.  I am using Windows 7 64-bit Enterprise


i'd like to be able to open an app as a different user. For example PC1 is my main account and PC7 is my secondary one.   I can achieve the effect in terminal using  su - pc7  insert password /Applications/Application.app/Contents/MacOS/ApplicationName  How can i use the automator to make a script/app whatever that does this by a simple doubleclick?  Thanks


What's happen? Suddenly No Sound + Youtube's Videos are played Too Fast in 13.04

What has happened? Suddenly the PC have no sound and YouTube's videos are played too fast. Is there a Flash problem?  Ubuntu Version : 13.04 [Desktop]


I have comcast xfinity cable coming into my house.the cable runs to a comcast supplied router.On the back of the router are 4 ethernet jacks. I am running my 2 computers using wifi. I am using a CAT5 ethernet cable from the back of the router connected to a PS4 game located about 50 feet away from the router. I want to know if I can split this one ethernet cable so that I can then connect the PS4 game with one ethernet cable on one TV and run another ethernet cable to a different TV and plug into a blu-ray player. Thanks


Does it make sense to only drop a specific level of a categorical variable?

I don't have SAS and the dataset with me, so I made up this table (from my memory). Basically this is what I got:    After deciding to leave the variable $age$ and $risk$ in my model, I created this interaction term. According to the yellow table, I suppose I should not drop this term since that would significantly impact my model (if I haven't interpreted it wrong). However, there are several levels within each class. We see that the test statistics of $old*standard$ is insignificant.   Question 1: Does it make sense to drop this particular level of interactions and run regression on the others?  Question 2: If that does make sense (which I doubt), do I create dummy variables on the reference levels as well? How would I interpret the intercept then?


I would like to know can any Lorentzian manifold be 3+1 foliated? I would like to know when a 3+1  of a Lorentzian manifold exists and when it does not exist. If a 3+1 foliation does not exist, can it have other kinds of foliations?


I have IPhone 4 running with Version 5.1.1 (9B206) I would like to update the firmware, but not to the current latest version (7.1.1) which is known to be slow on IPhone 4.  In the phone settings I can only choose the latest available firmware version. Is there a way to update the phone to an earlier version such as 6 ?


Can't change owner of folders/files on thumb drive

I have a drive being mounted (either manually or automatically using usbmount) and I can't change the owner or modify the permissions on the mounted drive or folders/files within in order for Mono to write files to it. I keep getting an operation not permitted error. I have since removed the usbmount package and I'm trying to affect the permissions on the mounted drive.. can't touch it      $sudo chmod 777 Folder drwx------  2 jroper jroper 16384 Sep 13 16:13 Folder/  jroper@ubuntu:/media/usb$ ll drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chmod 777 Folder jroper@ubuntu:/media/usb$ ll total 52 drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chown jroper:jroper Folder chown: changing ownership of ‘Folder’: Operation not permitted jroper@ubuntu:/media/usb$ ll total 52 drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chgrp jroper Folder/ chgrp: changing group of ‘Folder/’: Operation not permitted


Is Array Overflow a Stack Exchange web site?

There's a site called Array Overflow at . Is it legit? Its Facebook Page says nothing about the operator of the web site, and at the bottom of the site it just says (C) Array Overflow.


Suppose that we are in the Weak Field Condition, that is: $$g_{\mu\nu}=\eta _{\mu\nu}+h_{\mu\nu}$$ where $\eta _{\mu\nu}$ is the metric tensor of flat space time (Minkowski spacetime) and $h_{\mu\nu}$ is a perturbation such that: $$|h_{\mu\nu}|<<1$$ Perfect. But now I would like to find the tensor $g^{\mu\nu}$; by definition (it is by definition of $g^{\mu\nu}$, right?) we have: $$g_{\mu\lambda}g^{\lambda \nu}=\delta ^\nu _\mu$$ I am fine with all the above, but now it is said that from the previous equation we can derive that: $$g^{\mu\nu}=\eta^{\mu\nu}-h^{\mu\nu}$$ why? Can you show me the process behind this result?


Provide a standard way to link tags on disparate sites

Consider, for a moment, a worthwhile technology like .  If you want to use their API, you might have a question you would ask on .  If you had a question about the Dropbox app that you install on your PC to automatically synchronize files to and from the cloud, you'd want to ask it at .  If you were having an issue with the web interface, a question on  wouldn't go amiss.  Let's not forget there's a very nice Android app you might ask about on .  Oh, right. There's an iOS app too, which you'd ask about at .  That's how we do things around here, and it's all good. (I'm much better equipped to help someone with the Android app or the web interface than with the iOS app, for instance.) And, inevitably, there will be some cross-contamination: a question about the PC app on Web Apps, for instance.  Wouldn't it be nice to be able to cross-link those tags to all of those other sites? And to do so in a standardized way?  Yes, of course, tag wikis can be edited to include links to those other sites. But it's not standardized, so it will look different on every site, and it's a bit of effort.  So I propose a system similar to synonyms. Call it "cross-site synonyms" or something. Where someone can propose that a tag on one Stack Exchange site is the counterpart of a tag on another Stack Exchange site. Heck, even allow people to vote on those links like synonyms.


Joing the Quant Stack Exchange gives an error

I am trying to join the Quant Stack Exchange:   When I try to join it gives me an error "Oops" something went wrong. There are no further details, and it has been like for many attempts and in different browsers.  I have joined other Stack Exchanges with no problem. Also, I am attempting to join through a Facebook profile, which is how I have joined the other sites.


Use of "Proper" as a postpositive adjective

I have an inkling that the following word usage is grammatically-correct; however, it is immensely difficult to search for confirmation, as all I receive for queries like "Proper as an adjective" are reams of results on "Proper adjectives". The word itself I am using as a postpositive adjective, similar in form to the phrase "time immemorial".  The shelter remains in name only; the shelter proper is in another town. Work in theory remained, although operations proper had mostly been outsourced.  Can anyone advise?


Apologies that this is a similar question but I have not yet found the solution here.  I have 32 Gb A6, apps consume around 10Gb and I have a ton on SD card but storage info says I only have 2Gb free on internal memory. Have downloaded X-plore but I am either too stupid to figure it out or it does not easily show what the issue is. Any help is much appreciated


Where do the Night King and his army get the tools and weapons from?

Where do the Night King and his army of the dead get their swords from?  Also, in the recent episode S07E06, the army is seen dragging the dragon from the water using heavy chains. Where did they get such heavy tools from in the ice lands?


Let $\alpha,\beta$ be fixed complex numbers and $z$ is a variable complex number such that $|z-\alpha|^2+|z-\beta|^2=k.$Find out the condition for $k$ such that the locus of $z$ is a circle.    I think,if i take $\alpha,\beta$ as diametrically opposite points and $z$ on the circumference,then the $\alpha,\beta$ subtend right angle on $z$.But i cannot figure out the condition.The answer given is $k>\frac{1}{2}|\alpha-\beta|^2$


feminine colloquialisms to connote platonic endearment:

It seems as though in the U.S./in English we have a million words to connote endearment to men(albeit in a somewhat strange way) that are used with varying degrees of gender neutrality. But I'm wondering if anyone has any traditionally feminine terms of endearment or terms of endearment traditionally used for women?


How do I tone down the intensity of raw onion?

How can I tone down the intensity of raw onion? Some onions have a more acute taste and smell than others of the same type, and I would like to avoid them in salad dish, or making dips with raw onion. If effectively none, an alternative solution that can also be helpful is to find out what condiments can I add/mix with raw onion to cancel out the intensity of the the acute taste.  [EDIT] There is a uniquely (IMHO) sweet taste to onion that I like. But accompany with that is the acute scene and flavor to it that I wanted to get ride of. I do not want to waste away the taste of onion, but remove the acuteness and remain the sweetness.


Should we migrate old questions to new SE sites?

I have    under my belt in SO, long before  was born. My question is - should we migrate old questions like these to their respective, more fitting, SE site?  Pros for this are:   viewers of, in this example, TeX SE would probably search their website and not SO for questions. Another When I want to lookup and old question that I ask, I have only one place to look in.


What are the exceptions for comma splice rule?

I understand that if two independent sentences are connected with a comma but without a conjunction it is considered a comma splice. Recently I have seen the below sentence in a book and to me it looks like a comma splice. If I'm correct in my conclusion that the below qualifies for a comma splice, then what are the exceptions for the comma splice rule?     "The smaller numbers come from darker patches, the larger numbers from brighter patches."


What is the Galois group of $(x^3-2)(x^3-3)$ over $\mathbb{Q}$?

I know that there is an answer in . I know the splitting field is $L=Q(ζ3,\sqrt[3]2,\sqrt[3]3)$. But I'm quite confused with [L:Q]=18. How can I get it? And what are the subgroups of this Galois group?  Now I know how to get [L:Q]=18. But what is the Galois group? Is it C3⋊S3 or C3xS3?


For i.i.d. random varianbles $X$, $Y$, can $X-Y$ be uniform [0,1]?

Is there any distribution for two i.i.d. random variables $X,Y$ where the joint distribution of $X-Y$ is uniform over support [0,1]?


May I use a power supply of 13V@300ma instead of a 9V@850ma required by device(keyboard), without harming the device?


Downvoted an answer, undid the downvote, got badge and still says one downvote. Is this a bug or by design?

My sequence of steps:        Downvoted an answer.   Saw I lost one rep.   Decided to undo my downvote.   Got Critic Badge, and 1 downvote in my history   Did not lose rep (got one rep back).      So I've technically cast a downvote, but I didn't lose rep from it since it was undone, and the downvote did not stay on the question. It was a while ago, but I think I undid it because I decided I wanted to make it to 50 rep sooner so I could start commenting.  Can someone confirm that:        this a bug or a feature.   this still happens.   I'm not crazy and I don't have a downvote hiding somewhere?


Is there anyway to shorten something like this in Javascript: if (x == 1 || x == 2 || x == 3 || x == 4) to something like if (x == (1 || 2 || 3 || 4)) ?


I know I have already asked this question, but I didn't get an answer that worked. So please could someone answer my question?  I have a text file, containing paragraphs of text, each separated by a single empty line. Now I need to number each paragraph with its own number. So the first paragraph will have the number 1 in the margin, the second paragraph will have the number 2 in the margin and the third will have the number 3 in the margin, etc. I know it seems obvious but I think my last post may not have got the message across clearly.  So I need a Linux command that can get that job done. However, my issue is that the command needs to be simple. By that, I mean no complicated Perl scripts or, any difficult to understand, blocks of code.  What I'm looking for, is a simple command that can easily carry out the task. Or if a script needs to be written, make it simple and explain the code so someone who has never used Perl nor Bash scripts can still apply it to their code and understand what they are doing.  Sorry if the question may come across as impolite. Responses will much be appreciated because there is nothing on the web on this topic.


I've been looking for answer on this site, but didn't find a solution, or dumb enough not to apply for my situation. I need to extrude vertices along already created edges? Is there any way to do that?


Changing the text of an entire column to uppercase

I want Google spreadsheets to automatically uppercase text inputted into a cell.  I'm using the following code and receiving circular dependency errors:  =ARRAYFORMULA(UPPER(C5:C))   I'm inputting text into column C


Cite fails after `\tableofcontents` in `svjour3.cls` when `todonotes` is loaded

When using the Springer class svjour3 (can be obtained ), I stumbled upon a problem with \cite. Look at the following minimal example:  \documentclass{svjour3}  \usepackage{todonotes}  \usepackage{biblatex} \addbibresource{references.bib}  \begin{document} \cite{test1} % \cite{test2} \tableofcontents \cite{test1} \cite{test2} \end{document}   You can use two arbitrary bib entries with keys test1 and test2 in references.bib for this.  When you compile this, both cites of test1 work, but the cite to test2 does not work. Anything of the following fixes the issue:   comment out the todonotes package, comment out the \tableofcontents, or use the article class instead of svjour3.   I checked the definition of \tableofcontents in svjour3, which is  \newcommand\tableofcontents{%     \section*{\contentsname}%     \@starttoc{toc}%     \addtocontents{toc}{\begingroup\protect\small}%     \AtEndDocument{\addtocontents{toc}{\endgroup}}%     }   Indeed, using article with this definition of \tableofcontents also fails. Any insights on what's happening here? Is this expected behavior or a bug in svjour3?


Why can't we use the Present Perfect tense for dead people?

Immanuel Kant has been born in Europe.   I heard that the following sentence is wrong, but why can't we use Present Perfect for a dead person?


A number is a perfect square if and only if it has odd number of positive divisors

I believe I have the solution to this problem but post it anyway to get feedback and alternate solutions/angles for it.  For all $n \in \mathrm {Z_+}$ prove $n$ is a perfect square if and only if $n$ has odd # of positive divisors. Thought to use induction but the perfect squares don't increase by 1.    $\Rightarrow$: If $n$ is a perfect square it must consist of 1+ prime factors each to an even power.  If $n$ consists of 1+ prime factors each to an even power it must have an odd # of positive divisors.  $\Leftarrow$: If $n$ has an odd number of positive divisors it must consist of 1+ prime factors each to an even power.  If $n$ consists of 1+ prime factors each to an even power it must be a perfect square.  Thanks.


A matrix and its transpose have the same set of eigenvalues/other version: $A$ and $A^T$ have the same spectrum

Let $ \sigma(A)$ be the set of all eigenvalues of $A$. Show that $ \sigma(A) = \sigma\left(A^T\right)$ where $A^T$ is the transpose matrix of $A$.


How was Jon Snow able to kill the White Walker in S05E08?

In "Hardhome", the eight episode of season five of Game of Thrones, Jon Snow battles a White Walker. As established, White Walkers can only be killed by dragonglass. But in this battle Jon Snow kills a White Walker with his sword. Does this mean that Jon Snow's sword is made of dragonglass? If not, how does he kill a White Walker?


Why the Survey Corps doesn't find a human body inside each titan?

In Attack on Titan (anime), up till now we are given information that the "dumb" titans that wonder outside the walls are probably humans. Given that both "smart" (Eren/Annie/Yumir/etc) and "dumb" titans share the same weakness this has always been a possibility.  However, its not clear why the Survey Corps never finds the bodies of the humans inside the "dumb" titans? They should at least find the bones of the human. Is this a logical flaw of the series?  BTW: please, no spoilers from the manga, only info available in the anime up to season 2 episode 12.


How to upgrade ubuntu from 14.04 to 18.04?

The last week of next month ubuntu will most likely release 18.04 LTS. Now my system is 14.04 and next month I want to upgrade it to 18.04. Can I directly upgrade my system from 14.04 to 18.04 or I have to first upgrade from 14.04 to 16.04 and then to 18.04? I really want to avoid the second method of upgrading.  Edit:  How should I update 14.04 to 16.04. I tried this method sudo update-manager -d and installed all the necessary software and restarted the system. Again I run sudo update-manager -d and it showed that my computer is upto date but doesnt have any button to update to 16.04


what is an algorithm for generating all the possible numbers from a given set of integers?

I want to generate all possible combinations of numbers from a given set of integers. For example: if 1,2 and 3 are the given integers, then all the possible combinations are 123,312,213,231,321 and 132...


How do I know if the man page I'm looking at is the correct one?

For example,  [fakename]$ type echo echo is a shell builtin   But man echo gives me the GNU coreutils version of echo. What's the easiest way to tell if the man page I'm looking at is the correct one, i.e the one for the utility I'd get if I directly invoked it?


My \headmark looks as follow:     Chapter Chapternumber. Chapter-title   How can I replace the . with a - ?  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Masters/Doctoral Thesis  % LaTeX Template % Version 2.5 (27/8/17) % % This template was downloaded from: % http://www.LaTeXTemplates.com % % Version 2.x major modifications by: % Vel (vel@latextemplates.com) % % This template is based on a template by: % Steve Gunn (http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/) % Sunil Patel (http://www.sunilpatel.co.uk/thesis-template/) % % Template license: % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[ english, % ngerman for German ]{MastersDoctoralThesis} % The class file specifying the document structure \usepackage{blindtext} \begin{document} \chapter{Wombat} \blindtext[10] \end{document}


Should \tikzset or \tikzstyle be used to define TikZ styles?

The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using:  \tikzset{my style/.style={<tikz options>},...}   However, in several places in the same manual the otherwise undocumented macro \tikzstyle is used for settings styles:  \tikzstyle{my style}=[<tikz options>]   I also have seen this usage in several online code examples.  Why are there two ways to set TikZ styles and which one should be used for new code?  Note: I actually know the answer but think that such a question with good answers would be beneficial for other users.


Converting a quaternion in a right to left handed coordinate system

I have a quaternion from an IMU that id like to represent in unity. The issue is that the sensor uses a right handed coordinate system while unity uses a left handed coordinate system. In order to have the rotations of the IMU reflect in unity correctly, I would need to remap the axis. How can I do this by altering the quaternion components?  Specifically, I would need to map           sensor   unity forward  x        z up       z        y right    -y       x   I have seen multiple questions regarding this question especially this one.    However, it only explains a specific case where its a right hand to right hand remapping.  If possible, include an explanation without mathematics equations of how you would map any coordinate system to any other coordinate system.


In C#, what is the best method to format a string as XML?

I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string.  I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string formattedXmlText)", but it couldn't be that easy, could it?  Very specifically, what would the method "SomeMethod" have to be that would produce the output below?  string unformattedXml; string formattedXml;  unformattedXml = "<?xml version=\"1.0\"?><book><author>Lewis, C.S.</author><title>The Four Loves</title></book>" formattedXml = SomeMethod(unformattedXml);  Console.WriteLine(formattedXml);   Output:  <?xml version="1.0"?>   <book id="123">     <author>Lewis, C.S.</author>     <title>The Four Loves</title>   </book>


I have a working code (below) to convert a number to Excel-like (A...Z AA...AZ BA...BZ ...ZA-ZZ) column codes (headers).  For simplicity I limited it to 1 or 2 character codes.  Can the algorithm be streamlined by using a bit more of elementary math or using it differently?  Please note that I just happened to need it in JavaScript (so I wrote it in JS) and am not looking for pure code improvements.  function numberToLetters(nNum) {     var result;     if (nNum <= 26) {         result = letter(nNum);     } else {         var modulo = nNum % 26;         var quotient = Math.floor(nNum / 26);         if (modulo === 0) {             result = letter(quotient - 1) + letter(26);         } else {             result = letter(quotient) + letter(modulo);         }     }      return result; }  function letter(nNum) {     var a = "A".charCodeAt(0);     return String.fromCharCode(a + nNum - 1); }


only one workspace after upgrade to 13.04

Title says it all.   Where can I add workspaces - looked into CompizConfig but I was not able to find a tab where I can specify the # of workspaces. I used to have 2X2 and that's what I'm looking for.


In the main room of the older apartment I live in, dust is accumulating very quickly. There is no carpet (only hardwood floor), no curtain, no air vent, no pet, no bedding, no clothes. Previous tenants had the same problem so it's not something I brought in.   I cleaned thoroughly, including the baseboard radiator (which, as a test, I covered with cloth to ascertain it's not the cause), behind the range and the fridge (there is a small open kitchen corner). Yet, here's what a surface looks like 3 days after wiping it clean:    The dust looks more like tiny fibers. In raking light, as seen here, it's quite impressive.  Any clue would be greatly appreciated.  For those who may have the same problem, the dust was fiberglass from inside the electric range. When burners were on, convection was sending tiny bits of it in the air.


Can we see enough of the universe to have a valid opinion on whether it's expanding?

Let me preface by saying I know very little about cosmology but have been wanting to learn. I'm a mathematician specializing in hyperbolic $3$-manifolds, and am aware of some of the applications of that theory to cosmology but have yet to study the details. So please forgive any ignorance in my question, and be aware that I'm looking for help in starting to think about these concepts.  The text below has been edited to be more specific. Thanks to @ACuriousMind for clarifying some semantic aspects and pointing me to some information.  If I understand correctly, experiments have shown that, as far away from us as we can measure into space, things (e.g. galaxies) seem to be getting further apart. "Hubble's Law" gives us one version of that statement, and it seems to have remained true as we increase the distance into space by which we can measure. Skipping details, this would encompass the redshift surveys, cosmic microwave background experiments, and other studies. While these were different ways of supporting the "cosmic inflation" idea, I think their means of doing so are similar (please correct me if I'm wrong): they show the distance between things generally increasing in a sphere around our vantage point.  My question is not about those experiments, but about how it implies the entire universe is expanding. What reason do we have to think that the portion of space we have measured is representative of the whole thing? From the perspective of dynamical systems, it is perfectly natural for there to be attracting points and repelling points within the same system. How do we reject the hypothesis that we are just near a (relatively, for us) massive repelling point?  An important aspect of this question is semantic. Firstly, what do I mean by "the universe." I think my question remains valid even if I don't mean, quite vaguely, everything that exists. Physics has a notion of "the observable universe," which notably is not the same as the observed universe. Rather, it is the portion which we are theoretically capable of observing. But if I look this up on Wikipedia, the definition of the "observable universe" evokes the assumption that the universe is expanding. To a mathematician, it seems a bad idea to assume a property in the definition, that we have created the definition to study! For all practical purposes, perhaps it doesn't matter. It is probably true that we will never observe anything beyond "the observable universe," but to a cosmologist it should be relevant how far we can extrapolate a grander structure.  To move on from the semantics, let's say in this question "the universe" is the portion of reality that we are path-connected to in the topological sense. Even that bears unfounded assumptions but maybe it's good enough for this conversation.  Let me now say a bit about how small the part of the universe we've measured is likely to be, from a topologist's perspective. Consider our experiments involving curvature of space. More and more the results have been claiming "the universe is probably flat." Well, a fundamental property of a manifold is that when you measure a tiny portion of it, it seems to be flat. So either it isn't flat and we only think it is because we can barely see any of it. Or it is flat, but then it probably is infinite, in which case it is literally impossible to measure more than 0% of it.   So... what do we have to go on really when asserting anything about the universe in a cosmological sense? (From here, the Big Bang is highly suspect too.) I say this not to be snide, but because I really want to know. I especially would love to read some expository papers that would be accessible to a $3$-manifold topologist.


Do I need Schengen Visa for transit in Dusseldorf, flying in from CGK-Abu Dhabi-Dus-JFK?

I'm flying from CGK to JFK with connection in AUH and DUS. All with Air Berlin, with flight from CGK-AUH-DUS operated by Etihad. Do I need to have Schengen visa for transit in DUS?


Windows 10 Default font messed up Missing fonts

So as you can see here:    My fonts messed up for some reason. It was fine yesterday though.  I've already tried sfc /scannow which didn't do anything and I can't change the font via appearances because... I can't read what it says when the window opens..  Any help would be very appreciated :)  Edit: I did some more digging, and according to InDesign I'm simply just missing 90% of my fonts? I don't know if that helps though.


Why is there no equivalence in the definition of injection?

Everywhere I found that the definition of an injection only uses an implication. However, I can't think a case where if $f$ is an injective function, and if $a = b$, then $f(a) \neq f(b)$. Why do we use an implication ?


Java / Android - Calculate difference between timestamps

I have a problem figuring out how to calculate the elapsed time between two timestamps (hours, minutes, seconds). This is the result:   String starttime = beginElement.getTimestamp(); String endtime = element.getTimestamp();   I/Start time: 1496258892612  I/End time: 1496258928999  long diffTime = Long.parseLong(endtime) - Long.parseLong(starttime);   I/Diff time: 36387  String elapsedtime = new SimpleDateFormat("hh:mm:ss").format(Long.parseLong(String.valueOf(diffTime)));   I/Elapsed time: 01:00:36  In fact, the elapsed time is just 36 seconds. It's always one hour less than the result.  How do I fix this strange issue?


How does the secondary effect of the Heat Metal spell work?

The  spell description states:  If a creature is holding or wearing the object and takes the damage from it, the creature must succeed on a Constitution saving throw or drop the object if it can. If it doesn't drop the object, it has disadvantage on attack rolls and ability checks until the start of your next turn...  I am unsure how this disadvantage mechanic functions as a whole. When do you suffer from it and in what ways (if any) can you end it? For example: What happens if you fail the save but cannot drop the object? Does dropping the object later, on your turn, do anything? What happens if you succeed on the save?  Does dropping the object later, on your turn, do anything? I would like it to be assumed that ; however, heat metal can still force you to drop the weapon. I would also like it to be assumed that .


Align items by the range-phrase in a S colum type from siunitx package

I'm creating a table with a S column type from the siunitx package. The items in this column are a range of numbers. There is a way to align this items, in the second column by the range-phrase "to"?  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{booktabs} \usepackage{siunitx} \begin{document} \begin{table}[htb] \footnotesize \centering \begin{tabular}{SS} \toprule \textbf{Head 1 (\si{\cm})}          & \textbf{Head 2 (\si{\mm})}          \\  \midrule 30,12 & \numrange{2,4}{4,84} \\  3,45 & \numrange{356}{445} \\ 300,42 & \numrange{0,487}{1,334} \\ 33,00 & \numrange{6}{21} \\ \bottomrule \end{tabular} \end{table} \end{document}


Remove Windows Defender Antivirus Service in Task Manager

How do I remove the Windows Defender Antivirus Service? See picture below. Trying to close the process in task manager.


Assuming that the person stands parallel to a wall. The person and the wall are at the same ground level. The person takes a picture of the wall (Considering that the person always captures the bottom edge of the wall).  Hypothesis:  It is obvious that when the person is closer to the wall, the bottom edge of the wall tends to be at the bottom in the image. As we move farther, the edge moves more closer towards the center in the image.  So, there exists a relationship between "Distance from wall" and "Position of edge of the wall in the image".   The known parameters are:   -> Height of the camera from which the image is captured  -> Angle(Orientation of the camera)  -> Position of the edge in the image   How can I formulate the distance(depth) based on the above parameters? Are there any other parameters that affect the above relationship?  Note: I don't know any of the size of the objects in the screen.


How do I restore from a drop database command using a mysql binary log?

How can I restore a mysql database that was dropped using a "drop database" command? I have access to binary logs which should make this type of rollback possible.


Is there a way to keep an app running after closing the terminal that calls it?

Say I run an app from a terminal, but in some cases I want to close the terminal but hope the app keeps running.   Is there anyway to do so in Linux?  I just found that when calling an app via "exec APP", either would be closed if the other was closed.


JQuery .on(click) event handler not stopping submit when  element is clicked

I have a form with a table inside it. The table has four input elements each with type=submit. The form also has a hidden input element. What I want to do is the following:  When one of the four input elements is clicked, a jQuery event should fire that:   Stops submission Sets the id of the clicked element as the value of the hidden input Submits the form   The event is not firing and the form is being submitted normally. I can't see what the issue is. Any help is appreciated.  <form id="myForm" method="post" action="" style="background-color: antiquewhite; margin: 0; padding: 0;">   {% csrf_token %}   <input type="hidden" id="op" name="op" value="">

Is this an origin for the claim?
       	       <input type="submit" id="1" value="Yes">	       <input type="submit" id="2" value="No">

       <input type="submit" id="3" value="Invalid Input">	       <input type="submit" id="4" value="Don't Know">

 </form>   $("input").on('click', function(e) {   e.preventDefault();   let choice = e.target.id;   document.getElementById("op").value = choice;   $("#myForm").submit(); });


In jQuery I need to do an if statement to see if $this doesn't contain the class '.selected'.  $(".thumbs").hover(function(){  $(this).stop().fadeTo("normal", 1.0); },function(){ $(this).stop().fadeTo("slow", 0.3);  });   Basically when this function is run (on hover) I don't want to perform the fades if the class '.selected' has been appended to the div, this will mean that the image will be at full opacity to signify that it's selected. Searched on Google to no luck even though it's a simple question of how to use an IF statement...


Google search for "-1" returning no results

How come that searching for "-1" on Google Search Engine returns: Your search - -1 - did not match any documents. Suggestions: Make sure that all words are spelled correctly. Try different keywords. Try more general keywords. Aren't there really results for -1?


Finding the map seed of a Civilization V game

I recently started a game on Civilization V and I really like the map I'm playing. I know it's possible to manually input a seed when creating a game but is there a way to display the seed of a game in progress?


Why is tan(Math.PI) returning a wrong value?

I'm just wondering why is this line  MessageBox.Show(Math.Tan(Math.PI).ToString());   returning value = -1.22460635382238E-16 , shouldn't that be 0 ? or am I missing something here ?


How to split comma-separated key-value pairs with quoted commas

I know there are a lot of other posts about parsing comma-separated values, but I couldn't find one that splits key-value pairs and handles quoted commas.  I have strings like this:  age=12,name=bob,hobbies="games,reading",phrase="I'm cool!"   And I want to get this:  {   'age': '12',   'name': 'bob',   'hobbies': 'games,reading',   'phrase': "I'm cool!", }   I tried using shlex like this:  lexer = shlex.shlex('''age=12,name=bob,hobbies="games,reading",phrase="I'm cool!"''') lexer.whitespace_split = True lexer.whitespace = ',' props = dict(pair.split('=', 1) for pair in lexer)   The trouble is that shlex will split the hobbies entry into two tokens, i.e. hobbies="games and reading".  Is there a way to make it take the double quotes into account?  Or is there another module I can use?  EDIT: Fixed typo for whitespace_split  EDIT 2: I'm not tied to using shlex. Regex is fine too, but I didn't know how to handle the matching quotes.


BRIEF  "We’ve reinvented electricity supply for the digital World making it possible for any generator to sell directly to a consumer".  "By buying electricity directly from generators, you get a better deal by going direct and you know where your electricity comes from."  DEBRIEF  Create a connection between two simple, similar/different shapes.  HELP  I have asked a friend of mine for his opinion about this logotype (actually a complete brand identity). He pointed me to :  I have not used Gerstner as direct inspiration, but studied Swiss Graphic Design quite intensely at the University. My opinion is that Gerstner's work is deep in my mind / subconscious. I have used an effortless square grid to design it, exactly like Gerstner did - it is the easier and natural way to do it for everyone I suppose.  FACT  The client already signed off before I recognised the similarity and he loves it.  PROBLEM  Should I honestly tell the client what's happening? Is it plagiarism? Or, is just connecting a square and a circle too general to be copyrighted?  Thanks for considering


Is there anyway for to bring installed programs from one ubuntu pc to another?

Is there anyway for to bring installed programs from one ubuntu pc to another, without installing it from the Software centre? I am having problems trying to install MyPaint on my desktop, though there was no problem on my netbook.


How to change default alignment for table environment in report class

I am using the table environment in report class. Here is the MWE:  \documentclass{report} \begin{document} \begin{table} \begin{tabular}{cc} \hline a&b\\ c&d\\ \hline \end{tabular} \caption{Table name} \end{table} \end{document}   The output I am getting is a table with that is left aligned and a caption that is centred. If I use \centering I can get the table centred. However, I need to set each table separately in the table environment.  Which command I need to modify it so that all tables are centred?


Normal approximation for binomial distribution: probabilities don't match up between 2 models

I have a binomial distribution of n = 400 and p = 0.2. With this distribution, the probability of getting k = 88 is: $$ \binom{400}{88} \ 0.2^{88} \ 0.8^{400 - 88} \ =\ 0.0295 $$  When I approximate this binomial distribution with a normal distribution, the mean of my normal distribution would be $400\ *\ 0.2\ =\ 80$, and the standard deviation would be $\sqrt{400\ *\ 0.2\ *\ 0.8} \ =\ 8$.  With this mean and standard deviation, the z-value of k = 88 would be: $$z\ =\frac{88\ -\ 80}{8} \ =\ 1$$  In a standard normal distribution, this z-value would have a probability of $0.24$ (I think this is called the pdf, but I'm still new to statistics).     This probability ($0.24$) doesn't match up with the probability I'd expected from the binomial distribution ($0.0295$). How can I explain this discrepancy?


I have a category of items lets say :   Sold In shop Coming soon   Every items are record in database as follow :   item.category = 0 for sold item.category = 1 for shop item.category = 2 for coming soon   Today I do as follow :  <% if item.category = 0 %>Sold<% end %> <% if item.category = 1 %>in shop<% end %> <% if item.category = 2 %>coming soon<% end %>   Is there a way to centralize an enum for all my application so it will be available in any pages like this :  <% if SOLD %>Sold<% end %>


Probably you would have known the answer of $\sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}.$ I then became curious about the reciprocal of cubes, not squares, like $$\sum_{n=1}^{\infty}\frac{1}{n^3}$$Can you find any answer to this? I have no clue of even where to start.


Movie where guy pilots ship to his death screaming "IT'S SO BEAUTIFUL!"?

All I can remember is that he had to pilot the ship through some supernova or other anomaly to save the other passenger.


Okay so I went to my friends house the other day and he wanted me to bring my PS4 controller as he only had 1. So when I got to his I connected my controller to his PS4 with no problem. But when I got back to my house I wanted to play ps; so I did the usual thing which is to use the leed but my controller didn't connect.  These are the things that I have tried:   The share and PS button  reset button the leed  turning off PS4  unplugged the PS4


I had an iPhone on loan from a friend to try it out and now I need to give it back. How do I make sure that everything is erased from it? SMS, Calendar, Phone Logs, contacts?


How do I make triangular parenthesis in normal text, like this ?  If I enter it directly it results in spanish exclamation and questionmarks (¡Text¿).


Why do I need to call attr_writer methods with `self` to get them to work inside a class?

This does not output anything:  class Test    attr_accessor :value    def run     set_value     puts value   end    def set_value     value = 6 # No 'self'   end end  Test.new.run   Whereas this outputs '6'  class Test    attr_accessor :value    def run     set_value     puts value   end    def set_value     self.value = 6 # With 'self'   end end  Test.new.run   Why do I need self when the method is defined already? Surely Ruby should use the method rather than creating a local variable in the set_value function?


License when reinstall - Dell XPS 12 updated from Win 8.1 to Win 10?

I just got a second hand Dell XPS 12 to use for web testing (I currently only use mac but are having a case where I must check how things looks in IE). It has Windows 10 on it. When I check with dell web site it was first delivered with 8.1 but was upgraded to Windows 10 while that was free.  Theres a million programs and files on the computer so I would like to re-install it using Windows 10.  If I understood correctly checking with MS the license should be coupled with that hardware (when upgraded to Win10) so I could just download the Win 10 ISO from MS and run an installation from that.  What do you think? Should I try to extract the license key first? And if so How? :) Or should I try to find a Dell recovery image instead? Any ideas and tips?  Thanks!  --  Here is what I did  I downloaded the Windows 10 iso from Microsoft and created a bootable USB drive with the provided tool. I booted the computer from that and when it asked for a serial I just clicked I don't have one and continued the installation.  When Windows was installed and I had put in my Wifi password it had activated itself with Microsoft. The license key is generated based on the motherboard for all (or many?) of the upgrades from Windows 8.


Cannot deactivate contact triggers (managed package) and because of that Update commands are failing

I couldnt found good answer for that i cant change Active status in Setup->Contact->Trigger Mailchimp Trigger Like This   if you cant see Look here =   I want to make deactive but i couldnt see anything i dont want to uninstall


Proof by induction: summation inductive step

Disclaimer: This question is just a practice question and is not for marks.  I am trying to prove the following statement (I'm skipping right to the inductive step here since the base case is trivial):  $\forall n \in \mathbb{N}, \hspace{3pt} $$\sum_{i=1}^{n} \frac{1}{i(i+1)} = \frac{n}{n+1}$  Inductive Step: Let P(k) be $\forall k \in \mathbb{N}, \hspace{3pt} $$\sum_{i=1}^{k} \frac{1}{i(i+1)} = \frac{k}{k+1}$. We will prove $\forall k \in \mathbb{N}, \hspace{3pt} $$\sum_{i=1}^{k+1} \frac{1}{i(i+1)} = \frac{k+1}{k+2}$ is true.  $\sum_{i=1}^{k+1} \frac{1}{i(i+1)} = \sum_{i=1}^{k} \frac{1}{i(i+1)} + \frac{1}{k(k+1)}$  I'm not sure whether the above step is correct, or how to progress with this proof. Also, is there a cookie cutter proof structure for this type of question? Thanks in advance for the assistance.


No bottom margin for declined flag notice

It seems that bottom margin is needed for declined flag notice in post flagging popup:    Screenshot was taken on ruSO.


How can I completely remove the KDE 5.6 Plasma desktop from Ubuntu 16.04 and restore Unity?

I have installed the Plasma 5.6 desktop over Unity to give a try, but I don't really like it and I want to completely remove  Plasma 5.6 and restore Unity.


UK visa refused (Pakistani nationals) due to funds parking - need advice on fresh application

Recently my parents and I applied for a UK general visitor visa. My father's visa was rejected due to an influx of funds in his account. Furthermore, my mother’s application was also subsequently rejected as she was funded by my father for the trip.   With regards to my application. I was funding my own trip and had a total of 13000 AED in my account (2380 GBP).I stated in my application that I had no other savings and that the trip would cost me 1000 GBP.   Kindly note that I have previous lived in UK for 4 years as a student and left the country before my visa expired.   Visa application feedback stated that:    I was using a significant portioning of my savings to fund the trip and this was considered unjustified.  Secondly, since i am single and have no saving in UAE. It was considered probable that I might not return at the end of my trip.    I have the following questions:   When should I reapply? I am considering applying only for myself and my mother this time and funding her for the trip.  What assurance can I provide to prove that I have a genuine reason to return to UAE at the end of my trip? Is it possible that my visa was rejected because my parents visas were rejected?


Does FDIC insurance at one bank cover each account?

I was reading that FDIC insurance covers accounts up to $250,000. Does this mean each account you have at a bank is insured up to $250,000 or is $250,000 the maximum for all accounts at a bank?   Also, if you reached the maximum at one bank, could you open an account at another bank and be insured for up to $250,000 at each bank?  Thanks


Consider an $n\times n$ nilpotent complex matrix $A$. Is it true that $A^n=0$ always? If not, is there a minimum $d$ (in terms of $n$) such that $A^d=0$ always?


What's the meaning of a set to the power of another set?

${ \mathbb{N} }^{ \left\{ 0,1 \right\}  }$ and ${ \left\{ 0,1 \right\}  }^{ \mathbb{N} }$ to be more specific, and is there a countable subset in each one of them? How do I find them?


Prove that the order of $D_n$ is $2n$.  I'm trying to find a proof for this, but couldn't find anything on the site. I found , but it's not exactly what I'm looking for. They're mentioning something about "orbits" and "stabilizers" which I haven't heard before. Is there an alternative proof for this?


High or low game without looping or "while" code

I am a student currently using java and I am having a hard time programming a high and low guessing game. I cannot use looping or "while" code. Any thoughts? This is what I have as of now:   public class FinalProject1  {    public static void main(String [] args)      {         System.out.println("Number Guessing Game 1-1000\nGuess a number");        guess();     }    public static int random()      {         int x = (int)(1000*Math.random() + 1);         return x;     }    public static void guess()    {        int num = random();       int tries = 0;       Scanner keyboard = new Scanner(System.in);       String inputString = keyboard.nextLine();       int input = Integer.parseInt(inputString);        if (input > num)        {           System.out.println("Guess a higher number");           inputString = keyboard.nextLine();       }        else if (input < num)        {           System.out.println("Guess a lower number");           inputString = keyboard.nextLine();       }        else if (num == input)        {           System.out.println("You Win");    }  }  }


What is a specific word for "loving a friend"?

In Italian, "to love someone" has two translations:    amare qualcuno, meaning "to desire a romantic relationship with someone"; voler bene a qualcuno, meaning "to care for someone" (literally: "to wish for someone's good") - for example, "to love a friend" is translated as "voler bene a un amico".   I don't know of any word in English which is as strong as "to love", yet cannot be misunderstood for interest in a romantic relationship. Is there such a phrase?    So far, the best I came up with is "to care for someone", but it doesn't express the same strength, so to speak, as "to love [a friend]".


How do I get whole and fractional parts from double in JSP/Java?

How do I get whole and fractional parts from double in JSP/Java ? If the value is 3.25 then I want to get fractional =.25, whole = 3  How can we do this in Java?


How do interpretations of Hit Points vary among D&D editions?

Is it true that Hit Points in different editions mean different things in the game world?  For instance, hit points are quite abstract concept in 5e:     Hit points represent a combination of physical and mental durability, the will to live, and luck. Creatures with more hit points are more difficult to kill.   As a comparison, they represent two specific (but still quite broad) things in Pathfinder:     Hit points mean two things in the game world: the ability to take physical punishment and keep going, and the ability to turn a serious blow into a less serious one.   (I know PF is not exactly D&D, but the idea should be similar to the D&D 3.5 edition, I guess)  I'm not familiar with the prior editions. What did HP mean earlier?


finding a recurrence relation for tile covering problem

for $n \ge 1$ let $t_n$ be the number of ways to.cover the squares of a 2xn xheckerboard using 1x2 tiles which can be rotated (ie 2x1 tile) and 2x2 tiles. 1x2 tile comes in 5 different colors and 2x2 tile in 4 different colors. find and solve a recurrence relation for $t_n$


Prove $GL_2(\mathbb{Z}/2\mathbb{Z})$ is isomorphic to $S_3$

I'm asked to show that $G=GL_2(\Bbb Z/2\Bbb Z)$ is isomorphic to $S_3$. I have few ideas but I don't manage to put them all together in order to obtain a satisying answer. I first tried using Cayley's theorem ($G$ is isomorphic to a subgroup of $S_6$), and I also noticed that $\operatorname{Card}(G)=\operatorname{Card}(S3)=6$ & that they're both non-abelian group.  Is this enough to say that considering $S_3$ is a subgroup of $S_6$ with the same cardinality than $G$, it has to be isomorphic to it ?  Could anyone give me some elements to get a more rigorous proof or lead me to an other path to show this statement ?  Thanks in advance


Should I move class methods to prototype?

I have class  function Foo(a) {   this.a = a;   this.bar = function () {     console.log(this.a);   };   this.buz = function () {     this.a();     console.log('bzz');   }; }   and I'll have quite many instances of this class. Should I move methods to prototype?  function Foo(a) {   this.a = a; } Foo.prototype = {   bar: function () {     console.log(this.a);   },   buz: function () {     this.a();     console.log('bzz');   } }


I am new to linear algebra and am trying to find the motivation behind defining it in such a way and need for defining it.  To study $2$-D,$3$-D space we have geometry, so why do we need linear algebra then?  Why did they choose the exact properties which a vector space should have? I haven't found any satisfactory answer. The text books directly starts with the theory.   Can anyone explain please?  Edit: "Why we study linear algebra?" is different from my question. That question need the applications of linear algebra, I already know that and there are many source to answer that question. What I need is background of introduction to linear algebra, not only the history, also the motivation behind choosing the properties that need to be satisfied to be a vector space - why not extra why not less? Will taking extra or less condition give something which is not very useful? Please explain it.


What's the physically correct way to mix an emission shader with a non-emissive cover material?

How do I make a PBR emissive dielectric material such as: a computer screen, a glow stick, or the white tube of a CFL light?  Do I MIX or ADD the Emission with the Principled BSDF? Should I mix it with Fresnel?


I'm on Ubuntu 20.04 and am running the standard gnome. I've had a look at  and  but these are not helping and, in fact, crashed my computer when I edited the resource file. I also found:  which didn't seem to help. Suddenly my Top Bar, Settings Menu, and login screen has HUGE fonts. Example  Anyway, it makes my eyes hurt. If I go into settings/universal access, Large Text is off. If I turn it on, it gets smaller. If I turn it off, it gets smaller still. Next reboot, though, resets this back to the big ugly font. If I leave it on and reboot, same thing. Don't know what to do next. I figure this came in with an update, but can't be sure.


Proof by Induction: For any integer $n > 0$, $3|(5^{2n} − 1)$.

Is there any difference in proving "for any integer $n > 0$, $3|(5^{2n}-1)$" and proving "for any integer $n \ge 0$, $3|(5^{2n} -1)$"? Or are they the same?


Apex Test Class for PageReference urlRedirection()

I'm hoping someone may be able to help with a very rudimentary test class. I'm brand new at coding apex and I have a very simple redirecting VF page with a very simple controller that I need to validate in order to move over into production. I keep getting 0% code coverage, as I don't have a test... Here's the code: VF Page <apex:page controller="pagedirections" action="{!urlRedirection}"> </apex:page>  Controller: public class pagedirections {                      public PageReference urlRedirection() {          string url = 'https://EXAMPLE_URL_THAT'S_APPENDED_WITH_EMAIL_HERE' + UserInfo.getUserEmail();            PageReference page = new PageReference(url);           page.setRedirect(true);           return page;     } }  Any help is greatly appreciated! Thanks!


Post Notice Text (PostHistory table) in Data Explorer

I am trying to get the post notice text from the PostHistory table in Data Explorer. I'm having trouble understanding how exactly to do this.  According to the , PostHistoryTypeId of 33 indicates a post notice being added to a given post. From the column descriptions, I'd imagine that either the Text or the Comment columns would contain the actual post notice text. However, it seems as though the Text field is always blank. In addition, the Column field, which seems to contain an ID for use in the Comments table, does not lead to a correct post notice text.  For example: see , and the .  Am I misunderstanding what the Comment field in the PostHistory table actually refers to? Is there some other way to get the actual post notice text from the data?


SSRS Alternating Row Colour Within Groups

I have a ssrs table report with row grouping and I would like to know how to change the colours of rows in groups without changing the background colour of the group column itself. With the answers I have found and implemented I get the effect of the second table in the picture when I want the effect of the first table:    Any help will be much appreciated.  This is a picture of the actual report and it's grouping:


Making custom field serchable in woocommerce

I have a product field which is by default in the woocommerce and i have added another field custom field (ACF) which is stock_number on my product/shop page i can search for products by title only i want to include the custom field stock_number data in the search as well e.g. so if some one search for something which is in custom field the result should apear the below example will explain it  bit more.  Title   Stock_number  A          B  C          D   currently what woocommerce does is if i search for A or C it will show the result but if i search for B or D it will not show the result so i want to make the stock_number field searchable


How to find lines that have the same two fields and remove all but one of those lines

I think it's easier if I break this question into parts.   Is there a way to find lines that have the same values in the first field and the same values in the last field? - but not necessarily equal to each other?   Lines:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   AAAAA even more cool stuff BBBBB   Lines of interest:    AAAAA stuff in between BBBBB   AAAAA even more cool stuff BBBBB    Is there a way to remove all but one of the lines that have the same first and last fields duplicated?   Before:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   AAAAA even more cool stuff BBBBB   After:    AAAAA stuff in between BBBBB   AAAAA more stuff in the middle CCCCCC   I can process the file a little bit in order to simplify the solution - say set a fixed number of fields.  Currently, the file does not have the same number of fields in each line, but the first and last fields are of interest.  Spaces are between all the fields.  I have searched and have found some references to awk but I could not find examples of awk using multiple fields in this way.  Big thanks.


Set active bone in pose mode from Python script

I'm trying to use the function  on bones through a script, but stupid thing is that I can't find how to set the bones as active ones which is needed to call this function.


Javascript peculiarities for object creation via "new" keyword

I bet this has been explained somwhere else, but I do not know how to search for it. I have read many explanations and approaches to OO in JS without something like TS or new ES6 and everywhere, a different syntax is used, but never compared all those approaches together.  As far as I know, there are 3 ways to create a new object in JS as we know it form different languages out there. But what are the differences and what is best practice to achieve this OO design?   Approach 1:  var Foo1 = function() { this.a = 1 } var testFoo1 = new Foo1(); console.log(testFoo1.a); //prints "1"   Approach 2:  function Foo2() { this.a = 2 } var testFoo2 = new Foo2(); console.log(testFoo2.a); //prints "2"   So far so good, the code is pretty much the same, except the syntax for the declaration of our object function. But already now, I am confused. What are differences here? Is it really just preference?  Last approach is the prototype chain, which needs more code or at least not that well structured code in my opinion, because you can not write it inbetween one bracket.  Approach 3:  Foo3 = function() { } Foo3.prototype.a = 3; testFoo3 = new Foo3(); console.log(testFoo3.a); //prints "3"   I hope my question and examples are right and it all makes sense and is not redundant. If it is so, please leave me a comment and I will correct or delete this entry, but do not downvote without writing why. Thank you so much.  EDIT I wanted to point out the object creation process and differences and best practice in plain JS with this question.


How to concatenate an indefinite amount of lists item-wise in python

If I have an indefinite amount of lists and I want to write a method for them to concatenate item-wise, what would be the best way to do this? Meaning, I don't have just 2 lists, like list A and list B and can write something like  X = [x+y for x, y in zip(A, B)]   but I will have various lists generated, which must be sequentially concatenated, so I don't know how to iterate over a n number of lists and concatenate them.  The first list will always have 1 or more elements (its length can be different), and the ones after it will always have only 1 element:  ['a','b','c'],['foo'], ['bar']....   The result I need is   ['afoobar','bfoobar','cfoobar']


Why did my roast beef turn out chewy and not tender? Where did I go wrong?

I recently made an Oven Round Roast in the oven and I followed directions quite well. I would really like to know where I went wrong.  The roast was 1.4kg and relatively round in shape, it was also quite nicely marbled with a big strip of fat on one side.        Out from the freezer and into the fridge overnight (to give it some time to cool down) and then left it out in room temperature for a   couple of hours. Took out of package and put on a rub.   I put the oven on 450 F and put the roast in (fat side up) for 10 minutes for the maillard reaction. Note that when I did this, I put it   directly on the oven rack; I put a tray underneath to catch the   drippings, but it was uncovered.   Turned oven down to 225 for 2 hours and then 200 for 5 hours.    Cut the roast into half inch slices and served.      The color was a nice pink on the inside and dark on the outside. It was still juicy and the taste was great. The roast's outside is absolutely delicious in fact, the rub turned out so well and the fat was amazingly tasty.   However, the roast was so chewy, I am very disappointed. I did a lot of research before I cooked it and found that slow cooking is a good way to tenderize meat. I also found out that certain cuts of meat need to be cooked differently. I.e. Steak should be hot and fast, and roast cuts should be long and slow (after searing it of course... yum yum yum).   In  post, 'Marti' answered by quoting a TV chef saying that when beef is being cooked it's collagen breaks down and liquifies and when it cools it turns to gelatine. Could that be what happened to my beef roast? If so, how can I avoid that?  In  post, 'Gilead' suggested a few solutions, beating the meat, cutting it against the grain, and choosing the right cooking method. Well, did I do the right cooking method? And do the other ones apply to a roast? I mean if you cut it up, it's basically cheap beef steak and I've never tried mechanically tenderizing the meat.   I really appreciate any help; I'm quite distraught over this chewy beef roast.


On my minecraft sever i cant get my hunger bar to go down HELP

I have tried everything I have looked every where pease help


Berry naming scheme list of LaTeX font families

Could you provide me with a list of Berry names for LaTeX font families?  I am currently working on a paper comparing various LaTeX fonts, particularly their support of extended Latin and it took some time to figure out these obsolete three-letter codes for the TeX Gyre families (to change font families using \fontfamily{nnn}\selectfont). Rather than gathering all the .map files, I tried to look them up on the Internet, but with no success.  The documentation of the  features the following packages: times, palatino, helvet, avant, newcent, bookman, courier, pifont, chancery, mathptm, mathpple, charter, utopia, mathpazo. It is possible to extract the codes, but it is unnecessarily time-consuming and some are still missing (such as TeX Gyre).  Should someone look for the same, here are the Berry names of TeX Gyre families:   Adventor – qag  Bonum – qbk Chorus – qzc Cursor – qcr Heros – qhv Pagella – qpl Schola – qcs Termes – qtm


How to remove line breaks after JSP tags?  For example, if in JSP page has code with tag like this  <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title>${pageTitle}</title>     </head>   Than in output result will be one line break at line one.  !HERE_LINE_BREAK! <!DOCTYPE html> <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title></title>     </head>   How I can remove unneeded line break at the first line?  JSP processed with Spring Web MVC.  Thanks.


I can compile the ""  but it doesn't look like the one given there. (Neither the dashed meridians, nor the cylinder)  The file:   Is it related to the "Missing character: There is no . in font nullfont!" Messages? How can I get the same picture as in the example?  I'm using the 2.02 release of TeXnicCenter with MikTex 2.9 64 Bit


Is mammalian vision processed as a sequence of frames?

I often read that people believe that human vision has an inherent frames-per-second rate (FPS) that causes stroboscopic effects - such as seeing the spokes of a rotating wheel apparently rotating at a different speed or appearing stationary when moving. For example: in a Physics.SE answer to   The human eye-brain visual refresh rate has an "effective frame rate" of around 30fps. Have you never watched the rims of the wheel in a car next to yours? I can clearly recall many times watching as the wheels sped up how it appears to stand still then move backwards.  This surprises me as I would expect there is no synchronisation of neuron firing in the retina, that neuron firing rates would vary widely depending on light levels and that the brain has no need to process the continuous signals in fixed cycles or in cycles whose length is invariant. I believe this question, or a good answer to it, would differ from  Is human vision in any way subject to a fixed frame rate of 30 FPS?


Question on the choice of boundary in the CUSUM test when we make some resampling

We are considering to make a CUSUM test for such a time series X = (x1,..,xn). Suppose X contains many noises which need to be removed in some ways. Simply speaking, the CUSUM test considers the empirical process, and check if it hits the boundary corresponding to the Brownian bridge. In practice, for execution of the CUSUM test, we utilize an R package, strucchange. Now we have a question. The question is related to the scaling of boundary since we are considering to make a resampling or filtering raw data, and perform a CUSUM test, again. Question is as follows: Do we need to make any rescaling the boundary when we make a filtering data? For instance, should we need to multiply the original boundary by 1/sqrt(m) (m: sample length)? Since we are using the open source R package, strucchange in performing the CUSUM test, it is not so clear if we need to take care of such a rescaling factor of the boundary function.


stayed 86 days in netherlands, 180 days is up can i go back

went first time beginning of feb 2015, then again in march, up until aug 2015 for a total of 86 days, then went elsewhere. question is it has been 180 days since first visit in feb.  so can i go back to netherlands now ?


Middle-click paste in Screen with Mousetrack Enabled

I am using GNU Screen and I added mousetrack on to my ~/.screenrc so that I could select a window pane by clicking on it.  Unfortunately, since I enabled that setting, I can no longer use middle-click paste in any screen windows. Is there a way to enable mousetrack and still have middle-click paste?  I am using GNU Screen v4.03.01 in GNOME Terminal v3.18.3 on Ubuntu Desktop (Unity) v16.04.   is similar, but related to tmux. My question is about GNU Screen.


Search for multiple patterns from a file using find command

There is an option to use grep -f MY_FILE to let it search for patterns taken from a file, instead of being specified directly on the command line.  Is there an option to do something similar with the find command and let it read the patterns to search from an input file?


I'm trying to format a table in latex to look like the image I've attached; however, I don't know how to create a new row that isn't affected by the formatting of the previous ones. Thank you for your help, and apologies for the mediocore illustration.


How to show the quotient of dual space and the annihilator of its subspace is equal to dual of the subspace?

Let $W$ be a subspace of a vector space $V$ over a field $F$. Let $i : W \to V $ denote the inclusion map.  Show that $ \pi: V^*\to W^*$given by $\pi(f) = f\circ i$ is a surjective linear map, with kernel equal to $W^0$. Hence show that $W^* = V^*/W^o$.


Hello I have a server in kimsufi 2gb RAM and 500gb storage but the query with php mysql is very slowly   I have change innodb buffer pool size to 500M but i have error too many connections, i add max connection to 500   Why my server is slowly and have many connection (with buffer 500M, if i have buffer 2M i dont have error too many connection) ?  Thanks for your help  My.cnf :  [client] port            = 3306 socket          = /var/run/mysqld/mysqld.sock     [mysqld_safe] socket          = /var/run/mysqld/mysqld.sock nice            = 0   innodb_buffer_pool_size=2M innodb_additional_mem_pool_size=500K innodb_log_buffer_size=500K innodb_thread_concurrency=2   [mysqld] local-infile=0 # # * Basic Settings # user            = mysql pid-file        = /var/run/mysqld/mysqld.pid socket          = /var/run/mysqld/mysqld.sock port            = 3306 basedir         = /usr datadir         = /var/lib/mysql tmpdir          = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking<br> key_buffer              = 16M max_allowed_packet      = 16M thread_stack            = 192K thread_cache_size       = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover          = BACKUP #max_connections        = 500 max_user_connections    = 0 #table_cache            = 64 #thread_concurrency     = 10 # # * Query Cache Configuration # query_cache_limit       = 16M query_cache_size        = 1M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! general_log_file        = /var/log/mysql/mysql.log general_log             = 1 # # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. # # Here you can see queries with especially long duration #log_slow_queries       = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about #       other settings you may need to change. #server-id              = 1 #log_bin                        = /var/log/mysql/mysql-bin.log expire_logs_days        = 10 max_binlog_size         = 100M #binlog_do_db           = include_database_name #binlog_ignore_db       = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem   #innodb_buffer_pool_size=500M #innodb_additional_mem_pool_size=500K #innodb_log_buffer_size=500K #innodb_thread_concurrency=2 [mysqldump] quick quote-names max_allowed_packet      = 16M   [mysql] #no-auto-rehash # faster start of mysql but no tab completition   [isamchk] key_buffer              = 16M   # # * IMPORTANT: Additional settings that can override those from this file! #   The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/


Pipelight stopped working in Google Chrome

I think it happened after I updated my system yesterday. I cannot watch Netflix any more because it says I don't have Silverlight. Looking at chrome:plugins, there is no plugin for Silverlight. I tried disabling and re-enabling the plugin (sudo pipelight-plugin...). It was enabled without any error. Still the same. Any idea what's going on?


How to remove the graphical user interface?

Okay my question is that, I want to run a heavy application, on a Virtual Machine (VirtualBox) with just 2 GB RAM (Windows 7 32Bit Host has 4 GB, 3.5 GB effective). Initially I thought of installing Ubuntu Server 12.04.1, which doesn't come with a GUI, so I thought it would be efficient in performance, but I have only Ubuntu 12.04 Desktop.  My question is, is it possible to remove the GUI parts in Ubuntu 12.04 Desktop (Not Server), keeping only the core OS, after installation in a virtual machine?   Or, is there anyway to improve the performance of the OS?  If you need more information, I am ready to provide.  I don't want the GUI or anything, even a small terminal window is fine for me, I can access files through FTP.


$H < G $, if H is normal, then $H=gHg^{-1}$

I have this solved exercise in my lecture notes Let $G$ be a group and $H < G $, $\forall g \in G$ we define the conjugated subgroup with rispect to g as $gHg^{-1}$.  Verify that if H is normal, then $H=gHg^{-1}$ If $H \triangleleft G$, by the normality criterion for each $\gamma \in  G$ and $h \in H$ we have  $\gamma h\gamma^{−1} \in H $, so $\gamma h\gamma^{−1}  \subseteq H$. Taking $ \gamma = g$ and $ \gamma = g^{−1}$ we get $ghg^{−1} \in H$ and $g^{−1}hg \in H$ respectively In the first case we deduce that $gHg^{−1} ⊇ H$   ----> (1)? and in the second case that $g^{−1}Hg ⊇ H$, that is $H ⊇ gHg^{−1}$.--->(2)? In conclusion, $H = gHg^{−1}$ Can someone explain what is going on on (1) and (2) and tell if there is an error in this solution?. To prove (1)  they started witht $h\in H$, but I am not seeing they end with $h \in gHg^{-1}$. In (2) they should start with a $ ghg^{-1} \in gHg^{-1}$ and end with $ ghg^{-1} \in H$ .


Can't dismiss the rubber duck dialog if I don't have a mic

I am totally psyched by the rubber duck addition to Stack Exchange!   I eagerly clicked on it but it wants a microphone. I don't have one, so I clicked "no" and it tells me to explain the problem anyways (I get it, I get it, har har). This question is not about that.  The problem is that I can't get rid of this dialog. Clicking "yes" lets me dismiss the dialog by clicking elsewhere.  I'm on an iPad.


Does concatenation of constants get optimized to the concatenated form at compile time in C#?

I have two constants, defined in the same static class: public static class MyConstants {     public const string ABC = "ABC";     public const string DEF = "DEF"; }  I use them in a combined manner, elsewhere in my application: Console.WriteLine(MyConstants.ABC + MyConstants.DEF);  I'm trying to determine if the concatenation is optimized at compile time, resulting in the assembly containing a value of ABCDEF at some address when disassembled, or if it stays separate. I followed the instructions on  to view the disassembly of my code in a console application and it appears that it is not stored as ABCDEF, nor separate as ABC, DEF:   was a good read, but ultimately confused me in relation to my question (likely due to my lack of C++ knowledge). I've looked at several other posts and don't really seem to be getting anywhere near the answer.  Does C# optimize the concatenation of two constants in the compiled version of an application, any/everywhere that concatenation is used? NOTE: The goal is to further obfuscate the full value of ABCDEF, making it harder to find.


How do i show the whole object in the camera view before i render?

I am trying to render an animation, I have set up the camera in the right position but not all of the object is showing in the camera view, like its in shadow. how can i fix this?  Thanks


Shouldn't the code formatter highlight the word "having" for SQL syntax?

In this SQL statement, notice the color of the word "having" versus the words "select", "from", "where", and "group by"  select   cu.name  ,cu.email  ,count(*) as books_purchased from   customers cu  ,purchases pu where cu.customerid = pu.customerid   and pu.year = 2003 group by   cu.name  ,cu.email having   count(*) > 1


Machine A is connected to the internet and is behind firewall so it cannot receive incoming connections. Machine B is open to the internet.  I want to be able to type commands into B and have them execute on A. Except it is A that has to reach out to B to establish the connection before B can send it commands.  Can this be done running SSHd on A and plain SSH client on B or do I need a combination of SSHd and SSH client on A (client to establish reverse tunnel pointing to SSHd).


I have a problem in mysql, How can I store users' nickname like this: "𝙈𝙤𝙧𝙘𝙮𝙮𝙮𝙮" in a database?   Because for the moment it gives me: "????????????????????" in the table and I really need the real username of all users so I can rank them with the correct nicknames Thank you!


I want to split a String by delimiter "|" in Java and get the String array, here is my code:  String str = "123|sdf||"; String[] array = str.split("\\|");   I will get the array with 2 elements: "123","sdf". I expect the array have 4 elements: "123","sdf","",""; is there any existing class I can use to do that? I also tried StringTokernizer, doesn't work


How to mount an image file without root permission?

Can I mount a file system image without root permission? Normally I would do:  mount -o loop DISK_IMAGE FOLDER   Without using sudo or setting the suid on mount, is there any suitable way to do this?  I know I can use fusermount with some ISO images, but that is pretty limited, even for ISO images, some of my images cannot be mounted, but mount always works.


Say I have a quaternion q which describes how to get from frame 0 to frame 1, and a quaternion r which describes how to get from frame 0 to frame 2. To get the "quaternion difference" between q and r, I do  $$ q_{d} = q^{-1} r $$ This is however in frame 1. How do I get the quaternion difference in frame 0?


Why is $\int_{-\infty}^\infty |\text{sinc}(t)|\ dt=\infty$?

Can you help me with that:     Why is $\int_{-\infty}^\infty |\text{sinc}(t)|\ dt=\infty$ ?   I saw this in Signal Processing course and I can’t understand why this is true.  Reference:   Didn’t find any relevant material unfortunately.


Does Nashorn's RegExp implementation not support Unicode categories?

I tried matching all letter-like characters within a string using /\p{L}/ig. However, this Unicode category doesn't seem to be supported by Nashorn's RegExp implementation.  Is there a workaround or fix for this?    Update: IMO this is not a duplicate of the : Nashorn 8 does implement ECMAScript 5.1, but since the engine runs on Java, there might be a "Java-way" to change the RegExp implementation used by the engine.    Update: I installed Java 9 (OpenJDK) which comes with Nashorn full version 9-internal+0-2016-04-14-195246. Even when running Nashorn with ECMAScript 6 (--language=es6), Unicode categories are not supported.


What is $P(X > 0 \mid X + Y > 0)$ given that $X, Y$ are i.i.d standard normal?

Suppose  $X, Y$ are i.i.d and $X,Y\sim N(0,1)$. What is $P(X > 0 \mid X + Y > 0)?$   What I got so far is listed below:  $\begin{align*} P(X > 0 \mid X + Y > 0) &= \frac{P(X+Y>0\mid X>0)\cdot P(X > 0)}{P(X+Y > 0)}\\ &= P(X+Y > 0\mid X > 0)\\&=P(Y > -X\mid X>0) \\&=\int_{0}^{\infty}\int_{y=-x}^{\infty} \frac{1}{\sqrt{2\pi}}e^{-\frac{y^2}{2}}dydx\end{align*}$  However, I don't know how to calculate this integral. Is there anything that I did wrong in the process? And also is there any easier way to approach this kind of problem?


I have my ion-datetime input that gets the value of the user, also i have the varaible date that comes from a server, I want to compare them in a range, the thing is that when I get the value from the input, i get with the time fiels and not only the date, so when I use the method getTime(), it gets with the time and dont make a right comparision, any ideas to transform the date or reinitialise the time before i make the comparision?   This is my current method  ngOnInit() {     this.desde = new Date(this.navParams.get('desde'));     this.hasta = new Date(this.navParams.get('hasta'));     this.auth.userData$.subscribe((res: any) => {         this.authUser = res;         this.postData = {token: this.authUser.token};         if (this.postData) {             this.planificadorService.planificadorData(this.postData).subscribe((res2: any) => {                 this.planificadorData = res2.planificadorData;                 this.planificadorData.forEach(item => {                     if (item.fecha !== '') {                         const fechaPlan = new Date(item.fecha);                         if (fechaPlan.getTime() >= this.desde.getTime() && fechaPlan.getTime() <= this.hasta.getTime()) {                             this.visblePLanificadorData.push(item);                         }                     }                 });                 console.log(this.visblePLanificadorData);             });         }      }); }   Dates from inputs  desde: "2020-01-24T18:23:18.633-05:00" hasta: "2020-01-27T18:23:18.634-05:00"   what should be  desde: "2020-01-24T00:00:00.000-00:00" hasta: "2020-01-27T00:00:00.000-00:00"


I'd like to use the adduser command to add a user (with disabled password) via a shell script.  By default, adduser prompts you for various values (e.g., Full Name). Is there any way to submit these values via command line? Or will I need to useradd instead?


Just today, a new drive appeared out of nowhere: F  F is not USB, not disk and not the normal integrated drive(which is currently C and D).   When trying to open, it requests admin access. Upon granted access, it still denies with this error:     You have to use the category Security to access this drive   Running a virus scan that lists the files while it runs, some files include microsoft and MSI boot files  What is this drive? Why did it suddenly appear now?  Image: The F drive + disk management.


If $\sum_n x_n$ converge to $L$, what is $\lim_{n \to \infty} x_n$?

If $\sum_n x_n$ converge to $L < \infty$, what is $\lim_{n \to \infty} x_n$?  This is a question I have been asked, but I cannot answer it. Can someone explain it to me?


I have to sort a large list (more than 10,000 elements). On adding an element I have to insert it on the right place. I saw that an ArrayList will shift all the element that are after the insertion point.   How do all the different implementation of the List interface behave in such a case? And what are the pros and the cons when choosing one implementation over the other?


I am using Ubuntu 18.04 and the default coreutils. I notice a particular behavior of the sort command which I am not sure how to explain.  Consider the following command:  $ cat <<EOF | sort 0- 01-                                     EOF 0- 01-   This output makes sense, because - has smaller ASCII value than 1 and thus this output is expected.  However, if I put one more character at the end:  $ cat <<EOF | sort 0-T 01-T EOF 01-T 0-T   This output doesn't make any sense to me as I think 0-T should come first. Why is this happening. What am I missing here? Am I having a wrong expectation?