I would like to know how to create a 3D presentational mockup template that utilizes smart objects to change dynamically for example logo design. I would like to know also tricks on how to add shadows that dynamically adjust to the content of the smart object.   Example:  http://graphicriver.net/item/stationery-branding-mockup/9186667?WT.oss_phrase=&WT.oss_rank=2&WT.z_author=MassDream&WT.ac=search_thumb   I  can't find any tutorials on how to do such a things.

How do I create this type of effect with an image? I'm wondering how to get the thick edges and the tilted look. Is there an online tool that will convert a flat image to look like this?


I haven't come across a similar notation in any other programming language, i.e., I am used to seeing the subscript within the brackets (and not the other way round). I understand how given an array foo, foo essentially is a pointer to the base address of the array; and how pointer notations correlate to array notations, i.e. I get the rationale behind why foo[i], *(foo + i), *(i + foo) are all equivalent... But I don't understand the rationale behind how i[foo] is also equivalent to the three mentioned above, or how it works. Maybe rephrasing this notation in English will help, but I don't see how to do that.

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


In a conversation I struggled to identify a common expression that a person was actually oblivious to his surroundings or an event.

Is there an English word or idiom that describes a person who's blissfully unaware or oblivious to their surroundings? I always thought this word was "aloof," but "aloof" seems to hold a rather negative connotation, whereas the word I'm looking would almost connote a positive, like "living in a fairy tale" - or something along these lines. Is there a word for this, or is "oblivious" as close as we get?


I can appreciate that light can be quantised into photons, but I'm having a bit of difficulty understanding Planck's formula $$E=hf$$  Perhaps I am lacking intuition, but I don't really see why higher frequency must relate with higher energy. I can understand that higher amplitude would correlate with higher energy, but how can you explain why higher frequencies relate to higher energy?

Essentially this question boils down to "why does the energy of light depend on frequency?".    The analogy my textbook (pg. 272 principles of chemistry A molecular Approach 3rd edition by Nivaldo J. Tro) gave was that photons with higher frequency are like baseballs, whereas photons with lower frequency are like ping pong balls. Meaning that each photon has higher energy.  This StackExchange page () seems to say the opposite, that the energy of each photon is the same and what changes is the amount of photons per area.


I am new to python. This question might duplicate.  How to know the methods of lists. After search in google, its come to know there are more than 10 methods like append,insert , ,. is there any command/syntax to know the available methods. lists is for example.

I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it. I want to call the help function on each one. In Ruby I can do something like ClassName.methods to get a list of all the methods available on that class. Is there something similar in Python? eg. something like: from somemodule import foo print(foo.methods)  # or whatever is the correct method to call


I read this example from Rudin's book but I can't understand what did he show by this example. Can anyone answer what does he mean by following?

I stumbled upon this "relation" (is the name correct?):  $$ \lim_{m \to \infty} \lim_{n \to \infty} \cos^{2n}(m! \pi x) = \begin{cases} 1,&x\text{ is rational}\\ 0,&x\text{ is irrational}\end{cases} $$  How is it called and why is it so? I'm really not asking for a proof since I fear it would be too complicated for me to understand, but rather for an "intuition".


length = raw_input("what is the length of all you walls added together? ") height = raw_input("what is the height of your room? ") area = height*length paint = raw_input("what paint would you like to use luxury paint, Standard quality, Economy quality? ") if paint == "LP":     answer = 2*area      print answer if paint == "SQ":     answer = 1.25*area       print answer if paint == "EQ":     answer = 0.55*area       print answer   This is the code it keeps saying that "typeerror: can't multiply sequence by non-int of type 'str'" does anyone have any idea?  i have another problem i need to set an range of what answers i can have which is between 2 and 25 for length and 1 and 6 for height  while (length < 2) or (length > 25):     wrong = raw_input("invalid number please try again? ")  while (height < 1) or (height > 6):     wrong = raw_input("invalid number please try again? ") this doesn't work it just says invalid number for everything

I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount).  I run into this error. Anyone know what could be wrong or have any suggestions?   salesAmount = raw_input (["Insert sale amount here \n"]) ['Insert sale amount here \n']20.99 >>> salesTax = 0.08 >>> totalAmount = salesAmount * salesTax  Traceback (most recent call last):   File "<pyshell#57>", line 1, in <module>     totalAmount = salesAmount * salesTax TypeError: can't multiply sequence by non-int of type 'float'


Edit: I'm not sure this will help, but I'll try: I am asking "what's the whole idea with wheels?"; a list of wheel parts is not what I am after. /edit  I'm aware that SPSite - despite the confusing use of a singular noun - represents a site collection, whereas SPWeb represents a (SharePoint) web site.   In order to begin getting a grip on SharePoint I thought it prudent to understand what these two things are. The MSDN documentation got me to the above understanding and not an inch further.  Googling "spsite vs spweb" leads to posts on here with nice diagrams showing how the site collection contains a root web site that is itself a website collection (since it may have subsites) and this bit is very clear.  What is not at all clear is why the makers of SP would bother to do it this way. Since SPWeb is in fact both a web site and a collection of web sites, what need is there for the site collection concept? What is it for?  I realize that it may be difficult to know if your understanding of these concepts is objectively accurate - it is inherently imprecise. Still, I would much appreciate if someone could give me some feel for these core concepts either by explaining in their own words, or by pointing me to someone else's words.

I am fairly new to Sharepoint development (But learning it rapidly due to some initiatives I have in place - not exams).  Anyway, one of my biggest stumbling blocks is the naming convention for objects. That is, spweb, spsite, etc.  Is there an easy way to know which is for web apps, site collections, and subsites (Assuming that is how it works)?  Thanks


For the primes $5$ and $7$, $$2 \times 5^2=1+7^2$$ and for the primes $29$ and $41$, $$2 \times 29^2=1+41^2$$ Can you find more solutions with primes $p$ and $q$ such that, $$2 \times p^2=1+q^2$$ and so become famous with a sequence for OEIS?

Do pairs $(p,q)$ of natural numbers different from zero, i.e $p \in\Bbb N$, $q \in\Bbb N$, $p \ne 0$ and $q \ne 0$, have a special name, when they satisfy the following equation:     $$p^2 + 1 = 2 q^2$$   Is there a infinite number of them. if yes, is there a systematic way to generated them, like it is for example the case for pythagorean triples?


My browser will fill up with offers4u ads whenever I open any shopping website.  I have AdBlocker Plus, I've uninstalled all extensions, but still the ads are coming.  Can anyone solve my problem? This is really making me to not to do online shopping. Please help.

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.


My website has had 10 months ago, the statistics are very high.  Very high ...   But after 10 days of server failure, Marm was 20 times less.   I got lost for a long time without making a mistake, do ...  I am the source of links that they've hired a writer to pen the final results are seen.   But a strange thing:  Approximately every two months and was hit again 20 more times and then low again after 10 days!  my website url : www.sooran.com (food.sooran.com)

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


int main() {    switch(1,2)    {       case 1:printf("1");break;       case 2:printf("2");break;       default: printf("error");break;    } }   Is this valid in c?  I thought it shouldn't be , but when I compiled it , it shows no error and produces output 2.


I need help on my kali linux.  I tried to delete these files  1186047 -rw-r--r-- 1 root root 19717377 Sep  5 17:54  -01.cap 1186032 -rw-r--r-- 1 root root      576 Sep  5 17:54  -01.csv 1186040 -rw-r--r-- 1 root root      598 Sep  5 17:54  -01.kismet.csv 1186044 -rw-r--r-- 1 root root     3863 Sep  5 17:54  -01.kismet.netxml   from my desktop using the rm command but it refused. I also tried to change the permission using chmod and other command but refused.

Possible Duplicate:          Somehow I ended up with a file named "-r".  How do I remove it?  rm -r doesn't work.  I tried 'rm -i `ls -a`' to step through the file names, but it didn't prompt me to delete this one.  Edit A very hacky approach was to use python's os.unlink function.  That worked, but I'm curious to hear other ways.


I am a fresher in c#. I have developed an application that can convert a postscript file(.ps) to formats like PDF,JPEG, ets,. My intention is to develop a pdf printer. So how do I add this application as a printer in windows xp or above. Or say how do I get the PS file when CTRL+P is pressed on any windows application.  This is not a network printer, its a printer that needs to be assigned to a local print port and not a network port.

I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application.  It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanaged code.  Does anyone know of a fairly clean tutorial or example of how to do this?


$$ \lim_{n \to \infty} \left[  \log \left(1+\frac{1}{n^2} \right) + \log \left(1+\frac{2}{n^2} \right) +  \ldots + \log \left(1+\frac{n}{n^2} \right) \right] $$ How to solve the problem. May be using Cauchy’s theorem on limits or using Riemann sum. Any help would be appreciated. Thank you

I have to prove that      $$\Big[\log\Big(1+\frac 1{n^2}\Big)+ \log\Big(1+\frac 2{n^2}\Big)+...+ \log\Big(1+\frac n{n^2}\Big)\Big] \to \frac 12$$   I know that $$\log\Big(1+\frac 1{n^2}\Big)+ \log\Big(1+\frac 2{n^2}\Big)+...+ \log\Big(1+\frac n{n^2}\Big)= \\ =\log\Big(\frac {n^2+1}{n^2}\Big)+ \log\Big(\frac {n^2+2}{n^2}\Big)+...+ \log\Big(\frac {n^2+n}{n^2}\Big)=\\ =\log\Big(n^2+1\Big)+ \log\Big(n^2+2\Big)+...+ \log\Big(n^2+n\Big)-2n\log n$$  Doing some manipulation we get:           $$\lim_{n \to +\infty}\log\Big(\frac{(n^2+n)!}{n^2!n^{2n}}\Big)=\frac 12$$      How can I prove this limit?


