From a book, I have got proof as follows, that otherwise I would have solved using just logic that any consecutive $3$ values have one and only one value in equivalence class $\equiv 0\pmod 3$, and have difficulty in understanding. I have divided the given proof into two sequential parts, and hope that the first part's understanding will be enough:  Part (i) : Since any integer can be written in the form $3n \text{ or } 3n\pm 1$, the difference of two integers of the same form is a multiple of $3$, and therefore not less than $3$.  Part (ii) : But the difference of any two of three consecutive integers is less than $3$, so that the three consecutive integers are respectively of the above three forms, among which one is of the form $3n$, that is, a multiple of $3$.      In Part (i), the problem lies in logic, as for given form of two integers as : $3n, 3n + 1$, the difference is $-1$ and is less than $3$, as the value of $n$ has to be the same.

I am stuck on this problem, and was wondering if anyone could help me out with this. The question is as follows:  Let $n$ be an integer such that $n ≥ 1$. Prove that $6$ divides $n(n + 1)(n + 2)$. Note: An integer $a$ divides an integer $b$, written $a|b$, if there exists $q ∈ Z$ such that $b = qa$. Alternatively, $a|b$ if dividing $b$ by $a$, $b ÷ a$, results in an integer.  Should I do a proof by induction? All help/input is appreciated!


I read an  on this site about how a larger gravitational pull can overpower a smaller gravitational pull. I took this to mind, and I started wondering why the moon orbits the Earth instead of the Sun. What I think the answer is is that the moon is much closer to the Earth than the Earth is to the sun, likewise humans stay on Earth instead of being drawn to the sun or the moon. Can somebody please prove me wrong?

The sun pulls on the moon with a force that is more than twice the magnitude of the force with which the earth attracts the moon. Why, then, doesn’t the sun take the moon away from the earth?


Prove that $$\phi=\dfrac{13}{8} + \sum \limits_{n=0}^{\infty}\dfrac{(-1)^{(n+1)}(2n+1)!}{n!\,(n+2)!\,4^{(2n+3)}}$$,where $\phi$ is the golden ratio ($\approx1.6180$).  Evaluating the first few few partial sums makes it obvious that the expression approaches $\approx 1.61$ as the limit of the infinite sum is $\approx -0.007$. But is there any algebraic method to prove the same ?  Stirling's approximation seems to work a little but not much as the limit of the sum has to calculated and not the limit of the fraction. If there is no other known way than Stirling's, how should I properly implement it ? I have tried my best, but there does not seem any way out. As far as I think, only numerical method will help here.

The eighth installment of the Filipino comic series Kikomachine Komix features a peculiar series for the golden ratio in its cover:    That is,  $$\phi=\frac{13}{8}+\sum_{n=0}^\infty \frac{(-1)^{n+1}(2n+1)!}{(n+2)!n!4^{2n+3}}$$  How might this be proven?


Let $f(z)$ and $g(z):=\overline{f(z)}$ be complex functions defined for all $z$. In addition, suppose that the derivatives of both $f,g$ exist in $z=a$. Is it true that $g'(a)=0$ ? I noted that $$ g'(a)=\lim_{z\to a}\underbrace{\frac{\overline{f(z)-f(a)}}{f(z)-f(a)}}_{h(z)}\cdot \frac{f(z)-f(a)}{z-a} $$ and that $|h(z)|=1$. But how to deduce that $g'(a)=0$ ?

Suppose that $f$ is holomorphic in $\Omega$, and let $g : \Omega → > \mathbb{C}$ be given by $g(z) = \overline{f(z)}$. Prove that $g$ is   complex diﬀerentiable at $a$ if and only if $f'(a) = 0$.     I have tried the basic limit definition for derivatives but couldn't come up with a proper solution.  Also I know that for a complex valued function $f=u+iv$, If $u$ and $v$ have continuous first derivatives, then $f$ should be analytic on $\Omega$. But I'm not exactly sure whether it will be useful here.   Hep would be appreciated


I have a problem that I really want to solve which concerns almost every society -  preventing wrongful convictions. Since I'm a developer, I want to see if there's anything I can develop that might help mitigate this problem.    Would I post this question in a software-related Stack Exchange site or law-related Stack Exhange site, and which one?

I'm on SO pretty much every day researching something to do with programming, and over the last month or two, I find I'm growing frustrated and a little disgusted at how many interesting questions have been closed as "not a good fit" or "too subjective".  I think there is a confusion between "subjective" and "calls for judgement". To me one of the most valuable things about SO is the tremendous breadth and depth of experience of the members, and experience translates into smart decisions and advice, and that advice cannot always be asked for, or expressed in terms of, bald facts and data.  It's going to be 'subjective'.  I don't think SO should be Wikipedia. I think that if I could ask a question to a group of skilled programmers sitting around a table at lunch, and get interesting, valuable answers, then I don't care whether the question or the answers are 'subjective', I think that question should equally well be fair game for Stack Overflow.  I would like to see a mechanism whereby people who vote to close a question lose reputation when somebody expresses interest in that question or its responses.  How can I, or can I, influence this aspect of SO?


