As stated in:      Stack Overflow is for professional and enthusiast programmers, people   who write code because they love it. We feel the best Stack Overflow   questions have a bit of source code in them, but if your question   generally covers…   I stared answering question of a user. Which in the end did not even understand what he wanted:   I flagged this answer. But no reaction was taken.  In what I understand, Stackoverflow is place, where people with basic knowledge about programming ask question.  And this question is about something, that person asking the question does not even understand and have no basic knowledge about even loops.  So, is should questions like this exist or not? As it will lead nowhere and would turn out into  tutorial on "how to program" if anyone ever tried to answer this to make asking person happy about answer (if its ever possible)

Subtitle:  Should beginner's questions be off-topic strictly because they are beginner's questions? The sorts of questions that newbie programmers ask has come up before many times in side discussions, and comes up constantly on the main site.  Here are two examples from today:   Both of the above questions are well-formed, specific, answerable definitively, not open to opinions and are otherwise directly on-topic for StackOverflow. However both questions were downvoted and closed by users who said they were off-topic because they were too basic in nature.  To quote one particularly pointed comment:  This question appears to be off-topic because it is trivially answerable by reading a beginners' language tutorial.  That pretty much sums it up. Here's another case posted yesterday:  This is another beginner's question.  The topic is fairly elementary.  The answer can likely be found in Strustrup's book, or any number of other books that we recommend.  Considering only that it is a beginner's question of a fundamental nature, should the question be considered off-topic? Lots of questions are posted from lazy people who are just looking to be spoon-fed answers.  Those questions should all be closed because they never meet the quality guidelines.  That's not what I'm asking about here.  What I'm asking about is just the elementray nature of the question.  If the question is elementary, but otherwise meets our quality and topical requirements, is it off-topic? I have always thought that .  But enthusiasts come in all shapes and sizes, from the bright-green newbie writing their first program to the grizzled veterans who have seen and done it all a million times before.  I have always felt that SO's stated audience does not, or should not, discriminate based on the expertise of the asker. Some  that newbie questions are off-topic because they aren't interesting enough for the answerers.  But this seems highly subjective to me.  After all, every question is a "no-duh softball" to someone.  Just today I provided what I thought was a  to a problem, only to learn a few minutes later that KonradRudolph and Yakk had come up with the  over a year before.  No-duh. It seems to me that this has been coming up much more recently.  Sometimes I'll chime in with a comment to the downvoters and close-voters suggesting that the level of expertise is not a parameter in deciding if a question is topical.  The downvoters will often agree.  But we don't have a difinitive resource to point to that says this is so -- it doesn't say it in the FAQs, and I've not found anything difinitive in meta. So what says meta?  Can a question about basics be on-topic for Stack Overflow?  If it can be off-topic, how do we know where to draw the line?


For instance, we can certainly represent π in this fashion.  $$ \frac{\pi}{4} \;=\; \sum_{n=0}^\infty \, \frac{(-1)^n}{2n+1} .\! $$  $\ln(2)$ is also irrational. And even that can be represented as an infinite sum of a sequence of rational numbers:  $$ \ln (1+x) \;=\; \sum_{n=1}^\infty \frac{(-1)^{n+1}}{n} x^n. $$ with $x=1$.  And also, $\sqrt2$:  $$ \sqrt2 \;=\; \sum_{k=0}^\infty\frac{(2k-1)!!}{4^kk!}\tag{2} $$  I'm curious if this applies to all irrational numbers? Is so, how do you go about proving it?

I've come up with an example that I think can represent every non-zero rational number:  $$\sum_{n=0}^\infty \frac{k}{mx^n}$$  where $k\in \mathbb{Z}_{\neq0}$, $m \in \mathbb{N}_{\neq0}$ and $x \in \Bbb Z \setminus \{ -1, 0, 1 \}$.   And I know there are series that converge to irrational numbers like $\sqrt{2}$ and transcendental numbers like $\pi$ or $e$, that use a finite number of variables that are non-zero integers. But is there such a series for every real number?    Edit  To be more clear, I am talking about infinite series that converge to a real number, that can be expressed in finite terms. For example $\pi$ can be expressed as $$\sum_{n=0}^\infty \frac{4(-1)^{n}}{(2n+1)}$$ This would fit the bill as opposed to $$\frac{3}{10^0} + \frac{1}{10^1} + \frac{4}{10^2} + \frac{1}{10^3} + \dots$$ which would require infinitely many terms to describe.


I'm working on a debian:9 image pulled from . When I ran apt update or apt-get update, I got the following error messages:  Ign:1 http://security.debian.org/debian-security stretch/updates InRelease Ign:2 http://deb.debian.org/debian stretch InRelease           Err:3 http://security.debian.org/debian-security stretch/updates Release        400  Bad request: request method denied Ign:4 http://deb.debian.org/debian stretch-updates InRelease                   Err:5 http://deb.debian.org/debian stretch Release  400  Bad request: request method denied Err:6 http://deb.debian.org/debian stretch-updates Release      400  Bad request: request method denied Reading package lists... Done                                   E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   My sources.list file looks like this (official example from ):  deb http://deb.debian.org/debian stretch main deb-src http://deb.debian.org/debian stretch main  deb http://deb.debian.org/debian stretch-updates main deb-src http://deb.debian.org/debian stretch-updates main  deb http://security.debian.org stretch/updates main     deb-src http://security.debian.org stretch/updates main   I also tried other releases, but got the same error. Does anyone have a clue what might cause the problem? Many thanks!  EDIT:  Thanks to , I finally solved it by manually setting the network proxy for the Debian image in Dockerfile before I do apt update.  Although the question is marked as duplicate, it has nothing to do with , because it was 400 error and the sources.list file was actually correct.

Whenever trying to install some programs from source, or specifically running apt update, I receive this message:  E: The repository 'http://ftp.ca.debian.org/debian stretch/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I started getting this after adding the architecture i386. Without it, I would not be able to install the proprietary Nvidia driver, and Steam client would not start at all. This is what my /etc/apt/sources.list reads:  deb http://ftp.ca.debian.org/debian/ stretch main contrib non-free deb-src http://ftp.ca.debian.org/debian/ stretch main contrib non-free  deb http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free deb-src http://ftp.ca.debian.org/debian/ stretch/updates main contrib non-free  ####stretch-updates, previously known as 'volatile'  deb http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free  deb-src http://ftp.ca.debian.org/debian/ stretch-updates main contrib non-free


Starting from my previous question  and considering that the commutator  $$\left[i\hbar\frac{\partial}{\partial x},x\right]=i\hbar, \tag{1}$$ the associated linear operator momentum (for example the momentum $p_x$ of the $x$-axis) is:  $$p_x\longrightarrow -i\hbar\frac{\partial}{\partial x}=\frac{\hbar}{i}\frac{\partial}{\partial x} \tag{2}$$ The association of $p_x$ with $-i\hbar\partial/\partial x$ is it a postulate or exist a proof that $$\left[i\hbar\frac{\partial}{\partial x},x\right]=i\hbar\color{red}{\boldsymbol{\equiv}[p_x,x]\,\,?} \tag{3}$$

I've been studying the postulates of QM and seeing how to derive important ideas from them. One thing that I haven't been able to derive from them, however, is the identity of the momentum operator.  For simplicity, I'm only thinking about no relativistic effects, no spin, no time-dependent potentials, and one spatial dimension. Also I'm assuming the position operator is simply multiplication by $x$, as in, I'm in position space. So the Hamiltonian operator is  $ H = -\frac{\hbar^2}{2m}\nabla^2+V$.  I know that the momentum operator is $p = -i\hbar \frac{\partial}{\partial x}$.  But how do I get there from the postulates? I know that it makes sense, as it results in the Ehrenfest Theorem, the De Broglie wavelength hypothesis, the Heisenberg Uncertainty Principle (for $x$ and $p$), the momentum operator being the generator of the translation operator, and possibly many other desirable theorems, and correlations with classical momentum.  But none of these are postulates (at least, not in the various formalisms I encountered), so you can't derive $p = -i\hbar \frac{\partial}{\partial x}$ from them. Rather, they are consequences of it. You need to know the operator beforehand to see that they are correct. Yes, this is just semantics, but that is the core issue for me:  Regardless of how much sense it makes, is the identity $p = -i\hbar \frac{\partial}{\partial x}$ (under the assumptions I made) a Postulate, meaning that you can't derive it from other postulates, or can it in fact be obtained from them? And in the latter case, could you show me how?  Note: I know that there are many different and equivalent sets of postulates for QM. But in none that I saw did they name it as a postulate nor properly derived it.


As I'm sure everyone is now aware,  -- two words with the opposite definition. It got me wondering:   Are there any other words in the English language that can mean the opposite to itself?

Words like cleave and egregious have meanings that are completely opposite to other meanings of the same word. How did such a bizarre, confusing state of affairs ever develop?   I mean, I just can't work out how one and the same word could come to mean two distinct things that are completely opposite! Is it the same root? What did the root mean and how did it come to be used to mean the opposite?


