Prove that $X^\ast$ separable implies $X$ separable

Can someone tell me if I got the following right:  Assume $X$ to be a normed vector space over $\mathbb{R}$. Prove that if the dual space $X^\ast$ is separable then $X$ is separable as well.  I'm supposed to use the following hint: First show that for each $x_n^\ast$ we may choose a unit vector $x_n \in X$ such that $x_n^\ast (x_n) \geq \frac{\| x_n^\ast \|}{2}$. Then show that $\overline{Y} = \overline{span_\mathbb{Q} \{ x_n\}} = X$.  My answer:  (i) (by contradiction)  Assume for all $x_n \in X$ with $\| x_n \|_X = 1$ that   $$x_n^\ast (x_n) < \frac{\| x_n^\ast \|}{2} \iff 2 x_n^\ast (x_n) < \sup_{x_n; \| x_n \|_X = 1 } \{ | x_n^\ast(x_n) | \}$$  Claim: Then $\exists r \in \mathbb{R}: x_n^\ast(x_n) < r < \sup_{\dots}\{\dots \}$:  (i) $x_n^\ast (x_n) \neq 0$: because $\| x_n \| = 1$ and $x_n^\ast$ linear  (ii) if $x_n^\ast (x_n) < 0$ then  $2 x_n^\ast (x_n) < x_n^\ast (x_n) < x_n^\ast(- x_n) < 2 x_n^\ast(-x_n) < \sup_{\dots} \{ \dots \}$  (iii) $x_n^\ast(x_n) > 0$ then $\forall x_n: x_n^\ast (x_n) < 2 x_n^\ast (x_n) < \sup$  $\implies $ the $\sup$ is not the l.u.b., contradiction, so the claim $x_n^\ast (x_n) \geq \frac{\| x_n^\ast \|}{2}$ is true.  (ii) Using:   $ x \in \overline{Y} \iff \lnot \exists $ bounded linear functional $f^\ast$ such that $f^\ast (y ) = 0 \forall y \in Y$ and $f^\ast (x) \neq 0$  Let $f^\ast \in X^\ast$. Then $\{ x_n^\ast \}$ dense in $X^\ast \implies$   $$ \forall \varepsilon > 0 \exists x_n^\ast : \| x_n^\ast - f^\ast \| = \sup_{x \in X: \| x \| \leq 1} \{ |x_n^\ast (x) - f^\ast(x)| \} < \varepsilon$$  But for $x_n \in Y \subset X (\| x_n \| = 1)$ we know  $$| x_n^\ast (x_n)| \geq x_n^\ast (x_n) \geq \frac{\| x_n \|}{2} > 0$$   so if $f^\ast (y) = 0 \forall y \in Y$ then  $$ 0 < \frac{\| x_n \|}{2} \leq |x_n^\ast (x_n)| = |x_n^\ast (x_n) - f^\ast(x_n)|$$  $$ \implies \exists \varepsilon: \sup |x_n^\ast (x_n) - f^\ast(x_n)| > \varepsilon$$  $$ \implies \lnot \exists f^\ast \in X^\ast : \forall y \in Y: f^\ast (y) = 0$$  $$ x \in \overline{Y}$$  Thanks for your help.


Defining instance variables in __init__ vs class's namespace?

This had been unclear for me since I began Python: Why would I use this __init__ version:  class FooInst:     def __init__(self, x=None):         self.x = x   Over this version which uses class variables:  class FooCls:     x = None   The second example obviously leads into much less code that seems easier to read to me. Also, there's little to no difference in everyday use:  inst = FooInst() cls = FooCls() print(inst.x, cls.x)  # None, None  inst.x = 1 cls.x = 1 print(inst.x, cls.x)  # 1, 1   So basically I they both have a default value of None and there's no difference between getting the value (obj.x in both cases). I can also set both variables to a value, and it'll work (since cls.x = 1 "replaces" the class variable's value by creating an instance variable).  I know that __init__ is used to create instance variables and class Foo: x = None creates class variables, but why? I find the way of creating class variables to work just fine with instance variables too, and it's much cleaner code!  EDIT: I would use __init__ though if the variable needs some custom behaviour, like this:  class Foo:     def __init__(self, x=0):         try:             self.x = int(x)         except ValueError as e:             log_error(e)             raise e   EDIT2: This question is more about immutable default values, and why should they be done in the __init__ (if they should?) rather than in the class's namespace, so it's not a duplicate to the marked question.  EDIT3: Also, I'm more like asking if there's any reason not to use class variables instead of instance variables; answers like "class variables are shared between all instances, instance variables aren't" don't answer my question, since (as shown below in my code examples) class variables work just as well.


I wonder if somebody was working on slide layout presets for LaTeX Beamer. If you try to create an ordinary slide from scratch most presentation software (e.g. MS PowerPoint) would offer some standard layouts like title slide, two column slide, image slide, multimedia slide etc.  There are many attempts to create two or three column slides, including pictures or not.  My question is if there was a systematic attempt to provide such layout sets for Beamer.


Is there a way to make a webpage/scroll/unending page in LaTeX

Is there a way to write a LaTeX document without page endings. This would make my document into a scroll of sorts, an often used format in webpages (which also have no end).  For example, Microsoft Word has the "weblayout" feature, that does what I want to achieve with LaTeX formatting.  The reason I want to do this is twofold: 1) I am distracted by page-endings in writing/editing my documents. And I don't want to be. 2) I am planning to make a webpage with my document on it, and that doesn't have pages to begin with.   Ideally there would be a website builder like google sites, but which has ingrained LaTeX support. This would also be an effective solution (since it achieves the same thing), but I haven't seen any as of yet.  Does anyone know of ways to do it?


How much do IPL players get paid if they don't play all games in a season?

Two players in IPL 6 (2013), Ricky Ponting and Glen Maxwell, were bought in the player auction for large sums (Ponting close to half a million and Maxwell over 1 million dollars).  Neither of these players ended up playing many games. Ponting played the first 6 and Maxwell just 3. In this case (and I'm sure many other similar examples) do the players get all of that sum, or are they paid on a pro-rata basis. For instance if they played only half the games they would get half the amount?


I think I am missing something when trying to understand the meaning of ROC curve. More specifically, I don't understand why a square with AUC of 1 (100% of the area) is considered ideal. This implies that a classifier results range from achieving TPR/FPR of 1/0 to 1/1 for various thresholds. Yet, isn't the ideal situation 1/0 for any threshold value? That implies no curve is constructed and AUC is undefined.  I am probably understanding something fundamentally wrong.


if n^3 has a fast rate of growth than n^2 i.e. O(n^2)<O(n^3) then why is n^2 better than n^3?

n2 has a lower order of growth than n3. I get it that we can verify it graphically or we can put values like 1,2,3...  n3 attains a value in less time than n2, then why do we prefer n2 of n3?


This code is supposed to be able to read a users input and do any of the options in the menu choice, What Im I missing? Sample outputs are   Enter a sample text: We'll continue our quest in space.  You entered: We'll continue our quest in space. MENU c - Number of non-whitespace characters w - Number of words f - Find text r - Replace all !'s s - Shorten spaces q - Quit  Choose an option: c Number of non-whitespace characters: 6     import java.util.Scanner      public class AuthoringAssistant {     public static void main(String [] args) {      Scanner scnr = new Scanner(System.in);     String mainString = "";      System.out.println("Enter a sample text:");     mainString = scnr.nextLine();       System.out.print("You entered: ");     System.out.println(mainString);      return mainString;   }    public static void printMenu(){        Scanner scnr = new Scanner(System.in);        char menuChoice = '?';        String inputString="";        while(menuChoice != 'q'){         System.out.println("MENU");         System.out.println("c - Number of non-whitespace characters");         System.out.println("w - Number of words");         System.out.println("f - Find text");         System.out.println("r - Replace all !'s");         System.out.println("s - Shorten spaces");         System.out.println("q - Quit");          menuChoice = scnr.next().charAt(0);           if(menuChoice == 'c'){             getNumOfNonWSCharacters();           }else if(menuChoice == 'w'){             getNumOfWords();          }else if(menuChoice == 'f'){             findText();          }else if(menuChoice == 'r'){             replaceExclamation();          }else if(menuChoice == 's'){             shortenSpace();         }       }   return;   }  }


Proof for maximal ideals in $\mathbb{Z}[x]$

I have been trying to prove the following theorem:      Every maximal ideal in $\mathbb{Z}[x]$ has the form $(p, f(x))$ where $p$ is prime integer and $f$ is primitive integer polynomial that is irreducible modulo $p$.    Idea: I tried to establish a homomorphism $\phi: \mathbb{Z}[x] \rightarrow \mathbb{F}$. Since $\mathbb{F}$ is a field it has characteristic $p$ and so integer prime p are mapped to 0 in $\mathbb{F}$. Hence $p\in \ker \phi$. Next we consider $\phi': \mathbb{Z}[x] \rightarrow \mathbb{Z_p}[x]$ and pick an arbitrary maximal ideal $M\in \mathbb{Z}[x]$. So, $\phi'(M)$ is maximal as long as $p \in M$ by correspondence. But now I am stuck at this stage and do not know how to proceed. I guess we might have to use primitivity given in problem but dont know how.


Let $G$ be a simple group and let $n_p$ be the number of Sylow $p$-subgroups, $p$ prime. Show that $|G|$ divides $(n_p)!$ (factorial).  If i start off by assuming G is abelian then G is isomorphic to Z/pZ. So |G| = p, by Sylow's third theorem n_p is of the form n_p = 1+pk, k some integer. n_p must divide order of G witch implies k=0 and n_p = 1. But this would mean that the Sylow-p-subgroup is normal in G, contradicting the simplicity of G. Worse, |G|=p does not divide 1.  So i guess G is not abelian, not really sure how to continue from here.


How do I remove the bar with close/minimize/maximize/app_name in all windows, because I just use keyboard shortcuts to perform these actions?

As in the topic. I don't like wasting space. I run all apps that I can in full screen mode + extensions such as  , but still there's plenty of software where the window bar is visible and takes space. Windows 10. Under Linux I used and enjoyed


I've come across this expression ((void)(obj), (size_t)0)  What purpose does this expression (that looks like half a function signature) serve here?   :   #define ers_alloc(obj,type) ((void)(obj), (type *)aMalloc(sizeof(type))) #define ers_free(obj,entry) ((void)(obj), aFree(entry)) #define ers_entry_size(obj) ((void)(obj), (size_t)0) #define ers_destroy(obj) ((void)(obj), (void)0) #define ers_chunk_size(obj,size) ((void)(obj), (void)(size), (size_t)0)


What's the most efficient way to select the last n rows in a table without changing the table's structure?

What's the most efficient way to select the last n number of rows in a table using mySQL? The table contains millions of rows, and at any given time I don't know how large the table is (it is constantly growing). The table does have a column that is automatically incremented and used as a unique identifier for each row.


Most intuitive way to offer manual sorting?

all.  I'm designing an online form builder (think Forms in Google Docs / Spreadsheets).  The functionality is complete, but I'm not happy with the sorting capabilities.  Everyone that I have done usability tests with (five or so, including myself) didn't realize that the items could be sorted. This leaves me with a question:  Is there a best practice / most intuitive way to present a list to be manually sorted? As a few examples: Google Docs / Spreadsheets / Forms: Google's method is to have almost no indication that the items in their Forms can be sorted.  They use cursor: move; in their CSS to indicate that it is moveable, but nothing more. jQuery UI:  is fairly similar.  Almost no interface, save for a double arrow on the left hand side.  This is what I am currently using which is not being recognized by users. Up/down buttons: I can't think of any examples, but I have seen sorting using [+] and [-] buttons.  This seemed to be easy for users to pick up on, but meant the possibility of requiring n-1 clicks to get from the bottom to the top.


I have been confused by different interpretations of polynomial and monomial. Is $\sqrt[3]{x^3}$ really a monomial?


Possible Duplicate:          When I'm referring to a group of multiple things, should it be considered singular or plural for the purposes of applying a verb to it?  For example, which is correct in the examples below?     A sentence is a group of words that is followed by a period.   A sentence is a group of words that are followed by a period.      The group of people constitutes a jury.   The group of people constitute a jury.      A group of crows is called a 'murder'.   A group of crows are called a 'murder'.   My instinct is that it depends on whether the verb is referncing the group itself or the members of the group directly, but is that right?


Give the combinatorial proof of the identity $\sum\limits_{i=0}^{n} \binom{k-1+i}{k-1} = \binom{n+k}{k}$

Given the identity  $$\sum_{i=0}^{n} \binom{k-1+i}{k-1} = \binom{n+k}{k}$$  Need to give a combinatorial proof   a) in terms of subsets  b) by interpreting the parts in terms of compositions of integers  I should not use induction or any other ways...  Please help.


