Where does de Broglie wavelength $\lambda=h/p$ for massive particles come from?

I'm curious where the  $p=\frac{h}{\lambda}$ comes from?   I know that for light (which has no rest mass), the following is true:  $E=pc$ and $E=hf$  so,  $$pc=hf \Rightarrow p=\frac{hf}{c}=\frac{h}{\lambda}$$  But how is the expression $p=\frac{h}{\lambda}$ obtained for a massive particle where $E\neq pc$? I've read some people claim that the expression can be derived, and others saying it's an experimentally verified relationship.


List of installed packages on Ubuntu Server 14.04

I need to know, what are installed packages for Ubuntu Server for the first time?  I need the output of dpkg -l of freshly installed 32-bit ubuntu-server (just openssh server, without mail, file, web server packages)  I need the list of installed packages so I could uninstall/clean up packages that not installed by default on my computer (without reinstalling the ubuntu) that was installed by my friend.


Are there good reasons for the negative perceptions of Skip Williams's Rules of the Game and Sage Advice articles for D&D 3.5?

The work that I'm referencing is Skip Williams's  and his work on the 3.5e Sage Advice Dragon magazine articles (issues 310-322).  The answers column in Dragon magazine (an official publication) are said to be "official answers." In the introduction to the Rules of the Game articles it states:        Have people that you play with presented you with a gloriously tangled rules question? Sit down with your rulebooks and get ready to go over them with our rules guru as he examines what happens when rules collide.     WoTC considered Williams to be their rules guru. I've read many of the Rules of the Game articles. From what I can tell, Williams has good insight and understanding when discussing the D&D 3.5 rules. I assume he has made a few mistakes, but is that enough to consider his work unreliable?   Obviously, if an answer could point out that Williams made 3.5 rules mistakes on a consistent basis, that would do it.  I am not asking about the D&D FAQ: I'm discussing William's Rules of the Game articles from Sage Advice.  Even if some of the Sage Advice answers are included in the FAQ, it's still different because I'm dealing specifically with the reliability of the above mentioned rules answers, not the FAQ's. This is not an attack on Williams (I believe his credentials are well attested).  It's an attempt to weigh whether the work mentioned is reliable as a rules source. Like WoTC I generally believe it generally is.  Good reasons: Showing consistently where the said material is clearly wrong by the rules from the books themselves. I do not see this as opinionated.


The most common ratio of picture to print (by far) is 4x6.  So why don't smartphones default to this aspect ratio?


What chapter of Vampire Knight is the anime on?

I really love the Vampire Knight anime and have rewatched it few times. Now I would to read the manga but I don't want to read the part where the anime have covered up.


He and I / Him and me / He and me / Him and I

A: Where would you have the perfect date? B: In a place without people. Just him and me.  Is this written correctly?


The best performance implementation of counting the number of true of an integer?

I have an integer number, and the number can be expressed in 32 bits. And I want to count the number of true values. For example: An integer 5566 can be expressed by 00000000 00000000 00010101 10111110, the number of true values is 9. The calculation should consider the performance because it's used for a large data set. In java, it seems that I need to convert the integer into byte[] first, and then convert into a boolean[] and then start counting, and I think there is a better way with better performance and less conversion.


requires 1 cup milk and 1 cup oats.  What is the measurement of 1 cup in milliliters?


What are the issues with undeleted dynamic instance?

I would like to know is there any problem if we are not clearing or deleting an object that scope is complete program.  I believe the OS will cleanup the memory after executing the application.  This object is not going to use any socket or file operation, it will just allocate some memory for storing some data. may be int * x = new int[100];


How to export and import gps points from Garmin 62S and QGIS

I'm pretty new to using QGIS and I'm curious about how to import and export GPS points created in QGIS. I have QGIS 2.0.1 Dufour on Windows XP and a Garmin 62s. Any suggested walk throughs would be great.


Can a particle move from one place to another without traversing the space in between?

Say I measure a quantum particle at some place, and then I find it at another place. According to my understanding of wavefunctions  the particle can get from one place to another without traversing the space in between Is this phenomena a consequence of Quantum Mechanics or have i got it wrong?


ANSI escapes in Pash prompt are displayed as garbage in Gnome terminal

I would like to use , a PowerShell implementation for mono on my CentOS box.  After compilation I started it and got  $ mono Source/PashConsole/bin/Debug/Pash.exe [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;mPash - Copyright (C) Pash Contributors.     License: GPL/BSD. See https://github.com/Pash-Project/Pash/ [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;m [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;mPASH /home/gbuday/projects/Pash> [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;m    I was told that my terminal does not understand ANSI sequences.  I use gnome terminal. Is it capable of this with some configuration trick?  Or, I need to use some other terminal emulator software?


I am new to ubuntu and am curious as to the best way to go about installing it.  I currently have:   Toshiba Satellite A300 PSAJ0C-SH308C Running Windows Vista Home Edition   Is it better to wipe the hard drive completely and freshly install Ubuntu? Or is it better to just install on top of it?  I want to do a fresh install as it just seems better but I am concerned that if I cleanse my hard drive that I will no longer have full functionality of my PC since I will be missing my drivers (eg wireless). All of the drivers on the Toshiba website are for Windows.   Please advise.  Thanks.


Namespace Prefix in JavaScript and Apex within Installed Package

When you have a dedicated Visualforce Page and can use modern JavaScript Remoting techniques, this is seldom an issue. But I'm looking at some historical code in a managed package like this:  {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}  var result = sforce.apex.execute(     "ns.WebServiceClass",     "someWebServiceMethod",     {"arg1": "foo", "arg2": "bar"} );  alert(result);   The ns is baked in. While this JavaScript can be deployed to another development org, the web service invocation will not execute as the class doesn't have a namespace prefix in this environment.  Same problem applies to Custom Button or Link URLs. Surely URLFOR('/apex/PageName') would resolve the namespace prefix; after all the button is a managed component with the namespace on it. But it doesn't work the same magic that new PageReference('/apex/PageName') does in Apex.  I've seen a few approaches including (but not limited to):   maintaining a list of manual deployment steps, using some precompile task (eg Ant) to tokenize the namespace prefix,   Can you gurus share any other techniques?


How to list disks, partitions and filesystems in Linux?

In Windows, if you type LIST DISK using DiskPart in a command prompt it lists all physical storage devices, plus their size, format, etc. What is the equivalent of this in Linux?


Placing a section between title of part and title of the following chapter

The problem is that I have to enter text in-between the Part title and the start of the next chapter. The text serves as an introduction to the chapters that follow in this Part. The test might span multiple pages and may have sections of its own which may or may not be numbered.   But when I am trying to write a section the page header shows the last section in the previous part.   I want a way to get rid of the section number in the header for only these sections to see the section title of the current section.   The MWE is as below:  \documentclass[12pt,twoside]{memoir} \begin{document}  \begin{part}{part 1} \chapter{chap 1} \section{section 1} \end{part}  \begin{part}{part 2} % Problem : The header of this page shows 1.1 SECTION 1% \section*{Introduction}    \chapter{chap 2} \section{section 1} \end{part}  \end{document}


How to greet someone when you meet them at night

Is there any formal salutation to greet someone when you meet them at night? A prefix such as 'Good' with morning, afternoon and evening works well but implies altogether a diferent meaning when used with night. To be specific, what can be prefixed with night here or any better way of 'greeting' will also work. P. S:-Informal greetings like hello and hi won't work here.


Why does the object not go inward, into the circle if the acceleration is inward? I think its because the velocity to outward? So they sort of cancel each other out? But if the speed is kept constant and the acceleration is inward, won't the object eventially move inward?   Also, what keeps the direction of acceleration always point inward?


are wifi upload and download speeds symmetric?

I am trying to figure out whether my upload speed is limited by the WiFi speed (distance from the hotspot) or by the provider link.  The computer is pretty far from the wifi hotspot; I am getting 20Mbps down and 5Mbps up.  Is it possible that 5Mbps is result of a weaker antenna in the laptop and I might get a big boost by laying ethernet cable or is it more likely that this is just the speed limit that Verizon is giving us?


Do you "suffer stress" even if you use a wish from an item?

If you use a  or a  for a wish (not emulating a spell) do you "suffer stress" - specifically the 33% chance of never casting wish again?


If a matrix A square is 0, does it follow that A = 0?

Let A be a square matrix. If $A^2 = 0$, then it follows that $A = 0$.  Is there a counterexample for this? If there isn't, what kinds of explanation can I make to justify this statement?


C# animated gif prevents controls repaint

I made a C# program and in a tabControl, on one of its pages, I have a pictureBox where I put an animated gif. When I try this program on a slow PC, as long as this animated gif is shown (the page containing it is shown), repaint of controls (for example on form resize) is done only partially. If the page containing this animated gif is not the one shown, repaint is fine. Also on my PC, which is faster, I have no problems. The examples in this link  seem to only set the "visible" property from another thread. It does not look like running the animated gif in another thread. At least in my case it didn't help. My problem is not that gif doesn't work, the gif works but anything else is slow. Exactly the gif seems to be the resource intensive one.


I really need help understanding this sentence right here:   "Every vector space is regarded as a vector space over a given field, which is denoted by F."  I know from my professor and the book that: 1) Vector space= a set of vectors in which 2 operations are defined ( addition and scalar multiplication) so that when you add any 2 vectors in the vector space, that unique element would also be in the vector space, and the same holds for scalar multiplication.  2)Field=the set of all real numbers or complex numbers.  My question is: what does it mean to have a vector space over a field?   Thanks you so much.


If $0\le x_{n+m}\le x_n\cdot x_m$, show that $\lim (x_n)^{1/n}$ exists

Suppose there is a sequence $\{x_n\}_{n\in\Bbb N}$ s.t.    $$0\le x_{n+m} \le x_n\cdot x_m\quad\forall m,n\in\Bbb N$$   show that    $$\lim_{n\to\infty}\left(x_n\right)^{1/n}=\xi\in\Bbb R$$   Seeing the "$\forall n,m\in\Bbb N$", the first thing to pop into my mind is Cauchy's criterion for sequential convergence, but this approach has got me nowhere, because there seems to be nothing I can do to control $|(x_n)^{1/n}-(x_m)^{1/m}|$.  Another thing to be noticed is that in my text book this exercise belongs to the "infinite sum" category instead of "sequence", thus it is my notion that maybe there is a very tricky method to connect this sequence to a certain infinite sum and finish the proof? Any help or hint will be appreciated. Best regards!


why is this part of my code not following the loop?

