I'm trying to loop through a list of tuples and assign certain values in the tuple as a key to a dictionary, and other values of the tuple to the values of the dictionary. For some reason, every time I update an indexed value of a tuple key in the dictionary,  the same indexed values for all of the keys is updated.   a = [('g', 'h', 'i', 1), ('a', 'b', 'c', 6), ('d', 'e', 'f', 1)] b = [('a', 'b', 'c', 2), ('d', 'e', 'f', 5)]   Where the first three values of the tuple will become keys in a dictionary, and the last value will become a value in a list for that key.  output_dict = {} tuple_lists = [a,b] empty_values = [0]*len(tuple_lists)  for i, tuple_list in enumerate(tuple_lists):     for key_value in tuple_list:         key = key_value[:len(key_value)-1]         value = key_value[len(key_value)-1:][0]         if key not in output_dict:             output_dict[key] = empty_values             output_dict[key][i] = value         else:             output_dict[key][i] = value   This returns:      {('g', 'h', 'i'): [1, 5], ('a', 'b', 'c'): [1, 5], ('d', 'e', 'f'): [1, 5]}   When I thought it should return:      {('g', 'h', 'i'): [1, 0], ('a', 'b', 'c'): [6, 2], ('d', 'e', 'f'): [1, 5]}   The only hint I have is that the id for two different keys in output_dict are the same:      id(output_dict[('g', 'h', 'i')])   returns the same value as:      id(output_dict[('a', 'b', 'c')])

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I want to disable the background windows of my application until the top window is close . Exactly like error message window.

If I have a Xaml Window, how does one open it as a child window, and then have the parent window wait for the child to close before the parent window continues executing?


What extensions would you recommend and how should php be best configured to create a website that uses utf-8 encoding for everything. eg...   Page output is utf-8 forms submit data encoded in utf-8 internal processing of string data (eg when talking to a database) are all in utf-8 as well.   It seems that php does not really cope well with multibyte character sets at the moment. So far I have worked out that  looks like an important extension.  Is it worth the hassle..?

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.


I am calculating RMS value of trapezoidal wave.  I found its formula like below:  and at last the RMS value formula:  u = 30degree or pi/6 --> especially pi/6 A = 12 When I calculate RMS value by this formula, I got 2 but by matlab, I got 11.314 where did I make mistake ? Here the codes inputs = -pi:0.0001:pi;  outputs = zeros(1,length(inputs)); u = pi/6; A = 12;  for i =1:length(inputs)          if inputs(i) <= u/2-pi && inputs(i)>=-pi         outputs(i) = -2*A*pi/u - 2*A*inputs(i)/u;          elseif inputs(i)>=u/2-pi && inputs(i)<(-u/2)         outputs(i) = -A;              elseif inputs(i)>=(-u/2) && inputs(i)<=(u/2)         outputs(i) = 2*A*(inputs(i))/u;          elseif inputs(i)>(u/2) && inputs(i)<=(pi-u/2)         outputs(i) = A;                   elseif inputs(i)>(pi-u/2) && inputs(i)<(pi)         outputs(i) = 2*A*(pi - inputs(i))/u;                  end      end  mean(outputs) rms(outputs) %axis([-10,10,-4*pi,4*pi]); plot(inputs,outputs);   Sorry for tag, my reputation is not enough to enter right tag.

I calculated RMS value of trapezoidal fourier series but the numerical results are not same with its normal formula. $b_n = \frac{8\cdot A}{\pi \cdot u \cdot n^2}\cdot sin(\frac{n \cdot u}{ 2})$ $f_{rms} = \sqrt{ a_0^2 + \frac{a_1^2 + a_2^2 +a_3^2+..... + b_1^2 + b_2^2 + b_3^2}{2}}$ $V_{rms,f} = \sqrt{\frac{8 \cdot A }{\pi \cdot u \cdot 2}(\frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2}.... \frac{1}{(2n-1)^2})}$ $\sum(2n-1)^2 = \frac{\pi^2}{8}$ $V_{rms,f} = \sqrt{\frac{A \cdot \pi}{u \cdot 2}}$ if $A = 12$ and $u = pi/6$, $V_{rms,f} = 6$ Normal RMS formula $V_{rms} = A \cdot \sqrt{1-\frac{2 \cdot u}{3 \cdot \pi}}$ if $A = 12$ and $u = pi/6$, $V_{rms,f} = 11.313$ Where did I mistake ?


I have an alias set up  alias nano="nano -B"   so everytime I change a <configFile>, a backup <configFile>~ is generated.  Now I have a lot of those backups I don't need anymore so I tried  rm *~   but this doesn't work  rm: cannot remove '*~': No such file or directory   How can I remove all files ending with ~?  EDIT:  here the ouput of ls -alF (in this case I'm root and in the /root folder)  drwx------  6 root root  4096 Nov  9 12:58 ./ drwxr-xr-x 23 root root  4096 Oct 31 06:55 ../ -rw-------  1 root root 51486 Nov  9 11:13 .bash_history -rw-r--r--  1 root root  4218 Nov  9 12:56 .bashrc drwx------  2 root root  4096 Jul 19 15:47 .cache/ drwx------  2 root root  4096 Jun 27 15:36 .gnupg/ drwxr-xr-x  2 root root  4096 Jul  3 10:54 .nano/ -rw-r--r--  1 root root   798 Jun 27 11:45 .profile -rw-------  1 root root  1024 Jun 27 14:25 .rnd -rw-r--r--  1 root root    66 Sep  4 14:15 .selected_editor drwx------  2 root root  4096 Sep  5 13:00 .ssh/ -rw-r--r--  1 root root    65 Nov  9 09:30 Trying -rw-------  1 root root   628 Jul 19 15:37 .viminfo -rw-r--r--  1 root root   143 Nov  9 12:58 .virtualMachines -rw-r--r--  1 root root   143 Nov  9 12:58 .virtualMachines~ -rw-rw-r--  1 root root   358 Nov  9 12:57 .virtualServices -rw-rw-r--  1 root root   358 Nov  9 09:48 .virtualServices~   in this case I want to remove .virtualMachines~ and .virtualServices~

I want to carry out some action (say chown) on all the hidden files in a directory.  I know that this .* is not a good idea because it will also find the current . and parent .. directories (I know that rm will fail to operate on . and .. but other commands, including chown and chmod, will happily take effect)  But all my hidden files have different names!  How should I glob for all hidden files while excluding . and .. ?


I redirect all http requests for my subdomain to https by using following code.  <VirtualHost *:80>   ServerName subdomain.example.com   Redirect 302 / https://subdomain.example.com </VirtualHost>   Now my problem is how do I do it for all subdomains.  For example http:subdomain1.example.com should go to https:subdomain1.example.com and  http:subdomain2.example.com should go to https:subdomain2.example.com  How do I do it for all subdomains without having to create one virtualhost for all of them

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


How is it possible that the Riemann zeta function of all negative integers is 0. And why is it that zeta of -1 is the only non-zero value (-1/12)?  Does anyone have a good and/or intuitive explanation for it?

Can anyone please explain to me how to prove that Riemann zeta function is 0 for all negative even numbers. In many references , they have just given the statement without any proof. Any explanation or hint will be a great help. Thanks in advance.


I received a vbs file on Skype from someone I thought I knew and against my best judgement I ran it. Can someone please tell me what it does? Here's the vbs file code -  I have already deleted the file it added to the startup folder. I have also checked that the file C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exe has not been modified recently. Anything else I need to check or any other action I need to take? Any help would be greatly appreciated!

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


I'm having a problem with titlesec's explicit option. Here's an MWE:  \documentclass{book} \usepackage[explicit]{titlesec}  \titleformat{\chapter}[block]{} {#1}{0pt}{}  \begin{document}  \tableofcontents \chapter{hi there}  \end{document}   In this example code, we redefine the \chapter command. In my real example, I use the explicit option because I need to pass the title of the chapter to a complicated Tikz code. However, as it's written, the \chapter* of \tableofcontents doesn't display any heading at all.    The question is: how do you work titlesec when the explicit option is on, to allow the printing of starred chapters?

I want my chapter titles to look like as asked in this . I have followed the method suggested by "lockstep", that is, using package titlesec. It works perfectly fine but here is the question: I want this format for main chapters only and for the rest, that is Contents, Declaration, Index, Bibliography etc I want them centered with normal vertical spaces before and after the title. Pasting the code at the start of Chapter 1 solves the problem partially; it leaves the starting ones (contents, declaration) totally unchanged and applies the same format to Index and Bibliography. Please help.


List all directory in storage with adb : adb shell ls -a   /storage . .. emulated sdcard0 self  I want to list all directory located in  /storage/emulated: adb shell ls -a   /storage/emulated ls: /storage/emulated: Permission denied  Add sudo to list again: sudo adb shell ls -a   /storage/emulated ls: /storage/emulated: Permission denied  How can i get the permission then?

The /storage directory and the /storage/emulated/0 directory is accessible in a non-rooted Android OS. So, why is the /storage/emulated directory not accessible in a non-rooted Android OS ?


In Windows when I connect using test_reader account I can access with no problems. However when I use peter account it gives me Access Denied.  I did some testing and if I change share folder ownership to peter I can access using peter account and then there's no acccess for test_reader. So only a folder owner can access the share.   smb.conf:   [share]         comment = Venice         path = /media/test_folder/share         read only = yes         create mask = 0650         directory mask = 0760         browsable = yes         valid users = @mac         write list = peter   mac memebrs:   mac:x:502:test_reader,peter   Folder permissions:  drwxrw-r-x 2 test_reader mac   2048 Jun  9 18:23 share   I have set smbpasswd for each accounts.   Why I cannot access the share using peter account that belongs to the same group as test_reader?

In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work?


I have a 500 gb ssd and a 8 tb hd.  I would like to have linux boot off the ssd so that its super fast and such, but use my 8 tb physical hard drive to store all the programs and such on.  This way I do not run out of space, as many of the games I play are like 100 gigs each.  Is there a way to do this?

I want to install Steam for Linux. As I have only 256gb SSD and not enough space for games, I'd like to install it (and all it's games) to a USB3 flash drive.  How to do that? Preferably using sudo apt-get install ****. Haven't find a way to specify the installation location.