So i currently have this:    public static JavaFact register(JavaFact jf){     Scanner input = new Scanner(System.in);     Map<String, Activity> activities = new HashMap<String, Activity>();     Map<String, Activity> companyActivities = new HashMap<String, Activity>();      activities = jf.getAllActivities //this is just to get all the existent     // activities into the Map activities      System.out.println("How many activities is the user envolved in?");     int count = input.nextInt();     for(int i = 0; i<count; i++){          System.out.println("Insert activity code");          String code = input.nextLine();          Activity a = activities.get(code);          companyAcitivities.put(code, a.clone()); //the error refers to this line     } }   With this i'm getting a NullPointerException after running it on main. How can i solve this? What i want is for the user to insert the code of the Activity, and then add that Activity to the companyActivities wich will be the Map holding all the activities corresponding to the Company in question.

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


I have my enum defined like this.   public enum Places : long   {     World = (long)1,     India = (long)23424848,     USA = (long)23424977   }   Now I get a string of value like 'India'. I want the corresponding value of the enumerator.  for instance if i get the string 'World'(or world - case insensitive ), I need the value 1 to be returned.  I tried this way:  long woeid = ((long)(typeof(Places)country));    this doesnot work.  Is there a simple way to do?

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


I am a beginner in SQL and Database Administration and I am trying to undestand the difference between clustered and non-clustered indexes. More or less I understood what the different tasks are but I have some issues when it comes to the question of "pointers". I don´t come from CS so I have some issue to imagine what happens at the "leaf level" with the pointers and in which way they connect the index to the data. So, what does it mean that a clustered index does not store pointers to the data, while, the non-clustered one, does it? Sorry in advance if these questions sound stupid but at this point I am pretty confused!

I've read in couple of articles that clustered index is as the same as table, or if you read using clustered index, you have the whole record. Some say, clustered index stores the whole records in deepest leaf of index.  It is foggy for me, does clustered index has a copy of data?!!  for sure not, but I don't why people say that.  I read couple of articles but still it is not clear to me. Is clustered index is something virtual? Does it use B-Tree structure (like non-clustered index)?   Is there any schematic or model that describes how SQL Server stores/manages clustered index?


When I have the same author appearing more than once in the bibliography, the name of the author is replaced by a dash. How can I change it to always display the full name or names? I'm using BibLaTeX and Biber. I made quite a few changes to the literature style already, so could it be due to one of those changes?  Here is my minimal working example:  \documentclass[listof=totoc,  index=totoc,  bibliography=totoc, parskip,  12pt, headsepline=true, a4paper]{scrartcl}   \usepackage[ngerman, english]{babel}  \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc}    %% Literaturverzeichnis \usepackage[hidelinks]{hyperref} \usepackage{csquotes} \usepackage{etoolbox} \usepackage[backend=biber, style=authoryear, maxbibnames=999, maxcitenames=2]{biblatex} \addbibresource{Literature.bib}  % Autoren mit Slash getrennt und lastname-firstname \renewcommand*{\multinamedelim}{\slash} \renewcommand*{\finalnamedelim}{\multinamedelim} \DeclareNameAlias{sortname}{last-first}  % Doppelpunkt nach Jahresangabe in Klammern im Literaturverzeichnis  \renewcommand*{\labelnamepunct}{\addcolon\addspace}   % Titel im Literaturverzeichnis nicht kursiv  \DeclareFieldFormat{title}{#1\isdot}  \DeclareFieldFormat{journaltitle}{#1}  \DeclareFieldFormat{issuetitle}{#1}  \DeclareFieldFormat{maintitle}{#1}  \DeclareFieldFormat{booktitle}{#1}  % Jahreszahl im Fußnotenzitat in runden Klammern  \newbibmacro*{cite:parens:labelyear+extrayear}{%    \iffieldundef{labelyear}  {}  {\printtext[parens]{\printtext[bibhyperref]{%     \printfield{labelyear}%     \printfield{extrayear}}}}}   \renewbibmacro*{cite}{%    \iffieldundef{shorthand}      {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}     {\usebibmacro{cite:label}%      \setunit{\addspace}}     {\printnames{labelname}%      \setunit{\nameyeardelim}}%   \usebibmacro{cite:parens:labelyear+extrayear}}  {\usebibmacro{cite:shorthand}}}   \begin{document}  Just some text\footcite{Test1}. And some additional text\footcite{Test2}  \clearpage  \printbibliography  \end{document}   And my bib file looks like this:  @book{Test1, author = {Apostolik, Richard}, title = {Test title 1}, year = {2010a} }  @book{Test2, author = {Apostolik, Richard}, title = {Test title 2}, year = {2010b} }

I use biblatex with style=authoryear and when there are two references of the same author in the bibliography there is just a dash. How can I get the full name in the second entry too?


A solution I'm looking at employs this formula to find the sum of a finite series, but I haven't been able to find any information on this formula online or in my textbooks. Where does it come from, and what situations does it apply to? (It doesn't seem to be a reorganization of the formula for finite geometric sums...)

Why does the following hold:  \begin{equation*} \displaystyle \sum\limits_{n=0}^{\infty} 0.7^n=\frac{1}{1-0.7} = 10/3\quad ? \end{equation*}  Can we generalize the above to      $\displaystyle \sum_{n=0}^{\infty} x^n = \frac{1}{1-x}$ ?   Are there some values of $x$ for which the above formula is invalid?  What about if we take only a finite number of terms? Is there a simpler formula?     $\displaystyle \sum_{n=0}^{N} x^n$   Is there a name for such a sequence?    This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Let $\{a_n\}_{n = 0}^\infty$ be a sequence of real numbers such that the series $\sum_\limits{n = 0}^\infty |a_n|^2$ is convergent.  Is it true that $\sum_\limits{n = 0}^\infty \dfrac{a_n}{n}$ is also convergent?  My try:  Since $\sum_\limits{n = 0}^\infty |a_n|^2$ is convergent,   $$\begin{align}\lim_\limits{n\to \infty} |a_n|^2=0 &\implies \forall \epsilon >0 \quad \exists N\in \mathbb N \quad \forall n>N \quad|a_n|^2<\epsilon \\ &\implies \forall n>N \quad |a_n|<\sqrt \epsilon \\ &\implies -\sqrt\epsilon<a_n<\sqrt \epsilon  \end{align}$$  Hence $\lim _\limits{n\to \infty} \dfrac{a_n}{n}=0$.  Now $S_n=\sum_\limits{i=1}^n \dfrac{a_i}{n}\implies |S_n|\leq \sum_\limits{i=1}^n \dfrac{|a_i|}{n}\leq \sum _{i=1}^n |a_i|$.  Am I heading in the right way or there is any counter-example? How to complete the proof from here?  Please help.

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


Just installed Ubuntu 14.04.1 LTS 32bit on my "mature" Asus X50R laptop.  Basically working fine and I'm using it to write this post, with a wired network.  However wireless doesn't work.  The hardware seems to be detected and has a driver ("wl"):   mark@LaptopLinux:~$ sudo lshw -C network   *-network                       description: Network controller        product: BCM4311 802.11b/g WLAN        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:02:00.0        version: 01        width: 32 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: driver=wl latency=0        resources: irq:16 memory:fa9fc000-fa9fffff   *-network        description: Ethernet interface        product: Attansic L2 Fast Ethernet        vendor: Qualcomm Atheros        physical id: 0        bus info: pci@0000:06:00.0        logical name: eth0        version: a0        serial: 00:1e:8c:96:87:93        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vpd bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=atl2 driverversion=2.2.3 duplex=full firmware=L2 ip=192.168.1.73 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s        resources: irq:40 memory:feac0000-feafffff memory:feaa0000-feabffff   and the drivers seem to be in place  mark@LaptopLinux:~$ lsmod | grep wl wl                   3999690  1  lib80211               14040  1 wl cfg80211              409394  1 wl   but the wireless interface doesn't show up:  mark@LaptopLinux:~$ ifconfig -a eth0      Link encap:Ethernet  HWaddr 00:1e:8c:96:87:93             inet addr:192.168.1.73  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::21e:8cff:fe96:8793/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:9683 errors:0 dropped:0 overruns:0 frame:0           TX packets:5677 errors:0 dropped:0 overruns:0 carrier:2           collisions:0 txqueuelen:1000            RX bytes:8543915 (8.5 MB)  TX bytes:951800 (951.8 KB)           Memory:feac0000-feb00000   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:430 errors:0 dropped:0 overruns:0 frame:0           TX packets:430 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:39983 (39.9 KB)  TX bytes:39983 (39.9 KB)   Wireless card is definitely working - I can reboot in Windows and all is well.  I have edited /etc/NetworkManager/NetworkManager.conf and set     [ifupdown]     managed=true  All auto-detected updates are installed.  Any advice gratefully received!  Thanks, Mark

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


Normally if I have a material and want to put that material on say, 50 different objects, then I would select one object with that material, and then select the rest of the objects, hit Ctrl + L, and the material data would be copied to all the objects.  I have the exact situation I described above, except that I want to copy an object constraint from one object to all the other objects. Unfortunately the Ctrl + L menu doesn't have a "Constraints" button.  How do I copy this constraint to all the other objects?

I have a large number of objects, and I wish to add a Track to constraint to each object.  When I select the group of them and then add the constraint, it is added to only the active object, of course.  How can I add the constraint to all selected objects?


Shouldn't they both be O(1), as popping an element from any location in a Python list involves destroying that list and creating one at a new memory location?

I wonder what is the time complexity of pop method of list objects in Python (in CPython particulary). Also does the value of N for list.pop(N) affects the complexity?


I can't get beyond the graphical login screen since I ran apt-get upgrade on my brand new Ubuntu Dell with Ubuntu 14.04  The permissions on .Xauthority, .ICEauthority, and /tmp are correct. Reinstalling lightdm did not help; I tried that three times in various variants. Switching over to gdm caused a black-screen nightmare that took me half an hour to solve, and I'm back to lightdm. I installed linux-generic, and it didn't help. That exhausts everything suggested on this site. I have an nvidia card. Any idea what I can do?   Here is the content of .xsession-errors:  init: gnome-session (Unity) main process (2195) terminated with status 1 init: unity-settings-daemon main process (2182) killed by TERM signal init: Disconnected from notified D-Bus bus init: logrotate main process (2097) killed by TERM signal init: update-notifier-crash (/var/crash/lightdm.0.crash) main process (2130) killed by TERM signal init: update-notifier-crash (/var/crash/_usr_bin_software-properties-gtk.1001.crash) main process (2131) killed by TERM signal init: update-notifier-crash (/var/crash/_usr_bin_unity-control-center.1001.crash) main process (2133) killed by TERM signal init: xsession-init main process (2173) killed by TERM signal init: hud main process (2189) killed by TERM signal init: unity-panel-service main process (2197) killed by TERM signal   I have resinstalled Ubuntu twice to fix various problems, but the login loop happens every time, except for the first login after each installation.   And this is the result of grep -i nvidia in /var/log/Xorg.0.log  [    74.238] (II) Module glx: vendor="NVIDIA Corporation" [    74.238] (II) NVIDIA GLX Module  375.66  Mon May  1 14:28:39 PDT 2017 [    74.238] (==) Matched nvidia as autoconfigured driver 0 [    74.238] (II) LoadModule: "nvidia" [    74.239] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so [    74.239] (II) Module nvidia: vendor="NVIDIA Corporation" [    74.239] (II) NVIDIA dlloader X Driver  375.66  Mon May  1 14:03:26 PDT 2017 [    74.239] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs [    74.239] (II) NOUVEAU driver for NVIDIA chipset families : [    74.251] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the [    74.251] (EE) NVIDIA:     system's kernel log for additional error messages and [    74.251] (EE) NVIDIA:     consult the NVIDIA README for details. [    74.383] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I understood everything up until "BUT".  My question is how are the factors on the right side for the bolded line of equation under the word "BUT" obtained?  I tried to get these factors using property (5), but I was unsuccessful, can someone please show me how to get those factors?  Thanks in advance.  This is example 2 from "Problems of Number Theory in Mathematical Competitions" by You Hong-Bing on page 2.  Some properties the example will be using are:   (1) If $b\mid c$, and $c\mid a$, then $b\mid a$, that is, divisibility is transitive.  (5) If $n$ is a positive odd number, then  $x^n-y^n= (x-y)(x^{n-1} + x^{n-2}y + \ldots + xy^{n-2} + y^{n-1})$  The problem, example 2 is as follows:   Let $\mathbf{m > n}$ and $\mathbf{n\ge 0}$, show that $\mathbf{(2^{2^n}+1)\mid(2^{2^m}-1)}$   The following is the proof from the book:   Take $x=2^{2^{n+1}}$,$\,\,y=1$ in factorization (5), and substitute $n$ by $2^{m-n-1}$  WE GET:   $2^{2^m}-1 = (2^{2^{n+1}}-1) \left[(2^{2^{n+1}})^{2^{m-n-1}-1} +\ldots +  2^{2^{n+1}}+1 \right]$  THUS,  $(2^{2^{n+1}}-1) \mid (2^{2^m}-1)$  BUT,  $\mathbf{(2^{2^{n+1}}-1) = (2^{2^n} - 1)(2^{2^n} + 1)}$ This is the equation I'm having trouble with so everything else after this didn't make much sense to me  HENCE,  $(2^{2^n} + 1)\mid(2^{2^{n+1}} - 1)$  FURTHER, BY PROPERTY (1) WE HAVE:   $(2^{2^n} +1)\mid(2^{2^m} - 1)$  REMARK: sometimes it is difficult to prove $b\mid a$ directly when dealing with divisibility problems.  Therefore, we can attempt to choose an "intermediate number" $c$ and prove $b\mid c$ and $c\mid a$ first, then use property (1) of divisibility to deduce the conclusion.

I've been struggling with this all day today. I imagine it's not very hard, but my algebra skills are terrible. So, how can I show that if $m>n$ and $a$ is a positive integer, then $$a^{2^n}+1 \mid a^{2^m}-1.$$ I just can't get a coherent picture of what I'm supposed to do. If this too (see yesterday's question) boils down to the Unique Factorization Theorem, I would be very grateful for any intuition on how to think about this!


Let me begin the question by admitting upfront that my knowledge of physics is limited only to high school and I am extremely rusty with that. With the above out of the way, I want to understand the following better. So, it seems that the high school description of Newtonian mechanics leaves a lot to be desired (at least the way I understand it). The bigger picture, I am told, is that the dissatisfaction with the high school presentations of the topic can be addressed by using the more rigorous framework of the lease action principle. Anyway, back to my question.  Recently, I realized (after a discussion with a physics student) that I  misunderstood something very  elementary in my understanding of Newton's formulation of mechanics. My understanding of second law says that the net force on an object equals the mass of the object times the net acceleration the object gets. However, I note that this only defines force and should I take this to be a definition, there really is no "law" here. Could you please demystify this for me? What content should I think second law has when force has not been defined for me?  Again, because I am so inexperienced in physics, do let me know if my question is unclear. Also if this has been answered already, do let me know (and feel free to close the question in that case).

If you consider  as laws, then there must be independent definitions of  and  but I don't think there's such definitions.  If you consider them as definitions, then why are they still called laws?


To be more specific, my bike come with Shimano Sora 9 speed group set. I'm using a KMC X9 9 speed chain.  I studied quite a lot of websites. They claim that chainrings are compatible with any speed of cassettes.  Are there compatibility problem with existing components if I put on Shimano 105 11 speed chainrings?

I'm thinking of upgrading my bike, which has a Sora 9-speed system on it (50/34 chainset). The upgrade is for esthetic reasons - i simply like the look of the internal cable routing. That being said, it is not an absolutely essential upgrade, and if it costs too much I will not do it.   My plan is to buy the new Shimano 105 5800 11-speed cassette, shifters and chain. I understand that the 11-speed chain is thinner than a 9-speed. Does this mean that I also have to buy a new crankset to replace my 50/34 Shimano Compact FC-R345 Octalink?


Given a function $f(x,y)$, a legendre transform w.r.t. $x$ is $f^*(p,y)=p x - f(x,y) |_{p=\frac {\partial f(x,y)}{\partial x}}$.  E.g. , the various free energies, enthalpy, etc are all legendre transformations of internal energy.  It seems surpising to me that a multitidue (all?) of the important concepts in thermodynamics are derived from legendre transformations, and moreover that the legendre transformation is also the basis of hamiltonian fornalism. Why is this mathematical formalism so fundamental? I would not have been able to know this just based on looking at the definition of the legendre transformation itself.

I would like to know the physical meaning of the , if there is any? I've used it in thermodynamics and classical mechanics and it seemed only a change of coordinates?


I am trying to create a div using $A.createComponent but its throwing error.  `$A.createComponent("aura:HTML",         {              "tag": "div",             "HTMLAttributes":{"id": "filter-"+ component.get('v.index') +"", "Text":"Test"},             "class":""         },         function(result, status, errorMessage){              if (status === "SUCCESS") {                 $A.createComponents(components,                                     function(components, status, errorMessage){                                          if (status === "SUCCESS") {                                            var divElement = document.getElementById("filter-" + component.get("v.index"));                                            //var divElement = component.find(component.get('v.targetDiv'));                                            console.log('Div element');                                            var elementBody = divElement.get("v.body");                                          }                                      }                                      );                        }           }        );   Please ignore if any missing brackets are there I may have made mistake while copying it.  It throws that divElement does not have get method or divElement is undefined. I know that component.find(component.get('v.index')) is trying to assign some value which never exist.  how can I over come this situation?

I would have expected that when a dynamically created lightning component is assigned as another component's attribute of type Aura.Component[],  also referencing it in the parent component's markup by including something like {!v.attributeName}, then the parent component's JavaScript would be able to find that Facet by calling component.find() and passing in the aura:id value of the dynamically created component.  I have attempted this, but the result of the find() call is undefined. Code samples are below.  The parent component with the "stepData" facet... (created to test the stepData component during the development process)  <aura:component > <aura:attribute name="stepData" type="Aura.Component[]"/>  <aura:handler name="completedActionFired" event="c:actionComplete" action="{!c.captureDataResult}" /> <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>  {!v.stepData}   <ltng:require styles="{!$Resource.SLDS202 + '/assets/styles/salesforce-lightning-design-system.css'}"/>  <lightning:layout horizontalAlign="space">     <lightning:layoutItem flexibility="grow" padding="horizontal-medium">         <lightning:button variant="brand" label="Get Object Data" onclick="{! c.getObjectData }" />

         <lightning:button variant="brand" label="Find Component and Get Object Data" onclick="{! c.findObjectData }" />

     </lightning:layoutItem> </lightning:layout> </aura:component>   The parent component controller, where findObjectData() cannot find the Facet component by its aura:id, but getObjectData() can get it by using the attribute name...  ({ doInit : function(component, event, helper) {     var dataMap = {         "testString" : "test value",         "testMap" : {"key1":"value1", "key2":"value2"}     };      var attributes = {         "aura:id" : "stepData",         "dataMap": dataMap     };      $A.createComponents(         [[ "c:stepData", attributes ]],         function(results) {             component.set("v.stepData", results[0]);         }     ); }, findObjectData : function(component, event, helper) {     // try finding component by aura:id     var stepData = component.find("stepData");     if(stepData == null) {         console.log('stepData is not found');         return;     }      // try calling aura:method on stepData     var result = stepData.getObject("testString");     console.log(result); }, getObjectData : function(component, event, helper) {     // get stepData by accessing attribute     var stepData = component.get("v.stepData")[0];     console.log(JSON.stringify(stepData.get("v.dataMap")));      // able to get dataMap attribute from stepData component     var dataMap = stepData.get("v.dataMap");     console.log(dataMap.testString);      // able to call aura:method, but does not return any value to caller     var result = stepData.getObject("testString");     console.log(result); } })   Lightning Component Tree shows the aura:id included on the stepData component reference...    console log shows the "get" button clicked, then the "find" button clicked, where "stepData is not found" indicates find() and aura:id did not successfully locate the dynamically created Facet component.


I was in the middle of watching a movie on Netflix, then suddenly everything started crashing. First, explorer.exe closed down, then Google chrome. I had multiple things running in the background (Steam, Raptr, etc.). Individuality, each of those apps closed down also. When they did, a small dialog box popped up for each of them, one at a time, saying that it was missing a file, it couldn't run anymore, or something similar to that. It also had some jumbled up "code" with numbers and letters that I couldn't read.  Ever since then, everytime I turn my computer on, it will run for a few seconds and give this error "Reboot and select proper boot device or insert boot media in selected boot device and press a key_". No matter how many times I try to reboot it, it always gives me the same error.  A day later after this happened I was able to start the computer, but before it booted, it told me that I didn't shut down the computer properly and asked how I wanted to run the OS (Run Windows in Safety Mode, Run Windows Normally, etc.). Once I logged, everything went SUPER slow and everything crashed almost instantly. The only thing I opened was Microsoft Security Essentials and only got in about two clicks before it was "Not Responding". Then, after that the whole computer froze and I had to restart it. Now, it's back to saying what it originally said, "Reboot and select proper boot device or insert boot media in selected boot device and press a key_".  I built this PC back in February 2012. Here are the specs: OS: Windows 7 Ultimate CPU: AMD 8-core GPU: Nvidia GTX Force 560 Ti RAM: 16GB Hard Drive: Hitachi Deskstar 750GB  I'm usually very good taking care of my PC. I don't download anything that's not from a trusted site or source. I don't open up any spam email or such or go to any harmful websites like porn or stream movies. I am very clean with the things I do with my PC and don't do many DIFFERENT things with it. I use it pretty often especially for video games and doing homework in Eclipse. Also, good to note that I don't have any Norton or antisoftware installed. I have Microsoft Security Essentials installed but never did a scan.

My computer no longer boots Windows or the installed operating system. Instead, I may get this error:  PXE-E61: Media test failure, check cable -or- Check cable connection!  PXE-M0F: Exiting PXE ROM.   and/or one of the following messages or similar:  Operating System not found  No boot device available- No bootable devices--strike F1 to retry boot, F2 for setup utility  No bootable device -- insert boot disk and press any key  No Boot Device Found. Press any key to reboot the machine  Default Boot Device Missing or Boot Failed  Reboot and Select proper Boot device or Insert Boot Media in selected Boot device   What does this mean and what can I do?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I was trying to install Skype, but everytime I can't connect to an IP-address. My wifi is fine, my computer as well. I don't know what it could be. Presently I am using Ubuntu [15.04] version and am new to this environment. Kindly fix this problem.  It says:  missing cdrom://Ubuntu 15.04 Vivid Vervet - Release amd64 (20150422) vivid/main amd64 Packages  missing cdrom://Ubuntu 15.04 Vivid Vervet - Release amd64 (20150422) vivid/restricted amd64 Packages missing cdrom://Ubuntu 15.04 Vivid Vervet - Release amd64 (20150422) vivid/main i386 Packages  missing cdrom://Ubuntu 15.04 Vivid Vervet - Release amd64 (20150422) vivid/restricted i386 Packages

When updating I got this error message:  W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources  404  Not Found   What to do?


I have a university issued Mac on which I do not have root access. I noticed a weird problem in the behavior of which and presumably lstat. I want to know if this is Mac thing, or a setting changed by the IT department. Now the problem: I installed TeXLive in user mode (I know this is not typical on Macs, but ...),and adjusted the path. I can run the programs, but which does not find them. This is a problem because TeXLive depends on the determining directory the binaries are in. I can fix the problem by aliasing the names of the binaries to include the full path. But some other utilities (LaTeXML, I think) seem to break. Here is the output from bash that illustrates the problem. Note that 'kpsewhich' runs but fails while kpsewhich, aliased to the full path name works as intended. I also don't understand why kpsewhich seems to look for ./kpsewhich.  $ echo $PATH /Users/rao.3/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/texlive/2020/bin/x86_64-darwin:~/LuaDist/bin $ alias kpsewhich alias kpsewhich='/Users/rao.3/texlive/2020/bin/x86_64-darwin/kpsewhich' $ kpsewhich keyval.sty /Users/rao.3/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty $ 'kpsewhich' keyval.sty lstat(./kpsewhich) failed: ./kpsewhich: No such file or directory kpathsea: Can't get directory of program name: ./kpsewhich $ which kpsewhich $ which 'kpsewhich' $ which which /usr/bin/which

I noticed the Linux shell command 'which' does NOT show an executable file although it is alredy on the search path.   More specifically, my $PATH includes '~/.local/bin'; an executable file is ~/.local/bin/charm. 'which charm' returns nothing although I can run 'charm' with no problem. I am using Ubuntu 16.04 and bash  The issue depends on Linux distribution. If I log on to another machine of RHEL 6.10, the command 'which charm' works fine for the same executable.  The issue may also relate to nfs mount. On Ubuntu 16.04, the command 'which' seems to work fine for executables on local disks, for example, 'which which' shows '/usr/bin/which', but it does NOT find execuatables on nfs paths, which is the case for my '~/.local/bin'.   I searched online but couldn't find exaplaination. Is there a way to make the command 'which' under Ubuntu show all mached executables on path including nfs mounts?   Thanks!


I am building a structure with purpur blocks but I am unhappy because I don't like the look of purpur blocks.   I'm looking for a command that can replace the purpur blocks with dark oak wood planks and the purpur pillar with dark oak wood logs.

I'd like to be able to select a region (either with a graphical utility or command line) and be able to switch one block type with another, e.g. change all cobblestone in the region to stone. Does a program/mod exist that can do this?


According to what I was taught as school, the past tense of 'get' is 'got' and 'gotten' is "an American corruption and, therefore, is not a proper word".  Example:     "Should auld acquaintance be forgot,   And never brought to mind?" — opening lines for Auld Lang Syne   Note that this is not as follows, which seems to be popular usage:     "Should auld acquaintance be forgotten, And never brought to mind?"

I see these two expressions are used almost identically in different contexts. Is there a difference between I have got and I have gotten?


I have two files: a.patterns contains patterns in a one per line way  "`" "^" "<" "<(" "<)" "<[" "=" ">" "_;|^+*+?@"   and b.data contains comma separated values.  1,1,0,"*",1 2,1,1,"*",1 3,0,0,"<)",0   The purpose is to substitute take each pattern matched in the csv file with that pattern's index (i.e., its line number).   The problem is that I load each pattern into a variable, and use sed to evaluate/replace it but frequently the patterns contain special characters.   ... while read line; do   counter=`expr $counter + 1`   temp=`echo "$temp" | sed "s/$line/$counter/"` done < a.patterns ...   My question: is there a way to tell sed to count the contents of the variable as literals? Ideally I would like to avoid inserting escape character for all special characters in the pattern file or alternative ways to achieve the same?  Thank you.

I'm a relative Linux novice.  Suppose that I have a text file a.txt that contains the following text:  A B C   Now, if I want to change the text on line 2 (which contains B), I can use the following sed command:  sed -i '2s/^.*$/X/' a.txt   to change the B to X, for example.  But now suppose that I want to write an sed command that changes the text on line 2 to something that includes a bash string variable.  I want to change the text on line 2 to fname="myaddress", where the quotation marks are included explicitly, and where myaddress is a bash string variable (defined somewhere else).  To try to do this, I have created a bash shell script called mytest.sh and containing the following:  #!/bin/bash  myaddress="/home/" echo fname=\"$myaddress\"  head a.txt sed -i '2s/^.*$/fname=\"$myaddress\"/' a.txt head a.txt   Now, echo fname=\"$myaddress\" prints fname="/home/", which is the text that I want to be on line 2 of a.txt.  However, sed instead prints fname="$myaddress" to line 2 of a.txt, probably because it is inside the surrounding apostrophes.  In other words, the output of the above bash shell script is:   fname="/home/" A B C  A fname="$myaddress" C   My question is, how can I get sed to actually print the value stored in myaddress and referenced by $myaddress?


So, I want to change my browsers scroll bar to something a little nicer looking like the scrollbar that www.twitch.tv uses.  But then I noticed that not many other websites change their scrollbars. Is there a reason for that?  Is it best to leave them as default?

So, I want to change my browsers scroll bar to something a little nicer looking like the scrollbar that www.twitch.tv uses.  But then I noticed that not many other websites change their scrollbars. Is there a reason for this?  Is it best to leave these as default?


Let $X \sim N(0,1)$, and let $P(Y=1)=P(Y=-1)=\frac{1}{2}$. Assume $X$ and $Y$ are independent, and let $Z = XY$. Prove that $Z \sim N(0,1)$ and $Cov(X,Z)=0$ For proving $Z$ is a standard normal variable, I thought using MGF would be a good idea, but could not relate that to $Z = XY$ and given conditions for variable $Y$.

Let $X\sim N(0,1)$ and let $Z$ be a random variable independent of $X$ such that:  \begin{equation} \Pr(Z=z) = \begin{cases} \frac{1}{2} & \mbox{if $z = -1$ or $z=1$}, \\ \\ 0 & \mbox{otherwise}. \end{cases} \end{equation}   Define $Y = ZX$. Show that $Y \sim N(0,1)$. Determine $\operatorname{Cor}(X,Y)$. Are $X$ and $Y$ independent?   Progress:  I'm basically stuck at the beginning. I got as far as $P(ZX < y) = P(Z < y/X)$, which I'm not even sure is correct. I'm also not clear on what it means by defining $Y = ZX$ - does it mean I need to state the probability density function or something? And how do I show that $Y \sim N(0,1)$?


I got a multiple-entry, short-stay, category “C” Schengen States “D” visa valid for 1 year with a duration of 90 days.  a) Does the 90-day thing in a one-year period mean that I can freely spread out my travel dates throughout that one year? For example, visit Germany in January for 21 days, come back again in April for another 21 days then in August for 21 days and finally in October for the last remainder of the 90 days?  b) Or does it mean that once I enter the Schengen area, my 90 days start counting down? For example, if I enter Germany on the 1st of January then my visa expires after 90 days (in March) regardless of whether I stayed in Germany throughout those days or not?

Are there any areas that should be avoided and are there any steps I should take to protect myself from radiation?


How do I install a specific version of duplicity. The one I have is duplicity 0.6.21 and the one I want is 0.6.18

I want to setup a new virtual machine with some specified packages (name and version), that are provided.  For example apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one should be installed.  The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.  I currently know of some possibilities that install the exact packages, but do not scale that good:   Copy all required *.deb to every virtual machine manually and enter: dpkg -i ... -> Could work, but it is very error prone. (Manual scripts etc.) Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories. Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.   My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages.


I'm trying to understand tensors, but I've come across the following question:        Let $T^{\mu\nu}$ by a $(2,0)$ tensor. Give the definitions of $T_\mu^{\,\nu}$, $T_{\mu\nu}$, and $T^{\mu}_{\,\nu}$. Then give explicit formulas for the following components in terms of components of $T^{\mu\nu}$: $T_{00},\,T_{10},\,T_{12},\,T_0^{\,1},\,T_1^{\,1},\,T_0^{\,0},\,T^1_{\,1}$   $$T_\mu^{\,\nu}\equiv\eta_{\mu\sigma}T^{\sigma\nu} \\    T_{\mu\nu}\equiv\eta_{\sigma\mu}\eta_{\rho\nu}T^{\sigma\rho}\\   T^\mu_{\,\nu}\equiv\eta_{\sigma\nu}T^{\mu\sigma}$$      I'm finding it hard to understand these definitions. I really don't know what these tensors represent or what it means when both the indices are raised? Also are these standard definitions in special relativity or is it more likely that they are just made up by my professor for this assignment? I've always thought that things with two indices are matrices in general.

I have a pretty good knowledge of physics, but couldn't deeply understand what a  is and why it is so fundamental.


Suppose I have files named: 93162-117352 - May 24, 2017 345 PM_16_163_student.csv  I want to rename it to be: 16_163_student.csv  How do I do this with rename?

I'm using the Linux rename command line tool to search recursively through a directory to rename any directories as well as files it finds. The issue I'm running into is the rename command will rename a sub-directory of a file then attempt to rename the parent directory of the same file. This will fail because the sub-directory has been renamed resulting in a "No such file or directory"  Command:  rename -f 's/foo/bar/' ** rename -f 's/Foo/Bar/' **   For example, here is an original file that I would like to replace 'foo' with 'bar'  File:  /test/foo/com/test/foo/FooMain.java   Failure:  Can't rename /test/foo/com/test/foo/FooMain.java /test/bar/com/test/foo/FooMain.java: No such file or directory   Preferred File:  /test/bar/com/test/bar/BarMain.java   You can see from the error message that it's attempting to rename the parent directory but at that point the subdirectory has already been changed resulting in the file not found error. Is there parameters for the rename command that will fix this or do I need to go about this in a different way?


Recently I saw . The person was asking how to circumvent a restriction in someone else's web application which was made intentionally to prevent exactly what he was trying to do.  The question was put on hold with the reason "unclear what you're asking", but I don't believe that the question was actually unclear. I suspect that the real reason why people decided to close this question was because of ethical reasons.   Should there be a new close-reason like this:     Put on hold as ethically questionable      This question is about trying to do something which is ethically questionable or might violate the law. The community has thus decided that it should not be answered.

I recently happened across this question:    The OP asks about writing code in C/C++ to make a file "hidden or undeletable." Rather than close or downvote the question for its (rather obvious) flaws, the majority of the community jumped on the OP for "reek[ing] of viral intentions."  To me, that question doesn't necessarily only have applications in the malware market. But even if it does, is it within the purview of the community to close it for such? It's still a valid programming question, is it not? It just struck me as a bit much that three different commenters asked about possible legitimate uses for such code, with one going so far as to warn the OP that IPs are logged at SO.


I'm a newbie in embeded system and basic electronics ,Yesterday i purchased a esp8266 wifi module from amazon along with ftdi usb driver i'm also have an Arduino uno, esp8266 require 3.3 v . Arduino and ftdi driver has a 3.3v pin but the tutorial i watched suggest that not connect esp with arduino or ftdi ,so how can i start working with esp from a 9v battery?

What's a good way to reduce the output from a 9V battery to the 1.8V to 5V required by an ATmega328 controller? The context is a small robotics platform with low power requirements (very slow movement).


I have a Canon 7D (EF-S) and was thinking of buying a Tamron SP 24-70mm f/2.8 Di VC USD G2 lens (model number AO32) for the Canon EF mount.  Will this lens be ok for my camera?

I have a canon 760D. It has a EF-S lens mount. Am I able to use a EF lens with my camera?


A rectangle is inscribed in the ellipse x^2/400 + y^2/225 = 1 with its sides parallel to the axes of the ellipse (Figure Q5). Find the dimensions of the rectangle of maximum perimeter which can be so inscribed.  How do i find the dimensions of the rectangle of maximum perimeter. I honestly have no clue where i should start, It would be really helpful if someone can provide a step-by-step for this solution. (The question and diagram is linked below)  Thanks in advance

The problem I've been stuck on is this:  A rectangle is inscribed in the ellipse  $$\frac{x^2}{20} + \frac{y^2}{12} = 1$$ What is the maximum perimeter of the rectangle?  I don't even know if I'm taking the right approach. So far, I've been trying to solve for $y$, giving me $y = \sqrt{12-(3/5)x}$, and plugging that into the equation $P = 4x + 4y$, which should be the equation for the perimeter of an inscribed rectangle. I then took the derivative of $P$ after plugging in the equation for $y$, giving me $$P' = 4 - \frac{12x}{5\sqrt{12-(3/5)x}}.$$ To find a maximum, I'd set the equation to zero right? Well, I don't know where to go from this step, since simplifying from here only seems to make it harder.  Any help would be much appreciated, even a nudge in the right direction. I have no idea where to go from here, or even if I got to the right place. Thanks for your time


Problem is, I make an empty array and it stays empty until a user is on my page and inputs their "username" and their "ID" and clicks a button.   I have to check the array for duplicates so I want my code to check the array, if nothing with the same name exists then add it into the array. Here is my code that does not work  var myArray = [];   function arrayChecker(inputName, inputID) {     for (var key in myArray) {         if (myArray.hasOwnProperty(key)) {             console.log(key, myArray[key]);         } else {             myArray.push({"name": inputName, "id": inputID});                    }     }   }   This does not work however. Any ideas?

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


I was just wondering if there's a (hypothetical) situation where a photon could accelerate and what the consequences of this might be?

Photons travel at the fastest speed in our universe, the speed of light.  Do photons have acceleration?


We are given a whole number $n \geq 1$ and independent Random variables $X_n$ with distribution $Poi(n)$ and $Y$ with distribution $Poi(2n)$. Determine $\lim_{n \to \infty} P(X_n+n = Y_n)$.  I tried to write the probability as$\sum_{k=0}^{\infty}P(X_n=k)P(Y_n=n+k)$ but I didn't make progress. I suspect I need to use one of the limits laws (Central limit, large numbers, small numbers) but I am not sure how. Suggestions?

A pitcher contains $X + 1$ blue balls and $Y + 1$ red balls. It is known that $X, Y$ are independent random variables, and it is given that $X \sim \mathrm{Poisson}(n), Y \sim\mathrm{Poisson}(2n)$. Calculate the limit: $\displaystyle\lim_{n\to \infty}\mathbb P (X + n = Y) $   I tried to condition on the value of $Y$ and to use the Law of total probability but it did not lead to a solution. ( I tried to sum: $ \sum_{i=0}^\infty\mathbb P(X+n=Y|Y=i)\mathbb P(Y=i) $ and get an expression that I can calculate its limit as n goes to infinity)


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


Blender 2.90.1 on Windows 8.1 I created a simple mesh object last week (Plane.002 - default name), extruded it to make a rectangular solid, then I edited one of the edges (CTRL+B) with a nice 3-segment bevel. Now I've decided it will render better with more segments. Where are the bevel params stored for Plane.002 so that I can change Segments=3 to Segments=7 ? Can it be edited? Thx!

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


I searched but could not find how to suspend particular user in Ubuntu 12.04. I found the following option:  dbus-send --system --print-reply \     --dest="org.freedesktop.UPower" \     /org/freedesktop/UPower \     org.freedesktop.UPower.Suspend   However suspend the current user. I want root user to suspend another user. How to do this ?

I'm uing ubuntu 12.04 desktop. I have 3 users: user1(administrator), user2(standard) and guest. I wanted to disable user1 and enable user2 which auto logs on with no password but after I did that I can't login to user1 and user2 accounts except the guest session user. I'm striped off every administrative privileges. I don't know which options are available to me and how do I enable root or user which is an administrator?


I think this is a rather simple question but, I cant make this work: I have a whole lists of variables eg:  SP60=OLA SP61=BYE SP62=TRT   I want to create a loop to call them in the specific number of the variable so I thought a short solution could be:  for i in {60..62}; do SP=$"SP$i"; echo $SP.txt; done   I was expecting the outcome to be:  OLA.txt BYE.txt TRT.txt   but I get   SP60.txt...   I would like to know if there is a simple way to get this done.

I'm sure it is relatively simple, I just don't know how to do it.  #!/usr/bin/ksh set `iostat` myvar=6   I want to something like echo ${$myvar} which i want interpreted as ${$myvar} -> ${6} -> value


How do I find the sum of $\displaystyle 1+{2\over2} + {3\over2^2} + {4\over2^3} +\cdots$   I know the sum is $\sum_{n=0}^\infty (\frac{n+1}{2^n})$   and the common ratio is $(n+2)\over2(n+1)$ but i dont know how to continue from here

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


states that electrons and protons are bonded together by emitting electromagnetic waves and absorbing each other's electromagnetic waves. But isn't because it due to potential energy of each other?  Which is right?

Given that:  1) virtual photons mediate the electric and magnetic force fields  2) the magnetic field is the curl of the magnetic vector potential  3) the electric field is the negative gradient of the electric scalar potential  How do we understand the vector and scalar potentials in terms of virtual photons?   Specifically, I mean curl-free magnetic vector and gradient-free electric scalar potential fields, where no electromagnetic waves or physical forces are present.   For instance, what's actually happening outside of the solenoid in the Aharonov-Bohm experiment that alters the phase of the passing electron? Are virtual particles involved there? This question has really stumped me because I only have an undergrad level of understanding in physics. Thanks for any help.


