different between a + 1 + 1 and a + 2 in python

I recently encountered a problem:  a = 0.0001 b1 = a + 1 + 1 b2 = a + 2 b2 = a + 2 c1 = str(int(b1-a)) c2 = str(int(b2-a))   the result:  c1=1, c2=2  why? who can help me?


Technology moves on but this is still a relevant Question How to embed a map into Access Database?

I'm currently trying to build a front end interface for a land-parcel management system in Microsoft Access and in displaying individual parcels with their attribute data - I wanted to display on the form a relative map of the parcel on OpenStreetMap - I've come across the MapWinGIS  which I can use to add an active x controller to the form in Access - I'm missing the bit were I can link a geom point, polygon or line from a table (the table is an external table linked through the PostgreSQL ODBC driver from a PostgreSQL PostGIS enabled database...


Creating polyline-based "heatmap" from GPS tracks?

This winter I am planning to track my downhill skiing/snowboarding using a GPS.  Most of my riding will occur at the same resort.  I would like to be able to create a sort of "heatmap" that shows the amount of runs that I have made in a given area.  As I add more and more GPS traces to my database, my goal would be to see a sort of linear heatmap of the most traveled areas.  Given the nature of downhill skiing, you would expect the uphill chairlift lines will be the "hottest" because it will be the only places visited over-and-over again.  Given that 1) my track will not be the same every time and 2) the area covered by following one "run" may be a few hundred feet wide, what might be the best way to analyze this "linear" data to create a sort of heatmap?  My thoughts were to buffer the lines, then intersect the polys to get a sort of Venn Diagram thing going.  My preference is to use open-source technologies.  I've got QGIS and PostGIS loaded and available.  UPDATE: In regards to @blah238's response, I was thinking of something that might be able to "collect" the number of passes ("runs") through an area, and then symbolize by the count.  Conceptually, this would be similar to ArcGIS "" (but for lines, not points) or  (but for multiple line in roughly the same area).  A more visual example of a similar concept might be a traffic-flow map, where highly-congested areas would equate to "highly-traveled" ski runs/areas:    I've read the following questions that may give some ideas, but they don't really address what I am trying to accomplish:


I don't understand why you have to write the absolute value sign when solving for the square root of $x$ squared.   Shouldn't the answer automatically be positive? Why is the absolute value sign needed?


Multiple spaces in code in comments get merged into one

Code is supposed to be exact and "as-is". Sometimes, showing two spaces is important. In a comment, it is not possible to show code with  multiple   spaces. This became apparent in  (see comments).  EDIT: apparently this bug is larger then I thought: multiple    spaces   here are neither preserved in normal question text. Pity (though I couldn't find this reported before, I'd assume it is).  Workaround: use Alt+0160 (windows), or U+00A0 (Unicode NBSP), as I did in the example above.


Does R have quote-like operators like Perl's qw()?

Anyone know if R has quote-like operators like Perl's qw() for generating character vectors?


How creating function to aplying image to object python

In other answer script not working: (in  answer not working, generate only black image and delete everything) import bpy nazwa_tek="cyfry" plik_tek_gr="//grafiki/gr.png" tek = bpy.data.materials.new(name=nazwa_tek) tek.use_nodes = True bsdf = tek.node_tree.nodes["Principled BSDF"] texImage = tek.node_tree.nodes.new('ShaderNodeTexImage') texImage.image = bpy.data.images.load(plik_tek_gr) #tek.diffuse_color = (1.0, 0.0, 1.0, 0.8) tek.node_tree.links.new(bsdf.inputs['Base Color'], texImage.outputs['Color']) print("tekstura:=", tek)  def DodajTeksture(ob, nazwa="cyfry", plik_gr="//grafiki/gr.png"):     global tek     # Assign it to object     if ob.data.materials:       ob.data.materials[0] = tek     else:       ob.data.materials.append(tek)     return  bpy.data.scenes["Scene"].render.image_settings.file_format = 'JPEG' bpy.data.scenes["Scene"].render.filepath = './' bpy.ops.render.render(animation = False) img = bpy.data.images[0] img.save_render('wynik.jpg') bpy.ops.wm.save_mainfile(filepath='bb.blend')  but how create a image texture? My texture are now procedural and do not have .image value. (I need image texture not procedural) obrazek = bpy.ops.image.open(filepath="//file.png") bpy.data.images["//file.png"].pack(as_png=True)  load image, but how aplying image for object named "Cube"?  How creating procedure in python def appimage(obj, name_image, dx, dy)    #applying image to object name obj staring from (dx,dy) in image    return  create texture, add image to texture (one texture will be assign to some object) specifi region in image for this object. I have big texture for many objects. Only small region is for object. My image have transparent region (it schow diffuse color from bottom?). appimage("Cube", "//file.png", 170, 200)


Closed questions you voted for closure show as deleted in votes section

In my profile's votes tab, under the closure option, I see this:    The closure votes marked with (deleted) actually haven't been deleted. Those are the ones that have been closed.  Doesn't it seem like this isn't right? Or do close votes all the sudden count as delete votes but don't actually delete anything?  It's a bug. It needs to say (closed)


Does the cross-entropy cost make sense in the context of regression?