I would like to know how secure is this? Is it going to prevent most of the sql injection attacks?  if(isset($_GET['image_id']) && is_numeric($_GET['image_id'])){ $image_id = $_GET['image_id'];                   // get next picture id $result = $pdo->prepare('SELECT image_id FROM images WHERE image_id > :image_id ORDER BY image_id ASC LIMIT 1'); if($result){     $result->execute(array(':image_id' => $image_id));     if (($row = $result->fetch()) !== FALSE) {        $next_id = $row['image_id'];     } }  // get previous picture id $result = $pdo->prepare('SELECT image_id FROM images WHERE image_id < :image_id ORDER BY image_id DESC LIMIT 1'); if($result){     $result->execute(array(':image_id' => $image_id));     if (($row = $result->fetch()) !== FALSE) {        $prev_id = $row['image_id'];     } }  $result = $pdo->prepare("SELECT * FROM images WHERE image_id= ? LIMIT 1");               if ($result->execute(array($_GET['image_id'])))  {         ....      On the website there is no login form or any kind of form input except may be will have just one search form but is not going to happen until I'm not sure is secured good enough. So currently I'm trying to secure this.  I've also read some articles and some questions here but still can't understand how to test my application so I'll put the source and ask you.

Let's say I have code like this:  $dbh = new PDO("blahblah");  $stmt = $dbh->prepare('SELECT * FROM users where username = :username'); $stmt->execute( array(':username' => $_REQUEST['username']) );   The PDO documentation says:     The parameters to prepared statements don't need to be quoted; the driver handles it for you.   Is that truly all I need to do to avoid SQL injections?  Is it really that easy?  You can assume MySQL if it makes a difference.  Also, I'm really only curious about the use of prepared statements against SQL injection.  In this context, I don't care about XSS or other possible vulnerabilities.


i have question about C language (memory). this is my source  #include <unistd.h>  int main() {      char ___storage___[1073741824];      sleep(30);      return 0; }   RAM Usage : 10 Bytes when i run this program i expected this program get 1 GB from my pc ram for 30 seconds. but it's get nothing from my PC ram !!! but for example if i copy the characters into this array like this  #include <stdio.h> #include <unistd.h>  int main() {      char ___storage___[1073741824];      for (int i = 0; i < 536870912; i++) // 512 Mb characters !         ___storage___[i] = 'h';      sleep(30);      return 0; }   RAM Usage : 512 MB for this program when i run it, this program get 512 MB of my ram ! but i declared a variable with (1GB) size ! why ? if this get our PC ram only when we insert something inside it, why we have dynamic variables !? for example we give a dynamic variable high range and insert inside it with out dynamic allocation or reallocation !

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


The human eye has evolved to become sensitive only to visible part of the electromagnetic spectrum. Why? Why is infrared vision disfavoured for us by evolution but not for some other animals? I am not an expert of biology but curious.

Across the electromagnetic spectrum, 400-700 nm is a narrow spectrum of frequencies and focused in the region of short wavelengths. For example, radio waves cover a large range of frequencies unexploited by the visual system. So what biological reason is there that evolved us to use such a small frequency bandwidth for vision?


I want to make a small generator from a Dc brushless fan  FD129225HB-N DC 12 volt. can I use this directly to led light of 12volt. I am not good at electrical things please help me.

I have disassembled 20 broken hard disks and taken out the motors, thinking they might be useful. However, they didn't work using DC current, because they required some kind of control circuit. Now I have a project (electrolysis) that might require to use those motors as generators. I want to know what kind of current these generate (DC or AC)? They were able to power an LED but as LEDs are diodes, I couldn't tell whether that motor generated AC.


My computer has an SSD and a HD. SSD contains Windows 10 while my HD has my programs and documents. When I turn on my computer, it takes about 5 minutes to load into Windows where it then freezes. I am unable to perform any tasks in Windows. Previously, CrystalDiskInfo has reported that my HD has bad sectors. I unplugged my HD and I am able to successfully load Windows 10.  My problem is that I need the data and applications from my failed HD. I would like to clone my failing HD onto a new HD, then plug it into my computer so Windows will function normally as before (ie - my applications will still be stored, settings and documents will remain the same). What sort of steps can I take to clone my drive?  UPDATE:  I have taken a look at the linked resource () but I don't think it helps me in my situation. I do not think I have a mechanical issue as I do not hear any weird noises coming from my hard drive. Furthermore, CrystalDiskInfo has reported that I have bad sectors. To recover from corruption or bad sectors, the linked resource says to get direct access to the data. Right now Windows freezes when I plug in my hard drive. How do I gain direct access to the data?  Looks like EaseUS allows to clone failing HDD/SSD that has bad sectors. My question is how do I gain access to the data in my failed HDD?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


In the question  of the , the current accepted answer was first drafted by me, but another user provided a very good complement to the answer by editing. The point is that, it should be considered a collaborative answer of two users and the other user should be able to get as much credit for the answer as I do. Is there such feature? Can such a feature be added?

Consider the answer I posted here:   It is actually an improvement to the most upvoted answer. However, had I just made an edit to it (the most upvoted answer), I would have received no reputation for further upvotes. This way, however, I received 5 upvotes until now and even earned the Necromancer badge for it.  Do you think it would make sense if the editor could also earn some reputation for subsequent upvotes?  Perhaps this could be part of the edit review process, where the reviewer has e.g. a checkbox to tell whether this edit actually builds upon the original answer, so that the editor should also receive reputation for further upvotes.


I'm not comfortable with autohiding auto-sliding scroll bar button in some gnome based applications (like gedit). Is there any way to restore a normal scroll bar? similar to one in KDE applications (like kate) or Windows applications.

It looks like Ubuntu 11.04 will come with  by default. I do like them, but I don't like the current mix of scrollbar types as many applications don't yet use those overlay scrollbars.  Is there a way to disable overlay scrollbars (without removing the overlay-scrollbar package)?


I am trying to initiate the save of a .txt file on the form side after a save button is chosen. The save is going to happen on the business package. However, it doesn't seem to be working. I can't figure out why. Here is what I have on the form side:  private void jMnuSaveActionPerformed(java.awt.event.ActionEvent evt) {                                              statusMessageLabel.setText("");     JFileChooser f = new JFileChooser(".");     String path = "";     f.setDialogTitle("Save Asset Depreciation File");     FileNameExtensionFilter filter = new FileNameExtensionFilter ("Text File (*.txt)", "txt");     f.setFileFilter(filter);     JDialog dg = new JDialog();     int rval = f.showSaveDialog(dg);     if (rval == f.CANCEL_OPTION){         statusMessageLabel.setText("Open canceled.");     }     else if (rval == f.APPROVE_OPTION){         path = f.getSelectedFile().getName();         a.setSave(path);         statusMessageLabel.setText(path);     } }                                           And here is what I have on the business package/Asset class side:  public boolean setSave(String p){     boolean result = true;     try{         PrintWriter out = new PrintWriter(         new FileWriter(p + ".txt", true));         out.println("Asset Name: " + this.AssetNm);         out.println("Salvage value: " + this.salvage);         out.println("Cost: " + this.cost);         out.println("Life (years): " + this.life);         out.close();     }catch (IOException e){         result = false;         this.emsg = "Write status error: " + e.getMessage();     }     return result; }

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


How many functions from $f:A \rightarrow B$ where $A=\{a_1,a_2,\ldots,a_6 \}, B=\{1,2,3,\ldots,9 \}$ such that $f(a_{i+1})>f(a_{i}) \quad \forall \quad 1 \leq i \leq 5$ and $f(a_j) \neq j \quad \forall 1 \leq j \leq 6$   Attempt: $a_6$ can take values $7,8,9$. $a_5$ can take values $6,7,8$ so on till $a_1$ can take values $2,3,4$. I wrote down these possibilities in a vertical column, one below the other, in the same order. I noted that starting from any row, we can proceed(values permissible) only vertically upward or diagonally upward to the next row.   I couldn't think of any other idea. Although here brute Force with the above logic is feasible since the numbers and possibilities are fairly small (I got the answer doing so), but is there any other way? Preferably a more general one with set A having $n$ elements and set B having $m$ elements with the same constraints.  I couldn't spot a pattern in the above brute Force method.

I stumbled upon a question given like:  Let $m$ and $n$ be two integers such that $m \geq n \geq 1$.   Count the number of functions $$f: \{1, 2, · · · , n\} \to \{1, 2, · · · , m\}$$ of the following two types:  (a) strictly increasing; i.e., whenever $x < y, f(x) < f(y)$, and  (b) non-decreasing; i.e., whenever $x < y, f(x) \leq f(y)$.  I tried in the following way.  For (a). We can say $f(n)>f(n-1)$ AND $f(n)>f(n-2) \ldots f(n)>f(1)$ (total $n-1$ elements)  Similarly for $f(n-1)>f(n-2), f(n-1)>f(n-3) \ldots f(n-1)>f(1)$ (total $n-2$ elements)...  and $f(2)>1$  Like this $$(n-1) + (n-2) + \ldots + (1) = \frac{n(n-1)}{2}$$  Is this correct?  For (b). Since there's equality, it will be $$n + (n-1) + ... (1) = \frac{n(n+1)}{2}$$  Is my approach correct? Any help is appreciated. Thanks in advance.


Just wondering, is there a way to have a model change depending on the camera angle? For example, in front view, you can see Mickey Mouses ears typically on top his head. But on side view his years keep facing the camera as they would from the front view. Not sure if I'm asking the right question, but is there a way to have that Mickey Mouse ears effect thing depending on the angle? And also, is there a way to have the front and side view models to change seamlessly?

Let's say (for the sake of simplicity) that this cube with two blue sides is my character...   and the shape key in question raises a few vertices on top.   Whenever the camera views either Blue side, I'd like the shape key to activate regardless of world orientation through the use of a driver. The problem is, I have no idea how to get values I need (or which values I need to begin with) in order to automate this.   TL;DR - I'd like the mesh of a character I have to deform when viewed from the side much like what was done in Land of the Lustrous     *Note: While I do have some experience with coding, I've never used python. Layman's terms would be greatly appreciated. Thank you for your time!    UPDATE: In response to @Leander's post  Would it be possible to have this script work with multiple characters on the same camera? Let's say I have character "Cube2" with shape key "Key 2", would simply adding variables like below accomplish this?  import bpy import mathutils  cam = bpy.context.scene.objects['Camera'] obj = bpy.context.scene.objects['Cube']  # ----------------------------- # Adding Cube2  obj2 = bpy.context.scene.objects['Cube2']  # -----------------------------   def drive_shapekey(scene):     obj_mat = cam.matrix_world.inverted() * obj.matrix_world      obj_eul = obj_mat.to_euler('XYZ')     cam_vec = obj_mat.to_translation().normalized()     obj_vec = mathutils.Vector((0.0, 1.0, 0.0))     obj_vec.rotate(obj_eul)     difference = cam_vec.dot(obj_vec)      key1 = obj.data.shape_keys.key_blocks["Key 1"]     key1.value = difference    # ----------------------------- # Adding Cube2 properties and shapekey 2  def drive_shapekey2(scene):     obj2_mat = cam.matrix_world.inverted() * obj2.matrix_world      obj2_eul = obj2_mat.to_euler('XYZ')     cam_vec2 = obj2_mat.to_translation().normalized()     obj2_vec = mathutils.Vector((0.0, 1.0, 0.0))     obj2_vec.rotate(obj2_eul)     difference2 = cam_vec2.dot(obj2_vec)      key2 = obj2.data.shape_keys.key_blocks["Key 2"]     key2.value = difference2  # -----------------------------   pre_handlers = bpy.app.handlers.scene_update_pre [pre_handlers.remove(h) for h in pre_handlers if h.__name__ == "drive_shapekey"] pre_handlers.append(drive_shapekey)   # ----------------------------- # Not sure if this'll work, but we'll see  [pre_handlers.remove(h) for h in pre_handlers if h.__name__ == "drive_shapekey2"] pre_handlers.append(drive_shapekey2)  # -----------------------------


At GIS, which I moderate, we have a Meta Q&A about  and I think the issue being discussed will be common to all sites.  When our user is editing tag wikis they are sometimes not provided with the Create Tag info button.  It seems like this is due to them encountering  and in particular the limit of:     at-most 5 pending suggested edits per editor on graduated sites   Assuming that our analysis is correct, when an editor already has 5 suggested edits in the review queue, would it be possible for the tag wiki page to show a banner like this?     You are currently unable to suggest edits to tag wikis because you   already have 5 suggested edits awaiting review.   I think that would be better than the Create Tag info button simply going missing.

I ran into an issue on Gaming.SE where I attempted to create a tag wiki and wiki excerpt for a tag which did not have one already while I already have the maximum of five suggested edits in the queue.  Navigating to the tag page for the  provides a link to  for this tag. This link redirects to the  for this tag, without telling me that I can't submit an edit because I've reached the maximum number of suggested edits. Instead of silently redirecting, the page should alert me that I can't suggest any more edits until my suggestions are reviewed.


It is said that can and may both are used as a sense of possibility.   If that’s the case, then what is the difference between:   It can be very dangerous to cycle at night. It may be very dangerous to cycle at night.

Which word to use when we ask for help?  Some conditions:     We know that the person asked is able to do it. We don't know if the person asked is able to do it.


I have spent a while for the solution but couldn't find anything for my specific problem. I am automating a task with Selenium and need to log in a system. If I do it manually, the system will keep the user logged if a new browser tab or window is opened, but with Selenium, this doesn't happen if it is the second run of the program. It will open a new tab and won't even navigate to the url on the code. Is there any way to make the browser reuse the user session from the previous Selenium run? I'm using Java for the automation.  EDIT  Apologies, but I wasn't very clear. I looked for a way to use the opened browser before asking this question, as the question marked as a duplicate of mine asks, but as it doesn't seem feasible I asked about another approach. The thing is an opened browser is called session, but I mean a session when a user is logged in a system and opens a new browser tab or window and can navigate to the same system without logging in again. As I mentioned, on the second run of a Selenium Java program it won't navigate to the same system url nor use the same user session.

This has been asked a million times on the web, but there's no clear cut answer. I tried "-browserSessionReuse" today without any luck; my tests keep spawning new browser windows.  X:\QA\Automation\SELENIUM_SERVER>java -jar selenium-server-standalone-2.8.0.jar -log "log.txt" -browserSessionReuse -forcedBrowserMode "*googlechrome" <snip> 13:42:25.923 INFO - Will recycle browser sessions when possible.   Maybe it's how I'm starting Selenium in my .py files?  sel = selenium('localhost', 4444, "*chrome", 'http://server/') sel.start()   ...perhaps I'm doing too many server starts?


I have a Malaysian passport, which allows me to visit the UK without a visa for 6 months. I left my job (Fortune 500 company) recently with the intention to travel and explore. Since my sister lives in the UK, I decided to make the UK my choice of travel.  I have visited the UK twice in the past (2-3 weeks each time) with no issue. But since this time my ticket is 6 months, I have been made aware that it raises red flags at immigration (to be honest I just stretched my return, as will likely return sooner). I have reached out to the UK embassy here in KL and the website. So I have prepared for the following:   Bank statement with 30K pounds (including a fixed deposit). But no continued income from the previous employment, only from my partner (see below point 5). SPA of a condo I own here in KL. Car ownership here in KL. Home address of my sister who co-owns a house with her fiance (who is a British citizen). Letter from my partner who is of European origin (has his own business), that he will be sponsoring me. Full travel insurance coverage.   Is this sufficient? If this would be a problem then should I just change my ticket to something sooner? Please advise. Thanks.

I am a Saint Lucian and will be traveling to Manchester, UK soon about which I am a bit nervous.  Run Down:   I own a small business in my country (in the Caribbean), I have a certificate mentioning the details of the business from my Government. I pay rent in my country, but I do not have any loans (I hate owing). I pay life insurance in my country. I have a US B-1/B-2 visa (Visitor & Business). I have visited the US once (last year November) on my US B-1/B-2 visa.   What I will be doing in the UK:   I plan to spend three months out of the six months which would be granted if I get leave to enter stamp. I plan to skydive in the first week and spend a few nights at an Airbnb. I plan to visit the Manchester Football Club stadium, I'm not the biggest of football fans but since I'm in Manchester, why not! I plan to do some more sightseeing and enjoy my time there. After the first week I will be staying with my female friend who owns an apartment for the rest of the time showing me around and helping me experience the UK lifestyle until June.   Why I'm leaving in June:   I am a WordPress enthusiast (I'm a Programmer) and WordCamp EU will be happening in France this year so I plan to fly from the UK to Paris where I will spend three days then take another flight from there to my country.   How my flights will be:   I will be taking a one-way Thomas Cook flight from my country to Manchester but will be purchasing my ticket for Manchester to France ahead of time so I could show Thomas Cook as well as Immigration that I don't plan to stay.   My concerns, could someone address them point by point please?:   I have a bank account but I just use it for collecting easy payments from my clients and pay for expenses. I store my savings in a credit union because of higher interest rates paid than the bank. When I applied for my US visa I showed a credit union statement showing my total balance. I'm seeing online that I should provide statements but these statements would look very bad since I my bank account is just for expenses... I mean it sometimes gets as low as $30 then, when my monthly earnings come in from clients, I withdraw savings to the credit union and leave what I need in the account for expenses. I read another post and it said people with bank statements showing poor spending might have difficulty but it's simply because the account is used for expenses not savings. For the later stages of my visit (after the first week) I will be staying with my friend. I will simply be staying with her to save on cost of Airbnbs for the next two months three weeks, even though they could be cheap, free is better right? I will be booking the Airbnb, skydiving and tours prior to traveling to the UK, will that help? Is my stay too long for staying with someone? I won't be depending on her for anything since I have my own funds...it's just convenient that she has a place where I could stay. If it is then I don't have a problem shortening my stay to 1-2 weeks and just head back to my country and take a separate flight to Paris in June.   I am nervous because I really want to visit the UK and see my friend, I am also not sure if the minimum amount of time that could be given to a visitor is six months? What if I get a round trip for two weeks and the Immigration officer gives me exactly two weeks stay, is that possible? Or is the minimum they could give six months?  Your help is very much appreciated, I want soon to try backpacking (nomad life) but I don't think my poor heart could take the stress of worrying about immigration :(  Update  Since people in the comments are asking about my relationship with the friend I plan to stay with even though she's from my country originally but now a UK citizens and we are simply friends.


