The least value of the function $f(x)=|x-a|+|x-b|+|x-c|+|x-d|$

If $a<b<c<d$ and $x\in\mathbb R$ then what is the least value of the function $$f(x)=|x-a|+|x-b|+|x-c|+|x-d|\ ?$$  $f(x)= \begin{cases}        a-x+b-x+c-x+d-x & x\leq a \\       x-a+b-x+c-x+d-x & a< x\leq b \\       x-a+x-b+c-x+d-x & b< x\leq c \\       x-a+x-b+x-c+d-x & c< x\leq d \\       x-a+x-b+x-c+x-d & x> d    \end{cases}$  then $f'(x)=\begin{cases}        -4 & x\leq a \\       -2 & a< x\leq b \\       0 & b< x\leq c \\       2 & c< x\leq d \\       4 & x> d    \end{cases}$  From here on,i am stuck.Help me out


Please tell me how to find the total number of intergral solutions of $a+b+c=n$ I already know that total number of solutions will be $(n+3−1)c(3−1)$.  but if value of $a$ and $b$ and $c$ is given then what will be the answer??


A rational matrix such that $A^{2017}=I_n$

Let $A \in \mathcal{M}_{n}(\mathbb{Q})$ such that $A^{2017}=I_n$. Is it always true that $$A=I_n?$$   When $n \leq 2015$, I proved that this result must hold using the minimal polynomial and the fact that $2017$ is prime. I suspect that when $n \geq 2016$, this equality is not always true, but I can't find any matrix other than $I_n$ with that property, which also has only rational entries.  I also thought of an approach with eigenvalues, but since they are all complex roots of $2017$, I am not sure how to make use of them here.


I am trying to make my logo center using the following codes..  It is in the header-container.

  .logo {} .header-container {} .header {       margin:0 auto;      padding:0px;      text-align:center;      position:relative;      z-index:10; } .header .logo {      display:block;      text-decoration:none !important;  } .header .logo strong {      position:relative;      top:-999em;      left:-999em;      width:0;      height:0;      font-size:0;      line-height:0;      text-indent:-999em;      overflow:hidden;  } .header h1.logo, .header h2.logo {      margin:0;  }   This is the result I am getting.. As you can see it is a little towards the right   Anyone know how could I fix this?


I get the following error:   E: Could not get lock /var/lib/dpkg/lock - open (11: Resource  temporarily unavailable)   E: Unable to lock the administration  directory (/var/lib/dpkg/), is another process using it?   every time I try to install new software and then I tried to kill the process. So I typed in the command 'ps -A | grep apt-get' and get no response from it.  How do I get rid of this lock?


HowTo resize partitions in ubuntu 15.10?

I have installed Ubuntu 15.10, but i assigned only 4 GB to the /home partition. Now I figured that it's so small because Ubuntu saves files on home! Can i change it inside Ubuntu with some program or something else? I mean to get space from /root and move it to /home?(sorry if my English are bad! :) )


Searching for questions with a self answer

I wanted to check what had happened to a question I read last night, but the only useful thing I can remember about it is that it was self answered. I can't remember the user's name, or any good keywords in the question. I also use the app, so I don't have a history to reference.   Is there a way using the in-site search to find questions with self answers?   This was on SO, but I figured any answer would likely also be applicable on other sites, so I'm posting this here.


Can't unmount drive without killing bash

I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says  target is busy  It is the bash process which is using/accessing it. So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal  and unmount the drive. Is it normal ? I don't remember it happening the last time I unmounted something.


Can Google Sheets use date data validation to make one column greater than another?

I would like my target completion column to have a date that is greater than my start column. Excel supports a date validation option but I do not see this in Google Sheets.  Is it there and I just don't know how to use it?  I saw this question:  but I can't see how to get it to apply to the same row in the other column.  Obviously I don't want a new rule on each cell.


To avoid the problems that PNG has with fire Transparency, I exported the images in EXR format, but when I compare them to the PNG counterpart, the colours in the EXR image are way to blown out.  Why and how can I correct for that?


Is it recommended I enter the US only in the city where my university is situated?

I'm an Indian student who will be beginning graduate school in the US. Before the start of my program, I want to visit my relatives who live in Atlanta, Georgia. Is it recommended that I enter US in the state my university is located in (Tucson) and then fly to visit my relatives, or is it okay to enter Atlanta? I ask the question with the current political climate in the US in mind.  Is it enough if I have a ticket to Tucson as proof that I am only planning a brief stay in Atlanta?  EDIT: I updated the question to include the cities I'm referring to. Both these cities have international airports.


What is the conditional probability of normal given that another normal is less than a constant

Suppose we have a bivariate normal (X, Y), whose mean is zero, and variance 1, and correlation \rho.  Is there an easy formula for  P(X < x | Y < y ) ?


Given the active development in LaTeX and ConTeXt, and how LaTeX insulates the writer from typographical details and ConTeXt gives the user extensive control over formatting thus taking useful complementary approaches (see ), are there any reasons to use plain TeX?


"How are you doing?" Why do we answer "good" instead of "well"?

When someone asks me "How are you doing?" Why do we answer "good" instead of "well" (adv. for doing) ?


I click on "My link1", i have the alert "I clicked on" -> OK I click on button "Add line",  it adds my link 2 -> OK I click on "My link2" just added, nothing happens. -> KO Any help is welcome. This is my code

my link 1

 <button onclick="addrecepitem();" id="btnrecepajouter">Add line</button>


GRUB menu does not appear after setting up dual boot

I decided to dual boot Ubuntu 14.04 with Windows 8. Everything went right during the process (partitioning, installing, etc) but upon rebooting my laptop (my laptop is an HP Pavilion G6) it booted straight into Windows 8 with no GRUB menu to be seen. I attempted to use boot repair on Ubuntu and that failed; I also tried to change the boot order in the BIOS although I'm not really sure what I'm doing there so I don't know if I did it right or not.   Some help would be brilliant as I'm not sure how to go about getting the GRUB menu back!


Make wget convert HTML links to relative after download if -k wasn't specified

The -k option (or --convert-link) will convert links in your web pages to relative after the download finishes, such as the man page says:     After the download is complete,   convert the links in the document to   make them suitable for local viewing.   This affects not only the visible   hyperlinks, but any part of the   document that links to external   content, such as embedded images,   links to style sheets, hyperlinks to   non-HTML content, etc.   So, if I didn't specify -k, can I run wget again after the download and fix that, and if so, what would be the proper command? My guess is wget -c [previous options used] [url] and run it in the same working directory as the file were downloaded to.


Is my thawed chicken still good 4 days later in the fridge?

I took out Frozen Perdue chicken breast on Sunday afternoon and put them in the fridge to thaw. They are each pre packaged. Today is Thursday are they still good to cook today?


Two optional section arguments memoir with titlesec

The section divisions in memoir are defined as:  \section[〈toc-title〉][〈head-title〉]{〈title〉}   When titlesec is used, however, I find I am unable to use both optional parameters:  \documentclass{memoir} \usepackage{titlesec} \begin{document} \section[toc title][head title]{section title} \end{document}   This is a  incompatibility. How can I have different toc and header titles for sections when titlesec is used?


Can't enable Wifi in HP Envy with Ubuntu 14.04

I couldn't enable Wifi in my Hp Envy laptop with Ubuntu 14.04. This version is newly installed.   I did try out most of the solutions listed here and they didn't work for me.  This is my output of rfkill list   0: hci0: Bluetooth  Soft blocked: no Hard blocked: no   1: acer-wireless: Wireless LAN  Soft blocked: yes Hard blocked: no   2: phy0: Wireless LAN  Soft blocked: no Hard blocked: no


New hardrive for broken laptop, now like to install Ubuntu. How?

I have broken the hard drive in my Acer laptop, so need to reinstall. I will get a new one, but how can I install Ubuntu? I have a USB with NetBoot on it, but how can I get it to work in the BIOS settings, and boot from it?


Why is first fundamental form considered intrinsic

