If I type stty -a on pts/0, it shows icanon among other flags, which is expected. However, if I run stty from a terminal which is not the controlling terminal of the (bash) shell that I am currently in, it outputs -icanon. To summarize:  stty -a < /dev/pts/0 from pts/0, gives icanon, same as stty -a stty -a < /dev/pts/0 from pts/1, gives -icanon stty -a < /dev/pts/1 from pts/1, gives icanon, same as stty -a stty -a < /dev/pts/1 from pts/0, gives -icanon  What's going on?

If I open up a terminal (xfce4-terminal 0.6.3, but I doubt it matters) and I look at what terminal attributes are set (BASH is running in the terminal),  $ stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -extproc   then I have a whole bunch of terminal attributes. Fine enough. If I then take a look at what terminal I'm using:  $ tty /dev/pts/0   then, on a new tab of my terminal (which new tab happens to be /dev/pts/1) I look at the terminal attributes of my first terminal, it seems to have slightly different terminal attributes:  $ stty -a -F /dev/pts/0 speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = <undef>; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff -iuclc ixany imaxbel iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -extproc   Notably, the original terminal here appears to not be in canonical mode, it has no literal next special character...  So why does this happen? I'd like to be able to look at things like this to see, e.g., if modern ed uses canonical mode, but if there's a Heisenberg problem of looking at it from another terminal, I don't know how I'd do it.  So, my two main questions:   Does the terminal just appear to have different attributes when I look at it from another terminal? (e.g. is my first terminal still in canonical mode, but stty -a -F returns incorrect information?) If the terminal does really change attributes when I switch to the other terminal, how does it know? Is the 1st terminal somehow informed when I'm not directly looking at it?   P.S.: I tried this on the Linux Console also, just to make sure it wasn't a pseudo-terminal thing. Same results.


I inherited this bike with this funny looking stem. Is this broken? How do I inflate it?

This is the valve I have on my bike, but my current pump does not work with it. What kind of pump do I need to buy that will work with it?


With what should I clean the screen of my Macbook mid-2010 White unibody? Which kind of liquid would you suggest?

I try to clean my mid-2015 Macbook Pro with Retina display by wiping the screen with a damp cloth and then immediately drying.  However, there seems to be left some residue/streak marks, which look very oily. Sometimes these disappear after a few minutes, but they are still very unsightly, and a bit worrying (is there something wrong with my screen?)  I'm wondering if there are other cleaning techniques which avoid this issue, or whether this is completely normal behaviour.  Thank you!


For instance, is the pet store PETSMART meant to be Pets Mart, or Pet Smart? That's not actually my question, as I'm pretty sure it's Pet Smart. I'm just asking what it's called when a word either CAN be split into multiple ways to present alternative meanings, or WAS MEANT TO be able to be interpreted two or more different ways through this method.  If you're wondering the source of the question, there is a game on Kickstarter right now called PooPride featuring human waste as protagonists. And given that it's a racing game, I imagine the name is meant to have a second meaning as Poop Ride.

I'm thinking similar to a , but you could break the word at a different or multiple places.  Granted I cannot think of a real-world example, but I have included two situations where this has happened.  If I had a domain name that was photospork.com, this could be interpreted as:   photo + spork, a gallery of a cutlery collector's obsession with sporks, or photos + pork, a culinary site dedicated to showing users the best cuts of pork.   Another example is when I named a work project toolscore, which can again be represented as either:   tools + core, to represent the core component of the tools, or tool + score, to show the highest score reached using that tool.


