I am sorry for the previous problem, I am a beginner of this forum.  I have written the following code, in order to draw 2 coupled horizontal oscillators with dampers:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,patterns} \usetikzlibrary{calc,patterns,decorations.markings} \usetikzlibrary{positioning}  \begin{document}  \begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick}] \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=6}] \tikzstyle{damper}=[thick,decoration={markings,   mark connection node=dmp,   mark=at position 0.5 with   {     \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=10pt,minimum height=3pt,draw=none] {};     \draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);     \draw [thick] ($(dmp.north)+(0,-3pt)$) -- ($(dmp.north)+(0,3pt)$);   } }, decorate] \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.5cm,minimum height=0.3cm]  \begin{scope}[xshift=7cm] \node (M) [minimum width=1cm, minimum height=1cm] {$m$} node[draw=none,fill=none,pos=.5,below] {1};  \draw [<-,thick](-2.6,.6) -- (-1.5,-.2);  \node (wall) [ground, rotate=-90, minimum width=2cm,yshift=-3cm] {};  \draw (wall.north east) -- (wall.north west);  \draw [spring] (wall.120) -- ($(M.north west)!(wall.120)!(M.south west)$) node[draw=none,fill=none,pos=.5,above] {$k_1$};  \draw [damper] (wall.20) -- ($(M.north west)!(wall.20)!(M.south west)$) node[draw=none,fill=none,pos=.5,below] {$d_1$}; \end{scope}  \begin{scope}[xshift=10cm] \node (M1) [minimum width=1cm, minimum height=1cm] {$m$} node[draw=none,fill=none,pos=.5,below] {2};  \draw [spring] (M.10) -- ($(M1.north west)!(M.10)!(M1.south west)$) node[draw=none,fill=none,pos=.5,above] {$K$};  \draw [damper] (M.-40) -- ($(M1.north west)!(M.-40)!(M1.south west)$);  \draw [->,thick](1.4,-.2) -- (2.5,.6); \end{scope}  \begin{scope}[xshift=10cm] \node (wall1) [ground, rotate=90, minimum width=2cm,yshift=-3cm] {};  \draw (wall1.north west) -- (wall1.north east);  \draw [spring] (wall1.60) -- ($(M1.north east)!(wall1.60)!(M1.south east)$) node[draw=none,fill=none,pos=.5,above] {$k_2$};  \draw [damper] (wall1.-160) -- ($(M1.north east)!(wall1.-160)!(M1.south east)$) node[draw=none,fill=none,pos=.5,below] {$d_2$}; \end{scope}  \end{tikzpicture}  \end{document}     I would need help to fix the following issues:   The notations "d_1" and "d_2" of the two dampers should be placed with about 3mm, under the dampers. The notations "1" and "2" of the two blocks should be placed under the rectangles and not at the interior. The right-side point of the second damper should start from the vertical rule of the right wall, not from those north east lines.


How many ways we can  arrange  4  letters  from  PROFESSOR?  The way I tried to do  is by grouping the repeated words like (OO), (RR), (SS)  and that can be done in three ways which seems to me a bit complicated and time consuming too. Can't we do this any simple way that wouldn't take much time?


I wrote a script for the purpose of changing directory and then scan a file.  #!/bin/bash model_dir=/mypath  function chdir () {   cd $1 } chdir ${model_dir}/config if [[ ! -s *.cfg ]] then   echo `date` "configure file does not exist"   exit 1 fi   I don't why my current directory is not changed after I execute this script with source myscript.sh.


Can someone explain to me the concept of hashing versus the concept of encryption?

I'm a bit confused over the difference between hashing and encryption. Could someone help explain this to me in simple and concise, yet comprehensive layman's terms?   I'm not asking for any specifics in how they work, but rather how the essential concept of each work in layman's terms


Travelling to England with a criminal record

So, 3 years ago I was convicted with a simple assault/domestic with a 3 year filing which means it will be completely off my record in november of this year.  Im planning on going to england to visit for 2 weeks in may and was wondering if that was going to be a problem or if im going to be fine.  I was never imprisoned for it but i did have to take like 3 months of a batterers intervention program, but like i said that was 3 years ago.  Is this going to be a problem? and if you answer can you post a source? ive been looking on government websites and couldnt find anything that pertained to my situation.


I just SSH'd into root, and then SSH'd again into root on the same machine. So I have two windows open both SSH'd into root on my remote machine.  From the shell, how can I see a list of these two sessions?


What noise removal tools work best, and why?

Can anyone recommend some good noise removal tools, free and commercial? Should support RAW and JPEG. Are certain tools better than others in particular situations? Do some integrate better with other software? Do plugins or stand-alone dedicated NR programs work significantly better than the noise reduction built in to RAW converters?


If a player kills all blockers, is the damage redirected to the face?

After my opponent declares a blocking creature, I use an instant to deal 2 damage which kills it. Do they take combat damage to the face?


15.10 installer: Error installing '...' - trying to overwrite '/usr/sbin/validlocale'

During fresh installation procedure I get this error:  Error installing /cdrom//pool/main/g/glibc/locales_2.19-18+deb8u2_all.deb trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.21-0ubuntu4   After closing this error, another one pops up saying the installer has crashed    I booted my laptop from a live USB which has iso of Ubuntu 15.10. I used unetbootin to make the bootable USB.


With $m>n$ , In how many ways $m$ men and $n$ women can seat in row for a photograph so that no two women are adjacent?

Given $m>n$ , In how many ways $ m$ men and $n$ women can seat in row for a photograph so that no two women are adjacent?   My effort : There are $m-1$ gaps if $m$ men are seated. Now we have to seat the women in the gaps and this can be done in $\binom{m-1}n$ ways. Now the answer should be $m!*\binom{m-1}n$  Can anyone verify please.


Do PHP sessions timeout by default - ie without any coding on my part would a user eventually be "logged out" after some time of inactivity?


I use win_xp_sp3 inside my virtualbox i was mapped all the xp folder destination into my host machine in regedit. and now i need to change the my username and i don't remember all files i changed. is there any possibility on regedit find and replace?


How do I mark a file as executable on Xubuntu?

I need to know how to mark a file as executable but the check box is not there.


I was asked to use the following format for my report in Overleaf  Please use the following set-up within LaTeX:  \documentclass[12pt]{report} \usepackage[y4project]{edmaths}   You can download the style file here:   This is a .sty file,I am not sure how to implement it.  Thanks a lot!  Edit: Error looks like this


Why does linear regression use "vertical" distance to the best-fit-line, instead of actual distance?

Linear regression uses the "vertical" (in two dimensions) distance of (y - ŷ). But this is not the real distance between any point and the best fit line.   I.e. - in the image here:    you use the green lines instead of the purple.   Is this done because the math is simpler? Because the effect of using the real distance is negligible, or equivalent? Because it's actually better to use a "vertical" distance?


Let S be a set of natural number that does not contain the digit 7 in their decimal representation.  prove that  $\sum_{n\in S}\frac{1}{n}$ < ∞  help me please


Variable declaration in switch-case statements

The issue of variable declaration in switch-case statements is well discussed in , and the answers covered most of the aspects. But I faced a problem for that I couldn't find a solid reason. Can someone please explain what is wrong with this code?  switch (var) { case 0:     int test;     test = 0;   // no error     int test2 = 0;  // ERROR: initialization of 'test2' is skipped by 'case' label     std::string str;     str = "test";   // ERROR: initialization of 'str' is skipped by 'case' label     break; case 1:;     break; }   I know why the 6th line results in error. But what is wrong with the next two lines? I think this may have something to do with the difference between native types and class types, but I am not sure.  This is not a duplicate question of ! As I have provided a link to the original one. Please read the two questions and note the difference. AFAIK, issue is not discussed in the original question.


error in Asynctask :An error occurred while executing doInBackground()

