Asking purely out of curiosity:  Is there any research or publication in Modern Physics that considers the possibility that the speed of light has changed since the Big Bang, and not remained constant (as what we know it today)?  By changed, I mean either gradually or abruptly, though I guess that the former makes more sense.  Now, I am guessing that the answer to this question might be more of "a matter of terminology".  For example:  We can say that the speed of light hasn't changed in the perspective of everyone who is within the given space, but since this space by itself has expanded, anyone theoretically "outside it" will "see" that light is in fact covering a larger distance per time unit (larger than what it used to when the given space was smaller)... Or we can say that it has slowed significantly, while the universe itself hasn't expanded at all.  On the other hand, I might be speaking nonsense here, so I'd be happy if one of you out there (or here) could enlighten me on this...

Could someone judge my (stoner) hypothesis that the speed of light has changed over time -- i.e. as the universe has expanded in volume light has slowed down, perhaps going so far as back to the big bang when it was infinitely fast and there was no time because everything happened at once etc. Thinking that the speed at which information can propagate through the universe is linked to the size of it seems intuitive to me. My question -- is there an easy disproof of this? Would Einstein have to be wrong? Does it violate anything supposedly more fundamental such as quantum or string theories? Do any current experiments invalidate it? If not can you show me in any case why you think its unlikely.   Edit 8/24  I'm accepting Mark M.'s answer but will post this here because there is a character limit on comments  @Mark M thanks, good answer but as someone who has only read some popular physics, and should leave this to the experts, I'm still muddled in my personal theory. I don't see why you should need two units to measure the speed of light. The thing I have a hard time wrapping my head around is the relation of time and distance. They seem like they could fundamentally be the same thing. If you say time is measured fundamentally by the vibration of so and so quantum object in space... why can't we just measure that vibration distance as the constant... I'll repeat myself to try to be clear... there is a certain minimum distance that particles have to go to interact with each other... if it wasn't vibrating there wouldn't be time,its what creates the illusion of time...so instead of talking about speed or c as distance/time.... can't we simply talk about that distance a quantum object vibrates....I'll lead up to my point.....perhaps there can need be only one constant here, and that is the physical size of the universe. a tiny metal tuning fork doesn't appear to be vibrating at all but if you blew it up to the size of the empire state building the metal rods would move from window to window. perhaps as our universe expanded in size the length of that minimum vibration (perhaps infinite at point zero) would have expanded, and therefore created the illusion of time and the speed of light, which, as the universe expands, will continue slowing down. perhaps we are like a big balloon and we have been blown up and all the fields/particles-without-size are vibrating more and more in that space.. am i missing something obvious here?


I am trying to create a pattern in QGIS that could look like a wall with several bricks but I'm not quite sure I understood the custom dash pattern tool.  When I try to do something like this, the pattern never gets perfect, see the image below. Is there anyone who could advise me something?

I am trying to create a brick wall style for a vector polygon in QGIS 2 and 3. I can render a svg drawing of a brick wall with SVG fill (image below). But I do not want to use SVG since the style is part of a free geological map, where the SVG file will complicate the distribution and rendering of the data for the public. Saving the SVG through a default QML forces relative paths to the SVG file in the QML file and the SVG file must be in the QGIS system SVG folder.  Anyone created a polygon vector style like:    That does not need a external SVG file for rendering.


I have contour information in the form of line features (see picture below) and I want to do a slope analysis in QGIS. Is it possible?

I'm working with QGIS, v. 2.0.1. I have several soil types. They are (amongst others) described with slope indications. I already calculated the slope from the DTM in degrees, but as description of the soil types is in percentage, I need to calculate the slope in percentage. I tried two things:  I tried the analysis tool from the raster section, but it didn't work. The result was just black with values from 0 to 0. The same happened when I tried to calculate the percentage in the raster calculator but the result was the same.  Maybe I need to say that the terrain is pretty plain. What else can I do? Update I tried the raster calculator and did what @radouxju suggested. It gave me a black picture with values from 1756.64 to 1756.64. But as soon as I click in the picture the values are "normal", say 5.88 or 13.224 or something like that. The same happens when I try the gdaldem tool but with values from 0 to 0. I also tried to change the contrast enhancement (like stretch to min/max) but it didn't change anything. Update 2 I just  that maybe I have to set the scale to 111120  but that doesn't work neither (result: black, values 0-0).


The problem:   Assume $f:R^n→R$ is a convex function. Show that the function $g(t)=f(x_0+td), t∈R$ is convex for arbitrary $d, x_0∈R^n$. Explain the statement graphically when $n-2$.  My attempt at the solution:   To show that $g(x)$ is convex I have to use the convexity inequality.   $g(αt_1+(1-α)t_2)≤αg(t_2)+(1-α)g(t_2)$  Using the formula for $g(t)$ that was given we get   $f(α(x_0+t_1d)+(1-α)(x_0+t_2d))≤αf(x_0+t_1d)+(1-α)f(x_0+t_2d)$  After changing the left hand side I get something like this   $f(αt_1d+x_0+t_2d-αt_2d)≤αf(x_0+t_1d)+(1-α)f(x_0+t_2d)$  I'm stuck here. How can I make this look like a convexity formula for $f$?

Let $g: E^{m} \rightarrow E^{1}$ be a convex function, and let $h: E^{n} \rightarrow E^{m} $ be an affine function of the form $h(x)=Ax+b$, where $A$ is an $m \times n$ matrix and $b$ is an $m \times 1 $ vector. Then, show that the composite function $f : E^n \rightarrow E^{1} $ defined as $f(x)=g(h(x))$ is a convex function.      Also, assuming twice differentiability of $g$, derive the expression for the hessian of $f$


