Fill in the blank: "The most ____ person I've ever met."  A reformulation of the sentence might be "The person with the most integrity I've ever met" (which in itself has problems as a sentence,) but I want the adjective form.  Wikipedia suggests "integrous" which I'm not sure is in common use.

I'm looking for the adjectival form of "integrity." Instead of "Be a person of integrity," I'd like to say something like "Be [one word I'm looking for]" I did a  for this, but I also wanted to know what stackexchange folks would like to say.


I'd like to do a GeoJSON dump of a PostGIS table, but I want to export features (the geometry and the properties) not just the geometry. I've been digging into the  function but it looks like I can only get the coordinate information (which makes sense since it's a geometry function).   For example:  select st_asgeojson(the_geom) from street_centerline limit 1;   Returns:  {"type":"MultiLineString","coordinates":[[[-65.591776562805038,41.682190576167052],[-65.591998971284028,41.682082119060382],[-65.592001213509064,41.682081025737766],[-65.593689871787177,41.681257533373952],[-65.595415661879244,41.680415888937219],[-65.595440519465640,41.680403765889309],[-65.595603134242481,41.680324459445771]]]}   I'm curious if anyone knows of a simple way to get the property information as well. Has anyone written a pgsql2geojson script yet?

I would like to get a geojson feature with properties from PostGIS. I have found  to have a feature collection but I can't make it works for just a feature.  SELECT row_to_json(fc)  FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features  FROM (SELECT 'Feature' As type     , ST_AsGeoJSON(lg.geog)::json As geometry     , row_to_json(lp) As properties    FROM locations As lg           INNER JOIN (SELECT loc_id, loc_name FROM locations) As lp         ON lg.loc_id = lp.loc_id  ) As f )  As fc;   so far I tryed to modify the feature collection query of the example. but the output is not valid.


$a^x-1 | (a^x)^k - 1$ Is this expression true, and if yes how can I prove it?

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


When factoring a second degree equation $ax^2 + bx + c$ you find the roots then take $a(x - \text{root})(x - \text{root})$. I am wondering why this works. Sorry if poorly phrased question.

I know that if a quadratic equation has roots s and t, you can factor it as (x-s)*(x-t) and I used that property countless times, but I have never quite understood why that should be. Any clarification and/or proof of this would be appreciated.  I suspect that st = c/a. Is there any way how to see this?


I would like to add a tikz node within a text in such a way that it doesn't add space between the lines. In particular, I'd like to animate (in beamer) a frame around the text without it taking space.  Below is an example of what I'm trying to do.  Many thanks in advance!  \documentclass{beamer} \usepackage{tikz}  \tikzset{      alt/.code args={<#1>#2#3}{%        \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}      },     BeamerAlert/.style={alt=#1{draw=red,thick,rounded corners}{},anchor=base} }  \newcommand<>{\tikzMe}[1]{    \tikz[baseline]\node[BeamerAlert=#2] {${#1}$}; }  \begin{document} \begin{frame}   This is an \tikzMe<2>{\mathsf{example}} of   text with the space between lines changed because of the tikz   node. Here is another line whose spacing is natural.  \end{frame} \end{document}

Is there a simple way to reduce the amount of white space around the TikZ in the MWE pasted below (in particular in the x direction)?  \documentclass{article} \usepackage{xcolor} \usepackage{tikz}  \begin{document} VRCRCRCRCC \tikz[baseline] \node[fill=yellow!30, anchor=base,inner sep=0.7pt, outer xsep=-2pt] {ABCDE}; VBZBZBBBBG \end{document}     PS: This question may be a duplicate of . I posted it nevertheless since 1) my example is much simpler (and hence may have a much simpler solution) and 2) I don't see how the answers given there could help in my case. If you disagree feel free to mark my question as "exact (!) duplicate of ...".


New group member here, and potential Ubuntu user :) I have an older notebook that can only run WinXP. Is there a version of Ubuntu I can DL to a bootable flash drive to meet these sys reqs? Can't get the OS to boot, and haven't tried in 5 or so years, so I don't have any sys details to give, but I will unearth it this next week and research the model #. I do remember it was a Dell hehe Thanks In Advance- :-)  -Scotty

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am trying to generate random number with special characters   what i do for simple integers is   Random randomGenerator = new Random(); int randomNumber = randomGenerator.nextInt();   what can i do to get some thing like this in my random numbers   String salt = "Random$SaltValue#WithSpecialCharacters12@$@4&#%^$*";   thanks

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


Which book is a self introductory for partial differential equations for beginners?

What is a good PDE book suitable for self study?   I'm looking for a book that doesn't require much prerequisite knowledge beyond undergraduate-level analysis.  My goal is to understand basic solutions techniques as well as some basic theory.


I read a book in the 1970s that was on Earth and plants had reclaimed the land. It had creeper like plants that had reached the moon, oaks trapped its victims using cages so it could live off the waste of the creature before it died. A fungus would drop from trees onto peoples heads which took them over or enhanced there thinking as in the case of the heroes.  The only other part of the story that I remember was that the women were the dominant sex and would express their dominance by urinating on the ground and the heroes/heroines in the book climbed the creepers to the moon.  Does it ring a bell with anyone? I would like to find a copy if possible.

I really hope someone can help me. There is a book I read years ago and cannot remember the name of it but would love to read it again.   If I remember correctly it was about people living in a tree and they would get into a bubble or something like that to move up the tree. People thought they were dying but it turns out they were moving up a level in life.   Apparently the same author wrote a story about someone digging up an old teacup handle that is about 3 meters long but it turns out the human race was modified and are now tiny.  Hope I haven't made all this up because they sound like crazy ramblings.  :-D


I am asking for good practices showing how to create a converting constructor in Javascript with the correct chain of prototypes.  It should: - get the existing object as a parameter - return a new class type object that contains all the properties of the old class - add new properties  - change some of the properties  I want to avoid manually rewrite all properties.  If someone has a reference to examples of good practices creating other types of constructors and their inheritance, this can be helpful.  Right now working (but ugly) solution is here:  //Function from ( https://stackoverflow.com/questions/728360/how-do-i-correctly-clone-a-javascript-object ) function deepClone(obj) {         var copy;          // Handle the 3 simple types, and null or undefined         if (null == obj || "object" != typeof obj) return obj;          // Handle Array         if (obj instanceof Array) {             copy = [];             for (var i = 0, len = obj.length; i < len; i++) {                 copy[i] = deepClone(obj[i]);             }             return copy;         }          // Handle Object         if (obj instanceof Object) {             copy = {};             for (var attr in obj) {                 if (obj.hasOwnProperty(attr)) copy[attr] = deepClone(obj[attr]);             }             return copy;         }          throw new Error("Unable to copy obj! Its type isn't supported."); }    function A() {     this.param1 = {'a': 1};     this.param2 = 'b'; }  A.prototype.getParam1 = function() {     return this.param1; }  function B(objectToCopyFrom) {      //Code to copy all properties from the objectToCopyFrom and inherite prototype.     Object.assign(this, deepClone(objectToCopyFrom));      this.param1.a += 2;     this.param3 = 'c'; }  B.prototype = Object.create(A.prototype);  B.prototype.getParam3 = function() {     return this.param3; }  var a = new A(); a.param1 = {'a': 2};  var b = new B(a);  console.log(b.param3); //Should print: "c" console.log(JSON.stringify( b.getParam1() )); //Should print: "{'a': 4}"  a.param1.a = 8;  console.log(JSON.stringify( b.getParam1() )); //Still should: "{'a': 4}"      Please help me do it in a better, cleaner way without ES6 if it is possible.

I prefer to use OOP in large scale projects like the one I'm working on right now. I need to create several classes in JavaScript but, if I'm not mistaken, there are at least a couple of ways to go about doing that. What would be the syntax and why would it be done in that way?  I would like to avoid using third-party libraries - at least at first. Looking for other answers, I found the article  that discusses object-oriented programming in JavaScript. Is there a better way to do inheritance?


As per these responses:        Beta tag can be earned only participating in private beta. So do I have any chance of getting this badge for Stack Overflow, in future?

I've noticed the beta badge on Stack Overflow.  Is the participation open? How is it possible to be part of the private beta?


It's commonly known among physicists that the speed of light has a constant value in SR. Except in GR, but I'm not so sure. I THINK, intuitively, it doesn't. I guess I could have done some research on this topic about which various questions are asked, but I didn't make the effort to do so because I don't think it's of real importance to my question.  If the speed of light had a different value as it actually has, would that make an essential difference for Special or General Relativity?

Meaning, why is it the exact number that it is? Why not 2x10^8 m/s instead of 3? Does it have something to do with the mass, size or behavior of a photon? To be clear, I'm not asking "how we determined the speed of light". I know there isn't a clear answer, I'm really looking for the prevailing theories.


I wonder why one needs to use the Safety Remove Hardware tool when write caching is enabled on a disk drive, what the risks are if not doing so aside from file corruption of the files being written at the time of the disk removal. In particular, can it make the  hard drive unusable?

When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).  I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices. Am I lucky or can this annoying warning just be ignored?


"Examplary" doesn't appear to be a real English word, and I'm not searching for exemplary because I'm just interested in practical, instructive examples, not necessarily anything especially good nor a particularly desirable model. What I'm looking for would be used in some form of the following awkward but examplary sentence:  The speaker mentioned several occurrences in an examplary way, showing how each was a helpful example of the class of events. They found that immediately after a definition and explanation this example-providing process was important in order for the students to grasp the underlying concept.  Is there a real English word that would work the way I'm trying to use the fake word examplary?

