I got a new phone about a month ago but I haven't really installed the SE app on it because I've been on the web version quite often.  Two days ago I decided to install it where I usually access SO. I filter by tags then go to the question to read more about it.   If I either touch the back button or click on the back arrow in the top left, instead of being taken into the list of questions with the tag I've originally chosen, I get taken to the list of tags. What's more is that if I click on the same tag, I have to refresh the list in order to get a proper updated list of questions.  I don't recall this happening before. Has this issue been addressed? I'm using Galaxy S6, not sure if it might be phone specific.

Open the Tags page and select a specific tag(ex: Android) View the list of questions and open a question for more details. After answering the question press back button. I expect to go back to question list but Stack Exchange Android app is taking me to list of Tags.  This is very inconvenient. Every time either I have to press back key once more or select the tag and again move to the place where I was previously.


I want to prove that if $\alpha$ is a root of $x^{p^{d}} - x$ and $n=d\cdot s$, then $\alpha$ is also a root of $x^{p^{n}} - x$. So far I know that $x^{p^{d}-1} =1$ and I've tried this: $$x^{p^{n} -1} = x^{p^{ds}-1}$$ I have also tried: $$x^{p^{n}} = x^{p^{ds}} = (x^{p^{d}})^s=\alpha^s$$ but I can't conclude that $\alpha^s=\alpha$. Can someone help me?

I've only been able to resolve this far  $$ d \mid n \Rightarrow \exists l \in \mathbb{Z}\; \textrm{such that} \; n=dl \Rightarrow x^{q^n} - x = x^{q^{dl}} - x.$$  I can't move forward.


I would like to create realistic skin/organs by applying slight low-relief or embossed effect to a mesh surface as in this example, maybe from a grayscale image as reference (Note: the surface has a 3d texture and not just a standard flat image mapped over it.) Thanks for any Inputs!

I have a simple diffuse shader. I would like to add some bump to it. How can I do this in Cycles? Where do I plug in my checkered texture.


I noticed that my disk in my Linux ubuntu server is already full and one that's causing it is inside my /var/log folder.  I have these files inside my /var/log:    I don't know what files are these, but are these safe to delete?  There's a bunch of alternatives.log.x and other .gz files. Can i delete those?  Thanks.

( deals with a similar issue, but it talks about a rotated log file.)  Today I got a system message regarding very low /var space.   As usual I executed the commands in the line of sudo apt-get clean which improved the scenario only slightly. Then I deleted the rotated log files which again provided very little improvement.  Upon examination I find that some log files in the /var/log has grown up to be very huge ones. To be specific, ls -lSh /var/log gives,   total 28G -rw-r----- 1 syslog            adm      14G Aug 23 21:56 kern.log -rw-r----- 1 syslog            adm      14G Aug 23 21:56 syslog -rw-rw-r-- 1 root              utmp    390K Aug 23 21:47 wtmp -rw-r--r-- 1 root              root    287K Aug 23 21:42 dpkg.log -rw-rw-r-- 1 root              utmp    287K Aug 23 20:43 lastlog    As we can see, the first two are the offending ones. I am mildly surprised why such large files have not been rotated.  So, what should I do? Simply delete these files and then reboot? Or go for some more prudent steps?  I am using Ubuntu 14.04.  UPDATE 1  To begin with, the system is only several months old. I had to install the system from scratch couple of months back after a hard disk crash.  Now, as advised in ,  I first checked the offending log files using tail, no surprise there. Then, for deeper inspection, I executed this script from the .  for log in /var/log/{syslog,kern.log}; do    echo "${log} :"   sed -e 's/\[[^]]\+\]//' -e 's/.*[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//' ${log} \   | sort | uniq -c | sort -hr | head -10 done   The process took several hours.  The output was in the line of,   /var/log/syslog : 71209229  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688 53929977  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 17280298  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 54763121030042024)        <snipped>  /var/log/kern.log.1 : 71210257  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 71209212  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 954763121030042024)    (/dev/sda3 is  my home directory. As we can find,   lsblk /dev/sda NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 931.5G  0 disk  ├─sda1   8:1    0 122.1G  0 part / ├─sda2   8:2    0   7.6G  0 part [SWAP] └─sda3   8:3    0 801.8G  0 part /home    Why a process will want to write beyond the limit is actually outside the scope of my comprehension. Perhaps I will want to ask a different question in this forum if this continues even after a system update.)  Then, from  (you may want to check  for a deeper understanding), I executed,   sudo su - > kern.log > syslog   Now, these files have zero sizes. The system is running fine before and after a reboot.   I will watch these files (along with others) in the next few days and report back should they behave out-of-line.  As a final note, both  the offending files (kern.log and syslog), are set to be rotated, as inspection of the files (grep helped) inside  /etc/logrotate.d/ shows.  UPDATE 2  The log files are actually rotated. Looks like the large sizes were attained on a single day.


How to sort each row individually in a large database (Excel 2010)?  The "sort" function doesn't provide that option for rows.  I have more than 1,000 rows to sort this way. The solution posted  would require me to set up a sort for each row individually, which is unreasonable. Is there another way to do this?

Assume school language learning exercise, based on making right order of words in a scrambled sentence.    Then put numbers into the next row, specifying the order the words should be in. Now select the 4×2 rectangular area, complete with the numbers.    Right click. Arrange according numbers from low to high.  How? (make influence of arranging by lately added random numbers)


I had just installed ubuntu on virtual box, booting it first time took me to a black screen, it also has a horizontal text line, although whatever I type nothing happenes

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


You look beautiful  "Beautiful" is an adjective here. We often use "adverbs" to modify "verbs". Here the verb is "look" and instead of an adverb, we have an adjective "beautiful". Shouldn't it be:  You look beautifully  ? Two other examples are:  I work hard (instead of hardly) He looks handsome (not handsomely)  Do the adjectives work as adverbs here or it is another grammatical construction that I don't know?

