RSA Signature Forgery - Low Public Exponent + Improper Padding Validation?

Consider the following custom crypto:   We have a signed message M1 with corresponding signature S. We have the 1024-bit modulus N and their small public exponent e (with an exact value of 3). The message M1 is too large to sign directly, so instead they sign the SHA1 hash (160 bits) of the message.  The SHA1 hash forms the least significant bits and the remaining 864 bits (i.e. 1024-160) are zeroes.   So far, so good. However, the signature verification is flawed:   To verify the signature, we calculate S^e mod N. We don't verify all of the padding is zeroes.  Instead, we XOR the 160 lowest and 160 highest bits, then compare that result with SHA1(M1).  If the results match, we trust the signature.   The XOR is so that if any of the high 160 bits are non-zero, the XOR would damage the results of the low 160 bits (the SHA1 hash).  Question: given this flawed signature verification, how would you go about forging a signature for a different message, M2?  If they key used a slightly larger public exponent, say 17, would the forgery be much harder?    Here's what I've come up with so far:  We don't need the forged signature to be perfect.  The obvious goal is to create a signature that, after exponentiation, results in (from most to least significant bits): [- 160 zero bits -] [---- 704 arbitrary bits ----] [- correct 160-bit hash -]  In practice, this means the forged signature needs to be:   Somewhat small, so after exponentiation, the high 160 bits are all zero.  (i.e. S^e mod M < 2^864) After exponentiation, it only needs to end with the correct 160 bits.  (i.e. S^e mod M mod 2^160 = SHA1(M2))   As the attacker, we can append random bytes to M2 to generate different hashes, but we cannot predict the resulting SHA1 hash.  This gives us the ability to create SHA1 hashes with desirable properties, although I'm not sure what properties would be helpful.  (Factors into small primes?)  In a perfect world, we would simply keep trying new messages until we generate a hash that has an integer 3rd or 17th root, but this seems extremely unlikely. Instead, I was thinking of taking the hash and prepending up to 704 bits so the resulting number does have a 3rd or 17th root. This seems like a good candidate technique given that the ratio of fixed bits (160) is small in comparison to the number of free bits (704). Unfortunately, I'm not sure how to construct such a number and brute force is too slow for a 2^704 search space.


Is it possible to clone a running VBox machine?   I need this because I can't turn off the machine during its purpose so I was wondering if something like that is possible?   I tried by cloning the snapshot but that option is not available while the VBox machine is running.  Im using Windows7 and the machine im trying to clone Linux machine.


Finding World War 1 military record for Hauptmann Karl Stephan

Although my question doesn't concern my own genealogy I hope I can get some help or advice at this site.  I do a lot of research in Dutch archives especially on interned German soldiers and deserters and found a Hauptmann Karl Stephan who was wounded during the attack of his unit on Fort Pontisse near Liège. The Dutch Red Cross brought him to Holland where he eventually ended up in enternment .   His regiment was the Grossherzoglich Füselier Regimt Nr. 90 Kaiser Wilhelm.  I would like to find out more about him. Maybe a picture of him in uniform  and or military record.  But I have no experience in searching German record..


What can we say about the inner product $\langle f(t),f'(t) \rangle$?

Suppose we have vector-valued function $f : \mathbb{R} \to \mathbb{R}^n$ and $|f(t)|=1$ for all $t \in \mathbb{R}$.     What can we say about the inner product $\langle f(t), f'(t) \rangle$?   Since image of $f$ is a vector ($n$-tuple). Then $|f(t)|=1$ implies we are looking at all those points in $\mathbb{R}^n$ whose distance from $(0,\dots,0)$ is $1$. In other words, we are looking the point on the surface of unit sphere.  But, how this idea help in computing the inner product?  The notes I am reading says that answer is zero but I can not figure out how? I would be thankful if somebody can provide a little hint.


Prevent shutting down iPhone when passcode lock is on

If my iPhone is stolen and the thief shut the phone down, I wouldn't be able to locate it anymore.  Is it possible to disable the possibility to shut down the phone when a passcode lock is set up?


i have the following tag in html i do not want the $ to be taken as i just want the price for calculations purpose.  $101.82   in the above span tag i want to take only 101.82 value for calculations .  I am using the html() to get the value  var csqft_price = $('#testspan').html(); var price= parseFloat(csqft_price);   but i am getting it with $ so i am unable to do calculation how can i do it.


How to ensure hashCode() is consistent with equals()?

When overriding the equals() function of java.lang.Object, the javadocs suggest that,      it is generally necessary to override the hashCode  method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.   The hashCode() method must return a unique integer for each object (this is easy to do when comparing objects based on memory location, simply return the unique integer address of the object)  How should a hashCode() method be overriden so that it returns a unique integer for each object based only on that object's properities?   public class People{    public String name;    public int age;     public int hashCode(){       // How to get a unique integer based on name and age?    } } /*******************************/ public class App{    public static void main( String args[] ){        People mike = new People();        People melissa = new People();        mike.name = "mike";        mike.age = 23;        melissa.name = "melissa";        melissa.age = 24;        System.out.println( mike.hasCode() );  // output?        System.out.println( melissa.hashCode(); // output?    } }


How can i make the last OS used the first to boot in dual windows and ubuntu OS bootloader

I installed Ubuntu 18.10 and windows 10 as dual OS but whenever i restart from one of the OS i will be given an option to choose the operating system to boot or Ubuntu boot automatically after some seconds. I will love to make the last OS used to boot automatically how can i do this?