I am working on an app that takes in input from the user and adds it to a list view in android.  i decided I wanted to make a control to keep the user from adding empty strings to the list, as it would clutter the screen uselessly. I wrote this code for that.      public void addClaims(View v){     ClaimListController ct = new ClaimListController();     EditText textView = (EditText) findViewById(R.id.add_claim_field);     String added = textView.getText().toString();      if (added != ""){         final String t = format("added",added);         ct.addClaim(new Claim(added));         Toast.makeText(this, t, Toast.LENGTH_SHORT).show();         textView.setText("");         //Intent intent = new Intent(MainActivity.this, AddClaim.class);         //startActivity(intent);     }else{         Toast.makeText(AddClaim.this,"Please type something before adding", Toast.LENGTH_SHORT).show();     } } private String format(String string, String added) {     String formats = string +" "+ added;      return formats; }   however, the if(){} loop is never checked.  I tried changing the empty string to "test" and adding test in the app, and it still worked. what is causing the code to NOT check the IF and ELSE conditions?  I am not asking how to compare strings. I am asking why this problem is occurring. it did not occur to me that it was a string comparison issue.


I am very new to latex, but have spent hours trying without success to figure this out.  I need symbols for both 4 and 5 vertically stacked dots.  I know the commands for 1 dot (\cdot), and 3 dots (\vdots).  It seems like one methods that I've read about here is to combine symbols, for example combining 4 single dots to create a 4 vertical dot symbol.  But, I can't figure it out.  Any help would be much appreciated.


Subclass is not recognized from generic super class

Im trying to only allow specific classes to be used by the interact method. The code does not compile and does not recognize an underlying class to be part of the superclass.   Im using the following structure:   abstract class Interactable abstract class Building extends Interactable abstract class ContainerBuilding extends Building class Cutter extends ContainerBuidling   Why does the code below not compile? Cutter.class is not recognized as a building class.    public static void main ( String[] args ) {         ActionTest.<Building>interact ( Cutter.class );     }      public static <T extends Interactable> void interact ( Class<T> interactableClass ) {         // do something     }   Does also not compile:     public static void main ( String[] args ) {         ActionTest.interact ( Cutter.class );     }      public static void interact ( Class<Interactable> interactableClass ) {         // do something     }


Word for a moniker that you use to address friends

What is the word for the words we use to address a person or people to whom we stand in a particular relationship. For example I usually address my friends as "boss". I greet them with "Hey boss, how are you doing?" Neighbouring words or terms include term of endearment which doesn't fit as endearment seems too affectionate a word for the context to which I'm referring. Similarly pet name is too affectionate and it's also used to tag a specific person rather than a collection of people. NB: Apologies if my wording is unclear. Edit: Emphasised collection of people to clarify why pet name or nickname aren't appropriate in my context.


Best Practices for reusing code between controllers in Ruby on Rails

I have some controller methods I'd like to share. What is the best practice for doing this in ruby on rails? Should I create an abstract class that my controllers extend, or should I create module and add it in to each controller? Below are the controller methods I want to share:  def driving_directions   @address_to = params[:address_to]   @address_from = params[:address_from]   @map_center = params[:map_center_start]    # if we were not given a center point to start our map on   # let's create one.   if !@map_center && @address_to     @map_center = GeoKit::Geocoders::MultiGeocoder.geocode(@address_to).ll   elsif !@map_center && @address_from     @map_center = GeoKit::Geocoders::MultiGeocoder.geocode(@address_from).ll   end end  def printer_friendly   starting_point = params[:starting_point].split(',').collect{|e|e.to_f}   ne = params[:ne].split(',').collect{|e|e.to_f}   sw = params[:sw].split(',').collect{|e|e.to_f}   size = params[:size].split(',').collect{|e|e.to_f}   address = params[:address]    @markers = retrieve_points(ne,sw,size,false)   @map = initialize_map([[sw[0],sw[1]],[ne[0],ne[1]]],[starting_point[0],starting_point[1]],false,@markers,true)   @address_string = address end


Wireframe and Texture Preview No Longer Working

Before this morning, I used to be able to:  See the image textures of my meshes in Material Preview and Rendered preview, both in Eevee and Workbench engines. See the image textures of my meshes as I render them, in said engines See the wireframe edges within the mesh in 3D viewport when not in edit mode Be able to select meshes by clicking them in the 3D viewport  Now, I cannot do any of those things said above. Anytime I go to wireframe or Material Preview, all meshes are a dark grey colour like the background, and on some meshes, the outline does not even appear: Wireframe Mode  Material Preview Mode  On old .blend files however, the image textures work in Workbench engine, but not for new files. What's the problem? Here are my susceptible settings: -The "Wireframe" slider in "Viewport Overlays" is already set to 1.000, as it was before, -The materials that I initially set image texture of were not modified at all, and Alpha is at 1.000, like before -"Display As" in Object Properties is already set at Textured. Because I updated my AMD Radeon graphics drivers to the latest version (20.11.2) just last night, I suspect that that was the problem, and so I updated Blender as well from 2.90 to 2.91 (latest build). Still didn't fix the problem. What's the issue? Please help, because this is making it impossible to do my work. Specs: GPU: AMD Radeon R9 380 Series CPU: AMD FX-6300 6-core Processor Blender versions: 2.90 and 2.91 RAM: 8.00 GB OS: Windows 10, 64 bit


Is there a built-in checksum utility on Windows 7?

Is there a built-in checksum/hash utility on Windows 7?


Terminal is asking for password while sudo command

I was trying to run a sudo command it is aksing for a password which password should i enter


How to freeze system clock for a wine application?

I have a windows program, that works only to a particular date. It's a legacy application and I can't change the source code.  Is there any way to set a specific date in the system clock for the wine instance where I run it, so that the time in this instance is always day X?


I decided to look up my username for kicks, and found .   They seems to be scraping SO for questions with a security tag. Those questions listed appear to be every "security" related post I've been involved with on SO.   Last time I reported a similar site, it was well recieved, so it seems this is an appropriate channel to report though.


With X being a continous random variable, what prove satisfies Var(X)≤1/4

For this question I need to prove that $E(X^2)$ ≤ $E(X)$ given that X is a random continuous variable with probability distribution values between 0 and 1. I also want to prove $Var(X)≤ 1/4$  So far I know that $Var(X)=E(X^2)-(E(X))^2$


How is Y Normally Distributed in Linear Regression

I understand that $y_{i}$s are normally distributed because we assume that the residual is normally distributed which seems a decent assumption.   Question: Does that mean $Y$ is also normally distributed? In other words, if I plot a histogram of $Y$ values will they have a unimodal Gaussian shape?   Confusion: We generally apply linear regression on problems that involve predicting a continuous variable. Given the wide applicability of linear regression, I am finding it little difficult to believe that $Y$ tend to be normally distributed for all of them.   I believe that in case of Logistic Regression, I can say that $Y$ will be Bernoulli distributed, and $y_{i}$s will have the same distribution. In other words, I can say that $Y$ has a Bernoulli distribution with $P(y_{i}=1) = \theta$


Canonical replacing Unity with gnome-shell in Ubuntu 18.04 what now?

The default desktop environment in Ubuntu 18.04 is going to be gnome-shell instead of Unity 8.  Does this mean development of Unity is stopped? or just that we can expect it to be beta a bit longer?  source on  post by Mark Shuttleworth. phoronix also posted about it  and here about the


This links heavily into the following question:      However I didn't want to limit the suggestions to "Web Based" tools, I have found and used the following tools for prototyping, wireframing and mockups in the past with some success:     (part of Expression Blend)   I am also aware that some designers choose to use graphics applications such as Photoshop and Illustrator for the task.  This is a Community Wiki question so post away with your thoughts, try and keep it to one package per answer so that we can build up an idea of how the community feels about these tools.


Isomorphism classes of $\mathbb{Z}[i]$ modules.

$\textbf{Question:}$ How many isomorphism classes of $\mathbb{Z}[i]$-modules with exactly $5$ elements are there?  $\textbf{My Attempt:}$ Since $\mathbb{Z}[i]$ is a P.I.D and any module with $5$ elements is finitely generated we can use the structure theorem. In the case of a finite abelian group, the isomorphism classes determined by the prime factorization of the order and then listing all invariant factors.   In this case we have that $5 = (2-i)(2+i)$, but I don't know how to use the ideal $(2-i)$ and $(2+i)$ in the structure theorem...  Any help working this problem or showing an example of a similar problem is appreciate.d


I have an Atari 1040ST with a half-bad power supply - Along with two 5v Red wires that Are good, there is a Blue wire that requires 12v .9A (aka 9mA??) - With A/c on, it's measuring at 10.73v (on the Blue wire, if you also have an Atari) causing my machine to cycle the Floppy drive when powered up to a beat of "we will rock you" steady clicking so, I'm pretty sure 10.73v is causing that - I have an external adapter that is 12v but 1.25A and another one that is 12v but .41A - I was reading one of the contributors here, Insta's answer which leads me to think I should use the 1.25A and definitely Not the .41A adapter - I will be splicing in to the Black Ground wire (there are 3 of these, I'll just pick one) and I will Cut the Blue and Splice the + going to that pin, bypassing the Atari PS altogether - I will then have the A/C AND the DC adapter on a Surge suppressor so that they power up at the same time - Should/Can I use the 1.25A adapter is my long question (sorry 'bout that!)


Prove that $\left|\dfrac{z-w}{1-\bar{z}w}\right| = 1$ where $\bar{z}$ is conjugate of $z$ and $\bar{z}w\ne 1$ if either $|z| = 1$ or $|w| = 1$.  I used $|c_1/c_2| = |c_1|/|c_2|$ and multiply out with $z = x + iy$ and $ = a+ib$ but I am getting stuck near finish.


Show that $ \lim_{x\rightarrow x_{0}}u\left( x\right) $ exists and $u$ is harmonic in $\Omega$

Let $\Omega$ be a bounded domain in $\mathbb{R}^{n}$, $n\geq 3$ and $x_{0}\in\Omega$. Suppose $u$ is harmonic in $\Omega\backslash\left\{ x_{0}\right\}  $ and $$ \lim_{x\rightarrow x_{0}}\left\vert x-x_{0}\right\vert ^{n-2}u\left( x\right)  =0, $$ Show that $$ \lim_{x\rightarrow x_{0}}u\left(  x\right) $$ exists and $u$ is harmonic in $\Omega$ if we define $u\left(  x_{0}\right) =\lim_{x\rightarrow x_{0}}u\left(  x\right)  $. I am thinking to use MVP at $x_0$ to show harmonicity but I am not getting any clue because showing limit exists is itself challenging. I can argue that $$ \lim_{x\rightarrow x_{0}}u\left(  x\right)\neq \infty $$ as the function is bounded by the values on $\partial \Omega$ and $\partial B(x_0,\delta)$ for some small $\delta>0$.


Let $f\ge0$ be integrable on $[a,b]$. Let $f$ be continuous on $x_0\in (a,b)$ and let $f(x_0)>0$.   Prove $$\int_{a}^{b}{f(x)dx}>0$$  It is easy to see it, graphically, because $$f\ge 0 \Rightarrow\int_{a}^{b}{f(x)dx}\ge0$$  and if $f>0$ somewhere between $a$ and $b$, then the zone of $F$ between those point is "real" (positive) and $\ne 0$.  My problem is, how do I show it formally?  I would appreciate your help.


How to create a keyboard shortcut to emulate a specific keystroke (not a command)?

I am using Ubuntu 19.10 on a Mac, and so I do not have a Delete key on my keyboard.   To emulate that key, I can do Fn + Backspace but I would like to choose another combination of keys like Super + Backspace. Is this possible?


Why does a floating capacitor act differently than a grounded capacitor?

I'm having difficulty understanding why a floating capacitor will store less charge than a grounded capacitor. Imagine you have two parallel plates and a low DC voltage source like 5V, with the negative side connected to neutral ground, and that you have two different ways of wiring it: In case 1, you connect one side of the voltage source to each plate to make a normal capacitor. The voltage across the capacitor is given by $Q = C V  $ is given by the geometry of the plates. In case 2, you still connect one plate to +5V, but leave the other plate floating and neutral. According to my understanding, charge should still build up on the positive side of the capacitor because it's at the same potential relative to the other plate as case 1, and it has the same geometry. On the negative plate, negative charge should be locally attracted to the positive plate, leaving behind positives, overall keeping the plate neutral. Practically, I'm pretty sure case 2 is wrong. What I think will happen is a miniscule amount of surface charge will be stored in the positive wire to maintain the electric field, but that charge will be way less than the stored charge of case 1. Can you explain where my understanding is wrong/not deep enough?


Does a deleted answer still count as the first answer?

Some badges like the  requires one to be the first to answer. I have cases where my answer was accepted like , and the answer previous to mine was deleted, thus making my answer the only one.  Is a deleted answer counted as the first answer?  Does it prevents a question for awarding the "first to answer" type of badges?  I understand that some answers might be related to experience, but I would be inclined to accept an answer that provide an official documented reference.


What happens if a vampire can't rest in his coffin?

The lore text about vampires (MM, p. 295) states (emphasis mine):     Every vampire remains bound to its coffin, crypt, or grave site, where it must rest by day.   How should this be interpreted? Does it simply mean that vampires can only sleep in their coffin (or similar), and if they don't, they just suffer the usual exhaustion rules for not sleeping?  Or are there other consequences? There doesn't seem to be additional information in the 5e Monster Manual, so information from previous versions or general vampire lore is also valid.  (I'm not considering differences between PC and NPCs/monsters. Sure, NPCs usually don't take rests, but that's just for convenience reasons. If the vampire is your BBEG, he might run away and heal up with a short rest before the players catch up to him. So my question disregards whether the vampire is a PC or NPC.)  As a side note, do vampires actually sleep at all? The general undead theme seems to be "no food, drink or sleep", so do vampires "resting" in their coffin simply linger around awake for 8 hours to get a long-rest's benefits?


I need to run a jQuery file in a twig file in order to bind aqua lift segments.  but jQuery is not loaded yet .  How can I load jQuery at this point without loading it twice? thanks


In the SO Moderator Primary Election, why are some counts of down-votes positive and others negative

I was idly looking at the number of up and down vote counts on the SO Moderator primary election pages, and realized some of the down-vote scores were positive, and others negative, which is … puzzling.  I'm not sure what reputation you need to see the effect; it's when you click on the total score you can (if you have enough reputation, I assume) see the breakdown.        Sorry about the misalignment — manual snapping of the images.  Is this a bug? Is there a good explanation?


Block direct IP connections to Apache web server

I need to figure out how to block direct IP access to my website.  Example: I want it so that when people type my IP address 1.2.3.4 into the browser it doesn't work, but when they type www.example.com it does work.  I am using Apache 2.4.9, and my website is run using WampServer.   I have tried other solutions from some old questions on here, but none of them have worked for me. I have tried pasting virtual host stuff into the vhosts.conf, but I couldn't get it right, and I tried doing rewrite stuff with the htaccess file, but that didn't work either.


First entry to Italy on a Schengen visa issued by Greece

Is landing in Italy as the port of first entry allowed on a Schengen visa issued by Greece? Is there any official website to take a print for records?


Why is variable assignment preceding command ignored?

The bash 4.1 manpage states (emphasis added)...     Simple Commands      A simple command is a sequence of optional variable assignments   followed by blank-separated words and redirections, and terminated by   a control operator. The first word specifies the command to be   executed, and is passed as argument zero. The remaining words are   passed as arguments to the invoked command.   Verifying the version on my system (NOT patched for shellshock)...  #  bash --version GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu) ...   However, preceding variable assignments, without semicolons, are supposed to be a way to localize environment variable values for the life of that one command invocation only, but do not seem to ...   #  x=123 echo $x; unset x; echo $x bash: x: unbound variable #  x=123; echo $x; unset x; echo $x 123 bash: x: unbound variable #  x=123; echo $x | tr '1' 'a'; unset x; echo $x a23 bash: x: unbound variable #  x=123 echo $x | tr '1' 'a'; unset x; echo $x bash: x: unbound variable bash: x: unbound variable #  x="123" echo "$x" | tr '1' 'a'; unset x; echo $x bash: x: unbound variable bash: x: unbound variable #  x="123"; echo "$x" | tr '1' 'a'; unset x; echo $x a23 bash: x: unbound variable   Solution Per  it appears that the command must deliberately use the environment variables of its parent and echo does not. But shell invocations like bash -c do ...  x=123 bash -c 'echo $x'; unset x; echo $x 123 bash: x: unbound variable   Resources


postfix - how do you redirect all emails to one user, eg *@example.com → user@example.com

I'm using postfix for my email. I know I can use /etc/aliases and newaliases command to redirect certain email, eg I can redirect root@example.com to user@example.com by putting root: user in my /etc/aliases and then running newaliases. However I'd like to do the equivilant of *: user, so that all email to example.com will get sent to user@example.com.  How do I do this?


Cauchy-Product of non-absolutely convergent series

While grading some basic coursework on analysis, I read an argument, that a Cauchy product of two series that converge but not absolutely can never converge i.e. if $\sum a_n$, $\sum b_n$ converge but not absolutely, the series $\sum c_n$ with $$c_n= \sum_{k=0}^n a_{n-k}b_k$$ diverges.  Although we didn't have any theorem in the course stating something like this, it made me wonder if it was true.


Prove that if $n\geq 4$ is even then $2^n -1$ is not prime.

Since $n\geq 4$ is even, we can let $n=2k$. Then $2k\geq 4$ or $k\geq 2$ which can be substituted where we have $2^{2k}-1 = (2^k)^2 - 1^2 = (2^k+1)(2^k-1)$. Since $k \geq 2$, we have that $2^k\geq 4$.  This is where things get derailed. Where do I go from here?


Why is there an answer in the SO database that has tag data attached?

through SEDE that has a non-null value of "JavaScript" in the Tags column (query below),  SELECT -- TOP 5   p.Id AS [Post Link],   p.Tags,   p.PostTypeId,   ph.* FROM Posts p INNER JOIN PostHistory ph ON ph.PostId = p.Id WHERE PostTypeId = 2 AND Tags IS NOT NULL ORDER BY ph.CreationDate ASC   and for the lazy (aren't we all?), .  A PostTypeId of 2 corresponds to answers, . This is the only answer in the entire database that has a non-null tag. It's not supposed to have a tag, right? Does anyone have a clue about how this happened?  Updated info  I just queried the database with  SELECT * FROM PostTags WHERE PostId = 310914   and it resulted in an empty set, so at least according to that table, the answer has no tags.


What is the minimum time to consider with a connecting flight in the USA?

Given the extensive time taken for immigration formalities in the US, what is the shortest time to consider between connecting flights in the US, when coming from abroad?  Until now I have always entered the US at my destination. This is not always the cheapest option. I was told that 3 hours is the advised time to go through immigration and boarding of a connecting flight. Online booking sites still offer connecting flights, with a transfer times sometimes even less then 1 hour.


Bootcamp Windows USB Installation Errors

I am having issues installing Windows 7 through Bootcamp on my Mac. I want to be able to natively boot into my Windows installation so Parallels or VMWare will not work for me. I am using an early 2013 MBP with retina.  Here's what happens: I am able to partition the drive with the Bootcamp assistant, download the support software, and have the machine reboot into the Windows installer. Upon installation however, it seems like the USB controller for my MBP is not active and it's not able to find my installation media. The specific error that I'm getting is:  "A media driver your computer needs is missing. This could be a DVD, USB, or Hard disk driver. If you have a CD, DVD, or USB flash drive with the driver on it, please insert it now."  I made a video reproducing what happens:   Hopefully someone out there has run into this as well, I could really use some unblocking!


Why is there no "match all" special character in regex?

I love regexp but I find it rather confusing why there is no "match all" special character? For example, if I wanted to select a HTML tag and its contents, I would do re = "<tag>([\s\S]*)</tag>"  You see, [\s\S] is a workaround to solve the absence of a match-all special character. Is there a reason why a match-all is missing from the spec? I know about . but it's not that pretty either: re = "<tag>([.\n]*)</tag>"


I am beginning the process of coverting all of my MySQL to MySQLi.  I have been doing much research on this but find it a bit confusing.  I have two questions at this point regarding the matter:  1) What does it exactly mean to "escape" a string and where does the code for this go? I assume it goes on my page with my database login credentials.  I found the following but find it somewhat hard to interpret:  "We'll use the mysqli_real_escape_string() function. Since it needs a database connection, we'll go ahead and wrap it in its own function. In addition, since we only need to escape strings, we might as well quote the value at the same time:"  `   function db_quote($value) {     $connection = db_connect();     return "'" . mysqli_real_escape_string($connection,$value) . "'";     }   ` "If we are not sure of the type of value we pass to the database, it's always best to treat it as a string, escape and quote it. Let's look at a common example - form submission. We'll use our previous INSERT query with user input:"  `  // Quote and escape form submitted values $name = db_quote($_POST['username']); $email = db_quote($_POST['email']); // Insert the values into the database $result = db_query("INSERT INTO `users` (`name`,`email`) VALUES (" . $name . "," . $email . ")");   ` 2) After I have this set up in my code, how do I properly test that it is indeed working (Without completly wiping out my tables, etc?)  I just really need some further explanations on this subject before I begin the process.  Any resources, advice, or pointers in the right direction would be greatly appreciated.


I want to read my *.bok in Ubuntu 16.04?

I have files with extension .bok from Shamela file. They contain Arabic text.  What can I do to read .bok files in Ubuntu 16.04 LTS? Is there an application to open them?  === UPDATED Tue 18 Oct 2016 ===  I have followed this  but it doesn't work in Ubuntu 16.04.   .bok files can be opened by Maktaba El-Kirtasse & Maktabah Al-Miftah but they are not displayed correctly.   They look like this:  أچأ‘أ أ‡أ،أƒأ،أ أƒ - أ‡أ،أچأ³أ‘أ؛أ‌أµ أ‡أ،أƒأ¦أ¸أ³أ،أµ أ£أ¶أ¤أ³ أ‡أ،أچأµأ‘أµأ¦أ‌أ¶ أ‡أ،أ¥أ¶أŒأ³أ‡أ†أ¶أأ¸أ³أ‰أ¶ (أ£أ„أ¤أ‹أ‰) أ¦أ³أٹأµأ‘أ؛أ“أ³أ£أµ أڑأ³أأ؛أ¤أ‡أ° أ•أ³أ›أ¶أأ‘أ³أ‰أ° (أپ) أ¦أ³أأ³أٹأ³أڑأ³أأ¸أ³أ¤أµ أ¤أ³أ¦أ؛أڑأ³أ‡أ¤أ    is an example .bok file


why is jvm returning false when comparing two objects of same type?

public class Test     {         public static void main(String[] args)        {         String s = new String("test");// ***          String s1 = s.toUpperCase();          String s2 = s.toLowerCase();          String s3 = s1.toLowerCase();          System.out.println(s==s1);//first case          System.out.println(s==s2);//second case          System.out.println(s==s3);//third case        }     }   1) Why does it return false for the third case(commented). Both s3 and s  are pointing test yeah? But it seems JVM creates another object named test for s3 in the heap memory. But it is not the same for the second case(commented). It uses the object which was previously created as s(commented as *** in the code). Why is that?   2) And what happens to s1 object TEST because s3 is created from s1. Will s1 be destroyed or will it be in heap?


How would one add outline to a text object? Do text objects even have outline support?   Should I instead create the text in GIMP or a similar program and import them in blender to replace the text objects?


I upgraded to Windows 10 from 7. I have 2 monitors with the same resolution arranged horizontally.  If I move the mouse cursor to the top or bottom of one monitor, then try to move it to the other monitor, the mouse cursor catches in the corner and won't go to the other monitor. I need to move it slightly down or up to get to the other monitor. This is infuriating.  How do I fix the mouse corner issue?  I found , which sounds similar, but it seems the settings have changed since Windows 8 as the solutions do not work for Windows 10.


Would there be a comma in the sentence after 'therefore'?    'These pipelines run for long distances and therefore(,) are susceptible to both natural and man-made phenomena. '


Would this hypothetical rule change ever matter?

One of  is     104.3f If a player would both win and lose the game simultaneously, he or she loses the game.   . However, it seems to me like it "ought to be" the case that if there are only 2 players and  [A loses]  [B loses]  [B wins]  would occur simultaneously, then B should win, since  win-and-lose-simultaneously should be better than just-lose.  For that reason, it seems like the     Proposed Alternative :    If, simultaneously, all players would lose the game and      some players would win the game, then the players who would not win the game      lose the game, and the game is a draw between the remaining players.  Otherwise,      if a player would both win and lose the game simultaneously, he or she loses the game.   would make more sense.  However, I can't think of any situations in which that would matter.  Are there any possible situations in which my proposed alternative  would yield a different result from the actual rule?


In superluminal phase velocities, what is it that is traveling faster than light?

I understand that information cannot be transmitted at a velocity greater than speed of light. I think of this in terms of the radio broadcast: the station sends out carrier frequencies $\omega_c$ but the actual content is carried in the modulated wave, the sidebands $\omega_c\pm\omega_m$. The modulation envelop has its group velocity and this is the speed at which information is being transmitted. We also know, for example, that x-rays in glass have a phase velocity which is greater than the speed of light in vacuum.   My question is, what exactly is it that is travelling faster than the speed of light?    EDIT: I know it couldn't be anything physical as its superluminal. My problem is, what is it that has absolutely no information content yet we associate a velocity with it.


Space time curvature due to electric charge or magnetic charges

since we know that gravitational force is nothing but a curvature in space-time. I have a similar analogous for the electric or magnetic charges. Similarity is that both electromagnetic and gravitational forces follow the inverse square law. consequence of this can be that we can have a another interpretation of electron orbital motion causes by curvature in space due to electric charge (as mass of electron is very small so STR have no significance here). But problem is that we have two different type of charges (+ve and -ve) which gives repulsion and attraction, whereas in gravitation force mass always gives the attraction forces. Please correct me if I am wrong.


Can superstring theories predict our 4 dimensions?

Popular science literature is replete with the necessity for superstring theories to live in at least 10 dimensions, requiring at least 6 of them to be compactified so that they are not observable. But can they predict that 4 dimensions are not compactified? Or conversely, for a superstring theory in e.g. 10 dimensions, are there arguments against compactifying 7 dimensions? or only 5? Arguments other than being ruled out by observation I mean.  My question has been marked as a duplicate of . Only the answer  is relevant to my question. It quotes a paper  by Karsh and Randall which seems to address my exact question:     We propose a new selection principle for distinguishing among possible vacua that we call the “relaxation principle.” The idea is that the universe will naturally select among possible vacua through its cosmological evolution, and the configuration with the biggest filling fraction is the likeliest. We apply this idea to the question of the number of dimensions of space. We show that under conventional (but higher-dimensional) FRW evolution, a universe filled with equal numbers of branes and antibranes will naturally come to be dominated by 3-branes and 7-branes. We show why this might explain the number of dimensions that are experienced in our visible universe.   But this is far too advanced for me as I can barely recognise buzzwords! And answer A10723 is of rather low quality, just a vague description of the goal of the paper which does not give any hindsight into the physics in there. In any case, this also mean that the other question, , mine is marked as a duplicate of, has even poorer answers than they look like at first glance. Following the  link on the page of Karsh and Randall paper turns out several citations which look to address my question and Q10075, but again at a level I can't grasp.


I know that given a commutative ring with unit the sum of two radical ideal is not a radical ideal. I would want to know if for example in the ring of polynomial in $n$ variables with coefficient in the field of complex numbers is true that given two radical ideal their sum is again a radical


I get these weird floral patterns on cylinders, I try to Inset the flat part of face on the top of the cylinder to create some sort of geometry to work with.  Any Ideas on how I can fix this???  Thanks!


Complete negation or partial? "I don't think anybody X"

"I don't think anybody saw it coming."   I assume that this sentence means that the speaker thinks nobody saw it coming, but can't this pattern "I don't think anybody X" be took as "I think that not everybody X (but I think some X,)" in some context?   In other words, do you always take the example sentence I quoted from  as "I think nobody saw it coming," not as "I think not everybody saw it coming, but I believe some did at least?"


It is said that a clock on a spaceship runs slower than one kept on earth. The clock on earth can be taken to be at rest with respect to the events on earth.So, the clock on the spaceship is in motion with respect to the events on earth.Let the time interval between two events on earth be $t_1$ as measured by the clock on earth. Thus, the interval as measured by the clock on the spaceship will be $t_2=t_1/(1-v^2/c^2)^{1/2}$ [ v= speed of spaceship w.r.t. earth and c= speed of light], which makes $t_2>t_1$. So, shouldn't the clock on the spaceship run faster?


An integral : $\int_{-a}^a \frac{\cos(\pi n x/a)}{x^2+a^2}\mathrm dx$

How can I evaluate $$\int_{-a}^a \frac{\cos(\pi n x/a)}{x^2+a^2}\,\mathrm dx$$?  My attempt : $$\begin{align}\mathcal{I}& =\displaystyle\int_{-a}^a \dfrac{\cos(\pi n x/a)}{x^2+a^2}\mathrm dx \\ & = 2\displaystyle\int_0^a \dfrac{\cos(\pi n x/a)}{x^2+a^2}\, \text{ ,even integrand}\\ &=2\displaystyle\int_0^{\pi n} \dfrac{\cos u}{\frac{a^2u^2}{n^2\pi^2}+1}\left(\dfrac{a\mathrm du}{n\pi}\right)\, \text{ ,via substituting $u=\dfrac{\pi nx}{a}$}\\ &=\dfrac{2\pi n}{a}\displaystyle\int_0^{\pi n} \dfrac{\cos u}{u^2+n^2\pi^2}\, \mathrm du\\ & =\dfrac{2\pi n}{a}\displaystyle\int_0^{n\pi} \dfrac{\cos u}{(u-i\pi n)(u+i\pi n)}\,\mathrm du\\ & =\dfrac{i}{a}\underbrace{\displaystyle\int_0^{n\pi} \dfrac{\cos u}{u+i\pi n}\mathrm du}_{\mathcal{I_1}}-\dfrac{i}{a}\overbrace{\displaystyle\int_0^{n\pi}\dfrac{\cos u}{u-in\pi}\mathrm du}^{\mathcal{I_2}}\, \text{ ,via partial fraction decomposition}\end{align}$$ $$\begin{align}\mathcal{I_1}&=\displaystyle\int_0^{n\pi}\dfrac{\cos u}{u+i\pi n}\mathrm du \\&=\displaystyle\int_0^{(i+1)n\pi}\dfrac{\cos(v-i\pi n)}{v}\mathrm dv\, \text{ ,via substituting $v=u+i\pi n$}\\ & = \displaystyle\sum_{k=0}^\infty \dfrac{(-1)^k}{(2k)!}\displaystyle\int_0^{(i+1)n\pi} \dfrac{(v-i\pi n)^{2k}}{v}\mathrm dv\, \text{ ,via Maclaurin series}\end{align}$$ from where I can't figure out further. Any help is appreciated.


$\lim_{n\to\infty} \sqrt[n(n+1)]{ \prod_{r=0}^n {n\choose r}} $

I have been trying to figure out the following limit: $$\lim_{n\to\infty} \sqrt[n(n+1)]{\prod_{r=0}^n {n\choose r}}=\mathscr L$$ It’s quite natural to take the natural log of both sides: $$\ln \mathscr L = \lim_{n\to\infty} \frac{\sum_{r=0}^n \ln {n\choose r}}{n(n+1)} \\ =\lim_{n\to\infty} \frac{(n+1)\ln(n!) - 2\sum_{r=0}^n \ln(r!)}{n(n+1)}\\  =\lim_{n\to\infty} \frac{(n+1)\ln(n!) - 2\ln(\color{green}{n! \times (n-1)! \times (n-2)! \dots \times 2!\times 1!})}{n(n+1)}$$ I believe the green term is called the superfactorial of $n$, but I barely know anything about it. The last thing I tried was to write $$n! \times (n-1)! \times (n-2)! \dots 2!\times 1! =n^1 \times (n-1)^2 \times (n-2)^3 \dots \times 2^{n-1} \times 1^n = \prod_{r=1}^n r^{n+1-r}$$ but that doesn’t help. Any ideas on how to evaluate this limit?


Adding attribute won't work for cloned elements

I would like to add the value of an input field to the value of the attribute data-value. This actually works but I have a button that generates new fields. So the value can be added to the first input field but not to those which get generated by clicking the button.  <button id="another_field">Add a new field</button>  <div class="cpt_area">   <input placeholder="Type something here..." class="full_width cpt_name" type="text" name="cpt_name[]"> </div>   // This will copy an input field $('#another_field').click(function() {   $('.cpt_name:first').clone().prependTo(".cpt_area").val(''); });  // This will generate a data-value attribute $('input').keyup(function() {   $(this).attr('data-value', $(this).val()); });   You can try it here:   Any ideas how I can fix this?


USB Hub affects WiFi only once every few weeks

using certain USB C hubs. There even is an Apple support article that shows that this happens. Now that's okay—I've come to accept that some dongles just don't cut it when coming to proper shielding. However, I have a hub and it exhibits some peculiar behavior. Most of the time it doesn't interfere with WiFi. However, it occasionally (once every one or two weeks) seems to cancel my WiFi signal. I know it's the hub's fault because when I unplug it, my WiFi starts working again. However, it starts working fine again after a while. What could be a possible explanation of this?


"There is no point in" or "There is not a point in"

I was thinking about these negations. Do these mean the same thing?     There is no point in ...   There is not a point in ...   or:     I have no clue   I do not have any clue     etc.


Finding the question I've started answering

So, here's the sequence of events:   Read an interesting question, that I think I have an answer for. Start typing up an answer. Realize that my thought isn't completely formed and stop typing the answer. The answer draft is saved. Change computers. Complete the thought to answer the question. Can't find the question again.   Now, theoretically, I should remember enough about the question to be able to search for it, but is there a quicker/easier way to find the question to which I have a saved answer draft?  As a side note, I understand the need to have a limited number of active answer drafts, but why only one?  For example, I start working on a complicated answer, walk away for a couple of minutes, answer a different question, then come back to complete the complicated answer.


A girl I've never met before sent me a message through Instagram asking if Id like to make 20 grand. Naturally I said "who wouldn't?". She then laid it out for me. She said she manages access accounts at Fidelity investment.  And that all I have to do is give her my mobile banking login info and she will transfer 3 grand into my account from a non-profit investment I then transfer back her cut and the next day another 4 grand. She said I don't need any money on the account. Is this a scam?!


What are good sites to find citations in BibTex format?

When working with Bibtex, manually transferring the citation information for articles, prooceedings, books, etc. can be a tedious work. Some web sites provide citations in Bibtex format. What are your favorite sites to get Bibtex citations of your used references?


3 follow-up emails over 2 weeks, and the potential supervisor still wont respond to me?

so i have this pool of potential supervisors who I am super interested in their research.  I have formulated the best introductory email - short, concise and relevant to their research- . No response! I sent back a follow-up email which had my old email in addition to my CV, still no response! I even called , but no one picks up the phone, and whoever picks up the phone is a clueless assistant who tells me to email the supervisor and ask him/her myself.   I even visited one the labs and spoke to one of the researcher's post-doc students who volunteered to edit my emails and told me it was a good one. But then again, no response.  how is that even possible ? I dont live in the university's city (Toronto) so I cant even stalk them in their offices.  any idea why is this happening ?   N.B   The time period is 2 weeks. I sent an introductory email, next week I followed up with another email.  EDIT- For those of you who tell me not to "harass" professors, it is not harassment so please use another word. It is the applicant's responsibility to secure a supervisor for Biomedical engineering program by emailing/calling potential PI . To prove my point on following up , one supervisor who works in a hospital told me that the hospital email service filtered out my email. If I hadn't called him to inquire about my original email, I wouldn't have moved on in my research knowing that his lab is indeed "full". Applicants are not expected to simply sit and wait for supervisors to "notice them" and hope for the best , I must put myself on the map. I don't see why professors don't get much heat -like I am getting in this post" from harassing sponsors for grants !


how does one solve $\lim_{n\to \infty} (\frac{n^{2}-2n+1}{n^{2}-4n+2})^{n}$

I cant use lhopital's rule here is my attempt:  Limit of $(\frac{n^{2}-2n+1}{n^{2}-4n+2})^{n}$ =$e^{\lim_{n\to \infty} n\times \ln(\frac{1 -2-n +\frac{1}{n^{2}}}{1 -\frac{4}{n} +\frac{2}{n^{2}}})}$ I got stuck here


Can I carry spare Lithium-Ion batteries with me on Lufthansa?

I am travelling from the US to India on Lufthansa. I have five spare Lithium-ion batteries, each 850mAh.  Can I bring them back safely?


Is there a way to auto CC to a specific email adress all outgoing emails from a Gmail account?  I tried doing it with a filter but I don't have the option of CC. I know there is a script for GreaseyMonkey but it only works on Firefox and I need this to work on Chrome.


Hyphenation of words with accents doesn't work. I'm writing my document in Portuguese so I have accents like '`~^ for some words but these words are not hyphenated. How do I solve this?  THIS WAS SOLVED BY:  (1) updating my texlive installation. (2) adding the lines   \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}   to my document. Actually the last line is not necessary but the text font would be too ugly without it.


In Star Trek - What's the Point of the Transporter Room?

I hope this isn't a silly question but I've been watching TNG and this bothers me.  The transporter 'pad' area is relatively small.  As a guess, maybe 12 people can fit on it.  But the vast majority of times it's being used by 2-3 people.  However, the transporter is able to beam people from anywhere on the ship to anywhere (within some distance I presume).  It's fairly common for them to perform a transport directly to the bridge.  So, why is there an actual room?    If a three man away team is to beam down to the surface of a planet - why do they have to walk all the way to the transporter room, then stand on the pad to get down there?  Why not simply beam them from where they are, to the surface.  The ship's computer is able to locate anyone on board.


Is there any clean CSS method to make each letter in a word a different color?

I need a way to allow each letter of a word to rotate through 3 different colors. I know of some not so clean ways I can do this with asp.NET, but I'm wondering if there might be a cleaner CSS/JavaScript solution that is more search engine friendly.  The designer is including  for each page. I'd rather not have to manually generate an image for every page as that makes it hard for the non-technical site editors to add pages and change page names.


How to calculate $S_{n}=\sum_{i=1}^{n}\frac{1}{i^{2}}$

In math lesson, my teacher told me that Euler once used a very delicate method to calculate $\displaystyle S_{n}=\sum_{i=1}^{n}\frac{1}{i^{2}}$ and wrote a paper about it.  I wonder how to calculate this. I need a precise answer, not the answer that it's less than a number such as 2.


This didn't solve my problem, the situation is exactly the same, it used to work in 16.10 but it's not working now.   Is this a bug should I file a bug report?


Why does the order of summation of the terms of an infinite series influence its value?

I was looking through my lecture notes and got puzzled by the following fact: if we want to find the value of some infinite series we are allowed to rearrange only the finite number of its terms. To visualize this consider the alternating harmonic series: $$\sum_{n=1}^\infty(-1)^{k-1}\frac1k=1-\frac12+\frac13-\frac14+\frac15-+\dots=0.693147...$$  But if we rearrange the terms as follows the value of the series gets influenced by this action: $$1+\frac13-\frac12+\frac15+\frac17-\frac14+\dots=1.03972...$$  So commutativity of addition isn't true on infinity? How was it obtained and how can it be proved?


I am trying to use BibLaTeX with the Windy City style to produce Chicago author–date citations and a bibliography. I have a TeX document: %!TEX encoding = UTF-8 Unicode  \documentclass[12pt]{article} \usepackage{letltxmacro}  \usepackage[reflist=true,style=windycity]{biblatex} \addbibresource{refs.bib}  \begin{document}  \section{Scenario}  Here is a claim I am citing \parencite{latexcompanion1993}.  \printbibliography  \end{document}    And I have the following file saved as refs.bib in the same directory: @article{einstein,     author =       "Albert Einstein",     title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})         [{On} the electrodynamics of moving bodies]",     journal =      "Annalen der Physik",     volume =       "322",     number =       "10",     pages =        "891--921",     year =         "1905",     DOI =          "http://dx.doi.org/10.1002/andp.19053221004" }  @book{latexcompanion1993},     author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",     title     = "The \LaTeX\ Companion",     year      = "1993",     publisher = "Addison-Wesley",     address   = "Reading, Massachusetts" }  @misc{knuthwebsite,     author    = "Donald Knuth",     title     = "Knuth: Computers and Typesetting",     url       = "http://www-cs-faculty.stanford.edu/\~{}uno/abcde.html" }  I open the TeX document in TeXworks, press compile with the default settings, and this is the output:  No bibliography is generated, and the citation just prints the identifier string instead of formatting it. It seems the problem is that BibLaTeX cannot "find" refs.bib. How can I fix this?


Show that there is a one to one correspondence between $\wp(A)$ and the set of all functions $A \to \{0,1\}$

Can I only prove that they have the same cardinality, and, by definition, having the same cardinality implies that there is a bijection between the sets, or do I have to prove that there is an injection and a surjection between the sets?


I know it should be "a" but it sounds so awkward? So should it be "an"?


Apache/Windows is very slow on only local network

I have this weird problem with apache. First, a little bit of background:  I'm using XAMPP - but i tested wamp and vanilla apache, various versions - to do local (php) development on a Win7 Pro x64 machine. I also have a public IP, which is accessible from the outside. This works just great, speedy and peachy.  However, if I'm trying to access the apache from another PC/iPhone/whatever in the network, it takes a lot. a lot! to connect. However, after the connection is made, files are downloaded pretty fast (8mb/sec).  Also, i noticed that Vagrant is very slow (is what made me to think on this as an issue; first i was thinking that is only my apache configuration)  So, long story short:   user from outside the network can access my PC with no problem  local users must wait ~10-20 seconds for a simple page load (php, html, doesn't matter) xampp installed on another pc on network works ok lan sharing works just fine firewall is off, antivirus (avast free) was off for tests   I'm on win 7 pro, updated.  Things to consider:   apache run on port 80 or 81 or 8081 or whatever, same result every time changing OS (e.g.: use mac) it's not an option :)   So, what the hell should i look for? Any ideas?  Thanks!


How do I create a list of Python lambdas (in a list comprehension/for loop)?

I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question:


How do you call a word that is the result of merging two words?

What do you call a word that is the result of merging two words together?  For example, Maroon + Tuna = Marona, or Crab + Apple = Crapple, or Choking + Holding = Chokehold   The word I am looking for is not "nick name" The word I am looking for is not acronym e.g. Laser as "light amplification by stimulated emission of radiation"


Why does printf print more arguments than expected?

Why is this shell script printing inputs twice?  I expected the script to ignore the inputs after 5.  Script:  #! /bin/bash echo "Enter 5 words : " read  a b c d e  printf "> %s %s %s %s %s <" $a $b $c $d $e   Output:  user@linux:~$ pico ifs2.sh user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5  > 1 2 3 4 5 <user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5 6 > 1 2 3 4 5 <> 6     <user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5 6 7 8 9 0 > 1 2 3 4 5 <> 6 7 8 9 0 <user@linux:~$    And, the following script works no matter what is set to $IFS. Why?  #! /bin/bash     old="$IFS" IFS=":" echo "IFS = $IFS" echo "Enter 5 words : " read  a b c d e  printf "> %s %s %s %s %s <" $a $b $c $d $e     IFS="$old"   Output:  user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1 2 3 4 5   > 1 2 3 4 5      <user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1 2 3 4 5 > 1 2 3 4 5     <user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1:2:3:4:5 > 1 2 3 4 5 <user@linux:~$


Power on by rtc and put user pass on win 10 automatically

I would like my pc to power on automatically every day at a specific time. I know how to do this in BIOS. The problem is that when the pc is booted, it requires a password to log in on windows. The question is: How do I get my pc to login with my password automatically?  Thanks.  Clarification: What I want is to keep my account locked with a password. I don't want to disable my password in order to login automatically. The automation that I want, is to have a password, but inserted and log in automatically when my pc boots up automatically through rtc boot from bios.  Clarification 2: I don't want to disable my password universally. What I want is to still have my password active and inserted automatically when my pc boots automatically through rtc from bios. When I boot it up myself, I want it to ask me for the password.


Majorana fermions in Euclidean and Minkowski signatures - contradiction with Wikipedia Table

In this wonderful lecture note on Clifford Algebra and Spin(N) Representations,  Somehow I find some inconsistency with his Tables of Euclidean and Minkowski fermions, compared with the Table of Wikipedia. (see the bottom ) Wikipedia page shows that for Euclidean fermions, even 6d (6,0) and 7d (7,0) have Majorana fermions. But his Table says NO Majorana in both 6d (6,0) and 7d (7,0).  Wikipedia page shows that for Minkowski fermions, even 8d (7,1) and 1d (0,1) or 9d (8,1)  have Majorana fermions. But his Table says NO Majorana in both 8k and 8k+1 d.  Could any expert clarify why there is a discrepancy above? In summary, in Wikipedia, out of mod 8 dimensions, Wikipedia shows that 5 out of 8 cases have Majorana fermions, in both Euclidean and Minkowski signatures.  only said that 3 out of 8 cases have Majorana fermions, in both Euclidean and Minkowski signatures. Here I marked the red colors for the inconsistency data of  compared with Wikipedia Table. See Wikipedia page :


No stamp on non-EU passport while travelling from Belfast to Dublin

I am an Irish citizen, along with my whole family.   My in-laws are non-EU citizens. They travelled to the UK on a visit visa while they applied for an Irish visit visa in their home country. During their stay in the UK, their Irish visa was approved. After facilitation through the Department of Justice visa section, they got their visa at the Irish Embassy London.   Two days later, they came to Ireland via cheap budget flight, landing at Belfast airport because they wanted to see Belfast, as well. Then, we travelled via road in my Irish registered car to Dublin. They stayed two weeks and flew back to the UK via Ryan.   In this whole process their passports were never stamped.  In fact, apart from their airline tickets, there is no evidence they had travelled to Ireland. They applied for another Irish visit visa. They wrote in their visa application that they did travel to Ireland, but the visa section is asking for proof of the stamp for that visit. How can we explain that there is no border control so no stamp was put in?  Was their entry illegal even though they had valid visas for both the UK and Ireland? Should we have done something differently?


If $n \in \mathbb N$, find $\sum(-1)^r \binom{n}{r}\left(\frac {1} {2^r}+\frac {3^r} {2^{2r}}+\frac {7^r} {2^{3r}} + \cdots \text{m terms}\right)$

If $n \in \mathbb N$, find$$\sum(-1)^r \binom{n}{r}\left(\frac {1} {2^r}+\frac {3^r} {2^{2r}}+\frac {7^r} {2^{3r}} + \frac {15^r}{2^{4r}} + \cdots \text{upto m terms}\right)$$


Change in the width of depletion layer with doping

I have previously learnt that increasing the  will decrease the width of the  and vice-versa. However, I am unable to understand this. Does it have some relation with force of repulsion?


Order of adjectives in "free weekly two-hour scientific meetings"

What is the correct order of these four adjectives in the phrase "free weekly two-hour scientific meetings"? I'm not exactly sure where to put 'two-hour'.


Images are not indexed in google search console

I have submitted my sitemap which contains web pages and images. 78 web pages and 59 images are submitted. The web pages are indexed (71 out of 78), but images are not indexed. Why does that happen. Should I do anything additional for the images to be indexed.  Screen shot of search console> sitemap attached :     Working on magento 2  sitemap url :


External power supplies and DC to DC converters for Computers and notebooks

Part one :   I have this Question ,   as we know , Most notebooks power adapters are 19.5V output.  While the CPU and GPU works on 12V and the SSD works on 5V . , so the motherboard should have two DC to DC power converters ,  one from 19.5V to 12V for CPU and GPU  and another From 19.5v to 5V for SSD nd harddrives.  mainly the notebook will never need 19.5 V .. so why dont they choose 12V Power supplies for notebooks in General and use 19.5 V power supplies ?  Why bother making two DC to DC inverters instead of just one ?  in case of 12V power supply , they already have 12V ready and just need a DC to DC converter to get the 5V for SSD.  keep in mind that internal desktop power supplies never outputs 19.5 V , it just outputs 12V and 5 V and 3.3 V ... now imagine this power supply external (lol) the place is not a big deal isnt it ?  so back to the main Q , Why all External power supplies used for PC outputs 19.5V and not 12V like in the internal ones ? it makes no sense.  Part Two :   Graphic Cards power ..  As we all know , most mid range to high end Graphics cards needs more power , and they come either with a 6 pins 12 v  plug or 8pins 12V plugs for more power it needs (150 watts to 250 watts)  My question is : If I use an external power supply of 12v outputs and  plugged it into the Graphic cards direclty ,  would it work ? or is it better to use the 19.5V notebook external power supply and add a DC to DC converter from 19.5 to 12V and then plug it into the card?  and in case the 12V works , does it need some kind of Board to make that 12V inline with the card voltage specs ? for more stabe 12V ? or is it Standardized and it will be within specs ?  some cards like the GTX 1070 needs 150 watts 12V input , and some like the 1080 , 180 Watts , and the 1080 Ti 250 watts.  I can find 150 watts external power with 12V output , but sadly anything more than this outputs 19.5 and needs DC to DC board ... example the DELL Notebooks power supply of 330 watts outputs 19.5 volts ...  Part Three :  some ATX power supplies come modular ,  and my question is : lets say I use just one 12V plug and ignore the other plugs , can I use the whole wattage from that single plug ? or is there a limitation of each plug watt?  They say it is single Rail (meaning watt is not divided between Vi) but I am concerned about the plug wattage and the wires if they can stand it or not.  Example : I need to power a graphics card of 300 watts .. and I use an ATX power supply with single rail of 350 watts ... the power supply has the motherboard connectors that I will not use , and has only one PCIe 6 pin plug for card .. but since I am not using it for mother board , can I use one port for the whole 300 watts or  do I need to  take 12 V from the Motherboard plug ?  I can use thicker wires for 300 watts , if the plug on the power supply can stand 300 watts ..  more over , on the PCB of the power supply itself , does it stand 300 watts since it is a single rail or must also be divided between plugs ?  Thanks for your replies .


How to install (old) packages for Ubuntu 9.04?

Based on some excellent feedback by Mark here (), today I was able to use the vmware converter to clone my production server for a staging server.  However the nic won't come up no matter what I do. I attempted to inistall vmware tools, as I suspect that the fact that it is not installed might prevent the nic from working. (I have the nic set as a vmxnet3 card in the vm settings). The install failed because there were several dependencies missing as well as the Linux headers. Given that Ubuntu 9.04 has been EOL'd, the packages I need to install to get the vmware tools to install are no longer available. I doubt the ubuntu 9.04 install CD has the packages on it.   What are my options? I'd rather not upgrade the version of Ubuntu yet, as the point of the vm right now is to maintain parity with the production server. Might I have better luck resetting the driver to use vmxnet2 instead of the vmxnet3?  Thanks in advance!  Chris


MBR recovery - Corrupted MBR after it changed to dynamic & testdisk gives up . No backup sector found

I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:     cannot write MBR   It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.  My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments  including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.  Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick  search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.  Here are my questions:   When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.  Did my dual install convert those basic MBR to dynamic MBR? How did that happen? Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.  What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.  What other options should I be trying to restore my old MBR so Windows can boot?      Update  as of last I managed to create a live USB w/ W7  I used AOMEI Partition assistant 6.0 and on deeper  search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier  - superficial search revealed all old partitions but NOT this one   and the later partitions showed up on Deep search & I can select Other partitions for recovery but for this one. It wont let me select the partition I want  Here are some more screen shots    So in summary all that happened is   4 primary windows 7 partition -->  wanted to install Linux so I deleted 2 non bootable partitions after backing them up  ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR  (using Live USB Linux,gparted )  Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition.  this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action  after this - life gets worse. I am  on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again


What is the best way to animate the camera path?

I'm modeling a car driving along a road(speeds up, slows down, and stops at traffic lights to wait till the lights turn green, etc.) What is the best way to animate the camera path for the following scenario?   The camera starts moving from point A, and it takes 500 frames to get to point B. During this 500 frames, the camera first gradually speeds up, then moves at a constant speed, and finally slows down to a complete stop at point B. The next 50 frames, the camera will stay at point B. From frame 551, it takes another 500 frames to get to point C from point B. The camera experiences the same motion as described in #1 (speeds up, constant speed, slows down, then stop.) Again, the camera will stay at point C for another 50 frames.  Point C to D is a curve path ( added using Shift + A -> add path). I want the camera to move along the path from frame 1101 to frame 1200. The camera should have the same motion as before(speeds up, constant speed, slows down, then stop.)   What is the best way to animate the camera path in this case? Is there any Python scripts available and can be applied to case like this? Thank you all in advance for your replies.


Girl overdoses on 'zombie' drug. Replaces her own consciousness

I recall this being a short story, possibly in a Gardner Dozois collection that I read in the mid-2000s. The protagonist is a young woman, living at home with her parents. She overdoses on a 'zombie'(?) or 'z'(?) drug that's used to give your unconscious mind control over your conscious body. In doing so she effectively kills herself, despite her body being up and walking around with an entirely different personality in control. The main character constantly talks about her former self in the third person, as if she's inhabiting someone else's body.   Her parents are concerned and threaten to send her to some kind of rehab facility. At the end she agrees to go, or at least considers it.


How do I recover a closed Sticky Note in Windows?

By accident, I closed my sticky notes in Windows. Is there any way to recover them?


JavaScript date compare fails but prints same value

The following code does not compare two date.  var dateTextB=columns[0];         var dateB = new Date(dateTextB);          alert(dateA+' '+dateB);          if (dateA==dateB)         {         // code         }          dateA= new Date(dateTextB);   That prints   Mon Aug 18 2014 23:30:00 GMT+0600 (Central Asia Standard Time)----------Mon Aug 18 2014 23:30:00 GMT+0600 (Central Asia Standard Time)  But Does not fulfill if condition. But prints same values sometimes.  I  have tried  if (dateA==dateB.getTime()) also.  Does anyone know what is wrong here?


Principal $G$-bundles as pull back bundles.

Let $G$ be a compact Lie group and consider a $G$-universal bundle $\pi: EG \to BG $ where $BG$ is the classifying space for the group $G$ and the bundle $\pi: EG \to BG $ is defined as the principal $G$-bundle such that $EG$ is a contractible space equipped with a free $G$-action and $BG:=EG / G$. Now let $X$ be a topological space. How can I prove that every principal $G$-bundle $\xi=(E,p,X)$ with base-space $X$ can be realized as the pull-back of the universal bundle $\pi: EG \to BG $?


During a new Mac setup, it asks for the iPhone passcode. Why?

Why are they asking me for this? What is it used for?  EDIT: Some have suggested that this is a recent effort to encrypt all of the iCloud data:


Understanding the concept of conditional probability

We have $X_1,..,$ indepdentnt random variables with common distribution $F(x)$ and $N$ geometric rv independent of the X_i's . Let $M = \max ( X_1,...,X_N)$. Im trying to understand the following:    Im having trouble understanding the first and third equality. This is how I view it for the third equality   $$ P(M \leq x, N=n \mid N > 1 ) = \frac{P(M \leq x, N=n, N>1 )}{P(N > 1) } = \frac{P(M\leq x \mid N=n, N>1)P(N=n, N>1)}{P(N>1)} = \frac{P(M\leq x \mid N=n, N>1) P(N=n \mid N>1)P(N>1)}{P(N>1)}= P(M\leq x \mid N=n, N>1) P(N=n \mid N>1) $$  Is this the correct reasoning? Also, the first equality follows by definition?


Event listener for appended html elements not working

The event listener for my appended html elements are not working. What this button does is that it will open up a popup that prompts user for delete confirmation.   I'm doing the view page this way instead of the normal html and jsp code way because I want to make use of ajax and jquery for pagination. The event listener works properly back then. I've omitted out the code because its not very relevant.  What am I doing wrong?  viewAnnouncements.jsp

   main.js  $('document').ready(function() {     $('.announcement-delete-button').on('click', function() {         const id =  $(this).data().id;         $('.grey-screen').show();         $('#announcement-delete').fadeIn();         $('.announcement-delete-yes')             .attr("onclick",              "window.location.href='/testweb/announcementController?Submit=delete         );     }); });   EDIT: I have already tried binding the event listener to tbody and calling for the child selector 'announcement-delete-button' and it still doesn't work.


If gravity doesn't exist,what are the implications?

I just heard about new theories proposed by Erik Verlinde about the fact that Gravity doesn't exist..or at least it's not a foundamental force. My question is : if this is true what are the implications on current models like string theory , eternal inflation ecc ecc ? what can change in the understanding of our universe ?


Community Detection for Complete Weighted Network

I am wondering if someone who has experience in trying to perform community detection algorithm with complete graph with weighted network. As weighted networks represents the similarity of each node and hence it is complete network considered all pairwise of nodes. The adjacent matrix can be represented in the following table:  NODE   A     B     C   A    -    0.2   0.3   B   0.2    -    0.7   C   0.3   0.7    -   So can I just perform any weighted related community detection methods on this?  Is there any other method? Or am I mistaking something?


This has me a bit confused. At first I wanted to say begin, but then I started to think that "the evening news" could also be replaced by "it", so the correct form would be "begins".  The evening news ____ at 6:00. (begin/begins)  Which is correct? Could both options be correct?


what's the real value of $\sqrt2^{\sqrt2^{\large \sqrt2^{\sqrt2^{\unicode{x22F0}}}}}$?

I heard this problem from my friend today, but unfortunately we could not figure out what's happening here.  $$x^{x^{\large x^{x^{\unicode{x22F0}}}}}=2$$ $$x^2=2$$ $$x=\sqrt2$$  but  $$x^{x^{\large  x^{x^{\unicode{x22F0}}}}}=4$$ $$x^4=4$$ $$x=\sqrt2$$  I have a feeling that this might be a duplicate, but I could not find this problem (basically I couldn't figure out what to search). So what's happening here, and what's the real value of $$\sqrt2^{\sqrt2^{\large  \sqrt2^{\sqrt2^{\unicode{x22F0}}}}}$$  ?


Is there a homeomorphism between the $n$-dimensional cube to the $n$-dimensional simplex that doesn't create hard corners?  This is related to a similar question found .  However, the mappings in response to that question create corners.  Specifically, I've been playing with schemes where   Set a direction to squeeze the point $x\in[0,1]^n$, $v$ Project $x$ into the nullspace of $v$, $y = x - \frac{v^Tx}{v^Tv}v$ Draw a line between $x$ and $y$, $l(\alpha) =  \alpha(y-x)+x$ $l(0)=x$, so we know it's in the hypercube.  Find $$   \alpha_l = \arg\max\{\alpha\geq 0:l(\alpha)\in[0,1]^n\}   $$ $$   \alpha_r = \arg\min\{\alpha\leq 0:l(\alpha)\in[0,1]^n\}   $$ Basically, how far left and right we can travel and stay inside the cube Define the squeeze factor $$   \alpha = \frac{\alpha_l}{\alpha_l-\alpha_r}   $$ Basically, how far between the leftmost and rightmost points we are along the direction $v$. Determine a new leftmost and rightmost point on the simplex, $$   z_l = l(\alpha_l)   $$ $$   z_r = \frac{1-\sum x_i}{\sum (y_i-x_i)}   $$ It turns out the left most point is the same for the cube and the simplex. Use the squeeze factor to determine the new mapping for $x$ $$   w=\alpha(z_r-z_l)+z_l   $$   Anyway, that was a little circuitous, but it works.  It turns out if $v=(1,\dots,1)$, we get the first answer to the linked question above.  If we set $v = x$, we get the second scheme.  Alright, so what's the problem?  This mapping makes something that kind of looks like a reentrant corner on smooth areas mapped to the simplex.  For example, if we set $v=(1,\dots,1)$ and map a circle centered at $(0.5,0.5)$ of radius $0.25$ to the simplex, we go from  to  Basically, we get a heart shaped object with these hard corners.  I've tried a bunch of different schemes for choosing $v$ and I keep getting corners, which is undesirable.  I really want something that's mapped smoothly to the simplex.  Anyway, is there a smooth map from the hypercube to the simplex where where something like a circle mapped from the hypercube to the simplex won't have these corners?    Edit 1  I think @Del has a good answer and here's what it looks like.  Given a rectangular grid    The scheme transforms this into    which shows how the grid is squished to fit into the simplex.  It turns out this is smooth for the use case I described above.  We can see this with the deformed circle    Anyway, thanks for the help!


Matrix $\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}$ to a large power

Compute $\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}^{99}$  What is the easier way to do this other than multiplying the entire thing out?  Thanks


What happens to a devil who draws the balance card from a deck of many things?

I recently read the accepted answer to , and this part brings a good question:     A devil does not choose to be lawful evil, and it doesn't tend toward lawful evil, but rather it is lawful evil in its essence. If it somehow ceased to be lawful evil, it would cease to be a devil.   The effect of a Balance card from the Deck of Many things reads:     Balance: Your mind suffers a wrenching alteration, causing your Alignment to change. Lawful becomes chaotic, good becomes evil, and vice versa. If you are true neutral or unaligned, this card has no effect on you.   So if a devil draws the card and becomes chaotic good, and such a change means it ceases to be a devil, then what is it instead? How does it change?


SQL Query With IF Statement Not Returning Results to Recordset in VBA

I have a VBA Userform which pulls data from a SQL Server Database. I want to be able to run a SQL Query with an IF statement included & to run a different SELECT query based on the result of the of the IF statement. I've started with a very simplified version to try & get the concept working before getting into anything too big & complicated. In the end scenario I'll be throwing the user a message if the result is a particular result.  When I run the code I get the below error when I get to the line with the Msgbox command.    I've used the Immediate window to check the Recordcount but I get the below error.    It's like the recordset isn't being populated at all.  I've run this query in SQL Server & I get the expected results so the query itself seems to be fine.  Any ideas what I'm doing wrong or if this is just one of the many oddities of VBA?  Set objconn = New ADODB.Connection Set objrs = New ADODB.RecordSet  objconn.Open ConnStr  strsql = "DECLARE @Num tinyint " & _     "SELECT @Num=Number from FNOLTracker.HandlerList WHERE Name='Joe Bloggs' " & _     "IF @Num IS NULL " & _     "BEGIN " & _     "SELECT 'Not There' AS Result " & _     "END " & _     "ELSE " & _     "BEGIN " & _     "SELECT 'There' AS Result " & _     "END"   With objrs     .Open strsql, objconn, adOpenStatic, adLockReadOnly, adCmdText     MsgBox .Fields(0) End With


Find the highest natural number which is divisible by $30$ and has exactly $30$ different positive divisors.

Find the highest natural number which is divisible by $30$ and have exactly $30$ different positive divisors.  What I Tried: I am not sure about any specific approach to this problem. Of course as the number is divisible by $30$ , some of the factors of the number would be $1,2,3,5,6,10,20,30$ , but that only makes $8$ divisors and there will be $12$ more which I have no idea of . Can anyone help me?


What does comma do while using cin in c++

I was practicing practicing some programming and by mistake wrote the following line of code :  int a,b; cin>>a,b;   Can anybody explain what the comma does here and why doesn't the compiler show any error.


Is this the right way to protect database from injections?

I have made some adjustments to my code and now is working , i just wonder if this is a good and safe way or i have to change or add something to the code.  <?php  session_start(); $db = mysqli_connect("localhost", "root", "", "store"); if (isset($_POST['register_btn']))  {     $username= mysqli_real_escape_string($db, $_POST['username']);     $email = mysqli_real_escape_string($db, $_POST['email']);     $pas= mysqli_real_escape_string($db, $_POST['pas']);     $stmt = $db->prepare("INSERT INTO users (username,email,pas)                            VALUES(?,?,?)");     $stmt->bind_param("sss", $username, $email, $pas);     $stmt->execute();            mysqli_query($db, $stmt);     header("location: login.php"); } ?>


What is Salesforce Wave Analytics? What is the need for it?

I am newbie to "Wave Analytics" in Salesforce. I want to learn about Wave Analytics Components available in Salesforce version and its uses. There is no proper documentation around it. Where can i see the Wave Analytics in Salesforce org.  Can any one explain me about "What is Wave Analytics in salesforce and what is the use of it?". How can i enable 'Wave Analytics' in already created developer org.   Thanks,


Will the Neewer TT560 speedlite work with my camera?

I am looking into getting the  for my Olympus E-PL5, since it has a  that works with it. Is this a viable solution?


tikz-cd: Error: No shape named tikz@f@1-0-1 found

In my use of tikz-cd, the down, right and left arrows (\ar{d},\ar{r}, \ar{l} respectively) work fine, but I seem to have no uparrow (nor any up right arrow or up left arrow). When I have \ar{u}, I get the error "No shape named tikz@f@1-0-1 found". Can anyone help me with this?  \documentclass[a4paper,12pt]{article} \usepackage{tikz-cd} \begin{document}  \begin{tikzcd} A\ar{u}\\ B \end{tikzcd}  \end{document}   Replace that u with an l,r or d and it works.


Bumped into a behaviour I'm struggling to grasp without an assistance. Here's a recursive function:  OPERATORS = ['+', '-', '*', '/']  def recursive(value, operands):     if not operands:         return value     for operator in OPERATORS:         new_value = str(eval(value + operator + operands[-1]))         new_operands = operands[:-1]         yield from recursive(new_value, new_operands)  def countdown(value, operands):     return next(i for i in recursive(value, operands) if i == '0')  ans = countdown('5', ['1', '2', '3']) print(ans)   return value raises StopIteration which is not handled by caller so exception is raised before anything returns.  If return value is substituted by yield value; return like this:  def recursive(value, operands):     if not operands:         yield value         return     for operator in OPERATORS:         new_value = str(eval(value + operator + operands[-1]))         new_operands = operands[:-1]         yield from recursive(new_value, new_operands)   or yield value; raise StopIteration or yield value; raise StopIteration(value) or loop is hidden under else clause then exception is handled by caller the way I expect and function eventually returns '0'. All of these also raise exception: raise StopIteration, both bare and with argument, yield; return value, and bare return.  In short, caller breaks when StopIteration is raised and yield never returned.  Why?   states that first StopIteration is handled in a different way then others.  says:     Currently, StopIteration raised accidentally inside a generator function will be interpreted as the end of the iteration by the loop construct driving the generator.   Apparently, except the first time. Still, the details of underlying implementation and exact reasoning behind it are unclear to me.  Two more additional questions:   what's the right way of writing this snippet? ? is it a quirk, a feature, or something else?   Edit: fixed mistakes in code  Edit2: As far as I understand the execution flow in the first snippet is following:   countdown creates generator from recursive('5', ['1', '2', '3']) Which spawns generators all the way down the tree to recursive('11', []) At this point StopIteration('11') is raised   And here is the tricky part. What happens here? How StopIteration is handled?  Second snippet:   same same '11' is yielded upwards until it reaches countdown Where it gets rejected by if '11' == '0' Control flow reaches back to yield '11' and raises StopIteration Repeat until '0'   From what I see now that is pretty much expected behaviour. StopIteration is intrecepted by it's caller and does not propagate upward. Caller in turn raises StopIteration without arguments. That is why the '11' part of an original exception never reached countdown. Exception in the first snippet traceback was bare StopIteration raised in countdown by recursive('5', ['1', '2', '3'].


Using and testing UDP data over the internet

I have a GSM modem that sends data via UDP (it appears) I have configured it to send all data to my public IP address over the internet but no data is arriving at my end so I need to troubleshoot.  I have confirmed that a TCP connection can be made from anywhere on the internet on the same port that the modem is supposed to be communcating on. Im using "Aggsoftware TCP/IP or UDP data logger" to listen for incoming data.  Is there software that I can use to test sending of UDP data?


why the below code does not show error while passing by reference

In the main function I created a local variable x . then passed it by reference to fun function . where the function declaration is  int fun(int &x); but I am not understanding how the local variable is passing to fun function.  if it would int &x=x where first x is the formal parameter and second x is the local variable . though the statement  int &x=x shows error in a function .but why this is not showing any error or warning here. if anybody could not understand my question. plz give me details on how a reference variable would pass in a function. another thing I want to add is this. if a reference variable would been created in the memory  #include<iostream> using namespace std;  int fun(int &x) {     return x; } int main() {     int x=10;     cout << fun(x);     return 0; }


False proof? If $f: G \rightarrow H$ homomorphism, and $H$ abelian, then $G$ abelian?

Let $f: G \rightarrow H$ be homomorphism, and $H$ is abelian.  So $G \big/ \ker f \cong \operatorname{im}f$. Since $\operatorname{im}f$ is abelian, so is $G \big/ \ker f$. So for every $g_1,g_2 \in G$: $g_1\ker f\cdot g_2\ker f=g_2\ker f \cdot g_1\ker f \Rightarrow g_1g_2\ker f=g_2g_1\ker f$, hence $g_1g_2=g_2g_1$, so $G$ is abelian.


I'm having a bit of trouble selecting from a data table using LINQ. The results would map to a class TabResult. The class looks like this:  public class TabResult {     public decimal Value;     public string LineNumber; }   Now I'm trying to add these results to an array of IEnumerable<TabResult>, one index of the array per sheet.   This was my first attempt in code:   public LCRResultSet(DataTable results) {     for (int i = 0, sheet = 72; i < 3; i++, sheet++)     {         _results[i] = from tab in results.AsEnumerable()                       where tab.Field<string>("LCR_SHEET_NUMBER") == sheet.ToString()                       select new TabResult { LineNumber = tab.Field<string>("LCR_LINE_NUMBER"), Value = tab.Field<decimal>("VALUE") };     } }   It works okay for the first iteration, _results[0] having the number of values I expect, however the second iteration causes _results[0] to be the same as _results[1], and the third iteration causes _results[0] and _results[1] to be the same as _results[2]. It works okay when I write the 3 queries separately, however I'd prefer to do it this way.   Is there something I missed about LINQ and datatables? Thanks in advance.  Edit 1:  A few comments suggested that sheet was being captured as a constant, however, I don't see how this could be as the variable was being incremented each iteration, but the results of previous iterations are being overwritten by the latest iteration.  is a link to an imgur album showing the watch window after each iteration.


Meat is sold at the butchers' or meat is sold at butchers?

I'm not an English speaker. Could you tell me what is wrong with the sentence below?   Meat is sold at butchers.  The correction says meat is sold at the butchers'. I have no idea why need to have the before butcher'.


Package pdflscape has strange indent when including an abstract?

I am trying to use the pdflscape package. When I include an abstract, the indenting on the left margin becomes really large. Here is a minimal working example:  \documentclass[letterpaper, 12pt]{article} \usepackage{pdflscape} \begin{document} \abstract{     The abstract of my document. } \begin{landscape}     Why is the left margin so large here? \end{landscape} \end{document}   If you comment out the abstract then the indenting is as expected. Any idea what is going on here? Suggested workarounds?


Given a matrix A, how to find  B such that AB=BA

Let $A = \begin{pmatrix} 1 &  1& 1\\  1 & 2 &3 \\  1 &4  & 5 \end{pmatrix}$ and  $D = \begin{pmatrix} 2 &  0& 0\\  0 & 3 &0 \\  0 &0  & 5 \end{pmatrix}$.  It is found that right-multiplication by D multiplies each column of A by the corresponding diagonal entry of D, whereas left-multiplication by D multiplies each row of A by the corresponding diagonal entry of D.  Construct a 3 x 3 matrix B, not the identity matrix or zero matrix, such that $AB=BA$.


Series expansion at $x=0$ of $\frac{3x}{1+x^2 + x^4}$

Need fast solution how to show series expansion of function at x=0:  $$f(x)=\frac{3x}{1+x^2+x^4}$$  Please some hints.


Zonal statistics tool excluding some features in ArcMap?

In Arcmap 10.6, while using Zonal Statistics as Table tool, some of my feature zone data is being excluded from my output table. Here is the scenario. I'm using a polygon layer of buildings, with a raster layer above it that represents radio coverage.  Each pixel is an integer value representing signal strength at that area.  My intention is to add attributes to the building polygons that represent the amount of signal power in their are. I'm using Zonal Statistics to Table tool to with buildings as my feature zone data and FID as the Zone field.  I'm using radio coverage raster as my Input Value raster.  The output is a table that includes a row for each polygon/building, ( except those that are inexplicably missing  ), and each row has a value for based on the raster signal strength values in that polygon's area.  As an example, the polygon in light blue is one of the polygon/buildings being left out.  It's well within raster coverage as can be seen by the Pixel Inspector tool.  Also the pixels are smaller that the building, 10' x 10'. The surrounding features are being included.  Out of 48400 polygon/buildings, about 80 seemingly randomly located building are being excluded from the output. Can someone please tell me why? Also as a side note. I originally had this problem using 1100' x 1100' pixels.  I read somewhere that the pixels should be smaller than the polygons. Why is that? If a single pixel covers several polygons, shouldn't all the polygons inherit the value of the pixel that's completely covering it?