Map markers - centre them or put them "pinned" to the exact location?

In the traditional "pin" approach to maps, the pin essentially "points" to the actual latitude/longitude. Alternatively, you could have a symmetric (e.g. circular) icon that is essentially centred on the latitude/longitude. Have there been any usability studies or guides for when to use which type?  Example map pin:     Example symmetric marker:     My question is whether to have markers "point" to their exact location (i.e. using a "pin"), or whether to centre them on top of that exact location (e.g. using a circular icon). In neither case am I referring to clustering, as I will not be clustering markers.


I have the quotient ring defined by $$\mathbb{Z}[i]/\left(i^{2}+3i-1\right)$$ How would I go about showing that the order is finite and then finding said order?  I have started by noting that $$\mathbb{Z}[i]\approx\mathbb{Z}[x]/\left(x^{2}+1\right)$$ and that I can write the quotient ring as $$\mathbb{Z}[x]/\left(x^{2}+1,x^{2}+3x-1\right)$$  I would assume that the next step would be to find out what this quotient ring is and then determine the order from that? Any help on how to solve this would be much appreciated.


Administrator account changed to Standard

I just discovered when I wanted to install a package that my Administrator account has changed to a Standard account and I don't have access to sudo. There is no other user account except my account.


A brother applied for a UK visit visa, he is self employed (a CEO/Business owner) and applied for a Visit Visa using only  his company bank statement to apply.  The commission refused the visa thinking that he used his personal bank statement, so they indicated that his salary didn't reflect in his personal bank statement and the monthly inflows were more than his stated monthly salary.   Clearly who ever worked on the documents assumed it was his personal bank statement so passed judgements indicating that his personal bank statement indicated undisclosed sources of funds hence the refusal.  If only they had taken time to read through they would have realized it was his company statement and not a personal statement.  He was informed that he cannot appeal  What can he do about this error ?


What is the best way to build visual boolean queries?

What are some good examples of building complex boolean queries? The requirements for the interface would be:   The user is able to use AND, OR, and NOT statements The user is able to next queries in a flexible manner. For example, "(X AND Y) OR (A OR B OR C AND D) NOT E OR F"   The user would need to make many queries in order to build up complex rule sets using these boolean expressions.


I am trying to display my XQuery code in a latex document as follows:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings}  \title{code} \date{January 2016}  \begin{document}  \maketitle   \begin{lstlisting} for $country in db:open('factbook')//country where $country/@population > 100000000 for $city in $country//city[population > 1000000] group by $name := $country/name[1] count $id return <country id='{ $id }' name='{ $name }'>{ $city/name }</country> \end{lstlisting}  \section{Introduction}  \end{document}   The result I get in the pdf is as follows:  f o r $c oun t ry i n db : open ( ’ f ac tb o o k ’ ) / / c oun t ry where $c oun t ry / @population > 100000000 f o r $ c i t y i n $c oun t ry // c i t y [ p o p ul a ti o n > 1 0 0 0 0 0 0] group by $name := $c oun t ry /name [ 1 ] count $i d r e t u r n <c oun t ry i d =’{ $i d } ’ name=’{ $name }’>{ $ c i t y /name }</country>   But I would like to extract the code as it is from the PDF (including the apostrophes) How do I do this?


Are $\langle \mathbb R,+\rangle $ and $\langle \mathbb R\setminus \{0\},*\rangle $ isomorphic?

I know that  $\langle R,+\rangle $ and $\langle\mathbb R^+,*\rangle$ are isomorphic. And Explicit map given by Exponential . I am not able to convince myself for map $\langle \mathbb R\setminus \{0\},*\rangle $ and  $\langle \mathbb R,+\rangle$ . Any Help will be appreciated


$1+x+x^2+\dots=\frac{1}{1-x}$, where $-1<x<1$  But I saw in one video this expression is true for $x=-1$ too. So can I write $1+x+x^2+\dots=\frac{1}{1-x}$, where $-1\le x<1$?


I'm not a native speaker, but somehow I assumed my English level to be decent enough for me to offer my help with an English text written by a Japanese colleague. I've fixed the most glaring errors, the few that I could find anyway, and at this point I'm pretty satisfied, but there is still this one sentence that lingers.  So, please tell me exactly how weird does this following sentence sound in your beautiful native ears:     My motivations, the things that always encourage me, are not only that   I love my own hometown, but also that I want my children to love their   own hometown too.   What I'm mostly concerned about is the use of "my own hometown." and "their own hometown". At first it sounded strange to me. But after some research it now sounds completely normal to my ears. (As in, I have no clue at all anymore.)   Isn't the "own" there to add emphasis on whose hometown it is? So "my own hometown" makes it completely redundant? But maybe the usage is still okay? After reading it my mind suggests that "my hometown" and "their hometown" may be separate places, but I don't think this is what the author intended. Do you intercept that meaning as well, or is it negligible?


Is it possible to install Vista from a flash drive?

I'm looking to reformat my laptop that is running Vista, and I had planned on burning an ISO to a DVD-R and installing Vista to the laptop from that after reformatting, but I don't have any blank DVD-R and was wondering if it is possible to do the same thing from a flash drive, just burning to ISO to it and installing from there. If not, is there a way to do it without using a DVD-R?  Thanks!


How do I enable invocation of a program in bash without an explicit path?

For example, I can run ln, nano, and programs I installed over apt like sl or worms without having to give the full path. However, when I build a program/package/software manually/using make/using something else, I have to invoke it using the full path, in my case ~/ghc/bin/ghc. How do you tell bash, or for that matter, sh, which names exist?  I know how to do this on Windows, but as far as I know, there's no equivalent of %PATH% in Linux/Unix/Ubuntu (in my case).


How can I do a combinatoric proof that for Stirling number of second type the equality if true: $${n\brace k} = \frac{1}{k!}\sum_{i=0}^{k}{k \choose i}i^n(-1)^{k-i}$$


Advanced Inequality with Floor Functions

For positive real numbers $a,$ $b,$ $c,$ and $d,$ find the minimum value of $$\left\lfloor \frac{b + c + d}{a} \right\rfloor + \left\lfloor \frac{a + c + d}{b} \right\rfloor + \left\lfloor \frac{a + b + d}{c} \right\rfloor + \left\lfloor \frac{a + b + c}{d} \right\rfloor.$$ I'm not seeing a technique to easily solve this problem; at this moment, I'm thinking a property of some basic inequalities such as Cauchy or AM-GM will help. Other than that, I really have no idea. Solutions?


Where do you download the current firmware for the Galaxy Note II?

I bricked my phone via the official Kies update function and now I want to restore it with Odin. However, I find no place where you can download the current firmware files, most of the sites are only for registered users or the file is taken down... Does anyone know an official firmware repository or something similar? My model number is GT-N7100.


I am attempting to show that Gaussian Integers are countable.  Is it valid to map $a + bi$ to an ordered pair $(a, b)$ and then map this to the set of rationals $a/b$ ?  I am unsure if this works since  $a/b$ is not defined at $b = 0$ and am unsure of a different way to go about this. Any hints welcome, thanks!


Have username and passphrase in OpenVPN client.conf?

With the auth-user-pass filename option is it possible to create a plain text file with username and passphrase.  Is it possible to have the username and passphrase directly in the client.conf?


"While" and "When" phrases in the future tense

When I am using the future tense, why do "while"  and "when" clauses have to be in the present tense?     For instance,       "While I am eating you will be speaking on the phone"   and    "I will be waiting when your plane arrives"   Both sentences are grammatically correct.     But,  doesn't it make more sense to say   "While I will be eating you will be speaking on the phone"  and      "I will be waiting when your plane will arrive."  ?


In the ring $\mathbb{Z}_p$, $p$ is prime, $(a+b)^p=a^p+b^p$ proof?

In the ring, $\mathbb{Z}_p$, $p$ a prime, prove that $(a+b)^p=a^p+b^p$. The hint that is given to us says that the binomial expansion works in commutative rings, but I think I used something much more simple? I said that $\mathbb{Z}_p$ of prime order is cyclic, so $\langle x\rangle = \mathbb{Z}_p$ is generated by $x$. So therefore $x^p \bmod p = x$. Thus in $\mathbb{Z}_p,(a+b)^p = a+b = a^p +b^p$ The only thing I am unsure of is if I have to prove that $x^p \bmod p = x$, and then if I can apply it to $(a+b)^p$. If this way is super is super goofy and, even if it works somehow, requires a lot of proof, then how might I get started on the binomial theorem? Thanks team.


Does anyone know where I can find cheat codes for Goldeneye 007 Wii?

I know that the game hasn't even been out for a week, but does anyone know if any cheat codes have been released by Activision yet?  I know that they must exist since there is a cheat codes menu within the game.


When I run sudo apt-get update in the terminal, I got this and I don't know what the problem is:  W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min W: Unknown Multi-Arch type 'no' for package 'libkf5akonadisearch-bin' W: Ignoring Provides line with DepCompareOp for package php-psr-http-message-implementation W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation W: Ignoring Provides line with DepCompareOp for package php-math-biginteger W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min W: Unknown Multi-Arch type 'no' for package 'libkf5akonadisearch-bin' W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: You may want to run apt-get update to correct these problems   Can anyone help?


How do I force single (only) channel audio in youtube/flash videos to play in both (left/right) channels?