Does the cross-entropy cost make sense in the context of regression (as opposed to classification)? If so, could you give a toy example through TensorFlow? If not, why not?   I was reading about cross-entropy in  by Michael Nielsen and it seems like something that could naturally be used for regression as well as classification, but I don't understand how you'd apply it efficiently in TensorFlow since the loss functions take logits (which I don't really understand either) and they're listed under classification


A parabola with focus $(-1,-1)$ is tangent to $y=3x-8$ at $(7,13)$. Find the latus rectum.

Let $y=3x-8$ be the equation of tangent at the point $(7,13)$ lying on the parabola whose focus is $(-1,-1)$. Find the length of the latus rectum of the parabola.


When I do a rm * in zsh, I get something like this:  2014-06-08 10:14:23 $ rm * zsh: sure you want to delete all the files in /home/assay/assay/log [yn]? y rm: remove regular file `development.log'? y   First zsh asks me if I am sure I want to delete all, and then rm asks for for each specific file.  How can I just have the zsh verification?


How can I use awk to (sometimes) remove the first character of a column?

I run a command and pipe it through awk as below :  mycommand |  awk '{print $1,tolower($3),$4}  This gives me the following output:  fred.o: t .abcdefg  fred.o: u .rstuvwxy  fred.o: t .defghi  fred.o: t .jklmnop  fred.o: d abcdefg  fred.o: d zyxwvuts    As you can see the sometimes the third column contains a leading "." but not always.  How can I modify my awk command to get rid of the leading "." in the third column if it exists ?  eg I would like my output to look like this :   fred.o: t abcdefg   fred.o: u rstuvwxy   fred.o: t defghi   fred.o: t jklmnop   fred.o: d abcdefg   fred.o: d zyxwvuts


How to report sites/users that are plagiarising SO questions on other forums?

I did a web search for my question and found that my exact SO question was plagiarised in a forum post by someone else. My question was unique and this is clearly a plagiarism of my question.  But then I realized, the user of the other forum is posting lots of SO questions as their own!!!  Is there anything that can be done about this practically?  See here:


I've never seen this before. Our global and site level settings are 'don't allow sharing outside your organization' but today I noticed in the Site Permissions page an entry for Anonymous Users. It is not clickable and each time I check the box, it checks all other boxes. Does it impact our global settings? Or, how do I remove this permission?


Why is a resistor added after the DC blocking capacitor of the op-amp input?

I read somewhere that the addition of R2 provides the DC return to ground however this would reduce the overall input impedance of the op-amp. Input impedance must be high for an op-amp. How to solve this problem?


Isomorphism between the group $(\mathbb Z[x], +)$ and $(\mathbb Q_{>0}, .)$

In one of my assignment, I was told that $(\mathbb Z[x], +)$ and $(\mathbb Q_{>0}, .)$ are isomorphic, with $$\phi (\sum_{k=0}^n a_k x^k) = \prod_{k=0}^n p_k^{a_k}$$ is a one-to-one surjective group homomorphism, where $p_1 = 2$; $p_2 = 3$; $p_3 =5$, and so on.  I know that this proof is based on the decomposition of numbers into a product of primes. But I don't think that it is correct. For instance, for $\frac12 \in \mathbb Q$, I cannot find a corresponding polynomial $f \in \mathbb Z[x]$ such that $\phi(f) = \frac12$.  If this proof is wrong, then are $(\mathbb Z[x], +)$ and $(\mathbb Q_{>0}, \cdot)$ really isomorphic?


Bootstrap: How to do a Confidence interval for the difference of two means? (Different sample distributions)

Can I apply a bootstrap from 2 samples that have different non-parametric distributions to get their mean difference?  Can I do that with 2 group of data, that are non-parametric and have different distribution? Because in the other question, it didn't say if the 2 samples had the same distribution or not.  EDIT:  I'm trying to do it with this code, but my concern is that I don't know if I can do it on this case. (2 non-parametric distribution that are different)  Code:      bt <- function(data1,data2,n){           btr<<- c()     for(i in 1:n) {          m1 <- mean(sample(data1,length(data1), replace=TRUE, prob=NULL))         m2 <- mean(sample(data2,length(data2), replace=TRUE, prob=NULL))         btr[i] <<- m1-m2         }         quantile(btr, .500) # median         quantile(btr, .025) # 2.5th percentile         quantile(btr, .975) # 97.5th percentile     }


I'm making a 2D platformer in Unity3D (you can only control along the X axis, and Y axis by jumping) and I'm trying to move to the next stage by loading the next scene.  I've tried looking all over stack overflow and other sites and I can't find anything to help. Here's my code:  using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement;  public class SceneManager : MonoBehaviour {     public void LoadScene(string level)     {         SceneManager.LoadScene(level);     } }  public class Player : MonoBehaviour {     public Rigidbody rb;      public float jumpForce = 10f;     public float sidewaysForce = 10f;      bool isGrounded = true;     string myObjects = "";       // Update is called once per frame     void FixedUpdate()     {         if (Input.GetKey("d"))         {             rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);         }          if (Input.GetKey("a"))         {             rb.AddForce((0 - sidewaysForce) * Time.deltaTime, 0, 0, ForceMode.VelocityChange);         }          if ((Input.GetKeyDown("space")) && isGrounded)         {             rb.AddForce(0, jumpForce * Time.deltaTime, 0, ForceMode.VelocityChange);         }       }      void OnCollisionEnter(Collision collision)     {         if (collision.gameObject.CompareTag("Ground"))         {             isGrounded = true;         }          if (collision.gameObject.CompareTag("Death"))         {             transform.position = new Vector3(0, 4, 0);//(where you want to teleport)         }          if (collision.gameObject.CompareTag("NextT"))         {             SceneManager myObject = new SceneManager();             myObject.LoadScene("Level1");         }     }      void OnCollisionExit(Collision collision)     {         if (collision.gameObject.CompareTag("Ground"))         {             isGrounded = false;         }     } }    The message is;  Assets\Player.cs(10,9): error CS0120: An object reference is required for the non-static field, method, or property 'SceneManager.LoadScene(string)'  and as it is a compiler error I can't start the game. By the way, I'm really new to C# so please overlook any inefficiencies in the code. :)


True or False. Every subgroup of a simple group is itself simple.  Our solution:The statement is false.  As a counter example, let $G$ be equal to the group of even permutation of $10$ letters and $H$ is the subgroup of $G$ which is $$H=\{e,(12)(34),(56)(78),(12)(34)(56)(78)\}.$$ $H$ is not simple since $K=\{e,(12)(34)\}$ is also normal in $H$.


If $(G,*)$ is a group and $a^{-1}=a, \forall a \in G$ then $G$ is abelian . Is it true or false and why?


People said outside earth is a vacuum.  But the air does not get sucked from the  Earth's surface. Some said it is due to gravity and some said the speed of air molecules are not high enough to escape.  We know vacuum will suck air like your vacuum cleaner and it has nothing to do with gravity. If outer space is really a vacuum, what prevents air escape the earth?


Is there a tool to help find where the best place to ask a question is?

My motivation: I wasn't sure where to ask a question about the GnuGPG tool - should it be Stack Overflow, or Server Fault, or Super User?  Ultimately, I decided by searching for "GPG" on the three sites and seeing which had the most questions with the highest votes.  Could a tool help with this?


multiplication with double variables goes wrong

The idea of this method is to convert decimal numbers to fraction numbers. The only thing that's causing a problem is the line wert = wert * 10. When I run for example 7.52 in this method I get:  7.52  75.19999999999999  751.9999999999999  7519.999999999999  75199.9999999999  ... and it goes on and on like this causing more problems. What am I missing? I want it to go like this 7.52 -> 75.2 -> 752.0.  public static Eintrag toBruchzahl(double wert) {     System.out.println(wert);     boolean isDone = false;     int k = 0;     while (!isDone) {         if (wert % 1 == 0) {             isDone = true;             Eintrag resultat = new Eintrag((int) wert, (int) Math.pow(10, k));             //resultat.normalisieren();             return resultat;         } else {             k++;             wert = wert * 10;             System.out.println(wert);         }     }     return null; }


I've notices in the last weeks that the StackOverflow  became very slow. It takes several seconds to load and from time to time it doesn't load at all.  Did you notice the same? I don't think it's a problem of my network, because the other site sections are running fine as before.


How to multiply an integer to a floating number (Python)

Yo Hi! I'm currently trying to fix my code. I'm making a basic math to calculate the appropriate time spent in front of my computer When I ran my code, it says: File "BasicProblemSolving.py", line 21, in <module> Result = Calculations(answer2)  File "BasicProblemSolving.py", line 19, in Calculations x = x * average_minus TypeError: can't multiply sequence by non-int of type 'float'  This is the code: # This explains how to do basic maths to calculate daily problems `# Let's go! import math bad_time_usage = 8 #In hours  time_usage = 365 - (round(365/7*2 + 30)) * 8 #In hours  current_minus = 6.5  average_minus = 0.011  answer1 = input("Hi, enter your name! ")  print("\nOwh hi {}!".format(answer1))  answer2 = input("Try to enter the daily usage of how many hours do you spend  everyday ")  def Calculations(x):   x = x * average_minus  Result = Calculations(answer2)  answer = input(f"So, you would get... {Result} minus.")  Your help would be a great help to me Thanks!


Cylinder has small wierd bumps when using Subdivision Surface

Cylinder has small weird bumps when using Subdivision Surface


I typed ls'   (ls with single quote ) and it opened another shell. Which type of shell it is? what is it used for?  below is the reference:


My problem is that my graphics card is not available in the compute device option:    Instead it shows my Intel Core 2 Duo, which is my processor. Already set CYCLES_OPENCL_TEST=ALL and CYCLES_OPENCL_SPLIT_KERNEL_TEST=1  My Specs Processor: Intel Core 2 Duo E8300 @2.83GHz Graphics Card: AMD Radeon HD 6670 Graphics Card Driver: AMD Radeon Software Crimson Edition OS: Windows 7 64bit


Book series where the main characters have powers associated with smells

There is a book series where the main characters (one boy and one girl) have powers. If I remember correctly, the boys powers are associated with the smell of oranges, and the girls powers are associated with the smell of vanilla. What book is this?


How in the script to apply an image on the image texture node

I can’t find the answer to how to select an existing node through the script and apply the already added image without a GUI.  I have a ready-made script that opens a prepared blender file with saved materials, makes an import of the SVG curve and performs manipulations by adding these materials.   In one of the materials I need to change one picture. I found a code that can add a node with a new picture  import bpy bpy.data.images.load("D:/temp/1.png", check_existing=True) mat = bpy.context.view_layer.objects.active.active_material tex = bpy.data.images.get('1.png') image_node = mat.node_tree.nodes.new('ShaderNodeTexImage') image_node.image = tex   This code created a new unconnected node and it needs to be connected to three other nodes. But I need only assign an already linked picture to the already connected node.


Since I earned the privilege to downvote I used it when ever I saw a post of low quality and used this feature intuitively.  But when I asked myself today what exactly are downvotes meant for? Are they meant for incorrect content? Just for low quality? Or even for posts that are not helpful?   I went looking in the Stack Overflow helpcenter and noticed that there wasn't any information about it (expecting the little hint when you hover with your cursor over the downvote button). So maybe thats a good idea to add to avoid unintended abuse of downvotes?   Lets collect here some cases, what downvotes are meant to be used for and what not.


I would like to know if there is a specific command to upgrade my whole system except Gnome with sudo apt-get update and sudo apt-get dist-upgrade.  In a previous post I found the following command to exclude one packet from upgrade sudo apt-mark hold [package], but I don't think that this is suitable for my purpose because gdm3 has dependencies, so I think I shouldn't upgrade those too.  Is this statement right or am I wrong?  Please, provide a detailed solution. Thanks you all


Counting functions satisfying $f(j)<f(i)+j-i$ for all $i<j$

Ques : Let $N$ be the number of functions $f: \{1, 2, 3,\dots, 2018\} \to \{1, 2, 3,\dots, 2018\}$ satisfying $f(j) < f (i) + j - i$ for all integers $i,j$ such that $1 \leq i < j \leq 2018$.  Find $N$.  My development so far : difference of elements' value in domain is strictly greater than that in Co domain. Hence every consecutive number should be mapped to a lesser or equal number the previous number is mapped to. Hence the function should be non-strictly decreasing.


Which is generally best to use -- StringComparison.OrdinalIgnoreCase or StringComparison.InvariantCultureIgnoreCase?

I have some code like this:  If key.Equals("search", StringComparison.OrdinalIgnoreCase) Then     DoSomething() End If   I don't care about the case. Should I use OrdinalIgnoreCase, InvariantCultureIgnoreCase, or CurrentCultureIgnoreCase?


Where do I post questions relating to software design approaches?

I have a question relating to software design and "How I should approach x". I'm not sure it's a "Stack Overflow" type question as it can be open to interpretation.   Does Stack have a better place to post these sort of questions?


Is there any asymmetric encryption algorithm for eliptic curve(secp256k1) without AES?

I am looking for asymmetric encryption using SECP256K1. But all over the internet, I see that it also requires AES encryption. Instead of generating an AES secret key, is it possible to encrypt using the public key alone?


Why isn't the reflexive property redundant we defining an equivalence class? If $x \sim y$, then $y \sim x$ by the symmetric property. Using the transitive property we can deduce that $x \sim x$.


What information do we have about Spock's childhood pet?

In an episode of Star Trek TOS, Spock mentioned a childhood pet.  I think it was Dr. McCoy who teased him about his having a kitty-cat.  The animal Spock described was definitely not a kitty-cat -- it was bigger, with proportionally bigger fangs and claws and had a irritable temperament.    Is anything more known about this pet?  Is there a picture of it?  Was this the only pet species available on Vulcan, or was a ferocious animal selected on purpose to quash any human feelings of sentimentality the half-human Spock might feel for a kitten- or puppy-like creature?


How to selectively use mutliple interfaces with Net-SNMP?

I have this monitoring network setting for Net-SNMP 5.7.2.1 listening to multiple Ethernet interfaces on my home gateway but it would only take the following combination from the snmpd.conf configuration file:   single IP address single IP address, protocol-specific single IP address per unique protocol   such as:  agentAddress  127.0.0.1:161   or  agentAddress  udp:127.0.0.1:161   or  agentAddress  udp:127.0.0.1:161,udp6:[::1],tcp:127.0.0.1:161    But it would not accept multiple IP addresses using the same protocol, as given below as desired:  agentAddress  udp:127.0.0.1:161,udp:172.28.130.1:161   How do I make SNMP daemon (snmpd) listen to TWO (or more) Ethernet interfaces


I always see home in the navigation and it seems redundant. Mainly because I would press the logo to go back home. The argument would go, not everyone knows the logo would take you home especially if we consider different levels of users. In that case, the home button should be in the navigation.  What if we have a big website that has 8 or more items in the navigation? Should we still keep "Home" or should we drop it?   At what point should we keep home? Or should home even be allowed on the navigation? Are there any studies or concepts that back it up?


Extent of proof for provenance of funds - Sponsor of UK Vistor Visa

I am a UK citizen living in Colombia and intend to return to home with my Colombian girlfriend for a month over Christmas to visit family.  My girlfriend is a student and from a modest Colombian background, hence she has basically no money in her bank account or an income. I am going to act as her sponsor, covering the costs for the entire trip.  My financial situation is complex with money spread across multiple bank and investment accounts (the multiple accounts is for getting the best interest rates, hence not dodgy, I used to be a financial advisor). This money came from 2 main sources: income in previous jobs and inheritance.  I have one main bank account that covers the cost of the trip by a considerable margin.  My questions are:    Do I have to provide documents for all of my (10+) accounts? Or given that the main account has more than enough to cover it, will that suffice? The inheritance and income money has been in my accounts for over a year. Do I need to provide proof of provenance for these amounts? Or will bank statements for the past 6 months suffice? Do the bank statements need to be originals? All my accounts are paperless and hence I only have pdf's unless I specifically request them from the bank (costly and time consuming for all 10+ accounts)   For context on question 2: my employment income savings have been in my account for 2 years so do I need to go back and dig out tax returns / pay slips for that far back?   Many thanks  Update - this is not a duplicate. I have read the potential duplicate article that was flagged multiple times and it doens't answer my specific questions.


PHP - Multidimensional Array check for duplicates (without array_unique)

UPDATE     I found an answer to this question for myself and I posted it, but i can only accept it in two days..     I create this multidimensional array:  array (   0 =>    array (     'OrderDate' => '02.11.2018',     'ClientNumber' => 5500   ) )  array (   0 =>    array (     'OrderDate' => '02.11.2018',     'ClientNumber' => 5500   ) )  array (   0 =>    array (     'OrderDate' => '05.03.2018',     'ClientNumber' => 5500   ) )  array (   0 =>    array (     'OrderDate' => '10.12.2018',     'ClientNumber' => 2200   ) )  array (   0 =>    array (     'OrderDate' => '10.12.2018',     'ClientNumber' => 2200   ) )   The array shouldn't contain duplicate OrderDate's from each ClientNumber.  I want the output to look like this:  array (   0 =>    array (     'OrderDate' => '02.11.2018',     'ClientNumber' => 5500   ) )  array (   0 =>    array (     'OrderDate' => '05.03.2018',     'ClientNumber' => 5500   ) )  array (   0 =>    array (     'OrderDate' => '10.12.2018',     'ClientNumber' => 2200   ) )   What if-condition should i use to make my output look like this? Any help will be appreciated, thank you!  This is my function that is called in a foreach. I tried my best to check with in_array and array_column but the output didn't look like the code above.   $array = array(); function createArray($clientNr, $orderDate){  if(empty($array)){ // if array is empty, just add   $array[] = array(               "OrderDate"=>$orderDate,               "ClientNumber"=>$clientNr                  );  } else {     if(??????)<--------------------------- // check here if date from clientnumber exists       $array[] = array(                    "OrderDate"=>$orderDate,                    "ClientNumber"=>$clientNr                   );     }  } }


I will use in many places in my LaTeX document a specific value given in, say, the row 2 and column 1 from a table. Is it possible to make a macro for it, such as \read{2}{1} ?  Here is an simple example of a table, from which I want to read the value 22.     \begin{filecontents}{testdata.dat}       height 20       length 21       depth 22     \end{filecontents}


How to calculate 12 weeks back date in java?

I know I can get the current date using new Date(), but I want to get a past date (12 weeks back). For example: today is Jan 3rd 2014, a 12 weeks old date would be Oct 11 2013.  How to do that in java?


I have trouble comparing 2 double in Excel VBA  suppose that I have the following code  Dim a as double Dim b as double a = 0.15 b = 0.01   After a few manipulations on b, b is now equal to 0.6  however the imprecision related to the double data type gives me headache because  if a = b then  //this will never trigger end if   Do you know how I can remove the trailing imprecision on the double type?


How to give two equations the same equation number?

I want to write two equations in consecutive lines and I want to give them a single equation number. Often, in notebooks, we write multiple equations in consecutive lines and use a big } sign to allocate only a single equation number. Is it possible to do the same in LaTex? If yes, how do I do that?  I hope I could clearly state my problem.