I want an adjective that describes a noun as something that serves as an example of something.   I viewed this  but I feel that exemplary doesn't suffice, because it implies bias approval. Like if I used it in a sentence like:     Joe is an exemplary citizen   It doesn't imply that Joe is a typical or representative citizen, it implies that he's a great one that people should model themselves after.  I think that exemplative is a great word. Especially for the context I wish to use it in, which is something like:     Her work is an exemplative narrative on this particular subject   However my concern is that when I searched for the definition of exemplative, there were open content sources such as Wiktionary definitions for it. So is it a valid and proper word that I can use or should I look to another adjective? If so what?  Thank you all for your help.


I got this code from somewhere else, I want to implement Kepler's third law to make the simulation look more realistic, the simulation is a 2D satellite orbiting around a planet, the satellite(Planet) script here is :   using UnityEngine; using System.Collections; using System.Collections.Generic;  public class Planet : MonoBehaviour { private float alpha; //will use for cos & sin (as angle) private float distance;//distance from center private float Rotation;//rotation angle private float currentTime;//Time start when Instantiated //input values public float speed; public Vector2 RotationValues; public Vector2 distanceValues; public Vector2 sizeValues;   void Start () {     //Initialize with Random rotation & distance & size      //Random Rotation between -2 & 2     Rotation = Random.Range(RotationValues.x, RotationValues.y);     //Random distance  between -1 & 2     distance = Random.Range(distanceValues.x, distanceValues.y);     //Random Size between 0.2f & 0.7f     var Size = Random.Range(sizeValues.x, sizeValues.y);     //Set localScale with random size     transform.localScale = new Vector3(Size, Size, Size);      //calculating current time by subtraction Time.time and lastTime     currentTime = Time.time - Generator.lastTime;      //GetComponent<MeshRenderer>().material.color = new Color(Random.value, Random.value, Random.value); //Random Color }  void Update () {     //Timer     currentTime += Time.deltaTime;      var X =  (distance * Mathf.Cos(currentTime)); //X     var Y =  (distance * Mathf.Sin(currentTime)); //Y     var R = (Rotation * Mathf.Cos(currentTime)); //Rotation     //give earth from generator class     var Earth = Generator.Earth;     transform.position = Earth.transform.position + (new Vector3(X, R, Y));// RotateAround Earth  } }   also I have this other script which generates the planets:  using UnityEngine; using System.Collections;  public class Generator : MonoBehaviour { public GameObject prefab; public static GameObject Earth; public static float lastTime; public int numerOfSatellites;   void Start() {     Earth = GameObject.FindGameObjectWithTag("MainPlanet");//Find Earth     for (int i = 1; i <= numerOfSatellites; i++) {         lastTime = Time.time;         GameObject sat = Instantiate(prefab, Earth.transform.position, Quaternion.identity);         Physics2D.IgnoreCollision(sat.GetComponent<CircleCollider2D>(), Earth.GetComponent<CircleCollider2D>());     } } }   I know that the main part here is  void Update () {      //Timer     currentTime += Time.deltaTime;      var X =  (distance * Mathf.Cos(currentTime)); //X     var Y =  (distance * Mathf.Sin(currentTime)); //Y     var R = (Rotation * Mathf.Cos(currentTime)); //Rotation      //give earth from generator class     var Earth = Generator.Earth;     transform.position = Earth.transform.position + (new Vector3(X, R, Y));// RotateAround Earth  }   The main problem is that whatever distance the planets have from the mainPlanet (called earth) they move at the same angular velocity, how would I change this?      Those are the basic 4 steps of every orbit, the problem here is that they all align in the center, which shouldn't be possible because of the random distances they have

I would like to create a space simulation with realistic gravity.  This means planets in 3d space which act as central gravity sources and multiple objects which are attracted by those planets gravity so that they orbit them in physically correct orbits (like in , for example).  How can I implement such gravity sources with C# script?


I regularly send out a piece of an Excel spreadsheet for my coworkers to fill in, in an email. However, thus far I have only been able to do it as a normal (word kind) table, that doesn't support summation and value-based formatting.   How can I embed an excel spreadsheet in the email that is editable when my coworkers respond? All I have tried results in the embedded spreadsheet to be converted to an image as soon as they recieve it.  I do not want to link to the actual excel file on disk, since it requires a lot more input to work. I've had a look here , but it seems to only deal with the link method.  Office 365.

Years ago I figured out how to embed a spreadsheet in an Outlook email to automate a task I do regularly.  Whenever I want to send a new quote request I open an old email, tell Outlook I want to resend it, fill in the new values in my embedded spreadsheet and then send it off.  This method worked well for years.  After switching to a new computer however, I have found that when I open the latest emails I have sent, I cannot edit the embedded spreadsheet because Outlook interprets it now as a GIF.  Saved emails that I sent with the old computer however, still work fine - I can still open, edit and resend and Outlook interprets the embedded spreadsheet correctly.  I would like to figure out how to setup Outlook in the new PC correctly so that the embedded spreadsheet is interpreted correctly when the email is reopened. Some sort of security setting, maybe?  Any help anyone could provide would be appreciated.  Edit: I developed the spreadsheet originally in Excel. Then I went into Outlook, created a new email, did Insert->Object->Excel Spreadsheet. At that point I had a blank spreadsheet in my email. Then I copied and pasted the spreadsheet from Excel into the blank spreadsheet in Outlook and it worked perfectly (until this recent problem)


I'm facing a problem that is completely strange for me. This is simple, I build a small electronics device and in that one I just set up a voltage bridge divider to obtain battery voltage to be able to indicate what is the level of the battery.  Problem description  Behavior: It works quite fine, means that when battery voltage is decreasing, it decreases on the input ADC on the MCU. The main problem, is that it discharges the battery same when the circuit is turned off.  What we tried: OK, we have to find a system that permits to turn off the bridge divider when I turn off the circuit. That's why I simply added a transistor which is driven by the 3.3v regulator of the circuit:   When circuit is ON, 3.3v from the regulator drives a transistor BC547A (just for test) on the Base with a 10k resistor. The transistor becomes "passing", and provide battery voltage to the bridge divider. We read VBAT2 on the MCU, when system is powered   Strange behavior: But... this is not working, we observe that the transistor is acting like a regulator because it seems to be not "passing" enough to provide the voltage variation from the battery. This is the circuit that we are trying.  Schematic:     And when we measure variation at the input of the MCU, the transistor seems acting like a regulator O_o. It means that when battery voltage decreases slowly, voltage on the MCU input stay completely constant and stable.  Here are the measure that I've done:     The blue line is VBAT2 (the one that goes to the MCU), and the red one is the probe that is on the battery +.  The battery is a standard single cell lithium ion polymer, with battery voltage that move from 4.15 V (full charge) and 3.1 V (discharged).  Does someone can help me to solve this problem or explain to me why I observe this behavior?

I want to run a micro-controller from a 1S lipo through a 3V linear regulator. I need to measure the battery voltage however. The problem with using a voltage divider is that it would drain the battery over time which may or may not have protection circuitry built in. Since the AVR I'm using has a recommended input impedance of no higher than 10K I can't make the divider too large either.  Can anyone suggest a solution that would allow me to monitor this voltage without killing an unprotected battery over a couple of months? The circuit might enter deep sleep mode for an extended period meaning a voltage divider solution would consume the most power.    I ended up using both Hanno and Andy's solution. Thanks for all the input. Can only choose one answer unfortunately.


If someone can help me with this. I'm complete -n o o b, only started to learn and got stuck.  If I'm asking this -   Scanner buck = new Scanner(System.in); String fname; System.out.println("Please Enter your Name "); fname = buck.next();   which command do I use to make specific name only to be entered as an answer. For example name would be Vani.  If name is "Vani" than "you are in". If any else name "than you go out".  I understand this with numbers but not with letters.  Any help would be appreciated.

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?


Sometimes, I find it a bit hard to manually indent my code so that all the \begin{...}'s and \end{...}'s align vertically in my .tex source code.  In some code development environments, I know that there are options to auto-indent the beginnings and ends of loops, functions, and other code blocks. I'm wondering if there is a way to do this in TeXShop or any other freeware for latex code?

I'm looking for a LaTeX code sniffer and/or code beautifier, because I'm creating a CI server for my LaTeX books and I wanted a few things. :D


I only get one value at a time in the system that I am developing. However whenever I get my first value I should already be able to calculate a variance. Every time I get a new value I should recalculate the variance. One important note is that I can't save any previous values, I should thus be able to calculate variances "on the fly".  is what I would need but for variances.  Thank you

I am creating a component that aims to calculate the average and variance of a metric associated with events happening during time but with a limited internal memory.  Imagine that the events are visitors entering in a shop and the metric is their age.  During time, my component receives events with the age of each visitor. I don't want my component to memorize the history of each ages. Ideally, I would like a light component storing only: the average A, the variance V and the number of events N.  After each event with age E, I want to update those three values :  N<=N+1 A<=(A*N+E)/(N+1) V<=???   What for V? I am thinking of something like :  V<=(V*N+(E-A)^2)/(N+1)   I know it is not exact as my previous V is using the old A which is no more the average.   Q1 - Is there an exact formula? Q2 - If not, is my proposal a good estimate? Is it biased? Will it converge correctly when N increases? Q3 - Is there a better formula?


Hello I have problems with exercise For a positive integer $n> 1$ let us denote by $Z_n$ the cyclic group of order $n$ a) Prove that all homomorphs of group $f: Z_{10}  \longrightarrow Z_9$ it is trivial. B) Find all homomorphisms of group $f: Z_{10}  \longrightarrow Z_8$ My atemp: a) We have $f: Z_{10}  \longrightarrow Z_9$ is homomorphism and we have $f(x) =1$ but I don't know how to better justify. b)How do I find all homomorphisms Thanks

All group homomorphism from $ \mathbb{Z} _m $ to $ \mathbb{Z}_n $  How could I find every group homomorphism?


I have two internet connections - one via a 3G modem, and the other via wireless. The modem is faster so I normally browse with it, but it does not support torrent downloads while my wireless does. When the two are connected, my PC automatically makes every connection through the modem.  Is there a way I can force a particular program, e.g. uTorrent, to browse through my wireless internet connection instead?

