Crafty, Craf+tea= Craftea   Overwhelming, Over+whale+ming= Overwhaleming  cutie, Cu+tea= Cutea

In the board game "Scotland Yard" one player attempts to thwart capture by the others through misleading them as to his true whereabouts. In the rules, this player is referred to as "Mr. X".  Saying this out loud sounds a lot like "Misdirects" - which is what the player is trying to do.  On learning this, I became curious if there was a single word for this particular form of word-play, where the phonetics of a group of words reminds us of a different word or phrase. It's not uncommon, after all.  Wikipedia lists it as:     Janusism: the use of phonetics to create a humorous word (e.g. BOREneo   from Borneo))   But the link indicates there's no article for this work and indeed a search returns very limited results that are relevant, none of which appear to be from dictionaries. Which makes it entirely plausible the existing articles all derive from Wikipedia.  Is Janusism the word for this kind of word-play? If not, is there one, and what is it?


I would like to make a macro to easily create new Classes that derive from the same base class with different name and slightly different behavior.  I already have    class FactoryBonusModifier { public:    /// Function to overload    virtual BonusModifierAbstract* createBonus() const = 0; protected: };  #define DEFAULT_BONUS_FACTORY_DECLARATION(FactoryName)      \ class Factory## FactoryName : public FactoryBonusModifier   \ {                                                           \ public:                                                     \     virtual BonusModifierAbstract* createBonus() const;     \ };  #define DEFAULT_BONUS_FACTORY_IMPLEMENTATION(FactoryName)                 \     BonusModifierAbstract* Factory## FactoryName::createBonus() const    \     {  return new FactoryName();  }   DEFAULT_BONUS_FACTORY_DECLARATION(BonusModifierGoThroughWall);   and the implementation part writen in the cpp.  I want to know if I can have a macro that would build an enum and an array of these new classes with as little copy/paste possible.  In the end I want to have something like  enum BonusType{ Bonus1, Bonus2, ..., Nb_Bonus };  FactoryBonusModifier* factories[Nb_Bonus] =  {     new FactoryBonus1(),     new FactoryBonus2(),     ..., }

I have a file: Base.h  class Base; class DerivedA : public Base; class DerivedB : public Base;  /*etc...*/   and another file: BaseFactory.h  #include "Base.h"  class BaseFactory { public:   BaseFactory(const string &sClassName){msClassName = sClassName;};    Base * Create()   {     if(msClassName == "DerivedA")     {       return new DerivedA();     }     else if(msClassName == "DerivedB")     {       return new DerivedB();     }     else if(/*etc...*/)     {       /*etc...*/     }   }; private:   string msClassName; };  /*etc.*/   Is there a way to somehow convert this string to an actual type (class), so that BaseFactory wouldn't have to know all the possible Derived classes, and have if() for each one of them? Can I produce a class from this string?   I think this can be done in C# through Reflection. Is there something similar in C++?


I use MobaXterm on my windows PC to connect to an Ubuntu 16.04 machine. I worked well until recently I found that SFTP is not working, so my MobaXterm sftp pane is disappear. To make sure that is not MobaXterm issue, I also download FileZilla to test SFTP, not working either. Also, I tried to use VSCode on my windows PC with extension "Remote-SSH" to connect to my Ubuntu machine, but it keeps showing this error:  I am not sure if these connection problems I mentioned above are came from after  I installed zsh on my Ubuntu machine, I installed XRDP but uninstall after.  Any help I would be very appreciate.


I need to write a regular expression that stops at the first " not the last one.  For example if I check for 'list:".*"' and I have a string such as list:"dogs" it will work fine.   But if I have something like list:"dogs" "cats" that regex will catch the whole thing ending at the very last ". But I need to end the first time it sees the closing " after dog. How do I do this?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


If I use  on an equipped creature then sacrifice it while under my control, can I equip the equipment to one of my creatures during the same turn or does the equipment go back to the original owner the moment I sacrifice the creature?

What would happen if I 'd a creature that had been enchanted by a bestow creature and cast a spell to give it protection from the enchantment's color on it to remove the bestowed creature?  For instance:  They have just bestowed a  on a  and passes the turn. I use Portent of Betrayal to take control of the Asphodel Wanderer, attack and in the second main I cast Gods Willing to give the Asphodel Wanderer protection from black. Nighthowler detaches and where does it go, my control, opponents control or graveyard?  As an additional question, in the same vein:  What if I destroyed the creature while it was on my side? So change the gods willing to a hero's downfall in the example.  Relevent (under state-based actions):     704.5n If an Aura is attached to an illegal object or player, or is not attached to an object or player, that Aura is put into its owner's graveyard.


Not same other nulpoint because i am asking to how to draw graph ? I have a temp data type of double but it is not empty.My bluetooth get the temperature data from the devices. I want to real draw graph (x: time, y:temp) I want to draw graph with this code, i cant draw how can i fixed ? I have a lot of Logcat when i draw the graph. I tried at many of times please help me   public class Fragment2 extends Fragment {     // TODO: Rename parameter arguments, choose names that match      private View convertView; GraphView temp_graph;     TextView incomingMessages;     Double messages;     Double [] temp = new Double[1000];     Double [] time = new Double [1000];     Handler mHandler = new Handler();     int i=0;     LineGraphSeries<DataPoint> line_series;       @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {         if(convertView==null){             convertView=inflater.inflate(R.layout.fragment_fragment2, container, false);             incomingMessages= (TextView) convertView.findViewById(R.id.text);             temp_graph =(GraphView) convertView.findViewById(R.id.graph);               LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mReceiver, new IntentFilter("incomingMessage"));             DataPoint [] dataPoints = new DataPoint[time.length];           }    // Inflate the layout for this fragment         return convertView;     }     BroadcastReceiver mReceiver = new BroadcastReceiver() {         @Override         public void onReceive(Context context, Intent intent) {             String text=intent.getStringExtra("theMessage");             incomingMessages.setText(text);             temp[i]=Double.parseDouble(text);             DataPoint [] dataPoints = new DataPoint[1000];               line_series =                     new LineGraphSeries<DataPoint>(dataPoints);             for (int i=0; i<1000; i++){                 dataPoints[i]= new DataPoint(i,temp[i]);             }             temp_graph.addSeries(line_series);              i++;           Log.d("deneme","temp"+temp[1]+"temp2 "+ temp[2]);         }     };      }   This is my logcat errors :  java.lang.NullPointerException: Attempt to invoke interface method 'double com.jjoe64.graphview.series.DataPointInterface.getX()' on a null object reference                       at com.jjoe64.graphview.series.BaseSeries.checkValueOrder(BaseSeries.java:527)                       at com.jjoe64.graphview.series.BaseSeries.<init>(BaseSeries.java:117)                       at com.jjoe64.graphview.series.LineGraphSeries.<init>(LineGraphSeries.java:163)                       at com.example.duygu.mybluetoothdevicelist.Fragment2$1.onReceive(Fragment2.java:73)                       at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:311)                       at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:47)                       at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:120)                       at android.os.Handler.dispatchMessage(Handler.java:102)                       at android.os.Looper.loop(Looper.java:148)                       at android.app.ActivityThread.main(ActivityThread.java:5525)                       at java.lang.reflect.Method.invoke(Native Method)                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


If $p$ & $q$ are the solutions of $$a \cos x + b \sin x = c$$  Then how do I prove that, $$\cos (p + q) = \dfrac{a^2-b^2}{a^2 + b^2} $$  I tried all the adjustments I could think of, like dividing by $ \cos x $ and extracting $a$ and $b$ from the 2 equations. Also tried adding/subtracting and all the basics I know to no avail.  Any help is appreciated, thank you :)

Question: If $\alpha$ and $\beta$ are the solutions of $a\cos \theta + b\sin \theta = c$, then show that: $$\cos (\alpha + \beta) = \frac{a^2 - b^2}{a^2 + b^2}$$  No idea how to even approach the problem. I tried taking two equations, by substituting $\alpha$ and $\beta$ in place of $\theta$ in the equation and manipulating them, but that didn't get me anywhere. Please help!


My requirement is whenever particular My Site is created default folder will appear, I don't want that default folder, so need to create a feature stapling on activated method whenever my site creation "default " folder should be deleted.  Can anyone tell me any sample code for folder deletion using feature stapling

i have used the below scripts to delete the folder in SharePoint 2013   This folder is generated by while creating my site  which always creates the same folder name in the "Documents" Document Library of any site or sub-site. I’d like to simply delete it.  But i have another one requirement once site created default folder is available in the site,after running the script folder deleted. one new user joined later again he created new my site so folder available for him,so i want to delete the folder permanently at one time script running.


In which file would the desktop background be stored, I have checked desktop.ini, but that only shows two dll files in C:/windows/system32/ I'm using windows 10. Any help is appreciated!

There is another question on here that allows users to find the path to their current background image through a cmd command.    In Windows 10 this no longer works. It only returns the first image in the folder, it does not change with the backgrounds as they transition. I need a similar command that returns the path(s) to the current image on the desktop background(s) that actually works in Windows 10 if one exists.


So, I started off with this array:  array = ['A', 'B', 'C', 'D', 'E', 'F']  And I played around for a little while before getting python to print each unique, non-repeating combination, like so:  AB, AC, AD, AE, AF, BC, BD, BE, BF, CD, CE, CF, DE, DF, EF,   But now, I'd like to take all of these into a new array:  array2 = ['AB', 'AC', 'AD'...., 'EF']  And print all 3-element-long combinations, not including rearrangements, that have no repeats.  What I mean by 'no repeats':  AB, CD and EF is a 3-element long combination with no repeats, but AB, BD and EF is a 3-element-long combination with repeats, as 'B' appears in both 'AB' and 'BD'.  What I mean by 'not including rearrangements':  AB, CD, EF would be the same as BA, DC, FE, because all of the 2-letter elements are the same (BA is AB rearranged, DC is CD rearranged, and FE is EF rearranged). So ideally it'd print something like:  AB CD EF, AB CE DF, AB CF DE, AC BD EF, AC BE DF, AC BF DE, AD BC EF, AD BE CF, AD BF CE, AE BC DF, AE BD CF, AE BF CD, AF BC DE, AF BD CE, AF BE CD,   I believe those are all the combinations where no 2-letter element is repeated.  How would I go about printing this? Thanks!

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


Does Windows System Restore bring back uninstalled programs?

My pc has starting acting weird lately. I ran scan using Nod32, malware bytes. It did detect some viruses but my PC's behaviour doesn't change. When I use Adobe reader X it doesn't find the the word given for the search and I accidently Lost my Office 2010.  I am thinking that system restore can solve these issues and reinstall Office 2010. Is it possible?


I wanted to know if there is a distance function $d$ on $\Bbb R$ so that a nonempty subset $U$ of $\Bbb R$ is open with respect to $d$ if and only if its complement $\Bbb R$ \ U is finite ?

Can you help me please with this question? Let $X$ be a non-empty set with the . Is $\left ( X,\tau_{\operatorname{cofinite}} \right ) $ a metrizable space? Thanks a lot!


I'm an Indian citizen and I'm travelling from London to India through a connecting flight in Stockholm, Sweden. Do I need to have a Transit Sweden visa to catch my connecting flight?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


When renting a dedicated server, how can one be certain than he/she is not getting a VPS or some other virtual machine variant instead of a true dedicated hardware box?  Which checks can be run (assuming it is a linux box) to detect such case?

An interesting question.  I have logged into a Linux (most likely SuSE) host.  Is there some way that I can tell programmatically that I am a VM host or not?    Also assume that the vmtools are not installed.


I don't need the user to have ssh access. They should only be able to copy files using scp. Is this possible?

I'm starting a very little hosting company for a few friends and little clients, nothing big.  I want to give my "clients" the right to manage their files on the server. I hate FTP as it is not secure and it's in my opinion obsolete.  So I'd like to allow my users to connect through SFTP but not allow them to connect through SSH. (I know, I know, SFTP is using SSH). But I was just wondering, is it possible?  So I wouldn't have to install a FTP service on the server and everything would be awesome!


How do we compute the following infinite series? $\sum_{k=1}^\infty k(\frac{7}{8})^{k-1}$ It arises as part of a more general problem. What is the expectations of the number of draw srequired from a uniform [0,1] distribution before you get a number that is $\epsilon$ close to 1? Intuitively, it is $1/\epsilon$, but to show this, you would need to calculate the expectation: $E[X] = \sum_X f(X)\cdot X = \sum_{k=1}^\infty k(\frac{7}{8})^{k-1}$

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Can someone please explain what determines whether or not you can have a group homomorphism from one set to another, and then what determines how many you can have?

Is it true that the number of homomorphisms between any two finite cyclic groups of order $m\,\&\,n$ is $\gcd(m,n)$?  I have posted an answer which I believe is true, just wanted to know different approaches to this problem.


I know that you're supposed to wire a resistor with an LED to stop it from being damaged, but I don't know how resistant a resistor to put in. My input voltage will be from a 3.7V Li-Ion battery. The LED says it's 12w, and the LED is red (no info on the led besides that). It has a heatsink. What resistor should I wire up to prevent the LED from being damaged while maximizing it's brightness? If this isn't enough info, let me know what else I need to answer this question. The LED was running fine connected to a 6v (1.5V x 4 aaa batteries) with a resistor in series that was heatshrinked and couldn't be read once I took it off.

I have seen many resistances with difference Wattage i.e 1/4W, 1/2 W, 1 W, 2 W ,3W etc. If I have 3 W Load which is an (large 3W) LED in my case, which Resistance should I use?  Also The LED I am using needs 3.5V DC and 0.8 A current. I have a Battery which outputs 8V. How can I calculate the Value of the resistance which can drop 8V to 6V?


Sliders 2x08 Post Traumatic Slide Syndrome at the end we see 2 Prof. Maximilian Arturo's fighting it out for who was going to slide, When one of them is able to jump leaving the other behind. The one left behind says "Oh My God" in shock implying  that the one who jumped is very likely not in fact their Prof. Maximilian Arturo.   It seems this is never covered again, or I missed it. Who jumped through the portal?

At the end of ‘Post Traumatic Slide Syndrome’, there’s a tussle between the two Professor Arturos – the original one from Earth Prime and the local double. One of them slides and the other doesn’t. However, it’s never made clear which one slid. Which one was it? Was it the original or the local double?


Question: Let X= {S1,S2,S3,S4,S5} and Y = {L1,L2,L3} be the sets of satellites and launching sites respectively. If each site launches at least one satellite, find the number of ways to launch satellites in the space. My solution: L1 have choice of 5 satellites L2 have choice of 4 satellites L3 have choice of 3 satellites Remaining two satellites can choose any station among 3 Hence my answer is 5*4*3*3*3. But the answer is wrong.

How many functions from set $\{1,2,3,\ldots,n\}$ to $\{A,B,C\}$ are surjections? $n \geq 3$  Attempt  I was hoping to count the number of surjections by treating $A,B,C$ like bins, and counting the number of ways to fill them with $1,2,3,\ldots,n$ such that no bins are empty. This is equivalent to putting two "separator" bars in between the $n$ numbers or $n-1 \choose 2$.  However, I think I am missing a step here: prior to putting in the separator bars, I should permutate the $n$ elements. So, multiply by $n!$.  The order of elements in the same bins do not matter. So I should be divided by the number of permutations of the elements in each bins. This is where I am stuck.  Additional Info  I made the question up myself. Feel free to modify the question into a more solvable form if it is too difficult/complicated.


import java.util.Scanner;  public class Main {     public static void main(String[] args)      {         Scanner scan = new Scanner(System.in);         String play = "y";         System.out.print("Enter something: ");         play = scan.next();         System.out.println(play);         if (play == "Y" || play == "y")         {             System.out.println("If test works!!");         }         System.out.println("Did it work???");     } }   I assume this has something to do with when I press enter, it's storing that as well. I tried changing String play to a char, but then I get errors from Scanner saying it can't change a String to a char.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


If $f$ is continuous on $[a,b]$, $f(x)≥0$ on $[a,b]$ and $$\int_{a}^{b} f(x) =0$$   then prove that $f(x)=0$ for all $x \in [a,b]$.  I tried with Riemann's definite integral definition but couldn't proceed

Prove that $\int_a^b f(x)\,dx  \gt 0$ if $f \geq 0$ for all $x \in [a,b]$ and $f$ is continuous at $x_0 \in [a,b]$ and $f(x_0) \gt 0$  EDIT. Please ignore below. It is very confusing actually -.-    Note: After typing this all out, I think I realized that my proof is complete, but I'll just post it to make sure :)  Attempt:   Find a partition $P = \{t_0,\ldots,t_n\}$ of $[a,b]$ s.t. $f(x)\gt f(x_0)/2$ for any $x \in [t_{i-1},t_i]$  Thus, the lower sum, $L(f,P)\geq x_0 (t_{i}-t_{i-1})/2 > 0$  [Basic Idea: since f is continuous at $x_0$, in the worst case scenario (i.e. $f=0$ at all points except in a nbhd of $x_0$) there must be some "bump" at $x_0$, which prevents the integral from actually equaling $0$. If we can find just one lower sum of a partition to be $> 0$, we will be done (I think...)]


Is there any real advantage or bonus granted to your guild if someone claims a resource (farm, mine or lumbermill) or a keep in Cyrodiil?  I looked into the documentation, and on many sites, and didn't find any reference to actual bonuses or status for your guild, apart from seeing the name and location of the owned resource on the guild tab.

Like, does the guild get a collective character buff or ...something? Is it just to look pretty?


The statement of the question is given below:        In order to understand the meaning of tridiagonal, I tried to calculate the $4 \times 4$ matrix of the above description and I get the following matrix:  $$ \begin{vmatrix} 1&1&0&0\\ 1&1&1&0\\ 0&1&1&1\\ 0&0&1&1 \end{vmatrix} $$   Also, I tried to calculate the $3 \times 3$ matrix of the above description and I get the following matrix:  $$ \begin{vmatrix} 1&1&0\\ 1&1&1\\ 0&1&1\\ \end{vmatrix} $$  So I can see why it is called tridiagonal matrix. And I know that the definition of the determinant of a matrix is as follows:            But I still did not know how to prove the question, shall I prove it by induction on $k$? if so, how I can deal with proving the case of $k = n+1$? could anyone help me please?   **My idea:*  I think I can change the given matrix to an upper triangular matrix ? can this work?

Let  $$f_n := \begin{vmatrix} a_1 & b_1 \\ c_1 & a_2 & b_2 \\ & c_2 & \ddots & \ddots \\ & & \ddots & \ddots & b_{n-1} \\ & & & c_{n-1} & a_n \end{vmatrix}$$  Apparently, the determinant of the tridiagional matrix above is given by the recurrence relation   $$f_n = a_n f_{n-1} - c_{n-1} b_{n-1}f_{n-2}$$  with initial values $f_0 = 1$ and $f_{-1} = 0$ (according to Wikipedia). Can anyone please explain to me how they came to this recurrence relation?  I don't really understand how to derive it.


I have been on  for a while.  Questions of the kind of      recommend me some book / library / SDK / tutorial to do bla bla bla   are not allowed there.  Actually I have flagged many question of this kind as "off-topic"!  My question is, on which Stack Exchange site can I post this type of question and hopefully get an answer?

I have a list of requirements for a program, but I don't know what program meets these criteria. That's about general-purpose software, for example, not a programming IDE or statistical workbench, questions about which would certainly go to respective sites.  Is this question appropriate on Stack Overflow? Where should I ask about it? On Super User or elsewhere?


I'm writing up a document with a few minipages that keep getting pushed to the end of the document. My minipage is a 4x4 grid of subfigures with a width of \textwidth and a height of 16cm. I understand that the reason that the minipage is being put at the bottom of my document is because LaTeX considers it "too tall" and puts it at the next available spot (at the end). However, I don't think that the minipage is too large to fit near its location in my document. Is there a work around to keep the minipage close to where it occurs in the text?   The code I used is attached below:   \begin{figure}[t] \begin{minipage}[t][14cm][t]{\textwidth}     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig11.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig12.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig13.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig14.eps}     \end{subfigure}%       \subcaption{Subcaption 1} \par\vspace{0.125in}      \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig21.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig22.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig23.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig24.eps}     \end{subfigure}%       \subcaption{Subcaption 2} \par\vspace{0.125in}     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig31.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig32.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig33.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig34.eps}     \end{subfigure}%       \subcaption{Subcaption 3} \par\vspace{0.125in}     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig41.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig42.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig43.eps}     \end{subfigure}%     \begin{subfigure}[t]{0.25\textwidth}         \includegraphics[height=1.3in]{fig44.eps}     \end{subfigure}%       \subcaption{Subcaption 4} \par\vspace{0.125in} \end{minipage} \vspace{0.125 in} \caption{Caption} \end{figure}

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