Says something like "Fraud on tax return and you need to call this number as soon as possible."  I know there is a high probability that this is a total scam, but just-in-case:   How can I be absolutely sure? This is happening more frequently every year and they're getting more clever - anyone know of any new dangers this year?   I swear, I am about to terminate having a cell phone forever.


Finding the following integral $\int_2^{\infty}\left( \frac{1}{x\log^2x} \right)^pdx$

Q) $\int_2^{\infty}\left( \frac{1}{x\log^2x} \right)^pdx$  $p=1$ is simple by substitution. How can I do this in general? Thanks.


How to send automated emails that don't get marked as spam?

My PHP server is sending verification emails when customers sign up, so that they can verify their email address. But sometimes gmail automatically disables less-secure apps, and I have to go into the settings and re-enable it so that phpmailer can connect again. Also, the emails get through for a while and then show up as spam. Is there some more modern/standard way of doing automatic emails for this purpose? I feel like phpmailer isn't working for me. Does Google have some simple API where I can just pass the recipient address and the message body?


How can I make a script run automatically after gdm login and logout?

I have a setup where my users log on using ldap and it works just fine.  I want to run a script after my users login (its a script that will detect which groups they are in and map network shares accordingly), and after they logout (umounting their shares).  Both scripts are done and they work.  I want that when the user logs in the box a script runs downloading the mounting script from my server (wget i guess?) and runs it, same thing for logout.  Can it be done? I've been searching the net and had no luck so far. I've managed to make that work on shell login/logout, but my users dont even know what shell is and have no use for it :)


I want to compile a pdf document using latex as part of a java program

I'm doing a java project and want to produce a word doc or pdf of inputted (formatted) text. I've read that I could use Apache POI xwpf, but I know infinitely more LaTEx commands than apache poi. How would I get my java program to open miketex and compile a tex file?


How do you throttle the bandwidth of a socket connection in C?

I'm writing a client-server app using BSD sockets.  It needs to run in the background, continuously transferring data, but cannot hog the bandwidth of the network interface from normal use.  Depending on the speed of the interface, I need to throttle this connection to a certain max transfer rate.  What is the best way to achieve this, programmatically?


As an example, calculate the number of $5$ card hands possible from a standard $52$ card deck.   Using the combinations formula,   $$= \frac{n!}{r!(n-r)!}$$  $$= \frac{52!}{5!(52-5)!}$$  $$= \frac{52!}{5!47!}$$  $$= 2,598,960\text{ combinations}$$  I was wondering what the logic is behind combinations? Is it because there are 52 cards to choose from, except we're only selecting $5$ of them, to which the person holding them can rearrange however they please, hence we divide by $5!$ to account for the permutations of those 5 cards? Then do we divide by $47!$ because the remaining cards are irrelevant?


Is it a valid claim, that by differencing a time series, it loses its memory, and as a result its predictive power?

seems to be a well known and renowned machine learning expert in the field of finance. I am very far from his level, as have not yet finished my PhD in economics, and only have an applied level statistical knowledge. I have encountered a much . I can not say I completely understand all the mathematical parts. But there are some claims in the paper, which seem to completely contradict things, which I have learned on statistics and economics thus far, or at least seem to be illogical for me. For a specific example, the paper under the section Pitfall #4 and Solution #4 suggests, that by differencing time series to make them stationary for classical statistical models (ARIMA etc.) removes the memory of the series and thus makes them lose the predictive power:     The conclusion is that, for decades, most empirical studies have   worked with series where memory has been unnecessarily wiped-out. The   reason this is a dangerous practice is that fitting a memory-less   series will likely lead to a spurious pattern, a false discovery.   Incidentally, this over-differentiation of time series may explain why   the Efficient Markets Hypothesis is still so prevalent among academic   circles: Without memory, series will not be predictive, and   researchers may draw the false conclusion that markets are   unpredictable.   In economics there really is a simplified theoretical model on equity returns, which posits, that it is a memory-less white noise, and the prices (the integrated returns) follow a random walk. But from an empirical perspective, as far as I understand the memory-less attribute of returns pertains only to the individual data points themselves, not the series as a whole. A differentiated series still should have a "collective" memory put together, and it has almost the same information as the integrated version, only lacks a constant value. So it should have the same predictive power as well, should it not? Or it is me, who has a lack of understanding?


Show $1/(1+ x^2)$ is uniformly continuous on $\Bbb R$.

Prove that the function $x \mapsto \dfrac 1{1+ x^2}$ is uniformly continuous on $\mathbb{R}$.  Attempt: By definition a function $f: E →\Bbb R$ is uniformly continuous iff for every $ε > 0$, there is a $δ > 0$ such that $|x-a| < δ$ and $x,a$ are elements of $E$ implies $|f(x) - f(a)| < ε.$ Then suppose $x, a$ are elements of $\Bbb R. $ Now \begin{align} |f(x) - f(a)|  &= \left|\frac1{1 + x^2} - \frac1{1 + a^2}\right| \\&= \left|  \frac{a^2 - x^2}{(1 + x^2)(1 + a^2)}\right| \\&= |x - a| \frac{|x + a|}{(1 + x^2)(1 + a^2)} \\&≤ |x - a| \frac{|x| + |a|}{(1 + x^2)(1 + a^2)} \\&= |x - a| \left[\frac{|x|}{(1 + x^2)(1 + a^2)} + \frac{|a|}{(1 + x^2)(1 + a^2)}\right] \end{align} I don't know how to simplify more. Can someone please help me finish? Thank very much.


Proving equality - a sum including binomial coefficient $\sum_{k=1}^{n}k{n \choose k}2^{n-k}=n3^{n-1}$

I want to prove the following equality:  $$\displaystyle\sum_{k=1}^{n}k{n \choose k}2^{n-k}=n3^{n-1}$$  So I had an idea to use $((1+x)^n)'=n(1+x)^{n-1}$  So I could just use the binomial theorem and let $$x=2 \implies (n3^{n-1})$$ and then modify the sum into that one on the left side.  So I need to prove that : $$\displaystyle\sum_{k=1}^{n}k{n \choose k}2^{n-k}=n(1+x)^{n-1}$$ if$$x=2$$ Any help would be appreciated.


Proving that the tangent to a convex function is always below the function

Consider a real-valued convex function $f$ defined on an open interval $(a,b) \subset \mathbb{R}$. Let $x,y \in (a,b)$.  I want to prove that \begin{equation} f((1-\lambda)x + \lambda y) \leq (1-\lambda)f(x) + \lambda f(y) , \lambda \in [0,1]\implies f(y) + f'(y)(x-y) \leq f(x) \end{equation} No other assumptions (regarding the second derivatives) is allowed.  While both facts are really obvious and clear, I am unable to prove this without making additional assumptions.


vector function with template through header file

I'm unfamiliar with templates in cpp and I'm having difficulties using them through header file (especially with vector as specified). This program for example doesn't allow me to use the function outside the file, does someone know whay may be the reason for that and how I may solve it? Thank you in advance. //Funcs.h  #prgma once #include <vector>  template <typename T> inline void deleteVector(vector<T*> vec);  //Funcs.cpp #include Funcs.h  template <typename T> inline void deleteVector(vector<T*> vec) {     for (auto x : vec) delete x;     vec.shrink_to_fit(); }


Find the sum of the series $\sum \frac{1}{n(n+1)(n+2)}$

I got this question in my maths paper     Test the condition for convergence of $$\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)}$$   and find the sum if it exists.   I managed to show that the series converges but I was unable to find the sum. Any help/hint will go a long way. Thank you.


Word for when something turns out to be the opposite of what you believed?

I've been wondering for a while, if there is a word for when something turns out to be the complete opposite of what you believed.  So, something that would fit in a sentence like below would be great:     It was so ____, he was at the complete opposite end of town.


Python: ValueError: The truth value of an array with more than one element is ambiguous

