I have some     vector<string> v1, which was filled using push_back:  v1.push_back("a"); v1.push_back("b"); v1.push_back("c"); v1.push_back("d"); v1.push_back("e");   I have some another vector<string> v2 and an iterator, which contains some element  vector<string>::iterator v2iter;//some element of v2   And I need to check, is an v2iter element presents in v1, or not  find(v1, v2iter); //smth like this


Preferred way to check object property is `null` or `undefined`

If I have some object that has a property that may or may not exist, is there a preferred way to check for its' existence?  // Good? (someObj.property !== undefined && someObj.property !== null)  // Better? (typeof someObj.property !== 'undefined')  // Best? (someObj.property != null)   *The last != operator is      Strict equality checks (===) must be used in favor of abstract equality checks (==). The only exception is when checking for undefined and null by way of null. The use of == null is also acceptable in cases where only one of null or undefined may be logically encountered, such as uninitialized variables.


Aside from Integer.parseInt() handling the minus sign (as documented), are there any other differences between Integer.valueOf() and Integer.parseInt()?  And since neither can parse , as a decimal thousands separator (produces NumberFormatException), is there an already available Java method to do that?


I'm from Saudi Arabia, I have question my flight to CMN from LHR transit LIS 4 hours but I don't have Portugal transit visa, can I travel or not?


Lenovo Ideapad 130s-11igm RTL8821CE Wireless not working

I recently bought the Lenovo 130s-11igm to be a Linux experiment machine. The WiFi adapter it has is the Realtek RTL8821CE wireless PCIE card. After the WiFi not showing up in Ubuntu 19.04 I switched to 18.04 and have been trouble shooting it for a few days now. The Realtek drivers aren't mainlined so there's a repository that has the required drivers for it coming from a forum I found "having the solution" using the code below (connected to ethernet of course.)    sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)  git clone https://github.com/tomaspinho/rtl8821ce cd rtl8821ce chmod +x dkms-install.sh chmod +x dkms-remove.sh sudo ./dkms-install.sh   The code runs just fine, not giving me any errors. This doesn't fix the issue for me however. Here's a few of the details of my situation.    ideapad_wlan: Wireless LAN Soft block NO, Hard block YES  Wireless LAN: Soft block NO, Hard block NO   Have tried "rfkill unblock all." Doesn't relinquish these blocks.    WiFi settings show up but am unable to turn WiFi on, remains "unavailable", which keeps any networks from being discoverable.    ANSWER:  The fix was was pushing the airplane mode key. Despite being able to toggle it in the settings, it is required to push the airplane mode key on the keyboard. However the above code is STILL required in order to allow the Realtek RTL8821CE adapter to function properly.


I am beginner to ubuntu. Can anyone suggest me how to install .exe files in ubuntu machine or in particular, SQL server 2008 ?


Identify an old story about a group of humans engulfed by a slime-mold-like entity

Comic story about a group of explorers/tourists on another planet who are engulfed by a large semi-sentient life form (eg a slime mold?). They are able to communicate, quarrel etc. but cannot escape (at least for a while). Read this at least 40 years ago, any help appreciated...


$\newcommand{\r}[1]{\mathrel{#1}}$ First, a few definitions. Given a lattice $L$, a congruence on $L$ is an equivalence relation $\theta$, compatible with the lattice operations, i.e. if $x_1\r{\theta}x_2$ and $y_1\r{\theta}y_2$, then $x_1\wedge x_2\r{\theta}y_1\wedge y_2$ and $x_1\vee x_2\r{\theta}y_1\vee y_2$. The congruences on $L$ form a lattice, with meet being intersection and join being the equivalence envelope.  I'm trying to prove that this lattice of congruences is distributive. So let's take three congruences $\theta_1,\theta_2,\theta_3$ and attempt to prove that $$\theta_1\cap(\theta_2\vee\theta_3)\subseteq (\theta_1\cap\theta_2)\vee(\theta_1\cap\theta_3)$$  For a start, let's try to prove something easier which should lead me to the general idea. Take elements $x,y,z$ such that $x\r{\theta_1}y,x\r{\theta_2}z$ and $z\r{\theta_3}y$. We want to prove that $x(\r{(\theta_1\cap\theta_2)\vee(\theta_1\cap\theta_3)})y$.   Start with $(x\wedge z)\r{\theta_1}(y\wedge z)$, which gives  $x\r{\theta_1}((y\wedge z)\vee x)$. Similarly, $(x\wedge y)\r{\theta_2}(z\wedge y)$ and $x\r{\theta_2}((y\wedge z)\vee x)$. This gives  $$x\r{(\theta_1\cap\theta_2)}((y\wedge z)\vee x)$$  I expect a similar manipulation should now give $$((y\wedge z)\vee x)\r{\theta_1\cap\theta_3} y$$ but I can't see how to manage this. Is this even in the right direction? I suppose something other than $((y\wedge z)\vee x$ could be the middle link, but nothing obviously better comes to mind.


How to calculate the number of days between two dates?

I am calculating the number of days between the 'from' and 'to' date. For example, if the from date is 13/04/2010 and the to date is 15/04/2010 the result should be  How do I get the result using JavaScript?


Should "neither/either" be followed by "have" or "has"?

In school, I was taught whenever coming across the pattern "either..or" or "neither..nor", we should always consider the noun/pronoun nearer to the verb when deciding which form to use.   For example:      Neither my parents nor John _______ (agree) with that.   In this case, we should use "agrees" instead of "agree" since John is closer to the verb.  Then I have a question. What if when there is only "either" or "neither"?  For example:      There are two particles: quarks and gluons. Neither ________ (detect) in the lab in isolated form yet.   In this case, should I use "has been detected" or "have been detected"?


So I was starting my VM, booted up Ubuntu, but the problem is, it didn't start the GUI. It just shows a command-line. Can you please tell me how to install LXDE or any other desktop environment?


Salesforce Console - Open CTI Integration

We are in the process of integrating Open CTI with salesforce console. My requirement is to search for a record based on the incoming phone# and If it exists then popup on the console OR create the record then popup.   Gone through the console API guide. Not sure how to really capture events. I thought of beginning with fireOnCallBegin() event. But not sure where to put a visualforce page(I meant as a side bar component or somewhere) that listens for events and popup new tabs or open existing tabs. In My opinion, the page that is listening for events should not be visible to users and it should sit in the background and listen for events.   Anyway would you give me some input where to begin based on my requirements. Thanks and I appreciate it.


My wife recently got a logo designed for her new business, by a professional branding company. It went through several stages of approval, getting the logo just right, however, when she went on to the next stage of the process (creating the social media pages) she was asked to find some stock images to use for the banners.  While doing so, she found her "logo" was taken exactly from an existing stock image. The only modification done was to add a little bit of color and her business name.    I don't know the proper etiquette for this situation is. Is it bad that her logo is a stock image and if so, is it too late in the process to request a change (note they claim to allow unlimited revisions but I'm not sure if that applies once we "accept" the design).  Stock Image:   Logo:


Realtek rtl8821ce wifi driver problem in Linux Mint 18.2

I've installed Linux Mint 18.2 on my ThinkPad E470. I can't connect to wifi as no wireless option shows up. I searched around and found an old post with the exact problems as mine - . But the solution to it is old and doesn't work for the new linux. And, lspci doesn't list my wifi adapter model. I also tried the solution given by Pilot6(Can't post the link as i have an upper limit on no. of links). But it doesn't work. This is the output of lspci -knn | grep Net -A2.   04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)     Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:505b]     Kernel driver in use: r8169     Kernel modules: r8169 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Please guide further.


Practical thoughts on explanatory vs. predictive modeling

Back in April, I attended a talk at the UMD Math Department Statistics group seminar series called "To Explain or To Predict?". The talk was given by  who teaches at UMD's Smith Business School. Her talk was based on research she did for a paper titled , and a follow up working paper titled .   Dr. Shmueli's argument is that the terms predictive and explanatory in a statistical modeling context have become conflated, and that statistical literature lacks a a thorough discussion of the differences. In the paper, she contrasts both and talks about their practical implications. I encourage you to read the papers.   The questions I'd like to pose to the practitioner community are:   How do you define a predictive exercise vs an explanatory/descriptive one? It would be useful if you could talk about the specific application. Have you ever fallen into the trap of using one when meaning to use the other? I certainly have. How do you know which one to use?


Find the equations of all tangent lines to the curve $x^2 + 4y^2 = 8$ that pass through the point (−4, 0).

So I stared off by implicitly differentiating $x^2 + 4y^2 = 8$, and I got $\frac{dy}{dx }= \frac{-x}{4y}$.   I then plugged this into the point-slope formula$ (y - y1 = m (x - x1))$ along with my point $(-4,0)$ to get $y = \frac{-x }{ 4y}(x + 4)$.   Now I know I can plug this back into the formula I started with, $x^2 + 4y^2 = 8$, to get $x^2 + 4((-x^2 - 4x) / 4y)^2 = 8$ and solve for $x$ and $y$ to get my answer but this is where I got stuck.   How would I start solving for $X$ or $Y$?


I am  quite new to blender and it is first time I am making a character and an animation with it in blender.  I have a rabbit character that I gave some animation keyframe so it has an idle animtion, a walk animation and a jump animation. I want to use this character later in Unity for a little game. I want to make a side view game, so the character can for example can walk to right and left. I do not know if you can flip/mirror the animaiton in Unity.  In blender I want to make an animation where it walks from right to left, and then an animation where it walks from left to right.  I tried changing the position of the character by rotating the whole armature on the z-axis to 180, and I hoped with the auto-keyframes turned on it would create new keyframes automaticly with the new location and rotation of the armature but as I play the animation it changed the whole animation to be 180 on the z-axis, so the whole animation was flipped. It did'nt work as I would love to.  I then tried to create a new Action and copy the keyframes and then do the 180-thing on the z-axis, but it also changed the characters position on the other Action...  I do not know what to do from now on. I just want the character and keyframes to be flipped, so I get an animation that both walks from right til left, and left to right.   Hope you guys will help me!  Update  I tried to look at this question    But this did not help, I could rotate it by using an empty cube and parenting it to the objects, but it still rotates the whole animation. I have an animation where it walks from right to left and i like to keep that, I just want an animation from there on that walk the opposite way from left to right by just rotating the object and armature and make keyframes of that.


Do all POSIX shells implement arithmetic expansion $((...)) in the same way?