Currently I use ufw and Firestarter, and I'm just learning how to use a firewall.  When I used windows there were a couple of firewalls that could block a process which tried to establish connection and show a dialog with the process name and buttons with preferred actions.  Is there deb package which can block connection and show which process tries to establish it, giving the user a choice what to do with the connection?  I really need it because I cannot figure out which process was blocked by Firestarter given that log entry:  Time            Port  Source        Destination    Protocol Service Feb 13 21:55:09 12350 192.168.1.100 193.120.x.x    TCP       Unknown

I would like to use a software to control which program may connect to the internet. I know that this behaviour is associated with the word "firewall", but some Linux users are very upset if somebody demands a Personal Firewall. I don't want to upset you by demand such a program. I don't want to "secure ports" or other stuff a Personal Firewall promises on Windows. I looked into iptables but it does not fit my requirements.  I saw an excellent answer here () but it's very uncomfortable to set this up.  Is there a software that asks for each program if it may access the internet?


I've had trouble finding easily accessible information on what exactly the ampersat does in TeX- it seems to be used frequently in the implementations of the commands I use, yet I've never had to use it. (Granted I've only used LaTeX) What does the ampersat do in TeX?

Many LaTeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?


<aura:iteration items="{!v.dataList}" var="item">
                                         <lightning:icon iconName="utility:check"                                  size="x-small"                                  alternativeText="Selected" />                  {! item[v.labelField]}
 </aura:iteration>

I am trying to dynamically create a data table with two arrays (SObject array and a String array which has field API name).  The two arrays are Contact[] and String[], where String[] consists of ["Id", "Name"].  What I've tried dot notation and square bracket notation but neither worked.  <!-- row --> <aura:iteration item="{!v.contacts} var="contact">     <!-- column -->     <aura:iteration item="{!v.fieldNames} var="fieldName">         {!contact.fieldName}          {!contact[fieldName]}     </aura:iteration> </aura:iteration>   Not quite sure what is the correct approach to do this.


This was a previously asked question that only had answers referring to Sylow's theorem, which is not something I can use here. Let $G$ be a group, $|G|=35.$ We know that $G$ must contain an element of order $5$ and an element of order $7$.  (1) Prove that $G$ must have a normal subgroup of order $5$ or of order $7$ or both.   (2) Deduce that $G$ is isomorphic to $C_{35}$.  (1) Attempt: It is shown earlier in the question that if $\Omega$ is the set of subgroups of $G$ isomorphic to a subgroup $H\leq G,$ and $G$ acts on $\Omega$ by conjugation, then $$\text{Stab}(H)=G \iff H\; \text{is a normal subgroup}.(*)$$ Assume for contradiction $G$ has no normal subgroups of order $5$ or $7$. Take $g_1,g_2$ as order $5$ and order $7$ respectively, then $\langle g_1\rangle$,$\langle g_2\rangle \leq G$ are not normal. Now by $(*)$ we can find an element in $G$ such that conjugating $\langle g_1\rangle$ by it gives a subgroup of $G$, isomorphic to but distinct from $\langle g_1\rangle$. By Lagrange's theorem then, and noting the intersection of subgroups is a subgroup, these two order $5$ subgroups must have trivial intersection Similarly we can find two order $7$ subgroups with trivial intersection. And it is clear too that all non-identity elements in all four of these subgroups, of which there are $20$, are distinct. This leaves $14$ non-identity elements outside of these subgroups, but I am stuck here. I think if $G$ has no order $35$ element then noting the only non-negative integer solution to $4p+6q=14$ is $p=2,q=1$ shows that we can distribute these elements into two new distinct order $5$ subgroups and one new order $7$ subgroup, but I can't see how this would help. I'm sure I can complete this as a counting argument but I'm not sure where to go.

If $|G| = pq$,  $p,q$ primes, $p \gt q, q \nmid p-1 $, then how do I prove $G$ is cyclic without using Sylow's theorems?


All of a sudden, in a particular scene I am working on, the edges of all the models have become partially transparent.  It is like what happens when you have a very small start clipping pane and are looking at a small model up close.  Except the clipping panes have not been changed, most of the objects in the scene are not very small, and I am not zoomed way in.  Here is a screenshot:   The crude barn thing pictured in the screenshot is about 30'x25'x26' and the zoom is pretty standard.  This behavior is also not dependent on the zoom, and again, I have not changed the clipping panes.  And I do have limit selection to visible checked, it does look similar to what it would if that was disabled, but that is not the problem.  What is this caused by and technically what is responsible for it?

I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did.  Here is an image of what I mean   The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows.  Also, occluded vertices partially show through the model. Occlusion doesn't work properly.   In orthogonal view small darkened triangles appear along the the edges.    I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks.


I am having a hard time to understand the meaning of measurements that involve a product of physical units, like $10\, \rm  N\cdot m$ ($10$ Newton-meters), $3.33\, \rm J\cdot s$ ($3.33$ Joules-second), and so on. When I have a quocient of physical units, everything is simple: $10\, \rm m/s$ (meters per second) means that in every one second, I travel a distance of $10$ meters. $25\, \rm N/m^2$ (Newtons per square meter) means that in every square with side equal to $1\, \rm m$ in a surface, I have a force of $25\, \rm N$. But what does the product $10\, \rm m\, s$ ($10$ meters-second), $25\, \rm N\, m$ (Newton-meters) mean? I just can't figure out the meaning of this even after many online searches.

This question isn't just about kilogram-meters, it's about multiplied units in general.  I have a good mental conception of divided units, e.g. meters per second or grams per cubic meter.  Meters per second just (usually) means how many meters are traversed by an object each second.  Simple.  But I don't really have a mental conception of what it means when units are multiplied, e.g. a kilogram-meter.  Can anyone explain in simple physical terms what a kilogram-meter is?


Hi I wrote that html codes and I want change selected item by using jQuery  <select id="slc">  <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select>   I tried this but I can't change  $("#slc").val("2");  $("#slc").prop("selectedIndex", 1);

I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.


The problem is that there is not enough space between the rules on top of each cell and its content.  The use of \arraystretch doesn't work in my example because I don't put my tabularx inside a tabular or table environment.  I am not sure if this is something about my use of \parbox or \mutlirow. That is why I keept it in my MWE here.  \documentclass{scrartcl} \usepackage{xltxtra} \usepackage{polyglossia} \setdefaultlanguage[spelling=new]{german}  \usepackage{multirow} \usepackage{tabularx} \usepackage{calc} \newlength{\mrwidth}  \begin{document} \newcommand{\mytext}{And then it happened… a door opened to a world…     rushing through the phone line like heroin through an addict's veins, an     electronic pulse is sent out, a refuge from the day-to-day incompetencies is     sought… a board is found.}  \setlength{\mrwidth}{0.2\textwidth-2\tabcolsep} \renewcommand\arraystretch{1.1}  % <-- doesn't work here  \begin{tabularx}{\textwidth}{|X|X|X|X|X|}     \hline     \multirow{2}*{\parbox{\mrwidth}{\mytext}}         &b&c&d&e\\\cline{2-5}     &\parbox{\mrwidth}{\mytext}         &c&d&e\\\hline \end{tabularx} \end{document}

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


We can find the determinant of a matrix A of size $n$ in terms of the traces of $A^m$, for $m=1,…,n$ ?  It's det of a matrix with term are traces, but i saw  but i can't remember   when $n=2$.

I have noticed that for the case of $1 \times 1$, $2 \times 2$ and $3 \times 3$ matrices $A$, $B$, I can write the determinant of their commutator $C=[A,B]$ in terms of traces:  $1 \times 1$  matrices $A$, $B$: $$\det(C)=\text{tr}(C)$$  $2 \times 2$ matrices $A$, $B$: $$\det(C)=-\frac{1}{2}\text{tr}(C^2)$$  $3 \times 3$  matrices $A$, $B$: $$\det(C)=\frac{1}{3}\text{tr}(C^3)$$  But I can't find a simple formula for $4 \times 4$  matrices--I have no idea how to generalize this general finite-dimensional matrices:  I can't quite understand the origin of this pattern for low-dimensional matrices.  So my question is can this be generalized to:   Larger $n\times n$ matrices, $n>3$? Anticommutators $C=\{A,B\} = AB+BA$?


Cantor's diagonal argument shows that there is no bijection between the real segment [0; 1] and natural numbers. Does that mean that we can't enumerate this set ? If we take an application f(n) from N to R that, for any number, reverse it and place it after the comma, like it: f(0) = 0.0 f(1) = 0.1 ... f(1234) = 0.4321 ...  We clearly see that the application enumerate any given finite real in [0; 1]. What's wrong ?

I was just thinking about this recently, and I thought of a possible bijection between the natural numbers and the real numbers.  First, take the numbers between zero and one, exclusive.  The following sequence of real numbers is suggested so that we have bijection.    0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.01, 0.02, ... , 0.09, 0.10, 0.11, ... , 0.99, 0.001, 0.002, ... , 0.999, 0.0001, etc.  Obviously, this includes repeats, but this set is countable.  Therefore, the set of all numbers between zero and one is a subset of the above countable set, and is thus countable.  Then we simply extend this to all real numbers and all the whole numbers themselves, and since the real numbers, as demonstrated above, between any two whole numbers is countable, the real numbers are the union of countably many countable sets, and thus the real numbers are countable.    Please help me with this.  I understand the diagonalization argument by Cantor, but I am curious specifically about this proof which I thought of and its strengths and flaws.  Thanks.


I want to know which you but it would be best for my Dell laptop. It’s preloaded with 12.04 currently its supporting 18.04 LTS bionic beaver however it 16.04 seems to be more stable can anyone offer any advice furthermore I intend to update to the newest version today to see what happens computer is free so I’m just figuring it all out

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


I am running Cox regressions on a data set and I have encountered a situation where two of the variables are non-significant in univariate analysis but become significant in the following multivariate analysis. To exemplify the situation, I am investigating variables A, B and C, which are all continuous variables. For A and B, higher values are expected to increase the hazard ratio. For C, lower values are expected to increase the hazard ratio. In univariate analysis, regressions are performed individually for A, B and C with none of them being significant. However, in the following multivariate analysis, when A, B and C are all included in the model together, A and C suddenly becomes significant? I am not quite sure on how to interpret this and I would be very interested in learning the reasons how this can happen—both generally and in the above example? I have tried to look it up and the explanations range from suppression to the data being sampled poorly, so any input on how to approach this would be very welcome.

I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant.


I wrote Windows 10 iso file to a usb using dd. This is the command I used:  sudo dd if=windows.iso of=/dev/sdb1 bs=1MB conv=fdatasync status=progress   The computer that I want to reinstall Windows 10 on currently has Ubuntu 18.04. I formatted my USB file type to be FAT before I wrote to it. When I went into the boot menu, the installation starts up, but it notified me of a missing driver.     I tried browsing through the system to find the driver but it was no use. Then I thought this was a file type issue, so I formatted the USB file type to NTFS and rewrite the Windows iso to it again. The same issue occurred. I opened up Startup Disk Creator, but it doesn't even detect the Windows iso.  Is this a common issue with trying to create a Windows boot USB with dd? Will I need to use a third-party program for it?

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


I am trying to write a program for quicksort using singly linked list in java.  Below is the code.  public class QuickSortInSLinkedList { Node head; private static class Node{     private int data;     private Node next;      Node(int data){         this.data = data;         this.next = null;     } }   public void printList(Node head){     Node node = head;     while(node != null){         System.out.print(node.data+" ,");         node = node.next;     } }  private Node getLastNode(Node head){     Node node = head;     while(node != null && node.next != null){         node = node.next;     }     return node; }  public void push(int data){     Node node = new Node(data);      if(head == null){         head = node;         return;     }      node.next = head;     head = node; }  void quickSort(Node head){     Node lastnode = getLastNode(head);     head = _quickSort(head, lastnode);     return; }  Node _quickSort(Node low, Node high){     Node newHead = null, newTail = null;      if(low == null || low == high){         return low;     }      Node part = partition(low, high, newHead, newTail);      if (newHead != part){         Node temp = newHead;         while(temp.next != part){             temp = temp.next;         }          temp.next = null;          newHead = _quickSort(newHead, temp);         temp = getLastNode(newHead);         temp.next = part;      }      part.next = _quickSort(part.next, newTail);     return newHead; }  private Node partition(Node low, Node high, Node newHead, Node newTail){     Node pivot = high;     Node previous = null, current = head, tail = pivot;      while(current != pivot){         if (current.data < pivot.data){             if (newHead == null)                 newHead = current;              previous = current;             current = current.next;         }else{             if(previous != null)                 previous.next = current.next;              Node temp = current.next;             current.next = null;             tail.next = current;             tail = current;             current = temp;         }     }      if(newHead == null){         newHead = pivot;     }      newTail = tail;      return pivot; }  public static void main(String[] args){     QuickSortInSLinkedList list = new QuickSortInSLinkedList();     list.push(5);     list.push(35);     list.push(7);     list.push(8);     list.push(34);     list.push(23);      System.out.println("Linked list before sorting");     list.printList(list.head);      System.out.println("\n Linked list after sorting");     list.quickSort(list.head);     list.printList(list.head);  }   }  I understand that since in java we have pass by reference value, this code should work but in line 62 i.e. variables newHead and newTail is always received as null after the call to partition method.  below is the error  Exception in thread "main" java.lang.NullPointerException 23 ,34 ,8 ,7 ,35 ,5 ,     at implementation.sorting.QuickSortInSLinkedList$Node.access$100(QuickSortInSLinkedList.java:6)  Linked list after sorting     at implementation.sorting.QuickSortInSLinkedList._quickSort(QuickSortInSLinkedList.java:62)     at implementation.sorting.QuickSortInSLinkedList.quickSort(QuickSortInSLinkedList.java:47)     at implementation.sorting.QuickSortInSLinkedList.main(QuickSortInSLinkedList.java:123)  Please help me understand why is it so. Thanks

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


I’d like all of you to please consider the following sentence:     It must be him with whom you enjoy doing your assignments, not me.   I have known that after 'to be' verb pronouns words take the subjective form. For example:     It is he who was absent yesterday.   So, can I say that the first sentence is erroneous? Would it be correct to write     It must be he with whom you enjoy doing your assignments, not I.

I was taught at school that the following expression is not grammatically correct:  Who is there? It's me.  The correct one is:  Who is there? It's I.  Can you let me know which one is accurate?


I was configuring my local Ubuntu installation (14.04 LTS). I got this error while trying to run apt-get. I have seen many answer regarding this issue. None of a single answer solve my issue. So I have decided to post a question even many duplicates exists. See my answer below.

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Let me first describe my experience before raising this question.  On a couple of occasions a question I've raised, or I engaged through a comment or answer on Stack Overflow was suggested to move to another site of Stack Exchange or was actually moved. In one case it was even downvoted for not being on the correct site.  I've tried to find the possible sites of Stack Exchange, and it's not easy. Usually you have to know about, click there and then after the sign in you can see it on the drop menu on top left bar. Notice, that this bar/menu is not available to all sites.  I've also tried to find a topic/thread/page that provides a list, but most importantly describes what is the purpose of each. The best I could come up with, and that was by accident, was the tag  where people ask specifically for the question they have in mind. But they shouldn't in my opinion.  Imagine I want to raise a question, it's my first time to Stack Overflow ecosystem and with Stack Overflow's bulkiness I assume this is the correct space. Yes, there is advice on how to write my question, but there isn't anything about the where should the question be raised. With the voting sometimes providing a feeling of unfair punishment for an easy mistake, the experience of this new user is kind of a bitter one.  Arguably, different sites then it is the problem of the user. But it becomes obvious that it is the same ecosystem. If when creating the account on Stack Overflow, you create it on Stack Exchange as federated authentication. Then, when a moderator can actually move a question from one site to another one, it's even more obvious that it's the same engine powering the each question/comments/answer page.  If I have missed this page then, shouldn't its content be more clear on the "how to ask a question" page? It could be a quick mention that different sites exist with a link to the page that provides the full explanation. For example     If you question is about server automation then use Server Fault   If there isn't a page, then should one be created and made available at key entry points?  Clarification Provided after discussion in comments  It seems that each site has a help center that you find by clicking on the ? icon on the top bar and then select from the drop down menu. There there is a link with title What topics can I ask about here?  For a summary of what each site is intended for, there is an answer on the duplicate question  which provides the information I was looking for.  Thanks for @shadow-wizard and @rene for their contribution to produce this clarification.

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


The "GUI way" of exporting a map to a PDF in QGIS's layout manager is known to be Layout -> Export as PDF .... I wonder if there is any way to do this the CLI way. Either from a python script or the shell. Does anybody know how one would achieve this, especially since QGIS 3.14 added CLI support?

I am trying to port some code from an older version of QGIS. I have managed to get the map setup fairly to my liking, and can export some content via a command like   iface.mapCanvas().saveAsImage("example.png")   However, I want to export to PDF, and also add a legend for my graduated color scale.  I've been rummaging around the documentation online for some time but I can't figure out how these new classes work together.  @JoshC helped me to understand that I need to use the QgsLayout and QgsLayoutExporter classes, not mapCanvas, however I'm not clear on how to use those classes to get out a PDF with a legend.


In Minecraft, to put a Lore on an object, it used to simply be:  {display:{Lore:["Example"]}}   Then they changed it to something else in version 1.14. What tag format do I put to receive an item with a lore? The command would be something like this:  /give (Selector) (item)({NBT_Tag}) (Count)   Here is an example with 2 unbreakable diamond axes given to the nearest player:  /give @p minecraft:diamond_axe{Unbreakable:1} 2

I am in 1.13 Pre-Release 7 trying to make a one command creation and I need an item with a specific name. The command I use is /give @p diamond_sword{display:{Name:"Sword of Power"}} and it gives my a diamond sword, but it doesn't have the name.   This is me running the command.   This is the command not working.


How do i create a snap from code copied from git-hub? I copied the yaml and this error appears. Do i need additional plugins??   W:The repository 'http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., W:See apt-secure(8) manpage for repository creation and user configuration details. E:Failed to fetch http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages 404  Not Found, E:Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I would like if there is a way to capture in a log file all the transfer file activities in a given time period. Let me give you an example. Let's say that on 16 Aug 2017 13:35 I copy/move a file/folder from my Mac to a usb device without giving any special arguments when using the cp/mv commands (in any case copying/moving files/folders can be achieved through GUI).   Is there any text file on the Mac which records the activity history (such as copying/moving files/folders)? I would like this text file to include information in a way like:  16 Aug 2017 13:35 path/to/folderA was copied to /path/to/usb/stick/ or something similar.

How can I see what I just did on my computer? For example, an activity log showing that I copied a file from here to there?


As we know that $\int_0^{+\infty} \frac{\sin{x}}{x}dx=\pi/2$,but how to evaluate the integral $\int_0^{+\infty} \frac{\sin^4{x}}{x^4}dx$?

The following question comes from   post $$\int_0^{\infty} \left(\frac{\sin x }{x }\right)^n\,\mathrm{d}x$$ but now I'd be curious to know how to deal with it by methods of complex analysis. Some suggestions, hints? Thanks!!!  Sis.


Regarding $R^n$ as a group under vector addition, the topology is the usual Euclidean topology. Let $H$ be a discrete subgroup of $R^n$, then $H$ is torsion free, when $n=1$, it is generated by the nonzero element with minimal absolute value. As in the title, for $n\geq 1$, I guess it is true that $H$ is free of rank no larger than $n$, but I can't give a clear proof.

I am trying to prove that every closed discrete subgroup of $\Bbb{R}^n$ under addition is a free abelian group of finite rank. I have tried to do this by induction on the dimension $n$.           Base case: We claim that a subgroup $H \subset \Bbb{R}$ has a least positive element $\alpha$. The completeness axiom tells us that there is a least positive real number $\alpha$ among all positive reals in $H$, and being closed implies that $\alpha \in H$.       Now assume the inductive hypothesis and consider a closed, discrete subgroup $H$ of $\Bbb{R}^n$. Choose some element $x \in H$ of least positive distance to the origin. This can be done because otherwise we get a contradiction like the above. Now let $L$ be the subspace spanned by $x$ and write $\Bbb{R}^n = L \oplus W$ for some complement $W$. Consider the projection (as a linear map) $p : \Bbb{R}^n \to W$.  Now this is also a group homomorphism and so we have  $$\textrm{Im} (H) \subset W$$  being a subgroup and so by the induction hypothesis is isomorphic to $\Bbb{Z}^l$ for some $1 \leq l \leq n-1$. However from here I am having some trouble concluding that $H$ itself must be isomorphic to $\Bbb{Z}^l \oplus \Bbb{Z}x$. If I know the existence of a map $l : \textrm{Im}(H) \to H$ such that   $$p \circ l = \textrm{id}_{\textrm{Im}(H)}$$  then by the splitting lemma I can conclude my problem. However, I don't have such a map so how do I conclude the problem? Please do not post complete solutions.  Thanks.  Edit: Perhaps I should add some context. I am trying to conclude that the kernel of the exponential map $\exp : \mathfrak{g} \to G$ where $G$ is a connected abelian matrix Lie group is a free abelian group of finite rank. We know that the assumptions on our matrix Lie group mean that $\exp$ is a group homomorphism, so that $\ker \exp$ is a subgroup of the Lie algebra $\mathfrak{g}$.  Edit: The problem is reduced to showing that the image of $H$ under the projection is indeed discrete, because otherwise we cannot apply the inductive hypothesis.


A process named 'eepBn5hbZX.exe' takes over 180MB of RAM at startup (the computer is up for 55s) for a while before disappearing. It's pretty large (85.9MB) and located in the Desktop folder    This has been a problem since I stick an USB that is infected by a malware that sets the 'hidden' attributes to my files. I retype the .exe file address and it behaved exactly as it would at startup (does nothing but drain memory and kills itself a few seconds later).  How can I delete the file completely and prevent the same problem from recurring?

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 have the class shown below.  I used to be able to create a StrStrmBuf object and pass it to std::cout like this:  #using namespace std; StrStrmBuf ssb("Hello"); cout << ssb << endl << endl;   but with C++11 I have to do this.  StrStrmBuf ssb("Hello"); cout << ssb.str() << endl << endl;   I think that I was able to use the first form because of   operator const char*() { return str().c_str(); }   but it doesn't see to work with C++ 11.  I have been trying to overload the << operator but without success.  (See the non-member << overload shown at the end of the listing.)  Can anyone suggest how I should implement the << overload for this class?  I'd like to be able to simply say cout << ssb; Thank you.  #define SSB_OPEN_MODE std::ios_base::out|std::ios_base::in|std::ios_base::ate class StrStrmBuf : public std::stringstream { public:     explicit StrStrmBuf() : std::stringstream(SSB_OPEN_MODE)    {}     explicit StrStrmBuf(const std::string& str) :     std::stringstream(str, SSB_OPEN_MODE)           {}     explicit StrStrmBuf(const char* pStr) :     std::stringstream(pStr, SSB_OPEN_MODE)          {}     template <typename T>     StrStrmBuf(const std::string& str, T const param) :         std::stringstream(str, SSB_OPEN_MODE)  { *this << param; }     StrStrmBuf(StrStrmBuf& rhs)                { str(rhs.str()); }     StrStrmBuf& putch(char ch, size_t nCount = 1);     StrStrmBuf& putstr(const std::string& str);      StrStrmBuf& width(int nCol)         { std::ios_base::width(nCol); return *this; }     StrStrmBuf& clear()         { str(""); return *this;  }     size_t length() const           { return str().length();  }     bool empty() const          { return str().length() == 0; }     StrStrmBuf& operator=(const std::string& s) { str(s); return *this; }     StrStrmBuf& operator=(const char* s)        { str(s); return *this; }     StrStrmBuf& operator=(StrStrmBuf& rhs);     operator const char*()                      { return str().c_str(); }     operator const std::string()                { return str();         }      StrStrmBuf& ltrim();     StrStrmBuf& rtrim();     StrStrmBuf& trim();      StrStrmBuf& lpad(const std::string& s, size_t nSize, char ch = ' ');     StrStrmBuf& rpad(const std::string& s, size_t nSize, char ch = ' ');     StrStrmBuf& center(const std::string& s, size_t nSize, char ch = ' ');     };      const char* operator<<(std::ostream& out, StrStrmBuf& rhs)      { return      rhs.str().c_str(); }

I am writing a small matrix library in C++ for matrix operations. However my compiler complains, where before it did not. This code was left on a shelf for 6 months and in between I upgraded my computer from debian etch to lenny (g++ (Debian 4.3.2-1.1) 4.3.2 ) however I have the same problem on a Ubuntu system with the same g++.  Here is the relevant part of my matrix class:  namespace Math {     class Matrix     {     public:          [...]          friend std::ostream& operator<< (std::ostream& stream, const Matrix& matrix);     } }   And the "implementation":  using namespace Math;  std::ostream& Matrix::operator <<(std::ostream& stream, const Matrix& matrix) {      [...]  }   This is the error given by the compiler:     matrix.cpp:459: error: 'std::ostream&   Math::Matrix::operator<<(std::ostream&,   const Math::Matrix&)' must take   exactly one argument   I'm a bit confused by this error, but then again my C++ has gotten a bit rusty after doing lots of Java those 6 months. :-)


I'm new to electronics, so I thought I'd start simple and just connect an LED to the GPIO on the raspberry pi, to pin 1 (3.3v) and the ground pin. But I'm having trouble calculating the resistor I need. On many websites it says the resisitor I need is about \$300\Omega\$, such as this one , but none of the websites explain how to get to this value. I did physics at school and used the formula \$V=IR\$, and know that current is the same in all places in a series circuit.   The LED I have didnt come with any data, but looking on the Internet it suggest that the voltage drop across green LEDs is about 2.2v, and the max current is 20mA.  So the resistor will have a drop of 1.1v (the 3.3v from the source minus the 2.2v dropped across the LED), and the current through it should be 0.02A, so I did:  $$R=\frac{V}{I}$$ $$R=\frac{1.1}{0.02}=55\Omega$$  which is nothing like the \$300\Omega\$? what am I doing wrong or misunderstanding?

I'm trying to work out what value resistor to use in a LED circuit. The equation I'd use to do this is:  $$ R = \frac{V_{cc} - V_f}{I_f} $$  Seems logical, and makes complete sense. The answers to the question  confirm this too.  I have the following LEDs:   \$ V_f = 3.3V \$ \$ I_{f_{typ}} = 20mA \$   Using a 5V power supply:   \$ V_{cc} = 5V \$   Plugging these into the above equation gives:  $$ \begin{eqnarray} R & = & \frac{V_{cc} - V_f}{I_f} \\   & = & \frac{5V - 3.3V}{20mA} \\   & = & 85\Omega \end{eqnarray} $$  All good so far.  However, if I use the calculator at , that gives me 100Ω. If I use the ElectroDroid app on my phone, that gives me 85Ω.  So, I assume that the linear1 calculator is using a different method of calculating this resistor value; is there some better way of doing this?


For instance, how many US dollars or Pounds Sterling would one Galleon be worth?  Considering they are actual gold they should be fairly expensive, but is there some standardized exchange rate?

In the first book, Harry sees his Gringotts vault for the first time.  (Quotes thanks to Slytherincess!)     Griphook unlocked the door. A lot of green smoke came billowing out, and as it cleared, Harry gasped. Inside were mounds of gold coins. Columns of silver. Heaps of little bronze Knuts.      "All yours," smiled Hagrid.      All Harry's -- it was incredible. The Dursleys couldn't have known about this or they'd have had it from him faster than blinking. How often had they complained how much Harry cost them to keep? And all the time there had been a small fortune belonging to him, buried deep under London.      Hagrid helped Harry pile some of it into a bag. "The gold ones are Galleons," he explained. "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it's easy enough. Right, that should be enough fer a couple o' terms, we'll keep the rest safe for yeh."      Harry Potter and the Sorcerer's Stone - pages 58-59 - US Hardcover Edition   Jk Rowling posts in the Harry Potter Lexicon      JKR has stated in an interview (Comic Relief 2001) that she estimates the value of one Galleon to be "about five pounds," which works out to around US$9.75 (the exchange rate at the time of the interview was US$7.33). In the introduction to both QA and FB, US$250-million is stated to be the equivelent of 34 million Galleons. That also works out to a value of £5 to the Galleon, at the exchange rate of the time. The price listed on the back of the books, however, is not correct, since US$3.99 would equal less than half a British pound, or 8 sickles and 15 knuts. The book instead incorrectly lists US$3.99 as being equal to 14 sickles and 3 knuts. (Unfortunately, CNN.com uses this incorrect value for their Knuts-to-dollars converter.)      This gives us approximate values as follows:      1 bronze Knut = £0.01 (US about 2 cents)      1 silver Sickle = £0.29 (about US$0.57)      1 Galleon = £5.00 (more or less US$9.75)      These rates vary as the exchange rate fluctuates - see the Wizarding World Currency Converter for the current rate.   Now looking at the quote      Hagrid helped Harry pile some of it into a bag.   and     Right, that should be enough fer a couple o' terms, we'll keep the rest safe for yeh.   Obviously "some" is unspecified, but presuming the costs of ...     Typical elementary-school textbooks cost more than $100 each   He would be carrying at least 10 galleons for each school book, and going by the list of books just for his first year,  (Thanks Ibid!)     COURSE BOOKS      All students should have a copy of each of the following:         The Standard Book of Spells (Grade 1) by Miranda Goshawk   A History of Magic by Bathilda Bagshot   Magical Theory by Adalbert Waffling   A Beginners’ Guide to Transfiguration by Emeric Switch   One Thousand Magical Herbs and Fungi by Phyllida Spore   Magical Drafts and Potions by Arsenius Jigger   Fantastic Beasts and Where to Find Them by Newt Scamander   The Dark Forces: A Guide to Self-Protection by Quentin Trimble         (Harry Potter and Philospher's Stone, Chapter 5)   That's 80 Galleons just for books. This does not include the list of other expenses Harry has for his school years (wand, potion reagents, etc.)  How many Galleons is "some" or is Diagon Alley selling supplies for third world prices?  Sidenote, is this just a case of bad JK maths?


I tried $\min_{x \in \mathbb{R}^m, \\ y \in \mathbb{R}^n}$ but \\ doesn't create a line-break in this setting

I have the following equation, where there is a lot of stuff under the sum symbol:  \begin{equation} d(\vec{x},\vec{y})=   \sum_{Z_{xy}\in\vec{Z}_{xy},\forall x\in\vec{x},\forall y\in\vec{y}}      f(Z_{xy}) \end{equation}   In the resulting document, I find it kind of hard to read. Is there a way to write the equation to make the result more readable, e.g. putting the stuff under the sum symbol on different lines?


This post is a Q&A style post on this problem from the beginning of Ring Theory: Prove $0a=0$ in a ring $R$.

I was trying to find a proof of $a\times0 = 0$ by myself (assuming commutativity, associativity, distributivity, etc) and I came up with $$ a+0=a(1) \implies 1 = \frac{a+0}{a} = \frac aa + \frac 0a = 1 + \frac 0a \implies \frac 0a = 0 \implies a(0)=0$$ Is there anything wrong with this proof, or does it assume anything that shouldn't be assumed?


I was reading the QGIS Python Programming Cookbook (page 74) trying to learn how to merge shapefiles because I need to do it for what I'm doing. I was using their example just to try it out though.  I would like to know if there's any way to merge all the shapefiles in a folder together to make one shapefile.  Theses are the files in my folder:   footprints_ne.dbf footprints_ne.shp footprints_ne.shx footprints_nw.dbf footprints_nw.shp footprints_nw.shx footprints_se.dbf footprints_se.shp footprints_se.shx footprints_sw.dbf footprints_sw.shp footprints_sw.shx   And this is my code:  import os import glob import urllib import sys import zipfile import processing   pth = "C:/Users/myself/Desktop/qgis_data/tiled_footprints/"  files = glob.glob(pth + "*.shp")  out = pth + "merged.shp"  processing.runandload("saga:mergeshapeslayers", files.pop(0), ";".join(files), out)   For some reason it gives me an error complaining about my algorithm but I'm just following the book. I am new to programming.

I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the saga:mergeshapeslayers algorithm to merge all the files in the Output folder. I have used the Model Builder and although it is helpful to an extent, I find that it is used for specific purposes whereas I am attempting to make a script for generic purposes.   Code:  ##Test=name ##Select_folder=folder ##Result=output vector  import os import glob  path_1 = Select_folder path = path_1 os.chdir(path)  def function():      output = glob.glob(path_1 + './*.shp')     x = 0      while output[x]:         for fname in glob.glob("*.shp"):             outputs_1 = processing.runandload("qgis:fieldcalculator", output[x], 'Number', 1, 10, 0, True, 1 , "C:\Users\Me\Desktop\Output\\"  + fname)             multiple_0 = glob.glob("*.shp")             x = x + 1          if x + 1 > len(output):             processing.runalg("saga:mergeshapeslayers", output[0], ";".join(multiple_0) , Result)             break         else:             continue  if path_1:     function() else:    pass


How do I use regedit so as to store some deatails of my program ? I would like to use this to store some data like the program folder, some user cofigs and also some extensions that the computer should recognize as my program's extension.

How is it possible to read/write to the Windows registry using Java?


How can I find the following limit :$$\lim_{n\to\infty}\left(1-\frac{1}{3}\right)^2\left(1-\frac{1}{6}\right)^2\left(1-\frac{1}{10}\right)^2\cdots\left(1-\frac{1}{\frac{n(n+1)}{2}}\right)^2$$There are four options $(a)\frac1{3}(b)\frac1{9}(c)\frac1{81}(d)0$ Thanks!


If non-trivial zeroes of the Riemann Zeta function are irrational, and we have to calculate $\zeta[t]$ numerically, how is it ever possible to prove that a particular zero of $\zeta[t]$ falls exactly on the $Re[t]=1/2$  line?  Are we really only able to prove that they're within our computational precision of that line?

Much effort has been expended on a famous unsolved problem about the .  Not surprisingly, it's called the Riemann hypothesis, which asserts:  $$ \zeta(s) = 0 \Rightarrow \operatorname{Re} s = \frac1 2 \text{ or } \operatorname{Im} s = 0 .$$  Now there are numerical methods for approximating $\zeta(s)$, but as I understand, no one knows any exact values except at even integers, which include the trivial zeroes for which $\operatorname{Im} s = 0 $.  So I've always wondered:  For the rest, how does one prove $\operatorname{Re} s = 1/2$ exactly?  (All I know that seems vaguely useful is the argument principle, which I'm not sure helps here, but I'd be happy to learn about other techniques that aren't too far advanced.)  Edit:  Looking over this again, I found out I missed the closed-form values at .  This doesn't affect the question but seemed worth correcting.  Thanks to the people who contributed.


I'm writing a thesis and I need to make references to R. I've read some other articles that cite "R" and they seem to use the roman font. I have no idea how to set this font :(

I am using a LaTeX template from my university to typeset my thesis. I am making references to R and I have defined a new command with:  \newcommand{\R}{R}   in order to get the roman "R". The formatting of the thesis means that chapter titles are written in a sans serif font. When I type a chapter title e.g. "\R{} source code" it does not appear in serif, rather in the same sans serif font at the rest of the title.  Is there a way to force the "base" font to be used, regardless of which font is in use at that time?  Sorry for no minimal working example - I'm just not sure which part of the preamble causes the chapter titles to be sans serif!


I have programmed in Java for some time and I just realized that the protected access modifier allows members to be accessed also in the same package. So here is the situation and the question:  I have a class having a protected method, and a test class using Mockito to stub that method. The two classes are located in different folders (a src and a test), but their package names are the same! The funny thing is, I can call the protected method in the test class! I would like to know how it is possible? Because their package names are the same? In this case the protected modifier does allow a very wide access!

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


Cleaning up long chains of comments is a pain in the butt. Major sort. It just takes too many damn clicks, with all the confirmation and flag reason picking dialogs.  Please implement bulk operations for comments (for moderators), maybe like so (crude mockup):        Comments taken from ; no statement about comment quality intended.  Note there is a , but the proposal here is to add this to regular pages, not (only) to queues.

Ever since mods gained the ability to undelete comments, deleting them has become easier as the confirmation dialog was removed.  However, this is not the case in the mod queue — I still get a confirmation dialog for each comment I want to delete in the queue under a custom-flagged post (single-comment flags can be deleted just fine). And since this is the place from where I delete comments the most, it can be annoying.  In addition, the "purge comments" button, when invoked from the queue, refreshes it, so I have to scroll back down, remember which post I just purged, and mark the flag as helpful. Usually not a big issue but if there are multiple "obsolete comments" flags, then it can get confusing.  Could the workflow for comment thread moderation from within the queue be improved? Ideally, make comment deletion work like everywhere else on the site, and make the purge button AJAX-based like the comment deletes.


I have a problem installing macOS Catalina on my Macbook Air (Mid-2013, model A1466). I created a bootable USB drive with macOS Catalina. Then I restarted my Mac from it and, in Disk Utility, I formatted my SSD (connected with an adapter) with GUID scheme and MacOS Extended. After that, I installed Catalina on it, but when my Macbook Air restarts, I see a folder with a flashing question mark. When I try to choose my SSD as startup disk I cannot see it on the list. Have you any idea what is going wrong?

I have an iMac 2008/2009 issue and recently the computer would not boot and I would get a flashing question mark. Ran through all the usual steps, try boot in safe mode, flash RAM,  try single user for fdisk, put in OS disk and boot from CD, etc... No dice.   Replaced the hard drive and put the OS disc in the system, press and hold option. (holding C didn't work) I can see the OS disk but when I click on it the system will act like it is going to run and then freeze. The best I got was the OS X disc that changed the screen to dark grey and told be the system had to restart.  Purchased a usb mount for an external hard drive. Was able to mount the old hard drive to a laptop and run disk utility. Everything checked out.  At this point I am pretty sure it isn't the hard drive.   Any other hard ware items this can point too? My iMAC can also "see" the hard drive (and the recovery partition) when connected via the USB and I hold "option" on start up. But it crashes when trying to boot from either.  I am going to take out and re-install the RAM for giggles but I am not sure what else to do.   Ideas are welcome.


Let $(a_n)$ be a sequence in $\mathbb{R}$ and let $b_n = a_{n+1} - a_n $ be a zero sequence. According to my intuition, I would say that $a_n$ converges. But my solution says otherwise. How could that be? I just can't find a counterexample.

I have a question that says "Show that there is a bounded sequence $x_n$ which is not convergent but has the property that $x_n - x_{n+1} \to 0$ as $n \to 0$.  What does this mean? Do I need to come up with an example or does the problem actually want me to prove such proposition?  By the way, I see that this sequence looks like Cauchy because of $x_n - x_{n+1} \to 0$ as $n \to 0$, but it is obviously not.


So,  doesn't say the word "target" anywhere in its text:     You may have Clone enter the battlefield as a copy of any creature on the battlefield.   Does this mean that it isn't targeting the creature it's cloning, and could therefore be used to copy a creature with shroud (or hexproof) or a creature with protection (like )?

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


I have a Look KG361 that is built with 9-speed Ultegra. Is it possible to change the drivetrain to 2x10 or 2x11 with this frame?

I am currently upgrading my bike from a 9 speed to an 11 speed system.  I am currently using shimano 105 components and will continue to use them within the new system.  Current bike has a shimano 105 rear derailleur but does not specify if it is unique to a 9 speed system.  Will I need to buy a new rear derailleur?


Let's fix the generic probability space $(\Omega,\Sigma,P)$, and consider the generic random variable $X\colon \Omega \to \mathbb{R}$. The expected value of $X$ (supposed to exist) is then defined as $E(X):=\int_{\Omega} X\,\text{d}P \in [-\infty,+\infty]$, namely using the Lebesgue integral of $X$ with respect to the probability measure $P\colon \Sigma \to [0,1]$. When $X$ is a continuous variable, namely when there exists $f_X\colon \mathbb{R} \to [0,+\infty)$ such that $\forall \,x \in \mathbb{R} \quad F_X(x):=P(X \le x)=\int_{-\infty}^x f_X(t)\,\text{d}t$, we have also that $E(X)=\int_{-\infty}^{+\infty} xf_X(x)\,\text{d}x$. My question is: how can I show that the general definition of $E(X)$ reduces to the last one for continuous random variables? Can you suggest me a textbook or a source where I can find some help? P.S. I have found here  that $\int_{\Omega} X\,\text{d}P=\int_{\mathbb{R}} \text{d}\mu_X$, where $\mu_X\colon \mathcal{B}(\mathbb{R}) \to [0,1] \mid \mu_X(A)=P(X \in A)$ is the pushforward measure of $X$, with $\mathcal{B}(\mathbb{R})$ the Borel $\sigma$-algebra over $\mathbb{R}$. I know also that $F_X'=f_X$ and that $F_X(x)=\mu_X((-\infty,x])$, so maybe $\text{d}\mu_X=\text{d}F_X=f_X\,\text{d}x$, but I seriously think this is totally wrong. Thank you for your time and help!

I recently found out that the expectation of a random variable $X$ in a probability space $(\Omega, \mathcal F,  \mathbb P)$, $\mathbb E(X)$, is just the term used in probability theory for the measure of the function $X$; i.e.:  $$ \mathbb E(X)=\mathbb P(X) $$  or, for a real-valued random variable $X:\Omega\to\mathbb R$:  $$ \mathbb E(X)=\int_\Omega X(x)\mathbb P(dx) $$  The thing is, I am also familiar with the definition of the expectation of a random variable $X:\Omega\to\mathbb R$ with probability distribution function $f$ to be:  $$ \mathbb E (X)=\int_\mathbb R xf(x)dx $$  Here, the integral is with respect to the Lebesgue measure on $\mathbb R$.    We can define the function $f$ in the following way: we have $F(x)=\int_\mathbb R f(x)dx$, where $F(x)=\mathbb P(X^{-1}((-\infty,x]))$.    I can't see any way to show that these two definitions are equal to one another.  The only transformation between integrals with respect to different measures that I know is that $\mu(f^{-1}(g))=\mu(g\circ f)$, which gives that $\mathbb E(g)=\mu_X(g)$, where $\mu_X$ is the image measure $\mathbb P\circ X^{-1}$, but that doesn't seem to help.  Why can we write $\mathbb E(X)=\int_\mathbb R xf(x)dx$?  Why are these two definitions consistent?


What is the exact mechanism which makes aging process slow for persons travelling at higher velocity relatively. How does our body cells responds to gravity and undergo aging?

I am trying to understand the Twins Paradox (relativity) and its implications.  Can we infer from the Twins Paradox that the ageing process (cell decay or other biological processes) depends on motion? When I move fast, will my rate of ageing slow down?  I know the theory says that its time which slows down but my understanding (it may be wrong) is that time is just a human perception, it isn't a real physical entity. If time isn't real, outside human perception, then it must be the biological process of ageing being impacted by motion, in the Twins Paradox experiment.  Please help me, what am I getting wrong?


In some TV shows and movies, an actor plays more than one character in one scene. How do they film the actor as one character talking to another character than they play?  I can understand scenes where the characters are "independent" of each other; they talk but don't physically do anything with each other. However, what I can't understand is when the character does something to the other character e.g. when Jack Sparrow (Captain)   Does anyone know how they film scenes like this?

How are dual/double role films shot in which the actor is shown on the screen at the same time in the same or different z-index planes and are in a fight scene in which one actor is punching the other, especially on the face?  I've heard of split filming and stitching the scene, green screen, and lastly computer processed overlays of the actor's face on another actor's body with the same build. The last one I've seen in The Social Network but I'm referring to films that were shot pre 2005.  And it looks very real.


How to do the "curly N" for neighborhood  in Graph Theory context? Please see the image attached.

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


"Long ago, Galaxy far away..." and all that, but has Earth ever been mentioned in any canonical or semi-canonical SW story?   If not, are there any explanations for the origins of humans?

Have any references ever been made to the existence of Earth, our solar system, or the Milky Way anywhere in Star Wars Legends?  EDIT:  Following @Trader's answer, I wanted to point out that "A long time ago in a galaxy far, far away...." in the starting scroll is a very obvious answer, but not the one I'm looking for.


I have old notebook with Intel® Pentium (R) Processor B940. Can I run the latest 64 bit Ubuntu on my machine? This is detail of my machine taken on Ubuntu 16.04 LTS 32 Bit.

I am on Ubuntu and I did this command:  $ uname -a Linux slabrams-desktop 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux   Does it mean I am on 32bit or 64 bit processor?  The reason I am trying to figure this out is that I was getting errors which looked like this:  cannot execute binary file   and from Googling, I thought it was a processor issue.  Any ideas?


If there is a toy train on the floor moving linearly then would the friction acting be rolling or static?

I am a bit confused about the relation between rolling resistance and static friction.   I have often heard that it is the static friction that lets the wheel roll. Consider the following two cases:  a) A tire of a car of mass $m$ moving with positive acceleration $a$ on a street b) A wheel of a moving wagon (of mass $m$) which is pulled by a string (with force $F_\mathrm{string}$).    How do the free body diagrams look like? (including static friction, rolling friction and friction forces at the axis) What is the resulting force accelerating the center of mass of the wheel in case b) (in dependence of the frictional coefficients and $m$)


I couldn't get the physical significance of dot product

I get the physical significance of vector addition & subtraction. But I don't understand what do dot & cross products mean?   More specifically,    Why is it that dot product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\cos\theta$? Why is it that cross product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\sin\theta$, times a unit vector determined from the right-hand rule?   To me, both these formulae seem to be arbitrarily defined (although, I know that it definitely wouldn't be the case).   If the cross product could be defined arbitrarily, why can't we define division of vectors? What's wrong with that? Why can't vectors be divided?


I was wondering about the following situation: If you'd weigh a whole body of liquid and then let something float on it, how would the weight of the liquid change? E.g. if you could weigh a whole lake with a scale and then put a 1 tonne boat on it, would the weight of the lake increase by 1 tonne? I'm no physicist and my brain tells me "where else would the weight go?" but something feels not quite right about that.

The Situation:  A ball is placed in a beaker filled with water and floats. It is also attached to the bottom of the beaker via a string.   The Question:  The ball is attached to the beaker, thus making the ball and beaker (and string included) a system. However, it is floating. Does the ball add to the weight of the beaker?


I never understood this asymmetry. You can up-vote all you want (well, up to some daily limit), but down-votes are discouraged by decreasing your rep.   If we're worried about down-vote abuse, then a daily limit would fix that most likely.  But why punish someone for rating a poorly written question as such? With this policy people are more likely to vote to close a question (it's free).