I would like to know how can i add a safety switch with an LED indicator to the input of this device , so that if the safety switch is on then the LED lights , and when i want to use the device , all what i have to do is to press the normally-open switch.  I have attached this schematic and im not sure if it will work correctly ,as i am a very beginner in electronics, so is the design correct?  The device itself is an arc generator with a DC input and th following parameters (Input voltage: DC3.7-7.4V , Input Current: 2A-5A).  I know how to size the LED resistor but not too sure about the switch how can i size it please ?  Thanks

I would like to know how can i add a safety switch with an LED indicator to a circuit , so that if the safety switch is on then the LED lights , and when i want to use the device , all what i have to do is to press the normally-open switch.   I have attached this schematic and im not sure if it will work correctly  ,as i am a very beginner in electronics   Thanks


About a year and a half again, I purchased this wonderful game "Machinarium" from Amanita Design at the Ubuntu Software Center. Now, after I got a new Laptop Computer, I wanted to re-install my previously purchased game. However, it is not available anymore in the Software Center. I contacted Canonical Customer Service about this. No answer. I wrote to Amanita Design as well. No answer!   The answer to the marked duplicate question was: "In the Ubuntu Software-Center, go to File > Reinstall previous purchases but this did not work for me.  What can I do?

Fresh install of Ubuntu 12.10 but I want to claim a purchase of Minecraft that I bought with the old install using Ubuntu Software Center. Don't see an intuitive way of downloading your purchased items. I have the email payment confirmation. Any advice?


I can understand why you need to enter your password for an sudo apt install daSoftware or even sudo apt upgrade: you are modifying the code that will run on your machine.  But why on apt update? You are just updating the list of available software. Why would it be a problem not to ask for the extra privilege granted by the super user mode to perform an update?

Why do I need root-privileges to update my package managers package list?  Hi,  I always wondered why I need root-privileges to update my package managers package list?  I'm aware that the privileges are required to access the databases located in the designated directories.  But why can't I even check for updates with out root?  It doesn't affect other users. (I guess) To be aware of pending updates can be a security flaw, but the installed and the newest version can be detected easily on other ways.  What is the reason here?  This behavior is afaik quite common. Fedora, Ubuntu, Debian and Arch have this behavior, likely many other distros have it to.


help many rasters i have and should be projected in UTM coordinate system. what should i do?

I have a fodler with 1500 ECW rasters, no spatial reference information defined.  Can I use GDAL to batch define a projection for all 1500 in the folder?


on Ubuntu 16.04  sudo nano /etc/ssh/sshd_config    change  PermitRootLogin prohibit-password    to   PermitRootLogin yes   sudo service ssh restart   still permission denied

I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.


In Safari, I'd like to be able select multiple tabs at once, and move them all to an open or new window. Looking for extension (or magic Safari invocation) that can , I find no viable solutions.   Since Safari lacks this feature, is there any browser on OS X that does a better job of this, out of the box, or with an extension.

I'm looking for a more efficient way to manage my tabs in Safari. Specifically something that allows me to move multiple tabs at once to a new window.  I often find myself following a link for a new subject/idea, then another, and so on and so on, until I find myself with a dozen tabs that should really be in their own window, but it's a pain to manually find and drag each one. I'd love to be able to do it in one fell swoop. Any suggestions?


I'm trying to do a number checker in imessage. We all know that there is no such api, so I'm trying to use the tools at hand. The main took with past issues on this site on this topic.  I made a loop that inserts a number into a string, and by the color of the number (blue - registered, red - missing), using the standard utility Digital Colors Meter determines the color of the number. Then, depending on the color, it either adds a variable with a number from the initial txt file to the new one, or starts the script from the beginning. At least it should be.  But something is going wrong in loop. It checks the color, inserts numbers, everything is fine, but apparently the wrong condition, apparently the wrong data types. It inserts different numbers into the scatter. Some will insert, some will not, regardless of the initial condition. What could be the reason? Where is the error?      tell application "Digital Color Meter" to activate     tell application "System Events"         tell process "Digital Color Meter"             click menu item 1 of menu 1 of menu bar item 4 of menu bar 1         end tell         do shell script "/usr/bin/python -c \"import objc;bndl = objc.loadBundle('CoreGraphics', globals(), '/System/Library/Frameworks/ApplicationServices.framework');objc.loadBundleFunctions(bndl, globals(), [('CGWarpMouseCursorPosition', 'v{CGPoint=dd}')]);CGWarpMouseCursorPosition((" & 1002 & "," & 222 & "));\""         set rgbColors to words of (the clipboard)     end tell     if rgbColors is equal to {"77", "39", "38"} then         exit repeat     else         do shell script "echo " & quoted form of n & " >> /Users/oneone/Desktop/base2.txt"     end if   Only the color check condition for Digital Color Meter is presented here.  Through the do shell, the color is read at the mouse position and the variable is added to the new file.


Did you know how to model this bevel ? I need to reproduce them but i can't.  Best regards, A Frenchman in shit

Is it possible to make one side of a cylinder square while leaving the other alone? If so how would I go about it? I have a tree branch that I need to connect to a trunk. The number of edges on the cylindrical branch will not connect up with the square hole on my trunk...Any ideas?


Please keep in mind that the topic or quality of  does not matter.  If you think the answer is weak, that's fine, irrelevant, down vote it.  What matters is the fact that a link that was posted is redirected.  I posted this  http://www.amazon.com/Oxo-Good-Grips-Salad-Spinner/dp/B00005QB5U  but it now takes you to this  http://www.amazon.com/dp/B00005QB5U/?tag=stackoverfl08-20  I appreciate that the SE sites exist solely because someone is making money, but I feel this is taking it too far.  That's not my own "affiliate" link.  If it were, I would accept the change.  However, it's not.  Pollute the site with advertising all you want (that's to be expected), but don't alter user's post!

I'm thinking that one way Jeff and the Stack Overflow team could squeeze some extra money out of this site would be to automatically convert all Amazon links posted here into affiliate links, e.g. Stick "tag=codinghorror-20" (or more likely a new site-specific tag) onto every Amazon link. This would bring in some additional revenue every time someone purchased a book via a link on this site.   They could do similar things with other links as well. Amazon's simply the most obvious choice.  So my question is, would anyone have a problem with this?  I know I wouldn't mind, but I don't know how other people would react.  What does everyone think? Is this a horrible idea, a great idea, a waste of time?


As a layman I am struggling to understand what effects the fact that the universe itself expands has on distance, density etc.  If the universe expands by a factor $k$, does that mean that the distances within the universe also expand (in other words, the time light needs to travel a given distance increases), or does distance "scale" with the expansion? More concretely, will an expanding universe mean that stars within a galaxy get further apart over time or that the distance of chemical bonds in atoms increase or even that e.g. the distance of where the strong force acts changes?  If everything scales with the expansion, then all the constants of physics will remain the same, but then the density of the universe would also remain constant, because everything in it would scale up according to the expansion. But if this is not the case, would not certain physical constants have to change over time? Sorry if I am missing something trivial or obvious here.

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


Is it possible for the following to happen:  Some moment of a distribution does not exist. Then can the mgf exist for any t not equal to zero?

Can a distribution with finite mean and infinite variance have a moment generating function? What about a distribution with finite mean and finite variance but infinite higher moments?


My goal is to have a function that given an input value will output a random value that follow a truncated normal distribution,  could you please suggest a function that can do that ? Or guide me a good reference

I need to generate random numbers following Normal distribution within the interval $(a,b)$. (I am working in R.)  I know the function rnorm(n,mean,sd) will generate random numbers following normal distribution,but how to set the interval limits within that? Is there any particular R functions available for that?


When ever i am updating using apt-get update or via Synaptic, there will be some errors. Can any one help me to solve the issue? I Google about it a lot, but didn't succeed.  Errors are given below:  W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


During the TNG years (or at any point you like until the end of DS9), how many active Starfleet officers were there overall, at a given time, of the ranks:    Fleet Admiral  Admiral Vice-Admiral   ?  Note: I realize Fleet Admiral could be either a separate rank or an awarded title; I mean the separate rank.

Let's say in the TNG era.    They seem to be pretty rare given that they have to be promoted mostly from the ranks of the most accomplished captains.    I would guess maybe twenty are encountered or mentioned over the course of TNG.  Are there a dozen or a hundred?


i've made the following bash script to commit the parent repo after some change in submodule. it's all about that the script want to cd .. to check the parent repo current branch but the problem is that the cd .. is not affecting the upcoming commands because i guess the subshell  i've tried to run 1- cd ../ && before each command 2- make alias but didn't succeed 3- run exec but the script didn't continued  #!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments.  The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "post-commit". commit_msg= git log -1 --pretty=%B if [[ $(git branch | grep \* | cut -d ' ' -f2) == "int1177/next" ]]; then     cd ..     if [[ $(git branch | grep \* | cut -d ' ' -f2) == "B0/next" ]]; then         git add 6_Tests         git commit -m "bs esss"         echo "development branch B0/next has now new commit"     else         echo "development branch isn't B0/next"     fi else     echo "current branch isn't int1177/next"     fi

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


After installing Phyton 3.6 , I can't get Terminal to find it . I am trying to learn Phyton and very new at this. Please help with details instructions. Thanks  This is what I get:  Last login: Fri Dec 22 08:24:04 on console Carmens-MacBook-Pro:~ Clp$ phyton -bash: phyton: command not found Carmens-MacBook-Pro:~ Clp$ phyton3 --version -bash: phyton3: command not found Carmens-MacBook-Pro:~ Clp$