That cake looks good.    In formal proper grammar, may good (adjective) get used as an adverb? Or, may you read it as, That cake (noun phrase, nominal[?], argument[?]), looks (verb, predicate[?]), good (subject compliment[?].? How may I discern this, grammatically?


I want to convert my old 32 bit HP netbook with no CD drive to Umbuntu linux. I am a newby but worked in UNIX 28 years ago.

I would like to see a full how-to guide on how to install Ubuntu.


I was intending to type something like   use_aesni = True in latex.  Therefore, I type $use_aesni = True$. However, it becomes this.

How can I produce the text Word_one_two in LaTeX?  I tried:  Samp\_Dist\_Corr   But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing:  \texttt{Samp\_Dist\_Corr}   I find it looks a bit like the underscore is merging in to the bottom of the "D", but maybe it's just because of the typewriter D?


When I type 4.1-0.1 into the javascript console in my browser (Chrome), or anywhere else in my code, it always returns the number 3.9999999999999996. I have also tried this in Firefox, and got the same result. I don't know if this is only my computer, or if this applies to all javascript, or if it's something simple I am overlooking. Also, sorry if this is a duplicate. I couldn't find any other situations like this, but I might not have been looking for the right thing.

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


The following is a rather simple question, yet somehow I failed to find a solution online.  Let's say for example we want to draw a three-dimensional coordinate system:  \documentclass{article}  \usepackage{tikz} \usepackage{amsmath,amssymb}  \usepackage{blindtext}  \begin{document}      \fbox{     \begin{tikzpicture}         \coordinate (O) at (0,0);          \draw[->] (O) -- (90:1);         \draw[->] (O) -- ++(0:1);         \pgfmathparse{sqrt(0.5)}         \draw[->] (O) -- ++(45:\pgfmathresult);          \node[shape=circle, draw=red, scale=.5, very thin] (mark) at (O) {};     \end{tikzpicture}     }  \end{document}      The red circle marks the problem. If you compile the document yourself and zoom far in, you'll see that the axes are not connected---a little notch is missing!  Is there a way to connect these three paths so that we get a "full corner"?

Questions:   Why are the top corners of this number line missing? Why aren't the bottom corners or any other corners of this number line missing? How do I ensure the corners are always there?     \documentclass{article}  \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry} \usepackage{tikz}   \begin{document}  \begin{tikzpicture}[line width=0.08cm]  \draw (0,0)--(5,0); \draw (0,0.3)--(5,0.3);  \foreach \x in {0,...,5}  {  \node at (\x,-0.55) {\x};  \draw (\x,-0.3)--(\x,0.3);  }  \foreach \x in {0,...,5}  \draw (\x,0)--(\x,0.3);  \end{tikzpicture}  \end{document}   That code yields this:


I'm locked out of my tablet because I can't remember what my screen lock pattern is. How do I reset factory settings if I can't get into the tablet? please help this is all new to me

My son has an impression tablet 10 and has forgot the lock pattern. How can we reset it without knowing the code?


The public component of SSH keys theoretically don't need to be kept private. It was therefore to my surprise that I was unable to read the public key of another user on the system:  andreas:~$ cat /home/bob/.ssh/id_rsa.pub cat: /home/bob/.ssh/id_rsa.pub: Permission denied   The permissions of the key file allow me to read the id_rsa.pub file (644), the problem is the .ssh directory has the permission 700.  Is there any system in place for listing the public keys of other users on the system without having to be root or logging in as each user individually?

It took me hours to solve this SSH problem with one of my class accounts on my school's servers.    I couldn't ssh into one particular class account without entering my password, while passwordless authentication worked with my other class accounts. The .ssh/ directory and all of its contents had the same, correct permissions as the other class accounts.   Turns out the problem was the permissions set on my own home directory. Passwordless authentication did not work when the permissions on my HOME directory were set to 770 (regardless of the permissions set for .ssh/), but it worked with permissions set to 755 or 700.   Anyone know why SSH does this? Is it because the home directory permissions are too permissive? Why does SSH refuse to authenticate with the public/private keys when the home directory is set more permissive than 700?


I know there's the a syntax you can use, like:  grep -oP '.word1.*?word2'   but this doesn't work on multiple lines. So here's an example input:  user1:x:1001:1001::/home/user1home:/bin/bash user2:x:1002:1002::/home/user2home:/bin/bash user3:x:1003:1003::/home/user3home:/bin/bash user4:x:1004:1004::/home/user4home:/bin/bash   The command I tried to use was:  grep -oP '.1002:1002.*?user4home'   My desired output would be something like this:  1002:1002::/home/user2home:/bin/bash user3:x:1003:1003::/home/user3home:/bin/bash user4:x:1004:1004::/home/user4home

More often that I like to admit I look for a file that contains some strings.  Currently I do:  grep -rl string1 | xargs grep -l string2 | xargs grep -l string3   Is there a tool that does this prettier?  This greps for string1 or string2 or string3.   grep -rl -e string1 -e string2 -e string3   I want files that contain string1 and string2 and string3 but not necessarily on the same line.  Maybe one of the modern greps (ag/ack/rg/sift) can do this?


How can I get a monochrome desktop background? The context menu on the desktop background contains "Change background..." accessing the Settings section "Background". I can select one of multiple images as background, and can also add additional pictures. But I would like to make the background show a single solid color. Ideally I would like to be able to select this color. How to set the background color of the desktop? I do not see UI to do that, and also no UI elements to discover the option in other places of the UI. (It irritates me, because it is a feature that suggests itself.) See  on how to do it manually.

There was an option to change background to solid color. However, I notice that that option is no longer there. The only options available are to use existing image or to add picture. Was this setting moved to somewhere else?  Here are some of the option available in the previous version Ubuntu Studio 18.04 64-bit  Look at the solid colour settings there


I realize swift actions came out after the PHB was printed, but how can we reconcile them with this part from the PHB:     If you move no actual distance in a round (commonly because you have swapped your move for one or more equivalent actions, such as standing up), you can take one 5-foot step either before, during, or after the action. - page 138   So if I have the Travel Devotion feat or the Sudden Leap maneuver, can I both move an actual distance (swift action) and use a 5-foot step?  I guess this was addressed in one of the later publications, but where?

Can you using these three feats, take more then one five foot step per round?   From Robilar's Gambit:     In return, they provoke attacks of opportunity from you each time they swing   From Evasive reflexes:     When an opponent gives you a chance to make an attack of opportunity, you can instead immediately take a 5-foot step.   In RAW you can only make one 5-foot step per turn, this does not specifically state that you can take more but this suggests that you can.   If this combination doesn't, would the stance Shifting Defense from setting sun work?     While you are in this stance, you can make an immediate 5-foot step each time an opponent attacks you. Moving in this manner consumes one of your attacks of opportunity in the current round


See the title. I have no clue how this can be done. Gut feeling tells me it probably diverges? But since this is math, unfortunately gut feelings don't count... Can someone give a hint? I want to try to work this out myself.

Prove or give a counterexample to disprove the following statement about series of real numbers:  If $a_k > 0, s_k = a_1 + \cdots + a_k$ and $b_k = a_k/s_k$ then $\sum a_k$ and $\sum b_k$ either both converge or both diverge.


Started cooking chicken in crock pot at 4 pm. I cooked until midnight.husband came downstairs and unplugged it. It cooled on the counter until 8 a.m. this morning is my chicken still good? Or can I reboil it and making it a chicken salad?

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


I have a textbox that I change values in depending on what's selected in my DropDownList. So far so good.  But when I want to get that text to code behind it retrieves nothing. This is because the server textboxcontrol have not changed its state or information within it.(I know the problem, not the solution)  The question is, how can i get the text that updates with javascript in codebehind? (I will submit a code example below) (NOTE: this is not my code, its just a simplified example)  <asp:Panel ID="AnswerPanel" runat="server" >    <asp:TextBox ID="tbxExample" runat="server" ></asp:TextBox>                 </asp:Panel> <asp:Button ID="btnSend" onClientClick="Example" runat="server" Text="Send" />   Jquery:  function Example{     $('#tbxExample').val("Test"); }   CodeBehind  string ex = tbxExample.Text; // I want it to say "Test", but it comes out as ""

I am attempting to set a value in a textarea field using jquery with the following code:  $("textarea#ExampleMessage").attr("value", result.exampleMessage);   The issue is, once this code executes, it is not altering the text in the textarea?  However when performing an alert($("textarea#ExampleMessage").attr("value")) the newly set value is returned?


In viewport is it possible to cull backfaces of wireframes? (To make wireframes disappear while looking through the back side of the polygons.)   It is confusing to work with overlaping wireframes. So far I could only find the solution to hide and show the oposite side of the object while constructing the topology which is not so productive.   Thanks for your reply Cegaton. That reduces the confusion a lot. I can't beleive I missed it. Though I still need to ask if I can hide the object's frontal wireframe faces behind the sculpted arm as seen below. It would help to see the details on the object more clear while deciding to add geometry.

I changed my Blender Units to Metric System, but when I'm building things, my meshes are transparent, i.e. I can see through faces like in wireframe even though my wireframe is turned off. All faces have a light white in non-wireframe mode, but I can still see through them.   How do I reverse this?  Another issue I get is this    Looks like clipping is not working properly.


Good morning, is there a way to convert image formats such as PNG, JPG to PDF using the terminal? Would appreciate an answer very much.

Is there any way to batch convert .jpg files into single .pdf files?


If R1 is reflective and not transitive, R2 is transitive but not symmetric and R3 is symmetric but not reflexive. We need to find an example of a set S and the three relations R1 R2 R3.

The question is to find an example of a set $S$ and three relations $R_1$, $R_2$, and $R_3$ on it, such that $R_1$ is reflexive but not transitive, $R_2$ is transitive but not symmetric and $R_3$ is symmetric but not reflexive.  This is what I have done:  Let set $S=\{a,b,c,d\}$ and the three realations are as follows:   $R_1 = \{(a,a),(b,b),(c,c),(d,d)\}$ $R_2 = \{(a,b),(b,c),(c,d)\}$ $R_3 = \{(a,b),(b,a),(c,d),(d,c)\}$   If there is a set which is wrong and not satisfying what is needed can anyone help?


Take a bounded domain $S$ in which an explosive device is located. A team is deployed to find and disable the device before time $t^{*}$, when it will explode.   There are certain constraints in place. The domain $S$ is partitioned into subdomains $i$, with $i \in {1, . . . . , n}$. Each subdomain can be searched and re-searched in any order, but each search must last for the same length of time $t^{*} /t$, for some positive integer $t$. A priori before the search is began, there is a probability distribution assigning a probability $p_{i}$ to the event of explosive device being in subdomain $i$. Given that the device is in $i$, the probability of finding the device there is $q_{i}\in  [0, 1]$, and these conditional  probabilities may vary from one subdomain to another and are independent of each other across subdomains.  How to design the sequence of subdomain searches to get the maximum probability of finding the device by time $t^{*}$?  My attempt at a solution. The order of searches does not matter. Suppose that  subdomain $1$ is searched for all time. Fix some $t$. Then the number of searches in total is $k = t^{*}/t$ (where we take $k$ to be the floor function if $t^{*}/t$ is not an integer). Let $A_{1}$ be the event that device is found in $1$. Let $B_{1}$ be event that the device is in $1$. Then  $$P(A_{1}) = P(A_{1}|B_{1})P(B_{1}) = \sum_{l=1}^{k} (1-q_{1})^{l-1} q_{1} p_{1}.$$  And at this point, I don't know how to proceed at all. This looks like a "knapsack problem" to me, but I have no idea what to do. Further, I am not sure  if my expression for probability so far is correct.   To clarify, I am not sure if the probabilities $p_{i}$ are always fixed, or must they change depending on the outcome of the previous subdomain search. For example, suppose $q_{i}=1$ for some $i$, but the search there does not reveal the device - then surely $p_{i}$ must change?

Suppose there are $n$ bags, each one contains various numbers of balls of differing sizes.  A white ball, of certain size, distinct from all other balls in the bags, is thrown into one of the bags, randomly selected with probability $p_{i}$ ( so that $\sum_{i=1}^{n} p_{i} = 1$).  The probability of picking this white ball, from bag $i$, conditioned on the ball being thrown in that bag $i$, is $c_{i} \in [0,1]$. The probabilities $c_{i}$ may vary from bag to bag, depending on the size and number of other balls there. Note that here the closed interval $[0,1]$ is given for $c_{i}$ as it could be that the white ball is so small compared to the other already present balls in bag $i$, that the chances of picking it out are essentially zero, while on the other extreme, bag $i$ could be empty beforehand.  I have $k$ tries to pick out a white ball from the bags. Here $k \geq n$. I can pick a ball from any of the bags in any order, and I can re-pick a ball from any of the bags as many times as I want (up to maximum $k$ in total). I stop when I first pick out a white ball. After each try that is unsuccessful, I replace the ball in the same bag.    For example, if $n=3$ and $k=6$, a possible sequence of bags I pick from, assuming that I only get a white ball on last attempt (or that I don't get the white ball at all) could be $3, 1, 3, 2, 2, 3 $. Another possibility could be $1,1,1,1,1,2$, etc.  My question is: how do I devise a strategy for the number of tries for each bag, so that the probability of me picking out a white ball in $k$ attempts or less is maximised?


When we express acceleration in plane polar coordinates, we can find that $\vec{a}= \left(\ddot{r} - r \dot{\theta}^2\right)\hat{r} +  \left(r \ddot{\theta}-2\dot{r}\dot{\theta}\right)\hat{\theta}$. Here, the first term indicates the radial acceleration and the second term indicates the centripetal acceleration.  Books say that the third term is the rate of change of tangential speed(?) and the fourth term is coriolis acceleration.        From the book An Introduction to Mechanics by D. Kleppner and R. Kolenkow.   Now, the book says that the coriolis acceleration in our expression here is a real one.  Can anyone explain me the true meanings of the third and the fourth terms with physical interpretations ?

While reading this document on Coriolis effect , I saw the followig sentence     Two kinematic effects each contribute half of the Coriolis acceleration: relative velocity and the turning of the frame of reference.    And this is the reason why Coriolis term has that factor $2$. Unfortunately it does not specify anything about this two causes. Does anyone have some further explanation for how "relative velocity" and "turning of the frame" actually give rise to the Coriolis term?


I have got here an installation of Unity and I am annoyed with the 3 disk icons in the Launcher right below the workspace switcher. Is there a way to prevent these icons from showing?    Those 3 icons right above the trash.

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


0% [Connecting to mirror.sov.uk.goscomb.net (2a01:348:0:36::aaaa)]   I keep getting this message in the terminal when attempting to update in Ubuntu 16.04. I've never had this problem before in ten years! I've tried reinstalling but it didn't help.

This is the terminal message I keep getting when trying to update via: sudo apt-get update  $ sudo apt-get update [sudo] password for petros: Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   How can I solve it?


Is English the only language where "I" is always capitalized, no matter where it occurs in a sentence? The other two languages that I'm familiar with don't do this.  In German, "ich" is only capitalized at the start of a sentence; the same is true for "yo" in Spanish.  If English is unique in this regard, or even if among a subset of languages that do this, is there a historical reason behind it? A philosopical or cultural one, or...???

Why should we capitalize the first person pronoun 'I' even when it does not appear at the beginning of a sentence? Why is it not the case for other pronouns?


You can usecommand+Q on Mac to write codes. But you can't usecommand+Q or control+Q to quote something, is there a hotkey to quote something on Mac keyboard?

The keyboard shortcuts for bold and italics on SO et al is incorrectly implemented on Mac, IMHO.  On Mac, we use the ⌘ key to invoke keyboard shortcuts. However, on SO, I have to remember to use control.   Can we get the ⌘ for keyboard shortcuts implemented please?


I'm using 4.4.2 so ES explorer can't write to SD card. I intend to give the app root permission permernently (like system apps) and then unroot the device. Is it possible to do so?

I have an application that needs root permissions to run.  No biggie, all of my personal devices are rooted, so I am very comfortable with the process. The problem is that this application is to be used on company owned devices issued to certain employees and I don't want them to be able to uninstall the application nor do I want them having root access to the device.  I was thinking that the following process would accomplish my goals:   Root the device Install my app as a system app Launch the application and grant su rights to it Unroot the device   Since it would be a system app, and the device wouldn't be rooted, users would be prevented from removing the app.  What I am unsure of is whether or not that application would retain its root privileges once the device is unrooted?   Any feedback or insight would be greatly appreciated!


I have passed argument to myscript.sh that returns a value in variable m. Problem is that I am  not able to pass shell variable (runvalues) to awk script that search for a pattern. Therefore value of m is NULL always runvalues=2; m=$( awk -v d="$runvalues" '/internal=d/{p=NR} p && /Cp=/{print FILENAME; exit}' $1) ;   I run script as myscript.sh file1.txt, where file1.txt contains runvalue internal=1  runvalue internal=2 runvalue internal=3

I have a text file with tab-separated columns which I'd like to process using awk. Here's an example of such a file: size=1\tname=foo\tweight=1.2 weight=2.5\tname=bar\tsize=2  What I want to achieve is to normalize the numeric value in columns whose content is like $field_name=<number> to four decimal places and keep the rest as is. Here, $field_name is a shell variable that is passed to awk and I'd like to use its value inside a regex. Here's a snippet (which is not working of course). I'm particularly interested in fixing line #5 in the following awk script and not solutions using other tools, such as sed, perl, python, etc. $ cat "${file}" \                                       # 1     | awk -F "\t" -v field_name="${external_var}" '     # 2       {                                                 # 3         for (i = 1; i <= NF; i++) {                     # 4           if ($i ~ /$field_name=[0-9]*.?[0-9]+/) {      # 5             split($i, kv, "=")                          # 6             $i = sprintf("%s=%.4f", kv[1], kv[2])       # 7           }                                             # 8         }                                               # 9         print $0                                        # 10       }'


There's a few similar questions which I tried to work out the answer from, but so far I have been unsuccessful. Please advise how I can always redirect http to https (and also remove www. from the hostname in the process). Also a side note, it would be nice to do this inside the main Apache conf rather than .htaccess - but I imagine this will not apply to most people.      Update: I've added this snippet to a VirtualHost section: RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^.*$ https://%1/$1 [R=301,L]  ... but it has no effect when I access http://www.domain (it should redirect to https://domain) Update 2: It had no effect because I did not use RewriteEngine on - so it works now: RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^.*$ https://%1/$1 [R=301,L]

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.


So, I am not taking physics in school, but I do have an interest in it, and I was wondering, in the standard model, all of the force carrying particles (photons, Z Bosons, W Bosons, gluons, and (hypothetical) gravitons) give a separate type of force. Those being the electromagnetic force, the weak nuclear force, the strong nuclear force and gravity. What my question is, is how do these particles give their force and why do they give different forces? What differences are between the particles that they give different forces? For example why does a photon give the electromagnetic force while a gluon gives the strong nuclear force? I am not asking why particles carry force, I am asking about how they give that force to other particles.

Pardon me for my stubborn classical/semiclassical brain. But I bet I am not the only one finding such description confusing.  If EM force is caused by the exchange of photons, does that mean only when there are photons exchanged shall there be a force? To my knowledge, once charged particles are placed, the electromagnetic force is always there, uninterruptedly. According to such logic, there has to be a stream of infinite photons to build EM force, and there has to be no interval between one "exchange event" to another. A free light source from an EM field? The scenario is really hard to imagine.  For nuclei the scenario becomes even odder. The strong interaction between protons is caused by the exchange of massive pions. It sounds like the protons toss a stream of balls to one another to build an attractive force - and the balls should come from nothing.  Please correct me if I am wrong: the excitations of photons and pions all come from nothing. So there should be EM force and strong force everywhere, no matter what type of particles out there. Say, even electrical neutral, dipole-free particles can build EM force in-between. And I find no reason such exchanges of particles cannot happen in vacuum.   Hope there will be some decent firmware to refresh my classical brain with newer field language codes.


My flight from Delhi to London with Virgin Atlantic was delayed by more than 5 hours on Thursday 18th April. I am trying to get the official takeoff and landing time for this flight but can't find it any more. Virgin have told me that they were delayed because they only knew that Pakistan Airspace was closed 4 days prior to the flight, but in reality they had been avoiding it since it was 1st closed in Feb 2019. There was an additional delay for technical reasons hence the 5 hours delay.

The question  only deals with flights in the US sourced from the  . Is there some similar source for EU, Asia etc?


Does $f(f(f(x)))=x \implies  f(x)=x$? Is it necessary for it to follow? How do we prove this? Do we have to substitute some special $x$? Or is it some other consideration of its properties?  Edit: does it follow in the special case when f is surjective? Or would we wind up with the same thing?

Consider the mapping $f:x\to\frac{1}{x}, (x\ne0)$. It is trivial to see that $f(f(x))=x$. My question is whether or not there exists a continuous map $g$ such that $g(g(g(x)))\equiv g^{3}(x)=x$? Furthermore, is there a way to find out if there is such a function that $g^{p}(x)=x$ for a prime $p$?    Edit: I realise I was a little unclear - I meant to specify that it was apart from the identity map. The other 'condition' I wanted to impose isn't very precise; I was hoping for a function that didn't seem defined for the purpose. However, the ones that are work perfectly well and they certainly answer the question.


I am currently using a Samsung S6. Today I backed up all of my data with the app "Titanum Backup". After backing up all of the data, I transferred the folder of Titanium Backup to my Google Drive. Afterwards, I restored my phone. Then I installed Titanium Backup. However, I don't know where I need to import the folder "Titanium Backup" for the app to restore the the data. I saw many YouTube videos, and their restore was in a SD Card. However, the S6 doesn't have an SD card. Can someone please help me? Thanks.

I flashed new firmware and before doing so backed up apps and data with Titanium Backup. How do I restore? I have the folder on my PC which contains two .gz files and a properties file.


Default constructor is defined for "Class" and for "Struct". But If I declare a class "Point" which has only 1 constructor, and that too a parametrized one, the compiler would not allow me to write   Point p = new Point()   However, If I have a struct "Point", which again has only 1 parametrized constructor, the compiler will allow me to write   Point p = new Point()   The question I am asking is why the compiler allowed struct to create an object and stopped the class to create an object?  Note: I am writing this code on C# 6

In .NET, a value type (C# struct) can't have a constructor with no parameters. According to  this is mandated by the CLI specification. What happens is that for every value-type a default constructor is created (by the compiler?) which initialized all members to zero (or null).  Why is it disallowed to define such a default constructor?  One trivial use is for rational numbers:  public struct Rational {     private long numerator;     private long denominator;      public Rational(long num, long denom)     { /* Todo: Find GCD etc. */ }      public Rational(long num)     {         numerator = num;         denominator = 1;     }      public Rational() // This is not allowed     {         numerator = 0;         denominator = 1;     } }   Using current version of C#, a default Rational is 0/0 which is not so cool.  PS: Will default parameters help solve this for C# 4.0 or will the CLR-defined default constructor be called?     answered:     To use your example, what would you want to happen when someone did:   Rational[] fractions = new Rational[1000];       Should it run through your constructor 1000 times?   Sure it should, that's why I wrote the default constructor in the first place. The CLR should use the default zeroing constructor when no explicit default constructor is defined; that way you only pay for what you use. Then if I want a container of 1000 non-default Rationals (and want to optimize away the 1000 constructions) I will use a List<Rational> rather than an array.  This reason, in my mind, is not strong enough to prevent definition of a default constructor.


The below code is for validating email. I am getting false for inputs like,   mike@gmail.com  kid@gmail.com  stain@yahoo.com   Can someone point what mistake in the code?         function validate(){     fieldValue = document.getElementById("check").value;     pattern = new RegExp(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/);            if(pattern.test(fieldValue)){         alert("true");     } else {         alert("false");     }        }     Thanks

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I know how to find the roots to the equation $z^n=w$, for $n \in \mathbb{R\setminus\{ 0\}}$ (by writing $w$ as $re^{i(\theta+2k\pi)}$), and taking the nth root of both sides, which I'm perfectly happy with, since $r^{1/n}$ is easy to find (with a calculator), as is $\frac{\theta+2k\pi}{n}$.  But what happens when we want to solve the equation $$z^t=w \tag{*}$$ for $t \in \mathbb{C}$?  e.g. how would one go about finding all roots of $$z^{2+3i}=1+i?$$  Obviously, it's not simply a case of writing $1+i$ in polar form and then taking the $(2+3i)$th root of $1+i$, since we don't know what $$\left| 1+i\right|^{1/({2+3i})}=\sqrt{2}^{1/(2+3i)}$$ is (or, even, that it exists).  Any ideas?  Short version: how do I find $t$th roots of a complex number for $t \in \mathbb{C}$?  Also, is there any way that we can determine how many roots this $(*)$ will have?

Can someone explain to me, step by step, how to calculate all infinite values of, say,   $(1+i)^{3+4i}$?   I know how to calculate the principal value, but not how to get all infinite values...and I'm not sure how to insert the portion that gives me the other infinity values.


i managed to show that $a$ is a even (suppose it is, and then show that $2|a^n+1$) for the second part, I understand it has something to do with fermat numbers but couldn't solve. please help

If $2^n+1$ is prime how to show that  $n$ must be a power of $2$  Being at elementary level I am at a loss what to begin with?


I have a system that will make a new button for a forEach(). Here is the code for that:  r.forEach(room => {             socket.on('chat message', (m, i) => {                 let li = $(`<li><button id="${m[i]}">${m[i]}</button></li>`)                 $('#events').append(li)             })         });  How would I make a .click() listener for each button?

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.


From admittedly fairly limited research I noticed that all corded circular saws have blade on the right of the handle, whereas battery operated ones have the blade on the left. What is the reasoning behind that? Ok, so in light of the comments: somehow, all the saws I came by so far follow this pattern, this is why I asked. Let me ask this then: why are blades on different sides then? I guess the last edit makes this question a duplicate of this:

At the moment considering the purchase of a circular saw for light work. I'm looking at a corded model and a cordless model. But the question I have is not about which one is better.   My question today is why the corded one has the blade on the right of my hand and the cordless one has the blade on the left of my hand. See both models below.     Now, I know some manufacturers make left- and right-handed versions of their circular saw. And I'm also aware that 'worm drive circular saws' usually have the blade to the left of my hand. But it seems odd to me. Especially as it seems to apply to most manufacturers too.   Was wondering if somebody has an explanation for this.


Since ubuntu 17.10, my scripts don't work the same way they used to do:  cd a*   would change directory to the first directory beginning with a. Now, I get this error:  bash: cd: too many arguments   I guess it now detects multiple arguments due to the multiple directories beginning with a and throws an error. How could I change the behavior of cd to the old way?

I just upgraded my Ubuntu 16.04 to 17.04 and found a little problem with cd command.  Let's say that I have two folders: album-01 & album-02  In Ubuntu 16.04, if I do cd album* it will go to the first folder found album-01  But in new Ubuntu 17.04, if I do cd album* it result me -bash: cd: too many arguments  How to make cd in Ubuntu 17.04 like cd in Ubuntu 16.04?


I was asked the same by my friend.  I said that gravitational attraction also occurs for high energy particles .  My friend said photon is not so very high energy particle which I found on net. He said some of light gains mass after event horizon and gets pulled. I said that the space time is bent due to huge mass of the black hole. So light has to take bigger curved paths so the light does not come back. Why does not light gets exactly come back from black hole ?

In  (ignoring Hawking radiation), why is a  black? Why nothing, not even light, can escape from inside a black hole? To make the question simpler, say, why is a  black hole black?


Let $K$ be some field and $A, B \in M_n(K)$. Prove that: If $B$ is nilpotent and $AB=BA$ then $\det(A+B)=\det(A)$.   I believe there is a nice solution . However, it seems that this problem could be solved using Jordan Canonical Form of the matrices. I am wondering how. Could anyone give me a hint?

Assume that the matrices $A,\: B\in \mathbb{R}^{n\times n}$ satisfy  $$ A^k=0,\,\, \text{for some $\,k\in \mathbb{Z^+}$}\quad\text{and}\quad AB=BA. $$  Prove that $$\det(A+B)=\det B.$$


I have recently bought an eclair and I'm not sure if I should eat it as it has been sat on the side for a good hour and a half/two hours. Please HELP!!

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


I have a photo of a German youth soldier who was captured by American forces somewhere in the Ruhr area in March 1945.   Can you give me some details as to who the young German soldier boy is?

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


I'm trying to create a bootable cd from a mac (running computer) to use to boot and install ubuntu to my pc (not running computer).  Any 'how-tos' or tutorials that can help me?

Not sure if the title is specific enough, so here we go:  I crashed my Windows pc, and now I want to install Ubuntu on that computer. I'm currently using my Mac, as it is the only operable computer I have left. I have downloaded the .iso. I guess my question is; How do I go about installing Ubuntu on my crashed computer from the external harddrive? I've used Ubuntu before, but I used to install it from a CD-rom. I tried reading the instructions, but couldn't really understand them. Please help  Edit: As Tom mentioned, I only want to install Ubuntu on the (formerly) Windows machine.  Anyways, thanks for the quick responses, I think I've got it from here. Cheers


I would like to draw a tape in tikz with a multiline label in it. The normal way of just using \\ doesn't work here.  MWE  \documentclass[tikz,border={5pt}]{standalone} \usetikzlibrary{shapes.symbols,shapes.geometric} \tikzset{ multidocument/.style={ shape=tape, draw, fill=white, tape bend top=none } } \begin{document} \begin{tikzpicture} \node [multidocument]{Multi line\\Label}; \end{tikzpicture} \end{document}

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE).  Is there a way to make lines break automatically at some specified width?  And can I control the alignment of the text (left, right, centered, justified)?  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {First line\\second line}; \end{tikzpicture} \end{document}


We can always view alias value by using alias command. wolf@linux:~$ alias al='grep "$1" file.txt' wolf@linux:~$ alias al alias al='grep "$1" file.txt' wolf@linux:~$   Unfortunately, grep doesn't work with alias. Not sure what was the problem. If you know the problem and solution, please let me know. wolf@linux:~$ al random text abc def jkl random text abc ghi jkl random text wolf@linux:~$   wolf@linux:~$ al abc file.txt:random text file.txt:abc def jkl file.txt:random text file.txt:abc ghi jkl file.txt:random text grep: abc: No such file or directory wolf@linux:~$   So I decided to use function. wolf@linux:~$ func(){ grep "$1" file.txt; } wolf@linux:~$ func random text abc def jkl random text abc ghi jkl random text wolf@linux:~$   It works. wolf@linux:~$ func abc abc def jkl abc ghi jkl wolf@linux:~$   But there is another problem now, I've defined a few functions and forgot their content. Is there a way to view the content of the function, probably something similar with alias al command above?

So I am editing bashrc constantly, and I have a terminal open with a working function definition, although bashrc has been updated with a wrong function definition. (Because the definition do not change until I source the updated bashrc) How can I look up the working function definition in this case? For example, if I type:  alias function_name   I can see what the definition is for that alias. Is there a command similar for function? If not, is there a command to output entire bashrc that the current terminal is using?


In my scenario, I use deep reinforcement learning to fix a problem that is related to transportation. During training, I plot the gradient and loss, I find that the gradient converges and then explodes while the loss can not converge all the time. I wonder what caused such result.  The fist graph indicates one of the output gradient and the second graph indicates the cumulative reward for each sample(red curve), and corresponding loss(blue curve)

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


I think that the original purpose of Programmers (originally called ) hasn't fulfilled its purpose, and right now it functions as a duplicate of Stack Overflow.  The question  has 4k views and is on top of the meta questions list. One main answer:     "... Stack Overflow is for when you’re front of your compiler or editor working through code issues. Programmers is for when you’re in front of a whiteboard working through higher level conceptual programming issues..."    This is only a nice theory, in practice this site (Programmers) is a redundancy, any question that I thought to ask here I could ask on Stack Overflow. The real "white board" questions are not welcome there as they are too broad and usually get downvoted and closed.

Edit  Wow I got royally lynched for this. Please see the accepted answer which illustrates the reasons for Programmers to exist pretty well.  I'd like to say for the record I stand corrected - Programmers clearly has its own role (albeit with a fair amount of overlap with SO) and its own community and identity.    The programmers.stackexchange.com FAQ defines its purpose:     Programmers — Stack Exchange is a site for professional programmers who are interested in getting expert answers on conceptual questions about software development. If you have a question about...         algorithm and data structure concepts   design patterns   developer testing   development methodologies   freelancing and business concerns   quality assurance   software architecture   software engineering   software licensing         [you're in the right place]   The problem is that questions (and more importantly, answers) on all concept-based programming topics that I could think of seem to be much more prolific on StackOverflow than on Programmers:   "algorithm" - on  and  "patterns" - on  and  "architecture" - on  and  "MVC" - on  and    I suspect this is because the only people who care about code architecture problems are the same people who solve the day-to-day technical problems that should be posted on SO - so they naturally go there. There is no type of person who would exclusively use Programmers.  I would say this didn't necessarily matter - it's a good way of grouping questions by topic - except that it is much much harder to get an answer to a programming question on Programmers than it is on StackOverflow. I can post the same question (about code architecture)  and  and the StackOverflow one gets answered much quicker.  Given Stack Exchange's  I therefore suggest that Programmers shouldn't exist. Either that or we need to find another solution so that people actually answer programming questions on Programmers.


I was making an answer to a question in SO on (03-Jan-2014) and while I was making my answer I got a pop up saying that this question is closed now....and so on.. And when I checked the POST YOUR ANSWER button it looks like a disabled one.And when I inspected the html of that button its like the following  <input id="submit-button" type="submit" value="Post Your Answer" tabindex="110" disabled="disabled">   So I simply removed the disabled attribute of that element and made it as this  <input id="submit-button" type="submit" value="Post Your Answer" tabindex="110">   which made the element a normal one.Then I completed my answer and posted it. And the answer has posted even if the question was marked as a duplicate. You can check the following link to see the question and its answer    And when you check the question you can see that the answer is posted after 3 mins the question is closed which proves what I stated.

Question:   Answer:   The question was closed at 11:57:57 (according to the hover-over-"x-mins-ago" bar) and the answer was posted at 12:16:35. It's a fairly lengthy answer, so it's possible that it was started to be written before it was closed but I swear I've started to answer a question then I got a banner along the top saying "this question has been closed" and the answer was no longer post-able.


Some people believe that children should learn how to be   respectable members of society from their parents.   Would there be a grammatical problem if "how" was omitted?

Which sounds better:     learn to or learn how to?   teach to or teach how to?   I'll make the question clearer with examples.    a. He taught me to solve sums. b. He taught me how to solve sums.    c. I learned to drive a car. d. I learned how to drive a car.


I need to set up the domain.com/wp1/ to be shown like domain.com/ I have tried to set up any rewrite in the past hours, but no success :(  P.S. There is a wordpress installed in the public_html/wp1, configured to work on domain.com/wp1/ URL. Its .htaccess is as follows:  # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp1/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp1/index.php [L] </IfModule>  # END WordPress   Thanks in tons!

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.


Ive created a symbolic link to a mounted NFS drive to Apache's "images" folder:  ls -ltr /var/www/html/images   /var/www/html/images -> /mnt/mount_name/images   Edit: Ive added the namei command output as @Thomas suggested:    namei -olm /mnt/mount_name/images/   f: /mnt/mount_name/images/   dr-xr-xr-x root       root       /   drwxr-xr-x user user mnt   drwxrwxrwx user user mount_name   drwxrwxrwx user user images   When i trying to access an image on that path i am receiving the error below:       Permission denied because search permissions are missing on a component of the path.   I tried to look for solutions to the problem but encountered several different solutions, Please advice.  Regards, Yarone

I know this question is asked a lot, but the solutions I saw didn't work for me.  I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document root  ServerAdmin webmaster@localhost DocumentRoot /var/www/html  Alias /movies /home/username/Videos/Movies  <Directory /home/username/Videos/Movies/>     Options Indexes FollowSymLinks     AllowOverride None     Require all granted </Directory>   I set /etc/apache2/envvars as follows  export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=public   I made sure that /home/username/Videos/ and its sub folders are owned by username:public, set the permissions to 777 (after 775 didn't work) and made sure that user www-data belongs to group public.  Now, when I browse to http://localhost/movies I get  [Mon Apr 21 11:28:14.971844 2014] [core:error] [pid 1385:tid 140067725104896] (13)Permission denied: [client 127.0.0.1:46603] AH00035: access to /movies/ denied (filesystem path '/home/username/Videos') because search permissions are missing on a component of the path   But when I set /etc/apache2/envvars to run Apache under username (my own username) everything works fine. The problem is permission related, but I don't see how in my case; especially when I set the permissions to 777. Any ideas?  P.S. Ubuntu version is 14.04, Apache is 2.4.7 and I didn't edit other configuration files.


Back in the late seventies I began collecting a sci-fi series. There were just a ton of them, and they were all pretty standard pulp sci-fi hero stuff, all about the same hero and, I believe, by the same author... someone who later became famous and wrote these under a pseudonym. My mom chucked the books while I was overseas, and I can't remember what they were. I thought it was the Lucky Star series by Asimov, but those were only six books.

I am trying to recall the title of a book series I read in 1980-1981 where the hero was a human astronaut that discovered an alien aircraft crashed on the surface of the moon.  His investigation of the crash site gave him access to alien robots that empowered him to force peace on earth and led to his adventures throughout the universe - some of which involved time travel, etc.  It was a simple paperback novel series that was easy to read without a lot of heavy science.  Is anyone familiar with this series?


I found that transcendental equations with this structure:  $$\ e^{-cx}=a_0(x-r_1) $$  Have this kind of Lambert-W-based solutions:  $$\ x=r_1 + \frac1c\ W \left(\frac{\ ce^{-cr_1}}{a_0}\right) $$  What is the procedure to proof that this is true? I would be thankful if you may help me figure this out.  The formulae were retrieved from:

A certain physics problem I have been working on has turned into a math problem. Particularly, I want to find the solutions of some equation of the form   $$f(x)=ae^{bx}+cx+d = 0$$  where $a, b, c,$ and $d$ are constant, real numbers that come from the physics problem and $x$ will be a real number. I do not know how to find the solutions of an equation of this form. In the special case where $c=0$, the solution is simply  $$x = \frac{\ln(\frac{-d}{a})}{b}$$  but for other values of $c$, I am stumped. If there is no exact form for the roots, is there a relatively simple way to estimate the roots?


How many different ways can 200 coins be distributed among 10 people so that:  1)everyone gets 0, or more, coins?  2)everyone gets 5, or more, coins?  I know how to do question it they have an exact requirement like if they each need a certain amount. However, when it comes to 0 or more I don't know how to approach the question can someone teach me the way? Thank you.