In my phone number validation i need to validate only 9,10,14 digit numbers and 11,12,13 numbers are not valid,if phone number start with + then any digit number should be valid.Any  preg_match code available? please help. :(

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I am confused over the behavior of constructor in this code.  class htc {   public:   htc() { std::cout << "HTC_FOO_CONSTRUCTOR" << std::endl ;}   htc(const htc&) { std::cout << "HTC_BAR_CONSTRUCTOR" << std::endl;}; };  int main()  {   htc one; // This outputs HTC_FOO_CONSTRUCTOR   htc two(); // This outputs nothing    htc three(one) }   Couple of questions whats the meaning of using brackets  in htc two() mean? & in constructor htc(const htc&) there is no parameter name is this ok? If yes whats the use of an such constructor?

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I have a table which contains rows like below  ASETTYPEID  ASETTYPE 1           SYSTEM 2           PRINTER 3           PROJECTOR 4           SCANNER 5           AUDIO VISUAL AIDS 6           TAB 7           LAPTOPS 8           ALL IN ONE PC 9           OTHERS   I need a select query and inserting a comma separated values in new table which results following format  ASETTYPEID  ASETTYPE 1,2,3,4,5,7,8,9 SYSTEM,PRINTER,PROJECTOR,SCANNER,AUDIO VISUAL              AIDS,TAB,LAPTOPS,ALL IN ONE PC,OTHERS 1,3,5,8        SYSTEM,PRINTER,PROJECTOR

I have a simple query:  select * from countries   with the following results:  country_name ------------ Albania Andorra Antigua .....   I would like to return the results in one row, so like this:  Albania, Andorra, Antigua, ...   Of course, I can write a PL/SQL function to do the job (I already did in Oracle 10g), but is there a nicer, preferably non-Oracle-specific solution (or may be a built-in function) for this task?  I would generally use it to avoid multiple rows in a sub-query, so if a person has more then one citizenship, I do not want her/him to be a duplicate in the list.  My question is based on the similar question on .  UPDATE: My function looks like this:  CREATE OR REPLACE FUNCTION APPEND_FIELD (sqlstr in varchar2, sep in varchar2 ) return varchar2 is ret varchar2(4000) := ''; TYPE cur_typ IS REF CURSOR; rec cur_typ; field varchar2(4000); begin      OPEN rec FOR sqlstr;      LOOP          FETCH rec INTO field;          EXIT WHEN rec%NOTFOUND;          ret := ret || field || sep;      END LOOP;      if length(ret) = 0 then           RETURN '';      else           RETURN substr(ret,1,length(ret)-length(sep));      end if; end;


In registration form once entered user name and password it will redirect to user profile page. How i can hide that particular username parameter in that url

Has anyone have the idea of passing the values as hidden in url  for example I need to pass the values of First Name,Last name,email,address & so on  \apex\page2?fn=test&ln=test&email=vemula.aruna@clickandpledge.biz&bill=adres,adres2,city,508209,840,Alabama,&tdate=12/11/12   If I pass them like that I'm getting a very large URl.Any remedy for this


I am attempting to test the convergence for the following series for a final review: $$\sum_{n=2}^{\infty} \frac{1}{n^{p} \ln(n)^{2}}, p>0$$ My classmates and I have tested the convergence for when $p=1$ and $p>1$; the series converges in both cases (Comparison Test). However, we are having problems for when $0<p<1$. Was wondering if we could get some hints for this third case.

Study the convergence of $$\sum_{n=2}^{\infty}  \frac{1}{n^{\alpha}\ln^{\beta}(n)}$$ where $\alpha, \beta \in  \mathbb{R}$   I have proved that:   This series diverges when $\alpha \leq 0$. This series converges when $\alpha > 1, \beta > 0$ This series diverges when $0 < \alpha < 1, \beta > 0$ This series converges when $\alpha = 1, \beta > 1$      Question: What happens when $\alpha > 0$ and $ \beta < 0$?   There are other questions on MSE which ask about this series, but this question is distinct because   I would like an argument which does not rely on the integral test for series convergence, and this question considers all real $\alpha$ and $\beta$, while other questions ask only about $\alpha, \beta > 0$, where we can apply Cauchy condensation criterion


Security Update for drupal  All other updates are being done smoothly thorugh drush  I have a multi site installation if drupal so i worried to remove the sites folder and update that the general way.   I get this error when updating through drush commons module:  The commons directory could not be found within the modules directory at /var/www/drupal/., perhaps the project  [error] is enabled but has been deleted from disk.  Please help.

I am looking at using  , but I am not sure how easy it is to update a distribution when a new version comes out.  Also, can I use drush to do it, or do I have to manually download and unpack the distribution?


Suppose, I have a random finite sequence of digits (that doesn't start from 0).  Is it true that there is a prime number (no matter how big) that starts with this sequence of digits?  Examples: 3 => 31 10 => 101 123 => 1237 1000 => 100007

To prove the following fact: given any sequence of digits in any base, eg 314159265358979323 base 10, there are infinitely many primes that start with these digits,eg when expressed in decimal they start with 314159265358979323. I think using a prime number theorem will be helpful . But I am still not getting a point of how to start the proof.


don't you think that Stack Overflow's FAQ should mention that posts should be written in English?  I understand that, since the site itself is English-oriented, it should be clear. Also, there haven't been any problem until now. Nonetheless, clear rules are better than implicit rules, to me :-)

Otherwise known as  必须用英语吗？(is English required?) ¿Necesito hablar en inglés? ?האם אני חייב לכתוב באנגלית Muss ich auf Englisch schreiben?  Do I have to use English when posting a question, an answer or a comment on a Stack Exchange site?


I'm having troubles working on the exercise 7.2 of Lenstra - The Chebotarev Density Theorem (). I have proved the first part, that is a group $G$ acting transitively on a finite set $X$ with at least two elements admits a $g$ that doesn't fix any $x\in X$. I want to show that     Let $f(X)\in\mathbb{Z}[X]$ an irreducible polynomial such that $f\pmod{p}$ admits a roots in $\mathbb{F}_p$ (the finite field with $p$ elements) for almost every prime $p$ (i.e. all but finitely many). Then $f(X)$ has degree 1.   I couldn't find help online and I'm stuck. I know that I have to use both the Chebotarev density theorem and the above group action fact, but I don't know how. I tried assuming the contrary, so $f(X)$ has $\ge 2$ roots and the Galois group of its splitting field over $\mathbb{Q}$ acts transitively on them, but I have no idea if this will lead me to a contradiction.  Any hint?

We know that $f(x)=x^4+1$ is a .  My question is:     Is it true that if $f(x)$ has a linear factor over $\mathbb{F}_p$ for every prime $p$, then $f(x)$ has a linear factor over $\mathbb{Q}$?   Edit: Thanks for @Jyrki Lahtonen's answer, I want to do some modifications:     Is it true that if $f(x)$ has a linear factor over $\mathbb{F}_p$ for every prime $p$, then $f(x)$ is reducible over $\mathbb{Q}$?   Thanks in advance!


public int calculateAge(){     int age = 1900;     int yearNum = 0;     String birthYear =(getIc().substring(0,1)) + age;     yearNum = Integer.parseInt(birthYear);     int year = 2015 - yearNum;     return year; }  When I call the above method in the code below then a java.lang.NullPointerException will occur. Method calculageAge() is in the main method. When I ask to display back the ic that the user has input, it displays 'null' instead of value that the user entered. int AgeInfo=0; for (int i=0; i<size; i++){     if (arrAlumniSTJApp[i].calculateAge()<50)         AgeInfo = i;          } System.out.println(arrAlumniSTJApp[AgeInfo].toString())

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


Last night I changed my iPhone's password, but now I've forgotten what it was, and since then it ran out of power so now it's at Before First Unlock mode.  So now I can't access my iPhone, and I've already burnt through several chances trying to get in (last i saw it was at the 'try again after 5 minutes').  I have 'Disabled USB accessories after an hour' active, so i can't connect to it via my MacBook either to backup or reset password through either iTunes or some other third-party application, unless there is a way to bypass that.  If there is any solution to my predicament without resetting the iPhone i'd like to know. The last update was many, many months ago and i'd rather not lose all that data.  While I do remember my AppleID password, it requires 2FA to login, meaning I can't really access it without my phone. I do have an older iPhone that I might be able to use but I'd rather not use it if I can avoid doing so.  Thanks in advance.

I’ve recently changed the password on my iPhone SE (running iOS 10.x?) and now I’ve forgotten it. I was able to use my iPhone for a few days from TouchID but after the iPhone restarted today, I can’t get into it. It's a 4 digit passcode.  I still remember my iCloud password. But the phone is not currently configured to back up to iCloud.  Would I be able to recover the Messages if I take my iPhone to an Apple Store? I don't have any trouble proving the iPhone and its data belong to me (I purchased the iPhone with my credit card, signed into my Apple ID and iCloud accounts). But my understanding is that they can't do anything either even if they want to.  Is there any way I can get back into my iPhone? Everything else can be erased, but I just really need access to my messages. For example, would I be able to jailbreak it given that it’s running a pretty old version of iOS?


My book defines linear maps between vector spaces with a chosen fixed field but can you define linear maps between vector spaces over different fields? Is there any reason to restrict attention to fixed fields?

Let $\mathbf{V}(\mathbb{K}_1,V),$ and $\mathbf{W}(\mathbb{K}_2,W)$ two vector spaces over different fields ( as an example: $\mathbb{K}_1=\mathbb{C}$ and $\mathbb{K}_2=\mathbb{R}$).  We can generalize the notion of  a linear transformation $T:\mathbf{V}\to\mathbf{W}$ for such two space?  My idea is that we have no problems for additivity: $$ T(\mathbf{x}+\mathbf{y})=T(\mathbf{x})+ T (\mathbf{y}) $$ but we have some truble with homogeneity since for $T(\alpha \mathbf{x})$ we cannot define $\alpha T(\mathbf{x})$.  It seems that we must have some function $\lambda :\mathbb{K}_1 \to \mathbb{K}_2 $ so that we can write something as $$ T(\alpha \mathbf{x})=\lambda(\alpha)T(\mathbf{x}) $$   but there is some ''natural'' definition of such function $\lambda$ that preserve the intuitive meaning of linearity?


How do I slice this   'Python is an interesting and useful language for numerical computing!'    to get   'Pto sa neetn n sfllnug o ueia optn!?    in Python?

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


I have one shell script which is using a config file. I added the following code to use config file.  source abc.config   When I ran this shell script manually it is working fine. However, when I make this shell script as a background process using no hup, it gives me following error.     line 19: source: abc.config: file not found   I debugged the shell script using   bash -x shell_script.sh   In debugging it is taking config values properly and shell script worked.  This shell script was running fine a few days ago, but suddenly it started to give errors like this. Also the same script is running fine on another environment.  To run this shell script properly we have to give the full path of config file in source statement. But that is not correct way, since config file and shell scripts both are in same folder and for source syntax we have to give config file name only.  How can I fix this issue?  P.S : Currently, I have added path of config file as follows  source ${path}/abc.config   But I want to source a config file without path of it.

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


I have a Huawei Ascend G6, which uses a 32GB SD card to store most app data. I now bought a Huawei Y6 to migrate to and want to retain as much app data as I can. How would I go about to transfer my apps (data) to the new device?  The Y6 has Lollipop, so when booting the device, I was asked which apps to install. So I got all apps installed now. So how do I go about transferring configuration data? I assume I can't just put my SD card into the Y6 and be done with it?

I would like to migrate apps and their data from one phone to another without too much faffing around, like:   rooting (very convoluted device specific process with a lot of ambiguity around it and often involving running closed source software from random vendors that you have to believe does the right thing), using app specific backup export/import facilities if at all exist (too manual, seems the only option though).   I am ok with:   using a PC to help facilitate the process, manual copying/pasting files (within reason).   Ideally, I would like to have a process that works something like this:   select apps that I would like to have in their current state on the other phone, bundle them together and store somewhere (external SD card or PC), put that bundle on the other phone and somehow install and recover their state.   A bit like  works.  So far I have tried :    - unfortunately, like many others, requires rooting,  - seemed promising but Helium has never been, nor ever will be, compatible with any device running anything less than Android 4.0 and it does not work on certain phones.  - Q: Does it backup data of apps? A: No, currently it only backup the apk files of apps. and skimmed through a number of articles including  (looks like even if I was willing to root I would have a hard time).


Let $S$ be a nonempty set. Prove that the power set $P(S)$ whose elements are all subsets of $S$, forms ring under the following operations:  \begin{align*} a + b &= (a \cup b) \setminus (a \cap b)\\ a \cdot b &= a \cap b \end{align*}  For proving it's an abelian group first, I've gotten that the identity is $\emptyset$.   \begin{align*}       a + \emptyset           &= (a \cup \emptyset) \setminus (a \cap \emptyset)\\           &= a \setminus \emptyset\\           &= a      \end{align*}  Each element is it's own inverse.   \begin{align*}       a + a         &= (a \cup a) \setminus (a \cap a)\\         &= a \setminus a\\         &= \emptyset      \end{align*}  It's certainly commutative. \begin{align*}       a + b           &= (a \cup b) \setminus (a \cap b)\\          &= (b \cup a) \setminus (b \cap a)\\         &= b + a      \end{align*}  But I can't get associative. That is, $(a + b) + c = a + (b + c)$. Anyone want to aid?  The properties for multiplication aren't too bad either. The only one that is throwingme a curve ball is the left/right distribution. That is,   $a(b + c) = ab + ac$ and $(a + b)c = ac + bc$.  While  and has answers to most parts in proving that it is a ring, it does not explain or show the associativity portion for addition in detail. That is $(a + b) + c = a + (b + c)$ is left very vague.

I'm studying for an abstract algebra exam and one of the review questions was this:     Let $X$ be a set, and $\mathcal P(X)$ be the power set of $X$. Consider the operations $\Delta$ = symmetric difference (a.k.a. "XOR"), and $\bigcap$ = intersection.   a) Does $\Delta$ and $\bigcap$ make $P(X)$ into a ring?   b) If so, is it a ring with unity?   c) Is the ring commutative?   d) Is it a field?   For parts a) and b), I think it does form a ring with unity, but I'm not quite sure how to get started on proving it.   For part c), it is a commutative ring since $\mathcal P(X)$ is closed under symmetric difference and intersection, right?  Not even sure how to get started on d).  I'd really like to understand this question fully, so any kind of input would be tremendously helpful. Thank you!


I know that in general one can't find closed forms for arbitrary infinite series, but in working on a problem I came across this sum:  $$\sum_{n=0}^\infty \binom{2n}{n}(1/9)^{n}$$  (Note: I originally put $(1/3)^{n}$, have corrected it above.)  The Taylor series  $$\sum_{n=0}^\infty \binom{2n}{n} x^{n}$$  looked vaguely familiar and so I tried to find/derive a closed form for this but have had no luck. So my questions are:   Do you recognize this particular sum? Do you have any suggestions for tracking down questions like this? I checked most of the basic Calc I level functions, and did an initial scan through Abromowitz and Stegun, but didn't find anything even close. Are there any methods that might apply? I have a memory of a paper where the author had a method for a wide variety of sums like these with binomial co-efficients, but I can't track it down.   Note: From the "Related Questions" in the side bar here I'm going to check if hypergeometric series can help me, but I'll go ahead and post this anyways.    Edit: Thanks for the identification. I'd like to know if it's just something you've recognized, or you know how to search Wolfram better than I do. For example, I wouldn't know to call the co-efficient the "Central Binomial".

How would you prove that the generating function of $\binom{2n}{n}$ is $\frac{1}{\sqrt{1-4x}}$?  More precisely, prove that( for $|x|<\frac{1}{4}$ ):  $$\sum^{\infty}_{n=0}x^n\binom{2n}{n}=\frac{1}{\sqrt{1-4x}}$$  Background: I was trying to solve $$S=\sum^{\infty}_{n=0}\frac{(2n+1)!}{8^n(n!)^2}=\sum^{\infty}_{n=0}\frac{(2n+1)}{8^n}\binom{2n}{n}$$ Which if we let $f(x)$ be the generating function in question, would be simply $$f(x)+2xf'(x)$$ With $x=\frac{1}{8}$. Is there a simple proof of the first identity?  states it without a proper reference ( states it without proof). Is there an easier way of calculating $S$? (which is $\sqrt{8}$, by the way)


OK. So I am developing a simple stand alone device. It has a sensor module that takes in 12V and another PCB that takes in anywhere from 5V to 12V.  Now, I am running this entire device using Mains supply. My Question is, is there a way, wherein, the device will automatically Switch to a battery supply when the Mains supply fails?  I have read on this topic a little bit and have come across devices called Power Path Controllers.  Will a simple Relay also do? I attach the Common terminal to the Input of my circuit. Like the diagram shown below.  Might that work? Any advises?  I need this switching to happen automatically. Without any human interference. Also, it would be an additional positive if my microprocessor could tell which supply is giving power.

I've found several answers on switching between an Adapter and a Battery. But I need to autmoatically switch between two batteries. One of them is 'hotplugable'.  Problem: I've got a Solarcell which charges a ~16000mAh Li-Ion battery (BATa). Once in a while, the Solarcell doesn't manage to charge the battery enough. It's crucial that I have 3.0 to 4.1 Volts on my VSYS but the voltage will drop below this value if the Solarcell wasn't able to do its job (cloudy weather, vulcano eruption [joke], dirty cells, etc).  My Plan: I've come up with the idea to feed the VSYS with a additional, hotplugable backup battery (BATb) which does get connected to VSYS if BATa drops below ~3.1v.  So basically I need a Low-Voltage-Cutoff (using a Z-Diode with a Mosfet?) which, when cutoff happens, opens another Mosfet..?         – Schematic created using   I'm not sure about the selection of M2 and how to wire it, so it will be conductive if M1 won't forward power anymore.  And I know about another electrical problem: Just using a Z-Diode (D1) with M1 will render M1 to something like a resistor, not a switch. I've read, that I could use something like a Shut Reference (i.e. TI's TL43xx). Again I'm not sure how to chose the correct one and how to wire it.