As I was following a lecture the instructor seemed to assume this and when on solve for the equations where the right side was equal to 0 and proceed with the problem but I know if a determinant is non zero than an inverse matrix exists and visa versa but I cannot seem to relate this to this.  In any event I cannot see the intuition as to why when the determinant is non zero then there are or is a non trivial solution.  I assume in this case the equations are homogeneous.  Thank you

While I was solving problem to determine if given set of vectors are linearly independent or not, the solution given was that the coefficient matrix A of the homogeneous linear system of those vectors   k1a1 + k2b1 + k3c1 = 0  k1a2 + k2b2 + k3c2 = 0  k1a3 + k2b3 + k3c3 = 0  was a 3x3 square matrix, and determinant(A) = 0  Thus it has a non trivial solution and hence the vectors are linearly dependent.  I am unaware about how if A is nxn square matrix and if determinant(A) = 0, then the system is having a non trivial solution.


How can I know when should I use whether or if in a sentence? I can not see any difference between whether and if. When should I use each? For me, they are the same and I am not sure if there is a difference.

Are if and whether equivalent in sentences like the ones below?     How to determine if my saddle is too high?   How to determine whether my saddle is too high?         We should check if everything is okay now.   We should check whether everything is okay now.


I recently started my PhD and now try to find a convenient software for managing my literature research. What I want it to be able to do is:   Let me highlight PDFs Add notes to PDFs Add tags to my literature (as a bonus:) load methadata and create bibtex files   I personally really like Mendeley as it does pretty much exactly that. At my institute we have a strict open source policy though, which excludes Mendeley. Is there an open source alternative to Mendeley, which runs under Linux Gnome?   Thanks for your input.

