I'm learning about arrays in java and have put together a program that loads a text file into an array of strings. The user is then prompted to search for a string.  The program compiles just fine, but when I run it, I get the following error:   Exception in thread "main" java.lang.NullPointerException     at WordsArray.main(WordsArray.java:60)   Line 60 is as follows:  if (words[index].compareTo(words[minIndex]) > 0)   I wonder if it has something to do with creating instances of my words array? I'm not sure where to take that idea (I thought the given instance would be created within the iteration), so any suggestions are welcome!  Here is my code:  import java.util.*; import java.io.*;  public class WordsArray {    public static void main(String[] args) throws IOException    {       final int NUM_WORDS = 100;                // Number of words read from file       String[] words = new String[NUM_WORDS];   // Array of words       int index = 0;                            // Control the loop        // Open the file.       File file = new File("words.txt");       Scanner inputFile = new Scanner(file);        // Read the file contents to an array       while (inputFile.hasNext() && index < words.length)       {          words[index] = inputFile.nextLine();          index++;       }        // Close the file.       inputFile.close();        // Ask the user to search for a word       Scanner keyboard = new Scanner(System.in);   // Create Scanner object       System.out.println("Enter the word to search: ");       String value;       value = keyboard.nextLine();         // Selection sort       int startScan = 0;       int minIndex;       String firstValue;        for (startScan = 0; startScan < (words.length - 1); startScan++)       {          minIndex = startScan;          firstValue = words[startScan];          for (index = startScan + 1; index < words.length; index++)          {             if (words[index].compareTo(words[minIndex]) > 0)             {                //firstValue = words[index];                minIndex = index;             }          }          words[startScan] = words[minIndex];          words[minIndex] = firstValue;       }        // Binary Search       int first;        // First array element       int last;         // Last array element       int middle;       // Middle point of search       int position;     // Position of search value       boolean found;    // Flag        // Set initial values       first = 0;       last = words.length -1;       position = -1;       found = false;        // Search for the value       while (!found && first <= last)       {          // Calculate midpoint          middle = (first + last) / 2;           if (words[middle].equals(value)) // if value is in middle          {             found = true;             position = middle;          }          else if (words[middle].compareTo(value) > 0)  // if value is in lower half          {             last = middle - 1;          }          else                             // if value is in upper half          {             first = middle + 1;          }       }        // Print index of search value, or -1 if not found       if (found = true)       {          System.out.println(value + " was found at " + position);       }    } }

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?


In Axler's Linear Algebra Done Right, in the introduction to vectors it says:     We could define a multiplication on $\mathbf{F}^n$ in a similar fashion [to addition], starting with two elements in $\mathbf{F}^n$ and getting another element of $\mathbf{F}^n$ by multiplying corresponding coordinates. Experience shows us that this definition is not useful for our purposes.    In what ways was this definition tested? And how did it fail? Is there some fundamental reason why this definition of multiplication is bad for a vector space?  Are there any examples of successful application this definition of multiplication?

I was just wondering why we don't ever define multiplication of vectors as individual component multiplication.  That is, why doesn't anybody ever define $\langle a_1,b_1 \rangle \cdot \langle a_2,b_2 \rangle$ to be $\langle a_1a_2, b_1b_2 \rangle$?  Is the resulting vector just not geometrically interesting?


I have been using Tex-Studio under Ubuntu, but now I am starting to use MacBook Air.   What is a good choice of editor which is similar to Tex-Studio?

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


So I have a three switch box and one goes to a light/receptacle outlet on the wall.  The other two go to my ceiling fan.  When I read the wires out when they are switched off I get 0vac. When I turn on the switch circuit that I'm not reading with my meter, I get anywhere from 28-36vac, then I turn on the switch that I'm connected to with my meter I get 115vac.  Why am I getting the 28-36vac on my meter when I'm flipping the other switch on and off?  The wall receptacle does not have any effect on the voltage in the ceiling.

While replacing a light switch, I shut off the circuit breaker for it and checked the voltage to be sure it was not hot. I noticed that the hot wire read 10VAC, which was odd. It was pretty consistent. Just on a hunch, I went and shut off the circuit breaker for another circuit nearby (the GFCI circuit for the bathroom outlets) and the 10 VAC went away.  I checked the neutral wire resistance to ground, and it was very low, which is correct.   Any ideas on what to look at for this?


I'm using Lubuntu 20.04.2 LTS (Focal Fossa), When I tried to change my background image, window and the desktop got froze so I thought it would be a good idea to logout, but the desktop was black when I logged in. every other app except File manager (pcmanfm-qt) works fine and printscreen shortcut key didn't work but other shortcut keys works normally. This black desktop got a different menu but totally useless.  I don't understand what happened and how to fix it. I have tried reinstalling lubuntu-desktop and remove ~/.config/openbox folder. found same problem at , but I can't open Desktop settings

I know it is so weird, but last night I set an image on my desktop background and delete the image, then I right-click on the desktop and press the desktop properties to change the style of background (center, stretch and etc) then the desktop properties stopped something like hanging on Windows.   Then a black window alerted something and I press yes without reading it. after that with right-click on the desktop I just see this:    Even some system applications don't work now. for example, I cannot take a screenshot.  Also, my pcmanfm-qt is dead completely, with the command line or clicking on the icon nothing happens.  I don't know what happens. and I have no idea how to fix it.


I just tried to edit a question (retag and new title) on Movies & TV via the SE Android app.  When I clicked on „Preview“ or „Submit“,  I got the pop-up message     Not allowed to suggest edits   This was reproducible with another question.  Interestingly enough, clicking the submit button a second time worked and my edit was accepted.  Needless to say, I have edit privileges. So I should be able to not only suggest edits, but edit instantly.

I edited a question, on Stack overflow and when submitting preview, got red bar telling me my account isn't allowed to make suggested edits.  On the Sandbox android question it works fine, but that is editing an answer to my question.   The message I receive is:     Account is not allowed to suggest edits   Are the rules for suggested edits different for Android app?


Back some versions ago, when I wanted to restart, stop, start a sevice i would do something similar to this:  sudo /etc/init.d/apache2 stop to stop the apache service sudo /etc/init.d/networking start to start the networking service  Etc...  But now it has changed. How can I start, stop, restart any service in the latest Ubuntu with the new way.

I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.  The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.  The other one I found is to edit .conf files in the /etc/init folder.  What's the recommended way to enable / disable / add services and why?  Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it?


I'm trying to minimize it to tray but couldn't find any option, can someone help? I checked everywhere but couldn't find a way to minimize it to tray.

I am trying to find a way to minimize an app into the system tray instead of it taking up space on the taskbar.    Back in the day, there was  app which added Minimize to Tray to menu items right next to Move/Size/Minimize/Maximize.  Unfortunately that doesn't work with Windows 10 anymore.    I've also tried RBTray which appears to only work with explorer windows.    Is there a way to minimize applications to the system tray?


I have two monitors, and set up a new layout by typing following code in terminal: xrandr --output HDMI-2 --left-of eDP-1 --auto However the layout will go back once wake up from hibernate or reboot. And I have installed a GUI controller named arandr. But it cannot solve my problem either, so what is the best solution?

I used to edit the startup script for the GDM (/etc/gdm/Init/Default) to permanently change my display resolution.   How can I do this with LigthDM in Ubuntu Oneiric?


I have searched Python dictionary but nothing came out.  what is the mean of *\ in the below code?      def __init__(self, input_dim=(1, 28, 28),                   conv_param={'filter_num':30, 'filter_size':5, 'pad':0, 'stride':1},                  hidden_size=100, output_size=10, weight_init_std=0.01):         filter_num = conv_param['filter_num']         filter_size = conv_param['filter_size']         filter_pad = conv_param['pad']         filter_stride = conv_param['stride']         input_size = input_dim[1]         conv_output_size = (input_size - filter_size + 2*filter_pad) / filter_stride + 1         pool_output_size = int(filter_num * (conv_output_size/2) * (conv_output_size/2))          #weight initialize         self.params = {}         self.params['W1'] = weight_init_std * \                             np.random.randn(filter_num, input_dim[0], 5, 5)  #and so on   in  self.params['W1'] = weight_init_std * \                             np.random.randn(filter_num, input_dim[0], 5, 5)   ?

I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax?  For example, adding a bunch of strings,  e = 'a' + 'b' + 'c' + 'd'   and have it in two lines like this:  e = 'a' + 'b' +     'c' + 'd'


This might be a really trivial question, but I am trying to prove that $$K:=\{((1-\lambda)x, \lambda h)\in\mathbb{R}^n: x\in C, \lambda\in [0,1]\}$$  where $C\subseteq \mathbb{R}^{n-1}$ is a lebesgue measurable set. ($C$ is Lebesgue measurable) I know that for $K$ to be lebesgue measurable, It has to suffice the  That is way too technical however, is there an easy way? Am I missing something?

Problem Denote by $\lambda_n$ the Lebesgue measure on $\mathbb {R}^n$. Let $h \in \mathbb {R}_{>0}$. Let $A \subset \mathbb {R}^{n-1}$ be Lebesgue-measurable with finite measure. Define the cone $C(A,h)$ as the union of all straight lines connecting a point in $A \times\{0\}$ with the point $(0, h) \in \mathbb {R}^{n-1} \times \mathbb{R}$. Prove that $\lambda_n (C(A,h))=\frac{h}{n}\cdot \lambda_{n-1}(A)$. Where I struggle  Assuming that $C(A,h)$ is (Lebesgue-)measurable, this is a simple application of Fubini. How Fubini is used is all clear to me.  However, why is $C(A,h)$ measurable? It seems one could roughly argue as follows: As $A$ and $[0,h]$  are measurable so is $A \times [0,h]$. As $A \times [0,h]$ is measurable it is the union of a null set and a Borel set. $C(A,h)$ is the image of $A \times [0,h]$ under a certain diffeomorphism (c.f. ). Diffeomorphisms map null sets to null sets, and Borel sets to Borel sets. Hence, $C(A,h)$ is (as a finite union of measurable sets) measurable.  Unfortunately, I am not allowed to use the above properties of diffeomorphisms. What are other ways to prove the claim? Please only give a hint to set me thinking.


Can you please let me know what is this symbol ? I am trying to copy some text from a law book and this is in one of the setions.  Thank you

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


Suppose that one circle is contained inside another and that they are tangent at the point $a$. Let $G$ be the region between the two circles. Show that you can map $G$ conformally onto the unit disk.  It seems that many solutions in google explain this first by applying a mobius transformation $z\mapsto \frac{1}{z-a}$ so that two circles maps to two parallel straight lines. Then apply rotation followed by translation, you can get any region bounded by two parallel lines. This is where I can't understand. Can you explain why it's true?

Suppose we are given two circles, one inside the other, that are tangent at a point $z_0$. I'm trying to map the region between these circles to the unit disc, and my thought process is the following:  I feel like we can map $z_0$ to $\infty$, but I'm not really sure about this. If it works, then I get a strip in the complex plane, and I know how to handle strips via rotation, translation, logarithm, power, and then I'm in the upper half-plane (if I've thought this through somewhat properly). My problem really lies in what point $z_0$ can go to, because I thought the point symmetric to $z_0$ (which is $z_0$ in this case) had to be mapped to $0$. Is this the right idea, and if what other details should I make sure I have? Thanks!


Model: iMac11,2 (Core i3-550, MC509LL/A)   It was shipped with Snow Leopard 10.6.4, and I managed to update to 10.6.8 via Apple Software Update. After some research I found that this old iMac is capable of running Sierra (10.12.x) and made a few attempts to upgrade.  I noticed that I must first upgrade it to Lion (10.7.5) or El Capitan (10.11.6), both of which are no longer available from the Mac App Store.   But, all info I found from Google tells me to upgrade via MAS. (That's why I'm adding a month in the title.) Any ideas?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


Suppose that I have the following Python Code:  def fun5(a, b, c):     return a <= b if b <= c else False fun5(2, 4, 6)   The output of fun5 is True. How is this code being evaluated by Python?  I was expecting a SyntaxError because of the lack of indentations and Python requires indentation.

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


This piece of code produces the error CS0136:  static void Main(string[] args) {     foreach (var arg in args) Console.WriteLine(arg); // error in this line (arg is underlined red)     string arg = "lol";     Console.WriteLine(arg); }      A local variable named 'var' cannot be declared in this scope because it would give a different meaning to 'var', which is already used in a 'parent or current/child' scope to denote something else.  In this case the compiler Claims that the parameter arg in the foreach loop is already declared. The Problem i have with this is , that i declare the string arg after the foreach loop, so it should work, or am i missing some point. Is some sort of "Optimizing" which rearranges the order of my code?  I understand, that if i would declare it before the foreach loop it would be an error. Furthermore i know that i could name it diffently. But i want to understand it.

The following code fails to compile stating  "A local variable named 'st' cannot be declared in this scope because it would give a different meaning to 'st', which is already used in a 'child' scope to denote something else":           var l = new List<string>();         l.Find(st => st.EndsWith("12"));         string st = "why this fails?";   I understand why this won't work:          string preParent = "";         {             string preParent = "Should fail cause we change the meaning";         }   When we do the following we get "CS0103: The name 'postParent' does not exist in the current context":          {             string postParent=string.Empty;         }         postParent = "Should this work?";   What I don't get is why is the compiler smart enough to see that postParent is not within scope, but won't let me define a new variable that has the same name as a variable used within a child scope (which is obviously out of scope at this point).   Is the compiler simple enforcing scope by refusing to let me use the variable? If so this makes sense.  ===========  Edited:   I guess what I also find interesting is how you can have the same variable within two child scopes in a single method, so this is valid:          {             string thisWorks= string.Empty;         }         {             string thisWorks= "Should this work?";         }   I'm just a little curious that you can have two variables with the same name as long as they are at the same level (if you look at scope as a tree). This makes sense because you can have local variables in two methods of the same class with the same name.   I'm just surprised that the compiler is able to differentiate and allow this, while it wouldn't allow the postParent variable. And is this a technical limitation or was this a design decision? That's what I'm really trying to get at;-)


I've been trying to work on a proof for this for a few days now, but can't seem to see the answer. It might be trivial but I would be grateful if anyone could let me know their strategy (if not a proof) for this:  $$\sqrt[n]{n!} \lt \sqrt[n+1]{(n+1)!}$$  Thanks in advance!

I have to prove that $a_n$ is (strictly) increasing and diverges  $a_n = \sqrt[n]{n!}$ ;  n $\in$  $\ \mathbb{N}$  From sequence I see that $a_n$ increasing to infinitive.  $\sqrt[1]{1!}=1 ,\  \sqrt[2]{2!} \approx 1.41, \  \sqrt[3]{3!}  \approx 1.81 ,...,  \sqrt[n]{n!} $


I am drawing a fancy box around theorem environment using tcolorbox package. The content of the environment contain horizontal enumerate and I prefer tasks package. The default box setting work perfectly fine with the contents. However, when I reduce the frame line thickness, it turns out to be a problem (please refer to the MWE and screenshots). So what is the matter? Is it a bug of tcolorbox package?  \documentclass[11pt,a4paper]{book} \usepackage[margin=1in,bindingoffset=1cm]{geometry} \usepackage{tcolorbox} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{tasks} \newtheorem{example}{Example} %\tcolorboxenvironment{example}{colframe=red!70!black,colback=magenta!9!white} % this work perfectly but the frame line is too thick. \tcolorboxenvironment{example}{colframe=red!70!black,colback=magenta!9!white,boxrule=1pt}% adding boxrule=1pt key cause the problem \begin{document}     \begin{example}         Compute determinant of the following matrice:         \begin{tasks}[style=enumerate](3)             \task $ \displaystyle A=\begin{pmatrix}             1 & 2\\             3 & 4             \end{pmatrix} $             \task $ \displaystyle B=\begin{pmatrix}             0 & 2 & 4\\             6 & 8 & 10\\             12 & 14 & 16             \end{pmatrix} $             \task $ \displaystyle |C|=\begin{vmatrix}             a_{11} & a_{12}\\             a_{21} & a_{22}             \end{vmatrix} $         \end{tasks}     \end{example} \end{document}

I write some choice questions into beamer frame, after some research, here is my code:  \documentclass[aspectratio=169]{beamer} \usetheme{Berkeley} \usepackage{tasks,CJK} \begin{document} \begin{CJK*}{utf8}{bsmi} \begin{frame} \transwipe 1.Which one you want to choose? \begin{tasks}[counter-format=tsk[A].,debug=true](4) \task A \task B \task C \task D \end{tasks} \end{frame} \end{CJK*} \end{document}   output with pdflatex:  But I don't want the D choice goto the second line, I want them stay in one line, what should I do?


When using microtype, en dashes seem to extend beyond the text body if they appear at the beginning or end of a line. How can I get around this?  MWE:  \documentclass{article}  \usepackage{mathpazo} \usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,factor=1100,stretch=10,shrink=10]{microtype}  \begin{document}  Hello, here is some text without a meaning. This text should show what a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there a difference between this text and some nonsense like “Huardest gef- burn”? Kjift – not at all! A blindinginng -- enter text here -- text like this gives you information about the selected font, how the letters are written and an impression of the look. This text should contain all letters of the alphabet and it should be written in of the original language. There is more text in this line until it happens and we need more -- this is important -- no need for special contents, but the length of words should match the language. This is the second paragraph. Hello, here is some text without a meaning. This text should show what a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there a difference between this text and some nonsense like “Huardest gefburn”? Kjift – not at all! A blind text like this gives you information about the selected font, how the letters are written and an impression of the look. This text should contain all letters of the alphabet and it should be written in of the original language. There is no need for special contents, but the length of words should match the language.  \end{document}     Palatino seems to make this problem even more visible.  Update after initial replies:  I don't want to get rid of protrusion at all. However, the dash looks really misplaced to my eye. I have tried the following but cannot find a way that actually shows any effect:  \SetProtrusion  { encoding = {T1,OT1},    family   = {ppl,pplx,pplj} }    {-- = {0,0}}