How to use the  method?  Say I want to find number of combinations I can get with $x_1+x_2+x_3+x_4=22$,  where $x_i\in\mathbb{N}$.  Is this the correct time to apply the method?  This is being repurposed in an effort to cut down on duplicates, see here:     and here:


I am trying to match a search term up to a first period using grep  So for example, grep-ing through  foobar searchterm. hello world.   should print foobar search term blah. I save the above to a plain text file called search. But when I try  grep -i 'searchterm.*\.'search   it prints out  foobar searchterm blah. hello world.   instead of stopping after blah. What am I getting wrong here? The period star .* should match anything up to the first occurrence of a literal period \. right?

I'm trying to grep for the full sentence containing a search term. I've tried  grep (^.|\.\s).*searchterm.*(\.\s|\n)   but it's not working and I'm not sure why.  To clarify: I want stdout to print the full sentence of the search term. I am using grep to search through a single text file.  As an example, if my file has  "Foo blah. Blah blah searchterm blah blah. Foo bar."  I want stdout to print Blah blah searchterm blah blah


As is typical in this kind of thing I have a node tree filled with tangled curvy node connections going every which way. Even using reroutes it is somewhat difficult to read.  I've seen a number of people who have the node connections appear far more like a straight line than a bezier curve...how would I replicate this feature?

