Does a "backwards" choice function imply the Axiom of Choice?

One of my favorite formulations of the Axiom of Choice is that for any nonempty family $A$ of nonempty sets, there is a choice function $F\colon A\to\cup A$ such that $F(X)\in X$ for each $X\in A$.   Using this, I was able to prove that there is also a function $f\colon\cup A\to A$ such that $x\in f(x)\in A$ for all $x\in\cup A$. I did this by considering any $x\in\cup A$, and letting $B_x=\{X\in A\mid x\in X\}$, and then letting $C=\{t\in\mathscr{P}(A)\mid \exists_{x\in\cup A}t=B_x\}$, i.e. $C$ is the set of all $B_x$. Now each $B_x$ is nonempty, so there is a choice function $F$ such that $F(B_x)\in B_x$ for each $B_x$. Defining $f(x)=F(B_x)$, I have $x\in f(x)\in A$ for every $x\in\cup A$. I suppose this is what I mean by a "backwards" choice function, even though it's not really one.  Is this equivalent to AC? That is, if for any set $A$, there exists a function $f\colon\cup A\to A$ such that $x\in f(x)\in A$ for all $x\in\cup A$, then AC holds? I couldn't immediately see a way to imply the Axiom of Choice, in any equivalent formulation assuming that the above is true for any set $A$. Is it just a one way implication? Thanks.


Script for login in multiple servers and execute commands and append output in one file

I got the task of logging into some 300 devices, execute the following commands and then copy the output into one file.  I can use SSH as a login method and I can give a predefined username and password.  Once we are in the device I need to log into expert mode and provide the predefined password.  $ expert >>> provide password  $ lspci | egrep -i --color 'network|ethernet'   Copy the output to file  I prepared the following script:  #!/bin/bash    username=XXXX passwd=XXX cd /tmp  for host in `cat servers.txt`;  do  ssh $username@$host $passwd;  expert  echo "### $host ###" >> output.txt  lspci | egrep -i --color 'network|ethernet' >> output.txt  done   After prompting for the password, it gives me following:  Running commands is not allowed ./fibertest.sh: line 9: expert: command not found    It seems like it is not running the command on the remote, but on the local machine.


Return an array of evenly distributed points on a sphere give Radius and Origin.

Given a sphere of radius $r$, and origin $x,y,z$ what is the simplest way I can generate an evenly distributed array of points on the sphere $(x_1,y_1,z_1),(x_2,y_2,z_2),\cdots(x_n,y_n,z_n)$.  Note I will be writing this as a function in Javascript, if it is any help.  EDIT  Essentially, I want to create a perfectly symmetrical shape with $X$ number of vertices that fits perfectly inside a sphere with radius $R$.


i am trying to lock a certain text file with PERMISSION, and that the program and only the program could access the file & reading & changing it. even when the program is not wokring!  I've tried doing this with lockfile method but it locks the file while you are writing to it, and it is not what i need, also tried to change permission with os.chmod but i dont fully understand how it works even tho i looked up. I've tried something like that  os.chmod(stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)


I'm a newbie using QGIS 2.12 and I'm trying to split a line in QGIS and place points every x meters. There is a tool in ArcGIS (divide by length add in). How to achieve this in QGIS?