I installed python3 with homebrew and can access it with python3 command in terminal.  I'm installing a command line app that needs python3. When I try to use it it says:     Python 3.3+ required   When I do python --version it reports python 2.7.  How can I get the app to use python3?


I have a DC voltage source (between 5 and 10V) from which I want to charge cell phone with a USB cable. I believe that using a LM317 or similar IC for charging cell phones is not a good idea as most cell phones are coming with Lithium-ion batteries, which requires constant current phase first, then constant voltage phase.    I have seen MAX1555 IC but it gives only 4.2 V as regulated output. If I connect a VBUS (usb cable) from MAX155 chip to iPhone, my iPhone may not charge because it's less than 5 V.  Can anyone give some insight?

I am trying to work out the good charger for Mobile phones, which can serve as good performer for various smart phones out there in market these days & mostly using Li-ion battery. Charging has 4 stages -- "the initial trickle-charging, then constant current charging, then constant voltage charging & finaly Top-up charge" -- all this is controlled & monitored by a control circuit/IC of charger. So, my concern is if such circuit/module/IC is already there in Mobile phones & taking care of all protections to battery/phone including overheating during charge OR The charger designer have to incorporate these circuits in Charger itself? If former case, that means we just need to make a charging source giving ample current & 4.75V-5.25V voltage, like a high-powered USB output port would gives. My feeling is such stages-wise charging & control/monitor circuitry is already within the phone set, i just want to reconfirm.


An assignment I'm working on right now needs to generate a random number from 1 to 4 using SecureRandom that will be used for a switch statement. Cases have to start from 1 so I can't just use  SecureRandom rand = new SecureRandom(); int a; a = rand.nextInt(4);   right? I have to use SecureRandom to generate the integer as well.

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


What is the difference between an axiom, a hypothesis and a postulate? I'm a student of physics and not know much of philosophy. All I know is that axioms (for example, the axioms of Euclidean geometry) cannot be mathematically proved. But so does a postulate and a hypothesis.

What are the differences between hypothesis, supposition, assumption, postulate, and axiom?


This question is similar to  (And no it is not a duplicate it is different in that it has been made more clearer.)  What seemingly was originally thought as an extremely easy question was not well understood. So it has been reworded again to be even more specific. So not a duplicate question.  It is meant to be understood that a capacitor starts with 0J and 0V in it. Next the switch is closed in order to connect the battery to the capacitor in order to charge it up to the exact same voltage level of that of the battery.   There is now 7.2 milliJoules of energy stored in the capacitor.    I am only referring to the schematic presented, which works exactly like what the schematic portrays. This is a real world circuit done on the work bench. It has losses due to resistance in the wires, capacitor, battery, and switch.  It is not lossless and so it is not perfect, there are losses involved as mentioned immediately above.  Half the energy is lost in doing work to transfer the other half into the capacitor. In other words the amount of work it takes to transfer half the energy into the capacitor is exactly equal to the amount of energy stored in the capacitor. This is a well known fact of life and electronics.  In other words, if 2 Joules of energy came out of a battery, then only 1 of those Joules would make it into the capacitor.  What I am asking is: When charging a capacitor from a battery, is this 50% loss of energy and 50% stored energy in the capacitor a set rule in stone?  I am referring to this exact circuit only or any other similar circuit with different capacitance's or different battery voltages with the exact same process of simply closing the switch just one time only.   I am not referring to ramp charging, step charging, or anything other type of charging. No other components are involved or added into the circuit. Just a simple closing of a switch to connect the battery to the capacitor only.  I know that this is another question but it's directly related to the first question, I don't want to ask it in another question and risk having a duplicate question, which it shouldn't anyways.  Other question: If the 50% loss of energy in order to transfer the other 50% energy is a set rule in stone then what voltage would the capacitor have to be in order to double the energy in the capacitor to make it equal to 100%?  In other words, what voltage should the capacitor be when it has 14.4mJ of energy in it, which should be double or twice the amount of the 50%, if I am getting that correct at all.  It should not be inferred that I am implying that the capacitor is capable of receiving 100% of the energy transferred from the battery as this is completely impossible and preposterous with the given circuit, but only asking what voltage would the capacitor have to be in order to double the 50% of the energy transferred into it?

I understand that when a battery is connected to a capacitor that half the energy is stored in the capacitor while the other half is lost to heat or whatever other losses are involved once the capacitor is charged to the exact same voltage level of the battery.  Only a one time direct connection with a simple switch from open to closed that charges the capacitor up to the voltage level of the battery is what is being referred to. My question is does this occur each and every time?   Once the capacitor is charged to the voltage level of the battery then there should be 7.2 milliJoules of energy in the capacitor.  If the answer is yes that half the energy is transferred into the capacitor each and every time then what would the capacitor voltage have to be in order to equal 100% of the energy if it were to come from the battery?  I understand that in practice this will never happen, which is why the statement equal to 100% of the energy is indicated. (Meaning by some other method of charging means)         – Schematic created using


As you can see on this site, a usual way to calculate rounded number is: Math.round(num * 100) / 100  But my tests have shown me a strange behaviour of this method:  Math.round(1.155 * 100) / 100 = 1.16  Math.round(1.355 * 100) / 100 = 1.36  Math.round(1.255 * 100) / 100 = 1.25 - it's a mistake  Math.round(1.455 * 100) / 100 = 1.46  Math.round(0.255 * 100) / 100 = 0.26  Math.round(2.255 * 100) / 100 = 2.26  Math.round(3.255 * 100) / 100 = 3.26  Math.round(1.255 * 100) / 100 = 1.25 - it's a mistake  Be careful!

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm using Windows 7 on my PC (1 GB RAM,160 GB HDD). I want to install Ubuntu and remove Windows 7 I have Partitioned my PC into 2 drives , C  Drive - 40 GB and D Drive - 120 GB. I want to install Ubuntu on the C drive without formatting D drive so how can I do that? I know that I will have to select the Something Else option when the Installation Type Screen appears but I don't know how to proceed from there.

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


There is a code. I want to create a text animation. It prints a line of text then after some delay erases it and prints another. Here is the function that creates a text frame:      def frame(data):     clear = '\u001b[0m'      for letter in data:         rslt = colours['fg'][letter['color']]         rslt += letter.get('bg', '')         rslt += letter['letter']         rslt += clear         stdout.write(rslt)   Here is the animator function:  from time import sleep  def animate(data):     clear = '\u001b[100D'     #for i in range(len(data)):     for i in range(5):         #stdout.write(clear) #1         ready = change(data, i)         frame(ready)         sleep(0.4)     print()   What am I supposed to get? As I explained above, it should print a line of text, then wait for 0.4 and then on the next iteration cycle erase the previos text, then repeat the stuff.  But what do I get? I get nothing for (I didn't measure exactly, but probably the sum of delays of 0.4) some time and then the text repeated 5 times as it was not cleared, because the line #1 is commented. And when it's not, after again the sum of delays I get the last frame of the text.  You may play with my code at

How do I force Python's print function to output to the screen?


Example : He isn't tired but she is. Why can't use "she's"? Why is "she is" used?

I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies.     That's what it's.    That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why.  There is clearly no problem with ending other sentences with a contraction. These sound fine.     I thought I could, but I can't.   Stop touching that, it will fall off if you don't.   You say that the sky is green, but it isn't.   Also, it sounds just fine if you remove the contraction:     That's what it is.   So what's up with this construction? Should it be avoided?


When I start my pc the screen stays black. There are no beeps.  I have tested the screen with my laptop so the screen and cable both work. I have also tried taking out the GPU and plugging the cable directly into the motherboard but that didn't change anything. Clearing the CMOS also didn't work.  I'm not sure if it's related but the HDD activity light keeps blinking the whole time when the pc is on.  It just started happening today, I haven't changed anything so at the moment I have no idea what could be causing the issue.

My Asus P5K Pro won't boot.    When I connect the power   Powerled on mainboard lights up normally. (doesn't flash, just turns on)  When I press the power button;   fans spin up powerleds on the front do NOT light up (normally they would) no beeps no screen output    I have managed to boot up a few times after taking out mainboard battery and clearing CMOS RAM. It looked like each time when I changed a random settings in the BIOS (like boot order, or time) I would get the same problem again.  But now I can't get it to boot up, even after clearing CMOS RAM.  I have tried to replace the mainboard battery with a new one, did not help.  Has anyone experienced this before? Any ideas are greatly appreciated!  UPDATE: I don't feel it has anything to do with the power supply. Disconnecting HDD, DVD, USB etc. did not change anything. Also, after clearing CMOS RAM, I have been able to work on this computer for a few days with all devices attached.  UPDATE: I have also tried to remove graphics card and memory, still no beeps.  UPDATE: FIXED: Swapping out the PSU seemed to do the trick, allthough seeing the circumstances this didn't seem likely. After swapping back to the old one, PC didn't work again.  Let's see if it holds up.


Hello I am fifteen and I already know everything that my school has been teaching me so I have been going ahead.  I have already been studying mathematics far past where I am at school, but I am very interested in physics.  I want to learn everything up to advanced topics such as super-string theory.  But to get there, I obviously have to start at the beginning.  Any good textbooks out there for somebody like me?  Preferably something with a lot of practice problems and that has many applications.

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


I installed Viber on Ubuntu:  /home/nazar/Software/Viber/Viber.sh   I can run it from terminal specifying this path. I want to achieve some short command as:  viber   For lunching application.  How to solve this issue?

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I am configuring SAP so that a customer can have the custom domain in Salesforce Marketing Cloud. However, he wants to use two different domains: one for sending e-mails and the other for Landing Pages (both in a single business unit). Can anyone tell me if this is possible? If so, is it possible to request two domains on the SAP form? Or is it possible to have but only for different business units?

I have created a Landing Page in CloudPages. I am trying to personlize the URL following the below documentation -    In my email, I made the URL like below but it is not working. I cannot see the personalized string values in the Landing page. What could be wrong?  Join Us