I would like to disable or modify character protrusion (enabled by microtype) for specific characters.  Let me illustrate the issue with the en-dash, which protrudes far too wide for my taste:     (left: without protrusion; right: with protrusion)  I am however unable to disable protrusion with \SetProtrusion:  \documentclass{memoir} \usepackage{mathptmx} \usepackage[T3,T1]{fontenc} \usepackage{microtype} %\usepackage[protrusion=false]{microtype} \SetProtrusion   { encoding = T1,     family   = ptm }   { \textendash = {,0} }   \begin{document}  Word word word word word word word word word word word word word word -- word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word ...  \end{document}   I also get the following warning:  Package microtype Warning: protrusion codes list `ptm-T1' will override list (microtype)                `q.tex/9' for font `T1/ptm///' on input line 105.   According to , including a line \LoadMicrotypeFile{ptm} just before \SetProtrusion helps; if I try this, this does seem to address the issue for -- (\textendash), but (1) the annoying warning stays and (2) my code disables all protrusion (by overriding the whole list of protrusion values with my short list). What is the right way to partially override default character protrusion settings? Ideally there will be a way that does away with any warnings while not disabling important microtype functionality.


when I want to send information as post Method to my Rest API, Angular sends empty fields and subsequently, my database saves the empty value.   But I want to prevent it and I don't want to send empty fields from my Angular to my Backends.   For example, in below example, Angular sends an "" in entityTypeName field and unfortunately, the Postgres DB will save empty instead of null.  {     createdAt: "2019-01-11T13:59:52.311678"    entityTypeName: ""    id: "1bd46fce-fc6f-410f-acaf-74d5964cf92b"    updatedAt: "2019-01-11T13:59:52.311678"    updatedBy: "admin@admin.com"    version: 0  }   I'm looking for a general solution that prevent sending empity values in Angular side in all situations.

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