I'm trying to write a shell script which should work under any POSIX shell, and I found what seems to be an odd quirk of dash. I'm wondering whether this is something I can rely on working under other POSIX compatible shells, or whether it is simply an unintentional feature of the dash shell.  In an arithmetic expansion a variable can be written either with or without the inital dollar sign (except in the case of the positional parameters, which must always be written with a dollar sign, $1, $2 etc).  But I've found that the behaviour of "$((X))" is different from "$(($X))" in that "$(($X))" seems to be expanded twice, rather than just once. I.e. if my variable X contains the name of another variable (X=Y), which in turn contains a numeric value (Y=1) then "$(($X))" will return 1, while "$((X))" will just produce an 'Illegal number: Y' error.  Can I rely on this behavior being the same in other POSIX shells?  The odd behavior  "$((X))" and "$(($X))" do not behave the same.  $ X=Y; Y=1 $ echo "$((X))" dash: 1: Illegal number: Y $ echo "$(($X))" 1   Expected behavior  Just for completeness I here include what with no indirection and two layers of indirection. With no indirection everyting works as expected:  $ X=1 $ echo "$((X))" 1 $ echo "$(($X))" 1   As expected, two layers of indirection does not work (though notice that the error messages are referring to different values).  $ X=Y; Y=Z; Z=1 $ echo "$((X))" dash: 6: Illegal number: Y $ echo "$(($X))" dash: 7: Illegal number: Z   This question is somewhat related to this question about  but it’s not the same since that's dealing with the behaviour of bash and more advanced shells, but I'm wondering about expected POSIX behavior.


What are the differences between an AC and DC coil relay?

If a DC coil was just a coil, it would saturate. If an AC coil was just a coil, the magnetic field would drop to zero at 120 Hz and the relay would chatter. Presumably the designs in some way prevent these problems. How? And does it prevent me from putting DC on an AC-rated coil?


YA novel series about kids with elemental powers

The following is a list of elements I remember about this book series:  1)  The cover art was very anime inspired, but was clearly an American or Canadian series.  2)  Wyverns were involved.  Not dragons, wyverns (dragons have forearms, wyverns have wings where their forearms should be).  3)  The people in this world had the ability to control elements, provided that they had special stones implanted in their backs.  4)  The main characters both had 6 of these stones implanted in their backs (most people could only afford 1 or 2 stones for their children).  5)  The main characters were twins (a boy and a girl).  The girl had the power to control earth, and I cannot recall what the boy could control.  6)  The boy sucked at controlling his power.  This is all that I can remember.  I must have read these books somewhere around 2002-2005, and they seemed reasonably new at the time.


Trying to understand a probability question/concept

So I made a post and there were a lot of incorrect answers, and two people were able to provide the correct answers, but I cannot understand why or how they got it.  So for this particular question: A dice is thrown four times, what's the probability "four" is the highest number thrown?  Okay, so what I understand is the sample space is $6^4$. Now we need to find the probability that $4$ is the highest number thrown. So that eliminates 2 other possible outcomes, 5 and 6. So we have 4 possible outcomes now. So $\frac{4^{4}}{6^{4}}$. But now what I cannot understand is why on earth do we need to subtract the number of possibilities where none of the numbers fall higher than 3? Like why does it matter? What if 4 is rolled all the time? Who cares?


What is dconf, what is its function, and how do I use it?

Mark Shuttleworth  about the decision to include the Qt libraries in the 11.10 release, with a  Jono Bacon. Mark states that the biggest challenge to integrating apps written in Qt into the larger Ubuntu system is Qt's current non-compatibility with dconf.  What is dconf, and what is the role it plays in Ubuntu?


Variation of the Kempner series – convergence of series $\sum\frac{1}{n}$ where $9$ is not a digit of $1/n$.

It is easy to argue that the  converges:  $$  \sum\limits_{\substack{n \text{ s.t. 9 is}\\\text{ not a digit} \\\text{ of } n}}  \frac{1}{n} < \infty$$  Let $E \subset \Bbb N_{>0}$  the subset of the positive integers  such that $9$ is not a digit of the decimal expansion of $1/n$ (the decimal expansion is not allowed to have a trailing infinite sequence of "$9$"s. For instance $0.24999...$ is not allowed).  Here are the  that don't belong to $E$ : $11,13,17,19,21,23,29,31,34,38,41,…$ (not known by the OEIS, by the way).  My question is:     Does the series    $$ \sum\limits_{n \in E} \frac{1}{n} \tag 1$$ converge?   My attempt is :   Let $1/n = 0,a_1 a_2 \dots a_k \overline{b_1 b_2 \dots b_m}$ with $n \in E$. Since $1/n$ has no digit "9", we have at most $9^{k+m}$ possibilities for the $a_i$'s and $b_j$'s. Moreover, $1/n ≥ 0,00...0\overline{00...01}≥1/10^{k+m}$. But then I can only bound my series $(1)$ from below, by some real number. So, this is not a clue for the divergence of the series. Apparently, the numbers of the form $n=10k+1$ don't belong to $E$. Maybe we can find sufficiently many numbers that have $9$ in the decimal representation of their reciprocals, so that $(1)$ could converge...   Any comment will be appreciated !


Can  anyone  explain  me  on  a  simple  example  the  difference  between  mutable  and  immutable  objects  in  java?


Screen tearing in Ubuntu 20.04 LTS with Intel graphics

I am facing unpleasant screen tearing when watching videos since some time, I am using Ubuntu 20.04.1 LTS on a Lenovo IdeaPad C340 laptop and I do not understand why it appeared (after some update I guess). Here is the output of lspci -nn | egrep -i "3d|displa|vga": 00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 (Whiskey Lake) [8086:3ea0] (rev 02) I have tried already several things that I found on the internet, but unfortunately none of them did work for me, I have created a file /etc/X11/xorg.conf.d/20-intel.conf with following content : Section "Device"     Identifier "Intel Graphics"     Driver "Intel"     Option "AccelMethod" "uxa"     Option "DRI" "3"     Option "TearFree" "true" EndSection  And also a file /etc/X11/xorg.conf.d/20-intel-graphics.conf with following content: Section "Module"     Load "dri3" EndSection  Section "Device"     Identifier  "Intel Graphics"     Driver      "intel"     Option      "DRI"   "3" EndSection  Following methods suggested respectively  and . Any help would be appreciated! System:    Host: sim0mo-c340 Kernel: 5.4.0-48-generic x86_64 bits: 64 Desktop: Gnome 3.36.4             Distro: Ubuntu 20.04.1 LTS (Focal Fossa)  Machine:   Type: Convertible System: LENOVO product: 81N5 v: Lenovo IdeaPad C340-15IWL serial: <superuser/root required>             Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN serial: <superuser/root required> UEFI: LENOVO v: ALCN24WW(V2.01)             date: 03/29/2019  Battery:   ID-1: BAT1 charge: 44.1 Wh condition: 49.0/52.5 Wh (93%)  CPU:       Topology: Quad Core model: Intel Core i5-8265U bits: 64 type: MT MCP L2 cache: 6144 KiB             Speed: 900 MHz min/max: 400/3900 MHz Core speeds (MHz): 1: 887 2: 899 3: 885 4: 898 5: 900 6: 901 7: 900 8: 900  Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel             Display: x11 server: X.Org 1.20.8 driver: i915 resolution: 1920x1080~60Hz             OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.0.8  Audio:     Device-1: Intel Cannon Point-LP High Definition Audio driver: snd_hda_intel             Sound Server: ALSA v: k5.4.0-48-generic  Network:   Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi             IF: wlp0s20f3 state: up mac: 3c:f0:11:fd:c2:30  Drives:    Local Storage: total: 238.47 GiB used: 92.79 GiB (38.9%)             ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB256HAHQ-000L2 size: 238.47 GiB  Partition: ID-1: / size: 171.53 GiB used: 92.75 GiB (54.1%) fs: ext4 dev: /dev/nvme0n1p5  Sensors:   System Temperatures: cpu: 40.0 C mobo: N/A             Fan Speeds (RPM): N/A  Info:      Processes: 315 Uptime: 18m Memory: 7.50 GiB used: 2.75 GiB (36.6%) Shell: bash inxi: 3.0.38


any different between (function( ) { } ( ) ) and (function() { } ) ( )

Example:    var hello = (function(text) {       return "hello " + text   }("world"))   And   var hello = (function(text) {      return "hello " + text })("world")   are they the same?


What can I do with small change from countries I am unlikely to return to?

I often have small change leftover after visiting a country, usually much less than $1 equivalent.  Keeping it around is a hassle, especially if I'm unlikely to return to that country: I would have to sort it, remember where I put it, remember to look before I travel, etc... In my view this is far too much effort for the few cents I can potentially save in a jar somewhere.  What else can I do with this change?


Appropriate response to misattributed title?

There are many questions here on how to address someone by their title or current status.    What should one do in the case they are addressed by a title they do not have?  Some example of this:  A student submitting a paper and the editor emailing using the Professor/Dr. title. A PhD in a research lab (not university) being invited for a talk and a letter stating "Dear Professor..." A researcher (non PhD) being referred to as Dr.  If this is too broad, the question can be edited to just one situation.  In this type of case, should one reply and directly address the title?


For $x+y+z=3$ prove that $4\geqq x^2y+y^2z+z^2x$

Given $3$ positive real numbers $x,\,y,\,z$ and $x+ y+ z= 3$. Prove that: $$4\geqslant x^2y+ y^2z+ z^2x$$ This problem was homogenized so I set $x+ y+ z= 3$ to cancel stuff. Now I'm stuck. I have noticed a funny equality condition: If $(\,x,\,y,\,z\,)=(\, 2,\,1,\,0\,)$ then we have equality we don't have equality if they are all equal. To me$,$ that implied a weighted AM-GM but I couldn't make that work. Thanks in advance for any help!


How to move top panel to bottom in Ubuntu 15.04 with Gnome 3.16.2?

I have recently upgraded to Gnome 3.16.2 (not sure what version I hade before) and then my MMOD Panel extension was no longer compatible. I only get the message "Does not support shell version".   The same goes for the Panel Settings extension. This didn't work on my previous version either.    I absolutely loved having the top panel at the bottom and was wondering if there was a setting or extension that would fix this in my version. I have tried searching google with no luck.  The Taskbar extension embedded in Tweak Tool has only the option "add bottom panel", which does not move the top, but simply adds one on the bottom.


How to stay on top of recent literature?

When I started my Masters thesis one advice I got for getting good material to read was to subscribe to several journals' alerts system, so that I would get mails with eTOC (electronic Table of Contents).  This was pretty cool then, for months I could stay on top of what's been published out there and was up to date in my own little narrow area. Now almost 3 years later that list of journals have expanded a bit, and the more work I have at the lab more mails that accumulate in my mailbox. What used to be no more than 10 unread mails is now about 900. The output is more than I can handle, what more restrictive method can I implement?  I guess it is pretty clear that this way of following literature is not sustainable in the long run. So I wonder if there are other and perhaps better ways of staying on top of recently published articles?    Please note that I have checked the following two questions prior to asking this one. I do feel though my question differs from these two in its essence.


Implications of typedef void FOO vs. #define FOO void in function signatures

While going through some source code that heavily mixes C and C++, I came across the following (slightly modified to protect the work of the company, the meaning remains the same):  /*  * Typedefs of void are synonymous with the void keyword in C,  * but not in C++. In order to support the use of MY_VOID  * in place of the void keyword to specify that a function takes no  * arguments, it must be a macro rather than a typedef.  */ #define MY_VOID void   What is the difference between typedef void MY_VOID and #define MY_VOID void in this specific context?    I don't believe this is a duplicate of  because it asks specifically about the implications in regards to function signatures, rather than a much more general "what's the difference".