It is incredibly rare that I downvote on this or any other community site. I would rather just ignore the item. However, occasionally some very bad advice is given that is worthy of a downvote. Why should this adversely affect the reputation of the person who downvotes?


In regularization, we add square of thetas multiplied by lambda(excluding theta_0). The value of lambda is high because values of theta should be close to zero to neglect the value of its associated feature. Now my question is when we apply gradient descent to set the values of theta which will result in best fit to data. Wouldn't it also reduce the values of all the thetas (which we don't want to reduce)? Because we are adding every value of theta at the end of the cost function. Which will result in a very low slope linear line causing underfitting.

In order to solve problems of model selection, a number of methods (LASSO, ridge regression, etc.) will shrink the coefficients of predictor variables towards zero. I am looking for an intuitive explanation of why this improves predictive ability. If the true effect of the variable was actually very large, why doesn't shrinking the parameter result in a worse prediction?


My question on k-fold is not about evaluations of the model, but rather the coefficients that are returned by it.   In the R code below, I am performing 3-fold cross validation, which is to say the model is trained and tested three times. The keyword I am looking at is "trained".  My question is... how do the coefficient values get set? Is it an average of the three folds or another method?  library(caret)  formula <- nos_yn ~ phone_conf_yn + nos10iact  train_control <- trainControl(method = "cv", number = 3, summaryFunction = twoClassSummary, classProbs = T)  model <- train(formula, data=training, trControl=train_control, method="glm", metric = "ROC", family=binomial(link="logit"))  data.frame(summary(model)$coefficients[,1])                                  summary.model..coefficients...1. (Intercept)                                           -2.1853334 `phone_conf_ynBad Phone Number`                        0.7364689 phone_conf_ynConfirmed                                -1.2032336 `phone_conf_ynNull/Other`                             -0.6636189 nos10iact                                              0.3016733