I've seen $\mathsf{ZFC2}$ mentioned in a few questions  and I'm curious about ways to axiomatize it that have the fewest differences from plain $\mathsf{ZFC}$ as possible. My question is similar to , but proposes an explicit theory and is specifically about minimizing the differences from first-order $\mathsf{ZFC}$.  mentions that $\mathsf{ZFC2}$ has as axioms the second-order versions of $\mathsf{ZFC}$ axioms, but doesn't go into much detail about what exactly that means. For the purposes of this question, I'm assuming that there's rough consensus on what $\mathsf{ZFC2}$ really is as a theory and am wondering if my naive construction is equivalent to it.  For the sake of concreteness, let the language second-order logic be the same as the language of first-order logic but with second order quantifiers $\forall x : R(n)\mathop. \cdots$ and $\exists x : R(n) \mathop. \cdots$, which quantify over relations of arity $n$. A bare quantifier $\forall x \mathop. \cdots$ is a first-order quantifier. Does naively changing the axiom schema of $\mathsf{ZFC}$ so that $\varphi$ ranges over all second-order formulas give an equivalent theory to $\mathsf{ZFC2}$? $\mathsf{ZFC2}$ has two axiom schemas:  and . If we treat $\forall x \mathop. \cdots$ and $\exists x \mathop. \cdots$ as implicitly first-order quantification, we can trivially transfer all the non-schematic axioms of $\mathsf{ZFC}$ to a second order setting. If we then take another look at the axiom schema of specification and the axiom schema of replacement and allow the synctactic variable $\varphi$ to range over all the second-order sentences, do we get an axiomatization of $\mathsf{ZFC2}$ or a theory equivalent to $\mathsf{ZFC2}$?

Below, the  of second-order logic is used.    My question is about a second-order analogue of $ZFC$ other than the usual "second-order $ZFC$." Rather than define the latter, I'll just state that its (set-sized) models are exactly the $V_\kappa$s with $\kappa$ strongly inaccessible (or if you prefer, the uncountable Grothendieck universes).  Specifically, I'm interested in the second-order theory consisting of the usual (first-order) axioms of Pairing, Extensionality, Union, Choice, Infinity, and Powerset, and the Separation and Replacement schemes ranging over second-order formulas. I'll call this "$ZFC_2^{scheme}$."    Specifically, for each formula $\varphi(x, y_1,...,y_k)$ of second-order logic with only the displayed variables, each of which is first-order, we have a corresponding Separation and Replacement instance. We do not allow second-order parameters here, so formulas with second-order free variables don't yield Separation/Replacement instances.   The passage from $ZFC$ to $ZFC_2^{scheme}$ has a nice uniformity: it's an example of a more general operation $\mathcal{ZFC}$ which spits out a $ZFC$-analogue given a logic at least as strong as first-order logic.    This is the reason for the parameter restriction above: I want $ZFC_2^{scheme}$ to look just like $\mathcal{ZFC}(\mathcal{L})$ for any other logic $\mathcal{L}$, and not take into account the particular feature that we now have a new kind of variable at our disposal - and in particular, take as "syntax-free" an approach to logics as we can get away with. (This is a choice of arguable value, but it's the one I'm making for now.)   It's easy to show that every model of $ZFC_2^{scheme}$ is well-founded, so to understand its models we only need to look at transitive sets. A natural hope at this point is that $ZFC_2^{scheme}$ is just second-order $ZFC$ in disguise, that is, that for a transitive set $M$ we have $M\models ZFC_2^{scheme}$ iff $M=V_\kappa$ for some strongly inaccessible $\kappa$. However, this isn't at all obvious to me (although it is easy to show the right-to-left direction).     Question. What are the (set-sized) models of $ZFC_2^{scheme}$?   (Note by contrast that the "arithmetic analogues" $PA_2^{scheme}$ and second-order $PA$ are equivalent since each pins down $\mathbb{N}$ up to isomorphism - although that leads to .)  (I'm happy to drop Choice if that would help.)  EDIT: As Hanul Jeon pointed out below,  shows that consistently $ZFC_2^{scheme}$ (there called "$ZFC_2^{def}$") has countable models, so we have a partial answer. However, I don't see at the moment a way to get an outright $ZFC$ proof that $ZFC_2^{scheme}$ is strictly weaker than second-order $ZFC$.


I'm a css amateur and I've been trying to get these divs centered in the middle of the page on every device and yes I have searched all over the internet and attempted solutions with no results to getting them centered.  Here's my code:  Snippet:    :after, :before {     -webkit-box-sizing: border-box;     -moz-box-sizing: border-box;     box-sizing: border-box; }  h3 {     font-family: inherit;     font-weight: 500;     line-height: 1.1;     color: inherit; }  h3 {     margin-top: 20px;     margin-bottom: 10px; }  h3 {     font-size: 24px; }  p {     margin: 0 0 10px; }  .djfl-box-col-2, .djfl-box-col {     position: relative;     min-height: 1px;     padding-right: 15px;     padding-left: 15px; }  .djfl-box-col {     float: left; }  .djfl-box-col {     width: 50%; }  h3 {     font-family: 'Source Sans Pro', sans-serif; }  .djfl-box {     border-radius: 2px;     position: relative;     display: block;     margin-bottom: 20px;     box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); }  .djfl-box>.djfl-box-inner {     padding: 10px; }  .djfl-box>.djfl-box-header {     position: relative;     text-align: center;     padding: 3px 0;     color: #fff;     color: rgba(255, 255, 255, 0.8);     display: block;     z-index: 10;     background: rgba(0, 0, 0, 0.1);     text-decoration: none; }  .djfl-box h3 {     font-size: 38px;     font-weight: bold;     margin: 0 0 10px 0;     white-space: nowrap;     padding: 0; }  .djfl-box h3, .djfl-box p {     z-index: 5; }  .djfl-box:hover {     text-decoration: none;     color: #f9f9f9; }  .djfl-box-col {     padding: 0px 85px; }  .djfl-box {     text-align: center; }  .djfl-box p {     font-size: 12px; }  .bg-green {     color: #fff !important; }  .bg-green {     background-color: #00a65a !important; }

Trees Planted

12,690,517

Trees

     Any help would be appreciated, thank you.

How can I horizontally center a
 within another
 using CSS?

Foo foo


I will be traveling in 15 days on a domestic flight.  My name on the ticket is SECONDNAME FIRSTNAME LASTNAME but on my proof of ID it is like FIRSTNAME SECONDNAME LASTNAME.  Will the security allow me into the airport? Will there be any problem with the airline people?

Is there any problem if the last name prints first then the first name in international air ticket?


So, I have to prove the following result that I found in my book:  Let $f:V \to W$ be a linear map and let $V$ be a finite dimensional vector space. Then:  $\dim(Ker(f)) + rank(f) = \dim(V)$    Proof Attempt:  Let $\dim(V) = n$. Since $Ker(f)$ is a subspace of $V$, it is finite-dimensional so let us have $\dim(Ker(f)) = m$.   Let $A = (v_1,v_2,...,v_n)$ be a basis of $V$ and let $B = (u_1,u_2,....,u_m)$ be a basis of $Ker(f)$. Let $w \in Im(f)$. Then, there exists a vector $v \in V$ such that $f(v) = w$. Since any vector $v$ can be written as a linear combination of the vectors in $A$, it is the case that every vector in $Im(f)$ can be written as a linear combination of the vectors $(f(v_1),....,f(v_n))$. This shows that Im(f) must be finite-dimensional since there are a list of vectors, linearly independent or not, that do span it.   Now, $B$ forms a linearly independent list of vectors in $V$ and $L(A+B) = V$, where $A+B$ simply means that we are combining both lists of vectors together.   By the Basis Extension Theorem, we can take vectors from $A$ and adjoin them to $B$ in order to form a list, called B', that is a basis for $V$. In particular, we need $n-m$ vectors from $A$ in order to do this. So, we have our new list written as follows:  $B' = (u_1,....,u_m,v_{j_1},....v_{j_{n-m}})$  Since any vector in $V$ can be written as a linear combination of the vectors in $B'$, it follows that any vector in $Im(f)$ can be written as a linear combination of the vectors $(f(u_1),....,f(u_m),f(v_{j_1}),.....,f(v_{j_{n-m}}))$. In other words, the linear hull of these vectors is equal to $Im(f)$.   However, if we consider any vector $v$ that is formed by the linear combination of the vectors in $B'$ and act on it with $f$, then we are left with:  $f(v) = \sum_{k=1}^{n-m} \beta_k v_{j_k}$  The reason for that is because $\forall i \in \{1,...,m\}: f(u_i) = 0$. So, we have a list of length $n-m$ that spans $Im(f)$ and is also a linearly independent list. Hence, it forms a basis for $Im(f)$. So, we have:  $rank(f) = n - m = \dim(V) - \dim(Ker(f))$  $\implies \dim(Ker(f)) + rank(f) = \dim(V)$  That proves the desired result.   I need feedback on the proof I have above. Is it correct? If it is, is there a shorter way to approach the problem? If it isn't, what's the exact flaw and what can I do to fix it? Is the proof clear or have I been too ambiguous in certain instances?

I'm having a hard time truly understanding the meaning of $\dim\operatorname{Im} T + \dim\operatorname{Ker} T = \dim V$ where $V$ is the domain of a linear transformation $T:V\to W$. I've used this equation several times in many problems, and I've gone over the proof and I believe that I fully understand it, but I don't understand the intuitive reasoning behind it. I'd appreciate an intuitive explanation of it.  Just to be clear, I do understand the equation itself, I am able to use it, and I know how to prove it; my question is what is the meaning of this equation from a linear algebra perspective.


