Feed algorithm changed? Lots of duplicates

I think the algorithms deciding what I should see in my feed have been changed recently. It used to work very well but for the last week or so I've been getting lots of duplicates (see screenshot attached). Please change it back!  Device: HTC 10  OS: Android 6.01


Is it possible to enable  (CORS) in OpenLayers?  If so, how?  I have a web map in OpenLayers, and I'm using an HTML canvas to render it as a PNG image.  My script works great, but due to the browser's , I can only convert my canvas to an image if all the map tiles I've drawn to it come from the same host (e.g. sub.domain.com).  To boost my map's loading speed, I pull tiles from an array of subdomains: a.domain.com, b.domain.com, etc.  This greatly improves performance, working around the browser's limit of four simultaneous connections per host, but prevents me from ever converting my canvas to an image, as the tiles come from multiple hosts.  I'm trying to use  to work around this problem.  I've set the appropriate Access-Control-Allow-Origin response header for the tileset I serve with PHP, but this doesn't have an effect.  I suspect this is due to not having the Origin header in the request (as shown in the example on the Wiki page).  It would seem that some OpenLayers configuration is required.  But what?  Has anyone else done this successfully?


Need help in proving that $\frac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$

We need to prove that $$\dfrac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$$  I have tried and it gets confusing.


My domain is with GoDaddy and im aware they have an issue with CNAME entries including @.  IS there a way i can resolve this issue?  What im trying to achieve is having the domain CNAME entries point to my DDNS so if ever i change my ip for whatever reason i curl back there to update it.  Now the problem i always had this. when i go to www.domain.ca it works just fine. but when i put in domain.ca in incognito or try to ping it it cant resolve saying it cant find the ip/hostname.  I have 2 entries for CNAME and no A record. one with * and www pointing to the same DDNS. Is this the correct way to put in a wildcard?  My settings in nginx are as follows.  server {     listen 80;     listen 443 ssl default_server;     listen [::]:443 ssl default_server ;     root /home/web/wordpress/;     index index.php;     server_name LANIP domain.ca www.domain.ca DDNS.ddns.net;     ssl_certificate     /etc/letsencrypt/live/www.domain.ca/fullchain.pem;     ssl_certificate_key /etc/letsencrypt/live/www.domain.ca/privkey.pem;     access_log /home/web/wordpress/access.log;     error_log /home/web/wordpress/error.log notice;     location / {         try_files $uri $uri/ /index.php?$args;     }     location ~ \.php$ {         include snippets/fastcgi-php.conf;         fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;     } }   Let me know what am i doing wrong.


Why is Ubuntu Software Center dropping previously provided applications?

Ubuntu Software used to provide Pinta, KolourPaint, Audacity, and others, but they are no longer available there. I have to use apt to install them.   Why has Ubuntu Software 3.20.5 stopped providing applications that it used to?  Ubuntu 16.04 Ubuntu Software Center 3.20.5  Thanks in advance for your help!


Evaluate an proper integral:$\int_0^\infty x\left(\log\left(\frac1{x^2}\right)\right)^n dx$

$$\int_0^\infty x\left(\log\left(\frac1{x^2}\right)\right)^n dx$$  put $\log\left(\frac1{x^2}\right)=y^{1/n}$  $$I=\frac{\ln10}{2n}\int_{-\infty}^\infty10^{-y^{1/n}}y^{1/n}dy$$  put $10^{-y^{1/n}}=e^{-t}\implies$  $$I=\frac1{(2\ln10)^n}\int_{-\infty}^0e^{-t}t^ndt+\frac1{(2\ln10)}\int_0^\infty e^{-t}t^ndt$$  $$I=\frac1{(2\ln10)^n}\int_{-\infty}^0e^{-t}t^ndt+\frac{\Gamma(n+1)}{(2\ln10)}$$  I want to know how can I evaluate the first integral in the last step of my turn I used some substitutions so i get two integrals one of them converted to the formula of gamma function but the second could not be so because the domain of integration is different ? $n$ is a natural number


Can I use SharePoint Designer 2013 to edit SharePoint 2010 sites?   Couldn't find this info in the web.


Why is it important that a basis be orthonormal? The requirement for Orthonormal basis is so often repeated in linear algebra that it seems linear algebra depends on it as requirement. What is gained (or lost) if the basis are not orthonormal? Is it just for convention and convenience or is it just to restrict to the type of problems that assumption of orthonormality is beneficial?


Possessive Form of a Proper Noun Ending in a Plural Noun Ending in "s"?

I don't think this has yet been covered in .  There was , however, it was not specifically talking about the case where the proper noun ends in a plural noun.  Feel free to vote to close if I am wrong.  What is the correct way to make a proper noun ending in a plural noun ending in an "s" possessive?  This frequently happens with corporations, e.g., "Dunkin' Donuts."  Should one work off of the fact that the entity is singular—suggesting Dunkin' Donuts's—or should one work off of the fact that "Donuts" is plural and ending in an "s"—suggesting Dunkin' Donuts'?  I expect that the answer might depend on dialect because some regions refer to corporations in the singular form ("Dunkin' Donuts is a company") while other regions refer to corporations in the plural form ("Dunkin' Donuts are a company").  I am specifically interested in American English, but would be interested in hearing answers for other dialects too.


How do I reduce noise in renderings with Cycles?

I am new to Blender with v. 2.80 and I wanted to ask how to reduce the "noise" in renderings with Cycles. It just doesn't want to render it correctly.


Blender multilayer EXR to Photoshop, how to set up my layers to obtain the final image?

How should I set up each layer to get the final image? I tried to set them all on "multiply" but it doesn't look right. I'm using the 3d-io EXR plugin for Photoshop but I can't find any tutorial to help me, because apparently when you import the multilayer EXR into photoshop the layers should be already set up, but my layers are set to "normal".


If somebody calls you "Hello Trouble", what does it mean?

What does it exactly mean if somebody says "Hello, Trouble" to you?  One of my colleagues said "Hello, Trouble" to me this morning.  I just replied "Hi", as I was not sure what to say.   So just wanted to check what exactly Trouble here means...


"waiting for network configuration" Problem

This problem happens sometimes when ubuntu starts up. You can't really boot to the interface sometimes.  Splash Screen with the 5 dots and a message saying:     waiting for network configuration   followed by:     waiting an additional 60 seconds for network configuration


The version of flash player installed in my ubuntu is 11.2.xxx  Adobe says this is the last version they are going to produce for the Linux operating system and they're not going to release further versions for Linux.   Is it possible to use the flash player ppapi plugin that chrome uses in firefox so that the latest version can be used in ubuntu?


Startup error BackgroundContainer.dll on windows 8.1

I have the same problem with this topic!   The thing is i did everything that says in answer but  i)I found nothing when i started regedit.exe and searched (F3 or CTRL+F) for BackgroundContainer.dll  ii)I made a full scan with AntiVirus Scanner like Microsoft Security Essentials/ Defender and also i scaned my PC with Malwarebytes' Anti-Malware,but i found nothing.  So this pop up message on start up keep appeared!  any idea?  I know you will say that its a duplicate of this topic but when i did that question the deleted it and said if you have a question post it!Sorry about that.  Thank you!


Cron job is running but not executing entire script

I have a script which is being run via crontab.  It seems to not be running the NMAP portion.  #!/bin/bash DATE=$(date +%Y%m%d_%H%M)_MVT_INT_DEV nmap -p0 -oG /home/tyler/NMAP/$DATE.gnmap -iL ip-list.txt awk -F" " -v date="$(date)" '{print "\"" $2 "\",\"" $3 "\",\"" date"\""  }' /home/tyler/NMAP/$DATE.gnmap > /home/tyler/NMAP/$DATE.txt   The last output file gets created but the first .gnmap file does not.  I'm sure that its something i screwed up. The script runs great on its own but not via cron.  Nov 13 07:00:01 kali /USR/SBIN/CRON[4405]: (root) CMD (/home/tyler/NMAP/mvt-int-devices.sh) Nov 13 07:00:01 kali /USR/SBIN/CRON[4404]: (CRON) info (No MTA installed, discarding output)


I want a splash screen to show while the application is loading. I have a form with a system tray control tied to it. I want the splash screen to display while this form loads, which takes a bit of time since it's accessing a web service API to populate some drop-downs. I also want to do some basic testing for dependencies before loading (that is, the web service is available, the configuration file is readable).  As each phase of the startup goes, I want to update the splash screen with progress.  I have been reading a lot on threading, but I am getting lost on where this should be controlled from (the main() method?). I am also missing how Application.Run() works, is this where the threads for this should be created from? Now, if the form with the system tray control is the "living" form, should the splash come from there? Wouldn't it not load until the form is completed anyway?  I'm not looking for a code handout, more of an algorithm/approach so I can figure this out once and for all :)


Probability Density Function (PDF) Intuition

I know what is Probability Density Function and its application in Machine Learning and Statistics. The problem I faced is that how does it being calculated? For a specific example like the probability of amount of rain in a rainy day, the researchers measure the rain amount for specific period of time and they make a function for that (frequentist approach)? More specifically, The question is about how the following diagram is obtained?  PS It's not related to , because I asked how to create a diagram like the following diagram!


Topology proof: dense sets and no trivial intersection

I was wondering if this proof of this basic topological result concerning the  closure works.  Proposition: Let $A \subseteq (X,\tau)$. Then, $A$ is dense in $X$ if and only if every non-empty open subset of $X$ intersects $A$ non trivially. Proof: [only if] Assume that $A$ is dense in $X$. This means that $A \cup A' = X$, where $A'$ denotes the set of all the limit points of $A$. Let $G \in \tau$ be non-empty. Thus, $G \subseteq (A \cup A') = X$. Hence, either $G \cap A \neq \varnothing$, which establishes the result, or $G \cap A' \neq \varnothing$, which leads to a contradiction. [if] Assume that $A$ is not dense in $X$. Thus, there is a $x^* \in X \setminus (A \cup A')$. Notice, that $X \setminus (A \cup A')$ is open, because $A \cup A'$ is closed, and it is not empty. Hence, we can conclude by realizing that $X \setminus (A \cup A') \cap A = \varnothing$, which completes the proof. $\square$  It is one of the first proofs I attempt in topology, and I am not planning to see how it is proved in the book I am reading (unless you answer me that my proof is completely wrong). Thus, I am really looking forward to any feedback, also contentwise. Thank you for you time.


Trying to vertically align  and , however, margin and padding do nothing when applied