How to get all create for index and Constraints in PostgreSQL using just SQL

I want a sql to get a list of CREATE of all Index and Constraints in a table 'tablename' just using SQL.


Wings serve most birds for flying, or (as in penguins) for swimming. But ostriches, which exclusively use only their legs for locomotion, still have wings. Why?


I was writing a document in Microsoft Word, and it flagged "less resources" as being ungrammatical and suggested "fewer resources".  I did some research, and it appears that "fewer resources" seems to be used more often, and one commenter on another English usage site said this was correct.  But this seems odd to me.  I try to be diligent about using "fewer" with countable nouns; a phrase like "The software has less bugs than it did last week" just grates on me.  But even though "resources" is a plural and thus looks like a countable noun, it doesn't seem as though it should be, logically.  If I were to write a business analysis that said "Plan A requires fewer resources than Plan B", would that mean that, say, Plan A would require only 15 resources while Plan B might require 17?  This doesn't make sense.  But is it possible for a noun such as this to be considered countable, grammatically, even though it makes no sense to use it with an actual count?


Tapping a comment from a nonexistent user crashes the app

I'm using Android App v1.0.23 on a HTC Velocity 4G running Android 4.0.3.  In  I've noticed that tapping the comment from user660 instantly crashes the app. I suspect it is because they don't exist any longer!


Is there one photon per wavelength of light?

This makes intuitive sense to me but I have never heard anyone confirm it. Is it one photon per wave length or does it approximate one wavelength or something else?


Confused about the definition of conformal transformation

Recently, I read some books and articles about conformal field theory and I find there exists two completely different views about conformal transformation...  The first is that: Conformal transformation is a special coordinate transformation, or diffeomorphism, that leaves the metric invariant up to a scale change.  Francesco's Conformal Field Theory hold that view, as well as some other references such as "Applied Conformal Field Theory" by Ginsparg:   And the second one is that: Conformal transformation is only a rescale of metric and we do not transform coordinate. It can be done by a diffeomorphism followed by undoing the associated metric transformation or undoing the associated coordinate transformation.And it seems to be exactly a Weyl transformation.  Wald hold this view in his book "General Relativity". And he said a CT is not, in general, associated with a diffeomorphism.  And I get confused. Which one is correct....I can not bear it that a basic concept have two completely different, even contradictory interpretation... Or they are just my misunderstanding?


I recently installed Ubuntu 12.04 on my desktop. I have three monitors, and after installing, ubuntu only detected one at 1080p. I downloaded the driver from the nvidia website, but when I stop lightdm and try to run the driver, it gives me an error message:     ERROR: Unable to find the kernel source tree for the currently running   kernel.  Please make sure you have installed the kernel source files   for your kernel and that they are properly configured; on Red Hat   Linux systems, for example, be sure you have the kernel-source or   kernel-devel RPM installed.  If you know the correct kernel source   files are installed, you may specify the kernel source path with the   --kernel-source-path command line option.   I tried instead to install the driver via the terminal, with the X ppa. The installation seemed to work, but when I rebooted, my display was at 640x480 resolution, with no other options for resolution. The NVIDIA X Server settings program is there now, but when I run it, it simply tells me that I don't seem to be using their driver, and that I should run nvidia-xconfig as root. Doing so doesn't help, I simply get the same issue again. I checked the file at /etc/X11/xorg.conf, and it's an NVIDIA file (has nvidia in the header).  Does anyone know something else I can try?  EDIT: Forgot to mention, I tried installing drivers via the     Additional Drivers   GUI utility, there were two options, one of them marked     post-release updates   I tried both of them, in both cases it tried to download and install for a while, then said that there was an error, and that a description could be found at /var/log/jockey.log. Both logs were over 700 lines.


I'm using Ubuntu 18.04 but my .sh files will not execute they just open up in gedit. I have tried changing what the file opens with but Idk which application to choose from the list.


What's the shortest input that makes TeX and/or TeX-based systems go into a loop?

The following 12-character input causes TeX to go into a loop.  \def\x{\x}\x   It won't crash, it won't produce an error message, it'll just sit there for ever, trying to compile the document (but not getting anywhere because no matter how many times it expands \x, it just gets \x back again).  Is there a shorter input that confounds TeX in a similar way?


In MySQL, I could fire off these statements to insert 5 rows in one shot:  CREATE TABLE t (id int primary key auto_increment) INSERT INTO t VALUES (DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT),(DEFAULT)   How can I do the same thing in MS SQL Server?  P.S.  The reason that the suggested duplicate doesn't solve the problem is that it has tables with non-identity columns.  My Table only has an identity column.


how to have a caption on top of longtable?

I want to have a longtable like this:  \begin{center} \begin{longtable}{|p{2cm}|p{3cm}|p{7cm}|p{3cm}|} \caption{my caption} \hline 1 & 2 & 3 & 4\\  \hline  \hline 1 & 2 & 3 & 4\\ \hline 1 & 2 & 3 & 4\\ \hline . . . 1 & 2 & 3 & 4\\ \hline  \label{variability_impl_mech} \end{longtable} \end{center}   but when I try to compile this, I get this error: !Misplaced \noalign  when I write the caption after the last \hline, it works fine. I want to have the caption on top of my table but this error appears.


If a,b,c are the sides of a triangle ABC then prove $$ a/(b+c) + b/(a+c) + c/(a+b) < 2 $$I tried to solve this by triangle inequality but i was not able to get to the solution.


What Happens When You Have Multiple Unarmed Strike Dice?

So, while flipping through the PHB, I've noticed that in 5th edition, multiple abilities can give you a buff on your unarmed strike, such as a monk's Martial Arts ability, the Tavern Brawler feat or an Aarakockra's claws. If I were to make a monk with the Way of the Drunken Warrior archetype and give him the Tavern Brawler feat, is the d4 for unarmed strike from the feat rendered useless?


Proving symmetry and eigenvalues on Arbitrary Matrix

For any $v \in \Bbb{R}^n$, $$ A = vv^T+\lambda I$$ show A is symmetric and A has eigenvalue $\lambda$ and $||v||^2 + \lambda$ I was also given the hint to consider eigenvectors $v$ and $w$ where $w \in span(v)^\bot$ Not sure where to start, any help is appreciated


How to find all integer $x$ such that $x^{2}+5145x+2332\equiv 0\pmod{ 9797}$. I think $9797$ can factor, then $9797=97\cdot11$. So I can convert to $$x^{2}+5145x+2332\equiv 0\pmod{97}$$ $$x^{2}+5145x+2332\equiv 0\pmod{11}$$ How do to next? Thanks.


Consider a matrix A of $a\times b$. If we know the how the rank of the matrix is related to a and b, we can determine (maybe not exactly) the number of solutions for the system.  Now, if we know the number of solutions for the system (infinite, for example), what's the relationship between rank(A) and a and b? How do you prove that? Thanks for answering, I'm so confused.


Is there a 9 digit Zip Code (Example- 75001-6664, Zip + 4) data set that I can download? Please advise.


How do I update my Samsung Galaxy Europa?

What is the latest official firmware for Samsung Galaxy Europa? I am currently on 2.2 Froyo at the moment. Can I update it using Samsung Kies, or do I need to update from somewhere else?


I am using a Samsung Note 2 (N7100) running on root. I want to know where Chrome for Android saves its cache files. Like on Windows, the cache is located on ..\AppData\Local\Google\Chrome\User Data\Profile 1\Cache. Where is the location for Chrome for Android's cache?


"x questions with new activity" is wrongfully showing in linked questions list

When a question got many other questions linked from/to it, there is a special page showing list of all those questions, e.g.   I just noticed while leaving it open, that the live refresh is active in there and showing "x questions with new activity" whenever there is new activity, even if in a question not linked to/from the original question.  I think the live refresh should be disabled while in that view, or filtered to load only questions actually being linked.


Where would one ask questions pertaining to architecture of buildings? (Like the kind Ted Mosby of "How I Met Your Mother" would be interested in)

I am not a person who has studied architecture or any form of engineering streams. Just one with cursory interest in decors an building techniques, old and new. The type who watches those  documentaries like 'MegaStructures'  I was looking for a place where I can ask questions about such topics. For example: "the type of glasses covering typical multistory office buildings" or "How do engineers compensate for metal expansion in large bridges?"  Can anyone direct me to the correct Stack exchange site?


What's the difference of the Userland vs the Kernel?

I am trying to understand exactly what is userland? everyone that I ask says: "Anything that is not kernel". but it is not tangible for me. When I am reading that kernel can run that driver on the userland or something like that; I can't quite imagine what will happen!. So I will appreciate if someone set me straight in this regard.


Is "Whom do I look like" the 'proper' way of saying "Who do I look like?" I know that second option is the most used one, but still