I think I have a trojan.  svchost.exe is consuming %25 cpu all the time, and my Microsoft Security Essentials reports a different virus every half an hour or so. From what I understand the trojan is downloading different viruses. MSE removes those but can't disable the real culprit.  I have tried a couple bootable scanners such as Kaspersky Rescue Disk, they seem to find the same ones found by MSE but with no further success, when I restart my pc svchost still uses %25 cpu and I get new virus alerts time to time.  My question is, I have a windows backup of my C drive (120gb single partition), if I delete the partition and format it and then restore from backup, is it a sure way to get rid of trojan, assuming it didn't attach itself to something in D drive (which is a seperate hdd) and I don't run it? I read some trojans reside in GUID tables and such, can this action get rid of them?

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


While installing Ubuntu 14.0.4, I selected Windows replace option. After installation of Ubuntu,my windows drives are not visible. I tried to recover the data using testdisk but I was unable to recover. While recovering data using testdisk NTFS new Volume is shown. I don't know how to recover. Are there any tools or any simple procedure to recover data?

About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 & Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.


/\p{Z}/u.test(' ') works on Chrome 71.0.3578.98 and returns true, but on Firefox 65.0 it throws the error: SyntaxError: invalid identity escape in regular expression  Is this a problem with ES implementation in Firefox, or I am using the regex wrong, and Chrome is just being nice and interprets that in the desired way?

What is the easiest way to match non-ASCII characters in a regex? I would like to match all words individually in an input string, but the language may not be English, so I will need to match things like ü, ö, ß, and ñ. Also, this is in Javascript/jQuery, so any solution will need to apply to that.


If the shell is unable to find an executable in the directories mentioned in the PATH environment variable. Does it store this information somewhere to make the subsequent calls faster or it again searches all the directories?

There're way too many articles/resources on the web that teaches people HOW to set the environment variable PATH so that they can use the short hand of java or python etc instead of the absolute path in command line interface.  What I'm interested to know is that what's behind the scene when we type in the command and hit enter (similar to ).  Here is my guess:   read the command (parse/preprocess stdin to get the right arguments $@) command lookup command execution (program started, consume memory, stdout/stderr to shell) re-render the emulator by relevant environment variables (e.g. $PS#, $PROMPT, etc)   The part I want to figure out most is the command lookup. Obviously, the $PATH is consumed by some background function and separated by : / ;as delimiters, then what happened? Do we use a hash table (key: basename of the file, value: absolute dirname of the file) to store the binary files under those PATHs, or some other hooks?   NOTE: I originally thought it was hash table as I can use [ -z hash [command] ] to check if a command is available in current env, but when I use hash | grep python I get nothing from the output while which python works as anticipated. (I think the mechanism might be shell specific, but I want to get more insights into it.)