My i686 with server 12.04 386 boots to a black screen.  I read a post that said I need to edit the kernel of the boot loader.  The installation went smooth except for the black boot screen.  How do I go about this, as I am lost and awash with information overload.

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:


I'm using PiTiVi to edit a long lecture, and I'd like to split it into manageable chunks, then rearrange the pieces. However, I don't see a good way to do that in PiTiVi; apparently, I would have to cut a clip out, discard everything else, and save the clip for each clip I want to extract. Is there an Ubuntu application that's designed to slice videos into clips, or an application that can do it well?

If just need to crop Audio/Video from a longer track, what can I use? I tried OpenShot, but I find the export video slow, perhaps its compling all the "layers" into a new movie? Perhaps I just need a simple "crop" tool for audio/video will surfice?


I am trying to figure out an issue for my student who is having a problem with parenting and skinning his creature. He sent me what he had and I went back and redid it by adding the bones again. When I try to parent it, the message, "bone heat weighting failed" comes up. I have tried removing the double vertices, recalucating the outside, turning on and off the x axis, rotating, scaling, turning on subsurf and I cannot figure out why it isn't working.  I also tried to skin his creature that he originally sent to me following the directions the course gives, but nothing happens and I am not sure if it is because it isn't parented correctly? When I try it doesn't select part of the body like it should.  Any help would be great!

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