public ActionResult Customer(string fullNameSpace) {     var genType = fullNameSpace.ToGenericType(); //how can I do this?     var clList = _adminService.GetCustomerList<genType>(23);     return PartialView(clList); }   public IEnumerable<CustomerVM> GetCustomerList<S>(int clientId) where S : IEntityVMSortOrder{     ... }   Without changing the GetCustomerList function, how can I produce genType from the passed string argument? If this is possible at all.


What is meant by "50% related to sibling" versus "95% related to chimpanzee"?

Obviously I am more related to my sister than to a chimpanzee, so what do these different percentages actually refer to?   Here is my preliminary research:


Why should students be asked to register for a co-supervisor?

The university where I'm doing my PhD is asking me to register a co-supervisor.  However, I don't really know the role of co-supervisor. What exactly is it for? Does it mean that for every publications we do, we should also add him in the authorship?!


Draw a diagonal arrow across an expression in a formula to show that it vanishes

I would like to find a way to cross out a term in a mathematical expression with a diagonal arrow pointing from lower left to upper right and with a little "zero" next to the pointy end of the arrow.


What do the symbols on the top left of the character select screen mean?

The symbols I'm talking about are above the win streak sheet, and to the left of the "Who am I?" sheet.  I'm not sure but I think I've seen these symbols appear more and more as I win games. Does anyone know what they mean?


FATAL_ERROR|System.ListException: Duplicate id in List

HI I wrote the webservice i am updating the field in quote object field based upon the opportuntiy field but it showing an error FATAL_ERROR|System.ListException: Duplicate id in list  Error occur Line------->>>>        qtobj1.StageName = 'Closed Won'; oppitemlist.add(qtobj1); update oppitemlist; // ERROR LINE     global class OrderUpdate {  }  global class Inputcomb{  webservice String tax; webservice String stagename; } global class ResponseClass{   webservice static ResponseClass myMethod3(RequestClass1 req1)    {         map<id,Opportunity> oppitemmap=new map<id,Opportunity>([select Name  from Opportunity  where id In:idlist1]);    if(oppitemmap!=null){           {              if (qtobj1!=null){             qtobj1.Name=icobj1.ordId;            qtobj1.Amount = Decimal.valueOf(icobj1.amt);            String[] str = icobj1.ordcdate.split(' ');           String[] dts = str[0].split('/');           Date myDate = date.newinstance(Integer.valueOf(dts[2]), Integer.valueOf(dts[0]), Integer.valueOf(dts[1]));            qtobj1.CloseDate = myDate;              oppitemlist.add(qtobj1);              } } }     try{   update oppitemlist;   res.resoppId =qtobj1.Id;   res.status = 'Success';   }catch(exception e){    res.status = 'Fail';    }      integer cnt = req1.inputcombList.size(); // to count the total size of the respose array    for(integer i = 0; i< cnt; i++)    {       List<Quote__c>  quotes; // creating the object of quote     quotes = [SELECT Id,Tax__c,Shipping_Cost__c FROM Quote__c WHERE Opportunity__c = :req1.inputcombList[i].oppId]; // selecting the quote details by qoute id    if(quotes.size()>0)    {     quotes[i].Tax__c = Decimal.valueOf(req1.inputcombList[i].tax);// setting the values     //quotes[i].GrandTotal__c = Decimal.valueOf(req1.inputcombList[i].Amt); // setting the values     quotes[i].Shipping_Cost__c = Decimal.valueOf(req1.inputcombList[i].sCost);     quotes[i].StageName__c = req1.inputcombList[i].stagename;     if(req1.inputcombList[i].stagename == 'Ordered')     {       qtobj1.StageName = 'Closed Won';        oppitemlist.add(qtobj1);        update oppitemlist;     }     else     {       qtobj1.StageName = 'Closed Lost';       oppitemlist.add(qtobj1);       update oppitemlist;      }      try{         update quotes; // updating the quote     }catch(exception e){  system.debug('Error : updating tax for quote line items ' + quotes); }  // throwing error message    } }  }  // End Of If Loop  }      return res;           }     }


fread: How to know the size of the buffer?

In C, when I am reading a file, or some other input, all at once with fread how would I know what size to declare the buffer with?  char buffer[1024]; fp = popen("ls /", "r"); fread(buffer, 1, sizeof(buffer), fp);   The input data could have 1000 lines or 1 line, or even 100000 lines or more.  Is there any general rule for it?


How to create curved edges (something I thought was impossible) like this internet example?

I have always believed that edges are always straight in Blender, that that is just how it works.  then I ran across topologyguides.com. Their tutorials are terse, but take a look at this one and in each picture the final step has curved edges.  I don't know if they are using an add-in, or what.  I haven't been able to find an answer for this.


Do I need a transit visa for a layover in Finland while I have a Danish residence permit?

I have a residence and work permit for Denmark and since I'm flying there for the first time, my passport has not been stamped. Do I need a transit visa if I'm travelling through Finland (since it's in Schengen area), if that is going to be my first port of entry?  Also, does the same apply for a layover in any other Schengen country?


Update variable outside of preg_replace_callback from within the callback

I have a function which looks something like this...  function filterwords($input='poo poo hello world bum trump'){      $report_swear = 0;      $badwords = array('poo','bum','trump');      $filterCount = sizeof($badwords);      for($i=0; $i<$filterCount; $i++){             $input = preg_replace_callback('/\b'.preg_quote($badwords[$i]).'\b/i', function($matches) use ($report_swear) {                 $report_swear++;                 return str_repeat('*', 4);             }, $input);     }      print_r($report_swear);      return $input;  }   In this example I would expect the $report_swear variable to return 4 but it still returns 0.  Any idea how I alter this within the callback?  Thanks


Generating list of manually installed packages and querying individual packages

I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that from the command line?


So I have seen questions that ask  or   What I am wondering is, according to the history of the  is it actually possible to break the Elder Wand?  Or to ask that question another way, since the Elder Wand is so drawn to strength and power:     However, the Elder Wand knows no loyalty except to strength. So it’s completely unsentimental. It will only go where the power is. (JKR, )   Is there evidence that the Elder Wand would act in self defense to prevent someone from breaking it so it could continue to seek out strength?


Let a ∈ Z and suppose that the congruence $x ^2 ≡ a \mod p$ can be solved for all primes p except possibly finitely many, then a is square .

Let a ∈ Z and suppose that the congruence $x ^ 2 ≡ a \mod p$ can be solved (in x ∈ Z) for all primes p except possibly finitely many, then a is a square in Z (i.e. a = b 2 for some b ∈ Z).  I tried solving the contrapositive and look at two cases:  $a = 2$ and $a \neq 2$.  For the first case i have proven that there are infinitly many primes that have a negative legendre symbol. So that has been proven.   I get stuck at the second case, i got a hint but i don't see how it can help me it says:  let a = $2^eq_1.....q_n$ and $L = \{l_1.....l_k\}$ be a set with primes that are odd and distinct of $q_i \forall i$. Let $s$ be a quadratic non-residue $\pmod{q_n}$. Argue that there exist a $b \in \mathbb{Z}$ such that:  $b \equiv 1 \pmod{l_j} \space \forall l_j \in L$  $b \equiv 1 \pmod{q_i} \space i \in \{1,....,n-1\}$  $b \equiv 1 \pmod{8}$  $b \equiv s \pmod{q_n} \forall i$  and prove that $\left(\frac{a}{b}\right) = -1$. which also worked.  The next hint was proving that there exist a $p|b$ with $\left(\frac{a}{p}\right)$ and $p \notin \{2,l_1,.....,l_k\}$  I think that such $b$ exist by the chinese remainder theorem, i dont see how the last statement is true and how it helps me to prove this equality.......  Kees


I have come across both the phrases - 'on the internet' and 'over the internet.'   I'm pretty sure that both are correct but then which to use when?  Please note, I'm well aware of all over the Internet which I'm not concerned about.


Prove that $g(x,y) = \frac{x^3y}{x^2+y^2}$ with $g(0,0)=0$ is continuous

Consider the function $g:\mathbb{R^2} \rightarrow \mathbb{R}$ defined by   $g(x,y) = \left\{\begin{matrix}  \dfrac{x^3y}{x^2+y^2}& \textrm{if } (x,y) \neq (0,0) \\   0 & \textrm{if }(x,y) = (0,0) \end{matrix}\right.$  How do I prove this is continuous?  I know that I have to:  Consider $x_0 \in \mathbb{R^2}$, and let $\epsilon > 0$ be given. I am confused on how to pick a $\delta$ that will work such that $d(x,x_o) < \delta$.


For the following print statement  std::cout << 10.1 / 0.1 << " " << (int)(10.1 / 0.1) << std::endl;   My understanding is that (10.1/0.1) is 101.0 hence after typecasting as an int the result should be 101. Instead I received 101 100. Can somebody please explain me why it is so???


How to INSERT $table in php / sql (variable)

I want to insert into a table which i created just before inserting. The Tablename is in a variable (e.g. $table).  The error message states that the problem is near that variable.  I tried $table '$table' '$table' '.$table.' '{$table}' '.{$table}.'   CODE:  $sql = "INSERT INTO $table (Absender,TimestampGesendet,Typ,Nachricht,Status,Status_Termin)                  VALUES ('{$userid}','{$timestamp_gesendet}','{$typ}','{$nachricht}','0','{$status_termin}')";   ERRORMESSAGE:     INSERT into 90 (text,id_absender,TIMESTAMP_gesendet,TIMESTAMP_empfangen,Status,Typ) VALUES (,91,1559806806,1559806806,'0',1)   You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '90 (text,id_absender,TIMESTAMP_gesendet,TIMESTAMP_empfangen,Status,Typ) VALUES (' at line 1Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '90 <-THIS IS THE TABLENAME! (text,id_absender,TIMESTAMP_gesendet,TIMESTAMP_empfangen,Status,Typ) VALUES (' at line 1   backclikcs doesn't work at all, as mentioned above. can there be issues if the source-code is in utf-8?


What are the requirements for making fireworks appear at the end of a level in the original Super Mario Bros.?


Does Searle's Chinese Room model computers correctly?

Searle invented a thought experiment, the , which he proposes is an argument against Strong AI (that machines think) but not against Weak AI (that machines simulate thinking), he has a man in a room manipulating chinese symbols via an instruction book written in english.   My question is, Where does this instruction book come from? We're all aware that humans write the code that drives a computer, or writes code that writes more code to drive a computer (ie a compiler) etc.  My clarification (that is, if it is), of Searle's Chinese Room thought experiment, is to have a man (John) who doesn't understand Chinese in a room with two windows. At one window, someone (Mai) submits questions in Chinese, at the other window stands a man (Lao) who does understand Chinese; when a question is submitted, John takes the question walks across the room, and passes it through the window, and gives it to Lao, who reads it, answers it, and then John walks back to the first window, and hands the answer back to the Mai.  To Mai, it appears John understands Chinese (even, if he rather strangely refuses to speak it). She is not aware that he has a secret human collaborator, Lao.  I think this models what actually happens in a computer, much more clearly. But is this an accurate analogy?


Conditions: do not modify the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 version. Is there a simpler way than: List<String> newList = new ArrayList<String>(); newList.addAll(listOne); newList.addAll(listTwo);


Is there any way to overcome the glitch in Mass Effect 3 that results in Eve dying with Maelon's data available and prior missions complete?

I've played through the game three times now on Xbox 360 with imported characters, and can't seem to save Eve, no matter what I do. I've saved Maelon's data, had all possible missions complete before doing "Priority: Tuchanka," chosen all paragon in favour of the Krogan, and tried both to talk to Eve on Normandy and to not talk to her (the second was a suggestion found online.) I've read in a few places that it's a glitch. Is there any way to resolve the glitch so I can finish the game without being P.O.'d that my choices weren't a factor in this particular outcome of the game? It's getting exceedingly annoying.


I want to know how high voltage generator works

is the product im reffering to. I have seen this product being used in many DIY and wanted to know the circuit it uses and how it is able to step up the voltage so high in such a small space and price.


Space of probability measures "complete"? (In the other sense)

I want to consider a space of probability measures on some set $X$, such that the space of measures is complete, not in the sense of  (though probably that too), but as in the standard analysis meaning. I haven't studied far enough in probability measures, so I can't tell -- what conditions do I need on my space such that it is complete? And how should I metrize it?   Thanks!  Edit: A reference/citation to a text would also be super helpful!


Does encrypting the key with itself make it easier to crack the ciphertext?

As the title states; Is there any risk from encrypting the key with itself? EG. $C = AES(K=K, M=K)$  I'd assume not; after all, how does having the key for a safe inside the safe make it easier to pick the lock?


I have to determine $$13^{498} \pmod{997}$$  I know that it can only be $1$ or $-1$. But I don't quite know which. How can I decide?


I saw two "declined" flags I'm supposed to have cast on .    I do, however, remember being sympathetic with the OP and it would seem odd that I cast two such flags. Also shouldn't those be votes rather than flags? Also I wonder about the quick succession.  Could anybody with the access and a minute to spare satisfy my curiosity and tell me what happened here?   (Totally low priority, I am probably just not remembering what I did back then and everything's perfectly normal.)


How do you set environment variables for a single command on Windows?

Is there a way to set environment variables for a single command on Windows like ENVVAR=abc command on Unix?  Variables set by set command on Windows seem to remain for the following commands, but this is not what I want.


How is the weibull distribution parameterised in survreg() in R

I was looking at how the weibull distribution is parameterised in survreg() in R and found a similar query posed in a thread at stack overflow:   The OPs query yielded 2 opinions:  1) scale=exp(intercept) 2) scale=exp(Intercept+beta*x)  If you go through ??survreg, you get this:  a) survreg's intercept = log(rweibull scale)  I also went through ??survreg.distributions and found this:  b) survreg scale parameter maps to 1/shape, linear predictor to log(scale)  b) obviously makes better sense - am I reading this right  To be more specific, I want to know how is the scale parameter from dweibull linked to the linear predictor from survreg(). I also consequently want to know how to compute the hazard function from the survreg() output.


case insensitive, list files in directory, ending in .jpg

I'm trying to write an alias to list all the files in a directory ending in JP(E)G in its various forms. The ones I'm looking for it to recognise are .jpg .JPG .jpeg and .JPEG.  Is there a form of ls (or ls in combination with another command, such as find or grep) that will do this?


Change suggested sites on the migration list

I have reviewed a rather large number of SO posts, but I'm still very puzzled about the suggested sites on the migration list.  For example, why are  and  present but  and  are not even when quite a few questions on Stack Overflow are iOS or Android specific.  Recently  was replaced by . How come?


no root file system defined error in ubuntu 13.10 installation

I have installed ubuntu 13.10 along with windows 7 without creating any new partition. I am using a bootable pendrive to do so and the installation completes succesfully in the same drive in which windows is installed. But when the pc restarts to complete the installation this error shows up !! This same thing is successfully completed in another pc but in my pc it is showing an error. Pls help as i dont want to create a new partition and dont want to run it as a live cd.


NullPointerException using Quartz rescheduler function

I am new to Quartz API and currently using quartz version 2.2.x to create a scheduler class object in java to support my school project but encountered null pointer exception with scheduler.rescheduleJob(trigger.getKey(), cronTrigger); at rescheduleCron function. I am trying to setup a function to accept cron expression to reschedule quartz jobs and have no idea what I am doing wrong. Please help me to rectify this error.   public class quartzScheduler {  public JobDetail job; public Trigger trigger; public Scheduler scheduler;  public void quartzScheduler() throws SchedulerException,InterruptedException {     job = JobBuilder.newJob(quartzJob.class)             .withIdentity("quartzJob", "group1").build();      trigger = TriggerBuilder             .newTrigger()             .withIdentity("quartzTrigger", "group1")                             .startAt(futureDate(1, IntervalUnit.HOUR))             .withSchedule(                     SimpleScheduleBuilder.simpleSchedule()                             .withIntervalInHours(1).repeatForever())             .build();      scheduler.start();     scheduler.scheduleJob(job, trigger); }      public void rescheduleCron(String cronExpression) throws SchedulerException     {         Trigger cronTrigger = TriggerBuilder             .newTrigger()             .withIdentity("quartzTrigger", "group1")             .withSchedule(cronSchedule(cronExpression))             .build();          scheduler.rescheduleJob(trigger.getKey(), cronTrigger);         }   public static void main(String[] args)  {     quartzScheduler sch= new quartzScheduler();      try {         sch.rescheduleCron("0 0 * * * ?");     } catch (SchedulerException ex) {         Logger.getLogger(quartzScheduler.class.getName()).log(Level.SEVERE, null, ex);     } }


Change PayPal address from Canadian to USA

I just moved from Canada to US and want to add my USA address and credit card with US billing address to PayPal, but not able to do this. I read this  from 2011, and it looks like I need to open new PayPal account.  Is it only way to do this?   I prefer to use the same account with Canadian and US credits card on it.


I accidentally did `sudo chmod -R g+w /.` 18.04

I CTRL+C after a few seconds but some harm was done already. E.g sudo command was giving an error when I tried to reuse it. Eventually I fixed it with this:    The question is, is my system doomed now? Will it just die next time it tries to update? Is it something that I can fix? Or should I pretend like nothing happened? I am afraid to reboot.


I got this question in a class and can't figure out the answer:  $i^2 = (-i)^2 = -1$  $(e^{πi(2n + 1/2)})^2 = (e^{πi(2m - 1/2)})^2$  $e^{πi(4n + 1)} = e^{πi(4m - 1)}$  $\ln(e^{πi(4n + 1)}) = \ln(e^{πi(4m - 1)})$  $πi(4n + 1) = πi(4m - 1)$  $m = n + 1/2$  Which isn't possible for m and n both being integers. But I can't figure out what exactly is wrong with what is written here.


I am planning to create a NetCDF file from a script (Github). My shapefile is in GCS_WGS_1984 (this is one of the required files for the script). Now, the script requires to define the cell/pixel height and width in degrees. Furthermore, my purpose is to create a grid pixel/cell equivalent to a 500 m by 500 m pixel/cell. I am also posting the lines (degree values don't represent 500 m) where it's asking to define these values for further reference. Moreover, the project area is located in the Pacific North West (US). ###Cell height and width in degree, Edit accordingly cell_h=0.05 cell_w=0.05  Update Based on Mr. Stimsons' comment I have updated my question so that it can make more sense: How can I approximate geographic coordinates (WGS 84) to 500 m? That way I will be able to determine the pixel height and width and replace those values in the code with appropriate values approximating a 500 m by 500 m pixel in degree.


How can I diminish the link, writing few words?

When I copy a link and paste it, it can be so long. I need to shorten it. How can I do that?  How can I make a link from one word? For example, the word here.


null pointer exception on arrayadapter when trying to display the list

So I have an activity in which it gets an XML file through a web service. It reads the XML and stores the relevant texts from that XML to a List<String> object called xmlText. After retreiving all the text, I am starting another activity in which it contains a Linear layout, inside the linear layout is a ListView. I am passing the contents of xmlText by populating an ArrayList<String> object called xmlInString. I then pass xmlInString through an intent.  I want to populate the listView to display the text from the xml file. In the activity I just started, I am populating a List<String> object in which it will contain the elements from xmlInString. I then instantiate the arrayadapter in which the listview calls the method, setAdapter() and I pass in the arrayadapter object.  But everytime I run it, i get an null pointer exception when I run the appCaused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference                                                      at com.w1481217.organiser.wordXMLList.populateList(wordXMLList.java:43)  This is my code:  public class wordXMLList extends Activity {      Intent i;     ListView lv;     ArrayAdapter<String> adapter;     ArrayList<String> xmlInString;     List<String> xml;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.wordlisting);         i = getIntent();         xmlInString = i.getStringArrayListExtra("xml");         lv = (ListView) findViewById(R.id.listView2);          populateList(xmlInString);         adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, xml);         lv.setAdapter(adapter);       }      private void populateList(ArrayList<String> xmlToConvert) {                 for(int i =0; i < xmlToConvert.size(); i++){                     xml.add(xmlToConvert.get(i));                     Log.d("threading", "final output in xmlToConvert: " + xmlToConvert.get(i));                 }     }  }   Any help will be appreciated.