I need fix wrong wrapped url. I tried a lot of examples but not helped me. Thanks.    \documentclass [ing,male,java,dept460]{diploma} \usepackage [czech]{babel}  \begin{document}  \begin{thebibliography}{99}  \bibitem{radius} s Odmítl prodat Googlu svůj nápad za tři čtvrtě miliardy. Teď na něm  sám vydělává.  \textit {First Class: Svět a myšlení úspěšných} [online]. 20.3.2014 [cit. 2015-01-   12]. Dostupné z: \url {http://www.firstclass.cz/2014/03/odmitl-prodat-googlu-svuj-napad-za-tri-ctvrte-miliardy-ted-na-nem-sam-vydelava/#sthash.JkwV1KGY.nzfkNxcQ.dpbs}  \end{thebibliography} \end{document}   here is my template:


Ubuntu Wubi install is freezing / stalling / hanging on iso download

I have downloaded the 12.04 located wubi.exe and the 14.04.1 located wubi.exe. I am getting the same behavior from both. Once you start either exe they give you a dialog and then after OK begin downloading an iso file. This works for a while, and then stalls / hangs / freezes. The progress bar remains the same and the "Approximate time remaining" remains the same. However, the installer is still alive. It will repond with an "are you sure?" type message if you click on [Cancel].   One question - is anyone else getting this behavior?  Second question - can I do a Wubi install with a manual download of the big file that is required and which Wubi seems to hang on?   Edit: Got a great answer to the question from Eliah Kagan below. However, it appears that a bug in the software/file formats since Ubuntu 12.10 prevent the use of this technique as the software incorrectly processes the MD5 checksums. See this bug:


Updating a field on the lookup object using a trigger?

I have a lookup to a custom object called Project on my Opportunity object. I am trying to write a trigger that updates an Active, Awarded, and Title on the Project object whenever the Active, Awarded, or Title field is updated on Opportunity based some on more logic that isn't in my code below. This is my first trigger and needing a little help due to a NullPointerException where I try to set Project__r.Active__c = true. Any thoughts?      trigger ProjectFieldsTrigger on Opportunity (before insert, before update) {       //List<Opportunity> opp = [SELECT Name, Active__c, Funded__c, Title__c, Project__r.Name, Project__r.Active__c, Project__r.Awarded__c      //  FROM Opportunity WHERE Id IN :Trigger.New];      for(Opportunity o: Trigger.New){          if(o.Project__c != null){              if(o.Active__c == 'Y'){                 o.Project__r.Active__c = true;             }      }  }


I am proposing that there be a new type of badge: Sapphire. The description could read something like this  Sapphire badges are for the insanely dedicated users of the Stack Exchange. These are near impossible to receive.  You would know that if you saw one of these on a person's profile, they mean business. This would also give those users that seem to have every badge a new chance to prove themselves.  Here is a possible list of badges. Under the "New" category, I put down badges that aren't similar to any previous badges Question Badges  Need a Name - Question favorited by 300 users Remarkable Question - Question score of 300 or more Rock Star Question - Asked a question with 30,000 views  New  Confused - Be on the top 10 question list of a tag for 1 year   Answer Badges  Remarkable Answer - Answer score of 300 or more Merry go Round - Provided answer of +30 score to a question of -7 score Underdog - Zero score accepted answers: more than 50 and 50% of total  New  Clean Sweep - 90% Accepted Answer ratio for a month, with at least 50 Answers Know it all - Be on the top 10 answer list of a tag for 1 year   Tag Badges  Sapphire Badge Total score of 3000 in at least 400 non-community wiki answers.   Moderation Badges  Bailiff - Completed at least 3,000 review tasks. This badge is awarded once per review type Master - Raised 1000 helpful flags Clean Freak - 12,000 edits (number so high to accommodate for tiny 1 letter changes) Constituent - Voted on 1800 posts and 25% or more of total votes are on questions   Other  Need a Name - Shared a link to a question that was visited by 3000 unique IP addresses Dedicated - Gained 200 rep on 300 days  New  Supernatural - Gained 300 rep on one day Ungodly - Gained 300 rep on 10 days Hacker - Responsibly disclosed a security flaw in Stack Exchange Lawmaker - Had been a moderator  Note 1: The badge names are just an example, along with the requirements. I just wrote it up quick to give an example. Note 2: There is no correlation to the number 3. It is just a random number.  It has been brought up that  is quite similar. However it is  Quite old A discussion question Not specific  However these reasons alone aren't enough to prevent duplicate closing. This question was referring to rewarding people with new badges for something they don't really have control over, such as views and upvotes. Many of these new badges require a lot of work from the person hoping to achieve them.  It has been brought up that these requirements would be near impossible for all sites besides stack overflow. These aren't supposed to be too easy. Even though there is the joy of knowing you helped someone, it also adds to your reliability as an answerer. A solution would be to make them harder to obtain on Stack Overflow, because the community is so big. None of the sites will ever be as big as SO, so I think that is a valid solution.


Why are my correct passwords taking less time to be checked than my wrong ones?

I have a Dell Inspiron 13 5378 and I have now been using Ubuntu for roughly a month.  I use the terminal a lot and my password is fairly long (28 characters).  What I have noticed is that when I enter my password into the terminal and I mess up and I know I messed up, the terminal takes longer to process the password than if it was typed incorrectly.  At first, I thought that the kernel stored my passwords in memory and this was a major security issue but then I noticed this also happens when I have just opened it up and I need to sign in so that can't be it, right?  Why does this happen and is this a security issue?


Why does a basis of a vector space need to have the same number of vectors as the vector space dimension?

As an example, in $\mathbb{R^3}$, the canonical basis is:\begin{align}     B &= \left(\begin{bmatrix}            1 \\            0 \\            0          \end{bmatrix},\begin{bmatrix}            0 \\            1 \\            0          \end{bmatrix}, \begin{bmatrix}            0 \\            0 \\            1          \end{bmatrix}\right)   \end{align}   So it is a set of 3 vectors.  There are also different bases in $\mathbb{R^3}$ but they always are sets of 3 vectors. I am wondering why couldn't just \begin{align}     A &= \begin{bmatrix}            1 \\            1 \\            1          \end{bmatrix}   \end{align}   be considered a basis? Couldn't vector A, multiplied with any scalar reproduce the whole vector space $\mathbb{R^3}$?


What is 6/2(3), 1 or 9? According to PEMDAS M > D so it should be 1!

Pretty much what question says. 6÷2x3 = 1 or 6÷2x3 = 9  Given PEMDAS, I'd bet 2x3 = 6, 6÷6 = 1. otherwise person would have put parenthesis.  But google and wolframalpha say 9


Here is my problem.  I have lost my Win10 password and in search of solutions plugged in the hard drive with the Windows10 into another machine with another OS.  However, I discovered that I am unable to change system files, even as an administrator or root. There are writable files on the disk, so I think it is some feature of NTFS file system. Also, unwritable files are readable, so they aren't encrypted. But shouldn't another OS have the whole disk writable? How is this possible and how to remove the write protection? I have tried editing files in Windows\System32\ on WinXP, Win7 and Linux. Thank you for the answer.


I'm trying to use the HTTP Callout methods provided in Apex to  1. Get a token from Marketo 2. Use this token to create three leads in Marketo using the REST API  However, it doesn't seem to be working. I have never coded something like this before, so I expect that I probably made some very embarrassing and obvious mistakes, but I've been able to find very little documentation on this, so I'm starting from basically scratch and the REST API documentation. Anyways, here's the two classes I've been using to attempt to do this:  Class 1:  global class MakeCallouts {       static String testCallout() {          HttpResponse res = CalloutClass.getInfoFromExternalService();         String contentType = res.getHeader('Content-Type');         System.assert(contentType == 'application/json');         System.assertEquals(200, res.getStatusCode());      //getting the accesstoken       String getToken;     String answer = res.getBody();     System.debug(answer);  JSONParser parser = JSON.createParser(answer); while (parser.nextToken() != null) {     if ((parser.getCurrentToken() == JSONToken.FIELD_NAME)){         String fieldName = parser.getText();         parser.nextToken();         if(fieldName == 'access_token') {            getToken = parser.getText();               }  } } System.debug(getToken);           HttpResponse res2 = CalloutClass.getInfoFromExternalService2(getToken);           String contentType2 = res2.getHeader('Content-Type');         System.assert(contentType2 == 'application/json');         System.assertEquals(200, res2.getStatusCode());          System.debug(res2.getBody());         return res2.getBody();     } }   Class 2:  public class CalloutClass {  public static HttpResponse getInfoFromExternalService () {     // Instantiate a new http object     Http h = new Http();       // Instantiate a new HTTP request, specify the method (GET) as well as the endpoint     HttpRequest req = new HttpRequest();     req.setEndpoint('https://XXX-rlu-923.mktorest.com/identity/oauth/token?grant_type=client_credentials&client_id=XXXX&client_secret=XXXX');     req.setMethod('GET');      // Send the request, and return a response     HttpResponse res = h.send(req);     return res;  }   public static HttpResponse getInfoFromExternalService2 (String getToken) {     // Instantiate a new http object     Http h2 = new Http();       // Instantiate a new HTTP request, specify the method (POST) as well as the endpoint     HttpRequest req2 = new HttpRequest();     req2.setHeader('Content-Type','application/json');      req2.setMethod('POST');     req2.setEndpoint('https://XXXX.mktorest.com/rest/v1/leads.json?access_token='+getToken);     req2.setBody('{"action":"createOnly","input":[{"email":"kjashaedd-1@klooblept.com","firstName":"Kataldar-1","postalCode":"04828"},{"email":"kjashaedd-2@klooblept.com","firstName":"Kataldar-2","postalCode":"04828"},{"email":"kjashaedd-3@klooblept.com","firstName":"Kataldar-3","postalCode":"04828"}]}}');      // Send the request, and return a response     HttpResponse res2 = h2.send(req2);     return res2;  }    }   The MakeCallouts class is triggered when a Lead is created (this is entirely for testing purposes. I'm going to change the API call after I get this to work. But it's pretty obvious that the call is working when I see three new leads appear in my database, so it's a good test).


Recommendation for Problems/Exercises Analysis Book/Notes

While I mean ''Analysis'', it means Baby Rudin's top 8 chapter.


Why is Windows 7 not following all routes?


Is accessing a variable in C# an atomic operation?

I've been raised to believe that if multiple threads can access a variable, then all reads from and writes to that variable must be protected by synchronization code, such as a "lock" statement, because the processor might switch to another thread halfway through a write.  However, I was looking through System.Web.Security.Membership using Reflector and found code like this:  public static class Membership {     private static bool s_Initialized = false;     private static object s_lock = new object();     private static MembershipProvider s_Provider;      public static MembershipProvider Provider     {         get         {             Initialize();             return s_Provider;         }     }      private static void Initialize()     {         if (s_Initialized)             return;          lock(s_lock)         {             if (s_Initialized)                 return;              // Perform initialization...             s_Initialized = true;         }     } }   Why is the s_Initialized field read outside of the lock? Couldn't another thread be trying to write to it at the same time? Are reads and writes of variables atomic?


VLC was working fine until I upgraded to 15.04. When I try to install via Software Centre, I get this error message:  The following packages have unmet dependencies:   vlc: Depends: vlc-nox (= 2.2.0-1) but 2.2.0+ppa2.4 is to be installed  Depends: libavcodec-extra-56 (>= 6:11.2) but 6:11.2-1 is to be installed  Depends: libavutil54 (>= 6:11~beta1) but 6:11.2-1 is to be installed  Depends: libc6 (>= 2.16) but 2.21-0ubuntu4 is to be installed  Depends: libegl1-x11 but it is a virtual package  Depends: libfreetype6 (>= 2.2.1) but 2.5.2-2ubuntu3 is to be installed  Depends: libgcc1 (>= 1:4.1.1) but 1:5.1~rc1-0ubuntu1 is to be installed  Depends: libgles1 but it is a virtual package  Depends: libgles2 but it is a virtual package  Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6 is to be installed  Depends: libqtgui4 (>= 4:4.8.0) but 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6 is to be installed  Depends: libstdc++6 (>= 4.9) but 4.9.2-10ubuntu13 is to be installed  Depends: zlib1g (>= 1:1.2.3.3) but 1:1.2.8.dfsg-2ubuntu1 is to be installed   And via Terminal:  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 resolve the situation:  The following packages have unmet dependencies:  vlc : Depends: vlc-nox (= 2.2.0-1) but 2.2.0+ppa2.4 is to be installed        Recommends: vlc-plugin-notify (= 2.2.0-1) but it is not going to be installed        Recommends: vlc-plugin-samba (= 2.2.0-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   When I do dpkg --get-selections | grep hold it appears that no packages are being held  When I do dpkg --get-selections | grep vlc it shows this:  libvlc5                     install libvlccore8                 install vlc-data                    install vlc-nox                     install   Also when I try to remove it via Terminal it says it is not installed and therefore cannot be removed. I have also tried the daily release videolan ppa with the same unfortunate results. How can I get my good old VLC back? Thanks for your help!


I understand that they force you to implement methods and such but what I cant understand is why you would want to use them. Can anybody give me a good example or explanation on why I would want to implement this.


A minor detail: "super user" misaligned in off-topic close vote window

See this:    I believe this is similar to


How do I get a relative path from one path to another in C#

I'm hoping there is a built in .NET method to do this, but I'm not finding it.  I have two paths that I know to be on the same root drive, I want to be able to get a relative path from one to the other.  string path1 = @"c:\dir1\dir2\"; string path2 = @"c:\dir1\dir3\file1.txt"; string relPath = MysteryFunctionThatShouldExist(path1, path2);  // relPath == "..\dir3\file1.txt"   Does this function exist?  If not what would be the best way to implement it?


What functions are in $C_0(\Omega)$ that are not in $C_c(\Omega)$?

I use $C_0(\Omega)$ and $C_c(\Omega)$ pretty much interchangeably but I'm trying to be more precise now so I'd like to know what is the difference between these spaces?  $C_0$ is commonly referred to as the set of all continuous functions on $\Omega \in \mathbb{R}^n$ that vanish at infinity (or on the boundary).  $C_c(\Omega)$ is the space of all continuous functions on $\Omega$ with compact support.  It holds that $C_c(\Omega) \subset C_0(\Omega)$. So what functions are in $C_0(\Omega)$ that are not in $C_c(\Omega)$?


How to plot the first n rows of a table using pgfplots?

When using pgfplots, is there a way to plot only the first n rows of a given table ?  Considering the following MWE file:  \documentclass[tikz]{standalone}  \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{amsmath}  \begin{document}      \begin{tikzpicture}         \begin{axis}[%             width=16cm,height=8cm,             view={-45}{65},             scale only axis,             xmin=200,xmax=500,             xlabel={data1},             ymin=0,ymax=100,             ylabel={data2},             zmin=0,zmax=1,             zlabel={data3},         ]         \addplot3 [             thick,smooth,             color= darkgray,             solid]             table[row sep=crcr] {                 250 0 0\\                 250 25 0.2\\                 250 50 0.3\\                 250 75 0.2\\                 250 100 0\\             };          \addplot3 [             thick,smooth,             color= darkgray,             solid]             table[row sep=crcr] {                 450 0 0.5\\                 450 25 0.1\\                 450 50 0\\                 450 75 0.1\\                 450 100 0.5\\             };         \end{axis}     \end{tikzpicture}% \end{document}   How can I plot only the first n=4 rows of each table and ask pgfplots to stop reading the table once this row is reached ?  Of course, for the above example, this seems useless, but when huge data tables are used, this could be extremely usefull, in particular to use the same data and focus on different parts of the table in different figures.


My visible Disk Usage minus free space is out by 123GB.   Clarification: Externally booted disk repair show no errors. Permissions have been fixed. Time Machine has had local off with:     sudo tmutil disablelocal  UPDATE: Free space seems to be rapidly jumping around. 40GB then 10, then 5 then 30GB, minute to minute. Directory listings are consistent, only the hidden space varies to correlate with the free space. DriveDX shows drive is healthy. Note in DaisyDisk reads: "Unfortunately Daisy Disk is unable to locate these data. They are not available to users." as per attached image. In the time it's taken me to write this revision, free space started at 5GB, jump to 40, and is presently 18GB.  Using   root# du -x -sk /*   The results add up to about 325GB of my 500GB SSD, yet OS shows only ~40GB available.  Disk Inventory X show this missing space as: "Space occupied by other files and folders" 123.1GB) and reports it separately from the free space...  At one point I moved a 60GB folder off the system (to get running again) and after a restart only had 30GB free.  I can't even tell if it's swap space (though that should be in /private/var/vm) or Time Machine snapshots (but they're supposed to be in /.MobileBackups)  Daisy Disk reports the space as hidden, that's not helping me so far.  OS X 10.10.3, SSD 500.


What was Draco's motive that he summoned a snake in the duel?

I mean, there's many other spells he could've cast, but why choose to launch a snake of all things?


My friend and I had a huge debate about whether the trajectory of a projectile thrown upwards will be affected by the rotation of the earth. We finally concluded after detailed explanations that it should be independent of whether earth is rotating or not. I can't "explain" the reason here (its basically related to the fact that the centripetal force due to gravity would act on it even if it is projected).    This question can be simplified to:       Whether a ball thrown upwards will come back to the same position if we consider the effect of rotation of the earth?     We feel it should reach the same point but then the term Coriolis force struck our minds and we got confused...Can someone clear our confusion?  Edit My explanation: When the ball is on the ground, it rotates with the earth due to the centripetal force experienced due to gravity. Similarly, when the object is in air the only difference is that it has lost contact with the earth's surface. It already has a tangential velocity as it was projected from the ground and a centripetal acceleration towards the center of the earth. Therefore, it should still rotate around the axis of the earth as it was earlier (when it was on the ground).     I now know that this doesn't happen from some posts on SE but am not clear with why this explanation is false.


For any chapter I added with \addcontentsline there is an incorrect page numbering in the table of contents. Is there someone who may help me solve this problem? The other chapters seem to be right...  \documentclass[a4paper, fontsize=11pt, open = any]{scrbook} \usepackage{geometry} \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=25mm, footskip=10mm}  \addtokomafont{disposition}{\rmfamily}   \usepackage[ngerman]{babel}   \usepackage[T1]{fontenc}          \usepackage[latin1]{inputenc}     \usepackage[onehalfspacing]{setspace}   \usepackage{acronym}      \usepackage{anyfontsize}   \renewcommand{\chaptermark}[1]{\markboth{#1}{}}  \begin{document}  \tableofcontents \addcontentsline{toc}{chapter}{Abbildungsverzeichnis} \listoffigures\vfill \addcontentsline{toc}{chapter}{Tabellenverzeichnis} \listoftables\vfill  \chapter{test} \chapter{test}  \addcontentsline{toc}{chapter}{Literaturverzeichnis}  \end{document}


Is the following sentence grammatically correct in regards subject-verb agreement?     One of the main facets of the soul is the feelings humans treasure   above all: love and compassion.   The sentence seems to retain its meaning when flipped around, revealing that "the feelings" might be the true subject, and indicating that the verb form "is" could be incorrect. For example:     The feelings humans treasure above all -- love and compassion -- are one of the main facets of the soul.


Remove concrete object dependency from based class

I have inherited code that I need to extend and add some functionality to it.   I have a base class that stores list of concrete objects "OrderA":  private List<OrderA> _orders;   I want to replace the concrete object implementation with generic one.  So right now I have:  /// <summary> /// This is DataContract that received via a web service /// </summary> public class Order {     public string Prop1 { get; set; }     public string Prop2 { get; set; } }  public class OrderA : Order {     public string Prop3 { get; set; } }  // Base class public class WorksheetBase {     // Uses concrete OrderA object     private List<OrderA> _orders;      public void CreateWorksheet()     {         _orders = new List<OrderA>();          for (int i = 0; i < 5; i++)         {             var o = new OrderA();             o.Prop1 = string.Format("Value {0}", i);             _orders.Add(o);         }     }      public void SaveWorksheets()     {         if (_orders == null)             return;          foreach (var order in _orders)         {             Console.WriteLine(order.Prop1);         }     } }  public class WorksheetA : WorksheetBase {     OrderA[] _activeOrders;      public string Name { get; set; } }  public class WorksheetB : WorksheetBase {     OrderA[] _activeOrders;      public string Name { get; set; } }  class Program {     public static Dictionary<string, WorksheetBase> dic = new Dictionary<string, WorksheetBase>();      static void Main(string[] args)     {         WorksheetA fz = new WorksheetA();         fz.Name = "Work Sheet A";         fz.CreateWorksheet();         dic[fz.Name] = fz;          WorksheetB fwd = new WorksheetB();         fwd.Name = "Work Sheet B";         fwd.CreateWorksheet();         dic[fwd.Name] = fwd;          SaveWorksheets();          Console.ReadKey();     }      private static void SaveWorksheets()     {         foreach (var item in dic)         {             item.Value.SaveWorksheets();         }     } }   Now I need to add a new feature for (WorksheetC)   public class OrderC : Order {     public string Prop4 { get; set; } }  public class WorksheetC : WorksheetBase {     OrderC[] _activeOrders;      public string Name { get; set; } }   I feel like implementing the generic type parameter  would be the right way to go for this scenario.  public class WorksheetBase<T> {     private List<T> _orders;      public void CreateWorksheet()     {         _orders = new List<T>();          for (int i = 0; i < 5; i++)         {             ....         }     }      public void SaveWorksheets()     {         if (_orders == null)             return;          foreach (var order in _orders)         {             Console.WriteLine(order.Prop1);         }     }  }  public class WorksheetA : WorksheetBase<OrderA> {     OrderA[] _activeOrders;      public string Name { get; set; } }   But I get errors when the dictionary is instantiated:  public static Dictionary<string, WorksheetBase> dic = new Dictionary<string, WorksheetBase>();   Maybe I'm going about this all wrong, but it's bugging me. Any thoughts on a better way to handle this? I feel like I've got to be missing something simple...


What does a two overlapping circles symbol mean in an electrical schematic/diagram?

In the datasheet for a A3503 Hall Effect Sensor, I saw a circuit diagram labeled 'Functional Block Diagram', and it shows a symbol I have not seen before. It's shown here between 3 - Output and 2 - Ground.  What is this supposed to represent?    The full datasheet is available


I have written below Wrapper class.  global class BI_VA_AutomationWrapper {      global class BI_VA_AutomationRequest {      webservice String userName;     webservice String emailId;     webservice String buinessUnit;     webservice String orgName;     webservice String country;     webservice String environment;     webservice String myShopNumber;     webservice String BidsId;//for testing     webservice String Type; //for testing  }  global class BI_VA_AutomationResponse {      webservice String responseStatus;     webservice String myShopNumber;     //webservice list<Error> errorMessages;     webservice String  errorMessages;//for testing   } global class BI_VA_Error {      webservice String type;     webservice String message;    }}   And test class is,  @isTest public class BI_VA_AutomationWrapperTestClass  { public static testMethod void unitTest(){      BI_VA_AutomationWrapper.BI_VA_AutomationRequest wrap= new BI_VA_AutomationWrapper.BI_VA_AutomationRequest();        wrap.userName='Test@test.com';     wrap.emailId='Test@test11.com';     wrap.buinessUnit='AH';     wrap.orgName='ORD';     wrap.country='US';     wrap.environment='QA';     wrap.myShopNumber='123456789';     wrap.BidsId='123';     wrap.Type='ResetPassword';              BI_VA_AutomationWrapper.BI_VA_AutomationResponse res= new BI_VA_AutomationWrapper.BI_VA_AutomationResponse();     res.responseStatus = 'Success';     res.myShopNumber = '987654321';     res.errorMessages = 'Test error';      BI_VA_AutomationWrapper.BI_VA_Error error = new BI_VA_AutomationWrapper.BI_VA_Error();     error.type = 'Test';     error.message = 'Test';  }}   Code coverage is 0% only.


In a few weeks I will be using train 305 to go from Mongolia to Irkutsk. This train leaves on a Tuesday and arrives at Irkutsk on Wednesday. According to Russian Railways, this train arrives the border point at Naushki at 23:55, still Tuesday, and stays there a couple of hours.   The thing is, my visa is valid from Wednesday. I know that technically if I really arrive at 23:55 my visa will not yet be valid, but by the time the guards take my passport it would probably be Wednesday already.  Maybe a better question would be if guards will stamp the visa with the Tuesday date or Wednesday, since it will in fact be Wednesday. But only people that have traveled on that particular train will know.  Anyone that has traveled on that train or in a similar situation could tell me what chances I have to be taken off the train?  EDIT: This is the timetable from Russian Railways. Times until Sukhbaatar are local. From Naushki times are Moscow time (add 5h for local).


I realize connecting two different voltage sources in parallel is a contradiction (in an ideal circuit). But if I were to connect this in practice and measure the voltage across points A and B, what value of voltage would it show? And how much current would be sunk by the 5V battery? (Non ideal conditions)


How many edges does an undirected tree with $n$ nodes have?


replace if statments with clean code and best practices

It is a simple code, what I am looking for is to learn the best practices that I can implement, when trying to refactor the show method, to a method that is closed to modifications. so that in the future if they ask me to enter a new card with a value of type chain, it is not necessary to modify this method.  class Card: def __init__(self, suit, value):     self.suit = suit     self.value = value  def show(self):     if self.value == 1:         value = "Ace"     elif self.value == 11:         value = "Jack"     elif self.value == 12:         value = "Queen"     elif self.value == 13:         value = "King"     else:         value = self.value      return f'{value} of {self.suit}'


Was just thinking, if it would be nice if we have a dark theme customization and the current light theme.


While mkusb was working to make a persistent Ubuntu Live USB, for a friend who damaged his HDD, I pulled out the USB cause it was taking too long. After that, I plugged it back in and I couldn't format it and when I select the option to format, it showed:  Error creating partition on /dev/sda: Command-line parted --align optimal --script "/dev/sda" "mkpart primary ext2 1MiB 15472047103b"' exited with non-zero exit status 1: Error: The location 1MiB is outside of the device /dev/sda.  (udisks-error-quark, 0)   I tried almost every guide but I don't get any results and fdisk seems to have completely forgotten that I have an 8 GB stick and shows 1.4 GB.


I've been playing a 4e dungeons and dragons campaign for a while now, and it's the first campaign I've ever played in. The DM seems to keep pampering one player in particular. He usually only gives plot hooks to that player, never blames that player for anything, gives that player any and all magical items he wants, and let that player start out the game with a feat that allows him to take two standard actions per turn without spending an action point. The player claims that us other players are just bad at the game, even though his character sheet has multiple very clear errors. The thing is, this player is the only reason that we can win any battles since he's a higher level than any of us and the DM scales bosses to him. The DM has recently started giving plot hooks to other players, but the only time this has happened was when he gave my character a single hook one session ago. I'm sorry for ranting, I would just like to know how to deal with this.


In Canada as a child, probably in the mid-late 1960s, our school librarian read us a book about a child (boy I think) who when he became of a certain age was to be 'tapped' a metal tap would be inserted under his skin so he could be tracked by a superpower.  'Tapping' children at a certain age was the norm in this world and this story was about he tried to evade being tapped.  Any idea of what the title of this book might have been or who the author was?


Let $G$ be a group. Let $K$ be any field and consider its group algebra $K[G]$. It is known that if $G$ is a finite group then $K[G]$ is never a field. Or even if $G$ is not finite: if $G$ has at least one non-trivial torsion element, then $K[G]$ is not a field.  Question: Do there exist infinite groups $G$ such that $K[G]$ is a field or a division ring?


How can I show that $\sqrt{1+\sqrt{2+\sqrt{3+\sqrt\ldots}}}$ exists?

I would like to investigate the convergence of  $$\sqrt{1+\sqrt{2+\sqrt{3+\sqrt{4+\sqrt\ldots}}}}$$  Or more precisely, let $$\begin{align} a_1 & = \sqrt 1\\ a_2 & = \sqrt{1+\sqrt2}\\ a_3 & = \sqrt{1+\sqrt{2+\sqrt 3}}\\ a_4 & = \sqrt{1+\sqrt{2+\sqrt{3+\sqrt 4}}}\\ &\vdots \end{align}$$  Easy computer calculations suggest that this sequence converges rapidly to the value 1.75793275661800453265, so I handed this number to the all-seeing Google, which produced:       Henceforth let us write  $\sqrt{r_1 + \sqrt{r_2 + \sqrt{\cdots + \sqrt{r_n}}}}$ as $[r_1, r_2, \ldots r_n]$ for short, in the manner of continued fractions.  Obviously we have $$a_n= [1,2,\ldots n] \le \underbrace{[n, n,\ldots, n]}_n$$   but as the right-hand side grows without bound (It's $O(\sqrt n)$) this is unhelpful.  I thought maybe to do something like:  $$a_{n^2}\le [1, \underbrace{4, 4, 4}_3, \underbrace{9, 9, 9, 9, 9}_5, \ldots, \underbrace{n^2,n^2,\ldots,n^2}_{2n-1}] $$  but I haven't been able to make it work.     I would like a proof that the limit $$\lim_{n\to\infty} a_n$$   exists. The methods I know are not getting me anywhere.   I originally planned to ask "and what the limit is", but OEIS says "No closed-form expression is known for this constant".  The references it cites are unavailable to me at present.


I need to know if I should take a transit Visa

I'm a Chadian passport holder, traveling to Havana (Cuba), and I have 13hours layover in Istanbul, so do I need a transit Visa?


TOPBAR_HT_upper_bar.append add menus in two places?

I try to add custom menus to the menus at the top bar in 2.80. The old INFO_HT_HEADER.append() doesn't work any more. I found TOPBAR_HT_upper_bar.append() to kind of do the trick but I get two menus, one after the workspace tabs (would preferably have it before but I guess that is a feature request separate from this) and one after the view layer menu. Am I using the wrong thing or is this a bug? Here's a super simple menu from an example which gives me the problem.  import bpy  class customMenu(bpy.types.Menu):     bl_label = "Custom Menu"     bl_idname = "view3D.custom_menu"  def draw(self, context):     layout = self.layout     layout.operator("mesh.primitive_cube_add")   def draw_item(self, context):     layout = self.layout     layout.menu(customMenu.bl_idname)  bpy.utils.register_class(customMenu) bpy.types.TOPBAR_HT_upper_bar.append(draw_item)


Answer Layout Bug in IE9/Chrome - Footer Encapsulated In Code Block

Here's the link:   If you scroll down to the answer that starts like this...     Just showing the answer of Pandincus with "of the shelf" code and some   explanation: You need two solutions for this example ( I know it could   be done via one also ; ), let the advanced students present it ... So   here is the DDL SQL for the table :   You'll see that the user/timestamp information for that question is encapsulated in a code block.  Edit: Added image in case someone edits the post.


Convergence of positive sequence in which each term is less than the average of preceding 2 terms

It is easy to prove any sequence generated by $$ x_{n+1}:=\frac{x_n+x_{n-1}}{2} $$ is convergent. But how about if the sequence only satisfies $$ 0\leq x_{n+1}\leq\frac{x_n+x_{n-1}}{2} $$ with positive $x_0$ and $x_1$?    @Martin R gives a proof. Could this result be extended to $n$ preceding terms?


How to detect clicks outside of a css modal?

Im using a very simple and clean code to render a modal in my page:
I'm the Modal Window!
     .modal {     /* some styles to position the modal at the center of the page */     position: fixed;     top: 50%;     left: 50%;     width: 300px;     line-height: 200px;     height: 200px;     margin-left: -150px;     margin-top: -100px;     background-color: #f1c40f;     text-align: center;      /* needed styles for the overlay */     z-index: 10; /* keep on top of other elements on the page */     outline: 9999px solid rgba(0,0,0,0.5); }     Is there a clean and reliable way to detect when somebody clicks outside of the modal?


Updating posterior distribution in online fashion

First, I am sorry if this is an obvious question, I am starting to study bayesian statistics (mainly for machine learning) and I was seeing the classic coin flip example using a Bernoulli distribution with parameter $q$. So I checked the math using an uniform prior ($P(q)=1$), and I was trying to see how the posterior would change after seeing for example $D=\{heads,tails\}$. So After computing the equations, I got that the posterior $P(q|D)=6(q-q^2)$. Then I did the same computation, but this time in 2 steps; that is, first I computed  $P(q|D)$ but only with $D=\{heads\}$ which was equal to $2q$. Then I computed the posterior again with $D=\{tails\}$ but this time using the posterior that I just obtained ($P(q)=2q$). And then I obtained the same posterior as before. My question is, is this always the case if we assume iid samples or just works for this simple case? Is this how real life systems are programmed (using the previous posterior distribution as prior)?  Thanks!


How to get the reverse percentage (not amount of reverse percentage)?

if 100 x 1.17 (17%) = 117, how can I know how many % I have to deduct 117 to get 100? Obviously, this is no more 17%.   The same can be applied if 100 - 10% = 90. Then how many % I have to add to 90 to get 100? Again, it is no more 10%.   I know how to calculate this, but I was wondering if there is a math formula for this? something as simple as a*b=c => b=c/a


Show the only homomorphism $F:\Bbb Q\rightarrow \Bbb Q\setminus\{0\}$ is the trivial map

I've been working on this problem for a long time and am stuck.   I was thinking I could use Lagrange's theorem and the fact that the image of any homomorphism must have an order that divides both the order of the domain group and the codomain group.   Since they differ by 1, their orders must be coprime meaning that the order of the image must be 1, namely the trivial map.  I'm not exactly sure if this is right, if I could get some feedback that would be great.  Thanks!!!


I'm requesting help regarding to the best method/function to parse a string AFTER, it as been already, by the parameters.  I have a many, many lines of MySql already in place, the prepare statement methods to avoid SQL injections are out of the question, because i don't have the time. Is there any function to parse scape characters on a string, right before i call:  //$sql_query_string_CLEAN = THE PLACE THE PARSING FUCNTION($sql_query_string);     mysql_query($sql_query_string_CLEAN, $connection);


Are there limitations to JS searching by HTML ID tag based on type?

I just did a test, and it seems like the below code will NOT find the following div
  integer = 1 $('.class-name#'+integer)    However, when the HTML code is changed to this:
, the following code will work:  integer = 1 $('.class-name#number-'+integer)    Just wondering then if ID has to start with a letter?


Regression with highly negative correlated variable

I have a regression with 6 independent variables and one of them is highly negatively correlated with one of them. (-0.81 correlation) I was wondering if the regression is still valid or if it's biased? Are the variables still orthogonal? The goal of the regression is inference and all variables are important.


Where can I put biblatex style modifications?

says:     Finally, assuming that I'll want to use my style adjustments in a multitude of documents: Where do I put the relevant macro stuff?   The recommended answer is a copy of biblatex.cfg in one's local texmf tree. However, going away from above precondition:  What are all the places, i.e. file types and respective locations, where I can put biblatex style modifications?  I know you can write your own bbx and cbx styles, and there's probably a way to put modifications directly in a tex file? What are the limitations, advantages and disadvantages of each of these, which kind of modification typically goes where, which overrule others ...?


South African and EU dual citizenship travelling to the UK

I am traveling to the UK using my dual citizenship.  When leaving South Africa, I will be using my SA passport which will have an "exit" stamp on it. But once I arrive in England I will be using my EU passport which will then receive an "entry" stamp, but obviously this passport will have no exit stamp from South Africa in it. Will they not be wondering where I came from?  I feel like showing both my South African and EU passport in England will get me into trouble.


My wife and I will be travelling to the UK together. My wife depends on me. In my application I completed the income part.  In my wife application:  In the part "planning to spend money" in the UK I will put 40% of my total cost of the trip. For example, I put GBP 3,000 in my trip cost. Now I will put for my wife GBP 1,200. Is this ok?  Secondly, in my wife's application I don't know what to put in "Spend money in each month" because she is dependent and I spend in my home monthly. I just give her pocket money or for purchasing some food items. Now what should I put in this field?


First argument of bash is different when parameter is passed or not

There are two bash usages:  $ bash -c 'echo $0' bash  $bash -c 'echo $0' "text" text   Why in the first case parameter $0 holds the program name but in second the first parameter?


How can I schedule timer to power on and off device?

Is there any way to schedule timer to power on and off device?  Example daily power on at 8am and power off at 10pm.


I've had 3 Outlook 2016 users contact me today with the same problem. When they click any email, in there inbox, the preview pane is blank (as shown below):  Also, if they double-click any email (to open it in a new window) that email body is also blank. I've tried updating Microsoft Office 2016 and the problem persisted after being fully updated. Additionally, I tried deleting a user's email profile, and then re-syncing their email using Google App Sync (because the server is not exchange; it is Gmail). Even after a fresh re-sync the problem persists. Of course, if these users check their Gmail, the email bodies show just fine. Have any of you experienced this issue, and if so, how did you get past it?


Intuition about whether to switch in box problem

I ran across an apparent paradox which I then located in the paper  as such:     Imagine that you are shown two identical boxes. You know that one of   them contains. \$b and the other \$2b. Picking one at random and opening   it, you must decide whether to keep it (and its contents), or exchange   it for the other box.   In short, when you find $x dollars in a box, the expected value of the other box is .5*.5x + .5*2x = 1.25x, meaning that it's always better to switch. This appears to violate the symmetry of the problem and the fact that you still know nothing meaningful about either box.  The paper goes another direction with it, talking about how having prior knowledge of expected values gives a more meaningful analysis (along with other discussions). However, what if there's no prior knowledge, and we have the original problem as stated. Can anyone give me some intuition to make sense of this?  EDIT: Someone found  which asks a slightly different formulation, but an identical problem. The accepted answer there just points to , and I'm having difficulty understanding the paper. It explains away the paradox by noting the expectation is based on an infinite sum, and the value depends on the order the sum is evaluated. I'm not familiar with how the order of a sum can change a value, and I also don't see talking about a different way to evaluate the expectation explains the strange result outlined above. My math understanding is primarily based on reading textbooks as a hobby, and I haven't yet worked up to fully understanding math academic papers, so a simpler explanation would be helpful.


$a, b \in\Bbb N$, find all solutions to $2^a = b^2 - 5$ and prove there are no more solutions?

I am currently studying discrete mathematics at uni (in my computer science degree). We have an assignment due tomorrow, and i have been able to do most of it, but one question eludes me. I spoke to a tutor today about it, and he said that last year they asked the same question in the assignment, and only 4 people got it right in the entire course.  The question is this: given the possible remainders that a perfect square leaves when divided by $3, 4$ and $8$......., $a, b$ are in the natural numbers, find all solutions to $2^a = b^2 - 5$ and prove there are no more solutions than the ones you have found?  I have been trying all day to solve this, but i am still no closer.  I am guessing it has something to do with using a different modulus (one of the tutors hinted this), but i cant figure it out.  If someone wouldn't mind perhaps pointing me in the right direction, i would be hugely grateful.  Thanks Corey B :)


It seems like cocoa powder is very tricky to dissolve in liquid without using a slurry. So how do store-bought cocoa mixes dissolve so easily?


Do things use apostrophe for indicating possessive?

Possible Duplicate:          If someone owns something I would say: Mom's car.  But if the owner is not a person, does it actually own it according to English rules or common usage? Which phrase is right?         The house windows.   The house's windows.   The windows of the house. (Or something like that.)      (Feel free to modify this question so it would be clear for other people.)


Are there simple command line tools to decode a SQL Injection request string?

My web server periodically comes under attack, and I get a bunch of requests that look like  /my.page?union+all+select+0x31303235343830303536%2C0x31303235343830303536%2C0x31303235343830303536--  Are there simple command line tools to decode this?


Difference of property Delegate and Event

event keyword creates two methods add_* and remove_* (its working like property).  what is the difference   public event MyDelegate event1; public MyDelegate event2 { get; set; }   why should use event keyowrd?


Which experiments prove atomic theory?  Sub-atomic theories:   atoms have: nuclei; electrons; protons; and neutrons. That the number of electrons atoms have determines their relationship with other atoms.   That the atom is the smallest elemental unit of matter - that we can't continue to divide atoms into anything smaller and have them retain the characteristics of the parent element. That everything is made of atoms.     These sub-theories might spur more thoughts of individual experiments that prove individual sub-atomic theories (my guess is more was able to be proven after more experiments followed).


Why is pasted text highlighted in macOS Catalina's Terminal?

On macOS Catalina, when I copy text and paste to Terminal, the text is highlighted (basically, there are ANSI color codes enclosing the text). I don't know when this feature was included, but is there a way to disable it?


How can make an environment in which I can write my text and in output, I see it indented with a coloured vertical line?  I want the code be like the following:  \begin{textbox}[orange][1cm] % [colour of the line][distance from left margin] \lipsum[1] \end{textbox}     \documentclass{book} \usepackage{lipsum} \begin{document} \lipsum \end{document}


Prove that this function is not integrable: $f(x)$ is $1-x$ for $x$ rational, and $1/x$ for $x$ irrational

How do I prove that the function  $$f(x)= \begin{cases}  1-x &,\text{when}\; x \;\text{is rational} \\ 1/x &, \text{when}\; x \;\text{is irrational} \end{cases}$$ is not integrable on every interval $[a,b]$?


What exactly is the Linux kernel and does Ubuntu use a modified Linux kernel?

What exactly is the Linux kernel? And does Ubuntu, at the core, use a modified Linux kernel? In what manner is it distinguished by the NT/Windows 8 kernel?


FireFox - attach event to dynamically added function?

I need to dynamically attach a function to a div and pass also the event.  It is working in Chrome / IE, but not FireFox.  I am getting the following error in FireFox console: ReferenceError: event is not defined  How can this be solved?  CodePen:
When clicking on this div, you should get an alert with the event details. This does not work in FireFox.


Please add the markdown to make an image link to itself

I can insert an image like so:  ![Desc Text][1]     [1]: http://www.funnycatpix.com/_pics/What_Are_You_Doing522.jpg   I can also link to said image:  [![Desc Text][1]][1]     [1]: http://www.funnycatpix.com/_pics/What_Are_You_Doing522.jpg   And you can click the image to open in a new tab (useful for big images).  Can some markdown be added to do this? I'm thinking of this sort of syntax:  !![Desc Text][1]     [1]: http://www.funnycatpix.com/_pics/What_Are_You_Doing522.jpg   Double ! or maybe some other symbol combo.


Is it possible to use a 2011 iMac as an external monitor for 2019 Macbook Pro?

I have a mid 2011 iMac, version 10.13.6 with a thunderbolt port. My work recently gave me a 2019 Macbook Pro with a thunderbolt 3 port. Is it possible to use the iMac as an external monitor? If so, what kind of cable(s) would I need? My work also supplied my with a  but not sure if that will help with this or not. Thanks very much!


I often find this at the bottom of pages.  Page generated in 0.00013899803161621  Sometimes, I come across  Page generated in 9.0122222900391E-5  What does that time mean? I tried searching Wikipedia for E and maths but found the . My guess is E stand for Exponential and -5 is the power it is raised to. And the displayed time is a really small number. But that doesn't make sense when compared to the other time in the question. 0.00013899803161621 is bigger than 9.0122222900391E-5. If it means x times $10^{-5}$, then 9.0122222900391E-5 will be 0.000090122222900391 which is smaller than 0.00013899803161621. What does E stand for?


Proving $\left\| \frac{\vec{v}}{\|\vec{v}\|}\right\| =1$, $\vec{v}\ne \vec{0}$

I've been trying to prove that $\left\Vert\dfrac{\vec{v}}{\Vert\vec{v}\Vert}\right\Vert=1, \quad \vec{v}\ne \vec{0}$. This is my attempt:  \begin{align} \vec{v}&\in \mathbb{R}^n, \quad \vec{v}=\begin{pmatrix}v_1 \\ \vdots \\ v_n \end{pmatrix} \\ \Vert\vec{v}\Vert&=\sqrt{\sum_{i=1}^nv_i^2} \\ \frac{\vec{v}}{\sqrt{\sum_{i=1}^nv_i^2}}&=\begin{pmatrix}\frac{v_1}{\sqrt{\sum_{i=1}^nv_i^2}} \\ \vdots \\ \frac{v_n}{\sqrt{\sum_{i=1}^nv_i^2}} \end{pmatrix} =\vec{u} \\ \\ \Vert\vec{u}\Vert^2&=\sum_{k=1}^n\left(\frac{v_k^2}{\sum_{i=1}^nv_i^2}\right) \end{align}  I think it is the last step that is either overcomplicated or wrong.


How to find $k$ such that $(\mathbb{Z} \times \mathbb{Z})/ \langle (m,n)\rangle \cong \mathbb{Z} \times \mathbb{Z}_k$

In John Fraleigh's book, A First Course In Abstract Algebra Exercises 15.7 and 15.11, one shows that  $$ (\mathbb{Z} \times \mathbb{Z})/ \langle (1,2)\rangle \cong \mathbb{Z} \times \mathbb{Z}_1 \cong \mathbb{Z} \ \ \ \ \  \mbox{ and  } \ \ \ \ \ (\mathbb{Z} \times \mathbb{Z})/ \langle (2,2)\rangle \cong \mathbb{Z} \times \mathbb{Z}_2 $$  One does this with the first isomorphism theorem. With the same idea I proved for example that  $$ (\mathbb{Z} \times \mathbb{Z})/ \langle (2,3)\rangle \cong \mathbb{Z} \times \mathbb{Z}_1 \cong \mathbb{Z} \ \ \ \ \ \mbox{ and }\ \ \ \ \ (\mathbb{Z} \times \mathbb{Z})/ \langle (2,4)\rangle \cong \mathbb{Z} \times \mathbb{Z}_2 $$ So I conjectured that $(\mathbb{Z} \times \mathbb{Z})/ \langle (m,n)\rangle \cong \mathbb{Z} \times \mathbb{Z}_{k}$ where $k=\mathrm{gdc}(m,n)$. For the previous four cases, the homomorphism $\phi: \mathbb{Z}\times \mathbb{Z} \to \mathbb{Z} \times\mathbb{Z}_k$ given by $$ \phi(x,y)=\left(\frac{nx-my}{k}, \ x \ \ (\mathrm{mod} \ k) \right) $$ is surjective with kernel =$\langle (m,n)\rangle$. However, this is not the case when $(m,n)=(4,6)$. So, I cannot use what I did for the four cases to prove the general case.     What I want to know is if my conjecture is true. If so, how can I give a general homomorphism? If it is not true, how can I find $k$, such that $(\mathbb{Z} \times \mathbb{Z})/ \langle (m,n)\rangle \cong \mathbb{Z} \times \mathbb{Z}_k$?   Thanks in advance for any help/hint/comment!


The spacing between the 3rd and 4th stars is non-existent. Anyone know what's up?    \documentclass[11pt]{article}  \usepackage{amsmath}  \begin{document}  \begin{gather*} \star\star\star\star \\ \star\star\star\,\star \\ \star\star\star\star\star \end{gather*}  \end{document}


\listoftodos in Todo list missing hyperlinks and colors in my document

I'm trying to add a \listoftodos using the todonotes package to a template file I have. I've added two todos with \todo[inline]{Write abstract \ldots} and \todo{Fill in these details \ldots}. I'm using TextMate to render my document on Mac Osx.  My list of todos in my document looks like this:   My table of contents (in Estonian) looks like this (I think it might be interfering with the styling):   And finally, the intended behaviour and styling from todonotes  looks like this with hyperlinks and colors:   Do you have any ideas how to debug the styling issues with rendering todos?


I have an assignment where I have to have a class named Employee with two variables and a class called Salary that inherits those variables and declares new ones. Within the Salary class, I have to create a method that will take user input for the different variables. The first number inputted is the number of employees you are giving information for and tells the loop how many times to go around. After typing in the information for all the employees the information must be presented like this   123 John engineer 40000.0 124 Emma Testing 33000.0   The only other thing that is required in the program is a function that will check the salary variable and if it is under 20000, not display the employee information to the console.  I have the user input working but I can't seem to get the array to display properly. Whatever I try I either get gibberish or null. I have tried putting the array and the array printing function in the display method and the main method and it doesn't make a difference. How can I fix this?  Side note: I know having different scanners for each input is not the best way of doing things it's just temporary. I'm trying to get the program to work before cleaning it up. The reasoning for it is a type mismatch error using one scanner as a result of scanning an int, then two strings, then a double.  This is the code I have right now:  import java.util.Scanner; class Employee {      int employee_id;      String employee_name;      Employee(int employee_id, String employee_name) {      }      Employee() {      }      } class Salary extends Employee {      double monthly_salary;      String designation;      int num_of_employees;      int n = 0;      Salary(int employee_id, String employee_name, String designation, double monthly_salary) {          super(employee_id, employee_name);      }      Salary() {       }      void display() {           Scanner s = new Scanner(System.in);          Scanner c = new Scanner(System.in);          Scanner a = new Scanner(System.in);          Scanner e = new Scanner(System.in);          Scanner t = new Scanner(System.in);          num_of_employees = s.nextInt();          for (;n<num_of_employees;) {          employee_id = c.nextInt();          employee_name = a.nextLine();          designation = e.nextLine();          monthly_salary = t.nextDouble();          n++;          }          s.close();          c.close();          a.close();          e.close();          t.close();      } } public class Solution2 {      public static void main(String[] args) {      Salary sal = new Salary();      Salary salary[] = new Salary[10];      sal.display();      salary[sal.n] = new Salary(sal.employee_id, sal.employee_name, sal.designation,       sal.monthly_salary);      if (sal.monthly_salary >= 20000) {          System.out.println(salary[sal.n]);      }      else {          System.out.println("");      }   }  }   The result from the array with this code is   Salary@7b23ec81


I tried to install Google Drive Backup and Sync using Wine.  It says "Installation Complete", but since I cannot choose where to install it, now I can't find where it is installed.  Furthermore, if I run the .exe installer again, it installs Drive again with no errors (such as "Backup and Sync is already installed" or something like that).  Is it possible that it installed on the Windows partition? If it was actualy installed on Ubuntu, where can I find it?


Cannot install Ubuntu alongside Windows 10

I have to install Ubuntu alongside windows 10 (UEFI boot) on a brand new Dell XPS 13.   I already have:   Shrinked the Windows 10 disk to have 200Gb unused space Disabled Secure boot Created the USB boot loader, and boot with it   The problem, is that, when the installer starts, it doesn't see the laptop disk, so I cannot go on with the install


I have a PDF with a math excercise and space to write the solution. I know a bit math-related Tex like $ \sqrt2 = 2^{1/2} $.  My goal is to print the result so I have excercise and solution on one page.


How can I configure Juju for deployment on OS X?

I am non-tech entrepreneur. I have developed a Rails app. I want to deploy it live. Can anyone guide me on how to use Ubuntu server + Juju on my laptop to deploy the app live on internet.


c++ overload ostream doesn't work for default construct with empty argument

Here is an example taken from   #include <iostream> using namespace std;  class Date {     int mo, da, yr; public:     Date()     {         mo = 10; da = 10; yr = 99;     }     Date(int m, int d, int y)     {         mo = m; da = d; yr = y;     }     friend ostream& operator<<(ostream& os, const Date& dt); };  ostream& operator<<(ostream& os, const Date& dt) {     os << dt.mo << '/' << dt.da << '/' << dt.yr;     return os; }  int main() {     Date dt0();     cout << dt0 << endl;      Date dt(5, 6, 92);     cout << dt; }   I'd expect the output to be  10/10/99 5/6/92   But what I get was   1 5/6/92   What or how can I work this out?


Multivariate polynomial with no mixed terms

Is there a standard name for multivariate polynomials wherein each term consists of only one coordinate? That is, polynomials of this form: $$p(x_1, \ldots, x_n)= \sum_{i=1}^n \sum_{j=1}^n a_{i,j}x_i^{j}$$ where all of the $a_{i,j}$ are constants.


How can I install custom fonts on Android?

I am trying to display a Powerpoint slide deck on an android tablet, but the slides contain fonts that don't exist in android.  Is there a way to install custom fonts on the tablet?  If so, how?


Prove that a recursive sequence is monotonically increasing

$a _{1} = \frac{1}{2}, a _{2} = 1, a _{n}= \frac{1}{2} a_{n-1} + \sqrt{a _{n-2} }$  Show by the induction that it's $\le 4$ and also by the induction that $a_{n+1}-a_n \ge 0$  If it comes to first I don't know what to do and if it comes to second I tried many different ways but I couldn't prove it.


Prevent apps from using wifi without VPN

When I travel and am connecting to public wireless networks (or, really, any wireless network I don't control), I use a VPN (either L2TP with the built-in networking support or OpenVPN with Viscosity).  What I'd like to do, though, is prevent any applications from using the unsecured wireless network in the few seconds between connecting to the wireless and getting the VPN connection up.  Is there a good way to do this?


How can I switch from intel integrated graphics to nvidia GeForce 940mx without breaking X?

yesterday I bought a laptop which contains both a Nvidia 940mx graphics card and Intel Integrated Graphics. I have found that it uses the Intel integrated graphics by default, but I wish for it to use the Nvidia card instead.  I have already tried switching while using Arch Linux and have switched to Ubuntu in hopes that it will work here, as when I made an attempt on Arch Linux, it resulted in the X Server being entirely unable to start, reporting that it is unable to locate the display, or something along those lines. Because I have already had this issue with switching, I am hesitant to try again without first ensuring that everything will work correctly.  There seem to be several conflicting (and outdated) guides for switching to the nvidia card. Using vga_switcheroo did not work, as the /sys/kernel/debug/vgaswitcheroo/switch did not even exist. Any existing questions on stack exchange which describe utilizing the nvidia card are either outdated, inconsistent with all the others, or are not consistent with my situation.  Some Hardware Information:  $ lspci -nnk | grep -i vga -A3 | grep 'in use' Kernel driver in use: i915  $ lshw -short | grep display /0/100/2                     display        Intel Corporation /0/100/1c/0                  display        NVIDIA Corporation  $ lshw | grep -A10 "VGA\|3D"          description: VGA compatible controller          product: Intel Corporation          vendor: Intel Corporation          physical id: 2          bus info: pci@0000:00:02.0          version: 02          width: 64 bits          clock: 33MHz          capabilities: vga_controller bus_master cap_list rom          configuration: driver=i915 latency=0          resources: irq:131 memory:b2000000-b2ffffff memory:c0000000-cfffffff ioport:5000(size=64) memory:c0000-dffff --             description: 3D controller             product: NVIDIA Corporation             vendor: NVIDIA Corporation             physical id: 0             bus info: pci@0000:01:00.0             version: a2             width: 64 bits             clock: 33MHz             capabilities: cap_list             configuration: latency=0             resources: memory:b3000000-b3ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:4000(size=128) memory:b4000000-b407ffff  $ lspci -nnk | grep -i "VGA\|3D" -A3 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5916] (rev 02)     Subsystem: Acer Incorporated [ALI] Device [1025:111a]     Kernel driver in use: i915     Kernel modules: i915 -- 01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:179c] (rev a2)     Subsystem: Acer Incorporated [ALI] Device [1025:111a]     Kernel modules: nvidiafb, nouveau 03:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31)  $ sudo ubuntu-drivers devices                              == cpu-microcode.py == driver   : intel-microcode - distro non-free  == /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0 == vendor   : NVIDIA Corporation modalias : pci:v000010DEd0000179Csv00001025sd0000111Abc03sc02i00 driver   : xserver-xorg-video-nouveau - distro free builtin driver   : nvidia-367 - distro non-free recommended  $ arch x86_64   Given this information, what is the safest way for me to switch from the intel device to the nvidia graphics card without a risk of breaking the X server? This system is running Ubuntu 16.10 Yakkety.


How to make this stylish «cutting mat» theme?

Hello to everyone! I found this image in one of the topics called «». Is this a «cutting mat» theme? Where can i find it? Thanks!


I am trying to add a button or right click option to Nautilus for an assignment. When I click the button or right click option it should encrypt the file that is highlighted. But I am getting way ahead of myself. I do not know where in the source code I would add this new button feature. How/Where do I edit the source code of Nautilus to add a button and then add the code for encryption?  Any help would be much appreciated.


I get an error message from archive manager in ubuntu 12.04 when I try to run A Downloaded file called Biosagentplus_568.exe. Can someone help me?? I am a ubuntu newbie,


Why does the Community user have votes cast?

If Community is a background process and not a real person then why does its profile show that it has votes cast, and how does it cast them?  How can it decide which answers to upvote or downvote?  See the massive number of upvotes and downvotes cast in its profile:


I defined a table in LaTeX : \begin{tabular}....\end{tabular}.  Now i want to export that table to an image (PNG or something}.  It is possible? How can i do that?


Beamer: How to do src highlighting when src is split with \only command?

Thanks to  there is a template of a "step by step" programming tutorial (with a sample layout in his question):  .  I wonder if it is possible to achieve similar functionality with source highlighting ?  Simply changing environment from semiverbatim to lstlisting , does not work (as is easy to guess).  %Generate with : `pdflatex filename` \documentclass{beamer} \usepackage{listings} \lstset{     language=C++,     basicstyle=\small,     numbers=left,     numberstyle=\tiny\color{gray}, } \begin{document} \begin{frame}[fragile]% %\begin{semiverbatim} \begin{lstlisting}[language=C++,caption={C++ as C++ TexTests},label=cppascpptextests] \only<1-2>{\frametitle{General program structure}} \only<3>{\frametitle{Variables}} \only<4>{\frametitle{Reading numbers from standard input}} \only<5>{\frametitle{Printing results on standard output}} \only<6>{\frametitle{Assigning results of computation}} \only<7>{\frametitle{Working example :)}} \only<8>{\frametitle{Enjoy programming :)}} \only<4>{(4)How to include needed header file?}\only<5->{\#include <cstdio>} \only<1>{(1) How to construct main function ?}\only<2->{int main() \{}    \only<3>{(3) How to declare variables?}\only<4->{long a,b,c;}    \only<4>{(4) How to read data?}\only<5->{scanf("\%ld\%ld", \&a, \&b);}    \only<6>{(6) How to compute result?}\only<7->{c = a * b;}    \only<5>{(5) How to print result?}\only<6->{printf("\%ld\textbackslash n", c);}    \only<2>{(2) How to exit program correctly?}\only<3->{return 0;} \only<2->{\}} \end{lstlisting} %\end{semiverbatim} \end{frame}  \end{document}


XGBoost Loss function Approximation With Taylor Expansion

As an example, take the objective function of the XGBoost model on the $t$'th iteration:  $$\mathcal{L}^{(t)}=\sum_{i=1}^n\ell(y_i,\hat{y}_i^{(t-1)}+f_t(\mathbf{x}_i))+\Omega(f_t)$$  where $\ell$ is the loss function, $f_t$ is the $t$'th tree output and $\Omega$ is the regularization. One of the (many) key steps for fast calculation is the approximation:  $$\mathcal{L}^{(t)}\approx \sum_{i=1}^n\ell(y_i,\hat{y}_i^{(t-1)})+g_tf_t(\mathbf{x}_i)+\frac{1}{2}h_if_t^2(\mathbf{x}_i)+\Omega(f_t),$$  where $g_i$ and $h_i$ are the first and second derivatives of the loss function.   What I'm asking for is convincing arguments to demystify why the above approximation works:  1) How does XGBoost with the above approximation compare to XGBoost with the full objective function? What potentially interesting, higher-order behavior is lost in the approximation?  2) It's a bit hard to visualize (and depends on the loss function) but, if the loss function has a large cubic component, then the approximation will likely fail. How is it that this doesn't cause problems for XGBoost?


Physical meaning of this integral in $k-$space

I am trying to solve an integral in $k$-space where I want to calculate the ratio of the average energy of an arbitrary electronic band ($E(k)=k^n)$ to the square of average group velocity of electrons($v_g   = k^{n-1})$ approximately in the form of this expression given by $$L=\frac{\frac{\sum_{\mathbf{k}}k^{n}f(k)}{\sum_{\mathbf{k}}f(k)}}{\left(\frac{\sum_{\mathbf{k}}k^{n-1}f(k)}{\sum_{\mathbf{k}}f(k)}\right)^2}\;.$$    Where $f(k)$ is the Fermi-Dirac distribution given by $f(k) = \frac{1}{1+e^{\frac{k^n}{k_B T}}}$ and $k_B$ is the Boltzmann constant and $T$ is the temperature.  Now, I want to do this for $d$-dimensions, so I convert $L$ sum to integral and it results in the expression  $$ L = \frac{\dfrac{\int_{0}^{\infty}k^{n}\left(\frac{1}{1+e^{\frac{k^n}{T}}}\right) \mathrm d^d k}{\int_{0}^{\infty}\left(\frac{1}{1+e^{\frac{k^n}{T}}}\right) \mathrm d^d k}}{\left(\dfrac{\int_{0}^{\infty}k^{n-1}\left(\frac{1}{1+e^{\frac{k^n}{T}}}\right)\mathrm d^d k}{\int_{0}^{\infty}\left(\frac{1}{1+e^{\frac{k^n}{T}}}\right) \mathrm d^d k}\right)^2} $$ where $ \mathrm d^dk  = \dfrac{\pi^{d/2}}{\Gamma(\frac{d}{2}+1)}k^{d-1} \mathrm dk $ is the volume element in $ d $-dimensional space.  I want to get a simple expression for $ L $ and how it depends on $ T, n $ and $ d $. Any physical/geometrical insight into this integral could also be helpful. What can I do in Mathematica to understand these terms? I specially want to understand what happens at very low and very high $T$.


I made some habanero salsa last night for the first time (my god, was it delicious) and took care to clean everything that was used.  I figured I was good when I had no problems taking my contacts out afterwards.  So, fast forward to this morning.  The slap chop was still out to dry (stop having a boring pepper, stop having a boring life!) so I put it all away aand then found out the hard way when I went to put my contacts in that I did not in fact clean the tools well enough.  So, I've now got a slap chop, 2 knives and a cutting board which all need to be cleaned of the oils.  What's the best way to do this?  I can throw them all into the dishwasher at once if needed, none of the plastics should melt.


How to remove a watermark from a PDF file?

I thought this would be a simple task, but it turned out the other way.  The watermark is the very same (overlapping, but transparent) image on every single page. I created the PDF file myself (so no copyright worries here) using PDFCreator 0.9.8.  I have already tried my friend's Adobe Acrobat Pro, but it didn't work. It tries to remove it, but it can't. I tried to remove header/footer, etc., but the watermark just won't disappear.    How can I remove the watermark?


Is calling for protest actions allowed on metasites?

Is it allowed for user to post question proposing some protest actions against SE site/network? For example propose to avoid using it on concrete date or misuse/overuse some of the rules to explicitly show its inadequacy. Actually not sure if we can join these cases, so if they differ, I'd like to find some kind of border between them.  If yes, are there special requirements for such kind of posts? If no, how should such questions be handled: just close as offtopic or close and delete? If some of them are allowed and some are not, where is a border?


The next level of spices (Indian cooking)?

Normally Indian dishes are spiced up with chilli, turmeric, coriander and pepper and that seems enough for most cases. However when I go to the supermarket these days, there seem to be too many exotic spices packed into little bottles (jalapeno, basil, white pepper). I would like to know whether these spices go well with Indian cooking. What are some of these spices that I should consider putting in my shelf.?


How to reduce artifacts on curved text/vector

this is a problem I face a lot when working with branding and typography. After importing vectors/typing, extruding and bending (simple deform or curve modifiers) it always come up with those ugly polygon artifacts:    Now, I know the cause of this is that the front faces of the text do not have the right topology nor enough polys to bend.  So, is there a good workflow to get rid of this without taking a huge load of time to retopo by hand or using the remesh modifier to an absurd high poly count?  Thanks


Im a programmer and I was writing a comment today that read:  Finds a XPath relative to the Node  From what I understand you should always use 'a' over 'an' when it proceeds a word starting with a vowel. such as  I ate an apple I ate a orange  It sounds weird to me the way "Finds a XPath" reads. It feels more comfortable reading "Finds an XPath". I know English is full of weird rules and I am wondering if this is one of them. What is the correct usage here? In case it is relevant heres a link to .


How can I use Samsung Apps in CyanogenMod 11?

I got my Galaxy S4 today (i337M), it's wayyy better than my old SII hehe.  I immediately removed the stock Bell firmware and put the latest snapshot available from CyanogenMod.  I'm wondering if it's possible to convert apps like S Planner, S Note, S Health to CyanogenMod.  Current stock android version available for i337M is 4.2.2. Latest Android version for CM is 4.4.  If I install CM 4.2, can I import/install the APKs and then upgrade to 4.4?  Hope you'll be able to help me :)


Why are the ends of the prediction interval wider in the regression?

Usually, the prediction interval has this shape in the image.  I don't know why the end of the interval is wider than the center.


I have a presentation. I want to draw it in latex and put in on my slide. Some kind tell me where to begin or tell me the code


Stored Procedure or a query for this special requirement

I want to write a query or a stored procedure in SQL Server to solve this problem - I tried a lot but no chance !   I have this data in a SQL table and I want to make a special operation on it :   0   3   1   0   0   0   0   NULL    NULL    35  117461  Mark    CEO     OBAMA   NULL    PARIS   FaceBook    NULL          NULL  NULL    NULL    NULL    NULL    NULL    NULL    01/10/2015  Very Good 0   3   1   0   0   0   0   1901    6925    35  117461  Mark    CEO     OBAMA   Med1    PARIS   FaceBook    One2Few 20/10/2015  NULL    NULL    NULL    NULL    NULL    NULL           NULL NULL 0   3   1   0   0   0   0   2135    7835    35  117461  Mark    CEO     OBAMA   Soft1   PARIS   FaceBook    One2Few 27/11/2015  NULL    NULL    NULL    NULL    NULL    NULL           NULL NULL 0   3   1   0   0   0   0   2574    9575    35  117461  Mark    CEO     OBAMA   Med1    PARIS   FaceBook    GroupMe 17/03/2016  NULL    NULL    NULL    NULL    NULL    NULL           NULL NULL 0   3   1   0   0   0   0   2832    1849    35  117461  Mark    CEO     OBAMA   Tech1   PARIS   FaceBook    One2Few 30/05/2016  NULL    NULL    NULL    NULL    NULL    NULL           NULL NULL   What I want is to remove the duplication and group those 5 rows into one single row containing the important information:   0   3   1   0   0   0   0     Mark          CEO         OBAMA     Med1|Soft1|Tech1     PARIS     FaceBook    01/10/2015    Very Good       I explain :   The 7 first columns are count operation and it is always the same in each row.  A concatenation of values Med1|Soft1|Tech1 - when two Values are the same take only one.  Take the comment when it exists here =  "very Good"  - The comment will exist once.


Convert string to Title Case with JavaScript

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


Face culling all faces that cannot be seen

I'm working on a simple 3d game using the Processing Java environment. I want to optimise my code so I can draw many many 'objects' (the world is made up of many different shaped objects that live inside the volume of a cube) without the framerate dropping. How can I detect which faces cannot be seen and stop drawing them? I have tried this code:  pgl = (PJOGL) beginPGL();   gl = pgl.gl.getGL2ES2(); gl.glEnable(GL.GL_CULL_FACE); gl.glCullFace(GL.GL_BACK);   which does do backface culling but it is not all that I want. I want to stop rendering any face that the camera cannot see, i.e. inside faces etc.  The code used to draw the objects (just a simple cube for testing) is as follows:      noFill();     noStroke();     noSmooth();     push();     lights();     translate(this.x * this.size, this.y * this.size, this.z * this.size);     beginShape(QUADS);     texture(this.texture_image);     vertex(-this.size / 2, -this.size / 2, this.size / 2, 0, 0);     vertex( this.size / 2, -this.size / 2, this.size / 2, this.size / 2, 0);     vertex( this.size / 2, this.size / 2, this.size / 2, this.size / 2, this.size / 2);     vertex(-this.size / 2, this.size / 2, this.size / 2, 0, this.size / 2);      // -Z "back" face     vertex( this.size / 2, -this.size / 2, -this.size / 2, 0, 0);     vertex(-this.size / 2, -this.size / 2, -this.size / 2, this.size / 2, 0);     vertex(-this.size / 2, this.size / 2, -this.size / 2, this.size / 2, this.size / 2);     vertex( this.size / 2, this.size / 2, -this.size / 2, 0, this.size / 2);      // +Y "bottom" face     vertex(-this.size / 2, this.size / 2, this.size / 2, 0, 0);     vertex( this.size / 2, this.size / 2, this.size / 2, this.size / 2, 0);     vertex( this.size / 2, this.size / 2, -this.size / 2, this.size / 2, this.size / 2);     vertex(-this.size / 2, this.size / 2, -this.size / 2, 0, this.size / 2);      // -Y "top" face     vertex(-this.size / 2, -this.size / 2, -this.size / 2, 0, 0);     vertex( this.size / 2, -this.size / 2, -this.size / 2, this.size / 2, 0);     vertex( this.size / 2, -this.size / 2, this.size / 2, this.size / 2, this.size / 2);     vertex(-this.size / 2, -this.size / 2, this.size / 2, 0, this.size / 2);      // +X "right" face     vertex( this.size / 2, -this.size / 2, this.size / 2, 0, 0);     vertex( this.size / 2, -this.size / 2, -this.size / 2, this.size / 2, 0);     vertex( this.size / 2, this.size / 2, -this.size / 2, this.size / 2, this.size / 2);     vertex( this.size / 2, this.size / 2, this.size / 2, 0, this.size / 2);      // -X "left" face     vertex(-this.size / 2, -this.size / 2, -this.size / 2, 0, 0);     vertex(-this.size / 2, -this.size / 2, this.size / 2, this.size / 2, 0);     vertex(-this.size / 2, this.size / 2, this.size / 2, this.size / 2, this.size / 2);     vertex(-this.size / 2, this.size / 2, -this.size / 2, 0, this.size / 2);      endShape();     pop();   Sorry for the long code.  Thanks in advance.


Bug was fixed but fix was not yet published/deployed - should it be tagged status-completed or not?

Take  recent (and highly irritating) bug for example. Our one and only Oded fixed it quickly but for the fix to actually have any effect, code must be "deployed" first, action that might take even days, especially now with SQL playing tricks on the team.  Until the fix is deployed, the bug still exists.  Two options:   Mark  since as far as the dev is concerned, it's fixed and it's just matter or time until all we enjoy it. That's by far the norm here in Meta. Bug exists so don't put any tag and wait until the fix is actually out there (maybe even wait for OP to confirm) before tagging as completed. Concern here is forgetting to tag leaving bug reports open even though they're actually fixed.   Personally I prefer #2 though it's really not that crucial. Can anyone see more aspects or reasoning in addition to what I brought here?


Bijection from $\mathbb R$ to $\mathbb {R^N}$

How does one create an explicit bijection from the reals to the set of all sequences of reals? I know how to make a .  I have an idea but I am not sure if it will work. I will post it as my own answer because I don't want to anchor your answers and I want to see what other possible ways of doing this are.


Is it possible to make a line style in tikz, similar to dotted or dashed, such that instead the decoration is a series of footsteps, as in the figure below? The footsteps do not need to be as complicated, but they should be recognizable as such.


Why did Robb cross the Green Fork at The Twins?

Because Robb needed to cross the Green Fork of the Trident, he pledged to Lord Frey (in his own castle!) to marry one of his daughters/granddaughters. Robb double-crossed Lord Frey, and the rest is history. Anyway...  Did Robb choose to cross at The Twins (Lord Frey's castle) because:    There were no other possible ways for Robb's small expeditionary force to cross the Green Fork?   While there are other good places to cross (even large armies), crossing at The Twins allowed Robb to attack the Lannister army from the best tactical position?    If there were no bridges at The Twins, how would the North and South be connected? Only small boats and minor bridges? Or, are there other big crossing points somewhere?


Why formulate continuity in terms of pre-images instead of image?

I wanted to discuss my intuition of why we formulate the concept of continuity in terms of pre-image of open set is open instead of images for example if we consider $f(x) = c$ where $c$ is some constant, then that should be continuous, but if we formulated continuity in terms of images it won't be continuous. Is the reason we do it that way, because pre-images will always guarantee that function in the domain can only have $1$ value?


Why do incrementing operators(++) in a while loop don't evaluate until they have done at least one loop?

If I do a simple loop with a while, it is evaluating my ++ operator after the first loop, does this mean that my while operator makes a small scope saving my i and after it finishes evaluating it applies the ++ operator on it? Why does this happen with this operator and also happens on the -- but not with lets say a simple sum i + 1?  var i = 0; while(i++ < 1) { console.log(i) }   My output is 1  var i = 1; while(i-- > 1) { console.log(i) }   My output is 0  var i = 0; while(i + 1 < 1) { console.log(i) }   My output is undefined


Still learning my way around QGIS and ran into an odd issue this evening. I'm using a program called Radio Mobile Deluxe to generate RF models.  It exports images as KML ground overlays.  I then bring the KML into QGIS, then georeference the raster.  However, this evening, I noticed that things didn't look quite right.  I should be looking at perfectly square objects (8000x8000 meters and a 800x800 pixel raster).  The overlay imports perfectly into Earth, but when I bring it into QGIS, it's measuring out 10km wide.  However, when I compare visual features in the imagery basemap and roads, everything looks dead on.  I'm really not sure what I'm looking at here, if it's a problem, or how to fix it.  I'm using QGIS 2.18.4, the project CRS is 4326.  Not quite sure what other information I should provide.  Here's a screenshot, showing a very square object in Earth and a not-so-square object in QGIS, along with the N/S/E/W coordinates generated by Radio Mobile.    Here's a sample KML file I created in Earth and loaded into QGIS:  <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document>     <name>foo.kml</name>     <Style id="s_ylw-pushpin_hl">         <IconStyle>             <scale>1.3</scale>             <Icon>                 <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>             </Icon>             <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>         </IconStyle>         <LineStyle>             <color>ff0000ff</color>             <width>3.5</width>         </LineStyle>         <PolyStyle>             <fill>0</fill>         </PolyStyle>     </Style>     <StyleMap id="m_ylw-pushpin">         <Pair>             <key>normal</key>             <styleUrl>#s_ylw-pushpin</styleUrl>         </Pair>         <Pair>             <key>highlight</key>             <styleUrl>#s_ylw-pushpin_hl</styleUrl>         </Pair>     </StyleMap>     <Style id="s_ylw-pushpin">         <IconStyle>             <scale>1.1</scale>             <Icon>                 <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>             </Icon>             <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>         </IconStyle>         <LineStyle>             <color>ff0000ff</color>             <width>3.5</width>         </LineStyle>         <PolyStyle>             <fill>0</fill>         </PolyStyle>     </Style>     <Placemark>         <name>Untitled Polygon</name>         <styleUrl>#m_ylw-pushpin</styleUrl>         <Polygon>             <tessellate>1</tessellate>             <outerBoundaryIs>                 <LinearRing>                     <coordinates>                         -79.22887,38.08849,0 -79.13737,38.08849,0 -79.13737,38.08849,0 -79.13737,38.16048,0 -79.22887,38.16048,0 -79.22887,38.16048,0 -79.22887,38.16048,0 -79.22887,38.08849,0                      </coordinates>                 </LinearRing>             </outerBoundaryIs>         </Polygon>     </Placemark> </Document> </kml>   EDIT: Here's what the raster looks like (after converting to polygon and removing the background).    When I spot-check the overlay down to the pixel, it's identical between QGIS and Earth.  Accurate enough for modeling RF signals, which tend to get pretty fuzzy in the real world.


How to change grub command-line (grub shell) keyboard layout?

When I boot in GRUB2 and press c, I have access to GRUB shell.  How to change the keyboard layout (language) of this GRUB shell?  Note that I'm booting an Ubuntu VM inside Virtualbox.


What are the differences in meaning and usage between "to start" and "to get started"?  Are there any cases in which these variants are not interchangeable? I feel that there are. For example,  looks less natural with its Start tab than it would with a Getting Started tab. I cannot see why there is a difference. Could you please explain?


How to keep processes running after ending ssh session?

Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?


How to access files of Windows using bootable Ubuntu flash drive

I run Ubuntu 14.0 using a flash drive on my Windows 8.1-64 bit PC. Now is it possible that I can access files and folders of the Windows using that bootable flash drive having Ubuntu. If yes and please tell me how to go about it.


i want to copy a directory from my local system to a remote machine using rsync

I have a file on under my local machine with the name codes.examples and I want to copy it to a remote machine under the directory ~ahmet using the command rsync and ssh knowing that remote machine using this port ssh -p 45688  how can I write a command to do that


HTML5 tag (main) not recognized in Eclipse Luna

I have the following HTML5 document:  <!doctype html>      <meta charset="utf-8">     <meta name="viewport" content="width=device-width; initial-scale=1.0;" />     <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>     <link href='css/styles.css' rel='stylesheet' type='text/css'>     <title>My title</title>
some text

text1

text2

item 1

item 2

item 3

         When opening this file in Eclipse I get the following error message: Unknown tag (main)  The version of Eclipse is as follows: Eclipse Java EE IDE for Web Developers, Version: Luna Service Release 1 (4.4.1), Build id: 20140925-1800


How to diagnose sudden and fleeting hang of computer?

Two days ago, I launched a Zoom meeting with the Zoom client. The client launched but did not show a GUI window and did not respond. I tried from the browser and both Google Chrome and Chromium had the same problem:  I restarted the computer and had the same problem with Zoom and Brave. When I launched Brave multiple times, I saw this window: You can't open the application "Brave Browser.app" because it is not responding.:  I shut it down with the power-on button and still had the same problem. Other programs that did launch, such as VLC and Emacs were very slow and took about 2 minutes, then they worked OK. I checked CPU usage with top -o cpu and no program was using a lot of it. I thought it may be a loss of a memory chip, and shut it down. The two days after, the computer was once again working normally. The last time I updated Zoom was more than a week ago (and I had used it without issues the day before); Chromium, Chrome, and Brave was 28 days before; macOS was before that. I did not update programs after that and the issue seems to have disappeared on its own. How can I diagnose the issue next time it happens?


PhD application with mediocre grades, 2 SCI co-authored pubs., LORs from very well knows profs. in the area?

I am going to start my master thesis now. During my master I performed not well, my GPA is about 2.9/4 which is really bad for me. I am not excusing but my mother had cancer and she died in september, even though I studied very hard I performed poorly in my exams. I would like to apply a PhD program when I graduate, however I scare like a little rat due to my low GPA. On the other hand, I have two co-authored publications in not excellent but very good journals. Moreover, I have been working two of my professors about 1 year and going to start my master thesis with them which would be really good I think. Furthermore, my university and department is well respected in the Europe.   Actually my main fear is that, in my transcript my low graded courses are in very tangent to my thesis and past projects that I made with those two profs. I believe that in the future, when the evaluator look at my application folder he would be very suprised about my transcript and qualifications, the discrepancy. When I said my grades during this semester to my advisors, they are shocked as I expected. I fear that, that discrepancy would form second thoughts in people's mind.   So my question is, as far as I cannot change my GPA anymore. What should I do more to contribute my application, and show to people actually I know the subject in contrast to my low grades?   This is not a duplicate question, I am asking what should I do. I am not asking the admission process, furthermore I am not in border imo.


Show that the splitting field of $X^n-a$ over a field $K$ is $K(\alpha, \zeta_n)$, where $\alpha$ is a $n$-th root of $a$ and $\zeta_n$ is a primitive $n$-root of unity.


map is differentiable if all compositions with smooth maps are smooth

Let $M$ and $N$ be two differentiable manifolds and $f:M\to N$ continuous. Show that $f$ is differentiable if and only if $g\circ f\in C^\infty(M)$ for all $g\in C^\infty(N)$.  My attempt:  For the direction "$\Leftarrow$" I guess that one could use some kind of identity map, however $g$ maps to $\mathbb{R}$.  For the other direction what I basically have to show is that for every chart $(\psi,V)$ in $M$ one has that $(g\circ f\circ \psi^{-1})^{(k)}$ exists for every $k\in\mathbb{N}$ (don't I?). What I tried is taking a chart $(\phi, U)$ in $N$ and considering $(g\circ\phi^{-1}\circ\phi\circ f\circ\psi^{-1})^{(k)}_x$. I can calculate the first derivative $d(g\circ\phi^{-1}\circ\phi\circ f\circ\psi^{-1})_x=d(g\circ\phi^{-1})_{\phi\circ f\circ\psi^{-1}(x)}\circ d(\phi\circ f\circ\psi^{-1})_x$. I don't really know how to continue since by assumption only the first derivative of $f$ exists. Does someone have a hint?


How to deal with very small probabilities in likelihood?

Similar as in this , I have a problems with small probabilities in likelihoods, but I believe the thread does not apply to me.  The likelihood is a product of probabilities. The log-likelihood is a sum of the log of probabilities. in R I use optim for optimization of a log-likelihood. It then happens that for 'bad' choices of the parameters the log-likelihood contribution (log probability) for some observation(s) is numerically identical to zero in R (but in fact is larger than zero by an infinitesimal small amount). So the sum of the log-likelihood contributions is negative infinity (due to few observations giving this contribution) indicating a bad fit but optimization is not possible anymore.   What is the standard way of dealing with this problem?


Assigning all values to array on the whole

I am writing a Java program and I am using the following code for assigning some variables to an array:  for(int j=1;j<P.maxNetworkPow;j++){     node.succList[j]=node.succ.succList[j-1]; }   Who knows how can I assign the all values to the array without for loop?


I could not find any information on this anywhere (and I don't want to set up a new 17.04 installation just for that), what is the default location of the swap file in 17.04?


What can I do if a package is not available on the newest version of Ubuntu (18.04) but is available on older versions?

I need to install libesd0-dev, but while it is available on earlier versions of Ubuntu from apt-get, it's not available for 18.04. Is there still a way for me to install it, or do I have to downgrade?


Why use apt-get upgrade instead of apt-get dist-upgrade?

I usually use apt-get update && apt-get upgrade to run my updates and upgrades instead of the GUI because it seems to run more quickly.   However, I've noticed lately that I often get a message that one of my upgrades was held back. I then usually run dist-upgrade to run it through and it works fine. As far as I can tell after reading  and its answers, dist-upgrade does all the same things and then some.   So, my question is: Why use apt-get upgrade at all? Why not use apt-get dist-upgrade all the time? Why does apt-get upgrade even exist?