Windows 10 brought new PATH environment variable editor, but for some reason, it just stopped working for me.   The odd thing is that path editor is "broken" only for system variables.. in case of User variables, the editor is fine.  System editor:    User Path editor:    As you can see, both are editing Path variable, however both use different editor. This is quite infuriating, have you ever encountered such error?

Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.


So I have a file "Directories.dat" that contains a list of directories for a script to read that runs on multiple machines. Due to this, the list of directories in the file is often defined with variables such as #Directories.Dat /home/$USER $WORKDIR $APPDIR ...etc   However, when the script runs through the file Directories.dat , $line ends up being set to /home/$USER rather than /home/myuser #!/bin/bash #myscript.sh for line in $(cat Directories.dat)  do  SomeCommand $line done  Should I not use cat? Is eval the only suitable function for doing this? example SomeCommand $(eval echo $line) #DangerZone or are there other methods to read the lines within the Directories.dat file and show the variables as their stored values?

I'm trying to put together a generic script that will check the existence of several key directories for various users on different servers. Additionally, I want to leverage each user's $HOME variable.  For eg, let's say this were true:   on server 1: jdoe's home is /home/jdoe  on server 2: jdoe's home is /opt/jdoe2 server 3 hasn't been built yet; we won't know where they build his $HOME until the server is built. on server 4: mysql's home is /opt/home/mysql   This is what I have for my important directories (ordered from most to least impt):  $ cat mylist.txt $HOME/most_impt_dir1 $HOME/most_impt_dir2 $HOME/most_impt_dir3 $HOME/misc $HOME/junk   ...I want to find the most impt dir owned by this user.   Here's what I'm trying:  for i in `cat mylist.txt` do    if [[ -O $i ]] && [[ -d $i ]]; then     echo "found it: $i"     break   else     echo "$i is not it."   fi  done   The above code does not work for anything in my list because it is literally checking for dirs beginning with $HOME. How do I get my code to use the value of the user's $HOME variable?


Consider the simplest such system: a gas-filled chamber. I understand that, were all the gas particles concentrated in one corner, the entropy of the chamber will be lower than the entropy of the same chamber but homogenized. If so, the two states do not actually represent the same macro-state, hence we will never expect particles in a homogeneous gas chamber to spontaneously segregate. This can be verified experimentally by trying to separate the gas into distinct regions, one of high pressure and another one with vacuum. The more we try to segregate, the harder it gets showing that this separation will never happen spontaneously.However, such a chamber is often [erroneously?] represented as pebbles on a board:  But pebbles remain in the segregated state indefinitely, whereas gas particles always homogenize spontaneously and always resist segregation as discussed.Therefore, can there EVER be any spontaneous fluctuations that lowers the entropy (segregate the content) of such an isolated system?

I was reading  and I got some doubts about a sentence about entropy, specifically when Ethan explains the irreversibility of the conditions of the hot-and-cold room, as in this figure:  In his words:  It's like taking a room with a divider down the middle, where one side is hot and the other is cold, removing the divider, and watching the gas molecules fly around. In the absence of any other inputs, the two halves of the room will mix and equilibrate, reaching the same temperature. No matter what you did to those particles, including reverse all of their momenta, they'd never reach the half-hot and half-cold state ever again.  My question is: Is the spontaneous evolution from the equilibrium temperature (right side of the image) to the half-hot and half-cold state (left side) physically and theoretically impossible/forbidden, or is it simply so astronomically unlikely (from a statistical perspective) that in reality it never happens? The article seems to suggest the former, but I was under the impression of the latter.


public boolean hasCapturableEnemy(Piece[][] board, int startX, int startY) {      //If the Pawn belong to the Upper Team (Faces downward)     if(board[startX][startY].getTeam() == Player.UP) {          //If a Piece exists diagonally in front of it on an adjacent tile, return true         if((board[startX - 1][startY + 1].getTeam() != Player.UP) || (board[startX - 1][startY - 1].getTeam() != Player.UP)) {             return true;         } else {             return false;         }      } else { //If the Pawn belongs to the Down Team (Faces upward)          //If a Piece exists diagonally in front of it on an adjacent tile, return true         if((board[startX + 1][startY + 1].getTeam() != Player.DOWN) || (board[startX + 1][startY - 1].getTeam() != Player.DOWN)) {             return true;         } else {             return false;         }     } }   I built a boolean function that tries to check if a Pawn chess piece has an enemy to capture. On the condition of checking whether the piece on the diagonal side of the Pawn is an enemy or not, I get a NullPointerException since I am checking for both diagonal position and one of them could be an empty location (null).  (board[startX + 1][startY + 1].getTeam() != Player.DOWN)  //This could be NULL   How can I avoid getting a NullPointerException while checking for both position and checking their member variable (Team) ?

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?


On my test server which I have docker-run gitlab-ce, redis server and some other important services, I noticed I have an uninvited guest, kdevtmpfsi. I tried everything proposed by the community but I see kind of intelligence in this one. I runs some processes under nonexisting users, it started by gitlab-+, but I killed all the processed with this user. Now, I see a different behaviour. It runs some processes under some users with numbers, 998, 997, 996, etc. All the commands they run are not existing on my machine. I don't have a local postgres, redis-server,gitlab-exporter etc. 28741 999       20   0 2873420 2.289g      0 S 331.8 29.4   1:31.19 kdevtmpfsi  Can anyone help?

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I have a date variable in the YYYY-MM-DD format.   How can I change the date value to the previous day? So if the value of the variable was 2014-01-01 it would change to 2014-12-31.

I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?


I am using Texmaker to create a document with pdflatex. When I add an image to it (no spaces in the path), it takes an approperiate amount of space, it shows a black border, however no image shows up. I get no message implicating a missing file.  In preamble:  \usepackage{graphicx} \usepackage{amsthm} \usepackage[utf8]{inputenc} \usepackage{polski} \usepackage[polish]{babel} \usepackage[nottoc]{tocbibind} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm]{geometry} \usepackage{authoraftertitle} \usepackage{enumitem} \usepackage{fixme} \usepackage{url}  \graphicspath{ {img/} }   Adding graphics:  \includegraphics[width=1\linewidth]{email-invitation}   Result:    What may I be doing wrong?  Update:  Here is a minimal working example:  \documentclass[draft]{report} \usepackage{graphicx} \begin{document} \includegraphics{test} \end{document}   Seems plain simple...

I'm using IEEEtran to format an article, and I wanted to include an image. I included the graphicx and hyperref packages, and used the following code, like normal, to include an image.  \begin{figure}[!t] \centering \includegraphics[width=3in]{fetch} \caption{Pipeline: Fetch Instruction} \label{fig:fetch} \end{figure}   What appears, however, is this:    Fetch.png is a file in the directory, and if I remove it, pdflatex errors instead of producing an output. I'm using MiKTeX 2.9 on Windows 7. Any ideas?


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I'm stumped here.The interval of integration would make me think to look for symmetry, but it's clearly not even or odd. I asked wolfram alpha to get any ideas, and it gave me a complex number as the value of the integral, which makes no sense. The graph seems to enclose a finite area in the interval, making me think it has a real finite answer. How do I solve this?

As the title states, I'm having quite a lot of trouble with the integral:  $$\int_{-\ln 2}^{\ln 2}  \frac{(\sin x+x)^{1/3}}{e^x}dx$$  The problem is that my standard (admittedly sparse) repertoire of tricks seems to have no effect at all. I can't think of any clever substitution that would work, and it looks like a nasty integral all-round.   I was hoping to apply some symmetry arguments (especially considering the limits of integration), but the exponential function is neither even nor odd, so I don't see how this would work.   I'm afraid I have absolutely no idea how to approach this.