Suppose network interface 1 (net1) and 2 (net2) are both connected to the Internet. I want application 1 (app1) to use net1, and application 2 (app2) to use net2. How can it be done under Windows?  If you need a concrete example of the above situation, consider:   A laptop with Windows 7 net1 = A wired connection to a Verizon Internet modem net2 = A wireless connection to a Comcast Internet modem app1 = Internet Explorer app2 = Firefox I'd like to have "IE use Verizon but not Comcast", and "Firefox use Comcast but not Verizon"   It doesn't have to be done via the routing table. If you've other ideas, please let me know!


Should I put the verbs in the infinitive form in the following sentence:     As the federal auctions provide for a limited time to elaborate the   technical studies, to develop the project and to apply for the   necessary licenses   or should I omit the preposition "to" and instead write:     ... to elaborate the technical studies, develop the project, and apply   for the necessary licenses

I googled it but I couldn't find the answer... maybe I didn't seek it in the proper way. My question is if "to" must be repeated in sentences such as the following ones:   In the past, women used to do the housework and to take care of children.  The aim of this meeting is to control their progress and to discuss the new working plan.    If I had to bet, I would omit the second to... But I am not sure about it.


Remove duplicate words from between lists example: We have two lists; the first list contains: a b c d  The second list contains: a b c d e f  I want to make a comparison between the first and second lists, removing the matches contained in both, resulting in this: e f  I couldn't find a solution to do that with bash, but I did find one in python:

Is there any tool that can get lines which file A contains, but file B doesn't? I could make a little simple script with, e.g, perl, but if something like that already exists, I'll save my time from now on.


A friend of mine is working analysing 2000 twits per day and categorize them as postive, negative or neutral.  This is a really boring task but the algorithms that do this classification are not very good because they can't detect sarcasm. A simple solution to make more easy this task is to do a subsample of the original $N = 2000$ data points.   Doing some tests we saw that with $30\%$ of the data the normalized histograms of the subsample and the original data points look very similar but we need to know a better estimation of the error of doing this subsample.  Theoretically the data points are an i.i.d. sequence $(X_i)_{i=1}^N$ (big assumption) in the space $A = \{0,1,2\}$ (positive,negative,neutral). Let $(X_{(i)})_{i=1}^n$ be a subsample  of size $n \leq N$  (draw $n$ elements uniformly without replacement). In some sense I want to characterize the distribution of $(X_{(i)})_{i=1}^n$ in order to choose a $n$ such that the empirical distribution of $(X_{(i)})_{i=1}^n$  is close to the empirical distribution of $(X_i)_{i=1}^N$.   Any help will be appreciated

I have a population of phone calls - 200,000.  There are different reasons for each call, but lets assume the number of reasons is known. i.e. 7 different call reasons: 1) Check on order 2) Cancel order 3) Billing information 4) Account information etc...  My question is, I want to get a statistically significant sample size so the number of calls I listen to in my sample are representative of the distribution of the reasons in the overall population of 200,000 calls.  What should the sample size be? Which methods to use to calculate the sample size?


There are many popular problems on irrational power rational. A very interesting read is . And there are many specific examples where rational power irrational is rational (e.g. $2^{\log_2(3)}$). But what about $2^{\sqrt{2}}$? Is it rational or irrational?

Is $2^\sqrt{2}$ irrational? Is it transcendental?


Suppose that $\hat H$ is an operator (typically a Hamiltonian) and $\beta$ is a positive parameter (typically $\beta=1/k_BT$). Show that $$ \mathbf{Tr}\Big(e^{-\beta\hat H}\Big) \geq \sum_{k}e^{-\beta\langle k\vert\hat H k\rangle} $$ My first step is using a Taylor expansion to yield $$ \sum_{n}\frac{(-\beta)^n}{n!}\sum_{k}\Big(\langle k\vert\hat H^n\vert k\rangle-\big(\langle k\vert\hat H k\rangle\big)^n\Big)\geq 0 $$ How can I move forward?

I have the following problem that I was unable to solve for class, but I had a couple first steps that I started with that I am unable to finish.  I know I can't get this since it's already been turned in, but I would like to see if this was even a viable option for doing this proof in the first place.  ``Given an orthogonal set of states, $\{\phi_{n}\}$, and a Hamiltonian, $\hat{H}$, show that the partition function, $Q_{\beta}$, satisfies the following $$ Q_\beta \geq \sum_{n}\exp\{-\beta \langle \phi_n|\hat{H}|\phi_n\rangle \}$$ with equality holding when the $\phi_n$ states are eigenstates of the Hamiltonian.''  I started by dropping in the identity in the exponential (as eigenstates of the Hamiltonian) $$ \sum_n \exp\{ -\beta\sum_k \langle \phi_n|\psi_k\rangle\langle \psi_k |\hat{H}|\phi_n\rangle\}=\sum_n \exp\{ -\beta \sum_k E_k |c_{nk}|^2\}$$  Then I am left with showing that $$\sum_n \exp\{ -\beta \sum_k E_k |c_{nk}|^2\} \leq \sum_k \exp\{ -\beta E_k\}$$ with equality showing up again the same way, with a Kronecker delta $\delta_{nk}$ collapsing the sum in the exponential.  I realize I didn't make it very far, so this might not be the best way to show this, but it seems manifestly true just by looking at it, but I can't actually show it.  Does anyone have any hints about how to continue with this?


Given a nonnegative integer $k$. What is the value of the following sum:   $$\sum_{m = 0}^k \sum_{n = 0}^m \binom{k}{m} \binom{m}{n}$$   I need this in order to simplify some of my work. I tried to expand it using binomial formula but didn't lead anywhere. I am simplifying weyl denominator formula for certain Kac-Moody algebras and I end up with this sum.

Prove the identity $\sum_{k=0}^{n}\sum_{r=0}^{k} \binom{k}{r} \binom{n}{k} = 3^n$. I believe I need to use the binomial theorem here, but I don't know how to deal with the double summations.


Suppose a conductor is placed in a non uniform external electric field. Why does  the field inside the conductor remain zero?

In many introductory books on electrostatics, you can find the statement that the field inside a conducting shell is zero if there are no charges within the shell. For example, if we place an uncharged conducting sphere in a uniform electric field we would get something like this:  For simplicity, I have drawn a uniform external field and a spherical shell, but the internal field is zero for any external field and any shape of the shell. We know the field in the metal of the conductor is zero, so the external field must induce a charge separation in the conductor and this charge separation produces a field that cancels out the external field within the metal of the shell (shaded blue in the diagram). However, there is no obvious reason why the field should also be canceled to zero in the interior of the shell. Although it is widely stated in introductions to electrostatics that the field is zero in the interior of the shell I cannot find proof of this. So the question is how we prove that field inside the shell is always zero whatever the external field and shape of the shell?


Catching pokemon, transfering, hatching egg all brings candies. Are there other ways to increase the candy amount?   For example if I use my lucky egg, would I be able get 2x candies from transferring?

I already saw that I get 3 candies when I catch a new Pokémon for the first time.   What are the others ways to get candies?


I am going through Head First JavaScript to understand nested functions. Below is the code I am failing to understand.  var migrating = true; if (migrating) {     quack(4);     fly(4); }  var fly = function(num) {     var sound = "Flying";     for (var i = 0; i < num; i++) {         wingFlapper();     }     function wingFlapper() {        console.log(sound);     } };  function quack(num) {     var sound = "Quack";     for (var i = 0; i < num; i++) {         quacker();     }     var quacker = function() {         console.log(sound);     }; }   The book says "quacker is defined by a function expression in the function quack. So its scope is the entire quack function but it’s defined only after the function expression is evaluated, until the end of the function body." So I am calling the function before its evaluated so shouldn't it throw an exception or I am not understanding the concept?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


There is no simple group of order $400$.  $400=2^{4}\times 5^{2}$,so by sylow theorem, there is a 2-sylow group $A$ or 5-sylow group $B$,then by group action(left multiplication) we have a group homorphism from $G$ to symmtry groups $S_{5^{2}}$ or $S_{2^{4}}$.Kernel of these two morphisms are all normal subgroup of $G$ if they are nontrivial.It's enough for us to prove that one of these two homorphisms have nontrivial kernel.But I don't know how to prove it. Since there is an answer in mathstackexchange by using sylow theorem not group action, I think this should not be duplicated.

I've been given the question of showing that no group of order $400$ is simple. I've tried to attack it via the Sylow theorems for about a week now, but all the tricks and methods I know seem to be failing horribly.  Things I've tried:  Trying to produce a contradiction by giving a map into $S_n$ by elements acting by conjugation on Sylow 5-subgroups doesn't work, since there are 16 such Sylow 5-subgroups, and 400 divides $16!$, so it might very well be an injection and therefore we can't obviously find a nontrivial kernel.  Trying element counting is messy and I can't get it to come out the way I want- for instance, we can show that each of the Sylow 5-subgroups is isomorphic to $\mathbb{Z}_5\times \mathbb{Z}_5$, so there should be at least 125 elements of order divisible by only 5, but I can't see this producing a contradiction with any of the  things I can find out about Sylow 2-subgroups.  Anyways, I'm probably missing something fairly obvious, and I would appreciate any hints, solutions, or other help that you could give.