is (mainly) a proprietary social network to share basic citation data and research papers.   Are there any free and open source substitutes for this service?   A technical possibility: users could collect BibTeX data and a hash and share this information.  It would be very useful to have such a free service because every journal provides the citation data in a different format. That includes false field entries, broken files and hidden download buttons on the website.


I have fitted model to my data and estimated parameters both using R and Matlab. Here are my results:          Estimate  Std. Error  t value Pr(>|t|) mu     -0.000188    0.000386 -0.48707 0.626206 omega   0.000002    0.000002  0.87820 0.379837 alpha1  0.062080    0.019779  3.13870 0.001697 beta1   0.925053    0.021205 43.62490 0.000000   Do I have to reject both mu and omega parameters? Is it really that bad? Does my model not fit the data well at all? Or have I missunderstood something?

I've estimated an ARMA-GARCH model. All the parameters except the intercept ($\omega$) in the GARCH part are significant. So I tried to estimate the model again imposing that $\omega = 0$. I compared the information criteria of the two models and found out that keeping omega in the model gives the model a better fit.  Questions:   Does it make sense?  Can I keep $\omega$ in the model, although it appears non significant at 5% level, just because of better information criteria? Is it rigorous from a statistical point of view?


I submitted my paper to World Scientific journal for a week ago. The "Editor invited" status stayed since the submission, and then it changed to "Decision in Process" directly. It seems strange. Normally “editor invited” comes after manuscript screening. Why was there no "with editor" status and why did it change to "Decision in Process"?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I have always wondered how illustrations like above are drawn. What is the usual and efficient way? Do designers do sketches first and then trace over them or there is a technique?  It looks specially crafted to look hand drawn, but still is clear in its function. This style is most used in videos describing some new website etc.  I would like to produce this either using Photoshop or Illustrator and I can use a graphic tablet.