I am wondering how to choose a predictive model after doing K-fold cross-validation.   This may be awkwardly phrased, so let me explain in more detail: whenever I run K-fold cross-validation, I use K subsets of the training data, and end up with K different models.   I would like to know how to pick one of the K models, so that I can present it to someone and say "this is the best model that we can produce."   Is it OK to pick any one of the K models? Or is there some kind of best practice that is involved, such as picking the model that achieves the median test error?


This bike is over 17 years old and not particularly high quality, but it does not make sense to replace the whole thing over one shifter. So I am looking to repair it if possible. I'm confident with most aspects of maintenance, but I've no idea what goes on inside these things.    When changing 'down' to an easier gear with the thumb, the lever slips and the gears do not change. The lever moves further than is expected, with no resistance. By simultaneously applying lots of upwards pressure with the thumb, you can sometimes get it to shift. Once it does shift, the rear functions happily. I've had no other derallier issues.    There's an allen key fitting on the top, and a screw on the bottom. I have not opened it up, worrying that springs will ping out and all will be lost!    I've no idea if it needs more lubrication... or all the gunk cleaning out. Go tighter... or looser?  Thank you.

I've got a road bike with brake lever shifters, and it's developed a small problem with age: sometimes, the shifter doesn't catch the first time or two I push it. It'll move easily, with no resistance, since it's not actually pulling on the cable, then after a few tries, catch and work normally. The colder the temperature, the more often this happens.  I don't know how the mechanism works internally, so I'm curious what would cause this, and also whether it's (as I suspect) gradual wear of some part of the mechanism, and if it's likely to fail catastrophically, or gradually worsen.


