I am trying to find number of runs of a script but its always 2 even though only one running.  sh 11.sh 1  11.sh already running,exiting..   here is code.  ps -ef | grep -v grep | grep -c "$0" if [[ `ps -ef | grep -v grep | grep -c "$0"` -gt "1" ]]; then             `echo " $0 already running,exiting.."` fi

When I  search for some process that doesn't exist, e.g.  $ ps aux | grep fnord                           wayne    15745  0.0  0.0  13580   928 pts/6    S+   03:58   0:00 grep fnord   Obviously I don't care about grep - that makes as much sense as searching for the ps process!  How can I prevent grep from showing up in the results?


I use "disqus" as the commenting platform on my website. There is quite a bit of SEO relevance for the comment content but since its generated through JAVASCRIPT. I can't get the best of it. Can I use cloaking as a technique so that I can display the disqus comments in a div when the googlebot is fetching it and when use the regular JS from disqus for its better user experience when a user is ....

I am building a website and am trying to decide between writing my own commenting system and using Disqus.  One of the main deciding factors is that (obviously), I want comments left on my page to be show on SERPS. However, I remember reading somewhere that Disqus loads comments into a page using AJAX - and therefore the comments are "invisible" as far as Googlebot and other SE crawlers are concerned. Could someone confirm or refute this?  The other question I have is about whether (as a commenter), When I place a comment on another website using Disqus (including any links I may add to my comment), do the links in my comment count as a back link (in other words are they "dofollow" or "nofollow" links)?


I've created a sub-theme of the Drupal 8 Bootstrap base theme. My problem is that I'm using a customized version of the Bootstrap CSS Framework that does not include Glyphicons. Instead of Glyphicons, my project is using fontAwesome icons.  What I've realized though, is that the Bootstrap theme uses a Glyphicon Search Icon for the Search Form. Since I'm not using glyphicons and the CSS files are not included, I get a search form button that looks like this.        It should appear like this.        If i inspect the HTML markup using my browser, my theory is correct.  <button type="submit" value="Search" class="button js-form-submit form-submit btn-primary btn icon-only" name="">Search</button>   if I change the following markup, the button shows up correctly because it can find the icon.    to    What I want to do is to be able to change the icon or the code in the base theme that generates this snippet of code.      My assumption is that I should use a preprocess function to alter the form block and output/replace the Glyphicon span with the Fontawesome span.  I believe that the input--button.html.twig in the bootstrap base theme is responsible for outputting the icon classes because of this code.  {% block input %}     {% if icon_only %}       <button{{ attributes.addClass(classes, 'icon-only') }}>         {{ label }}         {{ icon }}       </button>     {% else %}       {% if icon_position == 'after' %}         <button{{ attributes.addClass(classes) }}>{{ label }}{{ icon }}</button>{{ children }}       {% else %}         <button{{ attributes.addClass(classes) }}>{{ icon }}{{ label }}</button>{{ children }}       {% endif %}     {% endif %}     {{ children }}   {% endblock %}   Apparently, it is used to alter the button of many elements instead of only the search form.

I would like to replace the search submit button with a Font Awesome character like the Magnifier (Search Icon) character, and put Search the site inside the search box.  How can I achieve something like this?


From time to time I have untracked files in my git repository and I'd like to delete them.  Is there an easy way to do so using git or bash or even another way?

How do you delete untracked local files from your current working tree?


Since there are no drive letters in Ubuntu, where do you put a document you want as link on your Apache website on Ubuntu?   For example, you install Apache2 on Ubuntu Server, you go to /var/www/html/index.html to create your website. On your website you have an option for Contacts and About us which you want to be clickable. Where do you put the document to link to this option?

I recently installed Ubuntu 14.04, then I installed lamp-server and placed my webpages in /var/www directory, but when I opened localhost in the browser there was nothing. I think that happened because Zend updated Apache.  Whatever the reason may be, I want to know where to keep my php files so that I can access them from my browser.


An native English speaker said the correct grammar should be ... 'she speak,' rather than ...'she speaks.' What is the grammar rule?

Possible Duplicate:          Given the sentence     John brings his lunch to school,   is it correct to say     It is important that John brings his lunch to school   (using the third person singular present form of bring), or     It is important that John bring his lunch to school   (using the infinitive form of bring)?  [Edit: The answers indicate that this is actually the subjunctive form, not infinitive.]  I have been told that the infinitive form is correct, but if this is correct I would like an explanation. It doesn't seem like adding it is important should modify the tense of the rest of the sentence.


MBP 2015 13, 10.12.2  I want to use an external display via HDMI and turn off my Macbook Pro's display. How can I do it?  Update  There is another question: , but I don't think this one should be marked as duplicate.   Its 2017 now and the old question has answers from 2011-2014.  The other thing is - that the old question has also links to other answers and solutions. With this question we have answer with 2 variations of how to do it in one place.

I went through a , but the answer was informing how to hide the monitor, but not how to disable it. I do not want any new windows to creep into the laptop display when the external display is connected. I could not find any in the Display Settings (under System Preferences). I don't want to close the lid because I think it impacts the air flow of the MacBook Pro. I don't want to close the lid because the sound quality is reduced.


what size tire can install on my bike? I have hybrid bike (gary fisher Tiburon 2006).  It has 700x35C tires on it or if you want to call it 37x622.  I want to install the widest tire possible to ride on semi rough trail. Today I received my new tires 700x42c but I wasn't impressed with the unnoticeable added width of 7mm as if there is no difference in size.   I have lots of clearance on all the relevant tires and frame to accommodate wider tires. I have about 3/4" on both sides of the front forks and rear frame. Also enough space between the brakes holder and rim. I checked with a bike shop and they advised me that I have enough room for much wider tires.  Please advise the widest tire size I can install on my wheels.

We are planning on doing some mountain biking in a few weeks time and we'd like to get some wider tyres for my wife's hybrid. I know there are similar questions and answers out there on this topic, but I need some specific help to make sure I buy the right tyres.  The bike is a Ladies Scott Sportster 50 2015, the best website I could find with a fairly accurate spec is     It's currently got Kenda K-180 700 x 38c / 30TPI tyres on it, which are fairly good all rounders and capable of running on clean forest paths but I don't think they would handle anything heavier.  It's got disk brakes so there isn't a clearance issue there, but I have noticed the frame is generally narrower than true MTBs, here are some photos i took of it.    Has anyone put larger, knobblier tyres on this kind of hybrid? whats the largest I can get away with? - I'm also slightly confused by all the tyre sizing, I'm sure someone told me this is a 27.5" tyre, but 700 seems to mean 29" on a lot of websites.  Any advice is very much appreciated, Thanks.


I have a Euro cylinder lock like below and it has got rather sticky - the key turn isn't as smooth as other locks.    Does anyone know how to lubricate it to make it less sticky? I've read about graphite powder for other lock types, but are they suitable for Euro cylinder locks as well?  Any help appreciated.

I recently made the Yale lock on my front door much easier to open by spraying some WD-40 in there.  However, I just saw  on WD-40 not being a “true” lubricant, and wondered whether it was appropriate to use on Yale locks?


Here is a sample input: "\\u0434\\u0430\\u043C\\u043E" and i want to convert this into readable text. I will appreciate if it can still have the accent characters too. The input can be actually longer than this but this can be used as a sample.  Yes i saw () and () but it doesn't answer my question so please don't label this as duplicate. I would appreciate to get a sample code in C#. I also tried HttpUtility.HtmlDecode() too but it doesn't actually decode it. Here is the code:  //this is coming from service call and its comming just like this. var str="\\u0434\\u0430\\u043C\\u043E";  var decoded = HttpUtility.HtmlDecode(str); // this doesn't work. Its returning the string str as is.   As a side note: the following will work. But my input isn't in that shape.  //Although my input isn't in the following form, the following works. But my input isn't in this form. var str2="\u0434\u0430\u043C\u043E"; var decoded = HttpUtility.HtmlDecode(str2);   How can i correctly decode a string like ""\u0434\u0430\u043C\u043E" to readable text.

I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?


We have a set $S$ of $2N$ distinct elements. I want to partition it into $N$ parts each containing 2 elements. My motivation is partitioning a group of people into pairs.     What is the formula that gives the number of different partitions of $S$?   I prefer closed-form formula. If no such formula exists then asymptotic growth rate is fine.  EDIT: I received several answers. The formula seems hard to calculate. Hence, I am also interested in an accurate Stirling approximation of the formula.  I got this Stirling approximation: $\sqrt 2 (2N/e)^N$. Is this the most accurate approximation?

I know that the partition of $2n$ items into $n$ pairs has something to do with double factorial, but I am not sure how many possibilities we exactly have.   We can choose such a partition into pairs by first choosing $n$ elements to be in one half and the remaining $n$ in the other half, which gives ${{2n} \choose n}$ possibilities. Then we can take a permutation of both sets and match them accordingly.   This gives $${{2n} \choose n} n! n!=\frac{(2n)! n! n!}{n! n!}=(2n)!$$ possibilities. But with this we overcount, since we do not want the pairs to be ordered. Each of the $n$ pairs is counted twice, wherefore we have to divide by 2 for every pair, hence $\frac{(2n)!}{2^n}$?   Well, another possiblity to do that is just to iteratively pick $2$ elements among the remaining ones, which gives ${{2n} \choose 2} {{2n-2} \choose 2} \dotsb {4 \choose 2}$  I am not sure, but I do not think that this is the same and also, I do not see the connection to double factorial. Would be very glad if you could help me with these 3 possiblities.   Thank you.


Would it be possible to create a spoke like (think old cart wheels) structure with a 21 foot radius with a small chamber in the middle for a floating disk, that will hold itself together and is light enough for the disk to hold along with a passenger? Wondering because in a campaign I play a wizard and if it is possible could use my spell slots of all levels to essentially fly, or at least hover. I know that it is possible to move in this way purely on the spells rules, but am more wondering if this specific structure would work so that it is also steerable. ( answers if it could move, but I am asking if this specific structure would move and be steerable)