Unitl now I haven't found the option to enable the curved representation of connectors between nodes. The  doesn't mention such an  option. Is there a keyboard shortcut?


Can someone help me understanding this ?  # du -hs * 3,8M    depmodwrapper-cross 712M    linux-karo 211M    u-boot-karo  # du --apparent-size -hs * 3,6M    depmodwrapper-cross 672M    linux-karo 176M    u-boot-karo  # du -hs u-boot-karo 584M    u-boot-karo  # du --apparent-size -hs u-boot-karo/ 524M    u-boot-karo/   There are more info about filesystem and number of files  # df -h . /dev/md3        822G  658G  123G  85% /mnt/tmp  # mount |grep /mnt/tmp /dev/md3 on /mnt/tmp type ext4 (rw,relatime,data=ordered)  # find u-boot-karo/ |wc -l 28392   Forced e2fsck do not fix this. What does this mean ?

I'm using these commands:    du -sh --apparent-size ./* du -sh ./*   both reporting:    4.0K    ./Lightroom_catalog_from_win_backup 432M    ./Lightroom catalog - wine_backup   while those directories contain:    $ll ./"Lightroom catalog - wine_backup" total 432M -rwxrwx--- 1 gigi gigi 432M Mar 18  2018 Lightroom 5 Catalog Linux.lrcat -rwxrwx--- 1 gigi gigi  227 Nov 21  2015 zbackup.bat $ll ./Lightroom_catalog_from_win_backup total 396M -rwxrwx--- 3 gigi gigi 396M Dec 17 09:35 Lightroom 5 Catalog Linux.lrcat -rwxrwx--- 3 gigi gigi  227 Dec 17 09:35 zbackup.bat   Why du is reporting 4.0K for ./Lightroom_catalog_from_win_backup and how could I make it to report correctly?  PS: other system information:    $stat --file-system $HOME   File: "/home/gigi"     ID: 5b052c62a5a527bb Namelen: 255     Type: ext2/ext3 Block size: 4096       Fundamental block size: 4096 Blocks: Total: 720651086  Free: 155672577  Available: 119098665 Inodes: Total: 183050240  Free: 178896289  $lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.5 LTS Release:        16.04 Codename:       xenial