I'm just trying to vertically align the image and the text so that the text is between the top and bottom side of the image ( the image's height is bigger than the text's ) but applying margin/padding to the
 class does nothing.    .navUsernameP {   display: inline;   color: #fff;   text-align: center;   text-decoration: none;   white-space: nowrap;   margin-bottom: 10px; }  .navUsernameLi {   float: right;   margin-top: 10px; }  .navProfilePicture {   display: inline;   border-radius: 50px;   vertical-align: inherit;   height: 24px;   width: 24px; }

Username


Why did Hydra want to kill Doctor Strange?

Based on The Winter Soldier, we know that Doctor Strange is on Hydra's list of potential enemies.  Do we know why he was on that list?


I'm considering bottling salad dressing but I'm not sure of the shelf life. The ingredients for some are - prunes (or figs), lemon, olive oil, ginger, garlic and water and possibly some xanthan gum.  Can you tell me what the best way to bottle this and how long it will keep once bottled and then how long after when it's opened?   Also, I may consider keeping this as a thicker 'dip' recipe as well. How would I bottle that?


Inequality similar to the Schwarz-Pick theorem

I am trying to prove that:  Let $f$ be analytic in the closed unit disc with $f(z)\leq 1$ for $|z|\leq1$.  For a given $0<r<1$ and $|z_1|,|z_2|\leq r$, $z_1\neq z_2$ then,   $$\left|\frac{f(z_2)-f(z_1)}{z_2-z_1}\right|\leq \frac{1}{(1-r)^2}.$$  My attempt is: part a  of the question asks to prove $$\left|\sum_k^\infty a_nz^n\right|\leq \frac{ |z^k|}{1-|z|}.$$   So, \begin{eqnarray*}  \left|\frac{f(z_2)-f(z_1)}{z_2-z_1}\right|&=& \frac{|\sum_1^\infty a_nz_2^n-\sum_1^\infty a_nz_1^n|}{|z_2-z_1|}\\  &\leq& \frac{\frac{ |z_1 |}{1-|z_1|}+\frac{ |z _2|}{1-|z_2|}}{|z_2-z_1|}\\  &\leq&\frac{1}{(1-r)^2} \frac{   |z_2| ({1-|z_1|})+  |z _1| (1-|z_2|) }{|z_2-z_1|}\\ \end{eqnarray*} But could not prove that the last term is controlled by 1.


How do I get the string with name of a class?

What method do I call to get the name of a class?


Algorithm to calculate the number of divisors of a given number

What would be the most optimal algorithm (performance-wise) to calculate the number of divisors of a given number?  It'll be great if you could provide pseudocode or a link to some example.  EDIT: All the answers have been very helpful, thank you. I'm implementing the Sieve of Atkin and then I'm going to use something similar to what Jonathan Leffler indicated. The link posted by Justin Bozonier has further information on what I wanted.


for example:     has a few responses which involve the bash ${#x} construct.  It incorrectly treats the hash like a comment.  Questions:  1) What engine is used for syntax highlighting?  2) If SE an external engine, is there a way that we lowly users can make upstream changes that could be pushed?


Is there a way to retrieve all cities in the world from OpenStreetMap?

I have tried to retrieve them from the api with the following:  wget -O allcities.xml "http://www.overpass-api.de/api/xapi_meta?node[admin_level=8]"   however it does not seem to return all of them. From the doc Admin Level 8 should be cities, towns and villages but it seems to only contain major cities. I get a list of about 12000 nodes.  I am actually looking into getting all inhabited places on earth with at least 1000 population.  I am also downloading the whole planet in PBF format, in case using the API is not possible. How would I be able to achieve the same using such file?


Is the sum of Lebesgue-zero sets still a Lebesgue-zero set?

Question: Given $A,B \subseteq \mathbb{R}$ with lebesgue-measure zero, is the set $$ A + B := \{ a + b \mid a \in A,\,b \in B\}$$ also of lebesgue-measure zero?  I have not yet taken any measure theory courses; up until now I know the Lebesgue integral and what a measure zero set is. I cannot think of an example (or counter-example) myself, and am keen to see what you think.


The main header (Save File etc) has disappeared. How do I get it back?


For $x_1,..,x_n \in \mathbb{R}$, what is the value of $\mu$ that minimizes $\sum_{i = 1}^{n}|x_i-\mu|$? What about $\sum_{i = 1}^{n} w_i |x_i-\mu|$ for $w_i \geq 0$?  I'm pretty sure in both cases the answer is the average of the $x_i$, and when you introduce the weights it's just the weighted average.   I'm not sure how to prove this though, and would appreciate any help.


I can't 'Screen Share' on my MBP with OS X Yosemite

Specs: Macbook Pro Mid 2012 OS X 10.10.4  I'm not able to Share my screen with my friends. I want to connect with my friend's Macbook (which is not in my network, different city) for troubleshooting purposes, & so I tried Screen Sharing from Messages App:    After I click 'Ask to share screen', it does send a request to the other Mac for permission, after he click on 'Allow', nothing happens!?  [ The Screen Sharing option is turned ON & Remote Management is turned OFF, on my Mac as well as on my friend's Mac.]    How do I connect with his computer, & control it over internet, It'll be very convenient for troubleshooting purposes.  Thanks!


I've downloaded a patch from some site and trying to apply it (twisted, python web framework).  Several hunks failed.   How do I automate manual patching process using vim?  Details:  I'm trying to automate the process of applying failed hunks.  Many tiny changes, each about adding/removing 1-2 chars. Difficult to see.   I Have to create two new temporary files and :diffthis them manually to see the difference. Yes, outside VCS.  I can imagine a neat way to deal with it using git, but I would prefer to avoid creating git repo for that.


how to launch a cmd exe at current working directory with shortcut?

My OS is Win7. When I need to open a cmd.exe at current working directory, I will press "shift" key and right click the screen and I will get "Open command window here". Is there any faster way?


Travelling to Italy before heading to Greece

I am a Filipino currently holding a Greece National Type D visa. Before traveling to Greece, however, I would like to stay in Italy for 3 weeks.   Will I have any problems at the Italian airport if I show up with this visa only? I was told I need to go to Greece before I could travel to Italy. I would like to know if anybody had a similar experience before.


How to find the time complexity of modular multiplication?

There are two number of length m bits. How do I prove that the complexity of modular multiplication of these two numbers is $O(m^2)$.


Find all even natural numbers $n$ such that the following is true:   There is a non-constant function $f : \Bbb{R}^2 \longrightarrow \Bbb{Z}_2$ such that for any regular $n$-gon $A_1...A_n$, $f(A_1) + \cdots + f(A_n) =0$.   NOTE: This is the unsolved part of   problem. I chose to state it in a separate question first to get more attention and second since some people may want to put a bounty on this part.


For a complex number $A$ and a real number $B$, when does the well-known formula $(e^A)^B = e^{AB}$ fail? Or does it hold at all for complex A?     Since $e^{2\pi i} = 1$, if this formula holds for all complex numbers $A$ and real numbers $B$, then it would imply that $e^{2\pi ti}=( e^{2\pi i} )^t = 1^t=1$ for all $t$, which is obviously false.


Finding the copula that obeys a sum constraint

I am wanting to sample from a distribution with uniform marginal distributions but with an interesting joint structure. Let the random vector be denoted $X = (X_1, X_2, \ldots, X_n)$ with $X_i \sim \text{uniform}(0,1)$. The random vector has the dependence structure $AX \leq b $ where A is a $q \times n$ matrix and $b$ a length $q$ vector (so I have $q$ linear constraints on $X$). The constraint I care about most is $\sum_{i=1}^N x_i \leq 1$. If we consider a 2D example $X = (X_1, X_2)^T$ we have that $f_{1,2}(x_1, x_2) = f_1(x_1)f_2(x_2)c(x_1, x_2)$ hence the joint density is just the copula density (since uniform implies $F(x) = x$). By Sklar's theorem there must be a copula that exists. Most the copula I know of are essentially symmetric apart from e.g. the skewed Normal/Skewed-$t$ copula. Fairly naive random sampling doesn't give us the required density. Any idea on how I could construct such a copula for direct sampling? Or even construct e.g. a markov chain which targets the correct distribution?


Permission Denied While Running Program in IDE

I'm very new to Ubuntu and Code so apologies if some stuff isn't understandable. I was trying to run a file after building it in a IDE (Code::Block) and the file popped up as this:  The program was a very simple Hello World program that looks like this: using namespace std;  int main() {    cout << "Hello, world!" << endl;    return 0; }```


Reading an XML and Parsing as Class and Properties

I am trying to read an XML file which is generated by Matlab (a XML representation of Simulink Model). For the sake of question I have shortened it.  Below is the XML.   <?xml version="1.0" encoding="utf-8"?> <ModelInformation Version="1.0">   <Model Name="MatlabToJenkinsIntegrationSample">
9.0

windows-1252
     <GraphicalInterface>
3
       <Inport Name="Input1">

off

-1

inherit
       </Inport>       <Inport Name="Input2 ">

off

-1

inherit
       </Inport>       <Inport Name="MultiplicationFactor">

off

-1

inherit
       </Inport>
1
       <Outport Name="Result">

off

inherit
       </Outport>

1.4

0

0
            </GraphicalInterface>   </Model> </ModelInformation>   I had a look at it and it gave a clear Class and it's properties(for me). So I generated the classes as shown below  public class Model {     public string Name { get; set; }      public string Version { get; set; }      public string SavedCharacterEncoding { get; set; }      public GraphicalInterface TheGraphicalInterface { get; set; } }  public class GraphicalInterface {     public List<InPort> InPorts { get; set; }      public List<OutPort> OutPorts { get; set; } }   And Similarly for InPort and OutPort.  Now the question is that how do I parse it into these classes. I can not wrap my head around it. Creating classes looks logical but after that I am not able to progress at all.   Please provide the input and a solution. There are no values as there in normal XML file. I have looked at certain examples but not able to find a solution.


QGIS Layer Order Panel - add layers at top of layer order

I have a QGIS workspace in which the order of the layers is controlled by the Layer Order Panel.  When I add a layer it automatically ends up at the bottom of the order and has to be manually shifted to the top so that it's visible.  Is it possible in the options to specify that added layers end up at the top of the layer order instead of the bottom?


Bilinear form with symmetric "perpendicular" relation is either symmetric or skew-symmetric

Let $b$ be a bilinear form on a finite-dimension vector space $V$ (over a field with char $\neq$ 2) such that for each $x,y\in V$ one has $b(x,y)=0\Leftrightarrow b(y,x)=0$. Prove that $b$ is symmetric or skew-symmetric.  The condition is equal to this: for every vector $x$ co-vectors $b(\cdot,x)$ and $b(x,\cdot)$ have the same kernels, so for some non-zero  constant $c:b(\cdot,x)=cb(x,\cdot)$. But I didn't manage to prove that $c$ is equal to $1$ or $-1$ for every $x$.


Doubled Skype window when clicking notification in Windows 10

I have a weird experience with Skype installed on one of my Windows 10 1903-based computers.   Whenever:   I have Skype opened and minimised to tray bar (notification area / clock), I see some Skype notification and click it,   Skype brings back its window and then opens another one, an exact copy, over that one:    The second "copy" of main Skype windows (opened after clicking notification) is not operable at all.  I cannot:   react with any image (clicking "react to this message" brings no effect), switch to another chat using left sidebar (clicking brings no effect), write anything in current chat, etc.   This happens only:   on one of my PCs, all others (with the same Skype and Windows version) works OK and opens only one copy of main Skype window after clicking a notification, when Skype is minimised to tray bar (works just fine, if it is minimised to task bar).   I don't know, if this is relevant, but I have also noticed that when I have Skype minimised to tray bar then, after clicking its tray bar icon:   it takes 2-3 seconds of wheel spinning before main Skype window displays any content, Skype always open on "Welcome name instead of the chat, I've been in recently.   I have configured my Skype to minimise to task bar on clicking "minimise" and to notification area on clicking "close" (I have disabled minimising Skype directly to notification area), if that matters.  Is there anything I can do with this? Is this some sort of bug? I must admit that it is pretty confusing and irritating that I have to close the second, not operative "copy" of main Skype windows (that appears after each click on Skype notification) to be able to interact with Skype in any way.  Edit: I have Skype for Windows 10 downloaded from Microsoft via Microsoft Store app, so this is not Skype for Desktop.


Creating if statement of url content in java

I am trying to make a login system in java by using the result that a page gives me when getting the page's content over java like when i get the data from       http://localhost/java.php?un=dubking&password=password   when the login credentials are correct that page will only show "true" as html but when i use the array that has the data from that page wich actually has "true" in it in an if statement the if statement doesn't work, is there something I did wrong or is this just not possible in Java?  import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; class test2 {     public void calc() {         try {              URL yahoo = new URL("http://localhost/java.php?un=" + username + "&password=" + password);              BufferedReader in = new BufferedReader(                      new InputStreamReader(yahoo.openStream()));              String inputLine;               while ((inputLine = in.readLine()) != null) {                  // Process each line.                 String html = inputLine;                 if (html == "true") {                     System.out.print("You have successfully logged in.");                 } else {                     if (html == "false") {                         System.out.println("Wrong username or password.");                     }                     if (html != "true" && html != "false") {                          System.out.println("something went wrong.");                         System.out.println(html);                     }                 }             }              in.close();           } catch (MalformedURLException me) {              System.out.println(me);           } catch (IOException ioe) {              System.out.println(ioe);          }       } }


G acts on X transitively, then there exists some element that does not have any fixed points

Let $X$ be a transitive $G$-set. ($G$ acts on  $X$ transitively.) If $X$ is finite and has at least two elements, show that there is some element $g$ $\in$ G which does not have any fixed points; that is, such that $g$$($$x$$)$ $\ne$ $x$ for all $x$ $\in$ $X$  I am trying to use contradiction, but it is not very clear to me why this is true.


How to add horizontal space between two centered subfigures?

I have the following LaTex code:  \begin{figure}[H]   \begin{subfigure}[b]{0.2\textwidth}       \includegraphics[width=\textwidth]{imgs/high_accuracy_Low_precision.png}     \caption{low accuracy, low precision}   \end{subfigure}   %   \begin{subfigure}[b]{0.2\textwidth}      \includegraphics[width=\textwidth]{imgs/high_precision_Low_accuracy.png}     \caption{low accuracy, high precision}   \end{subfigure}   \label{fig:4foldcross} \end{figure}   The output result is:    How can I make some space in between these images?


Initialize Button Different class in java

I got a problem when I build a class to use its own module like VB.net, because I don't want to initialize the Button's Label and TextField a lot of line in everyday, but I got an error when button didn't initialize it.   When I try to build the program below, I get the following error:      Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at EmployeeGUI.AddLayout(EmployeeGUI.java:57) at EmployeeGUI.(EmployeeGUI.java:28) at EmployeeGUI.main(EmployeeGUI.java:89)   Here is class code:  import java.awt.Button;     public class Init{         public static void initButton(String btntxt,Object...btn){             String[] btnT = btntxt.split("\\\,");             for (int i = 0; i < btn.length; i++) {                 btn[i] = new Button(btnT[i]);             }         }    }


Is using "Sirs" when addressing a group of men incorrect?

When I was in the Army, I was taught that you addressed an individual officer as "Sir" or "Ma'am". You address groups of officers as "Gentlemen" or "Ladies", not "Sirs" or "Ma'ams".  Example: Approaching a group of male officers, I would salute and say "Good morning, gentlemen" not "Good morning, sirs."  Now, whenever someone says "Sirs", I cringe.  It sounds as bad as if someone said "Ma'ams".    But is it actually incorrect, or is it strictly an Army thing?  Note: I'm not talking about the rare situation where you might be introducing someone to a group of knights and saying "May I present Sirs Galahad and Lancelot"


Why is invisibility the power granted by the One Ring?

Why is non-optional invisibility the one active supernatural power granted to non-Sauron wearers of the One Ring?  I'm looking for an answer explaining authorial intent, not an in-universe answer. Normally I wouldn't consider such a question answerable but considering the astounding level of Tolkien scholarship I hope it's reasonable.  Some question context is needed and there's no eloquent way to word this. If your exposure to LOTR is the recent movies, the thought may cross your mind:     Wait, what? Did Frodo just put on the ring of ultimate power to... run away!?   With the context and baggage of modern fiction tropes in our minds, this feels weird. In a movie made today we would probably expect a super powerful doomsday ring to grant something along the lines of Superman- or Jedi-style powers at the cost of evil insanity. Invisibility is usually not a power that modern fiction associates with either the upper tiers of power or with villainy.  All of the aspects of the One Ring being evil, corrupting, only loyal and intended only for its creator, and that its true power is control of others do fit in the current ecosystem of fiction. Very specifically, what feels weird is that the one active supernatural power is non-optional invisibility.  I'm not trying to make any judgments, or saying that all modern fiction is or should be identical. I just think these are reasonable, if brief, characterizations.  All of that said, the One Ring breaks with a (modern) audience's expectations. Is this intentional? Would this have felt weird to the original readers? If so, is there a known rationale?  I haven't read any of the books so try to bear with that in your answers.


Why am I getting different results from a query vs. a view

The base problem I'm facing is that I need the latest record for each item.    A little setup... MySQL 5.6.14.  I need to create two views (because MySQL won't let me have a subquery in a view).  My first query sets up the data like this.  select      `inventoryrecords`.`inventoryrecordid` AS `inventoryrecordid`,     `inventoryrecords`.`logicaldeviceid` AS `logicaldeviceid`,     `inventoryrecords`.`passrfid` AS `passrfid`,     `inventoryrecords`.`tagepc` AS `tagepc`,     `inventoryrecords`.`currentstate` AS `currentstate`,     `inventoryrecords`.`statedateutc` AS `statedateutc`,     `inventoryrecords`.`ownerobjectid` AS `ownerobjectid`,     `inventoryrecords`.`ownerobjecttype` AS `ownerobjecttype` from     `inventoryrecords` where     1 order by `inventoryrecords`.`statedateutc` desc   Then I can restrict everything to just the last record for each TagEPC with my "real" query like this.  select      `lastinventoryrecords_step1`.`inventoryrecordid` AS `inventoryrecordid`,     `lastinventoryrecords_step1`.`logicaldeviceid` AS `logicaldeviceid`,     `lastinventoryrecords_step1`.`passrfid` AS `passrfid`,     `lastinventoryrecords_step1`.`tagepc` AS `tagepc`,     `lastinventoryrecords_step1`.`currentstate` AS `currentstate`,     `lastinventoryrecords_step1`.`statedateutc` AS `statedateutc`,     `lastinventoryrecords_step1`.`ownerobjectid` AS `ownerobjectid`,     `lastinventoryrecords_step1`.`ownerobjecttype` AS `ownerobjecttype` from     `lastinventoryrecords_step1` group by `lastinventoryrecords_step1`.`tagepc` order by `lastinventoryrecords_step1`.`statedateutc` desc   When I try to select * from the "real" view, I do not get the data I expect.  However when I run the query with the sub-query in a window I do.  select * from (  lastinventoryrecords_step1 ) group by tagepc order by statedateutc desc   yields incorrect data whereas   select * from (     select          inventoryrecordid,         logicaldeviceid,         passrfid,         tagepc,         currentstate,         statedateutc,         ownerobjectid,         ownerobjecttype     from         inventoryrecords     where         1     order by statedateutc desc ) as t1 group by tagepc order by statedateutc desc   yields the right data.  What in the heck is going on?  What am I missing?


I am getting impossible captcha when trying to answer a question

I tried to answer  and i keep getting impossible captcha like    I can't see anything. Pls I am not a bot or script but this captchas I have been getting after refreshing are quite Impossible.


Google Search and YouTube search change spelling to spelling with zero results

NOTE:  does not answer this question. The suggested fixes in this question is to set up FB, IG, and other social media pages. We have had these for months. We have 576 Instagram followers, 293 followers on Facebook, 17,425 views on Vimeo, Youtube, Pinterest and LinkedIn presence. Here is the response in a YouTube search:  Let's be clear. If you search for my company name and product name YT changes the spelling to something that doesn't exist and suggests a video with no matching result terms (using either spelling) disparaging OTHER luxury handbags, while leaving the viewer with the impression it is referring to our handbags. Google When a user searches for our business, , Google changes the spelling to Aslan Vaughn and displays these results:  If you misspell part of the name (aslan vaugn or aslaen vaughn), it shows my company at the top of the results. For the first few months it just seemed like it was taking some time to percolate, but over 7 months we have had 17,500 unique visitors and 90 backlinks.  The only results for Aslan Vaugn is the birth announcement of the second child of a musician in New Jersey. It is a Facebook post and has 14 likes. Google is favoring a spelling that has only two results with 14+ views over my company with dozens of results and tens of thousands of views. How is this possible? An FB post with 14 likes is that much more popular than a business with 17,500 unique visitors and 40,000 page views (despite the Google obfuscation)? Do I have an enemy at Google? On other search engines my company covers the first few pages in results. Through Google, you cannot find our company no matter how many pages in you go. Unless you search for the term in quotes, . In which case we cover the first few pages here like in the other search engines:


Does the "truncation function" $\langle a,b\rangle : \mathbb{R} \rightarrow \mathbb{R}$ have an accepted name or notation?

Given real numbers $a$ and $b$ satisfying $a \leq b$, define:  $$\langle a,b\rangle (x) = \mathrm{min}(b,\mathrm{max}(a,x)) = \mathrm{max}(a,\mathrm{min}(b,x))$$  (These numbers are equal because $a \leq b$. See  for some relevant abstract generalities.)  So basically, the function $$\langle a,b\rangle : \mathbb{R} \rightarrow \mathbb{R}$$ has the effect of "truncating" a real number so as to lie in the interval $[a,b]$.  This function shows up implicitly in one of my applied math homework assignments. We're modelling the amount of fluid in a reservoir; due to rainfall or evaporation, the volume changes, but it always remains between $0$ and $V_\mathrm{max}$, and hence the function $\langle 0,V_\mathrm{max}\rangle$ implicitly shows up in our numerical model.  I'll bet the function $\langle a,b\rangle$ shows up all over applied math, so:     Question. Does this function have an accepted name or notation?


How to read just before EOF from a file and put it into a string?

My function reads a file and puts it into a string in order for me to process it. I need to read just before EOF, obviously. The problem is that the EOF character is also put inside the string and I can't find a way to bypass it, since it leds other parts of the program to fail. I link the function below.      string name_to_open, ret = string();     ifstream in;      getline(cin, name_to_open);     in.open(name_to_open.c_str());     if (!in.is_open()) {         cout << "Error." << endl;         return string();     }     else {         ret += in.get();         while (in.good()) {             ret += in.get();         };     };     in.close();     return ret;   The function reads fine until the end of the file, then appends EOF and \0. How can I solve the problem? Does the EOF character work fine in controls? I also tried to put a line ret[ret.size() - 1] = '\0'; at the end of the cycle, but this doesn't seem to work either.


How to get back Windows 10 [UEFI] after Legacy installation of Fedora 24?

So I have encountered the problem above mentioned. It might not be specific to Ubuntu, but it is Linux in general. The specifics are that I have created a separate 20gb partition for its installation and installed in legacy mode.  After the installation, I'm able to use Fedora well but only in Legacy mode (obviously).  When I change the BIOS, which I am able to access somehow, to UEFI, it is mentioning that no disk was found, and hence I cannot boot windows.  In Fedora when I check the partition, every bit of data is intact in C, D, and E drives regarding windows files, i.e. same before and after installation. I even checked the partitions and found that Microsoft and Windows files are there. So I'm assuming I have not replaced or tampered with Windows 10 OS.  There is a separate partition with Linux (20gb one). It consists only of Linux installed files.  Can anyone please help with restoring the Windows 10 OS back??   PS: I don't necessarily need Fedora to still be there, if uninstalling is required I'll do it, just need Windows back


How to follow someone else's Stack Exchange (questions) filter

The -interest list  and  has decided to use both Stack Overflow for questions and Google groups dicussions for ANTLR users. There seems to be problems with new Stack Overflow users trying to effectively monitor the ANTLR tags. I created a  for just the ANTLR tags, but how do I allow others to follow it? Do I just give the link as I did here? (I would not be surprised if this is a duplicate, I just could not find the original.)


How do you take profit from stock trading while keeping capital invested?

Suppose you buy stocks from company FOOBAR at price X. After a while, the price is Y = X * 1.25, so you decide you want to collect that 25% profit. You sell the stocks, cashing out your original X plus a 25% profit. Yay! You made money. But haven't you also put yourself out of the trading business by not having stocks anymore? If you just want to take profit but also continue investing, you collect the 25% and you are back to having just X to invest. Now stocks from FOOBAR are too expensive for you (current value is Y). What do you do? Do you select another cheaper (pontentially worse) stock just to be able to buy it? You wait until FOOBAR price is X again? (losing time and also maybe the stock is not as attractive now?). Does this mean stocks are mainly for the long-term-collect-once type of investment? How do short/middle term traders make money, without falling in a diminishing returns type of situation? Thanks!


Does Windows 7 actually defragment an SSD drive if you tell it to?

Defragmenting an SSD drive is a bad idea and Windows 7 is (should be?) smart enough not to schedule defragmentation on such drives.  However, I've opened up Disk Defragmenter on my system and found, to my surprise, that my SSD has indeed been defragmented... recently!  Then I checked the disks selected for the scheduled defrag (I have one SSD and one normal disk), and there the list correctly shows only the non-SSD drive.   MSDN forum post seems to suggest that, at least on Windows 8, defragmenting an SSD drive will just cause the TRIM command to be sent to the drive, but there's no word on what actually happens if you try to defrag an SSD drive on Windows 7 (aside from the fact that it shouldn't happen automatically).  What happens in Windows 7 if one chooses to defrag and SSD? What could possibly have been the reason my SSD drive got been defragmented?  EDIT:  I just remembered - I've moved some folders (Users and ProgramData) from my SSD drive to my normal drive using junctions.  question suggests that this shouldn't have any effects at all on the defragmentation process, but could it have an effect on the "last run" in Disk Defragmenter?


The question is as follows.  Imagine we have two closed geodesics on a surface, where these two geodesics bound a cylinder together and the geodesics are diffeomorphic to circles.  Can the cylinder have $K>0$ everywhere or $K<0$ everywhere?  Here $K$ is Gaussian Curvature.   What's confusing me about this question is that a cylinder has Gaussian Curvature of $K=0$ everywhere, so wouldn't the answer to both questions be no?  But then I don't get the point of the question with the geodesics.  Thank you in advance


Why is this code giving me a null exception error here?

Why is there a null exception pointer error being thrown and how can i fix this thank you. If you could explain what to do. I am trying to store each line from a txt file into an arraylist which goes into a larger array list of seperate lines.       public static ArrayList<ArrayList<String>> addAfter(String file1)throws IOException{     Scanner scanner = new Scanner(new File(file1));     ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();      ArrayList<String> a = null;     boolean check = false;     while(scanner.hasNextLine())     {         String str = scanner.nextLine();         String[] stringArr = str.split(" +");         for(int i=0; i<stringArr.length; i++){             a.add(stringArr[i]); //null exception being thrown here         }         stringArr = null;         arr.add(a);         a.clear();     }     return arr;     }


I have a couple of floats in my document, which contain large Images (it consumes the half of the page). In this case, the figure get's its own page and no text goes on this page.  How can I configure this? I'd like to have text before and after the floats until the float doesn't use more then 75% of the page height.


saved blender file doesn't play any audio or video

As the title says. I have rendered this file before and saved it. But now when I open the blender file, the strips are all in the same locations but when I try to render or play video in VSE it shows with nothing. What is weird is, if I import a new audio or video it will play.


How to convert a higher order SDE to a system of first order SDE's?

Consider the following stochastic differential equation: $$\ddot{X_t}+\omega_0^2X_t=dW_t.$$ I thought the way to do this would be to let: $$dX_t=\dot{X}_tdt,$$ $$d\dot{X}_t=-\omega_0^2X_tdt+dW_t,$$ however, this  says that the system of equations should be this: $$dX_t=\dot{X}_tdt+dW_t,$$ $$d\dot{X}_t=-\omega_0^2X_tdt.$$ The way it is done in that post seems to be correct as they are able to reproduce theoretical results numerically. Edit: The code in the linked post does not work if I switch the force vector around? Do you know why it doesn't work?


Remove dynamically generated sitemap from google search result

I use Yii PHP framework to generate sitemaps of user profiles. The sitemap url is something like this  http://mywebsite.com/site/sitemap33449   This URL returns xml of the sitemap. (with correct header type).  I submit this sitemap using google webmaster tool. In the google search result this link is also visible.   I used the following code in my .htaccess file. But no luck  <IfModule mod_rewrite.c>   <FilesMatch "site/sitemap33449"> Header set X-Robots-Tag "noindex" </FilesMatch>  </IfModule>   How I fix this issue? Any kind of help is highly appreciated


"As explained in Section 2" vs "As will be explained in Section 2"

As the title.  When writing to a report, should I refer to a section of the report located later by writing "As explained in Section 2" or "As will be explained in Section 2"?


Things around $(\forall x)(\Psi \Rightarrow \Phi) \Leftrightarrow ((\exists z)\Psi) \Rightarrow \Phi)$

Let $M,N$ be sets, $Q_M$ a set that depends on $M$ and $P(\cdot,\cdot)$ a property with two parameters (is it ok, to call these "parameters" or would "variables" have been better ?). Consider the following three statements:    i) $(\forall x\in M)(\forall y\in Q_M)[P(x,y)\Rightarrow x \in N]$   ii) $(\forall x\in M)[((\exists y\in Q_M)[P(x,y)])\Rightarrow x \in N]$    iii) $N=\{ x\in M \mid (\exists y\in Q_M)[P(x,y)]\}$  I would very much like to know the following:   I have been told that i) and ii) are equivalent, since they are an instance of a general scheme $$ (\forall x)(\Psi \Rightarrow \Phi) \Leftrightarrow  ((\exists z)\Psi) \Rightarrow \Phi),  $$ which holds if $z$ is not mentioned in $\Phi$, as Carl Mummert I think explained a long time ago  - I can't find the entry right now. What are the "values" the $x,z,\Psi$ and $\Phi$ have to take, such that this scheme shows the equivalence of i) and ii) ?      What kind of setting do you need in which you can prove this general scheme ? Is it only predicate logic ? Or do you need ZFC to formalize this logic so you can you use set-theory to prove it ?        How to you prove it (or a corrected version of it, if the above is flawed; it seems to me that quantifiers are missing) ? Is ii) equivalent to iii) ? How do you rigorously prove that ? Which ZFC axioms are needed for that proof ?


Reasons to prefer tikz or pstricks over any GUI driven graphics tool

If I need a figure for a document I usually use TikZ or PSTricks. Sometimes I would like to promote it to other people who usually use only GUI programs for such kind of stuff. But then I restrain myself and don't promote anything because I have the feeling that I don't have good objective arguments which the other person can understand.   For me it is    I have the feeling to have complete control over everything when using TikZ/PSTricks over any GUI tool. I can create commands which take parameters as argument and return a figure depending on the argument. It gives me a consistend look in a LaTeX document (same fonts, fontsizes,...). There is a very friendly, active community out there (TeX.SX) where I can get help on most of my questions. :-) It's just fun.   However I feel this is not convincing enough for a typical GUI user and I feel that one can get those things also using GUI programs (though I don't know how).   So are there better or clearer objective reasons to prefer TikZ or PSTricks over any GUI driven program. Do you have some good examples which illustrates the basic advantages of those command line driven tools in some way dramatically?


Objects on a stack vs Objects on a heap in C++

I am a new comer in C++ and found that in C++, you have 2 methods to create a object: object on a stack and object on a heap.  But I am curious to know what are the pros and cons of using object on stack vs. object on heap.  In what situations, first method is preferable over the second method and vice versa?


Remove automatic Aero disabling in Windows 7

Sometimes when I'm playing games which are heavy on the GPU, Windows decides to helpfully disable aero, causing everything to freeze for a bit and in the worst case, combined with ATI's brilliant drivers, causes the game to crash.  So,  How do I stop Windows from automatically disabling Aero when playing games? It has absolutely no effect on the performance of the game itself when it does that.  Also, I'd like to get rid of the "You should disable Aero to improve performance" helpful hint popup which sometimes shows up. But I suppose getting rid of the first will get rid of the second, assuming anyone knows how.


What is the wrong if i compare string using == operator in java instead of equals() method

As I know  == is used to compare references. .equals() is used to compare content.  There is a string pool is available in java. For example I created a string as follows  String s ="ABC"; then address for this is suppose 12345  When I use same string i.e "ABC" same string will share in both places. That means addresses for both strings are same.  == is for compare references .In this case address for both strings are same.Then why I need to go for equals() method.Please correct me if I am wrong.  public class StringComparison {  public static void main(String[] args) {     String s1 ="test";     String s2 = "test";      if(s1 == s2)         System.out.println("BOTH ARE  == ");     else         System.out.println("BOTH ARE != ");       String s3 = new String("test");     String s4 = new String("test");      if(s3 == s4)         System.out.println("BOTH ARE  == ");     else         System.out.println("BOTH ARE != ");    } }  OUTPUT: BOTH ARE  ==  BOTH ARE !=    But the reference link says new String("test") == new String("test") ==> false


Completely ignored arguments: [--nativeLauncherVersion, 307] [12:38:47] [Client thread/INFO]: Setting user: sean464 [12:38:50] [Client thread/WARN]: Skipping bad option: lastServer: [12:38:50] [Client thread/INFO]: LWJGL Version: 2.9.4 [12:38:52] [Client thread/INFO]: Reloading ResourceManager: Default [12:38:53] [Sound Library Loader/INFO]: Starting up SoundSystem... [12:38:53] [Thread-5/INFO]: Initializing LWJGL OpenAL [12:38:53] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [12:38:53] [Thread-5/INFO]: OpenAL initialized. [12:38:54] [Sound Library Loader/INFO]: Sound engine started [12:38:57] [Client thread/INFO]: Created: 1024x512 textures-atlas [12:39:10] [Client thread/INFO]: Deleting level New World-- [12:39:10] [Client thread/INFO]: Attempt 1... [12:39:12] [Client thread/INFO]: Deleting level New World- [12:39:12] [Client thread/INFO]: Attempt 1... [12:39:14] [Client thread/INFO]: Deleting level New World [12:39:14] [Client thread/INFO]: Attempt 1... [12:39:18] [Server thread/INFO]: Starting integrated minecraft server version 1.10.1 [12:39:18] [Server thread/INFO]: Generating keypair [12:39:20] [Server thread/INFO]: Preparing start region for level 0 [12:39:21] [Server thread/INFO]: Preparing spawn area: 4% [12:39:22] [Server thread/INFO]: Preparing spawn area: 6% [12:39:23] [Server thread/INFO]: Preparing spawn area: 10% [12:39:24] [Server thread/INFO]: Preparing spawn area: 13% [12:39:25] [Server thread/INFO]: Preparing spawn area: 18% [12:39:26] [Server thread/INFO]: Preparing spawn area: 22% [12:39:27] [Server thread/INFO]: Preparing spawn area: 27% [12:39:28] [Server thread/INFO]: Preparing spawn area: 31% [12:39:29] [Server thread/INFO]: Preparing spawn area: 36% [12:39:30] [Server thread/INFO]: Preparing spawn area: 40% [12:39:31] [Server thread/INFO]: Preparing spawn area: 45% [12:39:32] [Server thread/INFO]: Preparing spawn area: 49% [12:39:33] [Server thread/INFO]: Preparing spawn area: 52% [12:39:34] [Server thread/INFO]: Preparing spawn area: 56% [12:39:36] [Server thread/INFO]: Preparing spawn area: 60% [12:39:37] [Server thread/INFO]: Preparing spawn area: 65% [12:39:38] [Server thread/INFO]: Preparing spawn area: 69% [12:39:39] [Server thread/INFO]: Preparing spawn area: 73% [12:39:40] [Server thread/INFO]: Preparing spawn area: 76% [12:39:41] [Server thread/INFO]: Preparing spawn area: 80% [12:39:42] [Server thread/INFO]: Preparing spawn area: 84% [12:39:43] [Server thread/INFO]: Preparing spawn area: 88% [12:39:44] [Server thread/INFO]: Preparing spawn area: 92% [12:39:45] [Server thread/INFO]: Preparing spawn area: 96% [12:39:46] [Server thread/INFO]: Changing view distance to 16, from 10 [12:39:47] [Server thread/INFO]: sean464[local:E:75191748] logged in with entity id 671 at (153.5, 64.0, 178.5) [12:39:47] [Server thread/INFO]: sean464 joined the game [12:39:57] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 10920ms behind, skipping 218 tick(s) # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff9e86d2177, pid=6572, tid=9800 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C  [ig75icd64.dll+0x12177] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\SeanJr\AppData\Roaming\.minecraft\hs_err_pid6572.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release


How can I use WFS-T in openlayers-2?  I'm using  in server side.


In a set $X$ we define a binary operation $*$ such that  $$\forall x, y \in X,\  (x*y)*y=y*(y*x)=x.$$  Is $*$ commutative and why?


Pgfplots rounded corners and plot problem

I noticed something strange recently when trying to use rounded corners in pgfplots: it totally ruins the plot. See below without rounded corners:    and then with rounded corners:    Here is a minimal example:  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture}[scale=0.8,trim axis left, trim axis right] \tikzset{every mark/.append style={scale=0.6}} \pgfplotsset{legend style={font=\footnotesize}}  \begin{axis}[   grid=both,             rounded corners,             ]     \addplot[samples=100,color=blue,very thick,smooth,domain=-10:10] {cos(x^(3))}; \end{axis} \end{tikzpicture}  \end{document}   Thanks in advance for your ideas !


If $p\ge 2$ & $f,g $ are  $L_p $ functions,  prove that :  $||\frac {f+g}{2}||_p^p +||\frac {f-g}{2}||_p^p \le \frac {1}{2}[||f||^p_p +||g||_p^p ]$  At first glance , I thought it is easy noticing that  $x^p$ is a convex function for $p\ge2$. But I failed.   Is there any hint?  Thanks


Can I send a pdf file to the printer automatically?

I have the following:  <iframe src="ACRBusinessCL.pdf" id="PDFtoPrint" height="800" width="800"> </iframe> <form> <input type="button" value="Print" onclick="document.getElementById('PDFtoPrint').focus(); document.getElementById('PDFtoPrint').contentWindow.print();"> </form>   What's driving me crazy is: I thought I had this working at one point. The pdf file is showing up in the iframe, but when I click Print, nothing happens.


Assuming that $\overline{K}$ is an algebraic closure of the field $K$, how would one go about proving that $\overline{K}$ must be a splitting field? I am trying to do this by finding a set $\mathcal{P}$ of polynomials such that $\overline{K}$ is a splitting field of $\mathcal{P}$ over $K$.


Let a and b be real numbers such that 0  \sqrt{ab} > \frac{2ab}{a + b}$

Let a and b be real numbers such that 0 < a < b. Prove $\frac{a+b}2 > \sqrt{ab} > \frac{2ab}{a + b}$  How can I prove this? Been working for hours and got nowhere. I see $\frac{a+b}{2}$ and $\frac{2ab}{a + b}$ are almost reciprocals. Is this important?  Please explain step by step.


Deriving Chinese Remainder Theorem from gcd Bezout identity

We want to find the solution $x$ to the congruence system  $$\begin{align} x &\equiv r_1 \!\!\!\pmod{\!m_1}\\ x &\equiv r_2 \!\!\!\pmod{\!m_2}\end{align},\ \ {\rm where}\ \  \gcd(m_1, m_2) = 1$$  These can be rewritten as  $$\begin{align} x &= r_1 + m_1 j\\ x &= r_2 - m_2k\end{align}$$  for unknown integers $j, k$. So we set those two equations as equal and rearrange them to  $$m_1j + m_2k = r_2 - r_1$$  Now assume we perform $\text{egcd}(m_1, m_2)$, which gives us the solution to  $$m_1u + m_2v = \gcd(m_1, m_2)$$  Let the integer $\,h\,$ make $\,h \gcd(m_1, m_2) = r_2 - r_1$.  Then $\qquad hm_1u + hm_2v = h\gcd(m_1, m_2) =  r_2 - r_1 = m_1j + m_2k$  At this point I am lost because I don't think we can just assume  $hm_1u = m_1j$ and extract $j = hu$.   How do I get the values of $j$ or $k$ so I can get the value of $x$?


How to setup reciprocating compressor rig?

Note: I put my object names in "". I need to rig this reciprocating compressor such, that rotating the "Rotary Base" at its center, should pull the "Rotary Shaft" at the "Pivot" (which is a child of "Rotary Base"). I achieved this by applying a Copy Location object constraint on the Rotary Shaft and setting the target to "Pivot".  Now I need to lock the movement of the "Piston Shaft" on the X-axis, as it should go in and out of the "Cylinder". How can I somehow link the right-end of the "Rotary Shaft" to the left-end of the "Piston Shaft" while maintaining the "Rotary Shaft" movement with the "Rotary Base"(basically, the right-end of the "Rotary Shaft" should be locked on the X-axis while the left should be able to move.)? I am open to other workflows (armatures included), so please. The file I included, only has the models. The constraints and stuff I removed.


Testing space-time warp on a smaller scale, "Breaking the Warp Barrier: Hyper-Fast Solitons in Einstein-Maxwell-Plasma Theory"

So according to this paper it creates a warp drive without the need of negative energy to operate which many think does not exist in reality. So my question is what would you do to experimentally verify the theory of this paper, for instance could you create an Electro Magnetic soliton around a single particle then check if the distance is contracting between one particle in front of it and expanding from behind another particle without actually moving the particle in the soliton? test the theory on a smaller scale because of energy requirements?


Make blockquote formatting button not destroy the source layout!

You ever had a post in front of you where the OP did mix up blockquote and code formatting? Not those easy cases where he/she wrote a > character before the paragraph himself, but those cases when you have several dozen lines of code or command output, often with line lengths greater than the edit window's width, and the OP used the blockquote-formatting-button!  In such cases, it does not only add the > character in front of every line, but also totally messes up every kind of indentation and reorganizes all the line breaks to fit the editor window width instead of the original structure.  You are not sure what I mean? Here is a horrible example in its original state (with blockquotes):  And here is my attempt to fix the structure as good as I can:   I propose to change the behavior of the blockquote formatting button!  The optimal and easiest way to convert a paragraph to a blockquote would be to just write a single > in front of the paragraph's first line and keep all indentations and line-breaks just as they are. The output will be no different. If you have problems implementing this with checking the end of the paragraph (I don't think so, but...), it would be even an improvement if we stay with the > sign in front of every line selected to be formatted as blockquote and just stop reformatting the content!  Everybody who once tried to edit such a monster has to vote for this and hope for the StackExchage stuff to soon implement this. Thank you for your support and any reactions.


If $B_1,B_2$ and $B_2,B_3$ are MUBs, can we conclude that either $B_1,B_3$ are MUBs, or they have equivalent Hadamard matrices?

This question can be formulated in two ways. Let there be two $d$-dimensional orthonormal bases $B_{1}$ and $B_{2}$. I refer to the elements of $B_{1}$ by $\lvert\nu_{i}\rangle$ and to the elements of $B_{2}$ by $\lvert\omega_{j}\rangle$. These two bases are mutually unbiased namely: $\lvert\langle\omega_{j}\lvert\nu_{i}\rangle\lvert^{2}=1/d$ for all $\lvert\omega_{j}\rangle$ and $\lvert\nu_{i}\rangle$. We define some vector $\lvert\tau\rangle$ such that $\lvert\tau\rangle$ is orthonormal to one element of $B_{2}$, say $\lvert\omega_{m}\rangle$ and it is mutually unbiased with respect to all the elements in $B_{1}$: $\lvert\langle\tau\lvert\nu_{i}\rangle\lvert^{2}=1/d$ for all $\lvert\nu_{i}\rangle$. Can we conclude that $\lvert\tau\rangle$ is equal to a member of $B_{2}$ say $\lvert\omega_{p}\rangle$ for some $p\neq m$ up to a phase difference?  Another way to make the same conclusion is to ask this: Let there be three orthonormal bases $B_{1}$, $B_{2}$ and $B_{3}$. $B_{1}$ and $B_{2}$ are mutually unbiased, so are $B_{2}$ and $B_{3}$. Can we conclude that $B_{1}$ and $B_{3}$ are either mutually unbiased or have equivalent Hadamard matrices? This question for me is particularly important since in the literature it is always talked about sets of pairwise mutually unbiased bases. But there's no proof given for the fact that three mutually unbiased bases should necessarily be pairwise MUBs.


The current latin font does not contain the "Cyrillic" script

I am trying to compile a document with Russian language and using the fonts from cm-unicode. Code:  \documentclass[a4paper,12pt]{report}  \usepackage{polyglossia}   \setdefaultlanguage[spelling=modern]{russian}   \setotherlanguage{english} \usepackage{fontspec} \usepackage{xunicode} \usepackage{xltxtra} \usepackage{xecyr}  \defaultfontfeatures{Mapping=tex-text} \setmainfont{CMU Serif} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text}   Build command:  latexmk -xelatex -outdir=build document.tex   And error message:  ! Package polyglossia Error: The current latin font CMUTypewriterText(0) does n ot contain the "Cyrillic" script!   And I get an error with any font.  What am I doing wrong?


I feed the ocelot and the hearts come up but it doesn't change into anything, it just stays an ocelot. Can anyone help me on what I'm doing wrong


Edit: .  I run a small hosting provider with more or less 1535 customers and I use Ansible to automate some operations to be run on all servers. Last night I accidentally ran, on all servers, a Bash script with a rm -rf {foo}/{bar} with those variables undefined due to a bug in the code above this line.  All servers got deleted and the offsite backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script).  How I can recover from a rm -rf / now in a timely manner?


I've been dealing with C++ strings and currently I am wondering how can I split the article of a string and the data that's left.  Let's say I have this string:  a gold coin   How can I split the article which in this case is a into a separate string and then get all the other data contents into a different string which in this case is gold coin?  Please note that the article can sometimes be an and sometimes have no article.  Edit I am not trying to split strings from a space token I am splitting special words from the string in condition for extracting a pronoun article name and the pronoun string.


How can I delete an assembly applied to the class property?

I have a class which has public Assembly LoadedAssembly { set; get; }  var assemblyName = AssemblyName.GetAssemblyName(fullPathToDLLFile); myClass.LoadedAssembly = Assembly.Load(assemblyName);   This class I keep under Application.Current.Properties["MyClass"].  I try to null it like Application.Current.Properties["MyClass"] = null; but it doesn't help.  I see that the loaded assembly works (It has a timer inside and it is working).  How do I can clean it?  (I don't use something like   AppDomain d = AppDomain.CreateDomain("NewDomain", null, domaininfo); to load assembly.)


Ubuntu installable on internal SSD, 10 year old Acer w/ AMD Phenom II (Quad Core)?

Can Ubuntu dual boot w/ Windows 7 and Data,  on one SSD, in a 10 year old Acer Notebook w/ AMD Phenom II(Quad Core)?


Where is the mistake? $-1=(-1)^{2/2}=\left(\left (-1\right)\displaystyle ^2\right)^{1/2}=1^{1/2}=\sqrt 1=1$

Where is the mistake? $$-1=(-1)^{2/2}=\left(\left (-1\right)\displaystyle ^2\right)^{1/2}=1^{1/2}=\sqrt 1=1$$


Evaluation of $\int_0^{\pi/4} \sqrt{\tan x} \sqrt{1-\tan x}\,\,dx$

How to evaluate the following integral $$\int_0^{\pi/4} \sqrt{\tan x} \sqrt{1-\tan x}\,\,dx$$ It looks like beta function but Wolfram Alpha cannot evaluate it. So, I computed the numerical value of integral above to 70 digits using Wolfram Alpha and I used the result to find its closed-form. The possible candidate closed-form from Wolfram Alpha is $$\pi\sqrt{\frac{1+\sqrt{2}}{2}}-\pi$$ Is this true? If so, how to prove it?


Examples of meta-analyses where individual associatons are reported as odds ratios, risk ratios, or hazard ratios

I am analyzing data from 17 studies (25 data points) with mixed measures of association (OR, RR, HR). Most associations are less than 2.0, with four  from 2.0 to 3.1. Only one is less than 1.0 (not significant).  My options are fairly limited. Will consider doing stratified meta-analysis.  Are there some examples where the investigators did the meta-analysis using mixed-type measures of association?  Thanks for your help.


Lightweight SQL database which doesn't require installation

Could you recommend a lightweight SQL database which doesn't require installation on a client computer to work and could be accessed easily from .NET application? Only basic SQL capabilities are needed.  Now I am using Access database in simple projects and distribute .MDB and .EXE files together. Looking for any alternatives.


How to solve this combinatorial problem about selecting letters from different groups?

The English alphabet consists of 26 letters, 6 of which (A, E, I, O,   U, Y) are vowels and the remaining 20 are consonants. If each letter   has the same probability of being chosen, what is the probability of   forming a 7- character string such that 3 of its characters are   vowels, 3 of its characters are the letter B, and the remaining one is   a consonant different from B?   The # of ways in which we can make any word using 26 letters (With repetition) is 26^7.  Out of the 6 vowels, we need to choose 3 (6C3) and put them in 3 of the 7 places available (order is important) so we have 7!/4!.  There's only one way to choose B, and since it's the same letter the order is not important so we choose 3 places out of the 4 places left.  We have 19 consonants left, we choose one and have only 1 place left for it.  This is the logic I've followed to go through this problem, still I always get a probability of 2.575 *10^-3 which is wrong, the correct answer is 7.154 *10^-5.


Can I merge two Microsoft Word documents reliably with Subversion?

We have concurrent edits happening on Word documents and I want to make sure that Subversion can handle merging .doc files. Do you know if Subversion handles merges of Word documents well?


Covariance between a normally distributed variable and its exponent

Given  $X \sim \mathcal{N}(\mu,\,\sigma^{2})$, what is the covariance between $X$ and $e^X$?


How Windows handles scheduled tasks when restarting computer?

I have an indefinitely running scheduled task that repeats every now and then and runs for few minutes. What happens when this task is running and I click restart or shutdown computer? Will Windows let it finish first before shutdown or will Windows kill the task and then shutdown? Is there a way to change the behavior?  I need to ensure that Windows lets the task to finish before shutting down and I couldn't find information about this. If Windows lets it finish the tasks I'm happy with that but if the Windows kills or aborts my task, I would like to know if there is an automatic Windows way to make Windows wait or is the only way to first stop the tasks manually and then shutdown.


an example of a continuous bijection which is not a homeomorphism

I need an example of a continuous bijection $f:X \to Y$, where $X$ is NOT compact and $Y$ is Hausdorff, such that $f$ is not a homeomorphism. (It is easy to show that if $X$ is compact, then $f$ is necessarily a homeomorphism)  Any help is appreciated, Thanks !


If $a < b$ are real numbers, then    $(a,b) \sim (0,1)$ $[a,b] \sim (0,1)$     For the first one, it is quite simple.  Pf (1): Let $f:(a,b)\rightarrow (0,1)$ be defined by $f(x)=\frac{x-a}{b-a}$. Clearly, $f$ is a bijection.  Pf(2): Let $g:[a,b]\rightarrow (0,1)$... (here I want to say something along the lines of) be defined by $g(x)=\frac{x-a}{2(b-a)}, a<x<b$ which clears space for a and b as they are included.. Is this reasoning correct? How do I formally write up the a and b part? Looking for an explanation.


What is the geometric interpretation of reverse triangle inequality?

In almost every book of real analysis, geometric interpretation of triangle inequality is mentioned.   But what is the geometric interpretation of reverse triangle inequality.   $$||x|-|y||\leq |x-y|$$  I know this inequality is used to show that norm function is continuous. Are there any other ways to geometrically interpret the reverse triangle inequality.


I came across a question that was horribly written and lacked any research. Then I noticed I had written it. How would I down vote my own question?


Natural Deduction: $p \to (\neg q \leftrightarrow (r \lor s)), \neg s \vdash (p \land \neg q) \to r$

I have the following formula and need to prove it with natural deduction:  $$p \to (\neg q \leftrightarrow (r \lor s)), \neg s \vdash (p \land \neg q) \to r$$  I was able to get the below finished but can't fill in what is missing.  1.   p -> (~q <-> (r v s)) 2.   ~s 3.  | (p ^ ~q)              (assumption) 4.  | p                    (elim ^) 3 5.  | ~q                    (elim ^) 3 6.  | (~q <-> (r v s))      (elim ->) 1. 7.  | (r v s)              (elim ->) 6.  n-1.| r   n.  (p ^ ~q) -> r


What are the pieces used to fill in a template called?

If I have a template (say a generic letter) that is filled in with various pieces of data (say, the name of the addressee), what is a general term for those pieces of data?  For example:  Dear {firstname}, This is just a friendly reminder that the book {booktitle} will be due on {duedate}. Thank you.   What would I refer to {firstname}, {booktitle} and {duedate} as?


Bagels - Use of Barley Malt Syrup or Non-Diastatic Malt Powder

When using a water bath for bagels what is preferred to attain the nice brown exterior, Barley Malt Syrup or Non-Diastatic Malt Powder? I see recipes that use either one. What would be the difference in the finished bagel? Will either one effect the texture?


Why these two Jordan blocks are similar: $J_k(0)^T $ and $J_k(0)$ ?


Search for files with a specific file extension in Windows 7

In Windows Explorer, I would like to search for all files in a specific folder and its subfolders with the file extension .doc. To do that, I tried to enter .doc in the search bar on the top right of the window. That gave me as a result all the files containing doc, not necessarily with that file extension, including folders named "doc".  In Windows XP, there was if I remember correctly something to only search for one file type, but I can't find anything like that in Windows 7.  How to only search for files with a specific file extension and not other files which contain that extension in their name?


How to get own mobile number from the iOS Device programmatically?

I want to get my own contact number for my app.  I have read some answers on the stack overflow but those were old.  So please let me know according to new guidelines of Apple, can we get mobile number?


Itemize: Identation is different between first and second line

I have this problem where it seems that itemize starts with a blank space, whereas the next line starts without it. Is there a way to have both the first and second line aligned? I am using LyX.  This is a minimal code with the behaviour: \documentclass{beamer} \usepackage[bibstyle=authoryear]{biblatex} \begin{document}  \begin{frame}{Test}  \begin{itemize}  \item Test Test Test asdjakhsdahsdk aklsdjklajsd akljsakljd tehlasdklhasd asdhkadha asdhasdha asdhashdasd   \end{itemize}  \end{frame}  \end{document}


Why is the function $\Omega\rightarrow\mathbb{R}$ called a random variable?

I do not understand the relation of a normal variable "x", which is to me just a placeholder for an element of a set, and a random variable, which is a mapping from the set of all possible events to $\mathbb{R}$.  To make the question more concrete, some parts I am struggling with:   Normal functions with variables can be evaluated, e.g. $f(x)=2x$ will plot to a line, can I do this with a function of a random variable? Furthermore the randomness part seems to be missing, why is it not neccessary to define how the random variable obtains its random value?     Edit: now that I feel I understood the definition, I cannot say what exacly what was missing for understanding. Nevertheless reading the following links, the comments and answer here, did the trick.


Suppose that f is a function from A to B, where A and B are finite   sets |A| = |B|. Show that f is one-to-one if and only if it is onto.   Lets say we were to translate this statement using variables. Where:  a: f is a function from A to B, where A and B are finite sets |A| = |B|  b: f is one-to-one  c: f is onto  Now, I believe this statement translates to "a -> (b <-> c)" symbolically. Is this correct?  This would mean that we need to prove the two sub-statements "a -> (b -> c)" and "a -> (c -> b)" in order to prove the overall statement "a -> (b <-> c)".  To prove "a -> (b -> c)", I'm thinking of first showing that "b -> c" is true using a proof by contradiction. We would then get "a -> T", which is always true (trivial proof). Is this correct?  To prove "a -> (c -> b)", we would use the same procedure.  Is this what the top answerer  does?  Questions highlighted in bold.


the slash (/) after a directory name on shell commands

I have a little question here.  If I have two files, say filea and fileb, mv filea fileb would   delete fileb rename filea to fileb   Then if I have two directories, say dira and dirb, mv dira dirb would   move dira into dirb (it will become dirb/dira)   Noting that in both cases there are no notice or message, then this is pretty inconsistent to me. I think mv dira dirb should just overwrite dirb with the contents of dira (or merge the two directories under a directory named dirb).  I remember reading somewhere that a directory name with a slash (like dira/) is treated like a directory, and name with no slash (like dira) is treated like a file (to certain extents, of course). Anyway now I want to make the shell (zsh and possibly bash) respect my notation of a directory by using a slash. Is there a terminal option which enable me to enforce that?  To clarify, here is my desired behaviour:   mv dira dirb results in dirb being overwritten with the contents of dira mv dira dirb/ results in dira being moved into dirb (in dirb/dira)   Has anyone thought the same way as me? Or am I just weird?


I have an application with a ListView that is generated on Load with times and files to play at those times.  I have the following code working on a test machine, but on my development PC (while running from VS) I get a cross-thread error.  My questions are:  1:  Any thoughts on why this would this give an InvalidOperationException on the development PC (from VS only, it works fine from the .exe)?  Should these subs both have delegates?  The error I get from both subs is "Cross-thread operation not valid: Control 'lstSchedule' accessed from a thread other than the thread it was created on."    2:  Any suggestions of a better way of using timers run from ListView times other than what I'm doing?  The timer here is a System.Threading.Timer.  Public Sub SetNextFileToPlay()      Try         Dim lviTemp As ListViewItem = Me.lstSchedule.Items(IndexToPlayNext)         Dim tcb As TimerCallback = Sub()                                        'Play the audio file when the timer elapses.                                        objAudio.PlayMP3(lviTemp)                                        'After the file plays, set the next timer.                                        SetNextFileToPlay()                                    End Sub          'Set the play time 10 minutes ahead, in case we are unable to parse a time from the listview.         Dim dtPlay As DateTime = DateTime.Now.AddMinutes(10)         'Try to parse a time from the listview.         DateTime.TryParse(lviTemp.SubItems(1).Text, dtPlay)         'Ensure that the time is for today so we don't end up with a negative timespan.         dtPlay = New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, dtPlay.Hour, dtPlay.Minute, dtPlay.Second)          'Subtract the current date/time from the playlist date/time.         Dim execTime As TimeSpan = dtPlay.Subtract(DateTime.Now)          'Create the timer.         tmrMP3 = New Timer(tcb, Nothing, execTime, TimeSpan.Zero)     Catch ex As Exception         oLog.Error("Error playing the file: " & ex.Message)     Finally         IndexToPlayNext += 1     End Try  End Sub   Public Sub PlayMP3(ByRef ListViewItem As ListViewItem)      Try         'Mute the Line In device.         Me.MuteMusic(True)          'Set the file to play.         Dim strFileName As String = String.Empty          Try             strFileName = AUDIO_MP3_PATH & ListViewItem.SubItems(4).Text             If Not File.Exists(strFileName) Then strFileName = AUDIO_MP3_BACKUP_PATH & "blank.wma"         Catch ex As Exception             strFileName = AUDIO_MP3_BACKUP_PATH & "blank.wma"         End Try          'Create a new audio file reader object, so we don't have two files playing over each other.         afrMP3 = Nothing         afrMP3 = New AudioFileReader(strFileName)          wavMP3.Stop()         wavMP3 = Nothing         wavMP3 = New WaveOut         wavMP3.Init(afrMP3)         wavMP3.Play()          'Set the text for the ListViewItem status.         SetListViewItemText(ListViewItem.ListView, ListViewItem.Index, "Playing")          'Break the ListViewItem down into a ListView and index, since you cannot use Invoke on as ListViewItem.         Dim tmpListView As ListView = ListViewItem.ListView         Dim tmpListViewIndex As Int32 = ListViewItem.Index          'When the file stops, unmute the Line In device and set the text for the ListViewItem status.         AddHandler wavMP3.PlaybackStopped, Sub(sender, e) MuteMusic(False)         AddHandler wavMP3.PlaybackStopped, Sub(sender, e) SetListViewItemText(tmpListView, tmpListViewIndex, "Played")      Catch ex As Exception          oLog.Error(ex.Message)      End Try  End Sub


4 normals can be drawn from any point to an ellipse proof doubt: How do we know the key quartic has 4 distinct real roots?

Theorem: 4 normals can be drawn from any point to the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$. $( a > b > 0)$  I had a doubt in the proof of the above statement given in my book.  Proof given in Book. The normal at the point with eccentric angle $\phi$ is $ax\sec\phi - by \csc\phi = a^2 - b^2 $. Let P$(h,k)$ be any point in $\mathbb{R^2}$. If the normal passes through P:  $$ah\sec\phi - bk \csc\phi = a^2 - b^2  = a^2e^2 $$ Let $ t = \tan \frac{\phi}{2}$, then $\cos \phi = \frac{1 - t^2}{1 + t^2}$ and $\sin \phi = \frac{2t}{1 + t^2}$. Substituting and rearranging, gives:     $$bkt^4 + 2t^3(ah + a^2e^2) + 2t(ah - a^2e^2) - bk = 0 $$   This is a quartic in $t$, hence has 4 roots, corresponding to 4 points on the ellipse which are conormal.      Doubt: My question is how do we know that the roots of that quartic equation are real and distinct? Because if not, then the theorem is not yet proved. I looked up the discriminant of a quartic on Wikipedia (), but the inequalities are too difficult to handle. How can I show that the roots are all real and distinct?


What happened to Luke's hand from The Empire Strikes Back?

Luke apparantly has four hands. There are the two he was born with, a mechanical one he was fitted with at the end of The Empire Strikes Back...    ...AND...       the one we see him fitted with in The Force Awakens, both during Rey's force flashback and at the end.  This one looks a lot like the one Anakin was fitted with in Attack of the Clones.     Whatever happened to the third hand?  I know it got a bit damaged in Retrun of the Jedi, but it certainly      looked more natural than the fourth one!  Why not replace the damaged third with another just like it?


Convert given string to float without losing precision in java?

I want to convert the string to float with out losing it's precision.  String str = "140000.01"; float val = Float.valueOf(str);   Here, I'm getting the output i.e float value as 140000.02, is there any way to convert it into float without losing precision.


If $\gcd(a, b) = 1$ and if $ab = x^2$, prove that $a, b$ must also be perfect squares; where $a,b,x$ are in the set of natural numbers

Problem:  If $\gcd(a, b) = 1$ and If $ab = x^2$ ,prove that $a$, $b$ must also be perfect squares; where $a$,$b$,$x$ are in the set of natural numbers  I've come to the conclusion that $a \ne b$ and $a \ne x$ and $b \ne x$ but I guess that won't really help me.. I understand that if the $\gcd$ between two numbers if $1$ then they obviously have no common divisors but where do I go from this point?  Any tips at tackling this would be great. It looks quite easy though I'm still trying to get my hand around these proofs! Any pointers in the right direction would be great.  Thank you in advance,


how to run more then one process through terminal

I am having some trouble in starting more then one process in a single terminal window..  like as i have started wvdial by   sudo wvdial   it shows all initiating process details but wont give back  pankaj@N5010:~$    until i press ctrl+c to terminate which causes terminate wvdial..   what i want is to start both wvdial and nautilus in same terminal window.Is it possible??


prime numbers. show that $p_{n+1} \le {p_1 \cdot \ldots \cdot p_n +1}$

Let $p_n$ be the n-th prime number.  show that $p_{n+1} \le {p_1 \cdot \ldots \cdot p_n +1}$  I´ve used a few primes and obtained the same result, even when this assumption seems trivial I have no idea how to prove this for the n-th prime.  I'd appreciate some help


How can i call Javascript function from serverside java code and pass data to it?

I have Dynamic Web Application deployed on Glassfish server. Inside my application I have a java function that is invoked every time certain JMS Message is received. Depending on JMS Message, I want to update the state of web application that is loaded inside web browser - I need to call certain Javascript function as soon as the JMS Message is received.   How can i accomplish that? Is there any java and/or Javscript library that can do this?  Any help will be greatly appreciated, thank you.  P.S. After Some research i have found a very useful library that does exactly what i wanted:


I am traveling to Canada on a visitor visa on my old passport. and I have a new one

I have a visitor visa to Canada on my old passport. I renewed my passport to have. six months valid passport when travelling. can I enter Canada with a visa on my old passport? I will take both passports with me?   and do I really need a six months valid passport when entering Canada?


How do I create an empty generic array in Java?

I want to create a Cache object. Naturally, I want this cache object to be typed. The problem is how do I create the empty array to insert the objects into (because I have no type reference).  public class Cache<T> {     int size;      T[] items;      public Cache(int size){         this.setSize(size);     }      public void setSize(int size){         this.size = size;         this.items = new T[size]; //this doesnt work!     }  }


How to square a rising share price with the company diluting the value of its existing shares

Company A's share price in the market continues to rise while at the same time, the company keeps announcing that they are issuing new shares for multiple M&A transactions. How is this possible ? Isn't it true that new shares will generally dilute the existing share value? Or is it because the market expects that the M&As will soon/immediately increase the total market cap ? Are there other explanations for this phenomenon ?


If statement check seems to not work properly

So I have this block of code:  public Student(String name, String subject) {         if(subject.substring(17,18) == "e"){             subjectName = "English";         }else if(subject.substring(17,18) == "m") {             subjectName = "Math";         }         studentName = name;     }   I am feeding the Student in a name as a string and then a subject which is in a form like this:  ..\text\students\english\grades   Now I use substring on it and get only the first letter of the subject. If the letter is e then the lesson name is english and so on.  But for some reason my IF checks dont pass at all, if I throw a sysout in them, nothing happens, the check never passes while it should...  What could be the problem here?


How can I control two computers with the same keyboard and mouse?

How can I control two computers (with seperate monitors) with the same keyboard and mouse?  Is there a software solution to this?  Can the computers be running different OSs?


How to execute a command without needing to press enter? (UNIX, GETCH)

I'm trying to simulate the history of a shell like script. The first step (at least from what I think) is to make it recognise the up or down arrows. Let me show you the code first:  string readSequence() {     int c;     string currLine;     do {        if (getchar() == '\033') { // if the first value is esc             getchar(); // skip the [             c = getchar(); // get the real value                 if(c == 'A') // the real value                     cout << "up";                 if(c == 'B')                     cout << "down";         }     } while(c != EOF || c != '\n'); }   Whenever I run this in the command line, if I press up down up down for instance, it will print ^[[A^[[B^[[A^[[B, and after I press enter it will print updownupdown. I'm trying to make it print up or down as soon as the user presses up or down, and also make it not to print those ^[[A or ^[[B things.  Also, if you got any suggestions on how to do this in another way, please do share. Thanks in advance!


How to align restore strategy with backup history cleanup?

I was curious about how that particular problem is tackled.  1) Full backups performed on saturdays. 2) Differentials every other day. 3) Tlog backups every 15 minutes.  When trying to restore a database through SSMS: Right click on database > Restore...   It seems to hang for a long time then display the error message and display no backups to be restored and displaying the following error message:  Unable to create restore plan due to break in the LSN chain.   Looking into it, I realize that we do have all the backups but I keep 1 month of backups.  I execute sp_delete_backuphistory weekly and delete anything older than 35 days to make sure that I don't remove history for valid backups.  There are situations where the history keeps track of backups which are no longer there and we get the error.  How did you guys handle that particular problem?


Can you obtain a Transmuter's Stone if you "morph" into a Transmuter statblock?

Volo's Guide to Monsters contains the stat bloc for an NPC called Transmuter, who is a humanoid, CR 5, with the following trait:        Transmuter's Stone. The transmuter carries a magic stone it crafted that grants its bearer one of the following effects {formatted for ease of reading}:          Darkvision out of a range of 60 feet   An extra 10 feet of speed while the bearer is unencumbered   Proficiency with Constitution saving throws   Resistance to acid, cold, fire, lightning or thunder damage (transmuter's choice whenever the transmuter chooses this benefit)   If the transmuter has the stone and casts a transmutation spell of 1st level or higher, it can change the effect of the stone.        It is, I believe, possible for a high level caster to "morph" into a Transmuter statblock, either by True Polymorping into it directly, True Polymorphing into a creature that can then Change Shape into it (such as an Ancient Metallic Dragon), or by Shapechanging into it.     My question is: if you "morph" into an NPC Transmuter, do you gain access to its Transmuter's Stone?


How to identify look up relations to an object in Salesforce

I have a custom object and I would like to know which all other objects have look up relations to this one? There are many objects available and I cannot go into each and identify which would have look up.   Is there a way to identify this? In this way, I also would know what objects have relations with what other objects in SF.


what is difference between Hashmap and concurrent HashMap?

I am new to Stackoverflow searched over google but not able to understand the basic difference between them.


Question where no research has been conducted at all

I'm sure we have all seen questions like .  A one - two line question which shows a clear lack of even  the question. These are often easily identified by the phase Is it possible? when what the user really means is: GIVE ME THE CODEZ    I know that recently the flagging options have changed, however now cannot find the meta post.    What would be the most appropriate flag for a question like this, or are these kinds of questions allowed?    The flags too-board OR off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself. Don't really seem to quite cover the issue with questions like these.  Also the answer to the exampled question feels to me like a comment. However it is answering the question.   Whilst I know  is a little out dated and references the FAQ part of the site. Its still accepted that these types of questions should not be encouraged.


Is it proven experimentally that the speed of causality (light) is the maximum speed?

Is it possible to have an alternative theory which is consistent with experiments supporting GR, but which doesn't mandate a speed limit on causality?  In other words, I understand there is experimental evidence for gravitational/relativistic time dilation, spacetime curvature, etc. but is there any inherent reason why these effects cannot be explained without the max speed requirement?  QM clearly shows that "communication" can happen instantaneously but, supposedly, causality cannot break the speed limit.  I also know the speed of light is derived from other principles, but is there anything that says that speed has to be a max limit of any kind?  I want to emphasize that the QM "communication" doesn't imply causation or information exchange, merely the establishment of the entangled attribute.  Bell's inequality tells us that the attributes were not predetermined and were only established upon measuring one of the particles.


I moved a drupal installation from one server to another. Steps I followed:   Copied whole directory structure from old server. Exported database from old server. added files to newdomain/drupal Imported database edited settings.php with new database information.   As of right now the home page is working (Except for some broken non-db images, but I know the reason for that and can fix it) But none of the links to any of the nodes or any of the admin paths I know seem to exist. I get a 404 File Not Found error.   I wonder if it's related to the fact that this installation is in a subdirectory and the other one was not, but is that enough to make every page except the homepage not function?


Broken package error when trying to install Kubuntu-desktop in Ubuntu 15.10

I simply cannot get kubuntu-desktop to install properly. I have tried uninstalling it and reinstalling it, I think, 4 times now. Every time I do I get the same broken package error.  Unpacking kde-config-telepathy-accounts (4:15.08.2-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.08.2-0ubuntu1_amd64.deb (--unpack):  trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+15.10.20150723-0ubuntu1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.08.2-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Doing "sudo apt-get -f install" does not help. The only way to fix this seems to be to load synaptic and force remove the broken package. Strangely enough, "Plasma" subsequently appears as an option in the greeter screen, even after removing the rest of "kubuntu-desktop".  I'm not sure what the problem is here. I don't know why it won't update properly, and I don't know why I can boot Plasma at all. Is the generic Plasma not the same as Kubuntu? Am I doing something dumb?  I also cannot get Unity (Ubuntu) to start at all (not that I'd ever want to), so it's possible that there's something seriously wrong with my installation.


What's "P=NP?", and why is it such a famous question?

The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting?  Oh, and for extra credit, please post a proof of the statement's truth or falsehood. :)


Both are vector graphics (typically) and both can be imported painlessly into a pdflatex document (so let's say we ignore dvi for this question).  What are the advantages and disadvantages of each? What should I use?


How do I limit an output's maximum number of characters?

I'm trying to limit a number's output to 4 characters (including decimals).  def costEdit(nCost):     nCost = '%.2f'%(nCost*1.25)     nCost = nCost * 1.25     return nCost   I want the nCost to be cut off at 2 decimal places. E.g. if the nCost was 8.364912734, cut it off to 8.36 and edit the nCost variable to be replaced with that. Any Ideas?  Im getting the error:  Traceback (most recent call last):   File "C:\Python33\My Codes\TextTowns\TextTowns.py", line 59, in <module>     costEdit(nCost)   File "C:\Python33\My Codes\TextTowns\TextTowns.py", line 27, in costEdit     nCost = nCost*1.25   TypeError: can't multiply sequence by non-int of type 'float'   Im using it as: costEdit(nCost)


Prove that if $n$ is not divisible by $5$, then $n^4 \equiv 1 \pmod{5}$

Suppose $n$ is an integer which is not divisible by $5$. Prove that $n^4 \equiv 1 \pmod{5}$.


In what step should I try to find a best thread cut-off point for binary classification?

I am working on an imbalanced binary classification and wondering in what step I should find the best optimal threshold cut-off point. When I tried classifying the dataset with the normal probability threshold, I couldn't see any true positives(failures) but when I lowered the probability threshold, the model started showing me some true positives.  What I am really confused about finding the optimal threshold cut-off is in what step I should find the optimal threshold cut-off point. The following questions I have in mind:   Do I need to find the optimal threshold cut-off point before the model development? Do I use cross-validation for it? Do I need separated procedures for finding the optimal threshold cut-off point from model developments? So I run two procedures, one for the optimal probability threshold and the other for the model development.   I hope to hear some advice or answers.


I am trying to place a text in single column with the text having a two column format. But the figure comes on top of the text. How can this be solved?


Where does the energy vanish in wave interference?

In my physics textbook there is a chapter on waves. Now there is a topic on interference. I don't understand why I get additional energy there. Suppose two waves presented as $Y_1=3\sin(\omega t)$ and $Y_2=3\sin(\omega t)$ now if I add their energy I get total $\text{intensity}=\frac{k}{2}\cdot 3^2+\frac{k}{2}\cdot 3^2$. but again these waves are superimposed if F see this from another viewpoint then I get total $\text{amplitude}=6$. So $\text{energy}=\frac{k}{2}\cdot 6^2$ where $k$ is constant. So where does the energy go? and I tried Googling it, there t found that it's simply rearrangement of energy. But I think that doesn't explain this. And terribly sorry for my bad english


What is the DC of the Tempest Cleric's Wrath of the Storm feature?

clerics have the ability  (PHB, p. 62):     When a creature within 5 feet of you that you can see hits you with an attack, you can use your reaction to cause the creature to make a Dexterity saving throw. The creature takes 2d8 lightning or thunder damage (your choice) on a failed saving throw, and half as much damage on a successful one.   It doesn't specify what the DC of the saving throw is.   I assume it uses the spell save DC, even though it technically isn't a spell?     Spell save DC = 8 + your proficiency bonus + your Wisdom modifier


Blood Purity in Harry Potter: What is the origin of 'blood purity'

While talking about blood purity to Harry, Hagrid says this.     And it's codswallop, to boot. 'Dirty blood.' Why, there isn’t a wizard alive today that’s not half-blood or less.   The question  indicates that all Wizard families are muggle born at some point. So how did the concept of 'blood purity' arise, and what did Hagrid mean by 'Half blood or less'?