So Tenser's floating disc "follows you so that it remains within 20 ft" if you are more than 20 ft away.  So let's get a bit of carpentry skill together, and (whilst keeping the total weight under 500-1000 pounds) rigging up a cart that is 25 feet long. The underside of the carriage is 3 ft tall, and the wheels are 3 ft diameter.  The wizard casts Tenser's Floating Disc, and the party's barbarian picks up the carriage, and puts the rear end on top of the floating disc (let's strap it in with some ropes for good measure).  The wizard then climbs on the carriage, and moves towards the front.  As soon as he gets > 20 feet away, what happens? What speed does the happening occur at?  Bonus question: Assuming the above answer is that the carriage moves, at a high enough speed to be useful, any ideas how to steer such a device other than the wizard moving back within 20 feet to stop it and turning it manually like a peasant?  To alleviate concerns that the carriage is an obstacle to the disc, an alternate construction could instead use a 50 ft plank, not touching the ground, with the disk in the middle, the wizard at the front and an equal weight counter balance on the other end. That way, the disk is carrying things, but it not touching anything other than the things it is carrying.


Suppose we have the following circuit:  If voltage is work done per unit charge, why voltage is same across each resistor if the charge has to do more work in resistor R2 than in resistor R1?

Why does voltage remains same over parallel circuit. If a resistor is connected in the circuit some of the charge should be transformed into heat and make a lack of charge after the resistor (in my sense). So, what's the reason in it?


Is there a term for someone who gets all excited about a new undertaking and is wildly enthusiastic and full of promises until she realizes how much work is involved...whereupon she loses all interest? The intense burst of energy and commitment is very quickly extinguished.

I have googled but didn't find. "A person who gets interested in anything very quickly and loses interest in it sooner." What is such a person called?


What is the largest wavelength of electromagnetic radiation that can produce quantum effects that we can detect? Radio, microwave?  What are the constraints to measure photons of larger wavelengths?  Edit: I'm not looking for radiation you can measure with an antenna. But measured with an system that may measure a single photon at a time.

says that a photon of  to $10^{-62}$ kg has been detected:     10×10−62 kg   Mass equivalent of the energy of the lightest photon   detected [citation needed]   This equates ($mc^2=E=hf=h\frac{c}{\lambda}$) to a wavelength of $\lambda=2.2\times 10^{20}$ m (roughly a million ly)! Can anyone provide a citation for this measurement? And how can such a large wavelength/low energy photon be detected?  Edit  Apart from the quotation (true/false un/reliable un/documented ....), I'd like to learn about the lightest photon detected, or about the instrumental limit: what is the lower limit of energy that can be registerd by an intrument (or the greatest wavelength), and how it is done? For example, can you detect a radiowave of 1 Hz?


I have two doubts:  If X and Y are independent then PDF of X/Y is simply PDF of X(by independence) I don't know where am I interpreting wrong, Please correct me. How X/Y and X/|Y| are identically distributed by the symmetry of the standard Normal distribution Even if so How could we say that P(X/Y <= t) = P(X/|Y| <= t). Thank you for your valuable time... :)

I am reading an article in which the author states that given two i.i.d random variables $X,Y\sim\mathcal{N}(0,1)$, we have $\mathbb{P}(\frac{X}{Y}\le t)=\mathbb{P}(\frac{X}{|Y|}\le t)$ since the random varaibles $\frac{X}{Y}$ and $\frac{X}{|Y|}$ are identically distributed by the symmetry of the standard normal distribution.  But I don't really understand why the random variables $\frac{X}{Y}$ and $\frac{X}{|Y|}$ are identically distributed. Can you provide a reason for why these two random variables are identically distributed?


I used to have names of most used contacts to the left of all my emails.  Now it's gone.  All I had to do is click on a name and I could then compose an email to them. How do I get that list back?

My contact list and chatbox has suddenly disappeared from the left hand side of Googlemail. It has disappeared on both my desktop and laptop computers.  Chat is on, browser is good, black box at bottom checked...still nothing.


Each time I have Purchased an airplane ticket (specifically, using a travel agent, though I'm not sure every  time was through one) the bottom of the email confirms of my ticket that I receive says something to the effect of "please make sure to re-confrim 72 hours before departure ".  I have always wondered, with whom do I confirm? How do I confirm? What am I confirming?  Never have I re-confirmed and I have yet to run into issues....

I have never personally had to reconfirm the ticket, but have read that in some case you can lose a place on a flight, even if you paid for it!  Where does the idea of ticket reconfirmation comes from? How to find out that you are required to reconfirm the ticket? Does it only applies to agencies of also to bookings made via website? Can an agent reconfirm your ticket already at the time of purchase?


I've DG-WN3300N wireless adapter. I am using Ubuntu 18.04.2 LTS  Please tell me how to :    1) download drivers 2) install drivers 3) setup wireless adapter.    After running "lsusb", this is the output :  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   Bus 002 Device 004: ID 0b05:7774 ASUSTek Computer, Inc.    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)   Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   Bus 001 Device 002: ID 0bda:818b Realtek Semiconductor Corp.    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub   Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub   Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I recently purchased  DWA 131 adapter. Its not working on ubuntu. I upgraded to 15.10 hoping that it would work ... but no link ..  Please help.   lsusb output is :   Bus 001 Device 002: ID 2001:3319 D-Link Corp.   dmesg output is :   [  691.728363] usb 1-3: new high-speed USB device number 2 using xhci_hcd [  691.856817] usb 1-3: New USB device found, idVendor=2001, idProduct=3319 [  691.856822] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [  691.856825] usb 1-3: Product: Wireless N Nano USB Adapter [  691.856827] usb 1-3: Manufacturer: Realtek [  691.856829] usb 1-3: SerialNumber: 00e04c000001


Basically I have an overdetermined linear system of equations Ax=b, I can use numpy.linalg.lstsq to obtain the least square solution to this latter. However, when I multiply both sides of the equation by a weight diagonal matrix F, the least square solution is different while the equations are technically not. Here is a minimal example:  $A=\begin{bmatrix}1&2&3\\1&3&6\\1&6&2\\1&4&5\end{bmatrix}$ $b=\begin{bmatrix}1\\2\\3\\4\end{bmatrix}$ $F=\begin{bmatrix}0.1&0&0&0\\0&1&0&0\\0&0&10&0\\0&0&0&2\end{bmatrix}$  The solution given of numpy.linalg.lstsq to Ax=b is $x=\begin{bmatrix}-1.56643\\0.685315\\0.374126\end{bmatrix}$  The solution given of numpy.linalg.lstsq to FAx=Fb is $x=\begin{bmatrix}-21.46375975\\3.27144095\\2.41928963\end{bmatrix}$  I though about the equations having different weights in the least square, leading to a different solution chosen by the algorithm, but I am not sure if this is the correct reasoning.  The code:  from numpy import array, diag, dot from numpy.linalg import lstsq  A = array([[1, 2, 3], [1, 3, 6], [1, 6, 2], [1, 4, 5]]) b = array([1, 2, 3, 4]).T F = diag([0.1, 1, 10, 2]) print(lstsq(A, b, rcond=None)[0]) #[-1.56643357  0.68531469  0.37412587] print(lstsq(dot(F,A), dot(F,b), rcond=None)[0]) #[-21.46375975   3.27144095   2.41928963]

Suppose that $\hat{x}$ is the least squares solution of $Ax = b$.  That is, $\min{|r|}, r = Ax - b$ with respect to $x$.  Is $\hat{x}$ also the least squares solution of $JAx = Jb$?  I suspect so, but I'm not sure how to prove it.  If $J$ is invertible, it's easy enough to prove as you can just cancel it out from both sides.  But what if it's not invertible?


I am given the left coset multiplication rule which is :  $$aHbH=abH$$  Taking representatives $x \in aH $ and $a^{-1} \in a^{-1}H$  $$xHa^{-1}H=xa^{-1}H$$  Take representatives $a\in aH$ and $a^{-1}\in a^{-1}H$ Then   $$aHa^{-1}H=H$$  If, multiplication is well defined then, $xa^{-1}H=H \implies xa^{-1}=h \ \ for \ some \ h\in H \implies x=ha \implies aH \subseteq Ha$   Now in order to prove the containment in other direction what should I do? I can easily do the exact same thing, but I'm not given a definition for right coset multiplication - I don't know how to multiply right cosets? Should I act as if I was given the such property? If I should, why? If shouldn't how ?

Let $G \in \mathbf{Grp}$, $H \leq G$, $G/H := \lbrace gH: g \in G \rbrace$. We can then introduce group operation on $G/H$ as $(xH)*(yH) := (x*y)H$, so that $G/H$ becomes a quotient group when $H$ is a normal subgroup. But why do we only work with quotient groups by normal subgroups? If we introduce the notion of left quotient group in the above manner, how much good properties of a quotient group do we lose?


I am created file use "cat > sample.txt". after i used "cat -b sample.txt". how to save it. ctrl+x or F2 is not working.

How do I save the output of a command to a file?  Is there a way without using any software? I would like to know how.


I want to put data in lightning datatable by url link style like attached to express the record of relationship.  I tried header type "url", but it showed "http//" in the cells.  How can we put data by url style?  Thank you in advance.

I am trying to build a datatable in lwc and one of the column's datatype is url. When I provide URL it shows as  , what I want is just label "Google.com".  I can see from the docs of the  , i can use typeAttributes for url and provide "label", "target" and it should be good to go.  But when I try that I get cell as http://[object Object] which is a bit weird.    Template.html :  <template>

             A data table that fetches content during initialization.

             <lightning-datatable                 key-field="id"                 data={data}                 columns={columns}                 is-loading={tableLoadingState}>             </lightning-datatable>

 </template>   JS :  import { LightningElement, track } from 'lwc';  const columns = [     { label: 'Date', fieldName: 'createdDate' , type: 'date-local',typeAttributes :{ month: "2-digit",day: "2-digit"}},     { label: 'Duplicate Website', fieldName: 'duplicateWebsite', type: 'url'  },     { label: 'Person Detail Match', fieldName: 'personDetailMatch', type: 'boolean' }  ];  export default class DatatableBasic extends LightningElement {     @track data = [];     @track columns = columns;     @track tableLoadingState = true;       connectedCallback() {         const data =  [{createdDate : "1479944705000" , duplicateWebsite : { label : 'Google' , target : 'www.google.com'}   , personDetailMatch : true }];         this.data = data;         this.tableLoadingState = false;     } }   Playground Link :   Update: I managed to update label by providing label fieldName in column definition   const columns = [         { label: 'Date', fieldName: 'createdDate' , type: 'date-local',typeAttributes :{ month: "2-digit",day: "2-digit"}},         { label: 'Duplicate Website', fieldName: 'duplicateWebsite', type: 'url',typeAttributes: { label: {fieldName:'duplicateWebsite'}, value: {fieldName:'urlTarget'}  }  },         { label: 'Person Detail Match', fieldName: 'personDetailMatch', type: 'boolean' }    ];   And rowData as  const data =  [{personName:"url name", createdDate : "1479944705000" , duplicateWebsite : "Google"  ,urlTarget : "www.google.com",  personDetailMatch : true }];   Now the issue is it takes label value as href value, thus making links dead.  Updated Playground Link:


Does there exist a sequence of continuous $f_n: [0, 1] \to \mathbb{R}$ that converges pointwise, as $n \to \infty$, to $\chi_\mathbb{Q}$, the characteristic function of the rationals in $[0, 1]$?

Prove that there does not exist a sequence of continuous functions $ f_n :\left[ {0,1} \right] \to R $ such that converges pointwise, to the function  $$f(x)=   \begin{cases}     0 & \text{if $x$ is rational},\\\\     1 & \text{otherwise}.   \end{cases}. $$  I have no idea How can I prove this. Prove that there no exist such sequence if the convergence is uniform, it's easy, because the limit would be continuous, but here I don't know How can I do. I suppose that some "nice" properties are "preserved" in the limit, in this kind of convergence, but I don't know any of them.


The law of the conservation of energy describes that energy cannot be created nor destroyed however in fact only changes form.   How does this law explain the energy transferred by magnetic fields?

When a permanent magnet attracts some object, lets say a steel ball, energy is converted into for instance kinetic energy and heat when attraction happens, and they eventually collide. Does this imply that energy is drawn from the magnetic field and the magnet is depleted, making it weaker and weaker for each magnetic attraction performed?  (if the answer requires Quantum Mechanical explanations, please elaborate :))


Can we define any kind of addition and multiplication on the set of all non-negative integers such that it becomes a field. I think not. Can we prove this ? If we have only a finite collection with prime cardinality then only it may become a field.

To make sure that we are talking about the same, I would like to post the relevant definitions I know first.  Definitions:  A pair $(G, +)$ where $G$ is a set and  $+: G \times G \rightarrow G$  is called a commutative group if it has all of the following three characteristics:   (associativity): $\forall x,y,z \in G: (x+y)+z=x+(y+z)$ (identity element): $\exists e \in G \forall x \in G: e + x = x = x +e$ (inverse elements): $\forall x \in G \exists x^{-1} \in G: x^{-1} + x = e = x + x^{-1}$ (commutativity): $\forall x,y \in G: x+y=y+x$.     A triple $(\mathbb{K}, +, \cdot)$, where $\mathbb{K}$ is a set and  $+: \mathbb{K} \times \mathbb{K} \rightarrow \mathbb{K}$  $\cdot: \mathbb{K} \times \mathbb{K} \rightarrow \mathbb{K}$  is called a field if it has all of the following three characteristics:   $(\mathbb{K}, +)$ is a commutative group $(\mathbb{K} \setminus \{0\}, \cdot)$ is a commutative group distributive properties: $\forall x,y,z \in \mathbb{K}: x \cdot (y+z) = (x \cdot y) + (x \cdot z)$ and $\forall x,y,z \in \mathbb{K}: (y+z) \cdot x = (y \cdot x) + (z \cdot x)$     $\mathbb{N^+} := 1, 2, 3, 4, 5 ...$ (all positive integers)  $\mathbb{N}_0 := \{0\} \cup \mathbb{N}$ (the natural numbers with zero)  $\mathbb{N}$ can be both: $\mathbb{N^+}$ or $\mathbb{N}_0$.    My question: Does a field exist that has $\mathbb{N}$ as its set?  I know that $(\mathbb{Q}, +, \cdot)$ is a field and I know that $(\mathbb{N}, + )$ is only a commutative semigroup.   But maybe it's possible to define two mappings $\circ, *$ for $\mathbb{N}$ in such a way that $(\mathbb{N}, \circ, *)$ is a field.    Related:     The smallest field containing the integers is the field of rational   numbers.   Source: en-Wikipedia:   I don't know if this is true. If somebody can prove (or at least scribble the proof of) the quote it would be a good answer, I guess.


When I resize the page (typically on 80% in my case, because I find the text too large to read properly) some layout does not scale well. Incidentally, when I scale it even smaller, the buttons in the image are aligned properly again. Not sure this is a Firefox bug or an SO design bug.

I have spotted a bug in rendering of Favorite Tags and Ignored Tags section in Firefox. This rendering issue is present on both stackoverflow.com and meta.stackoverflow.com sites.  I'm using Firefox 17.0.1 on Windows 7 x64. In Google Chrome page is rendered correctly.  Screenshots:  Firefox (please note cropped right part of both Add buttons)    Chrome (buttons are rendered correctly)


I recently decided to switch back to GNOME from the Budgie environment. After purging Budgie successfully and setting up the default lock screen and splash screen, I am facing problems with some of the commonly used keyboard shortcuts. Ctrl (or Super) + A is no longer working (for selecting text in a file, search bar etc). Any fix? Thank you in advance.  Gnome Version: 3.36.8 OS: Ubuntu 20.04 - LTS

Selecting all text in URL by Ctrl+A doesn't work anymore. Now it brings the cursor to the front.


I am trying to create an Excel file and write some data to it. Here is the code I am using.  using excel = Microsoft.Office.Interop.Excel; excel.Application xlapp; excel.Workbook xlworkbook; excel.Worksheet xlworksheet; object misvalue = System.Reflection.Missing.Value;  xlapp = new excel.ApplicationClass(); xlworkbook = xlapp.Workbooks.Add(misvalue);  xlworksheet = (excel.Worksheet)xlworkbook.Worksheets.get_Item(1); xlworksheet.Cells[1, 1] = "Muneeb Hassan Soomro"; xlworkbook.SaveAs("csharp-excelwrite.xls",excel.XlFileFormat.xlWorkbookNormal,misvalue,misvalue,misvalue,misvalue,excel.XlSaveAsAccessMode.xlExclusive,misvalue,misvalue,misvalue,misvalue,misvalue); //xlworkbook.SaveAs("csharp-Excel.xls", excel.XlFileFormat.xlWorkbookNormal); xlworkbook.Close(true, misvalue, misvalue); xlapp.Quit();   I get an exception on the xlworkbook.saveas() call. says:     The file name or path doesn't exist or used by other program   What i am doing wrong here?

How can I create an Excel spreadsheet with C# without requiring Excel to be installed on the machine that's running the code?


Question:-Prove that $$\int_0^1( \ln x)^2 \frac{1+x^2}{1+x^4} \, dx=\frac {3\sqrt{2}\pi^3}{64}$$  My attempt:  $$\int_0^1 \left( \ln\frac{1}{x}\right)^2 \frac{1+x^{-2}}{x^{-2}+x^2} \, dx$$  Put $\left(x-\frac{1}{x}\right)=t$, we get  $$\int_{-\infty}^0\left( \ln\frac{(t+\sqrt{t^2+4})}{2}\right)^2 \frac{1}{t^2+2} \, dt$$  After that I got stuck.  Can anybody help me!

This integral below $$ I:=\int_0^\infty \log^2 x\frac{1+x^2}{1+x^4}dx=\frac{3 \pi^3}{16 \sqrt 2} $$ is what I am trying to prove.  Thanks.  We can not expand the denominator as a series since the domain of integration is for $x\in [0,\infty)$.  Next I wrote $$ I=\int_0^\infty \log^2 x \frac{1+x^4-x^4+x^2}{1+x^4}dx=\int_0^\infty \log^2x \left(\frac{1+x^4}{1+x^4}+\frac{x^2-x^4}{1+x^4}\right)dx=\\ \int_0^\infty \log^2 x \, dx+\int_0^\infty \log^2 x \frac{x^2}{1+x^4}dx-\int_0^\infty \log^2 x \frac{x^4}{1+x^4}dx, $$ however only the middle integral is convergent.  I am not sure how to go about solving this problem.  Thank you


There used to be a set of tag buttons on question pages, near the top-right.  I don't remember exactly where they were, but I think to the right above where the information about when the question was asked and how many times it's been viewed is shown.  Here's a screenshot with super-fancy freehand art:    I noticed that this is no longer present as of recently.  I miss it however, because that is what I always clicked on.  It's also super convenient because it's always in the same place no matter how long the post.  I just had to hit HOME instead of searching for the end of the question.  A quibble, perhaps, but I can't tell you how much I miss these buttons.  Can we have them back?  Actually I just noticed that these tags are still displayed in meta.  It's in the top-right in a section labeled "tagged"

This is on Stack Overflow. On Meta I'm able to see what the tags are on the right side of the screen. In fact, I think yesterday or some point earlier today I saw tags on the right side of the screen (I can't screenshot or remember correctly).  It's right above the asked and active heading.  I know this is minor but what happened to it? It might be useful for browsing instead of having to look at the bottom of the question post.    Found an image on Google and it shows the tags on the right side of the screen:


I need to prove that $3^i5^j$ can never be a perfect number. How do I tackle this problem. I know that a perfect number is a positive number which is equal to the sum of its positive divisors excluding the number itself. But how do I prove that the number $3^i5^j$ is not perfect?

Define $\sigma(m) = \sum$ d : d|n.  Prove that $p^j$$q^i$ cannot be a perfect number for $p, q$ odd, distinct primes.  Attempt at Solution: I have shown that $p^k$ can never be a perfect number, and im trying to use the multiplicative property of $\sigma$ to generalize to $p^j$$q^i$


Suppose $A$ is infinite. Also suppose $\exists g:A \rightarrow \mathbb {N}$ that is 1-1. This is all the info I have. I need to show the result in the title because then I would have some function  $h$ that is a bijection from $A $ to $\mathbb{N} $ and that would mean that $A $ is countable. But I just do not see how to obtain that function  $f $ in title...

Here is the proof I tried to weave while trying to prove this theorem:     Theorem. Every infinite subset of a countable set is countable.      Proof. Let $A$ be a countable set and $E\subset A$ be infinite. Then $A\thicksim\mathbb{N}$. This implies that there is a sequence $\left\{x_{n}\right\}_{n\in\mathbb{N}}$ where $x_{n}\in A$. Construct a sequence $\left\{n_{k}\right\}_{k\in\mathbb{N}}$ where $x_{n_{k}}\in A$, $n_{1}$ is the smallest positive integer such that $x_{n_{1}}\in A$, and $n_{k+1}>n_{k}$. Then      $$ E=\bigcup_{k=1}^{\infty}x_{n_{k}}, $$      and $E$ is countable, because $E\thicksim\mathbb{N}$. $\blacksquare$   Is it convincing?