When I start Ubuntu after it froze during an upgrade to 13.10, it says:  Filesystem check or mount failed. A maintenance shell will now be started. CONTROL-D will terminate this shell and continue booting after retrying filesystems. Any further errors will be ignored. root@Netbook:~#   When I use sudo apt-get update it eventually says:     E: dpkg was interrupted, you must manually run "sudo dpkg --configure -a" to correct the problem   When I run that command, it says:     dpkg: error: unable to access dpkg status area: Read-only file system   And then gives me the root prompt again. Please help! I'm a VERY basic user of Ubuntu.

I attempted to upgrade from Ubuntu 13.04 to 13.10 today, and mid upgrade the system started flaking out, and eventually locked up entirely. I was forced to restart the computer, and am now unable to get the computer to boot up at all.  When I boot currently, it takes me to the GRUB menu, and I can choose to boot normally, or boot in an older version. I have tried several things, which I list below, but no matter what, when I try to finish booting into Ubuntu, I receive the following error:  Filesystem check or mount failed. A maintenance shell will now be started. CONTROL-D will terminate this shell and continue booting after re-trying filesystems. Any further errors will be ignored root@ubuntu-computername:~#   I have fun fsck -f and everything appears correct, no errors are reported. and it passes all 5 checks.  If I run fdisk -l then I get the following information:  Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes Disk identifier: 0x00010824  Device Boot Start End Blocks Id System  /dev/sda1 * 2048 608456703 304227328 83 Linux  /dev/sda2   608458750 625141759 8341505 5 Extended Partition 2 does not start on physical sector boundary.  /dev/sda5  608458752 625141759 8341504 82 Linux swap / Solaris  Disk /dev/sdb: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x0fb4b7e8  Device Boot Start End Blocks Id System /dev/sdb1   8192 625139711 312565760 7 HPFS/NTFS/exFAT   I am considering just installing a new OS on the other disk, that currently has nothing on it, and then just attempting to scrape my data off the old disk (thankfully I didn't encrypt the files).  Really my question is this: Can I salvage this Ubuntu install, or should I give up and just reinstall?