The following minimal example  \documentclass{beamer} \usepackage{booktabs} \usepackage{empheq} \usepackage{pgfplots}  \begin{document} \begin{frame} Test \end{frame} \end{document}   gives the error  /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations .code.tex:31: No room for a new \dimen . \ch@ck ...\else \errmessage {No room for a new #3}                                                   \fi  l.31 ...\pgfdecoratedinputsegmentremainingdistance  This error is not produced if beamer or one of the three packages is not used.  The relevant file list is:   beamer.cls    2013/12/02 3.33 A class for typesetting presentations (rcs-revision 332bfd3ce558) booktabs.sty    2005/04/14 v1.61803 publication quality tables empheq.sty    2014/07/16 v2.14 Emphasizing equations pgfplots.sty    2014/08/04 v1.11 Data Visualization (1.11-3-g4c99d7a)   Does anyone know of a workaround?

I have this error message:  ! No room for a new \dimen . \ch@ck ...\else \errmessage {No room for a new #3}                                                 \fi   which I can not find a cure for.


I'm trying to add a gradient to a background image, so the gradient is coming from top and from the bottom, exactly like this -   The background image code -  body {   background-image: url('images/city.jpg');   background-position: top;   background-size: cover;   height: 900px;   margin: 0px; }   I've tried adding the gradient, but I've only succeeded to add a gradient from bottom to top only.  I would appreciate if someone could help me with the code and explain how it works.

Is it possible to have two background images?  For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the entire page is behind the one which repeats across the top.  I've found that I can achieve the desired effect for two background images by setting the background of html and body:  html {     background: url(images/bg.png); }  body {     background: url(images/bgtop.png) repeat-x; }   Is this "good" CSS?  Is there a better method?  And what if I wanted three or more background images?


How can I change the file ownership to root on ubuntu 14.04

Can you explain briefly the main concepts and command line tools used to manage file permissions?


I'm coding a 2D platformer in using C++ and SDL2. I've started by coding the GUI, however I'm unsure how to get the menu buttons onto the screen and in the right positions.   How do I load the PNG menu buttons onto the screen in a way that I can adjust them to get them in the right spots?

I'm learning SDL 2.0 at the moment and I've seen this method for loading BMPs:  SDL_Texture* LoadImage(std::string file) {     SDL_Surface *loadedImage = nullptr;     SDL_Texture *texture = nullptr;     loadedImage = SDL_LoadBMP(file.c_str());      if (loadedImage != nullptr)     {         texture = SDL_CreateTextureFromSurface(renderer, loadedImage);         SDL_FreeSurface(loadedImage);     }      else         std::cout << SDL_GetError() << std::endl;         return texture; }   How could I switch it up to load PNG files?  EDIT: Woops, forgot to add my method of loading PNGs.  SDL_Texture* grass_image = nullptr; grass_image = IMG_LoadTexture(renderer, "res/grass.bmp"); SDL_Rect grass_rect;     grass_rect.x = 0;     grass_rect.y = 0;     grass_rect.w = SCREEN_WIDTH;     grass_rect.h = SCREEN_HEIGHT;  if (grass_image == NULL)     std::cout << "Couldn't load grass_image" << std::endl;  while (!quit && mainEvent -> type != SDL_Quit) {     SDL_RenderCopy(renderer, grass_image, NULL, &grass_rect); }   I just don't want to have to do that for EVERY image.  So how could I put that into a function?  Thanks!


I am trying to auto click on a button with id btn on page load. This is my snippet.  <button id="btn">Click me</button> <script> document.getElementById('btn').click();     alert("h") </script>   How can I give an alert on page load? Pls help. Thanks.

How do I programmatically force an onchange event on an input?  I've tried something like this:  var code = ele.getAttribute('onchange'); eval(code);   But my end goal is to fire any listener functions, and that doesn't seem to work.  Neither does just updating the 'value' attribute.


I am an Indian passport holder travelling with below itinerary. Surprisingly, the travel agent shared 2 PNRs on the same ticket.  Bangalore to New Delhi - Air India (Star Alliance) New Delhi to New York - Air India (Star Alliance) New York to Jacksonville - Delta (SkyTeam alliance)  Can I check-in the luggage all the way through or will I have to separately check-in at New York airport (given the alliances are different here)?

I have flight where I need to move from airplane to another. Do I need to check out my luggage and then check it in again, or will it be automatically transferred to another plane?


I am trying to reduce the contrast of my monitor by using xcalib. This is the output of my xrandr.  Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 32767 x 32767 DVI-D-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm    1920x1080     60.00*+    1680x1050     59.95      1600x900      60.00      1440x900      59.89      1280x1024     75.02    60.02      1280x720      60.00      1024x768      75.03    60.00      800x600       75.00    60.32      640x480       75.00    59.94   HDMI-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm    1920x1200     59.95*+    1920x1080     60.00      1680x1050     59.95      1600x1200     60.00      1280x1024     60.02      1280x960      60.00      1024x768      60.00      800x600       60.32      640x480       59.94   DP-0 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) DP-4 disconnected (normal left inverted right x axis y axis) DP-5 disconnected (normal left inverted right x axis y axis)   I could till now proportionally change the contrast of both the monitors by using this command -   xcalib -co 80 -a #reduces contrast by 80 percent.   How do I specify the monitor name?  xcalib -co -80 -d DVI-D-0   throws an error - Can't open display

I must use a VGA-to-DVI cable and a HDMI cable to run two monitors.  I'm trying to invert the colors on both monitors but I can only invert one of them:  $ xcalib -invert -alter -s 0 #works   $ xcalib -invert -alter -s 1 X Error of failed request:  BadValue (integer parameter out of range for operation)   Major opcode of failed request:  129 (XFree86-VidModeExtension)   Minor opcode of failed request:  19 (XF86VidModeGetGammaRampSize)   Value in failed request:  0x17   Serial number of failed request:  10   Current serial number in output stream:  10   I unplugged the HDMI cable and plugged it back in again.  Now, the xcalib  -invert -alter -s 0 command inverts the other monitor.  In other words, both monitors are inverted for the moment but I had to re-connect one monitor to get that to happen.  Here is my setup:  $ xrandr Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192 VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 510mm x 287mm    1920x1080      60.0*+    1680x1050      60.0      1280x1024      60.0      1440x900       59.9      1280x720       60.0      1024x768       60.0      800x600        60.3      640x480        60.0      720x400        70.1   HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm    1920x1080      60.0*+    1680x1050      59.9      1280x1024      60.0      1440x900       59.9      1280x720       60.0      1024x768       60.0      800x600        60.3      640x480        60.0      720x400        70.1     Graphics card:  $ lspci |egrep -i vga 01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS880 [Radeon HD 4200]   This is Ubuntu server 12.04 LTS w/gnome-panel.  The problem still occurs on Ubuntu 14.04 but the work-around does not work.


I'm trying to get an image centered within an itemize list preferably without the use of the center environment (since this induces a call of \item which I otherwise redefine so that pages are ended at the end of every item). But it seems as though my centering is not centering.  The minimal example below demonstrates the problem.  \documentclass{article} \begin{document}  \begin{itemize}  \item Item text   \begin{center}  I'm centered, which is nice.  \end{center}  \item Item text    {\centering Why am I not centered?}  \end{itemize} \end{document}

I am trying to center this page but it will not work.  All is get is for the first line to be indented about one "tab" space to the right, but the second line will not shift.  However, the first line's indent does not appear to be centered either.  Is it possible that the binding offset or the indentfirst package is interacting with this negatively?  All of the other pages seem to work just fine. Any help would be appreciated.  \documentclass[12pt, a4paper, twoside]{article} \usepackage[margin=1in,bindingoffset=15.5mm,heightrounded]{geometry} \usepackage[T1]{fontenc} \usepackage{indentfirst} \begin{document} \pagestyle{empty} \vspace*{36 pt} {\centering \textbf{\emph{\Huge{Since I Saw You Last,\\There's a Change Upon You}}} } \end{document}


Yesterday I bought a heating pad at Walgreens and used my HSA debit card. It was a HSA Over-the-counter Eligible Expense. However, after the purchase I realized it wasn't what I actually needed. So I took the heating pad back to Walgreens to return it and the cashier gave me cash in the amount of my purchase.  Now I don't know what I need to do since I essentially just received around $40 dollars tax free. Do I report it on my taxes, send it back in to my HSA account, pocket it and act like it never happened? Any advice is greatly appreciated!