I have a raster image, basically a scanned drawing of the outlines (and some detail) of various objects, and I wish to convert these lines to vectors, using either Illustrator or Inkscape.  My present solution is to have the raster image as a background layer, and in a new layer above it I use the pen to follow the lines as close as possible.  Later I tweak these lines to fit the raster image better. That has worked fine for simple drawings. However for some of my extremely complex drawings, this is very tedious to do.  Is there any tool or filter of some sort that is capable of recognizing the lines in line drawings and creating vector paths from them?


Been having multiple obscure movie nights with my jail broken Firestick. One popped into mind and its vehicle related. It's NOT Damnation Alley, Battletruck or Spacehunter. All I can recall is is more apocalypse based and it has a weird black SUV that makes even weirder sounds (imagine Knightrider)  as it drives around thru the wasteland. I've googled my tail off trying to even find a pic of it. Any help is appreciated.

I'm looking to identify an 80s movie. It was kinda like Mad Max. All I can remember is the main character had a crystal mask, and when he put it on he was in front of a tree, which bled when he hit it with an axe. Then he pulled the mask off and he was returned to where he was before he put on the mask.


In my scene I want to use one camera rotating an object until a specific frame and after that I want to change that camera to another camera. Any help will be appreciated. Thanks.

I have multiple cameras in a scene. What I want to do is to change which one is active. This way I can view the scene from different angles. How would I do this?