I am trying to make a login and registration activity login system works fine with same method  but in register system it gives the error and i cant find whats the error is as in logcat and my code is   public class Register extends Activity implements OnClickListener {  private Button btnLinkToLogin; private EditText user, pass; private Button mRegister; private ProgressDialog pDialog;  JSONParser jsonParser = new JSONParser();  private static final String LOGIN_URL = "http://http://portfolio.webuda.com/register.php";  private static final String TAG_SUCCESS = "success"; private static final String TAG_MESSAGE = "message";   @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_register);      user = (EditText) findViewById(R.id.username);     pass = (EditText) findViewById(R.id.password);      mRegister = (Button) findViewById(R.id.register);     mRegister.setOnClickListener(this); }   @Override public void onClick(View v) {     // TODO Auto-generated method stub      new CreateUser().execute(); }  class CreateUser extends AsyncTask<String, String, String> {      /**      * Before starting background thread Show Progress Dialog      */     boolean failure = false;      @Override     protected void onPreExecute() {         super.onPreExecute();         pDialog = new ProgressDialog(Register.this);         pDialog.setMessage("Creating User...");         pDialog.setIndeterminate(false);         pDialog.setCancelable(true);         pDialog.show();     }      @Override     protected String doInBackground(String... args) {         // TODO Auto-generated method stub         // Check for success tag         int success;         String username = user.getText().toString();         String password = pass.getText().toString();         try {             // Building Parameters             List<NameValuePair> params = new ArrayList<NameValuePair>();             params.add(new BasicNameValuePair("username", username));             params.add(new BasicNameValuePair("password", password));              Log.d("request!", "starting");              //Posting user data to script             JSONObject json = jsonParser.makeHttpRequest(                     LOGIN_URL, "POST", params);              // full json response             Log.d("Login attempt", json.toString());              // json success element             success = json.getInt(TAG_SUCCESS);             if (success == 1) {                 Log.d("User Created!", json.toString());                 Intent ii = new Intent(Register.this,HomeActivity.class);                 finish();                 startActivity(ii);                 return json.getString(TAG_MESSAGE);             } else {                 Log.d("Login Failure!", json.getString(TAG_MESSAGE));                 return json.getString(TAG_MESSAGE);              }         } catch (JSONException e) {             e.printStackTrace();         }          return null;      }      protected void onPostExecute(String file_url) {          pDialog.dismiss();         if (file_url != null) {             Toast.makeText(Register.this, file_url, Toast.LENGTH_LONG).show();         }     } } }


Trouble figuring out some attack/defense formulas. What should I change?

I'm working on something which requires a hunter to attack an animal.  This is what I have so far.  Attacker/Weapon POV   Level - 1 to 50 Base - base attack level of the weapon Weapon Impact - determines size of prey it can kill - base = 10, +10 every level Marksmanship - this is a skill which the hunter acquire with time. higher level animals will require a higher skill, Let's say it starts off at 50. Then the hunter can buy level 2 which will be let's say 150..so on.. Ammo - different types of ammo will give different types of bonuses. Some will increase impact, some skill, some both. Random multiplier - need this to make everything a bit of a gamble. Can't allow users to figure out how the formula works   Animal POV  Defense - based on: base defense of the animal + weight factor + skill required to shoot him down  This is what I have in mind. Now..I tried to come up wth some formulas to represent all this..I made some simulations in excel. They seem to work but I don't know if I took the right approach determining this. It was mostly guess work..trial and error until I got some results which seemed ok. Any advice is welcome !  Each animal has a weight between min and max. However, the Weapon Impact will limit that weight at Weapon Impact / 10 kgs. => 10 Impact = 1 kg max, 20 impact = 2 kg max..etc. To avoid hunters shooting down an animal every time, I will generate animal weights between min and Impact max + a small percentage.  For example let's say an animal is between 1 and 10 kg. With 50 impact the animal which we can shoot will have a weight between 1 and 5kg. however i will generate weights up to 5.5..to make hunters miss from time to time because the animal was to large for his level..etc.  Now to determine if a hunter shoots down an animal I compute an attack factor and a defense factor. If attack > defense.. asta la vista baby !  Attack Formula: Weapon Base + Impact + Ammo Bonus + Weapon Base *(lvl/max lvl) * multiplier  multiplier is randomly generated between 0.8 and 1.2 so it could help..or it could harm...  Defense formula = Base Defense + Base Defense*weight  ... not sure how this will scale .. any ideas? where do ppl start to generate formulas like this ?


So we bought a new build and found a heat register is directly under the dishwasher. Where the hvac is completely I stalled, the hardwood floor has not been cut and register dropped in.   My question is, should I complete the project or disconnect the supply line? Is it also normal for this placement? The builder says yes.


I would like to type a non-Latin script (Tamil) in Ubuntu 10.10.  I have installed iBUS, added all the Tamil packages in synaptic, and installed Tamil in Languages support and I still can't get it to work.  Any suggestions?


javafx exception when get image from metadata

When i try to get an image from mp3, i catch an exception.  public MediaPlayer mediaPlayer; public Media media; public MediaView mediaView; public ImageView albumPicture;  public void initialize() {     media = new Media(new File("res\\music.mp3").toURI().toString());     media.getMetadata().addListener(new MapChangeListener<String, Object>() {         @Override         public void onChanged(Change<? extends String, ?> c) {             if (c.wasAdded()) {                 if ("image".equals(c.getKey())) {                     albumPicture.setImage((Image)c.getValueAdded());                 }             }         }     });      mediaPlayer = new MediaPlayer(media);   Exception in thread "JavaFX Application Thread" java.lang.NullPointerException         at sample.Controller$1.onChanged(Controller.java:67)         at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163)         at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)         at com.sun.javafx.collections.UnmodifiableObservableMap.callObservers(UnmodifiableObservableMap.java:65)         at com.sun.javafx.collections.UnmodifiableObservableMap.lambda$new$30(UnmodifiableObservableMap.java:59)         at javafx.collections.WeakMapChangeListener.onChanged(WeakMapChangeListener.java:88)         at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163)         at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)         at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)         at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:173)         at javafx.scene.media.Media.updateMetadata(Media.java:525)         at javafx.scene.media.Media.access$200(Media.java:78)         at javafx.scene.media.Media$_MetadataListener.lambda$onMetadata$10(Media.java:544)         at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)         at java.security.AccessController.doPrivileged(Native Method)         at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)         at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)         at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)         at java.lang.Thread.run(Thread.java:748)


What type of encryption scheme can prevent cheating in this coin flip protocol?

Consider the following protocol for two parties to flip a fair coin:   Trusted party $T$ publishes her public key $p_k$ A chooses a random bit $b_A$, encrypts it under $p_k$, and announces the ciphertext $c_A$ to $B$ and $T$ $B$ does the same and announces a ciphertext $c_B$ $T$ decrypts $c_A$ and $c_B$, and announces the results. Both parties XOR the results to obtain the random value $b_A \oplus b_B$.   Suggest what type of encryption scheme would be appropriate to prevent $B$ from cheating.    I would say that an appropriate scheme to use here would be Cramer-Shoup or RSA+OAEP. How can we define an appropriate notion of security and prove that it achieves this definition?


'User removed' is counted twice in reputation tab when that user approved edits

The  is a bit off.  On June 15th, a user was deleted who (presumably) cast the final 'approve' vote on two suggested edits. On that day, SmokeDetector's reputation decreased from 299 to 295, but the reputation tab makes it look like a -8 change.


How to smooth the movement of my player in Unity?

I would like to move my player from one position to another position using key detection. I would like to know how I can make the player movement smooth.  Code:  if (Input.GetKeyDown(KeyCode.A))     {         xSpeed = -1f;         ySpeed = 0f;         X = X + xSpeed;         Y = Y + ySpeed;         Vector3 NewPos = new Vector3(X, Y, 0);         gameObject.transform.position = NewPos;     }     else if (Input.GetKeyDown(KeyCode.D))     {         xSpeed = 1f;         ySpeed = 0f;         X = X + xSpeed;         Y = Y + ySpeed;         Vector3 NewPos = new Vector3(X, Y, 0);         gameObject.transform.position = NewPos;     }     else if (Input.GetKeyDown(KeyCode.W))     {         xSpeed = 0f;         ySpeed = 1f;         X = X + xSpeed;         Y = Y + ySpeed;         Vector3 NewPos = new Vector3(X, Y, 0);         gameObject.transform.position = NewPos;     }      else if (Input.GetKeyDown(KeyCode.S))     {         xSpeed = 0f;         ySpeed = -1f;         X = X + xSpeed;         Y = Y + ySpeed;         Vector3 NewPos = new Vector3(X, Y, 0);         gameObject.transform.position = NewPos;     }


Convergence of arithmetic mean of first $n$ numbers of a convergent sequence

Given any convergent series $(a_n)_{n \in \mathbb{N}}$,consider a new sequence $(b_n)_{n \in \mathbb{N}}$, defined as $$b_n = \frac{1}{n}(a_1 + a_2 + \dots+a_n)=\frac{1}{n}\sum_{k=1}^na_k $$ for every $n \in \mathbb{N}$ ($b_n$ is the arithmetic mean of the first $n$ elements in $a_n$).  How do I proof that $(b_n)_{n \in \mathbb{N}}$ is convergent with the same limit?   I have tried using the fact that $b_n \leqslant \text{sup}\{a_m\vert  m \geqslant n\}$ and $b_n \geqslant \text{inf}\{a_m\vert  m \geqslant n\}$, and subsequently taking limits and using that $L= \text{limsup}_{n \to \infty}a_n =\text{liminf}_{n \to \infty}a_n$. Is this sound?


How can I generate debug logs when I run unit tests from MavensMate?

Generating and viewing debug logs in MavensMate has been  and works great for me - I especially like the Scrub feature. However, I can't generate a log when I run unit tests.  To replicate my problem, here is a simple test:  @isTest private class TestingTestClass {      @isTest static void test_method_one() {         System.debug('I would like to see this in my debug log');         System.assertEquals(1, 1);     }  }   Here is my configuration that is used by Quick Log to register the trace flag:  {     "levels": {         "Workflow": "INFO",          "Callout": "INFO",          "System": "DEBUG",          "Database": "INFO",          "ApexCode": "DEBUG",          "Validation": "INFO",          "Visualforce": "DEBUG"     },      "users": [         "005i0000001qYYLAA2"     ],      "expiration": 480 }   When I use my browser and go to Setup > Monitoring > Debug Logs I can see my trace flag correctly registered under monitored users and the filters are the same as specified.  To make sure this is in fact the user under which Unit Tests are run, I go to Setup > Develop > Apex Test Execution, run my sample test and check the username    The test run generate a debug log as expected.  So, I clear all the logs and from Sublime launch a Unit test run when I set the log level like this:    That does not generate any log output. (I do a fresh browse to Setup > Monitoring > Debug Logs and there are no logs)  Any help very much appreciated. Running Sublime Text, with MavensMate v3.5.0 talking to a Salesforce sandbox on Summer 14


\overset and align environment: how to get correct alignment?

I'm using the align environment together with the \overset command to put some text over a relation symbol. Here is my MWE:  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{amsmath}  \begin{document} \begin{align*} f(x)&=g(x)\\     &\overset{something}{=} h(x) \end{align*} \end{document}   And the output is    As you can see the alignment is wrong, or at least is not what I want! I would like the two equal signs to be aligned one to the other, while with my code I get the alignment of the first equal sign with the start of the text over the symbol!  I've already tried with  \overset{something}{&=} h(x)   and  \overset{something}&{=} h(x)   but both solutions led to an error.  How can I get the correct alignment?  Edit: the original question was about \buildrel, but, as @egreg said in a comment, this command is not supported in LaTeX, so I've substituted it with \overset.


Dyntopo creating spikes or stretched sculpt result on mesh

When I try to sculpt with dyntopo on a sword it creates really weird results while it works just fine on other meshes. Any idea what causes this?


I have a Canon T2i (2010) I am looking to upgrade. Are there any other brands of camera that my Canon lenses will fit?


Find all continuous functions $f:\mathbb R\to\mathbb R$ such that $f(f(x))=e^{x}$  I didn't solve this problem, but I proved that f is increasing and $ x<f(x)<e^{x} $  please help


UnauthorizedAccessException cannot resolve Directory.GetFiles failure