As soon as you grind a spice, it gets exposed to air and starts to lose its potency.  I'm trying to figure out how I can grind them and reduce/prevent this from happening. I guess you could put them in an airtight jar, but wouldn't the air in the jar cause oxidation? Would putting the powder in capsules help, like medical tablets? Are there plastic bags or any bags where you can suck the air out? I can't do a fresh one daily, but need potency after time.  What methods are there to preserve powder from getting oxidized? Just to note the spices in question are black pepper, long pepper and dried ginger.  I guess the former two can be finely ground daily however I couldn't additionally dehydrate and grind ginger daily.

Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight.


In some posts in this forum I've read that sign convention in optics is useful for making formula memorizing easier, and that we have to use sign convention again while applying the formulae to neutralize the effect of taking sign convention... I tried to use geometry and saw that indeed without sign convention we get two formulae for lens maker's formula and so on... so in that way sign convention is useful... But i could not derive the formula for linear magnification by geometry - without sign convention the derivation does not match the formula given in the text books (which says m must be negative for convex lens when image is real). Can somebody please explain how to get it, and if not why don't we get it?  The Sign Convention used is:   The direction of the incident ray is positive. Incident ray is always incident from the left side on the refracting surface. Perpendicular distance of an object is positive when measured upwards from principal axis. Distance is always taken FROM the pole of the refracting surface.