I know , but it seems this bug has risen from the dead to haunt us once again.

So I've been experiencing this in the last few days: sometimes when someone replies to my comment, and I reply to the reply, then the "add/show 1 more comment" link appears immediately after I post my comment. However, when I click it, it disappears and nothing is shown.  I don't think it's that OP is posting two comments of which he deletes the second one, because this has happened to me several times, even when I was replying within 2-3 seconds.  I do, however, believe that this is more or less the same bug as , except that I don't have to reload the page in order the link to be gone, and I also seem to be getting the erroneous behavior only if I reply to a comment which is itself a reply to an earlier comment of mine.  Unfortunately, I wasn't careful enough to take a screenshot last time this happened, but here's what I am talking about for those who like visual demonstration better:


Show that if both cancellation laws i.e $w.a = w.b \implies a = b$ and $a.w = b.w \implies a = b$ holds then a finite semi-group (a finite set with associative binary operation) is a group.   I have seen some proofs which uses the alternative definition of group to prove it i.e. $a.x = b$ and $y.a =b$ have unique solutions for $x$ and $y$. I am not interested in such proofs.   How to prove this statement starting with cancellation laws and then showing that all axioms of group can be derived from them?  EDIT : As pointed out in one of the answer. This is only true when underlying set is finite. Edited accordingly.

Let $G$ be a finite, nonempty set with an operation $*$ such that   $G$ is closed under $*$ and $*$ is associative Given $a,b,c \in G$ with $a*b=a*c$, then $b=c$. Given $a,b,c \in G$ with $b*a=c*a$, then $b=c$.   I want to prove that $G$ is a group, but I don't know how to show that there exists an identity $e\in  G$ such that $e*x=x$ and $x*e=x$ $\forall x \in G$. I also don't know how to show that $\forall$ x $\in G$ there exists a $y \in G$ such that $y*x=e$ and $x*y=e$. How do I do this?


I was replacing an electrical socket in my (UK) house, and I noticed that the previous occupant had wired live and neutral backwards.  However, I've used a variety of appliances and devices on that socket in the past without any issue.  So - does it actually matter which way around they are connected?  As long as you obviously don't connect live from one part of the ring with neutral from the other, what difference does it make?

Saw the good answer to this question:   But I'm wondering as a followup, since the two primary prongs in an AC mains plug are different, why (in many plug configurations) are you allowed to insert the plug in either direction? Is there ever a case where the appliance cares which line is "hot" and which is "neutral"? Is there ever a case where it's important enough not to screw up?


I tried this code:  #include <iostream> using namespace std;  class A { public: A(){cout<<"A();";}  ~A(){cout<<"~A();";} };  class B : public A { public: B(){cout<<"B();";}  ~B(){cout<<"~B();";} };  int main() { A a =B(); return 0; }   Output: A();B();~B();~A();~A();  Why is A's destructor invoked 2 times?

Someone mentioned it in the IRC as the slicing problem.


I'm building a scrolling page website and on that page I have comment form and some posts from different categories.  Comments applied to wrong post.  Is there a way to choose the post I want ?  Thanks

I have a built a Wordpress site that enables comments on pages and I am using them as reviews, what I would like to do is for someone to be able to make a comment on a page without being on that page.    On the link above, the top right, there is a link that says have your say about a university, it would be good to have a HTML form and then a dropdown box of all the child pages of university-guide; which is where all the universities are stored, and then I can put my comments.php file into this.  So my HTML form appears and when a page is picked from a dropdown box, the comment will then be assigned to that page.  Any help or direction?    New Question for Toscho:  Below is your tweaked plugin to fit into my website, as you can see I have added the select option yearSelect and need this to appear when the comments appear. How would I go about doing this? - Could you provide ay help please?      <?php /* Plugin Name: haveyoursay */  /**  * Call the form in your template with:  * do_action( 'wpse_67527_comment_form' );  */ add_action( 'wpse_67527_comment_form', 'wpse_67527_comment_form' );  /**  * Create a review form.  *  * @return void  */ function wpse_67527_comment_form() {     $select_id = 'page_select';     $url = 'http' . ( is_ssl() ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];     $url = esc_url( $url );     ?> <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post">
Leave us your student perspective

         <?php _e( 'Name' ); ?>&nbsp;&nbsp;&nbsp;&nbsp;         <input id="author" name="author" type="text" size="40" />

         <?php _e( 'Email' ); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;         <input id="email" name="email" type="text" size="40" />

         <label for="<?php echo $select_id; ?>">

             Pick a university from the list: &nbsp;&nbsp;                  <?php         // Ordered by page name automatically         wp_dropdown_pages(             array (                 'name' => 'comment_post_ID',                 'id'   => $select_id,                 'child_of' => 2,             )         );         ?>

Please select your year of study: &nbsp;&nbsp;     <select name="yearSelect">     <option value="1st">First Year</option>     <option value="2nd">Second Year</option>     <option value="2nd">Third Year</option>     </select>

         <textarea name="comment" cols="45" rows="8"></textarea>

         <?php         wp_nonce_field( 'unfiltered-html-comment_' . get_the_ID(), '_wp_unfiltered_html_comment_disabled', FALSE );         ?>         <input type="hidden" name="redirect_to" value="<?php echo $url; ?>" />         <input type="submit" style="margin:15px 0px 0px 0px; padding:4px 10px;" />
 </form>     <?php }  add_filter( 'comment_post_redirect', 'wpse_67527_redirect' );  /**  * Strip '#comment-number' from redirect url.  *  * @param  string $url  * @return string  */ function wpse_67527_redirect( $url ) {     $parts = explode( '#', $url );     return $parts[0]; } ?>


I would like to add coloring definition for e.g. @Override in java files. How can I do that ?   So far I have the following coloring definitions :   \documentclass[a4paper,11pt]{article} \usepackage{color} \usepackage{courier} \usepackage{listings} % for code snippets  \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82}  \lstset{frame=tb,   language=Java,   aboveskip=3mm,   belowskip=3mm,   showstringspaces=false,   columns=flexible,   basicstyle={\scriptsize\ttfamily},   numbers=left,   numbersep=4pt,   numberstyle=\scriptsize\color{gray},   keywordstyle=\color{blue},   commentstyle=\color{dkgreen},   stringstyle=\color{mauve},   breaklines=true,   breakatwhitespace=true,   tabsize=2 }  \begin{document} \lstinputlisting[label={lst:sourcefile}]{codefile.java} \end{document}