I know this may be a duplicate, but I think my case is unique enough to warrant another question. I have a 320gb 7200 rpm hdd with the last half of the disk basically perfect, but the first half has (I think) some physical surface imperfections from being knocked around in a car while running. I checked the disk after that incident, and it said the disk was failing. I continued after that, and while it still said the disk was failing, it didn't change, nor did I have any problems with anything other than the first half of the disk. I have some screenshots taken a few minutes ago of what the disks application says about the disk from the SMART data. I switched the disk from an old 32 bit computer to a 64 bit one, and want to install 64 bit ubuntu without wiping out the 32 bit zorin os on the second to last partition. The ubuntu installer fails when I try to install on the first half of the disk, where part way through installation it says I/O error, and the installer crashes. I want to know how I can make the installer avoid the bad spots and install regardless. Here is a bit of what the smart data says: reallocated sector count: 0 sectors, threshold 5, worst 1, normalized 1, reallocation count: 4459, normalized 9, worst 9, threshold 0, uncorrectable sectors: 0

During the last month Ubuntu starts having some problems: it shuts down suddenly without any apparent reason.. I figured out that the problem is in the hard disk, if I run this command:  $ sudo badblocks -sv -b 512 /dev/sda   I get 24 bad blocks all in the Linux partition (I have Windows in another one and it does not have the same problem). The question is if there is a way (different from changing the disk) for avoiding this shutting down. Maybe isolating the bad blocks?


This is my code. I want to when dblclick in element <li> active event and removeClass when click outside or click into other element.    initTodoITem: function (todo, lbContent, inputEdit) {    var item = document.createElement('li');     item.setAttribute('class', 'todoItem');      item.addEventListener('dblclick', function (){       lbContent.classList.add('edit');       inputEdit.classList.remove('edit');       inputEdit.classList.add('editing');     });      return item;   },

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I am wondering, whether $\infty \in \mathbb{N}$.

Is infinity a number? Why or why not?  Some commentary: I've found that this is an incredibly simple question to ask — where I grew up, it was a popular argument starter in elementary school — but a difficult one to answer in an intelligent manner. I'm hoping to see a combination of strong citations and solid reasoning in the answers.


I would like to know the name (code) of fonts in (La)TeX. Let me explain myself:  When I want to import a symbol from a different font, I type something like  \DeclareFontFamily{U} {cmsy}{}   Here cmsy is the (La)TeX encoding, (La)TeX name, (La)TeX code or whatever you want for the family Computer Modern (which is set by default in LaTeX).  If I want to import a symbol from the mathabxpackage (in this case subsetsymbol) I can write  \DeclareFontFamily{U}{matha}{\hyphenchar\font45}   Now the code is matha.  My question is:          Suppose I want to import a single character from Century Modern TT font. What code has it in (La)TeX? Which is the equivalent for cmsy and matha in any other font?

The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text?   How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change?     There are separate answers for different flavors of TeX (quick links):


I am sorry if the question is already repeated as i did not find suitable answer in stack overflow.  I have written a code for automatic sending of email when the count should be less than 20.  The code seems to compile and run in Eclipse. but when i try to run in the Linux terminal I am getting an error     Can any of you help me?

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I have a multiple regression where all my coefficients are significant. When I add new variables my initial variables become insignificant. Furthermore, my new variables (that in a simple regression are significant) turn out to be also insignificant.  My questions are:   What are the possible reasons for this change of significance? What are the methods and possible solutions to solve this issue?

When I analyze my variables in two separate (univariate) logistic regression models, I get the following:  Predictor 1:    B= 1.049,    SE=.352,    Exp(B)=2.85,    95% CI=(1.43, 5.69),    p=.003    Constant:    B=-0.434,    SE=.217,    Exp(B)=0.65,                            p=.046  Predictor 2:    B= 1.379,    SE=.386,    Exp(B)=3.97,    95% CI=(1.86, 8.47),    p<.001    Constant:    B=-0.447,    SE=.205,    Exp(B)=0.64,                            p=.029   but when I enter them into a single multiple logistic regression model, I get:  Predictor 1:    B= 0.556,    SE=.406,    Exp(B)=1.74,    95% CI=(0.79, 3.86),    p=.171 Predictor 2:    B= 1.094,    SE=.436,    Exp(B)=2.99,    95% CI=(1.27, 7.02),    p=.012    Constant:    B=-0.574,    SE=.227,    Exp(B)=0.56,                            p=.012   Both predictors are dichotomous (categorical). I have checked for multicollinearity.  I am not sure if I have given enough info, but I cannot understand why predictor 1 has gone from being significant to non-significant and why the odds ratios are so different in the multiple regression model. Can anyone provide a basic explanation of what is going on?


I am using an finished template at my school for writing my thesis in LaTeX. I am using TeXShop. My problem is that I can't get the symbol list to appear. It is no problem to get my abbreviations to appear. In the abbreviations I am using e.g.   \newacronym{ARMA}{ARMA}{auto regressive moving average}   For my symbol list I am using e.g   \newglossaryentry{symb:N}{sort={3}, name={$\mathbb N$}, first={first $\mathbb N$}, text={additional $\mathbb N$}, description={Set of natural numbers}, type=symbolslist}   In my main file I am typing:  \printglossary[type=\acronymtype,style=long ,title=Abbreviations, toctitle=Abbreviations] \printglossary[type=symbolslist,style=long ,title=Symbols]   Settings:  \usepackage{makeidx} \usepackage[nonumberlist,toc,acronym]{glossaries} \newglossary[slg]{symbolslist}{syi}{syg}{Symbols} \makeglossaries \include{Abbr} % all abbreviations \include{Symbols} % all symbols   I am compiling it with: latex – pdflatexmk – latex

Is there a way to make  invoke makeglossaries (part of the  package)?  Specifically I want to use latexmk to compile a LaTeX document that uses the glossaries package to produce a glossary.  Currently I'm using this rather clumsy sequence of commands:  makeglossaries document latexmk -pdf document.tex makeglossaries document latexmk -pdf document.tex   The first run of makeglossaries is required to produce files that the glossaries package needs, or otherwise causes latexmk to fail, but there's still no data in the (non-existant) .aux file, so that first makeglossaries invocation produces nothing (except for an empty file).  So, how to do this using latexmk alone (and let that deal with invoking makeglossaries at the right time)?


Let $I$ be an interval and let $I : I \rightarrow \mathbb{R}$ be differentiable on $I$. Show that if the derivative $f'$ is never $0$ on $I$, then either $f'(x) > 0$ for all $x \in I$ or $f' (x) < 0$ for all $x \in I$.  I was thinking to proceed by Darboux's theorem. Is that correct?

The question I'm trying to answer is:  Let $I$ be an interval and let $f:I\rightarrow\mathbb{R}$ be differentiable on $I$. Show that if the derivative $f'$ is never 0 on $I$, then either $f'(x)>0$ for all $x$ or $f'(x)<0$ for all $x$.  I know I can apply Darboux's Theorem to solve the question.  My Attempt: Let $I=[a,b]$. If $k$ is a number s.t. $f'(a)<k<f'(b)$, then there exists a point $c$ in $(a,b)$ s.t. $f'(c)=k$. Because $f'\neq0$, $0<f'(a)<k<f'(b)$.  I'm really stuck.. Could somebody help me out here? Thank you.


From time to time, I need to create screenshots at a resolution higher than the display of my laptop. It has two graphics cards, an Intel HD Graphics 3000, and an NVIDIA NVS 4200M. In the BIOS I can switch the system to discrete graphics. Then, in the NVIDIA settings, I can select a resolution higher than what my screen supports. However, that's cumbersome as it requires a reboot: Normally I run the system with both graphics cards enabled (Optimus), which means that the Windows 7 X64 desktop environment is controlled by the Intel graphics adapter.  Can I set a custom resolution, exceeding my screen's resolution, for an Intel HD Graphics 3000? If so, how?  Sometimes such a resolution is called a virtual screen resolution.  Update: Yes, I am aware of the question . However, it is not a duplicate as I am interested in a solution that the Intel HD Graphics 3000 GPU handles in hardware. Also, I am looking for a temporary solution that I can turn on for some minutes once in a while. I prefer not to have another service running in the background. Furthermore, I am not interested in virtual desktops, which allow moving windows to virtual screens.  Workarounds I tried to no avail: (actually unrelated to this question as those are non-hardware solutions)   : I am not able to change the vertical dimensions of the Chrome 40 window to  greater than those of the screen. Also, there are undesired side effects such as the  mini window scrolling out of sight when activating GiMeSpace. : When I resized Chrome 40 to 2000px height, which is larger than the height of my screen, it started misbehaving. Taking screenshots with Awesome Screenshot didn't work anymore, and content of tabs disappeared, even after resizing the window back to normal.

I want to run the Microsoft SDK Simulator on Windows 7 but it requires 1280 x 960 or greater, whereas I have just 1280 x 800 on my laptop. I remember when using Windows XP it give me a lot of choices between resolutions even though the resolution of the screen is so small. On Windows 7 it doesn't offer other resolutions bigger than the maximum, is there any workaround or software that allows higher resolution? This is a video I took using Windows XP, you can see that when the resolution exceeds the maximum, not the whole desktop is shown on the screen but once I hover on the sides the desktop moves to show the hidden sides.   Note that I am not using any software and I didn't do any hardware modification, this has always worked for me, not like what the answers mentioned.


Why does the T-1000 Terminator almost always go back to the same appearance of a policeman?  By often reusing the same face and body shape, it gives itself away. Sarah Connor and John Connor would learn to recognize that face and avoid it.  It could choose many other shapes and faces that Sarah and John never recognized. It saw, touched, or interacted with a bike gang member, employees at the steel foundry, other cops, a scientist, waitresses at the cafe, and a guard at the mental hospital. It could have used any of those. (Or maybe create a whole new face? Or mix and match features and clothes from different people it met.) Seems counter-productive to use the same face every time when it is tracking down Sarah and John at the steel foundry.  The out-of-universe explanation is that Robert Patrick played the villain and the producers wanted the same actor for most scenes in order to get a consistent  acting style for the T-1000. Is there an in-universe explanation?

T-1000 could morph into anyone's body. Then, what was the point of using the police officer's body all the time when the T-1000 was chasing our heroes? What was the point of notifying them that this is me? Couldn't he simply walk near John Connor as a homeless beggar and finish his task?