I have just started learning optics at school and my teacher derived the lens and mirror formulas. While doing so, she applied the sign convention for $u$, $v$ and $f$ and arrived at the final expression. However, while solving problems using the mirror formula why do we again apply sign convention for the given values of $u$, $v$ or $f$?


Attempting to run the following python code, I'm getting the Indentation error :      from urllib.request import urlopen      def fetch_words():        with urlopen('http://sixty-north.com/c/t/txt') as story:            story_words = []            for line in story:                line_words = line.decode('utf-8').split()                for word in line_words:                story_words.append(word)     return story_words  def print_words(story_words):    for word in story_words:        print(word)  def main():    words = fetch_words()    print_words(words)   if __name__ == '__main__':    main()

When I compile the Python code below, I get      IndentationError: unindent does not match any outer indentation level     import sys  def Factorial(n): # Return factorial     result = 1     for i in range (1,n):         result = result * i     print "factorial is ",result     return result   Why?


I know that a way to do this is by using log to the base 10. Or more specifically;  $$n=\lfloor\log_{10}x\rfloor + 1\tag{1}\label{1}$$  Where "$\lfloor{z}\rfloor$", rounds the value of $z$. This works really well, but when it comes to values like $x=9999$, we get $n=5$ when using the standard Eq. 1. This is because $9999\approx10000$ and $\lfloor\log_{10}{10000}\rfloor+1=5$. So is there an formula which can take in any value of $x$ and give the number of digits?

I read recently that you can find the number of digits in a number through the formula $\lfloor \log_{10} n \rfloor +1$ What's the logic behind this rather what's the proof?


I have this object:    {"wordFormId":"abandon",    "wordFormIdentity":1,    "ascii":97,    "wordId":"abandon",    "primary":true,    "posId":2}   How can I remove the ascii property? I know I could set it to null but I assume it would then still be there. What I would like to do is to completely remove it.

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


This proof has surely been addressed before on here, but I'm writing the proof from scratch, without looking at other variants of it, and hoping that someone could critique it, as I'm still somewhat new to proof-writing and very new to analysis.  All comments on content, style, elegance (especially lack thereof, in my case) and so forth are very much welcome and appreciated.  Theorem. Let $A$ be a nonempty set of real numbers which is bounded below. Let $-A$ be the set of all real numbers $-x$, where $x \in A$. Prove that $\inf A = - \sup \left(-A\right)$.  Proof. Let $A$ be a nonempty subset of $\mathbb{R}$, and $-A$ to consist of the negations, $-x$, of all $x \in A$. The infinium of $A$ has the properties that \begin{align*} \forall x \in A, \inf A \leq x \ \wedge \ \forall y\in A, \left(y \leq x \implies y \leq \inf A \right), \end{align*}  i.e., $\inf$ is both a lower bound of $x$ and the greatest of such lower bounds. Multiplying these expressions through by $-1$, which yields elements in $-A$, gives \begin{align*} \forall -x \in -A, -\inf A \geq -x \ \wedge \ \forall -y \in -A, \left(-y \geq -x \implies -y \geq - \inf A \right), \end{align*} so $-\inf A$ is an upper bound of $x$ and the smallest of such upper bounds, in which case we have $-\inf A = \sup \left(-A\right)$. Multiplying this equation through by $-1$ yields our result, $\inf A = - \sup \left(-A\right)$.     How does this look?

Let $A$ be a nonempty subset of real numbers which is bounded below. Let $-A$ be the set of of all numbers $-x$, where $x$ is in $A$. Prove that $\inf A = -\sup(-A)$   So far this is what I have  Let $\alpha=\inf(A)$, which allows us to say that $\alpha \leq x$ for all $x \in A$. Therefore, we know that $-\alpha \geq -x$ for all $x \in -A$. Therefore we know that $-\alpha$ is an upper bound of $-A$. $\ \ \ \ $  Now let $b$ be the upper bound of $-A$. There exists $b \geq-x \implies-b \leq x$ for all $x \in A$. Hence, \begin{align} -b & \leq \alpha\\ -\alpha & \leq b\\ -\alpha & = - \inf(A) = \sup (-A) \end{align}  By multiplying $-1$ on both sides, we get that $\inf(A) = -\sup (-A)$  Is my proof correct?


Just as the number of votes is displayed next to an answer in the Answers tab (https://site.stackexchange.com/users/userid/?tab=answers), can we also have the number of votes displayed next to a comment in the All Actions → Comments tab (https://site.stackexchange.com/users/userid/?tab=activity&sort=comments)? It will be useful to do self-learning / monitoring of which comments have been useful to the community, since upvote for a comment does not result in a message in the inbox (unlike an answer upvote which results in both a message and a reputation tab highlight).

It would be helpful if we could see the number of upvotes cast for our comments, or other people's comments in response to us directly in the user profile in either the activity tab or the response tab respectively. It should be quite easy to implement (e.g. sharing a single partial view for displaying comments).  It could be useful, since we can evaluate the legitimacy of the comment and address horrible mistakes sooner.


Here is an example:  I would like for the width of the h1 or a surrounding div to "clip" the text so that I can, for example, draw a border around only the text.

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Say n = 100; How do I generate 100 visually distinct colors? Is this mathematically possible?

I wrote the two methods below to automatically select N distinct colors. It works by defining a piecewise linear function on the RGB cube. The benefit of this is you can also get a progressive scale if that's what you want, but when N gets large the colors can start to look similar. I can also imagine evenly subdividing the RGB cube into a lattice and then drawing points. Does anyone know any other methods? I'm ruling out defining a list and then just cycling through it. I should also say I don't generally care if they clash or don't look nice, they just have to be visually distinct.  public static List<Color> pick(int num) {     List<Color> colors = new ArrayList<Color>();     if (num < 2)         return colors;     float dx = 1.0f / (float) (num - 1);     for (int i = 0; i < num; i++) {         colors.add(get(i * dx));     }     return colors; }  public static Color get(float x) {     float r = 0.0f;     float g = 0.0f;     float b = 1.0f;     if (x >= 0.0f && x < 0.2f) {         x = x / 0.2f;         r = 0.0f;         g = x;         b = 1.0f;     } else if (x >= 0.2f && x < 0.4f) {         x = (x - 0.2f) / 0.2f;         r = 0.0f;         g = 1.0f;         b = 1.0f - x;     } else if (x >= 0.4f && x < 0.6f) {         x = (x - 0.4f) / 0.2f;         r = x;         g = 1.0f;         b = 0.0f;     } else if (x >= 0.6f && x < 0.8f) {         x = (x - 0.6f) / 0.2f;         r = 1.0f;         g = 1.0f - x;         b = 0.0f;     } else if (x >= 0.8f && x <= 1.0f) {         x = (x - 0.8f) / 0.2f;         r = 1.0f;         g = 0.0f;         b = x;     }     return new Color(r, g, b); }


Every now and then I get an info tag stuck on my screen on top of all my applications. The only thing I know that will remove it is restarting my computer. Is there an easier way to refresh OSX that would get rid it?    I'm running the latest OSX Mavericks. I tried creating a new desktop deleting the main desktop. The problem persists unto the new desktop.  The tag does go away temporarily when I slide over to the dashboard and when I show the desktop but comes right back when I return to my applications.

There is a yellow tooltip stuck and it floats above all other windows. I do not know from what program it came.  How can I get rid of it without restarting my computer?  EDIT:


I have a class, with a public short status, and this line in a test:  assertThat(order.status, is(0));   But it gives me the following error:  java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V      at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)     at org.junit.Assert.assertThat(Assert.java:956)     at org.junit.Assert.assertThat(Assert.java:923)     at com.example.OrderTest.testStuff(OrderTest.java:101)     ...   However, if I do the following, which is uglier, the error goes away:  assertThat(order.status, is((short) 0));   What's up with that? 😕

