How to tell MySQL to ignore all indexes for a given query?

I've been benchmarking several queries and learning about indexes by using the ,  and the  option.   My usual benchmarking session goes something like this:  SET PROFILING=1; SELECT SQL_NO_CACHE field_a, field_b FROM table WHERE xxx; SHOW PROFILES;   Some times after adding indexes, I want to know how the query would perform without any index optimization; so my options so far are to either delete the related indexes or use explain to check what indexes are in use and  what indexes to ignore;  EXPLAIN SELECT SQL_NO_CACHE field_a, field_b FROM table WHERE xxx; SELECT SQL_NO_CACHE IGNORE INDEX (field_a) field_a, field_b FROM table WHERE xxx; SHOW PROFILES;   Is there a similar option to tell MySQL not to use any index so I can get the query duration without any index optimization. Something like this:  SELECT SQL_NO_CACHE SQL_NO_INDEXES field_a, field_b FROM table WHERE xxx;


I'm looking for a positive word for a person who always searches for and finds the best deals before making a purchase, no matter how small

My brother is such a _____________ – he got a night in a 4-star hotel in Paris for $112.  He once got a cruise for half-price, with pudding cup lids.


I haven't been able to log into my Blogger account for my blog or into the Gmail of the same account. I remember the recovery mail that I'd connected and I've tried using the account recovery several times and it won't email me anything. My blog was also on private so I can't access any of my old posts. Please can someone help or does anyone have any contact details that I could use to get in touch with Google/Blogger support? I really want my account back.


I am trying to sort LinkedHashMap based on its values. What I dont understand are the results. Its seems to be taking only two keys for the sorting. Any pointers as to what am I missing?  public class test {      public static void main(String[] args) {         // TODO Auto-generated method stub           LinkedHashMap<Integer, Integer> sorting = new LinkedHashMap<Integer, Integer>();         sorting.put(1, 100);         sorting.put(10, 100);         sorting.put(20, 200);         sorting.put(30, 100);         sorting.put(40, 100);         sorting.put(50, 200);          for (Entry<Integer, Integer> entry : sorting.entrySet()) {              Integer key = entry.getKey();              Integer value = entry.getValue();              System.out.println("LINKED UNSORTED === key: "+ key + '\t' + "Value: " + value);               // do stuff             }           Comparator<Integer> comparator = new ValueCom(sorting);         TreeMap<Integer, Integer> sortedMap =new TreeMap<Integer, Integer>(comparator);         sortedMap.putAll(sorting);                 for (Entry<Integer, Integer> entry : sortedMap.entrySet()) {              Integer key = entry.getKey();              Integer value = entry.getValue();              System.out.println("SORTED   === key: "+ key + '\t' + "Value: " + value);               // do stuff             }      }  }   class ValueCom implements Comparator<Integer> {     LinkedHashMap<Integer, Integer> map = new LinkedHashMap<Integer, Integer>();  public ValueCom(HashMap<Integer, Integer> map) {         this.map.putAll(map);     }  public int compare(Integer keyA, Integer keyB){      return map.get(keyB).compareTo(map.get(keyA)); }  }    The current output is as explained above   LINKED UNSORTED === key: 1  Value: 100 LINKED UNSORTED === key: 10 Value: 100 LINKED UNSORTED === key: 20 Value: 200 LINKED UNSORTED === key: 30 Value: 100 LINKED UNSORTED === key: 40 Value: 100 LINKED UNSORTED === key: 50 Value: 200 SORTED   === key: 20    Value: 200 SORTED   === key: 1 Value: 100


How to get my Java AND or OR Binary Operator to work

I have my code here: import java.util.Scanner; public class Calculator { public static void main(String[] args) {  Scanner x = new Scanner(System.in);  System.out.println("List of operations: add subtract multiply divide alphabetize");  String boy = "Enter an operation:";  String operation = x.next();  String need = operation.toLowerCase();  if (need != "add" && need != "subtract" && need != "multiply" && need != "divide" && need != "alphabetize") {    System.out.println("Invalid input entered. Terminating...");    return;  }  switch (need) {    case "1": need = "add";      String jog = "Enter two integers:";      int huh = x.nextInt();      int buh = x.nextInt();      int duh = huh + buh;      System.out.println("Answer:" + duh);      break;    case "2": need = "subtract";      String hog = "Enter two integers:";      int guh = x.nextInt();      int cuh = x.nextInt();      int zuh = guh + cuh;      System.out.println("Answer:" + zuh);      break;    case "3": need = "multiply";      break;    case "4": need = "divide";      break;    case "5": need = "alphabetize";      break;  } } }  Now I'm just stuck attempting to fix one thing, and that is the if statement right at the beginning. I need that to only do the print code if the above need string is not any of those words. And even when I put in "add" (without quotes) as my input it doesn't work, it goes straight to the print code. And also after that, I want to cut the code so it stops but I'm not sure how. I don't want to use System.exit(), however... I'm stuck.


What does it indicate if a multiple regression model is significant but none of the individual predictors are significant?

I have a feeling that this is a stupid question, but googling around I haven't found an answer to it.   Simply: What does it mean if a multiple regression model is significant but none of the individual predictors are significant? There are between 5 and 10 predictors in the model.   I would imagine that it's because of the high number of predictors in the model. One of the predictors almost passed the threshold of significance (p = .06). Most of the predictors, when isolated in separate simple regression models with the same independent variable, have significant p-values. In other words, the simple regression model with predictor A and variable Z is significant, the simple model with predictor B and variable Z is significant, etc., but the multiple regression model with predictors A, B, etc., and variable Z is non-significant.   My other thought would be multicollinearity, but I tested all of the assumptions, and the multiple regression model meets them. In particular, I tested for multicollinearity with the “vif()” function in R. As far as I understand, a VIF value over 5 or 10 for any predictor indicates a problematic level of multicollinearity. For this multiple regression model, none of the predictors exceeded a VIF value of 5. If it matters, the VIF values for each variable were: 2  2  4  4  1  2  1.5  and 3.5.   For theoretical reasons, I would expect there to be an overlap between the predictors, because there are theoretically causal relationships between some of the predictors that were used.   Thanks in advance. :)


How can we embed Internet Explorer into the java application. I am looking for an Open source option to achieve this.


Hiding get mobile app button on sharepoint online

I have tried the guide here:  but the application customiser does not seem to be working for me.  I edited the config like so:  {   "$schema": "https://developer.micnpm -v   rosoft.com/json-schemas/core-build/serve.schema.json",   "port": 4321,   "https": true,   "serveConfigurations": {     "default": {       "pageUrl": "https://mysite.sharepoint.com/sites/mysite/SitePages/Home.aspx",       "customActions": {         "78478cf9-373a-4b36-950c-ce02224fc0c3": {           "location": "ClientSideExtension.ApplicationCustomizer",           "properties": {             "testMessage": "Test message",             "CSSOverrideUrl": "https://n8design.github.io/whitespace/blacklist.css"           }         }       }     },     "n8DWhiteSpace": {       "pageUrl": "https://mysite.sharepoint.com/sites/mysite/SitePages/Home.aspx",       "customActions": {         "78478cf9-373a-4b36-950c-ce02224fc0c3": {           "location": "ClientSideExtension.ApplicationCustomizer",           "properties": {             "testMessage": "Test message",             "CSSOverrideUrl": "https://n8design.github.io/whitespace/blacklist.css"           }         }       }     }   } }   Anybody got a fix for this or know or another guide?


How to recover data in ubuntu after changing operating system from windows 8 to ubuntu?

I changed my operating system from windows 8 to UBUNTU by using a usb stick but in the process i lost all of my data. is there any way to recover it? Please help me the data was very important.


Why past perfect and not simple past was used in this case?

I'm watching "World War 2" show and narrator said:  This was fertile ground for a new breed of rabble rousing right wing politicians. Among them Adolf Hitler. Hitler HAD BEEN born in Austria. He HAD FOUGHT bravely as a soldier...   Why past perfect (had been, had fought) and not simple past was used?


texas holdem full house showing in table, splitting pot among players

Texas holdem, KKK22 full house showing on table.   Player 2 has the K2 hole cards to make the same full house, is the pot split among all players or is it player 2 pot?


I am a engineering student with a 3.7 GPA. My transcript is somewhat messy (retaken classes, Bs everywhere), I was wondering if graduate programs usually analyze the whole transcript in a detailed sense or take a more cursory glance over it if the overall GPA is in a "ok" range. This is particularly in regards to the retaken classes which where two B-'s and one C+ before I retook and got As (my school has a program that if you retake classes taken during your freshmen year your second attempt is the only one that counts towards your gpa, a "freshmen forgiveness" program)  Am I screwed? Thank you!


$H \cong K \times H$ implies $K$ is trivial?

Let $H$, $K$ be groups, and suppose that $H \cong K \times H$. Does it necessarily follow that $K$ is trivial?


The phrase 'Head over heels' is quite often used when someone falls over:     He fell head over heels   But, in my mind it doesn't make much sense. If your head is over your heels (feet) then you're standing upright and not falling over at all.  So, where did the phrase come from ?  There is another, ruder version - 'Arse over tit' which actually does make sense.


system wide keyboard hook on X under linux

What would be the best approach to install a keyboard hook on Linux (X-windows) in order to trigger some application when some key-combo is pressed?? Is there a way to do this regardless of which window manager is running? The idea is to have an application being called ( or brought to foreground ) when some key is pressed in a way similar that Google Desktop does to Ctrl-Ctrl.


Why escape velocity doesnot depend on angle of projection

For a projectile projected at a certain angle from horizontal, at the highest point its speed is not equal to zero that means only a part of its initial kinetic energy is utilized to raise the potential energy of earth-body system. Here is the derivation of escape speed that is given in my book:  Initial K.E. imparted to body to escape earth's gravitation is given by       $\frac{1}{2}mv^2 = \frac{GM}{R} $ (Here all letters have there usual meaning)  But in case of projectile, only a part of its initial K.E. is utilized.it means that escape speed for a projectile projected at an angle with horizontal should be more than escape speed calculated from above formula.But my book says that escape speed is independent of angle of projection.Why is it so?


Show that $g\circ f\equiv 0$ implies $\det Df\equiv 0$, where $g(x_1,...,x_n)=x_1^5+...+x_n^5$

Let $f:\mathbb{R}^n \rightarrow \mathbb{R}^n$ be a smooth function and let $g:\mathbb{R}^n \rightarrow \mathbb{R}$ be defined by $g(x_1,...,x_n)=x_1^5+...+x_n^5$. Suppose $g\circ f\equiv 0$. Show that $\det Df\equiv 0$.  I was going to start the solution from $n=2$ and then use induction on $n$.  So, for $n=2$, $f:\mathbb{R}^2 \rightarrow \mathbb{R}^2$ is a smooth function and $g:\mathbb{R}^2 \rightarrow \mathbb{R}$ where $g(x_1,x_2)=x_1^5+x_2^5$. Then $Df=\begin{pmatrix}   f_{x_1x_1} & f_{x_1x_2}  \\   f_{x_2x_1} & f_{x_2x_2}   \end{pmatrix}$  But now I am stuck in proving the result. Am I in the correct track? Can anyone plese give me a hint to continue?  Ok so since $g\circ f$ is $0$, the image of $f$ is the line $x_1+x_2=0$ which has no min, max or saddle.   If det$Df(x_0)>0$ and $f_{x_1x_1}(x_0)>0$ OR det$Df(x_0)>0$ and $f_{x_1x_1}(x_0)<0$, we have contradiction.   But if det$Df(x_0)>0$ and $f_{x_1x_1}(x_0)=0$, then det$Df(x_0)=0$ or, det$Df(x_0)<0$(Since $f_{x_1x_2}=f_{x_2x_1}$). So this is impossible.  If det$Df(x_0)<0$ we have saddle and it is impossible.   So finally we conclude that det$Df(x)=0$ for all $x$. Am I correct?


Integer solutions for Diophantine equation

Find all pairs $(p, n)$ of positive integers where $p$ is a prime number and  $p^3 − p = n^7 − n^3$.  Attempt at question:  I have factorised both the sides of the equation $(p-1)(p)(p+1)=(n-1)(n+1)(n^3)(n^2+1)$ and tried equating terms under different cases.  I am not sure if I am procedding in the right way or in the shortest way possible?


Can a monster attack with the same action/body part that it's using to hold a grapple?

I'm unclear on how attacks and grappling work with monsters as opposed to players. Let me elaborate my question.  With PCs, it seems clear to me. Let's say a PC has two creatures grappled and thus has no free hands. If the player attacks on its turn, it can make an unarmed strike against one of the grappled creatures (although it's not clear if it can use the hand that's grappling to make that attack: squeeze, crush, etc.).  Now in the case of a monster, it seems unclear because they have specific actions/attacks that can grapple. Can those same attacks be made even if they are holding the grapple? I'll use a couple of examples to clarify.  A Constrictor Snake has two options for attack: Bite and Constrict (which grapples on a hit). If a snake hits character A with Constrict (A is grappled) on turn 1, and turn 2 rolls around, can it attack a still-grappled character A with Constrict, or must it use Bite?  A T-Rex has multiattack with Bite and Tail, but can't use them on the same target. If a T-Rex hits character A with Bite (A is grappled) on turn 1, can it then Bite a still-grappled A on turn 2, since it can't attack A with its tail?  I'm asking because because a lot of gameplay or monster strategy blogs seem to indicate in their examples that the answer to this is "no".


Comparing the fit of quasi-Poisson and negative binomial models

Is there any way to compare the fit of quasi-Poission and negative binomial models? If so, can it be done in R?


I have a mathematical expression, I try to write it in multiple line. I tried: multline, equation + split, align .. .   $\text{max} \left \{frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}+\frac{1}{3}-4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+Bx^{-2}+\frac{1}{3}x-Ax^{2}-Bx^{-2}-\frac{1}{3}x-1   \right\}$   Could you please help me?