I am reading Kuhnel's differential geometry book, and in chapter 4, it says that "intrinsic geometry of a surface" can be considered to be things that can be determined solely from the first fundamental form. But I am unsure on why the first fundamental form itself can be considered to be something intrinsic to the surface. Kuhnel defines the first fundamental form to be the inner product induced from that of $\mathbb{R}^3$ restricted to $T_pM$. So isn't the larger $\mathbb{R}^3$ used?  So my question is: Supposed I have a smooth 2-dimensional manifold (e.g. in the sense defined by Lee's Introduction to Smooth Manifolds), but I didn't put it in any ambient space. Is there a way for me to define the first fundamental form? $T_pM$ is intrinsically defined (as the space of derivations in Lee's book), and so what is the inner product that I should put on $T_pM$?


How far away do portals need to be so that they don't go to the same place?

I'm playing on a SMP server and am trying to use the Nether to link up all my disparate bases around the world. Note in the below, A is Overworld, B is Nether.  I started with one portal (A1, thus spawning B1 in the Nether), and then created another portal a ways away in the Nether (B2), hoping it would be near the main area all the other players congregate. It (A2) was pretty close to where I wanted it, but not exactly. I then created another portal a short distance away (A3), which was where I was hoping A2 would land. I then went somewhere in the neighborhood of 400 squares away from where I initially built A1 (in the opposite direction of A2/A3) and created another portal, A4.   One would think A3 and A4 would create B3 and B4 on the Nether side, respectively. However, A4 linked to B1, and A3 linked to B2. The weird part is, A1 is further from A4 than A1 is from A3.   I hope that made any sense. My question is:  How far away do portals on the Overworld map need to be from each other in order to spawn separate portals in the Nether? Or, what are some ways to ensure a new portal won't link to an existing one?


Do I need to put “the” before “most” in this sentence?

Is putting “the” before “most” in this sentence compulsory, optional, or a mistake?     Fascination with language and   attention to particular regions and   communities in America are the most common   themes for which Coen brothers’ works   are appraised.   If it is purely optional, how does its presence or lack change the tone of the sentence, in case it does?


How to disable 'Exit Full Screen' with escape on Yosemite

If I press Escape by mistake while working, it exits full screen mode.  I could use Ctrl+Cmd+F if I want to exit full screen mode. How can I prevent Escape key in full screen mode?


Where does Photos store iCloud photos shared with me?

What is the location where Apple Photos stores Shared photos? I'm looking for the photos that appear under the Shared tab, to view them in the Finder.  My particular reason is that I'd like to enable these photos to be backed up by Google Photos Desktop Uploader. All of my own photos are being synced to Google, but not the ones that are shared with me. If I can find the local copy, I can turn it on in the uploader preferences.


How can I find repeated letters with a Perl regex?

I am looking for a regex that will find repeating letters. So any letter twice or more, for example:  booooooot or abbott   I won't know the letter I am looking for ahead of time.   This is a question I was asked in interviews and then asked in interviews. Not so many people get it correct.


I have a book with footnotes which I want to display. I put the footnotes in their place inside curly brackets.  In order to retrieve the comments and display them in a different window, I wrote the following class in Angular 2:  export class BookreaderComponent implements OnInit {  async comments() {     var regexp = new RegExp('\{(\s*?.*?)*?\}');     var array= await regexp.exec(this.book);     console.log(array);   }    constructor(public appServices: AppServices, private http: Http, private route: ActivatedRoute) { }   book: string;   Name: string;   json: string;   ngOnInit() {     this.route.params.subscribe(params => {       this.Name = params['name'];       this.http.get("./assets/" + params['url'])         .map(ref => {           return ref;         }).subscribe(async ref => {           this.book = ref.text();           await this.comments();         });     });    }   The class calls the comments function, which calls a regex function on a large amount of text, that contains a lot of curly-bracketed text. The problem is that the regex function takes a very long time to load (I waited and waited, and it didn't load), and meanwhile the whole page is stuck.  Is there a way to speed this up, or maybe break this up into smaller chunks? Or maybe I should try a different way to display these footnotes?


I have a huge amount of data in the form of CSV containing UTM coordinates as X and Y and an elevation value as Z information. I need to convert these data into a DEM as GeoTIFF for further analysis. In this case, a huge amount means 16 m. lines, with one point in X, Y and Z per line. The points are equally distributed, therefore an interpolation is not needed; each point just needs to be converted into a raster cell.  The original data came without separator, with fixed column widths. I already figured out how to convert the file syntax to use a separator instead of fixed widths and eliminate all space characters, using the stream text editor sed. From here on, normally my workflow would be to import the data into ArcGIS by creating a feature class from the X, Y and Z data and as a second step, converting the point shapefile into a GeoTIFF, using the Point to Raster tool. However, the file I currently have is way too big for this process.  Instead of the above described workflow, I was looking for an efficient alternative and discovered GDAL. However, in gdal_translate, the closest supported format I can find in the supported filetype list, is ASCII grid but no comma separated XYZ. Another difficulty is, that I have UTM coordinates, while most examples seem to use decimal degree coordinates. However, I need to stay within the UTM system (or at least, my output GeoTIFF needs to be in a UTM coordinate system).  So I am looking for a way to convert the CSV XYZ into a GeoTIFF, using GDAL, but so far wasn't able to find examples dealing with this exact problem. I would be very happy for some hints or even code examples.


How do I find the approximate surface area of a chicken?

I'm working on building a chicken army and I'm trying to find out how much metal or kevlar (still deciding) I need to make armor for the chickens. this measurement does not need to be exact I'm just trying to get an estimate for how much I will need. You will be spared when my chickens take over the world if you give me a working answer.


Read a file into a string at compile-time

I would like to write something in a file (let's call it foo.cpp) and include it as a string into my program at compile time, similar to the way #include does it.  Right now I'm using this C preprocessor #define:  #define toString(src) #src   to convert a bunch of code to a string, used as in this example:  const char* str = toString(   int x;   void main(){} );   You can read about macro stringification  if you want.  I would like to move that code to an external file, which would be "linked" at compile-time. I don't want the file to have to be distributed with the program, which would be the case if I were to read it a run-time.  I tried to use an #include directive as shown below, but the compiler refused it:  const char* str = toString( #include "foo.cpp" );   g++ seems to be completely confused, but clang++ gave me this error:  error: embedding a #include directive within macro arguments is not supported   Does anyone know if/how this can be done?  Note: I'm using this to write my GLSL shaders, although I doubt this information is of any use.  PS: Before you tell me this is a duplicate of , putting my code in a giant string in its own file or using an external tool (eg. xxd) to dump its hex representation are not "solutions" for me, as they are not better (ie. easier/cleaner) than my current method.    Update, a few years later: I just realized I never got to answer this question as it was closed as duplicate. I found the answer I was looking for when I saw , itself based on , and have been using it ever since.  In a nutshell, a small assembly file includes the files you want and exposes them under a given NAME, with the three variables NAME_begin, NAME_end and NAME_len allowing you to access their contents from your C code.  This way, you have a normal file containing nothing but the code you want, and it gets read automatically at compile time, instead of having to read it at runtime or having to jump through xxd hoops.


UK Visa in an expired Nigerian passport - what to use?

I am in Nigeria, my passport will expire in 4 months and I have a document to apply for a UK visiting Visa with that passport number.  Should I use it like that or go for another passport. If I choose to get another passport, how will I use it because of the passport number on the about to expired one in the document I want to use for Visa.


The function of the inductor in a boost converter

Above is a circuit from a text acts as a boost-converter.  It is doubling the voltage. I guess it is doing by choosing a larger C1 than C2?  The text says the average voltage across L is zero. And switch has %50 duty cycle.  What is the need/function of the inductor in this circuit?  And what should the capacitors capacitances be relative to eachother for Vout = 2*Vin.  edit: Buck example:   Edit: This question might be overlapping the so-called duplicate one(from 2013) but actually it is different. Circuits are different. I'm trying to understand in this particular question how the voltage is doubled or halved as well as the need for caps. How does the inductor doubles the output is something unique here imao. I still didnt get any satisfactory answer to this question. There was actually one but the user deleted his answer.


Any function copying from clipboard to a variable in Bash?

I need a way to get/copy data from clipboard to a variable in Bash. Is there such one?


Call by Value vs. Call by Reference vs. Call by Sharing

I'm trying to understand parameter passing in Java. There are some answers on Stackoverflow but they are not clear. The  page is very technical, so I don't understand it. This answer is helpful, but I don't understand the implications:   I understand the Java uses Call by Sharing, but I'm not sure how its different from Call by Reference. I'm not sure if this is correct, can you check my answers?  Shared Steps 1) The main program calls a method and passes it an argument. 2) The expression in the argument is evaluated and its type is determined. The result is assigned to the Argument variable.    Call by Value    3) Without regard for type, a COPY of the Argument's VALUE is made and passed to the method. 4) The Formal Argument receives a variable containing a COPY of the Argument. 5) The Formal Argument makes changes to the copy. 6) The Actual Argument is UNCHANGED.  Call by Reference 3) Without regard for type, a COPY of the Argument's ADDRESS is made and passed to the method. 4) The Formal Argument receives an REFERENCE to the memory location of the Argument. 5) The Formal Argument and Actual Argument point to the same value. Both can modify the Value/Object. 6) The Method can mutate the Formal Argument WITHOUT LIMITATION. When the method ends, these changes will be seen in the Argument.  Call by Sharing (Java) 3) Without regard for type, a COPY of the Argument's ADDRESS is made and passed to the method. 4) ? 5) ? 6) ?    I know there is a difference between how Java treats primitive types and objects in parameter passing, can someone fill in these blanks by explaining why?


selecting a field when you cannot count from the start

I have a long file ( 20000+ lines) where each of the lines is a description of a book:   book_number "title of the book" size type author_number   Where the element in quotes is a string with quotes and the others are numbers, except for type which is a single word:   23446 Raising Steam 537724 EPUB 4   I want to extract all the size fields but using cut you cannot use negative numbers to count from the back of the result of splitting with -d " ":   cut -d " " -f -2 books.txt   I cannot count from the front as the books may have any number of spaces in the title (I did not make up this format, I would have used CSV or JSON which require quoting).  Am I missing some option that allows using cut? What else could I use to get the second-before-last field with a one line solution?


Extract last 100 files in all subdirectories, each directory has variable number of files

I have a directory with 6 subdirectories. Each subdirectory also have a variable number of subdirectories. These last directories have variable numbers of *.jpg files. The jpg files are named in the form 0000.jpg, 0001.jpg and so on.  I am interested in getting the last 100 *.jpg files ( all directories have > 100 files), and storing them in separate directories with similar structure as the original directories.  What is the best way of doing it?


Seeking short story about the last of a species of thousand foot trees

In the 1970s I read a story about the last of a species of thousand foot trees on a planet, being harvested for building material.  There are several "last tree" books and stories written since but I cannot find this one.  Any historians out there who recall this one?


Attempt to update profile picture triggers "email address already registered error"

When I try to update my StackExchange profile image I get the following error:     Oops! There was a problem updating your profile: This email address is   already registered. If it belongs to you, log in above or visit our   account recovery page to get access to this account.   Tried in: askubuntu and stackoverflow.  Steps to reproduce:   Open "My Profile" Go to "Edit Profle and Settings" "Change Picture" Update picture (tried with URL and also with direct upload) Click "Save and copy changes to all public communities" Then I get the error. Changes are not saved.


I have a Partner sending some data to a Triggered Email/Data Extension which includes a column for XML data.   The trigger is erroring and not allowing the data to get to the Data Extension.   Below is what they are sending over. Is the formatting of the XML incorrect?  XML data that I've used in the past in Data Extensions starts with....   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>   This version of XML starts with... {"XML":  Could that be it?  {"To": {"SubscriberKey": "test@acme.com", "ContactAttributes": {"SubscriberAttributes": **{"XML":** "<root><ITEM><ITEM_PRODUCT_NAME>dark chocolate nuts & sea salt</ITEM_PRODUCT_NAME><ITEM_PRODUCT_SKU>15127</ITEM_PRODUCT_SKU><ITEM_PRODUCT_URL>https://www.test.com/15127.html</ITEM_PRODUCT_URL><ITEM_PRODUCT_IMG_URL>https://www.test.com/images/nuts.png</ITEM_PRODUCT_IMG_URL><ITEM_QTY>1</ITEM_QTY><ITEM_SUBSCRIPTION_PRICE>12.59</ITEM_SUBSCRIPTION_PRICE><ITEM_TOTAL>12.59</ITEM_TOTAL></ITEM><ITEM><ITEM_PRODUCT_NAME>crunchy peanut butter</ITEM_PRODUCT_NAME><ITEM_PRODUCT_SKU>41800</ITEM_PRODUCT_SKU><ITEM_PRODUCT_URL>https://www.test.com/images/butter.png</ITEM_PRODUCT_IMG_URL><ITEM_QTY>1</ITEM_QTY><ITEM_SUBSCRIPTION_PRICE>11.37</ITEM_SUBSCRIPTION_PRICE><ITEM_TOTAL>9.55</ITEM_TOTAL></ITEM><ITEM><ITEM_PRODUCT_NAME>pear cinnamon & pecan</ITEM_PRODUCT_NAME><ITEM_PRODUCT_SKU>17227</ITEM_PRODUCT_SKU><ITEM_PRODUCT_URL>https://www.test.com</ITEM_PRODUCT_URL><ITEM_PRODUCT_IMG_URL>https://www.test.com/images/apples.png</ITEM_PRODUCT_IMG_URL><ITEM_QTY>1</ITEM_QTY><ITEM_SUBSCRIPTION_PRICE>12.59</ITEM_SUBSCRIPTION_PRICE><ITEM_TOTAL>12.59</ITEM_TOTAL></ITEM></root>", "SHIPPING_LNAME": "Tester", "FIRST_NAME": "Test", "LAST_NAME": "Tester", "ORDER_TOTAL_SAVINGS": -5.97, "MERCHANT_ORDER_ID": "1810002352", "SHIPPING_ADDRESS_STATE": "NY", "ORDER_PLACE_DATE_LONG": "Fri 11 January 2019", "SHIPPING_ADDRESS_ZIP": "10004", "ORDER_SHIPPING": 0.00, "CARD_TYPE": "Visa", "ORDER_SUBTOTAL": 47.32, "ORDER_PLACE_DATE_SHORT": "01/11/2019", "SHIPPING_FNAME": "Test", "SHIPPING_ADDRESS_TOWN": "new york", "ORDER_TOTAL": 47.32, "CARD_EXPIRE": "12/2027", "CARD_HOLDER": "Test Tester", "SHIPPING_ADDRESS_1": "75 broad st", "SHIPPING_ADDRESS_2": "fl 23"}}, "Address": "acme@test.com"}}   AMPSCRIPT IN EMAIL Calling the XML....  %%[   var @LOOPINGAPPENDIX  set @LOOPINGAPPENDIX = AttributeValue("LOOPINGAPPENDIX")  set @productRows = BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM", 0)  ]%%   %%[   for @j = 1 to RowCount(@productRows) do       set @productXML = Concat("", Field(Row(@productRows, @j), "XML"), "")      set @ITEMPRODUCTNAME = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_NAME", 0), 1), "Value"))      set @ITEMPRODUCTSKU = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_SKU", 0), 1), "Value"))      set @ITEMPRODUCTURL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_URL", 0), 1), "Value"))      set @ITEMPRODUCTIMGURL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_PRODUCT_IMG_URL", 0), 1), "Value"))      set @ITEMQTY = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_QTY", 0), 1), "Value"))      set @ITEMSUBSCRIPTIONPRICE = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_SUBSCRIPTION_PRICE", 0), 1), "Value"))      set @ITEMTOTAL = Trim(Field(Row(BuildRowSetFromXML(@LOOPINGAPPENDIX, "/root/ITEM/ITEM_TOTAL", 0), 1), "Value"))      set @rowColor = Iif(Mod(@j,2) == 0, "#efefef", "#ffffff")   ]%%   %%[endif]%%   %%[next @j]%%