I can create a literal long by appending an L to the value; why can't I create a literal short or byte in some similar way? Why do I need to use an int literal with a cast?  And if the answer is "Because there was no short literal in C", then why are there no short literals in C?  This doesn't actually affect my life in any meaningful way; it's easy enough to write (short) 0 instead of 0S or something. But the inconsistency makes me curious; it's one of those things that bother you when you're up late at night. Someone at some point made a design decision to make it possible to enter literals for some of the primitive types, but not for all of them. Why?


I am new to blender and have been following Blender Guru's donut tutorial. When I go in sculpting mode for the icing I always end up getting getting holes for the icing. But When I select the donut I have no problems. I have applied the solidify modifier and the subdivision. I have played with the settings. Nothing is working. The donut looks fine when I am on layout and edit mode. I can sculpt but on it but the wholes wont go away.

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


When I work on a paper I end up with folders paperXYZ, paperXYZ_R1, paperXYZ_R2, etc. Same thing happens with my code, project material, etc. This creates clattering and confusion. In addition, I need to backup things very often, to make sure nothing gets lost. Finally, once a paper / project is done, I need to archive it somewhere with easy access and searchable.  For a long time I was using the old fashion copy and rename the folder and every week backup everything to an external hard drive. Then, I moved to keeping everything on Dropbox, this lived shortly because I ran out of space. Now, I am slowly migrating my code to git repositories (bitbucket.org) and I still copy and rename the folders for my papers.  My questions are:   How do you keep the versions of your work, mainly concerning publications? But also other projects and code. Where do you backup your final versions (the editable material, not the final pdf)?   Points like easiness of use, safety of material, easiness to search, etc. are welcome.  I know this is a subjective question (i.e. I know I'm pushing my luck), but I would like to see what people actually use and maybe get some ideas on what is considered best practice.

Archiving of papers and projects is very important for most of the people, and everyone has a method of it.   I, personally, try to have different folders for different papers. In the folder of each paper, in addition to my manuscript, I keep my simulation files, experimental data, program codes, etc, in different subfolders. Also, I try to keep track of my revisions on the paper, reviewer comments, my response to reviewers in different subfolders. My method has the advantage of all the related material for a paper are together, and I can quickly track the whole process from initial submission to the final proofreading. However, this usually leads to duplicated files.   I work with both my office desktop and my personal Laptop. I transfer my files between these systems by a flash memory. I agree maybe cloud technology is a better choice in this age, but I postponed it because of my poor internet connection at home.  I am curious to know how others approach to archive their works. I also hope to find some methods more efficient than mine, or get some tips to improve my method.  Edit at 2 Apr 13: Thanks to these great answers, it is almost a month that I use Git for my version control. Also, I manage my repositories in the , which gives me unlimited storage for unlimited number of projects.


I have just moved phones to an HTC one X from a Desire 510. Pokémon GO works fine on it but it has given me a new level 1 account. How can I get back into my old one? When I sign in with google, it just goes straight in without asking me which account I want to use.

I was having trouble playing the game on my android so I downloaded it to my wife's phone (Galaxy S6). I read some posts on how to get it running on my android and it worked but, my level 7 account is on my wife's phone.  How do I get it back to my android? When I sign out and back in it doesn't ask for any sign in info. I've tried deleting the app's data and even uninstalling and re-installing, but it still doesn't ask for sign-in info.


When I run free -h, I get:               total       used       free     shared    buffers     cached Mem:          251G       208G        43G       179G       144M       190G -/+ buffers/cache:        17G       233G Swap:         5.6G       5.6G       1.1M   How can shared memory(179G) + cached memory(190G) exceed total memory (251G) ? Can memory be count as both of cached memory and shared memory?

I use free to get the amount of free space on some of my servers. Its output is something like:  $ free -m              total       used       free     shared    buffers     cached Mem:           374        366          8          0         58         98 -/+ buffers/cache:        209        165 Swap:         1906        120       1785   How much free space do I really have?


Wondering in Python 2.7, if I need to use the same regular expression multiple times, to match different content, compile first is always better performance? Thanks.  I show what I mean by below examples,  import re  content = '{(1) hello (1)}' reg = '{\(1\)(.*?)\(1\)}' results = re.findall(reg, content)  print results[0]  prog = re.compile(reg) results = prog.findall(content)  print results[0]   regards, Lin

Is there any benefit in using compile for regular expressions in Python?  h = re.compile('hello') h.match('hello world')   vs  re.match('hello', 'hello world')


I was reading  on Category Theory and it said (paraphrased to add context):     Exercise 4: Explain why in Set (the Category of Sets), the product of an empty set of sets is a one-element set.   which I think is incorrect. The product of two empty sets (or any number) is empty because we are considering:  $$ \emptyset \times \emptyset = \{ (a,b) : a \in \emptyset, b \in \emptyset \} = \emptyset$$  where $a \in \emptyset , b \in \emptyset$ are false, so the above is the $\emptyset$ which is NOT a one element set (its a zero element set).   This should be trivial so I am assuming I am somewhere mis reading the natural language of the exercise. Someone help me catch where is it? i.e whats being asked and what the answer is?

I was reading  on Category Theory and it said (paraphrased to add context):     Exercise 4: Explain why in $\textbf{Set}$ (the Category of Sets), the product of an empty set of sets is a one-element set.   which I think is incorrect. The product of two empty sets (or any number) is empty because we are considering:  $$ \emptyset \times \emptyset = \{ (a,b) : a \in \emptyset, b \in \emptyset \} = \emptyset$$  where $a \in \emptyset , b \in \emptyset$ are false, so the above is the $\emptyset$ which is NOT a one element set (its a zero element set).   This should be trivial so I am assuming I am somewhere mis reading the natural language of the exercise. Someone help me catch where is it and what the answer should be? i.e. whats being asked and the answer?


I remembered reading a novel that has the following plot points:   The protagonist is a human male coming from a planet that provides mercenary services he is the sole survivor of the planet the rest of the planet died because of radiation poisoning from imported grain(?) sent by some evil faction(?) because the mercenaries are detrimental to their plan he was 'abducted' by a group of people known as the overseers(?) his bone -- damaged by radiation -- is replaced with an unbreakable stuff he has a companion, a female from another galaxy, whose appearance is not humanoid but more like a bat(?) he can 'talk' with her through telepathy   Plot points I'm not really sure about, I've marked with a (?).  I think I read the novel (borrowed from a long-defunct library) sometime in the late '80s or early '90s.  If anyone can give any hints/clues as to what that novel was, I'd be very grateful...

I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders.


I recently bought Pinter's A book of Abstract Algebra and I came to Examples (Chapter 2). Now, I do not understand why are "Checks" in (iii), (iv) needed because we deductively concluded that neutral element $e$ must be $- 1$ and simillary we showed that each inverse $x'$ of $x$ is $x'= - x - 2$ (of course, we concluded all this after assuming that symbol $+$ means regular adittion with all its properties). Therefore, Checks are just surplus because we’ve already set up to get what we’re “checking” now. (Probably I am just wrong so please correct me.) Here is the 1st example in part B:

I have this problem from the book Real Analysis of Miklos Laczkovich ():     Let $\oplus : \mathbb R \times \mathbb R\to \mathbb R $, where $(a,b) \mapsto a + b +1$. Then,  $(\mathbb R, \oplus)$ is a group. Define a multiplication with which we get a field.   But in the exercise there are no hints. Could anyone help me?


I remember there was a word which describes a word which isn't normally used in an everyday conversation. Ironically, that word isn't normally used in an everyday conversation.  It's an adjective. In a sentence:     That word is ??????, you don't see it often.   I can distinctly remember that it is used to specifically describe words (and not general events, knowledge etc). A word which is rare/exquisite and isn't seen very often.  What is a word that describes that? I remember it was quite the highbrow word.

I seem to recall from my youth, when my vocabulary was many times what it is today, learning a word (started with an 'a' I think) whose meaning was "an old, unused, or archaic word" or something roughly to that effect.  I believe it was an adjective though it might have been a noun. This would be quite fun as an  term.  Does anyone recall such a word, or am I deceiving myself?


Could you recommend some references on orbifold CFT?   I have found this paper "The conformal field theory of orbifolds"(1987)() is very useful for me, so I want to know more about early works or reviews related to those topics.

I have a background in QFT, GR and differential geometry at the level of a master student in theoretical physics. I would like to touch the area of CFT. I know the textbook of Philippe Di Francesco. It may be too big for the beginner like me. Are there some good introductory lectures or textbooks adapted to the needs of beginners?


I can't seem to find any method to fill this one model. Does anyone know?

I would like to smooth out this pipe. I know that I should have made it out of a curve. Is there any way to smooth the pipe?


Two cars of mass $m_{1}$ and $m_{2}$  collide with each other in a completely inelastic collision. So after the collision they continue to go in same velocity. Now suppose I am in one car. So I will consider myself stationary, so my velocity will be $0$. And the other car's velocity relative to me will be $v$.   Now after the collision, I will still consider myself stationary and so my velocity will still be $0$ and the other car's velocity relative to me also will be $0$.   So the total initial momentum $p_{i}$ will be:  $m_{2}v$  And the final total momentum $p_{f}$ will be $0$   So clearly momentum isn't conserved. Clearly I am wrong. Why isn't momentum conserved from my reference frame?

[This question is inspired by an astute observation from a student of mine.]  When we discuss conservation of momentum, students often ask, "When is momentum conserved?" And the lazy, mechanical response is often, "Momentum is always conserved."  A thoughtful student might then reply, "But what about falling objects? If I drop my pen, it accelerates towards the ground and gains momentum. Clearly, momentum is not always conserved."   This is a fair criticism. But one with an easy answer: "You aren't taking into account the momentum of the earth," we say, "As the earth pulls down on the pen, the pen (by Newton's Third Law) pulls up on the earth, accelerating it. Therefore, the downward momentum of the pen is cancelled out by the upward momentum of the earth.  "The more correct statement," we conclude, "is that momentum is always conserved in a closed system - namely, in a system containing all of the equal-and-opposite force pairs. None of the forces are allowed to cross the boundary of the system (like the weight of the pen does when you watch it fall without considering the earth)."  "Alright," the student concedes, "I'll buy that. But even when we neglect gravity, why doesn't momentum always appear to be conserved?"  "How do you mean?"  "I mean this: imagine floating in empty space - just you and a baseball. You look around and notice that you have zero momentum. And why shouldn't you? After all, you are in your own center of mass reference frame (where momentum is always zero).  "But then you throw the baseball," the student continues, "and it begins to move away from you with some momentum. However, from your point of view, you still are not moving. The system of you and the baseball is closed (there are no external forces), so momentum should be conserved. Yet before you threw the ball, momentum was zero, and afterwards, it is non-zero.  "What happened? Why was the momentum of this closed system not conserved?"


Let $G$ be a finite group whose cardinality is not divisible by $3$. How can one  show that for every $g$ belonging to $G$ there exists an $h \in G$ such that $g=h^3$?

Let G be a finite group whose order is not divisible by $3$. Show that for every $g\in G$ there exists an $h\in G$ such that $g = h^3$.


I'm learning how to use linux on immersive labs and I've never coded before. Could someone please help me with this question I've been stuck on for a while now. It's related to file permissions in Linux - specifically symbolic linked files. Also, whats the best way to understand, get used to and learn how to navigate linux. Thanks, M.

So let's say I have a symbolic link of a file in my home directory to another file on a different partition. How would I find the target location of the linked file? By this, I mean, let's say I have file2 in /home/user/; but it's a symbolic link to another file1. How would I find file1 without manually having to go through each partition/directory to find the file?


What is the best and simplest way to add footnotes in tables. I used \parnote but it did not give exactly what I am looking for. That is because I have three notes; two of them are same and should have same number and the third one is different.  \begin{tabular}{lll} \hline A \parnote{aaa}     & 10 & 10  \\ B \parnote{aaa}     &   5 & 5  \\ C \parnote{bbb}     &   4 & 4  \\ \hline \end{tabular} \parnotes

I would like to have footnotes in tables, but the \footnote command does not work inside a table environment.  Googling one finds that this is , at least in the UK.  That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.  I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.  Therefore I'd like to ask two questions:   What are the arguments against footnotes in tables? If one really must go against the advice in 1., which method (whether considered in the  or not) would you recommend?   Thanks in advance.  Added  In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears.  I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc...


When I enter this command in a terminal window, it works as expected:  ifuse "/home/sadi/mnt"   But it is ineffective when used in a bash script run via a .desktop file.  What can I do to use it like that?  This command (supposed to mount a connected device in the specified folder) is preceded by mkdir -p "/home/sadi/mnt", and followed by nautilus --no-desktop --new-window "/home/sadi/mnt" both of which work perfectly both in terminal and in bash script.  type ifuse output = /home/sadi/usr/bin/ifuse and I have this in my .bashrc: export PATH="${HOME}/usr/bin:${PATH}"

According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path


Problem definition is quite simple: I need to achieve point-in-polygon detection for:   billions of lat/lon points over thousands of polygons   I need to be able, for every point, to determine if it is in one or several of the polygons available (in the thousands). Currently we are using PostGIS with ST_Contains but the whole things needs 3 good entire days (roughly 80 hours) to compute from start to finish.  Is there any solution (free or not) that would offer significant speed improvement for this workload over PostGIS? It can be anything from an analytical database (Exasol is one example that comes to mind, however although hugely faster than Postgres as a database, I'm not sure if it's any faster for geographical computations) to a dedicated C/C++/Rust piece of code.

I am new to PostGIS and I have a problem in query performance.  This my query:  SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp   FROM table1  WHERE ST_Intersects ( ST_GeomFromText('a multiypolygon geom goes here',4326),position)  ORDER BY userid, timestamp desc   and the problem is my multipolygon include VERY large polygons (600 pages long in word doc!) and it took more than 2 hours to execute!  Is there a way to optimize my query or use another way?


I want to show that if $(V,\|\cdot \|)$ is a finite dimensional space, then all norms are equivalent. I have shown that if $\dim V=m$ all norms $$\|x\|_p=\sqrt[p]{x_1^p+...+x_m^p}$$  are equivalent, but how to show that for an unspecified norm $\mathcal N$ on $V$, there is a $p$ and two constante $A,B>0$ such that $$A\|x\|_p\leq \mathcal N(x)\leq B\|x\|_p$$ for all $x\in V$ ?

This question is from a set of optional, much harder problems from my first year analysis course, but the subject material is norms on $\mathbb R^K$.  (c) Show that there exists a constant $C > 0$ such that for all $\mathbf x ∈ \mathbb R^k$, $||\mathbf x||\le C||\mathbf x||_\infty$  Hint: Use the standard unit vectors to write $\mathbf x = x_1\mathbf e_1 +. . .+x_n \mathbf e_n$, and use the triangle inequality.  (d) Show that there also exists a constant $c > 0$ such that for all $x ∈ \mathbb R^k$, $||\mathbf x||_\infty \le c||\mathbf x||$  Hint: If it isn’t true, then you can find a sequence $⟨\mathbf x_n⟩$ such that $||\mathbf x_n||$ is bounded but $c_n := ||x_n||_∞ → ∞$. (Why?) Think about the sequence $⟨\mathbf x_n/c_n⟩$. The Bolzano-Weierstrass theorem may be of assistance.  Note that the unspecified norm represents any norm for $\mathbb R^k$. I've done part c), but am stuck on part d). I've had a look for proofs on other questions on MSE, but none of them seem relevant to the hint given, and frequently the terminology is too advanced for me.  I tried considering the case if it isn't true, as suggested, but I can't see how to bound any sequence using that. Any help would be much appreciated.


I'm trying to figure out, how to recreate the effect used in shapes 2 & 4. 1 and 3 seems to be simple halftones. 1 & 3 though are made with the perfect dots (not like a usual halftone) while they still reflect highlights and shades of the source image.   I have tried to use Bitmap > Diffusion Dither and then bring the result to Illustrator, trace it and use Convert to shape > Ellipse and it somehow works, but does not produce so neat result as this on the original artwork.   How can I do it cleaner?

I'm attempting to create a random spread of dots to create a gradient look. I'm getting really close to the effect I want by blending two scatter brushes. The issue I'm having is that the blended brushes creates unwanted lines, and the dots run into each other. I keep adjusting the settings with no luck.  Here's the effect I'm wanting to achieved.    Smooth transition  On Circular path Dots don't converge Scattered at random-ish     Here's how close I'm able to get:   Blended scatters create unwanted lines Dots converge Spacing isn't gradual from edge to center


I have this html form which is a date input type  <form method="POST" action="FillTanks" onsubmit="return(showAlert());">

                                                                                <input style="color: gray;" type="date" id="datedd" class="form-control">

                                                                     <button type="submit" id="btn-fill" class="btn btn-blue btn-lg">Fill</button>

             </form>   And this is my servlet  public class FillTanks extends HttpServlet {  @Override protected void doPost(HttpServletRequest request, HttpServletResponse response)         throws ServletException, IOException {     String fuelType = request.getParameter("fueltype");     String liters = request.getParameter("liters");     String date = request.getParameter("datedd");      try {         Class.forName("com.mysql.jdbc.Driver");         Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Vehicle", "root", "");         PreparedStatement ps = con.prepareStatement("INSERT INTO fuel(fueltype,liters,date) VALUES(?,?,?)");          Date date2 = new SimpleDateFormat("MM/dd/yyyy").parse(date);          ps.setString(1, fuelType);         ps.setString(2, liters);         ps.setDate(3, (java.sql.Date) date2);          int i = ps.executeUpdate();          if (i > 0) {             System.out.println("Success");         } else {             System.out.println("not success");         }      } catch (ClassNotFoundException ex) {         Logger.getLogger(FillTanks.class.getName()).log(Level.SEVERE, null, ex);     } catch (SQLException ex) {         Logger.getLogger(FillTanks.class.getName()).log(Level.SEVERE, null, ex);     } catch (ParseException ex) {         Logger.getLogger(FillTanks.class.getName()).log(Level.SEVERE, null, ex);     } }   But everytime I execute the project, it gives me this error.  > Warning:   StandardWrapperValve[FillTanks]: Servlet.service() for servlet FillTanks threw exception java.lang.NullPointerException     at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)     at java.text.DateFormat.parse(DateFormat.java:364)     at FillTanks.doPost(FillTanks.java:37)   I have used date datatype when creating the database table related to this servlet.  Can anyone please help me what is wrong with my implementations?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Constraints:  Assume -90 < latitude <= 90 and -180 < longitude <= 180.  A bounding box has the form [minLon, minLat, maxLon, maxLat].    Concerns:   A solution should be clever to realize that 2 boxes on either side of a boundary should be merged over that boundary.   Ex: Box_A has left/right longitude bounds of (177, 179), and box_B has (-179, -177). The result should compute (177, -177) and NOT (-177, 177).... may have confused this here, but look at the pictures below to see what I am getting at.  If 2 boxes are disjoint, (in my head) there are 4 possible union boxes:   Box A is merged with box B on either the left, right, top, or bottom of box A.  More than 2 boxes could really slow down a naive approach.     Question:  Is there a python library that will facilitate solving the following problem:  Given a set of bounding boxes {B}, compute a minimum bounding box C such that for all b in {B}, b is contained in C    , and if not, is there at least a library that can compute this result given lat/lon pairs manually extracted from corner points of these boxes?    Clarity:  I am not concerned about what metrics are used to solve the "minimum" box, whether it be area, boundary differences, etc. As long as it is a reasonable and efficient solution.    Visual:  Input:    Output (red is good, black and purple are bad):    EDIT: I just realized the purple box does not actually make sense here on the flat map (read Logan's comment below). I'm going to leave it for now since the principle still applies to the black box at least.

I am writing an application to performance test all kinds of map services, primarily AGS 9.x, AGS 10, and WMS 1.x.  Part of the application involves generating random bounding boxes for individual requests, within the service's full extent. This part is working fine for geographic and projected coordinate systems when the service's full extent is known (e.g. through an AGS service's fullExtent property).  My problem is with WMS: each layer in a GetCapabilities response can define its bounding area in >= 1 CRSs. Some parts of the application need to know if a service's CRS is geographic or projected, so in order to remove ambiguity in WMS I am always using the layer's LatLonBoundingBox which is always defined and in EPSG:4326. I then have to calculate a full service bounding box based on all layers that go into an individual request (which are randomised). This is where it gets tricky.  I am getting lost because for each lat / lon bounding box the LLx (lower left longitude) could be a larger or smaller number than the URx (upper right longitude), depending on which meridians it spans. Every time I start drawing square or circular diagrams I think I have an approach figured out, and then find a case that ruins it and my brain turns to mush.  I am going to keep thrashing at it until it works, and if I get a solution post it here, but I'm sure there has to be an accepted and fully tested approach which would make my life easier. I just can't find it right now.


Is this acceptably punctuated? En dashes used between the numbers, and hyphens in the compound modifiers. I believe the two examples below are clear and concise. Do you agree with the punctuation (i.e., en dash and hyphens) in each exemplar?  a $3–$5-million-a-year business  a $50,000–$60,000-per-year increase in funding

Without recasting and in lieu of unsightly suspensive hyphenation, could these work? The en dash (which means "to") is used between the figures, and the hyphens are used in the compound modifier. To me, the examples below are concise and clear.  Do you agree that the examples below are 100% punctuated correctly--yes or no?  45–50-year-old men  10–20-mile radius  $45–$55-million-per-year industry  $100,000–$150,000-a-year savings  10–15-degree temperature difference  $2–$5-per-day service fees  45–75-cent-a-week raises  55–65-mph speed zone  15–20-ounce steaks  20%–40%-a-year tax increases


I upgraded my version of blender to 2.76, and to my horror, quickly discovered it replaces spaces in the file names with underscores. Is there a way I can turn this off?  Even a script would do!

I'm referring to this "feature"   It was not happening before, but it is now, and it is messing up the structure of some folders I previously created. Is there a way to disable it?


TLDR: Basically RubyMine does not recognize any user created environment variable when launched from a desktop entry, but when launched from console (using $ mine) it can recognize all the environment variables. What could be wrong?    I am using Google Cloud Vision API and I've already set GOOGLE_APPLICATION_CREDENTIALS environment variable to my service account private key file path.  When I launch RubyMine from a desktop entry and run the code below.  require 'google/cloud/vision'  image_annotator = Google::Cloud::Vision::ImageAnnotator.new response = image_annotator.text_detection(     image: "path_to_image_file",     max_results: 1 )   It throws a Runtime Error:  Traceback (most recent call last):         7: from /home/burak/RubymineProjects/covid19/main.rb:17:in `<main>'         6: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision.rb:169:in `new'         5: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1.rb:166:in `new'         4: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1.rb:166:in `new'         3: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/google-cloud-vision-0.38.0/lib/google/cloud/vision/v1/image_annotator_client.rb:122:in `initialize'         2: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/credentials.rb:329:in `default'         1: from /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/credentials.rb:361:in `from_application_default'     /home/burak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/googleauth-0.12.0/lib/googleauth/application_default.rb:76:in `get_application_default': Could not load the default credentials. Browse to (RuntimeError)     https://developers.google.com/accounts/docs/application-default-credentials     for more information   But when I run the code from within IRB or when I launch RubyMine from console and run the same code, it runs successfully.

What are correct places for:   Global environment variables meant to affect all users? User-specific environment variables?


Is there a book or instruction manual for ubuntu 16.04.2, other than the ubuntu desktop guide, that has all the commands for the terminal with definitions and uses for each one clearly defined?

Frequently, there are some things we need to do, tweak system settings, execute some processes, however even on Ubuntu, sometimes there isn't a GUI to perform such tasks, which is why we come to places like Ubuntu forum, askubuntu or even search on Google.  Then someone provides us a terminal command that allows us to do whatever we need at that moment to solve a certain problem. So I see that learning the language behind Linux can be extremely useful. But all I've been doing so far is to execute the commands, sometimes I don't even understand what I'm doing while executing them, I am just following instructions from someone else.  I would like to understand more about Linux in general and Ubuntu in particular, I don't want to master Linux or run everything on terminal, I like Ubuntu just fine for modern PC's, user-centric and graphical, but I just would like to know the basics and at least to be able to understand what a certain command is going to do on the system.  What is the best way to do this?


I want to show a fields content in views not for guests, but only for logged in users. (Drupal 8.30)

How can I hide a field for the anonymous user in a view?  Logged in users should still be able to see the field.  (Drupal 8.3.0)


I used to be an extremely motivated and a goal-oriented person. But it's been three years that I go through long periods of unproductively, usually followed by a short period of productivity. It's my last year in the PhD program. I taught a class last quarter and worked almost everyday for hours. I overdid it. Now, I don't feel motivated at all. I have to write my dissertation. I promised my advisor to submit the first chapter at the end of this month but I haven't started writing yet (I have done the research). Do others experience this? What strategies do you use to stay focused? I already took a long break (20 days), and have traveled to my home country thinking it would motivate me to work. The good news is I don't feel super anxious anymore but I am very worried since I haven't been able to focus. There are no distractions here and that's why I moved back. Any advice?   Thanks!

Background - I am doing my PhD in atmospheric physics/photobiology.  Here is a scenario:   The experiments are complete - the results are far better than expected  Successfully got the computer program to work properly and have developed another Papers are published Much of the thesis is drafted   The light at the end of the tunnel is most definitely no longer an oncoming train.  But, at this stage, you just don't feel like working on the thesis, you do other things like cleaning, reading, watching movies - procrastination gets worse, and worse despite the submission deadline coming closer.     The procrastination resulting in more apathy towards the project, despite being fully aware of how much work has been put into the project, how much has been achieved and how little, comparatively, needs to be done.  What strategies are there to overcome this academic-apathy, particularly in this late stage of the thesis?


The famous artist will have been painting the mural for over six months by the time it is finished   Is it correct to convert the above sentence to "passive" form as follows?     The mural will have been being painted by the famous artist for over six months by the time it is finished.   P.S. I've been learning about converting sentences to passive and came accross the sentence that I mentioned.

Yesterday I read Modern English:A Practical Reference Guide written by Marcella Frank, and she gives a paradigm about tenses on page 50. The page shows tenses in active voice and passive voice; she said these four tenses are exceedingly rare:   shall/will be being offered has/have been being offered had been being offered shall/will have been being offered   Why are these tense so rare? Are they normally replaced by other tenses?


Let $M$ be a metric space, $x_n\in M$ a sequence which converges to $x\in M$  Prove: $F=\{x_n\}\cup \{x\}$ is a closed set  So we have $x_n\to x$ such that $x_n\in F$ and $x\in F$ and we know that a set is closed if it contains all of its accumulation points, so $F$ is closed  Or must I look at $F^c$ and prove that it is open?

Let $(X, d)$ be a metric space, and $(x_n)_{n \in \mathbb{N}}$ a sequence in $X$, with $x_n \rightarrow x$ w.r.t. $d$ for some $x \in X$. Show that the set $\{x_n : n \in \mathbb{N}\}\cup\{x\}$ is closed in $(X, d)$.   I figured I should use $\overline{F} = F \cup F'$ to show the above set is closed. Let $(x_n)_{n \in \mathbb{N}} = F$. Then, all elements of the sequence are in  $F$, which is equal to $\{x_n : n \in \mathbb{N}\}$. Clearly, the sequence (or $F$) has only one accumulation point, $x$. So, $F' = \{x\}$. This shows $\{x_n : n \in \mathbb{N}\}\cup\{x\} = \overline{F}$, and thus is closed.  Is this sufficient in proving the problem? Or would I have to show that $x$ is the only accumulation point as well (figured I don't have to because we know limits are unique)? Any advice would be very helpful. Thank you.


I am Filipino national. I would like to know if I need transit visa in Istanbul. I am traveling to Brazil from Kuwait to Istanbul via AtlasJet, then to São Paulo via Swiss Air or Iberia Airlines.  Do I need to have a transit visa for Turkey if I will collect my luggage in Istanbul from AtlasJet and check my luggage again to Swiss Air for my Istanbul to São Paulo flight?

I have an Indian passport and am planning to visit Germany with a valid visa. To book a flight for Germany (Mumbai – Dusseldorf), I came across some connected flights that stop at Istanbul.  Do I need to have visa for Turkey?  This is the first time I am travelling outside my country, and any information on this will be helpful.


Find a continuous function over reals that takes on every value exactly three times.   I was thinking such a function would have to have two critical points and must go from increasing to decreasing or decreasing to increasing. Something like $x^3$, but still there are some points there that aren't counted three times. How would I go about constructing such a function?

Does there exist a function $f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ three times? If not, how could I prove that such a function does not exist?


In a sign up / login  form , we validate user input like username and email  and make sure that it does not contain any special character . my question is about the Password input field . Is it possible to inject sql query using password input field? because we allow user to add special characters to it.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I would like to know a mathematical proof of the following expression:  $${\sum\limits_{r=0}^n {n\choose{r}} {=} {2^n}}$$  Thank you!

I'm well aware of the combinatorial variant of the proof, i.e. noting that each formula is a different representation for the number of subsets of a set of $n$ elements. I'm curious if there's a series of algebraic manipulations that can lead from $\sum\limits_{i=0}^n \binom{n}{i}$ to $2^n$.


Good day,  For my website, I have noticed that my div frame was not ideally centered on the screen - something that I haven't realised so far on my smartphone.   I was considering to customise the margin value in my css style file - but maybe that will not be ideal as I don't know the screen width of my users.  Do you have suggestions to have my frame better centered horizontally, as shown on the below picture?  Thanks a lot for your help.

           Les dates-cl&eacute;
Wedding Events

Party

                                          Samedi                     18.07.2020

                                          15:00                     01:00

Le lieu de r&eacute;ception sera r&eacute;v&eacute;l&eacute; d'ici au 15.03.2020.
En attendant, vous pouvez deviner o&ugrave; ce dernier aura lieu en participant au concours

Dress code : glamour chic

   CSS Code :  #fh5co-counter .event-wrap h3, #fh5co-event .event-wrap h3 { font-size: 20px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.5); display: block; padding-bottom: 20px; text-transform: uppercase; letter-spacing: 2px; }  h1, h2, h3, h4, h5, h6, figure { font-family: "Work Sans", Arial, sans-serif; font-weight: 400; margin: 0 0 20px 0; }

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


>3TB HDD with SATA and/or USB3.0  HDDs are so cheap these days. You can get 4-6TB drives from Western Digital and Seagate for under $150. Affordable and high-volume. Sounds appealing. You could set up a  quite affordably, but that's not going to be very portable.  This is my go-to storage solution. They come with a limited 1 year hardware replacement warranty. But you have to foot the bill for data recovery, which isn't guaranteed to work. They're frequently problematic and unreliable. They typically fail completely within a few years. This seems to be intentional - i.e. designed to fail.     They used to be much more reliable ten years ago, but then again they were only about 256-500GB back then. Back then, they used to be regular, internal-style SATA HDDs with a Mini-USB adapter on a separate PCB, all bundled into a fancy enclosure. This made them very easy to troubleshoot, and you could get a generic adapter online for about $10. Now they're all on a single board with a proprietary adapter, and if you manage to separate them, surprise; the whole drive is encrypted at that level now anyway, because that's totally necessary for the average consumer.       2.5" Solid State Drives  Prices for these are all over the place, but they're not cheap. @ ~6Gb/s: 4TB Samsung for ~$1,000. 2 TB Crucial for ~$500. 1TB WD Blue, SanDisk, Samsung Portable for ~$300. They're quick, they live a long time, I don't know the warranties because they're kind of expensive, so I don't buy a lot of them. But they're pretty great.       >100GB SD & Micro-SD Cards  I like SanDisk Ultra, Extreme, and Extreme Pro; 128-256GB Micro SD cards with the regular SD adapter that most modern Digital SLR and Mirrorless cameras use. You can usually get them for under $200   They're fast, reliable, have no moving parts, come with a 10 year warranty, and you can probably count on them lasting significantly longer than your lifetime if you look after them and store them well. Personally, I love Pelican cases for hardware storage and transport. And I like their CF & SD card storage cases. Other brands with similar products include Neewer, Honsky, Kupton, etc. Check Amazon.  If it were more cost effective, I would just use these. All day, every day. One card per project. Labels. Colour coded. Pelican cases. Wall safe. Problem solved. But it quickly adds up. So I use these for their speed, transfer images, and re-use them over and over again.        Cloud Storage  Storage solutions by Google, Dropbox, Adobe, and probably a hundred others; are super convenient and super reliable. They seem inexpensive, but it adds up eventually, and that cost is recurring. And I don't know what happens to your data when you can't afford to keep making those payments. Sounds dicey.          The Question  So, what's a reliable, cost-effective solution to the modern photographers data storage problem?

I'm dating a professional photographer that has been accumulating digital images at an alarming rate (thousands of high-res images per month).  Does anyone have any recommendations of external and/or remote storage solutions to effectively work with such large volumes of data?  Managing burned DVDs seems a little scary.


Is there an object or a namespace or technique using Apex to check if the User doing the changes (create, edit, etc) is a System Admin (logged in as different User)?

Is there any way to detected the user who is "Logged in as user" using Apex.  I want to be able to detected Mike Gill is Logging in as Asha Gill via Apex.


I'm no math graduate, so be patient.  For two dice it is easy, because of the small number of possibilities, and it’s still easy for three, but how can I work out the case for ten (with some formula)?  How to calculate probability that:     a) Rolling three dice, the sum of them is greater than $8$.      b) The same, but with more dice, let's say $10$, where the sum has to be greater than $27$.   Can you explain it and can you also send some useful resources?

Probability that $X \ge Y$ given N rolls on a $d20$  Example:  Originally, we wanted to roll a $13$ or higher $7$ times in a row. In and attempt to improve the odds and make it easier to understand we changed it to be $7(N)$ $d20s$ where one must be greater than or equal to $91(Y)$. So, what is the probability that $X$(sum of rolls) is greater than or equal to $Y(91)$ given $N(7 rolls)?$   We think the answer is $0.16%$ or $1/625$ because in order to achieve the minimum of $91$, one must roll at least a $13$ on every roll. What we're wondering is does the fact that it's now cumulative change the probability?  Thanks for your time.


I can't get pagination inside categories listings to work.  I'm using a custom query, with the get_query_var('paged'):  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'post__not_in'=>$essentielle_excluded_posts, 'category_name' => 'concours-fun', 'paged'=>$paged,  'posts_per_page'=>5, ); query_posts($args);   Also tried the Category Pagination Fix plugin.  My permalink structure: /%category%/%postname%-%post_id%.html  Example of the error:   Any idea as to what else i should check?

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?


I need to get following SQL script syntax right. In postgres, you can't really chain "alter sequence" with "select max(id)". So what's the right way to write script in a way that PostgreSQL accepts it?   Here is the script so you can have an idea what I need:   alter SEQUENCE notification_settings_seq START with (select max(id) from game_user)

I ran into the problem that my primary key sequence is not in sync with my table rows.   That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists.  It seems to be caused by import/restores not maintaining the sequence properly.


I've tried for a couple hours to convert the following object to JSON string:  car = {      go : function(){         alert('accelerating');     }  }   When I convert using JSON.stringify(car), it returns {}, because methods won't work with json strings. So I thought there must be some sort of hack for that.  My question is: What is the quickest way to transform this object into a string and then back to an object, keeping its methods?

I am looking for an enhancement to JSON that will also serialize methods.  I have an object that acts as a collection of objects, and would like to serialize the methods of the collection object as well.  So far I've located .  Any thoughts?


What is the name of the following symbol and how to type it in LATEX?  Thanks!

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I am trying to align the icons and text within the boxes :  I can't seem to get the "Store Locator" and icon to align horizontally.  Can anyone please help me achieve this?  My html:

Phone

Live Chat

Email

         Store Locator <--- problem line

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


For dual citizens I know which passport to show at which step when travelling between the two.  But now I'm adding a new complication.  Let's say I have citizenship in the Us and Canada and (born in US, live in Canada).  Travelling from Canada to Japan with a layover in the US. Who sees what passport? When I enter the US they'll want to see my US passport but what do I show to enter Japan? I'm assuming the Canadian passport since its where I actually live (and what matches the passport of my travelling companion).   And what about the return trip?   (edited for specific countries)

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Collecting some theorems from the book  by its authors, there is some inconsistency, I think... :   i. $L= \sum_{n=1}^{\infty} 10^{-n!}$ is transcendental.   ii. Numbers of the form $\sum_{n=1}^{\infty} a_n 10^{-n!}$ in which $a_i \in {\{0,1}\}$ are Liouville  numbers and thus transcendental. So, by Cantor diagonalization argument there are uncountably many Liouville numbers.    iii. The collection of all Liouville  numbers has measure zero. The set of all sequences of zeros and ones (not all zero) are in 1-1 correspondence with $(0,2)$ and this is in 1-1 correspondence with $\mathbb{R}$.   How an uncountable subset of $\mathbb{R}$ has measure zero?

I know it is true that every countable set has measure zero, but is the converse true. Is it true that every set of measure zero is countable?


I'm upgrading my application to new PHP version.   For that I created two virtualhosts one server PHP 5.3 application and another with PHP 5.6.   My virtualhosts are like,  <VirtualHost *:80>   ServerName php53app.com    DocumentRoot /var/www/php_53/public    <Directory />    Options FollowSymLinks    AllowOverride All    AddHandler php-cgi .php    Action php-cgi /cgi-bin-php/php-cgi-5.3.0   </Directory>   ErrorLog /var/log/apache2/error.log   LogLevel warn   CustomLog /var/log/apache2/access.log combined </VirtualHost>   and  <VirtualHost *:80>   ServerName php56app.com    DocumentRoot /var/www/php_56/public    <Directory />    Options FollowSymLinks    AllowOverride All    AddHandler php-cgi .php    Action php-cgi /cgi-bin-php/php-cgi-5.6.0   </Directory>   ErrorLog /var/log/apache2/error.log   LogLevel warn   CustomLog /var/log/apache2/access.log combined </VirtualHost>   I'm planning migrate each url by url.   For example :  When I'm migrating /login to new app, it should show php53app.com/login instead of php56app.com/login.  So my need is to serve all URLs in same domain name whether it is new or old.  Is there any possible way by using apache's mod rewrite or something?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I have an issue with Ubuntu 18.04. I was preparing a presentation and I had to force the shut down since the screen was blocked. When I rebooted this was the message (on black screen), no more. I have tried to do different things and the most relevant lines are: 1)Started GNOME Display Manager.ever.tcher Service....system changes.pp link was shut down 2)Stopping user manager for UID120.... I trided with systemcl status display-manager from root: gdm-service - GNOME Display manager Loaded:loaded (/lib/systemd/system/gdm.service; static; vendor preset enabled) Active:Inactive(dead) I tried to check with journalctl to understand a bit more and apparenly this is the first reboot since I have installed a huge software (suspicious). I would not be surprised if there is some mismatching. I have isolated all the " install " in dpkg.log when I installed the software, but I don't know if the solution can be to remove them one by one since they are quite a lot. Any suggestion please?

dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there.


To prove $x+\frac{1}{x}\geq2$ where $x$ is a positive real number. This is what i try: $$\text{We need to prove } \hspace{1cm} x+\frac{1}{x}-2\geq 0$$ now,$$\frac{x^2-2x+1}{x}=(x-2)+\frac{1}{x}$$ its enough to show that $$\frac{1}{x}\geq(x-2)\hspace{0.5cm} \text{ when } \hspace{0.2cm}0<x\leq 2$$ we can easily show it using the graph.  but my question is can we do it algebraically or using calculus to prove it without any reference to the graphs.

I was asked to prove that:   $$x + \frac{1}{x}\geqslant 2$$  for all values of $ x > 0 $  I tried substituting random numbers into $x$ and I did get the answer greater than $2$. But I have a feeling that this is an unprofessional way of proving this. So how do I prove this inequality?


I'm learning to program on Java and I've been really frustrated because I can't find a way to convert a parse.com object that I download to a costume class.   What I'm doing:        public void downloadInformation() {     usuario = ParseUser.getCurrentUser();        ParseQuery<ParseObject> query = ParseQuery.getQuery("Glucosa");       query.whereEqualTo("usuario", usuario);       query.orderByDescending("createdAt");        query.findInBackground(new FindCallback<ParseObject>() {             @Override           public void done(List<ParseObject> objects, ParseException e) {               if (e == null && objects.size() > 0) {                   Log.d("score", "Objects Retrived");                   int i = 0;                   for (ParseObject object : objects) {                        dataArray = new MyData[objects.size()];                      dataArray[i] = new MyData(object.getInt("glucosa"), object.getInt("insulina"), object.getDate("fecha"), object.getInt("Alimentos"), object.getString("Comentarios"));                      i++;                     }                  for (int j=0; j <= dataArray.length; j++){                   Log.i("Working?", dataArray[j].comentarios);                 }                   } else {                   Log.d("score", "error");                }            }         }); }   The code of MyData is:  public class MyData {      Integer gluc;     Integer insulinaV;     Date fec;     Integer alimento;     String comentarios;      public MyData(Integer gluc, Integer insulinaV, Date fec, Integer alimento, String comentarios) {         this.gluc = gluc;         this.insulinaV = insulinaV;         this.fec = fec;         this.alimento = alimento;         this.comentarios = comentarios;     }      public Integer getGluc() {         return gluc;     }      public Integer getInsulinaV() {         return insulinaV;     }      public Date getFec() {         return fec;     }      public Integer getAlimento() {         return alimento;     }      public String getComentarios() {         return comentarios;     } }   But it doesn't matter what I try to recover, dataArray is alway empty. Even if I try to print dataArray.length it crashes.  What am I doing wrong?, What is the correct way to store an object like this? One almost of topic question, is there an easiest way to do this? in SWIFT for example I use a struct with objects.map, but I haven't find a method that can do this.   Thanks!!  Edit: There are 22 elements in objects, but the array dataArray is always null.   The error message I get is:      java.lang.NullPointerException: Attempt to read from field   'java.lang.String com.parse.starter.MyData.comentarios' on a null   object reference   The null object reference comes even if I simply try to get the size of the dataArray.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Is it copyright infringement to take a photo of toys, collectibles and dioramas and have the image transferred to a print or canvas and then selling that item on Amazon or Etsy?

Recently I played around with some lighting and macro shooting of some of my (beat-up) Matchbox toy cars from the 1970's. The results were pleasing to my eye and I had visions of making my millions by selling these images.  The Matchbox brand is now owned by Mattel, and my pics are obviously identifiable as being of those toys, even though the style is on the creative side rather than a straight pic.  So:   My assumption is that without a blessing from Mattel that I could not legally sell my images.  Is that valid?   If I need permission, how do you approach multi-nationals such as Mattel? (and are they typically amenable to such things?)   Update 1  Currently I am in the US and had intended selling here, but a website knows no geographical bounds.   Update 2  After reading  I am of the feeling (in the US) that if my pics are considered a  of the original designs, then they would stand alone as separate works.  That raises the (most likely very subjective) question of:       Are different lighting and camera angles sufficient to create a   derivative work of an object?   And by different I mean wildly dissimilar to anything the original designers used to depict their designs.  Finally I am well aware of talk to a lawyer, and I am only asking this question in terms of getting a general idea of the issue.  Update 3  A comment from Chuqui has made me realize I might have been accidentally confusing people with the terms I was using.  When I said commercially I was thinking in terms of selling fine art prints rather than to magazines, stock services etc.  In my mind making money off something is commercial.  It may be that my personal definition is not correct.


what is the password for the "ubuntu" and/or "root" user on the cloud images? i see this has gone unanswered for a while:  i am using the bionic ova in this case:  here is someone using openstack that also needs password:  EDIT: I am using virtualbox, not vmware, but i do see there is functionality when using vmware to set the password on initial deploy, so i will try that...... so i guess the answer is cannot use ubuntu cloud images on vbox, as image needs cloud-init to create loginable users.

What's the default credentials of Ubuntu 18.04 OVA ()


Why the orthogonal group $G=O(3)$ does not contain a normal subgroup, a cyclic group of order 2, $N=\mathbb{Z}/2\mathbb{Z}$?  It looks that any $g \in G$ satisfies $$ g N g^{-1}=N $$ where  $N=\mathbb{Z}/2\mathbb{Z}$ is generated by $-diagonal(1,1,1)$ of rank-3 matrix.  So why the orthogonal group $G=O(3)$ does not contain a normal subgroup $N=\mathbb{Z}/2\mathbb{Z}$, but only an $SO(3)$?

What are the non-trivial normal subgroups of $O(3)$? My guess is that the only one is $SO(3)$, but it's really only a guess, based on the fact that $O(3)$ is disconnected 3-manifold of $SO(3)$ and the set of reflective symmetries, which I'm not sure is even a subgroup (does it contain identity?)... I have no idea how to prove it.  So first I want to prove that $(\forall o \in O(3)) \space oSO(3) = SO(3)o$, then that there are no normal subgroups of $SO(3)$ and that the set of reflective symmetries is not a group.  (Please, be easy on me. I obviously don't know much about abstract algebra yet.)  Thanks!