Say:       $f'(x) = e^{-x^2}.$   Then, what is $f(x)$ ?  I ask this because I heard:       $$\int_{-\infty}^{\infty} e^{-x^2}\, dx=\sqrt{\pi}.$$   Thus curious about $f(x),$ but can't figure out it on my own, though tried.


Minor alignment issue in the tag info page

In any tag's info page, the Tag Info box is overlapped with the above horizontal line. Adding some space in between them or adding margin-top to the tag info div will improve the page design.  For example, in the  tag info page.  Current UI:        Expected UI:


Comparing Mather groups returns unexpected value

The values of zerosMatcherNext.group(1) and zerosMatcher.group(1) are being evaluated as String with value 0 but the comparison zerosMatcherNext.group(1) ==  zerosMatcher.group(1) returns false. What is the explanation for such a strange behavior?  UPDATE:  but zerosMatcherNext.group(1).equals(zerosMatcher.group(1)) returns true


Python: How to match special characters in regular expression?

I'm trying to do a regular expression match with special characters in it, such as "/", ".", and "-".  This is the string:  17440 root      20   0 3645m 452m  12m S  152 11.8 347:32.04 test/1/02.3_4-6    But the following code does not seem to match at the end with :  m=re.search(r"(?P<pid>\d+) +(?P<user>\w+) +(?P<pr>[\w-]+) +(?P<ni>[\w-]+) +(?P<virt>\w+) +(?P<res>\w+) +(?P<shr>\w+) +(?P<st>\w) +(?P<cpu>\d+) +(?P<mem>\d.+) +(?P<time>[0-9:.]+) +(?P<proc_name>[\w-/.]+)", line)   Do I need backslash before the special characters, such as "/" and "."?  Thanks!


In what way can I know the tables in a .db file using Python SQLite3?

here's the code:  import sqlite3 cx = sqlite3.connect("test.db") cu = cx.cursor()  # create table 1. cu.execute("create table user_info1 (user_id text primary key,followers integer, asks integer, answers integer, goods integer)")  # create table 2 cu.execute("create table user_info2 (user_id text primary key,followers integer, asks integer, answers integer, goods integer)")   Now I'm wondering to see how many tables are in test.db:  cu.execute('.tables') # doesn't work.  cu.execute('select * from test.sqlite_master where type = "table"') # OperationalError: no such table: test.sqlite_master   The methods above doesn't work for me. Have any hint? Thanks!


Where does the idiom "whole cloth" come from?

I have heard it used several times recently, but I had no idea what it meant until I looked the term up on the Internet, because I had never heard it before.    Where does whole cloth come from? How and where is it used?


Function input number and need to return te name of the month

I want to insert a number in function and get in return the name of the month according to the number I have tried CASE, IF, SET and so on. Still not working (syntax error near IF line 6)     ALTER FUNCTION fn_Return_monthname (@monthPart INT)     returns VarChar(50)      begin       declare valjund VarChar(50);       SET valjund = 'Unknow month'       IF @monthPart = 1;         SELECT valjund = 'January'       ELSE IF @monthPart = 2         SELECT valjund = 'February'       ELSE IF @monthPart = 3         SELECT valjund = 'March'       ELSE IF @monthPart = 4         SELECT valjund = 'April'       ELSE IF @monthPart = 5        SELECT valjund = 'May'       ELSE IF @monthPart = 6        SELECT valjund = 'June'       ELSE IF @monthPart = 7        SELECT valjund = 'July'       ELSE IF @monthPart = 8        SELECT valjund = 'August'       ELSE IF @monthPart = 9        SELECT valjund = 'September'       ELSE IF @monthPart = 10        SELECT valjund = 'October'       ELSE IF @monthPart = 11        SELECT valjund =  'November'       ELSE IF @monthPart = 12        SELECT valjund =  'December'       return valjund;     end;


Should I ask a professor for the third time for a letter of recommendation?

I contacted two professors six weeks before the deadline. One prof emailed me back immediately. The second one still hasn’t. It is due in 3 weeks. I emailed him last Friday asking him again if he would be willing to be a reference but still no response. I don’t have his phone number and he doesn’t work at the university. I really don’t want to annoy him, but should I email him again? I do have his gmail address (I’ve been emailing him from his work one). Usually he contacts me from his work one but I have received ones from his gmail account in the past. But I am afraid this would be frowned upon and looked on as being too invasive? I am really at a loss. I do have another reference, however, she is more a professional reference and I am not sure if that is allowed (the school isn’t getting back to me on this question).   This question is not a duplicate. I am wondering if I should email the professor for a third time or if that would be considered inappropriate?


Is LIKE Against a List Not Supported in Dynamic SOQL?