I have a variable $z$ given by:  $z=\sum_{i=1}^n z_i$  where $z_i$ are random variables with $z_i \sim N\left(0,1\right)$. Then it will be $z \sim N(0,n)$ and the correlation between a variable $z_i$ and $z$ is $\frac{1}{\sqrt{n}}$.  Given now $y = e^{\alpha+\beta z}$, what is the correlation between one of the variables $z_i$ and $y$?  Addendum  Is my result correct?  $\frac{\beta e^{\frac{\beta^2}{2}}}{\sqrt{\left(e^{n\beta^2}-1 \right )e^{n\beta^2}}}$

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


I have been using a template for homework assignments in overleaf.com. It is working well, but unfortunately, there are some ugly checkboxes in every problem line. How do I make this go away ?  Here is the code :   \documentclass[10pt]{article}  \usepackage[margin=1in]{geometry}  \usepackage{amsmath,amsthm,amssymb, graphicx, multicol, array}  \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}}  \newenvironment{problem}[2][Problem]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}       {\end{trivlist}}  \begin{document}  \title{Pigeonhole Principle} \author{Name} \maketitle  \begin{problem}{1} Let $a_1, a_2, \dots a_n$ be a sequence of integers. Prove that there is    always a subsequence $a_i, a_{i+1}, a_{i+2}, \dots a_{i+k}$, such that  $a_i +   a_{i+1} + \dots a_{i+k}$ is a multiple of $n$. \end{problem}  \begin{proof} Write a solution here \end{proof}  \begin{problem}{2} If there are $25$ points, such that among any three of them there are two     who's distance is less than $1$. Prove that there is always a circle of radius    $1$ which contains $13$ points. \end{problem}  \begin{proof} Write a solution here \end{proof}  \end{document}   The problem is at the end of the solution line there is a box, which I want to remove.

the following code will only make the qed not appear in the second proof. However, it it possible to make the qed symbol never appear at the end of the proofs without having to specify it locally every time?  \documentclass{article} \usepackage{amsthm} \begin{document} \begin{proof} This has the QED symbol. \end{proof} \begin{proof}\renewcommand{\qedsymbol}{} This hasn't. \end{proof} \begin{proof} And this has it again. \end{proof} \end{document}


I'm using Ubuntu 14.  Netflix isn't working with Chrome.  it says:  cannot find all components. check WidevineCdm and upgrade it.    But there is no upgrade to do in Chrome components.

Netflix was working fine until an upgrade updated Chrome to version 48.0.2564.82 (64-bit). It first told me to ensure Widevine was set to "always enabled" in chrome://plugins. After checking "always enabled" it now tells me to check for an update in chrome://components, however it is not in the list of components.  I've deleted the Chrome config (sudo rm -r ~/.config/google-chrome) and rebooted to no avail. Other users on Reddit reported the same thing here:   Dist: Ubuntu 15.10 (64-bit)


so I am using GLM for logistic regression in R and I have some variables with many factors.   I ran the model and has the result like this:    My question is: 1. Is this variable significant? Considering only Married and Separated are significant here (p-values <0.05). What about if there are 10 different categories for a variable, but only 3 of them are significant? Should I drop it or keep it in the model?    Also, in the case of a model where all the variables are significant but the AIC value is much higher than the one where a variable included is not significant, which one is more useful? What can cause this?

After seeking clarification about linear model coefficients  I have a follow up question concerning non-signficant (high p value) for coefficients of factor levels.  Example: If my linear model includes a factor with 10 levels, and only 3 of those levels have significant p values associated with them, when using the model to predict Y can I choose to not include the coefficient term if the subject falls in one of the non-signficant level?  More drastically, would it be wrong to lump the 7 non-significant levels into one level and re-analyze?


If random variables $x$ and $y$ have probability distributions $f(x)$ and $f(y)$ that each sum to 1, indexed by $i$, \begin{array} {|r|r|}\hline i & f(x) & f(y) & f(x,y) \\ \hline 1 & 0.1 & 0.1 &  \\ \hline 2 & 0.2 & 0.4 &  \\ \hline 3 & 0.4 & 0.3 &  \\ \hline 4 & 0.2 & 0.15 &  \\ \hline 5 & 0.1 & 0.05 &  \\ \hline  \end{array} How do I compute corresponding probability samples for their joint distribution $f(x,y)$ for the final column in the table?

Assume we have 3 random variables $X_1,X_2,X_3$, and we know the pairwise marginal distribution $P(X_1,X_2), P(X_2,X_3), P(X_3,X_1)$, but we don't know anything else (such as conditional independence). Can we get the joint   distribution $P(X_1,X_2,X_3)$?


I want to find the sum: $1 - \binom{n}{2} + \binom{n}{4} - \binom{n}{6} + ...$  but i'm not entirely sure where to start. I know that alternating sums of binomial coefficients is zero, but don't know if that will help at the moment.  Any ideas?

Fix integer $n\geq 1$. Consider the number $$1-\binom{n}{2}+\binom{n}{4}-\binom{n}{6}+\cdots$$where the sum continues as long as the lower number in the binomial is $\leq n$. Is there a way to simplify this sum?   The first few values are $1, 0, -2, -4, -4$.


I'm trying to write my own typescript, and was advised to look at the ones provided in the ConTeXt distribution. They contain lines such as the following: \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default,\s!fallbacks=\s!Serif]  I don't understand if and why the \s! parts are needed. The file syst-aux.mkiv says they are string variables, but then, where are those defined? What do they contain? Is \s!name the name of a variable that contains something, or is "name" the content? If it's easily explained in a manual I must have missed it, and would appreciate if someone could either point me towards the explanation or just explain it to me in simple words. I just want to understand how to make a typescript to get a downloaded font working, I don't need to fully understand all the finer points of system macros.

1st example:  \starttypescript [\s!serif] [paratype]   \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Italic] [\s!name:PTSerif-Italic] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-Bold] [\s!name:PTSerif-Bold] [\s!features=\s!default]   \definefontsynonym [ParatypeSerif-BoldItalic] [\s!name:PTSerif-BoldItalic] [\s!features=\s!default] \stoptypescript   2nd example:  \definefont[SerifS][\s!file:GenBkBasR at \smallfontsize]   Is \s! only related to fonts? Should I use it in my typescript files?


My laptop crashed one month ago. The HDD has not been damaged and I can read it from my new laptop.  However, I'd like to restore my unsaved tabs in Notepad++, but can't find them back; I can't even find in which path they were stored. I found the config.xml file stating that RememberLastSession was set to yes, but nothing else.  Can anyone help me with this?  Thanks a lot  pp  EDIT: Thanks, but I've read this thread before posting and could not find the folders specified in the thread. As the flag RememberLastSession was turned on, could you tell me in which file the path is stored?

I had to immediate shut down, and I lost about 20 unsaved tabs, is there any way to recover these?


Is it a good idea to redirect http://www.example.com to http://example.com or keep both ?

Are there any differences among these addresses?     www.example.com http://www.example.com example.com


I'm making several buttons from an object and append them to the only div in the body: #main, everything works fine except for actual click function: I can't seem to make the buttons alert different properties.  This is my object:  var BrushDesc = function (n, i, t) {     this.presetName = n;     this.elemId = i;     this.preset = t; }; var brush = {}; brush.circ = new BrushDesc("circle", "circle", "basic circle"); brush.rect = new BrushDesc("rectangle", "rect", "19-2"); brush.softy = new BrushDesc("round soft", "softy", "softy"); brush.rake = new BrushDesc("|||", "rake", "21-3");   that was my first attempt appending the buttons but this always alerts last .preset property of the object:  for (var i in brush) {     $('<button id="'+brush[i].elemId+'">'+brush[i].presetName+'</button>')     .appendTo("#main")     .click(function() {alert(brush[i].preset)});  }   So I thought 'okay :('. Then I made it differently and this seems to work but in the same time this looks really wrong (mostly because this relies on .elemId and brush.property having the same name:  for (var i in brush) {     $('<button id="'+brush[i].elemId+'" class="main">'+brush[i].presetName+'</button>')     .appendTo("#main") }  $(".main").click(function() {     var buttonId = $(this).attr("id");     for (var i in brush) {         if (brush[i].elemId == buttonId) alert(brush[i].preset)     } });   Can anyone please make it right?  edit: Thanks for pointing the Closures thread (haven't used them yet) Felix, but I'm not sure I understand how to apply this to my objects  var tps = []; function createTps(i) {return function() {alert(br[i].preset)}} //doh for (i = 0; i<5; i++) {tps[i] = createTps(i)} //but I should have keys here, not numbers?  var j = 0; for (var i in br) {     $('<button id="' + br[i].elemId + '" class="main">' + br[i].presetName + '</button>')     .appendTo("#main")     .click(function() {tps[j](); j++}); //yeah, sure }   edit2 Actually a friend of mine suggested to use Immediately-Invoked Function Expression instead of closure and it worked perfectly  for (var i in brush) {     (function (i) {         $('<button id="'+brush[i].elemId+'">'+brush[i].presetName+'</button>')         .appendTo("#main")         .click(function() {alert(brush[i].preset)});     })(i); }

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


found1[found].setText(s1);                      found2[found].setText(s2);                      found3[found].setText(s3);                      found4[found].setText(s4);                      found5[found].setText(s5);                      found6[found].setText(s6);                      found7[found].setText(s7);                      found8[found].setText(s8);   Here found1[10], ....... , found8[10] are the name of JLabel and I want to name them as per the String name s1, s2, s3..... ,s8 whose names are assigned in the way as shown below:                       String s1=String.valueOf(rs.getInt(1));                      String s2=rs.getString(2);                      String s3=String.valueOf(rs.getInt(3));                      String s4=rs.getString(4);                      String s5=rs.getString(5);                      String s6=rs.getString(6);                      String s7=rs.getString(7);                      String s8=String.valueOf(rs.getInt(8));   Here rs is an object of ResultSet class and I am accessing data from table of database. All other codes are correct but I get runtime error every time when I reach at this code.

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?


I have recently installed the Stack Exchange app and it's pretty impressive with all functionalities packed inside a small device.  Today when I received one alert from the app & after clicking on it, the app opened but with blank screen (I mean the right slide-in screen with all alerts).  I waited for some time, nothing happened, so I tried refreshing the app, then all the messages/alerts started appearing.  I know this is a beta app, so this isn't a big issue. Hope to see a stable app :)

When I receive a message on an SE post, I get a notification like this:    If I double tap this notification, the SE application opens, but my feed is empty approximately half the time. It looks like this:    If I refresh the feed (slide from the top), the feed does refresh and shows the new notification.   The notification, above, leads to  comment.  I haven't figured out the pattern yet, but this occurs roughly half the time I open a notification. It's occurred for chat messages, comments and answers - but not consistently. I have received notifications for the same post (for example, the two comments after the one linked above) that do not show an empty feed. But, a chat message barely 10 minutes later will show the empty feed again.  I am utilizing the beta app - version 1.0.72 on Android 5.0.1.


I've done every possible quest in Kakariko. I am also unable to obtain the shrine ball through the event. Is it possible that I broke it due to me completing the game and ignoring that event? I didn't know it existed until now. I already know about the quests needed, I simply missed the event. I completed all Kakariko Side/Shrine Quests. I am at post-Endgame and accidentally ignored this event in my run. I've done the event on a different profile and it worked.

Next to Impa there is an orange orb like you find at shrines. On one of the hills above Kakariko Village, there is a pedestal with a slot for an orb. If I try to pick up the orb, Impa tells me off.  How do I pick up the orb?


Problem: Let $f : G → H$ be an isomorphism. Prove that if $a \in G$   has infinite order, then so does $f(a)$, and if $a$ has finite order   $n$, then so does $f(a)$. Conclude that if $G$ has an element of some   order $n$ and $H$ does not, then $G \not\cong H$.   My proof: If $a$ has finite order $n$, then $a^n=e \Rightarrow f(a^n) = f(a)^n = e$. So, $f(a)$ has order $n$.  How can I prove $a$ had infinite order $\Rightarrow$ $f(a)$ has infinite order?

Let's say $f$ is an isomorphism $f:G  \rightarrow G'$, where $G$ and $G'$ are multiplicative groups.  Then for $x\in G$, if $f(x) = x' \in G'$. Do we have always have $\text{ord}(x) = \text{ord}(x')$? Why?