I was reading  where I found this python code.    capital_country = {"United States" : "Washington",                     "US" : "Washington",                     "Canada" : "Ottawa",                    "Germany": "Berlin",                    "France" : "Paris",                    "England" : "London",                    "UK" : "London",                    "Switzerland" : "Bern",                    "Austria" : "Vienna",                    "Netherlands" : "Amsterdam"}  print("Countries and their capitals:") for c in capital_country:     format_string = c + ": {" + c + "}"      print(format_string.format(**capital_country))   I know capital_country is what is called 'dictionary' in Python. But I cannot understand the last two lines. Of course I understand the for loop iterates through the dictionary elements. Could somebody explain it to me?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I have a simple mesh that i have subdivided along its y-axis, i want to curve it along an arc but i can't find the way to do it with a modifier, how exactly can i curve it along an arc?

I have these profiled rectangle. I need to Bend it around Z-axis (Face #2 need to go to right) thus angle between faces #1 and #2 be exactly 45 degress.  File:


Most apps in the Google Play store have a free version and a paid version. On iOS there is a shop called Cydia, where you can try out most apps for free before you buy them in the App Store.  Is there such a store for rooted Androids as well?  I know of the store  for free software     F-Droid is an installable catalogue of FOSS (Free and Open Source Software)

How many competing Android markets (other than the Play Store itself) are there and are they any good?  Which ones do you use and why?


i am trying to create random data so i can review an algorithm in cache policy. When i use the first code with rand() i get the same numbers every time i run my code(i knew this was coming) so i tried to use srand. when i inserted it i get different numbers every time i run the code but the same 10 numbers at my loop. What am i doing wrong to create random data??? After that i will make with zip ununiformed data. sorry my bad the loop is in main function: for(counter=0; counter<10; counter++){     printf("Number %d is %lf\n", counter, rand_val()); }  And i am using this function to create numbers. double rand_val(){  double rnum;  srand(time(NULL)); rnum=rand();  return(rnum); }

I need a 'good' way to initialize the pseudo-random number generator in C++. I've found  that states:     In order to generate random-like   numbers, srand is usually initialized   to some distinctive value, like those   related with the execution time. For   example, the value returned by the   function time (declared in header   ctime) is different each second, which   is distinctive enough for most   randoming needs.   Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts.  I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom.  Thanks!  EDIT  Yes, I am actually starting my application multiple times a second and I've run into collisions.


In the opening scenes of Avengers, we see that Loki is apparently bullet-proof. Furthermore, we see that Asgardians are overall immune to small explosions and similar attacks.  So why did Loki surrender after his fight with Captain America, when Stark appeared at Stuttgart, Germany? Was it part of his plan, or was he genuinely wary of Iron Man’s arsenal?  In a later conversation, Captain asks      “I wanna know why Loki let us take him.”   And if so, what were his intentions behind letting SHIELD take him?

The Avengers become divided, both over how to approach Loki and the revelation that S.H.I.E.L.D. plans to harness the Tesseract to develop weapons as a deterrent against hostile extraterrestrials.   Was this division due to Loki? i.e. Loki was present on the Helicarrier and due to his negative vibes the members of S.H.I.E.L.D. were divided and started fighting to each other.


Suppose you have a couple of 3D-vectors given by their start and endpoints. Now you want to define a command that draws one of these vectors together with its respective unit vector from the same origin.  A similar problem has been answered before  - however the solution only works for vectors starting from (0,0,0).  As I struggled to apply the presented \foreach-approach on two given coordinates simultaniously and given the age of the solution, I approached this problem using the calculator-package.   I'm getting a functioning output for a single vector - unfortunately only the last unit vector (called by \vecuvec{1,1,0}{0,2,1}) is getting drawn correctly for multiple executions of \vecuvec as the coordinates (\sola,\solb,\solc) seem to be overwritten by the last execution of \vecuvec.  Is there a practical alternative by for example storing/accessing the coordinates in a different way or changing the scopes within the command \vecuvec?  MWE:  \documentclass{article} \usepackage{calculator} \usepackage[]{pgfplots} \usepackage{tikz-3dplot} \pgfplotsset{compat=1.15}  % Draw vector and corresponding unitvector \newcommand{\vecuvec}[2] %start point, end point (of vector) {   \VECTORSUB(#2)(#1)(\sola,\solb,\solc)     \UNITVECTOR(\sola, \solb, \solc)(\sola,\solb,\solc)     %arrow in blue     \draw[->,thick,blue] (#1) -- (#2);      %corresponding unit-vector in red:     \draw[->, thick,red] (#1) -- ($(#1)+(\sola,\solb,\solc)$);  }  \begin{document}  \begin{tikzpicture} \begin{axis}[xtick={0,1,...,4}, ytick={0,1,...,4}, ztick={0,1,...,4},              xmin=0,xmax=4,ymin=0,ymax=4, zmin=0,zmax=4]     \vecuvec{3,1,0}{4,2,1};     \vecuvec{2,2,2}{4,3,3};     \vecuvec{1,1,0}{0,2,1}; %only the last one works as intended \end{axis} \end{tikzpicture}  \end{document}   Output:    Here for the blue vectors only the leftmost has its unit vector drawn correctly (in red).

I would like to draw a path in a graph plotted with pgfplots, using relative (++) coordinates. The following code compiles without any error, but the points are not at the desired position:   \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture}     \begin{axis}      \addplot{x^2};      \draw (1,2) --++ (0,1) --++ (1,0) --++ (0,1); % This should result in a staircase     \end{axis} \end{tikzpicture}  \end{document}    Any idea of what causes this problem?


I installed Ubuntu as my main OS recently. It's very nice. Nevertheless I have some problems.  When I turned the computer on, the wifi connection worked perfectly. But after a few minutes, problems appeared. I was still connected to the wifi but with no Internet connection. And after a while, the connection with my router was lost.  I had been rebooting my laptop several times, but with the same results.   lspci -knn | grep Net -A3 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]     Subsystem: XAVi Technologies Corp. RTL8821AE 802.11ac PCIe Wireless Network Adapter [1b9a:2482]     Kernel driver in use: rtl8821ae     Kernel modules: rtl8821ae   It's an Asus FX555UA.

My wifi connection doesnt work properly; it stays connected only for around 5 minutes after I turn on the PC. I'm using Ubuntu 16.04.  I've tried   sudo service network-manager restart   which makes no difference  Same with   killall nm-applet && nm-applet &   After that I tried   sudo gedit /etc/pm/config.d/config   where I insert this string  SUSPEND_MODULES = "drivername logicalchipname"   But since I don't have permission to modify that file I tried to use chmod on it, which led to  but left me still in the same situation.  $ lspci -knn | grep Net -A3; rfkill list 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821] Subsystem: XAVi Technologies Corp. RTL8821AE 802.11ac PCIe Wireless Network Adapter [1b9a:2482]  Kernel driver in use: rtl8821ae  Kernel modules: rtl8821ae  0: hci0: Bluetooth  Soft blocked: yes   Hard blocked: no 1: phy0: Wireless LAN   Soft blocked: no    Hard blocked: no   What do you suggest I do?


Let $\Bbb D = \left \{z \in \Bbb C\ :\ |z| < 1 \right \}$ and $f : \Bbb D \longrightarrow \Bbb D$  be a holomorphic function having a zero of order $N$ at the origin. Then show that $|f(z)| \leq |z|^N$ for all $z \in \Bbb D.$  My attempt $:$ Since $f$ is a holomorphic function having a zero of order $N$ at the origin $\exists$ a holomorphic function $g : \Bbb D \longrightarrow \Bbb C$ with $g(0) \neq 0$ such that $f(z) = z^N g(z)$ for all $z \in \Bbb D.$ Let $h : \Bbb D \longrightarrow \Bbb C$ be a function defined by $h(z) = z g(z),$ $z \in \Bbb D.$ Then clearly $h$ is holomorphic since $g$ is so and $f(z) = z^{N - 1} h(z)$ for all $z \in \Bbb D.$ Also we have $h(0) = 0.$ So if we can show that $|h(z)| \leq 1$ for all $z \in \Bbb D$ then we are through by Schwarz lemma.  But I find it difficult to show that $|h(z)| = |zg(z)| \leq 1$ for all $z \in \Bbb D.$ Any help in this regard will be highly appreciated.  Thank you very much for your valuable time for reading.

Let be $f:B(0,1)\to B(0,1)$ holomorphic function such that   $$f(0)=f'(0)=\cdots=f^{(n-1)}(0)=0$$ but $f^{(n)}(0)\neq 0.$ Show that   $|f(z)|\le |z|^n,$ for every $z\in B(0,1)$ and $|f^{(n)}(0)|\le n!.$   I think that I will use the Schwarz Lemma, cause by the Lemma, I have that $|f(z)|\le |z|$, but I don't know how I can to use the conditions about the derivatives.  Any suggestion? Thanks.


I will be traveling to the USA and I have been issued a visa. I also have a visa issued by Iran which I visited three years ago on a pilgrimage with my son-in-law. Will there be any problems entering the USA because my passport has an Iran visa?

I would like to visit Iran as a tourist but I'd also like to visit the USA some time after. I know the relations between the two countries are bad.   Is it likely that I'm not allowed to enter the USA after having been to Iran?   If it matters, I've never been to either of those countries. I'm a Swiss citizen, an atheist from a Christian background.


One of the players in my game is the most fervent powergamer I've ever met. I know it's how he gets enjoyment from the game, and so far it doesn't intrude on the other players' enjoyment, so I've allowed it for the most part. Unless the loophole he finds is either explicitly disallowed, or would seriously break the game (either mechanically or thematically), I've let him use loopholes and combos to his heart's content.  However, whenever he makes a new character (especially a combat monster), it's difficult to plan around as the GM. I know that I could hard counter any of his characters by making an enemy or an encounter specifically designed around his current character, but that would be pretty noticeable and would take away from his enjoyment of the game without adding anything else.   So how can I provide a challenge to my powergamer or otherwise upset his expectations without taking away his enjoyment of the game or designing something specifically to counter him?

What are some strategies that I can employ to handle a power gamer that constantly outshines the rest of the party? This is a friend of us all and we don't want to boot him, but combat simply isn't fun when the party has nothing to do while he mops up an encounter by himself.