I'm trying to use LIKE in my dynamic SOQL with a list.  My code:  SELECT Id, Name FROM Account WHERE Name LIKE ('%somevalue%', '%testvalue%')   I can't and I don't want to use variable reference for the list so I constructed this string.  The error when I try to run the above query:     expecting a colon, found '('   And When I add a colon this is the error that I get:     System.QueryException: Only variable references are allowed in dynamic   SOQL/SOSL.   How can I achieve this without using a variable reference?  The only other way I could think of is:  SELECT Id, Name FROM Account WHERE Name LIKE '%somevalue%' OR Name LIKE '%testvalue%'   With the above way, there's chance of hitting query string character limit. Is there a better way to do this?


How to connect Arduino Lilypad USB to MicroSD breakout board?

I'm trying to connect the Arduino Lilypad USB to a MicroSD breakout board. I'm unsure which pins to use for the CS, DI, DO and CLK connections on the MicroSD board.


The standard way of combining a citation with the amsthm package is to use :  \begin{thm}[\citep{...}].   However, suppose I want to name a particular theorem I am referencing. If we were outside the amsthm environment, we could just use \citep[Theorem blah]{...}, but attempting to do this in amsthm creates errors, i.e. :  \begin{thm}[\citep[Theorem blah]{...}]   does not work.  Are there any ways to get around this?


English equivalent for the Persian proverb "The mountain just gave birth to a mouse"

I'm looking for an idiom or expression to describe a well-known person/ organization/ politician/ government  whose achievements in a given situation are smaller than what they had claimed or promised to be.  We Iranians have a proverb that literally means      The (roaring) mountain just gave birth to a mouse!    Its  etymology is like this:  Once a volcanic mountain started roaring, hissing, and bursting bubbles. The people were waiting to see what would happen after all those huge roarings and loud booms. Finally, the volcano activity stopped and the people saw just a tiny mouse came out of there! (rather than a monster that was expected to come). So they said mockingly:     "Heh! After all those huge roarings, the (big) mountain just gave birth to a (tiny) mouse!"    Notes:   The (roaring) mountain -symbol for an apparently big(=important) and strong person-here is figured like a woman who is screaming and shouting while is delivering her baby. We use this proverb for mocking an important person/organization/ government, etc ironically when they have used broad advertisements or have spent much money or resources over doing something noticeable, but the result/ achievement is less noticeable than it was claimed or promised to be.   Is there any equivalent for this Persian proverb?  I just found ; would it convey the same connotation?


Find all polynomials $F(x)={a_n}{x^n}+\cdots+{a_1}x+a_0$ satisfying   $a_n \neq0$; $(a_0, a_1, a_2, \ldots ,a_n)$ is a permutation of $(0, 1, 2 ... n)$; all zeros of $F(x)$ are rational.


How to render an animation with Render Layers?

So, I heard some people recommending rendering an animation in layers to render faster and save on memory.  So I have attempted a simple scene(.blend included) where I have three Render Layers. One called "Plane", another called "Objects" and finally one called "Cube".  The scene has a plane to act as a floor, some objects and one of them is a cube. The cube has a simple animation of moving from one side to the other with it's shadow interacting with the floor and the objects. All of these elements are on their own render layers.   When I tried to composite them, I noticed that the Ico-Sphere is no longer clipping trough the floor(plane) which is not what I want.   This picture shows you what I mean. The Ico Sphere is suppose to be going trough the plane but when I composited it put it on TOP on the plane which is not what I want.    What I also tried to do was to render it out as an EXR file but the files came out black showing nothing at all.   Any further help on this would be very appreciated.


Default constructor being called by derived class

Suppose I am implementing a game of two-player chess. Here is a shortened version of my implementation for simplicity's sake, omitting any irrelevant details. I have a class Piece from which the various pieces are derived. In this example I am only including the King piece.   extern enum piece_t; extern enum color_t; class Piece { public:     Piece() {}     Piece(piece_t t, char r, color_t c)         : type(t), representation(r), color(white)         {}      char getRepresentation()         { return representation; } protected:     piece_t type;     color_t color;     char representation; };  class King : public Piece { public:     King() {}     King(color_t color) { Piece(K,'K',color); } };   In another class, Board I define a member to instantiate King  class Board { public:     Board() { king = King(white); }     friend ostream& operator<<(ostream&, const Board&); private:     King king; };   Here is an example of main:  int main(void) {     Board game;     std::cout << game;     return 0; }   The problem is that the default constructor is being called. I know this is happening because my king object is being initialized with garbage.  My intention is for king to be initialized in Board's constructor:  Board() { king = King(white); }  From here I want the constructor from King which takes a color_t argument to be called, which will thereby call the constructor from Piece like so:  King(color_t color) { Piece(K, 'K', color); }  This is not what is happening. The default constructor (of either King or Piece or both) is being called. Is king's default constructor called when it is declared in the private field of Board? If this is the case, how do I alter the code so that king calls the appropriate constructor?


Wifi Problem in HP bs542tu after booting with Ubuntu 18.04

There's problem with my wifi. I do almost everything that I can.  When I lspci -knn | grep Net -A3; rfkill list then it show output like this. I can surf browser through connecting with data cable but wifi is not showing and in setting it said that Wireless adapter is not found.   02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] Subsystem: Hewlett-Packard Company Device [103c:8319] Kernel modules: wl   0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no  Help me ASAP.


Any way to force installing Mojave on a Catalina compatible system?

I had an external Mojave boot drive but the drive crashed and both Disk Utility's Restore and disk image mounter say the volume image I made a week ago is bad and can't be used despite having verified and mounted it immediately after creation. I badly need to get Mojave back so I can use my Winclone 7 license to restore the Windows boot partition that was on the internal drive I had upgraded to a higher capacity drive. I can't afford Winclone8 right now.


background image disappears when opening blender

the background image I loaded into orto Right, top, disappears when opening blender (It is no longer imported / loaded) and oh yes, I already tried with fake user button too, no result. It's so annoying having to add all background images again. Why doesn't the save function work? Doesn't blender remember i added background images? I tried packing them also, doesn't work. I'm using sensei format. Could that be the problem? Any tips? Cheers.


Differentiable functions such that the derivative is nowhere continuous.

Is there a function $f:\mathbb R\to\mathbb R$ which is differentiable but such that the derivative is nowhere continuous?


vertically align different size images in a figure* environment

I have an figure* environment with the following  \begin{figure*}     \centerline {     \subfloat[1]{...}     \subfloat[2]{...}     } \end{figure*}   The images are different heights.  How can I vertically align them? i.e. so the centre of each image is next to each other:  _____ |    |     _____   |    |  _  |    | |    |     |____| |____|       Fig. 1


Find the number of ways a string of numbers (that may contain similar items) can be deranged, so that a number is not placed in the same place as it or its similar numbers were placed. For example, $\{0,0,0,1,1,1\}$ can be arranged in only one way, and that is $\{1,1,1,0,0,0\}$. $\{0,0,0,1,1,1,1\}$ cannot be arranged in any way. $\{1,2,2,14\}$ can be arranged in $2$ ways, i.e $\{2,1,14,2\}$, $\{2,14,1,2\}$. $\{1,1,2,2,14\}$ can be arranged in $5$ ways, i.e $\{2,2,1,1,14\}$, $\{14,2,1,1,2\}$, $\{2,2,14,1,1\}$, $\{2,2,1,14,1\}$, $\{2,14,1,1,2\}$.  Please do try and respond. Thanks in advance.


Let $\vec { A } = a \hat { i } + b \hat { j } + c \hat { k }$. Is $\frac { 1 } { \vec { A } }$ a vector or not, and if it is, then what are its components?"


In natural language parsing, what is the feature function?

I'm working in the area of natural language processing, to be specific I'm reviewing the parsers that take advantage of data-mining techniques.   I've read an introduction to natural language processing, specifically the  by Della Pietra and others. In that paper, the authors explain that features are indicator functions that take into account certain aspects of the text. The problem is that this aspects affect the maximum entropy function.  In the case of parsing, I have problems understanding the concept of features. For parsing one must have:   Two sets, $X$ for the sentences and $Y$ for the parses For each sentence $x \in X$, one must have the N-best list of candidate parses; denoted $GEN(x) \subset Y$. Training samples $(x_j,y_j)$. The $x_j$ are sentences and the $y_j$ are parses. And a feature mapping $\Phi(X,Y)$ that maps each pair (x,y) to a vector of feature values.   The problem of parsing will consist of finding the weight vector such that the following expression is minimized  $$ -\sum log P(y_j|x_j,w) + \lambda ||w||_1 $$  where   $$ P(y_j|x_j,w) = \frac{exp \{w^T \Phi(x_j,y_j)\}   }{ \sum_{u \in GEN(x)} exp\{ w^T\Phi(x_j,u) \}  } $$  My question is, what are the features in this case? Some codified version of the parsing tree? Are the features a statistical concept?  I will also appreciate any bibliography that can be useful in tackling this issue.  UPDATE: I've talked to a professor and he had just told me that the features are obtained after doing a classification algorithm based on the parse-tree. Do you know what kind of classification is done with the parse tree?


Which is correct? Whether to use the icon after the label or the icon before the label?

To Use Icon after the label?  Ex:     (Or)  To Use Icon before the label?


Show that there is a $6$ x $4$ board whose squares are all black or white, where no rectangle has the four vertex squares of the same color. Also show that on each $7$   x $4$ board whose squares are all black or white, there is always a rectangle whose four vertex squares are the same color. Point: On the board, adjacent houses do not necessarily have different colors.  I suspect it involves Pigeonhole principle or something discrete-mathematics, but I don't know how to solve it


Can I hand in an essay which I have written last year, but not as part of a course?

I have written an essay last year, as a personal exercise. I now have a course at uni on the topic and could basically just hand in this essay now, the topic fits perfectly. I have also never submitted this essay to any other course or so.  Could I just hand in this essay, or would I violate some rules with that? Is this maybe already self-plagiarism?


Power analysis from Bayesian point of view

I was reading an article on a power analysis and sample size calculations for a class of models that known as joint longitudinal-survival models. The paper derives a closed form formula for power and sample size calculation. This paper is a frequentist paper in a sense that it assumes parametric assumptions and based on those assumptions, it gets likelihood, score function, … and it eventually gets the formula.  I was wondering how power analysis and sample size calculations are done in Bayesian framework?  Probably my question is naive especially given that I'm not expert in power analysis, but I think no matter how we approach a problem, once we have a hypothesis, power analysis is essential. So, I wanted to  ask:   Is power analysis also done in Bayesian framework? Could someone kindly references some papers on power analysis from Bayesian perspective? Would be great if I can find a power analysis for problems tackled with Bayesian nonparameteric approaches.


Synchronized ArrayList performs better than Vector?

I am reviewing a method in where Vector is used. This method is identified as possible cause of poor performance of overall program.  I read a thread that you can convert Vector to Synchronized ArrayList via Collections.synchronizedList(). Am I gaining benefit (better performance) by converting Vector to Synchronized ArrayList?


I am trying to create a copy of a std::string to a char*. This is my function and its seen result:  void main() { std::string test1; std::cout << "Enter Data1" << std::endl; std::cin >> test1; char* test2; test2 = (char*)test1.c_str(); std::cout << "test1: "<< &test1 << std::endl; std::cout << "test2: "<< &test2 << std::endl; }  Enter Data1 Check test1: 0x7fff81d26900 test2: 0x7fff81d26908   I am unsure if a copy has been created or both of them are pointing to the same location. How to confirm this?


Books recommendations for my theoretical physics library

long story short: I got a big prize from my scholarship, which consists in a lot of money for books, and I mean a lot: almost USD$ 3000. Thus, I am going to buy lots of books, of course!  So I'm asking for book recommendations. My field is theoretical high energy physics (I work on extended SUSY and string theory, mostly), so my focus is in those topics, but not only that.  The books I'm targeting are:   General physics   Landau's vol 1, 2, 3, 5 and 9 Griffiths QM and Electrodynamics Weinberg QM "Lectures on Quantum Mechanics", Dirac  QFT   Zee's QFT in a nutshell Weinberg vol 1,2,3 Srednicki QFT Shifman Advanced topics in QFT Mussardo "Statistical Field Theory" Coleman's "Aspect of Symmetry"  String   the two volumes of Green, Schwarz, Witten Polchinski vol 1 and 2 Nastase AdS/CFT book Peter West "Introduction to Strings and Branes" Becker^2 and Schwarz "String Theory and M-theory" "Quantum Fields and Strings: A Course for Mathematicians" "A First Course in String Theory", Zwiebach  Group Theory   Ramon's "Group Theory: A Physicist's Survey " "Representation Theory", Fulton  Susy   "Modern Supersymmetry Dynamics and Duality", Terning "N=2 Supersymmetric Dynamics for Pedestrians", Tachikawa "Supersymmetry and Supergravity", Wess and Bagger "Supergravity", Freedman  GR   "General Relativity", Wald  Mathematical Physics   "The Geometry of Physics", Frankel  Others   Exactly Solved Models in Statistical Mechanics, by Baxter    Reading previous questions related to this one, I found Naber's "Topology, Geometry and Gauge Fields" and Bredon "Topology and Geometry", which seem to be good books. Witten suggested to read "some" complex analysis as part as your academic training, and I found Lang's "Complex Analysis" and the series of four volumes by Stein and Shakarchi, but I have zero experience in those topics (as far as a formal course), so I don't know if those are good choices or not. Finally, one of my academic rivals computed using harmonic superspace something I computed using the standard Minkowski superspace, and it seems interesting. He suggested to me Galperin et al "Harmonic Superspace" as a good place to learn it, what do you think about that book?  Do you have any suggestion and/or recommendation? I feel like another Stastitical Mechanics book is missing (Landau's is too hard, and next semester I may have to teach some Statistical Mechanics, as part of my future teaching duties.) Any other book that might be a good reference in the future?, some more mathematical physics (topology, geometry, group theory, etc.)?, maybe some condensed matter book for string people like me?


