AI technology is obviously pretty advanced in the Star Wars universe. This question explains why AI droids aren't more commonly used in perilous situations:   (TL/DR - their AI was crippled to make them more obedient).   However, the films (the only canon reference I'm familiar with) features a number of droids which have apparently human-level intellect and are capable of functioning entirely independently. C3P0 is the obvious example. IG-88 is another (whose existence, I might add, undermines the idea that battle droids are always stupid).  At no point in is there any sign that these robots are particularly special or rare. They are not treated as valuable objects, and the organic characters in the films don't react to them with any surprise. So it follows that they must be reasonably easy to produce.  The way they are treated seems to fall into an uncomfortable gray area between objects and sentient beings. My question is whether there's any canon references as to the status of AI entities in Star Wars as "people"?

Some Star Wars Droids are definitively sentient beings, but it appears that they are not treated as such.  The  (which have no references) said they are typically treated as property, but does the status change along with the various governments? Is there any known canon occurrence in the expanded universe where consequences of the destruction of a droid have been explored?


List<Event> newEventModuled = new List<Event>();     newEventModuled = [select Ownerid,Subject,what.name,Description__c,ShowAs,Time_Spent_In_minutes__c,                          StartDateTime, EndDateTime,IsAllDayEvent,Description,Location,IsPrivate,account.Name,                         Activity_Type__c,Channel_partner_Visit__c,Customer_Partner_Visit_Activity__c,                         Location__c,Daily_Activity__c,OwnerComments__c,DescriptionEvent__c,UndecidedEventInviteeIds,                         AcceptedEventInviteeIds,(select relation.name from EventWhoRelations)                          from event where id IN :eventIds];   Looking at this query can someone tell exactly where my query is fetching extra data or where do i have to put limit?  Its givinh Too many Soql query 101 error in handler!

I am getting a Too many SOQL queries: 101 error on a trigger when I am trying to deploy another trigger.  I am posting the trigger which is causing the error.  trigger rollupAccountShowings on Account (before insert, before update) {    if (trigger.isinsert) {       for (Account a:Trigger.new){           a.No_of_Viewings__c = 0;        }    } else {      for (account a : [select                   id,                  (select id from pb__Showings__r)                  from account                   where id in:trigger.new LIMIT 1]) {           trigger.newMap.get(a.id).No_of_Viewings__c = a.pb__Showings__r.size();      } }   Can anyone correct me where I have gone wrong and suggest me the changes.  Thanks


If  $$A = \{1,2,3,4\} $$ and   $$R = \{(3,3), (4,4), (1,4)\}$$      This example is antisymmetric but not symmetric.   However, the definition of Antisymmetric taken from Merriam-Webster is this:     relating to or being a relation (as “is a subset of”) that implies equality of any two quantities for which it holds in both directions (the relation R is antisymmetric if aRb and bRa implies a = b)   Please forgive my ignorance, but I'm incredibly confused by the definition. I'm obviously wrong, but it suggests to me that there is/should be a (4,1) in R. However, if there was a (4,1) in R that would make R symmetric and not antisymmetric.  I found a previous Question that asked something similar but was answered with the use of Digraphs. It made me understand how to identify antisymmetric relations, but I still don't understand the core concept.  Thank you so much for any help!

Given a set $\{1,2,3,4\}$, how is the following relation $R$ antisymmetric?  $$R = \{(1, 2), (2, 3), (3, 4)\}$$  Note: Antisymmetric is the idea that if $(a,b)$ is in $R$ and $(b,a)$ is in $R$, then $a = b$. In my textbook  it says the above is antisymmetric which isn't the case as whenever $(a,b)$ is in $R$, $(b,a)$ is not.


How can I check if std::cout << myClass; is valid? I'd like to do something like:  class Logger {  public:   // Some kind of enable_if(operator<< doesn't exist)   void printMyClass(MyClass& my_class) {     std::cout << "Got a myclass" << std::endl;   }       // Some kind of enable_if(operator<< exists)   void printMyClass(MyClass& my_class) {     std::cout << "Got a myclass: " << my_class << std::endl;   }     };

I'm asking for a template trick to detect if a class has a specific member function of a given signature.  The problem is similar to the one cited here  but not the same: in the item of Sutter's book he answered to the question that a class C MUST PROVIDE  a member function with a particular signature, else the program won't compile. In my problem I need to do something if a class has that function, else do "something else".   A similar problem was faced by boost::serialization but I don't like the solution they adopted: a template function that invokes by default a free function (that you have to define) with a particular signature unless you define a particular member function (in their case "serialize" that takes 2 parameters of a given type) with a particular signature, else a compile error will happens. That is to implement both intrusive and non-intrusive serialization.   I don't like that solution for two reasons:   To be non intrusive you must override the global "serialize" function that is in boost::serialization namespace, so you have IN YOUR CLIENT CODE to open namespace boost and namespace serialization! The stack to resolve that mess was 10 to 12 function invocations.   I need to define a custom behavior for classes that has not that member function, and my entities are inside different namespaces (and I don't want to override a global function defined in one namespace while I'm in another one)  Can you give me a hint to solve this puzzle?


I am using gparted to resize my partition. I would like to free up all of my memory and allocate this to ubuntu, but I can't mess with ubuntu's partition while it is in use. I can, for some reason, no longer get into my windows 8 OS because of an EFI error. I just installed ubuntu 13.04 so would it be easier to just re-install and have ubuntu install over everything else, or is there a way with gparted?

I've got Ubuntu 10.10 installed to use my whole hard-disk, but would like to use the 130GB of free space I've got to create a new partition and do some development on Unity and Natty.  Can I use gparted to do this?  If so how?


Given $n\in\Bbb{N}$, prove that     $$\left(1+\frac 1n\right)^n<\left(1+\frac 1{n+1}\right)^{n+1} ...(1)$$   I notice that this is approaching $e$ as $n$ approaching $+\infty$. Further more, I am asked to prove another similar inequality as following,     $$\left(1+\frac 1n\right)^{n+1}>\left(1+\frac 1{n+1}\right)^{n+2} ...(2)$$   I tried to use induction method to prove them but it seems like I got stuck. Solution and hints would be appreciated.

A proof done in class called upon this inequality: $$\left(1+\frac{1}{n}\right)^n\lt e\lt\left(1+\frac{1}{n}\right)^{n+1}$$ How can this inequality be proven?


On Windows I used DVD Shrink to copy my home movies and such onto new discs.  Whats the best alternative for Ubuntu?

Is there a linux alternative to the Windows application DVD-Shrink, that can compress a DVD image to a smaller size to fit on a writeable DVD?  In backing up some DVD's the ripped ISO file size is over 7000MB is there an alternative linux software, similar to Windows "DVD Shrink" that can compress this to fit on a writeable DVD which is about 4000MB


Suppose that $G$ is a $d$-regular bipartite graph with bipartition $(A, B)$, and that $d ≥ 1$. a) Prove that $∣A∣ = ∣B∣$. b) Prove that $G$ contains a perfect matching.  So I understand that a $d$-regular graph will have every vertex of degree $d$. But I am not sure how that would apply here. Will I have to insert $d$ into my use of Hall's condition and then move from there. And also, how exactly would I prove that $|A| = |B|$? Would that also involve Hall's condition? Thank you!

I'm looking to prove that any $d$-regular bipartite graph satisfies the HALL condition and contains a perfect matching.  I'm having trouble seeing why, if $G=(V,W,E)$, for any $H \subseteq V$, $|H|\leqslant |N(H)|$.  Would appreciate an answer!   Edit: For degree $\geqslant 1$ obviously.


Python 3.5.0  I'm working with 150-200 lines of code so it isn't the worst. But this game involves a lot of repetitive lines of code, so I was wondering if there was a command that clears the whole console (for instance if I was to write code that prints "hello world" then it clears itself and prints "hello usa" where "hello world" used to be) before outputting the next line of code. I'm hoping to do this in the code editor in IDLE instead of the shell.  I guess I didn't make it clear enough D: sorry, my bad. I tried the import os way, and it just opened up a cmd console every once and a while for about a fraction of a second. I want a command that I can write in the python code editor that comes with idle, so that whenever I run the program and the program pops up, the text will pop up on the running program, disappear, then print the next text (or next step of the program).

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work.


I talked to her on hangouts and also via texting. She asked me if I had a bank account and informed her that I don't. She then says that her uncle is in Mexico would send a check made out in my name and I would deposit it into the bank and send them the account information. I told them that I'm going to make sure that its legal and if I can get in trouble for cashing a check in my name

A woman on Facebook recently contacted my dad.  She asked him to get a bank account so she could send him money, and he would send money to her employees (about 12 people), and she would pay him for doing so each time. She said the last person who she had do this for her ran away with all her money. But he would have made more money continuing to do this money transfer thing for her. I am not sure if this is a scam or not. Sounds weird to me, but my dad said it’s worth the try.  I had to get the bank account in my name because my dad has bad notices on his records for falling for fraud traps and asking for refunds too many times. She stressed to him that it had to be the bank “American Christian Credit Union;” for what reason, I’m not sure. There is no large amount of personal money in this bank account, just the minimum amount to open the account: $25.  I’m skeptical about this and confused as to why this person would send a large amount of money to a random person on the Internet?  Has anyone heard of any scams like this?  What should I look out for?


I'm struggling to understand why the curl of this magnetic vector field would be zero: $$B(x,y,z)=\left(\frac{-y}{(x^2+y^2)},\frac{x}{(x^2+y^2)},0\right)$$ This cartesian field was derived from the equation for a long, straight current carrying wire, with current flowing on the Z axis. I found this derivation . Note that I removed the constants for simplicity ($\frac{\mu_0*I}{2\pi}$) If I plot this field (shown in x-y Plane), it looks obvious that it should have curl; since the magnitude of the field lines increase approaching the center, any point in this graph should "spin" clockwise. I realize that this is an intuitive definition of curl, so please correct me if I'm wrong for using it.  Also, since this equation was derived from a magnetic field equation, barring any computation error, this HAS TO have curl from Ampere's/Maxwell's Law: $$\nabla X B=\frac{1}{c}\left(4\pi J + \frac{dE}{dt}\right)$$ In the constant current example, $\frac{dE}{dt}=0$, but current density $J$ is proportional to current and distance from the wire. However, when I calculate the curl of this it results with zero: $$[-2*\frac{x^2}{(x^2 + y^2)^2} - 2*\frac{y^2}{(x^2 + y^2)^2} + \frac{2}{(x^2 + y^2)}]\hat k=0$$ If anyone could help out mistakes or poor assumptions made here, I would greatly appreciate it!