A tried to install codecs, drivers etc after installing Ubuntu, via  sudo apt-get install ubuntu-restricted-extras  But it completely crashed and broke package system i had to repair. Cause was proprietar Microsoft fonts. There appeared MS EULA which was impossible to confirm. There was no working "button".  What can i do? Could i exclude this particular proprietar MS package from installing?

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.     ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐  │                                                                           │   │ TrueType core fonts for the Web EULA                                          │                                                                               │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE                             │                                                                               │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement           │ ("EULA") is a legal agreement between you (either an individual or a          │ single entity) and Microsoft Corporation for the Microsoft software           │ accompanying this EULA, which includes computer software and may include      │ associated media, printed materials, and "on-line" or electronic              │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your          │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be        │ bound by the terms of this EULA. If you do not agree to the terms of          │ this EULA, you may not use the SOFTWARE PRODUCT.                              │                                                                               │                                  <Ok>                                         │                                                                           │   └───────────────────────────────────────────────────────────────────────────┘    Screenshot:   For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.  I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).


I know there are already some similar questions like  but I can't get my head around it since the answers there seem not to fit very precisely to the question: What is the amplitude of a single photon? I know the energy of a photons depends strictly on its frequency and light is described by electromagnetic waves. Are (single) photons also seen as electromagnetic waves? If so, what does it amplitude then tell? Thank you!

Given a light pulse in vacuum containing a single photon with an energy $E=h\nu$, what is the peak value of the electric / magnetic field?


I'm having a hard time getting the correct value from the innertext of an XElement. First, here's the XML that I'm using.  This is a copy of our production data that results from a process in our workflow.  In other words, I can't change the XML, I can only parse it.  The element whose innertext I'd like to get has data inside that looks like XML, but it isn't.  It is straight text from the tool that produced the XML.  The element is called <creatorshapeutildata:    Here is the line of code I've tried:  CreatorShapeUtilData = element.Descendants("creatorshapeutildata").Single().Value;   I've also tried this:  CreatorShapeUtilData = element.Descendants("creatorshapeutildata").First().Value;   I've also tried this:  CreatorShapeUtilData = element.Element("creatorshapeutildata").Value;   Unfortunately, the value that gets returned in every case looks like this:   33012-1true#FFFF003#FFFFFF2743337743358  I need the value returned to look like this:  "<creatorData type="object"><type type="int">33012</type>..."   This piece I'm working on is part of a larger program that uses XDocument, XElement, etc.  I know an XmlElement has an InnerText property, but I think XElement does not, since I can't seem to find it in Intellisense.  So, is there any possible way to grab the exact text between the creatorshapeutil tags?

What's the best way to get the contents of the mixed body element in the code below?  The element might contain either XHTML or text, but I just want its contents in string form.  The XmlElement type has the InnerXml property which is exactly what I'm after.  The code as written almost does what I want, but includes the surrounding <body>...</body> element, which I don't want.  XDocument doc = XDocument.Load(new StreamReader(s)); var templates = from t in doc.Descendants("template")                 where t.Attribute("name").Value == templateName                 select new                 {                    Subject = t.Element("subject").Value,                    Body = t.Element("body").ToString()                 };


I understand that one should use protected when one wants to make the variable visible in all classes that extend current class, but what does that mean exactly?  What are the most common use cases?  I suppose another way to frame the question would be, what are the key cases when you would want a class variable to be visible from the class' children but not from external classes.

Should you ever use protected member variables?  What are the the advantages and what issues can this cause?


I installed Ubuntu on a old Windows XP computer using Dual Boot, i have no XP Cd and desperately need to remove it! EasyBCD does not work on windows XP, iF I just delete the Ubuntu partition all hell breaks loose and i have to reinstall ubuntu to get my XP back. Please help me i am only 12 and i have made a stupid error on my mum and dads computer and will get into serious trouble if i dont fix it soon!.  Extra Information: I use the gnu boot loader to choose my operating system, but my mum and dad need my help to open a word document, they have only just grasped double clicking! I installed it off a cd that i made, the computer is 64-bit AMD Athlon with one 160gb hard drive, 512mb ram and a Sis mirage2 128mb shared video card. Its a COMPAQ presario.

I wish to remove Ubuntu and I'm not quite sure how. I know it has something to do with partitions. I have 3 partitions. 1. OS [683 GB]  2. Recovery [14 GB] 3. Ubuntu 12.04 LTS (E:)  I know it says Ubuntu but when I installed Ubuntu I think I put 14 gigabytes for it so I think its the recovery one but I'm not sure. I could have sworn I put more than 700 megabytes for it.  I have googled this and I can't seem to find an answer. Any help would be nice.


I’m curious about the finite subgroups of $\mathrm{GL}_3(\mathbb{R})$. I’ve looked around, but have only been able to find a classification of the finite subgroups in   ; ; and  ...   ... but not all of $\mathrm{GL}_3(\mathbb{R})$. Is there a complete classification of the finite subgroups in this setting (up to isomorphism)? If so, what is it?    Just for fun context, the reason I ask is because I’m curious about the construction detailed  regarding building a polytope from a faithful group representation. It seems like it would be neat to actually see all the polyhedra you can get in $\mathbb{R}^3$.