Why does The Magicians include so much un-airable dialogue?

The Magicians is a SyFy original series based on a fantasy book of the same name. It's essentially a deconstruction of the young-adult fantasy genre, aimed squarely at grown ups (it includes obvious send-ups of Narnia and Hogwarts).  The show has some pretty adult themes: there's an absurd amount of sex between all variety of participants, lots of death, depression, addiction, etc. Plus, there's a lot of swearing. Every episode contains multiple lines of dialogue where characters use obscene language, and the worst of it (primarily the "f-word") gets censored out.   It's that last part that confuses me. As far as I can tell, the show was written and produced specifically for the SyFy channel. Unlike many of SyFy's shows, it's not an Australian or Canadian import. It was produced by a US company, by people who have extensive experience with American network TV (one of the EPs worked on Supernatural for 6 years).  Why would they write and film dialogue that they knew would never be allowed to air on the network they sold the show to?


Let $A,B$ and $U$ be sets so that $A\subseteq U$ and $B\subseteq U$. Prove that $A\subseteq B$ iff $(U\setminus B)\subseteq(U\setminus A)$.  The forward implication is easy to prove but i got stuck at the backward implication, i.e. $(U\setminus B)\subseteq(U\setminus A)\Rightarrow A\subseteq B$. Can someone help me out with it? Thank you.


I was browsing the main Stack Exchange  and came across the "Hot posts" tab. It is a fun thing to see the diversity of the entire network. Then I noticed that there is a list with "Top network askers" right beside it, which is simply a list of the authors of the questions that are listed on the left half of the page.  I suspect that there was some sort of use for this feature, or it was adapted from something similar, but in its current state I don't see any use for it.   Should we:    adapt it to include a more relevant ranking?  consider changing the name of the list to reflect what is actually listed? consider omitting it at all?


Kernel of composition of linear transformations

Let $f : U \to V$ and $g : V \to W$ be linear transformations on the vector spaces $U$, $V$, and $W$. Supposedly,  $$ \dim(\ker(g \circ f)) = \dim(\ker(f)) + \dim(\ker(g) \cap \operatorname{im}(f)). $$  How might I go about proving that?    (Attempt:) The $\dim(\ker(g)\cap\operatorname{im}(f))$ term suggests to me that I should define a vector space $V' = \ker(g) + \operatorname{im}(f)$ to invoke the theorem that  $$ \dim(V') = \dim(\ker(g)) + \dim(\operatorname{im}(f)) - \dim(\ker(g) \cap \operatorname{im}(f)), $$  but I don't really see where to go from there.


Does it make sense getting any of these "extra" lens packages?

I see many packages sold online with a camera body and extra lenses.  Are they any good? Since they're bundled, is the price better then buying the "extra" lens later?


When the rated current of a 250 KVA DG set is shown as 347.8 A, does it mean that it is the line current or phase current or sum of currents on all phases say R Y B phases


How can I set and get the tty console font?

1.How can I set the font and size of the TTYs?  The command:  dpkg-reconfigure console-setup   allows me to choose certain fonts/sizes that cannot be installed (an error message appears after the reconfig. process). Moreover, the values set in /etc/default/grub alter everything. Sometimes you are using a font, but after rebooting it is changed.  2.How can I know what font/size is the console using in a certain moment.  There is a how to in the community pages to set the TTY resolution but it has no description of its interaction with the font/size of the console during boot and after.


Windows server 2008, a very small DDoS is able to kill my server

So I have this i7 3.2Ghz 6-core dedicated server running Windows Server 2008, with a 1Gbps internet speed. Everything runs fine and nice, and the machine is strong enough to handle even up to 700 Mbps DoS attacks very easy.. no lag, no problem..  From time to time we were used to have big attacks but from only 1 or 2 IP at a time, so the CPU usage was always fine, until recently, we discovered a whole new level of DDoS attacks !  Some guy is flooding very small SYN packets, that are not exceeding 40 Mbps in total, but from thousand of IPs/botnets.. He is able to increase the CPU usage of the first COR up to its maximum, making the server almost down and not responding to RDP.. (The other 11 cors are empty, just chilling)  The TCP port that the attacker is targeting is a closed port, i think it's just the OS (Kernel in red) that's making all that mess.  I did some research, and (not sure) I think maybe the problem is something about IRQ balancing, like I need to balance that CPU usage between the other free cores..  Anyways, the big question is: Is it possible to fix this issue within the windows itself? How the hell can he kill my server with a 4% Network usage, when my server was able to stay alive even at 90% of the network usage before?! There must be a fix to this! Anyone know about balancing the 1st core to fix this? Please help with anything you have.


An Extreme Point of a closed ball of $\ell^\infty$

I am trying to prove that all "closed unit ball" of $$ c_0 = \{ \{x_n\}_{n=1}^\infty \in \ell^\infty : \lim_{n\to\infty} x_n = 0\} $$ do not have any extreme point.  (Extreme Point) Let $X$ be a vector space and $A \subset X$ be convex. We say $x\in A$ is "Extreme Point" if for $x = (1-t)y + tz,\; y,z,\in A, \;t\in(0,1)$ then $y = z = x$.  What I tried is as follows:  Let $B$ be a closed unit ball of $c_0$, that is, $$B = \{\{x_n\}_{n=1}^\infty \in \ell^\infty : \lim_{n\to \infty} x_n = 0 \text{ and } \|x\|_{\ell^\infty}\le 1\}.$$ If there is a extreme point $b = \{b_n\}_{n=1}^\infty\in B$, then we have for $$ b = (1-t)y + tz, \quad y,z\in B,\quad t\in (0,1) $$ implies $$ y = z = b. $$ But I cannot do anymore here. Would you please help me?


What happens if you try to freeze water in an water tight container

If I have a container that is full of water and I attempt to freeze the water by freezing the container, what would happen if the container is strong enough to prevent the water expansion? Could the water be in liquid state even though it is at or below freezing point?  This is probably a daft question but its something that's been bugging me.


Saving the PDF output file into a specific file using pdflatex inside VisualStudio C#

I am trying to run a .tex file using pdflatex with MikTex from inside VisualStudio C#. My problem is that I can't seem to get the PDF output in the right location. I saw that there is the "-output-directory" option but I haven't been able to implement it correctly. I am running the following line:  Process.Start("pdflatex", pathTEX); to get the PDF. Can someone give me an example of how to properly add the output directory into the code line I have or any other method? Thanks in advance


As addressed in , a bibliography across several slides is not vertically aligned from the first slide to the next. In that case, it seems to be sufficient to remove an apparent topsep introduced by the bibliography (see ).  But when I reduce the font size of the bibliography, the top of the list on the first slide is once again not aligned with the following slides:  \documentclass{beamer} \usepackage{biblatex} \addbibresource{biblatex-examples.bib} \renewcommand{\bibfont}{\normalfont\small}  \begin{document}  \begin{frame} \nocite{*} \end{frame}  \begin{frame}[t, allowframebreaks]     \frametitle{References}     \vspace{-\topsep}     \printbibliography \end{frame}  \end{document}   In this MWE, the misalignment is quite small, but in my actual document, the misalignment is much bigger. What causes this behavior, and how can I undo it?   that this is the same problem as what occurs when an item list is broken across several slides:  \documentclass{beamer} \begin{document} \begin{frame}[t, allowframebreaks] \begin{itemize}     \item A     \item B     \item C     \item D     \item E     \item F     \item G     \item H     \item I     \item J     \item K     \item L     \item M     \item N     \item O     \item P     \item Q     \item R     \item S     \item T     \item U     \item V     \item W     \item X     \item Y \end{itemize} \end{frame} \end{document}


Add +2 reputation points for accepted flagging as duplicate

This question is similar to:  , but with a small refinement,   only first flag will get +2 reputation only accepted and committed flag will get the reward (this is: question got closed as duplicate, for example) only 'exact duplicate' and 'offtopic -> move to other sub-site..' flags will be eligible for bonus.   Rationale:   there is a high volume of newbie questions appearing each day, which are already answered, sometimes answered at epic level. because answering such question can give a person +25 reputation from the noob, not counting random by-passers' good will - people are not very willing to mark such questions as duplicate, and sometimes deliberately copy-paste answers from older duplicates. offensive, spammy or retarded questions are downvoted with passion anyway, so there is no need to additionally reinforce users to do that ;)


Is Dirichlet function Riemann integrable?

"Dirichlet function" is meant to be the characteristic function of rational numbers on $[a,b]\subset\mathbb{R}$.   On one hand, a function on $[a,b]$ is Riemann integrable if and only if it is bounded and continuous almost everywhere, which the Dirichlet function satisfies.  On the other hand, the upper integral of Dirichlet function is $b-a$, while the lower integral is $0$. They don't match, so that the function is not Riemann integrable.  I feel confused about which explanation I should choose...


Subset of a multiset with limited repetition {1,1,1,2,2,2,3} or {3,3,4,4,5,5,7,7,7}

How to count number of different 3-members-subsets (not ordered) of a multiset {1,1,1,2,2,2,3}? I need a general formula or a general method of solving that problems. Another example: how to count number of defferent 4-members-subsets (not ordered) of a multiset {3,3,4,4,5,5,7,7,7}?


I want to draw various matchstick pictures like this:    or like this    or other figures from:   I want to use TikZ for this and have two questions about this:   How do I get the path decoration with the matchsticks? What's the (syntactically) easiest way to draw pictures like this or how would a TikZ expert do this (to be flexible enough to draw such kind of figures but to have an easy syntax)?


Which characters are valid for bibliography entry identifiers?

I'm currently writing a paper for my study on the applicability of Spring Batch (a java framework) for the use cases of the department I'm currently in.  For this, I'm citing parts of the Spring documentation, and I wanted to use a . in the bibliography entry identifier. While this at first had me worried that dots might not be permitted in identifiers, it turns out they are.  However, I can't help but wonder which characters are permitted - is it ASCII characters? A subset of ASCII characters (i.e. alphanumeric, ., - and _)? All unicode characters? Some unicode characters? Also, even if they are valid, are there characters that could create strange errors depending on which context the bibliography entry is referenced in?  No worries, I don't intend to use emojis in my identifiers, I'm just curious as to which characters are valid. Thanks in advance! :)


# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # #      102.54.94.97     rhino.acme.com          # source server #       38.25.63.10     x.acme.com              # x client host  # localhost name resolution is handled within DNS itself. #   127.0.0.1       localhost #   ::1             localhost         202.142.157.220 linux-eadz.abacus-global.com         202.142.157.219 ac-hana-2.abacus-global.com ac-hana-2   i want to add this host file in ubuntu but due to new user i dont know how???? can someone help me ??????