Rotgarth the Orc Barbarian wants to break Anne the Purple Dragoon's halberd (he's probably tired of all those polearm master's AoO).  Looking up the , Rot can see that the halberd's shaft is:   Made of wood (AC 15)  Medium sized (some 8' long maybe?) Probably Resilient (18 HP) those cormyrian halberds are made to last. ...   Rot is really excited. The halberd shaft probably won't resist a couple blows from his greataxe, specially in his raging hands. Grummsh be glorified, but...  How does one goes about attacking an object in possession of an enemy?


When $x=2$ in the infinitely continued fraction $x+\frac{1}{x^2+\frac{1}{x^3+\ldots}}$, what algebraic value does it converge to?

Say you have the infinitely continued fraction: $$x+\cfrac{1}{x^2+\cfrac{1}{x^3+\cfrac{1}{x^4+\ddots}}}$$ When $x=1$, you can see that it's $$1+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{1+\ddots}}}$$ which converges upon the golden ratio $\phi = 1.61803398875...$. What if I were to plug in $x=2$? $$2+\cfrac{1}{4+\cfrac{1}{8+\cfrac{1}{16+\ddots}}}$$ Using a caluclator, it seems to converge upon the irrational number: $2.24248109286...$ Is there any way I can represent this irrational number algebraically?


Where are these maze-like noise patterns coming from in this tit photo?

I was just editing some tit photos I made on our balcony, and I found really strange patterns of noise over the bird's feathers:  The photo is from Nikon D5600, settings 85mm F4.0 1/1000 ISO 160 These are individual pixels exported from RAW and even if I went all the way to the beginning of my edit history, these patterns are still there. Is this an error in demosaicing, or is it a feature of the photo? I can provide the RAW file but I am not sure where to upload it. I am using darktable, if it's software related, it the cause might be there. I would like to get rid of these. RAW file:


Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException error

i'm completely new to any sort or applet programming and my code is really rough. Currently i am making an applet that allows you to learn about different countries based on what continents they are in. It's really simple stuff but i am still struggling. Currently i am receiving the error   Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException  at Culminating1.instructions1(Culminating1.java:69). This line is a simple g.setColor(Color.yellow);.   My codes really rough and needs a lot of work so any kind of help is appreciated.  Here is the rest of my code. Thanks a lot!  import java.applet.*; import java.awt.*; import javax.swing.*; import javax.swing.JComponent; import java.awt.Color.*;  public class Culminating1 extends Applet {      private Image world, destination, globetrot, rice;      private Button africa, americas, asia, europe, instructions, japan, china, qatar, uae,   thailand;  private Graphics g = null;      public void init() {          this.setLayout(null);         asia = new Button("Asia");         africa = new Button("Africa");         europe = new Button("Europe");         americas = new Button("Americas");         instructions = new Button("Instructions");         add(asia);         asia.setBounds(10, 120, 65, 25);         add(africa);         africa.setBounds(10, 190, 65, 25);         add(americas);         americas.setBounds(10, 260, 65, 25);         europe.setBounds(10, 330, 65, 25);         add(europe);         instructions.setBounds(10, 410, 65, 25);          add(instructions);         world = getImage(getCodeBase(), "world.gif");         destination = getImage(getCodeBase(), "Destination2.png");         globetrot = getImage(getCodeBase(), "GlobeTrot.png");      } // init method       @Override      public void paint(Graphics g)       {          g.setColor(Color.orange);         g.fillRect(0, 0, 1000, 1000);         g.drawImage(world, 200, 100, 300, 300, this);         g.drawImage(destination, 150, 425, 450, 80, this);         g.drawImage(globetrot, 150, 10, 450, 80, this);      } // paint method      @Override     public boolean action(Event e, Object o) {         if (e.target == instructions) {             instructions1();         } else if (e.target == asia) {             asia();         }         return false;     }       public void instructions1() {         JFrame jp1 = new JFrame();         Culminating1 a=new Culminating1 ();         jp1.getContentPane().add(a, BorderLayout.CENTER);         jp1.setSize(new Dimension(500,500));         jp1.setVisible(true);          g.setColor(Color.yellow);         g.fillRect(0, 0, 1000, 1000);         Font f;         f = new Font("Broadway", Font.PLAIN, 20);         g.setFont(f);         g.setColor (Color.black);         g.drawString("Welcome to Globe Trot!", 200, 20);         g.drawString("In this game you will learn about countries around the world.", 200, 40);         g.drawString("First choose an area of the world,", 200, 80);         g.drawString("then at random a well known landscape will appear.", 200, 120);         g.drawString("Your goal is to guess the country where the landscape is from.", 200, 160);         g.drawString("If you are unable to guess after 10 seconds a flag will appear", 200, 200);         g.drawString("from the same country. You have one minute to guess the country", 200, 240);         g.drawString("before you move onto the next country. There are five in total", 200, 280);     }   } // Test class


Map Ctrl+P to another key programmatically

I want to map the key command Ctrl+P to a single key so that I can label it for easy access for our Kiosks. I would in particular like a way to do this programmatically via command line. This is going to be for our Kiosk machines we run on Pis. Frankly, I thought that would be very easy, but I seem to be having a very difficult time finding a simple way to do this.   Any guidance, suggestions would be very much appreciated.   This is specifically in raspbian using ubuntu-mate, although I am not booting into a full desktop, only using metacity.   I would like to program another key (Right Shift, Print Screen, Home, not sure which key yet) to deliver the Ctrl + P command sequence. For example, if I decide to use the Home key, when I press home, I want to bring up the print dialog.


remove numbers from filenames in Mac OS X

I have a directory full of files with names in this format (with numbers as the start of each filename):  102_file.txt 104_list.txt 242_another_file.txt   I would like to rename them as follows (i.e. removing the numbers):  file.txt list.txt another_file.txt   Can anyone suggest a way to do this (presumably from the terminal)?


Force IE to open local files in the Intranet zone / trusted sites

Is there a way to add all local files (C:\... or file://) to Trusted sites or to be recognized as from the Intranet zone? Inetrnet Explorer (11 if that matters) treats them as being in the Internet zone for which I want to keep Protected mode turned on but that causes various issues to the site I'm trying to debug locally.  There is a trick with adding  <!-- saved from url=(0014)about:internet -->   to the HTML file but it would be hugely inconvenient to do that for every local file. Is there a better way? Possibly some wildcard path to add to Trusted sites or something like that?


How to display the names of my SQL Server tables in a listbox using vb.net?

I want to show the names of the tables I have in my SQL Server database in a listbox using vb.net.  I tried this but it's not working:   connetionString = "Data Source=ABDELOUAHED;Initial Catalog=table_creances;integrated security=true"  connection = New SqlConnection(connetionString)   sql = "select * from table_creances"   Try         connection.Open()         adapter = New SqlDataAdapter(sql, connection)         ds.Clear()         adapter.Fill(ds)         connection.Close()         ListBox1.DataSource = ds.Tables(0)     Catch ex As Exception         MsgBox(ex.ToString)     End Try   table_creances is the name of my database.  Any help is very appreciated.


How to determine the equation and length of this curve consistently formed by the intersection of Circles

Consider a Point $A$ that moves linearly on the positive $x$-axis with the velocity $1$ m/s and another Point $B$ at a distance $L$ from $A$ with position $(L,0)$. With each forward motion of point $A$ the Point $B$ moves in an arc upward (i.e. along positive $y$-axis) consistently maintaining the distance $L$ from point $A$. As soon as Point $A$ reaches $x=L$, the Point $B$ is perpendicular to Point $A$ and its position is $(L,L)$.  How do you then determine the equation and length of the path that $B$ traces during the period $A$ traverses from $x=0$ to $L$?


Computing Minima for degree 8 polynomial

Is there any better method than derivative or trial and error to calculate minima of $$f(x)=x^8-8x^6+19x^4-12x^3+14x^2-8x+9$$  The minima occurs at $x=2$ and $f(2)=1$  We were given option too $-1,9,6,1$ if that helps


I am still running Ubuntu 13.04, how should I react to the Heartbleed Bug?

I know that 13.04 is affected (or at least my installation is) because of the OpenSSL version currently installed. However, after running  sudo apt-get update sudo apt-get upgrade   I checked my OpenSSL version and it was still an unpatched build.  I also checked  and 13.04 isn't listed. What can I do to patch OpenSSL on my machine?


Why isn't my Used + Avail equalling the total space in my partition?

I'm using Ubuntu 14.04.  I have purchased an additional partition in my hosting environment hta tis supposedly 100 GB.  However, when I check the space of that partition, I see something odd  myuser@myproject:~$ df -h /mnt/volume-nyc1-01/ Filesystem      Size  Used Avail Use% Mounted on /dev/sda         99G   93G  730M 100% /mnt/volume-nyc1-01   Shouldn't the Used + Avail equal the total size?  If not, how do I figure out where the rest of the space is getting used?


Is current able to flow through a Capacitor at DC?

Can someone clarify whether or not a capacitor blocks current at DC?         – Schematic created using


I have seen a lot of topics being closed because they are somehow asking for advice rather than a programming question.   Do you think it would be useful if there was a stackexchange community that gives quick advice for beginners ?  Or just a few articles that would help beginners with getting started.


How to create a "function that returns a function and splits csv file"?

I'm learning JS and I need help with the following task:  I need to create a function compile_csv_search(text, key_name) that parses text in the CSV format. (not required to handle quoting and escaping in values; assume field values never contain commas or other special characters.)     A function must return a function that looks up a record by a value of the   field specified as the second argument to compile_csv_search. Assume that all   values in the key field are unique.   Sample usage:  var csv_by_name = compile_csv_search(     "ip,name,desc\n"+     "1.94.0.2,server1,Main Server\n"+     "1.53.8.1,server2,Backup Server\n",     "name"); console.log(csv_by_name("server2")); console.log(csv_by_name("server9"));  ...will print:  {ip: "10.52.5.1", name: "server2", desc: "Backup Server"}   undefined  ** I didn't understand what does it mean "function that return function". How can function return another function?  Thank you!    P.S. attaching my solution for your review  function compile_csv_search(csvServerData){   var header = csvServerData.split('\n')[0].split(",");   var spleatedServerData = csvServerData.split('\n');   return function(serverName)   {   for(var i = 1; i < spleatedServerData.length; i++){         var singleServer = spleatedServerData[i].split(',')           var result = {};         var exist = false;         for (var j = 0; j < header.length; j++) {             if(singleServer.indexOf(serverName) == -1)                    break;                exist = true;             result[header[j]] = singleServer[j];            }         if(exist){          return(result);          break;          }      }  } } var csv_by_name = compile_csv_search(     "ip,name,desc\n"+     "10.49.1.4,server1,Main Server\n"+     "10.52.5.1,server2,Backup Server\n");


How would you rule a situation where creature is being held in place (grappled) by more than one creature.  For example, 2 prison guards holding a prisoner still for a beating?    If the held character tries to break free, do they roll separately to break each grapple?  Can they try to break free from both on the same turn?


Using lambdas to extract an Object attribute contained in an ArrayList

I have made a class called User with two string attributes: Login and Password.  I have a database (userList, of type ArrayList<User>) with all the existing users, and I want to know if a login is already used or not.  I tried to use lambda expressions in order to do that, but it doesn't work:  ArrayList<String> loginList = null; userListe.forEach(x->loginList.add(x.getLogin()));   How do I solve this?


Suppose I fix $n$ and let $\sigma_k$ represent the $k$th permutation of $S_n$ with respect to  some ordering (whatever ordering might serve my purpose). Is there an elementary formula for $\sigma_k(i)$ which requires only $i, k,$ and $n$?  Is one known for small $n$, perhaps even as small as 4?


Show that if $A \oplus B = A \oplus C$, then B=C

Prove that if $A \oplus B = A \oplus C$, then $B=C$  Note: $ A\oplus B= (A \cup B) \setminus (A \cap B)= (A \setminus B) \cup (B \setminus A)$  This is what I have done so far:   Claim: B=C  Proof: Case 1: show that $B \subseteq C$  Case 2: Show that $C \subseteq B$  Case 1: Let $x \in B$, either $x \in A$ or $x \notin A$.   If $x \in A$, then $x \in A \cup B$ $\Rightarrow x \in C \cup A $ (because $A \oplus B = B \oplus A$) Hence, $x \in C \setminus A \Rightarrow x\in C$.   If $x \notin A \Rightarrow x \in B\setminus A$. Hence, either $ x \in A \setminus C$ or $ x \in C \setminus A $. But, $ x \in C \setminus A$ since $ x \notin A$.   Is this thinking process correct? Any help is appreciated.


How to upgrade Vim 7.2 to 7.4 latest on Red Hat 6.6 the easiest way?

I'm a Vim user, and usually I just install vim via a one liner "apt-get install vim", but for red hat how can I update the 7.2 version to 7.4 with a one liner?  I googled it and many places tell me to compile my own vim 7.4, but i'm really not confident on how this works and where does it even get stored? what is the program files folder equivalent in redhat? why isn't there a one liner to just upgrade to vim 7.4 without having to compile stuff like this.


Is this partition axiom equivalent to axiom of choice over ZF?

Suppose we add the axiom to ZF that for any set $S$, and any partition $P$ of $S$, the cardinality of $P$ is less than or equal to the cardinality of $S$. It is known that the axiom of choice implies that axiom. My question is, is the converse true? Or are there models of ZF where that axiom holds but the axiom of choice doesn't?


Nested sequence of sets in Hilbert space

How can I prove that nested sequence of non-empty bounded closed convex sets in Hilbert space have nonempty intersection?  I just don't know where to start.  Thanks


Is playing D&D 5e with two people feasible, particularly with the Starter Set adventure?

My girlfriend and I want to get into roleplaying games, we've both been interested in trying out Dungeons and Dragons. She has never played a pen and paper RPG before, I've played the Swedish Drakar och Demoner (DoD) once in school. We don't have a group yet, so we thought we'd start out with just the two of us.  We've bought the D&D Fifth Edition Starter Set, but I'm not sure how well the game will work with one of us as the DM and the other as a player (I will probably be the DM for our first campaign). Is this feasible? Will the example campaign in the box work well enough for us to get started? How can we get started playing one-on-one 5e effectively?


Visa: travelling from Italy to Cuba through Russia

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.


Neural networks: Why is is neccesary to shuffle the inputs in each epoque?

Why is is neccesary to shuffle the inputs in each backpropagation of each epoque? What happens if they are not shuffle?


If I have a light that is flickering at a frequency low enough to be perceived by the human eye, is there any type of material that exists that will smooth out the appearance of flickering? Similar to how a capacitor smooths the output of a rectifier?


$f$ is continuous function from $ [0,1]$ to itself and f(0)=0, f(1)=1 and $f(f(x))=x$ then show that $f(x)=x$ on$[0,1]$

If $f$ is continuous from $ [0,1]$ to itself and $f(0)=0$, $f(1)=1$ and $f(f(x))=x$ then show that $f(x)=x$ for every $ x $ in the domain of function.  I'd like to prove this statement, my idea goes like below:  Suppose that the converse of the statement holds. then without loss of generality, assume that there exists some $c$ in $[0,1]$ such that $d=f(c)>c$. By symmetry, $f(d)=f(f(c))<f(c)=d$. And $f$ is bijective because $f$ has an inverse function in this domain. So $f$ should be strictly increasing function. But on $[c,d]$, $f$ is decreasing. This is a contradiction.  So it should be that $f(x)=x$ on $[0,1]$.  Is this argument right? And I'd like to know another argument which prove this statement. Thank you for your answer in advance :)


User password rejected on login screen but accepted on text console login

While updating 13.04 Raring Ringtail on a fresh installation my system froze. On reboot I am unable to log in on the graphical screen. CTRL-ALT-F2 takes me to the command line where the login works correctly. I then completed the "sudo passwd" process with positive results. On returning to the graphical screen I saw no change in accessing the account. I suspect something was corrupted during the crash. I'm too new at UBUNTU to know where to look, much less what to do in order to straighten out whatever was broken.  All advice, step by step instruction, etc. much appreciated. My fall back is to reinstall the OS from scratch as it's a new system. Which is more efficient, fix or reinstall?  Thanks.


Why is the rank of this matrix $2$ (solved, thanks)?

$$A= \begin{pmatrix} 1 &2  &3 \\  0 &6  &4 \\  0 &3  &2  \end{pmatrix}$$  "Rank is the highest possible number of linearly independent column / line vectors."  (I hope I have translated correctly?)  Now using that, I see that line 2 and 3 are multiples, thus they are linearly dependent. But line 1 isn't. Rank is 1.  That was about line vectors.  Looking at column vectors, there are no linearly dependent vectors, since no multiples. Rank is 3.  But what is the rank now? Shouldn't the number of linearly dependent / independent in both line / column vectors be equal?  So what is the rank of this matrix now? I'm very confused. Or is the definition wrong?


I am a bit confused regarding how car moves. Following is the explanation which I've come up with after reading but I would like if someone verifies and corrects it.     If a car is moving, the rotation of it's tyre will exert a backward force on the road. Due to newton's third law, the road also exerts a force on the tyre. The force will be in the forward direction. This force causes the tire and hence the car to move forward.


I want to have a figure with subfigures like this:    I tried to use \usepackage{subfig} but I get an error: ! Package subcaption Error: This package can't be used in cooperation(subcaption) with the subfig package.


How to solve "Unable to find expected entry 'restricted/binary-1386/Packages' Wrong sources.list entry or malformed file"?

I'm a new user of Ubuntu 13.10.  I recently tried to resolve a Skype installation issue and added some PPA involving binary-1386.  Every time I run sudo apt-get update, I get the following error:  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/saucy/Release  Unable to find expected entry 'restricted/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/saucy/Release  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) ... ... E: Some index files failed to download. They have been ignored, or old ones used instead.   I have spent the last two hours trying to resolve this issue, and made changes to my sources.list file by resetting to.the default saucy settings, but these errors are still occuring.  I've also unchecked everything in Software and Updates section, but this still seems to appear.  The error messages seem to be related to the 'binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file) issue as shown above.


In a string of comments, including junk, should I flag the individual comments, or leave a custom flag on the post?