Prove that not every Boolean function is equal to a Boolean function constructed by only $\wedge$ and $\vee$. Please can you help me giving some hint.

Prove that not every boolean function is equal to a boolean function constructed by only using $\wedge$ and $\vee$.  Here is my solution, can I ask for a feed back on my solution please?   $p∧q$                          $0 0 0 1 $   $p∨q$  $0 1 1 1$  Not every boolean function is the same when using $ ∨ $ and $∧.$  Edited part!  $p\vee q$                  $0111$  $(p\vee q)\wedge p = p$  $0 = 0$  $0 = 0$  $1 = 1$  $1 = 1$  $(p\vee q)\vee p = p\vee q$  $0 = 0$  $1 = 1$  $1 = 1$  $1 = 1$  here is my edited answer , can I ask for more feed back , thanks


$\textbf{preliminaries}$ I am in the course of geometry of curves and surfaces, clearly frenet's trihedron is $\{T(s),N(s),B(s)\}$ where $T(s)=\alpha'(s)$ , $N(s)=\frac{T'(s)}{\|T'(s)\|}$ and $B(s)=T(s) \times N(s)$ The Serret-Frenet equations of the curve $\alpha$ are: $$T'(s)=k(s)N(s)$$ $$N'(s)=-k(s)T(s)-\tau(s)B(s)$$ $$B'(s)=\tau(s)N(s)$$ $\textbf{Question}$ Let $\alpha: I \to \mathbb{R}^3$ be a curve p.b.a.l. With positive curvature such that $k'(s)\not = 0$ and $\tau(s)\not = 0$ for each $s\in I$. Prove that the trace of $\alpha$ is contained in a sphere of radius $r>0$ if and only if $$\frac{1}{k(s)^2}+\frac{k'(s)^2}{k(s)^4\tau(s)^2}=r^2$$ $\textbf{My attempt:}$ If the trace of $\alpha$ lies in a sphere of radius $r>0$, then $\|\alpha\|^2=r^2$ Differentiating this expression three times, we have: $$\langle \alpha,T \rangle=0$$ $$1+k\langle \alpha, N \rangle=0$$ and $$k'\langle \alpha, N\rangle -k\tau \langle \alpha, B \rangle=0$$ therefore: $r^2=\|\alpha\|^2=\langle \alpha , T \rangle^2+\langle \alpha, N \rangle^2+ \langle \alpha, B\rangle^2=(\frac{1}{k})^2+(\frac{k'}{\tau k^2})^2$. Here I assumed the following equality $\|\alpha\|^2=\langle \alpha , T \rangle^2+\langle \alpha, N \rangle^2+ \langle \alpha, B\rangle^2$ but in reality I don't know how to justify it, can you tell me how to justify this equality? conversely this turns out $\textbf{imagge attached}$

Let $\alpha (t)$ be a curve such that $|\alpha'(t)|=1$ for all $t\in\mathbb R$. Assume $k(t)\neq 0$, $k'(t)\neq 0$ (whereas $k=|\alpha''(t)|$ is the curvature) and $\tau(s)\neq 0$, whereas $\tau$ is the torsion.  Prove: The trace of $\alpha$ lies on a sphere $\Leftrightarrow$ $\frac{1}{k^2} +\frac{1}{(k'\cdot\tau)^2}=$const.$>0$.  I know this somehow works by using the Frenet-Serret-equations, but I don't really know how to do this proof. Can anyone help me out? Thanks!


As in the title, I was wondering whether the entropy of a system (it can be any entropy, from Boltzmann to Renyi etc, it is of no importance) is a function or a functional and why? Since it is mostly defined as: $$S(p)=\sum_{i}g(p_i) $$ for some $g$ that has to be continous etc then it has to be a functional. But then I see that $S_{BG}$ for example, which is defined as $S_{BG}=\sum_i p_i \log p_i$ just needs the value of each $p_i$ in order to be defined, right?  The way I see it, it has to be a functional but it is not clear to me why. Also many authors mention the entropy as a function while others call it a functional.   Thank you!

I have come across the term 'functional'. How is a 'functional' different from a 'function'? The exact term I came across was 'statistical functional.'  In terms of the background, can you please focus on the first few lines followed by the four examples in  ?  The definition is seeming to be quite generalized given the examples. Is there a crux of the definition that is not too general nor too restricted?


A:I was the 1st one in queue/I was the second player B:How many? Is what B said correct? Or what is the question for ordinal numbers? The question from B is not asking how many people in the queue was, it's asking the number A was in the queue. In my native language we have a "how" question for that but I was struggling to ask the same in English so I apologize perhaps my question doesn't make sense but I would really appreciate your help.. Would it be okay to ask :"what number? which number were you? or something like that  sorry for bad English and thank you in advance

I want to make a question having an answer as follows:     5 is the third prime number.   The bold part is the answer. How to phrase the question?


How to import data from Access .accdb file to SQL Server? What should I choose in SQL Server Import and Export Wizard?     Suppose we choose OLE DB Provider for SQL Server Integration Services, then if that is a correct direction, what should be choose next from the following window? What to type in fields Data Source and Location, which mean more or less the same?    I followed instructions described here:  I have installed Microsoft Access Database Engine 2010 Redistributable  However I was hopeless in seeing Microsoft Office 12.0 Access Database Engine OLEDB  Update  If I choose Data Source as Microsoft Access (Microsoft Access Database Engine) I end up getting error message the one shown on picture below. Moreover I think that this data source is tailored for files mdb, not accdb.

I have a .accfb file from an access 2016 database and am trying to import this database into a SQL Server 2016 developer edition instance.   While I found posts online discussing using import/export data tools in SQL Server and also migration assistant for access, neither have worked out for me.   Does anyone know how to easily move a database from access 2016 to sql server 2016? More specifically an "accdb" file type?  All suggestions are greatly appreciated!


Is $f(x)=\dfrac{x^3}{x}$ really the same as $x^2$? At $x=0$, $f(x)=\dfrac{x^3}x$ is undefined.  So then why can't I just say $f(x) = \dfrac{x^3}{x} = x^2$ therefore $f(x)=\dfrac{x^3}{x} $  at $x=0$ is $0$ and not undefined!

Suppose I have a function defined as $$F(x)= \frac{x^3-4x^2+4x}{x^2-4}$$  Now I want to find the value of $F(2)$. I can do it in 2 ways:   Put $x=2$ and solve the function. It will give:  $$F(2)=\frac{0}{0}$$ which is not defined. Solve $F(x)$ first and then put $x=2$.   $$F(x)= \frac{x(x-2)^2}{(x-2)(x+2)}=\frac{x(x-2)}{x+2}$$  It will give $${F(2)=\frac{0}{4}}$$ which is zero.   How can zero equal not defined?


I can see the quest marker that there is something to pick up. But I can't see anything and can't pick up anything. I killed Sigdis Gauldurson at several places. First I thought the amulet piece was in the water/mud and that I couldn't see it. Then I reloaded from my last save point and killed Sigdis upstairs, so could see the fragment. But I read in previous post that it is a bug. Is it possible to fix this on a PS3?

I am having trouble retrieving the Gauldur amulet fragment from Geirmund's Hall after clearing it before I was aware of this quest. Now when I return the quest indicator points on the floor in boss' room, specifically on a patch of submerged dirt. The water is quite shallow and I am quite sure that there is nothing to pick up there.  To me it seems the quest has bugged as I killed the boss before embarking on this quest, or killed him while unaware of the quest and not picking the fragment up. How can I get around this? Is there a console command which can help me?


has aired with a new statistic, "People reached". This stat may have research value, but it's not provided in the data dumps.  This would be useful, for example, where:  Anyone out there willing to do some SO data analytic magic for me? I'm interested in looking for the trend of people reached as a function of rep —  by    Please add it as a record!

I know the new profile design hasn't been updated for  on the network yet, so maybe this is a bit too early. Nonetheless, please include the "People Reached" data in  at your earliest convenience. Also, I was just made aware that users helpful flag counts are now publicly displayed on their  towards the top-right, underneath the people reached stat. So please include this data in SEDE as well.


Specifically, I've proven that for a sequence $x_n$, the subsequences $x_{2n}$ and $x_{2n-1}$ converge to L. Is that sufficient to say that $x_n$ converges to L?

Suppose $\{a_n\}$ is a sequence such that the subsequences $\{a_{2n−1}\}$ and $\{a_{2n}\}$ converge to the same limit, say $a$. Show that $\{a_n\}$ also converges to $a$.


My nginx config looks like this: server {     listen 80 default_server;     index index.html; }  Must I add listen [::]:80 default_server; or is it not mandatory? So the config will end up looking like this: server {     listen 80 default_server;     listen [::]:80 default_server;      index index.html; }  I found that it is for IPv6 configs, but I am not sure, I understand what does that mean in this context/config file. Could you elaborate more? Sorry, for noob question.

My web server (Ubuntu, Nginx) have both IPv4 and IPv6 addresses assigned by the host. For my website, shall I bind it to only an IPv6 address? Is it the standard recommended way? Or, shall I use both IPv4 and IPv6 addresses?


I'm trying to get into Object-Oriented Programming for Python, but I definitely don't have the Programming literacy to understand any guides out there. I would be grateful if anyone could help me understand how to use and clarify the differences between "normal functions", "@class method", and "@static method" in a way that a beginner like me could understand.   A guide that I had no clue how to use, .

What is the difference between a function decorated with  and one decorated with ?


Yestoday e.force:navigateToComponent is accessble but today  salesforce lightning event e.force:navigateToComponent is disabled ? why?

I am trying to build navigation from one component to another in a Lightning application. Following this answer  got me working with one exception, the new page doesn't seem to be in the Salesforce1 navigation context, there is no back arrow when the second component is loaded.   Am I missing something simple? Sure feels like I am.


I am an extreme neophyte with QGIS, so I maybe doing this all wrong. I have loaded the OpenLayers plugin as described in several online posts (and youtube video), and it is shown as listed in my plugins as installed (with the X mark). But, as shown in the youtube video, the plugin is not listed under the Plugins menu item, nor are any tools shown.  I am using QGIS Chugiak v2.4.0 on a 64-bit Windows machine.

Although I have installed the OpenLayers plugin in QGIS 2.4, I cannot see it in the list when I click on Plugins.    Does anyone else have this issue?


I have this piece of code, can it ever evaluate to true? struct type {     char a;     int b;     char c;     float d; } t;  char e; int f; char g; float h;  int out = sizeof(t) == sizeof(e) + sizeof(t) + sizeof(g) + sizeof(h); print("%d", out);

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Sometimes there is no doubt, but sometimes it can be a very hard decision. Let me show you a couple of examples:  Inheritance:  public class Employee{     public void goToWork(){         //...     } } public class Lawyer extends Employee{     //private Employee body;     /*public void goToWork(){         body.goToWork(); // Does that make any sense?     }*/ }   Delegation:  public class Lights{     public void turnOn(){         //...     } } public class Car{ //public class Car extends Lights? Nice car then...     private Lights light;     public void turnOnLights(){         light.turnOn();     } }   Which one?  public class Field{ public void grow(Seeds s){         //...     } } public class Plantation{ //extends Field{ makes sense too     private Field field;     private Worker[] workers;     private Vehicle[] tractors;      public void grow(Seeds s){         //...         field.grow(s);     } }   So, are there any tips that can help to choose between inheritance and delegation when both are acceptable and each one has their own advantages and disadvantages? Is the choice random and totally based on programmer's mood?

Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition?


Kindly help me up with this proof. I have been to this statement with the many of books which prove using summation of power series method. I have been through many books they all pose this as the proposition but no proof is being discussed.

I'm not sure how to go about this proof. I just need help getting started. Is there a way to prove it algebraically?


I'm learning about such things as ionic and covalent bonds, and the reason given for the ionic bonds is electrostatic attraction. However, if that were true, then the two ions would accelerate toward each other and shortly collide with each other. There must be a force opposite the electrostatic force that is repelling the ions, with exactly the same magnitude so as to cancel out the electrostatic force. (Edit: I'm actually referring to the ionic bond between cations and anions in this first paragraph, like sodium and chloride ions. Below is what I found by researching this topic, dealing mainly with covalent/molecular bonding.)  The following quote is from The Mechanical Universe:     For example, the potential energy of a pair of Hydrogen atoms has a   position of stable equilibrium. The potential energies of interaction   between atoms are due to the electrical forces between them, causing   attraction when they're far apart. At smaller distances, they resist   being squeezed together. The result is an equilibrium position where   attraction and repulsion are in perfect balance. At that position,   they bind in a Hydrogen molecule.   I understand that on a larger (planetary) scale, there is a centrifugal potential that is inversely proportional to the distance $r$ that adds up with the gravitational potential to create this graph:    I'm looking for an analogue to this on the molecular scale. I've recently found out about the , which gives this equation and curve:$$V_{LJ}=\epsilon \left[ \left(\frac{r_m}{r}\right)^{12} - 2\left(\frac{r_m}{r}\right)^6 \right]$$    In the wikipedia article, it says     ...the repulsive term describes Pauli repulsion at short ranges due to overlapping electron orbitals    Later on it is noted that     The repulsive term has no theoretical justification.   So then this is my question: What is the nature of the "Pauli repulsive force"?  If it's possible, I would appreciate an answer with cited sources.   Edit: After some more research, I've found that attraction between two hydrogen atoms (which are both neutral) comes from . Collectively, the attraction and repulsive forces at the molecular scale are dubbed the . The wiki on Van der Waals forces mentions A repulsive component resulting from the Pauli exclusion principle that prevents the collapse of molecules. I would like to learn more about how the Pauli exclusion principle manifests itself as a repulsive force between any two atoms/ions.

There is this famous example about the order difference between gravitational force and EM force. All the gravitational force of Earth is just countered by the electromagnetic force between the electrons on the surface of my feet and the ground.  But also wave-function of electrons(fermions) do not overlap each other due to Pauli exclusion principle.  So which one is the true reason of me not flopping inside the earth forever? Is it only one of them(my guess is Pauli exclusion) or is it both?


i've written chmod 755 /etc/ and chmod 0644 /etc/ and now i find myself without access to anything,and inside the terminal where before there was username@system1: now there's I have no name!@system1: . I know i messed everything up,but there's a solution? a way to restore the default configuration? I Cannot reinstall,so i've to repair..

I was trying to run chmod -R 777 ./ but ended up typing chmod -R 777 / and set 777 on my entire machine. What can go wrong? How can I fix it?


I'm watching a Youtube tutorial, but when I put the mesh of a monkey and put a quick smoke and play it, for 40-50 frame it moves, but past frame 50 it just freezes. When I change the smoke to fire it didn't change. Please help me resolve this.

How can I maintain the flames on the pieces of an object after an explosion?   Here's a .


I guess, the tooltip should appear near the cursor.  Spec: Win7 (64-bit), Firefox 65.0.1 (64-bit).

The tooltips in the Posts graph on the  are misplaced. Sometimes, they appear to be part of the next graph (see below) - the arrow indicates the point I was hovering over.  This could be caused by the new responsive design; when I originally reported the bug, I checked two other sites (Ask Different and Chess) which didn't have the new design back then, and there the tooltips appeared reasonably close to the data point (the bottom right one in ).


I'm working on a project to find the association rule of items for Market dataset. I have a huge database that contains multi-tables. The output I got from this query   select sales_fact_1997.customer_id, sales_fact_1997.product_id,      product.product_name from sales_fact_1997 , product where sales_fact_1997.product_id = product.product_id group by sales_fact_1997.customer_id , sales_fact_1997.product_id order by sales_fact_1997.customer_id, product.product_name;   is like that:  customer_id     product_id      product_name 13               1466           Hot Dogs 13               937            American Cole Slaw  13               10             Akron City Map ...   Is there a way to get the output in this format:   customer_id     product_id      product_name 13              1466,937,10     Hot Dogs, American Cole Slaw, Akron City Map

I am looking to return a list of users from a database. There are hundreds of users in the db. Each user has it's own unique user_id. All of the values that I am trying to return reside in the same column (meta_value).   The database structure is as follows:  id | user_id | meta_key | meta_value   sample data is as follows:   1 | 3434 | first_name | Brandon 2 | 3434 | last_name  | Johnson 3 | 3434 | street_add | 123 main 4 | 3434 | city       | ocean beach 5 | 3434 | state      | Texas   I am trying to return the first name, last name, street_add, city, and state in one sql statement.  I'd like the output to look like:  Brandon, Johnson, 123 Main, Ocean Beach, Texas


what is there a way to turn the page by 90 degrees?  I know there is a package called lscape, but that only rotates the content of the page, instead of the entire paper.  Basically, I imagine it like this.    So, I want to rotate the entire a4 paper by 90 degrees.

How can I change some pages into document into landscape mode, while leaving the others in portrait mode (or vice versa)?


I can't seem to find which one of these two wordings is correct:     In 2014, the best two submitted runs were from unsupervised systems.      In 2014, the two best submitted runs were from unsupervised systems.   Context: In 2014, multiple runs have been submitted. The first and second rank were unsupervised systems. Is there any difference in both variants? I'm currently using the first one but I'm struggling ;)

I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in?


Suppose I have list [['a', 'b', 'c'], ['d', 'e'], ['1', '2']]  I want to generate list where on the first place is any value from first sublist, on the second - from second etc.  So, a couple of examples:  ['a', 'd', '1'] ['b', 'd', '1'] ['c', 'd', '1'] ['a', 'e', '1'] ['a', 'e', '2'] ['b', 'e', '1'] ['b', 'e', '2']   etc.

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I'm on a Linux Ubuntu 18.04.1 LTS System.  As the title states I was unable to find any precise documentation how to build blender as Python Module for uses in scripts.  If anyone can help me I'd really appreciate it.  Thanks in advance.

I have seen this question now many times and every question here and on other forum points to  experimental tutorial by . Now sadly a lot of answers are invalid right now because this central link is down. I couldn't find anything by Googling so if anybody has a fork of the tutorial or a second source that would be great? The link can't be gone for too long, I saw an answer with it 4 months ago.  The only other thing I have found is , but it also references the now missing tutorial. Any ideas how to find it?


We extracted the start and end points in the link layer.   Can I buffer at the start and end points? (Size 0.001)  layer = iface.activeLayer()  for f in layer.getFeatures():    geom = f.geometry().asPolyline()    start_point = QgsPoint(geom[0])    end_point = QgsPoint(geom[-1])

I'm looking for some examples to do simple python scripts in QGIS. How would I do a buffer analysis on a dataset? I can't seem to find much in the manual and QGIS python that quite matches the ESRI documentation.


Is there an example of a commutative ring $ A $ with unit $ 1_A $ and an $A$-module map : $ f : A^{n+1} \to A^n $ such that $f$ is injective ?  If the answer is yes, when is this enunciation false ?  Thanks in advance for your help.

I'm trying to prove that if $A\neq 0$ is a commutative ring and there is an injective $A$-module homomorphism $A^m\hookrightarrow A^n$ then $m\leq n$ must necessarily hold.    This is exercise 2.11 from Atiyah and MacDonald's Introduction to Commutative Algebra, but unfortunately all the solutions available online are either very sparse with regard to this question or seem to use (to my surprise) a generalized version of Cramer's rule. Is there perhaps some other "cleaner" approach to solving this problem?


I'm on macOS Big Sur (11.2.3).  I would like to upgrade my Xcode to the latest version and have this disk space available $ df -h / Filesystem      Size  Used Avail Use% Mounted on /dev/disk1s5s1  234G   15G   30G  33% /  However when I go into the app store and attempt to upgrade, I get this message ...  Is this message a false flag?  Do I really need more then 30 GB to upgrade Xcode?

I am trying to update Xcode to 8.0. My OS is 10.11.6 El Capitan. However I am getting:     We could not complete your update   There is not enough disk space available to install the product.   I have got 14.22 GB free space. How much do I need?  UPDATE: I do not know the exact figure, though I did manage to update with 17.21 GB free space later on.


Is there a way to create something that looks like this?

I feel intimidated in learning TikZ. I was wondering if there are some nice materials (or just your replies) at different level:   for providing big picture, which is important to beginners to not lose direction during learning. for comprehensive reference.   Examples are important, but only examples are not always clear for understanding the big picture and organization.


Need to understand the benefit of using automatic properties apart from less line of codes?  Intially we used as below :  private int sample;  public int Sample { get {return sample};   set {this.sample=value}; }   Now we just get n set it directly.Why we used to define a private variable?

I realize that it seems to be a duplicate of  but my question has a slight difference (from my point of view):  Once I know that   I will not use my class with "techniques that only works on properties" and  I will not use validation code in the getter/setter.   Is there any difference (except the style/future development ones), like some type of control in setting the property?  Is there any additional difference between:  public string MyString { get; set; }   and   public string myString;   (I am aware that, that the first version requires C# 3.0 or above and that the compiler does create the private fields.)


I am relatively new to python and have recently learned about recursion. When tasked to find the factorial of a number, I used this:  def factorial(n):     product = 1     for z in xrange(1,n+1):         product *= z     return product  if __name__ == "__main__":     n = int(raw_input().strip())     result = factorial(n)     print result   Then, because the task was to use recursion, I created a solution that used recursion:  def factorial(n):     if n == 1:         current = 1     else:         current = n*(factorial(n-1))       return current  if __name__ == "__main__":     n = int(raw_input().strip())     result = factorial(n)     print result   Both seem to produce the same result. My question is why would I ever use recursion, if I could use a for loop instead? Are there situations where I cannot just create for loops instead of using recursion?

Is there a performance hit if we use a loop instead of recursion or vice versa in algorithms where both can serve the same purpose? Eg: Check if the given string is a palindrome. I have seen many programmers using recursion as a means to show off when a simple iteration algorithm can fit the bill. Does the compiler play a vital role in deciding what to use?


I need to copy 150 file from a directory containing 900 files. I have the name of all 150 files in a text file, list.txt. How can I do this in Linux?

I have a text file abc.txt and its contents are:     /lag/cnn/org/one.txt    /lag/cnn/org/two.txt    /lag/cnn/org/three.txt   If I use:  $ tar -cvf allfiles.tar -T abc.txt   I'm getting the tar of files in the list. Similarly is it possible to copy those files in abc.txt to a folder?  I tried this:              $ cp --files-from test1.txt ./Folder   But it is not working.


Let's say you have 10 groups of members. Each group can have an arbitrary number of members, but let's keep it clean (unless it matters?) and say each has 10,000 members. Between the combined memberships of any given two groups, there's a 10% overlap (meaning, 10% of the members will belong to both groups). Since we're assuming a membership of 10,000 per group, that means the distinct membership would be 18,000 between two groups.  Problem: What is the distinct total count of members, in aggregate across all 10 groups? And how/why?  This seems like it should be easy, but I can't figure it out for the life of me. Thank you!

Assume we have 3 random variables $X_1,X_2,X_3$, and we know the pairwise marginal distribution $P(X_1,X_2), P(X_2,X_3), P(X_3,X_1)$, but we don't know anything else (such as conditional independence). Can we get the joint   distribution $P(X_1,X_2,X_3)$?


Integrate :- $\displaystyle\int\dfrac{2x^2}{2x\cos(2x)+(x^2-1)\sin(2x)}$   I tried dividing by $\cos^2(x)$ and then substituting $\tan(x)=t$.

Integrate  $\displaystyle\int\dfrac{2x^2}{2x\cos(2x)+(x^2-1)\sin(2x)} \mathrm d x$   I tried dividing by $\cos^2(x)$ and then substituting $\tan(x)=t$.


Can anyone tell why in all plugins, the index.php is empty? What's the point of it, i can't understand, as it doesn't add any security at all to website, and makes the plugin structure "1-file" more.  p.s. Themes do have index.php,

WordPress itself, in the wp-content folder, includes an empty PHP file which looks like this.  <?php // Silence is golden. ?>   Should plugins include an empty file like this as well to stop folks view viewing the contents of a directory?  What about additional folders in themes -- like an includes directory?


I am a computing teacher and just helping out some students with a math question. They have been asked to calculate the following:  $$\sum_{n=0}^{\infty} 0.6^n$$  I am intrigued as to how one gets to the answer - i.e. the logic and process behind it if possible.

We know that the formula for computing a geometric series is:$$\sum_{i=1}^{\infty}{a_0r^{i-1}} = \frac{a_0}{1-r}$$ Out of curiosity, I would like ask: Is there any ways the formula can be derived other than the following two ways?  Method 1 (The way I found on my own): $$\sum_{i=1}^{\infty}{a_0r^{i-1}} \equiv S$$ $$S = a_0r^0+a_0r^1+a_0r^2+\cdots$$ $$S = r\left(a_0r^{-1} + a_0r^{0} + a_0r^1+\cdots\right)$$ $$S = r\left(a_0r^{-1} + S\right)$$ $$S = a_0 + rS$$ $$(1-r)S = a_0$$ $$S = \frac{a_0}{(1-r)}$$ Note that for this to work, you must first confirm this: $$\lim_{n\to\infty} a_n = 0$$ Method 2 (The way I found on the web): $$\sum_{i=1}^{n}{a_0r^{i-1}} \equiv S_n$$ $$S_n = a_0r^0+a_0r^1+a_0r^2+\cdots + a_0 r^{n-2} + a_0 r^{n-1}$$ $$rS_n = r\left(a_0r^0+a_0r^1+a_0r^2+\cdots + a_0 r^{n-2} + a_0 r^{n-1}\right)$$ $$rS_n = a_0r^1 + a_0r^2 + a_0r^3 + \cdots + a_0 r^{n-1} + a_0 r^{n}$$ $$S_n-rS_n = a_0r^0 - a_0r^n$$ $$(1-r)S_n = a_0 - a_0 r^n$$ $$S_n = \frac{a_0(1 - r^n)}{1-r}$$ Given:$$\left|r\right| < 1,$$ $$\lim_{n\to \infty} S_n = \lim_{n\to \infty}\frac{a_0(1 - r^n)}{1-r} = \frac{a_0}{1-r}$$ I personally prefer Method 1 because it is faster and more intuitive, as we don't have to multiply by $r$.  Method 1 for formula of partial sums: $$\sum_{i=1}^{n}{a_0r^{i-1}} \equiv S_n$$ $$S_n = a_0r^0+a_0r^1+a_0r^2+\cdots+a_0r^{n-2}+a_0r^{n-1}$$ $$S_n = r\left(a_0r^{-1} + a_0r^{0} + a_0r^1+\cdots+a_0r^{n-3}+a_0r^{n-2}\right)$$ $$S_n = r\left(a_0r^{-1} + S_n - a_0r^{n-1}\right)$$ $$S_n = a_0 + rS_n - a_0r^{n}$$ $$(1-r)S_n = a_0 - a_0r^n$$ $$S_n = \frac{a_0(1 - r^n)}{(1-r)}$$


I'm trying to prove that a finite group A is cyclic if and only if $\forall n\in\mathbb{N}$ , there are at most n elements in A with $a^n=1$.  Heres what I've come up with so far:  Suppose that A is cyclic. We know that $H=\{a\in A \mid a^n =1\}$ is a cyclic subgroup of A, thus is generated by an element of order n or less. Therefore H has n or fewer elements.  Now for the converse, what I feel inclined do is assume that A is not cyclic and then get that there must be more than n elements with $a^n=1$.   Any thoughts on how I might finish this one off are appreciated.

Fraleigh(7th ed) Sec10, Ex47. Let $G$ be a finite group. Show that if for each positive integer $m$ the number of solutions $x$ of the equation $x^m=e$ in $G$ is at most $m$, then $G$ is cyclic.   I tried it a few hours but I couldn't solve it. So I read the solution. But I narrowly understood the solution, and it's still unclear to me. How can I solve it?


I have accidentally typed git reset --hard origin/<branch> (to be precisely, I mixed up some of my aliases). The problem is I haven't pushed my commits and they are now lost. Can I get them somehow back?

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


As we can see  inflection is very important in spell-casting.  Can lisping wizard cast a spell (without harm to himself)? Can someone with another pronunciation problem?  Can we find this type of wizard in books?

You need to say the words to cast a spell. How would a deaf or mute wizard/witch do that?


I have an in input required. As I am using input type="submit" it is working fine but I am using input type button. When I used input type button the input requirement doesn't work. Please help When I used the code below with type submit the required is working <script> function validateForm() {   var x = document.forms["myForm"]["fname"].value;   if (x == "") {     alert("Name must be filled out");     return false;   } } </script>  <form name="add_name" id="add_name">   Name: <input type="text" name="fname" required>   <input type="submit" value="Submit"> </form>  But my form is as below. I am using input type button and the requirement is not working. How to solve it please. <form name="add_name" id="add_name"> Name: <input type="text" name="fname" required> <input type="button" value="Submit"> </form>

What is the difference between HTML <input type='button' /> and <input type='submit' />?


Currently I've been running an EOS M100 with the stock 15-45 mm, f3.5-6.3 lens.  I've recently acquired a sigma 17-50, f2.8 lens and adapter to fit the lens to the mirrorless M100.     How worthwhile would you folks view it pick up a new body. How much would I be looking to spend to find comparable to better image quality, better low-light photos, and quicker focusing (or is that going to be a primary function of the lens). I recognize the lens is not an ideal low light lens also.   My focus right now is currently live music events so my thinking was this would serve those purposes.   Please share your thoughts, I know very little about photography on a professional level but I'm passionate and pursuing it aggressively. Thanks for your input, I really appreciate it.

I've been starting to shoot some live music recently and have been doing an okay job and see an improvement with each time I shoot. However recently I was shooting and all of my photos have come out very dark, too dark to use really. I was shooting in manual with 1/100 shutter speed aperture as wide as possible and a 6400 iso. Any advice is welcome. Thanks in advance.


I have been trying to setup a dual boot on my laptop, I can't seem to get much past the install.  In order to start the install I need to pass nomodeset i915_bpo.nomodset=1 in grub. After the install 9 out of the last 10 tries (yes I have reinstalled 10 times, minimum) it will hang during boot. The 1 time it booted, I tried to follow a guide made installing Ubuntu on this specific model and essentially after setting up the Nvidia drivers it decides to take a dump again and I can't even get it to boot.  Can anyone give a last minute suggestion before I give this one last shot?  I would prefer Ubuntu GNOME, but I guess anything that will let me get a fully operational system would be great. I have been trying with 16.04 and 16.10, if there is another version I can try for the initial install then I will give it a roll.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have tried to use an ArrayList within my class, but I get Nullpointerexception and I really dont know why, here is my class:  ......      RawVector vector2;      **ArrayList<Long> vectorTime;**         public RawVector CreatingArray(){          try {                   ArrayList<Float> x = new ArrayList<Float>();                 ArrayList<Float> y = new ArrayList<Float>();                 ArrayList<Float> z = new ArrayList<Float>();                 **ArrayList<Long> tm = new ArrayList<Long>();**                 File n = new File("file.csv");                  FileReader fileReader = new FileReader(n);                  BufferedReader reader = new BufferedReader(fileReader);                  for(String zeile = reader.readLine(); zeile != null; zeile = reader.readLine()){                     StringTokenizer data = new StringTokenizer(zeile, " ,");                      **tm.add(Long.parseLong(data.nextToken()));**                     x.add(Float.parseFloat(data.nextToken()));                     y.add(Float.parseFloat(data.nextToken()));                     z.add(Float.parseFloat(data.nextToken()));                     size++;                    }                  vector2 = new RawVector();                 vector2.setX(x);                 vector2.setY(y);                 vector2.setZ(z);                 vector2.setSize(size);                 vector2.setTime(tm);                 reader.close();                 **this.vectorTime = tm;**                               }catch (IOException e) {                  e.printStackTrace();             }          return vector2;     }           public ArrayList<Long> zeitstempel(){          return this.vectorTime;     }   public long getWsize(){          long wsize;         ArrayList<Long> timestamp;         **timestamp = vectorTime;**          **long SumSamp1 = timestamp.get(0);**         long SumSamp2 = timestamp.get(vectorTime.size());         long timespan = SumSamp2 -= SumSamp1;          long timespanInSec = TimeUnit.MILLISECONDS.toSeconds(timespan);           wsize = Zeitfenster*vectorTime.size()/timespanInSec;          return wsize;       }     .....   I have created an ArrayList<Long> tm in the method CreatingArray() and assigned it to the instance variable vectorTime by this.vectorTime = tm. Next, I have used this instance variable in the method getWize() and assigned to ArrayList<Long> timestamp but as soon as I compile this code  you will get an NullPointerException in the code line long SumSamp1 = timestamp.get(0).  What's the problem??? I was pretty sure that the instance variable vectorTime is initialized by this.vectorTime = tm. But according to the exception it doesn't and I don't know why?!  Probably I confuse assginment and initialization...  Im new to Java therefore I think this kind of mistakes are typically for beginners like me. Nevertheless I hope that any of you can help and can give me some useful tips to fix that problem.  Thanks in advance for any help!!!  Best Regards!

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?


I have 2 dates in mysql:   2018-07-13 13:00:00 - data 2018-07-14 16:01:00 - godzina  $timestamp1 = strtotime($data['data']);
 $timestamp2 = strtotime($data['godzina']);
 $time_difference = $timestamp2 - $timestamp1;  $time_total = ($time_difference/3600);  echo "td".$time_total."/td";   Now it returns: 27.016666666667  How to change it to: 27:01 in table?

How to calculate minute difference between two date-times in PHP?


I have a polygon layer in a PostGIS database and connected it with GeoServer. When I publish the layer using a WFS service, the polygons are deformed, vertices are lost. Where can I change GeoServer settings so that the layer is published complete?  In the image, the blue outline layer is the layer that is generated with the WFS service and the green layer is the original layer. What GeoServer settings should I change for the WFS service layer to be published as the original layer?

I am using Leaflet to access polygon layers through Geoserver WMS. When I zoom out the smallest polygons will disappear and not draw. They would essentially be a dot if they did draw. Is there a way for the dot to be drawn? This makes it confusing to the user as it can be their impression that there are no polygons in certain areas unless they zoom in.  Alternately, is there a way to display things say in larger hexagons with aggregated data when zoomed out and then to have it seamlessly change to the smaller polygons as soon as someone zooms in?


While trying to install latest Windows update on I am getting this message with an error code "There were problems downloading some updates, but we'll try again later. If you keep seeing this, ty searching the web or contacting for support help. This error code might help: (0x8024a105)"

I have been trying to update my pc from 20h1 to 20h2 but the windows update shows error message 80007002 and when I manually install the update using windows 10 update assistant it downloads completely and then even starts install and gets stuck at 87 percent on the screen where it says do not turn off. What to do? This is the log file. Matching Profile found: FindRollbackFailure - 3A43C9B5-05B3-4F7C-A955-88F991BB5A48 SetupDiag version: 1.6.0.0 System Information:     Machine Name =      Manufacturer =      Model =      HostOSArchitecture = 1033     FirmwareType = UEFI     BiosReleaseDate = 20160513000000.000000+000     BiosVendor = A12     BiosVersion = A12     HostOSVersion = 10.0.19041     HostOSBuildString = 19041.1.amd64fre.vb_release.191206-1406     TargetOSBuildString = 10.0.19041.621 (vb_release_svc_prod1.201014-1758)     HostOSLanguageId =      HostOSEdition = CoreSingleLanguage     RegisteredAV = Quick Heal Internet Security     FilterDrivers = FileInfo     UpgradeStartTime = 12/20/2020 2:54:38 PM     UpgradeEndTime = 12/20/2020 5:30:40 PM     UpgradeElapsedTime = 02:36:02     CV = Pi3IdU3SlEqpFx93     ReportId =    Error: SetupDiag reports rollback failure found. Last Phase = Pre OOBE Boot Last Operation = OOBE boot apply Error = 0xC1900101-0x4000D LogEntry:   Refer to "https://docs.microsoft.com/en-us/windows/desktop/Debug/system-error-codes" for error information.  Last Setup Phase: Phase Name: Pre OOBE Boot     Phase Started: 12/20/2020 4:37:50 PM     Phase Ended: 1/1/0001 12:00:00 AM     Phase Time Delta: 00:00:00     Completed Successfully? False   Last Setup Operation: Operation Name: OOBE boot apply     Operation Started: 12/20/2020 4:37:50 PM     Operation Ended: 1/1/0001 12:00:00 AM     Operation Time Delta: 0:00:00:00.0000000     Completed Successfully? False


If $n ∈ N$ and $n \ge 4$ , how do I prove by the method of induction that $n! > n^2$?

So lets say I have $$ n^{2} \le n! $$  For what positive integers is this not true? $n=2$ and $ 3$  Base case? $$n=4 \implies  16 \le 24 $$  What is the inductive hypothesis and how do I show the inductive proof? Thanks