How to create a subfolder based on current date?

I want to use a command to copy the entire contents of a folder (including subfolders) to a different drive.  For example:  robocopy c:\evernote\ e:\evernote\<datestamp>\   where <datestamp> is a new folder whose name represents the current date in this format:  2018_05_21   So, the target "evernote" folder will contain a series of subfolders, one folder for each date. Each subfolder will contain the files that were copied from source to target on that date.  For me, I don't think it matters if the command is copy, robocopy, xcopy, or whatever. However, I believe that robocopy is most up-to-date, and therefore most likely to be of future use to me.  BTW: To keep this simple, there's no need to allow for different time zones, and no need for "automation" - I will run the BAT file myself, and add automation later.  Thanks.


Why does this test with ifthenelse not compile?

Why does the following test using \ifthenelse not compile:  \documentclass[border=30pt, tikz]{standalone} \usepackage{tikz,tikz-3dplot} \usepackage{ifthen} \usepackage{animate, calc}%%%%%%%%%%%% \usepackage{animate} \usepackage{circuitikz}  \begin{document}  \foreach \x in {0.1,0.2,...,4}{   \begin{tikzpicture}    \begin{circuitikz}  \draw (0,0)       to[V,v=$U_q$] (0,2) % The voltage source       to[short] (2,2)       to[R=$R_1$] (2,0) % The resistor       to[short] (0,0);       \draw (2,2)       to[short] (4,2)       to[R=$R_2$] (4,0)       to[short] (2,0);          \ifthenelse{\x<2}{\fill[color=red] (0,\x) circle (3pt);}{}  \end{circuitikz}  \end{tikzpicture} } \end{document}   On compilation I get the following error:  ! Missing = inserted for \ifnum. <to be read again>


I want to find all nilpotent $2\times 2$ matrices.   All nilpotent $2 \times 2$ matrices are similar($A=P^{-1}JP$) to $J = \begin{bmatrix} 0&1\\0&0\end{bmatrix}$  But how do I find all of these matrices?  I do think that the only such cases are $J$ and $J^ T$


Do I need a visa for a layover in Germany if I have a type C Schengen visa for Spain?

So I'm gonna travel to Spain next Monday from Japan and I'm a Philippine passport holder but residence here in Japan. I got my type C schengen visa single entry from the Spanish embassy.  My itinerary has a 5 hour layover in Munich, Germany and I need to pick up my luggage and re check in again, do I still need a visa in germany?


I have seen in a lot of places that spices and dried herbs need to be kept in an airtight container.  I have several container that are virtually airtight, but they have couple small holes that if filled with liquid and put upside down it would drip slowly.  Is there any harm in storing spices in this condition?  Is it safe to store spices like that?  Can this very small amount of air be detrimental?


I have a problem with images not showing up. The latex recognises them (see screenshot) but doesn't generate them to pdf document. They are in the same folder. I tried including image extensions and with the part that is commented. The images are .png.  Here is the code:  \documentclass[12pt,a4paper,draft,pdftex]{article}     \usepackage[pdftex]{graphicx}   \usepackage{mathtools}   \usepackage{amsthm}   \usepackage{amsfonts}     %\graphicspath{name/Dropbox/projectProgramming/graphs/}  \begin{figure}[p] \centering \includegraphics[width=\textwidth]{avgP} \caption{Average} \end{figure}


When to use $x = A \sin (wt + p)$ and $x = A \cos (wt+p)$ during Simple Harmonic motion when we start our clock not between mean and extreme position?

When to use $x = A \sin (wt + p)$ and $x = A \cos (wt+p)$ during Simple Harmonic motion when we start our clock when the object is between mean position and extreme position ? I have been trying to study, and I know that when we start from extreme position, we use cosine, and sine for mean, but what if we start in between? I know that both have a phase difference of 90 '  , but , if an initial phase is given , how to determine that it is p for x = A sin (wt + p) or = A cos (wt+p). You can explain with the help of this problem. Thank you.


I am using moderncv the \cref{} command is not working and if I put the package it, it gives me an error. I tried with \ref it gave me no error but also it never produced any reference just "??" in the place. I want to correct this. Also, I want the label to have a distinct color different from the text. I could not do it in modernCv package.  Any help appreciated   \documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman  \moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking' \moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'  \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template  \usepackage[scale=0.75]{geometry} % Reduce document margins %\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column %\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name  \usepackage{amsfonts, amsthm} \usepackage{amsmath} \usepackage{amssymb} %\usepackage{booktabs} \usepackage{color} \usepackage{colortbl} \usepackage{enumitem} \usepackage[utf8]{inputenc} \usepackage[english]{babel} %\usepackage{cleveref}  %\usepackage[capitalise,noabbrev]{cleveref}  %\usepackage[hang,flushmargin]{footmisc} %\usepackage[margin=25mm]{geometry} %\usepackage{mathtools}  \newcounter{section}  \setcounter{section}{1}  \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma} \newtheorem{example}[theorem]{Example} \newtheorem{corollary}{Corollary}[theorem]  \begin{document} \makecvtitle % Print the CV title  \section{ Research Experience} My research experience etc......... begin{align}  \label{eq:partitionfunction} Z(\mathbf{p}; \mathbf{q}; \h) &= \sum_{\lambda \in {\mathcal P}} s_\lambda(p_1, p_2, \ldots) \, s_\lambda(\tfrac{q_1}{\h}, \tfrac{q_2}{\h}, \ldots) \, \prod_{\Box \in \lambda} G(c(\Box) \h) \notag \\ \end{align}  In the above equation \ref{eq:partitionfunction}


How can I automate resize and crop of headshots to the same proportions?

What options do I have to process a folder of shots that include faces taken at various proportions and positions (e.g., some of full body, some of head and shoulders) and resize and crop them all so that the head to chin ratio is 2/3rd the height of the total photo?  Essentially, I want to turn all the photos into 2 inch wide x 3 inch tall headshots with the heads equally positioned and proportioned (i.e., the top of the head to the chin is 2 inches tall).  I've been doing it manually in several steps, but if there is some or all of the process I can automate I would appreciate suggestions.


How does Unity input work with touchscreens

I'm trying to make a racing game on android using unity.  I want to make a car move forward when I touch an image button like in the picture below.  I've already made it work using the keyboard.  How do I do the same with on-screen buttons and touch input in android?


Finding the radius of a third tangent circle

Sorry if this is a foolish question, but I'm having difficulty understanding how to solve for $r_3$ in the following diagram...    According to WolframAlpha's page on tangent circles, the radius of $c_3$ can be calculated using the following formula $r_3=\frac{r_1 \times r_2}{(\sqrt{r_1}+\sqrt{r_2})^2}$, which can be simplified to $\frac{1}{\sqrt{r_3}}=\frac{1}{\sqrt{r_1}} + \frac{1}{\sqrt{r_2}}$.  To be completely honest, I'm having a hard time understanding understanding how this formula works (as I'm a very visual person). What exactly is happening here?


Number of non trivial ring homomorphisms from $\mathbb Z_{12}$ to $\mathbb Z_{28}$

One homomorphism is $ 1 \mapsto 1$.    Other homomorphisms are:  We know that if $f$ is a homomorphism from $R$ to $S$ and $f(1_R) \neq 1_S$, then $f(1_R)$ is a zero diviasor in $S$. So zero divisor of $Z_{28}$ are 2,4,7 and also we know that if $f(1_R) = z$, then $z^2 = z$.   Hence there is only one Homomorphism    Please check my Solution and tell me right or not  Thank you for giving me your valuable time to check my Solution.


Cannot install Deepin Desktop Environment on Ubuntu 18.04.1

So as per the instructions, I've already added the ppa repo, and updated. But when I run:  # apt install dde Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  dde : Depends: dde-desktop but it is not going to be installed        Depends: dde-polkit-agent but it is not going to be installed        Depends: dde-dock but it is not going to be installed        Depends: dde-launcher but it is not going to be installed        Depends: dde-control-center (> 2.90.5) but it is not going to be installed        Depends: dde-daemon but it is not going to be installed        Depends: deepin-metacity but it is not going to be installed        Depends: deepin-wm but it is not going to be installed        Depends: startdde but it is not going to be installed        Depends: dde-session-ui but it is not going to be installed        Depends: deepin-notifications but it is not going to be installed        Depends: deepin-menu but it is not going to be installed        Depends: deepin-terminal but it is not going to be installed        Depends: dde-calendar but it is not going to be installed        Depends: deepin-system-monitor but it is not going to be installed        Depends: deepin-image-viewer but it is not going to be installed        Depends: deepin-screenshot but it is not going to be installed        Recommends: deepin-deb-installer but it is not going to be installed        Recommends: deepin-screen-recorder but it is not going to be installed        Recommends: deepin-voice-recorder but it is not going to be installed        Recommends: deepin-shortcut-viewer but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Is there a fix to this?  Edit: I have already tried the aptitude and synaptic methods. Aptitude reduced my dependencies by maybe 2, and synaptic says that I need to fix broken packages first. When trying the commands sudo dpkg -l | grep ^..r and apt-mark showhold I get no results.  Edit 2: I have tried the solutions from the second duplicate claim too, no luck.