How may I move window icons to the left in Gnome 3.14 under Ubuntu 15.04? This question has been asked before, but considerably older versions of Ubuntu and Gnome.

I have recently installed Ubuntu Gnome which has the latest version of Gnome 3 running on it, and I have noticed that on windows there are no minimize buttons, and no maximize buttons, although I can see that you do get the options if you do a right-click. I have already read  question, and its answers, and have found that still none of them answer my question.  So my question is, as made clear in the title, how can I bring back the minimize and maximize buttons? Is this a bug? Or have Gnome decided not to have them?    OS Information:  No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid


In the book 7, there was some kind of reconciliation between Harry Potter and Dudley. Did they become friends later and did Dudley's and Harry's families met during family holidays?

As last seen, the Dursleys are forced to move by the ministry of magic, put into protective custody by the ministry. However, the ministry fell only a few weeks later, and there was evidence that it couldn't be trusted, even then. Are they still alive, and if so, how did they survive the purge from the ministry?


I have multiple old games that are not available on Steam or GOG such as Diablo 1 and Red Alert 2 that I would like to be able to play multiplayer on my windows 10 machine on my network (i.e. prefer not to mess with Battle Net on Diablo, assuming that even still works). I have added the IPX protocols on older machines via my network properties and just adding IPX. However on my Windows 10 machines the only Network Protocol listed when I go to install is Reliable Multicast Protocol.   Is there still a way to get the IPX protocols added or another workaround for old IPX reliant games?