Is there a Ubuntu 17.10 that does not have GNOME desktop environment?

I personally don't like GNOME so just wanted to know if 17.10 is a GNOME-only version or if there is a non-GNOME version.      I'm currently using Ubuntu 17.04.


How to align a  to the middle (horizontally/width) of the page

I have a div tag with width set to 800 pixels. When the browser width is greater than 800 pixels, it shouldn't stretch the div, but it should bring it to the middle of the page.


For a tree, I want add labels for every line of children

I have asked the same question about four or five hours ago. @Jason Zentz has given me a link. But the tree linked gowns down. It is a little different from mine. I tried many time to solve the proble, But I failed. So I have to post the question again.  Here is my question


Syntax vs semantics in logic and metalogic

Trying to better understand syntax vs semantics (structure vs meaning) in logic and metalogic.   I am using this as my reference point (and the example(s) below on this link):   e.g. let's say we have the connectives/operators:  $\Omega = \Omega_0 \cup \Omega_1 \cup \Omega_2 = \{T, F\} \cup \{\lnot\} \cup \{\to\}$  And the following rule of inference (modus ponens):  $P, P \to Q \vdash Q$  And the following axioms (Jan Łukasiewicz system, picking these arbitrarily):  I. $(p \to (q \to p))$  II. $((p \to (q \to r)) \to ((p \to q) \to (p \to r)))$  III. $((\lnot p \to \lnot q) \to (q \to  p))$  Does this fully describe the entire logical system, or only in terms of syntax? Do the semantics follow or do we have to impose those on top of all this? Is imposing semantics a metalogical level concept?  To my current understanding, we'd use truth tables to define various operators and such to give semantic meaning but are these optional / more of a convenience, or are they necessary?   Are truth tables still metalogical?   What about other definitions, like introducing operators such as $\land$, $\lor$, etc, are these still metalogical or would they need to be embedded in $\Omega$ up front?  For example, how do we use all this to describe how $\lnot$ and $\to$ work? i.e. showing that:  $\lnot T = F$  $\lnot F = T$  $F \to F = T$  $F \to T = T$  $T \to F = F$  $T \to T = T$  Or law of excluded middle:  $p \lor \lnot p = T$ (after defining $\land$ and $\lor$, etc)  Do we explicitly define these with truth tables, or derive them from the axioms and inferences somehow? How do the axioms and rules of inference play with each other here and allow us to ultimately go from something involving $\vdash$ to something with $=$ or $\to$?  Trying to understand how we start off with a system and start unrolling a logical system as we might normally use it.


Is it possible to cache database connections when using PHP like you would in a J2EE container?  If so, how?


2 Images, same object: tone difference and alignment

I would like to know a software which helps in post-production to calculate the general color/tone difference of 2 images. The images contain the same object, but arn't shot from the same position. One image might be sunny, the other cloudy, so one is more orange/yellow, the other more grey/blue, but the same object.  How would you align the tone of the image?  Background info: i shoot a couple of hundreds of images to produce textures for my models, the objects are outside, so weather conditions can change at any time, shooting must continue. I do photogrammetry, so I use the images to project them on the geometry and bake them in a UV Map. So in general I have a chunk of images made in sunny condition and another in cloudy. I would like to apply a tone to all cloudy images, having similar tone like in the sunny images.  It's not about HDR. It should be computable, not manually.


Why can forced inline functions lead to bad performance?

If I inline a function.  The function call body will be copied instead of issuing a call() to it. Why can that lead to bad performance?   Edit: And what about cache misses because of to big functions then? Why does the rule of thumb "only inline functions with max 3 lines" exist then?


Where do I report people for deleting their questions on purpose after they get an answer

Today I was looking at the question of this . The question was pretty simple, he was looking for the eval function in  not knowing of it's existence. He received a comment and while I was finishing reading the question, I saw him commenting      Thanks, eval() is what I was looking for.   and then he deleted his question. In my opinion, such behavior isn't appropriate. So, should I just ignore this or can I do something about it?


Why is $\langle \textbf R \rangle =Tr \rho R$ here $\rho$ is the state density matrix

I came across this,  \begin{post} To each state there corresponds a unique state operator.The average value of a dynamical variable \textbf{R}, represented by the operator $R$ ,in the virtual ensemble of events that may result from a preparation procedure for the state, represented by the operator $\rho$, is  $$\langle \textbf{R}\rangle=\dfrac{Tr(\rho {R})}{Tr\rho}$$  \end{post}  $\rho$ is called density matrix or statistical operator.  What's meant by this and why does this give average?


First week of August in Scotland : What kind of clothes to pack?

In a couple of weeks I will be going to Edinburgh, Scotland. I've been told that the weather is very unpredictable throughout the year. Can you suggest what I should pack as regards clothes?


Hotstar.com is more like Indian Netflix. It's a video streaming service and have apps as well as web versions. hotstar.com open on Firefox, Chromium and Google Chrome in Ubuntu. We are able to browse content and select, click " Play " as well.  After that, the content never plays. It keeps loading and loading with a spinning circular icon in the middle of the player.  Any possible fix for this issue ? Thanks.  PS: Works fine on Windows.


Probability of drawing a flush from a standard deck of cards

The following is the problem put to me:  A 5-card poker hand is dealt from a well shuffled regular 52-card playing card deck. Find the probability that the hand is a Flush (5 nonconsecutive cards each of the same suit).   I am completely unfamiliar with poker, and just learning the principles of probability. I would appreciate some help understanding the problem, and figuring out how to proceed from there.  For example: when it says "5 nonconsecutive cards," does it mean no single card can be consecutive to any other, or does it only mean that they cannot all 5 be consecutive to one another? (Same goes for other combinations- are 4 in a row disallowed? 3 in a row? 2? Are 2 and Ace considered consecutive?)  For the sake of beginning the problem, I'm going to assume none of them can be consecutive to any other, and that the 2 and the Ace are not considered to be consecutive. If I'm wrong I would appreciate someone correcting me.  Here's how I think I might begin $\ldots$  First, we're choosing cards of the same suit, so we have 13 of any one suit.  None of these can be next to each other, so we'd have to consider the different ways they could be alternating.  They could either be in the alternating slots: 2,4,6,8,10,Q,A , of which there are 7 possibilities.  Or in the alternating slots: 3,5,7,9,J,K , of which there are 6 possibilities.  So I figure, the answer to this would be:  $(7C5 * 6C5) / 52C5$  Can anyone either verify or correct my assumptions about the nature of the question, and point me in the right direction if my logic/solution is incorrect? Thank you very much.  P.S. I assume this question is asking ONLY about the probability of getting a flush, rather than a straight flush or a royal flush (which I believe is a "thing"), since it's asking about nonconsecutive cards specifically.


How does the word "cardinal" relate to "cardinal numbers"

In linguistics, more precisely in traditional grammar, a cardinal number or cardinal numeral (or just cardinal) is a part of speech used to count, such as the English words one, two, three, but also compounds like three hundred and forty-two     "chief, pivotal," early 14c., from Latin cardinalis "principal, chief, essential," from cardo (genitive cardinis) "that on which something turns or depends; pole of the sky," originally "door hinge," of unknown origin.  What's the relation between the two?


How to choose the correct resistor to change voltage?

I want to change voltage given by a little power supply that I have at home stuckd in my desk, to use it as power supply for a little DC motor.  This DC motor need an input of 3.6 volts and give me around 5.4 Watts (1500mAh).  So that power supply gives me an output of 7.62 Volts (measured with voltimeter) and 1500 mAh.  Using Ohms law "R=(V°-V¹)/I", where my itinial voltage is 7.62 and my desired voltage is 3.6, and my current required is the same 1500mAh, so my result is:   R = (7.62 Volts - 3.6 Volts) / 1.5 A = 2.62 Ohms   Then I picked a resistor of 2.6 Ω with 4 bands and 1% tolerance (red, blue, yellow, brown) and used it.  Well, I didn't test on my little motor because I don't want to waste it so I just tried to measure it using my voltimeter without link this to any led o motor and i didn't change voltage at the end. Also I was afraid to trash my motor because when I linked this resistor between positive and negative wires of my power supply it became very hot instantly.  Using this little resistor how can I test this without waste my motor and how do I know if this very resistor can handle this current?


restrict child div height to parent container height