The curl in cylindrical coordinates is defined:  $$\nabla \times \vec{A}=\left({\frac {1}{\rho }}{\frac {\partial A_{z}}{\partial \varphi }}-{\frac {\partial A_{\varphi }}{\partial z}}\right){\hat {\boldsymbol {\rho }}}+\left({\frac {\partial A_{\rho }}{\partial z}}-{\frac {\partial A_{z}}{\partial \rho }}\right){\hat {\boldsymbol {\varphi }}}{}+{\frac {1}{\rho }}\left({\frac {\partial \left(\rho A_{\varphi }\right)}{\partial \rho }}-{\frac {\partial A_{\rho }}{\partial \varphi }}\right){\hat {\mathbf {z} }}$$  For vector fields of the form $\vec{A}=\frac{k }{\rho}\hat{\varphi}$  (plotted below), $A_z=A_\rho=0$ and $A_\varphi = k\rho^{-1}$, so the resulting field has zero curl. But choosing $k=\frac{\mu_o I}{2\pi}$ results in the correct solution for the magnetic field around a wire:  $$\vec{B}=\frac{\mu_o I}{2\pi R}\hat{\varphi}$$  This field cannot be curl-free because of Maxwell's equations, Ampere's law, etc. So I must have made a mistake somewhere: Why am I calculating this field to be curl-free?


In the normal fashion you have to select the file you want to upload in a file field or image field and then click "upload" button.  this is not very "user friendly"  How to upload the image or file just after the user selects it in the window without the necessity of click "upload" button.

I have a custom content type to allow users to upload images.  I'm trying to keep the interface as simple as possible.  The content type contains a single image field.  This works, but some users don't understand that the image has been uploaded because they don't see it after selecting (to preview the upload, the upload button must be pressed).  Is there a way to skip/automatically press the upload button so that an image is shown immediately after a file is selected?  In other words, immediately after selecting a file, instead of the following picture (where the path is shown but hard to read in Firefox):    I'd like the preview display to be shown like this:


Show that if $x$, $y$, and $z$ are consecutive terms of an arithmetic sequence, with $x \leq y \leq z$, and both sides of the equation are defined, then  $$\frac{\sin x + \sin y + \sin z }{\cos x + \cos y + \cos z} = \tan y.$$    I have no idea how to even start this problem, I'm stuck.  Solutions are greatly appreciated.

Show that if $x, y,$ and $z$ are consecutive terms of an arithmetic sequence, and $\tan y$ is defined, then  $$\frac{\sin x + \sin y + \sin z }{\cos x + \cos y + \cos z} = \tan y. $$  I'm not sure what trig identities I would use and how to use them.  Could I get some help?  Thanks.


So here's my issue. I take quite a few pictures of my screen with my phone (Nexus 5). And I'm on an iMac. So here's what it looks like when I take a picture of my screen.    As you can see there's a rainbow looking effect on the left side. And overall the picture looks distorted. Here's my question. Is there a reason why this is happening? And how can I prevent it? I'm sorry if this has been answered else where, I just don't know what to search for. Thanks in advance.

I have seen many bad pictures of LCD and CRT screens. How do I get a good picture of an LCD or CRT screen?


I just took windows out of my laptop (Asus Gaming Rog Strix I-7 7th gen, GTX 1050 6GB, 16GB RAM, 1TB HD) and installed Ubuntu from a flash drive, but my Ubuntu is not booting, it stays a long time in the starting screen and then my laptop shuts down. How can I solve this problem?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


How do I create a picking session in python? Say I have a script that does some operations, but its want the user to pick first a source object and then a target? How do I invoke the picking? My guess is bpy.ops.view3d.select(), but I get a context error all the time... What is the secret?

How to add an eyedropper functionality to prop_search in my addon?  col.prop_search(scene, "string_property", context.scene, "objects")   This code will create prop_search just like on the animation below, but without an eyedropper.


I am very new to the latex community (1 week) and writing my thesis with latex.  I am trying to built a table using the following code:  \begin{center} \begin{longtable} [c] { |m{3cm}|m{2cm}|m{2cm}|m{2cm}|m{2cm}|m{2cm}|}         \caption{Rating scale for total growth area \label{GrowTable}}             \hline              \centering Total Growth Area (m$^2$) & \centering 100 or less & \centering 100-115 & \centering 115-130 & \centering 130-145 & \centering 145 or more             \hline             \centering Rating & \centering \cellcolor{red} 1 & \centering \cellcolor{red} 2 & \centering \cellcolor{yellow} 3 & \centering \cellcolor{green} 4 & \centering \cellcolor{green} 5              \hline \end{longtable} \end{center}   It gives me the exact table I want but also provides errors which I do not know how to omit:   Extra alignment tab has been changed to \cr. \centering Extra alignment tab has been changed to \cr. \end Misplaced \noalign. \hline Misplaced \omit. \centering Misplaced \omit. \end   Current version of table that I want and is the output but with errors:

I understand that vertically centering columns can be achieved by using the array package with the m{} column. How do I also specify horizontal alignment?  \documentclass[12pt,letterpaper]{article}  \usepackage{array}  \begin{document} \begin{tabular}{m{5em} m{5em} m{5em}} left & center & right \end{document}


I'm new to photography and I can't get a nice DOF. I read up on all the technicalities that involve  DOF and I still can't get it right.   For example, if you take a picture very close to an object, zoomed out,  and then move further back and zoom in would the pictures show the same DOF given the aperture was adjusted?    With my kit lens (EF-S 18-55mm 1:3.5-5.6 IS) I can't change the aperture below f/5.6 when zoomed in (or f/3.5 when zoomed out) so I cannot create a nice DOF. Also, my kit lens has its sweet spot around f/7.1 and since I want my pictures to be sharp I want to shoot with that aperture.   So my basic questions are:   Do I need a new lens with a maximum wider aperture to achieve the outcome I want?   Does focal length really influence DOF? If so, why can't I change DOF by getting closer to the object? Am I doing something wrong?   I'm interested in street (especailly at night)/landscape and animal photography and my body is a Canon E550D RebelT2i (crop factor 1.6).   Thank you in advance!

I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens?


My question is: What is light, and, more specifically, how does it travel?  I've been contemplating  (which has no real credibility to my knowledge), the Cosmic Matrix Displacement Model. I was intrigued by one certain aspect, discussed starting at 5:53 (the video is linked to that time), which talks about strings in String Theory being 4 dimensional Vortispheres, which are explained in the video.   Basically, my interest in this is that it brought me to question my acceptance of the idea of light just being waves capable of traveling through empty space. I had never thought the phenomenon through any further than that. So the specific piece of my question, "How does light travel?" is inspired by the contemplation of the fact that light (and all energy) must need some sort of structure to travel through.  The concept explained in the video is that Vortispheres statically fill the universe and transfer 100% of their motion energy as they rebound off of each other.     The model asserts that the pre-universe matrix was:    (according to the model) When motion did occur in the space-time quantum vacuum, Vortispheres formed from the matrix substance with the sheer sphere boundary layer between the still matrix and the moving Vortispheres.    The Vortispheres continued to form and expand exponentially out through the new universe and were rebounding off of each other, transferring 100% of their motion energy to the next Vortisphere upon impact with zero friction loss.   According to the model, the minute length of time it takes for a Vortisphere to move across the matrix gap and impact the next Vortisphere establishes the average speed of light at 299,793,458 meters per second.  So anyway the video goes on to explain its explanation of the creation of matter and the workings of gravity, with gravity working in precisely the same way as molecular diffusion. Be that correct or incorrect as it may be, it sparked my curiosity on the subject of how light moves through empty space.    A Programmers's Metaphor  As a programmer, I'd sum up my question as being similar to me just accepting that JavaScript works, without caring about all the complex layers infrastructure programmed at lower levels to make it seem simple. Waves of light being like simple JavaScript and Vortispheres in the video being like complex Assembly code at a lower level. Hopefully this helps clarify what I'm asking somewhat. I'm curious about the infrastructure that acts as a medium for the light waves to work.  Of course, asking these questions may just be a silly task, since when you explain the "Assembly" infrastructure to me, I'll want to about what makes the Assembly work, and so on and so forth forever and ever in an endless chain of curiosity that will go on as long as we continue to ask questions... bleh. Physics...

We say that sound waves need a medium to propagate and we know that light doesn't need such a thing. But is that really how that works? There's no such thing as "nothing" according to Quantum Mechanics, so I'm wondering if light can travel through "perfect vacuum"? A vacuum that there's no field, no lowest energy thing, nothing. Or does it really need something like "aether" to propagate? I'm not talking about "Luminiferous aether" by the way. A kind of aether Einstein thought existed.


Is it common to ask questions in English by means of intonation alone? For instance the following line from a webpage confuses me:   Since Hindi does not have the auxiliary do, learners are prone to asking questions by means of intonation alone: She has a brother?    The obvious way to ask this question is "Does she have a brother?". But to me sentences like "You live here?" or "You went shopping?" sound very natural.

Is asking a question with intonation only grammatically correct? I had a discussion with colleague about the correct formal way to ask a question in English language. The usual, formal way:  "Is that your mug?"  However, someone claimed that  "That is your mug?"  is grammatically correct, despite the fact that it has the form of a statement,  and that intonation alone can be used to indicate the question. So, is the latter grammatically correct in formal language?