Recently some of my friends and I grew nostalgic about the original Diablo and realized we've never truly tried the multiplayer aspect of that game. So we set up a modern VPN LAN solution via tuungle (using the appropriate IPX Wrappers) but the problem is, while any of us can manage to create session in Diablo FULL, others cannot find a way to join my IPX/LAN game.  There are no "join" buttons in the game itself.  I've read somewhere that Spawn version is a trial version but can be used to join Multiplayer games. If they can, is it possible for them to play the entire game on LAN or is trial restricted from choosing some classes/accessing some areas?  Or are there some other ways to join?


I am new to Blender and am struggling to fix a problem with face smooth after I cut a hole through the object using the Boolean modifier.  The image shows the problem, and I tried using the triangulate shortcut, tried the edit normal modifier, tried subdivision modifier, but could not fix it.  Could anyone here help me with this?

I am trying to slice up my models using the Boolean modifier.  After applying the modifier on my smooth mesh, I get the expected result, a flat dissection to separate my mesh into two.  The problem lies in how I can resolve the visual "jaggered" edge that separates my (smooth) mesh exterior from the flat dissection face.    Is it possible to achieve a smooth-to-flat variation without this artifact?   I tried to alter a mixture of the two but end up with artifacts, or unwanted blocky flat mesh faces around the dissection edge of my mesh.