Combinatorial Argument for $i{n \choose i} = n {n-1 \choose i-1}$

I ran across the identity $$i{n \choose i} = n {n-1 \choose i-1}$$ which can be easily proved using the definition ${n \choose k} = \frac{n!}{(n-k)! k!}$ and a little bit of algebra. I was wondering if there was a simple combinatorial argument  to explain this identity. I'm not necessarily looking for a proof, but rather the heuristics behind why it is valid.


Is a Parselmouth immune to the effects of the stare of the Basilisk?

We see in the Chamber of Secrets when Tom Riddle summons the Basilisk, he looked at the Basilisk's eyes directly.     So are they immune to the effects, or is it just the controller?


Why was there a kid running with a Uchiha crest on his jacket iafter the Uchiha ending?

Why was there a kid running with a Uchiha crest on his jacket in Naruto Shippuden after the uchiha ending?  Did another Uchiha survive that no know one knows about? Or did he find the missing jacket and is wearing it? Or did he survive then later dies?


Post source link plugin - small modification

I'm using a little plugin that allows me to add source link to every article. I found the code in this thread:   It's almost perfect, but I need to make 2 little modifications:   When there's no source link, the word "Source:" is still showing up (here's how it looks like: ), but I need to get rid of it if no source link is added. Does anyone have any idea how to do it? Source link shows on every page of a post. I have some posts splitted into multiple pages, but the link still shows on each one of them. I need to change this - the link has to show up only on the last page of a splitted post. Any ideas how to achieve that?   Here's the code I'm using (pasted in functions.php):  - the first one  And here's what I have in my single.php (single post):
Source: <?php echo esc_url( get_post_meta( $post->ID, '_source_link', true ) ); ?>
   Thanks in advance. Im desperate for help.  Kacper


Extend Windows 7 partition to use free space before it

I have some unallocated space before my Windows 7 partition.    Can I move the Windows 7 partition so that the free space is after it instead than before it, and then extend the partition to use all of the currently unallocated space?


Find text files that have 2 terms in them (in any order, at any line)

I have been looking at grep -e where you are doing an "and" operation which is the sort of thing I want.  However, if I get it right, the two terms have to be in the same line to be returned.  What I am interested instead is find me all documents in a directory that have both terms, possibly on different lines.  If order matters, I do know that one term will always occur before the other, however certainly a general purpose solution would be just fine.


So far, is there any suggestion, or speculation as to the reason for the name 'Rogue One' for the next Star Wars film?   To me, the name seems very close to the Rogue Squadron, most known from Hoth (their leader Luke Skywalker), especially the number following Rogue like a callsign.   However as far as I know, they were formed after the first Death Star destruction. So why Rogue One?


I have a question which I'm deeply confused about. I was trying to do some problems my professor gave us so we could practice for exam, one of them says:  Give a partition of  ω in  ω parts, everyone of them of cardinal  ω.  I know that $ ω=\left \{  1,2,3,...,n,n+1,.... \right \}$ , but I thought that |ω|=ω.  Can somebody help me?


Why does "singer" have /ŋ/ and "longer" have /ŋg/?

The word "" is pronounced as /ˈsɪŋ.ər/ having /ŋ/ and not /ŋg/ in Standard Englishes. On the other hand, the word "" is pronounced as /ˈlɒŋɡər/ having /ŋɡ/ and not just /ŋ/ in Standard Englishes. "Longer" is derived from "long" which only has /ŋ/. There are some other words as well, like younger, youngest and the superlative form of "long": longest = /ŋg/ And those which have only /ŋ/: ringer, hanger, banger. I read this answer () and it suggests:  Word-internal [ŋg] mostly remained (as in finger, anger), but an originally word-final -ng- that becomes word-internal only as the result of the addition of certain suffixes is pronounced [ŋ] (e.g. singing, singer). The -ng- in English is not word-final, and -lish is not a suffix here, so it isn't expected to be pronounced [ŋ] according to the pronunciation patterns of the most commonly described dialects.  The er is a suffix in both "longer" and "singer" but they are pronounced differently. Why is "singer" not pronounced as /ˈsɪŋɡər/ or "longer" as /ˈlɒŋər/? Is "longer" an exception to this rule or there is a specific reason?


Ubuntu 14.04/15.04 & Skylake I5 6600k / Intel HD 530, graphic issues

