Why the result of calculating path size differs from calculating the same path, using du

I've made a script to calculate the size of current path.  def getFolderSize(path): total_size = os.path.getsize(path) for item in os.listdir(path):     itempath = os.path.join(path, item)     if os.path.isfile(itempath):         total_size += os.path.getsize(itempath)     elif os.path.isdir(itempath):         total_size += getFolderSize(itempath) return total_size   However, when I run du it shows me completely different result.  def du(path):     return subprocess.check_output(['du','-sh', path]).split()[0].decode('utf-8')   How those two functions differs and what might cause such distinguish in results?


I somehow lost the admin role of my own Facebook Page

For some unknown reason, my Facebook Page has no Admin. I created the Page myself and have even assigned 2 Editors, but when I checked the page roles last month, I noticed that my status has changed from Admin to Editor. Now we are 3 Editors and no Admin.   Please do note that I did not accidently demote myself as Facebook does not permit that when you are the sole admin. I also did not promote someone else to Admin and got myself demoted that way, because even if that did happen there would still be at least 1 Admin left.   If you check the attached image below you'll see that there are in fact no Admin on my Page, which means this has to be a bug?  Any suggestions on what I should do?


How to modify mesh after import in Blender using Python?

I am using Python to import a specific mesh in Blender, mesh that I want to modify after import using some sliders I have defined. So I have the defined the following function for the import:  import bpy, math, bmesh  def addGlasses(context, r):     # import glasses object     bpy.ops.import_scene.obj(filepath="myMesh.obj", axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl")      # select the imported object so it has a location     ob = bpy.context.selected_objects[0]      return ob   and then I have defined the user interface for the imported object:  # #    User interface #  from bpy.props import *  class MESH_OT_glasses_add(bpy.types.Operator):    bl_idname = "mesh.glasses_add"    bl_label = "Add glasses"    bl_options = {'REGISTER', 'UNDO'}     radius = FloatProperty(name="First parameter", default=1.0, min=0.01, max=100.0)     location = FloatVectorProperty(name="Location")    rotation = FloatVectorProperty(name="Rotation")    # Note: rotation in radians!     def execute(self, context):       ob = addGlasses(context, self.radius)       ob.location = self.location       ob.rotation_euler = self.rotation      return {'FINISHED'}   So I can move and rotate the object as I wish with the sliders "Location" and "Rotation" but I want also to modify some specific parts of my mesh. Practically, radius is a slider for my mesh that appears when the mesh is imported and I would like to use it's value to stretch some specific vertices for the mesh (I know which ones they are). Is there a way to do that? Because I can't even select a single vertex after import.


Prove $\sqrt{x}$ is irrational if $n^2 \lt x \lt (n+1)^2$.

Let $x \in \mathbb{N}$ be a natural number. If there exists a $n \in \mathbb{N}$ such that $$ n^2 \lt x \lt  (n+1)^2$$ then prove that $\sqrt{x}$ is irrational. I want to prove it rigorously. I tried proof by contradiction but I have no idea how to proceed. Can anybody give me an idea of how to proceed with this?


If $f(x + y) = f(x) + f(y)$ showing that $f(cx) = cf(x)$ holds for rational $c$

For $f:\mathbb{R}^n \to \mathbb{R}^m$, if $f(x + y) = f(x) + f(y)$ for then for rational $c$, how would you show that $f(cx) = cf(x)$ holds?  I tried that for $c = \frac{a}{b}$, $a,b \in \mathbb{Z}$ clearly  $$ f\left(\frac{a}{b}x\right) = f\left(\frac{x}{b}+\dots+\frac{x}{b}\right) = af\left(\frac{x}{b}\right) $$ but I can't seem to finish it, any help?


Is there a technical name for a play on words, such as "FaceCrook"?

Is there a technical name for the play on words where someone would substitute a word for a similar one (or add a common word to the end of one) in order to express their opinion about the subject in question?  For example:   Not being a fan of Facebook's privacy rules, and calling the site Facecrook instead Feeling that people are too lazy to search before posting here, so calling this site "Slack Exchange" Calling a Didgeridoo a "Didgeridont" because you can't stand the sound it makes   The closest things I could find were a "sniglet" and a "protologism", but I'm not sure if they're it. Any thoughts?


I am trying to learn SQLite, and I am building an iPhone app. But I would like to add an SQLite database to my building app. I have got three tutorials, but I am not clear on that code.  How can I add an SQLite database to my building app? What would sample code look like?


Get the last occurrence of string within another string

Is there a javascript function to get the last occurrence of a substring in a String  Like:  var url = "/home/doc/some-user-project/project";   I would like a function that returns true if the String contains project at his end.  I know str.indexOf() or str.lastIndexOf() but is there another function that do the job or should I do it?  Thanks for the answer


How to append many objects without appending materials

Is there any option, to append many objects without appending their materials?  Example: I have scene1.blend with cube object and wood material.  I append cube with wood to scene2.blend, where there also is cube and wood material.  Blender logically creates cube.001 and wood.001, but I don't want wood.001, I need Blender to use the existing wood material instead of creating a new copy.  I'm talking about thousands of objects and hundreds materials. For example now I have natural wood.## ... natural wood.017 and all are exactly the same, and I have few dozens of materials like this multiplied by 17 object copies.  My English is not very good and this is problem little bit hard to explain, so I hope you understand what I mean.


Is Ubuntu 32-bit only for systems with "less than 2GB RAM"?

, you have the following two options:        64-bit   32-bit (for machines with less than 2GB RAM)      Assuming you have a 32-bit machine with the maximum 4GB of RAM, will Ubuntu will work on that?


ANDROID Sqli cursor only returning a 1 row after that it give Null Exception

Function For Selecting data in Database helper:   public List<Question> slectQuestionsC(String tab_name) {      List<Question> quesList = new ArrayList<Question>();     // Select All Query     SQLiteDatabase db = this.getReadableDatabase();     String selectQuery = "SELECT * FROM " + tab_name ;      try {     Cursor cursor = db.rawQuery(selectQuery, null);      if(cursor != null){         cursor.moveToFirst();     }      // looping through all rows and adding to list     if (cursor.moveToFirst()) {         if (cursor.getCount() > 0) {         do {             Question Quiz = new Question();             Quiz.setID(cursor.getInt(0));             Quiz.setQUESTION(cursor.getString(1));             Quiz.setOPT1(cursor.getString(2));             Quiz.setOPT2(cursor.getString(3));             Quiz.setOPT3(cursor.getString(4));             Quiz.setOPT4(cursor.getString(5));             Quiz.setANSWER(cursor.getString(6));             Quiz.setHINT(cursor.getString(7));             quesList.add(Quiz);         } while (cursor.moveToNext());     }     }     } catch (Exception e) { e.printStackTrace(); }      return quesList; }   I have called this function in main activity like this but it only return first value of the table but i want it to return whole values of table so I can save it to the list!:     Question currentQ;    List<Question> quesList;    int qid = 0;    @Override     protected void onCreate(Bundle savedInstanceState) {     // TODO Auto-generated method stub      super.onCreate(savedInstanceState);      db.Open();           quesList = db.slectQuestionsC(tab_name);         currentQ = quesList.get(qid);          setQuestionView();     next.setOnClickListener(new OnClickListener() {          @Override         public void onClick(View v) {             int ansID = options.getCheckedRadioButtonId();             RadioButton rb_ans = (RadioButton)findViewById(ansID);             String answer = rb_ans.getText().toString();             Log.d("yourans", currentQ.getANSWER()+" "+answer);               if(currentQ.getANSWER().equals(answer))             {                 scoreT++;                 Log.d("score", "Your score"+scoreT);             }              if (qid < 6)             {                 try {                 currentQ=quesList.get(qid);                 setQuestionView();                 } catch (Throwable e) {                     e.printStackTrace();                     Toast("Exception" + e.toString());                 }              }             else              {                 qid = 1;                 Intent intent = new Intent(CustomQuizActivity.this, Quiz_End.class);                 Bundle b = new Bundle();                 b.putInt("score", scoreT); //Your score                 intent.putExtras(b); //Put your score to your next Intent                 startActivity(intent);             }           }     });   Here is a function for setting question view!     private void setQuestionView()    {      question_no.setText("Question #" + qid);     question_text.setText(currentQ.getQUESTION());     op1.setText(currentQ.getOPT1());     op2.setText(currentQ.getOPT2());     op3.setText(currentQ.getOPT3());     op4.setText(currentQ.getOPT4());        qid++;  }


Execute script on external keyboard connection

EDIT: This is NOT a duplicate because the linked question is about external USB drives, not keyboards. The suggested command udevadm info -a -n sdb does nothing in helping to find the corresponding attributes for the keyboard.  After spending more than an hour on this, eventually I tried the following, which is unlikely to be accurate:  SUBSYSTEMS="input", RUN+="/home/jx/Dropbox/scripts/keyboard.sh %p" SUBSYSTEMS="hid", RUN+="/home/jx/Dropbox/scripts/keyboard.sh %p" SUBSYSTEMS="usb", RUN+="/home/jx/Dropbox/scripts/keyboard.sh %p"   However, it only worked when I first start up the computer. Whenever I unplug the keyboard and reconnect it later, the script doesn't get executed automatically.  How can I find the attributes for the keyboard and how do I ensure the script gets every time the keyboard is connected, even when the OS is already running?    I'm performing two modifications on my keyboard on startup:  xset r rate 160 50  setxkbmap -option "ctrl:nocaps"   However, they seem to be lost whenever I disconnect my external USB keyboard (sometimes I switch the keyboard between machines), and I always have to re-execute the commands whenever I reconnect it, which is quite annoying.  Is there a way to let the system detect the keyboard connection event and execute a custom script upon it?  Or maybe, alternatively, find a way to keep those two settings permanent even after restart.  I am on Arch Linux with systemd.


Assistance with: SQL Server detected a logical consistency-based I/O error

I'm having a big problem after querying 1 record table, with the following error information:  Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: invalid protection option. It occurred during a read of page (1:40607) in database ID 19 at offset 0x00000013d3e000 in file 'D:\database\20001_30082019.mdf'.  Additional messages in the SQL Server error log or operating system error log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.  Can anyone help me?


Date Regular Expression Match 2 or 1 Digit Date or Month

I Have this regex a perfect to to match mm/dd/yyyy on all condition time format but i need to modify it a little bit  if someone insert 09/04/1980 its work perfect, but this 5/9/1990 (1 digit) will error :(  can someone fix it for me ?  this is my current regex :  (?:(?:0[1-9]|1[0-2])/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/(?:19|20)[0-9]{2}


Trilogy of books with vibroswords and hoverboards with energy shields

So here goes, here's everything I remember about the novel series.  I believe it was a late 80's/early 90's trilogy. I remember it had like, vibroswords, and hoverboards with energy shields, and that the hero was named starkiller, or skykiller, or something like that, that's so close to Star Wars, that it's super unhelpful. And that he was trying to overthrow some evil empire or something because he was the rightful king. Pretty sure he was young too, not really sure about the age range.  I vividly remember one scene where the characters were leading a rebellion in a big city, flying around in hoverboard/cars, with shots pinging off their shields.   I'm pretty sure it was SF, and it's not the Star of the Guardians series. I'm also pretty sure there weren't any aliens: it was all humans.


Website Backlinks are not showing in Google Search Console

I have put my website links in social media sites, forums and article sites. But these links are not showing in google search console or any other backlink checker sites.


1) Consider a gas expanding quasistatically and reversibly from $V_1$ to $V_2$ at constant temperature. I want to calculate the work done. So by convention work done by a system is a negative quantity but in my solutions I have  $$\delta W=p dV$$ Now $dV>0$ which would imply  that $\delta W >0$ which is confusing me. See I would have thought that it should be  $$\delta W= -p dV$$ so that $\delta W <0$.  2) Equally confusing is that in my notes I have that for quasistatic process $$\delta W=\mathbf{f} \cdot d\mathbf{x}$$ and it gives the examples of   (gas) $\delta W=-p dV$  (rubber band) $\delta W=\tau dL$  Why have we just taken $\mathbf{f}$ to be $-p$ for the gas and not $p$?  3) In the first step (isothermal expansion) of the Carnot engine explanation I have that the work done by the gas is $$W=\int^b_a p dV$$ Now as $dV>0$ this implies that $W>0$ but by convention I would have expected this to be negative?  4) In the same step of the Carnot engine as above but with a rubber band I have the work done by the system is  $$W=-\int^b_a \tau dL$$  but equally I cannot understand why we have a negative sign.