I have created a activity according to RadioButton that user choose. i didn't know why my code was not working. this is my non working code.(i want to change background color when user checked radiobutton)  public class RegisterActivity  extends Activity {     /** Called when the activity is first created. */ RadioButton rbRed; RadioButton rbBlue; TexView header; @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     requestWindowFeature(Window.FEATURE_NO_TITLE);      setContentView(R.layout.cafechoice);      rbRed = (RadioButton) findViewById(R.id.radioRed);     rbBlue = (RadioButton) findViewById(R.id.radioBlue);     header = (TextView) findViewById(R.id.textview);      rbRed.setOnCheckChangeListener(radio_listener);     rbBlue.setOnCheckChangeListener(radio_listener);  } final CompoundButton.OnCheckedChangeListener radio_listener = new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {     if (!isChecked)         return;     if (buttonView.getId() == R.id.radioRed)     {     header.setBackgroundColor(Color.parseColor("#E23DA4"));     }     else if (buttonView.getId() == R.id.radioBlue)     {     header.setBackgroundColor(Color.parseColor("#548BF7"));     } } };   logcat showed up error on  rbRed.setOnCheckChangeListener(radio_listener);   caused by java.lang.nullpointerexception

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


Is there a way I can set the email address used by php's mail() function without getting caught by spam filters?  If I don't add a from header the email is sent from apache@ip-17....3.us-west-2.co....rnal which isn't the worst name because most mail services just shorten to Apache.  But I would like to have that be noreply.mydomain.com  If I add a from header and put anything else it seems to always get caught by spam but not if just left to default.  My setup is PHP 7 on linux Amazon EC2 Micro

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


Specs Windows 10 Pro 64 bit  Intel i7-4810MQ Nvidia K3100M --- [Nvidia Graphics Driver 354.56] --- [Nvidia nView 146.90] comes with graphics driver above. Intel HD Graphics 4600 --- [Intel Graphics Driver v10.18.15.4268] 500 GB Crucial SSD 32 GB Kingston 1866 SODIMML RAM And some other miscellaneous stuff that probably doesn't matter.  Hopefully the image will explain what is happening.  I am just learning Blender and I am trying to render the monkey head. I set the resolution to 1080p HD TV and then 500%. That should strain the pc right? Well when I run the render, all 8 CPU cores go through the roof. I am guessing my Video card is not helping with the process.  I think that I have all the settings correct. Why am I not able to select the graphics cpu under the render tab?

For some reason Blender does not use my GPU when rendering, even though I have my card selected in the user preferences   When I render, my CPU usage goes up to 100% and MSI Afterburner shows no increase of GPU usage. It also doesn't show an option to change my compute device in the system area or whatever   However, when I switch to Cycles Render, it gives me the option to use my GPU, but not when I am in normal Blender Render. Is there a way to fix this or is it set like this for some reason?


If I'm unhappy about something a binary does, let's say /sbin/ip, how do I find the source code and where to send a patch to?

I would like to know where to find the source code of Ubuntu. I'd like to see how far it is "open source".


I clicked on the logo for Stack Overflow to go back to the home page and it told me no questions were found. This also happens when I open a new tab and go to stackoverflow.com.        My last view had been tags=WPF with the Needs Answer tab selected, so I know there are plenty of questions here.  I had noticed going back to the main page was being obnoxiously slow today, so suspect this is just a timeout instead of an actual problem with no results found.  Can you fix the slowness of going back to the main page of SO by clicking on the logo? Alternatively, perhaps load the default SO page if a timeout occurs retrieving the user's last used question filter.  (PS. I'm  of having the logo go back to the default view of SO in all cases, with no filters applied. That would be my preferred "solution") :)  Edit I do not think this is an exact duplicate of  because I obtained this message by going to StackOverflow's homepage, not by using search results. In addition, the only answer posted there is .   Having a message that there are no questions on the homepage seems like a bigger deal than encountering that message when searching, and additional code may be required to handle this correctly.  Edit #2 I just went to stackoverflow.com from a new browser window, and got the same error screen.   I didn't realize my previous filter was cached and re-used when I visit the page in a separate session. This seems like something that should definitely be addressed if timeout issues are common.

Steps to reproduce:   Click on StackOverflow icon   Click on popular tab   Click to sort by votes   Click to show all time     I could manually reproduce that every time I tried.  The following is a print screen of the message shown after going through the steps:    And if I subsequently do a F5 refresh, it works.  And considering the fact that I clicked on all time option, it makes me think that what happened, actually, was a timeout.  If my guess is right, I think that . So, while resolving the performance issue (therefore,  avoiding the timeout), a proper timeout message and a link to refresh the page would be a perfect fallback.  Note that it might not related to timeout - it was just a guess on the issue - it could, for example, be some weird caching problem due to current . Anyway, it still seems to be a bug.


I have a Windows 10 system SSD (C:) and a non-system HD (D:) in two partitions of the disk (total of 3). D used to be the old system drive before installing Windows 10 on the SSD, which may explain why it has this folder in the first place.   While trying to merge the two D: partitions using AOMEI partition assistant, I have encountered a problem with the Users folder. On closer inspection I can see a little shortcut icon for All Users folder on D: linking it to C:      How can I unlink the two? If I delete something from D:\users\All Users\Microsoft for example, which is the problematic folder that AOEMI cannot process, it will be deleted from the same location in C: since they are one and the same.  Any help will be appreciated!

I created a symlink using mklink.  Now I need to change it but I can't figure out how to delete it so I can recreate it correctly.


Often I'm writing a command in a bash prompt, where I want to get previous arguments, in the CURRENT line I'm typing out, and put in other places in the command. A simple example, would be if I want to rename a file. I would  type out the mv command type the filename I want to move, ~/myTestFileWithLongFilename.txt now I want to just change the extension of the file that I supplied in the first argument, without typing it again.  Can I use history or bash completion in some way to autocomplete that first argument? $ mv ~/myTestFileWithLongFilename.txt ~/myTestFileWithLongFilename.md  I know of course I could execute the incomplete command, to get it into the history, and then reference it with !$, but then my history is polluted with invalid commands, and I'm wondering if there's a better way

I was just typing something along the lines of:  mv foo/bar/poit/zoid/narf.txt   and suddenly realized, damn, I have to type large parts of that parameter again  mv foo/bar/poit/zoid/narf.txt foo/bar/poit/zoid/troz.txt   Even with tabcompletion, quite a pain. I know I can copy paste the parameter by mouse-selecting the text and middleclick but that is not good enough. I want to remain on the keyboard.  So is there a way to copy paste the current parameter of the line using the keyboard?


I have seen several newspaper sites that have started to restrict the number of articles the user is allowed to read, before being prompted to register/subscribe.  e.g.   I know how to programatically restrict the number of articles a user is allowed to read, but I do not want to block Googlebot or other search engines from being able to index all my articles.  It seems like some forum software has a way where Googlebot has their own login account and are able to index all the pages still. I'm not sure just detected the UA would be sufficient as someone could easily spoof that.  Is there a recommended way to do this?

I have a real estate site that we require the user to login after viewing 3 properties.  Is it possible for Google to index these property listings while still keeping that functionality in place?  What is the best way to handle this on the up and up with Google?  Thanks!


