Using bool? variables, can somebody explain why true & null results in null and false & null results in false?  void Main() {         bool? a = null;     bool? b = true;     bool? c = a & b;      Console.WriteLine($"{b} & NULL => " + c);      b = false;     c = a & b;     Console.WriteLine($"{b} & NULL => " + c); }   Output:     True & NULL =>    False & NULL => False   I would also be happy about the duplicate, because I did not find it, yet.

Why is operator '&' defined for bool?, and operator '&&' is not?  How exactly does this 1) bool? & bool? and 2) bool? and bool work?   Any other "interesting" operator semantics on Nullable? Any overloaded operators for generic T?


What I trying to do is creating an empty array such as char[] array = {};  then I have a method called append static void append(char array[], char x) {   array = Arrays.copyOf(array, array.length + 1);   array[array.length - 1] = x; }  for example, I try to append x into the empty array and it keeps throwing Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


What exactly is fire, why isn't it defined by the three states of matter, and does it have mass, weight?

I wanted to know that if FIRE is Matter or Energy. I know that both are inter-convertible. but that doesn't mean there is interconversion taking place just like nuclear fusion or fission. If it is matter, then its has to occupy space and have mass. I really doubt that fire has mass. If it is energy, then i don't get it. Please enlighten me from my ignorance.


In my VF page i have header .I want to display info icon before my text (before Note).  Vf Code
     <apex:outputpanel rendered="{!isSuccess}">                      <svg class="slds-icon slds-icon-text-default" aria-hidden="true">                 <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#announcement"></use>             </svg>             Description of icon when needed                   Note: Please view the Records     </apex:outputpanel>

Script 1: Does not Work  <apex:page >     <apex:stylesheet value="{!URLFOR($Resource.slds221, 'assets/styles/salesforce-lightning-design-system.min.css')}"/>     <svg aria-hidden="true" class="slds-icon slds-icon--x-small slds-icon-text-default slds-is-sortable__icon">         <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{!URLFOR($Resource.slds221, 'assets/icons/utility-sprite/svg/symbols.svg#email')}"></use>     </svg> </apex:page>   I can't see any icon on my page. However when I remove stylesheet reference it renders fine. What am I missing  Script 2: This Works (Removed slds-static reference)  <apex:page >     <svg aria-hidden="true" class="slds-icon slds-icon--x-small slds-icon-text-default slds-is-sortable__icon">         <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{!URLFOR($Resource.slds221, 'assets/icons/utility-sprite/svg/symbols.svg#email')}"></use>     </svg> </apex:page>


I remember problems setting up my Lubuntu with UEFI/Legacy boot mode. That was more than a year ago and the system worked fine - until now. For whatever reason, it refuses to boot again.  I went through a number of different recipes involving boot-repair, but it still won't boot. The paste from boot-repair can be found here .  My approach was to format my EFI partition again in FAT32 and assign the boot flag to it before running boot-repair. In boot-repair > advanced options > GRUB location, I cannot select my EFI partition (sda1) in the field 'separate /boot partition'. However, it does not complain about not finding the EFI partition. The EFI partition (sda1) also shows up in the /etc/fstab (sda4), after running boot-repair:  # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda4 during installation UUID=85ae8106-d4ae-49ee-9e77-e93aa86c6e63 /               ext4    errors=remount-ro 0       1 # /boot/efi was on /dev/sda1 during installation #UUID=D954-89D5  /boot/efi       vfat    defaults        0       1 # /home was on /dev/sda5 during installation UUID=ffc890d1-0cd6-4a5b-86c3-b6c8db17a1e1 /home           ext4    defaults        0       2 # swap was on /dev/sda3 during installation UUID=507de4f4-fde7-4c5b-badd-66defcbc27f5 none            swap    sw              0       0 #UUID=d2bb4e60-b497-4cd4-8b8c-04ffe5f3085a  /boot   ext4    defaults    0   2   In my BIOS, however, I do not find any boot loader that uses UEFI.   I would appreciate any help on this issue.  Thanks, Michael  EDIT  I went foward and installed , which boots, but doesn't find Lubuntu either...  SOLUTION  I discovered this post , which describes how to do the BIOS/UEFI conversion. Apparently, this works for me.