Help me please. I allocate memory as follows (T is template type)  T * ptr = reinterpret_cast<T*>(operator new (sizeof(T));   And after that I want to put an element into this memory; Am I write if I do it in this way?   new (p) T(elem);   (elem has type T)  UPD: sorry, it's a mistake that I forget to write operator new

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


I know myarray[1] and myarray["1"] point to the same thing. But even with that knowledge I am still having a bit of trouble.  I have this:  $KEYS = ["1", "2", "3", "4", "5", "6", "7", "8", "9",                 "A", "B", "C", "D", "E", "F", "G", "H", "J",                 "K", "L", "M", "N", "P", "R", "S", "T",                 "U", "V", "W", "X", "Y", "Z"];  $KEYS_LENGTH = count($KEYS);  $KEYS_INVERSE = array(); for ($i = 0; $i < $KEYS_LENGTH; $i++) {     $KEYS_INVERSE[$KEYS[$i]] = $i; }   Then later on I do this:  $str = "A21"; // Some random string built with the letters of $KEYS $len = strlen($str); for($i=0;$i<$len;$i++){     if ($KEYS_INVERSE[$str[$i]] == "undefined") return false; // AN ERROR - This is the problem line     else{         // Carry on happily doing stuff     } }   Everything goes great. When $str[$i] is "A" that is fine. Even when $str[$i] is "2" that is fine. But when $str[$i] is "1" it triggers that 'return false;' believing $KEYS_INVERSE[$str[$i]] == "undefined".  What is going wrong?

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


I want to ping a remote system, and have the date show up in my output, and then feed it along the pipeline to another program.  I used cat in my examples below only to be a simple example.  I can use the -D option of the ping command to include the unix timestamp, and I can use a quick perl command to convert that timestamp into a readable time.  But if I use perl to give me a easy to read time, it is somehow breaking the pipe, and the command I am sending the results to doesn't get anything.  When I use set -x and run the broken command perl seems to run first for some reason, but I don't understand why.  Broken  testip=8.8.8.8 echo trace $testip ping -W 1 -D -i 5 -t 3 -n $testip | perl -p -e 's/^\[([0-9.]+)\]/"[".localtime($1)."]"/e' | cat # No output  # Output with set -x + perl -p -e 's/^\[([0-9.]+)\]/"[".localtime($1)."]"/e' + ping -W 1 -D -i 5 -t 3 -n 8.8.8.8 + cat   But these work?  # working ping piping into cat testip=8.8.8.8 echo trace $testip ping -W 1 -D -i 5 -t 3 -n $testip | cat  # Output PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. [1494968389.152046] From 169.204.238.1 icmp_seq=1 Time to live exceeded [1494968394.156976] From 169.204.238.1 icmp_seq=2 Time to live exceeded  # working ping with perl fixing the time testip=8.8.8.8 echo trace $testip ping -W 1 -D -i 5 -t 3 -n $testip | perl -p -e 's/^\[([0-9.]+)\]/"[".localtime($1)."]"/e'  # Output PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. [Tue May 16 14:02:02 2017] From 169.204.238.1 icmp_seq=1 Time to live exceeded [Tue May 16 14:02:07 2017] From 169.204.238.1 icmp_seq=2 Time to live exceeded

I have a script which calls two commands:  long_running_command | print_progress   The long_running_command prints progress but I'm unhappy with it. I'm using print_progress to make it nicer (namely, I print the progress in a single line).  The problem: Connection a pipe to stdout also activates a 4K buffer, so the nice print program gets nothing ... nothing ... nothing ... a whole lot ... :)  How can I disable the 4K buffer for the long_running_command (no, I do not have the source)?


I have been reading posts in the internet, but it just made me more confused. My conclysions after reading several posts of different websites:   Some say that sushi (the rice) with sashimi (raw fish) should be safe, but the cooked food shouldn't (this fact shocked me a little bit as I would expect the opposite). Others say completely the opposite, as I was expecting. Even like 16h after storing it in the fridge, if it has sashimi (raw fish) it should be thrown (depending on the freshness of the fish. If you ordered it, its impossible to know).    Context:   I went at a friend's place yesterday at about 22:00. We chilled (using this verb in the cooking exchange just sounds weird, sorry) for a few hours and then I went home, not without taking the enormous sushi tray that was leftovers from a few hours before I went there.  Some info:   The sushi tray was on the table, not in the fridge. So my friends probably ate and then went to the living room without putting it inside the fridge. Let's say 5h passed. When I got home, I immediately stored it inside the fridge.  Some sushi has raw fish (sashimi), some has cooked stuff (like japanese omelette) and I think there are some vegetarian or vegan ones.    Picture of the tray:

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I am a noob so this question maybe a crap for you.  As written in title, I want to stop print() from printing space while using ,.  I have code for that :  i = 1 print (i,"2")      Output = 1 2      Expected Output = 12

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I'm new on the topic of finite fields, specifically $GF(2^8)$.  I've come across the information that it's possible to implement multiplication using logarithm and exponential tables. But how are these tables formed exactly? Some answers talk about a generator while others talk about using a primitive polynomial. Are those the same?  What I exactly want to know is how pre-compute the log and exp table using the following primitive polynomial: $$x^8 + x^4 + x^3 + x^2 + 1$$

I would like to know how to find multiplicative inverses in $\mathrm{GF}(2^8)$. I know how to multiply two elements of $\mathrm{GF}(2^8)$ (for example, I know that 0x1b*0xaa equals 0x8c).  I follow , but I still don't understand the process. More specifically: How exactly (step-by-step) are logarithm and antilogarithm tables for AES' finite field formed?


I mostly use stack exchange to ask questions. I always strive to be very specific and to carve out questions that have a specific answer. Why are my questions always downvoted? what am I doing wrong?   It is very personal, but I only ask questions in SO when I've run out of resources.

Today I posted  about a C++ issue I found a bit confusing. Since I am a complete beginner in C++, all I could do was to write a short summary and ask for advice. The question attracted a couple of insightful answers and I was quite happy with those. To my complete surprise, an hour later the question had received 3 downvotes without any comment or suggestion. Since I always put effort into making my posts decently formatted and thorough, it kind of struck a nerve. I was puzzled as to why. I am not a native English speaker so nuances of language usually elude me. Is it the wording? Tone? Formatting? Too RTFM? To quote a comment from :  @Martinho: I missed that OP's passing Buffer the first time. Can't imagine someone managing C strings without any idea how the C string functions work...  Did the question get downvoted because it displayed ignorance? How could I have asked it differently to avoid the downvotes?  Update I just had.. um.. a strange exchange with one of the members from the C++ community. That member posted an answer here attempting to explain the background. However, after realizing the contradiction in hers/his arguments a possibility of an extended chat session, the delete link got clicked. I am not going to reveal the identity but nevertheless will share the discussion. I feel it sheds some light on the issue. Note that the person was apparently not one of the voters. The deleted answer  I think the accepted answer to the original question also answers this question: There are lots of problems with your code. You asked why one piece of code (with several errors) didn't work, when some other code (also with several errors) seemed to work better. In reality the difference was just random, and neither of them really works. It took a lot of effort for someone to put together an answer, and I didn't have the time (being at work), so would just have downvoted if there hadn't been enough downvotes already. Leaving a comment that there were several errors in the functions didn't seem to be constructive either. Guess that those who did downvote might have felt the same.  The comment trail  Okay. Are You saying that the C++ community downvoted it because they had either no time or no motivation to answer it properly? – Saul 19 mins ago No, I'm saying it might have been downvoted because it wasn't seen as a good question. The lack of comments can be because of limited time. It was in my case. – XXX 15 mins ago Note that if you had asked the question right now, I might have answered it. Six hours ago I had to do some payed work. – XXX 8 mins ago Uh.. why would one want to downvote a question when busy but be willing to answer it later? To communicate that "your question is unwelcome at this time, I am doing paid work, come back later"? In such a scenario there is nothing I can do to make it appear as a good question. - Saul 1 mins ago


After I place, for example a new mesh, and do any actions after that it is impossible to recall again the settings in the picture.  I know there is a way but I was not able to find an answer to that. Any ideas? Thank you!

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


I have a parent element with 100vh height, and some content. I want the last element to fill to the bottom of the parent. Can this be achieved with css?

MY TITLE

some text
    my button    my button
fillToBottom

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I would like to buffer a polygon inward by a percentage of its area, using the polygons below as an example.    How could I shrink each polygon inward resulting in a 35% reduction of area? I am using the term "reverse buffer" because I want the newly created polygons to have the same shape as the originals and be centered and within the originals, like the schematic below.    I am on ArcGIS 10.2 and have SA and ET Geotools.

I have a polygon shapefile and need to create new polygons, within the originals, as % of original area.  I used buffer by field (Field= new area as %) but the buffers are created in circles around the polygons.  What am I doing wrong?  I am using ArcGIS Desktop 10.


The standard explicitly states that main has two valid (i.e., guaranteed to work) signatures; namely:  int main(); int main(int, char*[]);   My question is simple, would something like the following be legal?  int main(const unsigned int, const char* const* argv);   My tests say 'yes', but I'm unsure of the answer because am I not overloading main by changing int to unsigned int as well as the non top-level const-ness of argv? If I am, then that's clearly prohibited.  So, are these modifications guaranteed to work on a standards conforming compiler?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I wrote equations and don't understand why some equations are displayed and others not. For example this equation can't be displayed  \begin{quote} \begin{equation} Sim_{Dice}=\frac{2\times a}{c_{1}+c_{2}}  \end{equation} \end{quote}   and this equation is correctly displayed  \begin{quote} \begin{equation} I(X,Y)=\sum\limits_{x,y}P(x,y)\ log \ \frac{P(x,y)}{P(x)P(y)} \end{equation} \end{quote}   they are in the same document.

The following code does not compile:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{align}      \eta_{m} = & \omega_{m1}D_{1} + \omega_{m2}D_{2} + \dots + \omega_{mT}D_{T} \\     \eta_{a} = & \omega_{a1}D_{1} + \omega_{a2}D_{2} + \dots + \omega_{aT}D_{T}  \end{align}  \end{document}   However, if I remove empty lines, it does. (Same with equation environment). Why? Why would it be problematic for a code to allow spaces? Convention?   For reference, the error in TexStudio is quite dramatic, for an apparent trivial issue:  line 7: Paragraph ended before \align was complete. line 7: Missing $ inserted. line 7: Missing \endgroup inserted. line 7: Display math should end with $$. line 8: Misplaced alignment tab character &. & line 8: Missing $ inserted. & \omega line 9: Misplaced alignment tab character &. & line 10: Missing $ inserted. line 11: Misplaced \cr. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Extra }, or forgotten \endgroup. \end{align} line 11: Missing $ inserted. \end{align} line 11: Display math should end with $$. \end{align}   NOTE: I am aware of , , and  question. But none of them explains why empty lines are problematic (besides a trivial and rather tautological answer like "the code does not allow it").