I have a script that copy files to another server. I don't want to overwrite any files so I have to use rsync.  I can use rsync without any problem when I run at command line. But when I use it in script, rsync does not work. It gives an error and I even could not find that error at Google.  Here is error:  rsync: Failed to exec ssh: Not a directory (20) rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.9] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in IPC code (code 14) at io.c(605) [sender=3.0.9]   I would like to point that error is not No such file or directory(2)  Error is: Not a directory(20)  Here is script:  #!/bin/bash PATH=$1 FILE=$2 DAY=$(/usr/bin/date +'%Y-%m-%d') /usr/bin/rsync -avh $PATH postgres@REMOTE_IP:/Backup/xlog_backup/$DAY/.   I am using like this  sh ~postgres/archive.sh /srv/postgresql/data/pg_xlog/000000010000003E00000025 000000010000003E00000025   Here is ls output:  postgres@MY_SERVER:~$ls -l /srv/postgresql/data/pg_xlog/000000010000003E00000025 -rw-------. 1 postgres postgres 16777216 May 25 10:41 /srv/postgresql/data/pg_xlog/000000010000003E00000025      Server: CentOS Linux release 7.2.1511 (Core)      Rsync: rsync  version 3.0.9  protocol version 30      postgres@MY_SERVER:~$rpm -qa | grep openssh      openssh-clients-6.6.1p1-22.el7.x86_64      openssh-server-6.6.1p1-22.el7.x86_64       openssh-6.6.1p1-22.el7.x86_64      rsync-3.0.9-17.el7.x86_64   Could you help me to solve the problem?

I have this in my script. But is returning an error. If I execute the command in the console works fine  ./script.sh[16]: mv: not found [No such file or directory]   I want move some files what starts in T353 from one folder to another. REMOTE_PATH is /tmp/ and PATH is my working directory  cd $REMOTE_PATH mv T353* $PATH #this is the line 16   If I make mv /tmp/T353* . works fine.


Prove or disprove:   if $f(x)\geq 0$ is uniformly continuous on $[1, \infty)$ and $\int_1^{\infty}f(x)dx$ converges, then $\lim_{x\rightarrow\infty}f(x)=0$   I'm pretty sure it's true because if f is only continuous, all opposite examples I know use infinite amount of x valus where f(x)=1 for example (like a triangle of height 1 with a smaller base for each natural x). But such an example wouldn't be possible because the function would be too "steep" around natural x's.  I'm looking for a hint on how to formalize this, I was thinking about Lagrange but obviously f isn't necessarily differentiable...

I am struggling with the proof of the following theorem:  Let $f(x)$ be uniformly continuous in $[a, \infty)$ s.t. the integral $\int_a^{\infty} f(x)dx$ converges. prove that $\lim_{x \to \infty} f(x) = 0$.  I came to the conclusion that it is enough to prove that $\lim_{x \to \infty} f(x)$ exists, and from there I have a proof that the limit is $0$.  I tried to use Cauchy's equivalent definition for the convergence of the improper integral + his definition for a regular limit at $x \to \infty$ with no success...  I will be happy to get hints as for how I should proceed, not proofs, since I really want to crack this one by myself, only I spent a pretty long time with no success.  Thank you :)


i read about the electrons double slit experiment, when both slits are open, electrons will form an interference pattern, but when there is a detector put to "observe" this weird behaviour, the outcome is different, the elctrons dont form interference pattern anymore because when there is an "observer" the nature force the electron to chose a state. i found this confusing because why in the first case (without detector thing) do the electrons still form an interference while the humans are also observing. in my understanding an observer is one that can take informations, dont the humans thus in this experiment an obsever too?.

My question is not about (pseudo) philosophical debate; it concerns mathematical operations and experimental facts.  What is an observer? What are the conditions required to be qualified of observer, both mathematically and experimentally?


I belief that Unity needs somewhat of a customizability features.  What better time to put it in while they are rewriting the code in C++ for version 8.  I think it's more customizable than the applet features of many desktop environment like KDE, XFCE, to just name a few, because you can change/add the appearance, layout, functionality of something about it.  How could I, or anyone change the layout, and functionality of the KDE's logout dialog? If you try, nice luck with that, without forking the code.  For example, I miss the Dodge Window feature for the launcher when they remove it in version 5.2 of unity, the default version that comes with Ubuntu 12.04 LTS, Their was a fork of unity that re-added that feature, the problem was the person/team who fork it needed to fork it.  I know there is this one extension for Gnome-Shell that allows you to auto-hide the top panel.  There is no truly way to theme unity to the fullest it could be done like the menus.  The best thing about extensions is that the Unity team don't need to maintain them, the community will do it.  Just look at how many there are for gnome-shell in the user repos .  You may miss the applets of Gnome 2, just wounder about an extension that anable to have that functionality?  What do you think what unity should have for customizability?

Where can I send feature requests? Both for Ubuntu as a whole and individual (supported) apps?


I'm able to access the root shell via the following commands:  sudo -i  sudo su (after providing the user password) or su (after providing the root password)  What is the difference between them? I notice that a user with root privileges can access the root account!

I already read it from manual but I can't see difference..  su - change user ID or become superuser  sudo -s [command]   The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).  If a                    command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell is executed.  sudo -i disappear description in manual


apologies if this question is answered. I need to make a bevel plate (of 10 degrees) to support wooden I-joists on a single slope (shed) roof assembly. I'm working with 2x6s, and I'd really like to cut the ten degree bevel across the 5.5'' dimension of the board, but I am really struggling to figure out how to do it. Just to be clear, I need to rip these 2x6 long ways, with a 10 degree bevel going the width of the board to support a wooden I-joist at 10 degree angle. I thought I could cut the boards on both sides with a circular saw, but unless I have a monster (8'' + inches) circular saw they blade is too short for the cut to meet in the middle. Any ideas?

I need to make a bevel plate (of 10 degrees) to support wooden I-joists on a single slope (shed) roof assembly. I'm working with 2x6s, and I'd really like to cut the ten degree bevel across the 5.5'' dimension of the board, but I am really struggling to figure out how to do it. Just to be clear, I need to rip these 2x6 long ways, with a 10 degree bevel going the width of the board to support a wooden I-joist at 10 degree angle. I thought I could cut the boards on both sides with a circular saw, but unless I have a monster (8'' + inches) circular saw they blade is too short for the cut to meet in the middle. Any ideas? Update: Just to follow up for those who want the "problem", I have a single slope roof and I am using wooden I-joists for rafters. I am going to use a birdsmouth cut for the lower bearing wall. For the higher bearing wall, the  for those I-joists (and all other I-joist documentation I have seen) says I need a "bevel plate" (see 10a in the attached). I think I will end up just putting a 10 degree cut bevel in a 2x4 and putting that on two top plates as suggested , but open to hearing more ideas and thank you for taking the time.


A few months ago, I took some course in Logic and one of the topics was the arity of functions. The arity of a function $f$ is the number of arguments that $f$ needs to works. For example, the function $f$ defined by $f(x,y)=x^2 +y^2$ has arity 2 and the function $g$ defined by $g()=\tanh(\frac{\pi}{3})$ is function with arity $0$.   However, every function that comes to my head can always be written as the composition of functions of arity $0,1$ or $2$ arguments. For example, consider the function  $$g(x,y,z,w)=\frac{\sqrt{\sin(xy^2)}}{3+z+\ln(w)}$$ If we let  \begin{align} t()&=3\\ p(x)&=x^2\\ r(x)&=\sqrt{x}\\ s(x)&=\sin(x)\\ l(x)&=\ln(x)\\ k(x,y)&=x+y\\ h(x,y)&=xy\\ f(x,y)&=\frac{x}{y} \end{align} Then, $g$ can be rewritten as follows: $$g(x,y,w,z)=f\Bigg(r\bigg(s\Big(h\big(x,p(y)\big)\Big)\bigg),k\bigg(k\Big(z,l(w)\Big),t()\bigg)\Bigg)$$  My question until this point is if there is any function that don't follows this rule, or actually every $n$-ary function could be written as the composition of nullary, unary and binary functions.  I guess my question is because mostly all the function that I know are binary.

Take for example $A \times B \cdot C$ = $(A \times B) \cdot C$ where $A, B, C$ are 3-component real vectors.  We can define a 3-nary operator $\times - \cdot$ that is a composition of the two common binary operators $\times$ and $\cdot$.  The same thing happens with most functions (operators) - the way we calculate them is by doing smaller binary problems and adding together.  Every time I try to come up with an $(n > 2)$-ary operator my mind automatically looks for binary operators.  So, the question is, do there exist operators (of some weird kind in some branch of math) that cannot be decomposed into 2-ary and 1-ary operators?  Thanks.


Alright, this is weird. I have looked at the usual solutions to these kinda problems but they don't seem to work. when I render nothing in the scene shows instead it renders frames from a previous file I had done. i have checked the camera icon thing too. whats even more interesting is that when i opened a new file and tried to append the objects from the original file in the folder there was only one entity, the camera. so i opened the file to check and i found all the other objects sitting perfectly fine. ofcource the camera still renders frames from previous project.  edit: here's some images for the new evolution in this problem.

This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?


so I've been trying to delete a kext file from the Soundflower program. I tried deleting the whole program but it ended up leaving me with just the kext file, and I can't throw it in the bin. I tried redownloading the program and run the uninstall script again but it ended up just deleting the new files and still leaving the old one behind.

I have a 2014 MacBook Pro experiencing . Catalina does not allow kexts to be deleted via this method. Unless I am able to delete or disable this kext my laptop will shut down randomly. Anyone know how to remove kexts in Catalina?


noob question. I need to add a space after I print the triangle char. triangle_char = input('Enter a character:\n') triangle_height = int(input('Enter triangle height:\n'))  i = 0 while i <= triangle_height:    print(triangle_char * i )    i += 1

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


