If a tunnel is dug along a diameter of the Earth, and a ball is dropped in the tunnel from a certain height $h$ above the surface of Earth, what should the motion of the ball be as seen from the Earth?   The answer says it'll be along a straight line and periodic, but not simple harmonic. I understand the former. But why will it not be simple harmonic?  From what I could make out, the mean position would be the center of the Earth, with the force of gravity acting on the ball. Speed would be maximum at the mean point (center of the Earth), and minimum at the extreme positions (surface of the Earth).

...And you jumped in.  What would happen when you got to the middle of the Earth? Would you gradually slow down, until you got to the middle and once you were in middle would every direction feel like it was up?


Suppose that $G$ is finite and that $g\in G$ . If $h\in G$, show that $o(hgh^{-1})=o(g)$.   Solution:  We have that $(hgh^{-1})^{o(g)}=hgh^{-1}hgh^{-1}...hgh^{-1}=hg^{o(g)}h^{-1}=h1_Gh^{-1}=1_G$, so $hgh^{-1}$ has finite order and $o(hgh^{-1}) \leq o(g)$.   Now, what I don't understand is "A similar argument shows that $$ g^{o(hgh^{−1})} =h^{−1}(hgh^{−1})^{o(hgh^{−1})})h = 1_G ."$$  Which shows that $o(g) \leq o(hgh^{-1})$ and then $o(g) = o(hgh^{-1})$  I don't understand how to get $ g^{o(hgh^{−1})} =h^{−1}(hgh^{−1})^{o(hgh^{−1})})h = 1_G $, what argument do you use to get this?

I am trying to prove that any conjugate of $a$ has the same order as $a$.  Let $G$ be a group and let $a \in G$.  An element $b \in G$ is called a conjugate of $a$ if $b=xax^{-1}$.  My professor gave us a hint.  Prove $a^k=e$ iff $b^k=e$ for all $k \in \mathbb{Z}$ implies $o(a) = o(b)$.  My first move is to $b^k = (xax^{-1})^k = (x^{-1})^ka^kx^k = (x^{-1})^kex^k = (x^{-1})^kx^k=x^{-k+k}=x^0$  I am not sure that I am doing this correctly?  I am trying to get $b^k=e$.  However when I raise $(xax^{-1})^k$, I am not sure if I what I have done is correct?  I am kind of confused here.


Can Ubuntu run on Ubuntu on Asus F5Rseries Celeron M520 including sound and WiFi?

I am a bit financially strapped and received a Gateway GT5056 tower. The tower has an AMD dual core 64-bit processor in it. Will Ubuntu 12.04 run on this machine? I will not have any other application other than LibreOffice installed.


There are words like dad joke, lame joke, pj (poor joke) for a joke that isn't funny at all.  Is there a single word for such jokes that are not amusing?

Could you tell me some suitable idioms to express this situation:       A guy told you a joke, but it's not funny at all.     In Japanese, we say "He slipped" or "His joke was so cold that the air got frozen," for that situation.  Are there any similar phrases in English?


pwd:  /home/xxx    File present in:  /home/a/b/c/d/e/   Here I want to tar a directory "e" in pwd (i.e xxx folder).  I tried like this  tar -vcf tarfile.tar /home/a/b/c/d/e/   But the problem is it compressing all the directories like (/home/a/b/c/d/e). But I need directory "e" should be compressed.

I am trying to create a graphical program for my script.  Inside the script I use tar to create a tar archive.  From the graphical program I get the full name of file that I want to create a tar archive.  tar -cvf temp.tar /home/username/dir1/dir2/selecteddir    My tar archive includes home, username, dir1, dir2 and selecteddir while i want tar to create archive only including selecteddir.


So, I run an artificer in my one campaign that just reached lv 20. Part of the lv. 20 ability (Soul of Artifice) reads:     If you’re reduced to 0 hit points but not killed outright, you can use your reaction to end one of your artificer infusions, causing you to drop to 1 hit point instead of 0.   My artificer is using one of his infusions to replicate the amulet of health magic item which requires attunement and reads     Your Constitution score is 19 while you wear this amulet   If my character is about to be knocked down to 0 hp, and then uses his reaction to end his infusion that created the amulet, what happens?  This post is  but I feel is still different since in this case I need to know if things would happen any differently in this case since it happens instantaneously in the middle of combat, which was a question that the other one did not have to answer, so think of this as more of a follow-up to that one based on new rules

WotC recently released the Basic Rules for the DM, and with it came a few items like the Amulet of Health:     Wondrous item, uncommon (requires attunement)      Your Constitution is 19 while you wear this amulet. The amulet has no   effect on you if your Constitution is already 19 or higher.   The Basic Rules state at the end of Chapter 1, under "Beyond 1st Level":     When your Constitution modifier increases by 1, your hit point maximum   increases by 1 for each level you have attained. For example, when   Bruenor reaches 8th level as a fighter, he increases his Constitution   score from 17 to 18, thus increasing his Constitution modifier from +3   to +4. His hit point maximum then increases by 8.   But it doesn't explain what happens when the Constitution modifier decreases!  My players will soon get the Amulet as a reward, and I fear that they will just pass the item around to increase everyone's max HP; I want to prevent that. Are the HP lost when a character is no longer attuned to the Amulet?


I apologize if this is more mathematical than physical, but this issue always seems to come up when I am solving physics problems.   Given a function of two variables $f(x,y)$ let us decompose it into an infinite series of orthogonal functions $\psi_n(x)$ such that $$  f(x,y) = \sum_n^\infty c_n(y)\psi_n(x) \tag{1}$$ and so $$ c_n(y) = \int_a^b \psi_n^*(x) f(x,y)\ dx\tag{2}$$  My question is simply how are we always allowed to decompose a function of two variables as the product of two variables (and then sum over varying products). Is there any sort of non-rigorous proof as to why this can always be done? I've used this fact many times, but I have never seen any explanation as to how/why we can so trivially separate them.

Quite often (see, for example, this ) when discussing the Born-Oppenheimer approximation the following assertion is made: any well-behaved function of two independent variables $f(x,y)$ can always be expanded over the complete set of functions $\{ g_{i}(x) \}$ and $\{ h_{j}(y) \}$ in the following way $$ f(x,y) = \sum\limits_{i} \sum\limits_{j} c_{ij} g_{i}(x) h_{j}(y) \, , \quad (1) $$ or by defining $$ c_{j}(x) = \sum\limits_{i} c_{ij} g_{i}(x) \, , $$ as $$ f(x,y) = \sum\limits_{j} c_{j}(x) h_{j}(y) \, . $$  Sometimes an argument in favor of the statement above is that it is equivalent to expanding a function of one variable $f(y)$ over the complete set of functions $\{ h_{j}(y) \}$ $$ f(y) = \sum\limits_{j} c_{j} h_{j}(y) \, , $$ with the difference that coefficients $c_{j}$ in the former case carry the $x$-dependence.  For me it seems like this argument is a bit far-fetched. So my question is: how do we know that (1) is true? Is it a theorem, or an axiom, or something?


bpy.data.objects['my linked object'].library I found this code through a search and tried to check the linked object, but in 2.91, this code doesn't seem to print anything. Is there a new way to check if an object is linked from external blend file?

Is there any way I can check if an object is linked from another Blend file via bpy? I need to do this for xrefs on something.


I have linox & want to download  Gimp. Which version should I use?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I am not a mathematician so I might not be entirely accurate in my mathematical depictions, but I will correct them if I can.  My problem is like that: I have $f_n:\mathbb R ^+\to\mathbb R ^+$ with $f_{n}(x)=x_{m_{n}}$ For the moment I will explain the function using a $n=10$ as $n$ is the basis in which the number is written and "processed" by my function.  So given the normal decimal basis I can write the function as: $f(\sum c_i*10^i)=\sum c_i*10^{-1-i}$. I think the sum goes from $-\infty$ to $\infty$ for any given number as the digits that are not written are zeros.  So what my function does (or at least if think it does) is basically a mirroring of digits over the decimal point (ex.: $f(23.45)=54.32$).  I should be easy to prove that the function is bijective as $f\circ f=1_{\mathbb R ^+}$.  Now given the established function my problem comes when I restrict the function to the interval $(0;1)$ as i believe that $ Im_f(0;1)=\mathbb N ^* $ which seems to indicate that ${\mathbb R}$ could be countable.  EDIT: Since this was a commonly raised problem about my question I will add as many forms as I have encountered it in with what I hope are satisfying answers:   $\mathbb N$ has "finitely many digits": Note the "finite number of digits" with $k$. Take $10^{k+1}$.  $\mathbb R^+$ can not have numbers with infinite digits (to the left of the decimal point) then $lim_{x\to\infty}\int log_{10}x\ dx=?$ any other proof of something is finite using induction is also flawed from a simple perspective: $\mathbb N$ is not finite to begin with the argument about the lack of a successor and a predecessor holds no ground. If i can't add or subtract 1 from a decimal number knowing all the digits involved (at least in theory) I would have to go and start school again from the first grade.

This question is me trying to understand (again) why there can be no one-to-one correspondence between the sets of natural and real numbers.  The source of confusion is this: if we abstract completely from the properties and operations on numbers and just think of them as strings of digits, it appears to be possible to list all the real numbers between $0$ and $1$ and all positive integers having the same digits in the same (or reverse) order, for example:  $$0.1 \to 1$$  $$0.01 \to 10$$  $$0.0101 \to 1010$$  $$0.110101 \to 101011$$  I use binary expansion for simplicity.  Since irrational numbers have infinite expansions, we would have to consider some kind of 'infinite natural numbers', like:  $$101110001\dots$$  or  $$\dots101110001$$  I think the main (and only) reason why such numbers don't exist is this requirement:   We need the sets of real and natural numbers to be ordered. We need to be able to do arithmetics on real and natural numbers.   Obviously, if we consider any of two types of 'infinite natural numbers' and the usual absolute value, we find that it's impossible to order them, or do arithmetics with them.  The only way is to change the norm (to $p-$adic norm for example).  While with the real numbers it's still possible to order them, and do arithmetics with them when they have infinite amount of digits in their expansion (or at least in principle).     Is my reasoning correct? Are the two requirements (ordering and arithmetics) enough to explain why natural numbers with infinite amount of digits do not exist, while real numbers do?   This confusion is not restricted to me alone, see  for example