jQuery change event not firing on dynamically created element

I'm currently experimenting with list.js and lodash to produce a dynamic filter functionality on a set of search results. The base of the code is forked from here:    List.Js uses the elements on the page to create a dataset that can then be filtered or sorted. However, as these are search results I want to make the filters dynamic so that only criteria that is present on the page is displayed.  The example above uses a multi-select list however in my example I have converted these to checkboxes. The main problem I have is now that I am creating my checkboxes dynamically they are no longer firing the updateList() method on change.  I have tried simply using the .change() method in JQuery and also .on("change",updateList()) but neither of these seem to work. Any ideas?  Code and Codepen below.  HTML
   <input class="search" placeholder="Search" />
   Filter Name:   <input type="checkbox" name="names" value="Jonny Wayne">Johnny Wayne   <input type="checkbox" name="names" value="Jonas">Jonas   <input type="checkbox" name="names" value="Martina">Martina   <input type="checkbox" name="names" value="Gustaf">Gustaf

Jonny Wayne

1986

Jonas

1985

Jonas

1985

Jonas

1985

Martina

1986

Gustaf

1983

       Javascript  var options = { valueNames: [ 'name', 'born' ] }; var userList = new List('users', options);  var updateList = function(){   var names = new Array();   var dates = new Array();    $("input:checkbox[name=names]:checked").each(function() {        names.push($(this).val());   });    $("input:checkbox[name=dates]:checked").each(function() {        dates.push($(this).val());   });    var values_date = dates.length > 0 ? dates : null;   var values_name = names.length > 0 ? names : null;    userList.filter(function(item) {     return (_(values_date).contains(item.values().born) || !values_date)             && (_(values_name).contains(item.values().name) || !values_name)   }); }  $(function(){   updateList();   $("input:checkbox[name=dates]").change(updateList);   $("input:checkbox[name=names]").change(updateList);    var all_born = [];   var all_name = [];    _(userList.items).each(function(item){     all_born.push(item.values().born)     all_name.push(item.values().name)     });    _(all_born).uniq().each(function(item){     $(".dateContainer").append('<input type="checkbox" name="dates" value="'+item+'">'+ item +'')   });   });   Codepen    Thanks in advance.


Consuming Streaming API Call using HTTP Web Request

I have a live streaming API call(Twitter Stream via Datasift) which I have to consume and show it in my application. When I tried to consume it in the browser, the call never ended. It just kept on pushing the data as it happened. And that is the point of the Live streaming actually. When I tried to consume it using HTTP Web Request Get Method, the Response Stream never ended and so I wasn't able to read the stream.  I understand this is not the way to do it. Can some one suggest me how to do it in c#.  Edited: (Extra Information) The API returns the data continuously as and when some one has tweeted with the keyword we sent as a parameter in the API call. So the response never actually ends. When I tried doing it asynchronously, it hit the call back method only once and I wasn't able to read the stream either. Where as when I tried the same API call from a browser, it kept on giving the results as and when some one has tweeted with the keyword. SO it is just not about asynchronous consuming of web request.


I am trying to install a flash player in Ubuntu. I followed the below link:     I enabled Enable Canonical Repository Update the system While using the command apt install adobe-flashplugin browser-plugin-freshplayer-pepperflash I am getting unable to locate package browser-plugin-freshplayer-pepperflash   Can anyone leave their suggestions here, it would be greatly appreciated?


Getting started with Greek and Hebrew in LuaLaTeX

I am typesetting a 17th century English theological document that uses a smattering of Greek and Hebrew. I am using LuaLaTeX with TeXShop on the Mac.  Is LuaLaTeX up to the task? If so what are the basic steps needed to get accented Greek and pointed Hebrew? Is it possible to have English sentences interspersed with occasional Gk and Heb words, or can they (esp Heb) only be set in their own paragraphs?  My plan was to use SBL Greek and Ezra SIL Hebrew fonts. Are these reasonable choices?  Ideally I would like to be pointed to a tutorial that describes this stuff from the ground up (or rather, as suitable for someone with a Lamport understanding of LaTeX). But short of that I'm throwing myself on the mercy of knowledgable strangers!


How does the linux kernel detect which hardware is present/driver to load?

I'm having trouble finding resources on how the linux kernel actually finds the hardware, that it is running on.  For example, what kind of graphics card there is, so it knows which driver to load. Or if there is a graphics card present at all.  I picked up somewhere, that it could have something to do with ACPI tables, but I'm at a loss what to search for.


How do I set GNOME to "focus follows mouse"?

I have two monitors that I use for development. I would like to use sloppy focus for switching between windows. sloppy focus -- whatever you mouse is hovering over is in focus.  I know it's available in ubuntu 10.04. How do you enable it?


PostgreSQL-12.3 / PostGIS-3.0 - could not access file “$libdir/postgis-2.4”: No such file or directory

I am aware there are a few similar questions to this one, such as  and . My problem is however a bit different. I've recently upgraded my Ubuntu to 20.04 and there only PostgreSQL 12.3 and PostGIS 3.0 are fetchable on the official repo. This means that getting earlier versions is not very straightforward. Thinking that the easiest way forward would be to also upgrade my Django database to the latest version above, I decided to try that. To my surprise, I keep getting the following error: could not access file "$libdir/postgis-2.4": No such file or directory This happened first in my Django app but naturally also when accessing the database via psql directly. I then proceeded to drop the database and create it again, as luckily the data I had there was still only test stuff. As soon as I try to create the PostGIS extension to it, guess which error I get... mydb=# CREATE EXTENSION postgis; ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory  My conclusion is that it doesn't seem to be a problem directly related to the upgrade of postgis to 3.0, as I'm not even able to create the extension. Also, I don't understand why it tries to access the 2.4 version as it is a brand new database. Restarting the PostgreSQ service or even the computer wasn't of any help. How can I approach this problem?


What's different between 'serialVersionUID = 1L' and 'SUID is not declared'?

private static final long serialVersionUID = 1L; (Only 1L other than the other numbers) SUID is not declared for a class (Of courese, implements Serializable)     I think Both of them seem to make the serialVersionUID value automatically. Isn't it?  I wonder what the difference is.    Help would be highly appreciated.


Chemical formulae with dopants / Formulae containing ”:“

I'm trying to write some substances with dopants in them, e. g. ”InO2:Sn.“ Although I could split up the formula every time it contained a dopant, this wasn't really smart to do and I'd also get in trouble with line endings/non-breaking spaces at some point. How to bring a colon (:) into \ce{}? MWE \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage[version=4]{mhchem} \begin{document}     \ce{InO2}:\ce{Sn}     %\ce{InO2:Sn} \end{document}


Even if you disable Chrome's automatic sign-in in the browser's settings:    Google seems to follow you when a website offers Login with Google:   Is there a way to disable Login with Google at all for external websites?


How is BigO complexity equation calculated in general?

In worst case(failed to find sum ending up return false), what would be the complexity equation of the code and what's BigO of it? I put // and number of times either 1, n, n^2 that I think right. Could you check if I am calculating it right?  public static boolean hasSum(int arr[], int sum){          int n = arr.length;           //1          for(int i =0; i<n; i++) {           // 1, n, n             for(int j =0; j<n; j++) {      //1, n^2, n^2                 if(arr[i] +arr[j]==sum) {       //n^2                     return true;                 }             }         }       return false;      //1   (because it fails to find the sum) }   So what I have is 3n^2 + 2n +4 , which is O(n^2)  I think I may be right on BigO, but not sure about the equation that I made.  Is it correct?  Thank you!


How to show $\int_0^1 x^{-x} \mathrm dx = \sum\limits_{n = 1}^\infty n^{-n}$.

I need to show that $$\int_0^1 x^{-x} \mathrm  dx = \sum\limits_{n = 1}^\infty n^{-n}$$   I tried using that $x^{-x} = e^{-x\ln(x)}$, but I don't know what to do about when $x = 0$ since the equality does not hold. I also tried using the power series expansion of $e^x$, but I don't really know where to go from there. Any help would be appreciated.


How to repair Ubuntu installation after interrupted dist-upgrade without losing any custom settings?

During my attempt to upgrade my Xubuntu 14.04 installation with  sudo apt-get dist-upgrade   I made the mistake of interrupting the process by closing my laptop, which caused it to suspend to disk. After re-opening, the monitor remained black, so I was forced to reboot the system. I have since discovered many failures of drivers (wlan0 missing, USB memory stick cannot be mounted, USB mouse not recognised, and maybe more undiscovered problems with hardware).   My beginner's attempts to manually repair the single problems could have made it even worse. During the installation of the current distribution I chose to encrypt my whole hard disk.


How to install with separate home partition (home partition already created in previous installation)?

I have Ubuntu 10.10 install on my system with /boot, swap, /root and /home partition. I wish to install 11.10 in my system. In the installation screen The options were: 1 - Erase Ubuntu 11.04 and reinstall 2 - Upgrade Ubuntu 11.04 to 11.10 3 - Erase everything and reinstall 4 - Something else  Which option should I choose to get benefited ? If I choose the last option should I have to mark the /home partition and If I hadn't choose it what should I do  now?


Where can I ask this question about programming language?

Question:  How first programming language made?  Description:  I want to know how first programming language made?


Specify a sender when sending mail with Python (smtplib)

I have a very simple piece of code (just for testing):  import smtplib import time  server = 'smtp.myprovider.com' recipients = ['johndoe@somedomain.com'] sender = 'me@mydomain.com' message = 'Subject: [PGS]: Results\n\nBlaBlaBla'  session = smtplib.SMTP(server)  session.sendmail(sender,recipients,message);   This works but the problem is that e-mail clients don't display a sender. I want to be able to add a sender name to the e-mail. Suggestions?


Let $n$ be a positive integer which is not a square. Prove that for every integer $a$ relatively prime to $n$, there exist integers $x$ and $y$ satisfying $$ax \equiv y \pmod{n}\text{ with } 0<x<\sqrt n \text{ and } 0<|y|<\sqrt n$$  I'm unable to make any progress with this problem. Any help will be appreciated.


C++ Deduced template seems 'empty' under GCC but not under MSVC