Occasionally, I find Youtube videos that have only one audio channel (only left or only right);  (left channel only).  This is quite annoying, especially with headphones on, as I hear sound in one ear, and no sound in the other.  So, I want to be able to easily force dual mono (Left+Left or Right+Right) when I find that kind of video, and switch to normal stereo after I finish watching it.   , In Windows audio config, setting balance 100% to Left / Right doesn't help (I have either still only left when moved to left, and no sound at all when moved to right), I've checked all the configurations in Control Panel > Sounds and Audio Devices > Audio > Sound Playback > Advanced like suggested in , in conjunction with moving balance left/right, and it doesn't seem to have any impact on actual sound I hear in headphones, No need to mix L with R, I just want L+L or R+R, I prefer software solutions to buying a stereo-to-mono adapter, Free solutions please, no $$$ ones, neither trials etc., In Control Panel > Realtek HD Sound Effect Manager I can turn on various mumbo-jumbo effects like: Concert Hall / Hangar / Bathroom / whatever environment (and in fact it makes the sound appear in two ears, but well, it's ridiculous to do this;), but there is no Dual Mono option. Finally, I know I can force L+L or R+R in  which supports Youtube (well, , because Youtube internals change from time to time) but it is not very convenient to launch VLC just to play Youtube video - I want to keep it in the browser, I use Firefox generally (but well, if I don't find easier way, I will launch it in VLC).


Can you hollow out the inside of an Alarm spell?

After reading , I thought up a scenario that I wasn't sure if it was answered inside there. If you have a normal use of the  spell filling up a 20-foot cube, could you leave a space the size of a 10-foot cube on the ground in the middle to be unaffected by the spell? A reason you might want to do this is if you have a creature captured and bound, and you want to be alerted if he leaves his space. You would cast the Alarm spell on the area around him (within the 20-foot cube), leaving the square the he occupies out, otherwise you would be constantly alerted, as the spell states (emphasis mine):     Until the spell ends, an alarm alerts you whenever a Tiny or larger creature touches or enters the warded area.   Is this hollowing out of the Alarm spell possible?


I am learning how to use gtk notifications, and it seems that any output display via the notification bubble has a maximum overflow size, probably 10 lines or so. So, if the message I want to show is more than that, it gets suppressed. Is there any way to force display the entire message without anything getting suppressed?  I am using notifyOSD, by the way.


I have three tables  1.  Ordertable 2.  Bill  3.  Customers  In Ordertable I have following columns   (*) represents Primary key here  | Customer ID*c| Customer Name | Address | Contact Number   | Email|  In Order table I have following columns  | Order ID* | Order Status | Delivery Date | Manager ID | Customer ID| Salesmanager ID| Where Order_status can Containt ‘pending’ for pending order  And ‘completed ’ for for completed order  In bill table I have these columns   | Bill ID*| Order ID | Date | Amount |  Now I want to create Query that display completed Order  data with inner join on these three as these rules   Order_ID as OID from order table Order_Status as Status from order table Delivery_Date as Date from order table Customer_name as Name from customer table Amount as Bill Amount from Bill table What I tries is this Query   select order_status Status,Order_ID OID,Delivery_date Date from ordertable inner join bill ON ordertable.order_id = bill.Order_id   and I got this error Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'Order_ID'.    I know that order_id is in both tables but how I can solve this  And also when I remove it error gone but in the result I see only two columns for Status and Date   but not OID and any data from bill  how I can do this ?


Systematic way to determine if a model is linear or nonlinear?

Determine whether the following models are linear, intrinsically linear,   or nonlinear (disregard the error structure):      $y=\beta_0+\beta_1 x_1 +\beta_2 x_2^{\beta_3}+\epsilon$      $y=\beta_1 + \left(\frac{\beta_2}{\beta_1}\right)x+\epsilon$      $y=\beta_1+\beta_2 e^{\beta_3 x}+\epsilon$   I'm having trouble finding a systematic way to determine whether a model is linear, intrinsically linear, or nonlinear.     For $y=\beta_0+\beta_1 x_1 +\beta_2 x_2^{\beta_3}$ I have that the best you can do is to have  $$log(y-\beta_0)=log(\beta_1 x_1 +\beta_2 x_2^{\beta_3})$$  but there is no way to separate $x_1$ and $x_2$ so this model is nonlinear. Is this valid reasoning for this being nonlinear though?  For $y=\beta_1 + \left(\frac{\beta_2}{\beta_1}\right)x$ I have that $y$ can be expressed as  $$y=\theta_1+\theta_2 x$$  which is linear in the transformed parameters $\theta_1$ and $\theta_2$ so this model is intrinsically linear.   For $y=\beta_1+\beta_2 e^{\beta_3 x}$ since $\beta_1$ is just constant, we have  $$log(y-\beta_1)=log(\beta_2)+\beta_3 x$$  so this model is intrinsically linear.


how to prove the solution to brainteaser "Urban planning"

"Urban planning" is a brainteaser asking:  There are four towns positioned on the corners of a square. The towns are to be joined by a system of roads such that the total road length is minimized. What is the shape of the road?  well, the solution and question is as attached:    A,B,C,D are the 4 towns, dotted lines show the sequare, solid lines are the solution, $\angle AEB=\angle BFD = \frac{2}{3} \pi$.  It sounds convincing, but, how to prove mathematically the existence of the solution and, the valid of the solution?


I would like to know if the live image of a Installation disk can be used to recover the system or Grub?


What is the best way to avoid colorblind issues?

About 5-10% of males have some form of colorblindness.  What's the best way to ensure you are not turning away 5-10% of your male population from your game?  Just to note colorblindness does not mean people see in black and white.  It usually means they see less green and get red/green confused easily.  Colorblindness comes in degrees.  Some forms are mild some are extreme.


What is the relation between General Relativity and Newtonian Mechanics?

What is the relationship of  and  ? Namely, which laws does GR replace of Newtonian Mechanics, and which laws of Newtonian Mechanics are incorporated into it. Or is GR a complete replacement and overhaul?


What is the command to list specific hardware components?

I'm wondering what command I can use to see all the hardware in any PC, or at least some of it (for example, model of the motherboard). I'm pretty new on Linux, I'm using a lightweight version to boot in computers that I had to make a format, and previous back-up.  Some of these PCs are old, or with a very specific hardware and sometimes it's hard to find drivers.


What are the icons by the map name on the character select screen?

I've seen one that looks like a couple small boxes, and another that looks like a circular arrow with a lightning bolt in it. I've also seen it on deathcam screens. What symbols are there, and what do they mean?


I have recently been trying to refresh my memory on the Quantum Field Theory I learned 25 years ago while getting my Ph. D. At the time I did not study Chern-Simons modifications to QFT Lagrangians. Can someone point me to some good notes on the topic? I really want to understand the "utility" of those terms. Why do we want them there?


Created a dynamic string and want to fetch list size on the basis of that string

I have an object that is having multiple child objects. I want to perform certain actions only if the current record has child records associated with it. For this I am checking the related list's size first, dynamically.But I am facing issues while saving my code :   for(Lead objLeadRec : lstLead) {     for(LC_Setup_Map_Related_List__c objRelatedList1 : lstRelatedListRecords){         relatedChildObjName = objRelatedList1.tdc_tlc__Child_Object__c.replace('__c','s__r');          System.debug('relatedChildObjName'+relatedChildObjName);         if(objLeadRec.relatedChildObjName.size() >0){             hasRelatedListRecords = true;         }     } }   I am facing issue on this line, since the list name which I want to query, I have created using a string ,   if(objLeadRec.relatedChildObjName.size() >0){   Can anyone suggest any workaround. Can't hardcode object names as this code belongs to a managed package and the object names can be different in different orgs.


App crashes when trying to save to SQLite database

My app crashes when I try to save contacts with no images, but when saving with images it works.  this is what I get when saving with no images:  java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference   The line where it crashes is at:  if (dbHelper.insertPerson( image.getAbsolutePath().toString(), <-- Here it fails   Could some one please help?  Thanks  EDIT  Here is the code:  Bitmap imagecam; private File image;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      personID = getIntent().getIntExtra(FragmentJob.KEY_EXTRA_CONTACT_ID, 0);     setContentView(R.layout.activity_edit);     verifyStoragePermissions(this);      DIRECTORY = Environment.getExternalStorageDirectory().getPath() + "/DigitSign/";     pic_name = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());     StoredPath = DIRECTORY + pic_name + ".png";      btn_get_sign = (Button) findViewById(R.id.SignatureButton);      // Method to create Directory, if the Directory doesn't exists     file = new File(DIRECTORY);     if (!file.exists()) {         file.mkdir();     }   ....   dbHelper = new ExampleDBHelper(this);      if (personID > 0) {         saveButton.setVisibility(View.GONE);         buttonLayout.setVisibility(View.VISIBLE);          rs = dbHelper.getPerson(personID);         rs.moveToFirst();         custsign = rs.getString(rs.getColumnIndex(ExampleDBHelper.PERSON_PROFIMAGE));   if (!rs.isClosed()) {             rs.close();  imagecam = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(custsign), 512, 384);             profImage.setImageBitmap(imagecam);             profImage.setFocusable(false);             profImage.setClickable(false);   ....   @Override public void onClick(View view) {     switch (view.getId()) {         case R.id.saveButton:             persistPerson();             return;         case R.id.editButton:             saveButton.setVisibility(View.VISIBLE);             buttonLayout.setVisibility(View.GONE);              profImage.setEnabled(false);             profImage.setFocusableInTouchMode(false);             profImage.setClickable(false);   ....   public void persistPerson() {     if (personID > 0) {          if (dbHelper.updatePerson(personID,            image.getAbsolutePath().toString(),   ....    if (dbHelper.insertPerson(      image.getAbsolutePath().toString(),   Then in the DB Class:   public static final String PERSON_PROFIMAGE = "profileimage";   ....   PERSON_PROFIMAGE + " TEXT, " +  <-- Saving image path   ....   @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {     db.execSQL("DROP TABLE IF EXISTS " + PERSON_TABLE_NAME);     onCreate(db); }  public boolean insertPerson(String profileimage, SQLiteDatabase db = this.getWritableDatabase();     ContentValues contentValues = new ContentValues();     contentValues.put(PERSON_PROFIMAGE, profileimage);   ....   public int numberOfRows() {     SQLiteDatabase db = this.getReadableDatabase();     int numRows = (int) DatabaseUtils.queryNumEntries(db, PERSON_TABLE_NAME);     return numRows; }  public boolean updatePerson(Integer id,                             String profileimage,     SQLiteDatabase db = this.getWritableDatabase();     ContentValues contentValues = new ContentValues(); contentValues.put(PERSON_PROFIMAGE, profileimage);


"Dave saying that really pissed me off" 2 subjects?

So I was teaching and came up with a sentence like this. I'm British and it seems like something I could imagine saying but the grammar seems weird and the students didn't like.   I'm NOT TALKING ABOUT POSSESSIVES BEFORE A GERUND which has been answered here.  Are sentences like this possible? If so what is going here?   1.. Him saying that annoyed me.    You doing that caused so many problems.


Can I safely cut a copper compressor pipe with r600a gas?

Can I safely cut a fridge compressors copper pipes if it uses r600a gas. I've read of people taking out fridge compressors but I want to check whether it's safe to cut the pipes like this?


Avoid duplicated content include/require

Greeting, I am aiming to do a website with a "onePage style". As I have 3 different pages I want to display, I want the first section of the page to be the content of those 3 pages and the other section would be the same on the 3 pages. But my question is : how to do that avoiding duplicated content ? In a nutshell : 3 pages with a onepage style with the first section being different and the other section being the same. Like can you see this :


I created a live usb to boot Kubuntu, which has worked well enough. However, when the installation gets to the point of telling me to restart the computer (and it restarts) the installation window pops up again, and the computer is still signed in as a live user. None of the installation or settings appear to have saved.  Any ideas?


I just configured Postfix and Dovecot, I can send and receive emails. At the moment I have a problem with Hotmail, all my email are saved on the SPAM folder. My MX has few days, maybe they will control my MX and then set it to their "whitelist".  However, supposing to have DNS configured correctly and a clean IP address, what are the steps to follow to improve the possibilities to pass Hotmail's (and other) SPAM filter?  I have started to use the SPF record on my DNS (TXT) and set the reverse IP to my mail.example.com MX.   ...  then ?


Is it OK to translate and repost Stack Overflow questions/answers in different language?

There are several localized versions of Stack Overflow: , , , and . I guess there will be more languages supported in the future.   This brings up a big question for me. Is it OK to pick any given question in the English Stack Overflow, translate it and repost it in a different language Stack Overflow site?  Obviously there will be a lot of duplicated questions about simple topics like:     How to concatenate two strings in X language?   But is it allowed to pick an answer from the English (or any other language in the future) site and completely translate it? Furthermore are we allowed to repost translated questions? For example, can I entirely translate  and repost it in the Portuguese version?


Can you create a game on an anime/serie/saga already existing?

I had kind of an "illumination" by watching a TV serie, and got the urge desire to make it in a game the way I want it. I of course don't intend to make money out of it. So I was curious to know, would I be in a trouble if I made a game, mostly a demo about the first two episodes of the TV serie, on it without asking for any money. Won't the original developper (if by chance hear about it), get me in a court or something ? (of course in the credits or something i would say that the original serie came from them) PS : if they don't, then my second question is : Am i allowed to ask for donation, help or something to continue making a sequel, or a full game from that demo ?


Error with figure numeration with abntex2 package

I am having some problems with the figures numeration in my text. The code is what follows.  \documentclass[brazil,sumario=tradicional]{abntex2} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{wrapfig} \usepackage{graphicx} \usepackage[alf]{abntex2cite} \usepackage[brazilian,hyperpageref]{backref}  \begin{document}  \begin{figure}[h]   \centering   \begin{minipage}[b]{0.47\textwidth}     \includegraphics[width=\textwidth]{selection.jpeg}     \label{fig:elefante}     \caption{``Para uma seleção justa, todos devem prestar o mesmo exame: por favor, escalem aquela árvore.''}   \end{minipage}   \hfill   \begin{minipage}[b]{0.45\textwidth}     \includegraphics[width=\textwidth]{genius.jpeg}     \label{fig:genios}     \caption{O mundo está cheio de gênios.}   \end{minipage} \end{figure}  A tirinhas\footnote{Elas podem ser encontradas em \url{https://rlpearson67.files.wordpress.com/2013/08/for-a-fair-selection-everybody-has-to-take\\-the-same-exam-please-climb-that-tree.jpg} e \url{http://cinismoilustrado.com/post/121761541173/genios, respectivamente. Acesso em 11 de novembro de 2015.}}  nas Figuras \ref{fig:elefante} e \ref{fig:genios}  refletem o funcionamento da avaliação classificatória.  \end{document}   However, the numerations don't really match to what is on the code. When I use \ref, the numeration on the text is 4.1 and 4.2 respectively, but in the caption the numeration is 1 and 2. Is there any problem in the code or do I just need to use another figure environment with this package?


Map "Super+ArrowDown" to minimize a window while the window is focused & the window is not in fullscreen

I would like to add a conditional key mapping to Ubuntu 19.10.   Normally when a window is in full screen mode and you press super+arrowDown it enters window mode (or whatever it is called).   When a window now is in "window mode" I would like to be able to minimise it (and only then) by using super+arrowDown on it.  Is it possible to create such a shortcut without affecting the mapping of super+arrowDown on full screen windows?


My 3 years old doesn't tell me when he needs to use the bathroom

My son is 3 years old and doesn't tell me when he needs to use the bathroom. It has been 5 months now that I took his diaper off him. I just do not know what I should do.  Should I put a diaper on him again?  I mean, is this normal? Please help. I get frustrated sometimes.  He doesn't want to potty at all! I did train him before but now that he understands, he doesn't want to go to potty.


Standard compliant and/or best practice way to display an image in html/css

What's the best practice and established way to portray an image? I am working from the assumption that it shouldn't be done in HTML anymore so I am not using the img tag in my markup. Instead, I am linking the image in my CSS via background: url('dir'). If I am already going wrong with this assumption, let me know.  If linking an image in CSS is the correct (or at least a good, well established) way to go, then the next question is what HTML tag to use in the document? Technically, images can be applied to just about any element in HTML, so which one's the right one to use?   Case in point: Right now I am working on a row of icons where each icon has some text underneath it. At the moment, I have it set up as an unordered, horizontal list and I am applying the image and text in my CSS to each individual list item tag. However, there are several other ways I could do this. I could have a row of divs or spans, for example. Or I could use the img tag without defining the src property in the HTML and instead setting it in the CSS (at least I think this is possible). Or several other ways I can think.  What is the best practice in cases like this?


Strictly increasing function from $\alpha< \aleph_1$ to $\mathbb{R}$

I know that there is no increasing function $f: \aleph_1 \to \mathbb{R}$, so it seems like for $\alpha < \aleph_1$, there should exists a function $f: \alpha \rightarrow \mathbb{R}$ that is strictly increasing.   I can't think of how this could be shown/constructed. Any ideas?


$$\forall x, y, n \in \mathbb{Z},    x=y  \ \implies x \equiv y\ (mod\ n)\ $$ I am not sure if I am doing this properly and I don't know if I can show my proof like this: Suppose x = y which means x = x x ≡ x mod n n | x - x kn = x - x kn = 0 and since x ≡ y mod n jn + y = x jn = x - y and since x = y, y=y and x=x jn = 0 kn = jn


Why has this file I/O operation in Java caused NullPointerException

I was writing code for a small tool that removes a user-given string from a file whose name is fed to the program from the command line. But when run, it throws a NullPointerException. I can't figure out why. Please help me solve this mystery. Thank you very much. This code is as follows.  /**  * Remove certain lines from a text file.  */  import java.util.*; import java.io.File; import java.io.FileReader; import java.io.BufferedReader; import java.io.FileWriter; import java.io.BufferedWriter; import java.io.IOException;  public class LineCutter {     public static void main(String[] args) {          if (args.length < 1) {             System.out.println("Usage: java LineCutter filename");             System.exit(1);         }         System.out.println("Enter the line to be removed:");         Scanner lineToRemove = new Scanner(System.in);         lineToRemove.nextLine();         FileReader fr = null;         FileWriter fw = null;         BufferedReader br = null;         BufferedWriter bw = null;          try {             fr = new FileReader(args[1]);             br = new BufferedReader(fr);             fw = new FileWriter(new File("output.txt"));             bw = new BufferedWriter(fw);              String line = br.readLine();             while(line != null) {                 if (!line.equals(lineToRemove))                     bw.write(line);                 line = br.readLine();             }         } catch (IOException e) {             e.printStackTrace();         }         finally {             try {                 br.close(); // NullPointerException                 fw.close();                 bw.close();             } catch (IOException e) {                 e.printStackTrace();             }         }         System.out.println("Operations finished.");     } }


Multiple Inheritance and which destructors to make virtual? How come A is not allowed but B is?

This question is not a duplicate of  I believe. I have not been able to find a clear answer about virtual destructors with multiple inheritance. The question I am asking is how come the intermediate classes in multiple-inheritence don't need a virtual destructor.   I am trying to understand who should have a virtual destructor and why.   class Person{ public     virtual ~Person(){         cout << "person destruction" << endl;     } };  class Student: virtual public Person{ public:     ~Student(){         cout << "destroying student" << endl;     }   }; //Faculty being a Faculty member class Faculty: virtual public Person{ public:     ~Faculty(){         cout << "destroying faculty" << endl;     } };  class TA: public Student, public Faculty { public:     ~TA(){         cout << "destroying TA" << endl;     } };   I understand that you cannot do polymorphic deletes. When I do something like:  //A - case when Person doesn't have a virtual destructor Person *p = new Student(); delete p;   It crashes WHEN my base class doesn't have a virtual destructor. Makes sense. BUT when I do:  //B Faculty *f = new TA(); delete f;    How come this does not crash? Why is this not analogous to the previous case? Faculty does not have a virtual destructor.   Thanks in advance!


Is a trigonometric function applied to a rational multiple of $\pi$ always algebraic?

Specifically, just to talk about cosine, is it true that $\cos(\frac{a\pi}{b})$ is algebraic for integers $a$ and $b$? Looking at  post and the link to trigonometric constants in the comments, it seems likely that this is true. But most of the values calculated there are the result of sum/difference of angle formulas for existing algebraic values of sine and cosine.    This came up when looking at $\cos(\frac{\pi}{7})$. If this is algebraic, how can we calculate it? If it is not, for which arguments will sine and cosine be algebraic and for which arguments will they be transcendental?


YouTube video does not work properly (see image). How can I fix this?


Use the value of a variable for an enum value

Im using the AWS api in my groovy script:  new AmazonDynamoDBClientBuilder ()             .withRegion(Regions.SA_EAST_1)             .build()   I want to be able to pass in the region to the script as a user argument but Regions is an enum. How can I pass the region (like "SA_EAST_1" or "CN_NORTH_1") as a string? I could have my own map to convert the string values to the enum values but that seems really dumb.


$2 \otimes_{R} 2 + x \otimes_{R} x$ is not a simple tensor in $I \otimes_R I$

This question is related to .  Another exercise of Dummit-Foote is to show that     Let $I = (2, x)$ be the ideal generated by $2$ and $x$ in the ring $R = \mathbb{Z}[x]$ . Show that the element $2 \otimes_R 2 + x \otimes_R x$ in $I \otimes_R I$ is not a simple tensor, i.e., cannot be written as $a \otimes_R b$ for some $a, b \in I $.    I know how to show that a tensor is not simple in tensor products like $M \otimes_R N$ where $M$ and $N$ are free $R$-modules, but here we can't use this fact; so how to do it ?


I can't boot into windows: error: unknown command 'drivemap'; invalid EFI file path

I had Windows 8.1 alongside Ubuntu and all worked well. After a problem with my video configs I decided to unistall Ubuntu and I made a fatal mistake: deleted the Linux partition. After that I couldn't boot into windows.  So, I decided reinstall Ubuntu at the same partition used before.  But until now I'm unable to use the Microsoft OS.  After trying any several ways to solve the problem, I installed boot-repair and get this error:  unknown command 'drivemap' invalid EFI file path   Here is the boot-repair log file:    My computer is an Asus Vivobook i7 64bits.  Can someone help me?


I got few linux applications from a chip(MAGAZINE) cd I wanted to try (especially vlc and a few others), but didn't know how to install them. I saw a button named install it gives me some info but I can't install things like I used to with windows. I installed a few with software center, but my network connection is slow and it took me more than a hour to download an install a 10mb software. So please tell me how to install such software.


Am trying to draw a simple rectangle and there seems to be minor issue with two of the endpoints (f and d in the following). I tried line cap=rect as suggested by  but that did not seem to work.  The resulting image:    \documentclass{standalone} \setlength\PreviewBorder{5pt}%  \usepackage{tikz}  \newcommand*{\Width}{2.0} \newcommand*{\Height}{3.0} \newcommand*{\Depth}{1.0}  \begin{document} \begin{tikzpicture}%     \coordinate (A) at ( 0,       0,     \Depth);%     \coordinate (B) at (\Height,  0,     \Depth);%     \coordinate (C) at (\Height,  0,      0);%     \coordinate (D) at (\Height, \Width,  0);%     \coordinate (E) at ( 0,      \Width,  0);%     \coordinate (F) at ( 0,      \Width, \Depth);%     \coordinate (G) at (\Height, \Width, \Depth);%     \coordinate (H) at ( 0,       0,      0);%     %     \draw [blue, ultra thick,line cap=rect]%         (A) -- (B) -- (C) -- (D) -- (E) -- (F) -- cycle;%     \draw [blue, ultra thick,line cap=rect]%         (B) -- (G) -- (F) -- (E) -- (D) -- (G) -- cycle;%      \path (D)  [right] node {$d$};% Problem Point 1     \path (F)  [left ] node {$f$};% Problem Point 2 \end{tikzpicture}% \end{document}   This problem about  seems related, but I do not understand how to adapt that to my problem.


How to convert singly linked-list recursive sum of elements to a iterative solution

We have two singly linked lists; hence, we can only traverse the structures in a single direction. Besides, we only have access to the head of the linked-list. The goal of the algorithm is to sum the figures of both linked lists and produce a third one with the answer. For instance, the linked list [6, 1, 7] + [2, 9, 5] should produce the result [9, 1, 2], given that 617 +  295 = 912.  For simplicity sake, we are going to asume that the original lists are the same length. Likewise, I'm not implementing the linked list data structure; instead, I'm using Python's built-in list but treating them as linked lists.  The solution I came up with is the following (Python code)  def sum_lists(l1, l2):     lista = []     carry = sum_forward(l1, l2, 0, lista)     if carry > 0:         lista.insert(0, carry)      return lista  def sum_forward(l1, l2, index, lista):     if index == (len(l1)):                 return 0     total = l1[index] + l2[index] + sum_forward(l1, l2, index + 1, lista) #here     #we have the iterative call.     carry = total // 10     value = total % 10         lista.insert(0, value) #This way we create a new head for the "surrogate          #linked-list" and append to it the resto of the values     return carry   While this solution works fine, I've heard that any recursive solution can be turned into an iterative one. I've been banging may head for a couple of days but I'm unable to change this to a iterative solution.  I know this can be solved many ways; however, can this really be turned into a iterative solution?  Thanks guys!  I found the original problem in Gayle Laakmann Mcdowell's great book "Cracking the Coding Interview", in the subject of linked-lists.


I’m having trouble with XeLaTeX (0.9998) and unicode-math (0.7a). If I use \setmathfont more than twice, the \sqrt command breaks when a superscript is specified.  \documentclass{minmal} \usepackage{unicode-math} \setmathfont{Latin Modern Math} \setmathfont[range=\mathup/{num,latin,Latin}]{Linux Libertine O} \setmathfont[range=\mathup/{greek,Greek}]{Symbola} \begin{document} \[ \sqrt[5]{2} \] \end{document}   If I typeset this code, XeLaTeX will produce the following error  Font \l_tmpb_font has only 8 fontdimen parameters.   If I remove the superscript from \sqrt or remove the last \setmathfont command, the document compiles correctly. I’ve tested this code with several OTF files, and they all produced the same result. (I know the resulting superscript is improperly positioned, but I can work on this once I know the document can be typeset.)   because I believe it’s a problem with the package, but I should have checked here before doing so, and I will gladly close the bug if I find I was doing something stupid.


USB drive auto-mounted by user but gets write permissions for root only

I am trying to use my ext4 USB drive but Ubuntu 13 is currently mounting it with write permission only for root so with my normal user I can't write to it, without sudo.   The first place I checked was dconf-editor which has the following options   automount automount-open autorun-never autorun-x-content-ignore autorun-x-content-open-folder autorun-x-content-start-app   and it seems to me there should be an option in there to control if I can write to the mounted USB drive, but no.   I also made sure my user is in the relevant groups: fuse and plugdev  I've searched most of the internet and can't find a solution to change the permissions given by the mount operation. There's literally nobody out there having this problem incredibly. A ton of people have issues because their drives mounts totally read-only, but not this way with only root write permission.  I can't see any way of controlling what happens. I looked at setting the mount options using gnome-disks but drew a blank.  It's not in fstab but it does appear in the mount list or /etc/mtab:  /dev/sdb1 /media/adam/WDPassport2T ext4 rw,nosuid,nodev,uhelper=udisks2 0 0   This is what appears in syslog if it helps:  kernel: [111522.196770] usb 2-1: USB disconnect, device number 6 kernel: [111525.384020] usb 2-1: new high-speed USB device number 7 using ehci-pci kernel: [111525.565220] usb 2-1: New USB device found, idVendor=1058, idProduct=0820 kernel: [111525.565225] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5 kernel: [111525.565227] usb 2-1: Product: My Passport 0820 kernel: [111525.565229] usb 2-1: Manufacturer: Western Digital kernel: [111525.565231] usb 2-1: SerialNumber:  575832314141334A34383631 kernel: [111525.565729] usb-storage 2-1:1.0: USB Mass Storage device detected kernel: [111525.566203] scsi9 : usb-storage 2-1:1.0 mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1" mtp-probe: bus: 2, device: 7 was not an MTP device kernel: [111526.564697] scsi 9:0:0:0: Direct-Access     WD       My Passport 0820 1007 PQ: 0 ANSI: 6 kernel: [111526.565063] scsi 9:0:0:1: Enclosure         WD       SES Device       1007 PQ: 0 ANSI: 6 kernel: [111526.568096] sd 9:0:0:0: Attached scsi generic sg2 type 0 kernel: [111526.568202] ses 9:0:0:1: Attached Enclosure device kernel: [111526.568263] ses 9:0:0:1: Attached scsi generic sg3 type 13 kernel: [111531.263108] sd 9:0:0:0: [sdb] 3906963456 512-byte logical blocks: (2.00 TB/1.81 TiB) kernel: [111531.265100] sd 9:0:0:0: [sdb] Write Protect is off kernel: [111531.265105] sd 9:0:0:0: [sdb] Mode Sense: 47 00 10 08 kernel: [111531.266473] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.266479] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.272224] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.272230] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.284885]  sdb: sdb1 kernel: [111531.288219] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.288223] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.288227] sd 9:0:0:0: [sdb] Attached SCSI disk kernel: [111531.751588] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null) udisksd[3131]: Mounted /dev/sdb1 at /media/adam/WDPassport2T on behalf of uid 1000


Which one would perform better: logistic regression or discriminant analysis?

I have two groups (36 patients and 30 controls) and I want to check five or six normally distributed (as I checked using skewness and kurtosis values) variables (numeric) that discriminate between the two groups. Which is the best method to analyze my data? Should I perform a logistic regression or a discriminant analysis?


How to bypass errors in arcpy for/while loop?

I have a handy script tool that loops through a workspace and renames and copies shapefiles to a feature dataset.  However, if there is a corrupted shapefile somewhere in the workspace the script fails and stops processing.    How do you handle errors such as this?  Is there a way to print the error file and continue processing the next shapefile in the for loop to completion?   import arcpy from arcpy import env  # Allow overwriting of output   env.overwriteOutput = True  # Parameters   env.workspace = arcpy.GetParameterAsText(0)  state = arcpy.GetParameterAsText(1) gdb = arcpy.GetParameterAsText(2)  # Get a list of shapefiles in folder   fcs = arcpy.ListFeatureClasses()   # Find the total count of shapefiles in list   fcCount = len(fcs)   # Set the progressor  arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...", 0,fcCount, 1)   # For each shapefile, copy to a file geodatabase  try:     for shp in fcs:            # Define name for the output points          fc = str(state + shp[0:9])          # Update the progressor label for current shapefile           arcpy.SetProgressorLabel("Loading " + shp + "...")           # Copy the data           arcpy.CopyFeatures_management(shp, str(gdb + "\\" + fc))           # Update the progressor position           arcpy.SetProgressorPosition()  except Exception as e:     print "An error has occurred"     print e  arcpy.ResetProgressor()


I have been told that there was a way to use text within eqnarray; however, I have not been able to find or create any workable code.  Any help is appreciated.


Calculating a Residue at one of the poles of $\frac{1}{1+z^n}$

Is there an easy way to calculate the residue at one of the poles of a rational expression of the form $\frac{1}{1+z^n}$?  I end up having to add a bunch of polar-form complex numbers in the denominator which I have no idea how to do except to convert them to rectangular coordinates, which becomes really messy.  I feel like there ought to be simple pattern/rule for such a canonical expression.


The Height of parent and child will be given at run time, I have tried vertical-align but it didn't work, margin/top property won't be correct because height is dynamic. Please provide proper way to fix this.  Expected: Child should be center of parent. Width should remain same  Update: Solution of @xmastertje is working, but if i change my child height it breaks. This question is part of big problem so I can't use calc here. In real time I have nested elements each should center of its parent.    :root {   --parent-height: 500px;   --child-height: 200px; }  html, body {   width: 100%;   height: 100%; }  .parent {   height: var(--parent-height);   background-color: #bada55;   position: relative; }  .child {   height: var(--child-height);   background-color: goldenrod; }
   Parent Has 500px Height
     child has 200px height


Can i upgrade ubuntu without losing my apps and files?

I was just wondering since i have the 12.04 lts ubuntu edition if it's possible to upgrade it to 13.04 or even 14.04 after it gets released without losing any of my files and installed apps?  That's actually the main reason i chose the LTS version because i didn't know if i had to re-install all my apps every time a new ubuntu version gets released.


Why there is difference in pronunciation of words PUT and CUT?

I always wonder why the words Put and Cut are pronounced differently.


Physics simulation won't run until the last frame of the timeline

I am making a rigid body physics simulation. It started out ending at 250 frames, but I later changed it to 400 frames.   The problem occurs when the whole animation stops at the 251st frame. Is there a certain setting for this or do I have to restart all over again?


Viewing test scores from one of three CSV files

Is there any way I could tidy this code and make it look better and more appealing?  import csv math_class = input ("Which math class would you like to see the results of?") while math_class not in ['1','2','3']:     math_class = input ("Which math class would you like to see the results of?") sort = input ("How would you like to sort the results alphabetical, highest or average:\n") while sort not in ["alphabetical","highest","average"]:     sort = input ("How would you like to sort the results") class_file_names = ['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] scan = open(class_file_names[int(math_class)-1], 'r+') rows = csv.reader(scan) data = [] next(scan)  for row in rows:     data.append(row) scan.close()  if(sort == "alphabetical"):     word = "- Highest Score on test:"     sorted_= sorted(data, key=lambda name: name [0])     field = 5  if(sort == "average"):     word = "- Average Score"     sorted_ = sorted(data, key=lambda average: average[4], reverse=True)     field = 4  if(sort == "highest"):     word = "- Highest Score on test:"     sorted_ = sorted(data, key=lambda total: total[5], reverse=True)     field = 5  for row in sorted_:     print(str(row[0]), word, str(row[field])) input ("Sort Complete, press any key to close the program.")   If there is no way I could clean up the code, then that's fine as it does what I want it to (it's just that I thought the code could look more appealing than it already is).


Show that a ring of fractions and a quotient ring are isomorphic

For a commutative ring $R$ with $1\neq 0$ and a nonzerodivisor $r \in R$, let $S$ be the set  $S=\{r^n\mid n\in \mathbb{Z}, n\geq 0\}$ and denote $S^{-1}R=R\left[\frac{1}{r}\right]$.  Prove that there is a ring isomorphism $$R\left[\frac{1}{r}\right]\cong \frac{R[x]}{(rx -1)}.$$  I'm thinking maybe I can find a homomorphism from $R[x]$ to $R\left[\frac{1}{r}\right]$ that has kernel $(rx-1)$, and then use the first isomorphism theorem. Is this the right approach?


Nested class in templated class used in templated function syntax error

Suppose I have the following:   template<typename T>     struct Foo     {     public:         class Bar         {                    };     };   If I then define the function   template <typename T> void func(Foo<T>::Bar g) { }   I get an error: syntax error: identifier 'Bar'  Why do I get the error and how can I solve it so that I can use the templated function.


Having Schengen visa for Germany. Transiting through Paris is possible without having transit visa?

I am going to Germany (at Hannover) next month, with a Schengen visa (multiple entry) for Germany for a week. But I want to explore Paris for a while as CDG airport is not so far from many tourist places, such as the Eiffel Tower, etc. I am planning to book tickets via Air France having a layover over 10 hrs at CDG Airport so that I can have some time to explore and catch the next flight to Hannover after that. So my questions are...  Q1. Do I need a transit visa for my purpose? or what kind of transit visa do I need?  Q2. If I only want to be at CDG Airport during layover time to explore the airport area only, then also do I need a transit visa?


What's the fastest way to accomplish the globalization of an asp.net mvc site's resources?

I need to find a quick way to globalize all the strings of a web system. Is there a library/package or good practice for me to make this change?


How can I disable the default PHP error catching in Drupal?

I'm not accustomed to being so limited by a CMS whereby I have to use it's built-in error reporting instead of more specific logging with native PHP error logging.  Is it possible to disable the error catching which happens at [site-root]/admin/reports/dblog so that I can output my own variable dumps to my PHP logs via error_log(print_r($var,true))?


How was construction of the Death Star(s) kept secret?

According to various  there were over 2,379,000 people on board the original Death Star when it exploded. On top of that it's said that it took  to build and millions of people worked on the construction.   Yet despite all of those people working on a massive project (and the 2 million personnel being transferred and living there!) people like Han Solo and  about the Death Star. Even though Han is a smuggler who has a  and it would be in his interests to know about it.  So my question is: How did the Empire keep the Death Star secret from the general populace and even from the underworld which would have a vested interest in that information?  In-universe answers please.


Why can every PostgreSQL user see all databases and their tables?

I'm running a PostgreSQL database server, version 10 on Linux, for multiple users. Today I found out by surprise that any user can see all other users' databases and their tables, columns and other properties, but not the data. I'm wondering why this is the case? Shouldn't a user be restricted to their own databases? Why is this access granted at all and how can I remove it?  The users were created with this command: createuser "user1"  The databases were created with this command: createdb -O "user1" "user1_db1"  I've read something about the CONNECT privilege in the Postgres documentation but I couldn't find out how to list all the privleges that a user currently has. An article suggests revoking all privileges and granting CONNECT only on the user's database. I don't want to do that before I know what other privileges the user possibly has. Also, is this required for each new database created for the user? The documentation doesn't seem to cover this topic at all.


I have a tex document with math formula, figure, tikz drawings.   What is the best way to convert tex to doc format.   I tried with latex2rtf, pandoc, ... but nothing works.   Can someone write step by step tutorial to convert tex to doc?  Thanks.  Edit  main.tex  \documentclass[a4paper, 12pt, oneside]{article} \usepackage [utf8]{inputenc} \usepackage[slovene]{babel} \usepackage[a4paper,left=3cm,right=2.5cm,top=3.5cm,bottom=3cm]{geometry} \usepackage[pdftex]{color,graphicx, hyperref} \usepackage{times} %\usepackage{a4wide} \usepackage{mathtools} \usepackage{subcaption} \usepackage{longtable} \usepackage{booktabs} \usepackage{natbib} \usepackage[T1]{fontenc} \usepackage[parfill]{parskip} \usepackage{lmodern} \usepackage[final]{pdfpages} \usepackage{graphicx} \usepackage{tikz} \usepackage{tkz-berge}   \usetikzlibrary{arrows,%                 shapes,positioning} \usepackage{standalone}   \begin{document} \section{Objave}  \input{grafi}   \bibliographystyle{apa} \bibliography{viri} \end{document}   grafi.tex  \documentclass[a4paper, 12pt, oneside]{standalone} \usepackage [utf8]{inputenc} \usepackage[slovene]{babel} \usepackage[a4paper,left=3cm,right=2.5cm,top=3.5cm,bottom=3cm]{geometry} \usepackage[pdftex]{color,graphicx, hyperref} \usepackage{times} %\usepackage{a4wide} \usepackage{mathtools} \usepackage{subcaption} \usepackage{subfig} \usepackage{longtable} \usepackage{booktabs} \usepackage{natbib} \usepackage[T1]{fontenc} \usepackage[parfill]{parskip} \usepackage{lmodern} \usepackage[final]{pdfpages} \usepackage{graphicx} \usepackage{tikz} \usepackage{tkz-berge} \usetikzlibrary{arrows,%                 shapes,positioning} \usepackage{standalone}  \begin{document}  \subsection{Teorija grafov} bla bla $(G)$ bla $V(G)$ bla $E(G)$.bla aaaaaaaaaaa $v,u$ $\epsilon$ $V(G)$ aaaaaaaa $(u,v)$ $\epsilon$ $E(G)$ aaa $u~v$.   \begin{figure}[h] \def\tkzH{130pt} \def\tkzV{130pt} \input{graf} \caption{aaaaaaaaaaaaaaa $V(G) = \left\{1,2,3,4,5,6\right\}$ aaaaaaaa $ E(G) =  \{ \{1,2\}, \{1,5\}, \{2,3\}, \{2,5\},\{3,4\}, \{4,5\}, \{4,6\}\}$.} \label{graf} \end{figure}  \end{document}   graf.tex  \documentclass{standalone} \usepackage[utf8]{inputenc}  \usepackage{fullpage} \usepackage{fourier} \usepackage{tikz} \usetikzlibrary{arrows,%                 shapes,positioning}  \begin{document}  \begin{center} \resizebox{\tkzH}{\tkzV}{ \begin{tikzpicture}[node distance   = 30pt]   \tikzset{VertexStyle} = [shape          = circle,                                  draw,                                  %ball color     = white,                                  text           = black,                                  inner sep      = 2pt,                                  outer sep      = 0pt,                                  minimum size   = 24 pt]   \tikzset{EdgeStyle}   = [black,                                  double          = black,                                  double distance = 0.5pt]   \tikzset{LabelStyle} =  [%draw,                                  %fill           = yellow,                                  %text           = red,                                  sloped,                                   anchor=center,                                   above]                                     \node[VertexStyle](1){1};                                   \node[VertexStyle, below right =30pt of 1](2){2};                                    \node[VertexStyle, above right  = 30pt of 1](5) {5};                                   \node[VertexStyle, right =  of 5](4) {4};                                    \node[VertexStyle, right =  of 2] (3) {3};                                   \node[VertexStyle, above right = 30pt of 4] (6) {6};                                    \foreach \from/\to in {1/2, 1/5, 5/4, 2/3, 3/4, 4/6, 2/5}                                         \draw[EdgeStyle] (\from) -- (\to);   \end{tikzpicture} } \end{center} \end{document}


How to manipulate an externally-generated pdf figure in LateX?

I'd just drawn figure below in Adobe Illustrator, and need to add some details to it like x and y labels for the corresponding axis, or some other labels or information for the rest of the figure.    I'm wondering whether there is any way to add such things to this pdf file by LateX (especially TikZ) or not.  Any brilliant idea?!  PS. Yeah... You may say: Why don't you design the figure in TikZ from the scratch and add your desired information, then, easily?! The answer is that my set of figures are so complicated and already designed in Adobe Illustrator, additionally I'm not a very proficient TikZ user to redraw them in TikZ. Therefore, a probable generic approach will be really helpful!


Download and Browse Sentinel data from AWS

It's been a while since I downloaded or browsed Sentinel data in AWS from   But I can not access this website anymore. Is it closed or is there any AWS link that does the same?


Random number between two points, needs to be both negative, positive or a mix

I'm writing code for a kind of minigame in another game (Minecraft) in Java and I stumbled upon a problem.  I have two ints, int point 1 and int point 2. They are x coordinates, from ex: -100000 to 100000. But also -10000 to -5000, and 10000 to 20000. So negative to positive, but also negative to negative and positive to positive.  And that is the problem. I need to find a solution how to get random numbers from ex -100 to -50. But the same code has to be used with -100 to 50, and 10 to 50.  If you guys can help me, that'd be great!  Greetings,  Jesse.  PS: If you need a code snippet or something, just say it.


limit to infinity and uniformly convergence

Let $\exists \lim\limits_{x \to \infty} f_n(x)$ and $\exists \lim\limits_{x \to \infty}f (x)$. $f_n, f : \mathbb{R} \to \mathbb{R}$ (Here $f_n$ is uniformly converge to $f$ on $\mathbb{R}$ ) Then, Does the statement "$\lim\limits_{x \to \infty} \lim\limits_{n \to \infty} f_n(x)  = \lim\limits_{n \to \infty} \lim\limits_{x \to \infty}  f_n(x)$ (I.e $\lim\limits_{x \to \infty} f(x) = \lim\limits_{n  \to  \infty}\lim\limits_{x \to \infty}  f_n(x)$  )" hold? Most of the problems I've ever seen the limit to finite real value not the infinity, So I can't figure out it hold.  But just my guess, though it looks like a true. If it is correct, how could I prove it? (Are there any counter example of that?)


Yesterday I got a new monitor which I connected with HDMI to my laptop. Everything worked just fine. When I plug in my HDMI cable today, the laptop screen shuts off and displays the attached photo every 2-3 seconds which is also displayed every 2-3 seconds on the monitor.  Plugging the HDMI cable back out doesn't solve the problem for the laptop screen either.  EDIT:  lspci -vvv|grep -A 11 'VGA ' 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] Device 0647 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 28 Region 0: Memory at b3000000 (64-bit, non-prefetchable) [size=4M] Region 2: Memory at c0000000 (64-bit, prefetchable) [size=256M] Region 4: I/O ports at 3000 [size=64] Expansion ROM at <unassigned> [disabled] Capabilities: <access denied> Kernel driver in use: i915 -- 01:00.0 VGA compatible controller: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (rev a1) (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] GeForce 710M Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 35 Region 0: Memory at b2000000 (32-bit, non-prefetchable) [size=16M] Region 1: Memory at a0000000 (64-bit, prefetchable) [size=256M] Region 3: Memory at b0000000 (64-bit, prefetchable) [size=32M] Region 5: I/O ports at 2000 [size=128] Capabilities: <access denied> Kernel driver in use: nvidia


Advice on carrying a video tripod on a bicycle, please

I wonder whether there is anyone who carries a video tripod (Manfrotto 525 - 75mm bowl head) on their bike, rather than a dslr tripod. The thing is that although I use a DSLR camera for my filming, I am often using long lenses and accessories such as monitors, lens hood, lights, etc and I need a sturdier tripod. DSLR tripods just don't cut it for the kind of work I do. I like the mobility of a bike as I can be anywhere so quickly, but I would like to be able to carry a video tripod. I have seen some people using a pannier rack but I wonder whether a video tripod would be too much? Any advice would be immensely appreciated.   Regards Sam


How to check if a string "StartsWith" another string?

How would I write the equivalent of C#'s  in JavaScript?  var haystack = 'hello world'; var needle = 'he';  haystack.startsWith(needle) == true   Note: This is an old question, and as pointed out in the comments ECMAScript 2015 (ES6) introduced the  method. However, at the time of writing this update (2015) .


Connecting Voltage Regulators 7812 in Parallel for High Current

Could I use two L7812 voltage regulator ICs in parallel to get 12 volt and more current that with just one?


Prove that $\{(x,y)\in \mathbb{Z}\times\mathbb{Z}: x^2\equiv y^2 \!\!\!\mod \!\!4\}$ is an equivalence relation

I'm trying to prove that the relation R on $\mathbb{Z}$ is an equivalence relation, where R is defined by:  $$\{(x,y)\in \mathbb{Z}\times\mathbb{Z}: x^2\equiv y^2 \!\!\!\mod \!\!4\}$$   I know I need to show that it is reflexive, symmetric, and transitive, but I'm not sure how to do that when working with congruence. Thank you.  I answered my own question below but I'm not sure if I did it correctly. Any feedback would be really helpful. Thanks.


Correct usage of was/were on the object of a sentence

Possible Duplicate:          On a Tuesday morning, which of these sentences is the better way to express that I already want it to be Friday?     I wish it were Friday.   I wish it was Friday.


I have 2 Files:  C:\Program Files\MyApp\images\image.png  C:\Users\Steve\media.jpg   Now i want to calculate the File-Path of File 2 (media.jpg) relative to File 1:  ..\..\..\Users\Steve\   Is there a built-in function in .NET to do this?


Which sentence is correct? "Do you want to know what is it about?" or "Do you want to know what it is about?"

Which sentence is correct: "Do you want to know what it is about?" or "Do you want to know what is it about?"  I am having a discussion with my partner. I think it's the first one, she thinks it's the second one because we ask "what is it about?". But in my opinion those are two different structures.


When learning a new subject, I find searchable pdf files very useful. A quick search brings me back to the definition of a new concept, so I don't have to tax my brain so much memorizing. This also keeps the learning flow smooth: I can focus on compiling incoming knowledge many times more than searching back and forth in traditional ways.  This works fine for other subjects, but math is an exception because it contains so many math symbols that aren't necessarily unicodes. When I'm lucky, I can search $\omega$ by searching "w" because they look alike to some pdf-reader/ocr-software. But this does not work in general.  Any good practice on making your pdf file searchable, including those non-unicode symbols? Also, as I might have been ignorant, any good practice to search?


how to distribute different objects evenly in Object Mode? I know about dupliverts, particles, array modifier, etc, but they do not serve as a good, general solution.  EDIT: I have a scene with a quite a lot objects. They are already there, the question is how, in general, to distribute them evenly in linear (or in 2d/3d) fashion.


Why did Albus Dumbledore put Marvolo Gaunt's ring on?

So I was wondering and going back to Harry Potter recently and I was trying to figure out why Dumbledore put Marvolo Gaunt's Ring. The ring that Dumbledore had expertly deduced was an Horcrux was already heavily guarded by Voldemort in Little Hangleton and the only possible solution would be destroy it which Dumbledore eventually did with the Sword of Gryffindor.  It seems extremely careless and stupid of him to do such a thing. Why would the headmaster try a ring that would eventually kill him, as pointed out by Severus Snape?


$$\sum_{i=1}^n \frac1{n+i} = \sum_{i=1}^{2n}\frac{(-1)^{i+1}}i,\quad \text{ for }n\ge 1.$$  I really have no clue how on to solve this one. It's the last one on my assignment. Would really enjoy some help with this one.


do gravity shows its effect in atomic level?

how much of a effect do gravity shown in atomic level. how significant or negligible is it. i am guessing the effect is small because the mass of nucleus and electron is small. But the distance between them is also small as well so i am confused whether the effect of gravity is taken into consideration in the study of atomic structure.


find -exec + vs find | xargs: which one to choose?

I understand that the -exec can take a + option to mimic the behaviour of xargs. Is there any situation where you'd prefer one form over the other?   I personally tend to prefer the first form, if only to avoid using a pipe. I figure surely the developers of find must've done the appropriate optimizations. Am I correct?


Equivalence Principle: from falling bodies to all physical processes

Einstein's elevator thought experiment considered that in the Minkowski space-time of special relativity, all bodies fall identically.  What grounds did Einstein have to generalise this falling bodies observation to all physical processes to conclude that there is no conceivable physical experiment to distinguish between a homogenous gravitational field reference frame and a uniformly acceleration reference frame?   I believe this is about extending the weak equivalence principle to the Einstein's equivalence principle.


How do I use .htaccess to always redirect from HTTP to HTTPS?

There's a few similar questions which I tried to work out the answer from, but so far I have been unsuccessful. Please advise how I can always redirect http to https (and also remove www. from the hostname in the process). Also a side note, it would be nice to do this inside the main Apache conf rather than .htaccess - but I imagine this will not apply to most people.      Update: I've added this snippet to a VirtualHost section: RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^.*$ https://%1/$1 [R=301,L]  ... but it has no effect when I access http://www.domain (it should redirect to https://domain) Update 2: It had no effect because I did not use RewriteEngine on - so it works now: RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*) RewriteRule ^.*$ https://%1/$1 [R=301,L]


Why isn't the square root of a number such as $\sqrt 9 = \pm3$?

This is a really basic question and to be honest I feel ashamed to be asking this when I'm in precalculus and trigonometry right now.  When I was younger, I was taught that $\sqrt{x^2}$ was equal to $\pm x$. However, during this course I've inputted the negative before but was told that it was wrong, and that instead it was only the positive solution, not the negative as well. I tried contacting the professor numerous times but they haven't responded in weeks so I figured I'd come to here. Any help would be greatly appreciated.


Is there any way to define a constant value to Java at compile time

When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code:  C++:  #ifdef _BuildDateTime_    char* SomeClass::getBuildDateTime() {       return _BuildDateTime_;    } #else    char* SomeClass::getBuildDateTime() {       return "Undefined";    } #endif   Then on the compile I had a '-D_BuildDateTime_=Date' in the build script.  Is there any way to achieve this or similar in Java without needing to remember to edit any files manually or distributing any seperate files.  One suggestion I got from a co-worker was to get the ant file to create a file on the classpath and to package that into the JAR and have it read by the method.   Something like (assuming the file created was called 'DateTime.dat'):  // I know Exceptions and proper open/closing  // of the file are not done. This is just  // to explain the point! String getBuildDateTime() {     return new BufferedReader(getClass()             .getResourceAsStream("DateTime.dat")).readLine(); }   To my mind that's a hack and could be circumvented/broken by someone having a similarly named file outside the JAR, but on the classpath.  Anyway, my question is whether there is any way to inject a constant into a class at compile time  EDIT  The reason I consider using an externally generated file in the JAR a hack is because this is) a library and will be embedded in client apps. These client apps may define their own classloaders meaning I can't rely on the standard JVM class loading rules.  My personal preference would be to go with using the date from the JAR file as suggested by serg10.


How do I make a long underlined hspace not run off to the page but split into multiple lines?

\documentclass{amsart}  \begin{document}  \title{Title 1} \maketitle  Please fill in all details here: \underline{\hspace{50cm}} \\  Thank you  \end{document}   I would like to make the underline several lines long, but as you can see it is running off the page here. (I put in the \\ because I want a line break space between the "detail line" and the "thank you" line)


Filtering by Favorite Tag including wildcard ("*") and related tag does not filter

I have a favorite Tag including a wildcard  in my Favorite Tags list to get all question tagged with wpf. (Currently 63,210 question)  Now when i click on a Related Tag, such as  (the count behind the tag states that there are 26,324 question), the c#-Tag gets ignored and the result is still all the 63,210 questions.   The result of the tag-filtering above, should be equal to the search [


Are there any mathematics based jobs by Stack Exchange?

I would really like to develop my life towards mathematics (more specifically number theory). When talking to my current precalculus teacher, she recommended an internship. After some looking, however, I could not find any! Is there a chance that a Mathematics internship could be created through this site for high school students? Note, this internship does not have to do with specifically number theory, but more about a general mathematics internship. I am not sure what to tag this, so please edit before downvoting :)  EDIT: Ok, I guess interships are not an option, but would it be possible to have a math job here? I don't know how to program, by the way.


Is it a good idea for me to try to find a home here?

I was pretty hyped to come to Stack Overflow and I want to contribute and talk about coding on my . But... I have been pretty discouraged here.  I can't ask questions where I want to. I can't answer easy questions I know the answer to.  I'm afraid to ask questions because it looks like everything just gets downvoted or deleted. I don't have this problem anywhere else, like Reddit. Is it worth it to try to keep going here? I'm pretty bummed out about the experience here.


How can I reduce the number of spammers registering with my phpBB site?

I have a site which runs phpBB, on this site I have   enabled user authentication through email when registering enabled captcha   However I still get spam users every 20 to 30 minutes.  Is there anything I can do to prevent this with the ucp.php file?  I have already loaded a large list of IP addresses yet there are spam users registering all the time.  One thing I can do is I can check the bounce mail to find the username and can pipe bounced mails to a php script and immediately delete that user, but I have not got any bounce back from hotmail or some other email clients.  So this way it will catch hold of a certain percent of spam users but there are still a huge amount of users spamming.  What else can I do to prevent spammers abusing my phpBB site?


which regex pattern sets the matcher to stop at first string instance?


Is it possible to do a phd in computer science with an undergraduate degree in electrical engineering?

Is it possible to get admitted in a phd in computer science with an undergraduate degree in electrical engineering? If the answer is yes, then would a graduate student in theoretical computer science who has an undergraduate degree in electrical engineering experience difficulty understanding the computer science?


What is the java signal dispatcher thread?

I was looking through a thread dump of a java process, and notice some threads blocked by signal dispatcher.  What is signal dispatcher?  What does it do?


How to get the Country,State,City Pick list in Visual force. By selecting the country , it needs to show the states in the selected country in dropdown , by selecting the state it needs to display the cities in the state. How to achieve this in Visual force page>


In ubuntu we can see a list of files with permissions, simply using the commandls -l. But can I add the filter in this case? For example, a list of all files that are permission set to read only?


How to write a generic density matrix for multi qubit system

I was reading the paper . The author defines a generic two qubit density matrix as $$ \rho=\frac{1}{4}\left( I \otimes I + \vec{r_{\rho}} \cdot \vec{\sigma}\otimes I + I \otimes \vec{s_{\rho}} \cdot \vec{\sigma} + \sum_{i,j=x,y,z}T^{ij}_{\rho} \sigma_i \otimes \sigma_j \right) \, . \tag{1} $$  How is it obtained and what are the constraints over $T^{ij}_{\rho}$ ? Also, seeing that it has some symmetry can a general 3 qubit density matrix be written as  \begin{align} \rho = \frac{1}{8} &\left( I \otimes I \otimes I + \vec{r_{\rho}} \cdot \vec{\sigma} \otimes I \otimes I + I \otimes \vec{s_{\rho}}\cdot \vec{\sigma} \otimes I + I \otimes I \otimes \vec{t_{\rho}}.\vec{\sigma} \right. \\ &+ \sum_{i,j=x,y,z}T^{ij}_{\rho} \sigma_i \otimes \sigma_j \otimes I + \sum_{i,j=x,y,z}U^{ij}_{\rho} \sigma_i \otimes I \otimes \sigma_j \\ &\left. + \sum_{i,j=x,y,z}W^{ij}_{\rho} I \otimes \sigma_i \otimes \sigma_j +\sum_{i,j,k=x,y,z}X^{ij}_{\rho} \sigma_i \otimes \sigma_j \otimes \sigma_k \right) ? \end{align} Here $\vec{r_{\rho}}, \vec{s_{\rho}}, and \vec{t_{\rho}}$ are 3 dimensional vectors with real components and each having magnitude $\le 1$.  EDIT:  I get the fact that tensor of pauli matrices acts as a basis but can't get the condition on $T_{ij}$. I was able to work backwards to see that $T_{\rho}^tT_{\rho}$ has to be such that its maximum eigen value is $\le 1$ so that CHSH inequality is only violated at maximum upto $2\sqrt{2}$. So if this condition is not followed then $(1)$ should not be a valid density matrix. The form given in $(1)$ is already hermitian and has trace 1. So for $T_{\rho}^tT_{\rho}$ having maximum eigen value $\ge1$ $(1)$ might not be a positive operator but I am unable to prove that.


Is a base runner automatically out if they stop advancing when forced to their next base?

Here's a situation that came up during a back lot league softball game a few weeks ago. (Note: While our league has some of its own rules we try to defer to MLB rules in all causes that aren't specifically addressed.)  There is a runner on second (R2) and a runner on first, with no outs. A ground ball is hit to the third baseman (3B) who cleanly fields the ball away from third base. Seeing that R2 is running toward him, 3B does not go to third and instead waits to tag the incoming R2. R2, in an attempt to buy some time for the other runners, stops advancing to third base. As soon as R2 stops, 3B declares R2 is out (without making a tag) and throws the ball to first to make a play.  During the discussion after the play, the 3B claimed that any player advancing on a force cannot stop moving toward their next bag or they are automatically out (the same way a runner leaving the baseline to avoid a tag is considered out). Our rules don't have a specific clause that addresses this situation and I couldn't find anything in official MLB rules (though it's possible I missed something, as 3B claims it is an MLB rule).  So, is 3B’s claim correct? That if a runner who is forced to advance to their next base stops (in particular to avoid/delay a tag) they are automatically out?


Proof of $a^{\frac{p-1}{2}} \equiv \left(\frac{a}{p}\right)$ mod $p$

$p$ is a prime, odd integer. $a$ is an integer. we assume that $p$ does not divide $a$. $\left( \frac{a}{p} \right)$ denotes the Legendre symbol.  In order to prove $a^{\frac{p-1}{2}} \equiv \left(\frac{a}{p}\right)$ mod $p$ my course  demonstrates the following statement first (Wilson) :  $\left( p-1 \right)! \equiv -\left(\frac{a}{p}\right) a^{\frac{p-1}{2}}$ mod $p$  However it is not clear to me how this implies the first statement.


This really puzzles me: Attempting to set the baseline in a block (delimited by { and }) doesn't seem to have an effect for typed text, but works when a command creates the text. Question What are the rules here? MWE (also ) \documentclass{scrartcl} \usepackage{lipsum} \pagestyle{empty}  \begin{document} \section{Normal size}  This is a sample of typed text in normal size and with a normal baseline skip -- nothing special.  \section{Size changed in block}    {\fontsize{15}{20}\selectfont Here, the baseline skip has been altered in a block delimited by curly braces. The font size has changed, but the baseline skip is weird.   }  \section{Size changed outside of block}    \fontsize{15}{20}\selectfont Everything works as expected outside a block: The baseline skip is considerably larger here.  \section{Size restored}  \normalsize This is a sample of typed text in normal size and with a normal baseline skip -- nothing special.  \section{Size changed in block for Lorem Ipsum}    {\fontsize{15}{20}\selectfont\lipsum[1]}    \end{document}


When you visit the global search page:        and want to search for a tag like we used to do on the site search like so:     [haskell] pattern   you're directed to the error page with the Panda.  If tag search is supposed to work, can this be fixed? If tag search is not supposed to work there can you at a minimum not throw an error?


Null pointer exception while executing query

Following is the code to display the tuples which has the username and password matching the strings  String usr = tf1.getText(); String pwd = tf2.getText();  System.out.println("Username is " + usr + " Password is " + pwd);  String sql = "select * from student where first = '"+usr+"' and last = '"+pwd+"';"; System.out.println("SQL is " + sql);  try {     rset = stmt.executeQuery(sql);     if(rset.next()){           JOptionPane.showMessageDialog(null, " Login Successfull...");     } } catch(SQLException e){     JOptionPane.showMessageDialog(null, e); } // TODO add your handling code here:   }                                          Is there any mistake in framing the query here.pPlease check the string 'sql'. The null pointer exception is at the following statement.  rset = stmt.executeQuery(sql);  This sql string is not null because, when I print it on console it shows me  select * from student where first = 'rohit' and last = 'rocks';   So, its not null at the runtime. If sql is not null then why am I getting the NullPointer Exception?


My sons have a good friend called Ben. I thought I could say, " My sons love to be with Ben". But when I said it to his mother, she replied to me by saying, "Ben also loves being with them as well." Can't we say "love to be with" or are both "love to be with" and "love being with" correct? Is there any difference between these two?


Very basic intro to real analysis question

In page 2  of baby Rudin,  Rudin wants to prove that $ \forall p  \in   \mathbb{Q} $ such that $ p>0 $ and $p^2 < 2$ there exists a $q \in \mathbb{Q}$ such that $q>p$ and $q^2<2$  In his proof, he starts with let $q=p-(p^2-2)/(p+2)$  and then says $q^2-2 = 2(p^2-2)/(p+2)^2$  and he goes on to finish the proof.  His proof makes sense, my question is how am I supposed to think in order to solve such problems?  I mean how do you know what to set q equal to? How did he think about this problem to get the expressions?  For example, right now I am trying to find $X$ such that $ q=p-X $ different than the one Rudin set. But I can't think of anything.  Thank you!!  Edit: Yes, I apologize I did make a mistake, it's been fixed now


I've been searching around google and I've seen a few guides to "dual booting", but I don't want to put two operating systems on one drive.  I have a 240 GB SSD for windows and a 64 unused SSD that I want to put ubuntu on. As well as a 1TB hard drive.  Can I just unplug my 240GB SSD and my hard drive, and then install it to the 64 GB SSD?  If so, then have can I have it prompt me if I want to boot into windows or ubuntu?  Thanks!


What are the uses of \@bsphack & \@esphack

I see the macro duo:   \@bsphack ... code ... \@esphack   appearing in different places. I noted that it suppresses spaces around the macro in which these commands are used, but when do you need to use them in your own macros / are there other use cases?


Can I install Ubuntu alongside my windows 10 as a dual boot?

I have an old enough laptop which has 64Gb internal storage and it has Windows 10 already installed on it. I am wondering do I have enough space to do a dual boot with both windows 10 and Ubuntu?  Thanks


I am setting up multiple-machine backup plan and I was hoping to use a user called 'backup' on each machine as the backup destination.   My problem is, there is already a user called 'backup' on my machine.  What is it for, and can I hijack it for my own purposes?  root@frodo:~# useradd backup useradd: user 'backup' already exists


Hi the app stopped showing rep increases and now is just showing badges. Yesterday it showed both rep and badges earned.     App Version: 1.4.0 Device: iPhone7,1 OS Version: Version 9.1 (Build 13B143)


Calling generic method using reflection in .NET

I have a question. Is it possible to call generic method using reflection in .NET? I tried the following code   var service = new ServiceClass(); Type serviceType = service.GetType(); MethodInfo method = serviceType.GetMethod("Method1", new Type[]{}); method.MakeGenericMethod(typeof(SomeClass)); var result = method.Invoke(service, null);   But it throws the following exception "Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true."


Apply empty style to the entire bibliography

I would like the entire bibliography to have an empty page style in my document (which means remove the headers and page numbers).  I used the command \renewcommand{\bibsetup}{\thispagestyle{empty}\pagestyle{empty}} from  which successfully removes the style from the first and all subsequent pages of the bibliography except for the last page.   I created a minimal working example that produces the following output:    As you can see, the first page of the references has no style. However, the second page (which in this case is the last one) has the page number at the bottom.  Note that this happens also i) if I have more than just two bibliography pages, and ii) for the intermediate bibliographies at the end of each of my chapters.  I am writing a thesis (memoir class) and am using the fancyhdr package, in case this is relevant.  Any suggestion on what might be going on? Thanks a lot!  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[     backend=biber,     style=ieee,     citestyle=numeric-comp,     backrefstyle = none ]{biblatex}  \renewcommand{\bibsetup}{\thispagestyle{empty}\pagestyle{empty}}  \addbibresource{bibli.bib}  \title{Minimal working example}  \begin{document}  \section{Introduction} coordinates~\cite{li20143d,pavllo20193d}, predictions~\cite{pavlakos2016coarse,varol2018bodynet}, models~\cite{tome2017lifting} encoding~\cite{kanazawa2018end,bogo2016keep} information~\cite{zhou2017towards,habibie2019wild} training~\cite{rhodin2018learning,qiu2019cross}  a \cite{andriluka20142d,lin2014microsoft} markers \cite{sigal2010humaneva,h36m_pami} multi \cite{Joo_2015_ICCV,mehta2017monocular} cameras~\cite{shu2016learning} free~\cite{chen2016synthesizing,varol2017learning,tome2019xr} camera~\cite{taylor2000reconstruction,bourdev2009poselets,pavlakos2018ordinal,ronchi2018s} camera \cite{rhodin2018unsupervised} point \cite{sermanet2017time,mitra2019multiview}   \newpage \printbibliography[heading=bibintoc]  \end{document}


Detect dynamically added elements jQuery

I have a button which is added dynamically      <button id="btnSubmit">Button 1</button>      $(document).ready(function(){     $('#btnSubmit').on('click', function(){         alert('Button 1');         var button2 = '<button id="btn2" >Button 2</button>';         $('#btnSubmit').after('

' + button2);     });      $(document).on('#btn2', 'click', function(){         alert('Button2 clicked');     });   });   Now, when I click on #btn2 the event is not detected. How can this be fixed?


Is there an isomorphism between A4 and D6?

I think there is not.  In order to proof this I've written all the element's order and I've seen that the possible orders in A4 were only 1,2 and 3 (3 elements whit order 2 and 8 elements whit order 3). The orders in D4 were 1,6, 3 and 2 but there were 7 elements with order 2. So because an isomorphism is first of all an homomorphism, my map have to respect this condition: ord(f(x)) divides ord(x), but in my exemple I have 8 elements whit order 3 in the domine and 3 elements whit order 3 or 1 in the codomine, so I'm forced to send seven elements in only three, so the map can't be injective, so can't be an isomorphism.  I think it is correct, but I would like to know if there is a smarter way to proof this involving generators.  Thanks!


Someone who just thinks they know what they're talking about

What is a word or phrase that means a speaker (or writer) is talking about something they know very little about, but they think they know more than they do?  An example: If you read diet message boards, you get dozens of people saying ‘Eat 6 small meals a day,’ or ‘Eat 3 big meals, but don’t snack,’  or ‘Eat more/less protein/carbs/fat.’ Each person is sure they are knowlegable enough to give good advice, but real experts(dieticians or researchers, for example) are rare.  I want a word to describe this attitude.  Bullshit is close, but someone bullshitting usually knows they aren’t an expert, they just want to convince the listener they are.  Also, I’d prefer something politer than bullshit.


I have a friend in South Africa who is thinking about buying a Nintendo DS. It's hard to find games in her city, though, so I was thinking I'd buy several in the USA and mail them to her.   Would this work or are Nintendo DS games region locked?


I need to sum numbers from a file line by line.  The file:  1.0 0.46 0.67   I want to sum, then divide 3.  I currently have:  while IFS= read -r var do    x=$(($var + $x)) | bc -l done < "file.txt" echo "$x / 3"   My error:  -bash: 1.0 + 0: syntax error: invalid arithmetic operator (error token is ".0 + 0")


Predict next auto-inserted row id (SQLite)

I'm trying to find if there is a reliable way (using ) to find the ID of the next row to be inserted, before it gets inserted. I need to use the id for another insert statement, but don't have the option of instantly inserting and getting the next row.  Is predicting the next id as simple as getting the last id and adding one? Is that a guarantee?  Edit: A little more reasoning... I can't insert immediately because the insert may end up being canceled by the user. User will make some changes, SQL statements will be stored, and from there the user can either save (inserting all the rows at once), or cancel (not changing anything). In the case of a program crash, the desired functionality is that nothing gets changed.


Fiat-Shamir transform: reliance on hash input by interactive proof

Peggy would like to prove to Victor that she knows the discrete logarithm of $y$ based $g$; that is, she knows $x$ such that $y = g^x \bmod p$. One round of the interactive proof protocol consists of the following steps.   Peggy picks random $k \in \mathbb Z/(p−1)\mathbb Z$, computes $t = g^k \bmod p$, and sends $t$ to Victor. Victor picks random $h \in \mathbb Z/(p−1)\mathbb Z$ and sends $h$ to Peggy. Peggy computes $r = (k − hx) \bmod (p − 1)$ and sends $r$ to Victor. Victor verifies that $t = g^r y^h \bmod p$.   The interactive protocol can be converted into a noninteractive zero-knowledge proof by choosing and making public a collision-resistant hash function $H$, and changing the second step of the interactive protocol to the following: Peggy computes $h = H(y, t)$. Then the noninteractive proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y, t), \qquad t \stackrel?= g^r y^h \bmod p.$$   What is the problem if in the non-interactive proof the hash $h$ depends only on $y$? That is, $h = H(y)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y), \qquad t \stackrel?= g^r y^h \bmod p.$$ What is the problem if in the non-interactive proof the hash $h$ depends only on $t$? That is, $h = H(t)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(t), \qquad t \stackrel?= g^r y^h \bmod p.$$


Calling Apex class from trigger - issues with passing a list

I am trying to call my Apex class from a trigger:  trigger newCrossSellAccounts on Account (before insert) {    crossSellModule.insertAfterAccount2(trigger.new); }   On the class I have:  public void insertAfterAccount2(list<account> accountList){   When I try to save trigger I get error:  Method does not exist or incorrect signature: crossSellModule.insertAfterAccount2(LIST<Account>) at line 2 column 4    Now from  it says .new "Returns a list of the new versions of the sObject records." I tried to change the function on class to:  public void insertAfterAccount2(sObject<account> accountList){   But I get error:  Invalid type: sObject<account>    Should I loop thru and create a list in trigger first? Or is there are workaround. Also, how one would test such trigger/class combination?


How can I overwrite the style of my Instagram Feed? I want the the following applied, but don't know where to set my css, it doesn't work neither in the header or the footer of my page. .Header{display:none;} .PrimaryCTA {display:none;} .PrimaryCTA {display:none;} .Feedback  {display:none;}


Material applies to every face rather than entire object

I am trying to apply a material/texture to an entire object (UVSphere), but when I render, it acts as if it is applying to each individual face rather than the whole object.    I am trying to do something more like what is depicted here:    I haven't posted to this forum before. Please let me know if there is more I ought to say/include.  I am trying to imitate procedure described here:   The procedure is not UV mapping or using images. It uses a transparent material with a blend type texture to achieve the hole through the sphere and the shift from red to white.


Why isn't my check for a sub string working?

Im trying to a really simply condition statement. I need to check if my string first character is equal to 0.  I have a string that is equal to 0123, and I want to see if the first character is equal to 0.  String timetest = "0123";  if (timetest.substring(0, 1) == "0") {     System.out.println("first character is equal to 0"); } else {     System.out.println(time.toString().substring(0,2)); }   I dont get why it isn't printing "first character is equal to 0"?  Sorry for the simple question. I don't see why this isn't working.


I completed all the quests required to become guild master and was told that I would be guild master after I returned the key. But now Brynjolf is wearing the master armour and he is always too busy to talk.  So why is Brynjolf guildmaster not me?


I have two shapefiles with the same projection, but they could not overlay each other. I understand that the extent is different, but I could not figure out how to change it.  Here are the two layers properties:


Why does the filename contain question marks when I run a script on my remote machine?

I have a tiny script that simply fetches the current date, runs a PHP script and redirect the output (and errors) to a filename containing the current date.  DATE=$(date +"%Y%m%d") FILE="log/${DATE}.log" php -q script.php >> $FILE 2>&1   When I run this script on my local machine (Windows 7, Aptana IDE), the PHP script works fine and the logfile has the expected filename, e.g. 20140502.log.  But when I push that script via SFTP to my remote machine and execute that script, the filename looks like this:  20140502?.log?   What might be the problem? Is this an enconding error (e.g. encoding for SFTP uploads is ANSII, where UTF-8 is expected)? Or do I have to change anything in the script itself?  Information about system/shell:  [foo@bar path]$ sh --version GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)   Funny fact: If that script is called by a cronjob, the question marks don't occur. Only if I manually run the script.


How do I use a temporary environment variable in a bash for loop?

I want to run YII_ENV=prod yii kw/test ten times. I tried  $ YII_ENV=prod for x in 1..10 do; yii kw/test done; -bash: for: command not found 1304682651   (Seemed to run once.) I also tried  $ for x in {1..10} do; YII_ENV=prod yii kw/test done; -bash: syntax error near unexpected token `YII_ENV=prod'   GNU bash, version 4.3.39(2)-release (i686-pc-cygwin)


How do you tag tags on MSO in a comment?

I tried to mention a tag in a comment by writing "[tag: tagname]" (without the space), and it pointed to a non-existent tag on SO.  I was trying to point to a tag on MSO.  Is there different syntax to do that?


What is the difference between the two sentences below?:  They have arrived back home. They have arrived home.  Thanks for the answers!


Why don't meta sites use common tag wikis for common tags?

Some tags such as  and  have, or , the same wiki across MSE and all per-site metas.  I propose that tags can be whitelisted here on MSE to have their wikis copied to all per-site metas. This could be done either   By SE employees. e.g., Mr. Shog. or Via voting; similar to that of synonyms. Would require 5 or 10 votes.


Is there any way, shape, or form that ultraviolet light is recorded by a digital sensor?  Ideally, this question is related strictly to the sensor, without even a glass lens in between which could cut or block UV light.  But of course I don't take pictures with a bare sensor, I also have a lens, so I'd also like to know how much UV gets to the sensor to begin with.


Let $X$ be an infinite dimensional Banach space. Prove that every Hamel basis of X is uncountable.

Let $X$ be an infinite dimensional Banach space. Prove that every basis of $X$ is uncountable.  Can anyone help how can I solve the above problem?


I tried to draw a curved arrow like this:  \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture} \draw[->,thick] (2,1) edge[bend left=50] (3,2); \end{tikzpicture}  \end{document}   However, there is an undesired "tail" of the arrow. How can I eliminate it?


I want regx for following condition      1.Combination of Letters and Digits should accept.      2.Combination of Letters and symbols should accept.      3.Only Letters should accept.      4.Only digits should not accept.      5.Only Symbols should not accept.      6.Combination of letters,digits,symbols should accept.   I am trying like this:  /^([a-zA-Z]+\s*)*[a-zA-Z]+$/   What is wrong.