I have a question about scientific English. I wonder when to use the article "the" when you refer to a physical quantity or to a formula. I promise that I have looked into so many manuals, but I am still terribly puzzled.  As I compared many textbooks and scientific articles, let's start from the cases I am sure about.  One always reads:  "the function f(x) is defined as ..." "the functions f(x) and g(x) are defined as ..."  but, on the other hand, one (almost) always reads:  "Point A is defined as ..."  "Points A and B are defined as ..."  Now, both "point" and "function" are countable nouns and, moreover, by saying "f(x)" and "A" you refer to a specific function or point. So, why do I use "the" in one case and zero article in another?  Another puzzling case is uncountable nouns such as "conductance" or "energy". You, basically, can find whatever situation. I take the next examples from the same article written by native English-speakers (and supposedly corrected by a language polishing service):  "the values of conductance are..." "the dependence of the conductance at the neutrality point is..." "The conductance G(E) is determined in a standard way..." (notice the attribute G(E))  Can you help me to rationalize all this?  Finally, when you refer to a Figure/Table/Section/Equation/Chapter you always use zero article:  "As seen in equation 5 ..." "..., which was shown in Section 3 ..." etc.  Am I right?

I'm writing up my dissertation and I'm really confused where to use "the". Examples:     In this experiment, (the?) heat transfer coefficient was calculated, allowing to estimate (the?)frost thickness.    And:     Firstly, (the?) air properties are defined.   And:     As (the?) crystals grow in radius, the amount of air in (the?) ice is reduced, due to (the?) ice becoming more packed.   None of the nouns mentioned above have been used for the first time, so I rule out the use of "a".   Would appreciate any help.


The Very Low Quality flags get automatically dismissed (and become 'disputed') every time the post has been edited.  So does it make sense to flag the bad posts with this flag if:   the post has been edited already? there is a chance the post will be edited - the question is bad, so is formatting, so someone may want to improve formatting (but it wouldn't make the question any better).   I feel the flag would be 'wasted' in that cases, so isn't it better to use other flag (which isn't auto dismissed)?

When flagging an answer as "low quality" you see some explanatory text that reads:     This answer has serious formatting or content issues and might not be salvageable.   An effort should be made to improve answers before they're flagged for removal.  I don't mean to discourage any "low quality" flagging at all, so if an answer is old and the user hasn't been back for a while, go ahead and flag it.  But if an answer is only a few hours old and has no downvotes or comments (meaning no one made an effort to communicate that improvement was needed) then I'm hesitant to just delete it.  Moderators just don't have time to look at every low-quality answer on the site.  We need everyone in the community to use the tools at their disposal (downvotes, comments, edits) to deal with these.  Please use flagging for deletion as a last resort.  Naturally this is open for discussion, so feel free to voice your opinion if you disagree with me.


In the series finale of Star Trek: Voyager, we hear Lt. Barclay mention that there's a transwarp aperture forming about a light year from Earth. This was from the Borg's transwarp hub in the Delta Quadrant, and the Federation looked to be prepping for the Borg vessels that would come through.  My question is, if the Borg had the ability to do this all along, why didn't they do this much earlier, destroy the Federation, and be done with it?  From The Next Generation we do know that they destroyed the majority of the Federation fleet during the battle of Wolf 359. So doing something like that again wouldn't be a difficult task for the Borg.  It just doesn't seem very realistic that they would never use such an advantage against their foe, then again it's a TV show :).

I just finished watching Star Trek: Voyager and it occurred to me that the Borg (especially with the transwarp hub that Voyager destroyed) could have assimilated the Alpha Quadrant with waves of ships.  In episode 26 of season 4 (Hope and Fear), Arturis mentioned how the Borg surrounded their entire system with a thousands of ships.  I thought this reference was surprising as that was really the only instance of the Borg acting collectively to assimilate a species beyond the incident with fluidic space.


What does someone mean when they say read(2), or open(1)? What do the numbers in the brackets actually mean?  Edit: Rephrased the title of the question.

For example: man(1), find(3), updatedb(2)?   What do the numbers in parentheses (Brit. "brackets") mean?


what i do to getting visas it is fst refusal they put me questions why a company airport-transfer the funds in my acc second time when am apply then clear customs-and-immigration officer with atta he d bank statement and letter heads every things but mention gud u clearly doubt said bangladeshi .my citizenship indian

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


Okay so the code below is example code i have made to illustrate my problem, i'm new to python, I'm using 2.7 and i have searched quite a lot with no success. The code all works except for one issue.  My problem is the object (Test) attribute Nested_list's that is printed at the end shows that the for loop that adds +1 to the first item in each list instead adds +1 to the first item in all 3 lists. i know the method i'm using would work on a normal list but for objects it's not quite right.  class Test(object):      def __init__(self):         self.nested_lists = [[0]*10]*3  object_holder = [[]]*30  for x in xrange(0, 30):     object_holder[x] = Test()  for objects in xrange(0, 30):     for lists in xrange(0, 3):         for items in xrange(0, 10):             object_holder[objects].nested_lists[lists][items] += 1  object_holder[1].nested_lists[0][8] += 5 object_holder[1].nested_lists[2][5] += 12  print object_holder[1].nested_lists print object_holder[1].nested_lists[0] print object_holder[1].nested_lists[0][8] print object_holder[1].nested_lists[2][5]  print object_holder[2].nested_lists print object_holder[2].nested_lists[0] print object_holder[2].nested_lists[0][8] print object_holder[2].nested_lists[2][5]   result  [[3, 3, 3, 3, 3, 15, 3, 3, 8, 3], [3, 3, 3, 3, 3, 15, 3, 3, 8, 3], [3, 3, 3, 3, 3, 15, 3, 3, 8, 3]]  [3, 3, 3, 3, 3, 15, 3, 3, 8, 3]  8 15  [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]]  [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]  3 3   why is this? When it seems I can use print to target individual list's and items?? I have looked at getattr and setattr but i cant find anything on targeting nested lists with this method.   This shows when I try to target a specific item that it is possible, but for some reason which list I target is not definable? The result I was expecting would be every item equalling 1, except the individual items I added 5 and 12 to. Any help would be greatly appreciated

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


If $H$ is a normal subgroup of $G$ and $|H| = 2$, show that $H \subseteq Z(G)$.   Proof:      Since $|H| = 2$, we have $H = \{e, a\}$, where $a \in G$ is such that $|a| = 2.$   Let $g \in G$ be arbitrary. Then $gHg^{−1} = \{geg^{−1}, gag^{−1}\} = \{e, gag^{−1}\}$.   Since $H$ is a normal subgroup of $G$, we have $gHg^{−1} = H$, that is $\{e, a\} = \{e, gag^{−1}\}$. Hence, $a = gag^{−1}$, and so $ag = ga$. Since $g \in G$ was arbitrary, this means that   $a \in Z(G)$. Also, obviously $e ∈ Z(G)$. Therefore $H = \{1, a\} \subseteq Z(G)$, as required.   My question:      Why is the line "Since $H$ is a normal subgroup of $G$, we have $gHg^{−1} = H$" true? Should it not read "Since $H$ is a normal subgroup of $G$, we have $gHg^{−1} \subseteq H$" ?

Let $K$ be a normal subgroup of order 2 in group $G$, show that $K$ lies in the centre of $G$. Describe a surjective homomorphism of the orthogonal group $\mathrm{O}(3)$ onto $C_2$ and another onto the special orthogonal group $\mathrm{SO}(3)$.


You know how most NAS devices come with Atom processors and have a hard time indexing or dealing with large data dumps, (I am talking about synology in this case), I was wondering is it possible to lend the desktop idle CPU power to the NAS to improve it's operations?     For example, it has been a few days and the indexer is still running. Is there anyway to do this on the PC?   I know that typically you could run a software specifically designed for doing that, like an indexer running on the desktop and updating the NAS or some other way.  /edit: deleted the general purpose thought

I have two desktops (one of which I'm using as a server), my main machine has a weaker i5 cpu, my server has a stronger i7 cpu. On my main machine I am experiencing stutters because the CPU often runs at full load under regular use (strangely, I also use upwards of 10GB of RAM, no joke... The heaviest program I'm running is google chrome).  I was wondering if there was any possible way to share a cpu from one machine over network to another machine as an emulated processor, which could be used by the client machine in a similar sort of fashion as virtual machines use or "borrow" their host's cpu.  This way I could offload work onto the server's cpu when the main cpu is under full load to prevent annoyances like stutter, and possibly combine both of them for more intense tasks (like decryption, compilation, archiving or other multithreaded stuff)  Does this sort of software exist, or has anyone at least tried to make it? If not, is it feasible?  (This sort of program would also ideally be able to offload data onto the server's RAM for faster processing, since the now common gigabit connections get to have nearly the same speeds as a standard HDD this doesn't sound far fetched either)  To reiterate, what I am primarily looking for is the ability to offload work from a system's main cpu when it is under too much load and forwarding it to another computer's cpu over network.


One of my desktops is running Windows 7 (32bit). I am seeing unexpectedly high CPU load for the WmiPrvSE process. Using ProcessExplorer, I can see that it is just one thread that is alternately ranging from 4-15% cpu on an otherwise-idle machine. That thread is entitled ntdll.dll!RtlRegisterThreadWithCsrss. The thrashing is periodic with approximately a five second cycle, with only a brief instant between elevated cpu levels.  Interestingly, when I attempt to invoke csrss.exe manually, I get a dialog box informing me that it can't run in 32 bit mode. Nevertheless, it IS present in the process tree.  So, it appears to me that I have a thread thrashing to interact with something that may or may not be available. What am I missing? Any clues? Thanks in advance!

I generally keep my laptop on 24x7, and at the end of the day it's really annoying to have my thighs burnt because over overheating.   The overheating seems to be a result of WMI Provider Host (WmiPrvSE.exe) spiking the CPU utilization to 25% every few minutes.  Why does this happen?  I have an HP Envy 14 (with the HP bundled crap) running on Windows 7 Home Premium.  (Note: Based on @nhinkle's , it seems that HP Wireless Manager might be the culprit, is there any way to confirm this?)     This question was a .   Read the Feb 28, 2011  for more details or  Question of the Week.