I saw somebody with a Python gold badge but can't dig up where now... This badge isn't listed on Stack Overflow ().  Where is the reference?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


We have alphabet consisting of two chars $\{ 0, 1 \}$ and over this alphabet we have language defined by following rules:     There are no words of length $1$ Words of length $2$ are only "$10$" and "$00$" Every other combination of chars of length $n$ where $n > 2$ is considered a word when "$1$" are left where they're supposed to be and "$0$" are replaced with another arbitrary word of length smaller than $n$   How do I show that for every positive $n$ is the number of words of length $n$ equal to: $$\frac{2^n+2*(-1)^n}{3}$$  Example    n = 1 -> { }   n = 2 -> { 10, 00 }   n = 3 -> { 110, 100 }   n = 4 -> { 1010, 1000, 0010, 0000, 1110, 1100 }   ...

I was trying to improve myself in proofs before the exams and came across a problem, that no matter what I try, I have no idea how to solve:  Rules for a valid binary word:  1) There are no words of length 1 2) Words of length 2 are "10" and "00" only 3) If the word is longer than 2, it is valid only if it is composed of a shorter valid word, in a way that 1s are kept on the same place and ALL 0s are each replaced with any valid word (even the same)  Prove, that the total count of valid words for the given word length = n equals to:  $$ \dfrac{2^{n}+2(-1)^n}3 $$  I've come up with a few examples:  Word length = 2: Valid words: 10, 00 (by definition); count = 2  Word length = 3: Valid words: 110, 100; count = 2  Word length = 4: Valid words: 1010, 1000, 0010, 1110, 0000, 1100; count = 6  I've tried to prove it using induction, but all I achieved was worthless cycles. I've even written a simple program to calculate all the possible words for the given length, but that also didn't help at all.


whats is the easiest way to make C# dictionary access thread safe? Preferably just using lock(object) but any other ideas welcome!

I was able to implement a thread-safe Dictionary in C# by deriving from IDictionary and defining a private SyncRoot object:  public class SafeDictionary<TKey, TValue>: IDictionary<TKey, TValue> {     private readonly object syncRoot = new object();     private Dictionary<TKey, TValue> d = new Dictionary<TKey, TValue>();      public object SyncRoot     {         get { return syncRoot; }     }       public void Add(TKey key, TValue value)     {         lock (syncRoot)         {             d.Add(key, value);         }     }      // more IDictionary members... }   I then lock on this SyncRoot object throughout my consumers (multiple threads):  Example:  lock (m_MySharedDictionary.SyncRoot) {     m_MySharedDictionary.Add(...); }   I was able to make it work, but this resulted in some ugly code.  My question is, is there a better, more elegant way of implementing a thread-safe Dictionary?


I have a script that output logs every 30 minutes, this logs are appended to a file that store all logs, then I filter the logs that contains 'Maas" string and store those logs to another file.  (script output) | tee -a alldata.log | grep 'Maas' >> filterMaas.log   What I need to do is to add more filters to output to several files, the following line doesnt work, the file filterCCSA.log is empty.  (script output) | tee -a alldata.log | grep 'Maas' >> filterMaas.log | grep 'CCSA' >> filterCCSA.log    Any idea how can make this work?

I'd like to redirect the stdout of process proc1 to two processes proc2 and proc3:           proc2 -> stdout        /  proc1        \           proc3 -> stdout   I tried   proc1 | (proc2 & proc3)   but it doesn't seem to work, i.e.   echo 123 | (tr 1 a & tr 1 b)   writes   b23   to stdout instead of    a23  b23