I'm facing such a bizarre behavior in Java(Android Studio). What I've been doing is populating an ArrayList of Strings with some data. Then instantiate an object using that ArrayList, the new object is then added to another ArrayList of the object type.  Here is the constructor of the class:      protected ArrayList<String> languages;     public Person(ArrayList<String> languages)     {         this.languages=languages;     }   Then in the Activity, I use two ArrayLists, one called languages and one called Persons. The languages ArrayList is passed to a new object added in Persons.  ArrayList<String> languages=new ArrayList<String>(); ArrayList<Person> Persons=new ArrayList<Person>();  protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main_layout);         .         .         .         .         .         .                 english=(CheckBox)findViewById(R.id.english);                 if(anglais.isChecked())                     languages.add(english.getText().toString());                 Persons.add(new Person(languages));                 Log.i("test: ",Persons.get(0).getLangues().get(0)); // Will show English                 languages.clear(); // Here I clear the languages ArrayList so I can add new languages for another person                 Log.i("test: ",Persons.get(0).getLangues().get(0)); // Produces an exception.             }         });     }   As you can see, I populate languages first, then populate Persons with a new object using languages. In order to add another person with different languages(for example) I must clear the languages ArrayList so I can re-use it.  To test what actually happens, I found out that the first Log will show the added langauge(notice that I am getting the language from Persons, and not languages). However, the second Log will produce an exception stating that the langauges array IN Person class is empty(cleared). What could be causing the clear function not to just clear the languages array, but also the languages array in Person class?

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


Rather self explanatory, but I was hoping to be able to quickly change input languages, without going up to the top and switching manually, rather with a keyboard input? Maybe I'm just too lazy, but I was wondering if this was possible?

I don't like to switch languages with ⌘ + space. Is there any way I can use more common keyboard combinations:    Control + Shift or Control + Opion or Caps Lock   I'd preferred the simplest solution possible. Can I just change some system settings instead of installing a software to solve this problem?


I am trying to run a Window software (.exe) but I couldn't figure it out. Please someone help me I would greatly appreciate your help.  I am trying to run this Window software on Ubuntu 16.04.  Link:     Thank you!

Can .exe and .msi files (Windows software) be installed in Ubuntu?


function create() {     $("

<input type='text' placeholder='Soru Gir...' class='form-control'/> &nbsp; &nbsp;<button class='btn btn-danger' onclick='remove()' >Sil</button>&nbsp; &nbsp;<button class='btn btn-success' onclick='createSelection()'>Şık Ekle</button>

").insertBefore("#btn") }  function remove() {$("#question").remove()}

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 understand the header file contains all the prototypes of every function contained in the implementation file; but what is the real purpose? Is it because when another program calls on the class, it only receives the information in the header file, and the implementation is kept hidden? What is the real purposes of this?

Why does C++ have header files and .cpp files?


In a , I encountered a usage of "which" that I didn't know about before:     < > <= >= Boolean less, greater, less than or equal, and greater than or equal. Each operator produces 1 if the condition is true, 0 otherwise. These operators may be applied to strings as well as numeric operands, in which case string comparison is used.        I don't understand what kind of which this is. I don't think it is a pronoun as I used to know e.g. in This is the book which you loved to have.

Sentence 1： I was told my work was unsatisfactory, at which point I submitted my resignation.  Sentence 2：Sometimes you may feel too frail to cope with things, in which case do them as soon as it is convenient.  I am confused with "which" in the above two sentences. Does it serve relative determiner, rather than relative pronoun? Does "which point" in the first sentence stand for "I was told my work was unsatisfactory"?Does "which case" in the second sentence stand for "sometimes you may feel too frail to cope with things"?  Thank you in advance!


How can we swing faster and faster without touching the ground? I mean, there's no external force on the swing + human system, right? Or is it because of gravity?  EDIT :  Another possibility : are we using the energy stored in our body (as food and everything) to increase the speed?

I feel this might be a FAQ but I would love a definitive answer.  Imagine a frictionless stationary idealised child's playground swing.  If you are sitting on the seat of the swing, is it possible in principle to set it into motion by simply moving your body and pulling on the chains of the swing? If so, is there a simple explanation for how you can change your center of mass without an external force acting on you?


Find the exact value of    $$\tan^{-1}\left(\frac{1}{2}\right)+\tan^{-1}\left(\frac{1}{5}\right)+\tan^{-1}\left(\frac{1}{8}\right)$$   How do you solve this problem? I don't know what trigonometric properties or identities may help with it.

What is the value of :   $$\arctan(1/2)+\arctan(1/5)+\arctan(1/8)?$$   I tried to do geometric solution::   Where in the angles we are looking for are shown, but I can't solve it.  Can we use it with this kind of approach? Can someone also post a solution using trigonometric identities?


I have recently upgraded my computer and bought new storages drives, I would like to know how can I re-use my existing Windows 10 Pro (Genuine) license key when installing Windows 10 on the new computer? Thanks.

I currently have Windows 10 installed on my desktop PC. Unfortunately,I don't have the activation code anymore. I upgraded from Windows 7 to Windows 10, so even if I still had the activation code it would be a Windows 7, not 10, activation code.  Now I need to reinstall the OS to a new HDD. I do not want to keep my data, I want to make a clean reinstallation.   Is there a way I can reinstall Windows 10 to a new drive while keeping it activated?


I want to select company id, date and number from table, but this query does not show the month some companies with 0 number.   Here is the query:  SELECT c.name, date_format(e.created, '%y_%m') AS date, count(*)  FROM company c JOIN edited e on c.id=e.company_id AND e.created >='2016-12-13 00:00:00' AND e.created <='2017-05-20 00:00:00' GROUP BY c.id, date   Some of results like this  4   16_12    2         4   17_01   4         4   17_04   2         4   17_05   2 without 17_03 (march). how can it show 17_03 with 0 ?

I'm building a quick csv from a mysql table with a query like:  select DATE(date),count(date) from table group by DATE(date) order by date asc;   and just dumping them to a file in perl over a:  while(my($date,$sum) = $sth->fetchrow) {     print CSV "$date,$sum\n" }   There are date gaps in the data, though:  | 2008-08-05 |           4 |  | 2008-08-07 |          23 |    I would like to pad the data to fill in the missing days with zero-count entries to end up with:  | 2008-08-05 |           4 |  | 2008-08-06 |           0 |  | 2008-08-07 |          23 |    I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.   Any genius ideas/slaps in the face for why me am being so dumb?    I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons:   I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed   The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers!


I want to virtualize a Mac (the latest, 10.9) on my Mac (MacBook Air). I prefer to use VirtualBox. After setting up the OS X guest, I need to provide a .iso file from which VirtualBox will install OS X. Where can I (legally) get such a .iso file? My Mac didn't come with installation media so I can't just create one from a disc.

I'm trying to install OS X Mavericks in VirtualBox on Windows 8.1. I have VirtualBox installed and the VM set up, but I need an ISO file to install the operating system.  I've searched around and found one result one a website I hadn't heard of, but Google Chrome flagged it as malware. I found a file on CNet, but it's an upgrade file for machines that are running an earlier version of OS X.  Is there an official source for downloading OS X ISO files? If not, is it possible to get the required ISO file without already having access to OS X?


we have the following file   cat  /tmp/hive.conf        "hive-exec-log4j2" : {         "tag" : "TOPOLOGY_RESOLVED",         "version" : 2       },       "hive-interactive-env" : {         "tag" : "TOPOLOGY_RESOLVED",         "version" : 2       },       "hive-interactive-site" : {         "tag" : "TOPOLOGY_RESOLVED",         "version" : 2       },       "hive-log4j" : {         "tag" : "TOPOLOGY_RESOLVED",         "version" : 2       },       "hive-log4j2" : {         "tag" : "TOPOLOGY_RESOLVED",         "version" : 2       },   we want to capture the line after match the "hive-log4j" from file  so we get that:  cat  /tmp/hive.conf |  awk  '/"hive-log4j"/{getline; print}'         "tag" : "TOPOLOGY_RESOLVED",   now we want to do the same with awk and export the variable as the following   val="hive-log4j"  cat  /tmp/hive.conf |  awk -v var=$val '/"var"/{getline; print}'    but no output   what is wrong with my syntax?

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


We must show that there exists some kind of $\alpha$ relation  $\alpha ⊆ X \times X$  which has these conditions :  if this relation is I and II type. I) symmetrical: if $∀x,x' ∈ X : (x, x') ∈ \alpha ⇒  (x', x) ∈ \alpha$ II) transitive: if $∀x, x', x'' ∈ \alpha : (x, x') ∈ \alpha (x',x'') ∈ \alpha ⇒ (x, x'') ∈ \alpha$  then there must be result of non-reflexivity for this $\alpha$ relation III) nonreflexive: if $∀x ∈ X : (x, x) $ $\notin \alpha$  Is there any kind of relation like this?

Definition: Given a set $X$, a relation $R$ on $X$ is any subset of $X\times X$.  A relation $R$ on $X$ is said to be  reflexive if $(x,x) \in R$ for all $x \in X$, irreflexive if $(x,x) \not\in R$ for all $x \in X$, transitive if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\in R$, intransitive (or antitransitive) if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\not\in R$, symmetric if $(x,y) \in R$ implies that $(y,x) \in R$, antisymmetric if $(x,y) \in R$ and $(y,x) \in R$ implies that $x=y$.   Given any combination of the properties listed above, is there a nontrivial (i.e. nonempty) relation which satisfies that combination of properties?