EDIT: As pointed out by cpplearner, I had to add 'template' after T:: before Key. e.g. : T::template Key<i>::to_string  I'm writing an unroll template to create a compile-time 'for loop' to execute a specified callback for each iteration of the loop.   As for context; I'm writing a keycode helper structure in which I can simply define an enum (C++ sided) variable and its string 'name' value in one macro. This is used to easily setup a to_string method for each key to use later in the application. (Building a JavaScript-sided 'enumeration' object with the enum values at each object key)  The problem however is that my code compiles under MSVC, but doesn't compile under GCC.  I simplified the code to represent the problem   #include <string>  struct KeyCodes {     enum KeyCode { Key1, Key2 };      typedef void (*LoopCallback)(KeyCode keyCode, std::string str);      template <KeyCode> struct Key     {         std::string to_string(){ return "undefined"; }         static const bool is_valid = false;     }; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key1> {     std::string to_string() { return "Key1"; };     static const bool is_valid = true; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key2> {     std::string to_string() { return "Key2"; };     static const bool is_valid = true; };  template <typename T, KeyCodes::KeyCode i, bool is_valid, KeyCodes::KeyCode max> struct KeyCodeLoop {};  template <typename T, KeyCodes::KeyCode i, KeyCodes::KeyCode max> struct KeyCodeLoop<T, i, true, max> {   static void loop(KeyCodes::LoopCallback to_call)   {     to_call(i, T::Key<i>::to_string());     const KeyCodes::KeyCode next = i + 1;     KeyCodeLoop<T, next, T::Key<next>::is_valid, max>::loop(to_call);   } };   If I replace T with the actual "KeyCodes" structure, it does however compile.   #include <string>  struct KeyCodes {     enum KeyCode { Key1, Key2 };      typedef void (*LoopCallback)(KeyCode keyCode, std::string str);      template <KeyCode> struct Key     {         std::string to_string(){ return "undefined"; }         static const bool is_valid = false;     }; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key1> {     std::string to_string() { return "Key1"; };     static const bool is_valid = true; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key2> {     std::string to_string() { return "Key2"; };     static const bool is_valid = true; };  template <typename T, KeyCodes::KeyCode i, bool is_valid, KeyCodes::KeyCode max> struct KeyCodeLoop {};  template <typename T, KeyCodes::KeyCode i, KeyCodes::KeyCode max> struct KeyCodeLoop<T, i, true, max> {   static void loop(KeyCodes::LoopCallback to_call)   {     to_call(i, KeyCodes::Key<i>::to_string());     const KeyCodes::KeyCode next = i + 1;     KeyCodeLoop<T, next, KeyCodes::Key<next>::is_valid, max>::loop(to_call);   } };   What could be causing this behaviour, or am I doing something very wrong in general?


Ring of polynomials over a field has infinitely many primes

Let $F$ be a field. Why does $F[x]$ have infinitely many irreducible elements?   For the case F has characteristic 0  Then x-a is irreducible for all a $\in F$ since x satisfies no non-trivial relations in F.  Obviously this argument fails for a finite field since there are only finitely many a to choose from.  So how may I construct irreducible polynomials in a finite field?  I figure it must involve higher powers of x, maybe $x^n-a$ ?


I got a Mac given to me. The computer looks good and runs. It was from a business and part of a managed domain. I don't know the username or password. What can I do the access the Mac and change for use at home?


Can I stay in Zurich airport If I get there before my visa starts?

I have a query regarding transit visa. I am a student at the Indian Institute of Technology in Jodhpur, India.  I am going to visit Switzerland during this summer as a student trainee. I got my visa clear with starting date 11th May 2015, but my flight is on 10th May 2015 from Mumbai and it will reach to Zurich on 10th May at 22:00. So I just want to know that is it possible to travel with that visa as it has starting date 11th May 2015 or do I need some transit visa to stay on Zurich airport for two hours or I can't travel at all on 10th May?  Please reply to this thread as soon as possible so that I can decide accordingly.


I am learning common lisp.  It's not explained anywhere but I tried:  (eq '(a b c) '(a b c))   which evaluates to NIL.  Why returning Nil from lisp's perspective? I am interested to know how it evaluates to Nil in this case.  Thank you.


Singular information matrix error in lrm.fit in R

I am running an ordinal logistic regression in R and running into trouble when I include dummy variables.  My model works great with my first set of predictors.  Next I want to add dummy variables for each of the years represented in my dataset.    I created the dummy variables with car:recode in this manner (one statement like this for each of the 11 years)  fsd$admityear2000 <- recode(fsd$ApplicationYear ,"2000=1;else=0")   The lrm model is specified as follows  library(Design) ddist<- datadist(fsd) options(datadist='ddist') m4 <- lrm(Outcome ~ relGPA + mcAvgGPA + Interview_Z + WorkHistory_years + GMAT + UGI_Gourman + admityear1999 + admityear2000 + admityear2001 + admityear2002 + admityear2003 + admityear2004 + admityear2005 + admityear2006 + admityear2007 + admityear2008 + admityear2009, data=fsd)   (sorry for all of the other random variables, but I don't want to introduce confusion by changing my code)  I get the error  singular information matrix in lrm.fit (rank= 22 ).  Offending variable(s): admityear2009 admityear2000 admityear1999  Error in lrm(Outcome ~ relGPA + mcAvgGPA + Interview_Z + WorkHistory_years +  :    Unable to fit model using “lrm.fit”   I understand that including all options of a dummy variable over-defines the model, but I get the error whether I include all 11 years or just 10.  I found a suggestion  to set the penalty parameter of lrm to a small positive value.  Setting it to 1 or 5 changes the error such that it only names one of the variables as offending.  The error doesn't go away even with penalty=100.  I'm pretty new to R, but loving the freedom so far.  Thanks for any help!  Responses and Lessons   Factors are awesome and I can't believe I didn't notice them earlier. Man that cleans up my code a lot.  Thanks! My DV, 'Outcome' is indeed ordinal and after making it a factor(), I also made it ordered(). The str() command is also awesome and this is what my data now looks like (with some of the non-relevant variables omitted)   output:  str(fsd)      Outcome      : Ord.factor w/ 3 levels "0"<"1"<"2" relGPA       : num   mcAvgGPA     : num  admitschool  : Factor w/ 4 levels "1","2","3","4" appyear      : Factor w/ 11 levels "1999","2000",..    both lrm() and polr() now run successfully, and they both deal with appyear by dropping some values of the factor.  lrm() drops 1999, 2000, and 2001 while polr() just drops 1999 and 2000.  lrm() gives no warnings while polr() says "design appears to be rank-deficient, so dropping some coefs."  This is an improvement, but I still don't understand why more than one value needs to be dropped. xtabs shows that there isn't full seperation right?   output:  xtabs(~fsd$appyear + fsd$Outcome)            fsd$Outcome fsd$appyear    0    1    2        1999 1207  123  418        2000 1833  246  510        2001 1805  294  553        2002 1167  177  598        2003 4070  158 1076        2004 2803  106 1138        2005 3749  513 2141        2006 4429  519 2028        2007 6134  670 1947        2008 7446  662 1994        2009 4411   86 1118


I removed Python 3 from my computer now I don't have a desktop (posting this from work PC). I can only access the terminal via Ctrl+Alt+F1. I've tried just about everything I've seen on the forums, but   sudo apt-get update   results in a lot of:  W: Failed to fetch http://repo.org/dists/.... Could not resolve repo.org   I'm worried about losing some critical work, so I tried to push one of my Git repos to my Github account via the terminal and I get:  Could not resolve Github.com   Even  ping google.com   returns the Could not resolve error. So, first, how can save my files somehow? Either by pushing them to the Github repo or transferring them to another PC?


Is there an easier way(pythonic) to write the following code?

sigma_n = np.array([0.01, 0.1])  ls = np.array([0.1, 0.2])  for sigma_ni in sigma_n:     for ls_i in ls:         print("{},{}".format(sigma_ni, ls_i))  I was hoping to find out if there is any way I could print out the above in a pythonic way instead of 2 loops.


Where is Open in browser button in iOS app?

Open in browser button has been disappeared for any posts:        Also I noticed that "Share" button now looks like "Open in browser" for old versions:         App Version: 1.6.6 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.3.1 (Build 14E304)


Looking for a short story about the icy end of the world

More than a decade ago, I read a short story about a small group of people at the end of the world. The story was premised on some sort of mass-produced device which took ambient heat and turned it into power. The devices had been overused, and now the world was freezing.   I think the people were essentially bandits; the main character may have been a woman who lured men to her house and killed them for their body heat? There was also a strong implication that one person she had done this to was an alien who had come to warn that the devices were destroying the world.  I think the story was in a hardbound collection, and I think the collection was from the late 70's or very early 80's.  (Calling it a "short story" is just meant to distinguish it from a full novel — it may have actually been a novella or similar.)


A PCI Express 3.0 Video Card into a PCI-E 1.0 x16 slot

Perhaps I'm trying to push my mobo too hard, but I think I have read that PCI-e 3.0 is back compatible to previous PCI-e specifications. But 3.0 into a 1.0, is it possibly asking too much?  I'm thinking about buying an AMD . My mobo is an Asus p5g41-m le


Why are the tops of mountains covered with snow, but not at the bottom? There is always snow even on high peaks in very hot areas. It has to be very cold at the top of the mountaintop so that the snow doesn't melt. But why are they so cold?


Is it expected that when I test if a null value is not in a list, the result is always false.  That is:    select 'Hello world' where null not in(1,2,3);   Don't select anything, because null not in(1,2,3) is false.   I don't understand this, because the list(1,2,3) don't contain any undefined values(null) so I would expect the null not in(1,2,3) to be true. So why is it false?


Is it possible to obtain AES-128 key from a known ciphertext-plaintext-iv tuple used the encrypt the plaintext?

i have a file, which was encrypted with AES-128 in CBC mode. I know the content of original file and know the iv used to encrypt that file.So, just wondering if it's possible to recover the key used from the information provided.


paging problem with a 2\columnwith image on a three-column text

i'm having an paging problem including a two-column large image inside a three-column text page. I tried with the code:    \documentclass[]{book}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \graphicspath{{./Immagini/}}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{geometry}     \geometry{a4paper,top=2cm,bottom=2cm,left=1.5cm,right=1.5cm}     \usepackage{multicol}     \addtolength{\columnsep}{1.5mm}     \usepackage{blindtext}     \pagestyle{empty}     \begin{document}     \begin{multicols}{3}     \blindtext[2]     \makebox[2\columnwidth][c]{\includegraphics[width=2\columnwidth, keepaspectratio]{rect3050}}     \blindtext[2]     \end{multicols}     \end{document}   Of corse the result is not what I want:    Of course I could choose the text to put in the third column using a code like:  \documentclass[]{book} \usepackage[T1]{fontenc} \usepackage{graphicx} \graphicspath{{./Immagini/}} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{geometry} \geometry{a4paper,top=2cm,bottom=2cm,left=1.5cm,right=1.5cm}%     margini \usepackage{multicol} \addtolength{\columnsep}{1.5mm}%     spazio tra le colonne \usepackage{blindtext} \pagestyle{empty} \begin{document} \begin{multicols}{3} \blindtext \end{multicols} \begin{multicols}{3} \makebox[2\columnwidth][c]{\includegraphics[width=2\columnwidth, keepaspectratio]{rect3050.png}} \phantom{a} \columnbreak \phantom{a}\\\phantom{a} \columnbreak  \blindtext \end{multicols} \begin{multicols}{3} \blindtext \end{multicols} \end{document}   But the result is still not what I want because the text is not continuous in the three sections that are created.    I also tried with the ambient 'floatfigure' but with no satisfying result because the package is thought for figures smaller than the width of the text in which they appear.    The result that i'd like to obtain is something like this:  Is unnecessary to specify that I want the text to be continuous 1,2,3,4,5...


As a DM, how far should I prepare ahead in a premade campaign?

As a first time DM I found a group to play Storm King's Thunder. I have been reading the first part of the story to prepare. So far I have read up to level 5 till after the flying with the giant to one of the 3 towns, but I am worried that I might miss parts of the story that are important for the players. Like bits of lore or things that the PC's might ask that I do not know.  Should I read further ahead or should this be enough for a while?


If char K=0 , then every irreducible polynomial is separable

The following statement was left as exercise in my Field Theory class.  Consider a field K and f $\in K[x] $ an irreducible polynomial. f is separable in some splitting field of f over K if every root of K is simple root which is equivalent to saying that derivative of f is non-zero.  But how can I prove that every irreducible polynomial is separable if Char K=0 ? I have no idea on how to link derivatives with characherstic? OR if something special is there with field of characterstic 0? Kindly help to prove this result!!


This started happening today for absolutely no reason. Worked perfectly last week. I didn't touch the machine.  I have an issue described  and need to downgrade in order to be able to upgrade. Currently I'm not able to enter the shell as it exits with error #4   need to upgrade database admin with pdfile version 4.22, new version: 4.5  If I run it with --upgrade I get:  ERROR: error: exception cloning object in admin.system.users system.users entry must have either a 'pwd' field or a 'userSource' field, but not both obj:{ _id: "nod$ exception in initAndListen: 2 system.users entry must have either a 'pwd' field or a 'userSource' field, but not both, terminating   I'm trying sudo apt-get install mongodb-10gen=2.2.7but it doesn't work because that version is missing - I dont know if there is any way to install legacy versions?  Can anyone direct me to a command I can use to install version 2.2.7?


How to retrieve a complete directory from a URL

Is there a method on Windows or Linux for downloading all files* within an online directory, specifically:    so I have a local repository I can work on? Any browser or command-line solutions would be fine, and I am willing to download any browser.  *recursively


This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?


How to set object's rotation from python?

I have more than 100 objects and I want them to point in a particular direction depending on their position. To move them to a particular position, I used:      bpy.context.scene.objects[""].location.xyz = ...   Is there similar command for setting the angle of rotation for an object? I am working in a crossroad with two lanes. The position of the cars are taken as input. So according to their coordinates  they are placed on the road, pointing in the direction they need to. The track to constraint is not applying the correct direction to all of them. I checked my if condition. Some of the objects are getting hidden unnecessarily.


How jQuery assign value to 'this' on each function?

I would like to know, how jQuery assign a value to this. I tried as follow, but I am getting an error saying that Uncaught ReferenceError: Invalid left-hand side in assignment.  let each = function(o, callback) {     let keys = Object.keys(o);     for (let i = 0; i < keys.length; i++) {         (function() {             this = o[keys[i]];             callback();         })();     } }   In jQuery  $("p").each(function() {     console.log(this); });


Effective marketing strategies for independent game projects

I would really like to hear how other independents generally approach marketing their game with limited resources. I know how critical marketing is since I've seen it first hand on several fronts. I've been part of teams that didn't put an ounce of marketing into their project and didn't come close to meeting expectations. I've also poured a lot of time into visiting forums to discuss our previous title which resulted in minor bumps over time.  I really think  is doing some amazing grass roots marketing with the way they are managing their community around their Blog. They've massed a following that is willing to pay (far in advance) them for their game before they finish it to help support them. That's awesome.  But how many people are really willing to divulge such information that early? Should that be a concern? Should I start talking about my next project before I really have anything implemented?   What has worked for you? I would be particularly interested to hear how people approach Apple's iTunes store. I believe we're looking at around 33,000 games on the store these days.


JSON Unexpected character ('P' (code 80))

I'm working with JSON and I got this error when the page deserializes it:     Unexpected character ('P' (code 80)): was expecting comma to separate OBJECT entries at [line:1, column:4074]   I write you the steps that I did for pass the information with JSON:   In the class I serialize the information with: json = System.JSON.serialize(lstWrap); Then I store the json in an angularjs variable: $scope.items ={!prf}; After I perform some action on the items I update the variable json with  <apex:pageBlockButtons location="top" >     <apex:commandButton value="Seleziona" action="{!seleziona}" reRender="ric,prova" >         <apex:param name="json" value="{{items}}" assignTo="{!json}"/>     </apex:commandButton> </apex:pageBlockButtons>  Finally I deserialize the json:  List<ProdCheckWrapper> listWrap = (List<ProdCheckWrapper>)System.JSON.deserialize(json,List<ProdCheckWrapper>.class);    I reported the steps because the issue could be in there. The problem in json is in this part:  "descr":" "PEC" (Elaide e AliasLab)"   Instead of, as it is at the start of execution:  "descr":" \"PEC\" (Elaide e AliasLab)"   In fact  says:     Parse error on line 239: ...ronica certificata "PEC" (Elaide e Alias   -----------------------^ Expecting '}', ':', ',', ']   I'll try to replace the " with \" but it looks like if the string is immutable.