I have a Python list of tuples:  vals = [(40.69, array([1.34, 1.516, 0.000135,....])), (213.69, array([0.34, 1.51256, 0.0110135,....])...] vals.sort()   The first element in the tuple is a float and the second element is a numpy ndarray. There are 784 elements in the array.   I get ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() at vals.sort. I am trying to sort on the first element in the tuple itself. This code works when I use a smaller dataset that produces only 13 elements in the ndarray. I can't figure out why it should throw this particular error if the number of elements is more.  Can anyone please help me out?


How to recover deleted rows data table in SQL Server without backup?

I accidentally deleted all data rows from a important table. But unfortunately, the last backup of the database was done last week. I have tried several ways, namely by looking at the transaction id and returning it with a query. but from the review I can also be more dangerous because it can eliminate some data How can I restore the data that I deleted?


How to get referenced entity fields from another content type in single node template

I have a content type called "Resources", this is referenced from another content type called "Projects".   I can get simple text fields in my single node--project.html template for example -  {{content.field_project_linked_resource[0['#node'].field_resource_title[0].value }}   How do I get more complex fields like image and file fields?  This does not work for example -  {{node.field_project_linked_resource[0].entity.field_resource_pdf_1.entity.uri.value }}   Thanks for any help!


What is the difference between Object[] obj and Object obj[] in java?

I wrote a code using two type of Object styles. Both are working properly. I just want to know what is the difference between these both types.  PatientsTabData ob[] = {new PatientsTabData().SetPatientId(                 Integer.parseInt(String.valueOf(jsonObject.get("PatientId")))) .SetRxId(Integer.parseInt(String.valueOf(jsonObject.get("TrackingNumber"))))};  PatientsTabData[] ob = {new PatientsTabData().SetPatientId(                 Integer.parseInt(String.valueOf(jsonObject.get("PatientId")))) .SetRxId(Integer.parseInt(String.valueOf(jsonObject.get("TrackingNumber"))))};   Both types are working.


Prove that If A is a real skew-symmetric matrix, then I + A is invertible, where I is the identity matrix.

In the Wikipedia article for skew symmetric matrixes the following propert is stated: If A is a real skew-symmetric matrix, then I + A is invertible, where I is the identity matrix.  However I haven’t been able to find a proof of this or why it does not apply to complex matrices.     This is different from the one where I - A is invertsble because this is I + A


Differences between hosting options for SharePoint apps

When we create a new app in Visual Studio, we are given the option to select an hosting model:    What are the differences between the various models?


I would sometimes like to point out particular text within a help text e.g. the "Answer well-asked questions" section in the  text on StackOverflow (or the same text on U&L).  However since non of the sections have IDs I cannot do so using https://stackoverflow.com/help/how-to-answer#some_id. Can we get IDs on the sections e.g. of the form: all-lowercase section name, with space reverted to underscore?  This should not significantly slow down the download of the help text page, and it enables pointing out relevant help more specifically.


zoomToExtent (getDataExtend) combined CQL filter, does not work

I'm using openlayers 2.12 and geoserver 2.1.3.   I created a search functionality for a vector layer that contains points/lines/polygons. I used CQL that dynamically gets data from a form.   When I use map.zoomToExtent(pins.getDataExtent()); does not work at all, instead it zooms 100% on an irrelevant place of the map. Never zooms to contains just the newly created features.   Map also contains other vector layers with no search functionality and a Google maps layer. All projections are EPSG 900913.   Check the following code. Form's "name" is a textfield, "era" is a dropdown and "borough" is  a dropdown containing string that will turn to Bounds , so map will zoom to a borough.   Search for : era OR name OR era+name with zoomToExtent (getDataExtend) on = zooms 100% at irrelevant place. I want this to zoom at new features.  Search for : era OR name OR era+name with zoomToExtent (getDataExtend) off = does not zoom, as it should be  Search for : era+borough OR name+borough OR era+name+borough with zoomToExtent (getDataExtend) on = zooms 100% at irrelevant place. I want this to zoom at new features.  Search for : era+borough OR name+borough OR era+name+borough with zoomToExtent (getDataExtend) off = zoom,at the borough as it should be.  The code...  //first, clear the layer pins.removeFeatures(pins.features); pins.refresh({force:true});  //split the chosen borough, to create bounds, so the map can zoom there var binfo=document.getElementById("boroughselect").value; if(binfo!=" "){ var split_binfo = binfo.split(","); var bidchoosen=split_binfo[0]; var zoomTo=new OpenLayers.Bounds(split_binfo[1], split_binfo[2], split_binfo[3], split_binfo[4]).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); map.zoomToExtent(zoomTo);}  //create a filter using CQL var filter_list = []  if (document.getElementById("eraselect").value != " ") {     var filter_b = new OpenLayers.Filter.Comparison({         type: OpenLayers.Filter.Comparison.EQUAL_TO,         property: 'p_era',          value: document.getElementById("eraselect").value     });     filter_list.push(filter_b);}  if (document.getElementById("nm").value != "") {     var filter_c = new OpenLayers.Filter.Comparison({         type: OpenLayers.Filter.Comparison.LIKE,         property: 'p_name',          value: document.getElementById("nm").value     });     filter_list.push(filter_c);}  //create the final filter,combining the above,  to search var filter_final = new OpenLayers.Filter.Logical({     type: OpenLayers.Filter.Logical.AND,     filters: filter_list});  //pass the filter to the layer var prot =  new OpenLayers.Protocol.WFS({     url:  "http://localhost/geoserver/wfs",     featureType: "pins",     featureNS: "http://www.cultmap.gr",     defaultFilter: filter_final});  var _CallBack = function(resp) {     pins.addFeatures(resp.features)  var cb = pins.features.length; if (cb == 0){     document.getElementById("formMsgG").innerHTML = No results, please try again.";             }};  var response = prot.read({callback: _CallBack});  pins.refresh({force:true}); map.zoomToExtent(pins.getDataExtent());


Following , I would like to know what exactly it means for a tag to be marked as blocked (formerly blacklisted) on a Stack Exchange site.  Does it mean I can't use that tag on my question? What are the reasons for blocking a tag? Who can block tags? Why am I being prompted to remove a tag from a question I'm editing?


Special Relativity - Reference Frames $S$ and $S'$

Consider the standard arrangement in special relativity. Let $S'$ move in the +ve $x$-axis with a velocity $v$ with respect to $S$. This implies that $S$ moves with a velocity $-v$ with respect to $S'$. Is this an assumption or a theorem of special relativity? If theorem - How can it be derived? @RogerJBlarlow below provided an answer with basically says $f(f(v))=v$ hence $f(v)= -v$. There are many other solutions to this so why do we only choose where $f(v)=-v$ This question has been puzzling me for a while now. Any help is much appreciated. Thanks


Allowing the zero element in a field to have an inverse

In the definition of a field one of the required properties is that  every element other than zero has a multiplicative inverse.  It's vague whether the zero is forced not to have an inverse or not, as in is the property  every element other than zero has a multiplicative inverse and zero does not  or  every element other than zero has a multiplicative inverse and zero may or may not?  Regardless, what differences would occur if we adopted one definition as opposed to the other?


vector sorting on the basis of first only

Hey all I have a vector of pair. After sorting the vector (i.e. sort(v.begin(),v.end()) .....It sorts the element on the basis of first element but there is a prob with me ...as I need to keep those element of second in same order whose first element are same ...for example look the following code..  std::vector<std::pair<int, int> > v(2); v[0].first = 1; v[1].first = 1; v[0].second = 2; v[1].second = 0; sort(v.begin(),v.end()); for (int i = 0; i < 2; i++) {     std::cout << v[i].first << " " << v[i].second << std::endl; }   as output for the above code is   1 0 1 2   whereas i want the output as following  1 2 1 0   please help !!


Does a petrified creature count as an object?

I'm curious whether the Siege Monster special ability that allows a creature to deal double damage to objects would allow them to deal double damage to a petrified character.   It seems like this ought to be the case, but I notice that the description for the petrified condition doesn't explicitly say that the character becomes an object. It seems obvious, but the rules spell out quite a few seemingly-obvious things.   Is there a RAW answer to this anywhere?


The kernel on booting initrd, shows the error 'Initramfs unpacking failed: junk in compressed archive', with a message of kernel panic. Is this an issue with cpio, as I'm using Ubuntu 16.04 or some internal error caused by the /init daemon script?


Unable to Retrieve the Data Extension Fields using Soap Api

I have to Retrieve the Data Extension Fields from Data Extension object using Soap Api,But I am unable to Retrieve the Data Extension fields using Data Extension Object.  Data Extension Soap Request:  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">   <soapenv:Header>     <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">       <UsernameToken>         <Username>xxxxxx</Username>         <Password>xxxxxxx</Password>       </UsernameToken>     </Security>   </soapenv:Header>   <soapenv:Body>     <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">       <RetrieveRequest>         <ObjectType>DataExtension</ObjectType>         <Properties>CustomerKey</Properties>         <Properties>Name</Properties>         <Properties>DataExtension.ObjectID</Properties>         <Properties>IsSendable</Properties>         <Properties>SendableSubscriberField.Name</Properties>         <Properties>SendableDataExtensionField.Name</Properties>         <Properties>Fields</Properties>         <Property>Field.CustomerKey</Property>         <Property>Field.FieldType</Property>         <Properties>CategoryID</Properties>         <Filter xsi:type="SimpleFilterPart">           <Property>CategoryID</Property>           <SimpleOperator>equals</SimpleOperator>           <Value>xxxxxx</Value>         </Filter>         <QueryAllAccounts>true</QueryAllAccounts>       </RetrieveRequest>     </RetrieveRequestMsg>   </soapenv:Body> </soapenv:Envelope>   Here I am trying to Retrieve the fields , but i am unable to Retrieve, what i have to give the value?  <Properties>Fields</Properties>  <Property>Field.CustomerKey</Property>  <Property>Field.FieldType</Property>   I dont want to use DataExtension Field object,I want to Retrieve the fields using Data Extension object,please anyone help me for the Answer...     Error Message:    <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">          <OverallStatus>Error: The Request Property(s) Fields do not match with the fields of DataExtension retrieve</OverallStatus>          <RequestID>3aadeb4f-2290-402d-9590-f0f07ac3247f</RequestID>       </RetrieveResponseMsg>


Working to create large prints dpi and size?

I need to create a 11400mm X 3300mm size print in photoshop. What settings can I use that won't completely slow down my computer? For example I tried to create a doc 11400mm X 3300mm @ 300dpi but it was way too large to work with.  Could I create a new doc in PS at 114mm X 33mm @ 300 dpi that the printer will resize to 11400 X 3300 and it would still look good printed?  ps I have to work with Photos and not vectors  Sorry if this is a stupid question :)


I just wanna know what does Object S[] mean in this code? This is a snippet of a source code for Stack in array. Is this a data type? What does it return? and what type of data should be entered? public class ArrayStack implements Stack {  public static final int CAPACITY = 1000; public int capacity; Object S[];


function with isolated singularity on the unit circle and coefficients of its taylor expansion

Let $f$ be a function holomorphic in an open set containing the closed unit disc $D(0,1)$, except at the point $z_0$ with $|z_0|=1$, where $f$ has an isolated singularity. If $a_n$ are the coefficients of the Taylor expansion of $f$ centered at the origin, show that   $$\displaystyle\lim_{n \to\infty}\frac{a_n}{a_{n+1}}=z_0$$  I considered first the case: $z_0$=simple pole. Then i can write the Laurent series for $f$ at $z_0$  $$f(z)=\frac{c}{z-z_0}+c_0+c_1(z-z_0)+\ldots$$ I put  $$g(z)=f(z)-\frac{c}{z-z_0}$$  Then $g$ is holomorphic in an open set containing the closed unit disc $\overline{D(0,1)}$ and we have $$g(z)=\sum a_n z^n+\frac{c}{z_0}\sum(\frac{z}{z_0})^n=\sum(a_n+\frac{c}{z_0^{n+1}})z^n$$ The power series of $g$ has radius of convergence $>1$, hence i can substitute 1 in RHS of last equation, and i get a numeric convergent series. The necessary condition for convergence says that its general term has to be infinitesimal $$\displaystyle\lim_{n\to\infty}(a_n+\frac{c}{z_0^{n+1}})=0$$ from which follows $\frac{a_n}{a_{n+1}}\rightarrow z_0$  the question is:how can i adapt this argument to deal with cases where z_0 is not a simple pole?


Helmet headband is getting wet from sweat

I cycle to work on a daily basis, however I do like to also sweat a lot. Most of this is ok, I have a change of clothes and can managed, but when it comes to my helmet, it's a different story.  There is a headband around the helmet, which likes to soak up my forehead sweat, the problem is, this headband doesn't like to dry out and I can see it getting mouldy soon. I can't seem to removed the band, so I was wondering:   Are there helmets where this band is removable? Are there alternatives, like wearing a headband underneath to soak up the sweat instead?   I've seen , but it's more talking about keep the sweat out of the eyes, rather than the helmet headband. Though the site does sell things called, skull caps, will that be suitable for soaking the sweat and then I can wash it? I need to find something that will fit under my helmet and prevent the headband from soaking up more sweat.


Hawking Radiation: Couldn't virtual particles make black holes more massive?

From what I understand about Hawking radiation, a virtual particle comes into existence very near the event horizon of a black hole. This causes one part of the particle to fall into the black hole, and the other can radiate outwards. When the anti-particle falls in, it will collide with a particle and annihilate, making the black hole lose mass.  Does that mean that it's only anti-particles that are being captured by the black hole? Wouldn't we expect the non-anti-particle to fall in just as often, which would make the black hole stay about the same mass? Is there any reason that an anti-particle from a pair of virtual particles would be more likely to descend into the black hole?


League of Legends: How do blind effects work?

How do blind effects such as Teemo's blinding dart and Heimer's grenade work in League of Legends? For example, does it work against an enhanced auto-attack such as Nasus' siphoning strike?


Then touching the shoulder of a townsman who stood near to him, he addressed him in a formal and courteous manner:      "I pray you, good Sir," said he, "who is this woman? -- and wherefore is she here set up to public shame?"      "You must needs be a stranger in this region, friend," answered the townsman, looking curiously at the questioner and his savage companion, "else you would surely have heard of Mistress Hester Prynne and her evil doings. She hath raised a great scandal, I promise you, in godly Master Dimmesdale's church. "   As far as I know we always use first form of the verb after "must". For instance: "You must go". We never say "You must goes". Also, we never use -s/es with a verb that comes with "You". What are the circumstances in which writer has used "needs" after "You must" in "You must needs to be a stranger in this region."?


Am I encouraged to ask my question on multiple SE QA Sites?

Simply put. Sometimes I have a question that fits on more than one QA site.  Example: An applescript question could be asked in both Ask Different and Stack Overflow.  Ask Different should be the proper Site to ask the question, but Stack Overflow has a bigger community and a lot of support for applescript questions.  Is asking the same question on both sites encouraged? If not, what's the recommended approach?  Thank you in advance,  PS: Should I even be asking this question in Meta Stack Exchange instead of the AD or SO Meta Sites?


How do I use the 'can break' option using commands?

I used the following command /give @p diamond_axe 1 0 {Can Destroy:oak}   And it said   missing '}' line 1, Column 2.   There are no columns though? Why won't it work?


Show that $X = \{ (x,y) \in\mathbb{R}^2\mid x \in \mathbb{Q}\text{ or }y \in \mathbb{Q}\}$ is path connected.

How do I show that $X = \left\{ (x,y) \in \mathbb{R}^2 \mid x \in \mathbb{Q}\text{ or }y \in \mathbb{Q}\right\}$ is path connected?    Note that $X$ is a topological space with subspace topology $\tau = \left\{ U \cap X \mid U\text{ is open in }\mathbb{R}^2\right\}$.  I only know two things (with respect to path connectedness):   A topological space $X$ is path connected iff for every $p,q \in X$, there is a continuous function $f: [a,b] \to X$ with $f(a)=p$ and $f(b) = q$.    Continuity $f$ is defined as for every open set in $X$, its preimage is open in $[a,b]$ (with subspace topology induced by $\mathbb{R}$ (with standard topology) )   Suppose $X$ and $Y$ are two topological spaces and $f: X \to Y$ is a continuous surjection. If $X$ is path connected, then $Y$ is path connected.


how to write Sqlite sql statement for following conditions

I created sqlite database in android as follows:  db.execSQL("CREATE TABLE ratecard (fat NUMERIC, lac NUMERIC, snf NUMERIC,  cow NUMERIC, buf NUMERIC)");   Then I Inserted records in it as follows    DecimalFormat degreeformat = new DecimalFormat("#.#"); DecimalFormat rateformat = new DecimalFormat("#.##"); Double csn = 0.20; Double bsn = 0.00; Double cft = 0.50; Double bft = 0.00; Double crt = 20.00 - cft - csn; Double brt = 0.00 - bft - bsn; for (Double ss = 7.0; ss <= 8.0); ss = ss + .1) {     ProcSnf.setText(degreeformat.format(ss));     crt =   crt + csn;     brt =   brt + bsn;     Double crrt =   crt;     Double brrt =   brt;     for (Double ff = Double.valueOf(fromfat); ff <= Double.valueOf(tofat);      ff = ff + .1) {         ProcFat.setText(degreeformat.format(ff));         Double l    =   (ss - 0.36 - (ff * .21)) * 4.0;         ll = Double.valueOf(degreeformat.format(l));         crrt = crrt + cft;         brrt = brrt + bft;         DB.DeleteSelectedRateCard(ff, ss);         DB.AddRateCard(ll, ff, ss, crrt, brrt);      } }   Records created in database.  Then I pulled this database from emulator to hard disk. Then I browse this data using sqlite browser.  All records shown properly.  Now filter records in browser for fat = 5.0.  All records shown.  Now going to Execute SQL tab in Sqlite Browser I tried following sql statement and getting following result.   select * from ratecard where fat = 3.5 (12 rows returned)   select * from ratecard where fat = 4.1 (12 rows returned)   select * from ratecard where snf = 7.0 (18 rows returned including fat > 4.1)   select * from ratecard where fat = 4.2 (0 rows returned "this result is upto fat = 5.0")   select * from ratecard where fat > 4.1 (108 rows returned) This problem also occurs when I fire query in android app. So my problem is Is there problem in creating table or problem is in query statement.


Differences among dependence, statistical relationship and causation

From Wikipedia we can :     In statistics, dependence or association is any statistical   relationship, whether causal or not, between two random variables or   two sets of data. Correlation is any of a broad class of statistical   relationships involving dependence, though in common usage it most   often refers to the extent to which two variables have a linear   relationship with each other. Familiar examples of dependent phenomena   include the correlation between the physical statures of parents and   their offspring, and the correlation between the demand for a product   and its price.   They introduce some concepts: dependence (or association), causality, correlation and statistical relationship.  Ok, (linear) correlation does not imply causation and that's fine, but I do not clearly understand the differences between aforementioned concepts, introduced in that wikipedia article.  I read a lot of post on this community but I did not find a complete answer to this question.


How to find missing files between specific date range?

I want to navigate through all the files in a folder and find out the missing file for a specific date.  Files are partitioned by hour and file name have yyyy-mm-dd-hh formatting.   So between 2017-07-01 and 2017-07-02 there will be 24 files from 2017-07-01-00 through 2017-07-01-23  How can I find missing hourly file if I pass above dates as start and end date?   Appreciate any input!


why Whereis not able to show command path, while which is working correctly?

I have created a executable bash shell script file command. I added directory path of my custom command to $PATH variable, but whereis not showing the command path but which shows correctly. I am using bash shell with ubuntu 14.04  Added .local/bin to $PATH where custom command resides in .bashrc  ~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/rahul/.local/bin   custom command file exists and is with executable flag  ~$ ls -l .local/bin/ total 8 -rwxr-xr-x 1 rahul employee 79 Dec 13 15:47 customCC   whereis failing to locate the command  ~$ whereis customCC customCC:   which is able to find the command.  ~$ which customCC /home/rahul/.local/bin/customCC   Bash customCC script code  #!/bin/bash cd /home/rahul/sample


I am referring to the simple mirror. How can a photon be reflected and what does that mean? Does it instantaneously reverse direction (in the case of 180 degree bounce), does it loose energy? What effect does this have on the photon wavelength? Heat may be generated (energy lost by the photon, why are mirrors so go at "reflection" Or does it not "reflect", but is absorbed by a mirror and re-emitted?


Last month my iphone 5s 16 Gb (iOS 9.3.2) says that it has no free space. Even after I delete some music, on the next day I can get this message again.  When I go to  Settings > General > Usage > Storage and iCloud I can see the following numbers:   used 11.6 Gb free 0 B   But if I go to "manage" and manually count all numbers for shown apps and used space, I'll get 6.8 Gb.  The question is simple: where is rest of the storage space and how can I get it back?


$C[a,b]$ with $\|f\|:=\int_a^b |f(x)|d(x)$ is a normed space but not a Banach space

Let $-\infty\lt a\lt b \lt \infty$. Let $C[a,b]$ is space of continuous functions and a function $\|.\|:C[a,b]\to R$ is given by $\|f\|:=\int_a^b |f(x)|d(x)$  a). Show that $\|\cdot\|$ is a norm in $C[a,b]$  b). Show that $C[a,b]$ with this norm is not a Banach space.  Well the 1st question is Kind of easy. Non-negativity, Homogenity, and Triangle inequality is easily proven. At the 2nd question I have a Problem.   I know the $$C[0,1]$$ space with Norm $$\|f\| = \int_0^1|f(x)|d(x)$$ is not complete that means Not Banach-Space. But how do I prove the generality?   Does anyone has a suggestion?  Thanks


Where is the Samba configuration GUI in Ubuntu 16.04?

Just installed a fresh Ubuntu 16.04, and Samba. I want to share a drive with Windows machines, with anonymous users.  First thing I notice is the Samba configuration GUI (system-config-samba) is no longer available.  I forged ahead with the CLI and Nano, editing /etc/samba/smb.conf, using various bits of information from many other people struggling with the same issues.   I have it to the place where Windows machines can see the machine and the shared folder, but any attempt to open the share results in "Access Denied".  I want the share to be anonymous, but I also tried logging in using the Ubuntu user and password, and still "access denied".   Before I get into all the gory details after several hours of trying, what happened to the GUI config?  If it is just under another name, I'll try that first.  Update: It turns out there is an even easier way to configure sharing in 16.04 Unity.  Just right click on the folder to share and select "Local Network Share". From there, the Folder Sharing dialog opens to configure the sharing.    Unfortunately it doesn't work (remote user authentication always fails), but at least the interface is there.  I'll report back if and when I figure out more.


How do I create a family application for standard visitor visa?

I am planning to travel to UK for tourism with two other family members. Do I need to submit separate applications or a single application with details of all the family members?


Disable compress the author year in natbib

I am using the natbib package, in the text I need the citation like      (Oganov 2010a, Oganov 2010b, Oganov 2011)   but i am getting the output      (Oganov 2010a,b,2011)   How to disable the compression in the natbib package  \documentclass{book}  \usepackage{natbib}  \begin{document}  examples for systems that have been studied successfully \citep{Oganov-2010c,Oganov-2010b,Oganov-2011}.   \begin{thebibliography}{} \bibitem[\protect\citeauthoryear{Oganov, Ma, Lyakhov, Valle and Gatti}{Oganov {\em et~al.}}{2010{\em a}}]{Oganov-2010c} Oganov, A.R., Ma, Y.~M., Lyakhov, A.~O., Valle, M., and Gatti, C. (2010{\em   a}). \newblock Evolutionary crystal structure prediction and novel high-pressure   phases. \newblock In {\em High-Pressure Crystallography: From Fundamental Phenomena to   Technological Applications} (ed. E.~Boldyreva and P.~Dera), NATO Science for   Peace and Security Series B: Physics and Biophysics, pp.\  293--323. Springer   Netherlands.  \bibitem[\protect\citeauthoryear{Oganov}{Oganov}{2011}]{Oganov-2011b} Oganov, A.~R. (ed.) (2011). \newblock {\em Modern Methods of Crystal Structure Prediction}. \newblock WILEY-VCH Verlag \& Co. KGaA. \newblock ISBN: 978-3-527-40939-6.  \bibitem[\protect\citeauthoryear{Oganov, Lyakhov and Valle}{Oganov {\em   et~al.}}{2011}]{Oganov-2011} Oganov, A.~R., Lyakhov, A.~O., and Valle, M. (2011). \newblock How evolutionary crystal structure prediction works -- and why. \newblock {\em Acc. Chem. Res.\/},~\textbf{44}, 227--37.  \bibitem[\protect\citeauthoryear{Oganov, Ma, Lyakhov, Valle and Gatti}{Oganov {\em et~al.}}{2010{\em b}}]{Oganov-2010b} Oganov, A.~R., Ma, Y.~M., Lyakhov, A.~O., Valle, M., and Gatti, C. (2010{\em   b}). \newblock {Evolutionary crystal structure prediction as a method for the   discovery of minerals and materials}. \newblock {\em Rev. Min. Geochem.\/},~\textbf{71}, 271--298.  \end{thebibliography}   \end{document}


Need help installing Greyhole version 0.14.0

So I am trying to install Greyhole onto my Computer to make it into a Home Server. So I run the command 'tar zxf greyhole-0.14.0.tar.gz && rm -f greyhole-0.14.0.tar.gz' but when I run it I get back this message from the terminal 'tar (child): greyhole-0.14.0.tar.gz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now' and I do not know how to fix it. If there is someone who installed Greyhole and had this issue could you let me know what you did to fix it. Thank you!


Showing that {0,1, 2, 3, 4, 5} is a group under addition modulo 6

I have a set {0, 1, 2, 3, 4, 5}. What properties do I need to show to prove that it is a group under addition modulo 6? Any examples would be greatly appreciated!


How to manage python packages in ubuntu?

I am relatively new to setting up my own programming environment from scratch. I followed  tutorial and set up a virtual machine as well as a virtual environment. When I started working on a project and installing packages (presumably on my virtual environment once I activated it), it did not take long until I was completely lost.  I don't understand how to track:   The differences between pip and pip3 (What does it mean if a package in installed for Python2 vs for Python3?) How to see if a package is actually installed locally vs globally? How to see if a package is installed for a specific user vs globally?  What is the difference between virtual environment package installation vs only for a user vs globally? Etc...   Could someone either answers some of the questions above or point me to a good place to learn the basics and to learn how to properly set up package management well, so that I can build and update packages with confidence going forward.   I am running a Ubuntu 18.04.2 LTS  P.S. Maybe this questioned is asked already somewhere, but I could not find the answers.


I create a fiddle here:   How can I get the four white boxes which is contained within a ul to be horizontally centered within the red bar? I've tried many things to footer #social ul I just cannot figure it out. I have ready through the many posts on this topic and have tried many things which have been suggested before, none which I can get to work on my particular issue. What am I missing?     footer {   width: 100%;   position: relative;   background-color: #C5C5C5;   display: block;   overflow: hidden; }  footer section#footer-content {   max-width: 1440px;   min-height: 50px;   margin: 30px auto;   padding: 0 .694444%;   /* 10px / 1440px */   position: relative;   display: block;   overflow: hidden; }  footer #social {   height: 30px;   margin: 0 auto;   background-color: red;   width: 600px;   position: relative; }  footer #social ul {   list-style: none;   width: 100%;   margin: 0 50%; }  footer #social li {   float: left;   margin: 0 .3em;   position: relative;   display: block;   width: 30px;   height: 30px;   overflow: hidden; }  footer #social a {   text-decoration: none;   color: #CC7D29;   background: #ffffff;   display: block;   text-align: center;   height: 30px; }


SPF Record Fails - How to verify Server IP Address and managing multiple SPF records

I'm trying to verify the mail sent by our server. With our current DNS settings, sending mail from our server shows an SPF Neutral response.   I tried adding a combination of my server's IP and Domain.   v=spf1 a mx ipv4:XXX.XX.XXX.XX -all v=spf1 include:mydomain.com -all   Both these records showed no change, all mail sent from the server was still Neutral. So I tried combining all my existing SPF records like so:   v=spf1 a mx include:mydomain.com ipv4:XXX.XX.XXX.XX include:cmail1.com include:mail.zendesk.com -all   I tested sending mail again and now get a SPF Fail response.   I've looked extensively online and I can't see how to fix my DNS entries so I can get a  PASS on the SPF records. I don't know if I need additional CNAME, A, MX, or I'm missing something entirely.   I'm using a Plesk server with a fixed IPv4 address and using CloudFlare to manage my DNS and Name Servers.    Here is what a full fail response looks like:   SPF:    FAIL with IP XXX.XX.XXX.XX spf=fail (google.com: domain of accounts@mydomain.com does not designate XXX.XX.XXX.XX as permitted sender) smtp.mailfrom=accounts@mydomain.com Received-SPF: fail (google.com: domain of accounts@mydomain.com does not designate XXX.XX.XXX.XX as permitted sender) client-ip=XXX.XX.XXX.XX; spf=fail (google.com: domain of accounts@mydomain.com does not designate XXX.XX.XXX.XX as permitted sender) smtp.mailfrom=accounts@mydomain.com


How to prove whether a matrix has rank $1$

If $u$ $∈ \mathbb R^{m \times 1}$ and $v ∈ \mathbb R^{n \times 1}$ how do you show that the $(m \times  n)$ matrix $uv^T$ has rank $1$? Would providing an example be sufficient to prove it?


What is the difference between control sequences begining with `\` and the ones begining with `\@`?

In all LaTeX packages documentations that show their internal codes, we see \@ and often we see \@@ or even \@@@. What is the difference between \ and \@? What does it mean to write more @ to start a control sequence or instruction?


How to prove the Pythagoras theorem using vectors

I've got a question concerning how to proof the Pythagoras theorem using the following assumption:  $x$ is perpendicular to $y$ (if and only if) $||x+y||^2 = ||x||^2 + ||y||^2$, where $x$ and $y$ are vectors.  I have a basic understanding of linear algebra, however I'm a beginner with this. The question provides hints how to prove the above mentioned equation.  Namely that I should use the properties of the dot product and the definition of the norm of a vector. Those being symmetry, scaling and distributivity as the dot product properties and the norm of a vector being the squared root of the dot product between the same vector.  I was thinking about using the fact that if a vector is perpendicular to another vector the dot product between those vectors should be 0. But that is not provided as a hint so I'm not sure. I know the under lying thought behind it is the cosine rule for vectors, that being:  $$x\cdot y = ||x||\,||y|| \cos(\theta)$$  If the angle between the two vectors is perpendicular you should use $\cos(\pi/2)$ which is $0$ and $||x||\cdot 0 = 0$ and $||y||\cdot 0 = 0$ with the vectors not necessarily being $0$. Thus $x\cdot y = 0$. How would I apply this to the equation I first mentioned to prove the Pythagoras theorem?  I have a few more thoughts on how I could prove this but I'm not sure if they're correct.  I hope someone could point me in the right direction.


Correct use of hyphen to prefix multiple words with one

I wrote:     An open -source and -society loving person   and had this corrected by a native English speaker to      An open-source-and-society loving person   Which to me changes the meaning of the phrase. The first one is meant to be short-hand for prefixing both "source" and "society" with "open", while the second one does not seem to connect "society" with "open".  Is either of the forms more correct than the other? Should it be written differently all together?


Error when commenting or answering on a site where you are not registered

When I try to answer a question on a site on which I don't have an account, it should be pointed out to me that I am currently not a member and it should bring me to a register page. At the moment, if I try to answer or comment I get the following message :  Please fix the following The account associated with the access_token does not have a user on the site


Current is a scalar quantity, but how does it have a definite direction?

A scalar quantity is one which has magnitude but no direction. A vector quantity is one which has both magnitude and direction. The direction of current is opposite to the flow of electrons.  Electric current has both magnitude and direction so ideally it 'should' be a vector. But all sources say it's a scalar just because it does not follow vector addition.   Is it enough to ignore the direction of current, which also is an important factor in determining whether a quantity is scalar or vector?


How to calculate the residue of this function

Consider a function $$f(x)=\frac{1}{(x-1)^\alpha (x+1)^\alpha}$$ where $\alpha$ is a positive small number (not necessary to be an integer). How to calculate the residue at $x=1$?


Community flags a closed question as commentless after a comment from an off-topic closure

When a moderator closes a question on a beta site, if there is no comment on the question, Community raises a flag:     Please explain the nature of this closed question via a comment   This happens even when the question was closed as off-topic with a custom comment. Obviously, in that case, there is a comment — the flag indicator even says so. So Community should not raise this flag.


I'm new to Linux (Ubuntu 14.04) and did my first backup today, using the backup program that comes with the distro.  After the backup was finished, there was a message that the following two files could not be backed up, and that I should make sure I could open them:  /home/myname/.cache/dconf  /home/myname/.config/enchant  I found them in the file manager, but when clicking on them, I'm told I don't have the necessary permissions.   Is the backup non-functional because of missing these two files? What should I be doing?  Thanks!  Kate


How can I create a bootable windows 10 installation on a usb stick with linux

How can I create a bootable windows 10 installation on an usb stick using a linux machine?   Suppose I have a windows 10 iso file on my linux machine.


To find an example for which $closure(\cup A_\alpha)\ne\cup closure(A_\alpha)$

Give an example where closure of $(\cup A_\alpha)\ne \cup closure (A_\alpha)$ provided $A_\alpha$ are subsets of a topological space.  If I consider $R$ to be a topological space with standard topology and $A_n=(n,n+1)$ where $n\in N$ then will the equality hold?


In the first paragraph put out by the following programme, dolor is set at the right margin.  In the second, this doesn't happen, presumably because when the \hfill happens we are still on the first line.  \hsize 4in  lorem ipsum lorem ipsum lorem ip \hfill dolor  lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ip \hfill dolor  lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ip% \break\null \hfill dolor  lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum \break\null \hfill dolor  \bye     How can I ensure that dolor is set at the right margin, regardless of the position at which it occurs?  That is, how can I get the effect of the third paragraph, but not that of the fourth (with an extra line break) if the length of the text before dolor is changed?


In Blender 2.8, how do I light an EEVEE scene with an HDR?

Blender 2.8 supports the same world node setup that Cycles does. This correctly puts the HDR image in the world background.  But EEVEE doesn't light the scene properly. Everything looks flat and washed out. Is there a way to properly light an EEVEE scene with an HDR?


APEX: how to get Custom Label's text dynamically?

There is a way to get Custom Label statically in APEX as documented    System.Label.Label_Name   Can I get this label without hardcoding Label_Name?  What I've tried so far (and did not work)  System.Label.get('Label_Name'); System.Label['elfBCLabel_VAT'];


Where was this wallpaper taken? (Windows 8 Developer/Consumer/Release Preview lock screen)

This is a lock screen wallpaper from Windows 8 Developer/Consumer/Release Preview, where was this taken?


How do I convert all occurrences of the word “OLD” in some file with the word “NEW” in Linux

Can someone give me a command that convert all occurrences of the word “OLD” in some file with the word “NEW” in Linux?  Thanks in advance


Pre-2011 sci fi adventure book (series?) starring a young female protagonist who visits an alien market with her younger sibling

I read it in junior high and I'm certain it was written for an 11-15 audience. I remember the cover being pinkish/violet and may have had characters on it. If so, the characters don't take up much real estate. The cover looked like a drawing or painting, not photography. I remember it being about a young girl who travels through space, or at least on an alien planet. She is accompanied by her younger sibling, I believe. I also remember there being sequels, which I never picked up. The only vivid memory I have of the story is the girl trying trying to navigate a busy alien market. The aliens are described really well. There are other humans here and an older human man even helps her. I know this isn't super helpful but that's really all I remember. I think the younger sibling might be her little sister. I have no idea how they ended up at the market or what they're doing, but yeah. I've tried Google and Goodreads and looked at a dozen lists. I can't find it anywhere. There is also a problem of her not being able to understand what the aliens are saying because obviously they're not speaking English and she needs a portable translator or something like that.


Must there exist a nontrivial automorphism $\pi$ in $\text{Aut}(G)$?

I was trying to show that there exist a nontrivial automorphism  $\pi$ in $\text{Aut}(G)$, and I am taking the case that $G$ is abelian because if $G$ is nonabelian it is trivial. If there exists an $\exists{x}$ with $|x| \neq 1,2,$ then we have the automorphism $\pi_{-1}(g) = g^{-1}$. My question is why must we look at the case where there exists an $\exists{x}$ with $|x| \neq 1,2,$ and how does that imply the automorphism $\pi_{-1}(g) = g^{-1}$?


Earlier today I noticed this Careers ad:        The squared circled "r" is utterly mispositioned.  Quick digging into the HTML showed the background to be , which is correct, but I could not find the source of the misbehaving "r".  I assume this is a failed attempt to mimic the behavior in the :        Can this please be fixed, likely by just removing the ?


Density of the set $S=\{m/2^n| n\in\mathbb{N}, m\in\mathbb{Z}\}$ on $\mathbb{R}$?

Let $S=\{\frac{m}{2^n}| n\in\mathbb{N}, m\in\mathbb{Z}\}$, is  $S$ a dense set on $\mathbb{R}$?


Dynamically trimming informational border off of FAA sectional raster charts?

I'm trying to write a script that can automatically use GDAL to crop the informational border from the FAA's published sectional charts (GeoTIFF) found :  I know that I can use gdal_translate -projwin ulx uly brx bry to crop it to a coordinate range, but I'm not sure where to get the values for the map area aside from by hand, or if there is possibly a better way to crop it.  Is the information necessary to crop the chart extractable from the files they provide?


Adding results from geoprocessing scripts to ArcGIS Pro?

I am in the process of updating scripts and models from ArcGIS Desktop to work in Pro however I'm having difficulty getting results from geoprocessing operations to display in the map window.   As an example, for the following snippet:  import arcpy arcpy.env.overwiteOutput = True aprx = arcpy.mp.ArcGISProject("CURRENT") m = aprx.listMaps("*")[0] inputFC = arcpy.GetParameterAsText(0) outputWorkspace = arcpy.GetParameterAsText(1) outputFC = arcpy.GetParameterAsText(2) outputFC = outputWorkspace + "\\" + outputFC arcpy.MultipartToSinglepart_management(inputFC, outputFC) outputLyr = arcpy.MakeFeatureLayer_management(outputFC, "outputLyr") m.addLayer(outputLyr, "TOP")   I get the error: "ValueError: outputLyr". The process completes successfully, it's just that I can't get the result to add to the map.  My knowledge of python is quite limited but as I understand it, a feature class needs to be made into a layer before being added to the map. Previously in Desktop we used the following:  layer_file = arcpy.mapping.Layer(outputFC) arcpy.mapping.AddLayer(dataframe, layer_file)   Where am I going wrong?


Any better sotware for Mouse Keys then the default Universal Access?

At times I want to use my external keyboard, but don't have my external mouse around or it's death with batteries, which is the time I wish to navigate my cursor with the keys of my keyboard. So I go with this:    But the navigation is utterly and unusably slow. Even if I put my mouse/touchpad speed to max, it's hardly usable.  Is there any hidden .config file to fix, or other software for that kind of functionality?  Thanks in advance!


Changing left margin in itemize environment of beamer class

I can't figure out how to line up the symbols of an itemize environment in beamer with the left part of the main text. In other words, I would like to supress the left margin in beamer itemize lists.  It would be nice if the solution worked with any itemize label defined with  \setbeamertemplate{itemize item}[]   In order to make myself clearer, what beamer produces by default is something like:  Main text. Main text. Main text...    * Item 1    * Item 2    * Item 3    ....   and the desired result is   Main text. Main text. Main text... * Item 1 * Item 2 * Item 3 ....


I'm trying to run games through Lutris and followed  on installing wine-staging.  When running:  $ sudo apt install --install-recommends winehq-staging   I get the error they predict, but then when running:  $ sudo apt install --install-recommends winehq-staging wine-staging wine-staging-i386   I still have the unmet dependencies error (output below).  Could anyone direct me to a solution?  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wine-staging : Depends: wine-staging-amd64 (= 4.13~bionic) but it is not going to be installed  wine-staging-i386:i386 : Depends: libfaudio0:i386 but it is not installable                           Recommends: libcairo2:i386 but it is not going to be installed                           Recommends: libcapi20-3:i386 but it is not going to be installed                           Recommends: libcups2:i386 but it is not going to be installed                           Recommends: libglu1-mesa:i386 but it is not going to be installed or                                       libglu1:i386                           Recommends: libgsm1:i386 but it is not going to be installed                           Recommends: libgssapi-krb5-2:i386 but it is not going to be installed                           Recommends: libgtk-3-0:i386 but it is not going to be installed                           Recommends: libkrb5-3:i386 but it is not going to be installed                           Recommends: libodbc1:i386 but it is not going to be installed                           Recommends: libosmesa6:i386 but it is not going to be installed                           Recommends: libpcap0.8:i386 but it is not going to be installed                           Recommends: libsane:i386 or                                   libsane1:i386 but it is not going to be installed                           Recommends: libv4l-0:i386 but it is not going to be installed                           Recommends: libva-drm2:i386 but it is not going to be installed or                                       libva-drm1:i386 but it is not installable                           Recommends: libva-x11-2:i386 but it is not going to be installed or                                       libva-x11-1:i386 but it is not installable                           Recommends: libva2:i386 but it is not going to be installed or                                       libva1:i386 but it is not installable                           Recommends: libxcomposite1:i386 but it is not going to be installed                           Recommends: libxslt1.1:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


Is there a general formula for image size vs. print size?

What size images do I need for common print sizes, such as wallet size, 8x10, and 16x20?  Is there a general formula?  How could that size change if, for example, a 16x20 was printed on canvas rather than photopaper?


I want to setup a CMS on WP, which should contain a page, allowing to upload and download big files. We are expecting to use an Apache-server running on Ubuntu.  Assuming to adjust values, such as upload_max_filesize,   which parameter limit the maximum file size what is the maximum possible file size (GB?) Are there other CMS, which allow to upload bigger files?


I am creating an anthology of poems and songs, and have a main file where I am using \input to insert separates TeX files which contain the poems.  I was wondering if there was a simpler way of inserting all of the files in alphabetical order based on filename instead of a separate \input for each file?  Could anybody help?    Thank you to for pointing me in the direction of the other questions - they didn't come up when I googled my queries. I am trying to adapt the code in  but I am getting 2 errors from it. My code is as follows at the moment  \documentclass{minimal}  \makeatletter% \def \app@exe {\immediate\write18}  \def \inputAllFiles [#1]{%   \app@exe{cmd /c dir /b *.tex > \jobname.tmp}   \InputIfFileExists{\jobname.tmp}{}{}   \AtEndOfDocument{\app@exe{rm -f #1/\jobname.tmp}}} \makeatother%  \begin{document}  \inputAllFiles{.}  \end{document}   The errors messages I am getting are both on the line with the \inputAllFiles command and say: Use of \inputAllFiles doesn't match its definition and Too many }'s.  I have tried fiddling around with the code, but noting I seem to do helps. Could anybody help to see where I am going wrong?


How to record the actual running time of a program with other programs running?

When timing the wall time performance of an OpenMP program on Linux while other programs are running, how can I get the actual running time?


Why is the doctor always the last timelord, when the other Timelords can also travel trough time?

Why is the doctor at every point he visits, the last and only timelord?  Shouldn't he be able to travel to the Gallifrey from before the timewar? Or meet some timelords for who the timewar has not happened yet?


I am still stuck with the same problem. CKeditor doenot work, instead the plain text editor gets open. I tried everything from re-installing ckeditor to updating drupal to newer version.when I open any heading and try to open the edit option, it runs very slow. then when it gets open the data is visible in the form of plain text(no ckeditor), i checked the console it shows this error Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience in drupal Please can anybody help


Can a parallel computer simulate a quantum computer? Is BQP inside NP?

If you have an infinite memory infinite processor number classical computer, and you can fork arbitrarily many threads to solve a problem, you have what is called a "nondeterministic" machine. This name is misleading, since it isn't probabilistic or quantum, but rather parallel, but it is unfortunately standard in complexity theory circles. I prefer to call it "parallel", which is more standard usage.  Anyway, can a parallel computer simulate a quantum computer? I thought the answer is yes, since you can fork out as many processes as you need to simulate the different branches, but this is not a proof, because you might recohere the branches to solve a PSPACE problem that is not parallel solvable.  Is there a problem strictly in PSPACE, not in NP, which is in BQP? Can a quantum computer solve a problem which cannot be solved by a parallel machine?  Jargon gloss   BQP: (Bounded error Quantum Polynomial-time) the class of problems solvable by a quantum computer in a number of steps polynomial in the input length. NP: (Nondeterministic Polynomial-time) the class of problems solvable by a potentially infinitely parallel ("nondeterministic") machine in polynomial time P: (Polynomial-time) the class of problems solvable by a single processor computer in polynomial time PSPACE: The class of problems which can be solved using a polynomial amount of memory, but unlimited running time.


Dropout: scaling the activation versus inverting the dropout

When applying dropout in artificial neural networks, one needs to compensate for the fact that at training time a portion of the neurons were deactivated. To do so, there exist two common strategies:   scaling the activation at test time inverting the dropout during the training phase   The two strategies are summarized in the  below, taken from .  Which strategy is preferable, and why?    Scaling the activation at test time:    Inverting the dropout during the training phase:


Converting UTC time to ISO 8601-like format

I would like to convert a UTC time to to the following format (IS0 8601). Eg.  2000-01-01T17:00:00-05:00   Currently I'm using UtcNow.Convert.ToString("s"), which gives me the datetime in the format   2015-12-05T08:49:14   but this skips the time part after the "-" symbol.   Can anybody help on this ?


How to remove a single class only in Javascript using Regex?

(Pure javascript only, please!)   I want to create a helper function that removes a single class from a div with several classes. I'm imagining a function as follows:  function remove_class(div, klass) {     div.className = div.className.replace( /(?:^|\s)active(?!\S)/ , '' ); }   The class removed here is active.  However, how can I remove any class name, ie. one passed as the klass variable?


How can I change my Python 2.7 to 3.5? (I've already changed my bash_profile)

I downloaded Python 3.7, and then I deleted and changed Python 3.7 to 2.7 (using bash_profile, I changed the content in bash profile, just like the image below), and it worked.    But I found that Python 2.7 is too old. So I want to change Python 2.7 to 3.5, so that the version can match with my book. So I am trying to use the way above, but it didn't work.


Begin focusing more on searching than asking

Just a thought. I have noticed that many, many more questions are getting duplicated on SO.   This may be partly due to availability of searching within SO. I know SO questions appear frequently in Google searches with anything relating to that question, but maybe if more of an emphasis was put on the internal SO searching. It could encourage users to browse before getting to the asking stage. Feel free to agree or disagree.


How do you deal with "nested" variables in a regression model?

Consider a statistical problem where you have a response variable that you want to describe conditional on an explanatory variable and a nested variable, where the nested variable only arises as a meaningful variable for particular values of the explanatory variable.  In cases where the explanatory variable does not admit a meaningful nested variable, the latter is usually coded either as NA in the data set, or if it is coded with a value, that value is merely a placeholder that does not have any meaningful interpretation.  This situation tends to arise whenever you have an explanatory variable indicating the existence of a thing, and one or more nested variables describing the characteristics of that thing.  Some examples of this kind of situation in statistical problems are the following:   The explanatory variable is an indicator of whether a survey participant is married, and the nested variable is some characteristic of the spouse (e.g., education, age, etc.); The explanatory variable is an indicator of the presence of an item in a space, and the nested variable is a measure of some characteristic of the item (e.g., size, distance, etc.); The explanatory variable is an indicator of the occurrence of an event and the nested variable is a description of some characteristic of the event (e.g., duration, magnitude, etc.).   In these kinds of situations, we often want to build a regression-type model (in the broad sense that includes GLMs, GLMMs, etc.) describing the relationship between the response variable and the other variables.  It is not obvious how to deal with the nested variable in this type of model.  Question: How do we deal with the nested variable in this type of model?    Note: This question is designed to give a generalised answer to a recurring question on  regarding nested variables in regression (see e.g., , ,  and ).  This question is designed to give a generalised context-independent example of this problem.


java.lang.NullPointerException when using preparedstatement

I am new to java. I have been trying to connect from intelliJ using to postgresql using pgadmin4  I have tried to create a table and it was created but when I am trying to insert data using prepared statement it is giving me an error about nullpointerexception. I understand that it is because something is null but i can't seem to figure out what is null. The error seem to be at the prepared statement  here is the code:   package Datatypes1;  import java.io.IOException;  import java.sql.*;  import java.sql.SQLException;  import java.util.Scanner;    public class Database2 {     Scanner input = new Scanner(System.in);      public static void main(String args[]) throws IOException {       char ans;       System.out.println("Welcome tp the coffee shop management system");       Database2 database2 = new Database2();       database2.connect();       database2.createTable();       do{         database2.obtaindata();         System.out.println("Do you want to enter more data:y/n?");         ans =(char) System.in.read();       }while( ans == 'y');        database2.disconnect();    }  //create the connection String url="jdbc:postgresql://localhost:5432/dreamhome1"; String user = "postgres"; String pass = "postgres";   //database variables Connection con = null; ResultSet rs = null; Statement stmt = null;    //connect with the database public void connect(){     try{         //open connection         con=DriverManager.getConnection(url,user,pass);          //show that is it connected         System.out.println("Connection successful");      }catch(SQLException e){         e.printStackTrace();     } }  //create table in the database public void createTable(){     try{         stmt=con.createStatement();         String sql="CREATE TABLE IF NOT EXISTS product (product_id SERIAL PRIMARY KEY NOT NULL,"+                 "product_name VARCHAR(100) NOT NULL,"+                 "product_price REAL)";         stmt.executeUpdate(sql);         System.out.println("table created successfully!");         stmt.close();     }catch(SQLException e){         e.printStackTrace();      } }  public void obtaindata(){     System.out.println("enter the data you want to insert");     System.out.print("Product Name");     String productname=input.nextLine();     System.out.println("Product Price");     Double productprice=input.nextDouble();     Database2 database2=new Database2();     database2.insertRecord(productname,productprice);  }   public void insertRecord(String prodname,Double prodprice){     try{          PreparedStatement st=con.prepareStatement("INSERT INTO public.product(product_name,product_price) VALUES (nextval('productid_sequence'),?,?)");         st.setString(1,prodname);         st.setDouble(2,prodprice);         int i =st.executeUpdate();         st.close();     }catch(SQLException e){         e.printStackTrace();     } }  //disconnect with the database public void disconnect(){     try{         if(con != null){             con.close();         }          if(stmt != null){             stmt.close();         }          if(rs != null){             rs.close();         }      }catch(SQLException e){         e.printStackTrace();     }  }  }   here is the error:  Welcome tp the coffee shop management system Connection successful table created successfully! enter the data you want to insert Product Name latte Product Price 2.40 Exception in thread "main" java.lang.NullPointerException     at Datatypes1.Database2.insertRecord(Database2.java:80)     at Datatypes1.Database2.obtaindata(Database2.java:72)     at Datatypes1.Database2.main(Database2.java:15)


How long are you supposed to stay out of Israel after your 3 month tourist visa has expired in order to get another tourist visa?  I'm a U.S. citizen, if it matters.


We are building a spatial application targeted to laypeople which will involve viewing and editing vector geodata (currently just points, but linestrings and polygons in the future) with a raster underlay. We'll deploy both web and mobile (iPhone now, Android and perhaps others later) versions. The server is a custom app we are writing, and there are no ESRI products on the server side.  My question, therefore, is: How do we choose which client-side mapping toolkit to use? I'm aware of the following options, are there others?   Google Maps API or similar (Yahoo, MapQuest, etc.) OpenLayers (does it work on mobile browsers?) ESRI's web/mobile APIs   We are particularly interested in the pros/cons of the ESRI APIs under this scenario. Our company does have some kind of relationship with ESRI, though I know nothing about the details (and our group currently has no involvement with ESRI or ESRI products).


Correlation between continuous and binary variables

Is there a way to check for correlation between a continuous variable (year of graduation) and a binary variable (yes/no--took a specific course) with n=85, particularly using SPSS? Our hypothesis is that the earlier the graduation the year, the less likely the individual would have had this course. If correlation won't work, can you recommend another statistical test?


Can I buy PSN games and DLC without giving Sony my credit card info?

In light of the recent security problems at Sony, I'm very hesitant of giving PSN my credit card info.  Is it possible to buy games, DLC, etc. without giving my credit card to PSN?


I'm messing around with sed for fun and have a little function I found that replaces a few characters:  sed 's/"p"$/0/;s/"e"/1/' sedtext.txt   Where sedtext.txt is as follows:  1, 2, 6, 7, "p"  1, 6, 7, 2, "e"    When I do the following I get the desired output:  sed 's/"p"$/0/;s/"e"/1/' sedtest.txt > sedtest2.txt    But when I try to overwrite the input file with the output I get a blank file:  sed 's/"p"$/0/;s/"e"/1/' sedtest.txt > sedtest.txt    Why is this the case?