fails on the first encounter with a folder it has no access rights to.  The method throws an UnauthorizedAccessException (which can be caught) but by the time this is done, the method has already failed/terminated.  The code I am using is listed below:  try {     // looks in stated directory and returns the path of all files found                     getFiles = Directory.GetFiles(         @directoryToSearch,          filetype,          SearchOption.AllDirectories);              } catch (UnauthorizedAccessException)  {  }   As far as I am aware, there is no way to check beforehand whether a certain folder has access rights defined.  In my example, I'm searching on a disk across a network and when I come across a root access only folder, my program fails.


Why do Tesla and other manufacturers use AC motors?

I know Tesla and others use AC motors. I read a lot and no one really provides a good answer. I know they are using an AC induction motor, and with Model 3 also an AC synchronous permanent magnet motor also referred to as brushless DC.  Basically my question is why does almost everyone opt to use frequency drive to control their motors?  I know they could use synchronous permanent magnet motors and run in from DC but they still run it on AC. What advantage are they gaining? Better control, cost, torque?


What kind of things ’is’ vs What kind of things ’are’

I was recently typing up a short story essay when my computer's spelling & grammar check informed me that the sentence "What kind of things are in there?" should be written as "What kind of things is in there?" I am not sure which one is grammatically correct to use. I am sure, due to subject-verb agreement that my original was correct, but I am not sure.


I used the  tutorial below to setup postfix and dovecot on a Digital Ocean server. But I'm getting "Connection Timed out" when postfix/smtp tries to deliver an email to a remote host like gmail or yahoo..      RECEIVING A NEW MESSAGE /var/log/mail.log    Feb 2 22:33:38 localhost dovecot: auth-worker: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth  Feb 2 22:33:38 localhost dovecot: auth-worker: Debug: pam(app,189.63.49.XXX): lookup service=dovecot  Feb 2 22:33:38 localhost dovecot: auth-worker: Debug: pam(app,189.63.49.XXX): #1/1 style=1 msg=Password:   Feb 2 22:33:38 localhost dovecot: auth: Debug: client out: OK#0111#011user=app  Feb 2 22:33:40 localhost postfix/submission/smtpd[1045]: E9AA724264: client=unknown[189.63.49.XXX], sasl_method=PLAIN, sasl_username=app  Feb 2 22:33:43 localhost postfix/cleanup[1052]: E9AA724264: message-id=  Feb 2 22:33:43 localhost postfix/qmgr[32661]: E9AA724264: from=, size=485, nrcpt=1 (queue active)  Feb 2 22:33:45 localhost postfix/submission/smtpd[1045]: disconnect from unknown[189.63.49.XXX]  Feb 2 22:34:14 localhost postfix/smtp[1053]: connect to mta5.am0.yahoodns.net[98.136.216.25]:25: Connection timed out    Feb 2 22:24:21 localhost postfix/smtp[1013]: connect to mta6.am0.yahoodns.net[98.136.217.202]:25: Connection timed out  Feb 2 22:24:21 localhost postfix/smtp[1014]: connect to gmail-smtp-in.l.google.com[173.194.76.27]:25: Connection timed out  Feb 2 22:24:21 localhost postfix/smtp[1015]: connect to gmail-smtp-in.l.google.com[173.194.76.27]:25: Connection timed out  Feb 2 22:24:21 localhost postfix/smtp[1012]: connect to aspmx.l.google.com[173.194.68.27]:25: Connection timed out    Here is /etc/postfix/main.cf   /etc/postfix/master.cf   Result from #> netstat -nlptu


I'm trying to install Ubuntu 18.10 on my USB drive, but all the methods I've tried failed.  I booted a virtual machine from ISO file, and installed on my USB drive, but after I've tried to boot from my USB, it didn't even show up in my boot menu.  I used 2 USB drives to do it, one as a live USB, and installing the system on the other, but grub gets installed on my hard drive, not on the USB drive.  I manually installed grub on my USB drive, but it shows "Secure Boot Failure".  So how do I install Ubuntu on my USB drive?  Besides, I need the system to be able to boot in both BIOS and UEFI.


I'm using Windows 8.1 x64, and I'm trying a legacy app.  I get an error message complaining that the program is not compatible with x64.  Is there a way to force a program to run on 32-bit mode on a 64-bit system?  Here are some screenshots, that might shed a light on what type of program this is:  I run the program pointed to by the arrow, and the message show up one after the other (when clicking OK):


How does armour damage reduction interact with other life types in Overwatch?

As we know (for example this question ), armour in Overwatch has a damage reduction property.     Reduces incoming damage by 5 if the hit was 10 damage or more. If the damage is less than 10 then it is halved.   My question is the specific mechanics of how this interacts with other health types. Knowing this may not actually effect the outcome of any situation in game, but I'm curious as to how the system functions. Questions I have are:  Does damage reduction apply if you have a shield or overshield which would absorb all of the damage from a shot?     Example: Armour: 50, Shield 30. I get hit for 15. Do I take:    15 damage to my shield  - no damage reduction. 15-5 = 10 damage to my shield - full damage reduction.   I assume 1. will be the case.  Does damage reduction apply to all, some or none of a shot when you have a shield / overshield which would block some of the incoming damage?     Example: Armour: 50, Shield 5. I get hit for 10. Do I:    Take 5 points to the shield, then a full 5 to armour (no damage reduction). Take 5 points to the shield, then 5/2 = 2.5 points to armour (damage reduction on the "remaining" damage) Take 10-5 = 5 points to the shield (damage reduction on the whole incoming damage).   I'd assume it'd be 2.  Does damage reduction still apply if you don't have sufficient armour to absorb the entire shot?     Example: Armour: 5, get hit for 15. Do you:    Take 15-5 = 10 total damage (5 to armour, 5 to life) - full damage reduction. Take 15 damage (5 to armour, 10 to life) - no damage reduction?   I would assume 1.


How to insert date and time to a filename in a batch script?

I wrote a batch script for a Jenkins jobs which compiles a ".net" code and one of the steps there is to back up the current directory before extracting the new compiled code.  I'm using the these lines to extract the date and time which I want to insert into the backup file name:  for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set date=%%k%%i%%j for /f "tokens=1-2 delims=/:" %%a in ('time /t') do set time=%%a%%b powershell.exe -nologo -noprofile -command "& { Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::CreateFromDirectory('bin', 'bin-%date%_%time%.zip'); }" xcopy bin-%date%_%time%.zip c:\temp   The problem is with the output of time /t which looks like that:  01:00 AM   And that causes the filename to be:  bin-20170412-0100 AM.zip   which is a problem.  I want to omit the " AM" from the time variable, how can it be done?


Why did the Rebels have to fly along the Death Star trench?

We all know how to blow up the first Death Star: Fire a couple of proton torpedoes into the thermal exhaust port.  It's ray shielded, so only torpedoes will do.  To do this, the Rebel pilots had to fly down a very long trench, where they were vulnerable to fire from any TIE fighters to the rear.  In fact they were so vulnerable that most of the pilots on this run were blown up once the Imperial forces started responding to the attack. This battle is in space, so the fighters can, if necessary, come to a dead stop and hold their position while firing.  Also, when Luke fired his torpedoes, they took a 90 degree turn and went straight into the port.  So the torpedoes didn't have to be fired from in the trench. We also didn't see any gun emplacements firing at the fighters from near the exhaust port, but if there were, the Rebels could have targeted them and taken them out or run interference to make it hard for the towers to fire at a fighter targeting the exhaust port.  (They were already dodging fire in the trench as well.) A fighter could have easily flown directly at the exhaust port, firing torpedoes multiple times on approach and, if not under fire (or if protected by other fighters), could have actually stopped and taken time to target the exhaust port before firing. Is there any valid in-universe reason that the pilots had to fly down the trench before firing on the port?  And if there is, is there any reason they had to enter the trench so early? Just for reference, here is the  on YouTube.  There's no explanation given for having to fly in the trench.


What is the mechanism that restricts a body from accelerating past the speed of light?

Let's say initially from an observer's point of view, a spaceship in perfect vacuum is at rest. From the observer's point of view, once the ship starts accelerating what is causing the ship from accelerating past the speed of light? What is physically causing this resistance to acceleration as the ships velocity and therefore its relativistic mass (as opposed to its actual physical mass) increases? On earth terminal velocity exists solely because we have an atmosphere. What is physically responsible for the terminal velocity of vacuum?  I understand that this question has been asked here many times and I have read quite of few of them. All the answers I found were mathematically driven and answers the question quite satisfactorily but from my understanding, none tackled the actual physical mechanism behind this phenomenon.


Typesetting of (formal) addition compounds according to IUPAC using chemmacros

I have a problem with the output of addition compounds according to IUPAC. Compounds like CuSO4·5H2O should not have a space between the dot and the formulae [1, p. 56]:  IR-4.2.4 Formulae of (formal) addition compounds In the formulae of addition compounds and compounds which can formally be regarded as such, including clathrates and multiple salts, a special format is used. The proportions of constituents are indicated by arabic numerals preceding the formulae of the constituents, and the formulae of the constituents are separated by a centre dot.   How can I do this in a reaction equation? \documentclass[12pt]{article} \usepackage[german]{babel} \usepackage{chemmacros}  \begin{document}  \ch{CuSO4 -> [][5 H2O] CuSO4*5H2O}       \end{document}  does not work for equations. For a simple formula it is possible to remove the space by using: \ch{CuSO4}$\cdot$\ch{5H2O}   Is there any possibility to get the whole thing like IUPAC recommends it? Reference  IUPAC. Nomenclature of Inorganic Chemistry, IUPAC Recommendations 2005 (the “Red Book”), 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; RSC Publishing: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.


bash string substitution re-arranging string?

The problem I am facing is concatenating a variable that stores a command is not acting like a string when concatenating it with a regular string. An example of this is:  base_url=$(curl -sIL --max-redirs 2 'https://hp.com' | ggrep -Po 'Location: \K(.*)$' | tail -1) # at the time of writing this post the location is: https://www8.hp.com/us/en/home.html test_url="https://www8.hp.com/us/en/home.html" echo "${base_url}/subroute" echo "${test_url}/subroute"   This then outputs:  /subrouteww8.hp.com/us/en/home.html https://www8.hp.com/us/en/home.html/subroute   I cannot understand why the output is not identical. I apologize if this has already been asked but I haven't found another question dealing with this problem.


Euler-Lagrange equations in General Relativity

When obtaining the Euler Lagrange equations for a scalar field with higher order derivatives in curved space is it the same to use $$ -\partial_\nu\partial_\mu\frac{\partial \sqrt{-g} \mathcal{L}}{\partial\partial_\nu\partial_\mu\phi}+\partial_\mu\frac{\partial \sqrt{-g} \mathcal{L}}{\partial\partial_\mu\phi}-\frac{\partial \sqrt{-g} \mathcal{L}}{\partial\phi}=0 $$ or $$ -\nabla\nu\nabla\mu\frac{\partial \mathcal{L}}{\partial\nabla\nu\nabla\mu\phi}+\nabla\mu\frac{\partial \mathcal{L}}{\partial\nabla\mu\phi}-\frac{\partial  \mathcal{L}}{\partial\phi}=0~~? $$  For a canonical kinetic term it's easy to see that it's true.


Can you Install Ubuntu Phone OS on Alcatel 5020n?

Hidy ho all,  I have this old crappy smart phone, and I wanted to try and get another OS on it, and see if it ran better.  Its currently running Android 4.1.2, and (last time I checked) had an unlocked boot loader.  Mind you, this was years ago, and I can't even remember how to check nowadays.  If you don't want to look up the specs, I have some of them here: Alcatel Onetouch 5020n 512Mb of RAM 1.0 GHz Cortex-A9 (Dual Core processor) 4 GB of internal space (of which, 2 are available to the user)  If I read correctly, these are the minimum specs for the OS.  But again, my memory could be failing me.  So, simple enough question.  Can my phone run this operating system?  And, if so, where should one look for installing an new operating system on an old phone?


I want to perform raster smoothing on a DEM file. I want to to assign the elevation of each pixel using the average elevations of its 8 neighbors. The ESRI's "Python scripting for ArcGIS" has a chapter on using python for raster but it did not help me to write a code for this. I'm looking for any useful literature, tutorial, or sample code...! please note that r.buffer and r.neighbors is not a good answer for me since I want to learn how to write this code completely.   P.S: I already took a look at  and . they did not help me...may be since my knowledge is limited I need more comprehensive answer. Thanks in advance for any help you are able to provide.


Aura component critical updates related to $A.createComponent() or $A.createComponents()

i just observed  release notes, and in my org critical updates area, we r using $A.createComponent()/ $A.createComponents() in bunch of our custom lightning cmps's. still i am not under stand how this critical updates 'll effects of our orgs, can you please explain how it'll effects for below code snippet.  we r using simple like below:  cmpcontroller.js  opencustomcmpmodal: function(component,field1,field2,field3){  var attributes = {    'chldfield1': field1,    'chldfield2': field2,    'chldfield3': field3 };      $A.createComponents(                 [                     ["aura:html", {                         "tag": "h2",                         "body": 'Modal header',                         "HTMLAttributes": {                              "class": "slds-text-heading_medium slds-hyphenate"                          }                     }],                     ["c:mycustomcomponent",attributes]                 ],             function(components, status) {                 if (status === "SUCCESS") {                     modalheader = components[0];                     modalBody = components[1];                    var promiseaction =  component.find('overlayLib').showCustomModal({                        header:modalheader,                         body: modalBody,                         showCloseButton: true,                         cssClass: "my-modal,my-custom-class,my-other-class"                     });                     component.set("v.modalPromise",promiseaction);                 }             }); }


How to set a file size limit for a directory?

I have a directory on my system which is used for a specific reason by applications and users, but I don't want its size to be allowed to exceed 2GB, is there a way of setting up some sort of limit which just doesn't allow the file size to exceed that or any other amount I decide to set for it in the future?  When the size limit is exceeded it should undo the last change (though there should be an option to have it so that it just stops the operation and doesn't care if half a file was copied and left there) and then display a warning to the user.   I am running Ubuntu GNOME 16.10 with GNOME 3.22.


After installation I am getting like this:  E: Failed to fetch http://archive.canonical.com/pool/partner/s/skype/skype_4.2.0.11-0ubuntu0.12.04.2_amd64.deb  404  Not Found [IP: 91.189.91.15 80]    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Is it possible for a massless particle to have a charge?

I don't believe there is a massless charged particle, but would it even be possible for a massless particle to be charged as the energy of the charge itself would be a kind of non-momentum energy and therefore all of it's energy would not be in the form of momentum which would imply sub-light velocity and mass.


Unable to format 64gb RAW SD card Cyclic Redundancy Check error

I recently purchased a new, Silicon Power high-quality micro-SD card. I used it multiple times as a boot disk for my Raspberry Pi, each time I burned a 4gb disk image and installed the OS, then connected it to my computer and reformatted the SD card to a 64gb FAT32 filesystem with Windows' diskpart program. However, yesterday, after successfully burning the disk image, which was able to successfully boot the computer, I am unable to resize and reformat the disk. I tried using Diskpart, but i get data error (Cyclic Redundancy Check), and since a number of sites recommended chkdsk, I am unable to use chkdsk because I have a raw filesystem.  This seems like a dead end, because people recommend chkdsk to fix a cyclic redundancy check, but I cannot use chkdsk because I am stuck with a RAW filesystem, which I am unable to format because of Cyclic Redundancy Check errors. There is absolutely no important data on my drive, and I do not have any problem reformatting and clearing all the data on the drive, so I am not looking for a data recovery solution, I am looking for a solution that will allow me to use my 64gb drive again.  I am stuck, please help me recover my drive. Thank you very much!  EDIT: I broke my Raspberry Pi, so I can no longer do any solutions that require the Raspberry Pi. However, I still have a Windows laptop running Windows 8.1.


When does the Roll Up fields are calculated?

Well while doing some research found that Rollup fields are not updated in after trigger(am querying the field again using an SOQL from the trigger). This seems to be unexpected as per my knowledge they should be updated in after trigger.  Is it something expected or am doing something wrong?


hot network questions have inconsistent CSS for visited/not visited depending on the site you're on

This is a HNQ excerpt from Stack Overflow. Visited questions are objectively darker.    This is a HNQ excerpt from Super User. Visited questions are objectively lighter.    This is a HNQ excerpt from Seasoned Advice. Visited questions are objectively darker.    This is a HNQ excerpt from Puzzling, a beta site. Visited questions are objectively darker, although the difference is hard to spot.    This is a HNQ excerpt from Travel. Visited questions actually have a completely different color.    These are 5 different sites, with 5 different formats for how the HNQ sidebar displays links. Some make visited links darker. Some make them lighter. Some make them a little big darker. some give visited links a completely different color. This is very confusing: If someone visits one of these HNQ questions and wants to continue browsing the HNQ from there, they likely expect that the links in that HNQ segment have consistent layout compared to the HNQ segment from the website they came from.  Is this something worth looking into? I realize that each site has their own look and feel, but an element that appears on every site should be consistent IMHO. People have expectations about how links work, and one of those is that if you click on a link within the same domain (which the HNQ segment arguably is), they behave similary on that page as they do on the page you come from.


Formatting external sd card as an internal storage

I'm on Samsung Galaxy On7, Android 6.0.1-Marshmallow. My phone has a small internal memory, due to which I'm thinking of converting the sd card to an internal storage facility.  I read , where they've explained how Android 6.0.1 allows one to convert a sd card to an internal storage facility by formatting. They've also stated in the article as to how to rollback the formatting.  Suppose I've formatted my sd card, and moved several applications there. Now, I want to rollback the formatting. As they've written in the article, I'll have to move my apps to internal storage before I format again. But, is it possible to move apps to internal storage after moving them to the formatted sd card? That is, after formatting, will I still be shown an option of moving an app back to internal storage?  Moreover, can this method bypass the developer's setting which prevents an app to be moved to sd card? I mean, if I have an app that cannot be ordinarily moved to sd card, then after formating, will I be able to move it to sd card?


Why does my counter of "posts edited" not increase?

I have my account on Stack Overflow, usually edit posts occasionally and noticed that my counter increased for each post he accepted my edit.  Recently I have noticed that my counter does not increase by more posts you edit. This happened since I got 2K reputation.  My question:  Is there a way to continue editing posts normally and increase my counter to get badges related to posting edits?


Consider the MWE (copied from ):  \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{mindmap} \pagestyle{empty} \begin{document} \begin{tikzpicture}[small mindmap, outer sep=0pt, text=black]  \begin{scope}[concept color=brown!30] \node (right) at (2,0) [concept] {Right}   [clockwise from=70]   child { node[concept] {R.1} }   child { node[concept] {R.2} } ; \end{scope}  \begin{scope}[concept color=green!40!black!30] \node (left) at (-2,0) [concept] {Left}   [counterclockwise from=210]   child { node[concept] {L.1}  }   child { node[concept] {L.2} } ; \end{scope}  \path (left) to[circle connection bar switch color=from (green!40!black!30) to (brown!30)] (right) ;  \end{tikzpicture} \end{document}   Now I want that, R.1 and L.1 will be merged to a single node. In other words, the two root nodes will share a common child. Any advice will be appreciated.  EDIT  The linked  asks the same problem. However, I would like to point out that the  to this question does not (in my humble understanding) solve the problem. It intelligently places one child on top of another, creating an impression that a child is shared. Apparently, it needs manual processing to place the node in the middle (which can be tedious, as can be seen from the ).


Theme generic file link in node template

I want to change the text on a link to download a file in my node template. In Manage Display I have selected  Generic File as the formatter which outputs this    but I want to change it to this    How can I do this?


GNU Screen doesn't echo unicode characters correct

When I do this in my terminal:  echo -e "\xF0\x9f\x8d\xba"   I get a cool beer mug in my terminal: 🍺  However, when I start screen, and try the same, I'm getting a �. How do I get the nice beer mug?  This is my .screenrc:  nethack on startup_message off defscrollback 3000 hardstatus on hardstatus alwayslastline hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %c" termcapinfo xterm 'bc@:bs@' ignorecase on maptimeout 0 vbell off defutf8 on defencoding utf8   Also running screen with the -U option doesn't help.


How to Group Commands After '&&' or '||' Branch and Not Invoke Subshell Variable Restriction?

This script just tries to copy file foo to bar/, and if it`s unsuccessful, retries 2 more times.  EDIT: as it turns out, the reason the second example works and the first does not, is because the use of (...) to run a group of commands after the && or || branch is considered a subshell and does not affect the outer variable.  So revised question: how can I group some commands like the first example, but not use a subshell to do so?  EDIT 2: the answer is to replace ( ... ) with { ...; }!  #!/usr/bin/env bash #  # Be safe set -euo pipefail  # Init variables __file="foo" output_dir="bar" logfile="test.log" errorlevel=8 count=0  # Try three times to copy a file until (( errorlevel == 0 || count == 3 )); do    cp -Lv --no-preserve=mode \     "$__file" \     "$output_dir/" \     | tee -a "$logfile" \     && (errorlevel=$?; echo "zero return, $errorlevel") \     || (errorlevel=$?; echo "non-zero return, $errorlevel")    echo "errorlevel $errorlevel"    (( ++count ))    echo "count $count"  done  unset errorlevel unset count   The problem:  When the copy fails, or is successful, the || or && branch catches correctly and sets variable errorlevel to 1 or 0, respectively, as evidenced with the echo $errorlevel contained within the branch.  But the very next command, also an echo, returns the initial variable value of 8! I don't understand why this is happening.  A few notes:   I'm using && and || explicitly because I have set -e to make this script as safe as possible (this is actually a small routine in a 1500-line script). If I don't use || to catch a non-zero return, the script exits. Alternatively I could set +e, do the copy routine without having to use && and || (by catching the errorlevel once), and then set -e again, but I'd rather not because it doesn't match the style of the rest of my script. I'm using set -o pipefail to pass a non-zero errorlevel down the pipeline so that my tee -a "$logfile" doesn't always override my exit errorlevel. I'm using ++count instead of count++ because the former returns a zero errorlevel, and the latter returns a non-zero errorlevel (and I would have to do an ugly (( count++ )) || true because of the set -e explained in note #1).   I have worked around it for now by setting the errorlevel variable explicitly to 1 or 0, since I actually don't care what the non-zero errorlevel is, but I would still really like to know why the above isn`t working as I expect.  Here's the workaround:  #!/usr/bin/env bash #  set -euo pipefail  __file="foo" output_dir="bar" logfile="test.log"  errorlevel=1 count=0 until (( errorlevel == 0 || count == 5 )); do   cp -Lv --no-preserve=mode \     "$__file" \     "$output_dir/" \     | tee -a "$logfile" \     && errorlevel=0 \     || errorlevel=1   (( ++count ))   sleep 1 done  unset errorlevel unset count   Any insight is greatly appreciated!


How did people estimate the speed of light before modern technology?

I just read a wikipedia page on the . Apparently people have made pretty accurate estimates for almost 200 years. How did they do this? How did they measure any fundamental constant accurately before they had modern technology?


Disable all select options on page with specific value - Javascript

I am trying to disable all options in all select boxes with specific value on page.  If there are 5 select boxes and each have 4 options. Like this:  <select>     <option value="1">1</option>     <option value="2">2</option>     <option value="3">3</option>     <option value="4">4</option> </select>  <select>     <option value="1">1</option>     <option value="2">2</option>     <option value="3">3</option>     <option value="4">4</option> </select>  <select>     <option value="1">1</option>     <option value="2">2</option>     <option value="3">3</option>     <option value="4">4</option> </select>   I want to disable all options with value 3 on whole page, how would i achieve this?  $("select option["+previous+"]").attr('disabled', 'disabled');   But this is disabling Select option with selected value 3.  Any help will be appreciated.


Do centripetal and reactive centrifugal forces cancel each other out?

In order for a body to move with uniform velocity in a circular path, there must exist some force towards the centre of curvature of the circular path. This is centripetal force. By Newton's Third Law, there must exist a reactive force that is equal in magnitude and opposite in direction. This is the reactive centrifugal force.  My question is simple, and it is probably the result of lack of common sense but here it goes: In uniform circular motion, why don't these forces simply cancel each other out? If they did, how would we know they exist in that situation?  When I swing a rock tied to a rope, I feel the centrifugal force, but not the centripetal force. In this situation how can the reactive force be greater than the force itself?


Relevent files not showing up in Dash after restore

After doing a  restore, relevant files are not showing up in Dash search. How do I fix this?  Here's a screenshot:   Here I'd expect to see Module_4.pdf in my Desktop folder. But I see the recent files I opened.  UPDATE: I can search songs by going to the music tab.


Are the shields and hull of the USS Enterprise-D capable of withstanding a direct nuclear strike?

I'm watching the season two episode of TOS "Patterns of Force" where a nuclear missile is on an intercept course with the Enterprise, but is destroyed by the ship's weapons. This got me thinking as to whether or not the Enterprise-D would be able to take a nuclear missile. In the re-imagined Battlestar Galactica, the Cylons and humans basically throw nuclear missiles at each other constantly and the ships remain relatively unscathed. Would this be the case with the Enterprise-D?


The suit was altered superbly by the tailor, making the timid old man feel like a bold young lion.   I don't understand why the sentence is correct because the word "making" isn't placed after a form of 'be'. But I think it's not a gerund, and I think the word "was" in the beginning of the sentence is for the "altered superbly by the tailor". Please help me to understand the grammar involved here.


Disabling sound output devices (e.g. Internal Speakers) in OS X

Since my Cinema Display is both connected through mDP and USB, I can (stupidly enough) both choose “LED Cinema Display” or “Display Audio”.  Also, I never use the internal speakers since they sound extremely tinny.    How do I remove/delete/disable unwanted audio devices? It must be possible somehow!


A problem with nullpointerexception in multithread programm

I have a exercise from ThinkingInJava book: "//Exercise 22: (4) Create an example of a busy wait.One task sleeps for a while and then sets a flag to true.The second task watches that flag inside a while loop(this is the busy wait) and when the flag becomes true,sets it back to false and reports the change to the console.Note how much wasted time the program spends inside the busy wait,and create a second version of the program that uses wait( ) instead of the busy wait" But when I run a programm I always get a NullPointerException and I don't the reason of It. Im initialized all fields and run a programm in a proper sequence. The exception is here and connected with flag field.: "Exception in thread "pool-1-thread-2" java.lang.NullPointerException     at ThinkingInJava.Concurrency.P882.Locker.checkFlag(BusyWait.java:46)     at ThinkingInJava.Concurrency.P882.Locker.run(BusyWait.java:55)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang.Thread.run(Thread.java:834)   class Switcher implements Runnable { private volatile boolean flag = false; @Override public void run() {     try {         TimeUnit.MILLISECONDS.sleep(100);     } catch (InterruptedException e) {         System.out.println(e);     }     flag = true; } public synchronized boolean getFlag() { return flag; } public void setFlagToFalse() {     flag = false;     System.out.println(flag); }  @Override public String toString() {     return "Swither turn " + flag; }  } class Locker implements Runnable {     private Switcher switcher;     private volatile boolean flag;     public Locker(Switcher switcher) {         switcher = switcher;         flag = switcher.getFlag();         System.out.println("Class Switcher: " + switcher);         System.out.println("field flag: " + flag);     }     public void checkFlag() {         if(switcher.getFlag())             flag = switcher.getFlag();     }     public boolean getFlag() { return switcher.getFlag(); }     @Override     public void run() {        // System.out.println(switcher);         long start = System.currentTimeMillis();         while (true) {             checkFlag();             if(flag) {                flag = false;                long duration = System.currentTimeMillis() - start;                System.out.println(duration);                return;             }         }     } }  public class BusyWait {     public static void main(String[] args) {         ExecutorService exec = Executors.newCachedThreadPool();         Switcher switcher = new Switcher();         Locker locker = new Locker(switcher);         exec.execute(switcher);         exec.execute(locker);         exec.shutdown();     } }


Get relative risk ratio and confidence interval from logistic regression

There are many examples on these forums of people calculating risk ratios from logistic regressions, but none of them seem to match my situation.   I have two predictor variables - one continuous and one binary. I'm interested in how the association between the continuous predictor and the outcome differs for group1 vs group2. I know this information is contained in the model coefficients, but I'd like to present the predicted risk ratio and confidence intervals for group1/group2 as a function of the continuous variable.  Here's some simulated data:  library(tidyr) library(dplyr) set.seed(42) N  <- 1000 dat <- data.frame(X1 = rnorm(N, 0, 1),                   X2 = rbinom(N, 1, .5))  dat$Y <- 0.5*dat$X1 - 0.3*dat$X2 - (0.2*dat$X1*dat$X2) + rnorm(N, 0, 1)  dat$Y <- as.numeric(cut(dat$Y, breaks=c(-Inf, median(dat$Y), Inf)))-1  mod <- glm(Y~X1*X2, family='binomial', data=dat)  newdat <- expand.grid(X1 = seq(-3, 3, .25),                       X2 = c(0, 1))  newdat$y_pred <- predict(mod, type='response', newdata = newdat) newdat %>%   spread(X2, y_pred) %>%   mutate(relative_risk = `0`/`1`) -> newdat   Basically, I would like to know whether it is possible for me to obtain a confidence interval for that relative_risk variable, and if so, how to compute it.  Bonus points if the method can be generalized to multilevel models.


I had a normally working Win7 computer a couple hours ago... I had removed a hard drive from a broken laptop and put it into an enclosure. Then I used ICACLS to reset the permissions on it so the files could be accessed. Anyway, I don't know what happened, but I somehow changed something on my computer, not just the external drive. I couldn't open most programs without running them as administrator (including chrome). I ran icacls "%appdata%*.*" /grant "%username%":(F) /T and now I can run Chrome but it won't sync.   I tried doing a system restore from several points from safe mode but they all fail.  I'm thinking about doing a icacls "c:*.*" /grant "%username%":(f) /T /C will that help or just make it worse?


How can I set up a persistent /home for a Live USB?

I've got a 120GB USB 3.0 SSD and I would like to configure it as a Live USB with as much persistence as possible with regards to updates and also storing Steam games and misc system configurations.  If I recall correctly, the standard methods of making a persistent Live USB are limited to approximately 4GB of persistence. Is that for things other than /home? Can I partition the rest of the USB as an ext4 mounted at /home and use that instead with approximately 100GB+ of space for Steam games?


How to use subdivision modifier properly on this cylinder?

So my friend is trying to make a plane out of a cylinder and we decided to make it smooth but ends up a mess...     anyone knows how to fix this issue? :(


Which of Dumbledore's abilities make him the greatest wizard of the age?

Is there any mention on the abilities/capabilities that make Albus Dumbledore the finest wizard of his age? I know he defeated Grindewald and Voldemort was afraid of him too because of his magical knowledge.   What I want to know is as a reader, did we get to glimpse exactly what all those abilities were? We came to know that he was excellent in transfiguration (Book 5) and he could speak Mermish (Book 4) and Can perform magic using strange unknown languages (Book 2 and Book 6)..Also his work on Alchemy and Discovery of Uses of Dragon's Blood (Book 1).   Anything else that might suggest he was more knowledgeable than any other wizard alive?


Adding a term to the Lagrangian Density without changing Lagrange's Equations

I'm stuck on a problem in the last chapter of Hamill's Student's Guide to Lagrangians and Hamiltonians. It asks why adding:  $$ \frac {\partial \mathscr{L}} {\partial t} + \frac {\partial \mathscr{L}} {\partial x} $$  to the Lagrangian density $\mathscr{L}$ won't change Lagrange's equations.  I've tried starting from Lagrange's equations themselves and from Hamilton's principle, but I can't get the new terms to cancel out. I also know that if the partial derivatives were of the variation, I could integrate and the variation would be zero at the boundary - but this hasn't really helped. Any help would be much appreciated!  References:    P. Hamill, A Student’s Guide to Lagrangians and Hamiltonians, 2014; problem 7.1 p. 166.


Managed file: the file used in the field may not be referenced

I am having some issues with the  type. Whenever I try to edit and save a form that has a managed_file element in it an error occurs: The file  used in the Picture field may not be referenced.  This is the code I'm using:  function foo_form ($form, &$form_state, $foo) {     ...        $form['file'] = array(     '#type' => 'managed_file',     '#title' => t('Picture'),     '#default_value' => (isset($foo->file->fid) ? $banner->foo->fid : ''),     '#upload_location' => variable_get('foo_upload_location'),   );    if (isset($foo->file)) {     $form['current_file'] = array(       '#type' => 'hidden',       '#value' => $foo->file->fid,     );   }   ...   $form['submit'] = array(     '#type' => 'submit',     '#value' => t('Save'),   );   return $form;  }  function foo_form_submit ($form, &$form_state) {   $foo = (object)$form_state['values'];    $current_file_set = isset($form_state['values']['current_file']);    if ($form_state['values']['file'] != 0 && !$current_file_set) {     // Load the file uploaded in the form.     $file = file_load($form_state['values']['file']);      $file->status = FILE_STATUS_PERMANENT;      file_save($file);      $foo->file = $file->fid;   } else if ($form_state['values']['file'] != 0 && $current_file_set) {      // If we are uploading a different picture, delete the old one and save the     // new one. If not, don't do anything.     if ($form_state['values']['current_file'] != $form_state['values']['file']) {       file_delete(file_load($form_state['values']['current_file']));       // Load the file uploaded in the form.       $file = file_load($form_state['values']['file']);        $file->status = FILE_STATUS_PERMANENT;        file_save($file);        $foo->file = $file->fid;     }   } else {     file_delete(file_load($form_state['values']['current_file']));     $foo->file = null;   }    ... }   I traced the error back to the  function in modules/file/file.module but don't know anything about the file references.


onClick not working on ajax generated content

My code doesn't show errors, but also doesn't work as it should. The output from the ajax call is working fine but I just can't get anything out of the onClick, no errors message, nothing.  The HTML

   The Ajax call  $(document).ready(function() {  $('.tab2').click(function(){         var account_id = $('#account_id').val();               $.ajax({                  url: 'ajax/account_info_serials_ajax.php',                  type:'POST',                  dataType: 'json',                  data: 'account_id='+account_id,                         success: function(response){                 $('#serials').html(response.table),                 $('#accounts_info_key').html(response.key),                 $('.drop_down').hide();                 },               error:function (xhr, ajaxOptions, thrownError){               alert(thrownError);                } // End of success function of ajax form               }); //end of ajax        });//close trigger   });//close whole function   The PHP     $response = '';    $response .='
';    $response .='plop';     $response .='
';    $response .='
';    $response .='bob';    $response .='
';     $output_array = array(               'table' => $response,               'key' => $key,               'count' => $count      );    echo json_encode($output_array);   The jquery onclick  $(document).ready(function() {       $('#serials').on("click", ".question", function(e){         alert('smeg');       }); });   Please note, I am not asking how to do it, I am asking why my version is not working, it is NOT a duplicate question


Need to split a file into multiple files, but ensure the grouped data remains in same file

This question is not a duplicate, because here we need also to ensure, that group of common values/rows remain in the same split file (and is not scattered across multiple split files).  All, I tried to google a solution but did not find any that suits my requirement.  Question: I have a huge file that needs to be split into multiple files if the the size exceeds 2GB. This, I am planning to do using the record count. But the challenge is, when I split the file, the group data should not split. It should remain in single file.  ex:  A,1,2,6/11/2018,X,Y,Z A,2,2,6/11/2018,X,Y,B A,3,2,6/11/2018,X,Y,Z A,4,2,6/12/2018,X,Y,Z B,1,2,6/11/2018,X,Y,Z B,2,2,6/11/2018,X,Y,B A,5,2,6/15/2018,X,C,Z A,6,3,6/110/2018,A,Y,Z C,3,2,6/11/2018,X,Y,Z C,4,2,6/12/2018,X,Y,Z C,5,2,6/15/2018,X,C,Z D,6,3,6/110/2018,A,Y,Z E,6,3,6/110/2018,A,Y,Z E,6,3,6/110/2018,A,Y,Z G,6,3,6/110/2018,A,Y,Z   In the above sample example, let's say my group key is the first column. Therefore, if I decide to split a file into multiple files (with record count cut off in each file as 7 records max), I don't want records with value "A" to be split into multiple files. Similarly, records with 'B", "C" etc should also remain in single file. All grouped data should remain in the same splitted file.A total of 3 files are created from above example (but same group data should remain in a single splitted file)  For above example: below should be a sample output:  op_file_1  A,1,2,6/11/2018,X,Y,Z A,2,2,6/11/2018,X,Y,B A,3,2,6/11/2018,X,Y,Z A,4,2,6/12/2018,X,Y,Z A,5,2,6/15/2018,X,C,Z A,6,3,6/110/2018,A,Y,Z G,6,3,6/110/2018,A,Y,Z   op_file_2  B,1,2,6/11/2018,X,Y,Z B,2,2,6/11/2018,X,Y,B C,3,2,6/11/2018,X,Y,Z C,4,2,6/12/2018,X,Y,Z C,5,2,6/15/2018,X,C,Z E,6,3,6/110/2018,A,Y,Z E,6,3,6/110/2018,A,Y,Z   op_file_3  D,6,3,6/110/2018,A,Y,Z


Where was this photo taken? (Windows 10 lock screen)

Can someone point to a location, where this photograph was taken? It looks stunning!  This is one of lockscreen wallpapers in Windows 10.


The question is almost the same one that has been published before. But I think it's good to treat it again because it is not very clear, at least, for me.Also it does not have an accepted answer.  I want to draw a line using: bge.render.drawLine(fromVec, toVec, color) Draw a line in the 3D scene.  Parameters:   fromVec (list [x, y, z]) – the origin of the line  toVec (list [x, y, z]) – the end of the line  color (list [r, g, b]) – the color of the line  but I get a error message:  NameError: name 'bge' is not defined   Reading the question someone did before, first I put enable the game engine by selecting it in the render engine menu:    But I get an error when a try to import bge  ImportError: No module named 'bge'


I inserted data into phpmyadmin and have the select function:   $twitterfingers="select * from answers equivalent where tweet like  '%".$question."%' limit 1"; $state2=$theDatabase->prepare($twitterfingers); $state2->execute(); $tweets=$state2->fetchAll(); $state2->closeCursor(); ?>`   The same tweets keep appearing, I would like a random shuffle of the tweets of appear. Also, it only works when a single word is typed into variable, not a phrase.  Thanks.


How to fix gaps between flooring planks in mid-1800s house?

I live in a mid-1800s house, which I plan to sell this Spring. The original (I think) wood flooring has gaps between the planks, some pretty sizable (photos follow).  Is there any good fix for this? I've seen people use wood filler/epoxy, and it didn't seem to turn out well. Perhaps doing that and painting/dying it black might work better.  I've heard the "old" solution was to pack those spaces with rope, but I don't think that would look better than the status quo.  Any suggestions?  Photos, big gap:    Medium gap:    Small gap:


User Interface Changes for Mac when Porting Windows Application

I have an existing windows application, for which I have decided to create a Mac version. The problem is that the current UI involves a lot of buttons, tabbed panels, multiple windows etc.  This UI had been rated as intuitive and easy to use and straightforward  by many customers and editors. But a beginner (very less experience) may find in confusing a little, but it has been complemented with tutorial.      When creating the Macintosh variant, should I focus on creating a simplified and minimalistic UI (this does not mean the current UI is complex, but I think Mac user's prefer a simple UI right?) or should I try to copy the exact same thing?  By reducing the UI some of the features may be missing. But it can be added later if needed. Should I focus on a fresh approach (this is easier rather than copying the complex UI pattern) or should I go with the old recognized setup?


How to send ALL outbound email of salesforce from the same fix address?

I have problems with emails sended by salesforce to users and Office 365. The Office 365 admin block all the salesforce automatic email because they are sended from a @company.com address. To prevent fraud I need to send ALL automatic emails from a fixed address, for example salesforce@gmail.com


How to share the file names of all the files in a folder in Android?

It is being surprisingly hard to achieve. I've tried so far:   Download file manager apps from Google Play. Unfortunately, "share" shares the files, not the file names. None of them had a option like copy file names Download backup apps. Unfortunately, none of them backup the file names of a folder.   Any idea to copy to the clipboard or share the file names of all the files of a folder?


Show that $2^n>n$ for $n\in \mathbb{N}$   I can solve this by mathematical induction. Is there any other method to solve.


I am trying to understand Principal Component Analysis (PCA). I found  that introduces it and the concept of the percentage of variance.  However, I am very confused about what "Percentage of Variance" (POV) means. Here are the questions I have:       Is there a formal definition or mathematics formula to define "percentage of variance"?     Do we only use POV for calculating PCA? Is POV used somewhere else?     Is POV the same as "Proportion of Variance Explained"? (There are many similar terms online which really confuse me.)


How (if at all) can the neutron-proton ratio of stable atoms be explained under the nuclear shell model?

To begin where I did with this question, I was originally wondering about why the neutron-proton ratio is close to 1 for stable nuclei. The answer to my original question (as far as I understand it) is that, due to the exclusion principle, not all of the protons or neutrons can be in the ground energy state inside the nucleus, therefore when the neutron-proton ratio is already low it would take more energy to bind an additional proton than it would for a proton to decay into a neutron, or vice versa when the ratio is high, so the ratio tends towards 1.  But in reality, the nuclear ratio does not tend towards 1. After some research, what I've found is that, via the Bethe-Weizsäcker formula from the liquid drop model of the nucleus, nucleon binding energy is minimized when the nuclear ratio is near $1+\frac{a_C}{2a_A}A^\frac{2}{3}$. However, it was my understanding that the liquid drop model is mostly considered outdated, as it cannot account for various observations, such as the magic numbers, which are readily accounted for by other models like the nuclear shell model. So, to get back to my question, is there any way to account for the increase in neutron-proton ratio with the nuclear shell model?


Correct spelling of Polish surname Mahowski?

I am looking for the correct spelling of Polish surname Mihowski or   Mahowski? I hope to find cousins in Poland.


What distinguishes a predicative complement from a direct object?

What makes be an intransitive verb? How do we know that the analysis of It is me as transitive by tradtional grammars is incorrect? And how does this analysis apply to other verbs, like hurt for example below:    How to tell if hurt in It hurt me is a copula? It can be replaced by other to be linking verbs (Is, was etc.) Even though (Is, was) are stative verbs while hurt is more of a dynamic/action verb.     The following verbs are true linking verbs: any form of the verb be [am,is, are, was, were, has been, are being, might have been, etc.],become, and seem. These true linking verbs are always linking verbs.      **Then you have a list of verbs with multiple personalities: appear, feel,grow, look, prove, remain, smell, sound, taste, and turn. Sometimes these verbs are linking verbs; sometimes they are action verbs.      How do you tell when they are action verbs and when they are linking verbs?      If you can substitute am, is, or are    and the sentence still sounds logical, you have a linking verb on your hands.**      If, after the substitution, the sentence makes no sense, you are dealing with an action verb instead.       Source:    Normally action verbs have direct objects, but nearly all verbs can be used as transitve and intransitive, e.g. the verb drive: compare "He drives fast" and "He drives the car fast". The first is a predicative compliment but what about the second one? And in, "It was given to her" - is her a compliment or an object? (Even though her is normally associated with the object pronoun, consider: It was her)   Furthermore can the verb "hurt" be a reporting verb relating the feelings of the subject rather than an action verb like (I feel hurt) or (I am hurt) in "It hurt me"? If it is seen as an action verb, me is an object, while the other interpretation is that there is no object and hurt is being used intransitively. If it is the latter, what differentiates "It hurt me" and "It is I/me" grammatically as predicative compliments?


I got a file with some params of a script:  foo1 a b c foo2 a b c foo3 a b c   I need to run a script once for each line in this file passing the line as script arg, so it should do:  ./MyScript.sh foo1 a b c ./MyScript.sh foo2 a b c ./MyScript.sh foo3 a b c   How can I achieve this using Bash?


Trivial (right or left) ideals of R imply that R is a division ring

It is clear that a division ring is simple, having only trivial right ideals.  It is also clear that if a ring, R, is unital and finite, having only trivial ideals, then the ring is a division ring.    However, is it true that a unital ring with only trivial right ideals is a division ring, with its order being irrelevant?


Does there exists a finite index non-trivial subgroup of $\mathbb{C}^*$

let $\mathbb{C}^*$ be a multiplicative group of non-zero complex numbers.  Suppose that $H$ be a subgroup of finite index of $\mathbb{C}^*$.Prove that $H=\mathbb{C}^*$  Attempt  If $[\mathbb{C}^*.H]=n$ then if $xH \in \frac{\mathbb{C}^*}{H}$ then $\left(xH\right)^n=H$ implies $x^n \in H$.  Because $x$ is random we have $\left(\mathbb{C}^*\right)^n=\mathbb{C}^* \in H$  Note that $\left(\mathbb{C}^*\right)^n=\mathbb{C}^*$


Can I gate check a laptop with the cabin laptop ban?

Some flights prohibit laptops in the cabin.  Under such circumstances, can one gate check the laptop?  The risk of loss should be lower compared to regular checked luggage, and perhaps the traveller is not (otherwise) checking luggage at all.


Reading through the books once again, I came to ask myself:  What "truth" is told whilst being affected by veritaserum? Is it the objective truth or what one believes to be true?  Regardless of how the answer is I see many problems arising from this, but also some great ideas.


Define styles to make series of similar pgfplots

I'm writing a journal paper, and in this paper, I have to produce many versions of the same graph as I look at the effect of varying different parameters on the variable of interest (in this case the profit).  The following is an example of two of the graphs which I would produce.  The LaTeX source code:  \documentclass{article}  \usepackage{pgfplots} \usepackage{fullpage}  \pgfplotsset{compat=1.7}  \pagestyle{empty}  \begin{document}  \begin{figure}[h!] \begin{center} \begin{tikzpicture} \begin{axis}[     xlabel=Promotion Limit,     ylabel=Profit,     legend columns=2,     legend style={at={(0.5,1.1)},anchor=south}     ]   \addplot+[mark=x,thick,blue]       table [x=promotion.limit,y=optimal,col sep=comma]       {promotion-limit.txt};   \addlegendentry{Optimal};   \addplot+[mark=o,thick,dashed,red]       table [x=promotion.limit,y=actual,col sep=comma]       {promotion-limit.txt};   \addlegendentry{Actual}; \end{axis} \end{tikzpicture} \end{center} \caption{Effect of varying the promotion limit on profit.} \label{figure:promotion-limit} \end{figure}  In Figure \ref{figure:promotion-limit}, we see the effect of varying the promotion limit on the profit.  \begin{figure}[h!] \begin{center} \begin{tikzpicture} \begin{axis}[     xlabel=Minimum Price,     ylabel=Profit,     legend columns=2,     legend style={at={(0.5,1.1)},anchor=south}     ]   \addplot+[mark=x,thick,blue]       table [x=minimum.price,y=optimal,col sep=comma]       {minimum-price.txt};   \addlegendentry{Optimal};   \addplot+[mark=o,thick,dashed,red]       table [x=minimum.price,y=actual,col sep=comma]       {minimum-price.txt};   \addlegendentry{Actual}; \end{axis} \end{tikzpicture} \end{center} \caption{Effect of varying the minimum price on the profit.} \label{figure:minimum-price} \end{figure}  In Figure \ref{figure:minimum-price}, we see the effect of varying the minimum price on the profit.   \end{document}   The contents of promotion-limit.txt are:  promotion.limit,optimal,actual 0,100,100 1,110,105 2,118,108   The contents of minimum-price.txt are:  minimum.price,optimal,actual 8,135,116 9,120,110 10,100,100   The result is:    Question: How do I define a style for these pgfplots, so that I can make changes to the code at a single location, and all the series of graphs will incorporate the changes?


A continuous map from a compact space to a Hausdorff space is closed. Why this is true?  Help me please I want to learn why this is correct.


How to change the value associated with a key in a list of HashMaps that have same Keys?

I have one List of totally 13 HashMaps in my input. Each HashMap has only 2 Keys "fieldName" and "accessibilityType" and corresponding values:  "fieldAccessibility": [     {         "fieldName": "firstName",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "lastName",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "avatarUrl",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "username",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "birthDate",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "phoneNumbers",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "email",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "language",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "externalId",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "externalCode",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "punchBadgeId",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "minor",         "accessibilityType": "EDITABLE"     },     {         "fieldName": "seniorityDate",         "accessibilityType": "EDITABLE"     } ]   I am trying to iterate through this and change the value of "accessibilityType" into "READ" where "fieldName" is "birthDate". Can someone please say the efficient way to do this. This is my attempt so far to just read and print each key-value pair:  final List<HashMap<String, String>> list = some code to get the input;     for (HashMap<String, String> m : list)     {         for (HashMap.Entry<String, String> e : m.entrySet())         {             String key = e.getKey();             String value = e.getValue();              System.out.println("SEE HERE TEST " + key + " = " + value);          }}


Why is Heisenberg's Uncertainty Principle not applicable to macroscopic objects?

Why is it that the uncertainty principle is not applicable to macroscopic objects? Specifically, at which scale does the uncertainty principle does not work? And also why? Why doesn't it work for macroscopic objects?


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?


I cannot use sudo. When I type sudo -i in the terminal to switch to the root user, the following error is displayed:  sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   Can you help me?


A finite pseudo-ring such that $ab^2=b$ for some $(a,b)\in A$

I have this exercise which I found very difficult:     $(A,+,.)$ is a finite pseudo-ring (a structure satisfying all the axioms of a ring except for the existence of a multiplicative identity), and $(a,b)\in A^2$ such that $ab^2=b$, prove that $bab=b$.   I used every possible combination of powers of $a$ and $b$ but didn't find anything, the idea I was using is the construction of a sequence $a^nb^m$ for example and there for there exist $n,m,n',m'$ such that $a^nb^m=a^{n'}b^{m'}$ and I use the given equality to reduce it, but it' s very difficult.  Can someone help me find the right sequence or the right method to solve this , thanks you


I am really new in ubuntu. I just downloaded the iso file. Can any one suggest me the best partitioning?


A constructive lower bound on Ramsey numbers

The Ramsey's theorem states that  Given $s, t\in \mathbb{N}$, there is $n\in \mathbb{N}$ such that for every graph with $n$ vertices, it contains a $s$-clique or its complement contains a $t$-clique.  The smallest $n$ satisfying the statement is denoted by $R(s, t)$. I found in the article "The Probabilistic Method in Combinatorics, Lectures by Niranjan Balachandran" the following statement:  A constructive lower bound on R(s, s), discovered by Nagy, is the following: $$R(s, s)\ge \binom{s}{3}$$ (Explicitly, his construction goes as follows: take any set $S$, and turn the collection of all $3$-element subsets of $S$ into a graph by connecting subsets iff their intersection is odd.)  I was not able to prove that this graph and its complement does not contain $s$-cliques. Any help in this matter would be greatly appreciated.


This week we rolled out a series of changes to  of the question close workflow.  You can read more about the details of these changes .    For context, the overall effort to improve the question close experience will be optimized for Stack Overflow. Given Stack Overflow’s scale, many of the pain points we hear about with question closing and reopening are unique to Stack Overflow and won’t make sense for other network sites. However some  changes are general improvements that should improve usability and guidance overall. Wherever possible, we plan to roll these changes out network wide as well. Any time we roll out a change network wide, we’ll make sure to cross-post here. This first phase is being rolled out to the network and is why I’m posting today.  Let us know if you run into any issues or have questions regarding the network here.


Is there a way to know if my html document is in an iframe in another domain?

I am developing an application that will be embedded inside an iframe in another domain so I do not have any access to the iframe element that the app will be embedded in.  I cannot use the following method, since my application will be embedded in another domain: var frame = window.frameElement();  if (frame) {   // do something } else {   // do something else }  However, I do not need to have access to the full iframe element, I just need to know whether or not my app is embedded.  Is there a way of just determining whether or not the app is embedded in this situation?


WI-FI Nic showing 3 different transport id {Device id}

There was a problem with my network controller so i opened up cmd and started to check for interfaces. I noticed a strange thing that my Wifi network controller had 3 different Device ID (Transport id's) When i tried to disable the wifi card the different id's went away. On my other computer i tested the same thing and it only shows 1 id? Device\NPF_{4A45A363-6346-48DA-8D28-13DD9C9C1E6A} Device\NPF_{E6994972-C66C-4ABF-BE27-17BAC7C1C971} Device\NPF_{B6394772-H66C-4ABF-HRE27-17JLC0H9C971} I am using snort to check for available interfaces. Can anybody explain why i am seeing this? WLC model: intel dual band wireless-ac 8265 running default settings on the adapter however i have hyper-v open


Remove windows 10 and install Ubuntu without losing files on other partitions

I want to remove windows 10 and install Ubuntu on my computer, but I neither want to erase the entire hard disk nor erase other partitions because I have a lot of data stored in them. I just want to remove windows partition and install Ubuntu on the space left by it.


Where does confirmation code go when forwarding gmail in settings to google group list? Need the confirmation code

I have set up a google groups email dist list in order to forward emails from a regular gmail account to members of my google group. Here is the issue: I have put the google groups email in the "Add a forwarding address", hit "send confirmation code" but have no clue where that code goes to retrieve it to put into "verify" window. Where does the confirmation code go? How can I retrieve it to verify the forwarding?


Bluetooth audio delay / lag, reason completely unclear to me

I have a bit of an odd situation, and wanted to ask for ideas.   Recently started connecting a JBL Charge 2+ to my MBA 11 inch, mid-2013, via Bluetooth. I noticed that there's clear delay between sound event and sound being audible via the JBL.   The problems persists across applications (so for example, playing video via VLC means the sound isn't synced, same for youtube videos in different browsers, same for mp3s that start playing with a small delay, etc.)  The delay is minor, but noticeable, in the range of 0.5s I'd say.  At first I thought it might be a Bluetooth driver issues, but now I found out the following: just connected another JBL device, a Flip 3 to the same MBA, and the sound plays without noticeable delay. I'm not sure if they use the exact same drivers, but now I'm wondering:   Is there a chance that it's a hardware problem? Didn't really consider this a possibility, but now I'm not sure anymore. How to test, and, ideally, fix this issue? How can I isolate the reason for the audio lag with the Charge 2+?   Any help would be appreciated!


Print a string including single quotes and other special characters

How can I write this with an AIX script correctly?  My requirement is to write this command in test.txt:  clock=$(prtconf -s | awk '{print $4,$5}')   I tried this command:  print 'clock=$(prtconf -s | awk '{print $4,$5}')' > test.txt   Output written in test.txt gives me:  clock=$(prtconf -s | awk {print ,})   If I use " " quotes:  print "clock=$(prtconf -s | awk '{print $4,$5}')"   It gives me directly to:  clock=3612 MHz   How can I solve this?


Modify catcode in the preamble or in the \AtBeginDocument?

I want to modify the catcode of comma, with the following code  \documentclass{article} \AtBeginDocument{%   \catcode`\,=\active   \protected\def,{...}% } \begin{document} a,b,c $a,b,c$. \end{document}   I get the following error message:  ! Missing control sequence inserted. <inserted text>                  \inaccessible  l.6 \begin{document}   But with the following code, I get correct result:  \documentclass{article} \begingroup   \catcode`\,=\active   \protected\gdef,{...}% \endgroup \AtBeginDocument{%   \catcode`\,=\active } \begin{document} a,b,c $a,b,c$. \end{document}   I'm wondering what are the differences between these two ways. Why the first way causes problem?  Edit: Althougn David Carlisle give another related question, but I think this question maybe not the same as that question, since both examples contains  \AtBeginDocument{%   \catcode`\,=\active }   I could not understand why only one example causes problem.


$\lim_{x\to0} \frac{x-\sin x}{x-\tan x}$ without using L'Hopital

$$\lim_{x\to0} \frac{x-\sin x}{x-\tan x}=?$$ I tried using $\lim\limits_{x\to0} \frac{\sin x}x=1$. But it doesn't work :/


Why do positive definite matrices have to be symmetric?

Definitions of positive definiteness usually look like this:     A symmetric matrix $M$ is positive definite if $x^T M x > 0$ for all vectors $x \neq 0$.   Why must $M$ be symmetric? The definition seems to make sense for general square matrices.


I have a domain www.test.com which points to a website which was created using WIX. Hence, the nameserver in my www.test.com (GoDaddy is the registrar, so I can edit my nameserver at ) domain points to   ns7.wixdns.net ns8.wixdns.net   Now I want to have admin.test.com to point to my S3 bucket http://admin.test.com.s3-website-ap-southeast-1.amazonaws.com/Login  I have set my S3 bucket Properties > Static Website Hosting > Redirect Requests to admin.test.com and add alias record in Route 53 as suggested by    Now I'm pretty sure I need to point my domain's nameserver to this Route 53, but I'm confused what and/or where I should do it. If I change the nameserver in  to something else, pretty sure my wix hosted website will be inaccessible.


I haven't quite figured out, how to use "normal" bash variables in an Upstart script.  Basically, I just want to do this.  DAEMON="/usr/bin/redis-server" DAEMON_ARGS="/etc/redis/redis.conf" RUNDIR="/var/run/redis" PIDFILE="$RUNDIR/redis-server.pid"  pre-start script     mkdir -p /media/redis/     mkdir -p /var/log/redis/     mkdir -p $RUNDIR     touch $PIDFILE     chown redis:redis $RUNDIR $PIDFILE     chmod 755 $RUNDIR end script  start on runlevel [2345] stop on runlevel [06]  script     echo $DAEMON     exec start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS end script   But, of course, this doesn't work. Prefixing the variable declarations with env kinda works, but doesn't allow for interpolation.  # using `env` the variables are accessible in the entire file. env DAEMON="/usr/bin/redis-server" env DAEMON_ARGS="/etc/redis/redis.conf" env RUNDIR="/var/run/redis" env PIDFILE="$RUNDIR/redis-server.pid" # however interpolation doesn't work # `echo $PIDFILE` -> $RUNDIR/redis-server.pid   If I move the variable declaration inside a block (like pre-start or script), they work, but only inside that block. If I define them in the pre-start block, they are undefined in the main block.  There has to be a sane way of doing this.


Considering the sum as a Riemann sum, evaluate $$\lim_{n\to\infty}\sum_{k=1}^{n}\frac{k}{n^2+k^2} .$$


when typing "a" into my search field (/?s=a) I my search.php template is loaded and all results that match that letter are shown.  If I add this to my .htacess …  RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{QUERY_STRING} ^s=(.+)$ RewriteRule .* /searchmyblog/%1/? [R,L]   and then type "a" into my search the first result of my search is shown. So there is no search.php template shown with all the results but rather the page is redirected to "mypage.com/somecategory/amore-mio"  Why is that happening? I simply want to rewrite the normal /?s= to /search/ or any other custom url.  Any ideas on that? I found heaps of posts online, but none of them seem to be state of the art or use some weird JS-hacks that I find unnecessary.  Ideas on that?


How to use the default fonts adopted by `\documentclass{standalone}` in `\documentclass[beamer]{standalone}`?

How to use the default fonts (both for Chinese and for English) adopted by \documentclass{standalone} in \documentclass[beamer]{standalone}?    Using \documentclass{standalone}, the fonts are like:    \documentclass{standalone} \usepackage{xeCJK}  \begin{document}   是什么 Semantics \end{document}   Using \documentclass[beamer]{standalone}, the fonts are like:    \documentclass[beamer]{standalone} \usepackage{xeCJK}  \begin{document} \begin{frame}{Frame title}   是什么 Semantics \end{frame} \end{document}


What is wrong with this command? It says it has a problem with value separators, but i can't find it  /summon ArmorStand ~ ~ ~10 {ShowArms:1,NoBasePlate:1,Pose:{LeftArm:[0f,0f0f],RightArm:[0f,0f,0f],Body:[0f,0f,0f],LeftLeg:[0f,0f,0f],RightLeg:[0f,0f,0f],Head:[0f,0f,0f]},ArmorItems:{id:diamond_boots,ench:[{id:protection,lvl:1000},{id:blast_protection,lvl:1000},{id:thorns,lvl:1000},{id:unbreaking,lvl:1000}]},{id:diamond_leggings,ench:[{id:protection,lvl:1000},{id:blast_protection,lvl:1000}, {id:thorns,lvl:1000},{id:unbreaking,lvl:1000}]}, {id:diamond_chestplate,ench:[{id:protection,lvl:1000},{id:blast_protection,lvl:1000},{id:thorns,lvl:1000},{id:unbreaking,lvl:1000}]},{id:diamond_helmet,ench:[{id:protection,lvl:1000},{id:blast_protection,lvl:1000},{id:thorns,lvl:1000},{id:unbreaking,lvl:1000}]}}


I've been using 18.04, along with GNOME for a while now. It took a while to get used to it after being so used to Unity, but now I really don't enjoy Unity. The only feature I enjoy from it, is removable drives in the dock. Anyway: I can't log in suddenly, unless I use the gear to select Unity, or some odd thing called AfterStep. And when I say suddenly, I mean: one night I can log in, the next morning I can't.  And I really don't want an answer telling me to just use Unity, because I don't want to. My problem is that I can't use GNOME. I've seen things about gdm3 being broken, but I don't know whether or not that applies.  Another big thing to note is that, I can log in to another (seldom used) administrator account I created about a month ago, using the Ubuntu login (GNOME), and it works fine. Assuming the reason I can't log in to my main account is a settings problem is there any way I can just copy over these GNOME settings from the user account that works?  And to clarify, when I say can't log in, I mean I am stuck in a log in loop where after entering my password and waiting a minute, it just kicks me back to the login screen.  And finally, I have tried many combinations of uninstalling, and reinstalling gdm3, and lightdm, to no avail obviously.  EDIT: Addressing the possible duplicate of  This was actually the first or second post I found, and I followed the steps in the accepted answer, however it did not fix my problem. One thing of note to me, is that all the files mentioned already had the proper owners.  EDIT 2: I tried many of the non-accepted answers, for an hour or two, and none of them worked, however I did get my login working again. I'm still not 100% on what caused the issue, but I decided since it was still very new, that I would try to see if I could uninstall recently installed packages. I found on Google that I could use things like history | grep " install " and grep " install " /var/log/dpkg.log to see recently installed packages and recently run commands with the string "install" in them. I started uninstalling pretty much everything that was installed in the last 5 days, restarted my computer, and it worked. So while I haven't nailed down exactly what caused the issue, I can at least report the issue as fixed.


Want to explore the latex template knowledge

Want to explore my latex template knowledge, any suggestions improve my knowledge


What software do you use for drawing diagrams?

what type of software do you use for drawing diagrams (user flows) in a faster manner? I tried draw.io as an online tool because I wanted defined shapes in order to make the flow faster. I do not want to use Sketch, Illustrator, Photoshop type of thing because I have to create my own shapes which is time consuming, projects are different from one another.


From  I arrived to  and found out that December 22nd, 21:11 is 2 days away from December 23rd, 13:25. The time now is 2013-12-23 13:30:17Z.    (I'm hovering over 2 days, not 12 hours, confirmed the title attribute on the 2 days element)  I also checked this on my tablet yesterday evening (in UTC time) and it listed 2 days back then as well. I couldn't check the tooltip, though, as it's hard to hover with touch controls.  Could it be changed so that only full days count as a day? It's very confusing to see "2 days ago" less than a day later (even few minutes later if you registered right before 00:00 UTC), and most importantly, it's wrong.


I have accidentally deleted all the files in my /usr/share/icons directory by using a wrong command. Do you know a solution to restore the files?


How to Detect Windows Operating System Type

I want to get windows system type whether it is 32 bit or 64 bit?  is it applicable ??  if yes please tell me how?


'Expecting colon' error in SOQL query when not using a variable

In the Anonymous Window of the developer console, I am attempting to execute the following:  System.debug(     JSON.serialize([         SELECT OpportunityLineItemSchedule.Revenue, OpportunityLineItemSchedule.ScheduleDate, OpportunityLineItemSchedule.OpportunityLineItem.TotalPrice, OpportunityLineItemSchedule.OpportunityLineItem.Opportunity.Id, OpportunityLineItemSchedule.OpportunityLineItem.Opportunity.CloseDate, OpportunityLineItemSchedule.OpportunityLineItem.Opportunity.Amount         FROM OpportunityLineItemSchedule         WHERE OpportunityLineItemSchedule.OpportunityLineItem.Opportunity.Amount != OpportunityLineItemSchedule.OpportunityLineItem.TotalPrice     ]) );   I receive this error:  Line: 5, Column: 78 expecting a colon, found 'OpportunityLineItemSchedule.OpportunityLineItem.TotalPrice'   I understand this error typically pops up when one is attempting to use a variable in a query. However, I am not: I am using standard fields. Why am I receiving this error?


A word for listing out objects in a list

So when listing out two things, it is appropriate to use "both".  What about for lists of more than two? Does "all" work?  Ex. He ordered both a steak and a side.  vs. He ordered ___ a steak, a side, and some wine. (or further items, as required)


In cricket, can a bowler start his run-up to the delivery before the batsman takes his stance?