I want the graph div to have a height that stretches all the way to the end of it's parent (graph-container) container, but not extend past it. I have tried setting graph's height to both 100% and inherit, but both of them result in it extending past it's parent container's bottom edge (I don't want to use overflow: hidden). Is there a way to set the height property on graph so it automatically sets its height to the right value? Current output: What I want:  Current code:   * {   margin: 0;   padding: 0;   box-sizing: border-box;   font-size: 20px; }  .wrapper {   height: 100vh;   width: 100vw;   display: flex;   justify-content: center; }  .graph-container {   border: 3px solid black;   height: 60vh;   width: 70vw;   margin-top: 10vh; }  .graph {   height: 100%;   width: 100%;   border: 3px solid red; } <!DOCTYPE html>         <meta charset="UTF-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0" />     <title>Document</title>     <link rel="stylesheet" href="style.css" />

Graph Container

Graph


Can someone tell about how it is possible to write locally finite sets $n_{Z}$  with the free abelian group generated by the prime divisors? First I thought it was a cartesian product of spaces but it is in a free abelian group, so I dont know how to continue. It looks like I use the prime divisors to generate the locally finite subsets, is that all I have to do ?


Why is Windows folder so big in Windows 8.1?

I recently installed Windows 8.1 on my laptop. I have the Windows folder on its own 64GB mSATA drive. For Windows 7 this was great because the Windows folder was small. With Windows 8.1 the drive is almost full, and the Windows folder takes up almost 20GB (the WinSXS folder takes up most of that space).  Is there a good reason that the Windows folder takes up so much space? Is there a way that I can cut down on some of the space that it takes up?


Evaluate this integral $$\int_0^1(x^2-x^3)^{-\frac 1 3}dx$$ by using a barbell-shaped contour with shrinking end surrounding 0 and 1, together with a large circle containing the barbell.    The branch cut connects 0 and 1. Let the value of $f(z)=z^{-\frac 2 3}(1-z)^{-\frac1 3}$ over the branch cut be positive. When a point over the branch cut moves along the red curve to the corresponding point under the branch cut, $\Delta \arg(z^{-\frac 2 3})=e^{-i{\frac {3\pi}{4}}}$ and $\Delta \arg\big((1-z)^{-\frac1 3}\big)=0$. So $e^{-i\frac {4\pi} 3}$ should be multiplied under the branch cut.   The integral over the outer circle equals:$$-2\pi iRes(f(z),\infty)=2\pi iRes(f(\frac 1 t)  \cdot \frac 1 {t^2},0)=2\pi iRes(\frac 1 t (t-1)^{-\frac 1 3})=2\pi i(-1)^{-\frac 1 3}.$$ Because of the branch we chose, $(-1)^{-\frac 1 3}=e^{-i{\frac \pi 3}}.$ We get $$(1-e^{-i{\frac {4\pi} 3}})\int_0^1(x^2-x^3)^{-\frac 1 3}dx + 2\pi ie^{-i{\frac \pi 3}}=0.$$ So,$$\int_0^1(x^2-x^3)^{-\frac 1 3}dx=\frac {2\pi} {\sqrt 3}.$$


What are the scars on the face of Dryden Voss?

Dryden Voss, the iconic villain in Solo: A Star Wars Story, has some pretty radical facial scarring.    I'm wondering if there is any evidence how he got these scars?  In particular is it possible he got the scars in battle, or from exposure to a particular substance or drug.  It also seems he is under the service of a Sith Lord (if not an apprentice himself) and if so, could this have come as part of an initiation into, or training with, the dark arts.


Dual boot windows 10 and ubuntu 14.04 on an MSI GS63VR machine

I read a lot of guides on how to dual boot windows 10 and ubuntu (not specifically 14.04) and they all say different things. Some say you need to disable secure boot, others say you can't do that because it will mess everything up. There's also the thing with fast startup. I read that I should disable fast startup when dual booting, else I could lose my data, but I see very few guides mentioning that fast startup should be disabled. If that's such a big problem, why is it not mentioned? Another question that arises: if I have to disable one or both, can I re-enable them after installing ubuntu? I already resized the partition to allocate some space for ubuntu 14.04, but now I don't know what to do: should I disable secure boot? Should I disable fast startup? Is there a specific way to dual boot windows 10 with, specifically, ubuntu 14.04? Or is it the same with any ubuntu version? Has anyone ever tried to dual boot windows 10 and ubuntu on an msi machine? Is there any issue? I just want to do this without any problems. I don't want to mess up my computer. Obs.: My disk is GTP


I wanted to commit to a proposal on Area 51 so I filled in my name and email address. After hitting Commit I realized that Area 51 created a new unregistered account for me (although I already have an account for SE sites using the email I provided in the form).  As I couldn't find any log-out buttons I decided to clear cookies associated with Area 51 and log in using my default account. To my surprise, I wasn't able to log in and I was presented the following error instead (I removed possibly sensitive information; I can send the exact message to the developers if they find it useful):      Unable to log in with your OpenID provider:      The openid.return_to parameter (.) does not match the actual URL (.) the request was made with.    What happened?    Details   Restarting Firefox doesn't help.   Possibly related


Can muggles cross through the barrier at kings cross?

I mean it would make sense if they couldn't but, how could the barrier tell the difference between a muggle born wizard and a normal muggle because i'm guessing people would tend to lean on the big pillars, and kids would fall on them..


I bought Nexus 5, it had android 4.4.2. I updated it to 4.4.3 and 4.4.4, but I am unable to update it to 5.0. It says that system is up to date and it has been this way for a few hours. I know that Nexus 5 has 5.0.2 (I think) already. Why is my phone not finding any new updates?


I have found following definition at      In programming languages, a closure (also lexical closure or function   closure) is a function or reference to a function together with a   referencing environment—a table storing a reference to each of the   non-local variables (also called free variables or upvalues) of that   function.[1] A closure—unlike a plain function pointer—allows a   function to access those non-local variables even when invoked outside   of its immediate lexical scope.   is it true all occasions ? can't lambda functions (those creates a closure) keep refereeing to local variable that would be in out of scope when the lambda is called? isn't this is the behavior of GO?    PS: I am still wondering why they use "lambda" term   For this  got the answer     Following post might find helpful for other readers,


How to find voltage across the 2k ohm resistor in the given circuit?

I have to find Vo in the network given below using Thevenin’s theorem. After removing load resistance i.e. 1k ohm, i know that Ix=V2k/2k but I am stuck on finding voltage across the 2k ohm i.e. V2k. I am familiar with voltage dividers but confused by the current source


Xfwm4 + Compton: Problems with gtk3 applications

I am currently using Xubuntu 16.10 with the Xfwm4 window manager. I switched out the default compositor with Compton in order to fix my screen tearing issues. This worked flawlessly, however there appears to be some problem with the way Compton renders GTK3.20 applications.    For some reason it creates this Double Shadow effect. Can anyone tell me how to fix this, or at least what might be causing it.  Here is a link to my Compton configuration file if it helps:


Let $B\subset\mathbb{R}^d$ be closed and $z\in\mathbb{R}^d$, show that there is $b_0\in B$ such that $\delta(z,B)=\|z-b_0\|$.

If there is a closed subset $B$ of $\mathbb{R}^d$ and $z\in \mathbb{R}^d$ then show there is a point $b_0\in B$ so that we have $\delta(z,B) = \|z-b_0\|.$  I'm not sure how to begin this exercise and what theorems are available to help me solve it


I had a question regarding a proof for my analysis class  $$\lim\limits_{n \to \infty}\sqrt[n]{n^2 + 1}$$  I've tried a handful of things, but in all cases, I have either reached a point that has no logical connection to the result, or I don't know how to prove a step.  I'm not asking for the answer, but advice on how I should proceed with this problem would be helpful.


Is time relevant for getting better answers?

Can you get better answers on Stack Overflow when a question is asked at a certain time of the day?  Let's say the question is asked in the morning (GMT), will it attract more attention than a question that is asked at night?   Suppose that is true: What is the best time to ask questions?  On the other hand,    How long can one expect to get relevant answers?  Is a question after (let's say) 12 hours "lost"?    The question seems to attract no more answers after a certain time, unless the question itself is that relevant that a lot of people keep it active.


systemd: user service starts at boot with target default/graphical but not multi-user

I tried to start at boot a service running in my user's context, which did not work with multi-user as target but only with default, i.e., graphical.   I enabled lingering for my user and the service  sudo loginctl enable-linger $USER systemctl --user enable $SERVCE systemctl --user start $SERVICE   However, the service did not got started after reboots.  The service originally targeted multi-user  [Install] WantedBy=multi-user.target   i.e., resulting in the service link  $HOME/.config/systemd/user/multi-user.target.wants/SERVICE.service   Not as expected, the service did not got started at boot.  Only after changing the target to default  WantedBy=default.target   (which is currently graphical) and re-enabling the service, the service got started automatically.  However, I had assumed that graphical is downstream of multi-user as target, i.e., being 'later', or?  What may be have prevented the service to start with multi-user?


I know many people have had similar kind of issues and I tried to fix this with the answers I found but with no luck.   Device: iMac 27" mid 2011 OS: Latest High Sierra (I think the recovery mode is maybe the Lion version?)   I have Linux partition with High Sierra, and been using it with no problems at all. Now I did a Bootcamp partition too and installed Windows 7. After that, I am now unable to boot to Mac and in recovery mode I can see that the main partition type is now FFFFFF-FFFF...  The partitions in a nutshell are like:   High sierra, ~850 GB Linux, ~100 GB <- This can be deleted  Bootcamp, ~49 GB <- This can be deleted   What I have tried:  I did the gpt destroy disk0 and after that added all the volumes back with  gpt create -f disk0  gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk0  gpt add -i 2 -b 409640 -s 1662109312 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0   and so on.. then then trying to verify the volumes with diskutil verityVolume disk0s2 I get  "Error starting file system verification for disk0s2: Unrecognized file system (-69846)"  Now I am at the point where I do not know what to do anymore.  Where I started:      And where I am now:       I just want a easiest way to get MacOS back to working with the data that's in there if possible and all the other partitions are disposable. Or I would like to know how to just format the drive and remove all the partitions so I can do a clean install (plan B).   All comments appreciated! Thanks!  Edit1: Oops I forgot that of course I can just format the drive via the graphical disk utility tool.


Is there any way I can add a static extension method to a class. specifically I want to overload Boolean.Parse to allow an int argument.


Light is electromagnetic wave. There is continuous vibration of electric and magnetic field in the light. It means that I I place a conducting coil in the light. There will be change in magnetic flux linked with this loop. Then why is there is no induced current in the loop which is placed in the light?


GRUB error on Ubuntu 13.04: 'invalid environment block'

After having problems with my H-P printer my Ubuntu 13.04 wont load. This is what I get:     Grub - editenv!ERROR: invalid environment block


Why is important for a manifold to have countable basis?

I've seen there are few questions similar, but I haven't seen anyone so precise or with a good answer.   I'd like to understand the reason why we ask in the definition of a manifold the existence of a countable basis. Does anybody has an example of what can go wrong with an uncountable basis? When does the problem arise? Does it arise when we want to differentiate something or does it arise before? Thank You