New Macbook Pro - remove "high sierra", install "sierra"

How do I get past the "do not enter" traffic sign that stops me from installing "Sierra" instead of "High Sierra"?  I booted into rescue mode and deleted the original "High Sierra" installation, but booting from the USB stick with the "Sierra" installer on it still gives me the "no".


Ubuntu 18.04 not detecting any wifi network but detects mobile hotspot

Complete Linux beginner here.    I installed Ubuntu 18.04 yesterday, dual booting with Windows 8.1.  When trying to connect to a WiFi network, it doesn't detect any of the networks (not mine or my neighbors'). I tried creating a hotspot from my Android phone and to my surprise, it detected it immediately.  I searched around on the internet and tried restarting the network manager service, changing the channel on my router, and some other things, but nothing worked.  When I boot into Windows, my wifi along with all the other networks is detected and connects with no problem.  Edit: Here's the output of running lspci -knn | grep Net -A3     captaindroid@Akash-PC:~$ lspci -knn | grep Net -A3   08:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]       Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:804c]       Kernel driver in use: rtl8723be       Kernel modules: rtl8723be   09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.   TL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 0a)


I am trying to solve the problem . But I am not certain about the degree of antipodal map.  I my thought, since the preimage of a point $y \in S^k$ is just $-y$, the degree is just $+1$ or $−1$, depending on the orientation of $-y$?