I read a few times that a knot can reduce the strenght of a rope, but I can't understand why this happens. Can someone explain me what happens to a rope tied with a generic knot and stretched? Is there a way to calculate the reduction of resistance from the form of the knot?

Suppose I have two identical ropes, one of which I manually tie some knots in. If I use them to hang clothes, which one is more durable?      Personally I think that rope with knots will be more durable, but I can't come up with a satisfactory reason.


After writing the first draft of my paper, I sent the proof to an expert in my area. He responded my email in a neutral way, something like: I think if your argument is true then it would be nice,... I suggest you may read the paper ... to ...   Now, I would like to acknowledge him in my paper, sth. like: "I would like to thank Professor A for his comments". In my opinion, I should do this to show my gratitude. Besides, this also makes my paper somehow more concrete and professional, I think so.  My question: Do I need to ask Professor A the permission to acknowledge him? Or I just acknowlegde him without asking?  Thanks.

I had the impression that obtaining written permission before including someone in acknowledgements was required. Therefore, I just wrote to someone asking for written permission to include him in the acknowledgements of a paper, and he said he didn't think it was necessary. I don't recall where I got this notion from - perhaps the rules of a specific journal? So, I was wondering if there are any general rules about this or not, or are they perhaps journal specific?


Clicking the "unanswered" button brings up lots of questions that already have answers?

Why does the "Unanswered Questions" tab show questions that have answers?


So in most calculations, I get what I expect:  6.23 + 5.73 = 11.96 6.5 + 52.5 = 59.0   However, I ran into an odd case:  6.41 + 52.47 = 58.879999999999995 // expected 58.88   Is this some odd configuration in my IDE? Or is this expected behavior of those two?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


If we have a simple hydraulic lift with one piston which we push down (piston A), and the other piston (piston B) which is below the first one, why do we neglect the hydrostatic pressure difference in our equations?                                                        Textbooks give the following equation: $$\frac{F_b}{A_b} = \frac{F_a}{A_a}$$  But why shouldn't that be like the following?: $$\frac{F_b}{A_b} = \frac{F_a}{A_a} + \rho g h$$  where h is the height difference between the pistons.  In short, why don't we consider the hydrostatic pressure difference due to the weight of the fluid in the vertical columns of a hydraulic lift and only consider the pressure due to the weights above the pistons?

Consider a hydraulic jack with massless pistons as follows.    The famous equation for this system is   $$ \frac{F_1}{A_1}=\frac{F_2}{A_2} $$  My question is why isn't the equation as follows?  $$ \frac{F_1}{A_1}=\frac{F_2}{A_2} + \rho g h $$  It is based on  my understanding that any points in the same horizontal line have the same pressure.  Could you spot my misconception?


I am from North India. I am thinking of going to Bengaluru via flight but I only have scanned copy of my pan card in my phone. Is it possible for me to travel without Aadar?

Is post office ID card accepted as ID proof for flight to travel withinin India? What else other than PAN card, driving license is accepted as ID? Where do I need to show it?


I have a vector of numbers (both positive and negative). How can I normalize it so the values of the normalized vector will be between 0 and 1?

I am lost in normalizing, could anyone guide me please.  I have a minimum and maximum values, say -23.89 and 7.54990767, respectively.  If I get a value of 5.6878 how can I scale this value on a scale of 0 to 1.


The work done in thermodynamic process is given by the integral of Pdv and also we can write so assuming a quasi static process between two points. But this work is then non dissipative work or work done by conservative force field , then how can it be path dependent ?

The potential of a conservative force is equal to the reversible work done on or by a system. But since the potential of a conservative force is represented by a point function, this would seem to imply that reversible work is a state or point function.  But, in thermodynamics, doesn't the reversible work between two states depend also on the path (as well as the end states)? Confused!!  Thanks for any help!!  Auburn


What is the relationship between power and energy?  Of course, this is a very basic and fundamental question, but it's one that many people learning physics struggle with. I'm asking this to have a canonical answer to refer to within the site to refer to when answering other questions.  Previous questions on the topic either refer to specific scenarios (like ) or failed to get a general answer (like ).   I'd prefer an answer that can be understood by a high school student without knowing calculus, rather than just a formula as in , although it's also good to include the integral or differential formulas.  Edit: The system has forced me to edit to explain why the previous question doesn't meet my needs, but I've already explained above why the proposed duplicate doesn't serve as a useful reference for answering this question.

If I have an expression for the 'rated generator power' of a wind turbine, call it $P(t)$ how is the energy, that the wind turbine generator generate, related to the power $P(t)$?  So: $$E(t)=\dots$$


When I am trying to plot the function x^0.5 / ( x^0.5 + 10^0.5 ), the plot will only start at x=1 but not at x=0. See the following MWE:  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}   \begin{axis}[     axis x line=bottom,     axis y line=left,     ytick={0,0.5,1},     xmin=0, xmax=10, ymin=0, ymax=1   ]      \addplot[mark=no,black,very thick,domain=0:20]{x^0.5/(x^0.5+10^0.5)};     \addlegendentry{}   \end{axis} \end{tikzpicture} \end{document}     Modification  If I use the same code but plot only the function x/(x+10) everything works fine.  I tried to play around a bit with the domain property and if I set it for example to 0.0001 the plot starts in the origin. However, the function has a messed up shape between x=0 and x=1.  \addplot[mark=no,black,very thick,domain=0.0001:20]{x^0.5/(x^0.5+10^0.5)};     Question     How do I get the function properly plotted in the range x=0 and x=1?

In the following example, you will see that the sample at (0,0) is not drawn using x^(0.5) (blue), with sqrt it is (green). How can you explain that?  \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}     \begin{axis}[samples at={0,0.02,...,1.5,2}]        \addplot[green,thick]{sqrt(x)};        \addplot[blue,thick]{(x)^(0.5)};     \end{axis} \end{tikzpicture} \end{document}


Macbook Pro / Sierra /Model 1502   My Touchpad stopped clicking. I could move the pointer around but couldn't click. Then I plugged in an external mouse. Still couldn't click but the right click worked somehow on the external mouse. After a lot of struggling I managed to disable the Touchpad by using this command  sudo kextunload /System/Library/Extensions/AppleUSBMultitouch.kext . Then the external mouse started to work normally. But now the keyboard started to act strange. Some letters don't work, some do work but very slowly. Then I connected an external keyboard and it works fine.   Now I am using external keyboad/mouse and have the Touchpad disabled.  Can someone help me to make the original keyboard/touchpad work again. What is the root cause of this weird behaviour.  p.s. I have tried all kinds of reboots.   * Command+Option+P+R   * Option+Control+Shift