I encountered a popup similar to this one this morning while checking the weather report at  in Safari, though I have not been able to reproduce it.  The title is "about://(null)" and the text "Why you no play Candy Crush!!"  The popup occurred twice.  I tapped Cancel both times.  I suspect the source of this is rogue JavaScript in an ad network, judging from the fact that the screenshot below shows it in an ad-supported application, and when I saw it, I was on an ad-supported website.  My phone is not jailbroken.  I'm wondering if anyone is able to identify the source of the popup definitively.  Speculation is running rampant on Apple's support communities and elsewhere, from push notifications (delete Facebook and all your games!) to carrier notifications (which don't work on iPod Touches…), and my gut tells me little of it is helpful.  But I could also be very wrong.  (This is not my screenshot; it comes from .)    UPDATE 1: The Candy Crush people have this to say, but I'm not (yet) convinced there's actually something installed that is to blame:   UPDATE 2: Just reproduced it in the iOS Simulator while clicking around woodtv.com, but I'm not sure how to track it down further from here.


Referencing a Specific Citation in a Theorem or Definition Statement

Let's say I want to write Definition 1.1 of a source I call \cite{fr82}. I can write \cite[Definition 1.1]{fr82} without any trouble, and I can write \begin{defn}[\cite{fr82}] blah blah \end{defn}  without any trouble. However, when I write \begin{defn}[\cite[Definition 1.1]{fr82}] blah blah blah blah \end{defn}  I get the following error: Runaway argument? Definition 1.1) ! Paragraph ended before \@citex was complete. <to be read again>                     \par  l.488 \begin{defn}[\cite[Definition 1.1]                                         {fr82}]\label{defn:geom_fib} I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best  Any idea for how to fix this?


The psychology of downvoting others without telling them why!

I have been active on different SO/SE forums for quite a while. I have rarely downvoted anyone. I usually try to    let the person know what is wrong with their question/answer first and help them learn how they need to improve it edit the post myself if the person doesn't know how to do it. report/flag the post if the person doesn't consider the feedback downvote if the OP ignores all above issues   However, I have barely seen the same behavior from other SO users. Consider  for example. There I have asked a question about compiling software on FreeDOS and I didn't ask it on SuperUser because I speculated (wrongly) it will include some programing. I immediately recived some downvotes and flags which led me to write a P.S. :     Unfortunately, the SO is becoming a very toxic environment again. I have spent quite some time doing a lot of research on this question and tried to format it as nicely as possible. But users come and downvote the post and flag it to be closed without even explaining why! This is not right. We are here to help each other not to silence one another. If this question has any issues and you think it deserves downvote, please give me a chance to understand what it is by leaving at least a comment!   As soon as I wrote this I experienced a tsunami of downvotes and flags on my posts and former posts! someone even took the liberty to edit my post and remove this criticize. So here are the points I want to discuss:   what exactly happens in the mind of a person causing him/her to downvote others without giving them the chance to learn why? and why when this behavior is criticized they tend to do it even worse? Has there ever been a psychological study on people's behavior on social media and how they try to punish/silence others? Why SO/SE still has the feature of anonymous downvote without explanation. When there is a flag option what is the benefit of having downvote at all? what is the benefit of having so many SE forums when SO has tags? How flagging a post as off-topic and closing/removing it helps SO community?  why there is no option to move questions across these SO/SE forums if being "on-topic" is so important?    In my humble opinion, these are really important issues we need to fix if we want to have a healthy community. Thanks for your support in advance.


I have two list of same length l1=[reboot,revision,disk_space] and l2=[no,12.15,4300] I want to make these two list as key-value map. Output should be like this [reboot:no,revision:12.18,disk_space:4300].. I tried Zip it is not working


Clicking to reload an updated answer removes the code snippet buttons and removes syntax highlighting

If you are looking at an answer with a code snippet in it, and the answerer updates the answer, you see An edit has been made (etc.). If you click that, the answer is refreshed, but the code snippet buttons (Run, Copy, and Expand) go missing.  The code snippet buttons are there again after reloading the entire page.  Answer has been edited:        After clicking to reload it:        Similarly, non-snippet code blocks do not receive syntax highlighting after an edit, as described , which refers to  as a related or root cause.  (Browser: Chrome v77 - OS: Windows 10 Pro x64)


Permalink structure from two digits to one digit

I moved my website from SquareSpace to wordpress, I exported the content and posts, the post url's are most important in terms of SEO but I have an issue here.     In wordpress %monthnum% tag is 2 digits so it is adding 0 before   single months lets say January to September in wordpress it is 01-09   but the same in Squarespace is just 1-9.   This small differnce will impact my SEO because my currently indexed posts are all like this in squarespace    but the same post is this way in Wordpress    Is there a way in wordpress to make 01-09 to just 1-9, if yes please let me know.  Thanks much   Remove Duplicate on my question the provided answer in linked question doesn't work. I need more inputs from other forum users.  I added this code in my function.php but it didn't work  add_filter( 'the_permalink', 't5_strip_leading_zeros_in_url' );     add_filter( 'month_link', 't5_strip_leading_zeros_in_url' ); add_filter( 'day_link',   't5_strip_leading_zeros_in_url' );  function t5_strip_leading_zeros_in_url( $url ) {     // no pretty permalinks     if ( ! $GLOBALS['wp_rewrite']->get_month_permastruct() )     {         return $url;     }      return str_replace( '/0', '/', $url );  }   also tried this code  function remove_leading_zeroes_in_permalink($permalink, $post) {     if ($post->post_type == 'post') // change to your post     {                    if ('' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft')))         {                            $permalink = str_replace(array('%monthnum%', '%day%'), array(date('n', strtotime($post->post_date)), date('j', strtotime($post->post_date))), $permalink);         }     }     return $permalink; } add_action('post_type_link', 'remove_leading_zeroes_in_permalink', 10, 2); // for custom post types add_action('post_link', 'remove_leading_zeroes_in_permalink', 10, 2); //for post    Both didn't work


Batch script for replacing the same file from one folder to another folder

I have two folders where in src folder contains the original files and the destination folder contains the modified files. I want to replace the original file with the modified file which will have the same name. For example :  src fodler   C:\Users\admin\Desktop\101-modified\2009-5201215\5176123\5201043\5201215\html--- This contains art.html,ref.html  destination folder  D:\qc-testing\5201215--  This also contains art.html,ref.html.  So i want to replace the originals with modified files for all the folders in "101-modified" using a batch script.Thanks in advance


whenever I heard of the "wave-particle" duality of photons, I always thought they existed as a weird combination of physical waves and particles. Since finding about De Broglie wavelengths and matter waves, however, I have learnt that the "waves" in quantum mechanics are actually probability waves; the oscillations are actually of the real and complex components of the waves function and not of some physical quantity. however, isn't the oscillating quantity for electromagnetic waves the electric and magnetic field. Are electromagnetic radiation "waves" of probability or real physical waves? Is the waves nature of photons fundamentally different than that of matter?


AC current does pass from a capacitor. But DC current does not pass through it why?


Exponential equation: $x\times 10^{\frac{1}{x}}+\frac1x \times 10^x=20$

Can somebody help me solve this equation?  $x\times 10^{\frac{1}{x}}+\frac1x \times 10^x=20$  What I did: I think the left side is decreasing I tried to show that the first derivative  $10^{\frac1x} - \frac{1}{x^2} 10^x - \frac{1}{x}(10^{\frac1x} - 10^x) \log(10)$ is negative, but I don't know how. How to do it?


I want to place after all: echo "etc" ( >> filename)

I am at the beginning with bash scripts, I would like to know if I can put a command at the beginning in which after each: echo "123" to appear >> filename I have a lot of lines with echo "etc" and I want to move all the results from echo to a certain file. I hope there is someone who knows how much I need. I searched for tutorials but I didn't find anything and I don't know what to do. I will be very grateful if you help me! <3 peace


trying to install git on my ubuntu machine without a luck so far. Tried different things from different threads including below:  sudo apt-get update && apt-get upgrade && apt-get dist-upgrade sudo apt-get -f install sudo apt-get install git   Getting following error, when trying to install git with apt install git  The following packages have unmet dependencies:  git : Depends: liberror-perl but it is not installable E: Unable to correct problems, you have held broken packages.


How do I get back to Windows 10 after installing Ubuntu?

After installing ubuntu, I could normally choose after turning on the computer, unfortunately for some time I do not have this choice anymore and I can not enter Windows. I tried via UEFI but I do not see anything like that to be able to switch there. The Ubuntu version is the latest 20. Unfortunately, recovery doesn't work for me either. Translation adapted from Google Translate: nie mogę dostać się do windows 10 hej, po instalacji ubuntu mogłem normalnie wybrać po włączeniu kompa niestety jakiś czas już nie mam tego wyboru i nie mogę wejść do windowsa.Próbowałem przez UEFI ale nie widzie nic takiego aby móc tam się przełączyć. Wersja Ubuntu jest najnowsza 20.Niestety recovery też mi nie działa.  so after installing Ubuntu, after turning on the computer, I had a choice to choose a system. Then after some time Ubuntu disappeared when I turned on the computer, I couldn't get to it, I entered it through the elevator 10 somewhere in the advanced settings, I don't remember where because I found it on the net. Then after some time, only ubuntu turned on as if the window was replaced with it. I wanted to get to the elevator via UEFI, but unfortunately there is no second system anywhere. I can't find files for reinstallation either. I made Ubuntu on a different partition so I can see most of the memory but I can't enter it.


$_SERVER variable to identify where request is coming from?

I need to know what page a user made the request FROM ...  $_SERVER["REQUEST_URI"] tells me what file the request is made to, however I want to know what file / page the user was on when the request was made.


Why the sudden fascination with tensors?

I've noticed lately that a lot of people are developing tensor equivalents of many methods (tensor factorization, tensor kernels, tensors for topic modeling, etc) I'm wondering, why is the world suddenly fascinated with tensors? Are there recent papers/ standard results that are particularly surprising, that brought about this? Is it computationally a lot cheaper than previously suspected?  I'm not being glib, I sincerely am interested, and if there are any pointers to papers about this, I'd love to read them.


Is the second law of thermodynamics a real law?

Everytime I ask people why the second law of thermodynamics is true, they say because the probability of entropy increasing is very large. This for some reason doesn't seem right for me. Just because something has a high probability of happening doesn't mean that it is a fundamental law of nature.  Can someone say that because it is very unlikely to win the lottery that it is a LAW that you won't win?


I am writing a code where program read data from file and then it readlines and if a specific word exist in list it allows the user to modify its quantity. Well the issue is how can i get the iteration number (line number) in for loop while it is searching for word in line  My Code:  f= open('guru99.txt','r')  action = int(input('Enter number')) if action == 1:     for line in lines:         if 'banana' in line:             print(line)             print('You already purchased banana! You can change the quantity')             edit = line.split()             qty = int(input('Enter new quanity'))             print(bline)         else:             continue   for example if the word banana found on line number 3. How to edit this program to show the iteration number or index of the for loop


In a power supply, the current is a constant or gives whats the component/circuit need ?