A  on  made a  about flagging comments. The part of it I'm questioning is:     If there are more than one comments that should be removed, don't flag them individually because that can make it difficult to see what's what. When viewing a post, moderators see an overlay with the flags on that post. If there are multiple flags, the overlay can obscure the post itself. Instead, flag the post and leave a custom message explaining which comments can be removed and why.   That seems very inconvenient for the flagger, especially if there are a lot of comments.  If the above is only personal preference, shouldn't it be marked as such, rather than as part of the guideline in the post?


ConcurrentModificationException while removing duplicates in collection

I have a function to remove the duplicates in a collection.  /** Remove the duplicates **/ private List<Topic> removeDuplicateEntries(List<Topic> mlist) {      List<Topic> allEvents = mlist;     List<Topic> noRepeat = new ArrayList<Topic>();      for (Topic event : allEvents) {           boolean isFound = false;           // check if the event name exists in noRepeat           for (Topic e : noRepeat) {                 if (e.getUserId().equals(event.getUserId())){                     isFound = true;                     break;                 }            }            if (!isFound) noRepeat.add(event);     }      return noRepeat; }   Whats happening is sometimes I get the error   java.util.ConcurrentModificationException    at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)    at com.sttarter.communicator.CommunicatorDBHelper$1.run(CommunicatorDBHelper.java:54)    at java.lang.Thread.run(Thread.java:818)


Is it possible to put commands in /etc/motd?

Can I put shell commands in the /etc/motd login banner file? I have tried:   $(uptime)   and  `uptime`   Is this possible?


In a family with two children, what are the chances, if one of the children is a girl, that both children are girls?  I just dipped into a book, The Drunkard's Walk - How Randomness Rules Our Lives, by Leonard Mlodinow, Vintage Books, 2008. On p.107 Mlodinow says the chances are 1 in 3.   It seems obvious to me that the chances are 1 in 2. Am I correct? Is this not exactly analogous to having a bowl with an infinite number of marbles, half black and half red? Without looking I draw out a black marble. The probability of the second marble I draw being black is 1/2.


Looking for the title of an anime movie I saw in the 80s

I'm from the Netherlands and we used to have filmnet at home, a paid movie channel. They would always show anime movies in the weekends. I think this movie was on in 1985/ 1986, something like that.  I only remember that the protagonists were a boy and a girl, possibly siblings. There was a war and huge stone or metal boulders. In the end the girl dies or ascends (?) while the boy stays behind. The reason he stays behind is because he is mentally not yet evolved enough to ascend.  The boy has brown hair. The two were young, possibly 13-14? There might have been a comical pet dog.  At the same time, Filmnet aired Magical Princess Minky Momo and the Fountain of Youth, but the setting and the atmosphere of both movies were very different.  Pretty vague, I know. But this is all I remember. I'll continue to add details as they come back to me, but as I said in the comments, I was 6,7 at the time and my memories are obscure. I wish I had a mind castle like Sherlock Holmes... :)


Book: AI controls what is left of humanity, forces people to live in cave

I can't remember the title of a story that I wanted to read lately. I know the plot was as follows: An AI controls the last few remaining humans and later they are forced to live in a cave. One of them tries to escape and he is turned into some kind of goo by the AI.   Do any of you recognize it?


I use Lyx 2.1, document class : Report. My problem is that the titles of figures are written on the numbers at List of Figures.


Personalized URL for a Landing Page (CloudPages)

I have created a Landing Page in CloudPages. I am trying to personlize the URL following the below documentation -    In my email, I made the URL like below but it is not working. I cannot see the personalized string values in the Landing page. What could be wrong?  Join Us


Why is rendering Collada(.dae) models in Blender resulting in holes?

When I preview a .dae/Collada model in Preview on OSX I get a better rendering of the model as compared to the one rendered in Blender. I am rendering using Python and use the following command to import the model: bpy.ops.wm.collada_import(filepath=shape_file)  OSX Preview:   Blender renderings:


I'm using MiKTex 2.9.4196 with TeXnicCenter 2.0 beta on Windows 7. As I have to compile very large tikzpictures I use tikz externalize. Nevertheless some tikzpicture still produce an error.  ! TeX capacity exceeded, sorry [pool size=3147270].   I already did increase the main memory, but I couldn't find out how to change the pool-size.


Let $x_1,...,x_n $ are distinct real numbers.  Is it a formula for the Vandermonde type determinant $V(x_1, \cdots,x_n)$  whose last column is $x_1^k,\ \cdots,\ x_n^k$, where $k \geq n$, instead of $x_1^{n-1},\ \cdots,\ x_n^{n-1}$?  Thanks


Opening Android SE app from Chrome via a link crashes

When I searched on Google on Nexus 7: javascript+date+formatting, and clicked the first link, I was redirected to the Stack Exchange app (which I want), but the app crashed.  I'm not sure if this happened since the new release, but it is really annoying. Here are the details of the report:     Sourcefile: ComponentName.java, line 77, exception java.lang.NullPointerException.   I have also sent the crash report, so you can have more information about this.


Each eigenvalue of $A$ is equal to $\pm 1$. Why is $A$ similar to $A^{-1}$?

$A$ is a non-singular matrix ($n \times n$) and each eigenvalue of $A$ is equal to $\pm 1$. Why is $A$ similar to $A^{-1}$? (by Jordan form)


>>> def func(): pass >>> func <function func at 0x10ce60400>   What is that address for? (The 0x10ce60400) Where and what does it point to?  (I am talking about CPython 3.7)


Where to post question about understanding coding challenge?

A few months ago I was randomly chosen for Google's 'foobar' challenge (a coding challenge that Google offers to random individuals based on coding related search history). I got through a few of the stages, but got to one I didn't understand. There was a time limit so I'm no longer able to submit an answer (i.e. this isn't a do my challenge for me sort of question), but I would still like to understand the challenge.  What I don't understand about the challenge is less how I would implement a solution in a coding language, but more what it is even asking me to do. This complicates my dilemma of figuring out where to post my question. Would I just post it to Stack Overflow, and if so what tags would I use? What site would be best for this kind of question?


Looking for an inscribed quadrangle in a rectangle with minimal perimeter

I thought up an other math problem, and hope you all will find it interesting. Given is a rectangle ABCD. The points P on the line AB, Q on BC, R on CD and S on AD are inner points of the rectangle sides. Inner points of a line are all points of this line except the end points. Now it shall be determined for which positions of the points P, Q, R and S, the rectangle PQRS has the smallest circumference. Thanks for all good answers


C++ allows the programer to use either stack allocated memory or dynamic memory on the heap. I am fairly clear on how the stack operates (I have created stacks as exercises in C++)  but am still curious about how and where "the stack" is defined.   Is "The Stack" a feature of the language, a feature of the OS or a feature of the hardware? I have a vague idea that each stack is something relating to each of the many active thread processes from the perspective of the operating system. This suggest to me that it's implemented on the software level and not a hardwired feature of the CPU or motherboard.  I imagine, in the case of a C++, the compiler might have inserted an implementation of a stack into each binary. Or maybe the  OS applies it's own stack implementation into each running process? How and were is this defined?  I found a similar question  but I don't see it answered and my hope is to re-state the question more directly.


How to get the node id the comment is attached to in hook_comment_insert?