How can I apply different styles to keywords depending on their prefix?  Here is some sample code:  (-2,0,0) (2,1,1) op-registerbox !box1 ;box1 /Blue op-setproperties   I'd like to typeset   words starting with ! and ; in color red, words starting with / in color green, words starting with cp- in bold.   So far, this is what I've got:  \lstdefinelanguage{XX} { basicstyle=\small\sffamily\fontseries{c}, emphstyle=\underbar, keywordsprefix=[2]{/}, alsoletter={/}, keywordstyle=\textbf, keywordstyle=[2]\color{green}, morekeywords={op,registerbox, ...}, morestring=[b][\color{green}]", columns=flexible, escapechar=\%, numbersep=6pt, numberstyle=\scriptsize }   I'm aware that only one keywordsprefix can be defined at the moment: specifying more than one class of prefix (keywordsprefix=[2]{/}) is currently not supported. I'd like to avoid having to list all the words that match my description into morekeywords. Is that possible? How?


I am planning to create a program(with python) that analyzes and responds to emails on ubuntu, but I cant seem to find anything that could serve as the receiving and sending part of the program(in python, or with terminal commands) does anyone have any suggestions on what I could use?

How can I receive and send email in python? A 'mail server' of sorts.  I am looking into making an app that listens to see if it receives an email addressed to foo@bar.domain.com, and sends an email to the sender.  Now, am I able to do this all in python, would it be best to use 3rd party libraries?


I can select entities (or players) who are in a volume easily.  @e[x=0,dx=20,y=0,dy=256,z=20,dz=1]   How do I select all entities who are not in a given volume?    I'm giving players in a certain room a tag, doing stuff with the tag, and want to remove it when they leave.

This is similar in a way to , but the solution the MBraedley gave didn't work for me. As the linked post says, I've also tried the many ! values in front of the coordinates etc., to no avail.  Essentially, I'm creating a "safe zone" area for the spawn (regardless of spawn protection settings) of my realm, similarly to that of survival servers like what LemonCloud had. I've got detecting in the area down, but now I need it for those outside the area.


Is it possible that I could see the mobile number of Facebook friends? I saw the following post, but I did not find it because Facebook has changed.

There was a time that somehow Facebook synced to my phone and that was great but I did not want all of them. How can I manually select the Facebook numbers and then export it to my phone via Contacts or Microsoft Exchange ? Where is this option ?


So today in my final for number theory I had to prove that the Fermat numbers ($F_n=2^{2^n}+1$) are coprime.   I know that the standard proof uses the following: $F_n=F_1\cdots F_{n-1}+2$ and then the $\gcd$ divides $2$, and it cannot be two, and hence the numbers are coprime.  However, he asked us to use the hint: "Let $l$ be a prime dividing $F_n$. What can you say about the order of $2$ in $(\mathbb{Z}/l\mathbb{Z})^\times$?"   I have been thinking about it and I cannot figure out how to use his hint.  Any ideas?


My wife is planning to travel our home Country(India) for a period of 4 months. We have 9 months old Son. He has Valid US passport and valid PIO(Person of Indian Origin) Card . I am aware if any one other than parents required notarized consent letter from parents to accompanying infant to travel out side USA.  What if one of parent is accompanying infant to travel outside USA? Does notarized consent letter from other parent is mandatory?

My wife wants to travel to another country for one month and would like to take our baby with her. We currently live in the USA, but are originally from Ukraine. The baby has a child travel document with a valid USA visa.   Question: Does my wife need to have any additional documents for the baby so she can travel without the father? In Ukraine we would need a written agreement from the father to allow my wife to fly with the baby, but what about in the USA?


I have a question regarding the sum of this series: $$\frac{3}{1!+2!+3!} + \frac{4}{2!+3!+4!} + \cdots + \frac{2008}{2006!+2007!+2008!}$$ My approach: I found that this sum is equal to: $$\sum_{n=3}^{2008}\frac{n}{(n-2)!+(n-1)!+(n)!}$$  I reduced it to : $$\sum_{n=3}^{2008}\frac{1}{n(n-2)!}$$  Please suggest how to proceed further.


In Avengers: Engame, Nat and Clint were the ones assigned to get the Soul Stone. However, they seem to not know how to get the Soul Stone and even get to the point where Clint doubted what the Red Skull said.   How did they not know?   Because Nebula was with them and she was there when Thanos went to Titan. She was even the one who concluded and told Quill, indirectly, that Thanos probably sacrificed Gamora in exchange for the Soul Stone, or at least that's how I understood it based on their conversation in the previous movie.   Did I miss something here? Or did I just misinterpret something?

So there are two teams in Avengers: Endgame: Natasha (Black Widow) and Clint (Hawkeye)/Nebula and War Machine.   Yet Black Widow and Hawkeye were chosen for the mission to Vormir. So did Nebula know to send them since one loved one had to be sacrificed and she gathered that they both share a history or was it just a normal team separation?


First of all I am new to Linux command line. I never worked with it before. My problem is that the command apt-get update will just return:  Err:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease   Temporary failure resolving 'us.archive.ubuntu.com' Err:2 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease   Temporary failure resolving 'us.archive.ubuntu.com' Err:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease   Temporary failure resolving 'us.archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'us.archive.ubuntu.com' W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'us.archive.ubuntu.com' W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'us.archive.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.   My sources.list file looks like this:  #------------------------------------------------------------------------------# #                            OFFICIAL UBUNTU REPOS                             # #------------------------------------------------------------------------------#   ###### Ubuntu Main Repos deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse   ###### Ubuntu Update Repos deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse  deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse  deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse  deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse   My ubuntu version is:    Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-66-generic x86_64)

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


I've recently tried an edit and it no longer appears as I edited. My initial guess was it was peer reviewed and the peer rejected the update. Assuming that is true, what is to be done then, when the edit is significant due to a fault in the code sample of the original un-edited answer?  Now I think otherwise, having read some similar Q-A on Meta.  It seems more likely that the view reverts after some minutes pass. Then, the original unedited answer appears. This does not indicate peer review rejection. Am I correct?  I don't know where to find peer review notes, or vote stats in the edit queue as I've learned it's called.

Assume that I have edited one question. Due to reputation limitation my edit goes for review. There either it will be accepted or will be rejected. So can I know who have accepted/rejected my edit? Also can I know the reason for rejection? Also sometimes when I edit some question it shows my edited question, but it shows someone else's name in edited by. Why so?


I have been reading very carefully and more than once the , yet I don't understand how to provide a plugin with multiple languages.  In the example there is an array, such as:  $strings = array(     'somestring' => __('My custom Tinymce plugin', 'textdomain'), );   but I am not clear on how to provide the same text in other languages... I am sure I just misunderstood something very simple but I cannot find my way out of it...  I also went through  but I don't see a clear example with at least 2 different languages.  Thanks for your help!

I know that I can get my translations into JavaScript doing:      $MyTranslations = array(         'translation1' => __("Some String 1", "MyTranslations"),         'translation2' => __("Some String 2", "MyTranslations")     );     wp_localize_script( 'jquery', 'my_translations', $MyTranslations );   But looking at some of WordPress TinyMCE plugins they use calls like this:  { title : ed.getLang('advlink.link_desc'), ... }   How is WordPress getting their translations into getLang()? Am I supposed to do it this way or do I just use my first bit of code and access the variables directly like:  { title : my_translations.translation1, ... }


suppose the string is like this:  String msg = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"   I want to add or append a line break (a carriage return) after every 60 characters either through looping or regEX (regEx would be much cooler).

I have a java string, which has a variable length.   I need to put the piece "<br>" into the string, say each 10 characters.   For example this is my string:  `this is my string which I need to modify...I love stackoverlow:)`   How can I obtain this string?:  `this is my<br> string wh<br>ich I nee<br>d to modif<br>y...I love<br> stackover<br>flow:)`   Thanks


How would one go about using a 42V DC power source to power something which needs 36 V DC using resistors?

When would you use a voltage regulator vs a resistor voltage divider?  Are there any uses for which a resistor divider is particularly bad?


I'm building a full adder circuit using transistors. I am only doing it for fun, that's why I'm not using IC gates. I am feeding it 5V and I'm getting really strange outputs. And it isn't even consistent, sometimes it does one thing and other times, other things. The outputs are around 3-4V, the LEDs sometimes shine normally, sometimes very faintly, sometimes not at all. And I just can't get it working. Can you see something off in my schematic? And yes, I checked my PCB, I soldered everything good, there are no bridges. I tried removing the resistors before the grounds, (R1, R6, R9, R18, R21, R26, R29, R32, R33) but it still doesn't work. Here is the schematic:

So I'm trying to wire up a  just with NPN BJT transistors (I know there is a 74XX283 4-bit binary full adder, but I want to do it just with transistors if possible for my own learning).  The full adder I'm trying to build looks like the following with logic gate symbols:      I use a NAND, OR and AND gate to build the XOR gate:      Right now my current circuit looks like this:         – Schematic created using   Schematic notes:      All those 1k resistors you see going to ground are pull down resistors, so I get a more cleaner signal, but I'm not sure if they are required or optional or where and when exactly I need them.   But the circuit does not work as intended:  A B CIn | Sum COut ------------------ 0 0 0   | 0   0   (Both LEDs are clearly off) 0 0 1   | 1   0   (A clear one the LED glows; the other is off) 0 1 0   | 1/2 0   (The LED just glows like half; the other is off) 1 0 0   | 1/2 0   (The LED just glows like half; the other is off) 1 1 0   | 0   1/2 (The LED just glows like half; the other is off) 1 0 1   | 0   1/8 (The LED just barely glows; the other is off) 0 1 1   | 0   1/8 (The LED just barely glows; the other is off) 1 1 1   | 1   1   (Both LEDs only glow half)   The expected behaviour would be:  A B CIn | Sum COut ------------------ 0 0 0   | 0   0 0 0 1   | 1   0 0 1 0   | 1   0 1 0 0   | 1   0 1 1 0   | 0   1 1 0 1   | 0   1 0 1 1   | 0   1 1 1 1   | 1   1   I have tried to remove, change or add some pull down resistors on the gate outputs, but the above circuit is the best attempt I have right now. I have also changed out all components and the breadboard I use, just to make sure it isn't some component that is dead. I already have double/triple checked all resistors and connections, so that I don't just have a misplaced wire or wrong resistor.  I also tried to use a multimeter to find the error, but that just confused me more. But if I have to I can also check stuff with the multimeter if necessary.  So I'm at the end with my knowledge here how to fix my circuit design and get a clear on and off output?  I don't know if I use wrong resistor values, I don't use the transistors correctly or if my design is wrong from the start.


I get it to work on just replacing one instance with this code:  var someString = ['He', 'Test', 'of']; var x = 0; for (i = 0; i < 2; i++) {     document.body.innerHTML = document.body.innerHTML.replace(''+someString[i]+'', 'text'); }   How to get it to replace all the instances? I tried this:  /+someString[x]+/g  /'+someString[x]+'/g   since using a normal string, /Test/g would work how to i format it when the string is a variable string.

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I'm getting the error mentioned below when i try to decode a base64 string to file and save it locally. I've done some research online and couldn't find the solution. Thanks in advance.  Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.      Const adTypeBinary = 1     Dim str      str = strBase64Content 'base64 string here      Dim objXML      Dim objNode      Set objXML = CreateObject("Msxml2.DOMDocument.6.0")     Set objNode = objXML.createElement("b64")     objNode.DataType = "bin.base64"     objNode.Text = strBase64Content     decodeBase64 = objNode.nodeTypedValue      Set objNode = Nothing     Set objXML = Nothing      set stream =  server.CreateObject("ADODB.Stream")     stream.Open     stream.Type = adTypeBinary     stream.Write decodeBase64     stream.SaveToFile "C:\"     stream.Close

I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation)  [Aside; Yes, I've seen . The concatenation is happening in a loop across messages that are 1,000's to 10,000's bytes in size.]  I've tried using some custom string concatenation routines; one using an array and one using ADODB.Stream. These help, a little, but I think it would help more if I had some other way of encoding the message rather than via my own VBS function.  Is there some other way of encoding my message, preferebly using native Windows methods?


I'd like to hear from the community on how I should go about implementing GetHashCode (or override it) for my object. I understand I need to do so if I override the equals method. I have implemented it a fair amount of times, sometimes just calling the base method. I understand that my object should equal another instance of the object if it contains the same details (members). What is the best way to get a hash code from the class's members?

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


What are key words from throw exeption like this?  public void methodOne() throw SomeExeption {      try{          doSomething();      catch(SomeExeption se) {          throw se;      } }  public void startThere() {    try{        methodOne();    catch(SomeExeption se) {        Console.writeln("FAIL");    } }   I don't know, how to write it. I am getting syntax errors.  Thank you for your help.

What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the Exception object's InnerException and stack trace are preserved. Is there a difference between the following code blocks in the way they handle this?  try {     //some code } catch (Exception ex) {     throw ex; }   Vs:  try {     //some code } catch {     throw; }


I am trying to use ArcPy to convert a specific shapefile in my TOC to annotation in the map. I am not so much in the need for the tiled annotation tool that I've seen talked about as this is going to be used at the layout view at the same scale always. Essentially I am trying to label all the areas in the [area] field and then convert to annotation right after so they can be dragged around for best look as there can be sometimes up to 50 different labels.   I've been trying this with no luck  def onGenerate(self, event):     dlg = wx.MessageDialog(self, 'labels generated','success',wx.OK | wx.ICON_INFORMATION)     dlg.ShowModal()     dlg.Destroy()     mxd = arcpy.mapping.MapDocument("CURRENT")      layer = arcpy.mapping.ListLayers(mxd, "project_app")[0]      if layer.supports("LABELCLASSES"):         for lblclass in layer.labelClasses:             lblclass.showClassLabels = True             arcpy.ConvertLabelsToAnnotation_defense(mxd, layer)     lblclass.expression = " [NAME]"     layer.showLabels = True     arcpy.RefreshActiveView()

how could I do the following steps with arcpy:   right-click on the layer with the features Label Features Convert Labels to Annotations ...   The annotions should be saved in a new shapefile.  How could I do this in python?


I was taught, that the sync command writes the data stored within the cache of the RAM onto hard-disk, this release should be displayed in /proc/meminfo. However when I cat /proc/meminfo before and after a sync I can not see any difference, the line with buffers and cage stays the same.   Where can I actually see the change ?

I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type sync, of course, it all has to go to disk, and that takes a long time.  I understand that it's going to be slow, but is there somewhere where I can watch a counter go down to zero? Watching buffers in top doesn't help.


So I've read that if you write this:  String a="foo";  String b="foo";  System.out.println(a==b);   it will print "true", because the first implementation checks the memory pool looking for "foo", it cant find it so it creates a new object and puts foo in the memory pool, then every other string will be pointing to the same object.  and if you write:  String a="foo";  String b=new String("foo");  System.out.println(a==b);   it will print "false", because you force a creation of a new object for b so it wont take it from the pool.   my question is if you write this:  String a=new String("foo");  String b="foo";  System.out.println(a==b);   why does it still print "false" ? I mean "a" creates a new object and doesn't look in the memory pool, but b should look in the memory pool and find the object "a" created and point to it. what am I missing here?  thank you.

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?


I want start writing latex document under windows. So I downloaded texmaker, but I get some errors when I try to create the pdf (command not found "...pdflatex...").  I have to install other things? Or texmaker contains all the necessary?

I am a noob when it comes to TeX, however, I do use LaTeX for typing mathematical and engineering formulas, etc.   Recently I have taken it upon myself to try and write some technical papers to try and get published, however I do not know what... 'type'(?) of TeX software to use best, so that I can hit the ground running with it.   If you look , this can give you context as to the forums that I would be publishing to, (IEEE), and they even have some templates there. However I cam getting easily confused between BibTex, TeX, etc, and how they all 'fit' together, in my goal of writing a paper. I would like guidance on this.   What might be the easiest 'headache less' software to start writing a paper in TeX for a noob such as myself? Am I on the right track?  Thanks!


The question is short but it may be a little bit tricky:  Suppose we have a deck that contains n cards with n different rank (let's say ranks are 1, 2, ... , n), and then we randomly shuffle the deck, what's the probability that all cards' orders are different from their ranks?  Such as:  $1^{st}$ card cannot be the card with rank 1, and  $2^{nd}$ card cannot be the card with rank 2, and   ... and  $n^{th}$ card cannot be the card with rank n.  I have done some simulations for a specific n (n=7), feel free to use the sample probability distribution to test against your thoughts:   > n <- rep(-1, 1000000) > for (i in 1:length(n)) { +   deck <- sample(1:7) +   n[i] <- sum(sample(1:7) == 1:7) + } > table(n) / length(n) n        0        1        2        3        4        5        7  0.367319 0.368180 0.183299 0.062795 0.014050 0.004150 0.000207

I understand the whole concept of Rencontres numbers but I can't understand how to prove this equation  $$D_{n,0}=\left[\frac{n!}{e}\right]$$  where $[\cdot]$ denotes the rounding function (i.e., $[x]$ is the integer nearest to $x$). This equation that I wrote comes from solving the following recursion, but I don't understand how exactly the author calculated this recursion.  $$\begin {align*}  D_{n+2,0} & =(n+1)(D_{n+1,0}+D_{n,0}) \\ D_{0,0} & = 1 \\ D_{1,0} & = 0  \end {align*} $$


I tried adding to the .htaccess file  RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,:]   I also tried (in the httpd.conf file)  <VirtualHost *:80>  RewriteEngine on  ReWriteCond %{SERVER_PORT} !^443$  RewriteRule ^/(.*) https://www.mywebsite.com/$1 [NC,R=301,L] </VirtualHost>   When I try to access the site via www.mywebsite.com it tries to load from https:// 192.xxx.xxx.xxx address  I am able to access it via https://mywebsite.com  Any ideas what I am doing wrong or not setting?  Thanks

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Assume that $f$ be continuous on $\mathbb{R}$, $f'(x)$ exists for all $x\neq 0$, and $\lim_{x\rightarrow 0} f'(x)=1$. We need to show $f'(0)$ exist and is equal to $1$.  $f'(0)=\lim_{x\rightarrow 0}\frac{f(x)-f(0)}{x}$, $\lim_{x\rightarrow 0}f'(x)=1\Rightarrow\lim_{x\rightarrow 0}\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}=1$...am I going in the right direction? Please help.

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


I've got a function, $r(\theta)$, of the radius of an ellipse relative to one focus of the ellipse: $$ r(\theta) = \frac{l}{1 - e\cos \theta} $$ where $e$ is the eccentricity and $l$ is the semi-latus rectum.  I've also found an equation for the arc length from $\theta = 0$ as a function of time, $L(t)$. ($L(t)$ is a bit of a mess, so I'll leave it out unless someone wants to see it).  I'm trying to find $\theta$ as a function of $t$, so that I can use that in conjunction with my ellipse equation to find a parametric form of the ellipse, $\bigl(r(t),\,\theta(t)\bigr)$. The only way that I can think to do this is to solve the equation $$ L(t) = \int_0^t \!\sqrt{r^2 + \left(\frac{\mathrm{d}r}{\mathrm{d}\theta}\right)^2}\mathrm\;{d}\theta $$ for $\theta$. However, this is proving to be beyond both my and Mathematica's abilities. Is there a better way to get $\theta(t)$?

Is it possible to determine the angle in degree of an arc in ellipse by knowing the arc length, ellipse semi-major and semi-minor axis ? If I have an arc length at the first quarter of an ellipse and I want to know the angle of it, what is the data that I will need it to use it and what is the exact method to use it?  Please take a look at this picture:    Actually I know how to determine the arc length of a ellipse . but I want to do the obverse.


I have the quadratic equation: $$4x^2 - 49$$  Using  $$\frac{b\pm\sqrt{b^2-4ac}}{2a}$$  I can factor the equation to  $$(x-3.5)(x+3.5)$$.  However, if I use   $$\frac{b\pm\sqrt{b^2-4ac}}{2}$$  I get 14, which I can then use the grouping method $$4x^2 +14x - 14x -49$$  to get an equivalent result of:   $$(2x-7)(2x+7)$$  Why does removing the $$a$$ from the denominator in the quadratic formula work to give me a number (this case 14), which I can then use to factor out the original quadratic equation?  Also, are there any benefits in solving the equation using the latter method? (the result to looks better to me)

This could be primary school stuff. But I want to ask it.  In factoring $x^2+bx+c$ (i.e. $a = 1$ in $ax^2+bx+c$), we find $m$ and $n$ such that $m+n = b$ and $mn=c$. We can reason this well as follows:     In the expansion of $(x+m)(x+n)$, $mx$ and $nx$ should add up to $bx$ and $mn$ should result in $c$.   However I am not able to come up with the logic for following: For factoring $qx^2+bx+c$ (i.e. $a \neq 1$ in $ax^2+bx+c$), we find $m$ and $n$ such that $m+n=b$ and $mn = ac$.    I am not able to realize the logic behind why it is $mn = ac$ and  how doing this result in correct factors


If you want to inform someone in advance to do something early enough so the person won't be in trouble later, do you say on time or in time? It's not a specified time, like order it today between 12 and 2, it's more of a better do it now than later suggestion?  What's right here?

Which one is correct:        Submit your work in time.   Submit your work on time.


I am new to Ubuntu, recently I installed it on my desktop (Lenovo), which was previously loaded with Windows. After trying it and comparing it with the previous OS, I definitely do not want to get back to Windows. I would also like to install it on my laptop Lenovo V330-14IKB, but surfing the web I found many commentaries reporting problems with Lenovo. Is it safe to install Ubuntu 20.04 on this laptop?

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


How can the action and reaction force be same.? And if so then how the colliding objects could further move as there net force is Zero.  Since F1 = - F2, that means that the force act on both sides and as there magnitude is same then undoubtedly there is no such net or derived force for which one could move further.

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


While I am studying maximum a posteriori, somehow it just came across my mind that if I have a uniform prior probability distribution, MAP looks like MLE, am I right?

I am studying different point estimate methods and read that when using MAP vs ML estimates, when we use a "uniform prior", the estimates are identical. Can somebody explain what a "uniform" prior is and give some (simple) examples of when the MAP and ML estimators would be the same?


How can I change the password for Ubuntu 17.10 encrypted disk?

Having installed Ubuntu 11.10 with whole disk encryption and LVM, I need to provide a way for users to easily change LUKS passphrase.  Preferably, this should be done using GUI tools, thus, enabling novice users to perform this basic task.


I've got a function that returns a column from a table. Now I want to make this rows from the column I returned into a single row .   CREATE PROCEDURE [dbo].[creareStringContract]     @numeTabela varchar(100),     @numeColoana varchar(100),     @valoareColana varchar(50),     @numeColoanaValori varchar(100) AS BEGIN     -- Declare the return variable here     DECLARE @str varchar(max) = ''      -- Add the T-SQL statements to compute the return value here     exec ('SELECT ' +@numeColoanaValori +'     FROM ' +  @numeTabela + '     WHERE  ' + @numeColoana +' = ' + @valoareColana )      -- Return the result of the function END GO  CREATE TABLE #tmp  (     ID int  IDENTITY (0,1),     IDContract int,     Valoare decimal  )      INSERT INTO #tmp VALUES (1,-500)     INSERT INTO #tmp VALUES (1,300)     INSERT INTO #tmp VALUES (1,250)     INSERT INTO #tmp VALUES (1,150)     INSERT INTO #tmp VALUES (1,50)     INSERT INTO #tmp VALUES (2,-900)     INSERT INTO #tmp VALUES (2,350)     INSERT INTO #tmp VALUES (2,300)     INSERT INTO #tmp VALUES (2,250)     INSERT INTO #tmp VALUES (2,200)     INSERT INTO #tmp VALUES (2,100)     INSERT INTO #tmp VALUES (3,-600)     INSERT INTO #tmp VALUES (3,280)     INSERT INTO #tmp VALUES (3,270)     INSERT INTO #tmp VALUES (3,160)     INSERT INTO #tmp VALUES (3,150)     INSERT INTO #tmp VALUES (4,-1500)     INSERT INTO #tmp VALUES (4,500)     INSERT INTO #tmp VALUES (4,400)     INSERT INTO #tmp VALUES (4,300)     INSERT INTO #tmp VALUES (4,250)     INSERT INTO #tmp VALUES (4,150)     INSERT INTO #tmp VALUES (4,100)     INSERT INTO #tmp VALUES (4,50)     INSERT INTO #tmp VALUES (4,30)     INSERT INTO #tmp VALUES (1,10)     INSERT INTO #tmp VALUES (1,5)     INSERT INTO #tmp VALUES (1,4)     INSERT INTO #tmp VALUES (1,3)     INSERT INTO #tmp VALUES (1,2)   Here is the sample data.  exec [creareStringContract] '#tmp','IDContract','1','Valoare'   Now this query result is .   Valoare -500 300 250 150 50 10 5 4 3 2   Now I want this to be resulted as   IDContract  (No column name) 2              -500,300,250,150,50,10,5,4,3,2

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


There are two alternatives I am considering as guard clauses to only allow some code to run if I have an object of proper type:  var targetObject = eventArgs.Value as MagicType;  if (targetObject != null) {     DoStuffWith(targetObject); }   or else:  if (targetObject is MagicType) {      // DoStuffWith(targetObject);  // not quite. Actually:      DoStuffWith((MagicType)targetObject); }   Looking at both alternatives, they seem pretty equivalent, but I know the operations (as vs is) are conceptually different.  So the question is: which one should be preferred? Is that choice dependent on scenario? And why?

When programming interfaces, I've found I'm doing a lot of casting or object type conversion.  Is there a difference between these two methods of conversion?  If so, is there a cost difference or how does this affect my program?  public interface IMyInterface {     void AMethod(); }  public class MyClass : IMyInterface {     public void AMethod()     {        //Do work     }      // Other helper methods.... }  public class Implementation {     IMyInterface _MyObj;     MyClass _myCls1;     MyClass _myCls2;      public Implementation()     {         _MyObj = new MyClass();          // What is the difference here:         _myCls1 = (MyClass)_MyObj;         _myCls2 = (_MyObj as MyClass);     } }   Also, what is "in general" the preferred method?


I'm creating a table dynamically with first row as textbox . HTML  <input type="button" id="btncreate" value="create" />

   Jquery  $(document).ready(function() {   create();   });   $(function() {   $('#btncreate').click(function() {       create();    });    $("#txtSearchPicklistNo").keyup(function() {      alert($(this).val());    });  });    function create() {    $('#htmltable').append("

");     var table = $('#htmltable').children();    table.append("
");    table.append("
");    table.append("SNo 	");    table.append("Picklist No	");     table.append("
");    table.append("
");    //   table.append($("").html('<input type="text" class="unitprice" name="unit_price" id="unit_price"/>'));    table.append("

	<input type='text' id='txtSearchPicklistNo'  style='font-size: x-small; height: 13px;' />

");   }   In the above javasript ,I have a create function which will create a table dynamically when user click on create button.In that table first row as a textbox which id as 'txtSearchPicklistNo'  The issue is keyup event is not firing when i call create function with in button click event $('#btncreate').click(function() {create(); });. but the same function is working as much as expected when it is called from $(document).ready(function() {create();});  Please check the fiddler also,   how do i fix this?

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.


Imagine I'm new to Stack Overflow and I create a new question that receives 10 downvotes. That means I should lose 10 x 2 reputation points.  Since a user starts with 1 rep on Stack Overflow, I understand I would have -19 rep. Is this so, or can a user's reputation never go below 0?

If a user is the type of person to consecutively get downvoted to potential negative reputation, so be it. What's the reasoning to maintain a minimum of one?  One reason that may justify this is of trying to not deter new users from the site who haven't read the FAQ and unknowingly and wrongly ask or answer a question. But most of us acknowledge this and not downvote in such a scenario.  So what's the reasoning behind this lower bound of 1?


I had this code but I do not Knew how I can add logout after x minutes of inactive in php  login page:  <html> <head> <title>login</title> </head> <body> <form action="page1.php" method="get" > ID:<input type="text" name="id"  /> Password:<input  type="password" name="pass" /> <input type="submit" value="login" /> </form> </body> </html>   get page:                                                    <html> <head> <title> get</title> <body> <?php session_start(); $get_id= $_GET['id']; $get_pass = $_GET['pass']; $_SESSION['user_id']=$get_id; $_SESSION['user_pass']=$get_pass; echo "welcome"; ?> </body> </html>   now I want this code logout after inactive 10 minutes

I need to keep a session alive for 30 minutes and then destroy it.


My daughter is almost 13 and she does not have a phone. I don't think she should have one yet but she says that all her friends have one, and that is true. She is responsible but I am not sure if I should buy her one yet because I want her to be safe on the Internet and on social media.  Currently I'm planning on getting her one when she turns 15 1/2 but she says that's too late.   Is there any good research on the effects of smart phones on adolescents of different ages? I'd like to make an informed decision I can talk to my daughter about.

It seems everybody and his cat has a smartphone today. (I'm guilty too.) My son will probably demand his own phone somewhere between the age of 7 and 12. I know I can't compare to when I was a kid because the world is completely different today. So how can I decide?     When should kids get their own cellphone? What factors are relevant for the decision? Smartphone, or plain cellphone? Why?


I don't know what to call these sentences that are often written at the end of questions, but here are some examples:   "Could anyone give me some explanations on this problem? Thanks a lot!" -  "Thanks in advance!" -  "Thank you and More Power!" -  "Please help" -  "any suggestions?" -    Is it OK for questions to contain these messages?  I've also seen some edits adding these, even when the original question did not have them. Is this OK as well?

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


I’ve been working on an animation. Due to the large quantity of animated objects (plus a keyframed cloth simulaion), I noticed that when I played through the animation, it went slow. Really slow - about 1 frame/second.  I figured this was just my computer being old and relatively small, so I went to Best Buy and got a liquid-cooled gaming desktop for $1300. I figured it would speed up things.  However, after setting everything up and running the same file through my new PC, I noticed very little change. While the Cycles rendering time is a bit faster now, the amount of time to bake a simulation or even play through the animation has shown little to no improvement on this fabled new desktop.   Is there something I’m missing? It couldn't just be that the animation is too complicated, because it shows no improvement from my old PC. If this is really all it can do, why is it $1100 more than my regular old laptop which functions exactly the same? Is it just not the right kind of computer for the stuff I'm doing?  Here’s a link to the .blend file (it’s kind of big):  2  Here are the PC specifications:  Operating System: Windows 10 Home 64-bit (10.0, Build 16299) Brand: iBuyPower  Chip type: GeForce GTX 1060 3GB  Graphics card: NVIDIA GeForce GTX 1060 3GB  Processor: Intel® Core™ i7-8700 CPU @ 3.20GHz (12 CPUs), ~3.2GHz  Memory: 16384MB RAM  Display Memory: 11138 MB  Available OS Memory: 16300MB RAM  Microsoft Graphics Hybrid: Not Supported  HDR: Not Supported  Any help would be greatly appreciated. Thanks in advance!

I've been trying to make this animation, and every where I've looked people don't have as low of fps.  I have a 16GB RAM computer with a new graphics card. (I'm able to play Mine craft and blow up a TNT town with Little lag) ( And I'm able to play counter strike at a constant 90 fps )  Example:


If $G$ is a group and $A\leqslant B\leqslant G$ then prove   $$[G:A] = [G:B]\cdot [B:A]$$   For finite groups the theorem is obivious and simple to prove. But for infinte groups it seems a lot harder.  I've tried the following:  Let $L_G(A)$ be the set of left cosets of $A$ in $G$, then we need to prove $$ |L_G(A)| = |L_G(B)|\cdot |L_B(A)| $$ I was thinking of a trying to find a bijection $\alpha$ between $L_G(A)$ and $L_G(B) \times L_B(A)$. It seems logical to choose something like this: $$ \begin{align*} \alpha: L_G(A) & \to L_G(B) \times L_B(A)\\ gA & \mapsto (gB, b_gA)  \end{align*}$$ But how can I choose this $b_g$?   I know that $L_B(A)$ partitions $B$, this means that for any $ga \in gB$ (since $A\leqslant B)$ then $\exists b_i$ such that $ga \in g(b_iA)$ and then using this $b_i$. But is this useful?

Prove the following: If $H$ is a subgroup of finite index in a group $G$, and $K$ is a subgroup of $G$ containing $H$, then $K$ is of finite index in $G$ and $[G:H] = [G:K][K:H]$.  So this is basically a bijective proof? The number of cosets of $H$ in $G$ equals the number of cosets of $K$ in $G$ times the number of cosets of $H$ in $K$ by the multiplication principle?   Reference: Fraleigh p. 103  Question 10.35 in A First Course in Abstract Algebra


I am on Ubuntu now,i downloaded unetbootin from their official website,downloaded the windows 7 ultimate iso image,formated the Pendrive with gParted to FAT32, burned it on my Pendrive(32GB),and i boot my pc from the pendrive the menu below shows up but there is only one option which is "Default"  Thank you in advance if you respond to my problem.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


I'm new in Drupal7, I created a webform using webform module and I created a template for my customised html e-mail with HTMLMail module that will be sent on webform submission. I want to put every value from the webform on a table but I don't know how to get the values entered in the webform on submission? For example I want a result e-mail like this  Hello, Thank you for your registration  Name:          "webform_name_field"  Last Name :    "webform_lastname_field"  Adress :       "webform_adress_field"   How can I get every value of my webform ??

I have the Webform 7.x-4.0-alpha6 version module enabled.  I have a Webform node with 20 form components. I added one email in Email Setting and I created the email template where I used the token: [submission:values].  Then I test the webform submitting a message. The problem is that [submission:values] print out the components values in a very plain way, no break line, no semicolon to make a difference between the title and the value for each component. Something like:  Name Jhon Addresss Myaddress 12  CP 19932 ....   Having 20 component make the email completely unreadable   My question is: Is there a way (a token) to print them in a better way, at least adding a semicolon between the title and value, and making the title bold ? or putting the output in a table?      Name: Jhon     Addresss: Myaddress 12      CP: 19932   I know that I can print out the components in a separated way using the tokens: [webform:{component}-title] for the title and  [webform:{component}-value] for the value  And then I can style them. But this is time wasting since I need all components to be shown in the email template  Update: I found this module but doesn't help me:


I reinstalled Ubuntu 16.04, then installed nvidia-current and run sudo dpkg-reconfigure xserver-xorg  rebooted and gets stuck in a login loop. My graphic card is GeForce 6150SE nForce 430. Can some help me solve the issue?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I installed ubuntu on my dad's laptop a year ago and I wanted to install another ubuntu based distro on his laptop . He has no cds or dvds so I thought about making  partition that would pretty much be a copy of the install cd.  I did the same thing on windows 7 and thanks to easyBCD it wasn't hard to pull off.  So far I tried to create a 1 gig partition with the EXT4 filesystem and extracted the contents of the iso onto that partition.   Do any of you guys know how I could make this work , or any alternative simple solutions?

I don't want to burn a CD, DVD or USB memory stick. And I don't care about saving the existing operating system (Linux Mint). I want to install Ubuntu (actually Kubuntu 12.04 LTS) to the computer directly from the ISO image. The image is for the Kubuntu Live DVD (3.5 GB).  The computer is now booted into Linux Mint. A set of command line steps would be satisfactory. In my mind, I simply need to trick the existing system into thinking I inserted a CD/DVD, right?  I know there is a similar question already but it does not have a good answer. The answer basically says, "see this link." I reviewed the link and I decided that StackExchange needs a good answer to this question. Furthermore, most answers at other places on the Internet assume the user is coming to Ubuntu from Windows. So I think this question is one that needs a good answer here. Thanks


I'm particularly curious why Google is not included, since their share price towers above all the component prices in the Dow 30.

I'm taking an investing and personal finance class in school. I was assigned to ask someone who knows about the stock market why big companies like Apple and Google aren't included the Dow Jones Industrial Average (DJIA) even though they're doing really well?     Ed. Note: After this question was originally asked, Apple joined the Dow Jones Industrial Average in March of 2015.


I'm confused about the behaviour to expect from a large sum of independent and identically distributed Poisson variables.   We know that a sum of $n$ Poisson variables of identical mean $\lambda$ is a Poisson variable of mean $n\lambda$. We also know from the Central Limit Theorem that if $n$ is large, this sum should be approximately normal of mean $n\lambda$ and variance $n\lambda$ as well.   Now, what if we set $n\lambda = 1$ for instance?  Does it mean that the $\lambda$ mean parameter cannot anymore be considered as finite when $n$ is large, so we cannot apply the CLT anymore? Because obviously, a $\mathcal{P}oisson(1)$ is different from a $\mathcal{N}(1,1)$...    Context: the concrete situation is from a model of evolution of DNA sequences:  we take a sequence of $n$ sites, and at each site, the number of mutations in a given time follows a Poisson distribution, but we know that over the whole sequence (e.g 200-1000 sites), the mean will be like 5 mutations in 1 million years. I feel like I can't apply the CLT, although in , the normality assumption is used to deduce confidence intervals.

in Wikipedia it says:  For sufficiently large values of $λ$, (say $λ>1000$), the normal distribution with mean $λ$ and variance $λ$ (standard deviation $\sqrt{\lambda}$), is an excellent approximation to the Poisson distribution. If $λ$ is greater than about 10, then the normal distribution is a good approximation if an appropriate continuity correction is performed, i.e., $P(X ≤ x),$ where (lower-case) $x$ is a non-negative integer, is replaced by $P(X ≤ x + 0.5).$ $F_\mathrm{Poisson}(x;\lambda) \approx F_\mathrm{normal}(x;\mu=\lambda,\sigma^2=\lambda)$  Unfortunately this isn't cited. I want to be able to show / prove this with some rigour. How can you actually say the normal distribution is a good approximation when $\lambda > 1000$, how do you quantify this 'excellent' approximation, what measures were used? The furthest I've got with this is  where John talks about using the Berry–Esseen theorem and approximates the error in the two CDFs. From what I can see he does not try any values of $\lambda \geq 1000$.


My system is based on x86(64-bit) and it has 8GB RAM. I have set reserve 100MB of 8GB using memmap=100M@0x40000000.  For this way does it guarantee to reserve the 100M of RAM? Can I access the 100MB of RAM using address 0x40000000 in both user and kernel space? Of course I understand to need translate the physical to virtual address.

I have a device that needs a block of memory that is reserved solely for it, without the OS intervening.  Is there any way to tell BIOS or the OS that a block of memory is reserved, and it must not use it?  I am using this device on an openSUSE machine.


I need to change the font size to 9 pt in particular for captions in tables. If 9 was not required I would have used caption package and would have used captionsetup and set the font to small. Can I use a similar setup with a particular font size like 9?  Here is a minimal example ():  \usepackage{ijcai17}% http://pastebin.com/LiATA1sV \usepackage{graphicx} \usepackage{amsmath} \usepackage{verbatim} \usepackage{booktabs} \usepackage{adjustbox} \usepackage{caption}  \begin{document} \section{Test} Test document  \begin{table}[h!] \centering \captionsetup{font=small} \caption{Classification accuracy of RF-Feature selection and RF-Default for 1s, 3s, 5s, 10s segment lengths} \label{table:3} \resizebox{0.47\textwidth}{!}{% \begin{tabular}{c||c|c|c|c} \toprule  & 1s & 3s & 5s & 10s\\ \hline 2-class RF-Default & $88.6\%$ & $97.38\%$ & $94.69\%$ & $99.03\%$ \\ \hline 2-class RF-Feature selection & $89.08\%$ & $95.17\%$ & $96.62\%$ & $99.03\%$ \\ \hline 3-class RF-Default & $68.38\%$ & $76.38\%$ & $80.10\%$ & $78.64\%$\\ \hline 3-class RF-Feature selection & $68.76\%$ & $76.97\%$ & $82.04\%$ & $81.55\%$\\  \bottomrule \end{tabular}% } \end{table}  \end{document}

I want to specify the figure caption font size in order to follow a stupid standard at my university. I need the font to be Arial (I am using Helvetica because Arial is not available for LaTeX) 11pt. I have found:  \usepackage[font=md,labelfont=bf]{caption}   I have defined Heveltica as the default font for the whole document, so this constrain is hold. However, I cannot specify the font size. Is there another way to solve this issue?


I am working with a directory where logs are constantly created. I use tail -f * in bash to view all the log entrys in the dir. However, when new files are created while the tail is running, the new files are not utilized by the tail. Is there a simple solution for that? Thank you!  EDIT: OS: SLES4SAP 12 SP2 3.0.101-63-default

I'm using RHEL 4.  The normal tail -F file_name*.log doesn't update when the time flips over to 0000.   Here's what I've tried so far from searching the web, both of which try to use nested tail:   tail -F $(ls -tr file_name*.log | tail -n 1)  tail -F $(fine . -maxdepth 1 -type f -printf "%T@ %p\n" | sort -n | tail n 1 | cut -d' ' -f 2-)  None of these flip over to new files. Plain old tail -F file_name*.log works in my small test cases (while the 2 above don't), but it doesn't work when I'm tailing a real log file.


How can I prove that all prime numbers have irrational square roots?  My work so far: suppose that a prime p = a*a then p is divisible by a. Contradiction. Did I begin correctly? How to continue?

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


im trying to do this probelm "Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contain any char."  However i am failing a few tests so i am wondering is there a better way of doing this?  public class XO {    public static boolean getXO (String str) {   boolean Boolean = false;     String[] x = str.split("x");     String[] o = str.split("o");     // Good Luck!!     if(x.length == o.length){     Boolean = true;     }     return Boolean;   } }

I have the string   a.b.c.d   I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner.  (Previously I had expressed this constraint as "without a loop", in case you're wondering why everyone's trying to answer without using a loop).