Accidental BIOS mode install  I have Intel 64-bit hardware with UEFI setup utility. Ubuntu 14.04.1 LTS was  installed as the only operating system on the only drive attached. Accidentally Ubuntu was installed in BIOS/CSM/legacy mode.  Convert to UEFI  While later on learning about UEFI, the goal is to change this existing Ubuntu installation to (quicker) boot via EFI/UEFI. I do still want to have some kind of - 2 seconds displayed - boot menu that allows me to enter the UEFI setup utility. Therefore I think I do need use Grub (can't use an EFI boot stub) and . I have already re-partitioned the drive using a Live CD and inserted a 200 MiB EFI partition in the beginning of the drive and marked that fat16 formatted partition as type id 0xEF.  Before:  # fdisk -l /dev/sda ...    Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048   108478463    54238208   83  Linux /dev/sda2       108480510   125044735     8282113    5  Extended /dev/sda5       108480512   125044735     8282112   82  Linux swap / Solaris   After:     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *      411648   108478463    54033408   83  Linux /dev/sda2       108480510   125044735     8282113    5  Extended /dev/sda3            2048      411647      204800   ef  EFI (FAT-12/16/32) /dev/sda5       108480512   125044735     8282112   82  Linux swap / Solaris  Partition table entries are not in disk order   No boot-repair please  The Ubuntu community wiki suggests to use boot-repair to . I don't want to use a GUI, or install any extra packages, and I don't want any data being accidentally sent to pastebin.com and because I do want to know what will be changed exactly, I don't want to use .  Under the hood  Trying to figure out what boot-repair actually does, I found this snippet:     Boot-Repair will convert a BIOS install to UEFI by uninstalling grub-pc, and installing grub-efi, if gpt partitioned.   source:   UEFI mode install comparison  A clean Ubuntu 14.04.1 installation in UEFI mode creates a 512 MiB Fat32 formatted EFI partition. That partition contains one directory /EFI/ubuntu, containing 4 files: grub.cfg, grubx64.efi, MokManager.efi and shimx64.efi. The grub.cfg contains:  search.fs_uuid 7d843e47-3917-4114-8725-55dfa1fbe002 root hd0,gpt2 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg   Search.fs_uuid points to the UUID of the Linux installation partition, in this comparison UEFI installation Linux is installed partition /dev/sda2 (versus sda1 in BIOS mode installation).   No potential Asrock firmware issues found  Having CSM still disabled in firmware and using the clean UEFI mode Ubuntu installation. Resizing the 512 MiB EFI partition to 200 MiB using a Live CD and gparted results in that its formatting changes from FAT32 to FAT16. The Asrock firmware P1.50 (incorrectly called BIOS by AMI in boot message "BIOS date") is still able to boot into UEFI mode Ubuntu: UEFI+FAT16 = ok. (msdos) using the same Live CD terminal command gdisk and its commands r g p w also results in a UEFI bootable Ubuntu on an MBR partitioned drive: UEFI+MBR = ok.   Question  Does this mean that the only commands I do need to execute - from the legacy Ubuntu install and in this order - are:  # apt-get install grub-efi # apt-get remove grub-pc   ? Or is more needed to be done?


It may be the case that this is extremely trivial to prove, but I just cannot see it. I want to prove this:  $|a\alpha-b\beta|\leq|a-b|+|\alpha-\beta|$  for $0\leq a,\alpha,b,\beta\leq1$  I think it is also the case that  $|a\alpha-b\beta|\leq|a-b + \alpha-\beta|$  I actually THINK these might hold because I cannot provide any counter example.  Any kind of help would be extremely appreciated.

Let a,b,c,d be real or complex numbers with absolute value less than $1$. Is the following true:  $$|ab-cd| \leq |a-c| +|b-d|?$$


How do I prove that indefinite integral of $\sec x$ is equal to $\ln(\sec x + \tan x) + C$?  I tried to substitute $t = \cos x$ but that didn't help. I have no idea how to integrate it any other way, and my textbook doesn't offer a derivation.

The standard approach for showing $\int \sec \theta \, \mathrm d \theta = \ln|\sec \theta + \tan \theta| + C$ is to multiply by $\dfrac{\sec \theta + \tan \theta}{\sec \theta + \tan \theta}$ and then do a substitution with $u = \sec \theta + \tan \theta$. I like the fact that this trick leads to a fast and clean derivation, but I also find it unsatisfying: It's not very intuitive, nor does it seem to have applicability to any integration problem other than $\int \csc \theta \,\mathrm d \theta$.  Does anyone know of another way to evaluate $\int \sec \theta \, \mathrm d \theta$?


I have an error in logcat   java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference   Trying to view a picture in the list make a class for this code i think the error in the method View getView but i do not know where it is exactly i think may be here in the definition of thumbNail   public class useradaptor extends BaseAdapter {                private Activity activity;              private LayoutInflater inflater;              private List<user> userItems;  ImageLoader imageLoader = AppController.getInstance().getImageLoader();  public useradaptor(Activity activity, List<user> userItems) {     this.activity = activity;     this.userItems = userItems; }  @Override public int getCount() {     return userItems.size(); }  @Override public Object getItem(int location) {     return userItems.get(location); }  @Override public long getItemId(int position) {     return position; }  @Override public View getView(int position, View convertView, ViewGroup parent) {      user u = userItems.get(position);     if (imageLoader == null)         imageLoader = AppController.getInstance().getImageLoader();     NetworkImageView thumbNail = (NetworkImageView) convertView.findViewById(R.id.imageview);     thumbNail.setImageUrl(u.getPicture(), imageLoader);      Cache cache = AppController.getInstance().getRequestQueue().getCache();     Cache.Entry entry = cache.get(u.getPicture());     if(entry != null){         try {             String data = new String(entry.data, "UTF-8");             // handle data, like converting it to xml, json, bitmap etc.,         } catch (UnsupportedEncodingException e) {             e.printStackTrace();         }     }else{         // cached response doesn't exists. Make a network call here     }     return convertView;   } }

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


It's been more than ten years, but I've been thinking about a book I read as a kid. I can't remember any part of the title or author's name.   It begins with an old man who sits and ponders a stone in his hand constantly, which he's worn smooth. He takes on a boy or young man and teaches him the secret of magic by giving him progressively more physically difficult chores. The boy finally gets it when he's told to move an impossibly large boulder, but ends up yelling at it to move, which it does.   I remember that there were others who were taught magic, and the stone turns out to be some sort of magic orb, maybe a fallen star. These magicians are able to change into animals. It was a longer book, at least 700 pages. Hope someone can help...

I remember reading a book series around 2008 - 2009 — probably as an ebook but maybe a hard copy — which for the life of me I cannot recall. My google-fu skills have failed me too. So here are the details I remember   The name of series started with B... something like Bar@@@@ Set in fantasy time with medieval setting. There was a ancient wizard, who was sort of immortal, or maybe just very very old, disguised as a common man at the start Hero was a young boy, introduced as an orphan, working in some rich noble's kitchen or kitchen farm Magic was used ages ago, but common folk have mostly forgotten about it There are several kingdoms, one in snow, one is an island, one is open grassland, and then there is a huge, big bad evil kingdom in north Wizard helps forge / renew alliance between all kingdoms slowly, having to work through some politics Wizard keeps training the boy in various arts as the series progresses There is eventually a war, but the good kingdoms sort of manage to defeat the evil king (he may have been crazy / megalomaniac) After war, wizard and boy go to the location where evil god (something with T... Tarturs or something) is sleeping, but whose evil keeps seeping into the world The boy, now trained and grown up, fights the god and eventually wins There may have been a middle aged woman, fiery in temper, also a witch, probably daughter of ancient wizard, and mother of hero   I also remember not really liking the books then, sort of having too many deus ex machina, but for some reason have them stuck in my mind recently. Any help would be deeply appreciated!


Let $\left[ a,b\right]\rightarrow \mathbb{R}$. If $f$ is continuous on $\left[ a,b\right]$ then  $f$ is uniformly continuous on $\left[ a,b\right]$.  Proof-trying. Assume $f$ on $\left[ a,b\right]$. We need to show that $f$ is uniformly continuos on  $\left[ a,b\right]$, i.e., for any $\varepsilon >0$ there exist $\delta >0$ such that $\left| f\left( x\right) -f\left( c\right) \right|<\varepsilon$ whenever $x,c\in\left[ a,b\right]$. How can I show this, can you help?

This might be a duplicate but I tried googling the MSE site and could not find a satisfactory answer.  Let $(X, d)$ be a metric space and $f$ be a real valued continuous function on $X$. Suppose $f$ has a compact support. Does this imply the uniform continuity of $f$?   I tried proving this statement,  but only for locally connected spaces have I succeeded in doing so. Is thus true for general metric spaces? I just couldn't provide a proof (or a counterexample) by myself. Please enlighten me.


So in this Youtube video  The guy says, around 6:15, that the total energy of the universe is zero because of gravitational potential (or something like that i dont understand completely which is why I'm asking this question) so since the totally energy of the universe is zero, the law of conservation would not have been violated by the universe coming into existence at the big bang. I heard about a similar argument made in one of Stephen Hawking's books.  Could someone explain the idea to me in its fullness? Thanks. And if you disagree with the idea that the universe could have created itself, hopefully this goes without saying in a forum like this, please no responses based on religious dogma.

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


One way to show that there are infinitely many primes is to show that for $\forall n \ge 3$, there is a prime p such that $n \lt p \le n!-1.$ I thought of assuming that the numbers in the sequence $n+1, n+2,... n!-1$ are all composite and deducing a contradiction, but I don't know how to do this.

How to prove that there exists a prime number between $n$ and $ n!$, for all $ n> 2$?    ( gives a much better bound, but this question is about obtaining a self-contained proof.)


There are red and grey text in GUFW firewall report.     I can't figure out what do they mean. Tried googling it up but best I could find was mention that there are "color codes" in report.  Originally I thought it's blocked applications, but nope, applications in both colors are added to the rules list.

In the gufw rules table listing, some rules are printed in red and some in green. What is the meaning of these two colors?


I would like to extract individual trees in ArcMap 10.1. I have 1.3 meter resolution DSM data created from aerial images. I used Crown Height Model to extract tree heights (as attached file), but I am stuck here. Is there any possibility to somehow extract highest points (single point for each tree) or delineate each tree based on their heights.

I am looking for a method to process a remote sensing image and extract the crown areas of the individual trees from the image.   I have both visual wavelength areal imagery, and lidar data from the area. The location in question is a desert area, so the tree cover isn't as dense as a forest area. The resolution of the aerial imagery is 0.5 feet by 0.5 feet. The lidar resolution is approximately 1 x 1 feet. Both the visual data and the lidar come from a Pima County, Arizona dataset. A sample of the type of aerial imagery I have is at the end of this post.   This question  seems to be the same issue, but there does not seem to be a good answer there.  I can obtain a reasonable classification of the vegetation types (and information about the overall percent cover) in the area by using the Iso Cluster classification in Arcmap, but this provides little information on individual trees. The closest I have to what I want is the results of passing the output of the isocluster classification through the Raster to Polygon feature in Arcmap. The problem is that this method merges near by trees into a single polygon.   Edit: I probably should have included some more detail about what I have. The raw datasets I have are:    Full las data, and a tiff raster generated from it. Visual imagery (like the sample image shown, but covering a much wider area)  Manual direct measurements of a subset of the trees in the area.    From these I have generated:    The ground/vegetation classifications. The DEM/DSM rasters.


Basically what I'm trying to do is using this api, api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=<key>&steamids=76561197960435530  and use the time created field and display it converted from UNIX time to regular time  This is some I code I have made      using System;     using System.Collections.Generic;     using System.Linq;     using System.Text;     using System.Net;     using Newtonsoft.Json;     using Newtonsoft.Json.Linq;       namespace JSONTest     {         class Program         {             static void Main(string[] args)             {                 string SteamKey = // key                  WebClient c = new WebClient();                 var data = c.DownloadString("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/" + "?key=" + SteamKey + "&steamids=76561197960435530");                // Console.WriteLine(data);                 JObject o = JObject.Parse(data);                 Console.WriteLine("Name: " + o["response"]["players"][0]["timecreated"]);                 Console.ReadLine();                   // Prompt the user on what they want to do               }         } }   I have got it to display the field "timecreated" but I don't know how I would convert that to a Date. Pointers would be greatly appreciated.

There is this example code, but then it starts talking about millisecond / nanosecond problems.  The same question is on MSDN, .  This is what I've got so far:  public Double CreatedEpoch {   get   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     TimeSpan span = (this.Created.ToLocalTime() - epoch);     return span.TotalSeconds;   }   set   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     this.Created = epoch.AddSeconds(value);   } }


I work in operations and need to be able to log into multiple servers among a few hundred servers in a productive way. What I mean by productive is this: from the time from when someone asks me to look at a series of hosts to the time I actually get in to the hosts should be minimal.  Right now I have to go look at my notes, find the host names, add my username in front, put the series of hosts in a text editor and paste that command into the terminal, which gets very tedious.    Ideally I can make some function I can call from the termial that'll help me filter through my host list and find the ones I need, add my username and create my ssh(or ) command.  I've thought about having the following text file:  description           hostname          user .........             .........         ...   and using cat to find the hosts I need, and concatenate the user@ to the front and creating the command.  I feel that there is a better way out there and I'd like to see people's opinion on this.  Thanks for your time!

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


I created a shared folder in Ubuntu which is located in Virtualbox.  When I open that folder I am getting this error line:  You do not have the permissions necessary to view the contents of "sf_ubuntu"

So over the weekend I arrive to work, boot my PC and run the virtualbox session of Ubuntu but now I get the message:     The folder contents could not be displayed   You do not have the permissions necessary to view the contents of "sf_virtual"   I don't understand what could have happened?  I did install an update and read an article to re-install Guest Additions and it still doesn't allow access in /media.  When I do gksudo nautilus and then sudo ls -al /media/sf_virtual it will display all the files in virtual as -rwxrwx--- 1 root vboxsf numbers month date time filename.  When I am under name in the terminal ls /media/sf_virtual it returns Permission denied. Any ideas on how to get access back?   I have removed the shared folders and added new ones but it still doesn't work.


< - - Linux Noob. I am normally on Raspberry, but the # symbol caused me to move my question here. Attempting to run a script, and failing, I found answers in Raspberry to use the following (preceded by the symbol #):  #!/usr/bin/env python    describes my confusion.  I thought # indicated a comment (in Linux and in Raspberry Python).  I don't understand the # symbol at the beginning of the command prompt.         #!/usr/bin/env python.   Question : Is the # symbol to be typed in?   I suspect the # symbol shows only because that otherwise the command would be executed.

I have seen many files which have this line as the first line in them. What exactly is this?  #!/usr/bin/env python   What does it mean? Why is it necessary?


Test series for convergence / divergence using a comparison test:  $$\sum_{n=1}^\infty\frac{n+2^n}{n+3^n}$$  According to symbollab website, this series converges. I guess I need to compare it with following geometric series (which converges) $$\sum_{n=1}^\infty(\frac{2}{3})^n$$ as less than or equal to, but I don't know how to get rid of n in numerator / denominator.

The sum is $$\sum_{n=1}^{\infty} \frac{n+2^n}{n+3^n}$$ Is this convergent or divergent? I tried to use the divergent test but the test fail because $a_n = (n+2^n)/(n+3^n) = 0 $ as $n$ goes to infinity. Could someone point me to the right direction?  Thanks


Good evening! I'd like to get informed about Graphic drivers for Laptop APUs, such as Intel U-Processors or AMD G/U/H Processors. I need to know for wich I can get a good driver with the OS before I can buy a laptop like that :/ Greetings Dave

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


Help with this question would be greatly appreciated. At the moment, I cannot find an f(x) to map these sets.  Also I'm just wondering to solve this problem, since '[]' brackets are used, do the numbers 0 and 1 have to be mapped to from the set (0, ∞), because that really makes the question quite tough, otherwise something like 1/Squareroot(x+1)  p.s. can someone link me the MathJax formatting, cant find it  edit: (0, ∞) is not the reals as it does not go to negative  Thanks!

Homework problem, intro to topology. Here's what I've done so far. Am I on the right track? And, how would you advise me to proceed from here?  I have already established that $\left |[0,1] \right | = \left |[0,1) \right|$. Now I wish to show that $\left |[0,1) \right| = \left |\mathbb{R} \right |$. I will try to do this by constructing a bijection $f: [0,1) \rightarrow \mathbb{R}$.  Given $x \in [0,1)$, consider the following countably infinite subset of $\mathbb{R}$: $x^c = \{x+1, x-1, x+2,x-2,x+3,x-3,\ldots   \}$.  Then we have that $$ \bigcup_{x \in [0,1)} x^c = \mathbb{R}, $$ and if $x_1, x_2 \in [0,1)$ with $x_1 \neq x_2$, then $x_1^c \cap x_2^c = \varnothing$.


Although the Hubble constant appears to be a constant, it is not really a constant.  Is the Hubble constant decreasing over cosmological timescales?

How does the  change with the age of the universe?  This question was posted recently, and I had almost finished writing an answer when the question was deleted. Since it's a shame to waste the effort here's the answer anyway.  Maybe this can be one of the canonical answers .


this is a subject that time and again shows up, and I've read old postings. Still: I am taking an intro class in statistics from a Math department (Junior/Senior level). It is pretty intense (it's statistics and probability) and has a strong math component (calculus as well as linear algebra are required and used throughout the class). Exercises are done using R most of the time. The book we follow is an unedited book from the lecturer, and it's OK, but even though it's strong in the math part, it doesn't give a lot of examples nor tackles the very important aspects of why we do some things or what's the importance of this or that. I read here that a lot of people love Sheldon Ross' books, but when I looked at them, the equation parts are way below what we are doing. Is there a book like that, but more in depth in the math part?  Thank you so much for any suggestion and why.

To give you some background, I have a grasp on the basics of statistics and probability theory and even remember touching Bayes theorem at the university data mining course. But being a few years away from the university made my math got extremely rusty (so much for last-minute pre-exam cramming). While I remember various random basic concepts, there are a lot of gaps in my understanding of them.  What would be a good material (a book, a site, or otherwise equally accessible medium) to revise the fundamentals and go beyond basics? I'd like a book that can be actually read as a book (most statistics books are really dry and are close to being reference material, rather than a book).


Given the following formula, in order to obtain a given $k$, you need to   find the value of $n$.       $1 + 2 + 3  +\dots + n = k$   For example:  Given $k = 15$, The expression to be used will be: $1 + 2 + 3 + 4 + 5 = 15$  Here $n = 5$  Is there any formula to solve for $n$?

Can someone reverse this formula? Sorry if it's too basic, I'm an old guy and my math is rusty :-D  $s =\frac{n(n+1)}{2}$  If it ain't clear, by reverse I mean obtaining the value of n by providing s  Thanks


This is a question from Hoffman.  Let $V$ be a finite-dimensional vector space over the field $F$ and let $T$ be a linear operator on $V$. Let $c$ be a scalar and suppose there is a non-zero vector $\alpha$ in $V$ such that $T\alpha=c\alpha$. Prove that there is a non-zero linear functional $f$ on $V$ such that $T^tf=cf$.  I know that essentially I need to prove that there exist an $f$ such that $fT(\beta)=cf(\beta)$ for all $\beta$ in $V$.   What puzzles me is that there doesn't seem to be anymore information on the linear transformation $T$ other than the fact that there is a non-zero vector $\alpha$ in $V$ such that $T\alpha=c\alpha$; we have no idea of what we will get when we let $T$ operate on vectors other than $\alpha$ in $V$.   It therefore seems that there is a certain $f$ that can ignore the effect of $T$ somehow,but I can't find that $f$.

I am self-studying Hoffman and Kunze's book Linear Algebra. This is exercise $4$ from page $115$. It is in the section of The transpose of a Linear Transformation.     Let $V$ be a finite-dimensional vector space over the field   $\mathbb{F}$ and let $T$ be a linear operator on $V$. Let $c$  be a   scalar and suppose there is a non-zero vector $\alpha$ in $V$ such   that $T\alpha=c\alpha.$ Prove that there is a non-zero linear   functional $f$ on $V$ such that $T^{t}f=cf.$ ($T^{t}$ is the transpose of $T$.)   I tried to solve this question by induction on $\dim V$. I was able to show the base case, that is, when $\dim V=1$, but I got stuck in the  inductive step. If $\alpha $ is a non-zero vector, then we can find a base $\mathcal{B}=\{\alpha,\alpha_{1},\ldots\alpha_{m}\}$ of $V$. We can write $V=W_{1}\oplus W_{2}$, where $W_{1}=\langle \alpha \rangle$ and $W_{2}=\langle \alpha_{1},\ldots,\alpha_{m}\rangle.$ I can not show that $T(W_{2})\subset W_{2}.$ Anyway, $\alpha \notin W_{2}.$  EDIT: If $T$ is a linear transformation from $V$ to $W$, then $T^{t}$ is the linear transformation from $W^{\star}$ into $V^{\star}$ such that $$(T^{t}f)(\alpha)=g(T\alpha)$$ for every $f\in W^{\star}$ and $\alpha \in V$.


In , I got an answer as to how to make the position of one spinner change the entries of another. But now as I am debugging it on my phone, I realize, that if I rotate the screen, the first spinner stays right, but the second two change their position back to 0. I don't think I want to completely handle the orientation change on my own, so how do I get around this?

I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:  package com.android.hello;  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;  public class HelloAndroid extends Activity {    private TextView mTextView = null;    /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      mTextView = new TextView(this);      if (savedInstanceState == null) {        mTextView.setText("Welcome to HelloAndroid!");     } else {        mTextView.setText("Welcome back.");     }      setContentView(mTextView);   } }   I thought it would be enough for the simplest case, but it always responds with the first message, no matter how I navigate away from the app.  I'm sure the solution is as simple as overriding onPause or something like that, but I've been poking away in the documentation for 30 minutes or so and haven't found anything obvious.


Password - There are no words  Login Password - There are no words Problem in Ubuntu server 16.04.5 LTS GUI

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


My iMessage and FaceTime suddenly stopped working with my Apple ID on my Macbook Pro (OS X 10.9.5) during my vacation at NYC.  Even on my iPhone (iOS 10.3.3) I can now only use iMessage and FaceTime with my phone number, but not with my Apple ID independent from my location.  Everytime I try to activate iMessage and FaceTime on my MacBook and my iPhone following error is shown:     An error occurred during activation   I've checked my Date & Time settings and the current location to be true, reset NVRAM and checked all my settings, but there is no solution in sight. I also deleted my Apple ID accounts from all my Apple devices and reconnected them after a reboot of each device, like recommended by Apple and several other webpages.  Does anyone know a possible solution, or has similar problems?  I don't want to update my Mac or iPhone. The solutions provided to the question  suggesting to clear NVRAM and to delete the keychain don't work for me, and iMessage and FaceTime do work but only with my phone number.

On my OSX laptop (10.8.5) I've recently been unable to sign into iMessage. By recently I mean approximately a week. I've not done any updates that I recall lately.  Coworkers are able to send me messages and my phone gets the messages directly over iMessage, so my account is working on this network (wifi and wired go through the same set of equipment out to the internet, so it's not a port blocking issue, and we're a small network of about 50 users) and my account is working in general.  I can login to  just fine from my computer. I'm logging into the computer and my phone with the same gmail address and password in both places.  Next steps?  One solution on the internet was "do you have a serial number in "About This Mac" and I do.


I couldn't find anything in Settings -> Keyboard -> Shortcuts, nothing that said Ctrl+Alt+S or Toggle shaded state as many other answers pointed out.  How do I disable the default action for Ctrl+Alt+S in Ubuntu 18.04?

I've been using Sublime Text 2 quit a bit lately and want to make it as easy to launch as Terminal.   I've done the following so far:    I went into System Settings > Keyboard > Shortcuts > Windows and disabled the shortcut for Toggled Shaded (Ctrl + Alt + S). I used gconf-editor to add <Control><Primary><Alt>S under apps/metacity/global_keybindings/run_command_1 and pointed it to /usr/bin/sublime under apps/metacity/keybinding_commands/command_1.  I went into dconf-editor and changed the Toggle Shadows shortcut to <Control><Super>S under org/gnome/desktop/wm/keybindings.    I am still unable to launch Sublime with the shortcut Ctrl + Alt + S, and normal windows still keep being toggled with the shortcut. I'm using Ubuntu 12.04, any suggestions on what I am doing wrong?


$$L = \Phi^\dagger[i\partial_{\tau}-H]\Phi + \Phi^{\dagger} \ast \Phi \ast\Phi .$$ It seems to me that this record is similar to the Lagrangian of a field capable of self-scattering in the form: two quantum flew, interacted, and one quantum of the same field turned out. And it also seems that if only kinetic energy sits in $H$, then $\delta\cdot i$ sets an imaginary small mass (for definiteness, bypassing singular points is given). And what kind of field is it, how dimensional or what it describes - I don't know)

When Michio Kaku talks about science he often likes to refer to string theory and  to his equation which looks like this (not sure if wrote right): $$L = \Phi^\dagger[i\partial_{\tau}-H]\Phi + \Phi^{\dagger} \ast \Phi \ast\Phi .$$ It appears to me like some field theory Lagrangian with an interacting and a free part but I have no idea what it actually describes.   Can all of string theory really be summarised in this equation? Can someone give a brief description?


Ok so like lets say a list of length n. n>= 5  I have to choose two index's in the list that will be the cutting point. These 2 elements will be removed as the list will become 3 new lists.  There will be 3 sections: A , B and C. A must be bigger or equal to B. and B must be bigger or equal to C. The difference between all 3 sections can only be a maximum of one. With these restrictions what is the formula in finding the 2 index's of a list with the length n?   For Example a list with 5 elements. The 2 index's would be index 1 and index 3.  [1,2,3,4,5] = > [1] [3] [5] with 2 and 4 being the elements that were removed due to the specific index's being cut.  A bigger list with the length of 19 for example  [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] The index's that will be the cutting points are index 6 and index 13.   The 3 new formed lists will be [1,2,3,4,5,6] [8,9,10,11,12,13] and [15,16,17,18,19]. You can see that the first two are bigger than the last one as the rules state and the difference in length between each list is not bigger than 1.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have a dynamic webpage that includes an iFrame where external html code is included. Now I need to dynamically remove an element from this iFrame's body.  Firebug gives me the following XPath Entry for the Element.  /html/body/div[2]/div[2]/ol/table/tbody/tr/td/a/img   My question now is how can I transform this into a DOM Element Structure to create Javascript which will remove the element? Or is there any other way to remove this image?  [EDIT]  The source of the iFrame is created by another webserver. We generate it there because of load sharing.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


I am trying to create a forest effect, however, the alpha from the trees in the background is not working properly in front views. Any idea about how to solve this? Thanks!

Having problems with hair transparency using cycles. I ported over a model from daz studio (have done this a few times before with no issues).   Using a simple mix shader, transparent top, diffuse bottom, black/white texture in the fac.  Heres the blend  with images packed.


I'm struggling to know why method overloading and overriding needed in java?  I have read some articles regarding this but not able to catch why it's needed practically?  i realize after so much searching that  suppose  we want to load a truck with many types of vegetables(potato and tomato). our simply target is to load these in truck.now there is two way for loads these vegetables in truck.   1.  one 'बोरी(sack) we full it by potato and in other we full it by tomato.  2. in one sack we can full it by tomato & potato both and in 2nd sack we can full it by also potato & tomato.  in both condition we are just load vegetables.  if vegetables are larger in the compare of truck's loading capacity then all knows that we use one more truck for loading rest of vegetables.  In whole time our target is just load these vegetables either it will come in one truck or more than one truck.  so how we can say that this is overloading.  Because on every sites of google and in every videos(example : watch video from 0:12 in given link below) everywhere overloading means to overload anything.  So my question is why overloading needed and according to my example what is difference between in overloading or loading?

In terms of Java, when someone asks:      what is polymorphism?   Would overloading or overriding be an acceptable answer?  I think there is a bit more to it than that.   IF you had a abstract base class that defined a method with no implementation, and you defined that method in the sub class, is that still overridding?  I think overloading is not the right answer for sure.


I want to install Ubuntu alongside Windows. I have tried using a USB flash drive, but it won't boot. I get stuck on the HP loading logo and nothing happens. If I try to launch my boot menu, it goes to the menu screen but doesn't actually launch the boot menu, or even respond to my boot menu key.  I know that it is possible to install Ubuntu from within Windows using Unetbootin on Windows 7, however they mention nothing of Windows 8 or 8.1 support.  So if anyone could give me either a step by step for how to install Ubuntu without a USB or CD for windows 8.1, or a link to something where I can figure it out that'd be much appreciated.  Computer: HP Envy h8-1413c  Either a solution to allow me to boot using a USB flash drive, or a solution to installing inside windows 8.1 would be appreciated!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Show that if $f(z)$ is a non-constant entire function , then $g(z)=exp(f(z))$ has essential singularity in $z=\infty$.   This question has been answered in the link Thanks!  My approach: Let $f$ analytic (then $f$ has a series), then $exp(f(z))$ is analytic. Then   $$exp(f(\frac{1}{w}))=\sum_{n=0}^{\infty}{\frac{1}{n!}(f(\frac{1}{w}))^{n}}=\sum_{n=0}^{\infty}{\frac{1}{n!}(\sum_{m=0}^{\infty}{\frac{a_{m}}{w^m}})^{n}}$$  We can see that $exp(f(\frac{1}{w}))$ has essential singularity in $w=0$, since there exist negative coefficients. So, $exp(f(z))$ has essential singularity in $w=0$. Is this right? Thanks!

This is an exercise from Gamelin.  If $f(z)$ is a complex function with a not removable singularity in $ z_{0} \ $, then $e^{f(z)} \ $ has an essential singularity in $z_{0} $.  Any hint?


I am logged in on StackExchange.com, I want to login on another SE site without entering a password. Why do I have to choose a third party provider?  Isn't using cookies possible for subdomains? I see they are set either for stackexchange.com or for .stackexchange.com.  If SE wants to use OpenID instead, why isn't the global account an OpenID account too? It seems I'd have to enter  as OpenID provider, but I never logged in or registered there so I'd need a password.

With the  in meta.SO, I would prefer to login manually via my OpenID rather than enter my username/password combo. As a result, I was looking for my StackExchange OpenID URL, and only found it listed in my data.SE profile. It would be nice it if was shown to me on all my profiles, especially since data.SE has different session handling.  Here is the OpenID input I am referring to:      Simply entering the OpenID endpoint() does not auto-login for me, as show below(albeit very roughly):


I need to prove that $\sqrt{\frac{3}{5}}$ is irrational number.   How can I do it?  I know $\frac{3}{5}$ is non-shortened fraction because 3 and 5 are prime numbers. The only ways of writing it as a product are 1 × 3 or 3 × 1, involve 3 itself and 1×5 or 5×1.   I assume that $\frac{3}{5}$ = ${(\frac{m}{n}})^2$  so $\frac{3}{5}$ $\neq$ ${\frac{m^2}{n^2}}$ because $1^{2}$<3<$2^{2}$ and $2^{2}$<5<$3^{2}$  I don't know if that's good way of thinking. Can somebody help?

In my Discrete Math class, we need to prove there aren't nonzero rational numbers $a$ and $b$ such that $5a^2 = 3b^2$.  I thought about using The Fundamental Theorem of Arithmetic but can't think of a way to apply it. How can I approach this proof in a good manner?


Hi i had tried two times from Swiss embassy with my cousin sister . When I was tried first time I did not have much more travel history only had Thailand Visa. I had show my salary only 20000/- per month and and her 15000/- my fund was just made in one month around 2 lac. my ITR was around 2.5 lac without.   So i thought that was a biggest mistake from my side because our funds and salaries was too low. than i again try last year in 14 august 2018. That times We have got Thailand, Singapore, Indonesia,and Dubai Visa on our Passport. I had show my salary 25000/- and her 19000/- and Funds was around 5 lac per person but its deposited in a month only and all are cash deposits. My stay was around 4 nights in Switzerland and 3 nights in Austria. Flights are just hold not booked and Hotel was just booked but without payment my visa company created a Tour itinerary according to the Visa process Condition But again I got refusal.  Now we are again going to try now i have maintained my funds from last 6 months and showing my salary 40000/- and her 32000/- per month in bank account with online transfer. ITR my 4.40 lac and her 3.90 lac. funds are maintained 3 lac per persons.and now we having 3 more visa Hong Kong, Macau and China.   So my Question is should i try or not? Please Suggest me what should i do?   Edit: the refusal reason was “Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.“

Schengen refusal formulae can be difficult to understand sometimes.  Sometimes an applicant receives a refusal with:       Justification for the purpose and conditions of the intended stay was not reliable.     often accompanied by:       Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.   What is meant by this refusal reason?  What are they trying to say?


When prompted to select a download of Adobe Flash for my 32 bit Ubuntu 12.04 system, I am given 4 choices.  Which is the proper choice?  YUM, tar. gz., rpm, and APT are the choices given.  Thank you.  GB

Even though I have the latest Adobe Flash player 11.2 for Linux in Firefox -   - a particular online flash game still requests that I update to the latest flash player.  I've tried this online game on my laptop (Windows 8 with Flash Player 11.8) and it has no problems.  Is there a way to trick Ubuntu or this game into thinking Flash Player 11.8 is "installed"?


Why does the resistance to electric current increases in a conductor when the temperature is increased?

Why does resistivity increase with temperature?  The explanations I have heard so far are that increasing temperature increases vibrations in the lattice structure resulting in the number of collisions increasing.  But the vibrations from thermal energy are random, so around half of the vibrations would result in the atoms moving out of the electrons way and half would result in atoms moving into the way of the electrons.  And since half of the vibrations result in increasing the drift speed and half reduce it, shouldn't the average drift speed remain the same?


Lightsabers of all Sith are red because . Is there something similar for Jedi? Although color of Jedi's lightsaber vary (Yoda had green lightsaber, Jedi Temple Guards had yellow lightsabers, Windu had purple lightsaber), blue lightsabers are most common.

What is the reason (in canon) for the different colors of lightsabers?  I know about purple being specially chosen by the actor Samuel L. Jackson since it's his favorite color, but is there a reason or purpose for the colors, other than "red=sith, blue/green=jedi"?


My husband is studying online in a British university in London while working in the Middle East.  He applied a UK visa for us with the kids to visit the UK for only ten days for a course and some short sightseeing; we were planning to visit Paris later for 3 days and come back home.  Unfortunately the application has been refused. The reasons are: I’m unemployed although I have traveled with my husband several times to Europe and he paid everything for me. And they mentioned the weak ties and an unclear bank account.  So what is the solution for this?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I'm trying to get myself to use sticky keys (to prevent RSI), but I often find I've pressed Ctrl and then changed my mind, and I'm not sure if hitting e.g. q will insert a q or quit the program … is there a way to get an onscreen indicator for whether a key is "stuck"?  Alternatively, is there a way to get sirupy keys, ie. keys that stick when you hit them but then let go if there's no more keys within N seconds?

I am a KDE user thinking about moving to Unity. Due to manual disability, I use  and in KDE I have an applet in the system panel which shows which modifier keys are active. I remember that Gnome had this feature as well, so do Windows and OS X.  How does one ad the keyboard modifier state applet to the panel in Unity?  Clarification: I have already enabled sticky keys. I am asking how to add an applet which indicates the state of the modifier keys. This indicator would show when the Shift key is depressed, when the Alt key is depressed, when the Tux key is depressed, and when the Ctrl key is depressed. This applet exists in all major desktop environments (KDE, Windows, Mac OSX, and Gnome). It is necessary for accessibility of the desktop.  Here is an image of the keyboard modifier state applet, next to the keyboard layout indicator applet. The modifiers represented are, from left to right, Shift, Ctrl, Alt, I-dont-know-this-one, Tux/Win, NumLock, and CapsLock. It can be seen that the NumLock key is active.


Is it correct to use "Dear All" at the beginning of the e-mail, when you are writing to more than one person?  It seems so informal to me. Is there any better way?

I have observed that in my work place, whenever a mail is sent to more than one person( like an information, meeting request or a notice etc.), the mail starts with the salutation "Dear All". This, somehow, doesn't seem correct to me. For me, a salutation should address the reader individually, at least in its singular form, as in "Dear Colleagues".  Am I correct in thinking that?


I have a lot of layers in my project and I am trying to use the atlas generator in the print composer to create a tiled map. Some of the layers have labels which have different configurations with respect to placement.   So far I have found that only the placement offset from centroid with the centroid option whole polygon selected works seamlessly when exporting to tiles. In the following images four neighboring tiles has been merged and the blue lines represents the tile borders:  Offset from centroid:   Around centroid:   Free:   Using perimeter:   The labels looks fine in QGIS when viewing the different areas, but every label is placed automatically to give a good visual appearance based on the current view. In my case the current view should be the entire map and each tile should be rendered according to that view.  Question: Is it possible to configure the label engine in the atlas generator to calculate the label placements for the entire map instead of each tile separately?

I'm using the standalone GeoWebCache to serve tiles from a remote GeoServer. My problem is that the polygon label is added to each one of the tiles served, instead of only once in the polygon centroid.  I found a post which discusses the issue:     The first reply mentioned a possible solution:       "All in all, I suggest to use a tile rendering engine (GeoWebCache, MapProxy, TileCache) anyway, instead of requesting small image from GeoServer and have the tile rendering engine do the tile slicing afterwards. You will have send fewer requests to GeoServer (1 large image instead of multiple small images), so this speeds up the overall tile cache creation time."     Problem is that I couldn't find how to do that by referring to the GeoWebCache documentation, and the above mentioned post doesn't explain the way to implement that.   I also found a  with an answer that links to the , but my code allready uses all the necessary attributes and still the label shows up multiple times:    var Layer_1874 = new OpenLayers.Layer.WMS(     'Grundkort',     '/wms10.ashx'     , {         format: 'image/png',         srs: 'EPSG:25832',         layers: 'ballerupkommune_grundkort_bk',         tiled: true,         tilesOrigin: '698804,6173460'     }     , {         displayInLayerSwitcher: true,         isBaseLayer: true,         transitionEffect: 'resize',         displayOutsideMaxExtent: true,         visibility: false     } );   Anyone has an idea?


I'm planning to build an aquarium lightning system with individually controllable LED's, I don't have much experience with electronics except from the irregular tinkering, but I'm a programmer and I think I'll be able to put something decent together.  The system will consist of about 30 * 3W LEDs, I already have those as well as heat-sinks, lenses, thermal glue and a couple of PWM-boards similar to . My initial plan was to build some kind of simple transistor switch between each individual LED and the power supply, a switch that I could control with the PWM-board, which in itself is controlled by an arduinio/raspberry pi.   Then I read on and discovered that LEDs are supposed to be current regulated, not voltage regulated. So now I'm not sure about how to move on.  I've considered just buying a bunch of individual constant current drivers like , but I don't see how I'd be able to pwm those properly. (I realized that most of my LEDs aqually are in the 700mA range instead of the 300mA that I first thought, now it's starting to get unreasonable expensive to buy one of these for each single LED, in an otherwise quite cheap system...)  What I really would need is some kind of variable current driver, from between 0(?)-800mA (I've understood that very dimmed LEDs draws very little current, so I need a big range there), that I can control with pwm, but that does not seem to be a thing I can buy like the regular constant current circuits.  Any ideas? I've considered to buy a  for each LED and to use this data to properly modulate the individual LED's myself. But I'm not sure I can find some that reliably can measure the low currents that I need. Or does the  for that MAX471-chip really say that it has a resolution of 0.5 mA per A (Current-Sense Ratio)?  Clarification on functional needs   I need a lot of light in order for the plants in the aquarium to thrive. I need as much white light as I can get from each watt. I want to be able to control the light in aspect of intensity as well as tone/temperature (I have different temperature LED's). I want to be able to control exactly what parts of the tank are lit and how those parts are lit. E.g., I want to able to simulate similar dynamics as to clouds passing by or lightning, or just to selectively light certain parts of the landscape. Not critical but valuable: Scalability. The ability to easily to add or remove LEDs.

I understand that I can not connect an LED directly to a battery because it will draw too much current. Thus, there must be something else in the circuit to limit the current. What options are there? Are some methods more efficient than others?


In PHP, I'd do something like:  $array = array(); $array[] = "value1"; $array[] = "value2"; $array[] = "value3";   How would I do the same thing in JavaScript?

How do I append an object (such as a string or number) to an array in JavaScript?


So i have some simple javascript code and i want to check if the input of the user is equal to any of the items in the "options" array, i tried this method but it isn't working, does anyone know why/another way to do this? var options = ["fris", "bier", "wijn"]; var bestelling_opgenomen = false;   var bestelling = prompt("Welke bestelling wilt u toevoegen?");  if(options.includes(bestelling) == bestelling){     var hoeveelheid = prompt(`hoeveel ${bestelling} wilt u bestellen?`); }else{     alert("kurk"); }

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I know some related  have been asked before but all are 3 digit score related and in my question, three digit scores are correctly fitting in the side bar but 4 digit scores are not fitting and it exceeding the box. Why we can't fix this bug?

Just noticed a minor css issue on this question:    The related questions on the right hand side have some overlapping text in Chrome:        (This only applies to this very site, Meta Stack Exchange)


Let $p,q$ be primes and $n \in \Bbb N,$ such that $p \nmid\ n-1.$ If $p\  |\ n^q-1$ then which one of the following option/s is/are correct? $(1)$ $p\ |\ q-1.$ $(2)$ $q\ |\ p-1.$ $(3)$ $p\ |\ (p-1)(q-1).$ $(4)$ $q\ |\ (q-1)(p-1).$  My attempt $:$ If I take $p=3, q=2$ and $n=2$  then I find that the given condition holds but option $(1)$ and hence option $(3)$ fails to hold. What about options $(2)$ and $(4)$? It is quite clear that either both the options $(2)$ and $(4)$ are correct or both the options are false. How to prove or disprove $(2)$? Any help in this regard will be highly appreciated. Thank you very much for your valuable time.

If $p$ and $q$ are odd primes show that $$p|(9^q -1) \implies q|(p-1).$$ ....  I am having difficulty to prove this.  Yes that was the question I have misunderstood between 9 and q!!!


I have seen the following syntax in a LaTeX example :  \( Inline math formula \)   What is the difference between those delimiters and $ ?

Along the lines of , what reasons are there (if any) to favor \( ... \) over $ ... $?


It's an 8GB micro SD card. It was on my Sony Xperia android smartphone, I almost never removed it from the phone. Suddenly about a month ago, the phone displayed a message saying that the card is not formatted, so I removed it from the phone and formatted it using my PC. It was working normally until yesterday when the phone displayed a message saying that the card was removed, but it was obviously still inside the phone. The phone is working normally with any other micro SD card.  I've tried inserting the card directly in the PC card reader but it won't detect anything. When I try using a USB card adapter, it shows partially as removable disk E:,but if I try to open I get a "Please insert disk into removable disk E:" and chkdsk is reporting "Cannot open volume for direct access".  I used the card mostly for music, but there is a couple of photos I'd like to have back. Is there anything I can do? Thanks.

I have a 2 GB Kingston  card which is about three years old. I put it in a reader today in my Windows Vista computer, wrote a 32 MB file onto it, safely removed it, and then tried to read it elsewhere. Nothing. Putting it back in the Windows Vista computer it now says:     You need to format the disk in drive F: before you can use it.   What should I do? I have access to many computers and OSes if your recommendations need that. I would be very sad if I lost all the contents of the card. Most of the data is backed up, but there are a few things that aren't. :(  Doing a   # dd if=/dev/sdg of=~/tmp/sd.bin   gives me a 2 GB file, and  the file it seems like lots of my data is still there. How can I put it back together?


When I render my animation, I see the render frame by frame perfectly in the viewport, but when I access the PNG or JPEG files upon completion, they are either all black or completely transparent without the mesh.  This is my first time rendering an animation in blender so it can be a very simple fix.  Thanks!  Background: Using HDR as lighting - checked transparent under "Film" so it doesn't render.  Baked the rigid body animation into keyframes.  I know it's ideal to render as PNG or JPEG, but h.264 isn't even an option, idk if it's only rendering first frame over and over?

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I'm trying to implement a turn based game for the course project. The game has a 'status' base class and from which derived the actual statuses such as 'poisoned', 'paralyzed' or 'choke'(which is the test case that goes wrong).  A status need to be setup first before it is inflicted to a character object by a move object, and the SetupStatus() function varies between different derived classes of the status class.  The problem is, when I am trying to call the SetupStatus() function of the 'choke' class (choke::SetupStatus()), which is derived from the base class 'status', it always call the function status::SetupStatus(). The function is called in the cmove::LaunchMove(...).  Where did I do wrong?  I missed the virtual declaration in the first place. I added it, but it didn't solve the problem.  main.cpp  int main() {     cmove aqua_ball = AquaBall();     field TestField;     character Irrawa = IRRAWA();     character Mew = MEW();     aqua_ball.LaunchMove(&Irrawa, &Mew, &TestField); }   cmove.cpp  void cmove::LaunchMove(character *speller, character *taker, field *thisField) {     //some other codes...     if (slf_adStat.size() != 0) {         for (int i = 0; i < slf_adStat.size(); i++) {             status tempStatus = slf_adStat[i];             cout << tempStatus.get_information() << endl; //Output tempStatus info             tempStatus.SetupStatus(speller, taker, thisField);//Where the function call goes wrong             cout << tempStatus.get_information() << endl; //Output tempStatus info              (*speller).add_status(tempStatus);         }     }     //some other codes... };   status.h  class status{ public:     string sta_name, sta_info;     //some other codes...      virtual void SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField);     string get_information();      //some other codes... };  class choke : public status{ public:     choke(){         sta_name = "CHOKE";         sta_info = "Reduce speed by 15. Last 3 turns.";         //some codes...     }     virtual void SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField);     //some codes... };   status.cpp  void status::SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField){     cout << "General status setup..."<< endl; } string status::get_information(){ string output = "[" + sta_name + "]" + ":\n" + sta_info + "\nLEFT:" + to_string(nT) + "turns\n"; return output; } void choke::SetupStatus(character* selfCharacter, character* oppoCharacter, field* currentField){     sta_ds = -15;     cout << sta_ds << "Choke status setup..." << endl; }   Output:  [CHOKE]: Reduce speed by 15. Last 3 turns. LEFT:3turns  General status setup... [CHOKE]: Reduce speed by 15. Last 3 turns. LEFT:3turns   Since the tempStatus objects before and after the SetupStatus() function are all printed as expected, the tempStatus is a choke class object, this is not a problem related to object slicing.  All the code can be find here if necessary:

Someone mentioned it in the IRC as the slicing problem.


I am familiar with inserting an ASCII character into a text document by using 'Alt+ASCII code' on the NumPad keys (e.g. Alt+130 inserts an é character).   Is there a similar way to insert a Unicode character via the keyboard using the unicode value given in Windows Character Map?

This is in Windows, but answers for other operating systems can be handy to others.  Most guides say something to the effect of "hold down the Alt key and type in the code on the keypad".  This works fine for decimal codes (like 65 for 'A'), but not for  codes (like  for 'A').  Some applicatons provide other facilities that will allow hexadecimal Unicode character codes to be typed and then transformed.  Word allows you to type the code (such as 200f) and then convert it to Unicode by typing Alt-X.  I'm looking for a general method of doing this that will work with the standard input.


Moderators and users with 10K+ reputations can search for deleted posts on the advanced search page by specifying deleted:yes option. Users with 10K+ also get the following note after search:        For users who have not enough rep this option doesn't work at all and silently ignored. However user can see a list of recently deleted own posts via deleted recent questions/answer links on corresponding sections in the Activity tab of the profile page.  My request is: allow users even with less than 10k to search for own recently deleted posts via advanced search since it can be viewed via profile page.

This is a fairly straight-forward question/request that I couldn't find a direct, specifically on point answer to with the search, though it seems like there would be one by now.  I've seen the meta questions , and , but nothing that seems to definitevly answer wanting to search deleted questions.  How can I, as a mere user (or 10k+/20k+ user), with no blue diamond, include deleted questions in a search result?  And could such functionality be added into the Stack Exchange search?  If not, is there another way for me to achieve what I want?  I recently noticed, through my flagging history, that before the new locking feature ("locked for historical significance"), I'd successfully flagged a thread for deletion, that with this new feature, should probably be undeleted and locked for historical significance, .  I have since flagged it for moderator attention, but I'm quite sure there are good number of other threads like this, with high page views and good information, whose deletion status probably ought to be reviewed in light of the changes to the lock feature, and I would like to find them and flag them for review.  So, is there any way for me, as a non-moderator, to search for questions like this, that with the changes to the lock feature, ought to be brought to a moderator's attention for possible undeletion and locking?


I previously used Ubuntu 16.04 LTS OS. And then I switched to the Ubuntu 18.04 LTS. In previous Ubuntu 16.04 WiFi was working without any error. But same laptop in Ubuntu 18.04 it does not working. When I go to WiFi settings there is a message No WiFi Adapter Found.  First I thought it was a problem of hardware, But boot with windows (My laptop is dual boot) It is working properly.  This is the wireless info I got by following the steps given in the link here .  pastebin link:   WiFi Model: BCM43142  How can I solve this issue?

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Given the $x$-$y$ coordinates of the start and end points of line segment, draw another segment with a given length $L$ perpendicular to an endpoint of the first segment and determine the coordinate of its constructed endpoint.

Given a line segment from point $A$ to point $B$, how do you find a point $A_2 $ that is perpendicular to the point $A$ at a distance $d$ from $A$? Points $A, B$ and distance $d$ are given.  I cant seem to figure out the correct way to solve this problem and my linear algebra / geometry are a bit rusty. It seems as though using Orthogonal Projection may work since I have the distance but I cant figure out the location of the point. Any ideas?  Take a look at the following Diagram for clarification.


I am trying to remove the following extensions from chrome but they come back every time I delete them. Everytime they have new name. Look like its virus or something. At the start there is a popup window as well. I tried to install kaspersky as well but its not catching this. Can someone help what should I do?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I just started a short video course on Linux and kind of get the use and function of stdin and stdout. I saw on the course though that the instructor used cat < [nameOfExecutable]. I tried looking around though I can't seem to find what its call and what's for (possible due to my lack of fundamentals).  What is difference does it make adding the "<" symbol?  Let us say for example: cat < [nameOfExecutable] vs regular cat [nameOfExecutable]?

I heard about "useless use of cat" and found some suggestions, but the following outputs nothing in my bash shell.  < filename   Using cat works as expected though.  cat filename   I'm using Fedora Core 18 and GNU bash, version 4.2.45(1).  EDIT: Using it in front of a pipe doesn't work either.  < filename | grep pattern   Whereas using cat works as expected.  cat filename | grep pattern   EDIT2: To clarify, I know that I can use this  grep pattern < filename   but I read here  that I can also use it in front of the command. It does not work in front of the command though.


I am traveling from Dusseldorf to Istanbul and then from Istanbul to Beirut on December 22nd. I have 2 hours between my 2 flights. Both flights are with Turkish Airlines.  Do you think this is enough time? Do I have to go through security check again?

I found an excellent price for a flight to Chicago by Turkish airlines. My only concern is that the layover time is only 1hr 30min. Is this time sufficient to catch the next flight?


If you try to edit your favorite communities on the , the edit button doesn't appear. It does if you try to edit them while actually in a community.

I can edit "YOUR COMMUNITIES" in the upper left drop-down menu from any of my communities: (e.g. )    But in  portal there's no "edit" link:    Why is that and how can I edit the list in  portal?


I've read up on several questions before finally deciding to post. This should be something trivial but I would like to know when it is most appropriate or if it is standard practice to end a how title with a question mark. Here's an illustration.    Scenario one(what I think should be correct):    How to build a smart car.    Scenario two:    How to build a smart car?  In my perhaps misguided interpretation, the second scenario makes it seem like whoever is posing the question would like to let us know  how whatever action they're asking about can be done.  Say I need to ask a question on this forum, can I phrase my title like: "How to ask questions on this forum?" or "How to ask questions on this forum."?  TLDR: How do I use a question mark with a  "How to do x" kind of title?

I found the following blog title without a question mark from :     How to ease Afghanistan’s progress in cricket   Is it grammatical, if we don't put question mark in questions of titles? I think this blog title should have been like this:     How to ease Afghanistan’s progress in cricket?   I also found the following blog title from  without a question mark:     Election rigging 101: How to steal a mandate   However, I found a question mark from other blog title of :     Elections 101: What is the ECP and what does it do on election day?


a user is trying to update their info. I have been reading this line of code but I still do not understand what does the bio in front of the if statement does.  the varaible bio is actually from an input  bio = data.get('bio', '')  user.bio = bio if bio else user.bio  P.S.  I just realised, could this be like a shorthand for if bio exist return bio else return user.bio? Then in this way, if user try to empty their input field, it actually wouldn't work?

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


I noticed that while posting comments, sometimes some users can not be mentioned? Why? (using @username).

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


New to StackExchange, so please bear with the newbie.  At my current job we are often creating many ssh keys with ssh-keygen (RSA). One thing I have noticed is that the first few characters (say the first 5 or so) of the private key are consistently the same. These are all created on the same computer. Is this to be expected? I am just curious why this would be the case.

My friend and I have been generating a few SSH2 RSA keys and noticed all the public keys begin with AAAAB3NzaC1yc, with the similarity extending to AAAAB3NzaC1yc2EAAAABIwAAAQEA between two keys generated on the same machine in two successive attempts (googling AAAAB3Nz ends up getting a few hits as well). Is this normal or are we doing something wrong while generating, such as suffering from insufficient entropy?


I need some help:  Is it anyhow possible in Latex to make some square brackets under some Math-Text like:  2x^2 + 4x - 3 = 0  |_____|   I know about the underbrace-command but I need square brackets.  I hope that someone can help me.

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like  \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me believe that is possible to decorate the end of the \overline bar.  I know the existence of \overbrace, but I need a square bracket; moreover, \overbrace takes too much vertical space


I am trying to mock an extension method with . For some reason it throws the following error:  "Test method TestProject1.JustMockTest.TestMethod threw exception:  Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'TestProject1.Foo'. The profiler must be enabled to mock, arrange or execute the specified target."  How can I fix this?

I am writing a test that depends on the results of an extension method but I don't want a future failure of that extension method to ever break this test. Mocking that result seemed the obvious choice but Moq doesn't seem to offer a way to override a static method (a requirement for an extension method). There is a similar idea with Moq.Protected and Moq.Stub, but they don't seem to offer anything for this scenario. Am I missing something or should I be going about this a different way?  Here is a trivial example that fails with the usual "Invalid expectation on a non-overridable member". This is a bad example of needing to mock an extension method, but it should do.  public class SomeType {     int Id { get; set; } }  var ListMock = new Mock<List<SomeType>>(); ListMock.Expect(l => l.FirstOrDefault(st => st.Id == 5))         .Returns(new SomeType { Id = 5 });   As for any TypeMock junkies that might suggest I use Isolator instead: I appreciate the effort since it looks like TypeMock could do the job blindfolded and inebriated, but our budget isn't increasing any time soon.


I want to move my web content from Window 7 to Ubuntu 12.04. So I copy my web content and move it to my /opt/lampp/htdocs folder, then I have change the folder permission using:  sudo -s  cd /opt/lampp/htdocs sudo chmod 777 -R myWebContent   Then folder permission is changed. But still I can not access my php file, because it only change the folder's access permission, not a single php file's permission. How can I solve this?

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


Suppose that $A$ and $B$ are symmetric and non-negative matrices.  Let $\rho(A)$ denote the spectral radius of $A$ and $\rho(B)$ denote the spectral radius of $B$.  Does the following result hold?     $\rho(A+B)\le \rho(A)+\rho(B)$   I tried several examples and found the result true.  But is it true in general?

Let $A, B \in \mathcal M_n(\mathbb C)$, we want to know if there's any relation between their spectral radius and the spectral radius of $A + B$.  The first part of this exercise is giving examples of the three posibilities: $\rho(A) + \rho(B) < \rho(A+B)$ ; $\rho(A) + \rho(B) > \rho(A+B)$ and $\rho(A)+ \rho(B) =\rho(A+B)$. This part was easy because there are no conditions about A or B.  The second part is proving that if A and B are normal matrixes, (i.e. $ AA^* =A^*A$, where $A^*$ is its conjugate transpose), then $ \rho(A+B) \le \rho(A) + \rho(B) $.   So my first attempt was using the Schur's decomposition, so $A=U^{-1}D_AU$ where $D_A$ is a diagonal matrix with the eigenvalues of $A$ in its diagonal and U is an unitary matrix. Similarly, B is similar to a diagonal matrix $D_B$ with the eigenvalues of B in its diagonal. That way I have $\rho(A) = \rho(D_A)$ and $\rho(B) = \rho(D_B)$ so now since $D_A + D_B$ is a diagonal matrix with $\lambda_i + \mu_i$ for $ 1\le i \le n $, where $\lambda_i$ and $\mu_i$ are the eigenvalues of $A$ and $B$ respectively. From here it's easy to see that $ \rho(D_A+D_B) \le \rho(D_A) + \rho(D_B) $, since $ |\lambda_i+\mu_i|\le|\lambda_i|+|\mu_i| \ \forall i$. But I don't see how to include $\rho(A+B)$ in this.  And the last part of the exercise is proving that if $ \{X_i\}$ is a basis of eigenvectors, which is common to A and B, then $ \rho(A+B) \le \rho(A) + \rho(B) $.  Here's my attempt, but I would like to know if it's correct:  Let $\lambda_i$ and $\mu_i$ be eigenvalues of A and B associated to the vector $X_i$, then $AX_i=\lambda_i X_i$ and $BX_i = \mu_iX_i$, and if we sum both equalities, we have $AX_i + BX_i = \lambda_iX_i + \mu_iXi$ so $(A+B)X_i=(\lambda_i+\mu_i)X_i$ so $(\lambda_i+\mu_i)$ is an eigenvalor of $(A+B)$ associated to the eigenvector $X_i$. Then is again clear that $|\lambda_i+\mu_i|\le|\lambda_i|+|\mu_i| \le \rho(A) + \rho(B)\ \forall i$, and particularly, for $\max_i |\lambda_i+\mu_i| = \rho(A+B)$ so $ \rho(A+B)\le \rho(A) + \rho(B)$  Any kind of help is appreciated and thank you very much in advance!


I'm trying to install graphviz on 18.04 but when I try to install it it says it is unavailable, despite being listed as having been released for 18.04:   I ran apt-get update and it is still missing from the repos. Does anyone know where to find it, or a PPA I could add to install it from?

How do I get to the Universe Repository in supported versions of Ubuntu?


I am making a Game of Life program, early stages of it. When I run the program and get to the "Do you want to make..." and i input "y", it will go to the else, print my test statement of test3, and end the program. What am I overlooking?  public static void main(String[] args) {      Scanner kb = new Scanner(System.in);      String userInput = "";     char[][] initialGrid = new char[25][75];     char[][] world = makeInitialGrid(kb, userInput, initialGrid);     printGrid(world);     userInput = "y";     while (userInput == "y"){         System.out.println("Do you want to make a new generation? (y) yes (n) no");         userInput = kb.nextLine();         System.out.println(userInput);         if (userInput == "y"){             System.out.println("test1");             int numOfNeighbors = findNeighbors(world, 6, 2);             System.out.println("test2");             System.out.println(numOfNeighbors);             //makeNewGeneration(world);         } else {             System.out.println("test3");             break;          }     }     kb.close();

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


My nikon D3100 with 18-55 lense set to manual mode. How do i set the focus to 10.5 meters as required for a landscape photo using Hyperfocus calculation. The camera has a range setting for focus but does not show a distance scale.  Thanks

I am aware of what hyperfocal distance is and the general principles behind it. However, most of the tutorials I have seen and read regarding it make use of lenses with focus distance indicators. Unfortunately, neither of my lenses (Nikkor 18-55mm & 35mm f1.8) have indicators.  I have read that you can 'cheat' and simply focus a third of the way into the shot (which I have done previously simply by spot-focusing on the lowest focus point in my VF). I also assume you could pace out the distance and note an object to focus on when you get back to the camera (though that might be easier said than done).  Does anyone have any suggestions on how to achieve maximum sharpness from front to back without focus distance markers. A new lens is not an option; global economic crisis and all that!


What exactly does the moderator-assigned  "status-bydesign" tag mean?  What other moderator only tags are there, and what are their meanings?

Meta Stack Exchange seems to have different rules and user behavior than the "regular" Stack Exchange sites.  How is it different?    Individual questions answered below:                Related


I just used Wine to install a program in the "Program Files (x86)" folder. I would like to use wine to be able to run this program instead of having to run the installer every time I want to use it. Where does Wine keep its program files folder? Or else, how can I use Wine to run programs in this folder?

I have a dotnet 4.5.2 application, which is just a console application that saves some datafeed into a .txt file. The program depends on some .dll files (private data-connectors, I don't have control over them).   I installed dotnet 4.5.2 via winetricks  winetricks -q dotnet45 corefonts   Now I'm running my application  wine ~/datafeed.exe   and cannot filgure out there it actually saves my .txt files?


I know that if I log out of my old apple id and sign into my new one that I will still keep my apps, but i'll need the password to update each app belonging to my old Apple ID.   but i'm just wondering if i don't want to do that, should i delete all of the apps of my phone and re-download using my new Apple ID to save the hastle?  also, i don't want to re-buy all of my music—will that remain on my device?  I do not want to waste unnessisary money.   thanks!!

I bought an iPad 2 last May and used my husband's Apple ID that he uses for iTunes.    I have used his ID to buy apps for my iPad 2 and even bought iTunes cards to put on his account. Well, now I have an iPhone, iMac and have my own Apple ID.  Question - can I switch it to my ID without him losing his ID?  I have found where I can edit my ID but I don't want him to lose his account.


In simple linear regression, one can perform hypothesis testing $$H_0: \beta = 0  \ \text{against} \ H_1: \beta \neq 0$$ where $\beta$ is the slope of the fitted regression line, obtained by least-square method. In R, we can use the command summary to see the p-value of this test. This p-value is obtained by computing $2P(T > |t|)$ and the t-score $t$ can also be seen in summary ($T$ has $t$-distribution with $n-2$ degrees of freedom). Now, consider the following situation: We have $t > 0$, and we would like to test whether the slope is indeed positive. Is it allowed to change the alternative hypothesis to $H_1: \beta > 0$? So then we compute the p-value by computing $P(T > t)$? I do know that we can, for instance, look at the estimated $\beta$ and check the p-value in summary. If the estimated $\beta$ is also positive, then with a certain significance level we can either reject $H_0$ or not.

I have one-sided hypotheses that I want to test with multiple regressions. Does anyone know how to perform a one-sided hypothesis testing? I heard of different positions regarding this matter ("not possible to test one-tailed with regression" and "for one-sided hypotheses just cut the p-value in half"). Or maybe I need another command in with my statistics program (I use R)!?  I didn't think this to be a difficult question but couldn't find a consistent and satsfying solution.  Thank you in advance for any helping comments.


Recently, Google published some hash functions on . On this functions codes, some values are defined on base 16, for example on  we have:   const Lanes init0 = {0xdbe6d5d5fe4cce2full, 0xa4093822299f31d0ull,                      0x13198a2e03707344ull, 0x243f6a8885a308d3ull};   0xdbe6d5d5fe4cce2full is a hexadecimal unsigned long long integer that is equal to 15845587454020866000 on base 10.  Now i have this question: Why we use this notation instead of writing value in direct decimal representation? Expect the shorter string, is there any other reason for using this manner?

Hey! I was looking at this code at   I noticed that in some situations they used hex numbers, like in line 134:  for (j = 1; val && j <= 0x80; j <<= 1, q++)   Now why would they use the 0x80? I am not that good with hex but I found an online hex to decimal and it gave me 128 for 0x80.  Also before line 134, on line 114 they have this:  small_n = (n & 0xffff0000) == 0;   The hex to decimal gave me 4294901760 for that hex number. So here in this line they are making a bit AND and comparing the result to 0??  Why not just use the number? Can anyone please explain and please do give examples of other situations.  Also I have seen large lines of code where it's just hex numbers and never really understood why :(


I'm going into a trip that I will just stop at Miami airport, but not going into USA borders. My Italian passport is expired, can I comprove my ESTA with my Brazilian passport or do I need to get a visa?  Thank you!

A bit over a year ago I applied for (and got) an ESTA for travel to the USA, valid for two years. That validity takes the ESTA to pretty close to the end of the passport validity.  I've just renewed my passport a bit early, to avoid problems with having enough passport validity on a different trip. Do I need to also get a new ESTA (for another 2 years starting today), or can I continue to travel on the existing ESTA until that expires, and only need to renew it then? (I am planning to travel to the US before the old ESTA expires)  (If you wish to travel to the US under the Visa Waiver Program, except by land, you need to to apply for an ESTA (Electronic System for Travel Authorization) before you travel.)


There is a movie that I watched when I was very young (I'm talking around mid-early 2000's), though I can not remember it. But here is what I remember from it:   There was a young man that was in this Science complex. In this science complex, there was a large number of robots that had white smooth plating (their heads and bodies were very well shaped to look like a human). While in this science complex, there was one robot in particular the man befriended, there was LOTS of hostile robots. There was a long range camera shot of the man running along a high up path  with a rail and a colossal drop on the other side of the rail. The place he was in was dark, bluish and whitish all in one (to look like a science fiction movie) the drop had a the same sort of colour. The surrounding space was a dull blue grey colour.  The friendly robot was a fast runner and the man was trying to get away from it but the robot caugth up to him, the man said (I think):     'What do you want from me'?    I feel like this is when the man was about to fall over a drop and when the robot was trying to either help him up or do something else I can't remember.   When the robot moves, it made this machine like screaming sound. The robot did talk, though I can't remember what it said. The robot was after that protecting the man from other robots trying to kill the man in this massive (colossal) science complex. I remember there being some sort of blue sheet like wall that looked like a water fall, but made of some material that robots could pass through easily, and the robot used it to get to the man while chasing him (I think the man ws trying to destroy or lose the robot in some way I can't remember). I can't remember the ending at all but I know that the robot ends up getting destroyed (head first) by other robots in an attempt to save the man. The sparks thrown by the robot while being destroyed were a deep blue colour and the robots head snapped to the side. When the robot fell to the ground destroyed, it fell in a fluid and smooth like movement, sort of like someone being shot and fall to the ground. The movie I believe was filmed in the USA in between the 80's and year 2000. Somewhere in that time frame.     The robot looked something like this, only the eyes were blue and round, smaller with a black ring of hollow going around the eye.

The main character of this movie is a cop (or something similar). It takes place in a world where almost everyone has some kind of enhancement / robotic implant, and the main hero is quite strongly against those enhancements. But towards the end of the movie it turns out that he has some artificial parts himself as he had to have them operated in otherwise he'd die (not sure now if he got almost killed in action or had an accident).   I think he got assigned a partner who was a female robot / cyborg (but looked like human).  It was most likely a live action movie, released in the 2000s.  Movies that are NOT it:   Ghost in the Shell


Can we eliminate the comma after "2014" and "Indiana" below? The year and state are not parenthetical, and besides, the comma slows down the flow of the sentence. I think the two sentences below are correct without those commas. Do you concur?  The December 22, 2014 meeting has been canceled. The Gary, Indiana man was arrested on a charge of grand larceny.

Is it acceptable in BrE to omit the commas (as I've done below) after 2006, 1946, France, Texas and New York? To me, commas after each serve no purpose: they reduce the flow of the sentence.  • The performance took place on February 2, 2006 at the State Theatre in Ithaca.  • January 23, 1946 is Helen's date of birth.  • Prague, Czechoslovakia  is a great vacation spot.  • Paris, France will host the Olympics.  • Dallas, Texas is the home of this special event.  • Syracuse, NY will play host to this year's Rock of Ages music festival.


The "Active Bounties" section on the user profile page is currently in a font totally different from all the other ones. The awesome-style selection menu has also been converted into an ugly, unstyled combo box.  This looks pretty ugly and should be fixed.

On both of my active sites the 'Earned Bounties' section header layout is broken:    It affects the header and the sorter.  (Tested on Chrome and IE, confirmed by others on Safari, FireFox)


As you know there are online tools for drawing tables for LaTeX.   Is there any online tool which can be used to generate the pictures (any geometrical graphics and shapes) easily?   That means we don't need to manipulate the codes in LaTeX to get the desired graphics. Instead, we can generate the graphics in the tool and then copy and paste the corresponding codes into the LaTeX file.

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


I am trying to pass an integer value into a ElapsedEventHandler so I can do logic based on the integer passed in. However, when the Event is raised, the value coming in is not the value I initialized it to. I may not be understanding completely how the delegate works.  class Example {     Dictionary<int, Timer> timer;      public Example()     {         timer = new Dictionary<int, timer>();         for(int i = 0; i < 12; ++i)         {             timer.Add(i, new Timer(5000));             timer[i].Elapsed += delegate { TimerTickCustom(i); };         }     }     public void Process() // called each cycle     {         for(int i = 0; i < 12; ++i)         {             timer[i].Start();         }     }     private void TimerTickCustom(int i)     {         // The value of i coming in does not match the dictionary key.     } }

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


#include <iostream>  int main() {     char myName[]{ "Alex" }; // fixed array     std::cout << myName << '\n';      return 0; }   The output of the above code is: Alex  On the other hand, the output of the following code   int main() {      int array []{ 9, 7, 5, 3, 1 };       std::cout << array << '\n'; // print memory address of array pointer   }   is: 0x7ffdf3e66f50 I understand both and then was confused at the same time. So I need more clarifications.

I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers.  int main() {         int arr[10] = {1,2,3};         char arr2[10] = {'c','i','a','o','\0'};     cout << arr << endl;     cout << arr2 << endl; }   However when I run this, arr outputs the address of the first element of the array of ints (as expected) but arr2 doesn't output the address of the first element of the array of chars; it actually prints "ciao".  What is it that I'm missing or that I haven't learned yet about this?