While reading threads here, it has been established that not all murders had significance for Voldemort  (Albanian peasant, Hepzibbah Smith). They were pretty much holders/middle roads to obtaining items for future horcruxes. Excluding cases where Voldemort did not have the luxury to make horcrux in significant murder: Harry (unintentionally), Nagini (did not have a proper body), here is my question:  Why did Voldemort not care about the significance of some of his murders when he was in full power? Why couldn't he obtain items, hold them until someone significant appears, and make a horcrux then?  I am asking because he initially made horcruxes only for something significant: Myrtle - first murder significance, indication on stepping into a dark path, parents - no need to comment, Marvolo - same deal. Why did he stop caring mid-road?

I read somewhere (apologies, I cannot find the source) that Voldemort put high importance on creating Horcruxes. They were all kept in objects of meaning to him and almost all of the deaths were significant.  However it puzzles me that he'd murder people as trivial as a Muggle tramp and an Albanian peasant to create a Horcrux.  In summary, why did Voldemort kill such trivial people (Muggle tramp and an Albanian peasant) to undertake such a serious and significant task as creating a Horcrux?


On my Ubuntu machine, I have a lot of javascript / typescript projects.  Each of npm's binary might have a global installation, like tsc at  ~/.nvm/versions/node/v7.10.0/bin/tsc $ tsc -v Version 2.4.2   and it each project will define its own binary at:  ~/src/project/node_modules/.bin/tsc  $ cd ~/src/project && ./node_modules/.bin/tsc -v Version 2.3.4      I have a lot of nodejs / typescript projects, and whenever I call a command, e.g. tsc, I always want to run the project's as the first choice, and only then fallback to the global installation.  I know that npm scripts will always call the command from ./node_modules/.bin/ and hence setting up scripts like:  $ jq .scripts package.json  {   "test": "mocha --compilers js:babel-register --recursive tests/unit",   "start": "node start.js",   "start-dev": "nodemon start.js",   "tslint": "tslint 'src/**/*.ts?(x)' --fix",   "tsc": "tsc" }   would suffice. I could then call:  > pink_elephant@1.0.0 tsc /home/philipp/myProject > tsc "-v"  Version 2.3.4      Yet not all my projects have these scripts defined, and I find handling the arguments via -- annoying.   So in order of making my life as a developer easier, I like to define my path in a way, that whenever I:  cd someProjectFolder   it looks for the existence of:  ./node_modules/.bin/   and if it exists, add it to the path of the current shell.  How can I achieve this?

What is the best way to execute a script when entering into a directory? When I move into a new directory I would like bash to execute the projectSettings.bash script much like RVM does.


I am trying to pass a multiword argument in a function an echo the result in a simple fashion.   Currently I am doing this:  function myFunction {      multiWordString=""       for ((i=3; i<=$#; i++)); do              multiwordVariable+=" "${!i}      done      echo "multiwordVariable here => $multiwordSTRING"   }  myFunction "$@" otherArgument1 otherArgument2 I am a multivariable element and yeah is rock   You can see there is several drawback in this approach, the insertion of multiple argument, the usage of a loop, the management of my argument positioning to retrieve my string of characters... that makes it a very approximating solution.   I would do something more simple, like just read my variable's string:  multiWordArgument="here an awesome multiword string"  function file_function {      echo $1  } myFunction $multiWordArgument   maybe someone know a way that is nearer to this process?   thanks

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


import java.util.ArrayList; import java.util.Scanner;  public class ThirdElement {      public static void main(String[] args) {         Scanner name = new Scanner(System.in);         ArrayList list = new ArrayList < > ();          while (true) {             list.add(name.nextLine());              if (name.nextLine() == "") {                 break;             }         }         System.out.println(list.get(2));     } }   I can't figure out how to get the while loop to break as well as print the desired "get" statement correctly.

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


I have installed win10 in a 2tb hdd and Manjaro in 250GB drive in a gpt UEFI system I have other drive (250gb too) and I want to install Ubuntu in it. But how can I partitionate and install correctly? I don't want to have problems booting the systems 2tb → Win 10 250GB → Manjaro 250GB → Ubuntu (!)

I have 2 1tb hard drives on my computer with Windows 8 on the first hard drive and nothing on the other.  I want to install Ubuntu 14 on the second hard drive. I've looked up some guides and they all say to install Ubuntu on the sdb partition when booting off a usb stick. I have also seen some say to unplug the Windows HDD and then install Ubuntu onto the second HDD, and Ubuntu will automatically detect Windows and ask what you want to boot into upon boot.   I am really concerned about this - Will it ask me to choose what OS I want to boot into? Is there something like rEFInd(Mac) for Windows? Can anyone please give me a guide on how to do it without ruining my computer?  Thanks


A few hours ago I installed the Stack Exchange app to ask a question over at .  When I recieve an answer, I open the app to comment and the app gives me this notification:  You have not joined this site yet, would you like to join?  Cancel Join Now  When I tap Join Now, it does nothing but give me the following error on the status bar: You are already a member on this site.  I've been using Google Chrome since. Please help or fix, Chrome is aggravating me.

On Friday, I joined the  on a PC in order to . The Stack Exchange app was open on my phone already at this point, and I did not exit it.  Later on, I got a notification on my phone about having received an answer. It was a good one! When I tried to upvote the answer using the Android app, though, I wasn't allowed to: it said I hadn't joined the site, apparently not having caught up with the fact I had done so a couple of hours beforehand.  I apologise for the  in these screenshots. :) I plugged it in to charge minutes later, I promise!        When I said I wanted to join, though, I couldn't, unsurprisingly, on account of already having done so:        I closed the app entirely and reopened it, and then the app was happy that I was a member of Anime & Manga. But it wasn't updated whilst the app was running.  The app should probably get informed of this. (Though this may be low priority due to not occurring all that often.)  This occurred on the Android App v1.0.51 on a HTC One running Android 4.4.3.


I'd like to know the role of parentheses on a phrase. For example, which of the following is right, "it has an (unique) index" or "it has a (unique) index".

When a/an precedes a parenthetical aside (sometimes seen in informal/conversational writing), should the vowel rule depend on the first word in parentheses, or the next word in the "regular" flow of the sentence?     I need a (memorable) idiom (preceding an m word; use a)   or     I need an (memorable) idiom (preceding an i word; use an)


How to show that for $a,b\in \mathbb{C}: |a-b|=|1-a\overline{b}|  \Leftrightarrow |a|=1 \, \lor \, |b|=1$   I defined $a:=x+iy$ and $b:=u+iv$ which resulted in quite an algebra mess. Is there a simpler method to solve such statements?

The question is from Ahlfors Complex Analysis text.     Show that $\big|\frac{a-b}{1-\overline{a}b}\big|=1$, when either $|a|=1$ or $|b|=1$.   A solution I'm reading lets $|a|=1$ and $|b|\neq 1$.  then they show that $|a-b|=|1-\overline{a}b|$, by first squaring $|a-b|$ which gives $a\overline{a}+b\overline{b}-a\overline{b}-b\overline{a}=a\overline{a}+b\overline{b}-2Re(\overline{a}b)$.  My Question  I'm unsure of why $a\overline{b}+b\overline{a}=2Re(\overline{a}b)$?  They did write that this is because $b\overline{a}=\overline{\overline{a}b}$ but this didn't clear things up for me. Thanks


I'm working on the following problem:    I've deduced that the key is to show that $u$ is the real part of $\sec(z)$. But, I'm getting stuck in the algebra and am hoping someone can point me in the right direction. Here's my work so far:  \begin{align} \cos(z)&=\cos(x)\cosh(y)-i \sin(x)\sinh(y)\\ \text{sec}(z)=\frac{1}{\cos(x)} &=\frac{1}{\cos(x)\cosh(y)-i \sin(x)\sinh(y)} \cdot \frac{\cos(x)\cosh(y)+i \sin(x)\sinh(y)}{\cos(x)\cosh(y)+i \sin(x)\sinh(y)}\\ &=\frac{\cos(x)\cosh(y)+i \sin(x)\sinh(y)}{\cos(x)^2\cosh^2(y)+\sin(x)^2\sinh^2(y)}\\ \end{align}  Thus, I need only show that $\cos(x)\cosh(y) - i\sin(x)\sinh(y) = -1+\sin^2(x)-\sinh^2(y)$. However, this is not true, per my previous post.

Could anyone offer a proof that  $$ \cos^2(x)\cosh^2(y) + \sin^2(x)\sinh^2(y) = -1 + \sin^2(x) - \sinh^2(y)? $$


I'm interested in finding a collection of basic results in mathematics that require rather advanced methods of proof. In this list we're not interested in basic results that have tedious simple proofs which can be shorted through more advanced methods but basic results that necessarily require advanced methods.   I appreciate the question asked here is very similar to another question asked on this website: . Thank you for pointing this out. However, in my opinion, it does differ significantly (this is debatable). The main goal of the this discussion was to find examples that are easily digestible to non-advanced students of mathematics and related disciplines. This, I hope, will spur discussion of the dichotomy between what is considered trivial from a mathematics perspective and what may be considered intuitive. Quite often less experience students tend to gloss over fairly intuitive results under the assumption the proof follows easily. This I hope will be a good resource to show it is not the case.   In particular,  I was hoping to find a list of problems that may seem intuitive on inspection, but are out of the reach of elementary methods. The statement of the theorem should be able to be understood by junior undergraduate students but the proof rather inaccessible. Can you also mention why elementary methods fail to shed any light on the problem.   Many thanks

In , I asked about proof of statements which are simple but incorrect.   Here, I ask about statements which seems, at a first glance, straightforward, but if we try to write a proof, we can see it's much harder than it looked. So I expect the answers to contain:   the statement; why it looks easy to prove; why actually it isn't.