I am trying to import a csv file to my website using PHP code. The mysqli_real_escape_string is working but the next column of the table doesn't have a data when I checked it on the database.  I've tried adding mysqli_real_escape_string to all of the arrays ($impData) but it was unsuccessful all the data will not be added except for the column that has (') on it which is the $impData[10] and $impData[14].          //check if input file is empty     if(!empty($_FILES['file']['name'])){         $filename = $_FILES['file']['tmp_name'];         $fileinfo = pathinfo($_FILES['file']['name']);              //check file extension         if(strtolower($fileinfo['extension']) == 'csv'){                 //check if file contains data             if($_FILES['file']['size'] > 0){                    $file = fopen($filename, 'r');                 $flag = true;                 $date_created = date("Y-m-d H:i:s");                 while(($impData = fgetcsv($file, '', ',')) !== FALSE){                     $sql = "INSERT INTO asset_inventory (asset_type, asset_device, computer_name, serial_number, asset_tag, status, status_type, claim_status, claim_date, floor, workstation_number, unit, segment, assigned_user, purchase_order, invoice_number, vendor, brand, model, date_received, snow_ticket, rcs_owner, notes, date_created) VALUES ('".$impData[0]."', '".$impData[1]."', '".$impData[2]."', '".$impData[3]."', '".$impData[4]."', '".$impData[5]."', '".$impData[6]."', '".$impData[7]."', '".$impData[8]."', '".$impData[9]."', '".mysqli_real_escape_string($impData[10])."', '".$impData[11]."', '".$impData[12]."', '".$impData[13]."', '".mysqli_real_escape_string($impData[14])."', '".$impData[15]."', '".$impData[16]."', '".$impData[17]."', '".$impData[18]."', '".$impData[19]."', '".$impData[20]."', '".$impData[21]."', '".$impData[22]."', '".$date_created."')";                     if($flag) { $flag = false; continue; }                     $query = $conn->query($sql);                      if($query){                         $_SESSION['message'] = "Data imported successfully";                     }                     else{                         $_SESSION['message'] = "Cannot import data. Something went wrong";                     }                 }                 header('location: ../inventory.php');              }             else{                 $_SESSION['message'] = "File contains empty data";                 header('location: ../inventory.php');             }         }         else{             $_SESSION['message'] = "Please upload CSV files only";             header('location: ../inventory.php');         }     }     else{         $_SESSION['message'] = "Unable to upload CSV: File empty";         header('location: ../inventory.php');     }  }  else{     $_SESSION['message'] = "Please import a file first";     header('location: ../inventory.php'); }   I expected to import all the data to the database even without (') on it.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I would like to travel to London next week but I don’t know exactly how to get from Gatwick airport to London downtown. I was thinking about a transport service like Uber.  I don’t really like to go by train/underground or bus because then I have to change too often. And a cab is probably too expensive. Can anyone give me some information about the situation with transport services?

What's the most straightforward way to get from Gatwick airport to Paddington station in London using public transport?   I'm mostly interested in travel time & general smoothness of the trip (e.g. buying just one ticket for the whole trip would be nice). Price is a secondary concern.


I am studying for a public exam and see   Before answer, I read about chmod and understood that the permission are split in 3 groups (user, group, other), like this:      Nível  u   g   o Permissão rwx r-x ---   Binário 111 101 000     Octal  7   5   0   So, why are there more than 9 (3x3) char in the permission string (-r--rwx-rw-)

I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me.   For example, I've read that you've got three different permission groups:   owner (u) group (g) everyone (o)   Based on these three groups, I now know that:   If the file is owned by the user, the user permissions determine the access. If the group of the file is the same as the user's group, the group permission determine the access. If the user is not the file owner, and is not in the group, then the other permission is used.   I've also learned that you've got the following permissions:   read (r) write (w) execute (x)   I created a directory to test my newly acquired knowledge:  mkdir test   Then I did some tests:  chmod u+rwx test/ # drwx------ chmod g+rx test/ # drwxr-x--- chmod u-x test/ # drw-r-x---   After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this command.    But...  I still have a few questions:   What does the d at the start stand for? What's the name and use of the containing slot and what other values can it hold? How can I set and unset it? What is the value for this d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) Why do people sometimes use 0777 instead of 777 to set their permissions?   But as I shouldn't be asking multiple questions, I'll try to ask it in one question.  In UNIX based system such as all Linux distributions, concerning the permissions, what does the first part (d) stand for and what's the use for this part of the permissions?


I'm trying to run the following:  find . -user user_name -o -group user_group -exec chown root. {} \;   But after running the command it doesn't alter the ownership of any files. If I run without the -exec it produces a list of all the files I expect to be modified correctly.  If I use:  find . -user user_name -exec chown root. {} \; find . -group user_group -exec chown root. {} \;   The files are updated as expected. I see in the man page that:  expr1 -o expr2           Or; expr2 is not evaluated if expr1 is true.   expr1 -or expr2           Same as expr1 -o expr2, but not POSIX compliant.   However, the files are owned by user_name:user_group. The first case should evaluate to true and run the exec command unless I'm misunderstanding something here. Can someone explain why this is working this way?  Some system info if needed:  find (GNU findutils) 4.4.2 CentOS release 6.8 (Final)

I want to execute a command for an each file that matches a pattern. But the command that seems to be right, doesn't work for me, I have no idea why.  $ find . -type f -name '*.c' -or -name '*.h' -or -name '*.cpp' -exec ls {} \; $ ls script.sh  test.c  test.h


I have a couple of select2 'controls'  <select id="SizeID" class="js-example-basic-multiple" multiple="multiple"  style="">         //                           </select>  <select id="ColorID" class="js-example-basic-multiple" multiple="multiple"  style="">         //                           </select>   By using the following, i can get the selected values.  $('select').select2().on("change", function (e) {     log(e.val); })   But how can i get the id of the select2 that triggered the change event?

Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); <script type="text/javascript" src="starterkit/jquery.js"></script>  <form class="item" id="aaa">   <input class="title"></input> </form> <form class="item" id="bbb">   <input class="title"></input> </form>     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.


Electromagnetic and gravitational interactions are similar - they are mediated by massless particles, they have infinite range and they diminish with $1/r^2$. The main difference is that gravity is always attractive while electromagnetic force is not. A photon intermediating electromagnetic force has spin 1 while graviton should have spin 2. What is a reason for different spin values of photon and graviton?

I have often heard that the gravitational field has spin $2$. How can I read the spin of the field from the Einstein-Hilbert action  $$S=\int \! \mathrm{d}^4x \,\sqrt{|g|} \, \mathcal{R} \, \, \, ?$$


This question is motivated by . But I imagine that it would also be useful in teaching contexts where you want to create a dataset that exactly mirrors an existing published dataset.  I know how to generate random data from a given distribution. So for example, if I read about the results of a study that had:   a mean of 102, a standard deviation of 5.2 , and  a sample size of 72.   I could generate similar data using rnorm in R. For example,   set.seed(1234) x <- rnorm(n=72, mean=102, sd=5.2)   Of course the mean and SD would not be exactly equal to 102 and 5.2 respectively:  round(c(n=length(x), mean=mean(x), sd=sd(x)), 2) ##     n   mean     sd  ## 72.00 100.58   5.25    In general I'm interested in how to simulate data that satisfies a set of constraints. In the above case, the constaints are sample size, mean, and standard deviation. In other cases, there might be additional constraints. For example,    a minimum and a maximum in either the data or the underlying variable might be known. the variable might be known to take on only integer values or only non-negative values. the data might include multiple variables with known inter-correlations.   Questions   In general, how can I simulate data that exactly satisfies a set of constraints? Are there articles written about this? Are there any programs in R that do this? For the sake of example, how could and should I simulate a variable so that it has a specific mean and sd?


Now i know this much: If we take this in the forward direction that is if $a|b$ then $ac|bc$ then we can say that since $b = ak$ where $k$ is some integer, then $ac|ack$ which is true for all integer k. Now for the backward direction, we have $ac|bc$ and $bc = ack$ which becomes $b = ak$ and hence $a|ak$ which is again true for all integers. Is my proof correct?

Prove the biconditional statement. For $a,b,c$ positive integers, $ac$ divides $bc$ if and only if a divides $b$.


I have coded a vertical navbar and I want to center the lists vertically, but somehow it doesn't work and I don't want to use the line-height property, because it changes the margin too. I'd really appreciate some help. Here's the code:      * {             padding: 0px;             margin: 0px;         }          .navbar {             position: absolute;             height: 100%;             width: 10%;             background-color: aquamarine;             transition: 0.5s ease-in;         }          .navbar:hover {             width: 90%;         }          .navbar:hover li{            width: 100%;            opacity: 1;        }          li {             text-align: center;             transition: 0.5s ease-in;             opacity: 0;             margin: 10px;             vertical-align: middle;         }          a {             text-decoration: none;             color: black;             font-size: 20px;         }

Home

About

Services

Feedback

Contact

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I have a beautiful Calphalon chef's knife that has served me well for years. However, lately I've noticed that it is quite dull, and the blade slips sometimes when cutting tomatoes and onions. How can I sharpen it without spending a fortune?

I've finally put down the money to buy a quality knife and it's sharpness is amazing!  How do I take care of it so that the edge lasts and the knife stays sharp?


I want to show that $(1+\frac{x}{n})^n \leq e^x$ for all $x \geq -n$, $n\in \mathbb{N}$. I already showed that positive case ($x>0$) and zero case $(x=0)$. Not sure how to approach the negative case, because in the case $x>0$ I used that $x^n$ is an increasing function on $(0, \infty)$. But I can't do the same when $x$ is negative.