what is wrong with this??? please,can anyone help?  \begin{equation} \label{probabilityy} P^{t}({E_{0})=P_{0}+(1-P_{0})P_{1}+ (1-P_{0})(1-P_{1})P_{2}+.......+P_{n}\Pi_{k_{0}}^{n-1}(1-P_{k}) \end{equation}


Do humans contract more physical sicknesses and diseases than animals do?

I wondered: If I get into the library and look into the medical section it is evident that there are thousands and thousands of different human physical diseases. But if I look into the section of animal diseases it is by no means as large as the human section. But humans are by no means the only beings with extraordinarily cell complexity. Many other animals have an equal amount of cell complexity. So shouldn't other animals have an comparative equal amount of diseases ?  Naturally as humans we are much more interested in human physiology which would explain the discrepancy. But is there any evidence that animals, especially mammals, have not an equal amount of (still unknown) different diseases ?  Remark: While a bit similar, this is not this question:    I am asking about the quantity of diseases, not if humans are especially prone for diseases.  ADDENDUM:  The difference between the questions is like "Is building A more prone to fall in natural catastrophes than other buildings because it seems like it ?"  and "How many faults have building A in comparison to other buildings ?"  A correct answer to the first question is: "We made a statistical comparison and building A is more/less/equal prone to fall in a natural catastrophe. The impression is wrong/right."  A correct answer to the second question is: "Building A has in fact a mean approximately 13 000 faults while other buildings have only 5400 faults. But the reason can be that the other building are inspected with less care." Or "No, they both have very likely something like 9000 faults".  It is a completely different question. The second question does not ask for the severity of faults. It could even be that building A has more faults while being more secure because the faults itself are much less severe.


Add columns to query based on previous queries


apt-get autocomplete package name is broken

At some moment   apt-get install   autocomplete was broken  It was very useful to me to see packages name with Tab press  How to repair this autocomplete?


Best algorithm for detecting cycles in a directed graph

What is the most efficient algorithm for detecting all cycles within a directed graph?  I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic dependencies.


Green text color! Are you serious! It used to be white for sure.  Could be found in the reputation tab - for example, I browsed .


I use Maven to create WAR of my JEE Application.  Here my pom.xml   <finalName>myproject</finalName> <sourceDirectory>${basedir}/src</sourceDirectory> <plugins>   <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-war-plugin</artifactId>     <version>2.5</version>     <configuration>         <warSourceDirectory>WebContent</warSourceDirectory>         <failOnMissingWebXml>false</failOnMissingWebXml>         <outputDirectory>/var/www/myproject/webapp</outputDirectory>     </configuration>       </plugin>    <plugin>      <inherited>true</inherited>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-compiler-plugin</artifactId>     <version>3.2</version>     <configuration>       <source>1.8</source>       <target>1.8</target>     </configuration>   </plugin> </plugins>    The generated WAR is copied in output folder defined in pom.xml (/var/www/myproject/webapp) but then i want to unpack it before launch my server (Tomcat).  How can i do?  Thanks, Lorenzo


i want to run the following command :  sudo apt-get -f install   all packages downloads fine expect 1 package because the contain "proxy" word in the link and my ISP block it  i can give him another link to download package from or i can use some VPN programs like Vidalia but i can't install anything!!     so how can i specify a link or install a software


When someone posts a really simple question which can be answer in just one line, what would be the best thing to do?   Answer in comments and leave, which means there might not be any appreciation at all. Answer in the answer box with a bit more information on their question and get appreciation with upvotes and may be 15 more points if your answer is accepted.


I am teaching myself information about groups, but don't really understand how to work through this problem. Here is what I have been thinking so far (please note that I do not need to work through showing any closure): $\mathbb{Z}^*$ denotes the nonzero integers. Prove or disprove: $(\mathbb{Z}^*, \cdot)$ and/or $(\mathbb{Z}^*, \div)$ is a group.  For $(\mathbb{Z}^*, \cdot)$:  Group. Associative Law: Let $a,b,c \in \mathbb{Z}^*$. Then $(a\cdot b)\cdot c=a\cdot (b \cdot c)$, and the associative law holds. Existence of Identity: Let $a \in \mathbb{Z}^*$, then $a \cdot 1 = 1 \cdot a = a$, and the identity holds. Existence of Inverses: Let $a \in \mathbb{Z}^*$. Then the inverse of $a^{-1}=-a$, and the inverse holds. Note that this only works because we are ommitting zero.  Hopefully this looks like I am on the right track. I don't know to what extent I can explain logic vs showing it with mathematical operations, so I would appreciate guidance in this respect.  For $(\mathbb{Z}^*, \div)$: Not a group. Disprove by counterexample.  Yeah, I dunno about this one. I don't think it's true, because we will be introduction rational expressions that won't allow this to hold, but I'm not sure where I can use this information to disprove the statement.


"The update information is outdated." error in ubuntu 13.04

I use Ubuntu 13.04 32bit in a dell studio 1537. Its been a couple of days, I see a error/warning sign (a red triangle with exclamation sign in it) on the top bar. Clicking on it the message says, "The update information is outdated. This may be caused by network problems or by a repository that is no longer available. Please update manually by clicking on this icon and then selecting 'Check for updates' and check if some of the listed repositories fail." There is no network problem since internet works fine. When I check for updates, shows your computer is up to date   is the output of sudo apt-get update


What is the difference between these two event declarations?

I have two events in a class  public event AcquiredDataEvent OnNewAcquiredData; public delegate void AcquiredDataEvent(int[] newData);  public ScanStartedEvent ScanStarted; public delegate void ScanStartedEvent();   I just realized that ScanStarted does not have the keyword event before it. Most likely the result of a typo by me, though it still works as expected.   What is the difference between the two events if any?


Is it worth seeking disability accommodations if I get good grades anyway?

I have bipolar disorder and take medications that make me foggy and confused.  Because of this I am thinking of asking for extra time on tests.  But I generally score in the upper half of my classes, even when I am taking my medication.  Should I still register with the disability office?  Also, my advisor is teaching the class I'm taking, and many of the TAs are people I already know, who may think I am trying to game the system.  Edit: Also, do you think I should try to get accommodations for my qualifying exams?  Or are those not a thing?


Posts - users use html markup instead of regular

I just edited a post on Worldbuilding SE:    I kind of understand users' temptation to use

 for tabular data and/or code(don't have to indent each line, right?) but I don't understand why someone would want to use regular HTML over SE markup for links etc.  In a  below the same post, is has led to the  showing and also half-link, half text, so a disaster. One user was even trying to post a link and expecting it to automatically convert to image or something.  I have seen posts specifically attributed to code markups, but not a generalized discussion on this.  Should we allow or disallow this practice of using HTML instead of SE markup?


Basically, how does the ^^^... notation work in LuaTeX and XeTeX, exactly?  In 8-bit TeX engines (recent TeX, eTeX, pdfTeX, at least), two consecutive identical catcode 7 characters (typically ^), followed by two lowercase hexadecimal digits, are converted before the tokenization step to the corresponding byte.  Namely, ^^6f is exactly equivalent to o: for instance, \sh^^6fw ^^6f will cause TeX to show the letter o.  There is also the notation with two ^ (identical catcode 7 characters), followed by any ascii character (but not two lowercase hexadecimal digits), which is replaced by the character obtained by either subtracting or adding 64 to the character code, remaining among ASCII characters (range 0 to 128).  Unicode-aware engines (I'm thinking of LuaTeX and XeTeX, there are perhaps other less known ones around) also provide ^^^^xxxx and ^^^^^xxxxx for characters whose hexadecimal representation has 4, or 5 digits.  But this does not seem to be done in the same way across engines.  For instance, both LuaTeX and XeTeX appear to accept the notation with 4, 5, or 6 carets followed by the same number of hexadecimal digits, but XeTeX also accepts it for 3, while LuaTeX doesn't. Compiling the following with pdfTeX, LuaTeX, and XeTeX gives different results.  \catcode0=12 \newlinechar=10 \def\loopshow#1{\message{\meaning #1^^J}\loopshow} \loopshow \/   ^^56   ^^^056   ^^^^0056   ^^^^^00056   ^^^^^^000056   ^^^^^^^0000056 {\end\iffalse} \fi} \bye   One weird fact about XeTeX (a bug?) is that  \show ^^^^^^010101   shows the character displaywidth.  My goal (there may be a better way to do this) is to provide a way to test whether passing a given list of tokens through \scantokens is safe.  For that, my plan is to go through the \detokenized token list one character at a time, applying TeX's rule for tokenizing (but no need to fully tokenize), and detecting begin-group and end-group tokens, as well as invalid characters.


When coding my formatter, I give user an option to provide alt, title and classes attributes for an image. All render beautifully, except for the alt title, which is output as flag-type, empty "alt" attribute (meaning: no equal sign or quotes), regardless of what I try to insert there.  Could the Media module be the reason - such as overriding the alt value with some hooks? If not, any ideas on what could be causing that?


Ubuntu Server Continuously "goes to sleep"

I am running a web server at home using Ubuntu 11.4 (maybe? I can't 100% recall) on an older AMD 2400+ desktop with 1 or 2 GB of RAM. Sorry I can't recall the details 100%.  Anyway, I have a KVM hooked up to a monitor and PS2 keyboard that I use to switch between the server and my iMac (The keyboard is only hooked up so I can switch between the two easily. Many times a week, Pingdom will tell me the server is down and I can't hit the server. When I get home (it rarely happens when I am home), I hit the Ctrl key twice to switch to the server, hit the space bar and everything is now up and running again. I need to look again, but I don't believe there is any power saving features turned on in the BIOS.  Does anyone have any other suggestions of what I may have going on? I have my uncle's website running on it now and I really would like to have a better up-time than 95%  As a note, I do not have any GUI installed so everything has to be done on the console (or through WebMin) and I know my way around, but I am by no means experienced.


$a_1=1, a_2=8$ and $a_n=a_{n-1} +2a_{n-2}$ for $n\ge3$  Prove that   $$a_n =3\cdot2^{n-1} +2(-1)^n$$ for $n\in N$  Base Case: n=1   $a_1= 3\cdot2^0+2(-1)^1, a_1 =1$, the base case holds true  I.H: Suppose its true for $$a_k =3\cdot2^{k-1} +2(-1)^k$$  How do i proceed for induction step, am i suppose to use $a_n=a_{n-1} +2a_{n-2}$ in the induction step?


How to set a very long title for a beamer presentation?

Im using this  for a beamer presentation, the problem is I would like to add a very long title but the title does not appear complete. So I tried this:  \title[title]{blablablablalbabllablba \par\noindent blablablablablablablablablablabal}   I also tried other several aproaches but dont get to set a large title, any idea of how to solve this issue?. Thanks in advance guys.


How to Recover HDD Formatted by "Create a Recovery Drive" Tool of Windows 8.1?

I have 2 TB USB HDD which had these drives   F: about 1 TB with 750 GB data H: about 120 GB with 60 GB data I: about 780 GB with 250 GB data (For TV: It was raw in Windows but visible in the Smart TV)   I took 521 MB from last part of H to get new G drive. Then I run "Create a Recovery Drive" tool of Windows 8.1 and chose G drive. It said all data in the drive will be deleted. I thought it is just G drive but it deleted my whole HDD. It created 32 GB new F drive with writing 337 MB on it and rest of HDD is unallocated.  I tried these programs to get my first 3 drives but non of them helped for getting 1st partition.   TestDisk MiniTool Partition Wizard Home Edition EaseUS Partition Master 9.2.2 (I deleted new F drive volume because it scans only unallocated part) Recuva PC Inspector File Recovery


bash chained logical operator execution order, lazy evaluation

I don't get this:  script: WORKDIR/sh/script.sh  [ -e filename ]          \ && echo filename         \ || [ -e ../filename ]    \ && echo ../filename      \ || { echo 'ERROR: failed to find "filename"' 1>&2 ; exit -1; }   output:  $ cd WORKDIR/sh $ ./script.sh ../filename  $ cd WORKDIR $ sh/script.sh filename ../filename      # <---- WHY????   My thoughts:  1  [ -e filename ]          \ -> false &&                         -> skip this, it is already false    echo filename         \ -> don't even try || [ -e ../filename ]    \ -> true && echo ../filename      \ -> true ||                         -> already true, skip the rest    { echo 'ERROR: failed to find "filename"' 1>&2 ; exit -1; }   2  [ -e filename ]          \ -> true && echo filename         \ -> true ||                         -> already true, skip the rest    [ -e ../filename ]    \ && echo ../filename      \ || { echo 'ERROR: failed to find "filename"' 1>&2 ; exit -1; }   version:  bash --version GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)


Can't remove dynamically generated inputs on click

I was trying to generate a new form group by clicking the button. But after that all I can't remove selected group, because click event doesn't work. here is fiddle example:       (function($) {     'use strict';     $(document).ready(function() {      $('.add').on('click', function(e) {       e.preventDefault();       $('.groups').append('\
\           <input type="text">\           Remove\
\       ');     });      $('#remove-input').on('click', '.form-group', function(e) {         e.preventDefault();       $(this).parent('.form-group').remove();     });    });     }(jQuery));


Overwriting a theme function with a plugin

This is a two parts problem.  1) I want to replace the custom post type with custom taxonomy term on my permalink. By default my URL structure is:  http://example.com/holiday/remote-brazil  holiday = CPT  remote-brazil = CPT item  I also have a custom taxonomy term for that.  adventures =  CTT  My desired URL is:  http://example.com/adventures/remote-brazil  I solved the problem simply adding this line on the custom post type registration:  'rewrite' => array('slug' => '%holiday_category%','with_front' => false),   holiday_category = custom taxonomy.  It seems to be too easy :-) Is it that or am I missing something?  2) Now the problem. I'm using a commercial theme with regular updates (that's good), but if I make any changes there I'm surely that will lose them. My question is how do I write a plugin that will overwrite(or add) that specific line on the CPT from my theme?  Cheers.


Determine angle $x$ using only elementary geometry

Using only elementary geometry, determine angle x.    You may not use trigonometry, such as sines and cosines, the law of sines, the law of cosines, etc.


can I make apacite citation always use et al. for more than two authors?

The apacite package documentation here:    states that whenever citing more than two authors (but less than six), the first time the full will appear, but from thereon, citing again the paper will lead to an et al suffix after the first author.  Is there a way to make apacite use et al. already from the beginning whenever citing more than two authors?  Also, is there a way to make apacite use "and" instead of "&" between author names?


I have 4 geographic points (latitude, longitude, altitude). By assuming the curvature of the earth, these correspond to two curves. Points A and B make up the end points of the first curve segment. Points C and D make up the end points of the second curve segment.   I want to determine if these two curve segments intersect. I'm assuming the best way to go about this is to convert these four points into Cartesian Coordinates which I've done. But I'm not sure how to solve for the rest. I've seen examples pertaining to two great circles, infinite lines, or line segments. But I haven't been able to put it all together. Anyone have any ideas (or better tags for me)?


Avoiding overlapping superscripts and subscripts in matrices

I was working on some calculus today and tried to typeset a matrix of partial derivatives and ran into some trouble. Here is my code:  \documentclass{minimal} \usepackage{mathtools} \begin{document} \begin{equation} \begin{pmatrix}     \frac{\partial f^1}{\partial x_1}   & \frac{\partial f^1}{\partial x_2}\\     \frac{\partial f^2}{\partial x_1}   & \frac{\partial f^2}{\partial x_2} \end{pmatrix} \end{equation} \end{document}   As can be seen, the output results in the subscripts from the denominators of the top row on the matrix with the superscripts from the numerators of the bottom row on the matrix. Is there an easy way to avoid this?


Upgrading Kubuntu from 19.10 to 20.04 in August 2020

When trying to upgrade from 19.10 to 20.04, getting below message. Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Please install all available updates for your release before upgrading.  and even after using -d getting the below message: $ sudo do-release-upgrade -d Checking for a new Ubuntu release Upgrades to the development release are only  available from the latest supported release.  but if i use -c getting below response sudo do-release-upgrade -c Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  New release '20.04 LTS' available. Run 'do-release-upgrade' to upgrade to it.   SO please do suggest how do i update from 19.10 to 20.04?


Short story about a man who has duplicates of himself appear behind him

The story begins with a writer sitting at typewriter, he senses something behind him, he turns to see a shimmering disc floating in the air. Suddenly a man falls out of the disc, and it is a duplicate of himself... a second duplicate jumps out of the disc and a scuffle ensues. The writer is pushed into the disc and falls through it into a corridor. As the story unfolds, the writer becomes each of the duplicates in his efforts to return to his own dimension.  I read the story in a book of short sci-fi stories around 1972/73 and I'd love to read it again. Does anyone know what this is?


nano syntax highlighting not working for all languages

I have a funny situation where I am unable to add custom highlighting definitions to my nano text editor.   The funny thing is that the predefined work like a charm and can be edited.  But I have created a new one for js with  $ sudo touch js.nanorc $ sudo nano js.nanorc   my current js.nanorc looks like this:  syntax "JavaScript" "\.js$"  color blue   "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" color blue   "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color blue   "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" color black    "[(]" color cyan  "\<(break|case|catch|continue|default|delete|do|else|finally)\>" color cyan  "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>" color cyan  "\<(switch|this|throw|try|typeof|var|void|while|with)\>" color cyan  "\<(null|undefined|NaN)\>" color brightcyan "\<(true|false)\>" color green     "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" color green     "\<(Number|Object|RegExp|String)\>" color red "[-+/*=<>!~%?:&|]" color magenta   "/[^*]([^/]|(\\/))*[^\\]/[gim]*" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color magenta   "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" color brightblack "(^|[[:space:]])//.*" color brightblack start="/\*" end="\*/" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" color ,red "    +"   If anyone can see the problem then please tel me


Durable and Affordable 20" wheel and tire combo for Bicycle trailer?

I purchased an Aosom trailer a while back, and the wheels and tires are truly horrible.    So much so I only run light loads now.  I'm looking for 20" wheels that are either double wall alloy or vintage steel wheels.  I'm leaning towards used vintage wheels because they are cheaper.  My main problem is finding wheels that will fit on the trailer. All wheels that I see already contain a real axle. How do I remove the rear axle from the wheel?  Here are some images of the wheel and axle


If I go at my users page at   the links to my userpages in each account are missing the https  please add the protocol to those links


Do Kryptonians get powers from > 6000k suns?

Superman's powers come from being near a yellow sun as opposed to the red sun of krypton. Occasionally Superman will travel to other planets/off-world to help some other cause or force.  I'm curious, has any writer had the man of steel utilize the radiation from another different colored (blue, white etc) sun for his powers? Do hotter stars have similar affects, or are Kryptonian powers only activated by yellow suns?


How can I find the Temperature Coefficient of Capacitance of the following capacitor series:


How do I revert Dist-upgrade on Ubuntu 20

I ran a dist-upgrade on my Ubuntu 20 machine and ran into some error with the packages. I tried to apt —-fix-broken but I was still unable to get past the errors.  I decided to do a reboot and I now have Kali in my startup instead of Ubuntu. However while trying to boot Kali is stuck in Failed to start mailman master queue. I’ve done some research and believe this was caused by katoolin. I’ve had katoolin with only a few select tool on my pc for a long time and done several dist-upgrades and never run into this problem. Any ideas how I can reverse this process and boot back into my Ubuntu directly without a fresh install?


Rudin exercise: If $f$ is a diferentiable mapping on an open connected set $E$ and $f'(x) = 0$ for all $x \in E$, then $f$ is constant.

Suppose $f: E \subseteq  \mathbb{R}^n \to \mathbb{R}^m$ is a differentiable map with $E$ open and connected. If $f'(x)=0$ for all $x \in E$, prove that $f$ is constant.  My attempt:  For all $x \in E$, choose an element $\epsilon_x >0$ such that the ball $B(x,\epsilon_x) \subseteq E$. Then it is obvious that  $$E= \bigcup_{x \in E} B(x, \epsilon_x)$$  Now, consider the corollary of theorem 9.19 in Rudin:     Suppose $f$ maps an open, convex set $E\subseteq \mathbb{R}^n$ into   $\mathbb{R}^m$, $f$ is differentiable in $E$ and $f'(x) = 0$ for all   $x\in E$, then $f$ is constant.   Applying this proposition to the map $f$ restricted to a ball $B(x, \epsilon_x)$ implies that $f$ is constant on every ball in the union written above.  Intuitively, I can see that the connectedness will imply that we can get from one ball to another balls using chains of "between-balls', or otherwise we will get a separation of $E$ as disjoint union of open sets.  I struggle to make this formal though.  Any help is much appreciated!


Gravitational analogue for Cosmic Microwave Background?

Penzias and Wilson famously discovered the CMB as a signal that they failed to be able to account for after removing all other known radio-sources. It's apparently close to the same strength in all directions etc. etc. Is there an analogue for gravitational waves - a gravitational echo of the Big Bang? Can we/have we detected it or would the precision required be too great for modern technology?


Discrete math - Prove that a tree with n nodes must have exactly n - 1 edges?

I'm new in discrete math. Can someone prove simply that a tree with $n$ nodes must have exactly $n - 1$ edges. I have researched the solution but I haven't founded yet. I know of course, a tree with n nodes must have exactly n - 1 edges. But, I can't prove it. Thank you. induction on $n$


How to sync keyboard shortcuts setting of Mac OS X from one computer to another?

I have two Macbooks, and I set up many keyboard shortcuts for different applications.    Now I am trying to sync these settings from one Macbook to another through git, which introduced by Atlassian.    My questions   Is there a config file for keyboard shortcuts? Where is it located? Is it easy to add to a git repo?


Is it possible for $\Delta x$ ($\sigma_x$) of any free particle wave packet to be decreasing at any time?

Consider any wave packet describing a free particle (so no potential or other forces acting on it). Then it can be shown that $\Delta p$ does not change in time. However, my question is what happens with $\Delta x$ as we go forward in time? Does it have to increase at all times? Or is there a counter-example where the uncertainty in position is decreasing, if even for a short time period?  My initial guess is $\Delta x$ must always increase, because $p \neq 0$, so that $\Delta p \neq0$ and hence $\Delta v = \frac{\Delta p}{m} \neq 0$. But if there's a spread in velocities, then the wave packet must also spread. Is this logic correct? Or could we have a wave packet where the back of it would move forward faster than the front, and for a certain period until that back end catches up with the front one, it would actually be narrower than at the outset, i.e. reducing $\Delta x$? If yes, how would one describe such a free particle (wave packet)?  So it does seem to me that every wave packet describing a free particle will eventually spread, but the question is whether there can be a time period in its evolution when it is actually becoming narrower.  edit: In particular, if it does not have to increase at all times, can this be shown without appealing to time reversal?


Can every proof by contradiction also be shown without contradiction?

Are there some proofs that can only be shown by contradiction or can everything that can be shown by contradiction also be shown without contradiction? What are the advantages/disadvantages of proving by contradiction?  As an aside, how is proving by contradiction viewed in general by 'advanced' mathematicians. Is it a bit of an 'easy way out' when it comes to trying to show something or is it perfectly fine? I ask because one of our tutors said something to that effect and said that he isn't fond of proof by contradiction.


Show that a sequence involving $\sqrt2$ converges

Show that the  sequence    $$\sqrt2, \sqrt{2\sqrt{2}},\sqrt{2\sqrt{2\sqrt{2}}} ,\sqrt{2\sqrt{2\sqrt{2\sqrt{2}}}},...$$  converges and find the limit


Lost one of my tool bars in blender and can't get it back

The tool bar on the far right of my blender editor is gone. It is not the properties bar (toggled with n) or the tool shelf (toggled with t). What I am missing is the bar in which I can add modifiers and materials. I can't figure out how to get it back, please help.


Change the definition of a "day" to be localized for users

Normally I would not complain about this, but given that   are based on "visiting the site" each "day" it is silly for the "day" to be based on UTC clock for all users.    I can speculate about the reason for this limitation, but I will refrain from that.  I know I am not the only one who has brought this up as an issue, but if badges are based on it, at least do the right thing and use local time.    EDIT Someone suggested that changing a user timezone creates a problem.  All times stored in the database are UTC.  If Jeff and co just do two passes for whatever logic is used for checking the badges (one for UTC - like the way it exists now, and one for local time I think that would be far more preferable.  )


Is it safe to knowingly buy an oversized (67-inch) suitcase? Are size limits enforced?

This question is regarding check-in, not carry-on, baggage.  I'm considering buying a very spacious suitcase measuring 31 x 21 x 15 inches, for a total of 67 inches. This is greater than the 62-inch limit most airlines have [1]. My present suitcase measures 63 inches, which better fits the limit than the one I'm considering buying.  Do airlines actually enforce the size limit for check-in baggage, such as by levying a surcharge? Has this happened to you or to someone you directly know, or is it only a theoretical risk? If it's only a theoretical risk, I'll buy this suitcase.  I've had my check-in suitcase weighed several times, but never had its dimensions measured, as far as I can remember.  [1] Except for Emirates, which recently decreased its limit to 59 inches.


Shell Script Compares: Why double-quotes around variables?

I shell scripts I see compares always written this way:  if [ "$?" -eq 0 ] then ...   What the purpose of the double-quotes around the variable?  If I remove the quotes then it doesn't seem to have an effect. Is it for preventing something?


Is there a continuous bijection between an interval $[0,1]$ and a square: $[0,1] \times [0,1]$?

Is there a continuous bijection from $[0,1]$ onto $[0,1] \times [0,1]$? That is with $I=[0,1]$ and $S=[0,1] \times [0,1]$, is there a continuous bijection $$ f: I \to S? $$  I know there is a continuous bijection $g:C \to I$ from the Cantor set $C$ to $[0,1]$. The square $S$ is compact so there is a continuous function  $$ h: C \to S. $$ But this leads nowhere. Is there a way to construct such an $f$?  I ask because I have a continuous functional $F:S \to \mathbb R$. For numerical reason, I would like to convert it into the functional $$ G: I \to \mathbb R, \\ G = F \circ f , $$ so that $G$ is continuous.


Why is the same modal auxiliary, 'may/might' used to ask permission and for uncertainty?

"May I go to the bathroom?" and "I asked if I might go to the bathroom."   The modal auxiliary 'may/might' is used to ask permission.     "He may not have understood your question." and "He might not have understood your question."   The same modal auxiliary is used for uncertainty.  Why?


(I am on Windows 7 by the way)  Here's the log:  ---- Minecraft Crash Report ---- // My bad.  Time: 4/18/20 10:58 AM Description: Initializing game  org.lwjgl.LWJGLException: Pixel format not accelerated     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247)     at org.lwjgl.opengl.Display.createWindow(Display.java:306)     at org.lwjgl.opengl.Display.create(Display.java:848)     at org.lwjgl.opengl.Display.create(Display.java:757)     at org.lwjgl.opengl.Display.create(Display.java:739)     at bib.at(SourceFile:635)     at bib.aq(SourceFile:458)     at bib.a(SourceFile:404)     at net.minecraft.client.main.Main.main(SourceFile:123)   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Thread: Client thread Stacktrace:     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:247)     at org.lwjgl.opengl.Display.createWindow(Display.java:306)     at org.lwjgl.opengl.Display.create(Display.java:848)     at org.lwjgl.opengl.Display.create(Display.java:757)     at org.lwjgl.opengl.Display.create(Display.java:739)     at bib.at(SourceFile:635)     at bib.aq(SourceFile:458)  -- Initialization -- Details: Stacktrace:     at bib.a(SourceFile:404)     at net.minecraft.client.main.Main.main(SourceFile:123)  -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 7 (amd64) version 6.1     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 43481408 bytes (41 MB) / 134217728 bytes (128 MB) up to 2147483648 bytes (2048 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     Launched Version: 1.12.2     LWJGL: 2.9.4     OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.     GL Caps:      Using VBOs: Yes     Is Modded: Probably not. Jar signature remains and client brand is untouched.     Type: Client (map_client.txt)     Resource Packs:      Current Language: ~~ERROR~~ NullPointerException: null     Profiler Position: N/A (disabled)     CPU: <unknown>


Any documentaion available for behaviour of unsigned char pointer in C?

What is an unsigned char pointer and how is it different from a char pointer in C?  Not much information on unsigned char pointer in C , and How to print the data pointed by an unsigned char pointer?  Any explanation on this will be helpful.


Clone a hard disk content to another hard disk

I subjected my hard disk (C drive) to a disk scan and found that there was 12 KB of bad sectors. I now consider that disk to be unreliable, and am looking forward to transferring all my data to another file.  The problem is, I want to clone the complete drive (including the apps, OSes, files and everything, verbatim) to another drive. I know there would be some crazy software activation issues, like Windows Not Genuine problem and so on. But I wonder whether is there a tool powerful enough to do the cloning and at the same time maintain the  OS and apps?


I had developped a program in Java with eclipse using a MariaDb database .  I had imported the jdbc driver jar file of mariadb using build classpath  When I run the program in Eclipse, it's works fine.  But when i build the jar and run the program using the line command java -jar <my program path> I got this error :     Not suitable driver found for jdbc:mariadb   What does I missed ?  EDIT : Problem resolve thanks to this


I got onto a horse in Skyrim (no DLC, Xbox 360). The horse was not stolen but I did not buy it. And whenever I dismount the horse it starts walking away. Why?   This is not a horse I have bought, I just found it in the wild, so this is not a duplicate of .


how to create an ubuntu usb installer from an .iso file

I've tried with the startup disk creator app but without success. What terminal program could I use? its man pages work well? thanks in advance!


Let's say I create a function in a module file:  function _get_test() {   return 'test'; }   How can I call this in any Twig file? For example *.html.twig, page.html.twig, node.html.twig etc.   OR   How can I pass a variable from PHP to Twig and display in any Twig file.  For example *.html.twig, page.html.twig, node.html.twig etc.


How to Split Time Series Data to train/test for RNN

Let's say I have a set of time series data with 32 time steps.  My goal is to predict what the data value would be for the next time step, given data for 30 previous time steps. Would it be okay to split the dataset with overlapping parts as follows?  train X set : index 1~30  // train Y set : index 31   test X set : index 2~31 // test Y set : index 32   P.S.: Set aside the dev set for now.


For a long time, the norm was to put a red asterisk "*" after the field label if the field was required. Now I am observing a shift into replacing the asterisk symbol with the word "(required)" after the label.  Bootstrap:    vs  Foundation:    Angular Material:    I really like the Angular Material required style. I :)  I am asking about the differences between using an asterisk vs required.  What drove the shift and is that a better user experience? What are the pros and cons against the two?  EDIT: It was pointed out that this question might have been already asked (), but that is not what my question is about.   I am not asking how to label a required input as required. I am not asking if the asterisk is the norm or not.  I am not asking if you should omit optional inputs or not.   If you are debating that, you are missing the point. :D


Boy gets transported to a planet where people can transform into different species

When I was a kid I read a book about a boy who gets transported to a different planet.   The people are put in different domes, with different creatures.  Main character either escapes to another dome or crashes in it. I can’t remember which.  An old shaman type person takes him in and "trains" him in their ways.  On occasion one of the "people" is chosen to eat a special fruit and some dirt, after which they genetically transform into another creature.   Main character later eats one of the fruits and transforms into the original species of the planet.  That species has been extinct for a long time but robots are maintaining a preservative program for other species.  The kid escapes back to Earth by convincing the robots that he really is one of the indigenous species and shuts the robots down. Afterwards he returns to human form by eating another fruit and some dirt from Earth.


I am getting a null point error when initializing an array grid of objects

I am trying to initialize an array grid of objects and get a null point error when I do so. It should be calling the object Constructor in Cell each iteration of the loop.  Instead I am getting the error. Please help. public class Spread extends JPanel {     private JPanel outputArea;     private JTextArea numberDead;     private JTextArea totalInfected;     private JTextArea newInfections;     private Integer totalDead;     private Integer total;     private Integer newInfected;     private Integer length = 60;     private Integer width = 100;     private Cell[][] label;          public void makeOutputArea() {         int a;         int b;         outputArea = new JPanel(new GridLayout(length, width, -1, -1));         outputArea.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));          for (a = 0; a < (length - 1); a++){             for (b = 0; b < (width - 1); b++)                 label[a][b] = new Cell(); //nullpointerror is located here.                 label[a][b].setPreferredSize(new Dimension(10, 10));                 label[a][b].setOpaque(true);                 outputArea.add(label[a][b]);                 outputArea.setVisible(true);                 if (label[a][b].getInfected() == true) ++total;             }         }          public JPanel getOutputArea() {         return outputArea;     } ...Additional code follows.  This is the Cell class it should be initializing in the array. As you can see it has a constructor, which should be called for each loop.  Instead it is giving a null pointer and never initializing each cell object. import java.awt.Color; import java.util.Random; import javax.swing.JLabel;  @SuppressWarnings("serial") public class Cell extends JLabel{     private int iteration;     private boolean infected;     private boolean dead;     private boolean immune;     private Random generator = new Random(); //Random number Generator     private static int infectionRate = 5;     private static int deathRate = 3;               public void setIteration(int i) {         iteration = i;     }          public int getIteration() {         return iteration;     }          public void setInfected(boolean b) {         infected = b;     }          public boolean getInfected() {         return infected;     }          public void setDead(boolean a) {         dead = a;     }          public boolean getDead() {         return dead;     }          public void setImmune(boolean i) {         immune = i;     }          public boolean getImmune() {         return immune;     }          public Cell() {         setImmune(false);         setDead(false);         setIteration(0);         if (generator.nextInt(100) < infectionRate) {             setInfected(true);             setIteration(++iteration);         }         else setInfected(false);         color();     }          public void color() {         if (getInfected() == true) setBackground(Color.RED);         else if (getDead() == true) setBackground(Color.BLACK);         else setBackground(Color.GREEN);     }          public void updateInfection(boolean b) {         try {             if (getImmune() == true) return;             else if (getDead() == true) return;             else if (getInfected() == true) {                 setIteration(++iteration);                 if (iteration >=4) {                     if (generator.nextInt(100) < deathRate) {                         setInfected(false);                         setDead(true);                         return;                     }                     else {                         setInfected(false);                         setImmune(true);                         return;                     }                 }                 return;             }             else {                 if (generator.nextInt(100) <= 75) {                     setInfected(true);                     setIteration(++iteration);                     return;                 }                 else return;             }         }         finally {             this.color();         }     } }


Domino java example code does not work properly

Here is a code from the Domino 8 designer help to get database categories.  The condition "if(cat != "") always return true though database category is empty or non-empty. What is catch?  import lotus.domino.*; public class JavaAgent extends AgentBase {   public void NotesMain() {     try {       Session session = getSession();       AgentContext agentContext =            session.getAgentContext();       // (Your code goes here)        Database db = agentContext.getCurrentDatabase();       String title = db.getTitle();       String cat = db.getCategories();       if (cat != "")//This condition does not work         System.out.println("Database \"" +         title + "\" has the categories: " + cat);       else         System.out.println("Database \"" +         title + "\" has no categories");     } catch(Exception e) {       e.printStackTrace();     }   } }


Finding the number of roots of the equation

The equation $x^{13}-e^{-x}+x-\sin{x}=0$ has    No real root More than two real roots. Exactly two real roots. Exactly one real root.   I tried doing with the odd derivative  and check whether the derivative change sign or remain same(positive or negative) so i find $f^{(15)}(x)=e^{-x}+cos(x)$ now i am not able to determine how this will change the sign. Is there any other way to do the same problem thanks


Hilbert's sixth problem (current answers neglect the fact that $C_{U} \subseteq U $ )

(current answers neglect the fact that the set of all concepts( $C_{U}$) is a subset of U as all of them are physically encoded( symbolically represented by the physical events themselves(brains, computers et al)) ( note $\oplus$ is the mutually exclusive or, A $\vdash$ S means S can be derived(proven) as a theorem of axiom system A)  Given U, $(\exists u \leftrightarrow u \in U)$ (also suppose that U is the physical universe/multiverse, etc. [which it trivially is , as all concepts are physical phenomena {neurotransmitters, computers et al.}] this is obviously assuming platonism is wrong, or can still be classified as physical, i.e. another universe in the multiverse (trivially)) Also given A $\subseteq$ U s.t  A is a set of initial conditions and some equations describing the progression of physical events s.t. these equations are the constraints on the strings of the formal language associated with the axiom system (this trivially exists as given the ordering/index over the axioms, st.t obviously one may write a code/equation that transforms the string of Ax.n. to Ax.n+1. then given the initial conditions have the index associated with them one may use the code/equation inductively to reach any Ax.m. or one can prove its equivalence to the existence cause and effect. Then ( $(A \vdash S) \leftrightarrow (\exists S \leftrightarrow S \in U )) \leftrightarrow ( (\neg(A \vdash S)) \leftrightarrow (\neg(\exists S))) $, that is there does not exist a single statement that can not be derived from A, i.e. it is an axiomatization of everything( the physicsl universe/ answer to hilberts sixth problem). However by Godels incompletness theorem ( as obviously it can prove basic arithmetic truths ) $( ((\exists \phi (A \vdash \phi \wedge A \vdash \neg\phi)) \leftrightarrow ( \exists \phi( \exists \phi \wedge \neg\exists \phi )) \leftrightarrow (\exists \phi(( \phi \in U )\wedge   (\phi \notin U)))) \vee((\exists \phi( \phi \notin U)) \leftrightarrow (\exists \phi(( \phi \in U )\wedge   (\phi \notin U))))) $ .  That is the set is both incomplete and inconsistent, this is a contradiction as U by definition is both complete and consistent so trivially either our ideas of mathematical formalism have no bijective relation to complete models of physical reality and there exists a negative solution to Hilbert's sixth problem or existence and non existence are equivalent. This would trivially also disprove the existence of a "theory of everything" and a single unifying equation as one could use the equation as the constraints on the strings in the language of the axiom system, of which the equation is the only axiom, and (algebraic/differential et al.) manipulations of the equation are theorems.  Is there a way resolve this paradox?  This paper fully presents the paradox.  (and also illustrates its importance and current undecidable nature showing it is different from previously answered questions.)


Extracting raster values at points using Open Source GIS?

How can I extract values from a raster by points?  I prefer not in Arcgis.   I prefer in Qgis or Mapwindow or other open source gis.


Can't update because of "untrusted" packages?

So I'm trying to apply a boatload of updates and upgrades via Ubuntu's built-in update system... But it tells me the updates/upgrades can't be completed because it requires the installation of "untrusted" packages.  For the most part, my software has been installed via the Ubuntu Software Center... But there are a few odds and ends that I have installed separately...  The thing is, even the "Ubuntu base" updates (which as I understand it, as from Ubuntu themselves) are considered "untrusted" when I try to install them individually!  I've had a play around in the relevant settings, but no matter what I click, Ubuntu simply does not want to apply these updates/upgrades!  What am I doing wrong?


Are all projection maps in a categorical product epic?

Are all  $\Pi A_\alpha \stackrel{\pi_i}\longrightarrow A_\alpha$ projection maps epic, given that $\Pi A_\alpha$ be the product of $A_\alpha$s? Of course, assuming that the product exists.


Is it possible to spawn mobs in random places?

I was wondering if it is possible for you to make a command block spawn hostile mobs in random places in a specified area?   I need the mobs spawned on different Y coordinates too because you need to fight your way up a tower to the top and I want the mobs to vary on each level to have specialty to each floor every time you play the mini game.


Is every self-homeomorphism homotopic to a diffeomorphism?

Given a smooth manifold $M$, is every homeomorphism $M \to M$ homotopic to a diffeomorphism?   Hirsch's "Differential Topology" has a proof that every $C^1$ diffeomorphism of smooth manifolds is homotopic to a $C^\infty$ one, but as far as I can tell, says nothing about the case of $C^0$ automorphisms.  If false in general, is the above claim true in dimensions at most $3$? (If somehow false because of exotic smooth structures - is it true for topological manifolds supporting only one smooth structure?)


Suppose the event of interest occurs in approximately $10 \%$ of the cases where the number of cases is around $5,000$. Should you use a penalized logistic regression for this or is regular logistic regression okay? In other words, what qualifies something as a rare event?


I'm currently studying set theory and came across this statement here.  If a set A is a transitive set, then P(A) (its power set) is also a transitive set.  A set $S$ is called a transitive set if the elements of its elements are elements of $S$.  Could anyone give me a hand on proving this?  I tried some examples and started with the transitive set $A = \{0, \{0\}\}$. However the power set of this would be $\mathcal{P}(A) = \{ \{0\}, \{\{0\}\}, \{0, \{0\}\}, \emptyset \}$ and it doesn't seem to be a transitive set which contradicts the statement above. Am I doing anything wrong with my example?  Any help would be greatly appreciated


what happened to the shuffle option in iTunes

Can anyone tell me how to get my iPod touch to shuffle my full music library with iTunes 12.1.0.50?


Why do we have duplicated "mark as duplicate" when voting / flagging questions?

I was wondering when marking / flagging a question as a duplicate, I see two identical options: "A duplicated "mark as duplicate" "  One in the first page:    Another under "Should be closed" page:    I assume the one under "Should be closed" should be removed. Can we remove it? And should we?


I have many questions I'd like to ask today. I'm currently studying for my A-levels which is a qualification mainly based in England. I'm taking A-level Further Maths, which involves the study of First and Second Order Differential Equations. It seems we are just being taught to apply recipes to these types of equations and are given no intuition as to why these things even work? This isn't just for teaching in England, I've watched many American lectures and lecture notes and the same thing is done.   Let's take a look at Non-Linear Separable First Order Differential Equations.    We have defined these equations to take the form $$ N(y)\frac{dy}{dx} = M(x)$$  We are taught to solve these equations by multiplying $\ dx $ to both sides and then integrate by their respective variables.  Like so:   $$ \int N(y)\ dy = \int M(x) \ dx $$  I have just accepted this for some time, but I'd like to get to the bottom of wtf is going on. We are taught from Year 12/Calculus 1 days that $\frac{dy}{dx} $ is not a ratio but can be treated like one in many cases. Ok... then could you explain really what we just did when solving the above differential equation? I can accept the fact that we can treat $\frac{dy}{dx}$ as a ratio but it's not really a ratio. So, can we be told what we are really doing? Is it some kind of hidden secret? I just want to know why we multiplied both sides by $\ dx$, what are we actually doing?   I can assume that the reason we are not told is because it involves higher level math, that someone taking Calculus would not understand. But will actual reasoning behind why these recipes work be exposed to us during University math courses?


How to create segment a large model of landscape into smaller sections that can be higher resolution?

I hope to make a 3D model of existing landscapes in blender, with the hope of eventually adding them to video games that allow you to create your own maps. I tried using the following two tutorials with no luck:  and   With the video, I do have 3D maps, but I think I have too large an area with too low of a resolution. This is because when I try to zoom in, it seems the roads are a bit blurry. I am trying to start out with somewhat large areas, like the island of Nusa Tenggara Timur in Indonesia, with the hopes of slicing out a smaller section that can be used in a game without crashing. I am quite new to blender and while I can follow along the video tutorial, I’m not 100% understanding everything I’m doing and what the alternatives are.


Excel: Find matching values in 2 columns.

I have a spreadsheet with 2 columns. These columns have telephone numbers in them. I need a list of where the same telephone numbers exists in both columns. These need to be listed in column C as the matching telephone number.  Excel 2010.  Regards


If I used for charging sumsong for blackberry it not charge properly why? also is it effecting life of the battery?


unable to boot ubuntu after refreshing windows 8

Ubuntu was installed in disk H and windows 8 in disk C. Now, I refreshed windows 8 and I am not able to get the option to boot to ubuntu when I start my laptop.


I am studying the new database layer, and I am glad it is changed to an OOP layer. I need to implement a query with db_select(). I found I can add a WHERE statement with $query->condition(), but by default the conditions are AND'ed together.  How can I OR the conditions together?  $query=db_select('users','u')->fields('u',array('uid','title','created','uid')); $query->join('flag_content','fc' , 'u.uid = fc.content_id'); $query->condition('fc.fid', '5' , '='); $query->condition('fc.uid', $uid , '='); //…


I forgot my Ubuntu password. I entered recovery mode and changed the password for my user with passwd as root. I haven't used that machine for a long long time, so I also forgot that my home folder was actually encrypted using ecryptfs. My bad, but I don't have that 32-char long MOUNT passphrase...  What are the options in this case? Have I lost all or is there still a chance to recover?   is there a point to try with ecryptfs-recover-private and try to recall this forgotten LOGIN password which I changed with passwd? Will it return a success code if I eventually manage to find the password at the back of my head? if the point above doesn't happen, should I try the solution described here?  and run the shadow crack?   Or is there anything else I can do? I wouldn't like to break it more.  Many thanks  UPDATE: I think I found the old password. I am able to unwrap the passphrase. What's the way to go now? Go again root and passwd the user to the old password again or do a rewrap? Which is recommended? I just don't want to screw up things again :)


How can I remove from “previously installed apps” list in the PlayStore the applications that are already installed on my phone?

How can I remove from "previously installed apps" list in the PlayStore the applications that are already installed on my phone? For example, the application anyconnect shows up in the "previously installed apps" list:  Even though it is already installed on my phone:  I use Android 9  on Samsung Galaxy S9 with PlayStore 17.8.14.


I know the differences between client side and server side scripting on a web application. But when it comes to SharePoint what exactly means client side and server side?


Can I destroy a Planeswalker before its abilities are used?

If my opponent casts say an Elspeth, can I then Hero's Downfall that Planeswalker before any abilities are used?   I think my question boils down to: are planeswalker abilities sorcery or instant speed?


SOQL to find All Users with a Custom Permission

I was looking for a little help to find all users with a particular Custom Permission assigned to them, either via Profile or Permission Set.


If $G$ is a finite group and $T$ an automorphism of $G$ such that $T$   sends more than $\frac{3}{4}|G|$ elements to their inverse. Then we have show that $$T_x=x^{-1}$$ for all $ x \in G$ and $G$ is abelian.   I construct $ S= \{  x \in G : T_x=x^{ -1}  \}$ and for $ b \in G $, $ S_b= \{ xb:x\in S \}$ then $| S \cup S_b|\geq (1/2)|G|$. Let $ a \in S\cap S_b $ then $ a=tb $ for some $t\in S $. I dont know how to solve it by this construction or any other method. Give me any kind of help.


Can I fly back to Italy with receipt of renewal of residence permit if I applied for the renewal 2 weeks before my permit expired?

I plan on traveling back to my home country for 10 days. I applied for the renewal of my residence permit 2 weeks before it was set to expire. Will it still be a problem? I am asking because in IATA it says: Applications for renewal must be made within 60 days of expiring, otherwise immigration could refuse re-entry, even if holding confirmation of application  Does the above statement mean it is okay to have applied for the renewal within 60 days after expiring? Because in that case, I guess I am safe. I am sorry but for some reason, my English sentence comprehension collapsed when trying to read the above-highlighted sentence


i am wanting to try and run a query which will update my table ptb_messages and switch the data of two columns around, for instance heres my table:  id  |  to_user_id  |  from_user_id  |   1         4                5 2         5                6 3         7                9   so what i want to try and do is switch the value of from_user_id over to to_user_id and vice versa.  i was going to use this before i realised that once i copied the value from one table to the other the the original data from the other column would then have been overwritten,  $sql = mysql_query("UPDATE ptb_messages SET ptb_messages.from_user_id=ptb_messages.to_user_id");   what i really need is a swap function,  im not really sure how i might do this but im imagining its something like this:  $sql = mysql_query("UPDATE ptb_messages SET to_user_id=from_user_id, from_user_id=to_user_id");   hope someone can help me please.


This question exists as it fills a specific criterion.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the . More information on the .   What download managers are available for Ubuntu? Can you provide the link as well?


MySQL: View with Subquery in the FROM Clause Limitation

In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause?     ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause   If this is a limitation of the MySQL engine, then why haven't they implemented this feature yet?  Also, what are some good workarounds for this limitation?  Are there any workarounds that work for any subquery in the FROM clause or are there some queries that can not be expressed without using a subquery in the FROM clause?    An example query (was buried in a comment):  SELECT temp.UserName  FROM (SELECT u1.name as UserName, COUNT(m1.UserFromId) as SentCount        FROM Message m1, User u1        WHERE u1.uid = m1.UserFromId        Group BY u1.name HAVING SentCount > 3 ) as temp


Please explain this Javascript closure exercise

I'm a javascript noob trying to wrap my head around the closure exercise below.  Now, I know the result is 122. Can anyone walk me through this step by step (what gets passed to what), so I can understand how closures work?  var hidden = mystery(3); var jumble = mystery3(hidden); var result = jumble(2);  function mystery ( input ){   var secret = 4;   input+=2;   function mystery2 ( multiplier ) {      multiplier *= input;     return secret * multiplier;   }   return mystery2; } function mystery3 ( param ){   function mystery4 ( bonus ){     return param(6) + bonus;   }   return mystery4; }


Boot partition is full, running old kernel, new kernels "waiting" - safe to reboot?

This is not a duplicate as suggested above - for why, see the text below.  I have the strange situation that an "old" kernel is running (in fact it is the OLDEST):  uname -r  > 4.13.0-43-generic  Using a command to show available kernels I only see NEWER kernels(!):  sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r` linux-image-4.13.0-45-generic linux-image-4.15.0-24-generic linux-image-4.15.0-29-generic linux-image-4.15.0-30-generic linux-image-4.15.0-32-generic linux-image-4.15.0-33-generic linux-image-4.15.0-34-generic linux-image-extra-4.13.0-45-generic   It looks as if the system never rebooted to "get to the new kernels" - I see for example that in the root dir:  ls -al  lrwxrwxrwx   1 root root    33 Sep 11 06:02 initrd.img -> boot/initrd.img-4.15.0-34-generic lrwxrwxrwx   1 root root    33 Sep 11 06:02 initrd.img.old -> boot/initrd.img-4.15.0-33-generic lrwxrwxrwx   1 root root    30 Sep 11 06:02 vmlinuz -> boot/vmlinuz-4.15.0-34-generic lrwxrwxrwx   1 root root    30 Sep 11 06:02 vmlinuz.old -> boot/vmlinuz-4.15.0-33-generic   which kind of suggests this to me (I'm not an ubuntu guru)...  This is not a duplicate question but a new question because I have no old kernels to delete. Other answers detail deleting old kernels with version numbers less than the current kernel.  The running kernel is the oldest listed. I was worried about deleting kernels newer than the current kernel - between the current kernel and the newest and the kernel that was wanting to be installed - but blocked because of 100% full boot partition.  All answers using "apt" do not work when the boot partition is 100% full so please ignore them :)  From my original question: So I'm tempted to reboot the machine. But is this dangerous - since the boot partition is 100% full. "Normally" I'd delete old kernels etc. to free up space. What's the best/safest way to proceed here?  I ask because it seems I "should" make some space (see )... but how in this particular case?    THIS IS HOW I SOLVED the problem:  In the end as apt autoremove etc. do not work in this situation I followed the hints given here: (See: "Case II: Can't Use apt i.e. /boot is 100% full")  In my case I deleted a newer kernel by hand to release space in /boot in order to be able to proceed:  cd /boot ls *4.13.0-45* rm -rf *4.13.0-45* df -h sudo apt-get -f install sudo apt-get autoremove sudo update-grub more grub/grub.cfg reboot   df -h shows boot no longer 100% full With more grub/grub.cfg you can check if the system is catering for the correct kernels (i.e. whether the update grub worked well)


How to learn and use SharePoint Server 2013?

My boss wants to implement SharePoint Server 2013 in our company which is a small government firm of around 30-40 employees (and will expand later). He wants me to do certifications for it. I have a background of some programming in Visual Studio in C# but not that good (as I am a copy & paste coder). He wants me to Install, Implement and later develop apps in SharePoint Server 2013. I haven't used SharePoint Server before. Could anyone guide me the right path to take in order to start using SharePoint Server 2013 and also could you let me know which learning materials and certifications do I need to take for it?


Best suggested textbooks on Bootstrap resampling?

I just wanted to ask which are in your opinion the best available books on bootstrap out there. By this I don't necessarily only mean the one written by its developers.  Could you please indicate which textbook is according to you the best for bootstrap that covers the following criteria?   The philosophical/epistemological basis for the technique that lists domain of applicability, strengths and weaknesses, importance for model-selection? A good set of simple examples that show implementation, philosophical underpinnings, preferably with Matlab?


What is the limiting factor in lens construction when it comes to f-stop values?

has a maximum f-stop value of 2.8. I've held it in my hands, it's a big lens. Meanwhile,  can go up to f/1.2, despite being 25% cheaper and a LOT smaller. So at least with these two lens, there is not a very direct correlation between price and f-stop ability.  What is it that determines a given lens' f-stop range? Why can't that 105mm go sub-2?


Does modern physics have any explanation for what causes inertia?

I remember Richard Feynman stating on a few occasions (like ) that physics has no explanation of what causes inertia, that it seems to be some sort of deeply mysterious first principle.  I am wondering: have there been made any advances at all towards an explanation in recent decades/years - maybe more recent developments in particle/quantum physics, string theory, ... have shed some light on the matter (pun definitely intended)? Or does Feynman's statement still stand and is this phenomenon as mysterious as ever nowadays?   Edit, since this question is seen as a possible duplicate: my question is subtly different I think. I would like to know whether inertia is still seen as a first principle, or if there have been recent discoveries that reveal it to emerge from underlying principles or ideas, interactions of this or that type of particle with this or that field, ...


Communicating between the tablayout Fragments

I used a tab layout with fragment. The scenario goes like this.  Activity:  Fragment 1 , Fragment2 , Fragment3  From Fragment2 Updating the UI of Fragment1.  I tried to access the methods from fragment but resulting null pointer exception.


homeomorphism of cantor set extends to the plane?

Suppose C is a Cantor set in the Euclidean plane, or even in R^3. Suppose h is a homeomorphism of C onto itself. Can h be extended to a homeomorphism of the whole space? What about if h preserves the ´end points´ of the Cantor set? Seems that the latter is a necessary condition but I don´t know how to prove it.


How to texture a cube so that each face has the same uv coordinates?

I would like each face of a cube to have the same texture coordinates as each face will contain the same image. Therefore there will be no wasted space from storing a 'T' shaped image, instead of a square image.  I have attempted uv unwrap the cube and layer the islands on top of each other. However, I am unable to scale and align all of the faces to the full size of my square texture (image).  How can I fix this issue or is there a better carried out this process?


Error: `the requested scope is not available` with scope=full+refresh_token in User Agent OAuth Flow

I am using the  to authenticate my connected app.  My redirect Url is:  https://login.salesforce.com/services/oauth2/authorize? client_id=<CLIENT_ID>& redirect_uri=<HOST_URL>/services/oauth2/success& response_type=token& scope=full refresh_token   I get this error:    error=invalid_scope& error_description=the requested scope is not available   If I use scope=full, I am able to login and get the access token, but not the refresh token.  As per , using redirect_uri=http://localhost works as expected, but I want to redirect to my webapp.   suggests using http:// instead of https:// for the callback url scheme, but Salesforce gives the error: Callback URL: Cannot be an HTTP url.  Thank you for your time.


Is possible for grep to see the exact word?

Is possible for grep, or egrep to see the exact word? See this example: those are my groups groups floppy audio video cdrom games plugdev power netdev scanner users  I want to see only power, but return the entire line groups |grep --color -w power floppy audio video cdrom games plugdev power netdev scanner users  Is easy to return only power using pipe with awk or cut groups |grep --color -w power|cut -d ' ' -f 9 power  but my question is: is possible for grep or egrep command to return the exact word only?


I was playing a game earlier and my opponent had a  that was a 4/3 and wanted to use a sorcery to fight  that was a 4/4.  We were wondering if the Channeler would die first because of First Strike? Or would it not be counted as it wasn't combat?


Dual UK/Canadian Citizens travelling to USA and Canada

We are dual UK/Canadian citizens with both UK and Canadian passports. We reside in the UK. We will be travelling to the USA and Canada on holiday. Can we: -  leave UK on our UK passport and enter USA on Canadian pasport, then -  fly out of USA to Canada using our Canada passport -  fly back from Canada to UK with "in transit" stop in USA airport, using Canada passport to leave Canada and to get us through the "in transit" bit, and then re-enter UK on UK passport?  Alternative would be to get ESTA forms and to use our UK passports while travelling in USA and "in transit" in the USA


divisibility question: if two integers can both divide each other, do they have to be equal?

if x ,y ∈ Z. and x|y,y|x,then x does NOT equal to y. Can anyone give me a counter example please?


How to get multiple output between two words if a third word is present using Regex?

String = I <am a insta good </boy>.Why,I <am a insta bad </boy>.Where,I <am a naughty </boy>.How,I <am a soft </toy>.Don't know,I <am a very good </boy>.Why so, I <am a very bad </boy>.That's why  I want output where insta is between these two words like this  <am a insta good </boy> <am a insta bad </boy>   I tried /(<am)(.*)(<\/boy>)/g this but I am getting many output. Not what I want means those 5 lines.


How to create a div that occupy the whole screen and folds to an header when scrolling

I want to create a div that span the whole real estate of my device exactly like   What I tried doing is to create an header with fixed height but could not create the div below the header to span the remaining height.   //Fixed Header  .fixed-nav {     position: fixed;     width: 100%;     height: 69px;     background-color: #f2333a; }  .x-div {     position: relative;     height: 100%;     background-color: #F2333A;     z-index: 10; }


Really Strange Behaviour on Trackpad/Keyboard

Macbook Pro / Sierra /Model 1502   My Touchpad stopped clicking. I could move the pointer around but couldn't click. Then I plugged in an external mouse. Still couldn't click but the right click worked somehow on the external mouse. After a lot of struggling I managed to disable the Touchpad by using this command  sudo kextunload /System/Library/Extensions/AppleUSBMultitouch.kext . Then the external mouse started to work normally. But now the keyboard started to act strange. Some letters don't work, some do work but very slowly. Then I connected an external keyboard and it works fine.   Now I am using external keyboad/mouse and have the Touchpad disabled.  Can someone help me to make the original keyboard/touchpad work again. What is the root cause of this weird behaviour.  p.s. I have tried all kinds of reboots.   * Command+Option+P+R   * Option+Control+Shift


I have read multiple articles regarding floating point variables comparison, but failed to understand and get the required knowledge from those articles. So, here I am posting this question.  What is the good way to compare two float variables? Below is the code snippet:  #define EPSILON_VALUE 0.0000000000000001  bool cmpf(float A, float B) {   return (fabs(A - B) < EPSILON_VALUE); }  int main() {   float a = 1.012345679, b = 1.012345678;    if(cmpf(a, b))cout<<"same"<<endl;   else cout<<"different"<<endl;    return 0; }   The output: same although both the float variables hold different values.


What is incorrect in the following argument?

Theorem: If a finite set contains a real number, then it is a set of numbers Real.  Proof: By induction on the size of the set. Clearly true for sets of Size one. Suppose that the theorem is true for sets with n elements. Let's fix a set $A$ with $n + 1$ elements, $A=${$a_1,. . . , a_{n+1}$} and assume that $a_1$ is a real number. Then, the sets $A'=$ {$a_1,. . . , a_n$} and $A''= ${$a_1,. . . , a_{n-1}, a_{n+1}$} have n elements, and Contain some real number. Then $a_1,. . . , a_n, a_{n + 1}$ must be real numbers.  I think what is wrong is that we choose exactly a_1 as the real number, knowing that we can assume that there is a real number but we do not know what it is. Another thing is the fact of removing $a_{n + 1}$ and $a_n$ without knowing if this can be the real number that we have initially.


Does not being able to overfit a single training sample mean that the neural network architecure or implementation is wrong?

Is the following hypothesis true ?     If a simple neural network cannot overfit a single training sample, there is something wrong with its architecture or its implementation.   To give you more background on why I am asking this question, I am working on a single convolution layer that aims at segmenting the input image (classify every pixel of the image from either class 0 or class 1). The network does not manage to overfit a single training sample, so I suppose that there is something wrong with what I have done.  Edit: This is not a duplicate of . The post (which is very informative) suggest, among other things, to unit test the network to see if it is error-proof. Basically, I am asking a question on how to unit test my network. The hypothesis I stated is the one which I hold to run the unit test. If the hypothesis is wrong, the unit test I am making does not make any sense, thus the question.


How to evaluate the following limit? $\lim\limits_{x\to1}\frac{x^n+x^{n-1}+x^{n-2}+\cdots+x-n}{x-1}.$

How to evaluate the following limit?  $$\lim_{x\to1}\dfrac{x^n+x^{n-1}+x^{n-2}+\cdots+x-n}{x-1}.$$  I could simplify but couldn't proceed further


pdfLatex warning : PDF inclusion : invalid other resource which is no dict : ignored

i am receiving this problem when attempting to add an existing PDF into a latex document   pdfTeX warning: /usr/texbin/pdflatex (file ./filename.pdf): PDF inclusion : invalid other resource which is no dict (key 'ProcSets', type <array>); ignored.   Any help on this, happening on 2 different file i am trying to include in the PDF output


How to explain this inequality in a direct way?

$a^2 +b^2 +c^2 \ge a(b+c)+bc$, this equation is supposed to be correct, although I factorized and tried to solve prove in many ways, I cant explain well enough!


Why prefer the letter @ in command names?

I am editing a class-file (extension .cls) created by several authors to format a thesis according to my university standards.   In that file, there are many command (re)definitions. For example, the following:  \let\@ldquote=\quote \let\@ldendquote=\endquote \renewenvironment{quote}    {\@ldquote\setlength{\baselineskip}{\z@}}    {\@ldendquote}   ensures single-spacing in quotes regardless of text-spacing elsewhere in the chapters (usually double-spaced for corrections). There are many other similar examples.  In that example, as far as I can tell, the letter @ is used instead of o without obvious reason, ie \@ldquote instead of \oldquote. It is also used in the macros , to define "constants" for zero, one and two respectively.  I would personally qualify such practice as deliberate obfuscation, but it is not the first time I see this in class-files. Is there a point to this usage that I missed, or is this just the LaTeX-way of doing things?


Is there a way to prevent some apps from accessing to internet when wi-fi or mobile data is on?


Evidence that the Solar System is expanding like the Universe?

I've just come across Krasinsky and Brumberg's  that claims, from an analysis of radiometric measurements,  that the astronomical unit (earth-sun distance) is increasing at the rate:  $$\frac{d}{dt}AU = 15 \pm 4 \ m/yr.$$  If one assumes that the Solar system is expanding with the Universe then the Earth-Sun distance is given by:  $$R = R_0 \ a(t),$$  where $R_0$ is the present Earth-Sun distance and $a(t)$ is the scale factor.  From the definition of the Hubble parameter we have:  $$\frac{da/dt}{a} = H.$$  Therefore  $$dR = R_0 da$$  $$dR = R_0 \ a \ H \ dt$$  At the present time $H=H_0$ and $a=1$ so that:  $$dR/dt = R_0 H_0.$$  If I use $R_0=1.49\times10^{11}m$, $H_0=1/13.77\times10^9 yr^{-1}$ and $dt=1yr$ I find:  $$dR/dt = 1.49\times10^{11} \cdot (1/13.77\times10^9)$$  $$dR/dt = 10.8 \ m/yr.$$  Thus the rate of increase of the AU unit might well be explained if the Solar system is expanding like the Universe.  PS Krasinsky seems to dismiss the possibility that his results are explained by cosmic expansion because he somehow derives the rate $dR/dt = 1 \ km/yr$ under such an hypothesis. I can't see how he got that result.


What parts on a printed circuit board can make unintended sound?

To rephrase it: Since vibrations are responsible for soundwaves, what parts are most prone to such vibrations? Root causes are probably electrical oscillations between capacitors and inductors in the kHz region - are there different causes?


What to look for in a starter-level off-camera flash?

I have zero experience with flash and want to learn how to use it from zero, for example by following the Strobist blog.  What are the absolutely necessary specifications I should look for when shopping for a flash, and can I find something in a price range less than $200.00?  My camera is a Nikon DSLR.


Are there any transatlantic car ferries from Europe to North/South America?

Can I drive onto a ferry from anywhere in Europe and drive off in America either north or south?  It is something that me and my partner have wanted to do but we are unsure if this is even possible?   We live in the UK and would drive into Europe to board a ferry and then would like to off load on the other side of the Atlantic. Preferable in the USA but would be more than happy to drive north if there was no links to the USA/Canada from UK/Europe.


I've been running a Postfix/Dovecot mailserver for some time now (Ubuntu server 16.04), without any major issues. I also have a Let's Encrypt certificate issued to my hostname, which I setup in /etc/dovecot/conf.d/10-ssl.conf. That was running fine but as you may know those are only valid for 90 days. I have certbot setup to renew these automatically, which is also working fine.  Suddenly, today, both my Thunderbird, a clients Thunderbird and his iPhone started to complain about invalid certificates. I checked the certificates through certbot certificates to find out that the certificate I use was totally valid, not expired. Inspecting the certificate through Thunderbird told me the certificate had expired the day before, showing me a hash that did not match the current certificate.  So basically, it seems like Dovecot is issuing an expired certificate from some kind of 'cache'. Restarting dovecot just 'magically' fixed it but I'd like to understand what happened here since my DDG searches on certificate caches or alike in Dovecot didn't get me any results. Am I missing something obvious here? It seems like I've overlooked something obvious but can't figure out what.  EDIT This is basically answered  but since my certbot renews on a systemctl timer in stead of a cronjob I will try to provide the answer for that situation here for future reference and anyone in the same boat as I am.


This bit of code if from an example for a linked list but I'm struggling to understand the 2nd line of this function, could someone talk me through it?  template <typename T> typename List<T>::Node* List<T>::search(T d) {     if(!head) return NULL;     Node* cur = head;     while(cur) {         if(cur->data == d) return cur;         cur = cur->next;     }     return NULL; }


how to get list of all processes accessing a shared library

I know that ldd utility can list all libraries linked to a process but I want it the other way around. I want all processes linked to a library. I want to replace a shared library without crashing the system and make sure that the process reads the new library. A safe way is to check how many processes are using it and then shut them down using a script, replace the library and start them again.  I'll be really glad if there is a better way to do it. thanks in advance.


Git for beginners: The definitive practical guide

Ok, after seeing , I have decided to skip to the end and go with .  So what I need is a beginner's practical guide to Git.  "Beginner" being defined as someone who knows how to handle their compiler, understands to some level what a  is, and has touched source control without understanding it very well.  "Practical" being defined as this person doesn't want to get into great detail regarding what Git is doing in the background, and doesn't even care (or know) that it's distributed.  Your answers might hint at the possibilities, but try to aim for the beginner that wants to keep a 'main' repository on a 'server' which is backed up and secure, and treat their local repository as merely a 'client' resource.  So:  Installation/Setup    How do you set up Git?  Try to cover Linux, Windows, Mac, think 'client/server' mindset.         Working with the code          How do you handle binary files (visio docs, for instance, or compiler environments)? How do you merge files changed at the "same time"?    Tagging, branching, releases, baselines    How do you pull a particular 'release'?   How do you resolve conflicts and complete the merge? How do you merge parts of one branch into another branch?        Other   Describe and link to a good GUI, IDE plugin, etc. that makes Git a non-command line resource, but please list its limitations as well as its good.    - Cross platform, included with Git  - Cross platform history viewer, included with Git  - Mac OS X  - Mac OS X history viewer  - Cross platform, commercial, beta  - console GUI for Linux  - GUI for Windows, Linux  - package for Windows, includes friendly GUI  Any other common tasks a beginner should know?     How do I work effectively with a subversion repository set as my source control source?   Other Git beginner's references                 Delving into Git     (and )    I will go through the entries from time to time and 'tidy' them up so they have a consistent look/feel and it's easy to scan the list - feel free to follow a simple "header - brief explanation - list of instructions - gotchas and extra info" template.  I'll also link to the entries from the bullet list above so it's easy to find them later.


Here is my problem: I want to add small video clip to my database.  I used longblob type in MYSQL. I tried to insert small video clip to phpmyadmin but I failed to attach it.   I want to know how to insert a video clip into the MYSQL database How to retrieve that video to PHP.   Please guide me to this. I searched, but I could not found a satisfying answer.


I understand the simple distinction between "due to" ("adjectival") and "because of" (adverbial), but I get a little confused when the sentence includes modal or complex verbs. For example, could one write: "Participants may be excluded due to any of the following transgressions....."? ("due to follows "may be + excluded")  Or should one stick to a more strict "Participant exclusion may be due to any of the following transgressions...."?  Or is that even wrong, and they should both be "because of"?  This is NOT a duplicate of any other question because it addresses a particular use of "due to" that at least one response suggests is acceptable - but for reasons that actually add confusion!


print a datetime and a rounded float in a tuple without function name, quotations or parenthesis in the most pythonic way

when one prints the following:  import datetime data = (datetime.datetime.now(), '%.3f' % float(8/9)) print(data)   he/she begets:     (datetime.datetime(2018, 10, 16, 23, 58, 19, 314376), '0.889')   However, often one would like python to write:     2018-10-16 23:58:19, 0.889   There are of course many fine ways to wood pack here and there, but which is the way of the python?  PS This is not a question about ways to print a datetime instance as a readable string (there are plenty and easily accessible answers on SO). This question additionally asks to remove the quotation marks around the two strings in data, both of which emerge in different ways when printing a tuple. There are also many easily accessible answers on ways to do this. The question is how to combine these things in the most readable/pythonic way.


I recently installed Ubuntu 13.10 on my Computer. I want to install Latex on my Desktop but i am unable to install it.  I first tried to install using following command:  sudo apt-get install texlive-full   but i am getting following error:  E: Package 'texlive-full' has no installation candidate