How to compare running time between sorting methods quicksort and mergesort properly?

I have an assignment to compare the execution times for sorting large arrays of integers with mergesort and quicksort. The implementations of the algorithms are copied from a book. They both sort integers in ascending order. I am then asked to state how much faster quicksort is on average. However, with my (albeit small) sample size of tests, I found that mergesort was quicker by a small %, which leads me to believe i'm testing improperly.   I have 2 programs, one for mergesort and one for quicksort. Their main() code is the same (shown below). I create an array of random size between 0 and some chosen upper limit. Then I fill the array with random integers. Then I sort the array and print it. I use the currentTimeMillis() to check the runtime of the programs. I do tests of 10 runs for quicksort and mergesort, add the total time and divide by 10 to get the average running time for the sorts. I did not find that quicksort was faster than mergesort on average. I've also tried using a fixed array size, but the results still do not hint at quicksort being faster. What would be a -proper- way to test?  public static void main(String[] args){         /* create an array of some size 0 to 100000 with            random integers and measure the time it takes            to sort the array in ascending order (where sort() is either quicksort             or mergesort.)         */         long a = System.currentTimeMillis();         Random rnd = new Random(System.currentTimeMillis());         Integer[] array = new Integer[rnd.nextInt(100000)];         for(int i = 0; i < array.length; i++){             array[i] = rnd.nextInt();         }         sort(array);         System.out.println(Arrays.toString(array));         long b = System.currentTimeMillis() - a;         System.out.println("Program runtime: " + b + "ms");     } }  Expected result: Quicksort average running time should be some % faster in comparison to mergesort, for large random integer arrays.  Actual result: Mergesort was slightly faster in most tests  (10K elements, 100K elements, 1000K elements).


HTML formatting in tag when part of a search

Here's a view of the . The tag wiki is displayed with questions with that tag:     and the tag wiki becomes borked:    It seems like words in the tag wiki that matches the tag have HTML tags associated with it.  doesn't show these HTML tags.    :    What's wrong? Can it be fixed?


Enable Apache Virtualhost Site To Only View Over SSL

Viewing site over http and https are both working but prefer to configure it so that ALL visitors ONLY go through the SSL connection so that it always start with https://www.example.com - what am I missing?   I'm trying to do the following: visit http ://example.com and go to https ://www.example.com visit http ://www.example.com and go to https ://www.example.com visit https ://example.com and go to https ://www.example.com  I created and enabled the file name examplesite (see below) in the folder /etc/apache2/sites-available  <VirtualHost example.com:80>   ServerName www.example.com   ServerAlias example.com   Redirect permanent / https://www.example.com/ </VirtualHost>  <VirtualHost www.example.com:443>   ServerName www.example.com   DocumentRoot /var/www/example.com/public_html   ...   ... </VirtualHost>


switch between battery and usb power no microcontroller circuit

Following an earlier question ,  I would love to implement the  as suggested by Russell McMahon.   That way I could switch between 4AA batteries (1.2V*4 or 1.5V*4) and USB power. The battery voltage would nicely be regulated to 5V too. And the idea was to use the shutdown pin of the chip IF USB power is detected. The device also has to work when no batteries are present.  I am not too experienced with this, but I thought to connect the 5V from the USB to the SHUTDOWN pin from the LDO chip. Pitywise, the pin function is inverted, if SHUTDOWN is low, Vout from the LDO chip is low.  I am now considering using an XOR gate to make the thing work:         – Schematic created using   I would love to limit the amount of components, but the number of diodes is already high, and the whole thing feels a bit crafted   My questions:    Is there a better suitable chip (with an inverted shutdown pin) is there a better circuit (without voltage drop) to get this (I would prefer to get rid of D1, but then, the XOR has no desired operation)


By well-ordering theorem: "if $A$ is a set, there exists an order relation on $A$ that is a well-ordering."  Consider $A=R$ to be the set of all real numbers. Could you construct an order-relation that is well-ordered on $R$? (As it seems that the usual order is not well-ordered. For example, $(1,2)$ does not have a least element by the usual order.)


Currently microtype package supports only protrusion in XeLaTeX. Is there an option to use other micro-typography features (expansion, kerning, spacing, tracking) in XeLaTeX?  Or should I forget about OpenType fonts and go back to pdfLaTeX?


How long can a packet of sliced ham be used once opened?

When buying ham slices from supermarket, I get like 10 slices in them. I want to use it for a week.  But the packing says when once opened it should be used within 2 days. So it seems like the 8 slices just always goes into bin. Is it safe for me to keep it from Monday to Friday?  And is there a way to store them?


JRN Financial Solutions, i have been applying for Jobs online and got a random mail offering me a personal assistant role! Is it safe to go ahead with this?


Substitute pattern within a file with the content of other file

I have a text file (devel.xml).  I added the word REPLACETHIS to it in order to replace this string with the content within a different file (temp.txt).  The closest thing I have is this:  sed -i -e "/REPLACETHIS/r temp.TXT" -e "s///" devel.txt;   This inserts the content after the string, and then deletes the string afterwards.  Is this the best way to do it?


is it possible when using count in MySQL to get the individual record ID's

ID      domain 1      yahoo.com 2      yahoo.com 3      gmail.com 4      gmail.com   Let's say I have a statement like this  SELECT ID, domain, COUNT(*) as total FROM table WHERE blah = 123 GROUP BY domain   Is it possible to get each individual ID number, but while in a COUNT? I need to count the records but I also need the individual record ID numbers as well. I am pretty sure this is impossible but ultimately I need the totals and ID's  domain       total yahoo.com     2 gmail.com     2   but also have the ID's (1,2 for yahoo.com) and (3,4 for gmail.com)


Is there a way to plant crops automatically? It may help to build an automatic farm. Perhaps with a hopper or a dropper. Anyway, I already use a system for harvesting with water,but I just need help with planting. Does anybody has an idea? No mods,please.


No wife, no pregnancy, but the son is already named

No  wife, not  her  pregnancy but  the  son's  name  is   soma  lingam (some ×) Aalu  ledu, chulu  ledu kani  koduku  peru  matram  somalingam. (Telugu)  Some people  think  of the future  happening  without  any base  in the  present. This  idiom  is used  to  talk  about  such  people  in  a humorous context. _It  is  not  equal to  building   because  it  is  not  an  impossible  task  for  him to  marry  and  beget  a  son. He is  imagining  things  too  early. The  idiom  is  used  to  talk  about   a  person who  talks  about  something  well  in  advance  without  any  scope  for  such  a  talk. A  married  man may  talk  about   his/ her  son' s  being  christened but  it  is  a foolish  to  talk  about  the  name  of  a  son  well  before  his  marriage  without  having  a  wife. Is  there  such  a   phrase  or   an idiom  in  English?


Help to get back old reputation and badges

I had a profile whose link is .  The problem is when I am logging in it using my e-mail subarshabnrj@gmail.com and password,I find my reputation is not showing and it has been reduced to 1 reputation and 1 badge.  I don't know why. Please help me to get back my old reputation.  UPDATE  Please don't close the question.I worked so hard to earn the reputation and badges.


After upgrading to High Sierra, Boot Camp partition is gone from Startup Manager

First time poster here.  After installing High Sierra on my iMac (27", late 2012) my Boot Camp Windows 10 partition is no longer visible in the Startup Manager (accessed by holding Option-key on startup).  When logged into Mac OS, I can see the bootcamp-disk, and it's also visible in Startup Disk. Edit: it's visible in Finder, hence a different problem than described in other questions.  Edit: When I try to boot to Win from Startup Disk, the computer froze on first attempt. On second attempt, it displayed "no bootable device - insert disk and press any key".  I run OS X 10.13.2. Any help is greatly appreciated, thanks in advance! /Johan  Edit: the disk is a "fusion drive".  Edit: As a (at least temporary) solution, would it be possible to roll back the system using Time Machine, to before the High Sierra uppgrade?  Edit: I solved the issue by simply removing the bootcamp partition, starting from scratch with a new Win 10 installation. However, the Win installation failed several times. The installer wouldn't accept the bootcamp partition. After some googling I did a PRAM-reset, which did the trick. I don't know if this was caused by my original problem with the missing partition.  Thanks for the replies and suggestions, guys!


How can I make some blocks unbreakable in Minecraft but some aren't?

So I want to build a map where the blocks in spawn can't be broken but if you place a block you can break that block but you still can't break the default blocks kind of like BedWars on Hypixel. I thought this was a duplicate of the existing ones but it seems like those would make it so that you either cant break blocks you build or even build them in the first place.


I was stuck with a case where python3 gave me the answer of  int(226553150*1023473145/5)   to be  46374212988031352   even though the answer to this should be  46374212988031350   Please help me with what is going wrong and how do I fix it. Thanks.


This has been , but a long time ago, and got closed for a rather confusing reason (converting comments to answers is not an "exact duplicate" of converting answers to comments), so I'm going to bring it up again.  I think it makes sense to have a user (not asker) option to convert a comment they posted on a question to an answer on the question, if it turns out it led to the asker figuring out the answer. We've all seen askers reply to comments with "@foo Hey, that was it! Post that as an answer and I'll accept it"; why not make it simple for the user to do that? It seems trivial to implement, and there's no formatting issues like there is going from answers to questions. I'm not sure how it could be "abused", because you need less rep to answer a question than to comment on it. I don't know if the answer's post time should be the time of the comment or the time it was converted; I think probably the latter. I also don't know if the comment should be deleted, left alone, or replaced with a link to the answer; again I think probably the last


Do I need to add "to" in every clause in this sentence?

Working in the field helps us to learn how to apply theories to solve real-world problems, to apply […], and to […].   Are the "to" after each comma necessary?


How to check utilization of fixed thread pool

I'm running a Java application that uses a fixed thread pool, where threads are used to make HTTP requests to external services.   The thread pool was purposefully overprovisioned, and I want to obtain some measurements for utilization of the thread pool (i.e, at this moment, 20% of the threads in the pool were free, at this other moment 30% of threads were busy).  Is there an efficient way of checking what proportion of the thread pool (created through the Executors.newFixedThreadPool(x)) is currently performing a task?   I had thought about creating a special monitor thread that continually runs a Callable task, reporting back the utilization, but I wasn't certain if that would impact performance of the tread pool itself (by making threads respond to the monitor instead of making HTTP calls).


Naming an enum while changing the type of a field

So i got several case, i got my own enum for Boolean values:  public enum BooleanValue {     None,     Yes = 'Y',     No = 'N' }   When i changed type of a field in class by renaming (right mouse click-> rename), which was BooleanValue, to bool?, it changed the enum name from BooleanValue to @bool.  So it looks like this now:  public enum @bool {     None,     Yes = 'Y',     No = 'N' }   Question is, what does it give ? Why mechanism decided to do something like this? I just wanted to change type of a field in class, but in fact it changed the entire enum (and its my fault, i shouldnt rename a type).  But im curious about:   Does @ changes anything to that enum ? Its a naming convention or something ?   I met with variable names starting with @, but i renamed a type of a field, which got type of enum, and it suprised me.  Is any difference between using a @ in enum/class names and naming a variable with @ ?


floatrow/subfigure - fit 7 figures in one page - caption as a subfigure

I am trying to put in one page a set of 7 subigures. What I would like to achieve is the following   The 7th image should be placed on the first column on the left hand side of the document (yellow box) The figure caption should be place on the second column on the right hand side of the document, as if it was the 8th subfigure (blue ellipsis) The subfigure letters should be placed below the images, on the center (red ellipses)<--- SOLVED      Any idea on how to do that?  My simple MWE is the following  \documentclass[aps,prc,reprint,superscriptaddress,floatfix,showpacs]{revtex4-1} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{hyperref} \usepackage{color,soul} \usepackage{url} %\usepackage[demo]{graphicx} \usepackage{subfig} \usepackage{floatrow} %\usepackage{subcaption} \usepackage{textcomp} \usepackage{array} \usepackage{dcolumn} \usepackage[pdftex, demo]{graphicx} %\usepackage{biblatex} \usepackage{xcolor} \hypersetup{     colorlinks,     linkcolor={red!80!black},     citecolor={blue!80!black},     urlcolor={blue!80!black} }   \begin{document}  \begin{figure*}[]     \centering     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_2n.png}         %\caption{}         \label{fig:CS_2n}         }     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_2n_m2.png}         %\caption{}         \label{fig:CS_2n_m2}         }\\     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_3n.png}         %\caption{}         \label{fig:CS_3n}         }     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_p.png}         %\caption{}         \label{fig:CS_p}         }\\     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_alpha.png}         %\caption{}         \label{fig:CS_alpha}         }     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_el.png}         %\caption{}         \label{fig:CS_el}         }\\     %\end{subfigure}     %\begin{subfigure}{\columnwidth}         %\centering         \subfloat[]{\includegraphics[width=0.4555\columnwidth]{CS_tot.png}         %\caption{}         \label{fig:CS_tot}         }\hfill     %\end{subfigure}     \caption{Blah blah blah} \end{figure*}   \end{document}