Then a string variable in Bash has * in it, it lists the current directory. Why and how to I include a * in a string?  I'm trying to make a script that creates a sql-statement in a variable and when I tried to add a * to the string it went all bananas and added all the names of all the files in the current directory instead of *.I have tried to escape the character but it has been futile so far. I managed to reproduce the somewhat unexpected behavior with some more basic code.  #!/bin/bash  test="select * from cars" echo $test   When running the code (./test.sh) above on my wm i get(which is the content of the current folder with select before and with cars after select Desktop dev.sh Documents Downloads elasticsearch-7.0.1-amd64.deb examples.desktop getgoogle.sh IdeaProjects java_error_in_IDEA_21052.log java_error_in_IDEA_3238.log kafka_2.12-2.2.0 kafka_2.12-2.2.0.tgz kafka-connect Music output.txt Pictures Public snap spark-2.4.1-bin-hadoop2.7 spark-2.4.1-bin-hadoop2.7.tgz Templates test.sh test.txt Untitled.ipynb Videos from cars  Now I'm definitely not a bash expert and the answer is probably obvious to an expert but I have no idea what cause is and how to proceed.   Best regards Olle

For example:  me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR   and using the \ escape character:  me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR   I'm obviously doing something stupid.  How do I get the output BAR * BAR?


$$ f(x)=\begin{cases} \frac{1}{q},&\text{if $x=\frac{p}{q}$, $x\in\mathbb{Q}$, with $p\in\mathbb{Z}$ and $q\in\mathbb{N}$ and $p$ with $q$ is coprime;}\\ 0,&\text{if $x\in\mathbb{R}\setminus \mathbb{Q}$;} \end{cases} $$  I want to proof continuous at all irrational numbers.   My steps:    I choose one irrational number $c\in\mathbb{R}\setminus \mathbb{Q}$ and look on his image $f(c) = 0$ I take an arbitrary $\epsilon > 0$ and $V_{\epsilon}(0) = V_{\epsilon}(f(c))$ -- open neighborhood of $0$ So for now, I want to create the open neighborhood $U_{\delta}(c)\subset \mathbb{R}$, for which true that $f(U_{\delta}(c))\subset V_{\epsilon}(f(c))$ Consider all such points $x$ around $c$, the image $f(x)$ of that is bigger that $\epsilon < f(x)$. So that points fall outside of $V_{\epsilon}(0)$. That is any $\frac{p}{q}$, $\frac{1}{q} \geq \epsilon$ $\Rightarrow$ $1\geq \epsilon q$ $\Rightarrow$ $\epsilon^{-1}\geq q$ that is $\frac{1}{\epsilon}\geq q$ $q$ bounded above by $\frac{1}{\epsilon}$ and $0$ below, because $q\in\mathbb{N}$  The set of $\{f(\frac{p}{q})\mid f(\frac{p}{q})\geq \epsilon\}$ is a finite set. And that if $0< q \leq \frac{1}{\epsilon}$ in $U_{\delta}(c)$ will be exist only finite number of rational numbers $\{\frac{p}{q} \mid p\in \mathbb{Z}, q\in\mathbb{N}, gcd(p,q) = 1\} = T$ So $T \cap U_{\delta}(c)$ -- finite. So we can find $\delta_T$ for which will be true, that $U_{\delta_T}(c) \cap T = \emptyset \Rightarrow f(U_{\delta_T}(c))\subset V_{\epsilon}(f(c))$.    All of these steps correct?

In :  $$ \begin{align} t(x) = \begin{cases} 0 & \text{if $x$ is irrational}\\ \frac{1}{n} & \text{if $x = \frac{m}{n}$ where $\gcd(m,n) = 1$} \end{cases} \end{align} $$  I can prove the discontinuity at rational $b$ by taking a sequence of irrationals $x_n$ which converge to $b$.   But while going through an argument for continuity at irrationals.  I found this in a book.      On the other hand if $b$ is an irrational number and $\epsilon > 0$   then there is a     natural number $n_0$ such that $1/n_0 < \epsilon$.   There are only finite number of rationals with denominator less than   $n_0$ in the interval $(b-1,b+1)$. Hence we can find a $\delta > 0$   such that $\delta$ neighbourhood of $b$ contains no rational with   denominator less than $n_0$.   I understand the rest of the proof. But I am unable to prove the emphasized text. Although I find it intuitive.


I bought the CD version of The Walking Dead and realized there is no CD key printed anywhere. I'd like to play it on Steam and earn achievements, so are the CD version and the Steam version different?

I personally do not like to purchase games digitally.  There's just something magical about going to the store, picking up a boxed game, staring at the amazing box art, bringing the game home and putting the disc in the drive.  That being said, I know that several game distribution companies are leaning more toward digital distribution, with[Steam holding a large chunk of that market.  Is it possible to buy a retail boxed copy of a game, but still get the benefits of Steam (automatic updates, install on multiple computers, etc.) ?


I am learning number theory and trying to understand how does below statement is true .  Show that no integer in the following sequence can be a perfect square: 99, 999, 9999, 99999, ...

For $9, 99, 999, 9999, 99999,\dots$, except $9$, are the rest of the numbers $9$'s perfect squares? Are there other perfect squares with all $9$'s.  This problem is given for K-12 students, which I have no idea how to do it.  Thank you.


I have to check if a listbox's SelectedIndex is at the last index from a BackgroundWorker, but since I'm checking the listbox (which is on the GUI thread) from the BackgroundWorker I get this error:      System.InvalidOperationException: 'Cross-thread operation not valid: Control 'listBox1' accessed from a thread other than the thread it was created on.'   This is my code:  if (listBox1.SelectedIndex == listBox1.Items.Count) { //code here }   How could I make this if statement work without being on the GUI thread?

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Having seen this question often on this platform, but never read a statisfying answer.

As I understand, the different voltage between two object is caused by the total different charged between two object. Thus, the higher extra electron between two opposite charged object, the higher voltage between them, isn't it? So if i have two battery or capacitor connect in parallel, the negative connect to negative, the positive connect to the positive. Caused the charge from each plate to be double. So that's as my expected, it must be double voltage, but ironically why it's out of my expected and the reality is vice-versa?


I cooked chicken last night and stored it in the fridge right after.  Today I brought in chicken in a glass container within my backpack and opened it 5 hours later. I put it in the microwave for 1 minute and 30 seconds and it still feels a bit cold.  Is it safe to consume?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


My character was lvl 19 on my account and yesterday when I tapped on the app, it brought me back to the original screen when you first start playing. I signed in which the same google account. Now every time I log in it's starts with the lvl 1 character. What can I do? How can i continue whit my lvl19 account...?

I downloaded the July 30th update for Pokemon Go and when I open the app I'm prompted to login, But once I login, it redirects me to this page on Cookies::     If I click "Done" in the top left, it prompts me to login again! I've tried reinstalling the game, restarting my phone, etc. I can't much enable Cookies on the inline Safari browser. It doesn't make sense, and cookies are on in Safari (because I don't use Safari and they're enabled by default).  How can I fix this?


The only knowledge I have on logic is due to a book I read a couple of years ago called  by Alfred Tarski. And in it he talks about free variables and sentences and quantifiers. But he never says what order logic he is talkig about or anything.  My question is this:  What is the difference between the two order logics and how can I tell if a statement is in one or the other.

describes the first-order vs. second-order logic as follows:     First-order logic uses only variables that range over individuals (elements of the domain of discourse); second-order logic has these variables as well as additional variables that range over sets of individuals.   It gives $\forall P\,\forall x (x \in P \lor x \notin P)$ as an SO-logic formula, which makes perfect sense to me.  However, in a , the poster claimed that $\forall x\forall y(x=y\leftrightarrow\forall z(z\in x\leftrightarrow z\in y))$ is an FO formula. I think this must not be the case, since in the above formula, $x$ and $y$ are sets of individuals, while $z$ is an individual (and therefore this must be an SO formula).  I mentioned this as a comment, but two users commented that ZF can be entirely described by FO logic, and therefore $\forall x\forall y(x=y\leftrightarrow\forall z(z\in x\leftrightarrow z\in y))$ is an FO formula.  I'm confused. Could someone explain this please?


Instead of 'III' (three 'I's), I want the numbers to look more like those in the attached image.  When using Computer Modern font, is it possible to just remove the horizontal space between letters?  a previous post worked around this by defining a new command using /makebox, but some of the dimensions used absolute length units and therefore is not a solution for different fonts, especially when you want to use this in subscripts or superscripts.

This question led to a new package:      (using a variation of egreg's code, and stating this in the manual; the package isn't really new now, sorry for the delayed announcement)  I have read about "How to get Roman numerals" but asked myself how to get Roman numerals formatted as in     i.e. with fitted over- and underline (without manually using boxes and such)? I'm curious for your answer(s)!


I was following the guide at:    I changed the BIOS to show the boot menu and selected the 14.04 installation USB drive.  Next, when prompted, I selected, "Try Ubuntu without installing"  This brings me to a screen displaying:   BusyBox v1.21.1 etc. finishing in a mount failure  failed: No such device  Can not mount /dev/loop0 (/cdrom/casper/filesystem.squashfs) on //filesystem.squashfs  Any ideas why Ubuntu will not run?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


There is a particular integral which comes up frequently in physics which a friend and I spent hours trying to figure out with no success. I don't know if this integral has a name so googling has been fruitless. Arfken states the solution in the back flap but I have no idea how to find it  $$\int_{-\infty}^{\infty}{\frac{e^{i\mathbf{k}^{.}\mathbf{r}}}{k^{2}+m^{2}}\frac{dk^{3}}{(2\pi)^{3}}}=\frac{e^{-mr}}{4\pi r}$$  Limits go from -inf to inf for all k. Note that k and r are vectors. Presumably r on the right hand side is $\lvert\mathbf{r}\rvert$ (I could be wrong).  If someone could show how this is derived or provide a link to its derivation it would be greatly appreciated.

Could someone point me to an online resource where I can look up  $$ \int_{-\infty}^\infty \int_{-\infty}^\infty \int_{-\infty}^\infty \frac{\cos(\vec k\cdot\vec x)}{\sqrt{|\vec k|^2+m^2}}\,dk_1\,dk_2\,dk_3$$  where $\vec k$ and $\vec x$ are 3-vectors, and $m$ is a constant.  Also, if you know how to do it step by step and want to show off your fancy integration, that would also be very helpful.  Thanks ;)