I bought a new computer, Skylake's I5 6600k CPU and an intergrated INtel HD 530 GPU. I tried running Ubuntu 14.04 and/or Ubuntu 15.04, but I am having too many graphic issues: Mouse cursor will randomly go invisible, it still works yet it's invisible. I am using 2 monitors, when moving the cursor between them sometimes the screen randomly flashes and/or displaying a blank page for a few seconds. Sometimes when watching a youtube video or a stream, or even better trying to run a medicore game on steam, the whole computer will just freeze and the only way to bypass this is by hard-shutdown... This is super annoying and I am starting to lose hope, spend literally days trying different solutions posted on google and so on but so far nothing has really helped. Same issue happens on both 14.04 LTS and 15.04. Few things I tried that come up to mind (Other than full re-installation which I've done several times, also going back and forth from 14.04 to 15.04). Tried to take off splash screen from the grub kernel menu. Tried to add the following command at the grub kernel; i915.preliminary _hw_support=1. I noticed that restarting lightdm service does fix the cursor issue so I tried to completely purge and reinstall lightdm but no avail. I am pretty much hopeless at this point and will appreciate any help you guys can give as I really wanna stick to Linux even with this new hardware pieces. Thank you    Edit:    Output of: sudo lspci -k | grep -EA2 'VGA|3D':    00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 06)     Subsystem: ASUSTeK Computer Inc. Device 8694     Kernel driver in use: i915_bpo


Order of $\mathrm{GL}_n(\mathbb F_p)$ for $p$ prime

While proving some facts about matrix group operations on finite fields, I stumbled across the following question:          What is the order of the group of invertible $n\times n$ matrices over a finite field of prime order $p$?      The answer seems to be $$\left|\mathrm{GL}_n(\mathbb F_p)\right|=\prod_{k=1}^n\left(p^n-p^{k-1}\right)\text,$$ but I have not yet seen a satisfying proof: I took a look at , but found it to be somewhat sloppy. Is there a nice formal proof of this fact?


How can I split a list every time the value changes?

I have a list of values, 7,7,7,7,7,7,7,7,6,6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,8,8,8,5,5,5,5,5,5,6,6,6,6,6 etc and I need to split the list into the list of list format every time there is a change in value, such that it becomes [[7,7,7,7,7,7,7,7],[6,6,6,6,6,6],[7,7,7,7,7],[8,8,8,8,8,8,8,8],[5,5,5,5,5,5],[6,6,6,6,6]].  I tried a code as follows, however, it told me that there was an unexpected token "for". Is there any other way that's cleaner (one liners)?  for i, n in enumerate(x):     inds = []     if x[i] != x[i-1]:         inds.append(i) list(split_after(x, lambda i: i for i in inds))    Edit: I can't use groupby because it requires me to sort the list, and I'm concurrently using this list to sort another list of lines, and I can't reorder the other list because of how it's sorted to be lines running ordered around my entire surface.


I had installed Ubuntu to my Dell Inspiron laptop with 3 partitions.   After I installed Windows I was unable to create new partitions, since I already reached the maximum number of partitions.  So I deleted the Ubuntu partitions and I installed Windows on two partitions. So I have got 4 partitions with Windows.  Then I tried to install the Ubuntu that previously deleted(on unallocated space). But the problem is that unallocated partitions are grayed out and can't be used.  Now what can I do?


In short: I do not know where to start reading so that I can understand how to configure a DC.  The long question:  In the environment I work, we use an outdated domain controller and I have to create a new one. The problem is that I can not yet grasp the idea of the Domain Controller. The one we use is actually used just for authenticating users (single domain, no one else in the forest, no other forest).  The theory I (think) know in short is:   An active directory is a database that stores information about computers and users. A domain controller is a server that holds the active directory and maybe other services such as DNS. A windows server can be a domain controller if it has active directory. I can restrict users from using a printer for example. I can change the settings for a given user account (let's say desktop background?)   What I can not grasp is generally the big picture, but specifically:   Why are there users and computers and not just users, what can I do with each of them. If I restrict a user from using a printer, what is it that prevents him from actually using it if he can reach it (by ip for instance). Why would I put different types of users in different containers, instead of just putting them in "Users" and then making them members of different groups that have different rights. Is it just an aesthetic matter, everything being tidy and sorted? The biggest problem: I do not know what else it can do (please give me some example situations where it could help)   What I guess I expected was that there would be more to this wonder, the Domain Controller, than just authenticating users.  Any help on any of the above matters would be greatly appreciated. Thanks in advance!


What does ` in Linux means? The sign with tilde on keypad. Does it evaluates the expression?


I made it to level 5 in Pokemon GO, but the game didn't ask me which team I wanted to join and I am currently not affiliated with any team.  Is there something I have to do in order to pick a team, or should I have been given a chance to pick a team upon leveling up?


Regression to the mean is a statistical phenomenon where in the long run, the results of an experiment average out. Taking the example of one's results on a test, if we've had a string of good outcomes, then the next result is likely to be less satisfactory because things even out, right? If so, how can the probability of success in the next test still be the same as that of the previous tests? How can the gambler's fallacy still be false if we know things must even out?


I've been struggling with an independent clause question:     I always run at night, and then I go see my nephew.   Would a comma go before "and"? I wasn't sure if "then I go see my nephew" would be considered an independent clause. I know "then" is an adverb, but I'm not sure if I can start a sentence with it.


How can I recover data from lost and found files present on root.disc from Windows?

After changing size of Ubuntu folder (the command I used was dd, folder loop0) the kernel panicked, my Ubuntu is dead and I cannot recover it with GRUB or any recover tool (vmlinuz is not even present).  Is it possible to recover files from Ubuntu's partition while I am logged into a Windows system? I have some program to open Ubuntu's root.disc, but only "lost and found" files are listed there.


I am facing issue in below code -  int precision = 3;  String value1 = "2.0425";  String value2 = "2.1425";  DecimalFormat dfForm = new DecimalFormat();  dfForm.setMinimumFractionDigits(precision);  dfForm.setMaximumFractionDigits(precision);  System.out.println(dfForm.format(value1));  System.out.println(dfForm.format(value2));   Output -  2.042  2.143  1st output is expected to be 2.043. Can anyone help me in this?


Unknown Grammar (or passive continuous infinitive)

Here is a sentence I have trouble parsing:     A member of staff objects to their image being used in a particular way.   I cannot find a grammar reference according to such sentence. Is it passive continuous infinitive? But why do we put their image after to?


Weakly and Strongly connected components in an Undirected vs Directed graph

I have a tool where, if I insert a graph, it gives me back the number of weakly connected components and the strongly connected components.   When I insert any undirected graph, the numbers of these two properties are the same.  When I insert any directed graph, the numbers of these two properties are different.  Is this indeed correct? If so, why is the undirected the same?


How to replace a word in a file by a word get by read function?

Situation:  echo "tell me a word" read the_word   How to replace all WordToReplace in a file by the_word?  sed does not seems to appreciate:  sed -i 's/WordToReplace/$the_word/g' thefile.sh


show that the limit of $x \sin(1/x) = 0$

Say we let $f$ be a real-valued function, let $S\subseteq \text{dom}(f)\subseteq R$, let $a\in \bar{S}$, and let $L\in R$.  We know the $\delta -\epsilon$ condition for $\lim_{x\to a} f(x)=L$ is:  $$\forall \epsilon >0: \exists \delta >0: \forall x\in S: |x-a|<\delta \to |f(x)-L|<\epsilon.$$  So given all that, how can we show $\lim_{x\to 0}x \cdot \sin(\frac 1 x )=0$ by proving the condition I wrote above, for $a=0$, $S=(0,\infty)$, $f(x)=x\cdot \sin(\frac 1 x)$ for all $x\in (0,\infty)$, and $L=0$?


Is speed of light and sound rational or irrational in nature?

Just as circumference of circle will remain $\pi$ for unit diameter, no matter what standard unit we take, are the speeds of light and sound irrational or rational in nature ?   I'm talking about theoretical speeds and not empirical, which of course are rational numbers.


Where did the British accent originate from in Star Wars?

In Star Wars we hear certain members of the humanoids have a British accent. But since there's no planet England, where did it come from?  I have seen a young clone with a British accent in season 2 episode 20 of Star Wars: Clone Wars. His accent doesn't make sense because they were all raised together at the same place, so it doesn't make sense for them to pick up a different accent than the rest.


Can you please show me how to get from the left side to the right side?  $$\sum\limits_{k=0}^{20}\binom{50}{k}\binom{50}{20-k} = \binom{100}{20}$$


Procedural Progressive wave system advice

I am developing a game based on waves. Enemies appear as time passes by and every level the hero must kill all the enemies to move to the next level.  At this time I have 2 types of waves. Progressive waves (enemies are spawned every x secs), All at once waves (enemies are spawned all at once at a moment in time). On the other hand my enemies (5 types) have base features that I want to improve as player moves into more challenging levels  My question is simple: How do you ussually handle this type of wave generation system? For every level I would like to generate a set of wave events (first 5 enemies all at once, then 10 progressively, etc...), after this I must select how many enemies to spawn for every wave and their features (velocity, behaviour, weapon power, etc...).  One solution I have thought about is creating some meanful templates for the wave creation. For example, I colud create 10 spawning process. A process is like:    Spawn 5 enemies  Wait 10 secs or all enemies died from previous wave Create 10 enemies and spawn all at once. THis would be a spawn process.    Then I could select a random template for each level and scale number of enemies, etc... depending on the level difficulty.  How do you ussually handle this kidn of system?  Cheers.


I want to make a plane for my supply on my PCB and a plane for my MCU to isolate the MCU from the power supply noise.  I found this article in Altium designer :  But it isn't clear how the split plane tool work. Can someone explain it in a different manner?  [EDIT]  This is a picture how I see the planes:


I'm trying to find a program or terminal code that can write a 3.1 GB Windows 7 Installer File to a 32 GB USB3+ flash stick.  I have tried the Startup Disk Creator but it won't select the Windows installer File. Any suggestions that I could use? (I'm new to Ubuntu)


Applying for a US visa in Japan with a Japanese visa expiring soon

I applied for a US visa from a country other than my own(I am an Indian and I currently work in Japan). My application was put on administrative processing and its been 2 months. I still have no clue as to how long it will take them to process my application. But my Japanese visa will expire soon but I cannot travel to India since my passport is with the US embassy in Tokyo. Can I get my passport back and then submit it at a US embassy in India without affecting my application ?


I'm trying to extract an ISO of a Linux distribution to a USB flash drive but I keep getting an error message that the destination file system does not support symlinks. The flash drive is formatted FAT32 (required for UEFI boot). If I extract the same file on a Windows PC to a USB drive everything works just fine. How come Windows can extract this file to my USB drive and Ubuntu can't?


The meaning of representing the simplex as a triangle surface in Dirichlet distribution?

I'm reading from a book that introduces the Dirchilet distribution and then presented figures about it. But I was not really able to understand those figures. I attached the figure here at the bottom. What I don't understand are the meanings of the triangles.  Normally when one wants to plot a function of 2 variables, you take the value of var1 and va2 and then plot the value of the function value of those two variables ... which gives a visualization in a 3D dimension. But here there are 3 dimensions and one other value for the function value so it makes a visualization in 4D space. I can't understand those figures!   I hope someone can clarify them please!  EDIT: here is what I don't understand from figure 2.14a. So we have drawn from K=3 dirichlet a sample theta (which is basically a vector) that is: theta = [theta1, theta2, theta3]. The triangle plots [theta1, theta2, theta3]. The distance from the origin to each theta_i is the value of theta_i. Then for each theta_i it put a vertex and connected all three verteces and made a triangle. I know that if I plug [theta1, theta2, theta3] into dir(theta|a) I will get one number which is the joint probability of the vector theta. I also understand that the probability for continuous random variables is a measure of an area. But here we have 3 dimensions so the joint probability will be the measure of the volume of the space from the pink plane and under ... i.e the pyramid. Now I don't understand what is the role of the triangle here. What is it trying to communicate or visualize?


$res = $mysqli->query("SELECT torrents.seeders, torrents.tube, torrents.banned, torrents.leechers, torrents.anonymous, torrents.info_hash, torrents.filename, torrents.last_reseed, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, torrents.description, IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.save_as, torrents.allow_comments, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.times_completed, torrents.id, torrents.free, torrents.type, torrents.numfiles, torrents.poster, torrents.url, categories.name AS cat_name, users.username, groups.image FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id  LEFT JOIN groups ON users.groups = groups.id WHERE torrents.id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__);     $row  = mysqli_fetch_assoc($res);   How can prepare this query ? For protection anti sql injection .  i try this:  $res = $mysqli->prepare('SELECT torrents.seeders  WHERE torrents.id = :id');  if ($res->execute(array(':id', $id ))) {      var_dump($res->fetchAll());  }


80s-90s movie about a boy abducted by an alien, replaced by a robot version of himself

I watched a movie when I was little about a boy who was abducted by an alien (maybe by choice I'm not sure) but while he was abducted, they sent an alien or robot version of himself to take his place so his family did not know. I also remember a part where the brother of the abducted kid saw the robot/alien version of his brother at night and the alien/robot was fixing his wiring inside of his head or something and he told the brother that it was all a dream and to go back to sleep. I think that the alien place that the boy was in was like an all-white building with stars or something outside and I think one of the alien people had red or green hair. I think it is an 80s or 90s movie but not positive.


Add thick outline to existing artwork in Illustrator

I have some vector images they I need to add a thick outline similar to the image below.     Is this possible to do quickly and easily in Illustrator?   Note : I have permission/licence to edit and publish the images.


If a muggle and a wizard marry, are their children automatically wizards?

Is there any chance that a muggle marrying a witch or wizard will have a muggle child? Is it 50/50, or will all descendants of wizards automatically be magical?


How can I get the current tab while this tab is not active

I am using Eclipse RCP and EMF models. I have created my own property tabbed sheets than refreshes when an Object is selected in a view. Until here, everything works fine. Then, I wanted to refresh the property tab when I make a change in my model. I added a Model change listener to my main Property sheet page   public class MyTabbedPropertySheet extends TabbedPropertySheet{...}   private void init(){ try{    MyModelChangeListener = new MyModelChangeListener(){   @Override   public void refreshUI(){   try{     UMLModeler.getTransactionHelper().getEditingDomain().runExclusive(new Runnable() {       @Override       public void run(){       refresh() //This is the eclipse TabbedPropertySheet refresh method      }     });   }catch(){..}    UMLModeler.getTransactionHelper().getEditingDomain().addResourceSetListener(MyModelChangeListener); }catch{...}   After that, when I change my object, my property sheet does actually refreshes but I have a NullPointerException in the eclipse class as the currenttab is null.   Method in org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage  public void refresh(){   currentTab.refresh(); }   So I was wondering how can I get the current tab while this tab is not active (I am doing the modifications in another view).  Or is there another way to refresh the property sheet page?


What was the reason for the Guardian's change?

In the movie Warcraft, the Guardian is shown as corrupt, but they didn't show when he is corrupted! If he is evil from the beginning, why did he help the humans at the first encounter with orcs, in the jungle scout? Why did he ask the mage and half orc half human Garona to help the king?  My question is why did he go corrupt and why did he help the orcs to invade? Why did he change sides?


Mentality for the hard initial stage of game development

I feel like there is a lot of excitement involving the initial steps towards developing games.  Kids (myself younger self included) get very excited about making games and talk for hours about the games in their imaginations.  Then comes the initial game making experience.  A lot can happen there.  It feels like a no-man's land where many enthusiasts fall away.  It seems to me that there are a lot of good, talented people out there who end up stuck in the mud.  Is that just the nature of competition and a necessary hurtle to greatness or should something be done to avoid it?  I feel that experienced game designers with a history of success could offer a lot of help, but then again, sometimes people are punished for our kindness.  However, I feel that having the right mentality would both help a person get through the hard times and make it easer to approach professionals.  Could I get some tips on crafting a positive and effective mentality regarding these issues during the early staged of a game design career?


Does unpacking sequences [strings, lists] and sets involve casting into a tuple?

I just learnt of unpacking with the * and so went on some test runs. I realized that although some write about passing in tuples as arguments in place of positional arguments, I could also pass in strings, lists and sets and Python wouldn't complain as long as I included the *. I have listed below what I defined as a function taking in positional arguments and the test cases.   What surprised me are the Tracebacks, which led to my question. The Tracebacks mention an IndexError for a tuple even when none is provided. Is what is happening under the hood a casting of the lists, strings and sets into tuples when the * is used?  >>> def print2nd(*args): ...     print(args[1])  >>> s = "abc" >>> print2nd(*s) b >>> print2nd(s) Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 2, in print2nd IndexError: tuple index out of range  >>> t = ['a', 'b', 'c'] >>> print2nd(*t) b >>> u = set(['a', 'b', 'c']) >>> print2nd(*u) a >>> print2nd(u) Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "<stdin>", line 2, in print2nd IndexError: tuple index out of range >>> u[0] Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: 'set' object does not support indexing >>> tuple(u) ('b', 'a', 'c') >>> tuple(u)[1] 'a'


I want to know the methods and packages for drawing directly in latex. I work mostly in Overleaf. I want to draw graph-theoretic figures directly.


Which of the following value(s) of $t^3$ are not possible?

Let $t$ be a real number such that $t^2 = at + b$ for some positive integers $a$ and $b$. Then for any choice of positive integers $a$ and $b$, $t^3$ is not equal to -  1) $4t+3$  2) $8t+5$  3) $10t+3$  4) $6t+5$  This question is from a prestigious Indian Scholarship exam, and I'm solving it for fun. But I can't get at the bottom of the problem. I'm also a bit shaky on which concept to use in this problem.  My try on this question   $t^2 =at +b$ $t = \sqrt(at+b)$     For $t \in R$ $at+b \ge 0$  Since $a$ and $b$ are positive integers  $at \ge -b$  and  $t \ge \frac{-b}{a}$  I also tried differentiating the function    $t^2 = at + b$ to get  $\frac{d}{dt}(t^2) = a\frac{d}{dt}(t) + 0$  $2t = a$  Alas it leads nowhere. But  $\frac{a}{2} \ge \frac{-b}{a}$  Since $a$ and $2$ are positive integers  $a^2 \ge -2b$  What has to done next? Please help


Acer Aspire ES1 311 freezes regularly on Ubuntu GNOME 15.10

I have upgraded the kernel to linux 4.2.5-040205-generic,this problem will not cease to bug me  I am currently running my laptop on the nomodeset kernel parameter,and am not able to do anything worthwhile on my laptop


If I have two random variables, $X_1, X_2 \sim N(\mu, \sigma^2)$, what can I say about $X_1-X_2$?

If I have two random variables, $X_1, X_2 \sim N(\mu, \sigma^2)$ where $\mu, \sigma^2$ are unknown, what can I say about $X_1-X_2$? More specifically, I know that the difference should be a normal as well, but how would I calculate the variance? Thanks!


How do I enable all four cores on my Toshiba P70-A notebook? (only one enabled now)

I recently noticed my computer is highly sluggish (recent install of Kubuntu 13.04 by the way). I have a Toshiba Satellite P70-A PSPLPC-01Y007 laptop with an Intel i7 quad-core, 16 GB of ram. It appears to look correct in the kinfo. So I ran mpstat -P ALL:  Linux 3.8.0-30-generic (Isogen)         13-09-02        _x86_64_        (1 CPU)  10:07:13 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle 10:07:13 AM  all   11.07    3.02    2.90   36.25    0.00    0.12    0.00    0.00   46.64 10:07:13 AM    0   11.07    3.02    2.90   36.25    0.00    0.12    0.00    0.00   46.64   I noticed when I had chrome open with 10 tabs, typical of an engineer, but it kept freezing horribly. After I ran top, I realized the CPU kept hitting 100% and only one CPU/core is listed. Couldn't find a solution so far. How can I get it to register all 4 cores?  cat /proc/cpuinfo | grep -E "(core|model\ name)" model name      : Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz core id         : 0 cpu cores       : 1   as well as  sudo grep -i smp /var/log/syslog Sep  2 10:02:41 Isogen kernel: [    0.000000] Linux version 3.8.0-30-generic (buildd@roseapple) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 (Ubuntu 3.8.0-30.44-generic 3.8.13.6) Sep  2 10:02:41 Isogen kernel: [    0.000000] found SMP MP-table at [mem 0x000fe1b0-0x000fe1bf] mapped at [ffff8800000fe1b0] Sep  2 10:02:41 Isogen kernel: [    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs Sep  2 10:02:41 Isogen kernel: [    0.010390] Freeing SMP alternatives: 24k freed Sep  2 10:02:41 Isogen kernel: [    0.062244] smpboot: CPU0: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz (fam: 06, model: 3c, stepping: 03) Sep  2 10:02:41 Isogen kernel: [    0.063005] smpboot: Total of 1 processors activated (4788.97 BogoMIPS) Sep  2 11:18:52 Isogen kernel: [    0.000000] Linux version 3.8.0-30-generic (buildd@roseapple) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 (Ubuntu 3.8.0-30.44-generic 3.8.13.6) Sep  2 11:18:52 Isogen kernel: [    0.000000] found SMP MP-table at [mem 0x000fe1b0-0x000fe1bf] mapped at [ffff8800000fe1b0] Sep  2 11:18:52 Isogen kernel: [    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs Sep  2 11:18:52 Isogen kernel: [    0.010393] Freeing SMP alternatives: 24k freed Sep  2 11:18:52 Isogen kernel: [    0.062271] smpboot: CPU0: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz (fam: 06, model: 3c, stepping: 03) Sep  2 11:18:52 Isogen kernel: [    0.063032] smpboot: Total of 1 processors activated (4788.73 BogoMIPS)   EDIT: But when I run sudo lshw -class cpu, I get this:  *-cpu                           description: CPU        product: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz        vendor: Intel Corp.        physical id: 4        bus info: cpu@0        version: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz        serial: To Be Filled By O.E.M.        slot: U3E1        size: 2400MHz        capacity: 2400MHz        width: 64 bits        clock: 100MHz        capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid        configuration: cores=4 enabledcores=4 threads=8   So it recognizes that it has 4 cores with 8 threads, as well as says that all 4 cores are enabled. It is also hyper-thread, so even if running only on one core, it should see two.


Based on a previous , I want to ask what is the dependence structure of points from the same underlying function , which allows us predict a new point belonging to this same unknown function (also in some cases quantify the uncertainty).  Consider a set of input points $\textbf{X}^1=\{x_1^1,x_2^1,...,x_N^1\}$. Also consider any function $f(x)$, for example $$f(x)=sin(x)$$  Now assume we take $iid$ samples from $\textbf{X}^1$ denoted as $\textbf{X}=\{x_1,x_2,...,x_n\}$ and we find $\textbf{Y}=f(\textbf{X})=\{y_1,y_2,...,y_n\}$. All samples from $\textbf{Y}$ are independent since I sampled randomly from $\textbf{X}^1$ , i.e. $P(y_i|y_j)=P(y_i)$ for $i,j \in \{1,2,..n\}$.  Assume all the inputs $\textbf{X}$ and responses $\textbf{Y}$ are similair to the graph below.   Many methods in literature will use the given points $\{\textbf{X},\textbf{Y}\}$ shown as black dots to find the value of $y_{new}$ at input $x_{new}$ shown as a red dot. Therefore, there is some kind of dependence between $\{x_i,y_i\}$ and $\{x_j,y_j\}$.   What is this dependence in structure, i.e how are $P(y_i|x_i)$ related to $P(y_j|x_j)$ ? In other words, what kind of commonalities do methods (regression, splines, kernel regression) that infer the underlying function ($sin(x)$) depend on.


I saw this problem on a problem set and I have absolutely no idea how to proceed in a feasible way.     Does there exist a polynomial $f(x)$ with real coefficients such that $f(x)^2$ has fewer nonzero coefficients than $f(x)$?   Any help would be appreciated.


Why is this Java code always giving me "False" statement?

When I type the same password (jalalkay) it gives me "False" answer!  import java.util.Scanner;  public class password2 {      public static void main(String[] args) {         // TODO Auto-generated method stub          Scanner pass = new Scanner(System.in);           System.out.println("Type a password");         String ps = pass.nextLine();          if(ps == "jalalkay"){             System.out.println("true");          }else{             System.out.println("false");         }      }  }


What is my institution when submitting to journal

In the time between submitting the first draft of a paper to a journal and submitting the third and final version (now), my institutional affiliation has changed.  Should I indicate my original affiliation on my (latest) submission, or my current affiliation?  All the work for the paper was done while I was at the previous institution.


I need help with quotations and punctuation

How do I punctuate when using quotes?     “There were more?” Asked Wendy.   or;      "There were more," asked Wendy?        "He was amazing!" Exclaimed Billy.   or;      "He was amazing," exclaimed Billy!


I recently upgraded my OS to Ubuntu 14.04 LTS. Everything was fine until now, whenever I try to update or install software via terminal I get this message:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I have no idea what other process could be running on background . Please help I am not enjoying my new O.S. Thanks.


Differentiating $e^x$ from first principles using limits.

I have been trying to differentiate the exponential function from first principles without the use of Taylor's series or the derivative of its inverse function ($\frac{d}{dx} (\ln x) = \frac{1}{x}$ and $\ln (e^x) = x$.  Let $f(x) = e^x$, then differentiating $f(x)$ from first principles, $$f^\prime(x) = \lim_{\delta x \to 0} \frac{f(x+\delta x) - f(x)}{\delta x} = \lim_{\delta x \to 0} \frac{e^{x+\delta x} - e^x}{\delta x} = \lim_{\delta x \to 0}\frac{e^x(e^{\delta x} - 1)}{\delta x} = e^x \lim_{\delta x \to 0} \frac{e^{\delta x} - 1}{\delta x}$$  Therefore, in order to prove from first principles that $\frac{d}{dx}(e^x) = e^x$, I would need to first show that $$\lim_{\delta x \to 0} \frac{e^{\delta x} - 1}{\delta x} = 1$$  However, I am not sure how to evaluate this limit and the use of L'Hôpital's rule requires preliminary knowledge on the derivative of $e^x$.   Is it possible to prove the derivative of $e^x$ from first principles solely using limits, or is it impossible as the knowledge of its derivative is a prerequisite to its discovery by Bernoulli?


If $(a,b)=1$ then there exist positive integers $x$ and $y$ s.t $ax+by=1$.

How can i prove that  if $\gcd(a,b)=1$ there exist $x>0$ and $y>0$ such that $ax-by=1$?


I found a great article on color coding a list item based on dates.  However, this only works for 2 days within submission.  I am trying to have a coding structure that will let me know when something is late.  This is the information I am using:   I have a column that subtracts the two dates, then I have another column that uses this script:   ="<DIV style='font-weight:bold; font-size:24px; color:"&CHOOSE((IF(SubmissionDateDifference<=2,2,1)),"red","green","orange")&";'>•
"   With this script, it is only given me the Red and Green colors depending on if the date is greater than 2 days or less than 2 days.  I would like to have it give me Red for 0 days and green for greater than 0.  When I tried to change the numbers to <=0,0, the formula didn't work.  Also, the final piece in case you were wondering is setting up a web part with the list and below the list is a CEWP with this HTML Script:


Admin Tools, could already visited items be hidden when revisiting?

I review / audit a question / answer like this:    And it comes back everytime I start a review session / audit. Stack Overflow has so many smart algorithms, it is not possible to show a task only once, if you respond and actively do something by that task? Like opening it? I can't downvote / upvote more than once, or dismiss more than once etc. If I have opened it once and not made a decision, it is because I do not have the knowledge to become a judge over that question, or answer. Like a special question about C#, I cannot judge, always, if it is a really bad answer or just a short and very precise answer.   A feature request for the "Admin Tools" could be to show not-visited items only.  Another solution could be presenting people for audits by the scope of tags they have. I have good reps on  but none in  - try sort the audits by relevance according to the user.


Deep copying array of nested objects in javascript

I am trying to deep copy array of nested objects in javascript. My array look like this   var arr = [{name:"adam",age:"21"},     {name:"freddie",age:"35",children:[{name:"mercury",age:"25"}]},     {name:"jim",age:"35",children:[{name:"morrison",age:"25",children:[{name:"some", age:"40"}]}]}     ];   I want to make a deep copy of every object inside the array that is i want to create a exact copy of arr into new array which should not have object reference. Depth of array is also unknown that is children array can be upto any level. I have gone through this link  but that did not help me. I googled and found some solutions in jQuery but that did not help me as i dont have knowledge of jQuery.  I also tried implementing it with recursion but that's not working too    I want to do it in javascript only without using jQuery or anything. I am new to JavaScript so i may have missed if there is any library or simple method to do this. Please help me to solve this problem. Thanks in advance.


Prevent submit of a form that is loaded via ajax

I have a jquery ajax call that load a form inside a div and I want to prevent submit of this form but if I use jquery submit function with   $("form").submit(function(e){   e.preventDefault(e);   alert('submit intercept'); });   It does not work if I place in a external js file but works if I put in a script tag after the form that loaded via ajax call.


If the particles show uncertainity ,then why the body made of particles cant show that?

What i want to know is that if the properties of the quantumn nature reduses if the particles combine? Or were we missing any fundamental relation to particle or boby made up of particles?


How many Emails can be Send Per Hour using Postfix

I have to send 12K emails per day, that means 500 per hour. I am willing to set up my SMTP Relay using Postfix. But I am confused about the Server Configuration (Power).  Is it possible to send 500 Email Per Hour Using 1 Core + 1 GB RAM VPS.? (It will be a standalone SMTP Sever, Only Postfix will run on the server.)  Thanks


Close Vote Review, additionally filter off-topic close reasons

Given the ever growing close vote review queue, I think it would help things along if we could streamline the filtering a little more.  At the moment we can filter by tag and by close reason, but off-topic has 7 sub-close-reasons. It may improve the workflow a bit to be able to narrow it down to one or two sub-close-reasons.       There are . About half of all the CV review queue. Supporting data :


How to connect to Exchange Server 2013 via PHP?

I am trying to figure out a way was I can connect to Exchange Server 2013 where I can read/send email. Also, Add/view event calendar event.  Is there a PHP API that will allow me to access the information?


Initializing a variable using default constructor

I'm pretty new to c++, i'm now trying to learn all the basics, I know when default constructors are called, but when i tried different syntax it doesn't work like i expected.  Look at the following code:  class a; class b(); class c(NULL);   'class' is a class i created with default constructor, for a and c everything works well, but for b it just won't recognize the variable as a class member.  As i see it b and c are basically the same, what's wrong than? Thanks!


Here    someone stated: "If $p$ a prime number $\mathbb{Z}^{\times}_p$ is always isomorphic to $(\mathbb{Z}_{p-1},+)$" What is this Theorem called? Where can i find it? How to proove it?  Thank you in advance.


Java: Null pointer access when trying to get numbers from ArrayList to an array

I need help moving numbers from an ArrayList (listInt) to three different arrays (iN, v and w).  `import java.io.; import java.util.;  public class ReadingFileThree {  public static void main(String[] args) throws FileNotFoundException{      //Try Catch for error catching     try{          int n = 0,C;  //Number of items and maximum capacity         int iN[] = null,v[] = null,w[] = null;  //Item number, weights and values of items         int V[][];  //Table to store results of sub-problems          //Calling inbuilt methods to open the file we wish to read         Scanner s = new Scanner(new File("easy.20.txt"));          //An ArrayList is used because it increases in size dynamically         ArrayList<Integer> listInt = new ArrayList<Integer>(); //Int ArrayList          //Method for adding the numbers in the file to the Int ArrayList         while (s.hasNextLine()){             listInt.add(s.nextInt());             n++;         }          //Closing the file. Need to be done or we get errors and memory leaks         s.close();          //Hold the maximum capacity of the knapsack (The last int in the file)         C = listInt.get(n-1);             for(int i = 0; i < n; i++){             iN[i] = listInt.get(i+1);   //item number             v[i] = listInt.get(i+2);  //weight of item             w[i] = listInt.get(i+3);  //value of item             i = i+2;         }          //Untested next stage         //V = new int[n+1][C+1];  //initialising the table to hold results         //for(int i = 0; i <= C; i++) V[0][i] = 0;         //}          //Print out commands for testing purposes         System.out.println("All the numbers in the ArrayList are: " + listInt);         System.out.println("n = " + n);         System.out.println("C = " + C);       }     catch(Exception e) {         System.out.println("File not found yo");     }  }   } `  The problem appears in the for loop. It gives an Error when trying to use an array in there. The error is: null pointer access problem  The file being read looks like this.   4     1    16    34     2     3    30     3    46    34     4    42    47 10   The number on the first line is the Number of Items The number on the last line is the Capacity of the Knapsack The four lines in between show the: Item Number - Value - Weight   I haven't used Java much, Please help.


Meaning of Lie Bracket term in Riemann Curvature Tensor Formula

The formula defining the Riemann Curvature Tensor $R$ is:  $$R(u,v)w = \nabla_u\nabla_vw-\nabla_v\nabla_uw-\nabla_{[u,v]}w$$  The most common geometric explanation I see for this formula is "parallel transporting $w$ around a small parallelogram defined by $u$ and $v$, and seeing how much $w$ 'twists' around". However, if this is the case, I don't understand what the $\nabla_{[u,v]}w$ term in the formula represents.  When deriving this formula, most sources () assume that $u$ and $v$ are coordinate vector fields, and therefore take $[u,v]=0$, sending the third term in the above formula to zero during the derivation.  What's the geometric meaning of the third term with the lie bracket? Are there any derivations of the Riemann Tensor which include it?  I know when the Lie bracket is non-zero, flow curves don't form a perfect parallelogram, and the Lie bracket vector "closes the gap", in a sense. Is this relevant?    (I also see many sources saying the Riemann tensor is the "commutator" of the covariant derivative. However, this isn't strictly true if we include the 3rd term.)


Do repeated columns affect normalization?

For example these tables contain many repeated columns.  Does this affect normalization or this is a common practice? Would it be better to create a separate 1 to 1 table like this.  This is 1 to 0..1 relationship, not 1 to many.


This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


Changes to edit summaries are turfed with no notice

Problem:   Make edit Realize, later, that you should have added an edit summary and did not (or that you just want to change it). Add or change edit summary. Press 'Save Edits'. Edit summary is not saved.   Possible solutions:   Make it so that edit summary changes are saved (already asked for here: ) Make it clearer when it will not be saved (and give the warning before a user goes to the trouble of typing out a new edit summary).   The way it works now a person could make new edits in order to save a new edit summary, but that should not be required as it just encourages fake edits.  For 2., all that would be needed is an pop-up alert when the user clicks on in the edit summary field without having made any new changes.  Something along the lines of "This edit summary will not be saved unless new edits to the post are made."    Here are some more details, in case this is not the way it works all of the time: I made an edit (actually a roll-back on my own post), but did not know there was a comment field for that.  About an hour later, I found out there was such a thing as an edit summary, so I hit "edit", added one for the roll-back, and pressed "save".  I happened to think I should make sure the edit summary stuck (since I really wanted to make sure the original editor got to read why I did the roll-back) and when I hit "edit" again it turned out that no, it didn't.  The edit summary was gone.


What is the kernel of $\varphi : R[u,v]\to R[x,1/x]$ defined by $\varphi(p(u,v))=p(x,1/x)$?

Let $R[x,\frac{1}{x}]=\{\sum_{k=-m}^m a_kx^k\mid a_k\in R\}$. Let $\varphi:R[u,v]\to R[x,1/x]$ defined by $$\varphi(p(u,v))=p(x,1/x).$$  What is $\ker \varphi$ ? To me, $\varphi(p(u,v))=0\implies p(x,1/x)=0\implies p\in (u-x,v-\frac{1}{x})$ since $u=x$ and $v=\frac{1}{x}$ are solution. but this ideal look strange... (in fact, it's $v-\frac{1}{x}$ that looks strange).


How to install MySQL 5.6 in Ubuntu 14.04 Desktop?

Which are the steps to install MySQL in Ubuntu 14.04 (Trusty Tahr)?


Sometimes, I often write numbers in LATEX as $69$ or so. Some other times, I write it plainly as 69. Is there any advantage of one over the other?


Is there a way to find out which package was responsible for a DependecyPackageInstallation?

Is there a way to find out from which package installation a certain package was installed as dependency?


How to recursively rename files/folders to make their names Windows-friendly?

I have a bunch of files on a Ubuntu box, which have various characters in their filenames that Windows doesn't accept (mostly ":" and "*", but possibly others).  What's the simplest way to get these all renamed and moved to a Windows machine? It's OK to replace these characters with something like "[colon]" and "[asterisk]".


Is it possible to move from a German language study visa to a 90-day tourist visa?

I will try to keep this short and sweet. I have obtained a German language learning visa in Germany. It expires on September 1st, 2018 (I applied for it in October, so it is an 1-month visa, just in case this information helps). I would like to find a way to stay and do some traveling after my classes end in August since I really haven't had a chance to explore.  I have been reading online that you can deregister the class D visa, fly to the UK and re-enter into France to start a 90-day tourist visa (granted to us Americans by our passport). But I don't know how accurate this information is and I don't want to chance being deported in September if this is not the case. Anyone have experience with this? Or know where I might be able to go to get an accurate answer?  TL;DR Trying to move from study visa to tourist visa by going to the UK and re-entering a Schengen country. Will this work?


New to linux, help me install this program Komodo-Edit-7.1.0-10496-linux-x86_64  I'm running Ubuntu 12.04 64bit.


How should we use "next", "this" or "last" to refer to days in weeks?

If it is Sunday, when we say "next Wednesday", what does it mean? My friend told me that when it is Sunday, next Wednesday=this Sunday. I am confused about it.  If the usage and understanding is different among countries, could you please give examples and explain it in detail?    Thank you^^


A standard multiset coefficient, counting the number of multisets of size $k$ drawn from $n$ elements, is known to be $ \left( \! \binom{n}{k} \! \right) = \binom{n+k-1}{k}. $  Suppose there is a cap on the multiplicity of each element. For instance, suppose an urn contains 11 red balls, 6 green balls, 2 black balls, and 4 blue balls.  How many ways can you draw a "hand" of 5 balls?    In general, suppose we use $\left( \! \binom{n}{k} \! \right)_{r_1, \dots, r_n}$ to denote the number of size $k$ multisets taken from $n$ elements in which, for each $j=1, \dots, n$, the multiplicity of element number $j$ is at most $r_j$.  Is there a standard name and notation for this?  Is it reducible in closed form to familiar combinatorial entities like binomial coefficients, factorials, etc?


mysql: counting number of tickets which are open per day basis

I have a table tabName with the following rows:  id(PK) .. Created(datetime)     Resolved(datetime) Status(new/resolved/open) 1          2015-05-10 00:00:00   1970-01-01 ..       open 2          2015-05-10 ..         1970-01-01 ..       new 3          2015-05-10            2015-05-12          resolved 4          2015-05-11 ..         1970-01-01 ..       open 5          2015-05-11 ..         1970-01-01 ..       new 6          2015-05-11            2015-05-11          resolved 7          2015-05-12 ..         1970-01-01 ..       open 8          2015-05-12 ..         1970-01-01 ..       new 9          2015-05-12            2015-05-12          resolved   NOTE:  1970-01-01 .. is default time for all the tickets which are still open.  I have to frame a query to get the count of tickets still open, date wise. Say like on 10 May I have 3 tickets opened. Noting that for id = 3, resolved date is not 10 but it's closed on 12 May.  I framed a query like  SELECT DATE_FORMAT(Created, '%d-%m') AS createdd, COUNT(1) FROM tabName WHERE DATE_FORMAT(Resolved, '%d-%m') > DATE_FORMAT(Created, '%d-%m')       AND YEAR(Created) = '2015' GROUP BY createdd;   The above query gets all the tickets whose Resolved date is greater than the date which is considered for the count. This may count newer tickets as well. And also if the older tickets which are not resolved yet is not counted.  Is there any other way to frame the required query? I have been juggling with this query from last 3 days. Not able to find out still.  Updated: As suggested by Abhik, i have tried in sqlfiddle site.  Here is what i created:  CREATE TABLE test    (idint,createddatetime,resolveddatetime, status varchar(15), PRIMARY KEY (id));    INSERT INTO test       (id,'created','resolved',status`) VALUES       (1,'2015-05-10 00:00:00','1970-01-01 00:00:00','open'),    (2,'2015-05-10 00:00:00','1970-01-01 00:00:00','new'),    (3,'2015-05-10 00:00:00','2015-05-12 00:00:00','resolved'),    (4,'2015-05-11 00:00:00','1970-01-01 00:00:00','open'),    (5,'2015-05-11 00:00:00','1970-01-01 00:00:00','new'),    (6,'2015-05-11 00:00:00','2015-05-11 00:00:00','resolved'),    (7,'2015-05-12 00:00:00','1970-01-01 00:00:00','open'),    (8,'2015-05-12 00:00:00','1970-01-01 00:00:00','new'),    (9,'2015-05-12 00:00:00','1970-01-01 00:00:00','open')    ;   `   When i run  ` select created_date, @open:= @open+open_ticket-resolved as open from(  select   date_format(created,'%d-%m') as created_date ,  sum( case when status='open' then 1 else 0 end )+  sum( case when status='new' then 1 else 0 end )+  sum( case when status='resolved' and ( date(resolved) > date(created) or  date(resolved) = date(created)) then 1 else 0 end ) as open_ticket,  sum(case when status = 'resolved' and date(resolved) = date(created) then 1   else 0 end) as resolved  from test  where  YEAR(Created) = '2015'  group by created_date )x,  (select @open:=0)r order by created_date ; `  I got following output  created_date   open 10-05   3 11-05   5 12-05   8  Here count of still open tickets for 12-05 must be 7. The above query includes ticket id "3" , which is closed on 12-05. So is there any way to exclude this? If i am able to get this right, then i will have full fledged query.


I probably need the help of a Python script to make this work.  What I want is: The player will be able to save and turn off the game, but continue from where they saved when they next log in. Items such as gold, weapons, etc. must be stored.  It feels like something hard to do and I am not managing to figure it out alone. Although I love problems and solving them, in this case I need help.  I know that BSE People should not  ask more questions.  But.  Is this stupid or must I have several Scenes in my game. Say that my player goes into a house. Should the house then be in another Scene, or should I move camera and player to inside the house from the same Scene?  Any advice would be very helpful. I have no one near me whom I can ask.  //  Robin W


I can't disable showing drive's icons in Launcher bar. I have looked for that option both in CCSM (it used to be in Experimental tab) and in dconf-editor (desktop->unity) and it is missing.    How can I remove launcher drive icons?


When I load a bunch of layers into QGIS from PostGIS, they seem to load in reverse alphabetical order.  Is there any tools or plugins that allow you to quickly sort the QGIS TOC in a different order?  For example I can think of a couple of options one might want:   Sort layers by geometry, where points are on top, then lines, polys, & rasters. Sort Layers by name (alphabetical, reverse alphabetical). Sort first by geometry, then by name.  This would be a combination of #1 & #2.  Points layers are sorted to the top (same as #1), but then points layers are sorted alphabetically (point-a, point-b, point-c, etc).   When loading a large number of layers, this would help to rapidly build up the right ordering for map production.


Let $p$ be a prime and let $F$ be a field with $p^k$ elements and $K$ a subfield. Show that $Gal(F : K)$ is a cyclic group of order $[F : K]$.

My attempt:  Consider the map $σ : F→ F$ such that $∀a ∈ F, σ(a) = a^p$. Then $σ$ is a field automorphism of $F$.  $ker(σ) = 0$ and since $F$ is a finite field, $σ ∈ Gal(F : K)$, the galois group of order $k$. Since the order of the galois group is $k$ it is generated by $σ$ so we can deduce that $Gal(F : K)$ is a cyclic group $Z_n$.  By the Fundamental Theorem of Galois Theory,  $|G| = |Gal(F : K)| = [F : K]$, for the field extension  $F : K$ of finite degree.  $Gal(F : K)$ is a cyclic group of order $[F : K]$.


Start command from run dialogue with elevated privilages keyboard shortcut

In windows 7 you can start applications as admin by searching in the start menu and then pressing Ctrl+Shift+Enter.  Is a similar shortcut available for the Run Window (Win+R)?


Toshiba Laptop tells me to insert boot media in selected boot media device and press a key

Around 7 months ago i dropped my pc from knee high on the carpet and it went to a blue screen.  When i dropped it i was playing the game black ops 2.  In an attempt to fix it I held down the power button until it turned off then took out the battery.  After that it just wouldn't load so i decided to wipe it by holding down "0" when turning it on.  It gave me a lot of warnings and i was stupid enough to ignore them.  I have no back ups of my pc on anything.    So now every time i start up my laptop is says "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key."   Above that it says PXE-M0F : Exiting PXE ROM.  We took it to some pc tech guys and after several tests they couldn't do anything.  They never told me that there was anything wrong with the hard drive or the connections inside.  I have no idea what to do and if  anyone could tell me ways i could fix this it would be very much appreciated.


"Exception in thread "main" java.lang.NullPointerException" Variable not initialized, not seeing why

I have been stuck on this for a while now, if someone could show me some insight it would be much appreciated. The stack trace console points to the frame.add(showname); as well as to new GradeProg(); The console states:  Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1040) at java.awt.Container.add(Container.java:958) at javax.swing.JFrame.addImpl(JFrame.java:540) at java.awt.Container.add(Container.java:363) at GradeProg.<init>(GradeProg.java:39) at GradeProg.main(GradeProg.java:68)   From what I understand, due in part to this great site, was that the showname variable was not initialized, though I believe I already initialized it. Here is the code:  import java.awt.*; import java.awt.event.*; import javax.swing.*;  @SuppressWarnings("serial") public class GradeProg extends JFrame implements ActionListener {  JLabel label, label2, showname, showgrade; TextField field, field2; JFrame frame; JButton enter; String grade, name; int parse;  public GradeProg() {      frame = new JFrame("Student Grades");     frame.setLayout(new GridBagLayout());     frame.setDefaultCloseOperation(EXIT_ON_CLOSE);     frame.pack();     frame.setVisible(true);     frame.setSize(600, 300);      label = new JLabel("Student Name: ");     field = new TextField("", 12);      label2 = new JLabel("  Score  ");     field2 = new TextField("", 5);      enter = new JButton("Enter");     enter.addActionListener(this);      frame.add(label);     frame.add(field);     frame.add(label2);     frame.add(field2);     frame.add(enter);     frame.add(showname);     frame.add(showgrade);  }  @Override public void actionPerformed(ActionEvent e) {      parse = Integer.parseInt(field2.getText());      if (parse >= 90 && parse <= 100) {         grade = "A";     } else if (parse >= 80 && parse <= 89) {         grade = "B";     } else if (parse >= 70 && parse <= 79) {         grade = "C";     } else if (parse >= 60 && parse <= 69) {         grade = "D";     } else if (parse >= 0 && parse <= 59) {         grade = "F";     }      showgrade = new JLabel("Grade: " + grade);     showname = new JLabel(field.getText()); }  public static void main(String[] args)  {     new GradeProg(); }  }   Again, any help or overall suggestions would be much appreciated. Thakns


greatest value of $\mathop{\sum}_{1\leq i<j\leq n} \bigg|x_{i}-x_{j}\bigg|$ is

If $x_{1},x_{2},x_{3},\cdots \cdots , x_{n}$ be real numbers between $0$ to $1$. Then the greatest value of $\displaystyle \mathop{\sum}_{1\leq i<j\leq n} \bigg|x_{i}-x_{j}\bigg|$ is   what i try  $\displaystyle \mathop{\sum}_{1\leq i<j\leq n}\bigg|x_{i}-x_{j}\bigg|=\bigg|x_{1}-x_{2}\bigg|+\bigg|x_{1}-x_{3}\bigg|+\cdots \bigg|x_{1}-x_{n}\bigg|+\bigg|x_{2}-x_{3}\bigg|+\cdots +\bigg|x_{n-1}-x_{n}\bigg|$  i am trying using triangle inequality,   $\displaystyle \bigg|x_{1}-x_{2}\bigg|+\bigg|x_{2}-x_{3}\bigg|+\cdots +\bigg|x_{n-1}-x_{n}\bigg|\geq \bigg|x_{1}-x_{n}\bigg|$  how do i solve it help me please


How do you get Zekrom and Reshiram in ORAS?

How and where can I catch Zekrom and Reshiram in Pokemon Alpha Sapphire and Omega Ruby?


Objective C: don´t lock iPhone while app is running

I was trying to find out how to disable locking iphone while my app is running but I wasn´t succesful. Do you know if it is even possible? My app is reading values from some hardware in real time and it is really annoying when display is locking all the time. I am not talking about running app in the background... Thank you guys!


I flagged  five days ago because it seems off-topic to me. The question has been closed by a moderator few minutes after.  However my flag has not been marked as helpful (or declined, or disputed) in my flags summary page. It's just like the flag has not been taken into account (screenshot below).    Is a moderator can explain me?


I need to make a Kaplan Meier plot with an  at-risk or risk-set table beneath it. Otherwise stated, I need a table of the number of subjects at risk at different time points aligned below the figure. I found a  that explains how to do this for a plot that contains multiple subgroups. This is the ggkm function, the code for which is available .  # Example of a plot like this library(survival) data(colon) fit <- survfit(Surv(time,status)~rx, data=colon) ggkm(fit, timeby=500, ystratalabs=c("Obs","Lev","Lev+5FU"))     Looking at the data that was used to make the above plot, we see:  Call: survfit(formula = Surv(time, status) ~ rx, data = colon)             records n.max n.start events median 0.95LCL 0.95UCL rx=Obs         630   630     630    345   1723    1323    2213 rx=Lev         620   620     620    333   1709    1219    2593 rx=Lev+5FU     608   608     608    242     NA      NA      NA   My question: My plot only has one group. The call looks like this:  Call: survfit(formula = Surv(Recur_day/365.242, Recur) ~ 1, data = study_data)  records   n.max n.start  events  median 0.95LCL 0.95UCL      440     440     440      92      NA      NA      NA      When I try to use the ggkm function I get an error like so:   ggkm(survfit(formula = Surv(Recur_day/365.242, Recur) ~ 1, data = study_data), timeby = 2) Error in data.frame(time = sfit$time[subs2], n.risk = sfit$n.risk[subs2],  :    arguments imply differing number of rows: 1, 0 In addition: Warning message: In max(nchar(ystratalabs)) :   no non-missing arguments to max; returning -Inf   Does anyone have an idea of what I'm doing wrong? Or is there an easier way for me to do this by hand? I am open to just putting the data in a text box in PowerPoint myself, I'm just not certain of how to get the number of subjects at risk at each timepoint (I'd like to do at two years, four years, six years, etc.)


If $f$ s twice differentiable and satisfies the following constraints, prove $f'(0)>-\sqrt 2$

Let $f$ be a twice differentiable function on the open interval $(-1,1) $such that $f(0)=1$. Suppose $f$ also satisfies $f(x) \ge 0, f'(x) \le 0 $and $f''(x) \le f(x)$, for all $ x\ge 0$. Show that $f'(0) \ge -\sqrt2.$  My attempt $ \rightarrow$  From Taylor's we see that $0 \leq f(x)=f(0)+f'(0)x+\frac{f''(\zeta)x^2}{2} $ for some $\zeta \in (0,x) .$  $f'(x)\leq 0$ and $  f'(x) \le 0 \implies$  $  f''(\zeta) \leq f(\zeta)\leq 1$  Thus $1+f'(0)x+\frac{x^2}{2} \geq 0 $.  I'm stuck upto this,I can see that if the discriminant of the quadratic is less than $ 0$ we're done but how do I conclude that the discriminant would be $0$ ?


Why is the "goes" form used in this sentence?

There is a sentence: "Microsoft says it's because 40% of search queries on their competitor's site goes unanswered - something they can improve on"


Let $S$ be a bounded set. Prove there is an increasing sequence ($s_n$) of points in $S$ such that $\lim s_n = \sup S$. Note: If $\sup S$ is in $S$, it’s sufficient to define $s_n = \sup S$ for all $n$.  What I have tried so far:  Let $M=\sup S, L = \lim\, s_n,\,|s_n-L|<\epsilon/2$, then $M-\epsilon < L- \epsilon/2 < s_n < M < M+\epsilon$. But I get this based on $M <= \epsilon+L$, because $\epsilon+L$ is an upper bound for $s_n$.   However, as $s_n$ are just points in $S$, so I don't know if it's sufficient to say $M$, which is the $\sup$ of $S$, is smaller than $L+\epsilon$.


Conjugates of ${\sqrt 5 + \sqrt 6 }$ over $\mathbb{Q}$ and irreducibility of $x^4 -22x^2+1$ (for minimal polynomial)

The easy part is algebraic manipulation: $$x - \left( {\sqrt 5  + \sqrt 6 } \right) = 0 \Rightarrow {x^2} = 5 + 6 + 2\sqrt {30}  \Rightarrow {x^2} - 11 = 2\sqrt {30}  \Rightarrow {x^4} - 22{x^2} + 1 = 0$$ Solutions to this equation are ${x_{1,2,3,4}} =  \pm \sqrt 5  \pm \sqrt 6 $ and these are all candidates for the conjugates. However, not all of them are necessarily conjugates of ${\sqrt 5  + \sqrt 6 }$. The hard part is proving that $p\left( x \right) = {x^4} - 22{x^2} + 1$ is the minimal polynomial of ${\sqrt 5  + \sqrt 6 }$ over $\mathbb{Q}$. Eisenstein criterion doesn't give irreducibility when taking $p\left( {x + a} \right)$. Even though $p$ has no rational zeroes, that still doesn't mean that it is irreducible over $\mathbb{Q}$. One method which I can think of would be to calculate each of 7 divisors of $p$ and show that they are not in $\mathbb{Q}\left[ X \right]$. However, that would be impractical in the next problem which has a polynomial of degree 31. How to see that all the candidates are indeed the conjugates of ${\sqrt 5  + \sqrt 6 }$ ?


How to find the circumcenter of a triangle and the length of the corresponding radius of the circle in $\mathbb{R}^3$

The problem is as follows:     Given the points A(1, -2, 0), B(4, 2, -5) and C(0, 0, 0), calculate the coordinates of the circumcenter of the triangle and the length of the radius (that is, the length between the circumcenter and any of the three of the vertices of the triangle).   I am attending grammar school and we are dealing with vectors. The curriculum includes basic operations with vectors, that is dot product, multiplying it with a number, adding two vectors together and subtracting them. However, the curricilum doesn't include cross product, vector equation of a line and vector equation of a plane.  I did some research and found the following formula to calculate the diameter (distance between the circumcenter and one of the vertices): $$ \frac{abc}{\sqrt{(a + b + c)(-a + b + c)(a - b + c)(a + b - c)}}$$  I am now interested how can one derive such formula? Is it derived by using the vector dot product? I'd be pleased to get an example or explanation of deriving the above formula.  When it comes to locating the coordinates of the circumcenter, things get more complicated. So as to locate them, one must perform the following tasks:   Locate the midpoint of each edge of the triangle Find the slope of the line for each edge of the triangle (which is quite difficult to do in R^3)   Find the negative inverse of that slope, so you get the slope of a line parallel to a particular edge of a triangle Use the slope obtained in 3. step and the midpoint of the corresponding edge in 1. step to get the vector equation of the right bisector to that edge Use two right bisectors and locate their cross section. This point is the circumcenter of the triangle.    The above not only includes the vector equation of a line (which we weren't taught at school but it still somehow appeared to be on exam), but is also very time-consuming. The exam consists of approximately six tasks and lasts 60 minutes, therefore 10 minutes per each task and this problem itself takes just about 10 minutes.  Therefore I would like to know if there is any other, more efficient way of calculating the coordinates of the circumcenter. Is it possible to calculate it only by using vector dot product?  Thank you for the time taken.


I am using   which is on Android 2.2 . Currently device showing The application google services framework (process com.google.process.gapps) has stopped unexpectedly I didn't get any support from the nikai site. How can i rectify and overcome the problem


LyX cannot compile correctly my title page

I am trying to make the title page for my master thesis. I found on the internet a template, in which the cover page is given by the following code  \begin{titlepage}  \begin{center}  \textsc{\LARGE University Name}\\[1.5cm]  \textsc{\Large Master Thesis}\\[0.5cm]    {\huge \bfseries Thesis Title}\\[0.4cm]    \begin{minipage}{0.4\textwidth}  \begin{flushleft} \large  \emph{Author: Name}  \end{flushleft}  \end{minipage}   \begin{minipage}{0.4\textwidth}  \begin{flushright} \large  \emph{Supervisor: Name} \end{flushright}  \end{minipage}\\[3cm]     \large \textit{Department of Economics}\\[0.4cm]  \textit{Uppsala}\\[0.4cm]   {\large \today}\\[4cm] % Date %\includegraphics{Logo}   \vfill  \end{center} \end{titlepage}   When I compile latex in Lyx, my name and my supervisor's name are aligned in the center and not in the left and right, as they supposed to be  What I am missing?  PS: Here is the link


Getting prompted for verification code but where do I put it in?

I am using an old iPad -- it's an iPad 2 model MC990LL/A -- running iOS 9.3.5 I noticed when I go to settings --> iCloud and tap the top part where my name and ID is, I get this:  Account Details Unavailable If you are signing in to iCloud on another device or at iCloud.com, you can get a verification code while offline.  I tap "Get verification code" and it sends one -- but where do I put it in? I saw the answers that said to tack it onto the end of your password but there's no password prompt! I wanted to add my iPad to my list of trusted devices (my phone and computer are there) but there does not seem to be a way to do it. Any help appreciated. ETA: The help offere by bmike was great; as it happened turning it off and on again a couple of times did the trick after I reset the settings. (Not a full restore). But dang, the back compatibility is starting to go...


Are hardness, strength and toughness of materials not the same thing in a way?

I had to look through several videos and re-read Wikipedia statements about these material properties several times before I could even begin to differentiate them. However, now that I have found out this is what I understand:    measures the pressure needed to cause permanent change.  measures the load that can be withstood before permanent change.  measures the stress needed before fracturing.   Overall, all three properties could be generalized to measure the stress needed to cause permanent change whether by fracture, plastic deformation or any other form of failure or no? Are their only differences the specific type of stress applied and the specific failure when the amount of said stress exceeds the property measurement?


Prove that $e^x\ge x+1$ for all real $x$

Without using differentiation, logarithmic function, rigorously, prove that $$e^x\ge x+1$$ for all real values of $x$.


Which gears combinations shouldn't be used?

Is there any general rule or recommendation to avoid usage of certain gears combinations (for 2xN and 3xN gears systems)? Do they differ for mtb and road bikes?  I know that it's recommended not to use biggest front chainring with big chainrings on cassette (and opposite) because parts will wear faster and I will loose a bit of pedaling efficiency, but I'm not sure, if I should avoid 2 or 3, or even more biggest (smallest in opposite case) chainrings on cassette.


Should I add a full stop/period at the end of each item in a bullet point list?  i.e.   My first item. My second item. My third item.   or   My first item My second item Or what about a longer item that might have other puncuation in it, like this. It doesn't seem right to miss the full stop/period off


Expected value of $X$ if $\ln(X)\sim N(\mu, \sigma)$

I am very new to these statistical concepts and getting confused really quickly while reading online. I am supposed to find the expectation of $\ln(X)\sim N(\mu, \sigma)$ by using the MGF. So far I've got $M_{\ln(X)}(t)=E[e^{t\ln(X)}]$ (By defintion) $=E[X^t]$ but I am not sure how to go from there. I saw someone online simply plugging in $1$ for $t$ and saying that's the expectation but I didn't find anything on why is that and I don't know if it's correct. Another thing I know is that the expectation is the first derivative of the MGF evaluated at $t=0$. But I am not sure how to use that. Do I simply plug in $\ln(x)$ instead of $x$ in the MGF of $X\sim N(\mu,\sigma)$ then take the first derivative? or?


The SE network serves adverts for revenue, but they have been kind enough to make them non-obtrusive and on-topic. I have actually found 2 tools that I now use in production via these adverts. So kudos!  But, sometimes what happens is that you notice an interesting advert just as you hit refresh and then it is gone. Or you are on a new browser instance/machine and forgotten to turn the ad-blocker off.  Why not have a list of the adverts somewhere and searchable. I know I wouldn't mind looking at it once in a while. You will also get some additional click-through revenue from there.  Again it is non-obtrusive and a user has to navigate to and thus opt-in to view the page - so no harm done.


"2013-10-21 12:00:00.004" string convert to datetime in Python

How to convert "2013-10-21 12:00:00.004" to datetime object in Python? The problem is there is decimal number in seconds.