The group of orthogonal transformations of $\mathbb{R}^3$ is direct product of the group of rotations and the group $Z=\langle x\mapsto -x\rangle\cong \mathbb{Z}/2$. The finite subgroups of group of rotations are well known: rotational symmetries of regular polyhedrons.   These subgroups, along with their direct product with $Z$ will give some (families) of finite groups of orthogonal transformations.  It looks that some finite groups of orthogonal transformations need not be of this form (see Shafarevich- Algebra I; I couldn't understand arguments there).  How do we cover all finite subgroups of orthogonal transformations?  A more general question in this context may be: How to get subgroups of $H\times K$ knowing subgroups of $H$ and $K$?


Im getting this error, on a simple code, and i dont understand it.  \printbibliography[heading=none]   it shows up on this line.  It says:  You have placed an alignment tab character '&' in the wrong place. If you want to align something, you must write it inside an align environment such as \begin{align} … \end{align}, \begin{tabular} … \end{tabular}, etc. If you want to write an ampersand '&' in text, you must write \& instead."  \namepartgiven ...medelimb Schultz\bibnamedelimb &                                                   \bibnamedelimb Nikolaj\bib... l.254 \printbibliography[heading=none]  I can't figure out why you would want to use a tab mark here. If you just want an ampersand, the remedy is simple: Just type `I\&' now. But if some right brace up above has ended a previous alignment prematurely, you're probably due for more error messages, and you might try typing `S' now just to see what is salvageable.

I use  to store all articles I need and bibtex4word add-on (in MS Word) to maintain the reference list. So, I would like to know how to properly fill the "author" field in Jabref with multiple authors to appear them correct in the reference list.  For example, I've got the article with several authors:      E. Orti, J.L. Bredas, C. Clarisse   And I would like them to appear in this manner. But instead I get this:     C. C. E. Orti, J. L. Bredas


Assuming a simple grep such as:  $ psa aux | grep someApp 1000     11634 51.2  0.1  32824  9112 pts/1    SN+  13:24   7:49 someApp   This provides much information, but as the first line of the ps command is missing there is no context for the info. I would prefer that the first line of ps be shown as well:  $ psa aux | someMagic someApp USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND 1000     11634 51.2  0.1  32824  9112 pts/1    SN+  13:24   7:49 someApp   Of course, I could add a regex to grep specifically for ps:  $ ps aux | grep -E "COMMAND|someApp"   However, I would prefer a more general solution as there are other cases in which I would like to have the first line as well.  Seems like this would be a good use case for .


Well,    meters measures distances or lengthes, volt measures tension or voltage, , kelvin measures temperature, second measures time, ampere measures electric current, kilogram measures mass,   But what measures the "Byte" unit ? I'm looking for a word that would take the same place than mass takes for kilogram, but for Byte (or bit, as 8 bit makes a Byte.). There's only very unspecific terms that springs to my mind (size, capacity, ...):   My file is 3.2 KB in <fill the blank> ? My hard drive has a <fill the blank> of 2TB. Byte measures <fill the blank>.   Could it be information ? But the word alone doesn't seem to refer to something that can be measured. And you don't use it as naturally. For example, in a technical specification you could see:   mass: 3kg temperature: 2° voltage: 3V <fill the blank>: 3TB   But what would you use here in front of "3TB" for instance ? It seems we must use 2 words, for example:  "information size". But even this doesn't seem so natural.  Have you any word suggestions that I've might missed, references on this topic, if not, do you know other units that don't have a proper word to name what they measures ?  Edit: I'm a software developer and I know relatively well what a Byte measures. I'm looking for a specific English word that could be used as naturally as you would use the word "mass" to qualify what you measure when you say "3 kilograms".

As you will probably work out from my profile, I'm a software developer. This is sort of a software development question, but I think this is more suited to English language too.  Feel free to migrate if you think the question does not belong here.  Say I want to refer to the data size, or capacity of something:   A floppy disk can hold 1.44 megabytes of data. My flash drive can hold 16 gigabytes of data. My internet connection can operate at a maximum of 50 gigabits per second I have just managed to compress a file from 1 megabyte to just 200 kilobytes.   How do I collectively refer to these units of data size/capacity?


Every two-handed mace I find shows a red X for my Monk, as well as a red box around my current weapon in my inventory. The maces do not show class restrictions (example below). Are Monks unable to equip certain non-class restricted weapons?

suggests that the wizard can use:   Axes Daggers Maces Spears Swords   (Click on the Wizard icon, and all of those weapons are not disabled, meaning that the class can use them.)   explains weapons types, but it is not clear whether the Wizard can use only wands, or other weapons.  So do you know the exact list or weapons type that a class can use? Or can you find this information somethere?  My motivation to know is that the damage per second of those weapons can change quite a bit from one to the other, and the spell damage is based on that. For example, the level 1 wand () is only 3 DPS, whereas the level 1 spear () has a DPS of 7.2–8.4.


I am working on a java swing application which currently allows a user to import one or more files to be processed.   This is done right now by executing the jar using   java -jar [jarname] [filename 1] [filename 2] ... [filename N].   I am tasked with to change the behaviour so as to keep it working in this current mode and add another mode of execution by adding an option parameter:   java -jar [jarname] [filename 1] -o [option].   In the second mode, I need to make sure that the arguments contain a single filename argument with a single option flag followed by a single option argument. The option will be used to process the file. Alternatively, if the jar is executed in the first mode using only one file, there is a menu option in the application that the user should be able to use to process the file with the required option.  I am looking for ideas/tips to accomplish this.  Thanks in advance.

What is a good way of parsing command line arguments in Java?


In $\Bbb R^2$, is the interior of $\Bbb R^2 - \{(x,sin(1/x))|x>0\}$ itself? The curve is continuous on $(0,\infty)$ so its graph is closed, and hence the set is open. Moreover, its boundary is $\{(x,sin(1/x))|x>0\}$.  Am I correct?

Let $f(x)=\sin(1/x)$. If I'm correct then the boundary of $S=\{(x,f(x)):x\in\mathbb{R}\} \subset \mathbb{R}^2$ is $\{(x,f(x)):x \text{ in domain of } f(x)\}\cup\{(0,0)\}$, since for any $\varepsilon > 0$ and an open ball $B_\varepsilon(0)$, $B_\varepsilon(0)\cap S\ne \emptyset \ne B_\varepsilon(0)\cap [S]^c$. [I have some doubts about this part though].  For the interior of $S$, it is the empty set, since there does not exist an $\varepsilon > 0$ such that $B_\varepsilon((x,f(x)))\subset S$.  Thus, the closure of $S$ is $S\cup\{(0,0)\}$.  Please let me know if you think this is about right.


How do I install the wireless drivers in my  with an ?   Card-1: Intel Wireless-AC 9560 (Jefferson Peak) driver: iwlwifi   Card-2: Realtek is fine with driver r8169 though.   Additional drivers did not show up when I searched. Is there any other driver I need to download from ?   did not work by the way as mentioned for utils so now I have a search Windows driver that is unnecessary, would that be easy to remove?  Below is the output of commands ran asked for  Output of  lspci -nnk | grep -e 0200 - e 0280 -A3:  (standard input):07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) (standard input)-   Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:38cd] (standard input)-   Kernel driver in use: r8169 (standard input)-   Kernel modules: r8169 grep: e: No such file or directory grep: 0280: No such file or directory   Output of rfkill list all:  0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: yes 1: ideapad_bluetooth: Bluetooth     Soft blocked: no     Hard blocked: yes 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 3: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no

I recently got a lenovo Y40 laptop and after i installed ubuntu 14.04 (also in the live usb) Wireless doesn't work. It says that it is disabled by hardware switch, however the hardware switch doesnt work (its intention is to put on airplane mode but does nothing when pressed in ubuntu) wireless works in windows and the BIOS has it enabled. I tried resetting the BIOS but it still doesn't work. Here are some command outputs  lspci:  03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 04:00.0 Network controller: Intel Corporation Wireless 3160 (rev 93)   rfkill list all:   0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: yes 1: ideapad_bluetooth: Bluetooth     Soft blocked: no     Hard blocked: yes 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 3: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   lswh:     *-network         description: Ethernet interface         product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller         vendor: Realtek Semiconductor Co., Ltd.         physical id: 0         bus info: pci@0000:03:00.0         logical name: eth0         version: 10         serial: f8:a9:63:31:2e:b6         size: 1Gbit/s         capacity: 1Gbit/s         width: 64 bits         clock: 33MHz         capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-3_0.0.1 04/23/13 ip=192.168.1.4 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s         resources: irq:64 ioport:4000(size=256) memory:c0604000-c0604fff memory:c0600000-c0603fff *-pci:3      description: PCI bridge      product: Lynx Point-LP PCI Express Root Port 4      vendor: Intel Corporation      physical id: 1c.3      bus info: pci@0000:00:1c.3      version: e4      width: 32 bits      clock: 33MHz      capabilities: pci normal_decode bus_master cap_list      configuration: driver=pcieport      resources: irq:59 memory:c0500000-c05fffff    *-network DISABLED         description: Wireless interface         product: Wireless 3160         vendor: Intel Corporation         physical id: 0         bus info: pci@0000:04:00.0         logical name: wlan0         version: 93         serial: a0:88:69:90:0a:38         width: 64 bits         clock: 33MHz         capabilities: bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-32-generic firmware=22.24.8.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn         resources: irq:66 memory:c0500000-c0501fff


and . I am finding it hard to distinguish between the two. Confused. Can someone explain me the two terms and difference between them? I tried learning from wikipedia but it said for both the above terms that it is the total energy contained by a thermodynamic system, so Iam confused?

I read that $U=q+w$ and $H=u+PV$ so aren't $PV$ and $w$ same? If they are, can't we write $H=q+2w$? Also, $dU=$ change in internal energy wrt change in temperature keeping $V$ constant times $dT+$change in internal energy wrt change in volume keeping $T$ constant times $dV$ Here is the second term $=w$? And, $dH=$ change in enthalpy wrt change in temperature keeping $P$ constant times $dT+$ change in enthalpy wrt change in pressure keeping $T$ constant times $dP$. Here is the second term $=PV$?


I want the for loop to complete before I print the result, in:          for (int i = 0; i < 5; i++)         {             (new System.Threading.Thread(() =>                 {                     if (TimeTakingMethod())                     {                         ++nResult;                     }                 })).Start();         }         Console.WriteLine("Count = " + nResult);   but Console.WriteLine will not wait for those threads to finish because printing is done on the main thread.  If I change it to:          System.Threading.Thread t = new System.Threading.Thread(() =>             {                 for (int i = 0; i < 5; i++)                 {                     (new System.Threading.Thread(() =>                     {                         if (TimeTakingMethod())                         {                             ++nResult;                         }                     })).Start();                 }             });         t.Start();         t.Join();         Console.WriteLine("Count = " + nResult);   it will still not solve the problem because the nested threads will not be waited for.  Any simple solution to this? Thanks for going through this.

I'm running into a common pattern in the code that I'm writing, where I need to wait for all threads in a group to complete, with a timeout. The timeout is supposed to be the time required for all threads to complete, so simply doing thread.Join(timeout) for each thread won't work, since the possible timeout is then timeout * numThreads.  Right now I do something like the following:  var threadFinishEvents = new List<EventWaitHandle>();  foreach (DataObject data in dataList) {     // Create local variables for the thread delegate     var threadFinish = new EventWaitHandle(false, EventResetMode.ManualReset);     threadFinishEvents.Add(threadFinish);      var localData = (DataObject) data.Clone();     var thread = new Thread(         delegate()         {             DoThreadStuff(localData);             threadFinish.Set();         }     );     thread.Start(); }  Mutex.WaitAll(threadFinishEvents.ToArray(), timeout);   However, it seems like there should be a simpler idiom for this sort of thing.


I have a USB key for which I want, each time it is inserted in a computer, to have its content synchronized (both ways) with one folder on the machine.   The synchronization process should be started as soon as the USB key is inserted The folder should be configured based upon the computer on which the key synchronizes (typically through a wizard/dialog, but no config file edition) The synchronization process should graciously stop when USB key is unplugged   Do you know if a synchronization software with those features exist ? ANd is there any tutorial on how to setup such a solution ?  I've thought about using softwares such as FreeFileSync, but it seems to lack the ability to start/stop synchronization when USB is inserted/removed/ Maybe I've not found the right configuration tutorial ...