I try to parse something like this in regexp (js)  CODE some stuff which contains even linebreaks END  CODE anothEr block of code END   I want to get all between CODE and END That works with:  /CODE([^(?!END)]*)END/g   The problem is when there is E, N or D somewhere between CODE and END, that's because the second block won't be matched.  So the negative lookahead checks for E, or N or D and not the word "END".  Is there a way for negative lookahead for the whole Word "END" ?  martin

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


I'm aware that if I press esc followed by typing :q!, I can exit the vim editor, due to .  However, the standard convention is for programs to exit when ctrl + c is pressed, which sends a SIGINT to the currently running process.  For example, top, tail -f, and ping all follow this convention.  My question is this: Why doesn't vim follow this well-established convention? Is there a historical reason, or is it something else?  It seems to me that it would avoid a lot of confusion for new users if it followed this standard convention like everything else.  (While we're at it, why is it SIGINT and not SIGTERM in the first place?)

The program ed, a minimal text editor, cannot be exited by sending it an interrupt through using Ctrl-C, instead printing the error message "?" to the console.  Why doesn't ed just exit when it receives the interrupt?  Surely there's no reason why a cryptic error message is more useful here than just exiting.  This behavior leads many new users into the following sort of interaction:   $ ed hello ? help ? exit ? quit ? ^C ? ^C ? ? ? ^D $ su # rm -f /bin/ed    Such a tragic waste—easily avoidable if ed simply agreed to be interrupted.  Another stubborn program exhibiting similar behavior is less which also doesn't appear to have much reason to ignore C-c.  Why don't these programs just take a hint?


how can I do tu use netflix whith ubuntu 16.04 LTS? I think that I need a complement but I don't know how to install it

Is there a way to stream Netflix content to my Ubuntu machine?


Objective : Merge the contents of two files using common key present in the files   file1.txt  =========  key1   11  key2   12  key3   13   file2.txt ========= key2   22 key3   23 key4   24 key5   25   Expected Output : ================== key1   11 key2   12    22 key3   13    23  key4   24 key5   25   Approaches   join command  JOIN -a 1 -a 2 file1.txt file2.txt ## full outer join awk (as suggested in : )  awk 'FNR==NR{a[$1]=$2;next;}{ print $0, a[$1]}' 2.txt 1.txt   Approach 2 is resulting in right outer join and NOT full outer join      key1  11     key2  12    22     key3  13    23    Questions :   What needs to be modified in approach 2 which will result in full outer join ? Which would be the better approach (#1 or #2) when we have lot of key-value pairs in files (read files in GB/TB) keeping performance in view ?   Any inputs/ thoughts on the above questions is much appreciated. Many Thanks.

Objective: Merge the contents of two files using common key present in the files   file1.txt  =========  key1   11  key2   12  key3   13    file2.txt  =========  key2   22  key3   23  key4   24  key5   25    Expected Output :  ==================  key1   11  key2   12    22  key3   13    23   key4   24  key5   25   Approaches tried:   join command:  join -a 1 -a 2 file1.txt file2.txt ## full outer join  awk:  awk 'FNR==NR{a[$1]=$2;next;}{ print $0, a[$1]}' 2.txt 1.txt    Approach 2 is resulting in a right outer join and NOT a full outer join:     key1  11    key2  12    22    key3  13    23    What needs to be modified in approach 2 to result in a full outer join?


Please recommend a textbook in algebraic geometry for a beginner. I will be doing algebraic geometry for the first time.

What are the best algebraic geometry textbooks for undergraduate students?


I've got the following problem: I had a ssd (sda) with windows 8 installed. Now I added another ssd (sdb) and installed ubuntu 14.10 on it, but I didn't create a efi partition and installed to sda. So after the installation completed, I could only start ubuntu. After that I tried to reinstall ubuntu with the boot manager installed to an efi partition on sdb, but this failed and now i can't boot in any system. So my question is, how can I restore the windows installation/bootloader.  Thank you in advance

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


guest-kpjg0a:x:999:999:Guest:/tmp/guest-kpjg0a:/bin/bash   I have checked /etc/passwd, then here it is. Am I hacked? Yes, I am hacked.

After I saw , I realized that there are many guest accounts on my system:  grep guest /etc/passwd guest-jzXeRx:x:117:127:Guest,,,:/tmp/guest-jzXeRx:/bin/false guest-l5dAPU:x:118:128:Guest,,,:/tmp/guest-l5dAPU:/bin/false guest-FdSAkw:x:119:129:Guest,,,:/tmp/guest-FdSAkw:/bin/false guest-eBU0cU:x:121:131:Guest,,,:/tmp/guest-eBU0cU:/bin/false   Moreover, in this moment there is nobody logged as guest, but if somebody will login as guest, a new guest account is created - why, since there are already other guest accounts? After the new guest will log out, his account will be deleted. But why the other guest accounts remain? For what use/purpose?  It doesn't mind me at all this guest account, but I want to know if it is okay to delete them manually.


In the epilogue of Deathly Hallows, when Harry’s son expresses trepidation about being sorted into Slytherin, Harry says:     “Albus Severus, you were named for two headmasters of Hogwarts. One of   them was a Slytherin and he was probably the bravest man I ever knew.”     Bravery is the trait typically associated with Gryffindor.   If Snape was so brave, why was he sorted into Slytherin instead?

Well, I have come to understand persons with the following traits will be usually be Sorted to Slytherin   Resourcefulness  Cunning Ambition Leadership Qualities Self-Preservation Determination  Cleverness Fraternity  Power   On which trait(s) was Snape Sorted into Slytherin?  One more point: Lily Evans was Sorted before Snape, and when she was placed in Gryffindor, obviously Snape wanted to be in Gryffindor too, because Lily is his only friend.   So why is he Sorted into Slytherin? Is there a stronger reason for the Sorting Hat to override his preference and Sort him into Slytherin?


I basically have a bash script which executes 5 commands in a row. I want to add a logic which asks me "Do you want to execute command A" and if I say YES, the command is executed, else the script jumps to another line and I see the prompt "Do you want to execute command B".   The script is very simple and looks like this  echo "Running A" commandA & sleep 2s; echo "done!"  echo "Running B" commandB & sleep 2s; echo "done!" ...

I want to pause input in a shell script, and prompt the user for choices. The standard Yes, No, or Cancel type question. How do I accomplish this in a typical bash prompt?


I'm solving a problem described in English and because I didn't learn to code in English, it's difficult for me to understand what the guide want me to do. I'll be appreciated if anyone would like to explain for me. The full question is . My question is if the list maintained in the question is the LIST in Python. If so, the created class seems useless. How can I use the overridden ==?(literally I don't know which two should be compared in this case) I don't know what to do next. Here's what I've done.      def __init__(self,fn,ln,num):         self.firstName=fn         self.lastName=ln         self.idnumber= num               def insert(self):         newfirstname=input('First Name: ')         newlastname=input('Last Name: ')         newidnumber=input('ID Number: ')         personnew=Person(newfirstname,newlastname,newidnumber)         persons.append(personnew)     # def __eq__():         # def __greater__():         # def str():                     filepath=input('the path of the file is:') n=input('how many lines are required:') n=int(n)  persons=[] f=open(filepath,'r')  for i in range(n):     print(f.readline())     person=Person(f.readline().split()[0],f.readline().split()[1],f.readline().split()[2])     persons.append(person)   When I input n=2, the output is not the first and  the second line. Looking forward to someone to help and thank you in advance.

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


1. var a = {              arr:[],               method:function method(){                      console.log(this.arr)} //this is undefined              } 2. var a = arr:[],               method:function(){                      console.log(this.arr)} //this gives a              }   Can somebody explain me why this context gets lost in the first example?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


On click of a button, the jquery gets the id of the button which is clicked. I want to copy the same id in clipboard to paste it somewhere. Here is the code:  $("#datatable-buttons").on("click",":button",function(e){ var id = $(this).attr('id');   Now I need the variable id to be copied to clipboard. How to do that?

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


A: "Cablegram for Mr.Smith"  B: "I am him."  B: "I mean, I am he."  Why the correction? What difference does it make?  Similarly: "I am not her" / "I am not she"?

Upon answering the telephone, the person calling asks if Joan is available. If Joan is the person who answered the phone, should she say "This is her" or "This is she"?


Lets say I have a factor called cognitive load that has 3 levels (low, medium, high) and I want to determine how load levels can affect reaction time on some task  There are at least 2 ways that I could conduct this test.  The first would be a one way ANOVA with a single 3 level factor. After running this test I find that the main effect of this factor is not significant. I was always taught that without a significant main effect you shouldn't/dont need to test the differences between each of the groups/levels  The second way is to dummy code the factor and treat it as a regression, predicting reaction time from the 2 generated dummy variables. If I treat low load as my reference group, then my dummy variables would capture the difference between low/medium and low/high. When I conduct this analysis I find that one of my coefficients is significant (e.g. high is significantly different from low load)  So this situation leads to 2 different interpretations of the results. On the one hand I dont have a significant effect of the factor overall, but upon looking at group differences with regression I find something interesting  Which technique should actually be followed? Should I be looking at group differences in ANOVA despite the lack of a significant main effect?

Like, I don't get it. In regression, we say  $$Y_i = a + bX_i + \epsilon$$ where $X_i$ is just a real number for each observation $i$,  and in analysis of variance with two groups, we say $$Y_i = a + bX_i + \epsilon$$ where $X_i$ is again just a real number, but this time either 0 (group 1) or 1 (group 2), so a is mean of group 1, and a+b is mean of group 2.  But despite the interpretation, the model is exactly the same. So why do people split it up into regression and anova? the model is the same?


Which one is correct? Even more happy or even happier?  P.S.: My question has more to do with the combination of the word "happy" with the word "even", on the context above.

Which one of these adjectives is correct? I can see that both of them are being used, I'm just not sure which one is grammatically correct. Are there any general rules to follow as to the use of one against the use of the other?


I know that if $f(x)$  is irreducible then $\langle f(x) \rangle$ is a prime ideal. Then I thought: is it maximal?  Then I search about it, I find that it is not maximal ideal but cannot find any proof.    Any help is appreciated. Thanks.

Let $f$ be a nonconstant element of ring $\mathbb Z[x]$. Prove that $\langle f \rangle$ is not maximal in $\mathbb Z[x]$.   Let us assume $\langle f \rangle$ is maximal. Then $\mathbb Z[x] / \langle f \rangle$ would be a field. Let $a \in \mathbb{Z}$. Then $a + \langle f \rangle$ is a nonzero element of this field, hence a unit. Let $g + \langle f \rangle$ be its inverse. Then $a g - 1 \in \langle f \rangle$, hence $ag(x)-1 = f(x)h(x)$ for some $h \in Z[x]$, hence $ag(0) + f(0)h(0) = 1$, thus $(a,f(0))=1$ for all $a \in \Bbb Z$, contradiction, hence the proof.  Is my argument correct? Is there any other method?


I'm writing this code where I'm calling a method to act on an element in an array of objects, and to do this I first need to check if the element is null. I am doing this using if(array[x][y]!=null), but I get a NPE pointing to this line and I don't understand why.  Here's the code in question:  Method to check:      public void addPiece(Piece p, int x, int y){//Method to add a piece to a given space on the board      if(gboard[x][y]!=null)//Check to see if space is empty before adding piece          System.out.println("Error: Board space already occupied. Please choose another space.");      else{          gboard[x][y]=p;          gboard[x][y].setXpos(x);          gboard[x][y].setYpos(y);      } }           Main method where it is being called:      public class PracticeMoves {//Demo method  public static void main(String[] args) {       Scanner kb=new Scanner(System.in);      Board board=new Board();      Piece p1=new Piece("Droid","Blue", 0, 0);      board.addPiece(p1,3,5);   Class where gboard is created:      public class Board {  private Piece[][] gboard;//initialize a 2D array of Piece objects to form the gameboard  public Board() {//no-args constructor to initialize gboard      Piece[][] gboard=new Piece[8][8];    }   Class for the piece object:      public class Piece {//abstract class that the rest of the pieces inherit from private String name; private String colour; private int xpos; private int ypos; public Piece(String n, String c, int x, int y){     name=n;     colour=c;     xpos=x;     ypos=y; } public String getName() {//getter and setter methods     return name; } public void setName(String name) {     this.name = name; } public String getColour() {     return colour; } public void setColour(String colour) {     this.colour = colour; } public int getXpos() {     return xpos; } public void setXpos(int xpos) {     this.xpos = xpos; } public int getYpos() {     return ypos; } public void setYpos(int ypos) {     this.ypos = ypos; } public String toString() {//toString method     return name+colour; }   }  Any help would be much appreciated. If there is any other part of the code you might need to see please let me know.  Thanks.  EDIT: Since this is being marked as a duplicate, I want to point out the the question I was referred to is asking what a NPE is. I know what it is, and I'm posting this here because I have no idea why one should appear here. Every question I can find similar to this is, the answers say that there shouldn't be an NPE and when they run it themselves no such error is detected. I just want to find out why I am getting this error, as it seems like there should be no reason for it.

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 already tried:   Commenting out exec NetworkManager in /etc/init/network-manager.conf. echo "manual" | sudo tee /etc/init/network-manager.override   However, ps aux | grep NetworkManager always shows that it is running after doing the above and rebooting.  Is my only option here to uninstall NetworkManager?

I want to disable NetworkManager entirely, and have my eth0 and wifi connections unmanaged.  My eth0 on my main linux box is unmanaged and I have no issues with it, I want to do the same to my other linux boxes all running Ubuntu 12.04 LTS, basically I want to kill Network Manager and never see any trace of it again.


As I go through multiples files, I want grep to print the filename of the first match.  For example:  grep -nHC 2 "show reload" wgltva-811sono1-dc*   Right now, I am searching for a string in multiple files, but I get the filename everytime.  wgltva-811sono1-dc0-sw.show.tech.txt-1249-abc wgltva-811sono1-dc0:------------- show reload  wgltva-811sono1-dc0-sw.show.tech.txt-1251-abc -- -- wgltva-811sono1-dc0-sw.show.tech.txt-1333-abc wgltva-811sono1-dc0-sw.show.tech.txt:1334:------------- show reload cause history ------------- wgltva-811sono1-dc0-sw.show.tech.txt-1335-abc -- -- wgltva-811sono1-dc1-sw.show.tech.txt-1249-abc wgltva-811sono1-dc1-sw.show.tech.txt:1250:------------- show reload cause full ------------- wgltva-811sono1-dc1-sw.show.tech.txt-1251-abc -- -- wgltva-811sono1-dc1-sw.show.tech.txt-1331-abc wgltva-811sono1-dc1-sw.show.tech.txt:1332:------------- show reload cause history ------------- wgltva-811sono1-dc1-sw.show.tech.txt-1333-abc   What I would like is the following: Display the filename once and display one line before and one line after the match.  **wgltva-811sono1-dc0-sw.show.tech.txt-1249-** abc ------------- show reload cause full ------------- abc -- -- **wgltva-811sono1-dc0-sw.show.tech.txt-1333-** abc ------------- show reload cause history ------------- abc -- -- **wgltva-811sono1-dc1-sw.show.tech.txt-1249-** abc ------------- show reload cause full ------------- abc -- -- **wgltva-811sono1-dc1-sw.show.tech.txt-1331-** abc ------------- show reload cause history ------------- abc   I would like to know some suggestion on how to do this. I would prefer not to do any linux scripting, as I am a beginner. However, if that is the only solution, I am all for it.

I am greping a string from multiple files, but the one undesired side effect, is the filename prefacing the output. How can I suppress the filename outputs using only grep?      $ grep -i lp lpNet*      lpNet:This was printed via the internet using the lp command.     lpNet:I believe lp doesnt care what the device is.      lpNet1:This was printed via the internet using the lp command.     lpNet1:I believe lp doesnt care what the device is.      lpNet2:This was printed via the internet using the lp command.     lpNet2:I believe lp doesnt care what the device is.      lpNet3:This was printed via the internet using the lp command.     lpNet3:I believe lp doesnt care what the device is.    I have solved the issue for now using cat lpNet* | grep lp  I am just wondering if there is a more efficient path to have the same effect


Perhaps this is a silly question. I got several Underfull \vbox (badness 10000) in my document, and to find the reason, I simplified the code all the way to \documentclass{book} \usepackage{geometry} \linespread{1.25} \usepackage{blindtext} \begin{document} \blindtext[10] \end{document}  And the problem remains: Underfull \vbox (badness 10000) has occurred while \output is active [1] [2]  Is there any way to solve this?

I'm using the documentclass article with the option twoside in order to customize the header and the footer for even and odd pages with the fancyhdr package. The compilation works, but the problem is that the output panel gives me the following badbox:  Underfull \vbox (badness 10000) has occurred while \output is active   I think the problem is due to the use of the geometry package, but I don't know how to solve it. What does it mean and how can I get rid of it? This is my preamble:  \documentclass[10pt,twoside]{article} \usepackage[papersize={120mm,195mm},top=2.7cm,bottom=2.7cm,right=1.3cm,left=1.3cm]{geometry}%left1.6 \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[polutonikogreek,italian,english]{babel} \usepackage[italian]{varioref} \usepackage{fancyhdr}  \pagestyle{fancy} \fancyhf{} \fancyhead[CO]{Titolo} \fancyhead[CE]{Autore} \cfoot{\thepage} \renewcommand{\headrulewidth}{0pt}


Please have patience with me as I am very confused about all of this and feeling a bit overwhelmed.  I am about to leave for a year around the world trip (including mostly Europe, South America, Africa and Asia) and I am wanting to have a debit card that will work "wherever" I go.  I am understanding that a "chip and pin" card is needed in Europe. I would like to find a local bank (I am based out of Olympia, WA) that can offer this feature to me. I am also looking for an account that has no foreign transaction fees and no ATM fee charge coming from their end. I know I have to expect to pay for the local ATM fee, of course. And I have found accounts that have these features, but do not feature a chip.  I am also seeing now that most chip enabled cards in the US are "chip and signature" which is also confusing to me.  Can someone please explain in a simple way all of this to me? and maybe help me find a suitable card? I would be very grateful.

I will be traveling the world over the next 1.5 years: mostly Europe, but some Middle East, South America, Africa and Asia.  I am looking to switch to a US based bank that can provide me with a debit card that has:   No international ATM fees/reimbursement Mobile check deposit No monthly fee Pin & chip? I am seeing references of this, unsure of what it is, but seems important?


Is there some kind of automatic test to check for best practice according to some sort of style guide in LaTeX, or will there be any in near future? For python we have , , , and whatnot, which helps a great deal.  I know there are a lot of paper, like the  and the , and talks out there, like the one by . Also several questions have been asked on stackoverflow, but no one asked for some kind of automation, which could help shape our LaTeX code, especially when I think of collaborative work on github or .

Is there something like indent for LaTeX? I have a collaborator that is using Scientific Workplace and the code it produces is totally messed up; I know I shouldn't expect miracles, but any machine support would be useful.  EDIT: This question is quite undefined without my comment to KeithB's answer; the idea is to save VC-friendly one sentence/one paragraph per text file line structure which SWT "fixes" by wrapping everything into fixed column width format.