I'm trying to use the reference of a figure, but numbering is not correct. Every  figure that I use as a reference, account as Figure 3 and I dont know why.  I'm using \documentclass{article} and this code to insert fist figure:   \FloatBarrier  \begin{figure}[!htp] \includegraphics[width=1\linewidth]{figura} \label{fig:fig2} \caption{Componentes do Sistema Elétrico} \end{figure} \FloatBarrier   And this code to call figure reference into the paragraph:  \paragraph{} Os sistemas [...] elétrica. \figref{fig2} Estes [...] pela Figure~\ref{fig:fig2}.   I inserted other figures but always referred to as Figure 3 like I show in picture.  Please, What can I do to solve this  ? =(

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I wish to communicate with a moderator concerning 4 injustified downvotes that was made on 2 of my questions and 2 of my answers. These downvotes were done in a lapse of time of 1 minute and 12 seconds at the following times: 20:57:55 20:58:07 20:58:29 20:59:07 These downvotes were done:  The two first ones , on the only two questions I've ever asked The two later downvotes , on two questions that appeared to have been upvoted today and that were consequently at the top of the list of my upvoted answers, on the right side of the display.  So they were done on the immediately visible threads appearing in my user's page. I also noticed a comment of mine has disappeared. It was among the comments appended to this question:  At 19:59 I did a question in a comment to the OP's question. It is still visible at this time. I was asking for more information on what the OP wanted to do. I received two answers in comments, one of a user, and one of the OP, that were repeating exactly the same thing that is in the OP's question. Then I did another comment saying I thought this answer was rather weird because the OP was supposing he was knowing perfectly to what amount of info it was sufficient to limit the question. And now I notice that the two answering comments of the third user and of the OP , and my last comment too, have disappeared. Conclusion: It is clear for me that these 4 downvotes done in a 1mn12secs burst have been made with retaliating intention. The fact that the downvotes were done at this speed proves that they weren't done on the basis of the reading of the content of these questions and answers. I wish to know if a moderator can examine who is the downvoter, to verify it is the OP user of the said question, and to judge and decide to remove these unjustified downvotes. I don't care a lot about points, but I feel it is intolerable that any user may downvote like that, as if using a gun. That's not an attitude that fits with the desired functioning of SO, I think. Moreover, it already happened something similar for some other answers of mine, 3 weeks ago, more or less, and I didn't say anything because I had another business to do, and also it is complicated for me to express in English. But this time, it is so evidently a bad manner that I can't let this pass without asking some advice and explanation to a moderator. Will I have the opportunity to speak with one ?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I want to write a sql query that does:   if this query (select X from table1 where x = 'value1') has result return 1 else if (select x from table2 where x = 'value2') has any result return 2 else return 0.  Thanks

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


This icon has just been constantly flashing at me since I got to the Farm. I checked with the post bot, checked for friend invites or messages, Bnet message, nothing!  Any ideas?

Since I started playing, I have seen this icon in the bottom right of my screen. Clicking it does nothing.  What does this icon represent?  I'll add a PC tag, as I'm playing on PC, and it could be related to that.


\documentclass[tikz]{standalone}  \begin{document}  \begin{tikzpicture}   \draw [-] (0, 0) edge node[above] {$\epsilon_f$} (5, 0);   \draw [<->] (1, -1) edge node[below] {$\epsilon_f$} (4, -1); \end{tikzpicture}  \end{document}   The result is :    Why does the left-end has strange arrowhead? How can I make it a normal <- arrowhead?

I am quite puzzled when drawing the connection of nodes.  \usepackage{xcolor} \definecolor{darkblue}{HTML}{1F4E79} \definecolor{salmon}{HTML}{FF9C6B} \tikzstyle{cell} = [rectangle, minimum width=1cm, minimum height=0.5cm,text centered, draw=black, fill=salmon] \tikzstyle{state} = [rectangle, minimum width=1cm, minimum height=0.5cm,text centered, draw=black, fill=darkblue] \tikzstyle{arrow} = [thick,->,>=stealth]  \begin{tikzpicture}[thick,scale=0.8, every node/.style={scale=0.8},node distance=1.5cm]     \node (0) [state] {\textcolor{white}{feature extraction}};     \node (1) [cell, below of=0] {invertBotConE2\_f48\_k1\_b4\_noskip};     \node (2) [cell, below of=1] {invertBotConE2\_f16\_k3\_b4\_noskip};     \draw [arrow] (0) -- (1);     \draw [arrow] (1) -- (2);     \draw  (0.east)  [arrow]  edge [out=0, in=0, out looseness=4, in looseness=4]  (2.north); \end{tikzpicture}   0,2 are my nodes. When east is specified, it creates an arrow on node 0. If removed, it disappears. What if I would like to put 0.south as the start of the edge?


In HOTP authentication, is there a way for a system to detect that the token has been desynchronized? If so how does it know that the OTP was generated from a desynchronized (but valid) token and is not just a fake/random OTP?

My understanding of  is that each password is unique and based on a counter.    $$PASSWORD = HOTP_1(K,C)$$  Where $C$ is an incremental counter.  What I wish to know, is how you keep the client and server in sync?  Looking at current systems (google authenticator), there appears to be no indication if the actual 'counter' number, but you can generate successive passwords at will.  What happens if, for example, the password you have generated uses $C = 5$, but the server is expecting $C = 3$?  Also, what is the 'integrity check' for?  Google cant seem to come up with a solution.


Who was the responsible for their disappearance? Are they hidden to the South maybe?

Shortly after they were defeated by the mountain of Caradhras, the Fellowship decided to go through Moria so that they could pass the Misty Mountains. One night on their way to Moria, they were attacked by a large pack of wolves. After a little while (and with a particularly powerful spell from Gandalf) they managed to push the wolves back, but in the morning they discovered something strange:  When the full light of the morning came no signs of the wolves were to be found, and they looked in vain for the bodies of the dead. No trace of the fight remained but the charred trees and the arrows of Legolas lying on the hill-top. All were undamaged save one of which only the point was left.  "It is as I feared," said Gandalf. "These were no ordinary wolves hunting for food in the wilderness. Let us eat quickly and go!" The Lord of the Rings Book 2 Chapter 4: A Journey in the Dark  If they weren't "ordinary" wolves, what were they? I understand that they were probably servants of Sauron, but what was special about them that made their bodies apparently disappear? Where did they come from?


I have a filter where I'm setting request.setCharacterEncoding("UTF-8") after fetching the parameters, for which the encoding is not set. In the process method I'm just checking if request contains any special chars which are removed.  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {     getParams(request);     chain.doFilter(new RequestWrapper((HttpServletRequest) request), response); }  private void getParams(ServletRequest request) {      HttpServletRequest httpRequest = (HttpServletRequest) request;     Map paramMap = httpRequest.getParameterMap();      Set entrySet = paramMap.entrySet();      for (Iterator iterator = entrySet.iterator(); iterator.hasNext();)     {         Map.Entry entry = (Map.Entry) iterator.next();            String s = process(entry.getValue().toString());         //entry.setValue(s);      } }   In the givencode I'm setting CharacterEncoding in the next filter in the chain.   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {     request.setCharacterEncoding("UTF-8");     chain.doFilter(request, response); }   However, if I'm setting it in first filter before fetching parameters its working fine.  So is it necessary to set CharacterEncoding before fetching the params. I'm not clear with how things are working.

I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases.  My setup is the following:   Development environment: Windows XP Production environment: Debian   Database used: MySQL 5.x  Users mainly use Firefox2 but also Opera 9.x, FF3, IE7 and Google Chrome are used to access the site.  How to achieve this?


Here is a MWE of creating a table using tabularx:  \documentclass[border=5mm]{standalone} \usepackage{tabularx} \begin{document}  \begin{tabularx}{1.0\linewidth}{X}   header 1 \\   [unit 1) \\ % Does not work.   % (unit 1) \\ % Works. \end{tabularx} \end{document}   which gives me the following error:      ERROR: Argument of \@argarraycr has an extra }.   Here is the complete log:  Running `LaTeX' on `table_line_start' with ``pdflatex  -file-line-error   -interaction=nonstopmode "\input" table_line_start.tex'' This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode LaTeX2e <2017-04-15> Babel <3.16> and hyphenation patterns for 84 language(s) loaded. (./table_line_start.tex (/usr/local/texlive/2017/texmf-dist/tex/latex/standalone/standalone.cls Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files standalone (/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifluatex.sty) (/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/usr/local/texlive/2017/texmf-dist/tex/generic/ifxetex/ifxetex.sty) (/usr/local/texlive/2017/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkvutils.tex (/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (/usr/local/texlive/2017/texmf-dist/tex/latex/standalone/standalone.cfg) (/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo))) (/usr/local/texlive/2017/texmf-dist/tex/latex/tools/tabularx.sty (/usr/local/texlive/2017/texmf-dist/tex/latex/tools/array.sty)) (./table_line_start.aux) ./table_line_start.tex:10: Argument of \@argarraycr has an extra }. <inserted text>                 \par  l.10 \end{tabularx}  Runaway argument? unit 1) \\ \endtabular  ./table_line_start.tex:10: Paragraph ended before \@argarraycr was complete. <to be read again>                 \par  l.10 \end{tabularx}  ...  (That makes 100 errors; please try again.) ./table_line_start.tex:10:  ==> Fatal error occurred, no output PDF file produced! Transcript written on table_line_start.log.  TeX Output exited abnormally with code 1 at Tue Feb 20 13:50:51   The error disappears when I replace bracket [ in front of unit 1 with a parenthesis(. Writing [header 1 causes no problems. Can anyone confirm that this is a bug?

Whenever I try to compile a table that has a "[" as first character in a row it gives me the error:  Missing number, treated as zero. Illegal unit of measure   Example:  \begin{table}[htb]     \centering     \begin{tabular}{r|r}         [some text ] & ... \\         [some more text ] & ...     \end{tabular}     \caption{...}     \label{tab:...} \end{table}   How can I print "[" as first character in a row?


$x^3+7=y^2$ find all solutions in natural numbers I tried to check  a residue of the division on $3,4,5,7,9,12,13$ I want to prove that this equation has not solutions because left part gives some residue and right part other. Actually I don't know is it true . And am I on right way of solving this problem? But I proved this for $x^3+7=y^4$ by checking residues when dividing on $13$ If I'm on right way ,can you say division of what I need to check , to get the result? If not tell me please what to do.

For what value of m does equation $y^2 = x^3 + m$ has no integral solutions?


Maybe it is a ridiculous question but I want to know exactly what is an upstream program? here in  and other debian packaging documentation mentioned  upstream program.  I want a definition to create upstream from my application.  For example is my web application which is written in java is an upstream?

What is the difference between upstream and downstream when referring to who (or where) to go to as a developer or packager?


For example, i have array of int and i need increase each element by 2. In modern c# with linq and extension methods the obvious solution is:  var array = new[] {1, 2, 3}; array.ForEach(p => p += 2);   But unfortunately, code will not compile, because ForEach is not extension method of IEnumerable, but its a member if List. So i need to use classic foreach loop or cast array to list,  but this solutions not so elegant and simple.  Can anybody tell me, why Microsoft design ForEach method as member of List, but not as extension method of IEnumerable?

Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance?


If I change the umask to 0000, I'd expect a text file to be created with rwxrwxrwx permissions (based on my understanding of the umask, ) However, when I try this, I get the following  $ umask 0000 $ touch /tmp/new.txt $ ls -ld /tmp/new.txt  -rw-rw-rw-  1 alanstorm  wheel  0 Jun  2 10:52 /tmp/new.txt   That is, execute permission is omitted, and I end up with rw-rw-rw- for files (directories are rwxrwxrwx).  I tried this on my local OS X machine, an old BSD machine I have at a shared host, and a linux server running on linode.   Why is this?  Its my understanding that umask is the final arbiter of permissions -- is my understanding of this incorrect?  If so, what else influences the default permissions of files on a unix system?

I'm new to Linux. I have been practicing a few commands. My question is about when I'm creating different files using a different umask. For example:  umask 222, as I understand it, is the same as 777 - 222 = 555, so when I create a new file (call it "newfile"), then newfile's permissions should be r-xr-x-r-x (or am I wrong?)  Whatever: "newfile" was created with r--r--r-- permissions.  My umask value in /etc/profile is:    if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then     umask 002 else     umask 022 fi   My uid is 1002.  Note: Just for the record, I've already read all the umask questions and documentation from man and I can't understand it yet.


\documentclass{article} \usepackage{listings}  \newenvironment{hello}{\begin{lstlisting}[language=sh]}{\end{lstlisting}}  \begin{document}  \begin{hello} ls \end{hello}  \end{document}   The code cannot be compiled by xelatex, the compiler is hung.  What's the root cause?

I am trying to do a new environment or command (i tried both) where i can put in the name, description and code of a Method in c++ and it gives me a new section with the MethodName, the code listed and the description below. But i am not able to use the listings environment in a new command or new environment.. Consider my MWE   \documentclass[a4paper,11pt]{article} \usepackage{listings}  \newcommand{\method}[3] { \section{#1}\label{#1} \begin{lstlisting} #2 \end{lstlisting} #3 }   \begin{document}  \method{MethodName}{Method Void MethodName()}{Description of the Method blablabla}  \end{document}   How can I fix this?   I would prefer to do it using a macro since I don't need an ending.


Say we have a particle in an infinite deep well that is $V(x)=\left\{\begin{array}{ll}0 & 0 \leq x \leq L \\ \infty & \text { elsewhere }\end{array}\right.$. The energies corresponding to various states are given as $E_n=\frac{n^{2} \pi^{2} \hbar^{2}}{2 m L^{2}}$.This means that the particle can have different energies upon different measurements. But this goes against the rule that the total energy of a system remains constant,because if I measure the energy now it's something and later on it may be something else, violating conservation of energy! Where am I wrong?

Consider a particle in a potential well. Let’s assume it’s a simple harmonic oscillator potential and the particle is in its ground state with energy E0 = (1/2) ℏω0. We measure its position (measurement-1) with a high degree of accuracy which localises the particle, corresponding to a superposition of momentum (and therefore energy) states.  Now we measure the particle’s energy (measurement-2) and happen to find that it’s E10 = (21/2) ℏω0. Where did the extra energy come from?  In the textbooks it’s claimed that the extra energy comes from the act of observation but I wonder how that could work. Measurement-1 which probed the position of the particle can’t have delivered to it a precise amount of energy, while measurement-2 might just have been passive. No doubt there is entanglement here between the particle state and the measuring device but where, and which measurement?


The mother and father are sharing the expenses for the holiday. Family of 4. For example total cost for whole family is 100 pounds. Do I put 25 pounds on each persons application or 100 pounds on the father's application? The website does not accept 0 so should I put 1 pound for the children and mother if the answer is 100 pounds for the father? Or 50 for the mother and 50 for the father as they are sharing the cost?

My family is applying for Standard Visitor visas. They are going together as a family, however each person has to fill out the form.   In the income/expenditure section of the form should they divide the cost of the trip equally among all four applications? For dependants in the family, how does one split monthly expenditure? Technically they don't have an income and rely on the head of the family to provide for the expenditures.    Has anyone else filled the forms in a similar situation?


In the Terminal, my username shows up as keegankuhn (firstnamelastname) when I want it to show kk (firstinitiallastinitial). (I want this to actually change and not just show something else!) How would I do this from my own account?

I am new to Mac.  Recently I realized something for usernames.  When I type whoami in Terminal. It returns apple. However in System Preferences>Users and Groups" there is only one user and it says "sinan". (I am suspecting this could be the real name not the username)  Shouldn't be both the same?  Can I change the username in the terminal? Would that affect anything on the system (Lion)?


I can't get my jquery function to work even when I have two pieces of identical code.  Here is the primary jquery function (i've removed the "<").  $(".spoiler").append("<button> Reveal Spoiler!</button>"); $(".spoiler button").click(function() {     $(this).remove(); });   This creates a button that is then removed when it is clicked.  Now when I do this:  $("#family-question").click(function(){     $("#answer-one").append("<button> Answer One </button>");     $("#answer-two").append("<button> Answer Two </button>");     $(".test").append("<button> Answer Three </button>"); });  $(".test button").click(function() {       $(this).remove(); });   This creates all the buttons. However if I click the button it isn't removed.  In terms of the HTML code. first one is;
          Darth Vader is Luke Skywalker's Father! Noooooooooooo!
   The second one has an ID as well as a class;
   Answer Option one
   Why doesn't it work?

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


i am creating a video uploading and downloading website but get trouble in where to store files like videos in images. I am using flask in backend and database mysql

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


import java.util.*; public class Test {      public static void main(String[] args) {          ArrayList<String> name = new ArrayList<String>();         String cond="y";          do {             Scanner n = new Scanner(System.in);             System.out.println("enter the name: ");             String value = n.nextLine();             name.add(value);              Iterator itr = name.iterator();              while(itr.hasNext()) {                 System.out.println("Names on the list: "+itr.next());             }              System.out.println("Want to continue? (Y/N): ");             cond=n.nextLine();          } while(cond=="Y");     }      System.out.println("End of Program");  }   This is the code to get the Names and store them in the list. Then it must print all those values stored in the list. Then it must ask the user whether they have some more input, if "yes" then it must get the value, store it, display all names.  But it is not working in the while loop. Can anyone explain me this?  Expected output:  Enter the name: xyz  Names on the list: xyz  Want to continue? (Y/N): Y  Enter the name: abc  Names on the list: xyz,abc  Want to continue? (Y/N): N  End of Program

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


I have a structure like ths (using IntelliJ  When I try and access items in the resources folder I get a null pointer exception: private Icon bishopB = new ImageIcon( getClass().getResource("icons/bishopb.gif") );  exception: Exception in thread "main" java.lang.NullPointerException     at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)     at chess.GUI.<init>(GUI.java:21)     at chess.ChessGame.<init>(ChessGame.java:14)     at chess.ChessGame.main(ChessGame.java:28)  when debugging it seems to be looking for the resource chess/icons/bishopb.gif

In my Java app I need to get some files and directories. This is the program structure: ./main.java ./package1/guiclass.java ./package1/resources/resourcesloader.java ./package1/resources/repository/modules/   -> this is the dir I need to get ./package1/resources/repository/SSL-Key/cert.jks    -> this is the file I need to get  guiclass loads the resourcesloader class which will load my resources (directory and file). As to the file, I tried resourcesloader.class.getClass().getResource("repository/SSL-Key/cert.jks").toString()  in order to get the real path, but this way does not work. I have no idea which path to use for the directory.


These seem to get marked as duplicate... but there is an easily available piece of information that I had to do quite a bit of perusing to find that I think most users asking would like to see:  Per the   "Users of 12.04 LTS will be offered the automatic upgrade when 14.04.1 LTS is released, which is scheduled for July 24th."  I'm only posting this in case some other frustrated user is looking for this information, and like me, is not finding it in the other answers the "duplicates" are being referred to.

What are the different ways I can use to upgrade Ubuntu from one release to another?


I got date as String in format yyyy-MM-dd  and converted to  dd-mmm-yyyy.  Now I need to add one day to my date.Because in my SQL when I am selecting data in between some dates like 27-aug-2017 to 29-aug-2017,it is showing values only for 27 and 28-aug-2017 and not for 29-aug-2017.So I need to add one day so I will get data for 29-aug-2017.  String dateto=request.getParameter("dateto");                 Date date1=null;                 try {                     date1 = format1.parse(dateto);                     temp1 = format2.format(date1);                     System.out.println(temp1);                 } catch (ParseException e) {                     // TODO Auto-generated catch block                     e.printStackTrace();                 }   My sql query  PreparedStatement psmt1=conn.prepareStatement("select * from deposit2_groupc_tja05 where Account_id =? and Transaction_Date between ? and ? order by Transaction_Date");

I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?


I have a dictionary that consists of a dictionary.dict.dz and dictionary.index files. How can I install this dictionary for use with OSX dictionary app (running Mavericks)?  It works fine with GoldenDict, but I'd prefer to have this dictionary amongst the rest.  DictUnifier, which I have used to install a few other dictionaries, doesn't recognize the file.

For quite a while now, I have been looking for English and Spanish conversion dictionaries (both ways) for Apple's native Dictionary application. So far I have not had any success.    Is there any free, decent quality solution such as "New Oxford American Dictionary" and "Dictionnaire de l'Académie Française"?   Any links or information would be highly appreciated.


I want to fetch second highest paid employee salary from each department using SQL. Example, I've 100 departments with more than 500 employees in each department. & all these data is in one table.  Table Columns: EmpNo,  EmpFirstName,   EmpLastName,    DepartmentNo,   DepartmentName, Salary  Output: EmpNo,  EmpFirstName,   EmpLastName,    DepartmentName, Salary

I'm interested in learning some (ideally) database agnostic ways of selecting the nth row from a database table. It would also be interesting to see how this can be achieved using the native functionality of the following databases:    SQL Server MySQL PostgreSQL SQLite Oracle   I am currently doing something like the following in SQL Server 2005, but I'd be interested in seeing other's more agnostic approaches:  WITH Ordered AS ( SELECT ROW_NUMBER() OVER (ORDER BY OrderID) AS RowNumber, OrderID, OrderDate FROM Orders) SELECT * FROM Ordered WHERE RowNumber = 1000000   Credit for the above SQL:   Update: See  regarding the SQL standard. Troels, have you got any links we can cite?


I have tried for 2 days to pay for ESTA application Message says “ we are unable to process your payment, please try again later” Does anyone know if there is a problem

I received a payment error during my ESTA application and still need to pay. The current application status for the last few hours shows:     THE PAYMENT STATUS COULD NOT BE DETERMINED AT THIS TIME.      PLEASE CHECK BACK LATER FOR THE PAYMENT STATUS.      Your application is not complete and will not be processed by CBP until the processing fee has been paid.      You must complete payment within 7 days.   The  says to click the payment button if have not paid, however there is no payment button, I guess because already started the payment process.  I tried creating a new application however get an error about an application already existing for my passport. The application will expire automatically in 7 days, however I leave in 5 days.    I tried calling their support number but couldn't get through, and their email support has a 2-3 week turnaround time.  Any ideas how to get the visa-waiver in time? Is there perhaps a way to cancel an ESTA application so can start a new one?


Calculate the sum of this series ?$$\sum_{n=0}^{\infty}\frac{(\frac{2}{7e})^n(-1)^n}{{((\frac{2}{7e}) n+1)}^{n+1}}=?$$ I need to calculate the sum of this series to find the integral found here


I have been thinking of how to make a "mob war" map using the theory that owned projectiles can turn mobs against each other, along with shulkers being able to act as defense turrets for those on the same team. I have tried the {ownerName} tag on projectiles to turn non-shulker hostiles against each other, but to no avail. They appear to have no effect. Is this feature manipulable without plugins? If so, how?

I want to make an arena where mobs will fight each other and a player can bet on one side or the other. For example: There are 2 skeletons in dyed armor; red and blue. Each color representing a team. When they spawn I want them to fight each and then when one dies I want it to announce which team is the winner and give the player the "money" due. I'm just not sure how to get the skeletons to attack each other without a player instigating it.


I'm going to Cuba this summer and was wondering which visa I need, based on the fact that my flight could stop in Moscow ( Russia ) and then fly to Cuba from there. I'm in Italy. Do I need 2 visa? One for Cuba and one for Russia? Do I need any other documents? Where should I get those documents? I'm Italian.

On June 29th 2015, I will be traveling for the first time to Italy from USA. I will have a 10 hour layover in Moscow Russia. My question is, do I need a visa to visit the city?


Below is an example, any help on why it's not working?  \documentclass[12pt, a4paper, oneside, notitlepage]{article} \usepackage[english]{babel} \usepackage{lipsum} \usepackage[parfill]{parskip}     \title{Title} \author{Author}                      \date{Date}  \begin{document} \pagenumbering{gobble}  \maketitle \abstract{Abstract} \clearpage  \pagenumbering{roman}   \tableofcontents  \clearpage  \listoffigures     \clearpage \pagenumbering{arabic}  \section{Introduction}  \lipsum  \section{Analysis}  \lipsum    \clearpage \end{document}

In the article class, it seems that using the abstract environment has an effect to the rest of the document. More precisely, it seems that it redefines the \linewidth, which equals \textwidth without abstract, is smaller with the abstract. My feeling is that \linewidth is redefined for the abstract environment, but the value is not reseted at the end of the abstract.  Here is a minimal example:  \documentclass{article} \begin{document} \abstract{This is an abstract. This is an abstract.}\bigskip  This is text. This is text. This is text. This is text. This is text. This is text.\\  \rule{\textwidth}{3em} \rule{\linewidth}{3em} \end{document}   The output is not the same if you comment the \abstract line or not.  Do you have the same problem as I do when you compile (if not, I will upload some PDF files to show)? Is this a (known) bug in LaTeX2e? How can we circumvent the problem?  Note: I compile with the pdflatex command, and I use pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).


I have a lot of .iso files in different directories on my computer and I want to move them all at once to some folder. What I would use for searching those file is find and mv to move it. The obvious way of doing this would be  find / -name "*.iso" | mv --target-directory=/home/ISO/   but it doesn't work. Any ideas?

I am searching for files which name which contain AAA within their path using following command:  find path_A -name "*AAA*"   Given the output showed by the above command, I want to move those files into another path, say path_B. Instead of moving those file one by one, can I  optimize the command by moving those files right after the find command?


my Sony Vaio Power Adaptor broke today and i wondering if i could replace the broken one with the Adaptor from my older Vaio, here are the specs :  Broken Adaptor : VGP-AC19V54 Old Adaptor : VGP-AC19V16  Both have an output of 19.5V but the broken one has 7.7A and the old one has 6.2A!  I hope someone here can help me cause i have no idea if this could work!  Thanks a lot

I have two laptops (same manufacture), with the same type of power connector.  However, the power supplies/transformers are slightly different.    The output on the first laptop's power supply is 15.6 V at 8.0 A. The output on the second laptop's power supply is 15.6 V at 5 A.  Clearly the voltages are the same, but the currents are different. I assume the second laptop's power supply can not be used on the first, because it can't supply enough power to the laptop.   However, can the first laptop's power supply be safely used on the second laptop?


Suppose force is applied to an end of a rod in a perpendicular direction of the rod which is resting on a frictionless surface( for example: frictionless surface of a table). It is supposed to rotate. Why will that rod rotate? To be honest I really do not understand why does it rotate in such cases. It would be a great help if anyone provides me a link or explains me this thing.

Say I have a rigid body in space. I've read that if I during some short time interval apply a force on the body at some point which is not in line with the center of mass, it would start rotating about an axis which is perpendicular to the force and which goes through the center of mass.  What is the proof of this?


Let's take a look at the amavisd-new package:  # apt-cache policy amavisd-new amavisd-new:   Installed: 1:2.10.1-4   Candidate: 1:2.10.1-4   Version table:  *** 1:2.10.1-4 500  ...   The command returns 1:2.10.1-4 as though the actual amavisd-new version is 2.10.1-4. What does the proceeding 1: mean in front of the actual version number?

When I type dpkg -l | grep xserver-xorg, I get list of installed packages and their versions:  ii  xserver-xorg               1:7.7+3~deb7u1 ii  xserver-xorg-core          2:1.12.4-6 ii  xserver-xorg-input-evdev   1:2.7.0-1+b1 ii  xserver-xorg-input-kbd     1:1.6.1-1+b1 ii  xserver-xorg-input-mouse   1:1.7.2-3 ii  xserver-xorg-video-radeon  1:6.14.4-8   I am wondering what the number  infront of the colon means, ie the number 2 in 2:1.12.4-6


Two files in one of my directories are rendered as gray on PuTTy.  Running ls -l --color=always | less shows a list with most file names preceded by ESC[01;32m  But those two files do not. The filename is preceded by the timestamp, just as in a regular ls -l command. What causes this?

I uploaded some font files to AWS (running Amazon Linux) and moved them to the /usr/share/fonts directory using a cp command in .ebextensions. When I SSH in from my mac and use ls -a, I see some files are colored differently - one set of font files is black while others are green. I'm curious what caused this to be so, and if it will create any problems for my code.   From  I found this key on how to interpret these colours. I can't understand why a .ttf would be executable or why one set of .ttfs would be recognized and not another.  Blue: Directory Green: Executable or recognized data file Sky Blue: Linked file Yellow with black background: Device Pink: Graphic image file Red: Archive file  These files were all downloaded to a mac from various font sites before uploading.


If we can see billions of light years into space how do we know we're not looking at our galaxy in the past?

There is a possibility for our universe to be the surface volume of a (higher-dimensional) hyperspace. So if this possibility is true,then is there also a possibility that the other galaxies we see are our own galaxy after light has completed revolution around the three dimensional boundary (surface volume).  Know that we see different shapes for different galaxies.This can be perhaps due to other reasons like-   distance light travelled, the angle through which we look to see the other galaxy (possibly Milky Way) after     it made any number of revolutions, the part of the other galaxy (possibly Milky Way) which we see,and some other properties of light and space.   Only our Milky Way galaxy is just one possibility  Another possibilities are the number of galaxies are far less than we see because we see the same galaxy several times due to curved space.  Any possibilities for the above statements to be true?


Would I use 'was' or 'were' here?     She laughed as though there was/were a chance he might have said anything else.   (I read about the difference between was and were, but I can't apply it to this sentence because it seems like both a past possibility and a hypothetical, like a past hypothetical. Could someone explain the answer to me please?)

You can place the script in the head or body as you like. The   script will behave as if it was located exactly where you put the   script tag in the document.   The sentences above are taken from  (at the very bottom). I think they made a grammatical mistake here: it should be behave as if it were rather than it was. I'm not 100% sure, so want to confirm it.


for two positive numbers $a_1 < b_1$ define recursively the sequence $a_{n+1} = \sqrt{a_nb_n}, b_{n+1} = \frac{a_n + b_n}{2}$. Show that $a_n, b_n$ converge to a common limit. Hint use inequality: $\sqrt{ab} \leq \frac{a+b}{2}$  attempt.   Suppose $a_n\longrightarrow L_1$ and $b_n \longrightarrow L_2$  using the hint:  $$\lim_{n \to \infty} 4a_nb_n < \lim_{n \to \infty} (a_n + b_n)^2$$  by properties of limits:  $$4(\lim_{n \to \infty} a_n)(\lim_{n \to \infty} b_n) <(\lim_{n \to \infty}a_n +\lim_{n \to \infty}b_n)^2$$  $$4L_1L_2 \leq (L_1 + L_2)^2$$   $$0 \leq (L_1 - L_2)$$ after taking the square root from each side.  Then this implies  $$L_2 \leq L_1$$  Since there is an equality in the less than equal to expression then the limits can be equal and as such they converge to a common limit.  I didn't have any ideas of what else to try hopefully I was not reckless with my attempt.

I am given this problem: let $a\ge0$,$b\ge0$, and the sequences $a_n$ and $b_n$ are defined in this way: $a_0:=a$, $b_0:=b$ and $a_{n+1}:= \sqrt{a_nb_n}$ and $b_{n+1}:=\frac{1}{2}(a_n+b_n)$ for all $n\in\Bbb{N}$    To prove is that both sequences converge and that they have the same limit. I don't know how to show this. I have spent 2 hours on this, no sign of success


I have a question regarding dual spaces.  We know that the dual space of $\ell^1$ is isomorphic to $\ell^\infty$, and the dual space of $c_0$ is isomorphic to $\ell^1$. Here $c_0$ refers to the normed space of sequences of (real or complex) numbers that converge to $0$, and the norm is induced by the sup norm of $\ell^\infty$.  How do I show explicitly that the canonical mapping for $c_0$ is not surjective?  Kindly provide the details as I am new to functional analysis.  Thank you very much for the response.

Consider the Banach space $X$ of null sequence whose elements are complex sequence which converges to $0$. In addition the norm is defined as $$\|(a_1, \dots, a_n)\| := \sup_n |a_n|.$$ Show this space is NOT reflexive. Recall that the dual of $X$ is $l_1$. Also use the following fact. If $X$ is reflexive space and $(x_n)$ is a sequence in $X$ and for all $\psi \in X^*$, the sequence $\psi(x_n)$ has a limit in $\mathbb C$, then $x_n$ converges weakly to some $x \in X$.   Suppose that $X$ is reflexive. Consider the sequence $$u_n = (1, \dots, 1, 0, \dots) \in X,$$ where first $n$ entries are $1$. Then for any $y \in l_1$, we have $$y(u_n) := \sum_n y_n\times u_n = y_1+\dots+y_n \to \sum_n y_n < \infty,$$ since $y$ is absolutely convergent. Now it is only left to show that $u_n$ does not converges weakly to some $u \in X$ which I guess is $(1, 1, \dots)$. That is, for all $y \in l_1$, $$y(u_n) \nrightarrow y(u).$$ However, this seems correct to me. Where did I make mistake, please? Thank you!


I am stuck at this integral. Can anybody help or give me a hint what to do? I have tried to use integration by parts but keep getting stuck. $$\int_0^\infty \frac{\sin(2x)}{e^x}dx$$

I'm trying to solve the integral of $\left(\int e^x\,\sin x\,\,dx\right)$ (My solution):  $\int e^x\sin\left(x\right)\,\,dx=$  $\int \sin\left(x\right) \,e^x\,\,dx=$  $\left(\sin(x)\,\int e^x\right)-\left(\int\sin^{'}(x)\,\left(\int e^x\right)\right)$  $\left(\sin(x)\,e^x\right)-\left(\int\cos(x)\,e^x\right)$  $\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(\int-\sin\left(x\right)\,e^x\right)\right)$  $\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(-\sin\left(x\right)\,e^x-\int-\cos\left(x\right)\,e^x\right)\right)$  I don't know how to complete because the solution gonna be very complicated.


Let $R$ be a ring with unity $1_R$. Suppose $S$ is a subring but it does not contain $1_R$. But still it may contain a subring unity $1_S$. For example $R=M_2(\mathbb R)$ and $S$ be the set of all matrices with first entry in $\mathbb R$ and the rest three $0$. Then the element with first entry $1$ and rest three zero is identity of $S$. Why is this happening?It seems a bit weird to me. We can also take the example of $\mathbb Z_6$ and its subring $\{0,3\}$.  I have searched for the answer to this question in stack exchange but the answers, although they have no problem, is out of my scope of understanding as I am a beginner of Ring theory.

Is there an example of a ring $R$ with unity and a nontrivial subring $J$, such that $1_J \ne 1_R$?


If String is a class just like any other, how can it be initialized using double quotes?

While looking at online code samples, I have sometimes come across an assignment of a String constant to a String object via the use of the new operator.  For example:  String s; ... s = new String("Hello World");   This, of course, compared to  s = "Hello World";   I'm not familiar with this syntax and have no idea what the purpose or effect would be.  Since String constants typically get stored in the constant pool and then in whatever representation the JVM has for dealing with String constants, would anything even be allocated on the heap?


When there are multiple viewports active in the UI, it seems that some settings apply per-viewport, while others apply globally.  Examples of per-viewport settings:   shading mode (wireframe, solid, rendered, etc...) transform manipulators Visible layers (after finding the "unlock camera and layers" button)   Examples of global settings:   Object interaction mode (i.e. object mode, edit mode, weight paint, etc..) Pivot point Edit mode's selection type (i.e. vertex, edge, or face) Edit mode's visible/hidden vertices/edge/faces   Is there any way to get the global settings applied per-viewport? For example, could one get one viewport in edit mode while another is in object mode? Is it possible to have one viewport in edit mode selecting vertices, while another is selecting faces?

How can I show different layers in separate windows? For example, show layer 1 and 2 in one window, and show layer 3 and 4 in another window?  I need this so I can see everything I am doing correctly since I do have a messy rig.


This question has been asked before but the answer was inconclusive.   Moving to Florida was my personal decision. My employer agreed to let me continue in the same job working remotely.  NYS tax for the 2015 was withheld by my employer but unemployment insurance was paid to FL. Is this correct or incorrect?

I have been down in Florida for the past 3 1/2 years and continue to pay New York state taxes out of the money I earn for a company I work remote for that is in New York.  Should I be paying New York state taxes on this income?  Or do I not need to pay New York state tax because I live in Florida?  Our NY accountant says I need to continue to pay since company is out of NY, however others say I don't need to pay.  Pls advise which is correct. Thank you.


One of the principles of General Relativity is that test objects follow a geodesic unless otherwise acted upon by a force. From this perspective, it is clear that physicists, consciously or unconsciously, view the Pauli Exclusion Principle (PEP) as a force, since it is intrinsically involved in the processes that prevent us, for example, from following a geodesic through the earth's surface. If this interpretation is considered incorrect, so be it.  There are other instances where physicists treat PEP as a force. Semantic arguments aside, PEP is in fact a repulsive phenomenon that that keeps fermions from occupying the same state. It behaves like a de facto force, and can be overcome by sufficient pressure. What is the mathematical form, in terms of $r$, of PEP repulsion? Have experiments been done to determine this?  Regarding the fall-off with $r$: note that one electron approaching another electron must "know" at some distance that it is being repulsed; the two electrons need not come in contact.  [Author's note: Since several readers claim this is a duplicate question, official forum guidelines require I explain why it is not. First, I see nowhere else the question as to the mathemetical form of the EFFECTIVE repulsive force f(r). Thus, the question is new on this forum. Second, whether PEP repulsion is a "true" force, a "fundamental" force, or a "pseudo" force is a matter of semantics, discussions of which do not answer the question. In any case, PEP repulsion is an EFFECTIVE force, and therefore in principle can be described by some function f(r), even if only statistically.]

It is commonly stated that there are four fundamental forces, or interactions, in nature. It is natural to consider which of those is responsible for the normal force we meet in elementary physics. What is the nature of the force exerted on a body by the floor on which it rests?  Of the four forces, the only one that seems relevant is the electromagnetic force, and I always assumed the repelling force in question is ultimately the EM one. The Wikipedia article on  seems to agree:     Molecular and quantum physics show that the electromagnetic force is the fundamental interaction responsible for contact forces.    An alternative explanation is that the force results from Pauli's Exclusion Principle; however, reasonable as it may seem, it doesn't seem to answer the question of what force is actually at play here. The exclusion principle isn't a force, or at least it's not normally described as such.  I've recently come across a rather forcefully presented argument that states that the normal force is a macroscopic force that is not directly reducible to the EM force, or to any of the other forces; rather, it does indeed result from Pauli's Exclusion Principle by way of interaction of electron wave functions. The argument further claims that attempts to correct the Wikipedia article have met with the usual "source needed" objections, and that this topic is either misunderstood by or poorly covered in the standard texts.  (The argument can be found ).   Which way is it?


How do I check if my Windows 8/8.1 is home or professional ? In control panel > system it just says Windows 8.1 Single Language.

I have searched everywhere but cannot find how to tell which version of Windows 8 I am running.  I have the system properties on the screen but it just says "Windows 8," nothing else.  Is this the standard edition?  EDIT 04142015:  My new favorite way to do this is to go to the commnand prompt and issue (same with Windows 7):    wmic os get caption  Response:  Microsoft Windows 8.1 Pro


Here is the code:  #include <iostream> #include <math.h>  double f(double d) {     double num1 = d*sqrt(5.0);     double num2 = sqrt(5.0*d*d+4.0);     double phi = (1.0 + sqrt(5.0))/2.0;      return log((num1+num2)/2.0)/log(phi); }  int main() {     double double_val = f(8);     std::cout << "double_val: " << double_val << std::endl;     int int_val = static_cast<int>(double_val);     std::cout << "int_val: " << int_val << std::endl; }    results in the following output:  double_val: 6 int_val: 5   This surprised me greatly. Why would a double printed as 6 sometimes get casted to an integer which is printed as 5?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?