This is a problem from Linear Algebra Done Right, 3rd Edition, problem 14 in 6.B.  Given $\{e_1, \dotsc, e_n\}$ is an orthonormal basis of $V$, and $||v_j -e_j|| < \frac{1}{\sqrt{n}} \; \forall \; 1\leq j\leq n$, show that $\{v_1, \dotsc, v_n\}$ is a basis of $V$.  I have tried to start with a linear combination of the $\{v_1, \dotsc, v_n\}$ that is zero but am at a loss to use the information given. I also tried using the fact that each $v_j$ is in the span of the given orthonormal basis. Any hints will be appreciated.

Prove that if $e_1, \dots e_n$ is an orthonormal basis of $ V$ and $v_1, \dots , v_n$ are vectors in $ V$ such that $$\|e_j - v_j\| < \frac{1}{\sqrt{n}}$$ for each j, then $v_1, \dots v_n$ is a basis of $V$.  I have fiddled around with this for a while now unfortunately nothing came close, so I'll just say I have no idea how to do this. Help :(?


I am using Ubuntu 19.04 version. And when I want to install any software, I always use sudo apt-get update.  But it is failing every time. I am new in this field. Because of that error I can not install GNU Emacs.  It is showing:  $ sudo apt-get update Hit:1 http://ppa.launchpad.net/kelleyk/emacs/ubuntu disco InRelease Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Reading package lists... Done                                         E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 40min 7s). Updates for this repository will not be applied.

I keep getting this error every time I try to sudo apt update:  Hit:1 ubuntu bionic InRelease Ign:3 linux/chrome/deb stable InRelease                    Get:2 /ubuntu bionic-updates InRelease [88.7 kB]    Get:5 /linux/chrome/deb stable Release [943 B]              Get:6 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]          Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]  Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]     Reading package lists... Done                                  E: Release file for http://dl.google.com/linux/chrome/deb/dists/stable/Release is not valid yet (invalid for another 2h 45min 28s). Updates for this repository will not be applied. E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 4h 34min 33s). Updates for this repository will not be applied. E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 1h 22min 16s). Updates for this repository will not be applied. E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 4h 32min 36s).    Updates for this repository will not be applied.  I've reset my timezone to UTC, but that didn't work. I also found a different answer where they said I should try   sudo apt-get -o Acquire::Check-Valid-Until=false update   but that didn't work either. I got the same error both times.


I find it really unusual that (at least as far as I've seen) there is no built in mechanism for viewing questions that I've asked that I have not accepted an answer for. Based on my searches, there is a way to query this manually via search:  user:me hasaccepted:0   However, this is fairly unintuitive since I seem to have difficulty memorizing this and am constantly having to Google for how to do this.  Is there no built in mechanism to do this in the UI? And if not, could one be added?

I mean to get back them, really I do. So, how can I view all my unaccepted questions across the Stack Exchange network?  , but the stackexchange.com search doesn't work the same way (it searches for the text). Is there any way to do this?


I am trying to play a movie on ubuntu and it will not work. It tells me that I need to install dvd decryption. I was researching online and found out that I need to install libdvdread4, I did that. I also read that I needed to install libdvdcss, and this is where there was a problem. I ran:  sudo /usr/share/doc/libdvdread4/install-css.sh into the terminal and got the following:  --2013-10-10 20:52:33--  http://packages.medibuntu.org/dists/precise/free/binary-i386/Packages Resolving packages.medibuntu.org (packages.medibuntu.org)... 88.191.127.22 Connecting to packages.medibuntu.org (packages.medibuntu.org)|88.191.127.22|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-10-10 20:52:33 ERROR 404: Not Found.  Dynamic fetch failed; Falling back to static fetch --2013-10-10 20:52:33--  http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.10-0.2medibuntu1_i386.deb Resolving packages.medibuntu.org (packages.medibuntu.org)... 88.191.127.22 Connecting to packages.medibuntu.org (packages.medibuntu.org)|88.191.127.22|:80... connected. HTTP request sent, awaiting response... 404 Not Found   I am wondering if there is any other way to install libdvdcss. Thanks

I am trying to get  instructions working on 12.04, I know I am connected to the internet but it doesn't seem to work.  $ sudo /usr/share/doc/libdvdread4/install-css.sh --2013-10-09 19:18:44--  http://packages.medibuntu.org/dists/precise/free/binary-i386/Packages Resolving packages.medibuntu.org (packages.medibuntu.org)... 88.191.127.22 Connecting to packages.medibuntu.org (packages.medibuntu.org)|88.191.127.22|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-10-09 19:18:44 ERROR 404: Not Found.  Dynamic fetch failed; Falling back to static fetch --2013-10-09 19:18:44--  http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.10-0.2medibuntu1_i386.deb Resolving packages.medibuntu.org (packages.medibuntu.org)... 88.191.127.22 Connecting to packages.medibuntu.org (packages.medibuntu.org)|88.191.127.22|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-10-09 19:18:44 ERROR 404: Not Found.   I am trying to get DVD playback going, how can I fix this?


Functions are defined as particular kinds of relations and relations themselves relie on the concept of Cartesian Product. It can be proved from ZF the Cartesian Product of two sets exists but this requires using either the Axiom of Separation or the Axiom of Replacement. In both of them we make use of the concept of predicate, so it should be a difference to avoid falling in circularity.  Am I right? Am I missing something?  Thanks in advance :)

I need to to understand the difference between predicates and functions in the context of Clasual Form Logic in order to define the Herbrand universe.  If I have p(x) :- q(f(x)) would I be right in saying that p and q are predicates while f is a function because it is "nested"?  By this thinking then if I have p(x) :- q(x) both p and q are predicates and I have no functions?  If this is incorrect then how can I tell the difference between a predicate and function?


And when does the next version of it come out? And will I get a notice of all future versions and the ability to upgrade?

I want to know where I can find updated information about all the stable and in-development versions of Ubuntu, where I can find this information?     This question is meant to be a canonical question. It expects to answer the following questions:         Is X version stable yet?   Is X version in beta?   Is X version still supported?   What versions are still supported?   What are the versions in Beta/Alpha?   Until where X version will be supported?   Have X version ceased support?   When will be X version released?   Where I can download any release?   When will the next LTS version of Ubuntu be released?         The list is not exhaustive.


my galaxy note SHV-E160S have 200 mb free device memory but still it donot even download 5 mb apps from play store and the warning message of insufficient memory displayed... Any so;ution???

Every time I go to install a new app, I get the message "Insufficient storage", and an unable to install anything!  I am using Samsung GT19060 my internal memory is 8GB. I have not downloaded anything but anytime I try to download something it will tell me low memory space.


Driving from Lithuania to Latvia on a bus, there was no stamp on crossing a border. Is it just a coincidence or stamps are set only on entering and exiting the Schengen zone?

I have a multiple entry Schengen visa for 1 year. When I enter France from outside Schengen, I get a French entry stamp, right? But if in France, after 10 days, I take a flight to Italy and I arrive there, will I get an Italian entrance stamp in my passport too? And when I take a plane from Italy to Denmark, will I get a Danish stamp too? Once I leave Europe I will get the exit stamp in my passport from the country where I leave to my outside EU home country, right?


This minimal example won't compile:  \documentclass{article} \usepackage{url} \newcommand{\mycommand}[1]{#1} \begin{document} \mycommand{\url{http://www.example.org/index.php?a=Hello%20World.}} \end{document}   The reason is the percent sign inside the URL. Note that a percent sign occurs often in URLs and that the \url command usually handles it correctly. How do I fix this?

I'm using the url package. Now, I have some some url with a percent sign in it and want to place it in a footnote. When I let the % where it is, I get a comment, and the whole thing fails to compile because of some unmatched brackets. When it's at the end of a line, it doesn't show up at all in the result. When I write \% instead, this gets literally into the output—but I want the url to be displayed correctly.  What could I do?


(I was requested to edit the question to explain why it is different that a proposed duplicate question. This seems counterproductive to do here, inside the question it self, but that is what I have been asked by the site and moderators. There is no way for me to vote against their votes. So, here I go: Please stop voting this as a duplicate so quickly, which will eventually lead to this question being closed off. Yes, the other question linked to asks the same math, but any newcomer to the problem who was exposed to it via physics, as I was, will prefer this question instead of the one that is purely mathematically. I beg the moderators to not be pedantic on this one. This question spills into physics, which is why I did the cross post to the physics forum as well.)  How does the sum of the series “1 + 2 + 3 + 4 + 5 + 6…” to infinity = “-1/12”, in the context of physics?  I heard Lawrence Krauss say this once during a debate with Hamza Tzortzis (). I found a transcript of another debate between Krauss and William Lane Craig which has the same sum. Here is the paragraph in full:     Let’s go to some of the things Dr. Craig talked about. In fact, the   existence of infinity, which he talked about which is   self-contradictory, is not self-contradictory at all. Mathematicians   know precisely how to deal with infinity; so do physicists. We rely on   infinities. In fact, there’s a field of mathematics called “Complex   Variables” which is the basis of much of modern physics, from   electro-magnetism to quantum mechanics and beyond, where in fact we   learn to deal with infinity; without the infinities we couldn’t do the   physics. We know how to sum infinite series because we can do complex   analysis. Mathematicians have taught us how. It’s strange and very   unappetizing, and in fact you can sum things that look ridiculous. For   example, if you sum the series, “1 + 2 + 3 + 4 + 5 + 6…” to infinity,   what’s the answer? “-1/12.” You don’t like it? Too bad! The   mathematics is consistent if we assign that. The world is the way it   is whether we like it or not.   -- Lawrence Krauss, debating William Lane Craig, March 30, 2011  Source:   CROSS POST: I'm not sure if I should post this in mathematics or physics, so I posted it in both. Cross post:   EDIT: I did not mean to begin a debate on why Krauss said this. I only wished to understand this interesting math. He was likely trying to showcase Craig's lack of understanding of mathematics or logic or physics or something. Whatever his purpose can be determined from the context of the full script that I linked to above. Anyone who is interested, please do. Please do not judge him out of context. Since I have watched one of these debates, I understand the context and do not hold the lack of a full breakdown as being ignorant. Keep in mind the debate I heard this in was different from the debate above.

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