Would it help if you jump inside a free falling elevator?

Imagine you're trapped inside a free falling elevator. Would you decrease your impact impulse by jumping during the fall? When?


Is it possible to move my Minecraft saved game from PS4 to XBOX One?

My friend and I are switching from PS4 to Xbox One. We have a Minecraft world saved that we have been working on for over a year and would really like to move it to Xbox One, however it doesn't seem possible. Is it even possible?


Let $F\subset X$ be a closed and connected subset of the metric space $(X,d)$ then for every pair of points $a, b\in F$ and each $\epsilon>0$ there are points $a=z_0,z_1,\ldots z_n=b$ in $F$ such that $d(z_{k-1}-z_k)<\epsilon$ for $1\leq k\leq n$.  Is the hypothesis that $F$ is closed needed?


Possible Duplicate:          I'm working on a website that displays distance to various locations to the nearest 1/10 mile. One of the developers (a non-native speaker) asked me an interesting question: If the distance is 1.0 mile(s), is that singular or plural? Clearly, anything other that 1.0 is plural, but is it:     1.0 miles away   or     1.0 mile away   The first option sounds more correct to my ear, but the voice of my elementary school language arts tells me that the latter option is correct.  Edit: Added the word 'away' to the example. It doesn't change the question, but might provide clarity for the answer. Also, regarding numbers between 0 and 1, after more thought, I'm not sure that the answer is as clear as I originally thought. See .


Allow users with enough reputation on Meta.SO to edit the privileges page

It was  to edit the privileges page for everyone with more than 2k rep on Meta.SO. I think this is a good thing:  Moderators have other things to do. Wrong content can be easily fixed. More involvement of the community.  Downside:  The help center should be the definitive source. (Could be solved with reviews)  So could this please changed again? The actual needed reputation doesn't matter. Some quotes to support my request:  At the high end of this reputation spectrum there is little difference between users with high reputation and ♦ moderators. That is intentional. We don’t run this site. The community does.   Ehhm, yes. We run the site, and we should be able to edit the privileges page.  Moderators are human exception handlers, there to deal with those exceptional conditions that could otherwise disrupt the community.   Editing the privileges pages are not an exception. Again, moderators have other things to do.  Edit As  pointed out, not even mods can now edit the privilege pages "wiki", so adding   An other edit Before I accept an answer () I'd like to hear some reason for this change.  I would just wait for their response. This could be a temporary bug or oversight that wasn't meant to be done, or they could have some specific reasons why they changed it that we're not aware of. –


How to automatically install updates in linux mint 17.1

I have linux mint 17.1 xfce, and I am wondering how to automatically install updates. Every time a new update is available I have to click on the mintUpdate icon on the panel and enter my password and click install. I think it is supposed to be good to install manually so that you can judge whether or not you really want to install the update. But I have never in two years decided that I didn't want to install an update, so I think it would be easier to just have it done automatically in the background.  Now I found a  purporting to explain how to install updates automatically. But I don't think it does a good job of explaining which updates will get installed automatically if you follow their instructions. It gives a configuration file to use that looks like this  // Automatically upgrade packages from these (origin, archive) pairs   Unattended-Upgrade::Allowed-Origins {   "${distro_id} ${distro_codename}-security";   // "${distro_id} ${distro_codename}-updates";   // "${distro_id} ${distro_codename}-proposed";   // "${distro_id} ${distro_codename}-backports";   };    but it doesn't explain how these origins map onto mintUpdate's "levels".  My goal is to install all updates classified as level 1, 2, or 3 by  mintUpdate as well as all security updates. But I don't want to install non-security updates for level 4 or 5. How would I do this?


How are unbalanced forces even possible, given Newton's 3rd law?

The notion of an unbalanced force seems to contradict Newton's third law, entirely.  For instance, apparently, if you push a rock, then an unequal force is being applied in the opposite direction with respects to friction, in your pushing of the rock. To me, this makes complete sense, though then I was taught Newton's third law, which made no sense until I got deeper into the intuition behind that. For instance, the reason why it's hard to push, in particular a heavy rock, is because of this equal and opposite force, otherwise you could push it effortlessly, literally. So, I've gone from my initial intuition being shattered, to internalizing Newton's ideas, and now nothing makes sense anymore, because my initial intuition and my newfound insight is just battling out.


What im trying to do it's to have a non capital E at the end of the scrip:   % arara: pdflatex \documentclass{article} \usepackage{acro} \DeclareAcronym{CNO}{ short = CNO , long = Clasificador Nacional de Ocupaciones } \DeclareAcronym{e0}{ short = \ensuremath{e_0} , long = Esperanza de vida al nacer , sort = e_0 }  \begin{document} \Ac{CNO} foo. Pero si \ac{e0} bar. \end{document}   I want this text Clasificador Nacional de Ocupaciones (CNO) foo. Pero si esperanza de vida al nacer (e0) bar. Without 'Esperanza' with the capital E, just the e....