In my job we are not guaranteed to keep using the same computer forever. Also, I need to keep the files at arm's reach when traveling. This is screaming a "cloud" solution, but here in Brazil mobile connectivity is still an issue, and relying on company networks there is always the firewall and network policy issue, so cloud is no-go.  So I started using a 16GB flash drive to store all my personal and work documents. But I am afraid someday the thumb drive will die on me and I will lose everything. Also I have a hard time when I forget it at home and can't access my files.  So I am looking for some utility/script that will run on my home and work computers and whenever I connect the thumb drive, it detects it as my thumb-drive and synchronizes with folders on the computer, kinda like rsync.   These are the needed features:   Securely recognizes the thumb-drive (using a special "key" file or volume serial numbers) Update only modified files (no dumb-copying, as it's several GB) If a file was modified on both on the thumb-drive and the computer, ask for which one to keep. I may choose which folders to sync (do not want to sync the music folder, for example) Non-annoying operation, just ask for a decision on conflicts if needed (but a progress indicator would be nice).   Desirable but not required, are syncing being done automatically before removal (instead of at insertion).  Is there a ready-made Windows tool for this job? This could be pulled out with a batch file but I wanna know if there is something on the market already.  Thanks!  Update for future viewers..  SyncToy is very good, but has the flaw of needing Administrator account for installation. I needed to sync with na old XP work computer, with limited permissions. I've settled for Unison  . It is a command-line app, but matches all my requirements, and does not need  to be installed.


When filling out a standard W4 form, there is always the ability to withhold an extra amount of cash from each of your paychecks. Until now, working at part time jobs, I needed as much of my money as fast as I could get it, and I simply ignored the field.   Now, however, I'm at a point where I could spare a few dollars each check and I'm wondering if there is any value in doing this.   Does this amount help with anything in particular? If I choose to do this, can I at some point in the future stop having this extra amount withheld?   All answers are greatly appreciated.

A few weeks ago I asked a  because my wife started several part-time jobs with variable demand and therefore variable income.  Considering we filled in 0 exemptions on all her new jobs' W-4s, is it possible for me/my wife to make punctual contributions to the IRS using our SSNs? For example, at any given date I decide to pay a given amount to the IRS so that those taxes will count for next year?  One of the options I have instead is to change my own (higher income) W-4 to adjust our joint taxes. However, how often can I do that? Can I change my W-4 several times a year?  Thanks in advance,


This is a question that I have been struggling with for quite some time, but no luck.  I'm not asking for a final answer, I need to know how to prove it.  The question is: Prove whether or not the sum of two random variables is a random variable.  $X_1 + X_2$

How do I prove the following?     If $X$ and $Y$ are random variables on a probability space $(\Omega, F, \mathbb P)$, then so is $X+Y$.   The definition of a random variable is a function $X: \Omega \to \mathbb R$, with the property that $\{\omega\in\Omega: X(\omega)\leq x\}\in F$, for each $x\in\mathbb R$.    Furthermore, how to approach $X+Y$ and $\min\{X, Y\}$?


When I took this photo it was fine. I looked at it a few times on the camera on my way back home and it was fine. But when I got home and looked at it on the camera again, it was fine for a second but then went like this. It seems to be fine when viewed in files as medium size, but any larger and this happens.  The camera is a Canon IXUS 185

I have had my Nikon D40 for a while, and some of the pictures are coming out distorted. Two examples are below:   So my questions are:    How do I fix them after the fact? - i.e. after they have been imported from the camera - if possible How do I prevent future pictures from being distorted like this?   Thanks   and


I am trying to understand the order of the indices when raising or lowering tensors.  For example, the : $$F^{\alpha \beta} =     \begin{bmatrix}     0 & -\frac{E_{x}}{c} & -\frac{E_{y}}{c} & -\frac{E_{z}}{c} \\     \frac{E_{x}}{c} & 0 & -B_{z} & B_{y} \\     \frac{E_{y}}{c} & B_{z} & 0 &  -B_{x} \\     \frac{E_{z}}{c} & -B_{y} & B_{x} & 0 \\     \end{bmatrix} $$ When lowering the indices I have seen $$F_{\alpha \beta} = \eta_{\alpha \mu} \eta_{\beta v} F^{\mu v}$$ and $$F_{\alpha \beta} = \eta_{\alpha \mu} \eta_{v \beta} F^{\mu v}$$  Which is the right order of the indices on the second $\eta$? Does the index you want always go first or does it go in the index spot where you want it to end up after contraction?

I am trying to figure out how to switch between Minkowski metric tensor sign conventions of (+, -, -, -) to (-, +, +, +) for the  $F^{\alpha \beta}$.  For the convention of (+, -, -, -) I know the contravariant and covarient forms of the electromagnetic tensor are: $$ F^{\alpha \beta} =     \begin{bmatrix}     0 & -\frac{E_{x}}{c} & -\frac{E_{y}}{c} & -\frac{E_{z}}{c} \\     \frac{E_{x}}{c} & 0 & -B_{z} & B_{y} \\     \frac{E_{y}}{c} & B_{z} & 0 &  -B_{x} \\     \frac{E_{z}}{c} & -B_{y} & B_{x} & 0 \\     \end{bmatrix} $$ and $$ F_{\alpha \beta} = \eta_{\alpha \mu} F^{\mu v} \eta_{v \beta} =      \begin{bmatrix}     0 & \frac{E_{x}}{c} & \frac{E_{y}}{c} & \frac{E_{z}}{c} \\     -\frac{E_{x}}{c} & 0 & -B_{z} & B_{y} \\     -\frac{E_{y}}{c} & B_{z} & 0 &  -B_{x} \\     -\frac{E_{z}}{c} & -B_{y} & B_{x} & 0 \\     \end{bmatrix}. $$  Now for the convention of (-, +, +, +) are the contravariant and covariant forms of the electromagnetic tensor just switched from above along with signs?:  $$ F^{\alpha \beta}=      \begin{bmatrix}     0 & \frac{E_{x}}{c} & \frac{E_{y}}{c} & \frac{E_{z}}{c} \\     -\frac{E_{x}}{c} & 0 & B_{z} & -B_{y} \\     -\frac{E_{y}}{c} & -B_{z} & 0 &  B_{x} \\     -\frac{E_{z}}{c} & B_{y} & -B_{x} & 0 \\     \end{bmatrix} $$ and $$ F_{\alpha \beta} = \eta_{\alpha \mu} F^{\mu v} \eta_{v \beta} =     \begin{bmatrix}     0 & -\frac{E_{x}}{c} & -\frac{E_{y}}{c} & -\frac{E_{z}}{c} \\     \frac{E_{x}}{c} & 0 & B_{z} & -B_{y} \\     \frac{E_{y}}{c} & -B_{z} & 0 &  B_{x} \\     \frac{E_{z}}{c} & B_{y} & -B_{x} & 0 \\     \end{bmatrix}~? $$  Basically, I am trying to figure out how to switch between the two sign conventions.


I read somewhere that Adobe Illustrator CS6 is 64-bit and able to run on Catalina.  I did run a 64-bit software check on OSX Mojave to double-confirm that it is 64-bit before upgrading to Catalina.  I am now left with a defunct Illustrator and Photoshop which I needed to rush my stuff!  This is what I see on my dock after Catalina upgrade!

I was browsing Internet for some hints, but did not find anything yet. And the communication is a bit missleading, one say it won't work, becuase of 32-bit references, another claim it should work, because CS6 Illustrator itself is 64-bit.  Ended up after install with:     and after clicking the icon:     “Adobe Illustrator CS6” needs to be updated.     according to      Adobe Mercury Performance System, 64-bit memory support, new user   interface, gradient on a stroke, pattern creator tool, ImageTrace   (replaces Live Trace)   From the OSX system information:  Adobe Illustrator CS6:    Version:  682   Obtained from:    Identified Developer   Last Modified:    19/08/2019, 14:06   Signed by:    Developer ID Application: Adobe Systems, Inc., Developer ID Certification Authority, Apple Root CA   Location: /Applications/Adobe Illustrator CS6/Adobe Illustrator.app   Kind: 64-bit   Get Info String:  16.0.0, Copyright © 1987-2012 Adobe Systems Inc.  All rights reserved.   so it is 64bit


I have dd from GNU coreutils 8.32. When I run { echo a; sleep 1; echo b; } | dd bs=4 count=1 then I get a 0+1 records in 0+1 records out 2 bytes copied, 2.0381e-05 s, 98.1 kB/s  dd terminates during the sleep even though the block size was not reached and there was no EOF. The output b\n is lost. This does not happen if I remove either sleep or count=1. In man dd I couldn't find anything that describes this behavior.  Why doesn't dd count=1 wait till bs is reached or an EOF is encountered? How can I force dd to wait?

Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write?  Long version — preamble: dd is often used to copy data, especially from or to a device (). It's sometimes attributed mystical properties of being able to access devices at a lower level than other tools (when in fact it's the device file that's doing the magic) — yet dd if=/dev/sda is the same thing as cat /dev/sda. dd is sometimes thought to be faster, but . Nonetheless, .  Problem: dd if=foo of=bar is not, in fact, the same as cat <foo >bar. On most unices¹, dd makes a single call to . (I find  fuzzy on what constitutes “reading an input block” in dd.) If read() returns a partial result (which, according to POSIX and other reference documents, it's allowed to unless the implementation documentation says otherwise), a partial block is copied. Exactly the same issue exists for write().  Observations: In practice, I've found that dd can cope with block devices and regular files, but that may just be that I haven't exercised it much. When it comes to pipes, it's not difficult to put dd at fault; for example try :  yes | dd of=out bs=1024k count=10   and check the size of the out file (it's likely to be well under 10MB).  Question: In what circumstances is dd safe to use for copying data? In other words, what conditions on the block sizes, on the implementation, on the file types, etc, can ensure that dd will copy all the data?  ( has a fullblock flag to tell it to call read() or write() in a loop so as to transfer a full block. So dd iflag=fullblock is always safe. My question is about the case when these flags (which don't exist on other implementations) are not used.)  ¹  I've checked on OpenBSD, GNU coreutils and BusyBox.