It is well known that we can define $e^x$ by the following limit  $$e^{x}=\lim_{n\to\infty}\left(1+{x\over n}\right)^n$$  I would like to show that the RHS sequence is always less than or equal to $e^x$ for all $-n\le x\le0$ and $n>1$, and what I had currently done is to study the property of this sequence (which is defined as $f(x)$)  $$f(x)=\left(1+{x\over n}\right)^n$$  I also find its first and second derivative $f'(x)=\left(1+{x\over n}\right)^{n-1}$ and $f''(x)={n-1\over n}\left(1+{x\over n}\right)^n$ and show that they are strictly positive for all $x\in[-n,0]$. As a result $f(x)$ is monotonically increasing and concave up. By plugging in the end points I found that $f(0)=1\le e^0$ and $f(-n)=0<e^{-n}$, I wonder if these conditions allow me conclude that $f(x)\le e^x$ for all $x\in[-n,0]$.


I have tried to install ubuntu-restricted-extras and vlc,  but I'm getting this:  $ sudo apt-get install ubuntu-restricted-extras [sudo] password for aashay:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package ubuntu-restricted-extras  $ sudo apt-get install vlc Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


hopefully somebody can help with this query I have a domain name and if I do a Google search for "maine valley properties" one of the top results is this domain cutestat.com. Cutestat is some crappy domain ranking engine and they have effectively hijacked the name. I obviously would not want customers clicking on it. Does anybody know firstly how have they managed to do this ? I don't understand how it is possible to have .com twice in a domain name. Second question is how do I stop this domain name appearing in Google search results. I have looked at the WHOIS record for cutestat and they have a whole host of top level domains registered for example com.cutestat.com net.cutestat.com org.cutestat.com using this method it looks as if these people could effectively hijack any domain name.

What are the best ways to improve a site's position in the Google search results?


I have a domain object called User. Properties of user include ssoId, name, email, createdBy, createdDate and userRole. Of these, ssoId must be unique in the sense no two users can have the same sso id. So my equals method checks for the sso id and returns either true or false.  @Override public boolean equals(Object o) {     if (!(o instanceof User))       return false;     return user.getSsoId().equals((User)o.getSsoId()); }   What I feel is that this is an incorrect implementation, though it is correct as far as the business rules are concerned. The above implementation will return true for two objects with same sso id but with different values for say name or email or both. Should I change my equals contract to check the equality of all fields? What is your suggestion?

What issues / pitfalls must be considered when overriding equals and hashCode?


Can my 4 year old son tell if I am pregnant, and if so how far along do I have to be in order for him to tell?   I should be about two weeks along. A couple of my co workers says I am, that they can tell just by looking at me. One said she noticed first thing this morning.

My wife is in the early stages of pregnancy with our second baby. Our daughter, who is 1 year and 5 months old, has been acting unusually cranky.    Some family members have mentioned that she's acting that way because she can tell her mommy is pregnant.   Is that possible?


I want to find the image of the function that defined as $\exp(x+iy)=e^x(\cos(y)+i\sin(y))$ for $z\in L$ where $L=\left\{z\in \mathbb C \mid a\mathrm{Re}(z)+b\mathrm{Im}(z)+c=0 \right\}$ and $a^2+b^2\ne 0$.  I tried to get to an expression for $z$ uing the identities $\mathrm{Re}(z)=\dfrac{z+\bar z}{2}$ and $\mathrm{Im}(z)=\dfrac{z-\bar z}{2i}$ but I got to a dead end.   How should I approach this problem?

I'm trying to find out what is the image of the group $L=\{z\in\Bbb C\mid a\operatorname{Re}(z)+b \operatorname{Im}(z)+c=0\,; a^2+b^2\neq0\,; a,b,c\in \Bbb R \}$ under the function $e^z$ in the Imaginary-real plane. In other words, find $\{e^z\mid z\in L\}$.  Correct me if something is not good in the question.  I understand it should be something like a spiral, but I don't really understand how to show it.


I am using typescript, I have an existing JSON response below coming through an API, {     "product":{     "prodId": "PROD100"     },     "packages":{     "pkgId": "PKG137"     },     "discount":"50",     "periodFrom":null,     "periodTo":null,     "totalAmount": "599",     "isActive": "false" }  I have another small JSON, which I want to append at the top of it "customer":{     "custId":"CUST1002"     },  Final Structure: {     "customer":{     "custId":"1002"     },     "product":{     "prodId": "PROD100"     },     "packages":{     "pkgId": "PKG137"     },     "discount":"50",     "periodFrom":null,     "periodTo":null,     "totalAmount": "599",     "isActive": "false" }  How do I achieve the same using push or unshift, or is there any best practice for the same in JavaScript or in typescript. Kindly suggest me

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I have HP workstation Z440 : Xeon W3520 and I want to make on it Ubuntu server. Is it compatible?  thank you.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


What is really responsible for the feel of electric shocks? Is it voltage or current or both  ? explain me in detail

Though voltage and current are two interdependent physical quantity, I would like to know what gives more "shock" to a person - Voltage or Current? In simple words, will it cause more "electric - shock" when the voltage is high or Current is more?


Knowing that for any set of real numbers $x,y,z$, such that $x+y+z = 1$ the inequality $x^2+y^2+z^2 \ge \frac{1}{3}$ holds.   I spent a lot of time trying to solve this and, having consulted some books, I came to this:  $$2x^2+2y^2+2z^2 \ge 2xy + 2xz + 2yz$$ $$2xy+2yz+2xz = 1-(x^2+y^2+z^2) $$ $$2x^2+2y^2+2z^2 \ge 1 - x^2 -y^2 - z^2 $$ $$x^2+y^2+z^2 \ge \frac{1}{3}$$ But this method is very unintuitive to me and I don't think this is the best way to solve this. Any remarks and hints will be most appreciated.

We have $x, y, z \in \mathbb R$ such that $x+y+z=1$. Prove that $x^2+y^2+z^2 \geq \frac{1}{3}$. I am able to do this using the relationship between the power and arithmetic means. Is there a way to not use this relationship?


I use listings package with single frame around it, when i place long comments in my code color of comments affects frame color. Frame around lines with comments are green. I want frame to be black, always.  \documentclass{article} \usepackage{tikz} \usepackage{listings} \begin{document} \lstset{language=C++,         basicstyle=\ttfamily,         keywordstyle=\color{blue}\ttfamily,         commentstyle=\color{green}\ttfamily,         frame=single,          breaklines=true, }   \begin{lstlisting} void foo() {   for (int i=0 ; i<VALUES_SIZE ; i++)   {     int x=i*2;//some very long comments about actual code in this line     int y=i*2;//some really very very very long comments about actual code in this line spreading over two or three long lines   } } \end{lstlisting} \end{document}

I am using lstlisting to show some code in my PDF. The problem is that when I use:    basicstyle=\fontfamily{pcr}\selectfont\footnotesize\color{red},   to change the code color (not only the language keywords), the frame color changes too. What I want to achive is to have the source code all red and the frame black. Here my lstset:  \lstset{      language=C++, % choose the language of the code     basicstyle=\fontfamily{pcr}\selectfont\footnotesize\color{red},     keywordstyle=\color{black}\bfseries, % style for keywords     numbers=none, % where to put the line-numbers     numberstyle=\tiny, % the size of the fonts that are used for the line-numbers          backgroundcolor=\color{darkgray},     showspaces=false, % show spaces adding particular underscores     showstringspaces=false, % underline spaces within strings     showtabs=false, % show tabs within strings adding particular underscores     frame=single, % adds a frame around the code     tabsize=2, % sets default tabsize to 2 spaces     rulesepcolor=\color{gray}     captionpos=b, % sets the caption-position to bottom     breaklines=true, % sets automatic line breaking     breakatwhitespace=false,  }


I was going through my activity history and noticed that some of my edits was revised.   the revision history of that answer.   I always looked at messages like that as at unnecessary noise and something that isn't really welcomed here. So, is it really accepted on StackOverflow to put such kind of footer notes to your answers?  I'm asking because I still don't have 2K reputation on StackOverflow, and therefor i don't have much experience in editing questions and answers apart from suggesting edits.

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


$\hskip8pt$ Definition. If $A$ and $B$ are sets, then $A$ is a subset of $B$ iff every element of $A$ is also an element of $B$.  The empty set $\{\}$ is a subset of every set because, if $A$ is an arbitrary set, then every element of $\{\}$ is also an element of $A$. This statement is said to be "vacuously true" because $\{\}$ has no elements.  But what about statements that imply the negation of this?  Namely: the empty set $\{\}$ is not a subset of any set because, if $A$ is an arbitrary set, then not every element of $\{\}$ is an element of $A$. Couldn't this statement be vacuously true because $\{\}$ has no elements?  What about: the empty set $\{\}$ is not a subset of some sets because there exists a set $A$ with the property that not every element of $\{\}$ is an element of $A$. Couldn't this statement be vacuously true because $\{\}$ has no elements?  I understand that the fact that the empty set is a subset of every set (by vacuous truth) is merely a convention (I might be wrong, and it might be a necessity, to avoid contradictions or something). Is it possible to develop a (contradiction-free) mathematical formalism where we adopt the opposite convention? If so, what are the consequences?

Recently I learned that for any set A, we have $\varnothing\subset A$.  I found some explanation of why it holds.     $\varnothing\subset A$ means "for every object $x$, if $x$ belongs to the empty set, then $x$ also belongs to the set A". This is a vacuous truth, because the antecedent ($x$ belongs to the empty set) could never be true, so the conclusion always holds ($x$ also belongs to the set A). So $\varnothing\subset A$ holds.   What confused me was that, the following expression was also a vacuous truth.     For every object  $x$, if $x$ belongs to the empty set, then $x$ doesn't belong to the set A.   According to the definition of the vacuous truth, the conclusion ($x$ doesn't belong to the set A) holds, so $\varnothing\not\subset A$ would be true, too.  Which one is correct? Or is it just a convention to let $\varnothing\subset A$?