When I click on the li I got a new li created. However clicking I want the same event on the new list items so I used:  $('ul').on( 'click', $this, function(){   But now the content is duplicated!

1

2

   JS:  (function(){     $('li').each(function(){         var $this = $(this);         $('ul').on( 'click', $this, function(){             $('ul').append('
new
');         });     }); })(jQuery)     I just want when you click on the existing or new list items you got 1 new created list item. Thank you.

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


My main elect panel in the house has a common neutral/ground bar and not separate bars.  If I run from this panel to a sub panel in a detached pole barn and attach the two hots for 240V and one neutral that is connected to the neutral/ground combination bar in the main panel, am I grounded properly?  Would I also need a ground rod in the pole barn and if so, does it get connected to the neutral bar or is it grounded to the sub panel itself?

I Will be installing a subpanel in a detached garage. The subpanel will be 60 amp. The garage is about 30' from the main-panel in-house, and I will of course get an exact length before selecting the proper gauge wiring. I'll be using pvc underground for the wiring. There is already existing wiring going underground from the house to the garage, which will no longer be used. When it comes to grounding this subpanel, should I run a grounding conductor from the main panel to the new sub, or ground the sub to earth?  Reading  answer sounds like I would have to ground the subpanel to the main, primarily because in my situation this is a new install. All other variables I have control over.    If so, I would be running 4 wires from the main panel to the sub, 2 hots, 1 neutral, and 1 ground correct?  Then, at the subpanel, the ground bus bar and the neutral bus bar would not be connected, and the grounding screw removed from the ground bus bar?  Lastly, a GFCI Breaker must be used at the main, right? I believe this is true for any subpanel in a detached building, just want to be sure.


I have the following jQuery code:  $('.class-name').each(function() {     $(this).parent().prepend(this); });   So it targets .class-name and works fine on page load.  I want it to also target any elements that is added dynamically (after page load) with class .class-name.  How can I do this?


I was taking a calculus competitive test, and I encountered this problem:  Henrik is randomly choosing numbers between $0$ and $1$ until the sum of all of the numbers that he has chosen exceeds $1$. What is the expected number of numbers Henrik will choose?  I spent a good amount of time on this, but I can't even think of a way to approach the problem.  I'm currently taking AP Calculus BC, so I know a good amount of calculus, but I feel like I'm missing the intuition to tackle problems like this where calculus is applied to probability.  Any help would be appreciated.

Choose a random number between $0$ and $1$ and record its value. Do this again and add the second number to the first number. Keep doing this until the sum of the numbers exceeds $1$. What's the expected value of the number of random numbers needed to accomplish this?


#import<iostream> using namespace std; int main() {     //trying to test pointers & reference     int x = 5;     int y = 6;     int *p;     p = &y;     *p = 10;     int &r = x;     cout<<"X reference\n"<<&r<<"\n"<<"value:"<<r<<"\n";     r=y;     cout<<"Y reference\n"<<&r<<"\n"<<"value:"<<r<<"\n"; }   In this code, I have assigned &r to x at first and then I have assigned r to y.   What is the difference between assigning & r=x and r=y? Kindly help me out.

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


Maybe I'm just stupid, but I can't figure out how I'm supposed to get from a question (in the Android App) to the site the question is on.   I know I can open the left drawer, tap "All Sites", and type in the name of the site I want to go to, but it seems like there should be a way to get from a question to its site without all that rigmarole. (Tapping the back button works if I was on the site in the first place, but if I get to a question from my feed or from a link in my browser or something, that doesn't help.)

When viewing a question on a site which I don't use (I never registered on it), I can't figure out how to get back to the list of questions of the site.  See this example  from the Stack Exchange Android app. Where should I click to see the list of questions? (I chose Mathematics Educators because it's the most recent site, it is very likely that most users don't have an account on this website)  Here is a random example:    When viewing a question, I don't know how to view the list of questions. This site can't be found in the sidebar since it's not in my Your Sites list. The top menu containing the site's title only opens the sidebar.


Is there going to be a Popular Profile badge?  Imagine the situation:   when the total unique visitors of some guy's personal profile is greater than 10.000 in a week or something like that he could earn a badge for that.

I think it would be neat to earn a badge for having X number of profile views. You could have different levels, for example:      Bronze - [Renown]    - 300 views     Silver - [Celebrity] - 1000 views     Gold   - [Eminence]  - 3000 views  I know this really doesn't necessarily "encourage positive behavior" directly, but it is a good indicator that people are either eager to read your other questions/answers (which is likely because you've provided a thoughtful response). It could of course also be that you've offended someone for some reason. Either way, it shows you are participating in the community. What do you think? If you agree, would you suggest any changes on the name/count/type of badges that would be awarded? Bounty added: I'm still interested in whether this will become a badge or not...  General consensus (thus far):  Number of views should be increased Remove gold badge altogether (I didn't like the name celebrity anyway...)  So:      Bronze - [Renown]   - 1000 views     Silver - [Eminence] - 3000 views  Another general problem seems to be "how does this encourage positive behavior", which I have already outlined above. It's more of a metric that shows your participation in the community through a "wow" factor (again, this could be seen as negative). Why is it even in the profile in the first place if it's a negative thing? Any other thoughts?


Can't seem to find a way to run Mupen64plus on ubuntu 13.10. Kind of new to ubuntu, but i've had previous experience. i can find it in the store but it's not in my installed applications. Please help. appreciated!

I'm new to Ubuntu and Linux and I just downloaded mupen64plus 1.99.5 and it came as a *.tar.gz file. I found some guides about how to install a .tar.gz file with the terminal but it doesn't work. How can I install it?


Quantum entanglement says that we can entangle two particles with an opposite property, separate them, and that they exist in an indeterminate state until we observe one of them.  eg. If we create a left/right pair, separate them in space then observe one of the particles then the other particle of the pair will instantly resolve into the opposite state of the particle we observed.  Question: How do we know this is true? How do we know that something happened to the second particle as a result of observing the first?  A much simpler explanation is that both the particles flipped into fixed left/right states at the moment we started to separate them, we simply hadn't opened the containers yet to see which was which.  I assume that there can be no possible experiment to distinguish between these two explanations since we're not allowed to observe either particle.  What reason(s) do we have to believe the magical 'quantum' explanation when the simple explanation explains it just as well?

I have never found experimental evidence that measuring one entangled particle causes the state of the other entangled particle to change, rather than just being revealed.  Using the spin up spin down example we know that one of the particles will be spin up and the other spin down, so when we measure one and find it is spin up we know the other is spin down. Is there any situation after creation that the particle with spin up will change to spin down?


Let's say I have two classes. Class1 and Class2.  The constructor of Class2 looks like this:  public Class2{  Class1 c;      public Class2(Class1 c){         this.c = c;     }  }   When creating an instance of Class2 inside the code of Class1, we pass the existing instance of Class1 to Class2. This is from Class1:  Class2 c2 = new Class2(this);   Inside Class2, I want to manipulate the variables inside the instance of Class1 that's been passed to Class2.  My question is:  If I make changes to the c (the instance of Class1 that's been passed to Class2), am I affecting the original instance of Class1, or just a copy?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


In Greek, λογικοφανής is a word that describes a person who spits out seemingly logical statements. It often has a negative connotation as it is targeted towards people who tend to fool the public with supposedly beautifully-constructed thoughts that sound convincing in our ears but are not necessarily accurate. The first word that comes to mind is deceptive, but it is not quite what I look for. Any thoughts?

I believe there is a term for a person who uses 'expert sounding' terminology and exudes confidence, even when their actual abilities are significantly short of their 'presentation'.  Using 'wine' a subject.... if a person described a taste as:     Magnificent bouquet, the esters resonate with hints of mulberry and   asparagus. This must be an oak-matured red from Bordeaux. Perhaps....   2003 vintage, that was a year when unusual rainfall produced an   outstanding crop that had the same rich tannins.   A person describing the wine like that has apparent confidence, apparent technical expertise, and so on. Yet, if he was a fraud, and knew nothing about wines, and the "wine" was really vinegar.... what would you call that person? Additionally, this would not be a one-off thing. This would be a person who consistently "bamboozles" people, and only when you dig below the posturing, or put them in the company of a 'real' expert, do you see the reality.  A fraud, a cheat, an imposter. Those would be true, but I'm sure there's a word which also covers the confidence, charisma, and presentation style too.  I just can't think of it.


I want to add new tag-synonym for some tag's but i don't have any option to do this. When i visit any tag there is a option for see all synonyms for that tag but not option to add new synonyms.  Please any one  tell me how can i add this.  Thanks in advance.

What are tag synonyms? How can tag synonyms be distinguished from "real" tags? How are new tag synonyms created? Who can create tag synonyms? How can I delete/reverse/undo bad tag synonyms? What are merged tags?


I have another project that is exactly like this one but that one works, even though they have the exact same compositing setup. Any reason why this one doesn't show the background?  Blend file:

I tried to add a 3D object to a clip by following a youtube video. But clip doesn't show up in the render or in the compositing tab. It show up even in the camera view. I didn't change any settings. please help. Thank you.    And the  rendered images has only the cube in it like in the picture above.


I'm looking for a shapefile similar to the following image:    I'd just like the outlines of the sectors. I'm only concentrating on the southwest border which is San Diego all the way to Rio Grande Valley, but I'm ok with data on all of the sectors.  Does anyone know where I can find something like this?

I'm interested in locating free GIS shapefile data representing the US / Mexican border. I have found a point layer depicting the border crossing points but I'm interested in a polyline feature representing the actual border.


$\newcommand\C{\mathbb C} \newcommand\bs{\backslash}$There is a book on Riemann surfaces by Forster that I like very much. I am curious about the first exercise in chapter 1 section 4 on branched and unbranched coverings:     Let $X:=\C\bs\{\pm1\}$ and $Y:=\C\bs\{(2k+1)\pi/2 : k\in \mathbb Z\}$.   Show that $\sin: Y\rightarrow X$ is a topological covering map.   Consider the following curves   $$u:[0,1]\rightarrow X \qquad t\mapsto 1-e^{2\pi i t}$$    $$v:[0,1]\rightarrow X \qquad t\mapsto -1+e^{2\pi i t}$$      and let $w_1:[0,1]\rightarrow Y$ be the lifting of $u\cdot v$ with   $w_1(0)=0$ and $w_2:[0,1]\rightarrow Y$ be the lifting of $v\cdot u$   with $w_2(0)=0$. Show that ($w_1$ and $w_2$ are not "loops")    $w_1(1)=2\pi$ ad $w_2(1)=-2\pi$ (and with this one concludes that the   fundamental group $\pi_1(X)$ is non-abelian).   I think I am able to do all this, but I think what I get is that $w_1(1)=4\pi$ and $w_2(1)=-4\pi$ (I tried to visualize the whole thing graphically, which is not easy). Is it really the case that $w_1(1)=2\pi$ and $w_2(1)=-2\pi$ or did I just found an error in the book?

I'm trying to work through the exercises in Otto Forster's book on Riemann Surfaces. While most of them seemed not that hard, this one gives me a headache:  Let $X=\mathbb{C}\setminus\{\pm1\}$  and $Y = \mathbb{C}\setminus\{\frac{\pi}{2}+k\pi~|~k\in\mathbb{Z}\}$. Then $\sin: Y\rightarrow X$ is a covering map. This is clear.  Now consider the following curves:  $$ u: [0,1] \rightarrow X, u(t) = 1-e^{2\pi i t}$$  and  $$ v: [0,1] \rightarrow X, v(t) = -1+e^{2\pi i t} = -u(t)$$  Let $w_1: [0,1]\rightarrow Y$ be the lifting of $u\cdot v$ and $w_2$ be the lifting of $v\cdot u$ with $w_1(0)=w_2(0)=0$.  Show that $w_1(1) = 2\pi$ while $w_2(1) = -2\pi$.  As of now, I don't have many ideas how to solve this. Of course, the inverse sine is a multi-valued function so the two liftings should use different branches. But I don't see how exactly they come into play.  I'm also not sure whether the solution can be done by calculations alone or if there is some more general principle underlying. Any suggestions would be welcome.


Please consider below code, I want to reversed the first two elements. That is target string is  "abcd", the first two elements is "ab", and i need "ba". How can i use below code to do it? (I know i have alternative ways to do, but how to do in below way?)      r = "abcd"     t = r[1:0:-1]     print(t)     # print b   Another way:      r = "abcd"     t = r[1:-1:-1]     print(t)     # print NOTHING!

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


I can't figure out how to push a string in an array at a specific index.   Here is my array : var list = ['',''];  I would like to be able to replace, for example, the first array entry, so the list would be :  list = ['something',''];  I tried to found a function for that, but nothing came up...  I know that I can add a string to an array using  list.push('something'); but I don't know how to do something like list.pushThisAt(string, index);  I need your help !

I am looking for a JavaScript array insert method, in the style of:  arr.insert(index, item)   Preferably in jQuery, but any JavaScript implementation will do at this point.


Can anyone please tell me difference between 1 and 2   sudo apt-get install vlc  sudo aptitude install vlc   I tried installing vlc with 1 and it did not work, but with 2 it did. I don't get the difference...

What is difference of apt-get and aptitude? Does both of them use same repositories?  Which one is better?


Possible Duplicate:          When an answer is edited and editor hasn't notified me about edit (using comment), there's no way of knowing about this edit. When question is new, I came to know about it most of times because I check answers often. But, when question is old, I miss edits most of times.  So, it'd be nice if you add this feature.

Seriously, I had not noticed e.g. Jeff's edit  had he not also retagged my question.


I am searching google for answers but i could not get one module to convert doc/pdf/docx/rtf to text  Is there any python module to convert doc/pdf/docx/rtf formats to text?

Is there any python module to convert PDF files into text? I tried  found in Activestate which uses pypdf but the text generated had no space between and was of no use.


There was a choose your own adventure book that I read sometime in the late 80's, early 90's. I live in Northern Virginia, if that helps. Anyway, the story was science fiction - possibly a different universe, as none of the characters looked human (other than shape) and the locations didn't look like earth.  I remember a complicated maze that the protagonist had to go through. Also, the protagonist looked kinda like a power ranger, but this definitely wasn't power rangers. I believe it was black and white. I remember, maybe space ships - as in at the end of the adventure maybe the protagonist took off?  I've been looking for this book for decades. I believe it was part of a series of choose your own adventure books (as in publisher, the books themselves were not related to each other, just the look/style).

When I was little I remember getting these two books from the library.  Both books were paperback and flimsy.  The pages were wide.  Each book had full page illustrations with puzzles and mazes in them, but it was like you were immersed in this setting completely.  They were also like choose-your-own adventure books, but only in the way that you go through the book in a different order based on your results in the puzzles/games.    For example, there is a bridge to cross, or you can take this path.  If you choose to cross the bridge you go to page x.  On page x you have to pretend to cross the bridge but some planks are broken.  You can't skip more than a certain number of planks, but you also cannot "step" on a broken plank.  One book was in a jungle setting with rope bridges, alligators, quick sand, etc. The other was in space, with all kinds of aliens and weird stuff.  I have faint memories of these books but I REALLY want to track them down because I remember loving them.


Context: In my real experiment I am planning to include a questionnaire. I aim to measure 4 different constructs  with multiple questions per construct. The questionnaire now consists of 24 items. I created more questions than I need with the idea of doing a pre-test and then reducing the number of questions to 12 based on the results of factor analysis.  I was thinking of having a sample size of 30 people to participate in my pre-test, but is just what I came up with.  Question:  What is the minimum sample size required for exploratory factor analysis in order to reliably refine a multi-factor questionnaire?

If I have a dataset with $n$ observations and $p$ variables (dimensions), and generally $n$ is small ($n=12-16$), and $p$ may range from small ($p = 4-10$) to perhaps much larger ($p= 30-50$).  I remember learning that $n$ should be much larger than $p$ in order to run principal component analysis (PCA) or factor analysis (FA), but it seems like this may not be so in my data. Note that for my purposes I am rarely interested in any principal components past PC2.   Questions:   What are the rules of thumb for minimum sample size when PCA is OK to use, and when it is not? Is it ever OK to use the first few PCs even if $n=p$ or $n<p$?  Are there any references on this? Does it matter if your main goal is to use PC1 and possibly PC2 either:    simply graphically, or  as synthetic variable then used in regression?


I'm trying to replicate ARIMA (1,0,1)(1,0,1) equation in excel as a formula but I am not able to understand the interpretation of white noise residual e(t) or u(t).If could help me understand the interpretation and how to derive it from raw data it'll be really great.  Thanks


Error_log file size from Var/Log/Cups/ is increasing so much (70GB+) and wont stop until i get the error saying i don't have enough space left.  ***Error_log***    W [08/Jun/2017:18:59:48 +0530] Notifier for subscription 3 (dbus://) went away, retrying!  E [08/Jun/2017:18:59:48 +0530] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions   These 2 errors are written constantly to the Error_Log. I think about 50 Megabytes/sec. Making system lag

A few days ago I realized my Ubuntu machine wouldn't load after login. After some digging around on a liveCD I realized my HDD was at 100% capacity, so I deleted some large files and was able to log in. I didn't have sudo permissions any more and had to boot into recovery mode and change the sodoers file, but eventually recovered root permissions.   I then noticed my machine was a little sluggish, and top was showing cupsd using 100% CPU. I've never seen this program before but I soon realized it was a legitimate program.   I the deleted about 40GB worth of videos, only to see my drive space deplete almost instantly in front of my eyes. With a little research and intuition, I realized it might be a a log file being blown up, and sure enough ls -lh /var/log/cups/ shown me an error_log file that was 80GB+ large.   I deleted the file sudo rm -rf /var/log/cups/error_log, killed the service with sudo service cups end, and went on my business. I realized after that it would have been a good idea to check out the contents of error_log before I deleted it, but I wanted to get rid of the thing before I was locked out again.  That was yesterday. Today, I started my laptop again and saw cupsd running again at 100% cpu, and sure enough I see my disk space depleting. I stopped the service and run tail -f /var/log/cups/error_log, and there are millions of lines of this:  W [15/Jul/2015:11:23:03 -0700] Notifier for subscription 911 (dbus://) went away, retrying! E [15/Jul/2015:11:23:03 -0700] File "/usr/lib/cups/notifier/dbus" has insecure permissions (0100777/uid=0/gid=0).   ==EDIT=================================================================  ls -l /usr/lib/cups/notifier/dbus shows permissions and ownership as -rwxrwxrwx 1 root root when they should be -rwxr-xr-x 1 daemon root, as described in the comments. sudo chown root:root /usr/lib/cups/notifier/dbus also did not fix the ownership problems.   Finally I removed and reinstalled cups, but to no avail. These links were given as potentially helpful guides,(,) but they ultimately result in suggesting a reinstall of the OS itself.


I was trying to design a battery charger for my application where I have made a pack of 1s4p cells where each cell is having 2600mAH and Charging rating as 4.2V. So can I consider it as 1 cell? Can I use LTC4001 - 2A Synchronous Buck Li-Ion Charger for this pack?

I wanted some opinion on my set up here, just to make sure I got the basics right.  I have a Li-ion battery charging circuit based on the MCP73113. This is designed to be a single-cell battery charger.   The battery itself (3.7V, 650mAh) comes with its own PCB with Schottky diode and current regulators as protection. EDIT: Not a Schottky diode. Current limiter and a Protection IC.  By design, they work together just fine.  I have more batteries from the same manufacturer and wanted to make higher capacity packs by putting two cells in parallel. The two cells come with their own PCB, but I only kept one of them, as I soldered their leads together. It seems to work and they are charged and discharged just like regular batteries (3.7V, now 1300 mAh).  However, not all the packs I made work smoothly and I get a failure rate of 2 in every 10 packs. They all start out normally, but occasionally when the batteries are not charged for some time, or are used up, they tend to not work anymore. So far, in only 1 pack I found the voltage to be different (both now below 2V, aka dead).  I assume my method is not the right approach to ensure 100% success rate, so I was wondering how can this be solved. All the controllers I looked into was designed for multiple cells in series, not parallel. Am I fundamentally missing something here?


I try to understand how to find a $l$-adic expansion of rational numbers. So I tried with $\frac{1}{2}$. Unfortunately I failed.   What I know\think:  We have two cases. What if $l$ is odd? What if $l$ is even?  I have to find:$$\frac{1}{2} = \sum_{i=\infty}^{\infty} z_i\cdot l^{-i},$$ $z_i\in\{ 1,...,l-1\}$ and $l \ge 2$.

Can anyone teach me about p-adic expansion? especially the case where we have to expand a square root.  I need to know how to construct them. for example: the 7-adic expansion of $\sqrt{305}$.  This is a general question and not an assignment or anything, so i cannot post the progress.   That is just a random example, please use any other example to explain if it's easier to understand.  edit: I'm stuck with the cases where i have to expand the square roots, expanding rational numbers is fine though


How can I use these both OS on my laptop, without having to reinstall one? For my personal use I always had Ubuntu installed (13.10 32bit) as my single OS. Then for my new job I needed to install Win8.1 (64bit). Now I have these both OS on a separate partition, but I can boot only to a Win8.1 OS.  Is there a way that I can restore the Grub or whatever to do, in order to have a choice to boot any of my two OS (preferably without having to reinstall one)?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I know that with the case $$\int_0^{\infty}xe^{-ax}dx$$ You just substitute $u=ax$ and use the gamma function after so that it evaluates to $\frac{1}{a^2}$. However this clearly involves switching the bounds. So in this case, if $a$ were a positive imaginary number we would have our upper bound be $u=i\infty$. So I suppose my question is to show why $$\int_0^{\infty}xe^{-ax}dx$$ Obeys the equality to $\frac{1}{a^2}$ for complex $a$. $EDIT$ I know how to do Integration by parts and u substitution, that’s not the problem. The problem is what complex analysis backs up the fact that the integral obeys the identity $$\int_0^{\infty}xe^{-ax}dx = \frac{1}{a^2}$$ For some complex $a$.

While studying the 1/f noise, I found this webpage   It gives the following Fourier tranform pairs     However, there are no detailed explanation on how this formula is derived.   Can you help with this?   Thank you!


I was looking at  and came across this:        sudo -i  (to get a root shell, sudo gedit is not recommended)   gedit /etc/default/grub      I was wondering why sudo gedit is not recommended. In fact, it seems that it's better than the sudo -i method because a forgetful user may inadvertently run an undesired command as root, which can have a much larger consequence than the other way around.

I've read  and am interested in this line:     You should never use normal sudo to start graphical applications as Root.   Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.


I have partitions that I would like to rename.  What are the terminal commands to do this?

I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:  (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test  (udisks-error-quark, 0))   and this happen also to any attached usb to my laptop.


I have lenovo Z580 laptop and dual-booted my system with windows 8 and ubuntu 13.04. I can connect to internet using windows 8(both wired & wireless) but cannot connect using ubuntu(both). It always shows me that "I am in offline mode"

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I need a word for this definition:  "Someone who started a new work/job/etc but has a long way in front to achieve the goal."  Do you know of any word?

I'm looking for a term to describe someone who literally has zero knowledge of a topic.  Initially I thought of using something like green field but that doesn't really describe the person, it really describes a situation.  The context of this is for providing training.     {what goes here?} Beginner Intermediate Expert


I'm looking for a commonly used symbol that denotes a set of vector fields. It looks like an \st{$\chi$} (using the soul package, that is, \usepackage{soul}, but doesn't look so artificial.  Can someone help me? Also, this is my first posting on this SE so I'm not entirely sure of how to format things.  Thanks!

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


$V$ is an inner product space and $u, v$ belong to $V$. I need to prove that $\langle u,v\rangle  = 0$ iff $\|u\| \le \|u+cv\|$ for all scalars $c$. So far to show the backward proof, I've established that $0 \le \overline{c}\langle   u,v\rangle  + c\langle v,u \rangle + c\langle v,v\rangle $ but don't think I am on the right track. Any hints or methods would be much appreciated!

Prove that $\langle u,v\rangle=0\Longleftrightarrow \|u\|\leq \|u+av\|$.  So far I can get the $\Longrightarrow$ very easily, but I need some help with the $\Longleftarrow$ implication, any hints would be greatly appreciated.  Please no answers, I just want a small nudge to get me in the right direction, I've been stumped on this for a little bit.  Here's what I have so far:  ($\Longleftarrow$)  Assume $\|u\| \leq \|u+av\|$  $\|u+av\|^2=\langle u+av,u+av\rangle=\langle u,u\rangle+ \langle u,av\rangle+\langle av,u\rangle+\langle v,v\rangle=\|u\|^2+\bar{a} \langle u,v\rangle+a\langle v,u\rangle+\|v\|^2=\|u\|^2+ \bar{a}\bar{\langle v,u\rangle}+a\langle v,u\rangle+\|v\|^2$  Thoughts/ideas?


I've got following sentence in a visa application form:     You are not required to provide a medical certificate or    Chest X-ray Certificate if you will be in New Zealand for less than six months.   I fully understand the meaning. But the sentence does not match the , and this confuses me.  So, the questions are:   Is this a legitimate use? Are there any grammatical rules in place?

All the textbooks I have ever come across during the course of my studying English emphasize that future tense should not be used in conditional clauses. For example,  If it rains in the evening, we will not go for a walk. (if it will rain in the evening...) We decided to go for a walk if it didn't rain in the evening. (...if it wouldn't rain in the evening)  However, in the following sentence I'm really inclined to use the future tense.  Don't implement this feature if it will significantly increase the complexity of the user interface.  According to all the rules I know of, the future tense is illegal here. However, my gut feeling tells me that the sentence is correct. If I am wrong, the question ends here. Otherwise please read on. I find the last example different from my first two because:  In the first examples we must wait and see if the condition is true, and then make a decision accordingly, whereas in the last example, we must actually analyze/predict/forecast the future in order to make the decision in the present. (might be irrelevant) In my first language - Armenian - where we have a special mood for conditions, the translation of the third sentence actually uses indicative, whereas the first two use that special mood (the conditional mood, as it were).  Since the second would-be principle is easier for me to experiment with, I noticed that every time a condition uses the indicative mood in my language, I'm inclined to use the future tense in English. As another example:  I will give you the money if it will make you happier.  Am I imagining things or are my examples of the future tense in the conditional clause valid? If they are valid, what rule would you suggest to distinguish the cases when it's OK?  (I do realize that translating a sentence to another language and analyzing the translation doesn't really count as a rule).


Is there a culturally-universal symbol to represent religion or a place of worship?  I would like to avoid having an icon containing multiple religious symbols because that opens up a whole mess of problems and which symbols to show would depend a lot on the cultural of the viewer.

I am involved in a web application where items in a list have a category. Each category of an item is shown through the use of an expressive icon. One of the categories is religion.  My coworker, a graphic designer, is at a loss on how he would represent religion in a logo "neutrally". Some of the items may be associated with Christianity, Islam, Buddhism, etc. so a religion-specific icon would not work and may be potentially offensive.  So, is there a way we can represent it in a different way?


Suppose i have the following class structure. If i execute the child class, it will print both.  Inside Public method Inside Private method  Could anyone explain the reason how the private method code is reachable to m1 ? class Base {     public void m1()     {         System.out.println("Inside Public method");         m2();     }       private void m2()     {         System.out.println("Inside Private method");     } }   public class Child extends Base {     public static void main(String[] args)     {         Child ob = new Child();         ob.m1();     } }

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


The prompt is to find the ways there are to sit n people on k chairs standing in a row so that no 2 people sit next to each other.  Pigeon hole theorem is what I am using to attempt this problem. since there are k chairs, and n people. we must have at least $k-n+1$ chairs.   Assuming people to be X and chairs to be O, it can be visualized as XOXOXOX so at least n-1 unoccupied chairs are needed to occupy n people in a way that they aren't next to each other or vice versa.  So now we have $k-n+1$ holes and n pigeons to occupy these places, giving us ${k-n+1} \choose{n}$$n!$ ways to do this right since all people are unique.   Let's say we have 9 chairs and 4 people, we have $6\choose4$$4! = 450$ ways to do so.  Is this the correct way to approach a problem like this?

There are n chairs in a row. In how many ways can a teacher sit k students on these chairs so that no 2 students sit next to each other (and obviously no 2 students sit on 1 chair)?  I was thinking about inclusion-exclusion, that each student will sit next to each other, however it isn't good enough since there could be more chairs than students.  Basically currently I have no idea how to solve it.


dev/sda5:%20clean,1538857/37347328%20files,%2013595168/149369856%20blocks  I'm getting that error when I boot my system.

On every bootup it's the same:  /dev/sda1: clean, 908443/38690816 files, 44176803/154733312 blocks   Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? fsck takes up to 30s while booting and so about triples the time needed otherwise.  Full output (partly in German):  Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. fsck von util-linux 2.20.1 /dev/sda1: sauber, 908443/38690816 Dateien, 44176803/154733312 Blöcke udevd[623]: unknown key 'SYSFS{idVendor}' in /lib/udev/rules.d/45-libticables.rules:6  udevd[623]: invalid rule '/lib/udev/rules.d/45-libticables.rules:6'   * Starting mDNS/DNS-SD daemon                                                 [ OK ]  * Starting Reload cups, upon starting avahi-daemon to make sure remote queues are populated                                                                   [ OK ]  * Starting configure network device security                                  [ OK ]  * Starting bluetooth daemon                                                   [ OK ]  ####* Starting all other stuff


I am doing this programming assignment for uni and I am using an ArrayList, now when I select a button I want a textfield to display the farm name text from that ArrayList. Here is a screenshot of my code and errors. The code for jtfFarmName.setText.... works out of "display(int i)" but when I put that code in "display(int i)" and call it like this "display(0)" it gives me that error.  Any help would be amazing, thanks. It is really annoying me. I have already initialized the farm variable;

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


Is there any real-time anti virus for Ubuntu? Which antivirus is good and in real-time (I mean that, if I try to open an infected file or go to a bad website, it stops it).  I read a post in  and here is a part of it:  Anti-virus  If you are running a file server, interface frequently with Windows drives or share files with Windows users, or use virtualization, you will want a virus checker for your Windows files.   Despite extensive misinformation, Linux is not immune from malware (witness the explosion of malware being created for the Linux-based Google Android systems). The malware is not usually spread within the OS itself (as long as the OS is a well-respected distribution obtained through official channels), but in trojan programs downloaded and installed by users outside of the normal software distribution channels (i.e. repositories) of the OS. There is always a danger to using programs downloaded from the Internet from sources other than respected repositories -- it is the primary reason that Debian and (K)Ubuntu retain tight control over their software repositories.   Any file can have malware embedded in it (which is trivial to achieve by concatenation, for example: cat originalfile.avi malware.exe > originalfileplusmalware.avi). The question is whether a user will try to open a file with a program (such as a media player) that has been compromised in a way that allows it to execute the code found in the infected media (e.g. .avi) file. This can occur not only for Windows users but for any OS (including Mac OSX and Linux) with a compromised program (e.g. media player). An example is the extensive problems the Mac OS community is currently having with the Flash player.   Routine scanning of any file downloaded from the Internet, any file imported from another user's computer (even a trusted source, since their attention to virus prevention may not be as compulsive as yours), or any attachment received in an email (even from a trusted sender) should be done with an anti-virus program. So I think that there is a need for anti-virus in Ubuntu.

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


In my office i am using NETGEAR Wi-Fi device. Some person get my wifi password and using my internet connection. I am using NETGEAR genie software. it shows the connected device MAC address & IP address. Then how to block the particular device. (IP address) I have many time change my wifi password. that also no use.     My PC have wired connection with WIFI system. I cant turnoff myWIFI. Bcse my boss using Laptop. i only want to block the particular device IP. Kindly send the solution. My PC OS is win 7 home premium 64bit. my wifi system is NETGEAR-WNR3500Lv2

I kust realized that some other PC is also getting assigned a IP address (DHCP Lease) from my modem. I am sure this is not one of the PCs in my home.  My modem was using WEP security. I know WEP is far less secure and WPA is better, but this actually is a borrowed modem, and I did not know that WEP was used.  I immediately did the following : On My Modem    Changed the encryption mode from WEP to WPA   Changed the password   After this I do not see the intruder PC on the DHCP list.  On my Mac:     Changed the permissions on the public folder to "everyone - no access"   Turned off "File Sharing" in System Preferences (But I would want to turn it back on sometime)   My mac is the one that is always on, Both the admin user and the user I normally use are password protected.  Is the above sufficient? Should I do something more?  Also, is WPA security sufficient? Should I take other steps?


Let $a,b\in \mathbb{R}$ with $a<b$ and $f,g:[a,b]\to\mathbb{R}$ where $f$ is differentiable, continous and monotone increasing and $g$ is continuous show that there exists $\xi \in [a,b]$ such that the following equality holds. $$\int_a^b \! f(x)g(x) \mathrm{d}x = f(a) \int_a^{\xi} \! g(x)\mathrm{d}x+ f(b)\int_{\xi}^b \!g(x)$$ I thought about using partial integration but I couldn't construct a way to prove it. Any help would be appreciated.

Let $f,g,g´$ be continous on $[a,b]$ and $g$ monotone on $[a,b]$; then there exist $c\in (a,b)$ so that $$\int_{a}^{b}f(x)g(x)dx=g(a)\int_{a}^{c}f(x)dx+g(b)\int_{c}^{b}f(x)dx$$  Ineed to apply the first generalized mean value theorem for integrals i.e. $$\int_{a}^{b}f(x)g(x)dx=f(c)\int_{a}^{b}g(x)dx$$ to $g´$and $\int_{a}^{x}f(x)dx$ but I don´t know how please I would appreciate your help


Prelude  While studying trigonometry, I came across this very interesting problem. It wasn't very difficult to solve, however it's result was quite interesting. I have given the solution below. Try to solve it yourself before looking.    Problem  The diagram below shows three equal squares, with angels $\alpha$, $\beta$, $\gamma$ as marked. Prove that $ \alpha + \beta = \gamma $.      Hint  If you are not in the midst of a trigonometry course, chances are you will need to see this hint, as it is an uncommon identity.  Hover below to see a hint.      $ \arctan a + \arctan b = \arctan{\frac{a + b}{1 - ab}} $   This identity was solved earlier in the book I found this problem in (see Postscript). Try to prove this identity for yourself, too!    Postscript  This problem came from the textbook: "Trigonometry" by I. M. Gelfand.

How can I show that $x+y=z$ in the figure without using trigonometry? I have tried to solve it with analytic geometry, but it doesn't work out for me.


How I can make a TabPage in a TabControl visible/hidden and enabled/disabled?


I have this code below. As you can guess, when I press on "foobar", a new element is added. The problem: when I click on the the new element nothing happens, why? Im using jQuery 2.1.
   foobar

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


I am asked to determine using an appropriate test whether the internal concentration of isoleucine is statistically different between appropriate experiments. So I constructed a data frame in R as follow: dat <- data.frame(experiment = c('no glu', 'glu', 'gluFCCP', 'gluV', 'gluN', 'gluNV'),internal_concentration = c(2.38, 8.57, 3.42, 6.17, 4.58,3.51))  print(dat) experiment     internal_concentration 1     no glu                   2.38 2        glu                   8.57 3    gluFCCP                   3.42 4       gluV                   6.17 5       gluN                   4.58 6      gluNV                   3.51  I chose to perform an ANOVA test: model<-lm(dat$internal_concentration~dat$experiment)  anova(model)  Analysis of Variance Table  Response: dat$internal_concentration                Df Sum Sq Mean Sq F value Pr(>F) dat$experiment  5 25.558  5.1117                Residuals       0  0.000    I need the F and p values to determine if there's a significant difference, but this result is not working. How should I interpret this error and any suggestion on how to change the code/method?

I am asked to determine using an appropriate test whether the internal concentration of isoleucine is statistically different between appropriate experiments. So I constructed a data frame in R as follow: dat <- data.frame(experiment = c('no glu', 'glu', 'gluFCCP', 'gluV', 'gluN', 'gluNV'),internal_concentration = c(2.38, 8.57, 3.42, 6.17, 4.58,3.51))  print(dat) experiment     internal_concentration 1     no glu                   2.38 2        glu                   8.57 3    gluFCCP                   3.42 4       gluV                   6.17 5       gluN                   4.58 6      gluNV                   3.51  I chose to perform an ANOVA test: model<-lm(dat$internal_concentration~dat$experiment)  anova(model)  Analysis of Variance Table  Response: dat$internal_concentration                Df Sum Sq Mean Sq F value Pr(>F) dat$experiment  5 25.558  5.1117                Residuals       0  0.000    I need the F and p values to determine if there's a significant difference, but this result is not working. How should I interpret this error and any suggestion on how to change the code/the test used? I just have one value for the concentration for each experiment.


$$\lim _{x\rightarrow a} f(x)+g(x) = f(a)+g(a)$$  Let $ε>0$ be given  Since $f$ and $g$ are continuous, $|f(x)-f(a)|< ε$ when $0<|x-a|< \delta_f $ and $|g(x)-g(a)|< ε$ $\ $ when $0<|x-a|< 𝛿_g$  Let  $𝛿_h$ be defined as $\min(𝛿_g ,𝛿_f)$ and $h(x)$ be defined as $f(x)+g(x)$  $\ |f(x)-f(a)|+|g(x)-g(a)|< 2ε$                $\ |f(x)-f(a) + g(x)-g(a)|< 2ε$  $\ |h(x)-h(a)|< 2ε$  We can replace $𝛿_f$  and  $𝛿_g$ by  $𝛿_h$ to get  $|f(x)-f(a)| < ε$ when $0<|x-a|<𝛿_h$ and $\ |g(x)-g(a)|< ε$ when $0<|x-a|<𝛿_h$  How do I prove that $\ |h(x)-h(a)|< ε$ instead of $\ |h(x)-h(a)|< 2ε$?

$$\lim _{x\rightarrow a} f(x)+g(x) = f(a)+g(a)$$ Let $\epsilon>0$ be given Since $f$ and $g$ are continuous, $|f(x)-f(a)|< \epsilon$ when $0<|x-a|< \delta_f $ and $|g(x)-g(a)|< \epsilon$ $\ $ when $0<|x-a|< \delta_g$ Let  $\delta_h$ be defined as $\min(\delta_g ,\delta_f)$ and $h(x)$ be defined as $f(x)+g(x)$ $$\ |f(x)-f(a)|+|g(x)-g(a)|< 2\epsilon\tag{1}$$ $$\ |f(x)-f(a) + g(x)-g(a)|< 2\epsilon$$ $$\ |h(x)-h(a)|< 2\epsilon$$ We can replace $\delta_f$  and  $\delta_g$ by $𝛿_h$ to get $|f(x)-f(a)| < \epsilon$ when $0<|x-a|<\delta_h$ and $\ |g(x)-g(a)|< \epsilon$ when $0<|x-a|<\delta_h$ Since (1) is true when $0<|x-a|<\delta_h$, we can find a $\delta_h$ for every value of $2ε$ for every $2\epsilon>0$ there is a $\delta>0$ such that $|x−a|<\delta\implies ∣h(x)−h(a)∣<2\epsilon$ and for every $2\epsilon$ there exists an $\epsilon$ so for every $\epsilon$ there exists a $\delta$. Is the proof logically correct and is it worded correctly?


This is my jQuery function:  var flashField = function ($field) {     var colour = $field.css('background-color'); // gets colour ok     $field.css( 'backgroundColor', '#FF0000' ); // sets background ok     $field.animate({ 'backgroundColor': colour }, 1500); // nada }   I want to grab the element's current background, switch it to red and then fade back to the original colour.  However the animate function doesn't do anything and no errors are shown in the console.  What have I done wrong? Have tried searching but can't find anything that shows bad syntax or whatever.  (testing in Chrome 45.0.2454.93 m)

I am trying to animate a change in backgroundColor using jQuery on mouseover.  I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div.  $(".usercontent").mouseover(function() {     $(this).animate({ backgroundColor: "olive" }, "slow"); });   Any ideas?


I am working on porting code from JAVA to C#, and part of the JAVA code uses tokenizer - but it is my understanding that the resulting array from the stringtokenizer in Java will also have the separators (in this case +, -, /, *, (, )) as tokens. I have attempted to use the C# Split() function, but it seems to eliminate the separators themselves. In the end, this will parse a string and run it as a calculation. I have done a lot of research, and have not found any references on the topic.  Does anyone know how to get the actual separators, in the order they were encountered, to be in the split array?  Code for token-izing:  public CalcLexer(String s) {     char[] seps = {'\t','\n','\r','+','-','*','/','(',')'};     tokens = s.Split(seps);     advance(); }   Testing:  static void Main(string[] args)     {         CalcLexer myCalc = new CalcLexer("24+3");         Console.ReadLine();     }   The "24+3" would result in the following output: "24", "3" I am looking for an output of "24", "+", "3"   In the nature of full disclosure, this project is part of a class assignment, and uses the following complete source code:

I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?


Using a Canon T3i, 18-55 kit lens, 18mm, 1/40 sec, F9, ISO 200 on a sunny afternoon I shot two people, shaded, in a cupola.  They came out great, properly exposed.  The sunny front bar of the cupola and the field in the background are washed out.  Is there a way that I could have avoided the washout but kept the good view of the people in the shaded area?  (I tried to upload the picture but the system was telling me that there was a problem because of framing and the shot could not be uploaded, I realize that the picture would have made it easier to advise) This might show the picture I'm referring to.  It's the best I can do.

I took a picture once in a beautiful location with an awesome background, and a cool location to get the shot. The problem is, the location of the subject had substantially less light then the background, giving a silhouette effect. Without using an external flash, and on a low budget, what could I do to improve this picture?  Specifically, I shooting with a DSLR, outdoors. The DSLR has a small pop-up flash. The nearest good light source was maybe 5-10 feet away.   Thanks guys!    How do I avoid a dark subject when there's bright sunlight from windows?  by   I recently shot some photos at a friend's wedding. The location was lovely with lots of light — sometimes too much. The sunlight from the windows and skylights seemed to overpower the shot and the subject/people were very dark. What are some ways to avoid this without using fancy equipment? (I'm just starting out, I'm not a wedding photographer or anything!)  Here is one example I took — and this is after I've lightened it somewhat with Picasa:    I'm using a Nikon D5000 with a standard 18-55mm lens.


How to remove indent between chapter and section in table of contents. I am using document class report. I have made a table of contents as shown in 1st Figure.    The following is code used in package file to create entire formating  \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{mypackage}  [2011/01/11 v0.01 LaTeX package for my own purpose]  \RequirePackage[dvips]{graphicx} \RequirePackage[cmex10]{amsmath} \RequirePackage{setspace} \RequirePackage{float} \usepackage{showframe}  \RequirePackage[margin=1in]{geometry} \usepackage{subcaption} \RequirePackage{cite} \RequirePackage{caption} \RequirePackage{etoolbox} \RequirePackage{tabularx} \RequirePackage[toc,page]{appendix} \usepackage{tocloft} \RequirePackage{titletoc} \RequirePackage[compact]{titlesec} \captionsetup{labelsep=period} \setcounter{secnumdepth}{3}  \makeatletter \patchcmd{\@makechapterhead}{50\p@}{0pt}{}{} \patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{} \makeatother   \cleardoublepage %\cleardoublepage %for openright  \renewcommand{\chaptername}{CHAPTER}  \renewcommand{\thechapter}{\Roman{chapter}}%chapter number in roman  %For displaying chapter title and heading in centre with required font \titleformat{\chapter}[display] {\normalfont\large\bfseries\centering}{\chaptertitlename\ \thechapter}         {0pc}{\large}%changing font size,and centering of chapter heading    \titleformat{\section} {\normalfont}{\thesection}{1em}{\MakeUppercase}   However,I want the table of contents to look as in 2nd Figure . Also how to add page number header above the page numbers. Thanks.

How can I change the settings of my table of contents, so that the sections and subsections are not indented as shown in the second picture. I would also like to center the title of the Contents. I am using the article class.


consider following C code  int a[]={1,2,3,4}; printf("%d",2[a]);   this prints "3".How is it possible? I know in a[2] a is the base address of array.But in 2[a] what is 2? and how it accessses array a?I am totally confused with this representation of array.

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


A part of my program is supposed to create an array holding either an asterisk or a dot. I have to use a prototype function where if the random number generated(between 0 and 1) is less than a variable p, the array should hold '*'. otherwise it should hold '.'. The array created is only producing dots. What's wrong? (i have declared the function earlier in the program)  else { for( i = 0; i<m;i++){     for( j = 0; j<n; j++){                 array[i][j] = assignBomb(p);                 printf("%c", array[i][j]);      }     printf("\n"); }  return 0; }  int assignBomb(double p) {  srand((int)time(0)); //random number seed double random; random = ((double) rand() / RAND_MAX); //generates random number betwn 0 & 1 char cellchar; //declaring a character variable  if (random < p) {     cellchar = '*'; } else {     cellchar = '.'; }  return cellchar; //function returns cellchar }

I need a 'good' way to initialize the pseudo-random number generator in C++. I've found  that states:     In order to generate random-like   numbers, srand is usually initialized   to some distinctive value, like those   related with the execution time. For   example, the value returned by the   function time (declared in header   ctime) is different each second, which   is distinctive enough for most   randoming needs.   Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts.  I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom.  Thanks!  EDIT  Yes, I am actually starting my application multiple times a second and I've run into collisions.


The question was presented during review as off-topic, but was a very clear duplicate of another question with an excellent answer.  When I went to VTC I was informed that I failed the audit.    It is not appropriate to fail an audit immediately upon clicking the Close button without considering the reason to close.  This has happened to me more than once, and indicates a subtle problem with the design of the audit system: questions that deserve to be closed for reasons different from what the audit system assigns them.  Happened again:   The question is definitely "Unclear what you're asking" but was picked by the audit engine and marked as Off-topic.  Once again, just clicking "Close" brings up the verbal scolding without a chance to provide a real, valid close reason.    The audit engine behavior is broken, and is embarrassing conscientious users who are working to cope with the ever-increasing close-vote queue.

Having just  from any of the queues, it was reviewing close votes; however, this audit was flawed in that I didn't even cast a close vote.  Often I press the Close button to preview greater detail and sentiment of the closure, spawning the Why should this question be closed dialog box:    Especially for duplicates, where functionality is solely dependent on spawning this dialog.  From Closing > Duplicate, I can search or view selected duplicates:    Although, I realize general closure reasons are summarized on the page:    This question had 6-upvotes, but seemed very localized referencing subjective query is "taking too long" and even had a sqlfiddle link.  Maybe overly broad regarding performance tuning, the OP was posting like a forum with two answer posts to his own question  and  with one of those answers asking follow-up questions.    Wanting to gauge community response, current closure totals struck my curiosity.  So, I pressed the Close button and boom - oh, the humanity!  I failed, and didn't even cast a close vote.    Votes are not cast until a reason for closure is selected and Vote to Close is pressed.  Taking any review very seriously on this site, it only seems fair that my review quality is tested through actionable steps instead of clicking for more detailed information, leveraging the functional design of the close vote user interface.  Sure, it's complex to seed fake vote totals, and then there's controversy of mindless voting in the majority or people who simply cherry pick 4-vote questions.  Still though, it seems unfair I should hesitate to review further information of vote totals and duplicates before skipping due to the implementation of this audit.


I'm willing to understand how to use golden ratio for layout purposes in Indesign. I've found a couple of 'explanations' over internet but they are too enigmatic and I can't really see the possible usage of it in Indesign projects. I know that other people are doing it so it's possible. Can someone explain it to me ?

The  is the stuff of legend () and is . My question is two-fold, really: Is the Golden Ratio really a good tool used in modern design (defined here as 20th century on forward), and if so, how often is it used outside of the aforementioned known uses?  EDIT: To @e100's first comment, examples of modern use of the Golden Ratio would be a great thing to add here if there any documented or arguably conclusive uses of it.


I am trying to send email from the command line from my ubuntu server. So I started configuring the postfix onto my local machine rather than on server. So basically these are steps which I followed:   sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules   sudo vim /etc/postfix/main.cf  Added below lines into the file:  relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes   sudo vim /etc/postfix/sasl_passwd  Added this one line in the file [smtp.gmail.com]:587    USERNAME@gmail.com:PASSWORD  Permissions and updated the postfix config file.  sudo chmod 400 /etc/postfix/sasl_passwd  sudo postmap /etc/postfix/sasl_passwd   reload the POSTFIX : sudo /etc/init.d/postfix reload  Then on my terminal I run this command :   echo "Test mail from postfix" | mail -s "Test Postfix" you@example.com  But didn't receive the mail. So I checked the log file and that is where i found the below stack trace for it:  postfix/pickup[26530]: A62AF2E29B4: uid=1000 from=<z@mylaptop> postfix/cleanup[27372]: A62AF2E29B4: message-id=<20160428114754.A62AF2E29B4@mylaptop> postfix/qmgr[26529]: A62AF2E29B4: from=<z@mylaptop>, size=365, nrcpt=1 (queue active) postfix/smtp[27379]: cannot load Certificate Authority data: disabling TLS support postfix/smtp[27379]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('/etc/postfix/cacert.pem','r'): postfix/smtp[27379]: warning: TLS library problem: error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172: postfix/smtp[27379]: warning: TLS library problem: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:by_file.c:274: postfix/smtp[27379]: connect to smtp.gmail.com[2404:6800:4003:c02::6d]:587: Network is unreachable postfix/smtp[27379]: A62AF2E29B4: to=<xyz@gmail.com>, relay=smtp.gmail.com[74.125.68.108]:587, delay=1.4, delays=0.01/0.02/1/0.34, dsn=5.7.0, status=bounced (host smtp.gmail.com[74.125.68.108] said: 530  5.7.0 Must issue a STARTTLS command first. g70sm14489231pfb.7 - gsmtp (in reply to MAIL FROM command)) postfix/cleanup[27372]: 5BFDF2E2B48: message-id=<20160428114756.5BFDF2E2B48@mylaptop> postfix/bounce[27383]: A62AF2E29B4: sender non-delivery notification: 5BFDF2E2B48 postfix/qmgr[26529]: 5BFDF2E2B48: from=<>, size=2239, nrcpt=1 (queue active) postfix/qmgr[26529]: A62AF2E29B4: removed postfix/local[27384]: 5BFDF2E2B48: to=<z@mylaptop>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox) postfix/qmgr[26529]: 5BFDF2E2B48: removed

I'm trying to get postfix set-up on Ubuntu 13.04 but no luck so far. I found a few answers here on ServerFault that didn't work. I re-installed a bunch of times, nothing. This is my first time dealing with it, I followed this  and . I tried , nothing. This is what I get from telnet localhost 25 and ehlo localhost:  250-elclanrs.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN   As you can see, no AUTH in there...  This is my main.cf:  smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no  append_dot_mydomain = no  readme_directory = no myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 127.0.0.0/8 192.168.1.0/24 [::1]/128 [fe80::]/64 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all  relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes   Then I've this in sasl_passwd:  [smtp.gmail.com]:587 elclanrs@gmail.com:mypass   I also configured php.ini:  sendmail_path = "/usr/sbin/sendmail -t -i"   Nothing is working, emails are not being sent from PHP. How to make it work?


I upgraded to Ubuntu 18.04 from 16.04. On startup the display is black for 15 minutes, doesn’t boot and is stuck indefinitely displaying Ubuntu logo. Kindly let me know how do I boot successfully as I don’t want to lose my important files.

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


I am new to abstract algebra, group theory. So, its difficult for me to solve this question. Kindly, please help me.

In a finite group, show that the number of nonidentity elements that satisfy the equation $x^5 = e$ is a multiple of 4.  I think that besides $ x, x^2, x^3, x^4 $ also satisfies the given equation but how can I show them distinct ?


I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible?  Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ?  Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of  $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$.

$$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5}  = \lim_{x\rightarrow 5} (x+5)$$  I understand that to evaluate a limit that has a zero ("hole") in the denominator we have to factor and cancel terms, and that the original limit is equal to the new and simplified limit. I understand how to do this procedurally, but I'd like to know why this works. I've only been told the methodology of expanding the $x^2-25$ into $(x-5)(x+5)$, but I don't just want to understand the methodology which my teacher tells me to "just memorize", I really want to know what's going on. I've read about factoring in abstract algebra, and about irreducible polynomials (just an example...), and I'd like to get a bigger picture of the abstract algebra in order to see why we factor the limit and why the simplified is equal to the original if it's missing the $(x-5)$, which has been cancelled. I don't want to just memorize things, I would really like to understand, but I've been told that this is "just how we do it" and that I should "practice to just memorize the procedure." I really want to understand this in abstract algebra terms, please elaborate. Thank you very much.


I want to use Ayli, Eternal Pilgrim in my black and white aggro deck. Would it be possible if someone attacked me and I blocked with a less stronger creature causing it to die but can I activate Ayli, Eternal Pilgrims ability at this same time so a I get something out of it? I’m also asking the same thing about if I used one of my creatures to attack and it got blocked by a higher creature or got countered by a spell there it would die but can I use the sacrifice ability at the same time?

In Magic:The Gathering it is possible to trigger abilities of creatures at the same time you can play instants?  I play it that I can block with a creature and sacrifice it at the same time. The attacking creature blocked this ways does not deal damage because the blocking creature is gone - and I get the bonus for the sacrifice (e.g.  gives me an extra B-Mana).  In a recent discussion the topic came up again. It seems like the rulings even allow for the blocking player to wait until the damage is put on the stack. Once the damage is on the stack, I can sacrifice my creature, gain the benefits from the sacrifice ability AND deal damage to the attacking create. In my Blood Pet example I would be able to kill an attacking creature with toughness 1 and get 1 B-Mana.  Is this correct? Where can I find the official ruling that clarifies that?


My String is like  String body = "GH 1234 RING 5";   I want to extract the number 1234, RING and last 5 into separate variables and want  to compare each of those values..It will be like.. pass = 1234, cmnd = RING and duration = 5 like this.. Please help me to figure out how to achieve this. Im doing like  String body="GH 1234 RING"; String pass=bodypass = body.replaceAll("[^0-9]", "");   to get the 1234 in it.But i cant find how  to retrieve RING and 5.

What regex pattern would need I to pass to  java.lang.String.split()  to split a String into an Array of substrings using all whitespace characters (' ', '\t', '\n', etc.) as delimiters?


If a bard were to scribe Cure Light Wounds into a scroll, would it be possible for a Wizard to write it into his spellbook given that it's the arcane version of the spell?  I know about , but I'm unsure if the rules are different when dealing with a Wizard versus a Sorcerer.

According to the book, the sorcerer can learn an unusual spell from a scroll if the spell is Arcane. A Bard can use Arcane spells, and the "Cure Light Wounds" is available on his magic table.  So if I am a sorcerer and found a "Cure Light Wounds" scroll, would I be able to learn it as an unusual spell?  My question is because on page 64(Players book) there is this situation:     For example, a sorcerer with a scroll or spellbook detailing an    unusual sorcerer/wizard spell (one not on the sorcerer/wizard spell    list in this book) could select that spell as one of his new spells for    attaining a new level, provided that it is of the right spell level. The    sorcerer can’t use this method of spell acquisition to learn spells at a    faster rate, however


I have this input field:    <input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" type="image" class="paypal">     I want to center it on the page, I tried using text-align:center, I tried to wrap it in a div set width to 100% and the margin to auto but it gets stretched in an ugly way, so how can I center it correctly?

Best way to center a <div> element on a page both vertically and horizontally?  I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?


When apt lists an automatically-installed package that I don't recognize, I'd sometimes like to know which manually-installed package originally triggered the installation. Is this possible?

Let's say there are A, B and C package.  A and C were installed manually with apt-get install, and B is a dependency of A and was installed by apt automatically.  Is it possible to know that with some apt-* or dpkg command?


One of my question in SO  has only 1532 view counts, But when i look into my profile where all my questions are listed it is shown as 2k Views, even when i hover on this 2k the tooltip shows 1532 views

Due to this question and answer , I assume 1k = 1000, 2k= 2000...  I don't believe it. Or maybe I am wrong. Please check the below images.        You will see 2kviews. But when you navigate to it, the actual view count is 15xx.         What is going on? Is it a bug?


He is not a popular teacher. He does not respect students. He  would be   a popular teacher if he respected students.   One of my students wrote:     If he did respect students he would be~.   Have you seen this? I haven't. What do you think?

This morning I read this sentence (see ):     On July 24th and again on July 29th,   Egyptian police did shoot dead unarmed   African migrants attempting to cross   that border.   Why "did shoot" and not "shot"?


I have a pendrive when I insert it into one o my port it shows in the My Computer but when I try to explore, it shows please insert a disk into drive H. However my usb drive is well inserted. I tried to format it but it is showing There is no disk in drive H, Insert a disk then try again. Its properties is showing Unknown File System and the used space and free space part showing 0 bytes. I cann't also check for errors in the drive. Its device status:The device is working properly. I also reinstalled the driver but that did not help me. Please suggest some way to recover the issue. Thanks.

I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive:     If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following:     Please insert a disk into drive X:.   Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive.  What can I do? How do I recover data from the drive?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I've just recently started using the 4x1 (Hot Question) widget for the Stack Exchange app. Is there a way to modify which site's questions are featured on the widget? I've noticed a lot of questions come up that are from sites I have no experience with.

The thing about the Hot questions widget is that it's a neat idea, and well executed. However, it shows questions from all around the network. And most of the time from topics I have no interest in.  I suggest another widget be added* to show questions from a specific user-defined set of sites. There could also be the choice of showing "new" questions** or "hot" questions from the chosen sites.  I envision this new widget to be useful as it will give us hot trending questions from our favorite sites to read on (less refreshing, more reading) or new questions, encouraging us to contribute more to the site. :)  Also, tapping the site icon should open the relevant list of questions at the site, not the current question. That will be a handy shortcut (can be applied to the existing widget as well).  * Or the existing widget could have added options to choose between hot network questions and the above.  ** There could be an optional filter of selecting only new questions with 0 or more nett vote score for the widget.


Why doesn't my keyboard work when the computer is booting? I can enter BIOS and change the settings, but when the system is booting it doesn't work at all! This is not a new problem, but I now want to install Ubuntu alongside Windows, but what if GRUB doesn't work and will always boot into Ubuntu? I have tried to put the USB keyboard in the other slots including those on the front.

I wanted to perform a memory test on one of my desktop machines, but encountered a very strange problem: I can use the (usual) USB keyboard (tried Cherry Evolution Stream as well as an older one from Logitech) to open the BIOS (by pressing Del) and changing it, but not in the Ubuntu boot menu (where to select the language and keyboard type for pre-10.* Ubuntu versions). After Ubuntu booted, the keyboard is usable. I've also tried to use a different USB port, but without success.  Is this a known mainboard, BIOS or Ubuntu problem?


What does an 18 - 50 mm lens mean? Are those numbers the first focal length and second focal length? How do you use this parameter to judge what kind of lens to buy? Does more equal better?

What is focal-length?  Are focal-length and zoom synonymous?  How does the focal length of a photo affect it? Are there common uses for different focal lengths, and how can I decide what to use when?


Does the query shown below work? (Sorry for this type of question, but I am a novice and it is not possible for me to run it right now).  SELECT    table.id     SUM(10/ta.value) AS amount  JOIN tableA ta           ON ta.key = t.key   What I am curious about if it is possible to refer to a alias "before" (i.e higher up) it has been assigned.   Thanks!

I'm not used to the 'as' keyword and I thought it would be a nice idea to use it. So why do I get an 'unknown column' (eid) error? I use mysql...  select t1.index as eid, t1.col1 as col1, t1.col2 as col2,  t2.index, t2.col1, t2.col2, t3.index, t3.col1, t3.col2  from table1 t1  left join table2 t2 on t2.index=eid left join table3 t3 on t3.index=eid;   The full statement is too long to present here without boring everybody.  The column and table names are random.


I have a LWC component which calls an apex class that does callout: public static List<Case> doCallout(List<Case> cases) {     .......     CalloutLogger.insertLog(req, res, time);     ........     try {          ....          if(isFromComponent) throwAuraException(System.Label.CustomException);          ....      } catch(Exception e) {          ....      } }  The throwAuraException method: private static void throwAuraException(String message) {      AuraHandledException e = new AuraHandledException(message);      e.setMessage(message);      throw e; }  On LWC: handleSend() {      sendRequest({caseToSend : this.recordId})      .catch(error => {       ......      }).then(result => {       ......      }); }  Inside the CalloutLogger.insertLog(req, res, time); method I am inserting a record of Logger__c. The problem is that when throwAuraException method is called the logger record inserted gets rolledback, due to throwing an exception that is not handled in the Apex code. But the exception is caught in the catch of LWC. I would like to insert the logger record even if the exception is thrown.

We have an error log object where we store the errors and I have a simple try catch like below... My issue is that the insert in the finally does not appear to be happening. Any advice? or is that a limitation in the try-catch error handling? list<Error_Log__c> error_logs = new list<Error_Log__c> () try {    if(status__c == '100') {       \\do something    } else {        throw new AuraHandledException('System Error');    }   } Catch (Exception e) {    Error_Log__c rec = new Error_Log__c(Name="Error Message: ");    error_logs.add(rec);    throw new AuraHandledException('System Error'); } finally {   insert error_logs; }


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?

In windows I right click and then there is an option to create a text file.  How to do so in mac?


I got the definition and the intuition being finitely generated vector spaces. Could you help me with some examples about not finitely generated vector spaces? It looks like  I can't get the intuition behind them. Thank you in advance

Here's what I've come up with. Let $\mathcal B$ be a generating set of $\mathcal F(R)$. Let us assume that $\mathcal B$ is a finite set, thus: $\lt  \mathcal B \gt = \lt \{b_1, ..., b_n \}\gt, n \in N$. Let  $\mathcal f \in F(R).$ Thus: $\mathcal f = \alpha_1 b_1 + ... + \alpha_nb_n,$ where $ \alpha_1,..., \alpha_n \in R$ are not all zeroes.  If  $\mathcal F(R)$ is a vector space, so there can be a function  $\mathcal g \in F(R)$ such as  $\mathcal g \neq \lambda f, \lambda \in R$. Thus  $\mathcal f+g \in F(R)$  but  $\mathcal f+g \neq \alpha_1 b_1 + ... + \alpha_nb_n$. If is $\mathcal g$ is to belong to $ \lt \mathcal B \gt$ we must add a new vector to $\mathcal B$.  Repeating the above mentioned procedure, we can find a function $\mathcal g\in F(R)$ such as $\mathcal h \neq \mathcal\lambda g$. Thus, we can find infinite functions and thus need infinite base vectors.  Is this proof right?


I want to have a static const char array in my class. GCC complained and told me I should use constexpr, although now it's telling me it's an undefined reference. If I make the array a non-member then it compiles. What is going on?  // .hpp struct foo {   void bar();   static constexpr char baz[] = "quz"; };  // .cpp void foo::bar() {   std::string str(baz); // undefined reference to baz }

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I have an iPhone 5 that I use with Straight Talk (telecom provider) and I am trying to "upgrade" it from 7.0.4 to 7.1.2, or any release with the 7.x version for that matter.  I specifically do not want to upgrade to IOS 8 just yet.   I have the file "iPhone5,2_7.1.2_11D257_Restore.ipsw" but I get the error "The device isn't eligible for the requested build." I've also hashed out the gs.apple address in my hosts file.  I know you can't downgrade from 8 to 7, but in this case is there a way I can still upgrade to a later version of 7.x?

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


Not a word that reads the same, a word that actually sounds the same whether it's pronounced forwards or backwards.

I find it very interesting that Judge /dʒʌdʒ/ is pronounced the same backwards as forwards while it is not a palindrome. Does this phenomenon have a name?


I have known NullPointerException to be caused by using an uninitialized object for example Button button;and then try to use it before button= new Button(). However, in this case I cant see why and where have I gone wrong.  I have my Main class:  public class Main extends Application { private Stage primaryStage; private BorderPane mainLayout;  @Override public void start(Stage primaryStage) throws IOException {     this.primaryStage=primaryStage;     this.primaryStage.setTitle("Employee App");     showMainView();     showMainItems(); }   public void showMainView() throws IOException{      FXMLLoader loader= new FXMLLoader();      loader.setLocation(Main.class.getResource("view/MainView.fxml"));      this.mainLayout=loader.load();      Scene scene= new Scene(this.mainLayout);      this.primaryStage.setScene(scene);      this.primaryStage.show();  }   public void showMainItems() throws IOException{      FXMLLoader loader= new FXMLLoader();      loader.setLocation(Main.class.getResource("view/MainItemsView.fxml"));      BorderPane mainItems=loader.load();      mainLayout.setCenter(mainItems);  }  public void showEletricalScene() throws IOException{      FXMLLoader loader= new FXMLLoader();      loader.setLocation(Main.class.getResource("electrical/ElectricalDeptView.fxml"));      BorderPane eletricalDpet=loader.load();      mainLayout.setCenter(eletricalDpet);  } public static void main(String[] args) {     launch(args); } }   And my controller where I am trying to call a method in Main class to show/load another view.  public class MainItemsController { private Main main; @FXML private void gotEletrical() throws IOException{     this.main.showEletricalScene();     }    }   Everything has been working fine until the time I am trying to call showEletricalScene. I have pinned my controllers and everything is fine except this nasty error below:  Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) ... 51 more Caused by: java.lang.NullPointerException    at   employee.view.MainItemsController.gotEletrical(MainItemsController.java:11) ... 60 more   Any help, thanks.

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


I know the second derivative of y wrt x: $\frac{d^2y}{dx^2}$ means  $\frac{d}{dx}(\frac{dy}{dx})$, but is there a mathematical reason you square the $d$ in the numerator but the $x$ in the denominator?  I've wondered if it's because the $d$ in the denominator represents some arbitrary infinitely tiny amount, and the $d$ in the numerator is that same $d$, only squared to account for the second derivative.  Does that make sense, and/or am I missing something significant about derivatives?

I've always wondered why the numerator is $d^n$ while the denominator is $dx^n$ instead of $d^nx$ like the numerator.  I must be missing something very obvious or fundamental. Is this notation derived from the chain rule in some way?


Is it ok to use an exclamation mark in the middle of a sentence like in the following? (first exclamation mark)  "Hurry!" said Mark," we can't be late!"  Or in:  Hurry! we need to go!

May I use a question mark in the middle of a sentence? Examples:  Would you like the drapes to be white? or perhaps something off-white? Would you like the logo to be centered? at the bottom? left off entirely?


How to prove that $$\int_0^\infty \frac{x\sin x}{x^2+1}dx=\frac{\pi}{2e}$$  I've tried several basic approaches like substitution and IBP but can't move forward.

Another exam problem I'm looking at is to evaluate the following integral. $$ \int_{-\infty}^{\infty} \frac{x\hspace{-0.04 in}\cdot\hspace{-0.04 in}\sin(x)}{x^{\hspace{.02 in}2}+1} dx $$ This is a complex analysis exam, so the solution probably involves contours. $\:$ Since the integrand is an even function, one could potentially simplify by changing one endpoint to $0$. However, I have no idea how to make a contour work since the absolute value of the integrand grows exponentially away from the real axis. What does one need to do to evaluate that integral?


I got 2 functions in javascript (Chrome and IE):  function call(param1, param2){    console.log("call param - 2"); }   and   function call(param1){    console.log("call param - 1"); }   I called like this:  call(1,2);   But I receive this on console:  call - param - 1

What is the best way(s) to fake function overloading in Javascript?   I know it is not possible to overload functions in Javascript as in other languages.  If I needed a function with two uses foo(x) and foo(x,y,z) which is the best / preferred way:   Using different names in the first place Using optional arguments like y = y || 'default' Using number of arguments Checking types of arguments Or how?


When issuing suspensions on a user, the recommended lengths are:   1st suspension: 7 days 2nd suspension: 30 days 3rd suspension: 365 days   However, it was originally:   1st suspension: 7 days 2nd suspension: 30 days 3rd suspension: 120 days or deletion   Why was it originally 7/30/120-or-deletion, but later changed to 7/30/365?

I've tried to make some searches about ban and suspension but the data I found doesn't seem to correspond to my experience. I also cannot find a FAQ on the help section.  Can you explain me how these mechanics work?   I've just found  for a review ban duration to be extended automatically at every new suspension . But it's speaking of 2, 7, 30 days.  I've heard from a moderator that the suspension duration is 7, 30, 365 days. Is that correct? Can a moderator change the duration of a suspension?


I'm trying to put together a quad tree for a homework assignment, similar in function to a binary tree, and I got down to implementing the get() method, where it returned a key's value if the value existed, otherwise it returned null. However, with my given test cases, I keep receiving a nullPointerException, and I can't seem to figure out why. Any and all help is appreciated.  Here's my get() method:  public V get(Coord<X,Y> key) throws IllegalArgumentException {     checkKey(key);     Position<Entry<Coord<X, Y>, V>> p = treeSearch(tree.root(), key);     if(tree.isExternal(p)) { return null; }     return p.getElement().getValue();   }   Now, my homework file says that this should be almost identical to this get method(also in the homework file):  public V get(K key) throws IllegalArgumentException {     checkKey(key);                          // may throw IllegalArgumentException     Position<Entry<K,V>> p = treeSearch(root(), key);     rebalanceAccess(p);                     // hook for balanced tree subclasses     if (isExternal(p)) return null;         // unsuccessful search     return p.getElement().getValue();       // match found   }   with some exceptions for the types.  In the test cases, it makes a temporary tree with random integers as an entry's value, and these:  assertEquals(null, m.get(new Coord<>(0,2))); assertEquals(null, m.get(new Coord<>(-6,-5))); assertEquals((int)3, (int)m.get(new Coord<>(-5,-6))); assertEquals((int)6, (int)m.get(new Coord<>(7,7))); assertEquals((int)0, (int)m.get(new Coord<>(0,0)));   would always return a nullPointerException for my get() method, whereas if used on the example, it would return the key's value.


If Voldemort made all the Horcruxes so he can return with the help of those, and Harry is a horcrux made by accident, even though they destroyed all of the Horcruxes, Harry is still alive, so, while Harry lives, isn't there another chanse for Voldemort to come back?

Harry was never a Horcrux of Voldemort     I have heard this line on SE a lot & also vaguely read about that discussion.     My question is if Harry was not Voldemort's Horcrux & if all the other 6 (5 inanimate objects & Nagini) were destroyed beyond repair & Harry tries to Avada Kedavra Voldemort, would he die? What would happen to Voldemort's soul inside Harry.  I've asked this question keeping in mind Harry isn't a technical Horcrux but only a part of Voldemort's soul is in him. So can Voldemort resurrect from this soul?    If its a duplicate, please mention the relevant discussion link in the comments


Which of these sentences is more grammatical?  "I'm not as good as him."   "I'm not as good as he is."

I have a few questions on terminology, first, actually, as having the right terminology may have enabled me to answer this question on my own.   What is the terminology for such constructs, "as [adjective] as [noun]"? ( seems to label them adjective-based similes—is that correct?) Is the [noun] considered a subject, a direct object, or some other kind of an object?   I feel that [noun] was actually meant to be a complete sentence on its own, e.g. "She is as wonderful as they [are wonderful]," but for convenience we drop repetitive words—is that an accurate view?  If so, then, are sentences like "She's as tall as me" actually ungrammatical? Yet, it seems awkward to say, "She's as tall as I." Is that purely due to a shift in speaking norms?


In my data, I have some items that a customers purchase. I need to predict the customers behavior with different items. But in the test set, there are some items that are not present in the training set, how can I deal with these?  Thank you.

Suppose in a regression analysis in R, I have a factor type independent variable with 3 levels in my train dataset. But in the test data set that same factor variable has 5 levels. Therefore I can not predict the response values for test dataset. What should be done in this case?


My document is in French. I added appendices to the document, appendices use \chapter{}, hence I would like that these chapters to be names "Annexe" (which is the French word for "Appendice" in table of content. But I my current document I don't manage to do that. I expect it has to do with the cutomization of my table of content. Which I want to keep as well. working example: %Preamble \documentclass[a4paper,french,oneside,openright]{book}  \usepackage[french]{babel}  \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=blue,     filecolor=magenta,           urlcolor=cyan } \usepackage{lastpage} \usepackage{lipsum}  \usepackage{tocloft,calc} \renewcommand{\cftchappresnum}{Chapitre } \AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapitre }}}   \usepackage{datetime}  \usepackage[toc]{appendix} \begin{document}      \tableofcontents      \part{main}     \chapter{Lorem ipsum}     \lipsum[1-2]       \renewcommand{\appendixname}{Annexe} \renewcommand{\appendixtocname}{Annexe} \renewcommand{\appendixpagename}{Annexe}  \part{appendices} \begin{appendices}     \chapter{Some appendice}     \lipsum[1-2]     \chapter{Some appendice}     \lipsum[1-2] \end{appendices}  \end{document}   I know that this question has been closed and pointing to  but that didn't help me at all. Another answer is marked as solutions under this question. That one helped me solve the issue.

I have searched for something to resolve a problem that has shown up here:   I have tried the code from that thread. But I got an issue, that is, it adds the \chaptername even for appendix chapters:     Chapter 1. aaaaa   ....   Chapter Appendix A   How can I resolve it?