I'm a bit confused about slicing a list and the numbering here.   Python tends to start from 0 instead of 1, and it's shown below to work in that way well enough. But if we're starting from 0, and going until 3, why am I not getting exam instead of exa? After all, 0 - 3 is 4 numbers.  >>> test = "example string" >>> print test[:3] exa >>> print test[0:3] exa >>> print test[1:3] xa

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


The sources.list repository file simply doesn't exist because of an installation issue, causing all sorts of problems because all the commands like .deb and stuff return command not found. What is the easiest way to fix this?  note: I'm not trying to re-write a corrupted sources.list, but rather to create one. If I was trying to re-write, it would let me use some commands that have been suggested in other posts, but because the current condition of the sources.list is "nonexistant," the other commands return "sources.list was not found and thus cannot be rewritten."

I am looking for the best method to restore /etc/apt/sources.list to default from the command line.  Is there no way to reference the source code of the package which generates this file or something like that? I want a trusted and version-independent way of restoring this file.  Solutions Ruled Out  Before you mark this as a duplicate, note that I have reviewed  already. It is only applicable if you have the Ubuntu GUI available. This question is specific to the command line.  I have also reviewed  where the accepted solution is someone pasted the contents of their sources.list file. This is not an appropriate way to restore the file as the intentions of the person providing the file contents cannot be verified and the file is subject to change with new releases.  I checked out the , but this is also not from Ubuntu so I do not plan to use it.


I am totally a noob in server side development.I have been given the task of using  a original database of a company and make a copy on my local server for testing the server.I have the link and username and password too. What I don't know how to access the database given, I know the username and password.I know mysql is used but I don't know which commands to use and how to use mysql. I tried googling it but couldn't find any solution.  I have sql workbench , how can I use it?

I want to copy a live production database into my local development database.  Is there a way to do this without locking the production database?  I'm currently using:  mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localhost my_db1   But it's locking each table as it runs.


How can I download my div as an image? (In JavaScript, Jquery or PHP)  I have a simple HTML code:

 <button id="downloader" onClick="download('downloadThis')">Download</button>   And I want to download it as an image:

Is it possible to to take a screenshot of a webpage with JavaScript and then submit that back to the server?  I'm not so concerned with browser security issues. etc. as the implementation would be for . But is it possible?


I am trying to order mixed strings in a unique way and am wondering if anyone else has done this. I have found several articles on using IOrderConparer but can not find a solution for my particular sorting problem.  I have the following:  1017, 650, 650C, 650B, W323, 10, 20, 1000, W1000  I need to order them as follows:  10, 20, 650, 650B, 650C, 1000, 1017, W323, W1000  Any help would be appreciated. Thanks.

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


a man contacted me on instagram for a sort of sugar baby arrangement, and wants my bank username and password to deposit money into my account. he says he needs this information so he can structure the payments as a paycheck, the way he does for his employees. if i create another bank account (checking only, with none of my own money in it), and then wait at least a month before spending any of what he deposits to make sure the money is legitimate, is there any way he could get me in legal or financial trouble? i know better than to send the money to another person, or “back” to him, but i am fairly desperate for money and i couldn’t find any downsides to trying this method (if i get the money, great, and if he was just trying to scam me he’ll fail). any advice is welcome!  edit- i know that it is likely a scam, but on the off chance that it’s not my real question is whether i have anything to lose by trying this

A friend of mine is in another state wanting to pay my credit card. He says he needs my credit card number, name on card, username, password, and card limit. Is he trying to defraud me? Or does he really need all of this info to pay off my card?


Right now,  says I was "seen" 33 minutes ago. The last entry on the activity list was at 54 minutes ago. I'm pretty sure I didn't vote on any questions or comments in the meantime. Furthermore, I just flagged a comment here on Meta and my Meta user page still says I was seen 10 minutes ago. What actions reset the "seen" counter to zero, and what actions are ignored?

It would appear that the account's "Last activity time" is not updated for every hit.  I've been active on SO all morning, and in the last five minutes have voted on some posts as well as posted an answer.  However,  says:     "Last activity: 2 hours ago from <IP address>"   Is there a certain amount of time that needs to elapse between hits before the activity time is updated again?  This issue could result in Enthusiast badges not being awarded when they should.


1. I hate them calling her fat.      2. I hate their calling her fat.   Which one is correct and which one is not ? Or do both work under different circumstances ?  Please answer with explanation. Thank you. And by correct I mean grammatical and appropriate for formal writing.

The rule says that we can use a possessive adjective or an object pronoun before a gerund. Is there a rule  that says when to use each or are they interchangeable? Some say that it's wrong to use an object pronoun before a gerund.