At work I'm covered by an HDHP with an HSA.  My dentist has the policy of estimating the amount that my insurance will cover and asking for the remainder at the time of service.  On my most recent visit, the office grossly miscalculated  the amount that my insurance would pay and ended up charging me more than they should have.  Now that the insurance has paid their portion, the dentist owes me a refund of the overcharge.  If I've already sought reimbursement for the original amount of out-of-pocket expense from my HSA (it's a qualified expense), what do I need to do (if anything) to make the HSA whole?  I'm assuming that this can't be corrected by an additional contribution.  Is there some form of excess distribution (the converse of an excess contribution)?  Possibly related:


I'm trying to use enscript to print PDFs from Mutt, and hitting character encoding issues with curly quotes. So that an email with text like this:  “very dirty”     we’re    Comes out as:  â\200\234very dirtyâ\200\235 weâ\200\231re   My print script currently reads like this:  #!/usr/bin/env sh INPUT="$1" PDIR="$HOME/Desktop" OPEN_PDF=evince    tmpfile="`mktemp $PDIR/mutt_XXXXXXXX.pdf`" enscript --font=Courier8 $INPUT -2r --word-wrap --fancy-header=mutt -p - 2>/dev/null | ps2pdf - $tmpfile $OPEN_PDF $tmpfile >/dev/null 2>&1 & sleep 1 rm $tmpfile   Is there a way to replace the curly quotes before I send it to enscript? Or a character encoding I can use that will handle the quotes?  If there's another (better?) way to print to PDF from Mutt, I'm all ears. I just need to ensure that my quotes aren't getting fouled up.

I am trying to print a large quantity (several megabytes) of UTF-8 encoded text which consists of Chinese and Latin characters (and maybe a sprinkling of others). I would like to print it in several columns per page, in a very small, condensed font, preferably with control over line spacing. I'd quite like inter-column lines, but I can live without them. The aim is to print to PDF for transfer, as well as to paper.  I have tried enscript and a2ps, but neither of these support Unicode.  I have also tried paps, but this produces bitmapped outputs which cannot be PDF'd effectively, and also look terrible.  Is there a modern way to print UTF-8 text like this without resorting to something like constructing it manually in Python?


Here's something that's always stumped me: If the USA was settled by people fleeing prosecution from the British, why don't we (in present day) speak with British accents? All things considered, the US is still a "young" country - this didn't happen all that long ago. Did the language change that fast? Are the accents we commonly associate with places like Boston or New York City still "remnants" of the British accent?

Why do people in different areas speak differently? Where do accents come from, how do they change and/or survive over time and why do we have them?   Reading recommendations on this topic would be welcome.


AllArea.setOnClickListener(new View.OnClickListener() {     @Override     public void onClick(View v) {     //get the place values as popup window     String[] items = {"All-Area","Cheruvathur", "Kanhangad","Nileswaram","Panathur","Periya","Thrikkaripur","Vellarikkundu"};     AlertDialog.Builder  builder=new AlertDialog.Builder(context);     builder.setTitle("Choose Area: ");     builder.setItems(items, new DialogInterface.OnClickListener() {     @Override     public void onClick(DialogInterface dialog, int item)     {     //AllArea.setText(items[item]);     if(items[item].equals("All-Area"))     {     AllArea.setText(items[item].toString());     //System.out.println(AllArea);     String getAllArea=AllArea.getText().toString();     Intent i=new Intent(SecondPage.this,Order.class);     i.putExtra("getAllArea", getAllArea);     startActivity(i);     Toast.makeText(getApplicationContext(),"All-Area",Toast.LENGTH_SHORT).show();     }     else if(items[item].equals("Cheruvathur"))     {     AllArea.setText(items[item].toString());     Intent j=new Intent(SecondPage.this,Order.class);     String getCheruvathur=AllArea.getText().toString();     j.putExtra("getCheruvathur", getCheruvathur);     startActivity(j);     //System.out.println(AllArea);     Toast.makeText(getApplicationContext(),"Cheruvathur",Toast.LENGTH_SHORT).show();     }     }     }     });  Not able to view the shop name  based on the given location and display its name in another activity, Please help me to figure out what is the problem code for the selecting value of shop based on location Intent All=getIntent(); String Allnew=All.getStringExtra("getAllArea");             if (Allnew.equals("All-Area")) {                  list = new ArrayList<>();                 list.add("3G mobile : Chevtr");                 list.add("Spice World : kngd");                 list.add("Dotcom : nslrm");                 list.add("Pv Stores: Pya");                 list.add("Sky World : Pntur");                 list.add("Mobile Galaxy : trkppr");                 list.add("Dream Mobile : vlkdu");                 list.add("Tele World : Chevtr");                 list.add("Info Tech Solutions : Pya");                 list.add("MYG Mobile : trkppr");               // adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list);              // listView.setAdapter(adapter);             }      Intent Cheru=getIntent();         String Cherunew=Cheru.getStringExtra("getCheruvathur");        if (Cherunew.equals("Cheruvathur")) {            list1 = new ArrayList<>();           list1.add("3G mobile : Chevtr");           list1.add("Tele World : Chevtr");           //  adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list);           // listView.setAdapter(adapter);        }  please help me to figure out the problem log cat showing this is the error NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference  i

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


What would be the best approach when a paper gets published referencing a work of yours, with a wrong explanation/assumption.   E.g.     "The tube lines by [the Mayor of London, 1863] are OK, but can only   used on Tuesday, so in this work we traveled by cab".   This is clearly a wrong statement, probably formulated due to lack of information. What should one do in these cases, if you were the Mayor of London?  My hunch says just ignore it, but I assume that for young researchers like me (unlike the Mayor of London) this can have a bigger impact, as if the first few references to our work are stating something wrong, people may actually stop using the tube.

This morning when I opened my email I was very excited to find a Google Scholar update telling me of two new citations from two different sets of authors each to a different paper of mine. As usual, I immediately checked the papers to find out if the authors were praising or criticising my work (or perhaps they found a mistake in one of my papers!). To my surprise, in one case the authors wrote a misleading statement which resulted from stretching quite a lot some of my conclusions. In the other case, the authors simply made an incorrect claim (details below for the curious). It's not the first time this happens to me - I even got one citation completely out of context once. How to react to this kind of situation?    Details for the curious:   In the first case, the authors cite a paper of mine where I compare two different methods to calculate elastic properties of materials. My main conclusion is that one of the methods converges much faster than the other one with the size of the basis set - in other words, it's computationally much cheaper. For calculations with usual basis sets the first method is much more accurate than the second one, with disagreements between the two in the order of 10% or even 20%. They claim that I show that both methods agree within a 1% of each other, which is misleading at best, because for the second method to agree within 1% of the first one one needs to do a very expensive calculation. That is one of the main points of the paper and it got completely overlooked by the authors. In the second case, the citation is plainly wrong. The authors cite my paper as an experimental work on InGaN semiconductors while it actually is purely computational.


I am using Ember 3.0.0 to create a booking site. Title and meta tags are handled via ember-cli-meta-tags and seem to be rendered correctly when pages are opened in the web browser.  However, Googlebot refuses to render the app normally. Whatever I do, it just renders a blank index.html page. I've tried to shorten the time of loading the model, but even non-dynamic pages (without Ember Data requests in the model) aren't rendered.  Here is an example from my website:  <!-- begin snippet: js hide: false console: false babel: false -->  <!-- language: lang-js -->      import {       schedule     } from '@ember/runloop';     import {       get,       set     } from '@ember/object';     import ENV from '../config/environment';     import Route from '@ember/routing/route';      export default Route.extend({       title: 'Tandblekning i praktiken: Allt du behöver veta',        patientPortal: ENV.APP.patientPortal,        headTags: function() {         return [{           type: 'link',           tagId: 'canonical-link',           attrs: {             rel: 'canonical',             href: get(this, 'patientPortal') + '/tandblekning'           }         }, {           type: 'meta',           tagId: 'meta-description-tag',           attrs: {             name: 'description',             content: 'Konkret och praktisk guide för tandblekning som gör att du sparar pengar, minskar risk för skador och får vitare tänder.'           }         }];       },        titleToken: function() {         return 'Tandblekning i praktiken: Allt du behöver veta';       },        setupController(controller, model) {         this._super(controller, model);         schedule('afterRender', this, function() {           set(controller, 'after_render', true);         });       }     });  <!-- end snippet -->   When testing this page on another simulator site, I get the same rendering as on index.html as well as in Google Search results when googling tandblekning site:muntra.se.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I'm trying to return data in a DataTable which consists in three columns:  commandTable.Columns.Add("Intent", typeof(string)); commandTable.Columns.Add("Command", typeof(string)); commandTable.Columns.Add("Permission", typeof(short));  My goal is to retrieve "Command" and "Permission" based on a match of a string withing the array splittedMessage on the Intent column's rows. So far I was able to achieve the results with the command var result = commandTable.AsEnumerable().Where   (r => splittedMessage.Contains(r.Field<string>("Intent"))).Select(s => new   {     Command = s.Field<string>("Command"),     Permission = s.Field<short>("Permission")   }).First();  But now, the Intent column changed from typeof(string) to typeof(string[]). How can I get the same data using Linq and Lambda but matching the splittedMessage to a string inside an array instead of a single string by row?

What would be the best way to look in a string[] to see if it contains a element. This was my first shot at it. But perhaps there is something that I am overlooking. The array size will be no larger than 200 elements.  bool isStringInArray(string[] strArray, string key) {     for (int i = 0; i <= strArray.Length - 1; i++)         if (strArray[i] == key)             return true;     return false; }


We had a huge spike in traffic with lots of these errors:  Feb 17 10:44:13 111488 kernel: [8275767.506198] Out of memory: Kill process 20577 (apache2) score 52 or sacrifice child Feb 17 11:02:06 111488 kernel: [8276839.559141] Out of memory: Kill process 20719 (mysqld) score 75 or sacrifice child   As you can see, it's not just one process but both apache2 and mysqld, so I've increased the RAM on the server. How can I check that this is available to these processes?

I have used top to see the memory usage at the moment. But I would like to monitor the memory usage over a period of time. E.g start monitoring and then execute a few commands, and final stop the monitoring and see how much memory that have been used during the period.  How can I do this on Ubuntu Server?  I guess I could start a cronjob every 5th second or so, and invoke a command that log the current memory usage in a textfile. But what command should I use to get the current memory usage in a format that is easy to log to a text file?


There are $50$ persons in a row of locked cells. With return of the king from the Crusade, a partial amnesty is declared and it work like this.  When the prisoners are stills asleep, the jailer walk past the cells $50$ times, each time walking from left to right. On the first past, the turns the lock in every cell (so that every cell is open ). On the second pass he turns the lock on every second cell (meaning that these cells are now locked again ) . on the third pass, he turns the lock on every third cell , and so on . In general, on the $k th$ pass, he turns the lock on every $k th$ cell. The question is : which cells are unlocked at the end of the process so that the prisoner is free to go?

I have a problem called "The Prison Problem" that I need to explain to my 9-year-old cousin. I would think that he has just started learning about divisors and perfect squares, and as such, I have a proposed solution. Any input from you guys would be welcome, as to what is the best way to go about this.  Problem:  There was a jail with 100 cells in it, all in a long row. The warden was feeling very jolly one night and told his assistant that he wanted to give all the prisoners a wonderful surprise. While they were sleeping, he wanted the assistant to unlock all the cells. This should be done, he told the assistant, by putting the key in each lock, turning it once. The assistant did this, then came back to report that the job was done. Meanwhile, however, the warden has second thoughts. "Maybe I shouldn't let all the prisoners free," he said. "Go back and leave the first cell open, but lock the second one (by putting the key in and turning it once). Then leave the third open, but lock the fourth, and continue in this way for the entire row." The assistant wasn't very surprised at this request as the warden often changed his mind. After finishing this task, the assistant returned, and again the warden had other thoughts. "Here's what I really want you to do," he said. "Go back down the row. Leave the first two cells as they are, and put your key in the third cell and turn it once. Then leave the fourth and fifth cells and turn the key in the sixth. Continue down the row this way." The assistant again did as instructed. Fortunately, the prisoners were still asleep. As a matter of fact, the assistant was getting pretty sleepy, but there was no chance for rest yet. The warden changed his mind again, and the assistant had to go back again and turn the lock in the fourth cell and in every fourth cell down the row. This continued all through the night, next turning the lock in every fifth cell, and then in every sixth, and on and on, until on the last trip, the assistant just had to turn the key in the hundredth cell. When the prisoners finally woke up, which ones could walk out of their cells?  Proposed solution:  Ten cells are left open after this process. Every cell that is a perfect square will remain open (1, 4, 9, 16, 25, 36, 49, 64, 81, and 100). If a number is not a perfect square, then it has an even number of divisors, therefore it will be "toggled" an even number of times and end up where it started (closed). Perfect squares have an odd number of divisors, so they will end up the opposite of where they started (open).


Hi I recently posted a this question earlier and got some excellent answers but to take it a little further I liked k170's answer however it contained a Lambert W Function in the answer and I was wondering if I could get a more simple answer. Wolfram Alpha gave an approximate answer x=0.143668 I don't know how it got this answer but if anyone does it would be greatly appreciated.  Other Post Link:

I just want to know how to solve:  $$\ 5x=0.01^x$$   I have tried to use logarithms. It would be a huge help if someone could help because no matter what I do $\ x$ always gets stuck in a logarithm.  Edit: Sorry, I changed the questions to match.


i faced a problem with null , i implement the same code before and it work well but after i add other codes its not work ..  this is part of error :   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at manager.flyer$13.mouseClicked(flyer.java:751)     at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)     at java.awt.Component.processMouseEvent(Component.java:6536)     at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)     at java.awt.Component.processEvent(Component.java:6298)     at java.awt.Container.processEvent(Container.java:2236)     at java.awt.Component.dispatchEventImpl(Component.java:4889)     at java.awt.Container.dispatchEventImpl(Container.java:2294)     at java.awt.Component.dispatchEvent(Component.java:4711)   and my code part which show that error :   JButton btnNewButton_4 = new JButton("Add All");            btnNewButton_4.addMouseListener(new MouseAdapter() {             @Override             public void mouseClicked(MouseEvent e) {              int columnContainingPlanets =1 ;             for (int index =0 ; index < tableModel.getRowCount(); index ++){             if (tableModel.getValueAt(index, columnContainingPlanets).equals("")) {             JOptionPane.showMessageDialog(panel_4, "Please Enter Discount Amount For All Items");              return; }}   i try to replace columnContainingPlanets=1  to  columnContainingPlanets=0 but also there is error : java.lang.NullPointerException   i will happy if any one know the solution because that error appeared suddenly, and it was work well ..


I have a similar code:  if (variable !is AnyType) {     // TODO }   But what is that !is? It compiles only in C# preview and Rider doesn't show any errors.

This works just fine:      protected void txtTest_Load(object sender, EventArgs e)     {         if (sender is TextBox) {...}      }   Is there a way to check if sender is NOT a TextBox, some kind of an equivalent of != for "is"?  Please, don't suggest moving the logic to ELSE{} :)


What is the reason an employer would match 50 cents on every dollar up to 8% instead of matching 1 dollar on every dollar up to 4%? Is it the same or approximately the same thing?

In the situation where an employer is contributing a match to a 401(k), apparently a common formula is to match 50% of employee contributions up to a percentage of their salary. I have also seen this phrased as "50 cents for every dollar".  If the amount is 50% match up to 6% of salary, this equates to "you put in 6% and we'll put in 3%".  Why would they choose to do this, instead of simply offering a match up to 3%?   The match is not more or less either way. It instead forces the employee to put in more money, which has no benefit to the employer. I don't see any advantage to the employer to do it this way, there is only disadvantage to the employee.  What is the logic behind offering a ratio match instead of a 1:1 match?


I'm trying that a Python program reads a word made by another Python program which was encoded to UTF-8 and saved on a txt file.   For example, the string it gets might be:   b'\xd1\x84\xd0\xbe\xd1\x80\xd1\x83\xd0\xbc'   being this a normal string, like doing this:  word_string = "b'\xd1\x84\xd0\xbe\xd1\x80\xd1\x83\xd0\xbc'"   How do I make the script see this is a bytes string and not a normal string? I know this can be done like   word_bytes = b'\xd1\x84\xd0\xbe\xd1\x80\xd1\x83\xd0\xbc'   but if I have the content of that variable 'word_bytes' already written in a file, how can I get it and make the program understand it just has to decode it? Because I try to decode it and it says it's a string and can't be decoded. Any help?  Thanks in advance!  UPDATE: So just to put here to anyone who gets the string from a file on at least Windows (I'm using Windows 7), with tripleee's answer, it will encode and put double backslashes on the bytes part, and when it decodes, it will just remove one of the backslashes, putting it as it was before. So the way to get it from a file and decode it is the following:  s = '\xd1\x84\xd0\xbe\xd1\x80\xd1\x83\xd0\xbc'.encode().decode('unicode_escape') [having the bytes part between '' been gotten from a file using the open(file,"r") function, in my case] s.encode('latin-1').decode('utf-8') [or ISO-8859-1, as it seems it's the same thing]   EDIT: tripleee's answer is almost what I wanted to know (50% missing), but it's already a way, so thank you! But how could I do it not knowing the encoding (because in this case, I didn't know the encoding was latin-1 and I can't put all the encodings there)? Like I would do by just putting a b before the bytes string like in 'word_bytes' variable (possibly it might encode with the right encoding automatically? I wanted to do that too but possibly with a funcion to a variable that has already the bytes part).

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


I recently got an LG G4 phone from a friend and I was really excited until I got to the screen where it said enter the account previously any get. I was so frustrated and thought they set me up but they had also gotten it from a friend.  I did everything the YouTube told me to do except the unknown sources option is grey and it won't let me select it at all (so basically I'm stuck at step 4 of  given in a related question here).  My parents don't necessarily know I have it. I don't have any money or time to send it into the Lg company and I want to get it working so I can stay in touch with my friends when I go on my trip.  What should I do ? I can't install files because it's blocked and can't add an account because every time I do it goes right back to enter the previously synced email. Would putting a SIM card in help ?? How do I completely wipe the system. My trip is in about a week help please.

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


I have just downloaded Ubuntu and I am trying to play some Steam games but Steam says that I should update my drivers.   I am using the post release driver, but should I also install the experimental and xorg and kernel module drivers?

I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:


Ubuntu 20.04. I installed virtualbox using package; it worked, I created and ran a RM. But then stopped to work after software update. I cannot run the VMs, message says : Kernel driver not installed (rc=-1908)  The VirtualBox Linux kernel driver is either not loaded or not set up correctly.  Please reinstall virtualbox-dkms package and load the kernel module by executing  'modprobe vboxdrv'  as root.  I managed to disable secure boot, so this is not related to this. Now I try to reinstall virtualbox-dkms package as requested : sudo apt remove virtualbox-dkms sudo apt install virtualbox-dkms  But then I get the following error : Préparation du dépaquetage de .../virtualbox-dkms_6.1.10-dfsg-1~ubuntu1.20.04.1_amd64.deb ... Dépaquetage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ... Paramétrage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ... Loading new virtualbox-6.1.10 DKMS files... Building for 5.8.0-34-generic Building initial module for 5.8.0-34-generic Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64) Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information. dpkg: erreur de traitement du paquet virtualbox-dkms (--configure) :  installed virtualbox-dkms package post-installation script subprocess returned error exit status 10 Des erreurs ont été rencontrées pendant l'exécution :  virtualbox-dkms E: Sub-process /usr/bin/dpkg returned an error code (1)  If I look at /var/lib/dkms/virtualbox/6.1.10/build/make.log I see : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: error: ‘cpu_tlbstate’ undeclared (first use in this function); did you mean ‘cpuhp_state’?   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                                      ^~~~~~~~~~~~ ./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’   318 |  typeof(variable) pscr_ret__;     \       |         ^~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                        ^~~~~~~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: note: each undeclared identifier is reported only once for each function it appears in   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                                      ^~~~~~~~~~~~ ./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’   318 |  typeof(variable) pscr_ret__;     \       |         ^~~~~~~~ /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’   760 |     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);       |                        ^~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:290 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.o] Erreur 1 make[2]: *** Attente des tâches non terminées.... make[1]: *** [scripts/Makefile.build:519 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv] Erreur 2  What I am missing ?

After the latest Ubuntu updates, I have not been able to open virtualbox, on starting it gives me an error saying the kernel driver is either not loaded or set up properly and that I should reinstall virtualbox-dkms package. After removing virtualbox, and trying to reinstall I get the error below: ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash' Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64) Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information. dpkg: error processing package virtualbox-dkms (--configure):  installed virtualbox-dkms package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of virtualbox:  virtualbox depends on virtualbox-dkms (>= 6.1.10-dfsg-1~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.10-dfsg-1~ubuntu1.20.04.1) | virtualbox-modules; however:   Package virtualbox-dkms is not configured yet.   Package virtualbox-source is not installed.   Package virtualbox-modules is not installed.   Package virtualbox-dkms which provides virtualbox-modules is not configured yet.  dpkg: error processing package virtualbox (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of virtualbox-qt:  virtualbox-qt depends on virtualbox (= 6.1.10-dfsg-1~ubuntu1.20.04.1); however:   Package virtualbox is not configured yet.  dpkg: error processing package virtualbox-qt (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure.                             No apport report written because the error message indicates it's a follow-up error from a previous failure.                                                         Processing triggers for menu (2.1.47ubuntu4) ... Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for systemd (245.4-4ubuntu3.3) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for shared-mime-info (1.15-1) ... Errors were encountered while processing:  virtualbox-dkms  virtualbox  virtualbox-qt E: Sub-process /usr/bin/dpkg returned an error code (1)  This happens even when I boot from the previous kernel using the grub menu, any help would be very appreciated. I have also tried to use aptitude to remove any conflicting versions of virtualbox from other repositories but still the same issue.


This graphic was adapted from Hansen, McDonald, and Newey (2010), I am just trying to reproduce something similar in LaTeX.

I need to draw a tree, and constantly using dotty and including the PNGs is starting to be a pain. Is there a way to get LaTeX to draw it's own trees that doesn't involve learning an entirely new language like TikZ?


How can I prove that a swap matrix (a matrix which multiplied with another, swaps a pair of its rows/columns) has determinant $-1$?

Why is the determinant of an elementary permutation matrix equal to $-1$?  I am brand new to determinants and I've tried expanding it and using cofactor expansion, but it's messy and complicated. I would prefer if someone could show me using expansion, but alternative methods are welcome. Thanks.


I have the following method:  public boolean isMsgOk(String msg) {...}   I want to call this method here:  public String[] returnOkMessages(String... msgs) {     return Arrays         .asList(messagessgs)         .stream(message->isMsgOk(message))         .anyMatch() ???; }   I want to return a List of Strings for which the isMsgOk method returns true. How can I collect them?

I want to filter a java.util.Collection based on a predicate.


Adobe Forms Central had a decent level of security. I've been told some software providers state in T&C's that they own the data you submit!  What's the score with Cognito?  Is submission content encrypted?

Some forms may contain confidential information - even something basic like where a person lives.   What measures do Cognito Forms take to ensure that data stored within its site is secure?


I'm looking for a word that describes people who have high standards for themselves and others and strive to achieve them, but don't expect absolute perfection. They are satisfied with realistic results. As in     Being a ________ [perfectionist], John spends a great deal of time ensuring the quality of work is above reproach.   I like "perfectionist", but it's too closely associated with words like "persnickety", "hypercritical", "nitpicky", "punctilious", "anal", "pedantic", etc.  I'm finding words like "meticulous", "rigorous", "conscientious", and "thorough", but none of these really fit quite right.

I am looking for a word that would describe someone who always goes out of their way to take their time and do a good job. Sort of the opposite of half-assing something.  I am looking for something that is more about a work ethic than a technically proper way of doing things. Something like canonical or protocol would not be a good fit.


I got stuck on this problem from Real Analysis by Folland. Can anybody give me any hints on how to solve this?     If $f$ is Lebesgue integrable on $(0, a)$ and   $$ g(x) = \int_x^a{t^{-1}f(t)dt} $$   then $g$ is integrable on $(0, a)$ and      $$ \int_0^a{g(x)dx} = \int_0^a{f(x)dx} $$

Let $f:\mathbb{R}\to\mathbb{R}$ be Borel-measurable and Lebesgue-integrable over $I:=(0,1)$. Further, let  $\;\;\;\;\;\;\;\;\;\;g : I\to \mathbb{R}\;,\;\;\; \displaystyle x \mapsto\int_x^1\frac{1}{t}f(t)\text{ dt}$  I want to show that $g$ is integrable over $I$ and that it holds  $\;\;\;\;\;\;\;\;\;\;\displaystyle\int_Ig(x)\text{ dx}=\int_If(x)\text{ dx}$  Proof: $\;\;\;$ Please note that $g$ is well-defined, because $f$ is Lebesgue-integrable over $I$. So, by  $g$ is integrable and it holds:  $\;\;\;\;\;\;\;\;\;\;\displaystyle\int_Ig(x)\text{ dx}=\displaystyle\int_I\int_x^1\frac{1}{t}f(t)\text{ dt}\text{ dx}=\displaystyle\int_x^1 \int_I\frac{1}{t}f(t)\text{ dx}\text{ dt}=\displaystyle\int_x^1 \frac{1}{t}f(t)\text{ dt}=\cdots$  How do we integrate $\int_x^1 \frac{1}{t}f(t)\text{ dt}?$


I just noticed that the  user edited a ~1 year old  of mine. As you can see, the method call was changed from getSfGuardUser to getGuardUser:    Now I checked the documentation and it seems that the edit is correct.  But how did Community know about that? As far as I know, it is an automated process. Does it have a reference of all possible APIs of languages/frameworks (which seems very unlikely) or is there a routine admins can trigger, for replacing content? Or is it a secret?

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


I messed up with the Environmental variables to set up a permanent path in the command prompt. I want to set up a different permanently in command prompt.  Can I get come help with correcting my path Environmental Variables and have a permanent different path set up in command prompt.  Thank you

How can I open a cmd window in a specific location without having to navigate all the way to the directory I want?


Can we, for example, define good analogously?" Is there an analogue definition of good?  I'm using the word good as an example; the word could just as easily be virtuous, intelligent, evil, bad, and so on.

In electronics, we can solve a problem digitally or analoguely ?  That doesn't sound right, but surely there must be a word I can use?    Update: some definitions:  digitally: Relating to or being a service that provides information expressed in discrete numerical form.  analoguely: Relating to or being a service that provides information expressed in continuous, non-discrete form. (This is my made up definition of a word I made up).  analogously: Similar or alike in such a way as to permit the drawing of an analogy.  As you can see, the word analogously doesn't mean the opposite of digitally, it means something else.


Let $A, B \in M_n$ be positive definite and let $α\in (0, 1)$.  Why does $αA^{−1} + (1 −α)B^{−1}\succeq (αA + (1 − α)B)^{−1}$?

I wonder a generalization of Jensen's inequality: let $\mathbf{X,Y}$ be two positive definite matrices, can we obtain the following Jensen like inequality $$(1-\lambda)\mathbf{X}^{-1}+\lambda\mathbf{Y}^{-1} \succeq((1-\lambda)\mathbf{X}+\lambda\mathbf{Y})^{-1}$$ for any $\lambda \in (0,1)$, where the notation $\mathbf{A}\succeq \mathbf{B}$ represents matrix $(\mathbf{A-B})$ positive semi-definite.


Consider these two snippets:  Snippet #1  function countDownFn(num) {   if (num === 0) return;    console.log(num);   countDownFn(--num); }  countDownFn(5); // prints 5, 4, 3, 2, 1 once per line   Snippet #2  var myCounter = function countDownExp(num) {   if (num === 0) return;    console.log(num);   countDownExp(--num); };  myCounter(5); // prints 5,4,3,2,1 once per line    Why can I find window.countDownFn but cannot find window.countDownExp ? Why would you use one over other? Is one of them better than other ? Why?

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


Is there a difference in meaning between "live on government aid" and "live off government aid"? Are both correct written forms?

I wanted to refocus a  towards a possible deeper and direct relationship to "on vs. off".  Consider the following two phrases:   I   (Approx 94,000 results Google Search)   I   (Approx 67,000 results Google Search)   In addition to the subtle difference in meaning, I'm particularly interested in where the semantics of the differences might come from.  Can we trace the semantic difference between "live on" and "live off" to a fundamental, "definitional" aspect of "on vs. off"?     Below, I've answered my own question as an afterthought.  It was additional thoughts that needed to be moved to an answer, and is in no way intended to be definitive.


I have some string, which I will receive from UI:  String str = "12a47b4cea";   It represents sequence of hexademical numbers. How can I convert it into a byte array?  Expected output is:  byte[] arr = new byte[] {0x12, 0xa4, 0x7b, 0x4c, 0xea };

I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.  I couldn't have phrased it better than the person that posted .  But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the  byte[] {0x00,0xA0,0xBf}   what should I do?  I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple.


I am a Filipino citizen and is scheduled to go to the US on January 2020 . My brother from Canada booked me a ticket via Japan airlines. However , my itinerary is Manila -Haneda and Narita - US. This means that I need to go out  from Haneda Airport in order to get to Narita Airport . My question is , do i need to have a transit visa from Hanedon to Narita ? My lay over is only 6 hours. Need to be enlighyened on this. Thanks.

My flight is LAX to Narita and to Haneda for my connecting flight going to the Philippines  My questions are:   Do I need a transit visa? Do I need to claim my luggages before proceeding to my connecting flight


I installed Ubuntu 14.10 today. But after completion of installation I'm not getting that dual boot screen. I mean its directly getting booted up to Ubuntu. I cant boot to Windows 8.1 What to do?? Please reply asap

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I don't know how to explain the difference between effect and affect to someone. I've tried explaining that effect is a noun, and affect is a verb, that to affect is to make a change, and effect is the change that was made, but these explanations haven't made sense. (They're 17 and very intelligent, so please don't be rude.) Could you please suggest other ways of explaining this?

Is there an easy way to remember when to use the word affect or effect in a sentence? It is very confusing, and I still get them mixed up.


I have code in vb.net with @values like this:  Dim con As New SqlConnection                             Dim cmd As New SqlCommand                              con = FunctionConnection()                             cmd.Connection = con                              cmd.CommandText = "GetVerification"                             cmd.CommandType = CommandType.StoredProcedure                             cmd.Parameters.AddWithValue("@Value", "1,2,3,4")                              Dim Header_DataReader As SqlDataReader = Nothing                              con.Open()                             Header_DataReader = cmd.ExecuteReader   And my procedure like that:  ALTER PROCEDURE GetVerification (@Value varchar(255)) as BEGIN  SELECT        id, ControlPlanID, ParagraphID, ParagraphOrder, Specification, SpecificationParagraph, Dimension, Description, Samples, Frequency, ActivityResource,                           ActivityName, Observation, RequrementNom, RequrementPlus, RequrementMinus, Units FROM            CP_Sequence WHERE        (ParagraphOrder IN (@Value)) End   How put multilple values in my procedure, i want to put in @values 1,2,3,4 for 4 different rows for database  if i put in Sql code like this work but not for my procedure:  SELECT        id, ControlPlanID, ParagraphID, ParagraphOrder, Specification, SpecificationParagraph, Dimension, Description, Samples, Frequency, ActivityResource,                           ActivityName, Observation, RequrementNom, RequrementPlus, RequrementMinus, Units FROM            CP_Sequence WHERE        (ParagraphOrder IN (1, 2, 3, 4))   Thanks a lot

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


$\mathbf{Question}$: Can we construct an outer measure that is determined by the non-measurable set of Vitali? Although I can construct an non-measurable set, I cannot calculate its outer measure. Now I want to construct two disjoint sets: A and B which satisfy the following : $$ m^*(A \cup B) <m^*(A) +m^*(B)$$ $m^*(\cdot)$ stands for outer measure

Is it possible to construct a non-measurable set in $[0,1]$ of a given outer measure $x \in [0,1]$? This will probably require the axiom of choice. Does anyone have a suggestion?  Edit: I forgot to mention that the set has to be in $[0,1]$ which seemed "clear" in my head, but which obviously isn't.  Edit 2: Now it is clear that I just need a non-measurable set with outer measure 1, from that I can make any other one. I have once seen somewhere that they do this with transfinite recursion (if I recall correctly), but I don't remember where and how because I didn't know that transfinite recursion was back then.


I want to install ubuntu without a CD and a USB drive. I have a windows 8 laptop and I tried before but when I go to choose Ubuntu it just crashed any help?

I want to install Ubuntu on my laptop that doesn't have a CD-ROM drive and I have no spare USB disk. I've tried Wubi, but that doesn't seem to work (since it prompts me to have the CD in the drive, which I don't have).  How can I install Ubuntu, easily and in a fast way?  P.s: I want to dual boot it with Windows 7 (which was preinstalled).  Edit:   When extracting the ISO to a folder and running Wubi it does install, but when I reboot the computer, it doesn't show GRUB, nor can I choose if I want to boot Ubuntu or Windows 7. After trying for the third time today, wubi gives me an error: Permission denied   I'm the administrator on the PC.


I'm trying to make a simple project using PDO. I have a class UserDAO with two SELECT functions:  public function getAll(){  $query="select * from users";  $res = $this->db->query($query);  return $res; }   ...and this one...  public function getAllWhere($where){  $query="select * from users where ?";  $res = $this->db->query($query,array($where));  return $res;  }   When I call the function getAll(), it works fine:  <?php  $ud = new UserDAO();  $result=$ud->getAll();  foreach ($result as $row){    echo '
'.$row['id'].' '.$row['username']; } ?>   But when I try to user the other function...  <?php  $ud = new UserDAO();  $result=$ud->getAllWhere('id>10');  foreach ($result as $row){    echo '
'.$row['id'].' '.$row['username']; } ?>   ...it doesn't work. The error is:  PDOStatement::execute() expects parameter 1 to be array, string given  How can I pass the whole WHERE condition as a parameter? I would also like to make another step forward and to insert the table name ("users") as a parameter too.  Thanks.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Collada is not among the import options, and not among the addons for import options.  So is there a way to import a Collada file to Blender?

Can Blender export to the COLLADA format?  I tried going to File → Export, but COLLADA was not an option.  I'm using Blender 2.66.1 on Ubuntu 13.04.


I installed Ubuntu 13.10 64-bit today and I sat on the internet most of the day after installation. I shut the computer down and went bowling with my family. When I came back, I turned on my computer and it came to the boot screen as usual, but then the screen went black and stayed black. Can this be solved or do I have to install Ubuntu 13.04. My dad does not know about this and I do not want to get yelled at for an hour, so I need an answer before midnight mountain time, otherwise I will install Ubuntu 13.04 so I won't get yelled at in the morning.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


It is known that a dot product is a scalar, but a cross product is a vector.  Dot product: $$ A \cdot B \in \mathbb{R} $$  $$ A \cdot B = |A||B| \cos\theta $$   $$ A \cdot B = A_xB_x + A_yB_y + A_zB_z $$  Cross product: $$ A \times B \in \mathbb{R}^3 $$  $$ \| A \times B \| = |A||B|\sin\theta $$  $$ A \times B = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \ A_x & A_y & A_z \\ \ B_x & B_y & B_z \\ \end{vmatrix} $$  $$ A \times B = (A_yB_z-A_zB_y)\mathbf{i} + (A_zB_x - A_xB_z)\mathbf{j} + (A_xB_y - A_yB_x)\mathbf{k} $$  It is known that the dot product results in a scalar, and the cross product results in a vector. Why does one have direction, and the other does not, and why are they calculated differently?

Most questions usually just relate to what these can be used for, that's fairly obvious to me since I've been programming 3D games/simulations for a while, but I've never really understood the inner workings of them... I could get the cross product equation as a determinant of a carefully-constructed matrix,   but what I want to ask is... How did the dot and cross product come to be? When were they "invented"? Some detailed proofs? Did someone say: "Hey, wouldn't it be nice if we could construct a way to calculate a vector that is perpendicular to two given operands?"  Basically, how/why do they work?  I would appreciate explanations, links to other explanations, other web resources... I've been searching the Internet lately for explanations, but most of them are on how to use it and nothing that really gives substance to it.


In May I'm stopping at Heathrow Airport for 24 hours, on the way to New York from New Delhi. I'm an Indian passport holder and I have a 10 year US visitor visa.  Can I leave the airport and which visa would I need for that?

I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa.  Do I need a transit visa to stay airside?  I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors).  Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession?  Real stories will help a lot to calm the butterflies in my stomach.