I everybody, sorry for my english :D .  i'm a begginer of electronic and i'm learning a lot of electronic component, voltages, current and so on.  My question is about a charger (phone charger for example) or a power supply (if it's comparable).  I know that if i use a battery for the motor, this only take the current that need (for example, 200mAh).  If i have a 5v and a 500mA phone charger and i use to power a motor. The motor it's going to receive 5V and 500mA (and maybe, blow up (?)) or 5V and the current that they need ?   If the 2° answer is the correct, can i suppose that the 500mA is the MAX current output that the phone charger can give?  Thank you very much !


I'm trying to develop my first test class in our sandbox instance. When running the below test, I am getting no records return from the first query to build accountsList. The test succeeds, but I have 0% code coverage. The trigger works as expected when ran.  My Test Class:  @isTest private class test_deleteAccountSharesOnUpdate {  static testMethod void updateAccounts()  {     Set<String> accountIds = new Set<String>();      List<Account> accountsList =      [         SELECT Id, Is_Script_Update__c, Description FROM Account     ];      Integer i = 0;     for (Account acct : accountsList)     {         if(i > 199)         {             break;         }          acct.Is_Script_Update__c = True;         acct.Description = 'Testing at ' + System.now();          accountIds.add(acct.Id);          i++;     }      test.startTest();      update accountsList;      test.stopTest();      List<Account> updatedAccts =      [         SELECT Id, Is_Script_Update__c, Description         FROM Account          WHERE Id IN : accountIds     ];      for(Account acct : updatedAccts)     {         System.assertEquals         (             'Testing at',             acct.Description.substring(0,10)         );     } }   }  Trigger I'm trying to test:  trigger deleteAccountSharesOnUpdate on Account (after update)  {    Set<String> accountIds = new Set<String>();  // Gather the account Ids being updated for (Account acct : trigger.new) {     // Only remove shares for accounts being updated by data loader.     // Loader script will insert new shares after this job.     if(acct.Is_Script_Update__c)     {         String terrCode = acct.Territory_Code_String__c;          if(terrCode != null && terrCode.length() == 5)         {                accountIds.add(acct.id);         }     } }  if(accountIds.size() > 0) {     // Remove the shares associated with these accounts     delete      [         select id          from AccountShare          where RowCause = 'TerritoryManual' AND          AccountId IN : accountIds     ];      // Reset flag that indicates this update is from a data loader.     // Data loader will set this checkbox as true on update.     // This prevents the trigger on UI update.     //     List<Account> accountsList =      [         SELECT Id, Is_Script_Update__c          FROM Account          WHERE Id IN: accountIds     ];      for (Account acct : accountsList)     {         acct.Is_Script_Update__c = False;     }      update accountsList; }   }  Degub log shows no rows returned for the first query:  14:47:14.461 (3461430000)|SOQL_EXECUTE_BEGIN|[8]|Aggregations:0|select Id,       Is_Script_Update__c, Description from Account 14:47:14.483 (3483545000)|SOQL_EXECUTE_END|[8]|Rows:0  Any help is greatly appreciated!


Alternative lenses for 450d basic 18-55mm lens

I have Canon EOS 450d camera that I bought about 7 years ago and till now I have shot for about 15k photos. Lately appeared problems taking shots and when I pushed the button, nothing happened. I thought that camera is damaged but then I understood that the lens has some problems and after testing it by switching MF mode to AF, it worked so the lens doesn't work in MF mode. So, I need to repair it but I think that at this time I will search for a new lens, but I would love to get a better one compared to the basic lens.  How do I decide on a specific lens to fit my needs and budget? Mostly I shoot landscapes, family (outdoor/indoor), activities. Budget - around about 100 euros.


Can someone list the fields in history object? Since I wanted them to display in a page block in vf page despite using history related list.


If in Maschke's Theorem, for group ring KG where K is any field s.t. char $K \nmid |G|$, I take G to be finite , then I know Maschke implies that KG will be semisimple so it is isomorphic to a direct sum of Matrices over division rings, but how does adding that G is also abelian implies that KG will be direct sum of fields?


Let $\pi: X \times Y \to X$ be the projection map where $Y$ is compact. Prove that $\pi$ is a closed map.   First I would like to see a proof of this claim.  I want to know that here why compactness is necessary or do we have any other weaker condition other than compactness for the same result to hold.


In this sentence     He went outside. He looked down the road.   What is meant by down? I don't think he's in higher place.


I want to give myself a box that makes me invisible to mobs while wearing it. ''It'' is a skull of my second account that is textured as a Cardboard Box :)  Command:  /give @p minecraft:skull 1 3 {SkullOwner:DerpBox}{     display: {         Name: "DerpBox",         Lore: [             "Who needs state-of-the-art Technology",             "when you got a Box"         ]     },     AttributeModifiers: [         {             AttributeName: "generic.followRange",             Name: "generic.followRange",             Amount: -100,             Operation: 0,             UUIDMost: 62168,             UUIDLeast: 860927         }     ] }   I get an error saying     Encountered multiple top tags, only one expected   How can I fix this?


How can I run multiple copies of the same app?

On iPhone it's very easy to clone an app (running multiple copies of the app on the same device); e.g.:    Is it possible to do this on Android?


Upper bound for $|f(0)|$ based on its behavior within the unit disk.

Function $f(z)$ is holomorphic at least within the unit disk.   If for all arguments $|z|<1$ we have $|f(z)| \le 1$, and there exists a zero of order $n$ at $z=z_0$, then show that $|f(0)| \le |z_0|^n$.  How should I tackle this problem? Can it be generalized if for $|z|<R$ we have $|f(z)| \le M$ ?    So far I only understand that there exists a holomorphic $g(z)$ with $g(z_0) \ne 0$ such that $f(z) = (z-z_0)^n g(z)$,then $|f(z)| = |z-z_0|^n |g(z)| \le 1$ and moreover $|f(0)| = |z_0|^n |g(0)|$, but that doesn't seem useful since apparently I know too little about $g(z)$. In particular why should $|g(0)| \le 1$?


"It's an interesting topic for me" versus "It's interesting to me": Does it really matter?

I've just caught myself out twice by writing something down as being interesting for me! This is a typical Italian mother-tongue error, but Italian is not my first language. It used to be English, but now I'm no longer sure.   And yet when I say the above phrase it sounds OK. I feel comfortable saying it, so am I right to use the preposition for in this way? If as a linguist said: "Grammar is about how people really speak, not about how they ought to speak."  Here is a  which nicely sums up the difference between interesting to me and interesting for me.     Something you do is interesting for you.         Something people do or say is interesting to you.


I have 3 servers, at A server, I choose a image in the browser and POST it to the B server using urllib2, at B server,I get the image POST from A and make some changes to it, then POST to C server, C server will get the image and store it on the disk.  I use PIL to change the image at B, and post it to C. Question is I can't get the image in the request.FILES at C.  The solution I found is saving the edited image to the disk temporarily then open it and POST it.  Is there a way to POST a image processed by PIL and POST it?  Here is the wrong code:  bits = '' for chunk in image.chunks():     bits += chunk im_tmp = Image.open(StringIO(bits)) im_res = ImageAPI.process(im_tmp, mode, width, height)  # ImageAPI class packages the PIL methods output = StringIO() im_res.save(output, format='PNG') contents = output.getvalue() call(url_str=url, file_dict={'file':contents})  # call method packages the urllib2 methods


I always define my math operators by using \DeclareMathOperator from the  package amsmath. The problem is that let say I use my operator already defined as \Op then when I write the instruction $\Op x^2$ it looks something like this:    But I want something like this:    Note: At first this doesn't look like a big deal because I can always write something like $\Op(X^2)$, but there are also times in which I'd like to simplify things like when I'm writhing something like:    In this last case I'd like to write something like $\Op a_n$ instead of the full thing $\langle a_n\rangle_{n=0}^\infty$.   Also, so sorry if there's already an answer to this, I just couldn't find it.


Error when initialize a function pointer that is a struct member

Given the following struct with a filename and a functionpointer:  static struct thread {     const char *const filename;     ssize_t (*in)(struct thread *, void *, size_t);  }   and the function  int MyClass::read_wrap(struct stThread *t, void *buf, size_t nbytes) {     return read(t->fd, buf, nbytes); }   I try to assign the function read_wrap to the function pointer member in a struct object:  int main (void) {  thread myThread; myThread.in = read_wrap;  }   But I get the error:  error: cannot convert MyClass::read_wrap’ from type ‘int (MyClass::)(stThread*, void*, size_t) {aka int (MyClass::)(stThread*, void*, unsigned int)}’ to type ‘int (*)(MyClass*, void*, size_t) {aka int (*)(stThread*, void*, unsigned int)}’   I mean, the struct is expecting a function pointer and I thought when I pass it the name of the function, that this is somehow cast into a fp?! This code is from C and compiles fine with gcc.  Thanks for the help!


Safari does not work (iOS 9.3, iPhone 6s)

Suddenly Safari won't work on my iPhone 6s. I cannot open links either.  The whole thing freezes.   How do I solve this? I updated to iOS 9.3 a couple of days ago.


I'm new to Minecraft and I'm really enjoying it.  I play every day, mining, jumping around and all that stuff, but then I noticed my food bar is not going down. What would cause that?


Getting a NullPointerException when trying to check if an element in an array is null?

I'm writing this code where I'm calling a method to act on an element in an array of objects, and to do this I first need to check if the element is null. I am doing this using if(array[x][y]!=null), but I get a NPE pointing to this line and I don't understand why.  Here's the code in question:  Method to check:      public void addPiece(Piece p, int x, int y){//Method to add a piece to a given space on the board      if(gboard[x][y]!=null)//Check to see if space is empty before adding piece          System.out.println("Error: Board space already occupied. Please choose another space.");      else{          gboard[x][y]=p;          gboard[x][y].setXpos(x);          gboard[x][y].setYpos(y);      } }           Main method where it is being called:      public class PracticeMoves {//Demo method  public static void main(String[] args) {       Scanner kb=new Scanner(System.in);      Board board=new Board();      Piece p1=new Piece("Droid","Blue", 0, 0);      board.addPiece(p1,3,5);   Class where gboard is created:      public class Board {  private Piece[][] gboard;//initialize a 2D array of Piece objects to form the gameboard  public Board() {//no-args constructor to initialize gboard      Piece[][] gboard=new Piece[8][8];    }   Class for the piece object:      public class Piece {//abstract class that the rest of the pieces inherit from private String name; private String colour; private int xpos; private int ypos; public Piece(String n, String c, int x, int y){     name=n;     colour=c;     xpos=x;     ypos=y; } public String getName() {//getter and setter methods     return name; } public void setName(String name) {     this.name = name; } public String getColour() {     return colour; } public void setColour(String colour) {     this.colour = colour; } public int getXpos() {     return xpos; } public void setXpos(int xpos) {     this.xpos = xpos; } public int getYpos() {     return ypos; } public void setYpos(int ypos) {     this.ypos = ypos; } public String toString() {//toString method     return name+colour; }   }  Any help would be much appreciated. If there is any other part of the code you might need to see please let me know.  Thanks.  EDIT: Since this is being marked as a duplicate, I want to point out the the question I was referred to is asking what a NPE is. I know what it is, and I'm posting this here because I have no idea why one should appear here. Every question I can find similar to this is, the answers say that there shouldn't be an NPE and when they run it themselves no such error is detected. I just want to find out why I am getting this error, as it seems like there should be no reason for it.


I want to fill the height remaining of the parent with black color.  I put a div with class fill-black in this page :    In the center column, I put the div just below the text Détails du produit  I tried to use some flex properties, I want this div to fill the height of the parent. Is is possible using only CSS ?  I tried :  .fill-black {     display: flex;     flex-flow: column nowrap;     align-items: stretch;     background: #000; }   Here is a visual of what I want :   I put height to 200px, but I want this height to be responsive.


X=the number of cards that are drawn until the 1st ace is chosen. Find E[X]

Consider a deck of $52$ cards. Let $X$ be the number of cards that are drawn until the first ace is chosen (e.g., if the first two cards are not an ace and the third card is an ace then $X=2$). Find $E(X)$.  Hint: Let $I_j$ denote be the indicator variable that is $1$ if the $j$th non-ace is chosen before the first ace and $0$ otherwise for $j=1,…,48$.  I don't really know how to approach this problem, the hint makes it sound more confusing to me.