I'm building a UI where a user can click on an item in an 'Options' list and add it to a 'Selected' list.   The items on the 'Selected' list have a remove button to send it back to the 'Options' list. I just can't get the remove button to work. I have limited the action of the remove button to a simple alert for troubleshooting purposes.  Can anyone see what I'm doing wrong?  PS. My question has been marked as a duplicate: Event binding on dynamically created elements? I have read that question and I'm trying to apply it. I'm looking for specific help on what I'm doing wrong in my code.     $(document).ready(function(){  var a = []; $(".remove").click(function(){     alert("Remove Clicked"); });  $(".select").click(function(){     var cList = $('ul.mylist');     $('ul.mylist').empty();     $('ui-menu-item').empty();     a.push($(this).next("span").text());     $(this).closest("li").hide();     $( "#s" ).text( a.join( " " ));          $.each(a, function(i){      var li = $('
')             .addClass('ui-menu-item-'+a[i])             .attr('role', 'menuitem')             .appendTo(cList);         var aaa = $('')             .addClass('ui-all')             .text(a[i])             .appendTo(li);         var $input = $('<button class="remove">Remove</button>');             $input.prependTo($("li.ui-menu-item-"+a[i]));    }); });    });    <!doctype html>   <meta charset="utf-8"> <title>Selector</title>
List of Options

<button class="select">Select</button>One

<button class="select">Select</button>Two

<button class="select">Select</button>Three

<button class="select">Select</button>Four

List of Selections

Array of Selected Items to Sent to DB:

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


I'm trying to understand  $$e^{it}=\cos(t)+i\sin(t)$$ This comes from the definitions  $$\cos(t)=\frac12(e^{it}+e^{-it}) \quad\text{and}\quad \sin(t)=\frac1{2i}(e^{it}-e^{-it})$$  and those are consistent with the power series definitions of $\cos$ and $\sin$, which are their Taylor series  $$\sum_{k=0}^{\infty}{\frac{(-1)^k z^{2k}}{(2k)!}} \quad\text{and}\quad \sum_{k=0}^{\infty}{\frac {(-1)^k z^{2k+1}} {(2k+1)!}}$$  respectively.     I see all those things. They make sense and are consistent with each other, but I can't believe that $e$ and cosine and sine are so related coincidentally.

My question is too simple. We know all that if we define the exponential function on $\mathbb{C}$ then we define the real part and imaginary part of $\exp{it}$ as $\cos{t}$ and $\sin{t}$.  So if we assume that we know the definition of the trigonometric functions and the exponential function not as a series but for exponential as solution of differential equation $y'-y=0$ then my question is     How can I explain this relation (intrinsically)in a simple way to a high-school student, they is any physical interpretation of this formula  ?   or we  can give another equivalent question (in my sens)     How can one prove the Euler relation? and What was the original proof of Euler himself?


How to calculate distance of an object from camera or calculate the size of a object in an image? Given that, I have already generated the camera parameters (intrinsic and extrinsic). I have to utilise these parameters to calculate any of the above values.

If I took a picture of a windmill on the horizon — given that I know the sensor size and the focal length of the lens and other factors to do with the shot — could I calculate how far away an object is from the photographer?


How can I update the size of the modal to fit only the size of the text inside it.  This is what it currently looks like,   This is the my code for this     <aura:attribute name="recordId" type="Id"/> <aura:attribute name="message" type="String" default=""/>  <aura:handler event="aura:waiting" action="{!c.waiting}"/> <aura:handler event="aura:doneWaiting" action="{!c.doneWaiting}"/> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>  <aura:attribute name="isOpen" type="boolean" default="True"/>  <aura:if isTrue="{!v.isOpen}">

Submit

                     <form id="form">

                                          Sending...

                                     <ui:outputText value="{!v.message}"/>

                     </form>

                      <lightning:button variant="neutral"                                label="Close"                               onclick="{! c.closeModel }"                               title="Close"                               />

 </aura:if>      Since I used force:lightningQuickActionWithoutHeader to remove the header and created my own, I used modal to replicate the feel of using force:lightningQuickAction but I can't seem to fit the content to the modal.  I need your help guys, Thanks

When you use Visualforce page as Quick Action and modal popup window opens - it occupies 50% of container width. According to  article      For a Custom Visualforce action, select the Visualforce page, and then   specify the height of the action window. The width is fixed.   Is there a "best practice" way to adjust width in this case using some code?


Question -     Let $x, y, z$ be distinct real numbers. Prove that   $$ \frac{x^{2}}{(x-y)^{2}}+\frac{y^{2}}{(y-z)^{2}}+\frac{z^{2}}{(z-x)^{2}} \geq 1 $$   My work -  first i apply directly C-S and after simplification i have to prove that  $4(xy+yz+zx)>x^2+y^2+z^2$ which i am not able to prove ..  then multiplying $x^2,y^2,z^2$ to numerators and denominators of corresponding fractions respectively i again apply C-S and this time we have to prove that after simplification  $(xy)^2+(yz)^2+(zx)^2 + 2x^3y+2y^3z+2z^3x > 0$ which again i fail to prove ...  I try to do with other inequalities but none of them working.  any help will be helpful  thankyou

If $x,y,z\in\mathbb R\setminus \{1\}$ and $xyz=1$, prove that $$\frac{x^2}{(x-1)^2}+\frac{y^2}{(y-1)^2}+\frac{z^2}{(z-1)^2}\ge 1$$  Without using calculus. There are a few ways I've tried solving this:  $1)$ We could try using the Cauchy-Schwarz inequality: $$\frac{x^2}{(x-1)^2}+\frac{y^2}{(y-1)^2}+\frac{z^2}{(z-1)^2}\ge \frac{(x+y+z)^2}{(x-1)^2+(y-1)^2+(z-1)^2}$$  But it's apparent that nothing's useful here.  $2)$ We could use AM-GM as well: $$\frac{x^2}{(x-1)^2}+\frac{y^2}{(y-1)^2}+\frac{z^2}{(z-1)^2}\ge 3\sqrt[3]{\frac{x^2y^2z^2}{(x-1)^2(y-1)^2(z-1)^2}}=\frac{3}{\sqrt[3]{(x-1)^2(y-1)^2(z-1)^2}}$$  So we only have to prove that: $$\sqrt[3]{(x-1)^2(y-1)^2(z-1)^2}\le 3$$  We could raise both sides to the power of 3: $$(x-1)^2(y-1)^2(z-1)^2\le 27$$  But this inequality doesn't hold.   $3)$ We could try cleaning the denominators by multiplying both sides by $(x-1)^2(y-1)^2(z-1)^2$. After a bunch of expanding and simplifying we get that: $$x^2y^2+y^2z^2+x^2z^2-6(xy+yz+xz)+2(x+y+z)+9\ge 0$$  I can't tell so easily whether the inequality is true or not. You could help me out on this one. Just don't forget that $x,y,z\in\mathbb R\setminus\{1\}$ and so we can't just simply use AM-GM, unless we're using it for squares that have to be non-negative.


Look below. The code block does not get recognized between a list.   The first item. The second item. bla bla bla:  from bs4 import BeautifulSoup soup = BeautifulSoup(response.text, 'lxml') csrf_token = soup.select_one('meta.x_csrf')['value'] Third item. No luck!   But it works fine after a normal paragraph:  from bs4 import BeautifulSoup soup = BeautifulSoup(response.text, 'lxml') csrf_token = soup.select_one('meta.x_csrf')['value']   Well, is it not a bug in the Markdown formatting?

Formatting breaks if code follows a list:   List item List item  This is in a code block  This does not work as expected   However, it works if between the list and the code   List item List item   There is a line of normal text.  This is in a code block # This does work as expected   Edit  To make this clear: This is not about nesting code in a list but about code following a (finished) list not working as expected (by me). To put it differently: Why is a list not considered finished despite of following empty lines? What do I have to do?


I heard that C/C++ has a problem with the management of the float point numbers. I've implemented a simple program to try it. It consists in a change machine: the user enter the quantity to charge and the quantity paid, and the program calculates the number of coins for each coin type to give as change.  Here is the code:   The thing is, when you insert a non-integer value, the program enter in a loop and never ends. I've printed the content of the variables to find out what's going on, and, somehow, from a 2 decimal value let's say: 0.10, the program changes its value to a 0.0999998. Then, the remaining change to be processed never is 0 and it enters in a infinite loop.  I've heard that this is due to the machine representation of the float point numbers. I've experimented the same either windows and Linux; and also programming it in Java, but I don't remember to have had the same issue in pascal.  Well, Now the question is: what is the best workaround for this? I've thought that one possible solution is using fixed point representation, via external libraries as:  or  . Other maybe is to use a precision arithmetic library as:

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


If I need to create a large format poster that's supposed to be printed at 120 dpi can the image on the poster have an effective DPI of 120 dpi as well?

(This question is meant to be a resource to direct others to given that this is a common question.)  Given the task of creating an image that will be printed at a certain size, what pixel dimensions and resolution should I be setting my file at?


Find all integer solutions to $x^2 + 7 = 2^n$. I've done the case where n is an even integer but now I'm a little lost. Could anyone walk me through the solution?

This came up while solving another ENT problem. I want to ask when is: $$2^n -7 \text{ where } n\geq 3$$ a perfect square? Specifically, I also wanted to know what would be the solutions when $n$ is odd? How should I solve this?  I can check that $n=3, 4, 7$ are solutions but cannot find more. As it is of the form $4k+1$, it doesn't help as well.


Here's my code for the search bar I added to Carto map, with some added script for my attempt at an autocomplete. So far, it hasn't worked. I wish I could be more precise about the problem, but I really don't know what it is. I'm not a developer and just hacking away from what I've found from other people online.      function main() {          var map = L.map('map', {             zoomControl: true,             center: [LAT, LONG],             zoom: 15         });         L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {             attribution: '&copy; OpenStreetMap contributors, &copy; CartoDB'         }).addTo(map);          cartodb.createLayer(map, 'MY_MAP.json').addTo(map)             .done(function() {                 $('#searchButton').click(function() {                     input = $("#ad").val();                     input = titleCase(input)                     console.log(input);                                  function initAutocomplete() {                                       function log( message ) {                                         $( "
" ).text( message ).prependTo( "#log" );                                         $( "#log" ).scrollTop( 0 );                                       }                                   }                     var sql = new cartodb.SQL({                         user: 'bmm80'                     });                     sql.getBounds("SELECT * FROM MY_DATA where DATA_COLUMN ILIKE '" + input +                         "'").done(function(bounds) {                         $(".title").fadeTo('slow', 0);                         map.fitBounds(bounds)                     });                  });             });     }

The search box in a published map of CartoDB isn't linked to the dataset which is shown in the CartoDB map. How can I link the search box to a certain column of a dataset?


I'm trying to understand how listings' otherkeywords option really works. The documentation says about it:     Defines keywords that contain other characters, or start with digits. Each given 'keyword' is printed in keyword style, but without changing the 'letter', 'digit' and 'other' status of the characters. This key is designed to define keywords like =>, ->, -->, --, ::, and so on. If one keyword is a subsequence of another (like -- and -->), you must specify the shorter first.   Furthermore, keywords are defined as a 'letter' followed by a sequence of 'letter' or 'digit' characters.  So let's look at an example.  \documentclass{article} \usepackage{listings} \usepackage{xcolor}  \lstdefinelanguage{mylang}{ %    alsodigit={<,>,-,*},     otherkeywords={<,>,-,<-,->,<->,<--,-->,***},     morekeywords=[1]{-},     morekeywords=[2]{<,>,<-,->},     morekeywords=[3]{<->,<--,-->,***} }  \begin{document} \lstset{     language={mylang},     basicstyle=\ttfamily,     keywordstyle=[1]{\color{red}},     keywordstyle=[2]{\color{green}},     keywordstyle=[3]{\color{blue}} }  \begin{lstlisting}   -                 red   < > <- ->         green   <-> <-- --> ***   blue \end{lstlisting} \end{document}     The output of the first line looks good, - should be treated as a class 1 keyword and be printed in red.  On the second line the confusion begins. < and > are correctly printed in green, but <- and -> aren't. The documentation (as noted above) says that keywords being subsequences of other keywords should be defined first. This is exactly what is done in the example code, the ouput is still wrong.  Even if listings would erroneously break up <- into < and -, I would expect the first < in <- to be printed in green. It's also printed in red, though, which is really confusing, because < never occurs in class 1.  The third line is also wrong, except for the *** keyword, which is probably because neither * nor ** occur as separate keywords.  If we don't skip over the first line in the otherkeywords description, especially the "or start with digits" part, changing <, > and - to 'digit' characters should satisfy all the conditions required by the documentation. However, adding alsodigit={<,>,-,*} makes no difference in the output.  Could anyone give more insights about what's going on here? I'm tempted to say this is a bug, or at least some extra information is missing in the documentation. Unfortunately, debugging macro expansion is too verbose to follow the exact procedure.

I'm using the listings package for Python code, and I have set  otherkeywords={self,__init__}   An unintended side-effect of this seems to be that in a string such as  "self_loathing"   the self portion is highlighted as a keyword while the rest gets string highlighting. Is there a way to avoid this?


Suppose $(X,d)$ is a metric space. Take two points $x_1, x_2 \in X$ and take $r_1, r_2 \in \mathbb{R}^+$. Then $B_1(x_1, r_1)$ and $B_2(x_2, r_2)$ are open balls. Suppose that $B_1(x_1, r_1) \subseteq B_2(x_2, r_2)$. Does this imply that $r_1 \le r_2$?

Example of two open balls such that the one with the smaller radius contains the one with the larger radius.  I cannot find a metric space in which this is true. Looking for hints in the right direction.


I currently have a 5c which last night I backed up with iCloud in its settings. Today I'm getting a 6s and I want to transfer contacts, photos , iTunes music etc to. Should I take out my current sim and put it in my new phone or can I just log into my iCloud on the new phone and everything will be there? What is the easiest way?

I have an iPhone 4S with multiple backups in my computer and I'd like to buy a new iPhone.  Can I connect the new device to the computer and immediately store all the content from the previous iPhone? I want to move all the photos, messages, etc.


I don't know what I pressed, but this happened before.   I can't undo or redo in object mode but it still works in edit mode. When I move an object to another layer I need to press an "OK" button. Can't use the lower half of the left toolbar in object mode, it is grayed out.   Here are a couple pictures:      What is causing this strange behavior?

Sometimes when adding an object to the scene I see that all options (on toolbar or in window after pressing F6) are disabled. Can anyone tell me when can this happen? What is causing it and how to revert it - make it enabled again. It worked for me when I restarted Blender and reloaded the scene. However I would really like to know what can cause it?


My mistakenly without getting a backup installed a new windows on it and actually I have formatted the disk during windows installation as well, is there a live bootable tool to recover my files in my laptop disk?

I have a situation.  I got married 6 months ago and stored some very important pictures on my laptop which was running Linux. Later I formatted the whole hard drive, installed Windows and a hacked version of Mac (just to play around) and I have been using the laptop for last 8 months or so after that.  Is there any software that can recover the files for me? I am happy to pay money!


I understand how to use the  to compute the distance between two points on the earth. However, I would like to answer a similar, albeit different question. How can I compute the latitude/longitude of any point on the boundary of a circle?  For instance, I have a center point at 31.782643, -102.291938 and a radius of 245km. I would like to find the latitude/longitude coordinate for any point on the edge of this circle. How can I do this?

I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude.  This appears to be the opposite of this question ().  I have already looked into the haversine formula and think it's approximation of the world is probably close enough.  I am assuming that I need to solve the haversine formula for my unknown lat/long, is this correct? Are there any good websites that talk about this sort of thing? It seems like it would be common, but my googling has only turned up questions similar to the one above.  What I am really looking for is just a formula for this. I'd like to give it a starting lat/lng, a bearing, and a distance (miles or kilometers) and I would like to get out of it a lat/lng pair that represent where one would have ended up had they traveled along that route.


I have an enum with values like this (the example just shows a few of the values but you will catch on): _800, _830, _900, _24HOURS, CLOSED  These have a corresponding value, so I added to my enum, which you can do in Java, a value field and a getter and setter for the value, like this (for space sake I do not show the getter and setter but they are the standard ones):   enum Hours {     _800("08:00"),     _830("08:30"),     CLOSED("Closed"),     APPT("By Appt.")     // etc     ;      Hours(String v) {         val = v;     }     String val;  }   I also want to be able to go the other direction, that is, if I have a value (e.g. "08:00") I want it to return the enum _800.  So to the enum I added a map:   static Map<String,String> valToEnumMap = new HashMap();   then I added this to my constructor:      Hours(String v) {         val = v;         valToEnumMap.put(v, this);     }   and a new method:  Hours valToEnum(String v) {    return valToEnumMap(v); }   but when I try running it I get an initialization error at the point where it tries to insert into the map.  I have tried other things like   valToEnumMap.put(v, valueOf(name());   but the same error.  I did find a workaround but it is very slow, so I wonder what I did wrong?  Here is the workaround I used which is slow:  public static OfficeHoursTimes valToEnum(String val) {         for (OfficeHoursTimes o : OfficeHoursTimes.values()) {             if (o.getVal().equals(val)) {                   return o;             }         }         return null; }   But there has to be a better way

Why can't enum's constructor access static fields and methods? This is perfectly valid with a class, but is not allowed with an enum.  What I'm trying to do is store my enum instances in a static Map. Consider this example code which allows lookup by abbreivation:  public enum Day {     Sunday("Sun"), Monday("Mon"), Tuesday("Tue"), Wednesday("Wed"), Thursday("Thu"), Friday("Fri"), Saturday("Sat");      private final String abbreviation;      private static final Map<String, Day> ABBREV_MAP = new HashMap<String, Day>();      private Day(String abbreviation) {         this.abbreviation = abbreviation;         ABBREV_MAP.put(abbreviation, this);  // Not valid     }      public String getAbbreviation() {         return abbreviation;     }      public static Day getByAbbreviation(String abbreviation) {         return ABBREV_MAP.get(abbreviation);     } }   This will not work as enum doesn't allow static references in its constructor. It however works just find if implemented as a class:  public static final Day SUNDAY = new Day("Sunday", "Sun"); private Day(String name, String abbreviation) {     this.name = name;     this.abbreviation = abbreviation;     ABBREV_MAP.put(abbreviation, this);  // Valid }


I am using bash and have a csv file (dat.csv) that needs to be only two columns (App, Blurb) of data but due to many ',' on each row it is becoming MANY columns.  EXAMPLE OF PROBLEM csv.dat:   App , Blurb  diff, this is the diff program, bla bla bla, yadda yadda  word, this is ms product, it is not very good, I dont like it  dd, this is a Linux disk application , its awesome!, bla bla, ttly  ...    The problem I am having is that because the 'Blurb' col has additional ',' the data is getting piped into subsequent columns (c, d, etc) of the dat.csv file.   THE GOAL is to have all but the first ',' from every row be changed to "COMMA" so all the 'Blurb' data remains in col B.  E.g. DESIRED OUTPUT:   App, Blurb                   diff, this is the diff program<COMMMA> bla bla bla<COMMA> yadda yadda  word, this is ms product<COMMA> it is not very good<COMMA> I dont like it  dd, this is a Linux disk application <COMMA> its awesome!<COMMA>bla bla<COMMA> ttly  ...   Thanks!

I have a text file as follows:  test1,test2,test3 test4,test5 test6,test7,test8,test9,test10 test11,test12,test13,test14   How can I replace commas with semicolons, starting with the second one (and continuing to the last one)?  I want to get output as follows:  test1,test2;test3 test4,test5 test6,test7;test8;test9;test10 test11,test12;test13;test14


I can't select cycles as render engine. I have tried changing the user preferences as well as re-installing blender.  Any ideas?

I just upgraded to 2.75 and there isn't an option for cycles render in the engine drop down.  How do I access cycles render in the new environment?  It only list, blender render and blender game.


I am new here and in the Linux world. So i am wondering if it is possible to search for a word in the content that i already have in my terminal.  Thanks in advance

I have written a program that outputs a lot of text to the terminal.   I am looking for certain words in the text to see if I have done it right, but simply reading the text is impossible.   Are there any capabilities or commands that can actually enable me to lookup a word in the terminal (like Ctrl + F)?


I would like to search for answers to a problem related to a code issue in PHP with Class::method.  While I was searching for answers I realised Google seems to drop the :: in all search queries.  The answers are all without the double colons. Even single colons will get dropped for the searches.  How can I search for double colons in google?

I want to search for what += means, but Google won't return any documents.  Also when I come across some PHP code I don't understand I can't search for the keywords as written.  How can I search for these special characters or include these special characters in a search.


this is not a duplicate question as the occurrence of the issue is different.. as i am only experiencing this behavior when i try to do exact what i have mentioned(layout order wise)   i am trying to create a new dialog fragment trough another dialog fragment. when i try to do that it throws an error  java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentTransaction android.support.v4.app.FragmentManager.beginTransaction()' on a null object reference         at android.support.v4.app.DialogFragment.show(DialogFragment.java:142)     this is the related code   ForgotPasswordFailedFragment forgotPasswordFailedFragment = new ForgotPasswordFailedFragment();         forgotPasswordFailedFragment.show(getFragmentManager(), "Password Reset Failed");     so my view order is something like this..      mainActivity -> fragment -> dialogfragment -> dialogfragment (i'am trying to get this)   i have tried mentioned answers and tease are the  errors that occurred for each change...  ForgotPswrdSuccessFragment forgotPswrdSuccessFragment = new ForgotPswrdSuccessFragment(); forgotPswrdSuccessFragment.show(requireActivity().getSupportFragmentManager(), "Password Reset Failed");  this throws        Fragment ForgotPasswordDFragment{725811b} not attached to an activity.             at android.support.v4.app.Fragment.requireActivity(Fragment.java:724)             at *********.SignIn.ForgotPassword.ForgotPasswordDFragment.showSuccessDialog(ForgotPasswordDFragment.java:85)   ForgotPasswordDFragment is a dialog fragment which is on a fragment  and i am calling another dialogfragment from (ForgotPasswordDFragment)  there..and now that action is throwing above mentioned eror  for this   forgotPswrdSuccessFragment.show(this.getChildFragmentManager(), "Password Reset Failed");   the exception is   java.lang.IllegalStateException: Fragment has not been attached yet.         at android.support.v4.app.Fragment.instantiateChildFragmentManager(Fragment.java:2383)

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


The usual definition of a normal subgroup $H$ of group $G$ is that $x^{-1}Hx=H$ hold for all $x \in G.$ A weaker form of this is to assert only the containment $$x^{-1}Hx \subseteq H \tag{1}$$ should hold, for each $x \in G.$ If it does, then for any specific $x,$ equality in $(1)$ be deduced by applying it both as is, and with $x^{-1}$ replaced by $x$. Thus the "weaker" form is equivalent to the usual one, provided one assumes it holds for all $x \in G.$  My question concerns cases of a group $G$, a subgroup $H,$ and a choice of just one $x\in G.$ According to Hall's group theory text, in the case of infinite $H$ the containment $(1)$ need not imply equality.  So I'm looking for such examples: A group $G$ with a subgroup $H$ and some specific $x \in G$ for which the containment $(1)$ holds without equality. That is, we have $x^{-1}Hx \subset H,$ where the containment is proper.

Let $G$ be a group, $H\subseteq G$ a subgroup and $a\in G$ an element of the group. Is it possible that $aHa^{-1} \subset H$, but $aHa^{-1} \neq H$?   If $H$ has finite index or finite order, this is not possible.


I'm trying to understand how DNS works in a shared hosting environment.  I went to my registrar and set my name servers to my host's ns1.foo.com and ns2.foo.com. I'm using a cloud hosting provider who has a web portal where I can set my DNS entries. However I am confused by the lack of security. when I entered in the entries for my domain there was never any step to prove that I actually own that domain. What is to stop somebody else on the same hosting service (a nasty neighbor) from writing over my DNS entries and pointing my traffic to their server instead?

When I register a new domain, I send it to my hosting provider by assigning it its domain name servers in the registar's settings. For example, with Digital Ocean, I input the following:  ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com   I then add the domain settings in the A record of my server. It just occurred to me that anyone else on the same hosting provider can add an A record with a domain I own.   Is there anything preventing this from occurring? if 2 different servers that use the same domain name server try to assign a domain to themselves through the A records, where would the domain actually resolve when you enter it in the browser? what prevents domain name collisions on the same DNS server?


I've got clean install Ubuntu 20 on my dell 5593 and to start things of: I made efi, home and root partition and it all installed without problems untill the reboot. The error i got was: error: can't find command 'hwmatch'. error: Command failed. (this repeats several times) error: you need to load the kernel first. Press any key to continue... Failed to boot both default and fallback entries Press any key to continue...  After that i get the usual grub menu, but whatever entry i choose i got error: Command failed. (this repeats several times) error: you need to load the kernel first.  So i reinstalled using the automatic partition option and this time i didn't get this error for 2 days. But today I encountered this problem again. I tried upgrading && updating, but no luck. One thing that allows me to boot is simply hitting ESC after the error messages and writing "exit" in grub command line. The booting sequence refreshes and ubuntu boots without errors. Any Ideas how to fix that?

This question  is exactly what I'm asking but was closed as non reproducible. Mine is very reproducible.  Ubuntu 18.04 freshly installed on a 64-bit UEFI machine. Default grub boot options work fine, but I wanted to add a brief countdown (my normal config).  After editing /etc/default/grub as normal and running sudo update-grub, the countdown works, but I get the error shown in the question title.  I tried the solution (copying files) in the closed question but it didn't seem to fit my configuration. Frankly I found the answer confusing.  I also tried editing /etc/grub.d/10_linux to comment out the IF-THEN structure that uses hwmatch. After that I did a sudo update-grub but I still got the error.  How can I get my countdown and not see this error?  Edit per comments -  Stock grub as installed (all non-commented-out lines shown)  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""   Edited grub to give countdown (all non-commented-out lines shown)  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=countdown GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""


I know that, in Java, two strings should typically be compared using a .equals() method, and that using == only compares memory locations. However, I wrote up this test code real quick in Eclipse and it's returning true and no one that I'm working with can figure out why. Did Java update to support direct comparisons of strings and just no one realized or are we crazy? Stack Overflow won't let me post a picture of the console but it prints out true.  Here's the code:      public class Thing {         public static void main(String[] args){             String ar = "fish";             String ar2 = "fish";             System.out.println(ar == ar2);         }     }

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


Question ported from  since it's more suited here. Short version Use this prompt to get this green color:  With this line: export PS1="\w: \[$(tput setaf 2)\][GREEN]\[$(tput sgr 0)\] \$ "  But to work inside a function so my_function(){   echo -e "\[$(tput setaf 2)\][GREEN]\[$(tput sgr 0)\]"   # echo "\[$(tput setaf 2)\][GREEN]\[$(tput sgr 0)\]" } export PS1="\w: \$(my_function) \$ "  Unfortunately I get this prompt : ~/Work/temp/prompt_test: \[\][GREEN]\[\] $  *You mustn't use $(my_function) instead of \$(my_function) - why? elaborate explanation below. Elaborate explanation I'm trying to satisfy 2 conditions: Condition 1 I can add color to prompt with this code: export PS1="\w: $(tput setaf 2)GREEN$(tput sgr 0) \$ "   But then If I enter a long command, then click home + end- something become messed up - to replicate behavior:  export PS1="\w: $(tput setaf 2)GREEN$(tput sgr 0) \$ " type a long command (no enter): longg command with many charterssssssssssssssssssssssssssssssssssssss click home click end Try deleteing all chars using backspace   I can fix that adding \[ and \] before and after color commands: export PS1="\w: \[$(tput setaf 2)\]GREEN\[$(tput sgr 0)\] \$ "  That solves the problem. Lets call "preventing that problem" Condition 1 Condition 2 To have the PS1 line evaluate dynamically with every directory change. so given the following structure (basically making two folders: mkdir blue red) two folders:   +-- red   +-- blue Then a simple bash function to check whether pwd contain blue or red then add color to prompt so whenever I change to folder with blue path I get blue, same with red change_color2(){   local my_pwd=$(pwd)   if [[ $my_pwd == *"blue"* ]]; then # path containing 'blue'     echo "$(tput setaf 4)<BLUE>$(tput sgr 0)"   elif [[ $my_pwd == *"red"* ]]; then # path containing 'red'     echo "$(tput setaf 1)<RED>$(tput sgr 0)"   fi } export PS1="\w: \$(change_color2) \$ " cd red cd blue    Notice this doesn't work if I use $(change_color2) instead of \$(change_color2) I'm trying to satisfy both conditions at once but I'm unable to- can you please help? Thank you. Ubuntu 20.04 /bin/bash

I give my git colorful prompt but it never fully works. After so many trails I've pinned point where the problem is (completely stripped git out of the problem). Here it is, manifesting the symptom as simple as possible:  Following up on , I need to close escape sequences with \] in order for 'readline' to correctly calculate the prompt's visible length It works with PS1 setting statically, but not dynamically:       echo -e '\e[33m\]00\e[0m\]' | tee /tmp/p      PS1="\n\w`cat /tmp/p`\\\$ "      PS1='\n\w`cat /tmp/p`\\\$ '      echo -e '\[\e[33m\]00\[\e[0m\]' | tee /tmp/p


After editing a question inline, clicking on the "close" link does not open the close dialog, the page just scrolls to the top.  Browser (all OS X 10.8.4): Firefox 22.0, Chrome 27.0.1453.116

If I edit a question and then click the "close" link, it doesn't work. Nothing appears on the screen and I'm forced to reload the page before the link works.  A  covers similar ground (except my edit wasn't inline), however this was apparently fixed.  (I've tagged as  as this is the only site I have the reputation to reproduce the issue on.)


In The Last Jedi, we see Snoke has 8 guards with red armor in his throne room.  They are, obviously, similar to the Emperor's Guards from the Original Trilogy, who were (if I recall correctly) highly trained baseline humans.  They were not Force-Sensitive, Dark Jedi, or anything similar.  They carry weapons which are capable of blocking lightsabers (which isn't novel in the First Order, as we have seen 'normal' First Order Troops with similar weapons) and are well-trained in their use.  When we do see them in action      Against Kylo Ren and Rey, after Snoke dies   they are able to fight effectively against trained, lightsaber-wielding Force users      Wounding Rey and battling Kylo to a standstill until he got support.   Outside of being well-trained and well-equiped, was there anything special about these guards?      Were they the other students Kylo took with him from the Temple Massacre?

In the Last Jedi,       Snoke is killed.   In response to this, the guards mount a furious attack on       Kylo Ren and Rey.   They seem far better equipped to do this than one would imagine of non-Jedi combatants. Who were these guys, and how were they so effective? As a bonus question,      Why were they fighting? Their master was dead, and Kylo Ren was the heir apparent. What was their plan after defeating the pair?


I am using a 128GB micro sd card on my android phone, and i recently noticed that i could not write any files to it. Reading works fine. I tried to format it using my windows computer, without success. Every file i remove reappears when i replug the micro sd in. I tried following the steps in , with no success. Do you have any idea on what i should do ? Please let me know in the comments if you need anything else.

I have, not one but two microSD cards that my phone (Samsung Galaxy Young, Gingerbread OS) seem to have broken. One is 1GB and the other is 2GB. The 1GB one won't be formatted.  When I put the 1GB one into the computer the computer prompts for a formatting. I don't care for the content so I tried to format it, but to no avail; the format fails and I have no idea what to do to make it work again.  I tried using the SDformatter software, but it can't format the card as it is write protected. I'm googling to solve it but so far no success.  My computer OS is win7 if that's of any relevance.


Where $ (X, d) $ is a metric space. I want to prove it using sequential criteria.  How do I tackle it?

Let $X$ be a metric space , $d$ is the metric , show that $d$ is a continuous function from $X\times X$ to $R$.  I think the definition is all we need , but I just don't know where to start , can anyone help me.


I want to assign value to the property of the object of class. I have taken the list of property names using GetProperties();         PropertyInfo [] props;       props=typeof(Import_Column).GetProperties();   I have created an object         Import_Column myobj=new Import_Column();   I want to do something like         myobj.props[2]=value; //giving me error   How can i do it? is there any different approach?

Is there a way in C# where I can use reflection to set an object property?  Ex:  MyObject obj = new MyObject(); obj.Name = "Value";   I want to set obj.Name with reflection. Something like:  Reflection.SetProperty(obj, "Name") = "Value";   Is there a way of doing this?


I was just trying to code stuff for fun, however I am stuck. I am trying to create 3 JButtons in one class A, and then call those buttons in another class B and then add ActionListeners in class B. So basically I only create the buttons in abstract class A and then call them in class B which extends class A and in class B I do stuff with those buttons. It sounds very simple, however I can't figure this out.   In class A:   public abstract class Activity implements ActionListener {          public static JFrame frame;`         public static JPanel panel;         public static JLabel label;         public JButton buttonleft;         public JButton buttonmid;         public JButton buttonright;      protected void makenButtons(String textlinks, String textmidden, String textrechts) {                 JButton buttonleft = new JButton(textlinks);                 JButton buttonmid = new JButton(textmidden);                 JButton buttonright = new JButton(textrechts);                 panel.add(buttonleft);                 panel.add(buttonmid);                 if (textrechts!=null) {                 panel.add(buttonright);             }   In class B:  package hi; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JButton; import javax.swing.JPanel;  public class MainActivity extends Activity{      public static void main(String[] args) {         Activity.makenFrame(380,120,"Choose mode");         Activity.makenLabel("Choose a work mode: ");         Activity.makenOpties("Run as server", "Run as client");         //Activity.makenButtons("Start","Exit",null);         MainActivity a = new MainActivity();         a.actiesButtons("Start","Exit");         Activity.toevoegenpanel();         }      public void actiesButtons(String textleft, String textright) {         JButton buttonleft  = super.buttonleft;         JButton buttonmid  = super.buttonmid;         buttonleft.setText(textleft);         buttonmid.setText(textright);         buttonleft.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent event) {             if (event.getSource() == buttonleft) {                 System.out.print("Hi");         }      }           });         buttonmid.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent event) {             if (event.getSource() == buttonright) {                 System.exit(0);             }         }                });     }      @Override     public void actionPerformed(ActionEvent e) {         // TODO Auto-generated method stub      } }  I deleted some not-important stuff. So basically I just like to know how to call the JButtons in class B. I tried:    JButton buttonleft  = super.buttonleft;         JButton buttonmid  = super.buttonmid;   However this gave me a nullpointerexception. Thanks in advance!  Edit: I know my problem is the exception, I just don't know how to fix it :( Could someone please write some quick pseudocode for me how to create a button in one class and call that button in another? :)

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


I'm helping write a mod for Minecraft, and I've decided to try and code in some special capes for our staff, and people who win our contests. I've got it so it downloads the .txt files containing the player UUIDs, which works. I've also got it to display the capes just fine when I force it to.  Keyword... When I force it to. I'm a Java amateur, and I'm completely stuck on actually printing the file to a string. Other solutions I've seen print each line to a string, but that's not what I want. I want to print the ENTIRE file to a string, then set a boolean if it contains something which matches a string variable I have set earlier in the code. Printing the entire file shouldn't be an issue as it's a very small file.  So the reason why I don't want the above because the code I've Googled around for iterates using while statements and such. I'd assume that would be constantly changing the string to the line it's reading, so if I used one of these examples and checked for a matching UUID it'd set the variable to true if it found the matching one, then immediately set it back to false after it goes to the next line, right?  The reason why I made these assumptions, is that at this point it would take a long time to test something and find it isn't working and test again because I cannot use the test environment in Eclipse; for this to work I must compile my mod and log in with my account, since to get the information required with this code I need to log in with my account. The version I'm using is a little old (I am a Beta 1.7.3 player) and doesn't support the login variables. Even though I'm using Beta 1.7.3, our mod properly updates the game's authentication and allows the use of the Mojang API, so if you're wondering why or how I'm even trying to get UUIDs in that version, that is the reason.  The reason why I'm posting here and not a Minecraft forum or something is that while this code is for Minecraft, file checking stuff is a general Java thing, so hopefully, this is the right place. Sorry if this is considered a duplicate of a few other posts that cover file reading but I found my case to be a little different.  Also sorry if anything here is stupidly written, or confusing. I'm exhausted after playing with this all night and failing to do so, and thus my proofreading skills are basically gone.  Basically, all I need is to just set a boolean if a UUID that matches one in the downloaded text file. My goal is to set a boolean for the staff capes file and the contest capes files you can see, using a string variable and .toString().contains(profile.getId().toString()). Thank you in advance for reading this. Here's the code I use to grab and download the files in case you wanted to see it.           InputStream staff;          InputStream contest;           File staffList;          File contestList;          String capeInfo =  System.getenv("APPDATA") + "/.minecraft/capeinfo/";         try {             staffList = new File(capeInfo + "staff.txt");             staffList.mkdirs(); staffList.createNewFile();             staff = new URL("https://www.dropbox.com/s/q6f4729i2zu02nz/staff.txt?dl=1").openStream();             Files.copy(staff, Paths.get(capeInfo + "staff.txt"), StandardCopyOption.REPLACE_EXISTING);              contestList = new File(capeInfo + "contest.txt");             contestList.mkdirs(); contestList.createNewFile();             contest = new URL("https://www.dropbox.com/s/kvvkfk6emms3qg5/contest.txt?dl=1").openStream();             Files.copy(contest, Paths.get(capeInfo + "contest.txt"), StandardCopyOption.REPLACE_EXISTING);         } catch (MalformedURLException e) {             e.printStackTrace();             return;         } catch (IOException e) {             e.printStackTrace();             return;         }

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.  Is there a better/different way to read a file into a string in Java?  private String readFile(String file) throws IOException {     BufferedReader reader = new BufferedReader(new FileReader (file));     String         line = null;     StringBuilder  stringBuilder = new StringBuilder();     String         ls = System.getProperty("line.separator");      try {         while((line = reader.readLine()) != null) {             stringBuilder.append(line);             stringBuilder.append(ls);         }          return stringBuilder.toString();     } finally {         reader.close();     } }


Is there a way to add meta description to views in Drupal 8?

Is there any module or some configuration that I can define the meta tags for the views page display in drupal 7 using  3.0?


Considering a dictionary with several recurring values. How to group the dictionary by value? For example:  mydict =  {     'germany': 'europe',      'france': 'europe',     'canada': 'north america',      'latvia': 'europe'     'usa': 'north america',     'china': 'asia' }   Group by value into list.  groupdDict = {     'europe': ['germany','france','latvia'],     'north america': ['canada','usa'],     'asia': ['china'] }

Given a dictionary like so:  my_map = {'a': 1, 'b': 2}   How can one invert this map to get:  inv_map = {1: 'a', 2: 'b'}


I would like to write a norm symbol of not two double vertical lines but rather two triple vertical lines. Currently I am doing it as \|| \cdot \|| instead of \| \cdot \|, but I have two issues with this typing: (1) it does not adjust the size of the vertical lines if, for some reason, the object replacing \cdot is too big, and (2) it does not look good; the space between each line is different.  How can I solve this?     Excuse me, but I didn't know how to correcctly tag this question.

I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like $|||\cdot|||$. I would like to know how to decrease the spacing between the vertical bars such that it has the same spacing as the $\lVert .. \rVert$ command.  There is a command available in the stmaryrd package called \biginterleave, but this command has to much spacing between the vertical bars, especially in display math mode.  Is there some work-around to adjust the spacing between to vertical bars?


I saw this sentence when I was studying British Culture. "William Shakespeare composed plays that broke FREE of England's past style of plays and theatre." I was quite confused about the meaning of "Free" in this situation. I looked up the dictionaries but couldn't find any meaning.

What is the difference between "break free of" and "break free from"?  I looked up to the dictionaries, I got the meaning of both while I still don't know how tho use them?  definition: 1\break free of something or someone IDIOM: =  escape (from), leave, withdraw from, extricate yourself from, free yourself of, disentangle yourself from •  his inability to break free of his marriage  2\break something free (from something) to force something to detach from something; to get something out of the hold of something else. I broke the gun free from her grasp. Someone broke the light fixture free from its mounting. free (from something) to force something to detach from something; to get something out of the hold of something else. I broke the gun free from her grasp. Someone broke the light fixture free from its mounting.  3\break free from sb/ sth   no rusult


I have a , and I am not sure which site is more suitable (StackOverflow or Programmers).  I've tried to read the about it and haven't found a conclusive answer.  Is it allowed/does it make sense to ask a question on more than one StackExchange site?

It is possible to migrate a question from one Stack Exchange site to another by closing, but if I have a question that I think is on-topic for multiple Stack Exchange sites, is it OK to post it on both (multipost)?   For example, I have a question that's earned me the tumbleweed badge on SO and I'm not sure what the best thing to do with it is. It's about a web server so it might be answerable on Server Fault but it's really more of a programming thing, hence the posting the question on Stack Overflow.    Is there any way to make the question visible on multiple sites (crosspost) and then accept the answer wherever it came from?


I am developing a website in two languages (English and Italian) and I use a flag icon to switch between them. What is the common/best practice if I am viewing the Italian page?  Show the Italian flag, which changes the language to English Show the English flag, which changes the language to English  I am torn between the two options... Is it better to show the currently active language, or the language displayed after you click on it?

Websites often present language selection to users with flag icons, but I think this is simply wrong. Flags represent countries.  There are two reasons for a user to change the display language (or at least click on that flag):   Change the language as he can't read the one displayed: even if the country is correct (say Switzerland), people can speak different languages (French, German and Italian) Adapt the content to his country: even if the language is correct, an English speaking visitor may be interested in British content rather than US content.   The logic I would follow is:   If you have country specific content, let the user select his country first. Flags are perfectly correct in this case. If the country has been selected or if the content doesn't depend on the country, let the user select his preferred language. And back to my question here: how to graphically represent a language?   I've seen "English" flags half US/half UK, but how would an Australian identify to that?  My question is not about the techniques used to recognize a user's culture or country of origin using his IP and browser preferences, but how to avoid displaying available languages by their names?  Conclusion considering the answers:  Do not use a flag to represent a language. There is no natural graphical representation for a language. The only acceptable icon for a language is its two letter code as it is used in the Windows standard language toolbar. Even with this icon, it is highly recommended to put the language name in plain text, preferably in its native form.  Update: I just discovered that there is a running competition to . The results should have been published by Jan 15th 2010, but two months later there is still nothing. It must be a problem with no solution. Update 2013: There is finally . It doesn't solve the graphical representation of a language but I think it's a nice solution for its purpose:


As we understand Levitation, even involuntary movement by an opponent can trigger an Opportunity Attack.   Does that mean that even the wizard who cast the spell get an Opportunity Attack against an opponent they Levitate away from themselves?

If I cause an opponent to leave my reach with an ability, spell, or effect can I use my reaction to take an Opportunity Attack against them?


If I cast disintegrate and the enemy casts counterspell, would I wait to see the outcome of the enemy's counterspell before I cast counterspell? Or would I have to just cast it without knowing (like when a Divination wizard uses their divination die with their Portent feature to replace a roll before it's made)?  Do I (the player) choose to cast counterspell before or after the other player or DM has made the ability check for their counterspell?

I'm not entirely clear on how Counterspell works, when trying to counter higher-level spells: the CS description only talks about disrupting a creature you can see, within 60 feet, casting a spell.   However, when trying to counter a higher level spell:   Do I know what spell is being cast?  Do I at least know (somehow intuit, based on VSM components) the level of the spell? Or can I tell the spell/level of the spell by sensing a disturbance in The Weave? (I.e., if the spell is being cast using Subtle Spell, can I still tell what's going on?)   The point of the question is to determine how fruitful CS can be in combat--if I know what the other guy/gal is casting (or at least the level), I can decide whether I want to spend my L8 slot to counter his/her L8 slot. But if I have no idea, and I end up using a L8 slot to counter a L3 spell... seems a bit painful.  Hope this made sense!