If a user name is long enough, we can comment anything to that user

There is a minimum amount of characters one can comment in each comment. That is obviously to discourage short unnecessary conversational remarks. But if a user name is long enough, we can comment anything to that user. Should there be a fixed number of characters the system will assume how long user names are in the comments, so things can be more consistent and fair? Like if a user has only 3 characters for a name, users who want to address that user will have to write longer than necessary comments, while users with 14 characters or more can get blank comments. This did not answer my question:  because I don't get my comments auto-stripped.


CUDA Error: Out of Memory in cuArrayCreate(&handle, &desc)  I get this error when rendering with Cycles on my GPU. I'm not entirely sure what's wrong with this... My scene DOES have some very high-res textures (up to 10K) and most of the textures also have a map for Gloss, Reflection, Normals, and displacement. My specs are as follows:  CPU: Intel i5-4460 GPU: Geforce GTX 1060 6GB VRAM RAM: 8GB


On the recommendation of some regulars here, I managed to watch the movie The Madness of King George  over the weekend, and found it excellent.  Anyway, one funny scene in the movie is when King George, who despite being contentedly married is quite flirtatious, remarks on the looks of one of the Queen Consort's ladies-in-waiting to the head of his attending guards:     That's Lady Penbrook. Handsome woman, what? Daughter of the Duke of Marlborough...husband's an utter rascal.    Is the usage of "handsome" here archaic, or just rarely used by those in the know? If the former, when did it become so?


Reading a text from a file in java with ArrayList