I want to center text above an image in an div element.   This is what i tried:  CSS:      .container {   margin: 0 auto;   max-width: 1200; } .header {     width: 100%; } .ring {     max-width: 100%;     position: relative;  } .flex_text  {     position: absolute;     color: #B64547;     z-index: 100;     font-family: Poppins;     font-size: 30px;     text-align: center; }   .cell img {     display: block; }   Html:

Brewing, get started!

   It did not work, obviously. The website is responsive, so the solution should work responsive aswell.   I looked around and tried a lot of different things but they didn't work. I don't know, but maybe there's a solution with jquery? Thanks :)

How can I horizontally center a
 within another
 using CSS?

Foo foo


In many many answers here and papers everywhere, it's often stated that no object can move faster than light.  Why is that again?

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


I am confused about how to correctly use if with would (+have) or  could (+have) while talking about past activities in conditionals.  Please check out these sentences and help me to figure out their differences:   Even if I had tried, I would not have known. Even if I had tried, I would have not known. Even if I would have tried, I would not have known. Even if I would try, I would not have known. Even if I try, I would not know. Even if I would try, I had not known.   Are those all grammatical and meaningful? If not, which ones aren’t? What does each one mean and when should I use it?

I watched a (Hollywood?) film the other day where a character visiting his just-hospitalised wife (who it seems will actually survive) says "If I would have lost you [I don't know what I'd do]".  I'd always thought this was an error made by non-native speakers (I myself would only expect "If I had lost you"), but there was nothing to suggest that in the movie. Is it a regionalism?  EDIT: Actually, that wasn't true about only expecting "If I had lost you". I'd have been perfectly happy with "If I'd have lost you", so long as I didn't think too hard about what was being elided. I'd usually elide "have" there to just a schwa (neutral vowel) anyway, and think no more about it.


I have made a character with particle hair. The hair is dynamic and it works fine. I want to attach beads to a strand, so that it moves along with the strand of hair. However, I can not find the right button to do this. If this is possible, how can it be done?

Is there any way to hook, parent, or constraint something to a vertex of a particle hair strand? Such as a hair accessory dangling from a braid that needs to move with the hair?  Converting the hair to mesh isn't viable, as I then lose hair dynamics and have to rig some other way.  Scripting solutions are fine too. There must be some way to get the location of a particle hair vertex or vertices from the API. Then you could have an empty copy it or something?


I've been running around Mauville, Verdandorf and Slateport for a long time and I still can't find rock smash. I'm at the point where there is a girl standing in a cave in front of rocks and says you need rock smadh to pass. I have 3 badges already. PLEASE HELP! 0_0

I have reached the part where I have to go through the Rusturf Tunnel and there are boulders that are breakable. The NPC that said he was digging the tunnel by himself said the rocks are too hard and he can't get through and when I walked closer to them, the player mentioned "if only I could smash these rocks".  Where can I acquire Rock Smash?


If No, well this can't be, as there is perfect symmetry, you can't tell one from the other.  If Yes, they had relative velocities all along, then their times must have dilated and somehow they must not agree with each other.  P.S I know I am wrong, please help me find out where.  P.P.S For all those who are marking this as a duplicate question of , I think this is not same as plain old twin paradox because its made symmetric and the essence of the question is not how do you solve twin paradox, instead it is why is this not like twin paradox?

The paradox in the  is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible.  There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it.  Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time?


I have residence ID in Ukraine (out of Schengen) and I want to travel from Beijing airport.    My flight has 6 hours connection in Stockholm.  Do I need a (transit) visa?

Do I need an airport transit visa through Switzerland if I have no Schengen visa? Am traveling from Cairo to Moscow via Swiss Air


I tried to change my username using command:  sudo usermod -l newusername oldusername   so when I entered it in terminal it showed me:  user 'myusername' is currently used by the process 2553   What does it mean?

My first name is Lluis but always Ubuntu changes my name as Llus when my computer starts as Ubuntu. I don't understand why this 'i' is missed.


Consider  I posted yesterday. I asked for a way to create a particular macro with a somewhat idiosyncratic calling pattern, which is not trivial to code. After waking up and coming back to the site, I found that seemingly viable solutions had been suggested by users , ,  and  (links go to the answers).  Now it is worth noting that the efficiency (however you define this) of a particular approach to the problem is not the only thing that is of importance in deciding which solution to use. There are other things that might be considered: how versatile an approach is, how fragile/easy to break with unforeseen use-cases it is (I am using "fragile" in the generic sense, not in the TeX macro sense), how helpful its errors are when it is used incorrectly, how easily deciphered (and potentially repurposed) the TeX code is. For example, A.Ellett notes that their answer "is not fail-safe!"; I'm not sure what he means, but I assume he is warning that his version of the macro might break if used in the wrong way. For another example, egreg's approach mandates that one of the arguments must be in a TeX group ({...}), which is not a problem as such but is a potential "gotcha" given that a typical LaTeX command does not mandate this.  But it would still be interesting to know which approach performs best (in that it allows a document that uses the macro many times to be compiled fastest). In the Python programming language,  is provided that allows one to time alternative approaches to a problem to see which is most efficient, by running through each approach a certain number of times and seeing which one gives the least total time. In LaTeX, presumably the natural way to do it would be to create a document that does the same sort of thing - repeating each solution a large number of times - and which contains in the finished document a summary of the total time taken by each approach.  Is there a way of doing this? It could look something like:  \documentclass[a4paper]{amsart}  \usepackage{tikz, xparse}  \begin{document} \thispagestyle{empty}  \foreach \file in {file1.tex, file2.tex, file3.tex}{     \input{\file} % file should use \def to define \mymacro     % Here we start a timer     \foreach \x in {1, ..., 1000}{         \mymacro{with}{some}{arguments}     }     % Here we stop the timer and place the time taken in the macro \executiontime.     The time taken for the approach in \file was: \executiontime. }  \end{document}   NB. This is something approaching pseudocode, and won't compile if simply copy-pasted into a file!

The most obvious way to speed up LaTeX processing is to split a large and complex document into smaller pieces.  For example, Makefiles, \beginpgfgraphicnamed/\endpgfgraphicnamed when using TiKZ, and splitting a large file into separate chapters are all helpful in splitting a large job into smaller, hopefully independent pieces.  But sometimes this is not enough -- many packages do complicated things under the hood, leading to slow document processing.     Are there any tools to help isolate   the culprits?   It would be great to also have the profiling tool provide suggestions on ways to speed things up.


I have just accidentally toggled on some weird dotted lines. Any idea how to turn these off. P.S. the model was imported from Fusion 360.

You used to be able to hide the dotted lines of a Parent Relationship by going to the Display tab and disabling the checkbox of "Relationship Lines". That option cannot be found there anymore. Where is it now?


Last night there was a question on Stack Overflow:  It was subsequently put on hold for being too broad of a question.   To me, this is a very simple question with a simple answer: yes it is possible, but it would  not be a trivial task. The OP did not ask specifics about how to implement it, so it's probably not appropriate for Stack Overflow.   The CS Theory site might be a little overboard for this question because if he wanted to know whether PHP was Turing complete, he could ask (or get migrated) there. Would the Programmers SE be appropriate for this sort of question? Or is there any other Stack Exchange site where this sort of question would be applicable?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I've recently performed a clean install of Ubuntu 14.10. I got Apache, PHP and MySQL from Ubuntu's repositories, then installed MySQL Workbench (6.1.7) from the Ubuntu Software Center. It almost works - there are just two "little" issues, one of which makes the program unusable:   After opening the .mwb file it shows in the schema tab: Tables (X items), but no tables are shown below - just Views (X items) etc., which are also not listed at all. For some reason menu in the title bar is triplicated...   Has anyone encountered these issues or has an idea how to solve them? I tried mysql-workbench-community 6.2 from Oracle website, but it's the same.  I posted a screenshot below.

I installed mysql-workbench in Ubuntu 14.04 LTS using Software Center. It installs MySQL Workbench version 6.0.8.    In this, the menu is doubled    So I decided to upgrade MySQL Workbench. I added a repository provided by  and upgraded it.  sudo apt-get install mysql-workbench-community   Now MySQL Workbench version is    Still the menu is duplicated. How can I solve this issue?  Edit:  The same question was asked here without any answer:


I have postgreSQL installed on my machine.My machine already has ArcGIS 10. No Sde installed. Can we create geodatabase in PostgreSQL with out installing ArcSDE?    Jay Cummins is right. I am intended to use create esri geodatabase. Can we do this with direct connect by simply installing postgreSQL on same/remote machine? Can we connect to Postgres with ArcCatalog and create featureclasses. Can we load raster in it? I have seen in many articles mentioning post-installer to setup the ArcSDE objects in the database even for direct connect. Should we need ArcSDE?

How can I connect to a PostGIS database from ArcMap using ArcGIS Desktop 9.3 and later?  I would like to be able to perform spatially enabled queries and receive the results back (e.g. spatial and non-spatial joins, filtering etc.) rather than just dumping the contents of a table.  I don't want to use the ArcSDE spatial extensions, I want to use the PostGIS spatial extensions in ArcGIS Desktop.


I'm writing a VBA module that uses a lot of computational power. To speed things up, I'm using all available processors on my machine. Excel gives me an option though to use a different number of threads. Is there a difference between (for example) specifying 8 processors versus selecting 8 threads? Would selecting 7 threads limit the machine to using 7 processors?  Thank you

I was looking at the stats for the Intel  CPU.   It has two cores and two threads. What do the threads do for the processor? Is there any relation between the number of cores and the number of threads? What purpose do threads serve for the system overall?


I have tried this problem but not able to find the answer. Could anybody help me in solving this. Is $(a+b)^p< a^p+b^p$ for all non-negative reals $a, b$ and $0<p<1?$

A question on my math homework asks us to show that if $0 < p < 1$ and $a, b > 0$, then $a^p + b^p > (a + b)^p$. I have no idea how to do this, any pointers?


I was doing leg press at the gym today and was curious how much weight I actually lift when I do the exercise as compared to when I do a squat.  Suppose I load $w_L$ onto the machine, which has an angle of elevation $\theta$.  I know that the actual weight I lift vertically is $w_L \sin(\theta)$, but could someone give me an explanation why this is so?    My intuition is to appeal to simple trigonometry, which tells me the vertical side of the triangle is $w_L \sin(\theta)$.

Here's an easier one. I use the leg press machine at the gym so I don't have to worrying about hurting myself while lifting heavier weight.  The weight glides on a track that looks to be 45 degrees.  What's the equation to figure out how much weight I would be able to squat normally.  IE the vertical component of moving 400lbs at a 45 degree angle.


How can I prove that for $d>1$ the series converges absolutely, I only know that for $d\leq 0$ the series diverges (In both cases under the assumption that $|z|=1$) What can I say for the other choices for $d$  left.  Is there  a way to prove $\sum_{n=0}^{\infty}\frac{1}{n^d}$ converges absolutely for $d>1$ respectively $\sum_{n=0}^{\infty}\frac{1}{n^d}z^n$ for $d>1$ and $|z|=1$ without using the integral test?

The convergenceradius is $1$ that means if $|z|= 1$ then the convergencebehaviour depends on $d$.   I have several questions about this issue:  1.Why is $\sum_{n=0}^{\infty}\frac{1}{n^d}$ absolutely convergent for $d>1$ and $|z|=1$  2.Why is the implication true:  series absolutely divergent $\Rightarrow$ series is divergent  3.Why is $\sum_{n=0}^{\infty}\frac{1}{n^d}z^n$ divergent for $d\leq 0$  and $|z|=1$  4.Why does the convergencebehaviour depends on $z\in\{a\in\mathbb{C}||a|=1\}$ for $0<d\leq 1$?  I know that if $d$ is for example $1$ then  $\sum_{n=0}^{\infty}\frac{1}{n^d}z^n$ converges absolutely for z = $-1$ and diverges for z = $1$. But the  statement above says we can go with $d$ as close to 0 as we want and we will still find a $z$ with $|z|=1$ for which  $\sum_{n=0}^{\infty}\frac{1}{n^d}z^n$ converges can somebody please show me the proof for all those questions I have?  Thank you!


I am writing articles using Kile on Windows 7. I have a problem with search in the output file. For some reason, Okular doesn't recognize the text. Trying to copy something with the option text selection tool returns rubbish, for example this is the copypaste of the word 'Conditionally': ❈♦♥❞✐t✐♦♥❛❧❧2, and this is the copypaste of the word 'some': s♦♠❡.  How do I make Okular to correctly recognize a piece of text?  Edit. This is a working example:  \documentclass[11pt]{article}  \usepackage[T1]{fontenc}  \begin{document}    Minimal example \end{document}   The output as a PDF file looks fine, but copying it gives ▼✐♥✐♠❛❧ ❡1❛♠♣❧❡. I use PDFLaTeX + ViewPDF, the selected configuration for the tool ViewPDF is Okular unique.

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the right output encoding. There are at least two important aspects to this:   In the ideal case, Unicode would be the output encoding. Ligature glyphs (such as ﬁ) are ideally de-ligated in the output (here: "fi").   It seems that output encodings are specified through the fontenc package. What is the range of possible output encodings, and most importantly: Is there a way to specify a Unicode output encoding and one that deals with ligatures in the intended way?  (Note: It is important to distinguish output from input encodings. How to use different input encodings in LaTeX has been documented widely. My understanding is that this is best handled by the inputenx package, as it supersedes the inputenc package.)    Quick guide to the solutions: The information in the answers and answer threads is a bit distributed, so here the short summary: one approach is to use \input glyphtounicode together with \pdfgentounicode=1; the other approach is to use cmap/mmap.  Addendum: Sometimes one will need to load the package accsupp and enclose one's macro definition in \BeginAccSupp{method=hex,unicode,ActualText=<codepoint>}[...]\EndAccSupp{} to generate a specific code point. See the caveat about non-BMP code points  and the fix (starting from accsupp version v0.4, 2012/11/18) , which provides the new unichar package option.


I use Google Webmaster tools to follow my website and I'm confused about search stats. For several months, the curve about search requests reached the limit on 3000 search by day. The curve never goes over 3000 search by day.  Does Google limits request per day for a small website? Can Webmaster Tools not show more than 3000 requests per day?

It looks like my site hit an imaginary limit of 400 daily impressions.  What is this limit based on? How can I "break through" that limit?


I want to make a family tree more in font (minimum of 12pts) of 4x6 feet for a poster sticker so what will be the size settings in photoshop?

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


Hi there I have a form that send my data from admin panel. it has one input that represent title of my site  <form class="form-horizontal form-bordered" enctype="multipart/form-data" method="POST">         <input type="hidden" id="do" name="do" value="save">         <input value="site title" type="text" class="form-control" id="sitename" name="sitename" placeholder="">         <button type="submit" class="btn btn-success">save</button> </form>   and use this to submit the form in my database  switch($_GET['do'])     {         default:              $this->updateSettings( array(                    'sitename' => $this->secureInput($_POST['sitename'])                                         ) );                 break; }  public function updateSettings($settingsArr) {      foreach($settingsArr as $varname => $value)          $this->query("UPDATE ".TP."settings SET value = '$value' WHERE varname = '$varname'");  }   this form works fine if I entered an english title in the input but if I entered arabic title in it, it give me a page  Forbidden You don't have permission to access /adminpanel on server  how to solve this problem

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


why don't we use the simple linear regression method such as mean square for parameter fitting in logistic regression?

I am trying to use squared loss to do binary classification on a toy data set. I am using mtcars data set, use mile per gallon and weight to predict transmission type. The plot below shows the two types of transmission type data in different colors, and decision boundary generated by different loss function. The squared loss is $\sum_i (y_i-p_i)^2$ where $y_i$ is the ground truth label (0 or 1) and $p_i$ is the predicted probability $p_i=\text{Logit}^{-1}(\beta^Tx_i)$. In other words, I am replace logistic loss with squared loss in classification setting, other parts are the same. For a toy example with mtcars data, in many cases, I got a model "similar" to logistic regression (see following figure, with random seed 0).  But in somethings (if we do set.seed(1)), squared loss seems not working well.  What is happening here? The optimization does not converge? Logistic loss is easier to optimize comparing to squared loss? Any help would be appreciated.  Code d=mtcars[,c("am","mpg","wt")] plot(d$mpg,d$wt,col=factor(d$am)) lg_fit=glm(am~.,d, family = binomial()) abline(-lg_fit$coefficients[1]/lg_fit$coefficients[3],        -lg_fit$coefficients[2]/lg_fit$coefficients[3]) grid()  # sq loss lossSqOnBinary<-function(x,y,w){   p=plogis(x %*% w)   return(sum((y-p)^2)) }  # this random seed is important for reproducing the problem set.seed(0)  x0=runif(3) x=as.matrix(cbind(1,d[,2:3])) y=d$am opt=optim(x0, lossSqOnBinary, method="BFGS", x=x,y=y)  abline(-opt$par[1]/opt$par[3],        -opt$par[2]/opt$par[3], lty=2) legend(25,5,c("logisitc loss","squared loss"), lty=c(1,2))


I’m trying to build a 5V output @ 200mA. I have a full wave bridge rectifier attached to a transformer with a capacitor reservoir of 100uF, using a LM7805 voltage regulator and with a 0.1uF cap as well. To get the 200mA that I needed I used ohms law to find I needed 25ohms (5V/0.2A=25ohms.) But that power will burn out my resistor so I thought that I should use 4x 1/4W 100ohm resistors in parallel to achieve the same result. When I turned on my circuit, my voltage regulator became super hot and the voltage I recorded was lower then 5V (3.8V).   I've attached the schematic I drew to show how I wired it. Can you tell me what I have done wrong ? Sorry for the crappy drawing in advance.

I'm using a 5 V / 2 A voltage regulator () without a heatsink. I'm testing the circuit with a microcontroller (PIC18FXXXX), a few LEDs and a 1 mA piezzo buzzer. The input voltage is aprox. 24 VDC. After running for a minute, the voltage regulator starts to overheat, meaning it burns my finger if I keep it there for more than a second. Within a few minutes it starts to smell like it's burnt. Is this a normal behavior for this regulator? What could cause it to heat that much?    Other components used in this circuit:  L1:   R2:   F1:


I was wondering if the planets revolving around the sun are an example of perpetual motion. Will they ever stop the revolution?

I understand that perpetual motion is impossible, but I became confused when a friend of mine told me that the orbits of the planets is an example of perpetual motion. Will earth's orbit ever end, and whats wrong with his statement. I'm asking for a simple answer to 'disprove' my friends 'theory'.


I am new to java. I have created the following two classes for adding cities (partial code has been shown here):  public class TourManager {  // Holds our cities private static ArrayList destinationCities = new ArrayList<City>();  // Adds a destination city public static void addCity(City city) {     destinationCities.add(city); } }  public class Tour{  // Holds our tour of cities private ArrayList tour = new ArrayList<City>();  // Constructs a blank tour public Tour(){     for (int i = 0; i < TourManager.numberOfCities(); i++) {         tour.add(null);     } }  public ArrayList getTour(){     return tour; }  }   Now I have created the following two tour class objects:  Tour currentSolution = new Tour(); Tour newSolution = new Tour(currentSolution.getTour());   I have declared  two functions as follows:  void Fuction1(Tour newSolution); void Fuction2(Tour newSolution);   I want to pass the newsolution object as an argument to the above two  functions so that we can manipulate the original object inside both of these functions  So, truly speaking, I want to pass the value by reference. Now If I pass it in the following way:  Function1(newsolution); Function2(newsolution);   Will it change the original object inside both of these functions? If not, then what is the proper way of doing this?

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?


About me:   I'm in my last year of undergraduate studies majoring in cognitive science at a very prestigious university.  I'm very interested in going to graduate school for neuroscience.   My concerns:   I lack research experience. I recently just learned about how wonderful neuroscience is so I have a very late start compared to my already-competent peers. I did apply to RA positions but was rejected to all of them. I will be graduating in one semester so I do not have enough time to build up my research experience. After graduating, what can I do to be more competent - research experience wise?  I have a mediocre GPA (3.077). I did not take any courses like chemistry, or physics. Many programs make these a requirement. I also did poorly in my math classes - as it is not my strength. But I did very well in psychology, cognitive neuroscience, biology psychology, philosophy, and sociology. Since I only have one semester left, I don't have enough time to take classes that programs want. Will GRE subject tests be able to compensate? Is there any hope for someone in a situation like mine? I feel very lost and hopeful, to be honest. Any words of advice would be helpful.   My current plans:   Self-learn R, Matlab, Python, HTML, CSS, and Javascript. Take on the habit of reading papers related to the field, in order to build knowledge.  Will apply to many RA positions.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I'm running a Wordpress site with about 8.000 hits per day, which occasionally spikes to 12.000 hits. I'm currently considering a VPS server. My setup is WP with Apache and MySQL.  Can anyone recommend how much memory would be sufficient in this situation?

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


This probably comes up a lot with exponential probability distributons: How to prove that: $$\int \limits_{0}^{\infty}x^n e^{-ax} dx = \frac{n!}{a^{n+1}}$$  I look in a math table of integrals, I get: $$\int x^n e^{ax}~dx = \frac{x^n~e^{ax}}{a} - \frac{n}{a} \int x^{n-1}~e^{ax}~dx$$ $$\int x^n e^{ax}~dx = \frac{e^{ax}}{a}\bigg[ x^n - \frac{n~x^{n-1}}{a} + \frac{n~(n-1)~x^{n-2}}{a^2} - \cdots \frac{(-1)^n~ n!}{a^n}\bigg]~~~(\text{n is positive})$$ not exactly the nice easy formula I was looking for...

It always puzzles me, how the Gamma function's inventor came up with its definition $$\Gamma(x+1)=\int_0^1(-\ln t)^x\;\mathrm dt=\int_0^\infty t^xe^{-t}\;\mathrm dt$$ Is there a nice derivation of this generalization of the factorial?


The density operator $\rho$ of a mixed 2-qubit system has $4^2-1=15$ degrees of freedom. We can require Tr[$\rho^2$] $ =1$ so that the system is in a pure state. Now we have 14 degrees of freedom.  If we describe the system with a complex 4-dimensional vector we have with the norm restriction $2 \times4-1=7$ degrees of freedom. The state vector even shows a redundant degree of freedom because $|\psi\rangle$ is the same state as $e^{i\phi}|\psi\rangle$.   So what part of my counting is wrong, or what does it mean, when the density operator and the state vector are supposed to describe the same thing but the density operator has twice the degrees of freedom, although it is the vector state which has an obvious redundant degree of freedom?

It is well known that two-dimensional states, that is, qubits, can be represented using the : all pure states lie on the surface of a three-dimensional sphere, while all the mixed states are in its interior.  This is consistent with a simple parameter counting argument: the space of all qubits is the space of all $2\times 2$ positive Hermitian operators with unit trace, which has dimension $2^2-1=3$, while for the pure states there are only $2\times2 - 2=2$ real degrees of freedom (two complex coefficients minus normalization and global phase). The same conclusion can be reached by considering that the pure states are a subset of all states satisfying the single additional constraint that $\operatorname{Tr}(\rho^2)=1$.  What happens for higher dimensional qudits? Let's consider the states living in a Hilbert space of dimension $D$. The space of all states is again the space of positive Hermitian $D\times D$ operators with unit trace, which has dimension $D^2-1$. The pure states can on the other hand be represented as length-$D$ complex vectors, so the number of real degrees of freedom, after having considered the global phase and the normalization condition, seems to be $2D-2$.  However, the set of pure states is also equal to the subset of all those states $\rho$ such that $\operatorname{Tr}(\rho^2)=1$. Now this seems like a single real condition, which therefore would make me think that the dimension of the space of pure $D$-dimensional states is $D^2-2$, in direct contrast with the argument above.  What is the correct way to think about this?


I've started seeing these dark regions at the bottom of my screen. They go away temporarily when I close the laptop, but come back every now and then. Is there an easy fix for this, or is there something wrong with my display?

I have a mid 2009 MBP which was heating up way to fast because of the fan; then I bought a new one and changed it. I also applied a new thermal grease. Plugged all the cables, tightened all the screws, reset SMC, reset NVRAM and turned on.  The heat is gone and its running perfectly now, but:   the display started showing some "blurry ghosts" at the bottom of the screen which won't show if I take a screenshot, so I took a photo that you can see below.      the keyboard backlight isn't turning on. I tried to unplug and plug the cable over and over again, but nothing happened. the camera isn't working at all. All I see is a black screen.    Is there anything I can do to fix any of these issues?


I have a div and when click it ,it goes to fetch some information from server and put themes to itself content to show it to  user it works fine but I do not know how to handle it ,when user clicked on other part of page cancel this event that fired?

   my function:  function getit(picdiv, pid) {    $('#picdiv').html('please wait...');   $.ajax({     url: "/Getcontent",     type: 'POST',     dataType: 'json',     data: null,     contentType: 'application/json; charset=utf-8',     success: function (content) {         $('#picdiv').html(content);      },     error: function (content) {        //do something     }    }); }

Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?


The app is installed and functional but I wanna uninstall it. I've tried through the command line but I get the error message saying "notepad-plus plus" not installed.

How to completely remove Notepad++ in Ubuntu 18.04 terminal?  I can't find it in Synaptic package manager, and don't know where is on system, but I can see an icon in Activity. It is probably not completely installed, because I can't open it.


I have an assignment to make a game in C++ using Winapi. As such I've decided to recreate pieces of the Pokemon games. I'm pretty well underway with the project, but there's one effect I would like to achieve that I don't really know how to achieve.   It can first be seen just before the game's title screen. (Pictured below)   As you can see, the logo sort of 'shimmers' from left to right a few times.  A similiar effect can be seen inside of combat when a pokemon's stats are altered. (Pictured below)   The effects I am talking about are the reddish shimmer appearing on the wolf (Poochyena), and the blue 'waves' appearing on the beaver (Bibarel).   I would like to know if there is a generalized method of applying such effects, as I aspire to have more than one Pokemon in the project, and I would therefore want a method that works on all cases. If the effect cannot be effectively achieved using winapi, then I am open to suggestions of other libraries, etc, to use.

I'm working on a top-down 2D strategy game written in Java with LibGDX (though really for the purposes of this question I'll be using GLSL).  I want to give metallic materials in the game a shiny effect - but not a lightsource-based specular highlight or anything similar, I'm after a kind of global shine or shimmer, much like the effect on the word "King" in this logo from :    While I'm not looking for someone to implement this for me, as a bit of a newbie to shader programming, what kind of techniques or algorithms should I be looking at to give this kind of effect?


I saw this limit in my high school math textbook (senior year) and couldn't find it. $$\lim\limits_{n\to\infty} \dfrac{1!+2!+...+n!}{n!}$$

How to evaluate the following limit? $$\lim_{n\to\infty}\dfrac{1!+2!+\cdots+n!}{n!}$$  For this problem I have two methods. But I'd like to know if there are better methods.  My solution 1:  Using Stolz-Cesaro Theorem, we have $$\lim_{n\to\infty}\dfrac{1!+2!+\cdots+n!}{n!}=\lim_{n\to\infty}\dfrac{n!}{n!-(n-1)!}=\lim_{n\to\infty}\dfrac{n}{n-1}=1$$  My solution 2:  $$1=\dfrac{n!}{n!}<\dfrac{1!+2!+\cdots+n!}{n!}<\dfrac{(n-2)(n-2)!+(n-1)!+n!}{n!}=\dfrac{n-2}{n(n-1)}+\dfrac{1}{n}+1$$


, the accepted answer has a green background, I don't think I've ever seen that before on any Stack Exchange website, does it happen only on MathOverflow?

Curious why  (se site) doesn't have hot questions list on the right.  It also uses the old stackoverflow design.  Why has this site's design and functionality been abandoned (or at least look abandoned?)


I'm trying to understand gravity in General Relativity and I'm having some questions. I can understand that an object in orbit around another more massive object is free falling and simply following a geodesic. What I can't understand is, if those objects are standing still relative to each other, why would they ever "start moving" along a geodesic until they collide? My feeling is that the problem is somewhat related to my definition of "standing still", which in this case it would be that the objects pop up spontaneously out of nowhere without any force acting on them and they happen to be close.

They say that gravity is technically not a real force and that it's caused by objects traveling a straight path through curved space, and that space becomes curved by mass, giving the illusion of a force of gravity.  That makes perfect sense for planetary orbits, but a lot less sense for the expression of gravity that we are the most familiar with in our day-to-day lives: "what goes up must come down."  Imagine that I hold a ball in my hand, several feet off the ground, with my fingers curled around it, and my hand is above the ball.  Then I open my fingers, releasing my grip on it, being very careful to not impart any momentum to the ball from my hand as I do so.  An object at rest remains at rest unless acted upon by an outside force.  If the ball is not moving (relative to my inertial reference frame), it has no path to travel that's any different from the Earth's path through space.  It should remain at rest, hanging there in the air.  And yet it falls, demonstrating that an outside force (gravity) did indeed act upon it.  How does curved space explain this?


A user just posted a similar question () with $n$ instead of $n^2$, and this question got some original answers, so I would like to propose the question:  Find the sum $$\sum\limits_{n=1}^{\infty}\frac{n^2}{2^n}.$$  I am really interested to see what original answers are given to this question. There are number of different approaches, some I havent seen or though of before. Thus although the question may be unoriginal, some of the solutions are not. Thus it is inappropriate to close this question.

I'm trying to determine the limit of the sum  $\lim_{n\to\infty} \sum\limits_{k=1}^n k^2/2^k$  Doing the convergence test shows the sum converges $\lim_{n\to\infty} \frac{(k+1)^2/2^{k+1}}{k^2/2^k} = 1/2$ so there must be a solution, but the normal tricks used to solve geometric series or telescoping series don't seem to work.