our EPSON-DOT MATRIX printer.  not printing on DOS command  Type text.txt>prn text.txt file..??   But - it prints on open TEXT.txt>File>Print - it works perfectly.

Our Epson dot matrix printer is not printing on the following DOS command.:  Type text.txt>prn   But it does print perfectly on:  open TEXT.txt>File>Print    What is the issue here?


After a successful upgrade to 14.04, now when I am trying to login using administrator id, It loops back to login page and doesn't load my session. Even guest is not working. When I enter wrong password for administrator, it shows invalid password label.  File name ~/.xsession-errors show below error  Xlib:  extension "GLX" missing on display ":0". Script for ibus started at run_im. init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd respawning too fast, stopped   Please let me know what should I do.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Hibernating a laptop with ubuntu 20.04 (either via systemctl hibernate or pm-hibernate) doesn't work, both commands simply shut down the computer without saving the current state. Is there a way to correct this incorrect behavior and force hibernation commands to do what they are supposed to?

I tried different options to enable hibernate in Ubuntu 20.04 but nothing is working. How can I enable hibernate option in Ubuntu 20.04?


I want to create the process of uploading an image with jquery ajax. here's my code :  <form action="" method="post" name="formPicture" enctype="multipart/form-data">
         <input type="file" name="picture" class="form-control" />

     <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>     <input type="submit" value="Save" id="btn-saving" class="btn btn-primary" /> </form>    upload_picture.php  <?php $path = $_FILES['picture']['tmp_name']; $file_name   = $_FILES['picture']['name']; $newPath     = "upload/"; move_uploaded_file($lokasi_file,$newPath.$file_name); $insert="INSERT INTO `picture`(`picture`)                          VALUES ('$file_name')"; $query=mysql_query($insert); if($query){     echo '{"status":"success"}';     exit; }else{     echo '{"status":"error"}';     exit; } ?>   but the error said "Notice:  Undefined index: picture on line 4"; there's something wrong with my code ? Thanks..

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


Prove that $x=0.1234567891011\cdots$ is irrational  Proof: we argue by contradiction.suppose x is rational. then its decimal expansion ultimatetly periodic. Lets p denote the perid of this expansion. Now consider a block $B=000 \cdots0$ $  p$ times since any integer of the form $10^k$ with $ k \geq p$ contains $p$ consecutive $0$'s . this block must accure infinitely often in thedecimal expansion of $x$ by ourassumption that this expansionis ultimately periodic with period $p$ , this implies that $B$ must be the repeatingperiod block. Which means that the sequence consists of all $0$'s from some point onwards. but this clearly contradictions the construction of the sequence.  This proof is correct? If it is not, what's the issue.

We write all postive whole integers after the comma, how do we prove that this is an irrational number? ($0.1234567891011121314...$)