I have a Macbook Pro (Retina, Late 2012) running OS X El Capitan (10.11.13).  What works:   Secondary click with two fingers Feel/sound of trackpad click (no noticeable change in the feel of the trackpad) Three/four-finger swipes/gestures   What doesn’t work:   Primary (i.e. left) click One finger tapping to click   What I’ve tried:   Toggling System Preferences Trackpad settings   Rebooting   Toggling Bluetooth even though it’s normally off and I don’t own a bluetooth mouse () Using a USB mechanical mouse (right click worked, left click didn’t) Switching the Primary mouse button with the USB mechanical mouse connected (Secondary click on the left button worked, Primary click on the right button didn’t) Reset SMC and PRAM () Apple Hardware Test (No results found, could not click “Perform extended testing”) Booting in Safe Mode Checking Battery Health ("Condition: Normal” according to System Report; some people have had trouble with their battery bulging) Laying my Macbook Pro on its side and tapping underneath the trackpad area ()   I’m confused.    I’ve used the Accessibility Options Shortcut (Fn-⌘-⌥-F5) to turn on mouse keys, which I’ve been using for the past week. As fun as it is to toggle mouse keys on and off, I’d really like to get the clicking working. Please help. I will be happy if this has a stupid easy answer.


Strange graphics surrounding right click anywhere i click in the gui. This problem goes off when i log out and back in! But every alternate time this happens, only solution being i log out back and in!  This is very strange problem, help would be appreciated!

NB: Nvidia has released an official fix; please see ,  and/or .  Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:      This is currently known to affect the following NVIDIA cards running the proprietary drivers:  NVIDIA GeForce 610M, driver version 375.39, 340.102 NVIDIA GT 630M, driver version 375.39 NVIDIA GTX 650, driver version 375.39 NVIDIA GT 740M, driver version 378.13 NVIDIA GTX 745, unknown driver version NVIDIA GTX 850M, driver version 375.39, 378.13 NVIDIA GT 940M, driver version 375.39 NVIDIA GTX 950M, unknown driver version NVIDIA GTX 960M, driver version 378.13 NVIDIA GTX 970, driver version 375.39 NVIDIA GTX 970M, driver version 375.39 NVIDIA GTX 980 TI, unknown driver version NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09 NVIDIA GTX 1070, driver version 378.09  The above above list has been sourced from reports from other users here on AU,  thread, and  thread. NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.  Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.  What is going on, and how can it be resolved?


Find all $m \in \mathbb{Z}$, for which the expression $7^m - 3^m$ a prime. What would be the general strategy for solving this? I have no clue where to begin. I tried picking $m$ and checking some values but I don't see any relation between them. This question can be solved using modular arithmetic as well but im not sure how. What I do know is that $7^m - 3^m > 1$.

The question given to me is:     Show that $\large\frac{(3^{77}-1)}{2}$ is odd and composite.   We can show that $\forall n\in\mathbb{N}$:  $$3^{n}\equiv\left\{    \begin{array}{l l}     1 & \quad \text{if $n\equiv0\pmod{2}$ }\\     3 & \quad \text{if $n\equiv1\pmod{2}$}\\   \end{array} \right\} \pmod{4}$$  Therefore, we can show that $3^{77}\equiv3\pmod{4}$. Thus, we can determine that $(3^{77}-1)\equiv2\pmod{4}$. Thus, we can show that $\frac{(3^{77}-1)}{2}$ is odd as:  $$\frac{(3^{77}-1)}{2}\equiv\pm1\pmod{4}$$  However, I am unsure how to show that this number is composite. The book I am reading simply states two of the factors, $\frac{(3^{11}-1)}{2}$ and $\frac{(3^{7}-1)}{2}$, but I do not know how the authors discovered these factors.   I'd appreciate any help pointing me in the right direction, thanks.


I'd like to attach a light to a specific object. I used "ctrl j" but it's not permanent. For example a car or street light that I can move around the scene etc. I change my mind a lot.

I'm looking for a way to have two separate objects be connected, so that when I move the first object the second one will move also. The term parent is used, but how do I parent a object?


Suppose i have  $$2x+8=3$$  I believe the first think that comes out from your mind is adding $(-3)$ on both sides.  Suppose we don't know about cancellation law. How do you prove that when we adding the same number on both side won't change the equality?

I understand that the expressions on both sides of an equal sign are the same entity, and I know that when you modify one side, the other must be changed because it is referring to the same thing. What I do not understand is why making a new equation (adding or taking away from an expression) allows one to know what an unknown represents. What about equations lets us do this?


I am trying to style my webform checkboxes and radio buttons differently. For this reason I want to insert span element in to the label and use it instead of original checkboxes.   Found this module :  , but non of the listed options appear in my webform field settings.  Does any body know good solution to accomplish this ?

I would like to know how to theme Drupal 7  elements? I want to change the HTML structure of every element, not just wrap form with div or something like that. And I want to leave theme's elements as they were.  EDIT: I would like to add class to label and input type radio button.


I have come across many sentences involving phrases like "litte to bad", "little too comfortable", "I am little too busy". What exactly does it mean ?

Does the phrase 'little too' mean same as 'very', or is it mild form of very ? For instance, I am little too comfortable talking to you. Does it mean same as 'I am very comfortable talking to you' ?


I am trying to upgrade from Ubuntu 18.04.5 LTS to 20.04 LTS. I know that it is only possible to upgrade from a LTS (18.04) version to (20.04), but should 18.04.5 be considered as 18.04 ? Or do I need to reinstall? I've tried the GUI way with "Software update" which doesn't find any updates and as well these commands; apt-get update apt-get upgrade apt-get dist-upgrade do-release-upgrade  which gives me There is no development version of an LTS available. To upgrade to the latest non-LTS develoment release  set Prompt=normal in /etc/update-manager/release-upgrades.

I understand that the first point release of Ubuntu 18.04, namely 18.04.1 is now available and that my system should now offer it as an update.  My current OS version is 16.04.5 LTS. In System Settings/Software and Updates I have set 'Notify me of a new Ubuntu version' to 'For long term support versions'. I have tried both the main server and the server for United Kingdom, neither offers an update when Software Updater is clicked or via the Ubuntu Software icon.  Can anyone please tell me why I don't get the option of updating to 18.04?  Edit:  I don't remember the details exactly, but I think that my last LTS point release update was offered automatically a lot sooner after the published release date than where we are now with 18.04.1.  Edit 10th August  It appears that there has been some problem with the update process and that it should be fixed next week, see:    Edit 14th August 18.04.1 LTS now available from UK server,


I'm building a wireless photoframe. The one thing I haven't been able to figure out is how to get my wifi connection back up using a recommended method.  Right now I edited /etc/network/interfaces so wlan0 is started at boot:  auto wlan0 iface wlan0 inet dhcp         wireless-essid ourssid   This method works fine for booting. But I found that if I do not check the connection for a long time (could be a week) it might be down. So I should reconnect.  What I do now to verify the connection is working is downloading a file from the server that can't be cached (http://server.ext/ping.php?randomize=123456) If I fail to retrieve the file I assume that the connection is no longer working and I run a shell script like  #!/bin/bash ifconfig wlan0 up iwconfig wlan0 essid "ourssid" dhclient wlan0   And the connection comes back. But I can't find anything if this is in any way a good method.  Can this be improved upon, or is this already right?

The wireless connection in my house unfortunately often disappears, requiring a wireless router reboot.  Making this worse is that my ubuntu media pc, does not automatically reconnect to the wireless network when it's been gone, and then comes up about a minute later. The network in question is setup as "connect automatically" in the network settings.  If I manually select my wireless network, using the wireless icon in the topright of my screen, everything works fine, until the next time that wireless goes down.  I'm looking for a way so I don't have to remember to do this manually all the time.


First off, I'm kind of out of my element when it comes to formulas and figuring out how to come up with a formula for what I need. If you need any other information, let me know and I'll add it.  Scenario:  I need to determine the opacity percentage of these elements that I'm plotting on a map. Now, my scale of 0-100 is really 0.05-0.85. It's relative to the number of days since an event has happened. Meaning, if an event happened 0 days ago, the opacity should be 0.05, and if an event happened 365 days ago, the opacity should be 0.85. How do I form a formula to get the values in between?

I have three datasets as follows:   Dataset A can have a maximum score of 30. (Individual scores can be from 1 to 30) Dataset B can have a maximum score of 45. (Individual scores can be from 1 to 45) Dataset C can have a maximum score of 25. (Individual scores can be from 1 to 25)   The three datasets contribute equally to a final score, hence it is 33.33% each. i.e. (33.33% for dataset A + 33.33% for dataset B + 33.33% for dataset C) = 100% (final score)  I have the following scores in each dataset:   Dataset A: 22 Dataset B: 15 Dataset C: 10   Is there a quick formula that I can use to work out the final score, based on the above datapoints?   (This is not a homework question.)


I am always confused when I get an email stating "out of office until Thursday". Is the sender back on Thursday or still out of office (o.o.o.) on Thursday and only back on Friday? Is there a good reference that defines the meaning? Please do not tell me that it would be better to state "back on Thursday", since this does not answer the question.

What does until mean in the following?     You need to deliver this product within 2 days (until August 18, 2011)   to meet your deadline and get paid.   Does this mean that I have to deliver the product by 23:59 on 17 August 2011 or 23:59 on 18 August 2011? The order time is 21:04 on August 16 2011.


I played my first public 5e Adventurers League session. I got gold now and I want to buy helpful items and tools: mainly things like a component pouch, bull’s-eye lantern, candles, caltrops, etc. Also possibly a mount and saddlebags for extra weight as I'm trying to honor all the rules for AL.     I know you can't buy magical or homebrew items. How does gold spending work with modular campaigns and normal adventuring gear?

When playing in D&D Adventurers League, are players allowed to buy mundane gear out of the PHB between sessions or does this have to happen in front of a DM?  I have read that mundane gear not marked as treasure on an adventure is not able to be kept after the session. Is there anything to let future DMs know my character bought those caltrops and did not illegally salvage them from a dungeon?


The string could be as following line by line every time.  code=876 and town=87 and geocode in(1,2,3) code=876 and town=878 and geocode in(1,2,3) code=876 and town="878" and geocode in(1,2,3) code=876 and town=8,43 and geocode in(1,2,3) code=876 and town='8,43' and geocode in(1,2,3) code=876 and town=-1 and geocode in(1,2,3) code=876 and town=N/A and geocode in(1,2,3)   The result should be with preg_match  town=87 town=878 town="878" town=8,43 town='8,43' town=-1 town=N/A   Note: I know there are various ways to achieve this task but I want to regex only. Thanks

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I hope this question is not a duplicate; I have seen people observing this same warning, but in a totally different context, like  and .  The difference is I do not use hyperref for anything, but this problem shows when I attempt to have notes included in my Beamer presentation.  Notably, this warning didn't show with texlive 2013, I am experiencing it with texlive 2015, as I just upgraded to it.  The warning is the following:     destination with the same identifier (name{Navigation2}) has been already used, duplicate ignored   And here a super simple MWE to reproduce it:  \documentclass{beamer} \mode<presentation> {     \usepackage{pgfpages}     \setbeameroption{show notes on second screen=right} }  \begin{document}  \begin{frame} \frametitle{Frame with notes 1} FIRST FRAME CONTENTS \note{     Notes for the first frame here } \end{frame}  \begin{frame} \frametitle{Frame with notes 2} SECOND FRAME CONTENTS \note{     Notes for the second frame here } \end{frame}  \end{document}   Has anybody observed this warning in the context of a Beamer presentation when hyperref is not used, but notes need to be shown? Does anybody know how to get rid of it? It appears once per slide, so it is really annoying to see soooo many warnings... Thanks!

I am refloating a long-standing Beamer problem and will put a good bounty to it, to see if we can all solve this problem once and for all...  I am following on a previous question I posted , and an  that never got a proper answer, and adding some more information and problems detected just recently.  The problems are related to the navigation links in Beamer presentations WITH NOTES.   If you try to show your notes on the left, navigation links on the top of slides just plain do not work. If you do like I did and switch notes to the right, the links on top work.   BUT STILL WE RUN INTO THE FOLLOWING PROBLEMS:   Links in the table of contents do not work at all. You get infinite amounts of the following warnings (one per slide):      destination with the same identifier * has been already used, duplicate ignored   I think this is a really big problem with Beamer, I do not know if it is a bug or it can be solved somehow...  Turning off the links is not an option; though we will remove the warnings, the main reason why some of us use Beamer is for the awesome navigation that takes us quickly to a slide in a big presentation during the questions round.  It would be of great advantage if the navigation feature could be used together with the ability to add notes next to the slides... In fact, I do not understand why this is not possible.  I gave up trying to add the notes on the left, so let's try to make everything work at least with the notes on the right...  With notes on the right, navigation links on top of slides work, but we still need to make navigation in table of contents work too, and get rid of those terribly annoying warnings.  This is a MWE to start playing with:  \documentclass{beamer} \usepackage{pgfpages} \setbeameroption{show notes on second screen=right}%better notes on right  \mode<presentation> {     \usetheme{Singapore} } \begin{document}   \begin{frame}[plain]     \titlepage   \note{     Notes for the title page } \end{frame}   \section*{Outline} \begin{frame}[plain] \frametitle{Outline}     \tableofcontents  \note{     Notes for the table of contents } \end{frame}   \section{Frame 1} \begin{frame} \frametitle{Frame with notes 1}     FIRST FRAME CONTENTS  \note{     Notes for the first frame } \end{frame}   \section{Frame 2} \begin{frame} \frametitle{Frame with notes 2}     SECOND FRAME CONTENTS \note{     Notes for the second frame } \end{frame}   \section{Frame 3} \begin{frame}     \frametitle{Frame with notes 3}     SECOND FRAME CONTENTS     \note{         Notes for the third frame     } \end{frame}   \end{document}   EXTRA BONUS POINTS IF YOU ARE ABLE TO MAKE NAVIGATION WORK IN HANDOUT FORMAT TOO, WHERE NAVIGATION DOES NOT WORK AT ALL! Just use:   \documentclass[handout]{beamer}  \usepackage{pgfpages}  \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]  \setbeameroption{show notes}


I can't understand how come Naruto's surname was chosen to be Uzumaki, because, if they were to hide Naruto's relation to Minato, they couldn't choose Minato's wife surname, for she was the only Uzumaki left in the Leaf village. So, Hiruzen had to give a plausible justification for why Naruto's surname would be Uzumaki, once he was supposed to be just an ordinary kid. So, what do you think of the theory of Naruto's surname Uzumaki being chosen by Hiruzen on the grounds of honoring the Uzumaki clan? After all, they had lost their last member, Kushina (at least in the Leaf village), and they were very close to the village. This way, Hiruzen would hide Naruto's relation to Minato, by not giving him the Namikaze surname, and would hide Naruto's relation to Kushina (and, hence, to Minato), because ordinary people would think Naruto was a random orphan who wasn't actually a member of the Uzumaki clan, for his surname would be just symbolic (for them). But, in the other hand, Hiruzen would successfully preserve Naruto's surname (Uzumaki) for when the time he would find out the truth arrived.

Is there any logical and canonical reason to why Naruto used his mother's family name, Uzumaki, instead of his father's family name?


I use a laptop with Italian keyboard, but I need the tilde ~ and the backtick ` characters, which my keyboard is not endowed with.  I got to know AutoHotKeys and it seems to fit. But I could not find a map to script. E.g., what are the key codes relative to the AltGr.  Briefly, I want to do the following:  AltGr + ' = `  AltGr + ì = ~

Here is what the layout of an Italian keyboard looks like:  As you can see, the curly braces, which are absolutely necessary to write code in any of C, C++, JavaScript, Java, Objective-C, and others, appear in purple in this picture. This is because while the other characters can be seen visually as printed characters on most Italian keyboards, these purple characters are actually usually not printed on the keyboard's keys. These characters, found in the upper right corners of the given keys, can usually be generated with the following key combinations: (RIGHT SHIFT or LEFT SHIFT) + (RIGHT CTRL or LEFT CTRL) + (Alt or AltGR) + ([ or ]) (Actually as the MSKLC application shows, SHIFT + AltGr + [ and SHIFT + AltGr + ] are enough to generate the curly braces.) Characters such as the at (@) sign (called 'chiocciola' in Italian) and the hash (#) key (called 'cancelletto' in Italian) found in the lower right hand corner of the keyboard can be generated easily as follows (AltGr + @) or (AltGr + #). Such characters are also fundamental to programming as they can, for instance, be found in CSS, namely with media queries and with selectors referring to the id html attribute. Upon further inspection, we can see that all of the US ASCII keyboard / programmer's keyboard are covered by the keys of the Italian keyboard, except for the following, which are the tilde, which is especially useful on the Linux command line and is used to refer to a user's home directory on such system, as well as the back-tick (`), also known as the back-quote, which is also very useful on the Linux shell when we want to turn the output of a command into a command-line input. So, here comes the question: With all those empty upper-right hand corners of keys, why isn't there a better way of generating these characters, perhaps through a CTRL-ALT-SHIFT modifier key combination? All I've been able to find regarding generation of these characters are the following ALT-codes:  ALT code 96  corresponds to ` ALT code 123 corresponds to { ALT code 125 corresponds to } ALT code 126 corresponds to ~  and to generate a character via an ALT code, you make sure that the NumLock key on your keypad is toggled on, hold down the ALT key, enter the keycode, and release the ALT key. ALT code are documented at:  If someone knows of a better way of inserting these characters from an Italian keyboard without switching the keyboard layout in the Control Panel, then please let me know. Thanks.


Prove / disprove: if $f(n)=O(g(n))$ then $2^{f(n)}=O (2^{g(n)})$   This is related to:   But I don't see how the answer there is right (I commented on that there) and I have a question about a different approach.  Can we use that since $2^x$ is a continuous positive function then it keeps signs of inequalities? i.e $a<b$ then $2^a<2^b$?

Suppose that both f(n) and g(n) are non-negative functions. If $f(n)=O(g(n))$, is  $2^{f(n)}=O(2^{(g(n)})$ true too? If not, give counter examples.  I am unsure of how to proceed. What I have in mind at the moment is that since f(n) and g(n) are non-negative functions, making them functions exponents to 2 (as the base) would not change their characteristics. I would appreciate help in understanding this problem and proving it.


Theorem: Let $w, z \in \mathbb{C}$ such that $\bar{z}w \neq 1$. Then $$ |z| < 1 \land |w| < 1 \Rightarrow \left| \frac{w-z}{1-\bar{w}z}\right| < 1$$  I tried to make $w = u +iv, z = x + iy$ and expand, but that did not give me useful results. How to prove it?

This is the question I'm stumbling with:   When $|\alpha| < 1$ and $|\beta| < 1$, show that:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$$    The chapter that contains this question contains (among others) the triangle inequalities:   $$\left||z_1| - |z_2|\right| \le |z_1 + z_2| \le |z_1| + |z_2| $$  I've tried to use the triangle inequalities to increase the dividend and/or decrease the divisor:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < \cfrac{|\alpha| +|\beta|}{\left|1-|\bar{\alpha}\beta|\right|}$$  But it's not clear if or why that would be smaller than one.  I've also tried to multiply the equation by the conjugated divisor $\cfrac{1-\alpha\bar{\beta}}{1-\alpha\bar{\beta}}$, which gives a real divisor, but the equation does not appear solvable.  Any hint would be much appreciated.


In last time there is a lot of questions how to find $\theta$ and $\phi$ for particular state on Bloch sphere. I think that it would be useful to solve one example to stop stream of very similar questions.  So my question is how to find $\theta$ and $\phi$ on Bloch sphere? Please demonstrate calculation on this quantum state: $$ \left| \varphi \right>=\frac{1+i}{\sqrt{3}} \left| 0 \right> + {\sqrt{\frac{1}{3}}} \left| 1\right> $$  Note to moderators and other users: please do not mark this question as duplicity but rather use it for closing similar questions on Bloch sphere coordinates calculation. It seems that explanation on particular example is asked rather than theoretical method how to solve such problems.

If I have the following state:  $$ \left| \varphi \right>=\frac{1}{\sqrt{2}}\left(\left(\frac{1+i}{\sqrt{2}} \right)\left| 0 \right> + \left| 1\right>\right) $$  How can I find the $\theta$ and $\phi$ values of this qubit on the Bloch sphere?


Let $R$ be a commutative ring, and let $\{f_i\}$ be a finite set of elements generating the unit ideal in R. Then $\{f_i^N\}$ also generate the unit ideal in $R$, for any positive $N$.  Why is this true?

Let $A$ be a commutative ring with $1$. Let $f_1,\dots,f_r$ be elements of $A$. Suppose $A = (f_1,\dots,f_r)$. Let $n > 1$ be an integer. Can we prove that $A = (f_1^n,\dots,f_r^n)$ without using axiom of choice?  EDIT It is easy to prove $A = (f_1^n,\dots,f_r^n)$ if we use axiom of choice. Suppose $A≠(f_1^n,…,f_r^n)$. By Zorn's lemma(which is equivalent to axiom of choice), there exists a prime ideal $P$ such that $(f_1^n,…,f_r^n) \subset P$. Since $f_i^n \in P$, $f_i \in P$ for all $i$. Hence $A = (f_1, \dots,f_n) \subset P$. This is a contradiction.


So, somewhere in the 11th hour of my procrastination session on SE, I came across a profile that, in the info/name box, reads "Busty Babe" in Chinese, according to Google translate.  Inside the box is a very large photo of a Playboy (hardcover?) magazine on a desk, situated beside a bottle of some super manly adult drink and of course a very manly cigar. All very manly.  When I thought, "har har, time to flag", I found no such thing. Especially given that the profile changes are applied network-wide, is/should there be an easier way to flag than to go to a specific site, flag one of the user's questions or answers, click "other" and explain it to a mod? Or is there a flag, and I just missed it?  Oh and of course, here is . Appears this might be "payback" for what must be the longest account suspension I've ever seen or heard of.

I don't think anyone wants to be the thought police, and I'm particularly wary of censorship on a part of the site that is a user's personal self-statement, and is a little off the beaten path.  On the other hand, I'm also concerned that we may not want a site where clicking on a user to see their other posts would expose folks to racist or other bigoted terms that almost everyone would agree are inappropriate for civil discourse.    Don't forget the "be nice" rule".  Note that I don't want a "flag user" rule, which I know has been beaten to death already, and further think that swears and semi-inflammatory opinions, etc. should generally just be ignored - I'm only asking about terms that provoke serious emotions around racial, religious, ethnic, or sexual orientation issues.  What, if anything, is the appropriate response in such cases?


[enter image description here][1]  $$\sum_{k=1}^{\infty} k[(1-p)^k +p^k(1 -p)] =(1-p)p \sum_{k=1}^{\infty} [k(1-p)^{k-1} +\sum_{k=1}^{\infty} kp^{k-1}]$$  $$=(1-p)p + [\frac{1}{p^2} +\frac{1}{(1-p)^2}] =\frac{1-2p+2p^2}{p(1-p)}$$   Can someone please let me know how the 2 summed series simplified to $\frac{1}{p^2}$ and $\frac{1}{p-1}^2$   I suspect it to be a geometric series and I seem to have $\frac{1}{p}-\frac{1}{1-p}$

Find a closed formula for $\sum_{n=1}^\infty nx^{n-1}$  I am trying to use the derivative of generalized binomial theorem, $\frac{d}{dx}[(x+1)^r=\sum_{n=0}^\infty \binom{r}{n}x^n] =r(x+1)^{r-1}=\sum_{n=1}^\infty \binom{r}{n}nx^{n-1}$  However, I am not sure how to "get rid" of the binomial term.


I want to download XML file from some URL and use it like input for my XMLPullParser.  So I wrote AsyncTask for downloading XML and call it in my code, but I have got NullPointerException:  java.lang.RuntimeException: Unable to start activity java.lang.NullPointerException: Attempt to invoke interface method 'void org.xmlpull.v1.XmlPullParser.setInput(java.io.InputStream, java.lang.String)' on a null object reference  Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void org.xmlpull.v1.XmlPullParser.setInput(java.io.InputStream, java.lang.String)' on a null object reference   Here starts my Activity and AsynTask:  public class Parsing extends AppCompatActivity {     private final static String url = "http://validURL";     InputStream parserInput;     XmlPullParser parser;      protected void onCreate(Bundle savedInstanceState) { ...         try {             parserInput = new GetXML(this).execute(url).get();             parser.setInput(parserInput,null);         } catch (ExecutionException e) {             e.printStackTrace();         } catch (InterruptedException e) {             e.printStackTrace();         } catch (XmlPullParserException e) {             e.printStackTrace();         } ... }     class GetXML extends AsyncTask<String, Void, InputStream> {         private Parsing activity;         private String url;         private ProgressDialog pDialog;          public GetXML(Parsing activity/*, String url*/) {             this.activity = activity; //            this.url = url;         }          @Override         protected void onPreExecute() {             super.onPreExecute();             pDialog = new ProgressDialog(activity);             pDialog.setTitle("Getting XML");             pDialog.setMessage("Loading...");             pDialog.show();         }          @Override         protected InputStream doInBackground(String... params) {             try {                 URL url = new URL(this.url);                 HttpURLConnection connection = (HttpURLConnection) url.openConnection();                 connection.setReadTimeout(10000 /* milliseconds */);                 connection.setConnectTimeout(15000 /* milliseconds */);                 connection.setRequestMethod("GET");                 connection.setDoInput(true);                 connection.connect();                 InputStream stream = connection.getInputStream();                  stream.close();                 return stream;              } catch (Exception e) {                 e.printStackTrace();                 Log.e("AsyncTask", "exception");                 return null;             }         }          @Override         protected void onPostExecute(InputStream result) {             pDialog.dismiss();         }     }   }   What is wrong in my code?  Why I am getting NullPointer exception instead of loading xml and setting it like input data for XMLPullParser?  UPD:  XML is big - about 6-8Mb.  So according to:   I should use ... = null; where I have not initialize object? Or I shouldn't use it?  UPD 2:  after initializing InputStream parserInput = null; I am getting the same error.

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


I've learned to use the find command by itself to find files and directories however when it comes to doing something with the files/folders I'm confused.  Given the following command:  find . -type f -iname "*.cr2"    If I want to copy those files found above to a new directory I would naturally think use copy (cp) and pipe |.  find . -type f -iname "*.cr2" | cp \destination_directory   And to me this would get all my photos across an entire drive and nested in levels of sub folders into a single folder ready to start organising.  However people keep telling me to use the -exec parameter, so my question is how do you know when to pipe | and when to use -exec command as below?   find . -name "*.pdf" -type f -exec cp {} ./pdfsfolder \;   EDIT  The suggested solution (below) only copies files where the file names are unique. and it says cp will not copy file.txt and replace with file.txt. In the instance you copy a lot of files, and don't know if there will be files of the same name, how do you copy something and say rename it if the filename exists?   Suggested solution   find . -type f -iname "*.txt" -print0 | xargs -0 cp -t /home/josh/Documents/copy/   /home/josh/documents/copy being the directory I want to move stuff to.

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?


My paper is in the late stage of peer-review and probably will be accepted once I complete the last minor revisions, but it is not formally accepted yet. During peer-review the manuscript changed quite a lot because of the helpful comments by the reviewers.  The journal is not open access and therefore I want to upload the manuscript to a public repository like arxiv to make it more accessible. The last version of my manuscript that I plan to upload is probably close to the final published version once it is accepted.  The publisher of the journal is Wiley-Blackwell, according to the sherpa/romeo database it is in the yellow category:   They allow pre-prints, but it says 'pre-refereeing', so I am not completely sure if it is allowed to upload a pre-print at this stage.

This is related to but not answered in .  After an author has submitted a manuscript to a journal for peer-review, very often the journal asks the author to revise (and resubmit) the manuscript as a precondition for its publication. I am wondering whether the term preprint refers to the manuscript before or after its authors made these revisions.  If a preprint includes revisions made in response to peer review, then there is only a slight difference, mostly regarding layout and style, between the preprint and the article that is published in the journal. From a reader’s perspective, there would be no point in paying for access to the article, since they can simply download the preprint free of charge. A publisher would probably want to prevent their authors (by publication agreements etc.) from publishing preprints that differ from the respective journal article only in form.  As a side question, what kind of preprints do publishers tolerate, as a rule?


First let me point out that I searched for an answer to the question but I only partial answers, but nothing complete. So if you already know where I can find my answer just point me in the direction and I will remove this thread.  I want to make a document with two columns, with each column separate. In other words, I have two separate columns in which I can type, without text flowing from one column to another. My desire is to use for this is to create sample translation documents with 'Source Language' on the left column and 'Target Language' on the right column. If there was also a way to align the paragraphs with the corresponding translated text, that would be great.  Is there ``proper'' way of achieving this? I looked for a template on Overleaf but found none with the exact specifications that I needed.  Thank you

I want to use the parallel text feature of the  package with requires the  as far as I understand.  I tried the very basic example from the documentation (, page 8) and I get an error message.  Before you want to compile my example make sure that your system is updated. The packages are pretty new.  \documentclass[]{scrbook}  \usepackage[]{reledmac} \usepackage[]{reledpar}  \begin{document}  \begin{pairs}     \begin{Leftside}         Text left.     \end{Leftside}     %     \begin{Rightside}         Text right.     \end{Rightside} \end{pairs} \Columns  \end{document}      ! Package reledpar Error: \Columns called without previous pairs   environment.


For each natural number $n\in\mathbb{N_0}$ list all the sets with at most $n$ elements and with maximal element as and including $n$, in numerical order. Now all the elements of $P(N)$ will be listed as n gets larger. Label each set of natural numbers with another natural number. Why is the above not a 1:1 correlation between N and P(N)? The sequence starts with the empty set, then $\{1\}, \{2\}, \{1,2\}, \{3\}, \{1,3\}, \{2,3\}, \{1,2,3\}, \{4\}, \{1,4\}, \{2,4\}, \{3,4\}, \{1,2,4\}, \{1,3,4\}, \{2,3,4\}, \{1,2,3,4\}$ …

Some explanations:  A set S is  if there exists an injective function $f$ from $S$ to the natural numbers ($f:S \rightarrow \mathbb{N}$).  $\{1,2,3,4\}, \mathbb{N},\mathbb{Z}, \mathbb{Q}$ are all countable.  $\mathbb{R}$ is not countable.  The  $\mathcal P(A) $ is defined as a set of all possible subsets of A, including the empty set and the whole set.  $\mathcal P (\{\})=\{\{\}\}, \mathcal P (\mathcal P(\{\}))=\{\{\}, \{\{\}\}\} $  $\mathcal P(\{1,2\})=\{\{\}, \{1\},\{2\},\{1,2\}\}$  My question is:  Is $\mathcal P(\mathbb{N})$ countable? How would an injective function $f:S \rightarrow \mathbb{N}$ look like?


Is there a proof of the Fundamental Theorem of Arithemetic that does not make use of the Integers or Rational Numbers (as opposed to using only the Natural Numbers)? And if so, what is it?  By the Fundamental Theorem of Arithemetic, I mean that any natural number that is greater than 1 is a product of irreducible natural numbers and that this product is unique up to the order of multiplication.   The part that poses difficulty is proving is that if an irreducible number divides a product of two numbers, then it divides at least one of these numbers, which is used to show the uniqueness. Euclid makes use of rational numbers, and the only other proof that I have seen uses the lemma that if two natural numbers $n$ and $m$ are coprime, then there exists integers $l$ and $k$ such that $ln + km = 1$, which involves Integers rather than just Natural Numbers.

There is an exercise on page 44 of Amann's book Analysis, Vol I which stuck me so much. I quoted it here:   Ex7:  Let $p\in\mathbb{N}$ with $p>1.$ Prove that $p$ is a prime number if and only if, for all $m,n\in\mathbb{N},$ $$p\mid mn\implies p\mid m \quad \text{or} \quad p\mid n.$$   Since this exercise occurs only after the Euclid's Division Algorithm (Page 34, Amann, Analysis Vol 1) and the Fundamental Theorem of Arithmetic (Page 36), I can not use the result of greatest common divisor of $m$ and $n,$ because that concerns  the definition of the negative numbers, which is not coming into being in that section. Therefore, I ask the following question:     Can Euclid's Division Algorithm  and/or Fundamental Theorem of Arithmetic implies Ex7? Or in another word, Can we prove Ex7 by only using Euclid's Division Algorithm and/or Fundamental Theorem of Arithmetic?


Is the second sentence grammatically correct?  "- I want to drive a Ferrari" "- As if you would be able to drive it"  I know the sentence "As if you were able to drive it" is correct, but can I use the other one instead of "As if!", for example?  Thanks

My question concerns the usage of "as if" as an idiomatic interjection. The references I have consulted (etymonline, online dictionaries, etc.) seem to agree that "as if" is used in this context to convey incredulity or doubt. This is how I have always thought of it.  The other day, I was with friends who used "as if" to express their surprise and joy about a wedding proposal. They weren't being sarcastic or incredulous; they were genuinely happy about the proposal. Here is a loosely paraphrased version of what they said:  "As if they're getting married!"  Is my friends' usage of "as if" standard? Is it a primarily regional distinction? (I am in Ontario, Canada right now.) The closest example we could come up with is someone says "I can't believe that you won first prize!" Of course, the person can and does believe it, so their words ought not to be taken literally. Is it the same idea with "as if"?


I just tried to check how memory is allocated to structure objects, its taking more space what i expected. I am using 64 bit windows OS and Microsoft visual studio 2010(i think its 32 bit), so can some explain why is its printing 52 bytes ?  struct test {   int year;// should take 4 byte   string title;// how much bytes would take ? in my case taking 31 bytes ?   double date;//should take 8 byte   int month;// should take 4 byte   } mine;  int main () {  cout << " size is: "<<sizeof(mine);//printing 52 ?  cout << " size is: "<<sizeof(struct test);//printing 52 ?   return 0; }

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I would like to install  which was released today on my macbook pro. However, unfortunately this version of ubuntu does not have and amd64+mac image.  Should I just install the regular amd64 release? Or is there no way to use ubuntu-gnome on mac?  EDIT:  Just installed the amd64.iso image of ubuntu-gnome 13.04 Raring. Works like a charm, it was easy to boot from a USB using rEFIT. Not only that, but all the hardware on my 2013 macbook pro was automatically detected, so I actually had internet during installation.  So it turns out the +mac series are really only needed if you run an older mac that won't be able to boot from the cd/usb install disk otherwise. However, it seems that this is not really needed for most newer macs, especially if you installed rEFIT. You can boot straight into grub-efi even with the regular amd64 iso.  Great release!

I am trying to get it on my mac, so do I download the windows version onto a USB and then upload it from there because I can't find a mac version.


Consider a circuit with a 1 $\Omega$ resistor and a 2 $\Omega$ resistor in parallel. If it takes twice as much energy to send an electron through a 2 $\Omega$ resistor than a 1 $\Omega$ resistor, why do any electrons flow through the 2 $\Omega$ resistor? Wouldn't it be more efficient to send all the electrons through the 1 $\Omega$ resistor?  Current flows through both branches of the parallel circuit, so this logic is obviously flawed, but I don't understand why.

Some sources on the web claim that "electricity follows the path of least resistance" is not true, e.g. . However, in every explanation of "short circuits", the author says that current flows through the short because it's following the path of least resistance. How do I reconcile these two facts?


I dual booted through usb after installation the computer restarted and ended up at busy box. I gave up waiting for root file system. and some other lines and in the end Alert /device/sda7 does not exist. Dropping to shell and if I try to boot Windows it's showing Windows needs repair. Both are installed on one hard drive. So basically I can't access any OS right now. Plz help

Hardware:  I've got an SSD (c),an internal HDD (d), an external HDD (e) and a USB flash drive (f).   How this all went down:   I downloaded Ubuntu and used a program to install it on my (F) drive. I reset my computer, ran the (F) drive for boot, and installed Ubuntu. I reset my computer, and it forcibly automatically booted into Windows 10 instead of Ubuntu. I went into Windows 10, and used a program called Easy BCD, by NeoSmart. I followed their guide, but after step 6, it wasn't the same for me. Their guide said that upon rebooting, I should see a grub screen that lets me choose between Windows/Linux and a few other options, however my computer would only boot into Windows 10.  I decided to follow the rest of the guide regardless, however by the end it would let me boot 'windows' or 'linux', but the linux option would always break. It went to a screen with lots of commands, that I thought -may- be a barebones Linux or something, but it definitely wasn't Ubuntu.  I decided to reinstall Ubuntu using the USB flash drive. Upon resetting, no matter what hard drive or format I select for booting (besides the F drive), it says An operating system wasn't found. Try disconnecting any drives that don't contain an operating system. I can boot the F drive and run Ubuntu, but it's a one time version that doesn't save any of my data. When I went into the installation, it still says that I already have Ubuntu installed on the 4TB HDD and that I have Windows 10 installed on the SSD, however I cannot seem to boot into either of them.   TLDR: Windows 10/Ubuntu are both installed, Windows on the internal SSD and Ubuntu on the external HDD. Ubuntu's installation program on the (F) drive recognizes them, however, when I try to boot anything it says An operating system wasn't found.   When I press F11 and force it to boot from the SSD it says:  error: no such device: 83b6c64d-9a2c0467b-a02c-6374ee6ac3dc.  error: unknown filesystem. Entering rescue mode. . .  grub rescue> _   and it will allow me to type some commands.


I'm playing Tiny Death Star but have all the available levels and nothing new has come up for months. I'm just collecting money and hit the 6 million Mark but I can't spend it on anything. Am I finished? Is it over? Am I the only one with this problem?

I have built 10/10/10/10/24/16 stages and I have no more options to build new ones.  I have a bit more than 2,000,000 cash and under service i can see that there is a stage but it is locked...  Can anyone tell me if there is an option to go on in the game? It is totally boring to collect money build and build and can't get anything more...


I have a grammar which says that "whom" is used when it follow a preposition.  E.g: to whom am I speaking. to whom it may concern.  The grammar also says that "whom" is the object form of "who". E.g. He was a person whom everyone regarded as trustworthy. (Whom is the object in the sentence.) "However, this is now felt to be excessively formal by most speakers and who is commonly used instead." (VINCE, M. and SUNDERLAND, P.,2003).  I'm reading "Inferno" and there is this sentence:  "Nobody had any idea who you were (...)"  Wouldn't that be whom? Is "who" in that sentence an object? You is the subject and who would be the object.

I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly?


Respected members, I live in Vellore, South India were people from at least 4 Indian states live. That means 4 different languages. Almost always, it is English which connects them in a public place like our child health  center. It is common to ask the number of children a mother has, and the birth order of the child brought to our center. Many educated mothers, with English as second language do not understand this term " birth order". They do not answer " what is the  childs birth order?". So I have to reframe it as " this is your first child or second child?".  Is there a alternate term for " birth order" in such situations? thanks in advance

I am the third daughter (or son) of my parents.   OR      How should a question that is answered with the above sentences be framed?


This equation $(x^3+xy^2−y)dx+(y^3+x^2y+x)dy=0 $ is Integration factor found by inspection. The answer on the book is $2\arctan(\frac{y}{x})=c-x^2-y^2$

$(x^3+xy^2-y)dx+(y^3+x^2y+x)dy=0$ I tried to find on Wolfram Alpha but it showed only the solution not in step-by-step, I know that the factor is $\frac{1}{x^2+y^2}$ but how to find it?


I am not an expert of C++ so please, forgive my question. I am trying to create a class with a member that could be of any value.  Something like this:  class Input {  private:     string         name;     AnyValue      value;  }   where AnyValue may be: int, float, string. I came up with this:  .h  template <typename Value> class Input {  private:     string name;     Value  value;  public:      Input<Value>(string name);  }   .cpp   template <typename Value> Input<Value>::Input(string name) {      this->name = name;     this->value = 0; }                               template <typename Value> void Input<Value>::setValue(Value value) {    this->value = value; }  template <typename Value> Value Input<Value>::getValue(void) {     return value; }   main is   int main(int argc, const char * argv[]) {     Input<int> i1 = Input<int>("i1"); }   Problem is that I get this error message from the linker:  Undefined symbols for architecture x86_64: "Input<int>::Input(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:   _main in main.o   but I cannot understand what I am missing.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I keep getting a null object reference with the setter in Android. Here is the trace:  04-04 09:18:15.465 32664-1342/com.example.farhad.rssfeedfyp I/XMLHelper: TAG: rss 04-04 09:18:15.465 32664-1342/com.example.farhad.rssfeedfyp I/XMLHelper: TAG: channel 04-04 09:18:15.465 32664-1342/com.example.farhad.rssfeedfyp I/XMLHelper: TAG: link 04-04 09:18:15.465 32664-1342/com.example.farhad.rssfeedfyp I/XMLHelper: TAG: title 04-04 09:18:15.475 32664-1342/com.example.farhad.rssfeedfyp E/XMLHelper: Exception: Attempt to invoke virtual method 'void com.example.farhad.rssfeedfyp.TPostValue.setTitle(java.lang.String)' on a null object reference  the source code is available on . would really appreciate the help!

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


There's a forum that I like to read because it has a lot of useful technical information on it.  But the site is owned by one person and I'm worried he might retire.  I checked  and it appears that the forum is only partially included.  Is there a way that I can get the entire forum archived without the site owner's assistance (I doubt he'd object but he doesn't seem interested in the effort).

To save a single page via Wayback Machine I can go to:      How can I archive the website recursively by Wayback Machine?    There is some project such as , but I'm looking for a feature which allows me the upload the website recursively.


I have read this  and understand how to tell what package a certain command is in, however I still have a problem, how do I tell what package a program is in if I don't even know how to launch through command-line because I have no idea of its name (which is precisely the problem)?  So, to give an example, I recently wanted to file a bug report against the program known as "Software & Updates" in the GUI, however I had no idea what its name in the command-line was nor what package it was in. I tried running apt-file search "Software & Updates", but the results weren't very useful and I ended up having to ask around and finally found out it was in the software-properties-gtk package. Is there not another more efficient way of finding out what package something is in?    OS Information:  No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid Flavour: GNOME GNOME Version: 3.16

Searching on the dash, I can see the program listed as "Personal File Sharing". How can I find the executable name of this program such that it can be launched in a terminal?


I have a shell script that reads data from a file and stores it into an array. When i execute the script like bash scriptname.sh i dont get any errors  but when i execute it using sh scriptname.sh i get errors like array deceleration not found some syntax errors like parentheses are expected.   why differences are coming between these two approaches??

I've seen the phrase "sh compatible" used usually in reference to shells. I'm not sure if it also applies to the programs that might be run from within shells.  What does it mean for a shell or other program to be "sh compatible"? What would it mean to be "sh incompatible"?  Edit: This question asking the difference between bash and sh is very relevant:   I'd still like a direct answer to what it means to be "sh compatible". A reasonable expectation might be that "sh compatible" means "implements the Shell Command Language" but then why are there so many "sh compatible" shells and why are they different?


I have a following code and in this news_date is of datatype DATE.  <?php       $news_id=$_REQUEST['id'];            $result = mysql_query("select news_title, img_name, news_date, news_desc from news where news_id=".$news_id);         $row=mysql_fetch_array($result);       ?>   .     <div class=news-date>         <?php echo $row['news_date'] ?>     </div>   This gives me date in "YYYY-mm-dd" format.  How can i change it to "mmmm-dd-yyyy" i.e. October 24, 2013 or similar

I have a datetime column in MySQL.   How can I convert it to the display as mm/dd/yy H:M (AM/PM) using PHP?