I want to write a method for reading a data from a file in java using ArrayList instead of static String[] array. This is what I wrote so far:   public static ArrayList<String> loadText(String file) {     ArrayList<String> ret = null;     BufferedReader in = null;     String line = null;         try {             in = new BufferedReader(new FileReader(file));             while((line = in.readLine()) != null) {                 ret.add(line);             }         } catch (Exception e){             e.printStackTrace();         } finally {             if(in != null) {                 try {                     in.close();                 } catch (Exception e){                     e.printStackTrace();                 }             }         }          return ret;     }   And this is how i called this method in my Test class:  import java.util.ArrayList;  public class Test {      /**      * @param args      */     public static void main(String[] args) {         // TODO Auto-generated method stub         ArrayList<String> text = Files.loadText("podaci.txt");          System.out.println(text);     } }   There is a problem with:   ret.add(line);  I'm getting NullPointerException, and i can't figure out why...


Is it ok to change CPU rate limit of SID mid process?

One process in particular is using a lot of CPU (100% and raising temps to 95C) which needs to run for long period of time(~3 hrs). Using this  helped limit the usable bandwidth of CPU to 50%. But unfortunately it slowed that process considerably(~9hrs), is it ok if I raised the CPU rate limit to higher number mid process.  Process does not allow changing affinity or priority!


Are the commas correctly placed outside the quotes?

The questions "Who?", "What?", "When?", "Where?", "How?", and "Why?" remain unanswered.  She was tired of his "Where were you?", "How many drinks did you have?", and " Were you unfaithful to me?" questions.  Please, no recasts.  Thank you.


Has the Marvel Universe ever crossed over with DC Universe?

Has the Marvel Universe ever crossed over with DC Universe in any books, comics, cartoons or movies?  I mean did any character or event, maybe idea or location slip from one universe to the other?  I often see art where DC characters fight, talk, drink, play, etc. with characters from Marvel.


Why does using a tilt-shift lens make things look miniature?

This question isn't so much about how to achieve the effect of making a scene look like it's modelled in miniature, but why tilting the focal plane creates the effect. What is it about photographing miniatures that makes them look like miniatures, and how is this replicated by tilting the focal plane?  I can understand how when photographing a model of a scene, you have a much higher magnification, which leads to a shallower depth of field compared to when capturing the real-sized scene, but how does tilting the focal plane help? Is it just that you have the focal plane tilted relative to the plane that most of your subject is on, so that you can achieve a narrower depth of field for the focal length and aperture, or is there more to it than that?


What is the opposite command to `CTRL + L` in a browser?

In most browsers (like Chrome, which I use) CTRL + L will take you to the address bar. Is there a shortcut for going back to where you were before clicking CTRL + L?  Example.   I am writing a message.  I click CTRL + L to go to the address bar and copy part of the current URL.  I click XXX to return to the message that I am writing and paste the URL. I happily go on with my life (without ever taking my hands of the keyboard)      is not what I want.


What does the numpy std documentation mean when it says it is always biased?

The  states:  The average squared deviation is typically calculated as x.sum() / N, where N = len(x). If, however, ddof is specified, the divisor N - ddof is used instead. In standard statistical practice, ddof=1 provides an unbiased estimator of the variance of the infinite population. ddof=0 provides a maximum likelihood estimate of the variance for normally distributed variables. The standard deviation computed in this function is the square root of the estimated variance, so even with ddof=1, it will not be an unbiased estimate of the standard deviation per se.  (emphasis added) What does the final statement in bold mean?  Where does the estimate break down and become biased?


how can install all packages without internet in ubuntu 16.04

I am trying to install a software where there is no internet in system.So i need to install all packages which available in Ubuntu 16.04.How can do that?


How could I identify when a user does an operation through data loader?

In our org, we are trying to block some triggers when an account is being updated through data loader.  Our strategy was to get the logginHistoryId with getCurrentSession method from the SessionManagement class. With this logginHistoryId query for that particular logginHistory and display the field Application.  Id loginHistoryId = Auth.SessionManagement.getCurrentSession().get('LoginHistoryId');         LoginHistory loginHistory = [select Id, Application from LoginHistory where Id =: loginHistoryId];         System.debug('Login Application: ' + loginHistory.Application);         if (!loginHistory.Application.contains('Bulk')) {             // Execute Trigger         }   If there is a mention of Bulk we would block would not execute the trigger.  This seems to work when a user logs in through the UI, but when we try it with the data loader we get this error.  System.UnexpectedException: Current session unavailable.   Is there an other way to found out if the user logged in through Data Loader?  In essence what I am trying to do is get the current session of the running user with  Id loginHistoryId = Auth.SessionManagement.getCurrentSession().get('LoginHistoryId');   with this map retrieve the LoginHistoryId and query the Application  LoginHistory logInApplication = [SELECT Id, Application FROM LoginHistory WHERE Id =: LoginHistoryId].Application   This works fine. But unfortunately when logged on through Data Loader I get the error  System.UnexpectedException: Current session unavailable.


Folder permissions, red x on user object

On shared folders on the file server, for the domain user name object under the security tab, the icon has a red x.  There are no symptoms, the users have full access, there is just a red x on the icon for their name.    Why is this?  For clarification, logged into the windows 2008 r2 file server, browse to a users shared folder, right click on the folder, hit properties, click the security tab. The object representing the users domain name has a little red x on the lower right hand corner of the icon that looks like a single man. There are no symptoms beyond me wondering why the red x is there.  update: it does not show the x when you look at permissions from a workstation, only on the file server


Can a set of positive measure and its complement both have empty interior?

This might be silly, but I am not sure:  Does there exist a Lebesgue measurable subset $E \subseteq (0,1)$ such that   $E$ and $(0,1) \setminus E$ both have positive Lebesgue measure. $E$ and $(0,1) \setminus E$ both have empty interiors.   If we relax condition $1$, then $E=Q\cap (0,1)$ works. If we relax condition $2$, then the . (Its complement have non-empty interior though).


Apple Preview Program messed up the shortcuts after the Yosemite update

I am trying to annotate my documents with text. In the old preview, I could change to Text Box and click where I wanted to place the text on my document. It would stay on text box and I could click around and conveniently put multiple texts boxes around the page.  After the update to 10.10, when I use the shortcut Control+command+T, it places a text box in the middle of the page(where I don't want it) and keeps selection tool on... I can't put multiple text boxes around the page because it goes right back to highlighting text. I also have the issue with arrows and lines. It places one when I use the shortcut, but I can't use my mouse to guide where it goes.


Find what app is causing popups, NOT in notification bar

I am getting these popups regularly. They do not appear in the notification center so I can't find out what app is causing them. The only app I can think of that I have installed recently, I have already deleted and they still appear. I am using the Nexus 4 Android 4.2.2. None of the ad detector apps have found anything.   How can I determine what is causing this?  Here is a screenshot of an ad, and a screenshot of my task manager immediately after. I am not sure if the app would have to be running to show the ad:


Return background color of selected cell

I have a spreadsheet which cells in are colored meaningfully.  Does any body know how i can return the background color value of a current cell in Excel sheet?


Adding related resources or hyperlinks in edits

So, I've been rejecting the addition of resources/hyperlinks to posts simply because I had no idea that this was an acceptable practice.  Today, I was browsing through the edits page and saw:     Some common reasons to edit are:         to fix grammatical or spelling mistakes   to clarify the meaning of a post without changing it   to correct minor mistakes or add addendums / updates as the post ages   to add related resources or hyperlinks      Why is this an acceptable practice?  I can see adding links to official documentation, but the quality of outside resources is (potentially) subjective.  I see the merit in adding resources, but it seems to me that these additional resources should be placed in comments, not inserted into the post via an edit.  Anyone have thoughts on this?


Is there a way to derive the field of arbitrarily moving charge from Maxwell's equations?

I found the following formula for the electric field produced by an arbitrarily moving charge in Feynman lectures (Vol. 1 eqn (28.3) and Vol 2 eqn (21.1))  \begin{equation} \vec{{\bf E}}=\frac{q}{4 \pi \varepsilon_0}[\frac{\bf e_{r^{'}}}{r^{'2}} + \frac{r^{'}}{c}\frac{d}{dt}(\frac{{\bf e}_{r^{'}}}{r^{'2}})+\frac{1}{c^2}\frac{d^2}{dt^2}{\bf e}_{r^{'}}] \end{equation}  The first part is the well-known coulomb's law in retarded form.   Is there a way to derive the second and third term from Maxwell's equations?  I know the third term is related to the acceleration of the charges and gives rise to radiation.  What is the role of the second term of the equation?  Are there names for second and third parts of the equation? Is there another reference giving these terms?


What is the smallest object that can be summoned by a Summoning charm?

This question brought up a good point about . However, were there any rules set about the size of an object that can be summoned via that charm?  Could something on the cellular or molecular level be summoned?  From the books the smallest thing I can think of would be hair that was used to disguise Harry at the wedding; also in The Goblet of Fire, a fly was summoned as well.


related to visualforce page getting images from godaddy

Is It possible to get images from godaddy and use in visualforce page ,if it possible can You tell me syntax for that in visual force page.


Is case grounding compulsory in typical 32.768kHz crystal for Real Time Clock?

Pictures shown below is a typical 32.768kHz crystal, commonly use in Real Time Clock circuit (e.g: DS1307 & DS1337)    Referring to , it is a good practice that ground planes should be beneath the crystal. But is it compulsory that we should ground the crystal's body/case too (like what they did in these pictures)? And if yes, what happens if we didn't grounded the case?


how to add number into table array php saprfc

how can I add number in front of ID? if ID contain 3 digits it will add 000 in front of ID, if ID contain 4 digits it will add 00 in front of ID, if ID contain 5 digits it will add 0 in front of ID. For an example    ID   |   FEE   |      NAME     |   PERIOD 000711 |  204000 |  YUDI MANDALA |   201807 000790 |   84000 |  AGUS WAHYUDI |   201807 001171 |  151500 |    SARJANA    |   201807   my code:  if ($FI_HPs!=0)  {  $array = [];  for ($i=1;$i<=$FI_HPs;$i++)   {    $FI_HP = saprfc_table_read ($fce,"FI_HP",$i);      $id = $FI_HP['ID'];     if(isset($array[$id]))     {          $array[$id]['FEE'] += $FI_HP['FEE'];    }      else     {         $array[$id] = $FI_HP;    }  }   foreach($array as $item)   {     echo '
     '.$item['ID'].'	     '.($item['FEE']*100).'	     '.$item['NAME'].'	     '.$item['PERIOD'].'
';  } }


RSS feeds on the homepage have the wrong label and link

The RSS feeds (under the HNQ list) on each site's homepage somehow have the wrong label and link:  On   Bugs → Monthly Reqs → (missing) Active → Recent Bountied → Bountied (correct) Hot → Bountied Week → Hot Month → Weekly   On *  Active → Recent Hot → Bountied Week → Hot Month → Weekly   On   Apps → (missing, probably by design) Scripts → (missing, probably by design) Active → Recent Hot → Bountied Week → Hot Month → Weekly    Example:      *Not sure about Stack Overflow since Teams member is only shown "Recently Active" questions and RSS feed


The question comes from a textbook  Prove that $3x^5+5x^3+7x$ is divisible by 15 for any integer $x$. I want to do this through mod arithmetic.   The first thing that I did was to try and solve it through mod 3 and 5. If they are congruent to 0 for both, then it is divisible by 15.   So I tried to solve it mod 5 first.  $3x^5+5x^3+7x$ is congruent to $3x^5+x^3+2x$ If x (1 to 5) when subbed in gives 0(mod 5), then all $x$ values will give 0(mod 5).   However when I come to sub in $x=2$, it gives $96+8+4$ which doesn't give 0(mod 5). Have I done or assumed anything wrong up to this point?


How can I configure the Ubuntu Dock to show windows only from the current workspace?

I would like my Dock to show only the windows of the current workspace. Especially in the little preview window. I find it very confusing to jump around workspaces when trying to find the right window.


How to retrieve the excel file data without Interop?

Can anyone suggest me an approach to retrieve the excel file details (Alternative of Interop)?  I want to track user working excel file details (like workbook name, sheet name, formula present in the sheet/workbook, Macro value.)


What is the evaluation step in an HE scheme?

I quote:  By homomorphic encryption, we mean the family of encryption schemes being able to perform homomorphic operations on ciphertexts, without decrypting them. The first time someone introduced such a notion goes back to 1978, when Rivest, Adleman and Dertouzos [RAD78] described the privacy homomorphisms. An homomorphic encryption scheme, as traditional encryption schemes, has a key generation, an encryption and a decryption algorithm, and it has an additional algorithm called evaluation.   Key generation Encryption Decryption Evaluation  How could one explain to someone with zero background on cryptography, what the evaluation step entails ?


Does the Akame Ga Kill! manga continue where the anime leaves off?

The anime has ended at episode 24, "Akame ga Kill!".  Does the manga continue the story beyond the anime's conclusion?


Suppose an enemy have blur and slow cast on them.  Can I use dispel magic to end the magical effect blur, without dispelling slow?    The above spells are just examples. This question mainly ask about how dispel magic can be used to end one spell affecting a creature without dispelling other spells.  What are the conditions must be satisfied to do this? Does the will-be-dispelled spell must have a perceivable effect to be able to be targetted? Does the spell must be lower than dispel magic? Must I name the spell I wish to end? Must I name the effect ("whatever making him looks blurry")?


How to clean a clogged Misto oil sprayer/spritzer?

I use a Misto oil spritzer. You fill it up with oil and pump it up and spray a pan with it.  It's gotten clogged up so that it just squirts a steady stream of oil (not a spray).  Any ideas how to clean it and keep it from clogging again?  I've tried:   Soaking it on wine Soaking it in boiling water   I'm going to try filling the bottle with vinegar and water.  I've also heard that you should use regular (not extra virgin) olive oil. (Extra Virgin is apparently thicker).


I changed my username and it would not let me go on servers

I changed my username and I tried logging back on and when I got back on, Minecraft would keep saying      Error: Authentication To Minecraft.Net Failed   All the servers I visited also said this.


I've been doing a bit of research in the last few minutes about gravitational waves. Now, I understand what gravity is - the curvature of space-time. What I'd like to know is how this causes waves.  My understanding is that such waves are caused by orbits. What the LIGO guys saw was a byproduct of two black holes orbiting each other. As the New Yorker explained, it was like children bouncing around each other on a trampoline.  To use a Newtonian example, I might think about ocean waves. The variations in the wave heights are caused by the pull of the moon and of the sun. Quite literally, such variations are the byproducts of gravitational waves!


Can I mark a SD Card as permanent storage?

I own a PNY - StorEDGE 128GB and I remember that it was initially recognized as a fixed/permanent disk like a hard disk.  I reformatted it to add encryption but now the disk is shown as a removable device. This keeps tools like SkyDrive from using it as a target.  Can I set the volume type somehow?


Identify $f$ using Taylor coefficients of $f$

If $f$ is an analytic function defined in the unit disk $\{z \in \mathbb{C}: |z| <1 \}$ where for any $n >0$ we have: $$\left|f\left(\frac{1}{n}\right)\right| \leq e^{-n}$$ Find $f$ I know this can be solved using Taylor coefficients of $f$ as that suggested in the practice textbook problem. However, I cannot figure how to find $f$. Does someone know how to solve this or have a link to a similar problem?


How to perform a true GIS clip of polygons layer using a polygon layer in R?

I would like to do a true GIS Clip in R of soils polygons using a series of single boundary polygons, but I cannot find an R function to properly do it. It should work just like the clip function in ESRI's ArcMap. I've tried the over method in sp package but it doesn't seem to work for polys over polys.   One suggestion was to use the gIntersection in rgeos package as a clip using the following code:  #------------------------------------ library(rgeos) library(maptools)  #Read layers as SpatialPolygonsDataFrame (both the same Albers projection) Soils_poly = readShapePoly("Soils_polygons")  #Note - Has 400 polygons clipper_poly = readShapePoly("clipper_polygon")  #Note - Has 1 polygon  #Try gintersection as clip  Clipped_polys = gIntersection(Clipper_Tile_poly, Soils_poly)  #-----------------------------------   This takes 5 minutes to run (way too slow) and errors with this:     Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_intersection") :      TopologyException: no outgoing dirEdge found at -721459.77681285271 2009506.5980877089   I also tried this code to check for overlap:  gIntersects(Clipper_Tile_poly, Soils_poly)   and the result was TRUE. clip function in ESRI ArcMap works fine for this data.   Anyone knows of an R function to properly do a clip on spatial polygons using spatial polygons?


There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was:      Apex trigger updatequotestatus caused an unexpected exception, contact your administrator: updatequotestatus: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.updatequotestatus line 5, column 1.   Error Occured at Line:     if((t.what.getsobjecttype() == quote__c.sobjecttype) && (t.subject.substring(0,5) == 'Email')  trigger updatequotestatus on task (after insert, after update){     Set<Id> quoteIds = new Set<Id>();     List<quote__c> quotes = new List<quote__c>();      for(task t:trigger.new){         if(t.whatId!=null){             if((t.what.getsobjecttype() == quote__c.sobjecttype) && (t.subject.substring(0,5) == 'Email')){                 quoteIds.add(t.whatId);             }         }     }      for(quote__c q:[select StageName__c from quote__c where Id IN : quoteIds]){         quote__c qt = new quote__c();         qt.Id = q.Id;         qt.StageName__c = 'Proposal Sent';         quotes.add(qt);     }      if(quotes.size()>0){         update quotes;     } }


Adding parentheses around subfig references

Say I have a figure with two subfloats inserted using the subfig package.  When I reference them with \ref{myLabel} I get this     Figure 3.5a and 3.5b.     But what I want is this:     Figure 3.5(a) and 3.5(b).   How can I add the parentheses?


Regression coefficients have a different sign for highly correlated predictors

I'm working with some real world data and the regression models are yielding some counter-intuitive results.I know that in my , the X1 and X2 predictors are highly correlated in the same direction and as they increase,the response Y too increases.   However, when I build a regression model with other predictors in the data, the regression coefficients of X1 and X2 change sign. I don't understand this. Is this due to multi-collinearity? If so, how to force them to be of the same sign? Can I not build a regression model with both X1 and X2 having the same sign of coefficients?


I use :  exec >script.log 2>&1   in my script to redirect all output to a file. At the end of the script I would like to print a message to the screen. How do I stop the redirection?


Compare md5Hash from Firebase Storage with a file

What I want to do is to check the md5Hash of a file metadata stored in my firebase Storage, I have done it and its working like this     refToFile.getMetadata().addOnSuccessListener(new OnSuccessListener<StorageMetadata>() {             @Override             public void onSuccess(StorageMetadata storageMetadata) {                 String hash =  storageMetadata.getMd5Hash();                 Log.e("md5hash", "onSuccess: "+hash );             }         }).addOnFailureListener(new OnFailureListener() {             @Override             public void onFailure(@NonNull Exception exception) {                 // Uh-oh, an error occurred!             }         });   Now, I want to check if that hash is the same as one file I have in my externalStorage (file inside my phone)  What Im trying to do is this  1 .- Download that file from Storage   2 .- Check if that md5Hash has not changed (so I know that the file is not new)  3 .- If I upload the same file and replace it, I will check the file md5Hash from firebase and compare to the md5Hash of the file I stored in my phone, so I know that the file in the Storage is new and I can prompt the user to download that new file  Question  Is there any method to get the md5Hash from a file inside my phone ?  For example  File file = new File(); file.getMd5Hash...   I suppose that the md5Hash of a file downloaded with firebase is the same as the firebase file metadata stored in my phone (because is the same file).


Bounty +50 on question from user with 22 rep?

As of right now (3/17/12 02:24 -07:00)  has a +50 bounty from the OP, but the user has only 22 rep. How is this possible?    BTW, the question itself has 6 downvotes and is flagged "not a real question"


Can't skype for Ubuntu 12 work on Ubuntu 14?

I've installed Ubuntu 14, but I can't install Skype as the required version of Ubuntu is 12!? Is there a way to run Skype on Ubuntu 14?


Proving $|S \times \mathbb{N}|=|S|$ when $S$ is an infinite set

I am trying to prove that, given a collection $\{S_i:i \in \mathbb{N}\}$ of infinite sets which all have the same cardinality, that $|S_1 \cup S_2 \cup \cdots|=|S_1|$. WLOG, I'm going to assume the $S_i$ are disjoint.  My thought was to let each $f_i:S_1 \to S_i$ be a bijection and to define $g: S_1 \times \mathbb{N} \to S_1 \cup S_2 \cup \cdots$ by $g(x,n)=f_n(x)$. I see that $g$ is a bijection.   So, the problem is reduced to "merely" proving that $|S_1 \times \mathbb{N}|=|S_1|$. I say "merely" with tongue in cheek because it is by no means obvious to me how to do it.  If $S_1$ is countable, I know how to proceed by the standard diagonal argument used to show $\mathbb{Q}$ is countable. But if $S_1$ is uncountable, I don't know what to do, even though it seems intuitive to me that crossing $S_1$ with $\mathbb{N}$ won't make the set "bigger" since it doesn't make it bigger in the countable case.


What is the max load for my LAMP server?

I have been searching for a definitive answer for the max load for a LAMP server. I have 4 dual core processors, so does this mean that the max load is 4.0, or is it based on cores - 8.0?  The server has 4 CPUs, Intel(R) Xeon(R) CPU 5160 @ 3.00GHz. The distro is CLOUDLINUX 6.5 (built on CentOS).


How to stop Viber running without uninstalling it?

How do I stop Viber running, without uninstalling the app? When I go Menu→More options→Exit it just comes back. I want it to turn it off completely, so it's not waiting to come on in the background.


How to create multiple global variables using a for loop outside of a function?

I have a list and I want to create a global counter for each item in the list, with the initial value set to 1. I thought I would do this with a for loop (my actual list is a lot bigger than the example below) however I just realized for loops don't work outside of a function. How can I get the below code to work?  char* list[] = {"A", "B", "C"};  for (int i = 0; i < sizeof(list); i++){     int counter[i] = 1;     } }


A friend had this sticker placed on his passport by a security officer at Schiphol airport. It was while waiting at the gate, after what seemed like an almost informal chat (but yet he was pulled out of line by the officer), prior to boarding a flight to NYC.  What is the meaning of this sticker, and can it be removed now (this happened more than a year ago)?


Use mogrify to resize large files while ignoring small ones

I'm running the following command:  mogrify -resize '400x400>' *.png   Notice the ">". Supposedly it will ignore smaller files, but although it doesn't resize them, it edits them (modification date and file size are changed).   Is there a way to make it actually just leave the smaller files alone? I'd like to avoid several thousand unnecessary write operations.


How do Time lords/Gallifreyans breed, and can they do so with humans?

How do Gallifreyans breed? Are they asexual - like Donna asked, 'Do you lop a limb off and sprout another one?'  And can humans and Gallifreyans inter-breed? Eight claimed he was half human on his mothers side, but that doesn't come up in any other incarnation.


So I decided to give another linux distro a try as the visual bug I get happens on alot of distros, I have tried Solus, Mint, Arch and Pop all of them have the same issue, ubuntu has been the best one for me so far but there still a little visual glitch that happens. I have install the proper amd drivers from their site aswell as made a .conf.d file, I also have tried using ubuntu wayland. I am using a Ryzen 3 3200g if that is any use? One more thing to note, this doesn't happen when using windows and I use a virtual box. But I really want ubuntu to be my daily driver but I just cannot get this fixed. I have included a screenshot below of what happens.


How do I get sub-numbering for theorems (Theorem 1.A., Theorem 1.B., Theorem 2.)?

I am trying to number my theorems as follows:  Theorem 1.A. First part of a theorem.  Theorem 1.B. Second part of the theorem.  Theorem 2. A theorem with no parts.  The following almost works:  \newtheorem{theorem}{Theorem} \newtheorem{theorempart}{Theorem}[theorem]   But it does not increment the theorem counter as I want, so that  \begin{theorempart}First part of a theorem. \end{theorempart}  \begin{theorempart}Second part of the theorem. \end{theorempart}  \begin{theorem}A theorem with no parts. \end{theorem}   gives:  Theorem 0.1. First part of a theorem.  Theorem 0.2. Second part of the theorem.  Theorem 1. A theorem with no parts.  Also, I don't know how to get the part-number to be a letter instead of a number.  I am using MiKTeX.


Math calculators to find inverse laplace transform of slightly complicated equation

I have found out the inverse laplace of $\log\frac{s+4}{s-4}$ which is $\frac{2 sinh(4t)}{t}$ But I do not know how to proceed. The multiplication by s property does not seem to hold good here as the denominator has t, which would imply f(0) would be 0/0 Any help is greatly appreciated.  EDIT: I think I have found the final answer ($4 [\frac{2t cosh(4t) - sinh(4t)}{t^2}]$, but need to verify it. Could anyone suggest any math calculator which gives answers to inverse laplace transform questions?


CSS border not wrapping around nested divs

Just wondering why .border will not wrap around nested divs d1, d2, d3.    The div with id main1 has a 5px solid border that I am trying to wrap around the three nested divs with ids div1, div2, div3.  Each of the nested divs have there own 2px solid border.  Seems like it should work but maybe something is getting overwritten somewhere.      .border {border: 5px solid RosyBrown;} .border-thin {border: 2px solid RosyBrown;} div#main1 {width: 90%;margin: 0 auto 0 auto;} div#d1 {width: 31%; float: left;} div#d2 {width: 31%; float: left; margin: 0 0 0 3.5%;} div#d3 {width: 31%; float: right;}

Main

d1

d2

d3


How many zeros are obtained if we multiply all the natural numbers from 1 to 100?

Options are:   20 21 22 23 24   I recently came across the above question in a competitive exam, where we get about 30 seconds to 1 minute for solving each problem. I want to if there are  quick and easy methods to compute the result.


I try to understand and visualize myself covariance matrix. Supposing I have a matrix A = [ 2 3 4; 5 5 6 ], how do I calculate its covariance matrix, and what is its practical meaning? (All I was able to understand by now is that on the diagonal of the covariance matrix, variances for particular variables are placed, and on the upper and lower fields correlations between those variables.)


Log from a specific line to another specific line

I am doing a data monitoring and I am doing a cron job to get the data everyday. But I am receiving many junk data with my actual data that makes the file huge. For example my data is,  eg.hh.jk.ll.mm ee.ff.gg.hh.uh im.mi.jj.hh.ll 11.33.44.55.66   I have to print the data matching the line from ff.gg to the line matching 33.44. Line number is not available. So my result should be  ee.ff.gg.hh.uh im.mi.jj.hh.ll 11.33.44.55.66   Thank you !


Hi there. I really want to remove the parts of these circles marked by the yellow circles, but I've had a lot of difficulty doing so. Can anyone help.


What material fills the synaptic cleft? Is it water?

The synaptic cleft is the gap between the pre-synaptic and post-synaptic neurons, and neurotransmitters are transferred between the neurons within this region. What substance exits in this space, is it water? If so, what force makes the neurotransmitters move toward the receptors despite colliding with water molecules?


What's the difference between access arguments and access callback?  Suppose I set the access callback to 'user_access', and array('custom permission') is the value for the access arguments.  What does that mean? How do they affect each other?


Do the electrons at the anode (negative end) of a battery flow through the copper to the cathode end or is it only the copper atoms electrons that flow to the cathode end of the battery or does both happen?   Another one that puzzles me is do the electrons at the anode end of the battery ever strike the copper atoms valence electrons? And if so is that what causes heat? Or is heat produced when the copper atoms strike each other when they randomly zigzag to the positive end of the terminal?   Last one is when the copper atoms lose electrons because it's attracted to the positively charged terminal. That copper atom becomes a cation how does current flow if that atom has a net positive charge?


How does one use the Latin word “cum” in a sentence?

Is this usage correct:  The Tim Smith show takes listeners through Tim's day to day life as a broadcasting legend cum podcaster.  Are the dashes "-" necessary?  and is the broadcasting legend too much?  Should it only be Noun-cum-noun?    Thanks.