Let $f:\mathbb{R} \to \mathbb{R}$ be a function that's continuous at the origin. Show that if $$f(x+y)=f(x)+f(y)$$   for all $x, y \in\mathbb{R}$, then $f$ is continuous.   This was a problem on our homework and the TA's suggestion for the solution was the following:  Let's first show that $f(0) = 0$. Since $f(0) =f(0+0) = f(0)+f(0)$  we have that $f(0)=0$.  Now we get  $$\lim_{y\to x} f(y)=\lim_{h\to 0} f(x+h) = \lim_{h\to 0} (f(x) +f(h)) = \lim_{h\to 0} f(x) + \lim_{h\to 0} f(h) = f(x) +0=f(x).$$  I'm not very satisfied with this. There's no explanation for the result at all. Could someone open this up for me?   How can it be for sure that $f(0) =0$? They haven't given us any $f$. For all I know $f$ could be $f(x)= x^{73}+1$ and $f(0) = 1$? Where does he come up with $\lim_{y\to x}f(y)$ and how come this is equal to $\lim_{h\to 0} f(x+h)$? How does he get the result $\lim_{h\to 0} f(x) + \lim_{h\to 0} f(h) = f(x) +0$?


Including a parameter in btn.onclick = function()

I'm calling a function when I press a button. When I use the btn.onclick = function() the button is pressed and the function is completed. If I change the HTML to include onclick=clicked() and the javascript to function clicked(), it does not run.  I've tried both these methods because I want to be able to pass a parameter through the function (as I have lots of buttons and I want to use as little code as possible).  window.onload = function () {   var modal = document.getElementById('myModal');   var btn = document.getElementById("Q11");   var span = document.getElementsByClassName("close")[0];   btn.onclick = function () {     modal.style.display = "block";   }   span.onclick = function (){     modal.style.display ="none";   }   window.onclick = function(event) {     if (event.target==modal) {       modal.style.display="none"     }   } }   How do I get it where I can pass a parameter through the btn.onclick function so that any button can call that function but pass a different parameter through it? Is there an equivalent for onclick="function(a)" but for event handlers/listeners?  Any help is appreciated.


This has nothing to do with cookies or the problem concerning cookies as far as I know.   That being said, after I downloaded the new Pokemon update today (7/31/16) after opening the app, it prompted me to login.   I proceeded to login with my Google account. After I type in my email and password I click "allow" giving Pokemon GO permission to access my email and other things. After I click "allow" I get redirected to the Google homepage. From here, I cannot do anything except hit the "done" button.  After clicking done it prompts me to login. Over and over and over again. This has been going on all day and have not been able to find a solution.


Prove that $(x^n + y^n)$ is divisible by $(x + y)$ if $n$ is odd.   I don’t know how to proceed. Help please.


how to get the real character encoding of a file java

Any idea about gettin the real encoding of a file like .html .txt .java and etc in java?  Since some source codes are not utf-8,I wantto  change them to utf-8.


I have added a WordPress blog to my site, added non-canonical URLs, put it through Bing, and Google Webmaster tools added about 100 + backlinks, and I've not had one any of my Wordpress blog pages ran on SEO search engines at all, bing, yahoo, yahoo.co.jp, google.com and other google search pages including google.fr, all of which I want to be ranked for international traffic. The site is a little old, and I hope I am not recovering after old errors and penalities, because from what I have read it could take up to a year, so that's the reason I've been going the extra mile on it, and I have not added too many pages to it, and have recovered some configuration issues where a lot of pages were going to a bad 404 page... However, I have added WordPress to sites many times and can see a transparent issue, wondering if anyone has any tips to get the WordPress pages ranking up soon. Really never seent his issue before. So tried pretty much everything, the Yoast app says there is some conflict with having two sitemaps, but the problem is that the one for my main hosting from the hosting company, is actually important because it comprises the core sitemap for my HTML pages.... So Is there a way to utilize the 'Toggle' sitemaps function? Should matter though because I have even confirmed the site pages exist with an RSS feed in bing webmaster tools, but it won't even rank in bing when I type in site: followed by the domain dot com.... So this RSS feed is also catching data in webmaster tools however there is still nothing.  Any ideas? Anything would help, I lost a lot of ranking on an old blog I used for my business page, that I shut down as I decided to merge everything into one site and forward some of the links between each other, but now it is ranking much worse, and none of my new WordPress pages are ranking after 30 days. And, my apologies if the StackExchange system saw a duplicate memo, this was because the WordPress thread I followed on the site was actually related to WordPress drops... REALLY need help here, my WordPress ranking is fundamental to my site's traffic. Another concern of mine is that someone might be negative backlinking my old broken blog pages, so I keep adding redirects to supplement the negative SEO, it's really bizarre, but I am only happy to at least be ranking on my brand keywords again... Everything else though for external brand related keywords has been quite sabotaged.. And, to think it all use to come from WordPress, I was getting more than 100 clicks a day related to my blogs...


A trough contains a completely immersed object. On accelerating the container upwards, which direction will the object move to?

While thinking intuitively, it seems quite obvious that the object displaces itself in the downward direction. But, will there be a case where the buoyant force dominates over it's own weight which may cause the ball to rise?  (No information about the densities/masses of any object is given)


How to know which Apple ID is used to lock iPad if the display is dead?