How can I get the node id the comment is attached to in hook_comment_insert?  I tried the following code:  function mymodule_comment_insert(Drupal\Core\Entity\EntityInterface $entity) {   if ($entity->bundle() == 'comment_custom' && $entity->get('entity_type')->value == 'node') {      // Below returns empty, because "$entity->get('entity_id')->value" is empty.     $node = Node::load($entity->get('entity_id')->value);      // No luck with this one too.     $node = \Drupal::routeMatch()->getParameter('node');    } }


I am looking for an online die roller that works similarly to the following:   The GM provides a string identifier to the player. E.g., "gandalf attacks balrog #12"   The player enters the id on the roller site, which checks it for uniqueness vs the DB, then generates the results, lined to that id.   The GM can check the results by id.     An alternative implementation would be for the GM to request a range of pre-generated ids from the site and hand them out to the players for rolls. E.g., "please roll 5d8 with id #314159265"  Is there anything similar?  Notes and Clarifications:  As Thales Sarczuk inferred, this is indeed for "play by forum/email" games.  The idea is to have "verifiable" rolls, preventing "roll until you you get a good result" scenarios. However, it will be used on forums that are not gaming-specific so using plugins is not an option.  Thank you!


Predict real world data after modelling with scaled features

I trained and test a model with scaled features. Now, I want to predict a single real world sample. If I have one sample alone, I can't scale it to fit into the model like I did with the test data. I imagine it's a pretty common situation. What are the steps I need to do to predict this single sample?


Badge Icon Bug when Viewing From Other Site

So I was looking at a badge that I got awarded on the dropdown menu whilst browsing Biology SE. The badge was a popular question one from Law SE. The badge symbol displayed was the DNA helix that is used on Biology SE rather than the icon used on Law SE. I believe this is confusing and should probably be considered a bug.


Sum of products of binomial coefficients is equal to another binomial coefficient

Need help in proving (by induction or by combinatorics) the following statement   Is it possible to do it by induction? there are 3 veriables and I think I cannot easily do it by induction. Correct?  I am not sure from where even to begin...


dynamic items not triggering on (.on("click") event

I have a click event that looks like this.      $( ".open_report" ).on( "click",function() {         console.log("on click");         //Do Stuff     });   it triggers on already created items, but not on new (dynamic) created items.  Except for the fact that the ids differ ( which it should) and that the data-report tag data differ, they are the same code. So I cant figure out why my on click event does not fire on dynamically added items.  loaded item which works

       Discharge Summary

       17-01-2018,19:57

       <input data-report="18109599-1516219070.html" type="button" class="removeButton buttons delete_report" value="x">

   dynamically added item

       Discharge Summary

       17-01-2018,20:01

       <input type="button" data-report="18109599-1516219273.html" class="removeButton buttons delete_report" value="x">


Right-click, create a new text file. How?

In Finder > Select a folder > Right click, we get a popup with an option to create a new folder:    Is there a way to add menu item New Textfile for adding a new text file?


Contour integration of $\int \frac{dx} {(1+x^2)^{n+1}}$

I want to compute  $$  \int_{-\infty}^\infty \frac 1{ (1+x^2)^{n+1}} dx $$ for $n \in \mathbb N_{\geq 1}$. If I let $$  f(z) := \frac 1 {(z+i)^{n+1}(z-i)^{n+1}} $$ then I see that $f$ has poles of order $n+1$ in $\pm i$. Initially I thought that  $$ [-R,R] \cup \{R \exp(i \theta) \mid \theta \in [0,\pi] \} $$ would be a good conture but for the residue in $i$ I get $(-1)^n (n+1) 2 i$. I know that the result must be $$ \frac {1 \cdot 3 \cdot 5 \cdots (2n-1)}{2 \cdot 4 \cdots 2 n} \pi $$ which looks quite different than my residue.  What goes wrong here ?


How to handle players who take a long time to take their turn?

Problem  There is a player in my current group who takes a long time to take their turns. A painfully long time!   Typical exchange  Me: Okay John*, it's now your turn to act. The serpent is coiled around your friend, squeezing life from her, but they're on the other side of the pit. What do you do? John: Alright (pauses and stares into space for maybe 90 seconds). Me: You're up, John. John: Can I use my (power which can do an assortment of minor effects, such as prestidigitation (D&D) or hedge magic (Numenera) ) to levitate over the pit. Me: Although you can use that to hover a small object, levitate is a more powerful ability so that won't cut it.** John: (Settles into another long think) I shoot the snake with my bow. (Waits for confirmation before rolling a dice) Me: Cool, go for it. Jane(who is trapped by the serpent): Eeep!! John: (Rolls) I hit! Me: The arrow finds home and both the serpent and Jane are grievously injured. John: Oh, I wouldn't have done that if I'd known.  Outcome  This kind of drawn out turn gets old quickly. Other players have mentioned it as a major PITA. I have talked to the player, but nothing ever comes from it (He says 'Sure, I understand', but takes long turns regardless).  Questions  Should I introduce stalling (where after a period of time the player misses his turn as his character panics and freezes)?   And if so, do I need a prop, such as an egg timer, to keep track of how long a player has?   Should all players use the timer so John doesn't feel picked on?  Or is there a better approach to dealing with slow players?   * A generic name, not the actual name of my player. I find it better to use player name instead of character name until players are very familiar with their character name and respond quickly to it. **I hate being the jerk who says 'No'.


Unpleasant Uses of Replicator/3D Printer

A bank manager gets up, uses his house replicator to make breakfast, then drives to work. he notices that things are wrong, such as damage to the statues on the facade of the bank building. Turns out, the bank is, like society, no longer working - a group of youths are in the bank, and only the janitor is willing to protect him, as long as he opens the vault. Turns out, civilization has collapsed because of replicators - no one works or trades anything except replicated replicators. The banker has a heart attack and dies before he opens the vault, so the janitor feeds his corpse into a replicator and gets a brand new manager, whom he drives home to start the day again. Two lovers among the youths hold each other and drop into a replicator so they can start their life over again, at exactly the same point as the morning since the new bodies are based on a template recorded that morning.  Author and name of story? I keep thinking Disch.


BibTex problems in revtex4-1; No citations showing

This will be a basic question. Have searched and read a ton of questions and still don't know what my problem is because I don't understand how to use bibtex properly. I will explain all that has happened till now.  I have a tex file called "magneto.tex", after I ran it the first time a "magnetoNotes.bib" appeared and I assumed was the one needed to be changed to cite things, so I started adding my references there. Now I don't think that is the way it's done because whenever I would compile my tex the "magnetoNotes.bib" would weight 0 bytes... so created a new file called "biblio.bib" with the references and now I am using that to reference instead.  At the beginning putting my references in  "magnetoNotes.bib" would work most times, what I did then was run bibtex on the .bib file and then run bibtex and fast compilation on my .tex . At the beginning when there were few references it would do it just fine, but now that my references are more it just shows "?" instead. Searched what that meant and it said there was an error in the process, and that the proper way to do things is to compile in latex, then bibtex, then latex again. And that if the error persisted the .bbl file would give indications of what's wrong... checked my folder (first deleted everything that wasn't the two files and then ran my files as bibtex on the .bib and fast compilation on the .tex) and there wouldnt be a .bbl file, which meant I hadn't actually ran bibtex according to the questions/answer I was looking at. So obviously that meant I had to run bibtex in my .tex file (which was not clear for me at all when reading about it). So I thought maybe I had to compile in that order the .tex file and not the .bib file.   Now, doing that (fast compilation, bibtex, fast compilation on .tex) and using as the bibliography the new biblio.bib file I get the error   ! Package inputenc Error: Unicode char \u8:− not set up for use with LaTeX.    and the references still show up with "?".   I have no clue what's wrong. Use fast compilation because can't compile in Latex, there is an error because of a .png image... if I do pdflatex, bibtex, pdflatex on my .tex file I get the same error as well.  I have no clue what any of this means or if I am now doing things properly. Have read almost all the pages that teach you how to use bibtex from the basics and still dont get it.  My document class is  \documentclass[aip, apl, reprint, numerical]{revtex4-1} \usepackage[utf8]{inputenc} \usepackage[spanish,english]{babel} \usepackage{graphicx}  \setcitestyle{numbers,square}  \begin{document}  \section{Introduction: } bla bla \cite{Kitanovski1}   \bibliographystyle{unsrt} \bibliography{biblio}   \end{document}   Few of the things in the bibliography are:        @Inbook{Kitanovski1,      author="Kitanovski, Andrej      and Tu{\v{s}}ek, Jaka         and Tomc, Urban        and Plaznik, Uro{\v{s}}      and O{\v{z}}bolt, Marko      and Poredo{\v{s}}, Alojz",      title="The Thermodynamics of Magnetocaloric Energy Conversion",      bookTitle="Magnetocaloric Energy Conversion: From Theory to Applications",      year="2015",      publisher="Springer International Publishing",      address="Cham",      pages="1--21",      isbn="978-3-319-08741-2",      doi="10.1007/978-3-319-08741-2_1",      url="http://dx.doi.org/10.1007/978-3-319-08741-2_1"      }       @article{weiss,      author = "Weiss P       and Piccard A",      title = "Lé phénoméne magnétocalorique",      journal = "J. Phys (Paris)",      year = "1917",      volume = "7",      number = " ",      pages = "103-109"      }   There are mostly article ones, a few books referenced.


Is it possible to downgrade my iphone 5 firmware from 10.2 to 7.1.2 by restoring to an old backup?

Ok, so i made the most idiotic mistake of upgrading to the latest firmware on my Iphone 5. I was running on 7.1.2. But now i'm on 10.2. Fack!  My friend currently has a working Iphone 5 with the firmware 7.1.2.   If MY FRIEND backs up his phone now that's currently on 7.1.2 on my laptop... and if I restore my Iphone using MY FRIEND's 7.1.2 back up... will i somehow magically be back on 7.1.2 and avoid the new BS update???


Give users a way to see their "Positive Question Record" score

I recently got awarded some new badges for different SE sites, however I was a bit surprised at which sites gave me which badges. The badges are :  Asked a well-received question on 5 separate days, and maintained a positive question record.  Asked a well-received question on 30 separate days, and maintained a positive question record.  Asked a well-received question on 100 separate days, and maintained a positive question record. I can find out if I meet the "well-received question on X separate days" criteria with , so know the reason I did/didn't get a badge must be related to the "positive question record" criteria instead. I found  which defines the formula for determining your "positive question record" for the purpose of these badges as  (total questions - negative questions - closed - deleted)/total questions >= 0.5   But without knowing how many questions I've deleted over the years, or having a handy way to view them all at once, I have no idea what what my actual "positive question record" score is, and what I can do to improve it. Is there a way to find out my "positive question record" score for a specific site?  Since the answer to this question seems to be *"You can't right now"*, I am going to change this to a feature-request per the [suggestion][3] of a moderator below. Please implement a way for users to find out what their "positive question record" score is for a specific SE site, so that they can see how close they are to getting these badges and can work towards them.


Submodule of free module over a p.i.d. is free even when the module is not finitely generated?

I have heard that any submodule of a free module over a p.i.d. is free.  I can prove this for finitely generated modules over a p.i.d.  But the proof involves induction on the number of generators, so it does not apply to modules that are not finitely generated.  Does the result still hold?  What's the argument?


For Christmas my kiddo got the D&D Starter Set and we've been going though it and the full rules we downloaded online. I'm having a hard time figuring out how the example listed in the rules gets to a final value of 14.  The example is a level 1 character with wisdom of 15 and a proficiency in perception.  I understand that you start with  10 (base) + 2 (character level) + 2 (wisdom 15) which gets you to 14 but then how does the "proficiency in perception" help or factor in?   What gets more confusing is on one of the pre-generated character sheets has a level 1 character with wisdom of 10 but a passive perception value of 10. If I follow the math from above shouldn't it be 10 (base) + 2 (char lev 1) + 0 (wisdom 10 = 0 bonus) for a final score of 12?  How to calculate passive perception?


Is there any difference between   SELECT * FROM TABLE_A a JOIN TABLE_B b   ON a.propertyA = b.propertyA           And the query  SELECT * from TABLE_A a, TABLE_B b where a.propertyA=b.propertyA.


A pixel diagram is a way to visualize a graph, or even the non-zero entries in a matrix.  It is typically used to help visualize . I am trying to use Tikz to draw these diagrams.  An example can be seen below (taken from )    So the idea is as follows: for a square n x n matrix, draw an n x n grid, and make the i-jth pixel black if the i-jth element of the matrix is non-zero (or there is an edge between nodes i and j).  Is it possible to enter a data file containing the matrix data and have tikz generate the pixel diagram?  I am very much a tikz novice and don't even know where to begin here...  thanks!


how can I run my exe files using batch script depending upon the edition of windows

I have list of few exe files  that works according to windows edition for ex.  there are different files for windows 10 pro , windows 10 home , windows 7 professional ,windows 7 enterprises and so on .  here I want to create a batch file  which will detect the windows edition and according to that windows edition my batch file will install the exe file. i can get the windows edition details using wmic os get caption and FOR /F "usebackq tokens=3,4,5" %%i IN (REG query "hklm\software\microsoft\windows NT\CurrentVersion" /v ProductName) DO echo %%i %%j %%k  But I do not know how to put if condition on these commands so that I could run exe file according to windows edition


Entire functions such that $f(z+\lambda_1)=af(z) \; , \; f(z+\lambda_2)=bf(z) $

Let $\lambda_1$ and $\lambda_2$ be complex numbers with nonreal ratio. Let $f(z)$ be an entire function and assume there are constants $a$ and $b$ such that $$f(z+\lambda_1)=af(z) \;\;\;\;,\;\;\;\; f(z+\lambda_2)=bf(z)  $$ for all $z$. Prove that $f(z)=Ae^{Bz}$ , where $A$ and $B$ are constants.   I think the idea is to build a doubly periodic entire function, but I'm not sure if it is $\displaystyle \frac{f(z)}{e^{Bz}}$.    This is exercise 10 from chapter 1 of the book "Modular forms and Dirichlet series" by Tom Apostol.  Any help would be appreciated.


How to make "callouts" or "standout blurbs" among a larger body of text?

I'm not sure what the word I need to search for is, to find help if this question has already been answered.    In magazines it's common to pick out words from the middle of a body of text and repeat them in larger font, with the rest of the text flowing around the "\mbox{}".    How do I make such floating "standout" text—not necessarily in red circles? What is the proper phrase to search for that identifies this way of emphasising short bits of text?


attr() not working with appended img in Jquery

I am not able to get the src attribute of the image that i created using the .append method in Jquery. I am able to get src when i type the element in html file but not when i append it. In short the alert method at the end of below code doesnt give the src of the img.  HTML:  <button onclick="createlm()">click</button>

   JQUERY:  //function to append img element..  function createlm(){     $(".row").append(""); };    //function to get src attribute  $(window).load(function(){     $(".row>img").click(function(){         var imgsrc = $(this).attr("src");         alert(imgsrc);     }); });


How to quickly move one layer to a different group in large Photoshop files, without dragging?

Large website design with many, many layers. Need a way to move one element to the new designated group without dragging forever in the layers palette.


As fncychap has no such chapter style, and using the memoir class will cause a lot conflicts with my current settings (book class), how to make this style (perhaps using the titlesec package)?   title style for table of contetns, Nomenclature, References, etc title style for chapters


I am trying to create a little timer program that will have the user's computer beep when the timer is finished.   Being on a Mac, the winsound library is not available, and I cannot get \a to generate any noise at all.  How would I go about generating a little ding or beep or some other sound when the timer is finished?


Remove Entries of previously installed windows with wine

In my previous version, in Natty I think, I installed MS Office and some other windows software via wine. They have cluttered a lot of places including the Open with and other mime related operations. Is there a way to purge them and remove all wine based entries that now I have no wine program installed?  I want, if possible to purge all entries that have to do with wine. I installed/uninstalled them using wine. Purging wine does not help  TIA


In what order are questions in the close queue presented to a user. and why are they presented in that order?

I am very curious about the factors which determine the order in which a specific reviewer is presented with questions in the "close" queue. I ask about the close queue, because on mathematics.se, there are always questions in the close queue.  On a typical "new" day, my close-queue reviews begin at a time when, say, 165 questions are in the close queue.  When I click on "close" to review questions with at least one pending close vote, what factors determine the order in which the 165 questions are presented to me?    I suppose there may be some randomness in the order of presentation of those questions; it was also suggested that perhaps questions whose tags overlap with tags that I frequent may be a factor.    I've sort of ruled out "those with the most close votes in the review queue are presented first, whoever the reviewer is" (because my experience reviewing reveals too many counterexamples).  I haven't been able to determine whether or not they are presented from newest to oldest in the queue, or vice versa.  (Note, I have reviewed well over 20,000 posts from the close queue on MSE).  Any clarification about why and how I'm presented with the questions to review for closure, in the order I receive them, until I've either voted to close or keep open 20 posts, would be appreciated.  My question is relevant for any specific reviewer.  I merely used myself to help simplify the question.  I realize that which questions user x may see first, may not be those that user y sees first, but I'm wondering what factors play into the presentation of questions to review for any particular user.    Note: If the order of questions presented in the close queue varies from site to site, please let me know, and if so, I will withdraw my question readily.    Additional note: I have read , and there was a comment suggesting that in fact, questions are presented from most recent to oldest. That comment also referenced an explanation from @Shog9 on this matter, but did not provide a link to it.


How can i calculate this combinations sum?

$C(n,2)+2×C(n,3)+3×C(n,4)+...+(n-1)×C(n,n)$ By calculating the combinations and multiplying , then simplifying i can until here: $(n-1)[n/2 + n(n-2)/3 + n(n-2)(n-3)/8 +...+ 1]$ I thought of transforming everything in the brackets to combinations of $n-2$ or $n$ and get something like $(2^n-2)×(n-1)$ but couldnt figure out how. Thank you in advance.


Is it possible to calculate $ \sin(\alpha) $ (and other trigonometric functions) as a rational number?

I am creating a computer library for arbitrary-precision calculations, by expressing numbers as rationals (with an arbitrary-precision numerator and denominator).  Now, I am exploring the possibility to add trigonometric functions to this library. I know from college that certain values like $\sin(\frac{1}{2}) = \frac{\pi}{2} $ and $\sin( $ are defined and easy to remember.  Is there a way to find rational solutions of $\sin(\alpha)$ for all possible angles $\alpha$ ?


Why does fungus form in lenses, and how to get rid of it?

Recently I was using an old Pentax 50mm f/2 that had a quite big green spot, and later I was informed that it was a fungus.  A couple of questions raised from this:   Why does fungus form inside the lenses? What kind of "food" does it find in a glass element? How does it form? Due to condensation? Due to bad storage? Does it have any impact in the final image? Some scratches in a lens will probably not appear in the image because to they will be very out of focus. Is this also true for fungus? Finally, when a lens is "fungused": How do you get rid of it?     What to do about mold/fungus in a camera lens?  by   I am living in a tropical country where humidity is pretty high.  I never thought it would be possible that something could grow inside a lens, so I haven't been so careful with my canon camcorder.  Now I see there is a white spore growing on the inside of the camera lens (see photo below).  Is there any way, short of finding a camera shop (doubtful there are any in the country that can handle this), to remove this?  The spore is the white dot in the centre (it's opaque), and the dusty patch on the right of the lens is also on the inside, must be the same stuff.


Validate multiselect pick list with jQuery

I am trying to validate multiselect pick list(if no selection is there then it should pop up an alert) through jQuery since we can't make it as require with visualforce page(actually we can but getting issues while submitting). I am unable to validate multi select pick list through this jQuery, can anyone tell me the mistake I am doing?. As validating multi pick list is different from others I am getting this issue.  Here is a piece from my page:  <apex:page controller="Mycontroller" docType="html-5.0" showHeader="false"  sidebar="false" standardStylesheets="false" >         <head lang="en">   <meta charset="utf-8"/>   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>    <apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-1.4.2.min.js')}"  />   <apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-ui-1.8.6.custom.min.js')}"  />   <apex:stylesheet value="{!URLFOR($Resource.jQuery, '/css/ui-lightness/jquery-ui-1.8.6.custom.css')}"  />            <script>     $('frm').on('submit', function(e) {     if(!$('[name="impcat"]').valid()) {         e.preventDefault();     } });            </script>             </head>  <apex:form styleClass="form-style-9" id="frm">     <apex:pageBlock id="frm1" mode="maindetail"> <div id="coll1">            <apex:outputLabel value="Select categories?" style="font-family:Arial"/>                                            <apex:inputField value="{!Obj__c.Category__c}" styleClass="field-style field-split align-left" id="impcat" />                             </div> </apex:pageBlock>  </apex:form>  </apex:page>


Find a Borel subset $E$ of $[-1,1]$ s.t. $\lim_{r\to 0^{+}} \frac{m(E\cap [-r,r])}{2r}=\alpha$ -- following up a response.

I am trying to understand the following solution to  question. The question was  Let $\alpha \in (0,1)$. Find a Borel subset $E$ of $[-1,1]$  s.t. $$\lim_{r\to 0^{+}} \frac{m(E\cap [-r,r])}{2r}=\alpha.$$  and one of the response to this question was  You can get any density $\alpha\in (0,1)$ you want. The idea is first to consider a decreasing sequence of positive numbers $x_n \to 0$, such that $\frac{x_n}{x_{n+1}}\to 1$ ($x_n=\frac{1}{n}$ works). Then in every interval $I_n=(x_{n+1}, x_n)$ place a segment of $E$ in proportion $\alpha$ (if $\alpha=\frac{1}{3}$ say take the middle third). Now consider $E$ the union of all the pieces in the intervals $I_n$. Do this symmetrically in the negative side of $0$. You got your set $E$.  I am taking $\alpha = 1/3$. Now, I am having trouble verifying the answer. How can I show that it is indeed the case that $\lim_{r\to 0^{+}} \dfrac{m(E\cap [-r,r])}{2r}=1/3$ for the $E$ I have above? Most importantly, I am having trouble analyzing what $m(E\cap [-r,r])$ would amount to. Any hints or help would be greatly appreciated!


How can I recover my Clash of Clans village?

I lost my phone and with that the email account I created to play with a second CoC profile. Since I only created the email account to play with a second CoC profile, I don't remember the details for the account.  Is there another way to recover my village?


What happens if your only pawn can't move as many spaces as required?

If you have just started and you draw a move backwards 4 card, on your next turn you get a move forward 12. You have no other pawns out to move. Do you have to move The original pawn (the one you backed up 4) forward or can you refuse the move?


Tourist utopian island where you could only stay 6 days as something horrible happens on the 7th

I remember reading, recently (2018 or so) a short sci-fi/horror story online about a tourist visiting a utopian island, the catch was that a tourist could only stay six days, as something horrible would occur on the 7th of each week, as the price for this utopia's existence.  While there, there were 6 days of carnivals and festivals, while I seem to recall that those who lived through the 7th day were immortal, or that you didn't age on the island?  The main character (male) had met a girl while visiting, and decided to abandon his ticket back to the mainland.  There was a particular scene I recall at the striking of midnight of the 7th day, the man and this woman were in a club when things start to go awry, teeth cracking and blood pooling on the floor.  After the 7th day everyone recovers however, and the cycle begins again, no one discusses or even acknowledged the previous day, as a mutual agreement.  Some of the scenes from the 7th day I believe talk of radio chatter and modern weaponry, so the book is from the late 20th century I would imagine.


Is it possible to use a single Time Machine backup so that two Macs are always in sync?

I have a Time Machine and two Macs.  I want both computers to be the same, not back them up separately.   Is it possible to use one as a primary (always backing up from one) and then "downloading" the latest changes onto another?


'output' keyword isn't recognized by the syntax highlighter in SQL code blocks

The highlighting for SQL code blocks doesn't appear to recognize the keyword 'output'. Please see  for an example. Note that 'output' in the code block isn't colored blue like the other SQL keywords.


Does Home edition of windows 10 encrypt files?

Here is what we usually do when getting a freshly installed windows 10:   Log in with a Microsoft account (as administrator) Set a password.   If we are using Pro version, we can then use BitLocker to encrypt data.  But what if we are using home edition? A  password can prevent entry into the OS, but if one could still connect the hard drive to another computer so that the files in it could be read without knowing the password, then the data were not really securely protected.   , however, seems to suggest that encryption will take place in any edition of windows 10, once you log in with a Microsoft account. I am referring to this part:     Sign in using a Microsoft account that has administrator rights on the device. That action removes the clear key, uploads a recovery key to the user's OneDrive account, and encrypts the data on the system drive. Note that this process happens automatically and works on any Windows 10 edition.   So, does the password set on windows 10 protect files? Could someone circumvent the password by connecting the hard drive to a different computer or installing another copy of windows? Is the situation different for windows 7? Is the situation different for C:/(system) and D:/?


Is the 9-speed Sora crankset compatible with 105 11-speed chain?

I'm thinking of upgrading my bike, which has a Sora 9-speed system on it (50/34 chainset). The upgrade is for esthetic reasons - i simply like the look of the internal cable routing. That being said, it is not an absolutely essential upgrade, and if it costs too much I will not do it.   My plan is to buy the new Shimano 105 5800 11-speed cassette, shifters and chain. I understand that the 11-speed chain is thinner than a 9-speed. Does this mean that I also have to buy a new crankset to replace my 50/34 Shimano Compact FC-R345 Octalink?


Quadratic Integers in $\mathbb Q[\sqrt{-5}]$

Can someone tell me if $\frac{3}{5}$, $2+3\sqrt{-5}$, $\frac{3+8\sqrt{-5}}{2}$, $\frac{3+8\sqrt{-5}}{5}$, $i\sqrt{-5}$ are all quadratic integers in $\mathbb Q[\sqrt{-5}]$. And if so why are they in $\mathbb Q[\sqrt{-5}]$.


Prove $f(z)=\frac{z}{1+|z|}$ is a homeomorphism

$f:\Bbb C \to D(0,1)$ defined by $f(z)=\frac{z}{1+|z|}$ I want to show that $f$ is a homeomorphism, but I’m stuck when I prove that $f$ is injective. If $f(z)=f(w)$, then $|z|=|w|$, but how can I show that $z=w$? Thanks for helping.


Sum of reciprocals of numbers with certain terms omitted

I know that the harmonic series $1 + \frac12 + \frac13 + \frac14 + \cdots$ diverges. I also know that the sum of the inverse of prime numbers $\frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \cdots$ diverges too, even if really slowly since it's $O(\log \log n)$.  But I think I read that if we consider the numbers whose decimal representation does not have a certain digit (say, 7) and sum the inverse of these numbers, the sum is finite (usually between 19 and 20, it depends from the missing digit). Does anybody know the result, and some way to prove that the sum is finite?


df -h show system full even after clearing bloated log folder

I had my php_errors.log file fill up the system, I deleted the error logs, but when I type  df -h www/folder_name Filesystem      Size  Used Avail Use% Mounted on bindfs          7.8G  7.4G  379M  96% /www/folder_name   How do I clear it up


Error getting while installing Virtualbox

The following packages have unmet dependencies:  virtualbox-qt: Depends: virtualbox (= 4.3.18-dfsg-1) but 4.3.18-dfsg-1 is to be installed                Depends: libgcc1 (>= 1:4.1.1) but 1:4.9.1-16ubuntu6 is to be installed                Depends: libqt4-network (>= 4:4.5.3) but 4:4.8.6+git49-gbc62005+dfsg-1ubuntu1 is to be installed                Depends: libqt4-opengl (>= 4:4.7.2) but 4:4.8.6+git49-gbc62005+dfsg-1ubuntu1 is to be installed                Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.6+git49-gbc62005+dfsg-1ubuntu1 is to be installed                Depends: libqtgui4 (>= 4:4.8.0) but 4:4.8.6+git49-gbc62005+dfsg-1ubuntu1 is to be installed                Depends: libstdc++6 (>= 4.6) but 4.9.1-16ubuntu6 is to be installed


Why does "someString" == 0 evaluate to true in PHP

I'm a little bit confused about truth in PHP.  My understanding is that 0 evaluates to false, and non-empty strings (unless the string is "0") evaluate to true.  This is as I expect:  var_dump((bool) 0);              // prints "boolean false" var_dump((bool) 'someString');   // prints "boolean true"   But then I am surprised by the following result:  var_dump((0=='someString'));     // prints "boolean true"   My question is, why does 0=='someString' evaluate to true?


$ gnome-language-selector Traceback (most recent call last):   File "/usr/bin/gnome-language-selector", line 22, in on_activate     options=options)   File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 199, in __init__     self.updateLanguageView()   File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 712, in updateLanguageView     self.openCache(progress)   File "/usr/lib/python3/dist-packages/LanguageSelector/LanguageSelector.py", line 33, in openCache     self._cache = LanguageSelector.LangCache.LanguageSelectorPkgCache(self._localeinfo, progress)   File "/usr/lib/python3/dist-packages/LanguageSelector/LangCache.py", line 76, in __init__     apt.Cache.__init__(self, progress)   File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__     self.open(progress)   File "/usr/lib/python3/dist-packages/apt/cache.py", line 164, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1), E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.   Im trying to install Chinese as an additional language on my system.  Distributor ID: Ubuntu Description:    Ubuntu 16.04 LTS Release:    16.04 Codename:   xenial  After clicking on "Language Support" in System Settings, i see a new window open "Checking available language support" but after 3 seconds it closes and nothing happens.  After inputting this in command line:  sudo apt-get -y install `check-language-support -l zh   I get this error message...  Traceback (most recent call last):   File "/usr/bin/check-language-support", line 53, in <module>     ls = language_support_pkgs.LanguageSupport(None, pkg_depends)   File "/usr/lib/python3/dist-packages/language_support_pkgs.py", line 13, in __init__     self.apt_cache = apt.Cache()   File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__     self.open(progress)   File "/usr/lib/python3/dist-packages/apt/cache.py", line 164, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1), E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages, E:The package lists or status file could not be parsed or opened. Reading package lists... Error! E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1) E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How do I install Chinese?  Why am I getting these error messages?  How do i fix?  Thank you to anyone who can help.


Why did Gendry call himself Gendry Rivers?

Gendry was born in the Crownlands and should therefore be referred to as Gendry Waters. However, he refers to himself as Gendry Rivers.   Did showrunners forget or is Gendry ignorant of the customs?


How do I stop chrome from redirecting me due to malicious software

When I click some links in chrome (trusted websites), I get redirected to 'spam' websites that say "your computer has viruses" or something stupid like that. How do I stop it from doing this? I have run  numerous virus removal tools including:  AVG  Norton  Malwarebytes  Trojan Killer  Google's software removal tool  Adwcleaner  Ccleaner  Windows Defender  I also reset chrome  I did find a number of viruses, but got rid of them. This is still happening and is starting to get annoying. Anyone know how to fix this?


Which Ubuntu distribution should I use for my old desktop?

I have an old computer which has 512MB RAM and 128MB Graphic card. It has windows 95 currently, it loads fine but it has some issues with Internet connection and pendrive. I am tired of solving problems.   I booted live CD of Ubuntu 10.10. It loads slow and some display problems. But it resolved my internet problem and pendrive. So I want install Ubuntu which is equivalent to windows 95 in boot, application load, graphics level. Can anyone suggest Ubuntu version? What about Xubuntu?


Functional Analysis : A question abaout extensions without use the Banach Theorem or Zorn's lemma .

The question  is :  Let be $X$ a separable normed vectorial space and $S$ a subspace de $X$ $ \varphi : S \rightarrow \mathbb{F}$. Show without use Hahn- banach' Theorem (and zorn's lemma) that exists an extension $f$ of $\varphi$ with $\|\varphi\| = \|f\|$.  I have no idea how I start. I only know that $X$ has a subset dense and countable. I think to extend $\varphi$ for the S ' s Closure, but I don't know if "S" is the subset dense in$ X$.


I read a little bit about , but I imagine the problem changes drastically when trying to fill a sphere with unit cubes. For example, how many unit cubes could one fit into a sphere of radius five? Clearly the upper limit would be $\left \lfloor \frac{4}{3}\pi \cdot 5^3 \right \rfloor$, but I imagine there will be plenty more empty space than just a small fraction of a cube.


A word for something that is too visible?

How to call something/someone that is too visible, more that it/she should or deserves, or more than it is natural and accepted? The word I have in mind is "over-visible". Are over-visible and over-visibility correct/idiomatic words?  I want to say that someone is too visible, as in the following sentence:     Unlike philosophers who suffer from invisibility in the society, sociologists enjoy over-visibility.   Is the use of "over-visibility" in the above sentence correct?


db_datareader, db_datawriter and db_owner permissions

First of all, sry because I am not a DBA and I'm not familiar with all the permissions.  My question is, if I give a user db_owner permissions on one database. Do I need to give also db_datareader and db_datawriter permissions to have full control? I think db_owner is sufficient to execute all kind of queries on the database? (create, delete, alter, select and all other stuff).   So, in short: If I choose db_owner, then db_datareader, db_datawriter are automatically included. Am I right?


How to download a driver on Windows, install on Ubuntu?

This is kind of an odd question and I'm not sure how to word it well, but I'll try to give as much detail as possible.  So recently I've gotten interested in Linux and installed Ubuntu on my PC alongside  Windows 10. It's great and all but there's one problem — I don't have internet access. I use a wifi adapter and I'm guessing I'm missing drivers or something. I've found a possible solution  as it seems he was in the same situation I was, the problem is I don't have an ethernet cable or anything, so there's no way for me to download this. But I do have internet on Win10! So my question is, how do I download the drivers on Windows and transfer it to Linux? Can I just download it on to any drive on windows then open it up on linux?


Let $f_k$, $f \in L^1(0,1)$ with $f_k, f \geq 0$ in $(0,1)$. Suppose $f_k\rightarrow f$ a.e. and $$\int_0^1 f_k \rightarrow \int_0^1 f \, . $$ How could one prove that $f_k \rightarrow f$ in $L^1(0,1)$ ?


OpenLayers 3 / Geoserver - add popup w/ attributes to Image layer?

I have a web app using OpenLayers 3, with several layers added as image layers, like so:   mylayer= new ol.layer.Image({      source: new ol.source.ImageWMS({          url: 'http://server/geoserver/opengeo/wms',          params: { 'LAYERS': 'layername' },          serverType: 'geoserver'      })  });   I would like to have an info window popup on the click of a feature , I am following the example here :   I have Bootstrap and JQuery in my app (these are both needed for this example) and am not getting any errors, but no results either..  ..this example is for a vector layer, and so far I haven't been able to get this to work for me...Is there a way I can do this with an image layer? or do I need to add the layer as a vector layer?


I have looked through the  and , and I have started building some Lightning Applications.  I still do not understand what makes Lightning Applications better than standard VisualForce. What do Lightning Applications do better than VisualForce Pages? What types of problems are they worse at handling? So far in my experience, there does not appear to be much upside, but perhaps there is something I am missing. Thanks!


CAPTCHAs are intermittently blocking CDN content

I get HTTP errors for various resources, and no styles or scripts are applied, which effectively makes the whole site unusable.  Meta does seem to be working fine, though.  Edit: Here's a log from Firefox Console. The relevant requests appear to be returning 403 Forbidden.  [10:28:39.766] GET http://stackoverflow.com/questions/19269438/is-there-a-way-to-call-member-function-without-or-operator/19827813# [HTTP/1.1 200 OK 917ms] [10:28:40.929] GET http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js [HTTP/1.1 304 Not Modified 680ms] [10:28:40.932] GET http://cdn.sstatic.net/Js/stub.en.js?v=e3d47b73fa12 [HTTP/1.1 403 Forbidden 612ms] [10:28:40.935] GET http://cdn.sstatic.net/stackoverflow/all.css?v=87e1657c9db8 [HTTP/1.1 403 Forbidden 605ms] [10:28:41.401] GET http://cdn.sstatic.net/Js/stub.en.js?v=e3d47b73fa12 [HTTP/1.1 403 Forbidden 347ms] [10:28:41.753] GET http://cdn.sstatic.net/stackoverflow/all.css?v=87e1657c9db8 [HTTP/1.1 403 Forbidden 237ms]   Edit 2: It happened again. This time I screenshotted everything. The CAPTCHA actually does not appear to be the usual one with men dressed as robots. I had to scale the page down a bit drastically to fit onto one screenshot.        I'm posting this update a bit in the blind because the same error prevents those images from loading. Let me know if they weren't uploaded. Meta still shows no other symptoms.


Presently the date is showing as mmm dd hh:mm:ss. Is there any way that I can change it to as per my liking. For example : dd mmm, hh:mm:ss.


Prove that X=Y is equivalent to P(X)=P(Y),where X,Y are sets and P(X) is Set of X's all subsets.The same goes for P(Y0

Well,i haven't tried anything yet,because I've got no idea how to prove it.If possible,please help me


I have a long scope for my laser musket but would like to scrap it and build a medium scope. Is there a way to scrap the actual long scope itself?


I am not sure if I understand the term damping coefficient correctly (I am a high-school student). Here's the link for the info that I learned:    So, as far as I understand, damping coefficient is $\gamma$. It's equation:  $$x/x_0 = e^{\gamma t} \, .$$  And another equation:  $$\gamma = c/2m \, .$$  $c$ as I understand it is decay constant. Although the website doesn't provide with such information.  However, one of the questions on the units of damping coefficient in this forum had an answer that said that $\gamma$ doesn't have units (). How can that be? I mean, I don't understand something. It should be s^-1 in this case. Are the equations flawed?  What I have in mind is underdamped case.  The graph I have looks like this:   So can I use the first formula $(x/x_0 = e^{\gamma t}$) to get $\gamma$, which is the damping coefficient, or the website has it wrong?


I need this desperately but can't find it. Am I doing something wrong?


I can't figure out why my tables are not being numbered

I want to have tables with numbers so I can say "table 1 shows".. Can you please help?  Example:  \documentclass[table,dvipsnames]{beamer} \usepackage[english]{babel} % \usepackage{beamerthemesplit} // Activate for custom appearance \usetheme{Berlin} \useoutertheme{infolines} \useinnertheme{circles} \usecolortheme{dolphin} \usepackage{caption} \usepackage{graphicx} \usepackage{multirow} \usepackage{booktabs} \begin{document}  \frame{% \frametitle{Calibration} \begin{center} \captionof{table}{Parameter values} % title of Table \label{table:parametersone} \setlength{\tabcolsep}{0.3pt} \small \scalebox{.65}{\begin{tabular}{l c l c p{8.5cm} } % centered columns (4 columns)          \hline     %inserts double horizontal lines \\ Parameter &\phantom{.} & Value  & \phantom{.} & Description \\[1.0ex]    % inserts table  %heading \hline             % inserts single horizontal line \\ $\beta$ &\phantom{.}  & 0.97 &\phantom{.}  & Yearly discount factor   \\ % inserting body of the table $\alpha$ &\phantom{.}  & 0.60 &\phantom{.}  & Output elasticity of labor  \\ $\gamma$ &\phantom{.}  & 0.10 &\phantom{.}  & Output elasticity of public capital \\ $\theta$ &\phantom{.}  & 2.68 &\phantom{.}  & \parbox{10cm}{Multiplicative factor in the \\ human capital technology} \\ $\psi$ &\phantom{.}  & 0.80 &\phantom{.}  & Parental altruism \\ $\sigma$ &\phantom{.}  & 0.63 &\phantom{.}  & \parbox{12cm}{Exponent on parental human capital} \\ $\phi$ &\phantom{.}  & 0.30 &\phantom{.}  & \parbox{12cm}{Elasticity of the fraction of time during first \\ period spent in school} \\ $\eta$ &\phantom{.}  & 0.10 &\phantom{.}  & \parbox{12cm}{Elasticity on public education expenditures} \\ $\underbar{h}$ &\phantom{.}  & 2.30 &\phantom{.}  & Constant\\ $\lambda$ &\phantom{.}  & 5.00 &\phantom{.}  & \parbox{10cm}{Relative weight of adult labor in production}  \\ $r$ &\phantom{.}  &5.0\% &\phantom{.} & Interest rate \\ $\delta_G$ &\phantom{.}  & 2.5\% &\phantom{.}  & Yearly depreciation rate of public capital\\        % [1ex] adds vertical space \hline %inserts single line \end{tabular}} \end{center}}  \end{document}


Although this code compiles successfully, it throws a class cast exception error at run-time:  class Test {     public static void main(String[] args) {         MyArray<String> x = new MyArray<>();         x.a[0] = "test string";     } }  class MyArray<T> {     T[] a;      MyArray() {         this.a = (T[]) new Object[1];     } }   The error message:  Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;     at Test.main(Test.java:4)   One possible, yet simple, solution I know of is to declare the array as an array of type Object and then just cast an array element back to T when you want to retrieve it from the array, like this:  class Test {     public static void main(String[] args) {         MyArray<String> x = new MyArray<>();         x.a[0] = "test string";         System.out.println(x.get(0));     } }  class MyArray<T> {     Object[] a;      MyArray() {         this.a = new Object[1];     }      T get(int index) {         return (T) a[index];     } }   This works just fine. But the problem with this approach though is that I can now put absolutely anything in the array and yet keep it there safe and sound until such time as I try to pull it out of the array which will give me a big, fat class cast exception error!      MyArray<String> x = new MyArray<>();     x.a[0] = 34;     System.out.println(x.get(0)); // run-time error   This is what we'd get if we ran this piece of code:   Exception in thread "main" java.lang.ClassCastException:   java.lang.Integer cannot be cast to java.lang.String     at Test.main(Test.java:5)   Obviously, it's a lot better when all your array elements are of the same type as opposed to being generic objects of type Object. There's gotta be a way to do that.  By the way, the example code I presented here has been significantly simplified. I know that I can use set and get methods that can do the necessary type casting which, of course, will help make it completely safe to add and get elements in and out of the array. The problem with this is that if I have lots of other methods in the class that also do a lot of casting, the tedium of writing all those cast operators becomes a real pain. I thought it'd be really nice if I could just store all the elements in the array as a certain type from the word go. This would simplify the coding process and make code much cleaner and easier to read. So, any words of wisdom you wanna pass my way are most welcome and going to be much appreciated.


How to make a cycles light emisson object invisible to the camera?

In my scene it is required to position the lights close to the main object like this:    How I can make the light source invisible to the camera?


I'm currently attending a somewhat disorganized seminar on combinatorics that follows no textbook. So far we have covered the orbit-stabilizer theorem, some recursion, and we're heading into the Möbius inversion formula.   Can anyone suggest a text that approaches combinatorics at this level for a 2nd-3rd year undergrad who already knows some algebra and the more basic combinatorics like combinations, permutations, stars-and-bars, generating functions? Most introductory combinatorics books I've found are more suited to a discrete math class and cover stuff which I already know. I'm looking for something to supplement this lecture. Thank you.


Multiplicity Correction for Coefficient Estimates in Linear Regression

When regressing a dependent variable y on some feature vector x with a standard linear regression, is there any correction in place for multiplicity or is this just not relevant in this case? The motivation for this question is that when I run several regression specifications (e.g. with or without interaction effects), I know that I have to perform some correction for the multiple testing to correct confidence intervals and p values (e.g. Benjamini-Hochberg Correction). Now when I have a feature vector with e.g. 10 different independent variables, is estimating their coefficients equivalent to multiple testing?


Each or Every for speaking about what the people like? For example, I want to say that the people all around the world like different kinds of music. How do I say it?      Each person likes different music   or    Every person likes different music   Also, Could you tell me here which is the correct one?      One learns the thing that he is interested in   or    A person learns the thing that he is interested in


proper way to iterate through contents in a directory

I need to iterate through every file inside a directory. One common way I saw was using the for loop that begins with for file in *; do. However, I realized that it does not include hidden files (files that begin with a "."). The other obvious way is then do something like   for file in `ls -a`; do   However, iterating over ls is a bad idea because spaces in file names mess everything up. What would be the proper way to iterate through a directory and also get all the hidden files?


Cannot find the 'Manipulate Object Centers Only' button. Is this an addon?

Cannot find the 'Manipulate Object Centers Only' button refered to in the book 'Blender Foundations'. Is this an add-on?


Cant fix error Exception in thread "main" java.lang.NullPointerException

I keep getting this error:  Exception in thread "main" java.lang.NullPointerException  at ButtonsLab.pvc1(ButtonsLab.java:110)  at ButtonsLab.main(ButtonsLab.java:155)  There are some people who have asked this question but I can't seem to find one that fixes this problem. I know it has something to do with the array in the pvc1() method.  import java.util.Scanner; import java.util.ArrayList; import java.util.Random;  class ButtonsLab {    ArrayList<Integer> buttons;  ButtonsLab(){    buttons = new ArrayList<Integer>(); }    public void fillMyArray(){      for(int i = 0; i < 5; i++){      buttons.add(i + 1);   } }  public static int pvp(int buttonNum){    Scanner in = new Scanner(System.in);   int player1 = 0;   int player2 = 0;   int x = 0; //determines who wins    while (buttonNum > 1){       while (player1 < 1 || player1 > 3){          System.out.println("Player 1: How many buttons do you take?(1-3)");          player1 = in.nextInt();       }       buttonNum -= player1;       if(buttonNum != 1){         System.out.println("There are " + buttonNum + " Buttons on the board.");      }      else{         System.out.println("... There is 1 Button on the board.");      }       if(buttonNum == 1){          x = 1;       }       else{         while (player2 < 1 || player2 > 3){             System.out.println("Player 2: How many buttons do you take?(1-3)");             player2 = in.nextInt();          }      }       buttonNum -= player2;       if(buttonNum != 1){         System.out.println("There are " + buttonNum + " Buttons on the board.");      }      else if(x !=1){         System.out.println("... There is 1 Button on the board.");      }       player1 = 0;      player2 = 0;    }    if(x == 1){      while (player2 < 1 || player2 > 3){          System.out.println("Player 2: How many buttons do you take?(1-3)");          player2 = in.nextInt();       }       System.out.println("Player 2, you lose.");   }   else{      while (player1 < 1 || player1 > 3){          System.out.println("Player 1: How many buttons do you take?(1-3)");          player2 = in.nextInt();       }       System.out.println("Player 1, you lose.");    }   return x; }  public static int pvc1(int buttonNum){   Scanner in = new Scanner(System.in);   int player1 = 0;   int x = 0; //determines who wins    ButtonsLab [] aiChoice;   aiChoice = new ButtonsLab[buttonNum];    for(int i = 0; i < aiChoice.length; i++){      aiChoice[i].fillMyArray();   }    while (buttonNum > 1){      while (player1 < 1 || player1 > 3){          System.out.println("Player 1: How many buttons do you take?(1-3)");          player1 = in.nextInt();       }       buttonNum -= player1;       int rnd = new Random().nextInt(aiChoice.length);      System.out.println("AI selects " + rnd);       player1 = 0;    }   return x; }  public static void main (String[] args) {   Scanner in = new Scanner(System.in);   int buttonNum = 0;   int gameOpt = 0;    while (buttonNum < 10 || buttonNum > 100){       System.out.println("How many buttons are on the board initially?(10-100)");       buttonNum = in.nextInt();   }    System.out.println("Options: Play against a friend (1) Play against easy computer (2) Play against hard computer (3)");    gameOpt = in.nextInt();    switch(gameOpt){      case 1:         pvp(buttonNum);         break;      case 2:         pvc1(buttonNum);         break;     }  }  }


Ubuntu 16.04 Server updates - Temporary failure resolving 'ro.archive.ubuntu.com'

Fresh install of Ubuntu 16.04 Server tty1  26 packages can be updated 12 updates are security updates.   When I try to use sudo apt-get update, this shows up:  Err:1 http://ro.archive.ubuntu.com/ubuntu xenial InRelease          temporary failure resolving 'ro.archive.ubuntu.com' Err:2 http://ro.archive.ubuntu.com/ubuntu xenial-security InRelease          temporary failure resolving 'ro.archive.ubuntu.com' Err:3 ... xenial-updates InRelease          temporary failure resolving 'ro.archive.ubuntu.com' Err:4... xenial-backports InRelease          temporary failure resolving 'ro.archive.ubuntu.com' Failed to fetch http://ro.archive.ubuntu.com/ubuntu xenial InRelease  temporary failure resolving 'ro.archive.ubuntu.com' failed to fetch .... ... some index failed to download. They gave been ignored,or old ones used instead.   I ran nslookup google.com:   connection timed out; no servers could be reached   Now, I tried all I could find on the internet about this issue, like adding Google DNS server in /etc/resolv.conf, then dpkg-reconfigure etc. Nothing worked.  If you need any additional info in helping me resolve this problem I am happy to provide. I'm new to Ubuntu so I don't really know much. Any additional help is welcome.  Thank you in advance!


Viewed, deleted comments staying in inbox

Lets start with a life-like scenario.  User A receives an offensive comment in his inbox from the OP of a question. A then clicks on the notification in order to flag the offending comment. A mod sees the flag and deletes the comment. Shortly after, the question is also deleted. Because A clicked on the notification in the inbox, that notification is still in A's inbox, with the offensive part of the comment still visible. Edit: The flag was marked helpful because the post was deleted, not because the comment was deleted by a mod.  Please note that although the behaviour of the notifications is as it is supposed to be, this does not fix the possible problem of such notifications "hanging around". User A can't get rid of that comment in any way, and it may be a long time before it is flushed out by new messages. This issue is mentioned in  but it is supposed to be that comments on a post that you own can hang around, not on someone else's post.  is speaking about comments which have not been read and this . To me this seem like an important issue. To have to see an offensive message every time you open your inbox is not a good thing. I can think of two ways in which this problem can be avoided:  Make sure notifications for deleted comments don't hang around (this I'm sure is the easier option) Allow users to delete unwanted notifications (this could be useful, as this would also allow users to remove notifications that they are not interested in, or even just to keep their inbox uncluttered. It would most likely be hard to implement, though.)  What are your thoughts on this?


Comma-separated lines of code inside braceless loop

I came across this block of code when studying for my class. It was in my professor's presentation and I thought it was an error, so out of pure curiosity, I tried to compile it. To my surprise, it's actually a valid code. I tried looking it up online but couldn't find a clear answer as to why exactly does it work.  int n, num; scanf("%d", &n); vector<int> arr; arr.reserve(n);  while (n--)         scanf("%d", &num),         arr.push_back(num);  for (int i : arr) printf("%d ", i); printf("\n");   I expected the while-loop to cause a compilation error, but it runs smoothly. Is it standard or was that introduced recently?


Passive aggressive, "jokey" yet condescending and manipulative behavior/language

The behavior I'm hoping to find an English word for is characterized by a person saying something bitingly aggressive/hurtful/manipulative, but is then followed by something like "I hope you didn't take that seriously" or "I was only joking", but is in fact supposed to be taken as a serious statement/threat.  Given this example dialog, what word best describes the behavior of Person A:          >     Person A: You know you can come to me for anything, I'm here for you. I know you want to take over the team.          >     Person B: Thank you! I appreciate that, it seems that management finds that I'm a nice fit for the role.          >     Person A: Well you know that I'm in charge, and that if you want to take this new position, you'll have to go through me. I don't like outsiders telling me what to do, and you're nothing special. I'd do anything to get you fired.          >     Person B: *confused and shocked look*          >     Person A: I'm only kidding! Don't take things so seriously! Jeeze some people are so sensitive...


I'm using a longtable for the nomenclature produced by the nomencl package. Here, the longtable serves as a tabluar replacement. Unfortunately, the usage confuses the totalcount package resulting in an uncorrect table count.  MWE:  \documentclass{report} \usepackage{longtable} \usepackage[figure,table]{totalcount}  \begin{document} \verb|\totaltables| is \totaltables, but should be 2.  \begin{table}One\caption{Table One}\end{table} % ONE \begin{table}Two\caption{Table Two}\end{table} % TWO  \begin{longtable}{cc} Long & Bla \end{longtable}  \end{document}   Result:


Do eigenvectors of quantum operators span the whole Hilbert Space?

I am trying to solve an exercise in Shankar's QM book (concretely 4.2.1), and I am asked the probability of each possible value for the operator $L_x$ when the particle is in a certain eigenstate of another operator $L_z$. I understand that I have to "expand" the state vector in the $L_z$ basis, which in this case is just the appropriate eigenvector, and then change the base to that of $L_x$, i.e to write the $L_z$ eigenstate in the $L_x$ base. The problem is that there is just no way of doing it, since the eigenvectors of $L_x$ don't span the whole Hilbert Space.   I thought all quantum operators had a set of eigenvectors that spanned the whole space, am I wrong on that or am I wrong on my algebra?


Images added with graphicx never stays where I put them

I've tried this in different occasions within the past year and I have always had the same problem. I go to the line of the Latex code where I want to insert my images using \begin{figure}, but the images appear before the content in the previous lines:  \lstinputlisting{q9_1_c.m}   \vspace*{5\baselineskip}  \begin{figure}[!tbp]   \centering   \begin{minipage}[b]{0.3\textwidth}     \includegraphics[width=\textwidth]{diff_6}     \caption{$\nu = 6$.}   \end{minipage}   \hfill   \begin{minipage}[b]{0.3\textwidth}     \includegraphics[width=\textwidth]{diff_7}     \caption{$\nu = 7$}  \end{minipage}    \hfill  \begin{minipage}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{diff_8} \caption{$\nu = 8$}  \end{minipage} \end{figure}   produces a layout in which the images precede the code included using \lstinputlisting{}. This is not an issue if I just use \includegraphics, but I needed to put 3 images next to each other. Why doesn't this work?


Using the substitution $u=\frac{\pi}{2}-x$ to transform and evaluate the integral

I was asked to prove the fact that $$\int_{0}^a f(x)dx=\int_{0}^af(a-x)dx$$  The first part was quite easy to sort out by using the substitution $u=a-x$, but the second part of the question was to use the first part with $a=\frac{\pi}{2}$ to show that $$\int_0^\frac{\pi}{2}\frac{dx}{\sin x+\cos x}=\frac{\pi}{4}\int_0^\frac{\pi}{2}\frac{dx}{\sin x+\cos x}=\frac{\pi}{4}\sqrt{2}\ln(1+\sqrt{2})$$  Any help on this question is appreciated.


I know that in order to make an header, you need to add === in the following line. This is an example. However, sometimes you need to add an header under a quote, because it is part of the text you want to quote. So I thought I can do something like that:  Which seems to work great in the preview, but then when publishing, this is the result:  Should that work? Am I doing something wrong? This is the post I used as a reference(I have edited it, so the current version has an header using ):


When you fly through your Blender 3D world, you can fly through things. However, sometimes I fly through objects, and before I even get close to them, the objects start cutting off(visually). See image:    How can I stop Blender from doing this? Or at least make it do so, when I get closer to the object?  There are some camera angles that I can't get because Blender cuts away the object in my view/cam


Is there any way to declare a list object of anonymous type. I mean  List<var> someVariable = new List<var>(); someVariable.Add(              new{Name="Krishna",                   Phones = new[] {"555-555-5555", "666-666-6666"}}                 );   This is because I need to create a collection at runtime.


how to json_encode data containing utf-8 characters

I want to pass the result of a mysql query out as JSON in PHP 5.6.3. The data contains non alphanumeric characters, particularly in this case the 'degrees' symbol (as in '45º').  json_encode seems to fail silently if the data contains such characters:  $json = json_encode($my_obj);   I can make the encode step work by using utf8_encode on the offending properties:  $my_obj->description = utf8_encode($my_obj->description);   ...but then I get output like this: '45Âº' which is not desirable.  The database table uses UTF-8 Unicode encoding (utf_unicode_ci) and the data appears to be stored and retrieved successfully. It just breaks json_encode when it finds these characters.  How to solve this?


I want to calculate a simple right shift in java, but I don't get correct answer?

I want to get answer 4, but my code prints 2. I don't know why? public class Test {     public static void main(String[] args) {         System.out.println(9 >> 2);     } }


I have a legacy WinForms Mdi App in VB.Net 2.0 which I am adding functionality to. One of the additions is a warning which needs to be raised when the current time nears a specified value (a deadline). My intention is to check the time once an hour until there is less than an hour until the deadline, then display warnings at specified intervals until the time's up.  The user needs to be able to continue to use the app up to and even after the deadline, but they need to periodically be made aware of the deadline's proximity.   The app does not use System.Threading yet and my knowledge of it is limited at this time. I do know that there are 3 different Timer() methods available:    System.Threading.Timer(), Windows.Forms.Timer() and  System.Timers.Timer()   My question is, which is the best way to go with this? I attempted to use the threaded timer, but since WinForms are not thread safe I got a run time error trying to access another class. Is it worth making the class/form thread safe? Am I completely off track?  Thanks.