I bought an iPad mini (Wifi only) and gave it to my nephew as a gift.  He switched on the device and set it up with his apple ID. He did not set up (Find My iPad/iPhone) feature.  After a month of usage, he noticed the device is heating up when connected to the charger. Suddenly, the device display is off, and can not be charged.  When connected to a USB port on a mac, or PC, it does not get detected.  I tried to hold Power button+Home Button for 10 seconds then releasing the Home button, but it did not work.  I tried to put the device in Recovery Mode, DFU mode, but nothing worked. The device does not get detected by Windows or Mac.  I toke the device to the service center I bought it from (Not an Apple Store, we don't have Apple Stores in Saudi Arabia).   At the service center, they have a policy not to service any iOS device if it is locked using Find My iPhone feature from iCloud.  I told them that the feature was never turned on. They checked  and entered the serial number, and found out that the device [Activation Lock : ON ]. So they asked me to login to icloud using the apple ID that was used to activate the lock and remove the device from [My Devices] in iCloud.  I logged in to icloud.com using my nephew's apple ID, but could not see the iPad in the list of devices.  I thought maybe the activation lock was done using another apple ID, so I tried mine, my brother's, all of the apple IDs I tried, none of them had this iPad listed among the devices in iCloud.  Now, I can not get service for the device because they think I stole the iPad.  Although I have an invoice that proves the purchase.   I know that revealing the apple ID might be considered a breach of security, but if I could just get the first and last letter of the email of Apple ID used to lock the device, then we can reduce our efforts in this hassle.  My question is: how do I know the apple ID that is used to lock the iPad knowing only the serial number of the device?


To add items from a list in an alternating fashion to two new lists why doesn't this code work? (its says that player_1 is not defined)

def distribute(mylist):     player_1=[]     player_2=[]          a=10          for i in range(0,a):         if i%2==0:             player_1.append(mylist.append(i))         else:             player_2.append(mylist.append(i))  Result mylist=[1,2,3,4,5,6,7,8,9,10] distribute(mylist) player_1   NameError                                 Traceback (most recent call last) <ipython-input-124-1c0f0ed63597> in <module> ----> 1 player_1   NameError: name 'player_1' is not defined


I have to calculate $ \lim_{\left(x,y\right)\to\left(0,0\right)}\frac{\sin\left(x^{3}+y^{3}\right)}{\sin\left(x^{2}+y^{2}\right)} $ From wolfram calculator I know the limit is $ 0 $. The onl way I cant think of proving it is switch to polar, and to show that $ \lim_{r\to0}\frac{\sin\left(r^{3}\left(\cos^{3}\theta+\sin^{3}\theta\right)\right)}{\sin\left(r^{2}\right)} $ is $ 0$. If I'll treat $ \theta $ as a constant and I'll get that the limit is zero, is that mean that from any direction that the function getting closer to zero, the limit is zero? If so, I could show it using l'Hospital's rule and I guess it would be easy, but I'm not sure its legit. Thanks in advance


I need help width the Random r = new Random(); code.  I will give you my code and tell you what I want to do.  Random r = new Random(); int i = r.nextInt(3); System.out.println(i);  //now how do i make it not to take 0 as a random number //One of them is 0, how do i make it take a random int that is //bigger than 0 but lower than 3. I need help there.


If $e^{itx_n}$ converges for every $t\in\mathbb R$, then does $x_n$ converge?

Question : Is the following true for any real number sequence $x_n$ ? "If $e^{itx_n}$ converges for every $t\in\mathbb R$, then $x_n$ converges." Note that $i^2=-1$.  Motivation : We know that the converse of the above proposition is true. However, I'm facing difficulty for the above proposition. Can anyone help?


For some time my computer has been beeping three beeps together, then one and after awhile a long beep. Today ubuntu crashed. Any suggestions on what to do? I don't know if the two probelms are related.


In Avengers: Endgame, we see that Professor Hulk wields the Stark gauntlet and unsnaps the dusted people.    This act is basically at the 5 years in the future mark, so are all the unsnapped people basically 5 years younger than all their peers  For example, Spiderman is part of it, so is Peter Parker now 5 years younger than Ned/classmates, etc?


What is lost when we move from reals to complex numbers?

As I know when you move to "bigger" number systems (such as from complex to quaternions) you lose some properties (e.g. moving from complex to quaternions requires loss of commutativity), but does it hold when you move for example from naturals to integers or from reals to complex and what properties do you lose?


I have Ubuntu 14.04 I need this package   How do I install it?


What norm of the reconstruction error is minimized by the low-rank approximation matrix obtained with PCA?

Given a PCA (or SVD) approximation of matrix $X$ with a matrix $\hat X$, we know that $\hat X$ is the best low-rank approximation of $X$.   Is this according to the  (i.e. the largest eigenvalue norm)  or according to the Frobenius $\parallel \cdot \parallel_F$ norm ?


Why does changing texture change it for both objects?

I have two identical objects in my Unity scene. When I change the texture of one, the texture is changed on the other, almost as though the first one is a prefab. Why is this happening and how can I treat them independently?  Steps taken:   Import .obj file and two .png files Drag object into scene Look at the object in the hierarchy (where the list of all objects in the scene is) It has a child called pSphere1 pSphere1 has a mesh renderer with 2 materials on it - RedGold and pSphere1Mat It also has two components controlling each of these materials In those control components, I can select a shader from the dropdown and I can also select a texture. For either one of them, if I change the texture say to PolkaDots, both objects have their materials changed, instead of only the one I am working on.


commutative diagram for compositions using tikz

so i tried to do this commutative diagram using tikz. However, no success. I tried using google and reading manuals but unfortunately, i either didnt understand the syntax or it didnt fit my needs. i really could use some help. the diagram itself is pretty basic. i would really a ppreciate it if someone could either help me drawing it or point me towards a good tutorial/manual where i can learn from.  this is the diagram i was trying to do:    thank you very much


Prevent parameter expansion in shell script

I often have to do a recursive search in files. Tired of typing the whole "find/grep" combination all the time, I just created a script with the following line:  find . -name $1 -exec grep $2 {} + 2>/dev/null   The idea is that I should be able to run it as, for example:  myfind '*' hello   The problem is, when '*' gets passed into the script, the script is expanding it to each file in the directory.  I tried putting a quote around $1:   find . -name '$1' -exec grep $2 {} + 2>/dev/null   However, this turns $1 into a literal string.  Would appreciate your help in finding the right syntax. Must be something simple that I am missing.


Check CPU usage by tab or by add-on on firefox on mac

My version of Firefox has a runaway process/thread that makes it use 100% cpu on my MacBook Pro (OSX 10.7.4) after a few minutes. I've tried to use about:memory and about:addons-memory to try to figure out what is causing the issue, but it doesn't seem to be related to memory usage at all. Is there instead a way to see CPU usage by tab or add-on?


how to change erase or update text, time or output text

I am building a clock and it works mostly;   The issue with my code is that I cant figure out how to have one constantly changing text instead of a billion texts with only the newly created text with the correct time   could someone please tell me how to change erase and or update this so it will fix my problem pls  import java.util.Date; import java.text.SimpleDateFormat;  public class abugnoisyclockmainclass {     public static void telltime () {        for(;;) {            Date computertime= new Date();            SimpleDateFormat time = new SimpleDateFormat("E M-d-y        h:m:s a ");            System.out.println(time.format(computertime));        }     }      public static void main(String[] args) {         abugnoisyclockmainclass.telltime();     } }


Show $\int _ { 0 } ^ { \infty } \frac { x \sin x } { \left( x ^ { 2 } + 1 \right) ^ { 2 } } dx = \frac { \pi } { 4 e }$ with residue theorem

Problem: Compute $\int _ { 0 } ^ { \infty } \frac { x \sin x } { \left( x ^ { 2 } + 1 \right) ^ { 2 } }  dx = \frac { \pi } { 4 e }$    First we can study $\int_{\Gamma_R}g(z)dz$ where $\Gamma_R$ is the upper half circle of radius $R$ and $g(z)=\frac{z}{(z^2+1)^2}e^{iz}$. The singularity in the upper half circle is $z_0 = i$. If we prove that the integral over the contour is $0$, we could conclude with the following result :  $$\int_{\Gamma_R}g(z)dz=\lim_{R\rightarrow \infty} \int_{-R}^{R}g(x)dx = 2\pi i (Res_{z_0}(g))=(2\pi i)\frac{1}{2e}=\frac{i\pi}{e}$$  And by keeping the imaginary part of the solution, we get that :  $$\int _ { -\infty } ^ { \infty } \frac { x \sin x } { \left( x ^ { 2 } + 1 \right) ^ { 2 } }  dx = \frac { \pi } { e }$$  Unfortunately I can't seem to find a way to compute the integral from $0$ to $\infty$, also I tried to show that the integral over the contour was equal to 0 without much success.


Given function $g$ continuous in line $[0,\infty)$...

Given function $g$ continuous in line $[0,\infty)$, positive and strongly increasing that upholds $\lim_{t\to\infty}  g(t) = L$. Calculate the limit:  $$ \lim_{n\to\infty} \int\limits_1^2 g(nx) \, dx. $$  At the moment what I think that I should do is swap the $g(nx)$ with $L$ as it approaches infinity but from there on I am just not sure whats my next step is.


I am trying to get the image type in the database but the below isn't working. How do I detect if the image is png, jpeg or gif?  if(isset($_POST['submit'])) {     $fileType = $_FILES['image']['type'];     $tmpname = $_FILES['image']['tmp_name'];     $fp = fopen($tmpname,'r');     $data = fread($fp,filesize($tmpname));     $data = addslashes($data);     fclose($fp);      $update = mysql_query("UPDATE avatar SET image1='$data',type='$fileType' WHERE username='$user'",$this->connect); } else {     echo "<form enctype='multipart/form-data' action='http://www.example.com/cp/avatar' method='post'>
Upload

<input type='hidden' name='MAX_FILE_SIZE' value='102400' /><input type='file' size='25' name='image' />

<input type='submit' name='submit' class='button' value='Save Changes' />
         </form>"; }


Does the series $\sum_{n=1}^{\infty} \frac{\sqrt{n+1}-\sqrt{n}}{n}$ converge?

Consider the series $$\sum_{n=1}^{\infty} \frac{\sqrt{n+1}-\sqrt{n}}{n}$$ Does this series converge or diverge?   I tried all the tests like ratio test, Raabe's test, logarithmic test, comparison test but in vain. In ratio test I got the limit as $1$, so can't do anything with that. Can anybody give some hints?  Thank you!


Personally, code fences are cleaner (less whitespace) and are parsed more quickly due to the ability to hint at the language via cpp,lang-none,js, etc. Other than requiring indenting to use code in lists, is there a documented rule preferring one over the other? Note, I am not asking about how to indent or display code in a code fence.


How do I automatically run an application on USB attach or CD insert on Mac OS X?

Is there any way to automatically launch an application on USB attach or CD insert on Mac OS X? it's easy on Windows, but I found that AutoRun.Inf does not work on the Mac at all.


Is there a specific reason why the majority of textbooks say "positive integer" instead of "natural number"?

This question is derived from just curiosity, but is there a specific reason for the situation I stated in the title? I am pretty sure that "positive integer" = {1, 2, 3, 4, ...}, which is just a set of natural number. But the majority of textbooks use the term "positive integer" instead of "natural number" when they explain some definition. (I can't find the proper tag for this post so I'm just using \calculus tag btw)


I have a doubt, I just received the Snaphat hat for a question that was made 2 days ago and I answered two days ago, but until today I have not had more than 3 votes and it has been accepted today.  My question is: should the answer be accepted within 30 minutes of the question being asked? Or is it a bug that has happened to me?


Discrepancy between `anova` and `summary` outputs with `lmer` in the presence of interactions

I have a model in R that looks like this  mdl.CL  <- lmer(Y.CL ~ 1 + TL*PL*GO + (1|SUBJ), data = data.CL)   in which TL has 3 levels, PL 6 levels, and GO 2 levels only.   Now, I'd like to test the effect of GO. However, if I use both anova and summary, I obtain results that I am not sure on how to interpret. In particular, this is the (truncated) output of summary:  > summary(mdl.CL) Linear mixed model fit by REML ['lmerMod'] Formula: Y.CL ~ 1 + TL * PL * GO + (1 | SUBJ)    Data: data.CL  REML criterion at convergence: -1021.4  Scaled residuals:      Min      1Q  Median      3Q     Max  -3.2480 -0.6655  0.1448  0.7411  2.4780   Random effects:  Groups   Name        Variance Std.Dev.  SUBJ     (Intercept) 0.007723 0.08788   Residual             0.050555 0.22485  Number of obs: 9134, groups:  SUBJ, 23  Fixed effects:                 Estimate Std. Error t value (Intercept)     0.620697   0.018724   33.15 TL.L            0.004658   0.005998    0.78 TL.Q            0.021164   0.007135    2.97 PL.L            0.001186   0.010432    0.11 PL.Q           -0.027180   0.009702   -2.80 PL.C            0.010089   0.009453    1.07 PL^4           -0.001677   0.008922   -0.19 PL^5           -0.007471   0.007921   -0.94 GO.L            0.011405   0.005588    2.04 ...   while this is the output of anova:  > anova(mdl.CL) Analysis of Variance Table          Df  Sum Sq  Mean Sq F value TL        2 0.05962 0.029810  0.5896 PL        5 1.33398 0.266796  5.2773 GO        1 0.00210 0.002104  0.0416 ...   As you can see, the t value from summary is 2.04 and the F value from anova is 0.0416. Now, since GO has two levels only, I'd expect the t and the F values to be closely related, but this is not the case (at least, I could not find any obvious mapping between t and F, also with other models).   Does anybody know why?


Which of these sentences is correct?     Rupees are interchangeable with dollars   or      Rupees is interchangeable with dollars.


I have a question about botulism when canning pickles. I realize that most canning recipes use 1:1 vinigar to water ratio for canning pickles. I accidently used 1:4 vinigar to water ratio for canning pickles. Now i am wondering if I will get botulism and if so can i re-use the jars or do i have to throw the jars out? if i can re use the jars then what is the best way to clean and steralize them?


In a set of 10 billion possible items, if I have X items what is the probability of two being the same?

If I have a device that displays a random number from 1 to 10 billion and I use that device X times, what is the probability that not all of the numbers displayed are unique?


Why is apt-get always using proxy, although no proxy is configured?

I'm trying to disable the proxy for apt-get but it seems like apt-get gets it's proxy configuration from somewhere else other than /etc/apt/apt.conf, because although the apt.conf file is empty (and the system proxy set to None) it's still trying to connect to the proxy.  Anyone got an idea?


How does sensor size affect the brightness of an image given the same field of view and aperture?

Lets say we have two image sensors, each one with 1MPixel resolution but differing in size. The first sensor has the size 1/3", the other one 1".  Each sensor is equipped with a suitable lens (for the image sensor format, so no vignetting or cropping takes place). Both lenses have the same characteristics: F-stop f/2.0 and Ultrawide view angle circa 100°. Both sensors are running at 100fps, so that the image shown by the 1/3"-sensor is rather dark at normal illumination in a house.   Now how much does the image shown by the 1"-sensor differ (at the same illumination) in terms of brightness? I'd guess that the 1"-image would be much brighter because of the greater entrance pupil, is that correct, and if yes, how can I calculate which f-stop the bigger lens (which sits on the 1"-sensor) need to have to resemble the image brightness of the small sensor?


So I am asked to fit a logit model using the method of least squares in connection to logistic regression. Let $\pi(x)=\mathrm{P}(Y=1|X=x)$ be the probability of success of a binary response variable $Y$ for a given $x$. Then it is established from the differential equation $d(\pi(x))=\beta\,\pi(x)(1-\pi(x))dx$ that the logistic curve is of the form $\pi(x)=\dfrac{e^{\alpha+\beta x}}{1+e^{\alpha+\beta x}}$.   It is also seen while solving the above differential equation that it is the logit $\ln \left(\frac{\pi(x)}{1-\pi(x)}\right)=\alpha+\beta x$ which is actually linear. So could I use the conventional least square method for this function and obtain the least square estimates $\hat{\alpha},\hat{\beta}$ to substitute for $\alpha,\beta$ in the fitted curve $\hat{\pi(x)}$? Is this what I am supposed to do? Or is there a different principle to be followed for fitting the logit model, something like the weighted least squares?


For which object is time dilation, actually (absolutely) happening?

So, am I supposed to accept the fact the time dilation may not just be a relative effect, as in: it's just as an illusion, but rather, the time that is elapsing for me is actually $\gamma$ times the time, what is elapsing for the other moving person?  If so, won't he feel the same(Since, I will be moving at a speed of $-u$ relative to him)? As in, won't even he feel that he's experiencing time $\gamma t_0$ to be elapsing, and feel that only $t_0$ seconds elapses for me?  So what is 'actually' happening? Because either of them feels that time is running faster for them, compared(aka, relative?) to the other person