When i finish installing Ubuntu 12.04.1amd 64bits TLS alongside with windows 8 on my laptop it was not showing ubuntu at the start-up boot but it just boot to windows 8. how do i get the ubuntu i installed?

I have an X-series Asus laptop which I just bough about a month ago. I want to dualboot Ubuntu - Windows.  I can easily access LiveUSB with both UEFI enabled and disabled. I heard that there were problems with UEFI, so I disabled it. After I've installed the system I couldn't access it. It just boots to Windows straight.  Another unusual thing, that never happened to me before was that the partition editor wanted me to create a BIOS reserved area, which I did, but not at the beginning of the table.  Any ideas how to access the Ubuntu partition?  As far as I can guess both Windows and Ubuntu have to be both of the same type of boot, either Legacy or EFI. This is not the case of what I have now. So, if I reinstall Ubuntu in UEFI mode that correlates with my Windows type, will I then be able to boot into it?  I have a constraint, my laptop doesn't have a CD ROM, so I cannot reinstall WIndows, nor can I move around the Windows recovery partition.  This is the boot-repair report :    SOLUTION  I've enabled UEFI in BIOS, and reinstalled Ubuntu with UEFI enabled. It works fine now, although if I select Windows from the GRUB menu, it doesn't work. But I can live with that, since I can just select Windows boot from the BIOS instead.


What (did) scared(scare) him more? If his date wanted to be serious or if she   didn't?   Do I need a did there? Why or why not?

What time does sound good to you?     What time sounds good to you?    Is there a difference?


I have written two concept for adding or initializing two string  just want to know in both concept final str1 reference will be change from starting ?    string str1="A";       str1="B"; string srt1="A"+"B";   Please answer me in concept of stringBuilder   thanks

I understand the difference between String and StringBuilder (StringBuilder being mutable) but is there a large performance difference between the two?   The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice?


Is it a broth, a sauce, a beverage, or other? this was a question posed to me and I have clue how to answer this.

Just curious, no other answer seems to be specific. I'm not looking for a discussion here, just an answer and an explanation.


I started with a hard and unsuccessful way by putting the coefficcients into the matix. I need to solve the system of equation for any natural number n.

I started with hard way of putting the coefficients into a matrix. But, iz did not help.  the following system of linear equations:


Is this okay or does it require a different approach? Let $R$ be a commutative ring with unity. Suppose that the only ideals of $R$ are $\{0\}$ and $R$, show that $R$ is a field. Attempt:Since $\{0\}$ and $R$ are the only ideals, $\{0\}$ is maximal, thus $R/\{0\} \cong R$ so $R$ is a field since $R/\{0\}$ is a field.

Let $R$ be a commutative ring with identity. Show that $R$ is a field if and only if the only ideals of $R$ are $R$ itself and the zero ideal $(0)$.  I can't figure out where to start other that I need to prove some biconditional statement. Any help?


So, I've got my screen-saver set to come on after 5 minutes,    … and my display to sleep after 1 hour:    Unfortunately, I get up every morning, and the displays are still running Aerial. I really, really don't want to burn out my expensive 5k monitors by powering them 24/7.  How can I ensure that 1. my computer requires my computer requires my password after a few minutes, 2. my displays don't turn off until they've been idle for a few hours (they take forever to boot back up — ~10 seconds before I can log-in when I sit down), and 3. my displays do turn off after a sufficient idle-period?

I got a brand new mid-2015 MacBook Pro 15", OSX 10.11.3.  Display never turns off even it is configured to turn off after 10 mins in power adapter AND in battery mode. Screen saver (aerial) stays active forever. I tried disconnecting all USB peripherals connected - it did not help.  Any ideas?


In the current story, the PC's are chasing after a traitor from their kingdom. They are working with the Spymaster to chase him down and catch or kill him. The Spymaster is going to suggest a pincer move to stop the traitor from simply running away.  I need a way the Spymaster can keep in contact with the party over long distances (10s of miles at the least). Preferably instant but it doesn't have be two-way, just short messages to each other would be perfect.  Are there any spells or magical items in 5th Edition D&D that can do this?  Homebrew answers will be accepted if they have been play-tested.

In our 5e game, we stole a boat. And a horse carriage. And a lot of other stuff for moving things between cities.   Our DM meant for this to be a way to skip road encounters. We decided to fund a shipping company and hire managers (Knights retainers, etc.) to turn a profit. The DM ruled that these would cover lifestyle expenses, provide us with easy smuggling, etc.   However, we want to keep tabs on the treasure we're moving back and forth.   What can we use for communicating with our managers from anywhere in the world? What about from say, across the city?  We don't need to communicate often or for long - a single round will work. All we need is for the manager to say "we need you back"


I'm facing a question regarding random variables:     A coupon website has N distinct kinds of coupons. Each selection of a   coupon is equally likely and selections are independent. Let $T$ be a random variable representing the number of   coupons, $n$, that one should collect until he has at least one coupon   of every kind.   I need to determine the probability function $P(T=n)$. How should I approach this question?

We roll a die until each side appears at least once, then we stop.     What is the probability of rolling exactly $n$ dice?   I guess the answer is  $$6-6\left(\dfrac{5}{6}\right)^n\;,$$  but this may be wrong.  In trying to solve this problem, I read , but I couldn't solve the problem.


I need to print a newline character to a file with a C program running in windows and compiling with MinGW. However, it has to print \n only, instead of \r\n.  Take for example the following program:  #include <stdio>  void main() {     FILE * fid = fopen("out.txt", "w");     fprintf(fid, "\n");     fclose(fid); }   Reading the created file in Matlab with the command:  text = int32(fileread('out.txt'))  Yields:  1x2 int32 row vector  13 10  Yet, somehow, I need it to print only 10 and not the 13 (=\r) character.

What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);


I'm considering deleting my profile on one site, but want to know something before I proceed. Is a user deleted in one Stack Exchange site deleted in all of them? Can I delete only the one profile?

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


This piece of code    String Str = new String("${project_loc:A}/Foo.yaml;${project_loc:B}/Bar.yaml"); System.out.println(Str.replaceFirst("[$][{].*[}]/", ""));   prints   Bar.yaml   while what I am trying to achieve is:  Foo.yaml;${project_loc:B}/Bar.yaml   Why is it stopping at second closing braces i.e. }, not at first?   What regex exp can be passed to replaceFirst() to achieve the desired result?  FYI: I tried few things at  but couldn't find any success.

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}?


I am building a python program to check for security of a home network and for that I need a way to check if a computer has internet connection and if yes I want the IP address of the machine to which it has connected to the network. So for example my computer is connected to my home router and my local IP address(address of my computer on the router) is 192.168.22.128 i want my program to print that ip address for me.

How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?


I'm currently getting these errors, I've tried doing a few things to see if that would help. I even used the debugger to find out why these errors are occurring, but i'm still not sure.  If anyone would be able to help it would be really appreciated.  I tried looking at the suggested post and i made the fixes suggested, however this didn't help, the errors still remain the same.  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at c3537779.ByteReader.getBytes(ByteReader.java:14)     at c3537779.BytePattern.patternParse(BytePattern.java:37)     at c3537779.FileChooser.PatternOpen(FileChooser.java:95)     at c3537779.GUI$OpenPatternAction.actionPerformed(GUI.java:74)     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)     at javax.swing.AbstractButton.doClick(Unknown Source)     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)     at java.awt.Component.processMouseEvent(Unknown Source)     at javax.swing.JComponent.processMouseEvent(Unknown Source)     at java.awt.Component.processEvent(Unknown Source)     at java.awt.Container.processEvent(Unknown Source)     at java.awt.Component.dispatchEventImpl(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Window.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)     at java.awt.EventQueue.access$500(Unknown Source)     at java.awt.EventQueue$3.run(Unknown Source)     at java.awt.EventQueue$3.run(Unknown Source)     at java.security.AccessController.doPrivileged(Native Method)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)     at java.awt.EventQueue$4.run(Unknown Source)     at java.awt.EventQueue$4.run(Unknown Source)     at java.security.AccessController.doPrivileged(Native Method)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.run(Unknown Source)

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?


As I asked in title, I would like to know what is conformal bootstrap and what's its application in renormalization group, and how to understand it (in a simple way).

I want to start looking at the . I've heard very interesting things about it but would like to clear some things up first.   I taken QFT at the level of Peskin & Schroeder, written a bachelors thesis on quantum integrability, know complex analysis up to things like mobius transformations and conformal mappings, functional analysis and algebraic topology. Then stuff like EM with Jackson and QM with Merzbacher's books etc.   What resources are best for working up to the conformal bootstrap?   From what I've seen the bootstrap seems to be heavily numerical. I'm extremely used to exact analytical expressions so would like to know the use of the bootstrap, particularly in relation to N=4 SYM (recently looked through a paper on this topic but it was above my level) or even general QFT.


Why is it that when I add up the product of cofactors for one row and a corresponding element of any other row , the answer is 0? For example:   This seems to work for all matrices but I'm unable to figure out why.

Given a matrix $A=(a_{ij})_{n\times n}$, let $C_{i,j}$ be the cofactor in position $(i,j)$. By the determinant formula, we have  $$\det A=\sum_{i=1}^n a_{i,1}C_{i,1}.$$  What about if we take a different column for the cofactors, that is  $$\sum_{i=1}^n a_{i,1}C_{i,2}$$  Must this evaluate to zero?


I was reading Dirichlet and Thomae's functions and got interested to know about functions which are continuous nowhere. Since these have a lot to do with rationals and irrationals, the next question that came to my mind is:   what about a function which is rational at all irrational points and irrational at all rational points?   Is this function continuous?   I will tell you a brief sketch of my approach. I first proved that if our function assumes a constant rational value for every irrational, but varying irrational values for the rationals, then by Sequential Criterion of Continuity, this function is not continuous. But what about the general case i.e. the function assumes varying irrational values for varying rationals and varying rational values for varying irrationals? I could not proceed further.  Any hint or help will be appreciated.

Is there a way to prove the following result using connectedness?  Result:  Let $J=\mathbb{R} \setminus \mathbb{Q}$ denote the set of irrational numbers. There is no continuous map $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(\mathbb{Q}) \subseteq J$ and $f(J) \subseteq \mathbb{Q}$.


Is there a way or some sort of library that lets you compare string easily? It's difficult to explain, but here's an example:  str = "Hi World!"  if str == "(Hello | Hi) World!":    print("You said either 'Hi World!' or 'Hello World!'")   In this example (of course, it wouldn't actually work,) if the string is either 'Hi World!' or 'Hello World!,' then it would return True. I am pretty sure that there's a name for this, but I am not sure what it is.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Linux see only 1/2 of my ram My RAM size is 2048mb, but linux see only 1300mb. Why? No, it's not buffered, because ubuntu free command don't print free buffered RAM Here is output of command free    Lubuntu 16.04 x32

I have an Asus G50vt-x5 laptop with 4GB of RAM installed. But Ubuntu 10.10 shows only 3GB of RAM. Why is it only showing 3GB of RAM instead of the full 4GB? output of free command is :  neal@ubuntu:~$ free              total       used       free     shared    buffers     cached Mem:       3095668    2972784     122884          0     747996    1590044 -/+ buffers/cache:     634744    2460924 Swap:            0          0          0


I'm getting a Malformed line 2 in source list /etc/apt/sources.list.d error.  Error message:   E: Malformed line 2 in source list /etc/apt/sources.list (type) E: Malformed line 2 in source list /etc/apt/sources.list.d/official-package-repositories.list (type) E: The list of sources could not be read.    File Content from /etc/apt/sources.list:   deb http://archive.ubuntu.com/ubuntu bionic main universe ttp://archive.ubuntu.com/ubuntu bionic main #Added by software-properties universe properties universe .com/ubuntu bionic main #Added by software-properties universe properties universe properties universe   Note: I have tried many options, but nothing is working, so sharing the source.list file content.

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


What is the difference between "He comes from the U.S." and "He is from the U.S."?  Can you always use them interchangeably, or is there a subtle difference between them?

I am from China. I come from China.  What is the nuance between them? likewise:  Where are you from? Where do you come from?  Are there any nuance between them?


I want to find and replace the logical "or" operator (||) from my sequence. How can I do it?  Following is the code, I'm trying  import re  sequence = "if(ab||2) + H) then a*10" expr = re.sub(r"||","_or_",sequence) print (expr)   Expected answer should be   if(ab_or_2) + H) then a*10

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I don't really know where to start with this one. Can you just ignore the $f(..)$ and deal exclusively with what's inside the brackets?

Can Some one tell me what this method is called and how it works With a detailed proof   $$\int_a^bf(x)~dx=\int_a^bf(a+b-x)~dx$$  I've been using this a lot in definite integration but haven't seemed to have realized why it is true.  But whatever it is it always seems to work.  Basically a proof of how it is always true.


After watching a proof of the set of computer programs being countable, I thought of the following argument: Consider the sets of real numbers (of the form $0.xxx...$) with $0$, $1$, $2$, $3$, $...$ significant decimal places. Each of these sets is finite as it has $0$, $10^{1}$, $10^{2}$, $10^{3}$, $...$ elements respectively.  Now, there are countably many of these sets, as I can list them using the number of significant decimals as index.  Finally, I have seen a proof (using a zig-zag argument) that the countable union of at most countable sets is countable. But, we just showed (seemingly) that the reals can be written as such an union, so they must be countable!? What may have I done wrong?

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


I have found the first derivative which is $y′=6x^2+6x−36$.

I know I have to find the first derivative which is $y'=6x^2+6x-36.$ Then I set it to $0.$ Which I got $0 = 6(x^2+x-6)$ and then $x=-3$ or $x=2.$


Let $\mathbb{K}$ a field, $V$ a vector space over $\mathbb{K}$. If $T:V\to V$ commutes with all other linear operators $V \to V$, then there exists $\lambda \in \mathbb{K}$ such that $T= \lambda I$, where $I$ is the identity V.

The question is from Axler's "Linear Algebra Done Right", which I'm using for self-study.  We are given a linear operator $T$ over a finite dimensional vector space $V$. We have to show that $T$ is a scalar multiple of the identity iff $\forall S \in {\cal L}(V), TS = ST$. Here, ${\cal L}(V)$ denotes the set of all linear operators over $V$.  One direction is easy to prove. If $T$ is a scalar multiple of the identity, then there exists a scalar $a$ such that $Tv = av$, $\forall v \in V$. Hence, given an arbitrary vector $w$, $$TS(w) = T(Sw) = a(Sw) = S(aw) = S(Tw) = ST(w)$$ where the third equality is possible because $S$ is a linear operator. Then, it follows that $TS = ST$, as required.  I am, however, at a loss as to how to tackle the other direction. I thought that a proof by contradiction,  ultimately constructing a linear operator $S$ for which $TS \neq ST$, might be the way to go, but haven't made much progress.   Thanks in advance!


I can't afford a new door so how can I repair it.  How much will it cost me to install a new door

Some time ago I closed my front door (rather forcefully) while the deadbolt was sticking out partially.  This loosened the deadbolt, and the top screw no longer held. In addition, it cracked the door on the interior side. I've attached a picture showing the damage.   The door works mainly, though it can be difficult to lock sometimes, especially when the weather gets colder.  I'm currently renting, and will soon be moving out of this house, once I buy a house. I would like to repair this door myself, and I'm hoping I don't have to replace the entire door.  Is this something that can be repaired? If so, how? I realize that a new deadbolt is probably needed, but how can I repair the wood damage around it?


I have a laptop Asus X453S. And it has a Windows 10. I tried to downgrade it to Windows 7 and I was able to clean the partition. I already set up the BIOS. And when I tried to boot the USB there is a message “Reboot And Select Proper Boot Device or Insert Boot Media in selected Boot device”.  Please help me.

I have an Asus R500VD laptop which came with the preinstalled Windows 8. As actually this computer will be used by my grandmother (and she's only using win 7) I'd like to downgrade it.  Thanks to other thread here, I was able to successfully boot computer from Windows 7 USB stick, but unfortunately during install I got a message:  A required CD/DVD drive device driver is missing. (...)   and I can't get pass it... This is what I've done:   I've downloaded all drivers from Asus Website (), unzip and copied to visible location for windows 7 installation - I've picked each one of them, none has helped. As I belive it's some kind of problem with SATA/RAID/AHCI drivers I went to Intel site and downloaded various "Intel Rapid Storage Technology" drivers - a lot of them were recognized by win7, but none of them helped.   Does anyone have an idea what can I do next? Any help would be really appreciated.


I know this is rather subject to opinion but what are some good choices where on the file system to locate the source code of a build that the server builds (let's say it's a build/integration server)? E.g. there is /usr/src but I think that is rather a conventional location for shell-related stuff (correct me if wrong). How about /usr/local/src?  E.g. right now I check out foo (one of our apps we integrate) source code in /var/lib/foo but I think that may be a misleading reference. Of course it doesn't matter for execution purposes but I am trying to get in line with the convetions.

I wanted to put my work files (code) in /usr/local/src, but I think it's already a folder that has some other semantic meaning.  What is that? Should I put source code there, or is there a better place?  Edit - I am the sole user and admin of the machine, and I don't want to use my home directory because it's on an NFS drive.


This question has been asked before for  but my question is about free RAW editors such as LightZone, Dark Table or Rawtherapee. More detail follows. I've turned off all in-camera modifications that affect the JPG file. But still when I open a RAW file in one of the above software it looks much different from the preview JPG inside the RAW file.  Of course I can use the software to edit the result to my liking but sometimes I just want to get the JPG (a higher quality version of the JPG inside the RAW file) quickly in Linux. Do I need a camera profile of some kind?

I'm a novice shooting in RAW and find that half the time my camera JPEG images come out better than my Lightroom tweaks to RAW files.  So to give myself a better start I'd like to apply the JPEG settings that are applied automatically by the camera to my RAW files in lightroom so that initially my RAW files look exactly like the JPEG files.   How can I do this?


I am having a hard time coming up with WORDS to explain why is the derivative of a sine function a cosine function? Why? How do I write a few sentences saying why this happens? I follow example after example solving similar problems but still don't understand enough to put into words.  I would appreciate some help.  Thanks, Tony.

One of the first things ever taught in a differential calculus class:   The derivative of $\sin x$ is $\cos x$. The derivative of $\cos x$ is $-\sin x$.   This leads to a rather neat (and convenient?) chain of derivatives:   sin(x) cos(x) -sin(x) -cos(x) sin(x) ...   An analysis of the shape of their graphs confirms some points; for example, when $\sin x$ is at a maximum, $\cos x$ is zero and moving downwards; when $\cos x$  is at a maximum, $\sin x$ is zero and moving upwards.  But these "matching points" only work for multiples of $\pi/4$.  Let us move back towards the original definition(s) of sine and cosine:  At the most basic level, $\sin x$ is defined as -- for a right triangle with internal angle $x$ -- the length of the side opposite of the angle divided by the hypotenuse of the triangle.  To generalize this to the domain of all real numbers, $\sin x$ was then defined as the Y-coordinate of a point on the unit circle that is an angle $x$ from the positive X-axis.  The definition of $\cos x$ was then made the same way, but with adj/hyp and the X-coordinate, as we all know.  Is there anything about this basic definition that allows someone to look at these definitions, alone, and think, "Hey, the derivative of the sine function with respect to angle is the cosine function!"  That is, from the unit circle definition alone.  Or, even more amazingly, the right triangle definition alone.  Ignoring graphical analysis of their plot.  In essence, I am asking, essentially, "Intuitively why is the derivative of the sine the cosine?"


A friend of mine is constantly switching between different laptops that he's working on and he would like to have a Live USB with persistent storage (For Firefox bookmarks, email, etc.) that he can save to the live USB drive so that it all transfers as he's moving between machines.  Is there a way to do this with Ubuntu Startup Disk Creator so that USB drive has a partition that is mounted to a user home directory on startup?

I want to make a persistent live Ubuntu USB drive with more than 4GB of storage.   I know there is an option of installing directly on the drive but I don't want to do this as it will restrict the drive from working on different computers.   One option is to make an additional partition with extra space but if I do this how can I get newly installed software to be stored on this partition?


I want have three subfigures in a special order. One on the right, two on the left. Therefor I found a snippet . Alone the snippet works fine, you can check this by comment out the first figure-enviroment.  The problem is, that I have a lot of subfloats in my document and the packages subfig and subcaption are incompatible.  Is there a way to use normal subfloats and also get the 3-subfigure-example running?  Best, TomBoo!  minimal example:  \documentclass{article} \usepackage[demo]{graphicx} \usepackage{caption,subcaption} \usepackage{subfig}  \begin{document}  \begin{figure}[htb]     \centering         \subfloat[test figure one \label{fig:1:test1}] {\includegraphics[width=0.30\textwidth]{image1}}         \qquad %         \subfloat[test figure two \label{fig:1:test2}] {\includegraphics[width=0.30\textwidth]{image1}}     \caption{test figures}   \label{fig:1:tests} \end{figure}  \begin{figure} \begin{minipage}[c][11cm][t]{.5\textwidth}   \vspace*{\fill}   \centering   \includegraphics[width=5cm,height=10cm]{image1}   \subcaption{test figure one}   \label{fig:2:test1} \end{minipage}% \begin{minipage}[c][11cm][t]{.5\textwidth}   \vspace*{\fill}   \centering   \includegraphics[width=5cm,height=4.5cm]{image1}   \subcaption{test figure two}   \label{fig:2:test2}\par\vfill   \includegraphics[width=5cm,height=4.5cm]{image1}   \subcaption{test figure three}   \label{fig:3:test3} \end{minipage} \caption{another test figures} \label{fig:2:tests} \end{figure}  \end{document}

I want to use subfigures to place three figures like this:    The following is the code I used:  \begin{figure} \begin{tabular}{|c|c|} \hline \multirow{2}{*}{         \begin{subfigure}[h]{0.3\textwidth}                 \centering                 \includegraphics{Fig2}                 \caption{Argumentation Framework $I$}                 \label{fig:afexampleI}         \end{subfigure}                }         &          \begin{subfigure}[h]{0.6\textwidth}              \centering              \includegraphics{Fig3}              \caption{Argumentation Framework $III$}              \label{fig:afexampleIII}          \end{subfigure} \\         &          \begin{subfigure}[h]{0.6\textwidth}              \centering              \includegraphics{Fig4}              \caption{Argumentation Framework $II$}              \label{fig:afexampleII}          \end{subfigure} \\ \hline \end{tabular} \caption{Argumentation Frameworks}\label{fig:afexample} \end{figure}   However, this is the result:    P.S. I used \hline in order to better illustrate the figures, otherwise there should be no borders for the tabular environment used.


I did the following to achieve an UI for taking in path file  bpy.types.Scene.skeletonImporter = bpy.props.StringProperty(name="Import skeleton.xml path", default = "", description="Import which skeleton.xml file?", subtype = 'FILE_PATH') bpy.types.Scene.meshImporter = bpy.props.StringProperty(name="Import .mesh path", default = "", description="Import which .mesh file?", subtype = 'FILE_PATH')   which give me this relative path when I try and open a file.    However, I wish to take in the absolute path for my files. How do I go about doing that?  There's no subtype called ABS_FILE_PATH (which would be useful in my situation).

Functions such as os.path.exists(image.filepath) fail when Blender uses relative paths, This seems to be because Blender uses // prefix for relative paths, unlike the more conventional ./.  How can standard Python filesystem functions be used correctly on Blender paths?


So as you can see the faces are there, but the object is not in wireframe. It is in solid. How do I make it so the faces appear? I have tried alt+H and pressing z too many times to count.

I'm new to Blender and this site, so I apologize in advance if I'm not following any of the proper etiquette.  I'm no artist, but I'm trying to learn Blender so that I have some programmer art for me to work around in Unity.    I followed a tutorial for making a basic human model, I rigged it with rigify, and now I'm starting to export it following yet another tutorial.  The thing is, when I was trying to rig the model, I couldn't get the model to go transparent so that I could see the bones inside the model.  Eventually, I managed to get it into wireframe mode, but I can't get it back into solid mode.    It's probably just a display thing and not a property of the model itself, but I want to be sure.  I'm looking at the display options under the "Figure" pane in Blender, and none of the Display check boxes are checked, including the one that says "Wire".  I don't want to import a plain wireframe model into Unity, and even if that doesn't happen, this is functionality of Blender that I should really know anyway, so I'd appreciate any help that anyone has to offer.  If necessary, I can upload the .blend file, but I'm not sure what site people would prefer that I upload it to.


I've been struggling for several hours, trying to prove this horrible inequality: $(a_1+a_2+\dotsb+a_n)\left(\frac{1}{a_1}+\frac{1}{a_2}+\dotsb+\frac{1}{a_n}\right)\geq n^2$.  Where each $a_i$'s are positive and $n$ is a natural number.  First I tried the usual "mathematical induction" method, but it made no avail, since I could not show it would be true if $n=k+1$.  Suppose the inequality holds true when $n=k$, i.e.,  $(a_1+a_2+\dotsb+a_k)\left(\frac{1}{a_1}+\frac{1}{a_2}+\dotsb+\frac{1}{a_k}\right)\geq n^2$.  This is true if and only if  $(a_1+a_2+\dotsb+a_k+a_{k+1})\left(\frac{1}{a_1}+\frac{1}{a_2}+\dotsb+\frac{1}{a_k}+\frac{1}{a_{k+1}}\right) -a_{k+1}\left(\frac{1}{a_1}+\dotsb+\frac{1}{a_k}\right)-\frac{1}{a_{k+1}}(a_1+\dotsb+a_k)-\frac{a_{k+1}}{a_{k+1}} \geq n^2$.  And I got stuck here.  The question looks like I have to use AM-GM inequality at some point, but I do not have a clue. Any small hints and clues will be appreciated.

If $x_1,...,x_n$ are positive real numbers and if $y_k=1/x_k$, prove that $$\left(\sum^n_{k=1}x_k\right)\left(\sum^n_{k=1}y_k\right)\geq n^2.$$   I've been learning induction, and I've come across this problem that I really can't even break down and begin to think about. I've been told it has something to do with Cauchy-Schwarz, but I cannot figure out how to apply it. I would appreciate help figuring out how to go about and formulate this proof. Thanks!


please can any one suggest me a good program for simulating electrostatic and magnetostatic fields (forces,flux density, energy and potential) ?

Is there easily-available* software to simulate coils, solenoids, and other magnetic and electromagnetic devices?  I'd like to play around with some design ideas, such as Halbach arrays, but physics simulators like SketchyPhysics don't seem to have the laws of electromagnetism implemented.  (*"Easily-available" means "not cost prohibitive.")


I just saw this card: . Suppose I use it in my first main step. I attack while my opponent has his cards exiled. At the end step he gets them back.  My question: Will those cards have summoning sickness when his turn comes? (for creatures)

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


Like in title. I need to solve this equation: $$1=91p+74q$$ with $p, q$ being integers. I brute forced the solution to be $(p,q)=(-13,16)$, but I'd love to know how to solve it without just mashing keys on the calculator, hoping for the best.

I've only found a recursive algorithm of the extended Euclidean algorithm. I'd like to know how to use it by hand. Any idea?


I need to connect to remote DB over Hamachi, the tutorial states that I need to set tcp/ip to enable (which I did, in SQL Server Configuration Management tool) and add Hamachi IP to ipadresses, but which one? ip4,ip6...

I have created a C# application which uses a SQL Server database. I have other computers connected to me and to each other in a workgroup. I have shared my C# application with others. When they open the application they get the error      A network related or instance-specific error occured while establishing a connection to SQL Server. the server was not found or was not accessible   But the application is working fine on my PC. The connection string I am using is   Data Source=ASHISHPC1\SQLEXPRESS;Initial Catalog=ACW;User ID=ash159;Password=ashish159   which is stored in a .config file.   The application is working fine on my PC. What must I do? I have enabled the TCP/IP in the server but the same error persists. Some change in connection string or something else?


$\textbf{Problem}$ $K=\mathbb{Z}/p\mathbb{Z}$; L=splitting field of $\prod_{i=1}^{p-1} (t^2-i)$, where $p$ is an odd prime $\textbf{Attempt}$ Since $(-k)^2=(p-k)^2=k^2$, we know that there are $\frac{p-1}{2}$ many irreducible polynomials among $t^2-1,t^2-2,\cdots,t^2-(p-1)$. This implies that among $1,2,\cdots,p-1$, $\frac{p-1}{2}$ are squares and other $\frac{p-1}{2}$ are not.  Then, the splitting field of the polynomial be $K(\sqrt{k_1},\cdots,\sqrt{k_{\frac{p-1}{2}}})$... I don't know how to compute the Galois group... Any help is appreciated.. Thank you!

Let $p$ be an odd prime. How do I compute the Galois group of $F/Z_p$ where $F$ is the splitting field of $\prod_{i=1}^{p-1} (X^2-i)$ over $Z_p$?  Since exactly $\frac{p-1}{2}$ integers from $1\leq i\leq p-1$ are the roots of $X^2-i$ in $Z_p$, let's write $F=Z_p(\sqrt{i_1},...,\sqrt{i_k})$ where $k=\frac{p-1}{2}$ and $\sqrt{i_j} \notin Z_p$.  This leads me to guess that the Galois group is $(Z_2)^k$, but is it really true? How do I prove this?


I usually like to install a few things on my machine directly after install. Then do some general tasks like set the preferences, make a conkyrc, set up my git config, download my pictures, etc.  Is it possible to make this all done directly from install? As in, to write this as an install image so it would configure it automatically on install

I would like to customize Ubuntu live CD by installing some additional packages. I have followed   but it doesn't seems to work. Can anyone provide clear instructions?   Note: I do not prefer Remastersys, manual way will be appreciated.  Customization  Packages that I want to install:   Thunderbird    Samba    SSH       Changes that I need:   Remove Games menu from the Application menu Firefox shortcut on Desktop Radiance as the default Theme Different default Ubuntu Wallpaper   Configuration file changes   I want the panel to be placed at the bottom I want to paste my Samba configuration file instead of default Samba configuration I have few Firefox shortcuts and folders I would like to show that in Desktop Also it will be nice if you say me how to change the icon sets   Recent Updates   I have customized Ubuntu 10.10 with Firefox shortcuts and few folders on desktops. Everything went smooth. But the installer gets crashes after choosing the timezone. How do i fix this issue? Also setting wallpaper affects the login screen. The wallpaper which i set is displayed on the login screen also. I just want the default one for the login screen.


where the series has the nth term given by $$a_n = \frac {1\cdot3\cdot5\cdot\cdots\cdot(2n-1)}{2\cdot4\cdot6\cdot\cdots\cdot2n}$$  I managed to show that $$a_n = \frac {(2n)!} {4^n (n!)^2}$$  But it doesn't really help.. I'd like to compare it with something since the ratio test doesn't work.

How would you show that the series $$\sum_{n=1}^\infty \frac{(2n)!}{4^n (n!)^2}$$ diverges? Wolfram Alpha says it diverges "by comparison", but I'd like to know to what you would compare it? I've tried some basic things to no avail: The ratio test is inconclusive, comparing with something "smaller" which I know diverges is proving difficult. If possible, I'd like to show this without using anything fancy (such as Stirling's approximation).  Can you do this with a "basic" comparison?


I have a field so-called "Status" in my custome contact type. It is a List (integer) and widget type is "Radio buttons". I added two values for allowed values list:   0|Sold  1|Available   Default value is "Available". But Drupal lists this as below:   () N/A  () Sold  () Available   Why does Drupal add this unnecessary "N/A" to the radio buttons? I encountered this problem since D6. Now, I'm using the latest version 7.14. I'm still seeing this.  I know I can remove the "N/A" by writing a hook from a custom module. Nonetheless, I don't want to write additional codes for this kind of small thing. When I use "Select list", it is ok with an option "-None-", but the radio button is ideally suited for the two options.  How can I remove it without installing additional module? Am I missing some functionalities from Drupal core interface?

I have a "gender" (checkbox) option that I want to show on the user profile page (but not on the registration page). The options are "Male" (default) and "Female". Since I don't make the field required it is showing the "N/A" option. Drupal does this .  If I make the field required the "N/A" option will go away but then it will automatically show on the registration page which I don't want.  I was trying to hide it with CSS but I cannot see a way to just hide that checkbox and "N/A" text:
 <input id="edit-field-gender-und-none" class="form-radio" type="radio" value="_none" name="field_gender[und]"> N/A

 <input id="edit-field-gender-und-0" class="form-radio" type="radio" checked="checked" value="0" name="field_gender[und]"> Male

 <input id="edit-field-gender-und-1" class="form-radio" type="radio" value="1" name="field_gender[und]"> Female
   Help! ;-)


I'm trying to make chess game with java only using Board class as GUI, Game class to run and test game rules, abstract Pieces as a parent class for each chess piece, Player class to indicate who's turn.  I populated a board with 8 x 8 = 64 buttons first. To implement each piece's valid movement, I need to get each button's address or an index. Initially I didn't use 2d array but I thought it'd be easier to put the buttons in 2d array and get their index to control the movement of the pieces. This is what I tried so far and I don't know why I'm getting a NullPointer error.  I would appriciate any help or advice.   import javafx.application.Application; import javafx.event.ActionEvent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.GridPane; import javafx.stage.Stage;  public class Board extends Application {     GridPane board = new GridPane();     Scene s = new Scene(board);     Button buttonArray[][];     private void showBoard() {         for (int i = 0; i < 8; i++) {             for (int j = 0; j < 8; j++) {                 buttonArray[i][j] = new Button();                   buttonArray[i][j].setMinSize(70, 70);                    if ((i + j) % 2 == 0) {                      buttonArray[i][j].setStyle("-fx-background-color: #0e0f0f");                 } else {                     buttonArray[i][j].setStyle("-fx-background-color: #ededed");                 }                 buttonArray[i][j].setOnAction(this::onSelect);                  board.add(buttonArray[i][j], i, j);             }         }     }       // event listener     private void onSelect(ActionEvent event) {         Button b = (Button) event.getSource();         System.out.println("get source" + b);         b.setStyle("-fx-background-color: magenta");      }      @Override     public void start(Stage stage) throws Exception {         showBoard();         stage.setScene(s);         stage.show();     }      public static void main(String args[]) {         launch(args);     }  }   //Error stackTrace  Exception in Application start method java.lang.reflect.InvocationTargetException     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)     at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) Caused by: java.lang.RuntimeException: Exception in Application start method     at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)     at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException     at Board.showBoard(Board.java:15)     at Board.start(Board.java:45)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)     at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)     at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)     at java.security.AccessController.doPrivileged(Native Method)     at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)     at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)     at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)     ... 1 more Exception running application Board

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'm building a character in the 5th edition and my background and class both mention survival proficiency, do i add the proficiency bonus twice or only once?

I made a trickster cleric with spy background. This caused an overlap of stealth and disguise. (Further compounded by me wanting to take hide in shadow ... which again granted me stealth.)  What happens when you are granted a skill from multiple sources?


I have a very simple design that I'm now working on the PCB layout for. And at the moment I'm thinking about the issue of decoupling capacitors. The board is very simple and only consists of this:   1 x ATtiny85  3 x resistors  1 x 32.768 kHz crystal  2 x 22 pF caps for crystal  3 x LED   The board is powered by 2xAAA batteries. The MCU is clocked at 32.768 kHz by the crystal.  So as you can imagine it's just a real-time clock with some additional logging functions. Now, the question is this: Do I need decoupling capacitors for this circuit? If so, do I place them:  1. Between the Vcc and GND pins of the ATtiny, close to the ATtiny  2. Between the Vcc and GND traces, close to the battery  3. BOTH of those, i.e. use two capacitors, one close to the MCU and one close to the battery   ...or can I simply ignore decoupling caps for a circuit as simple as this? And do you have any advice on which capacitance to use for the decoupling caps?  Also, if I do need decoupling caps, it would be great if someone could explain the advantage of them. I.e. do they help improve the stability of the real-time clock? Do batteries normally have voltage dips in certain circumstances?

What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well.


Which one should I use for this statement      An historian can change the past   or     A historian can change the past   ?

A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”?  I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English.  Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h.  So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct?


Let $X$ and $Y$ be i.i.d $U(0,1)$ random variables. Then $E(X|X>Y)$ equals?  The way I interpreted it is as follows: $E(X|X>Y)$ is $E(X)$ realizing $X>Y$ so $E(X)=\int_{0}^{1}\int_{y}^{1}xdxdy=\int_{0}^{1}(\frac{x^2}{2})_{y}^{1}dy=\frac{1}{2}\int_{0}^{1}(1-y^2)dy=\frac{1}{2}(y-\frac{y^3}{3})_{0}^{1}=\frac{1}{2}\cdot\frac{2}{3}=\frac{1}{3}$ What can be a better alternative to solve this problem? I tried so hard but couldn't get the answer using the proper definition of expectation, can anyone help me?And can we use law of total expectation here?

In particular, $f(x,y)=1$ for $0<x<1$ and $0<y<1$. How to calculate the conditional mean of $E(X\mid X<Y)$?  I understand the conditional mean $E(X\mid Y) = \int_{-\infty}^{\infty}xf(x\mid Y)dx$. But how do we make sense of conditions like $X<Y$?


What kind of problems  can identify? Are there any disk problems that chkdsk cannot identify and will mark a malfunctioning storage device as a healthy one? Are there cases when I would need to use other tools to check disks for logical or physical errors?

I have attempted to read a bit about chkdsk but I still don't conceptually understand what it does.  From : "Creates and displays a status report for a disk based on the file system. Chkdsk also lists and corrects errors on the disk. Used without parameters, chkdsk displays the status of the disk in the current drive."  From : "Displays the file system integrity status of hard disks and floppy disk and can fix logical file system errors."  But this is all extremely vague, and I've not seen a good, concise, clear summary of what is actually going on.  I just ran a chkdsk and got some of the following messages:     Deleting corrupt attribute record   (128, "") from file record segment   120759.      The USA check value, 0x0, at block 0x3   is incorrect.  The expected value is   0x63.      The multi-sector header signature in   file 0x3d5b6 is incorrect.      Deleting corrupt file record segment   251333.      Deleting orphan file record segment   251321.      Deleting an index entry from index $O   of file 25.      Deleting index entry P1040158123.JPG in   index $I30 of file 118566.   Is there anywhere I can go to make any sense out of any of these messages?  Does it matter at all to an end user?  Does it ever delete files or only indices?  From the log / output it seems like I had a lot of errors in my disk, but don't know if this is something I should be concerned with or not.


I was trying to process some rather large numbers in python and came across an overflow error. I decided to investigate a little bit more and came across an inequality I cannot explain. When I evaluate 10^26 I get:   >>> 10**26 100000000000000000000000000   Which is perfectly logical. However when I evaluate 10e26 and convert it to an int I get:  >>>int(10e26) 1000000000000000013287555072   Why is this? Do I not understand the e notation properly? (From what I know 10e26 is 10*10^26 as seen in this answer: )   10^26 is way past the max integer size so I was also wondering if there was any mechanism in python which could allow to work with numbers in scientific format (not considering all those zeros) in order to be able to compute operations with numbers past the max size.

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


This problem was asked in a local Olympiad. I do not know how to proceed because I did not think Fermats little theorem is applicable to composite numbers. Any help would be appreciated.

Recently a exam called PRMO 2017 was conducted. Question 28 went as follows,     Let $p$, $q$ be prime numbers such that $n^{3pq} – n$ is a multiple of $3pq$ for all positive integers $n$. Find the least possible value of $p + q$.   This question was considered to be quite tough. Many people are saying it was too tough to be put in a exam which is open for 14 year olds.   How can it be solved?  I have not studied number theory, so I really couldn't attempt this.  Thanks.


How to copy keys from map to vector. Specifically I have a map<int, int> and I want keys of the map to form a new vector (vector<int>).  So a map (<1,100>; <2,99>) should give a vector of (1,2).   Question , describes exactly what I need but for values, but the response is too cryptic to understand. I cannot understand how the unary operator function is written. Can somebody explain how it is written?

This is one of the possible ways I come out:  struct RetrieveKey {     template <typename T>     typename T::first_type operator()(T keyValuePair) const     {         return keyValuePair.first;     } };  map<int, int> m; vector<int> keys;  // Retrieve all keys transform(m.begin(), m.end(), back_inserter(keys), RetrieveKey());  // Dump all keys copy(keys.begin(), keys.end(), ostream_iterator<int>(cout, "\n"));   Of course, we can also retrieve all values from the map by defining another functor RetrieveValues.  Is there any other way to achieve this easily? (I'm always wondering why std::map does not include a member function for us to do so.)


Moving comments to chat is a somewhat destructive operation since the upvotes on the comments are lost.  In some cases – especially when there are a lot of comments – this is rather annoying, because it becomes much harder to distinguish the insightful "gems" from the "noise".  Could upvotes be preserved as chat stars when moving the comments?

When a comment conversation is moved by moderators to a chat room, the upvotes on those comments are lost.  If a comment had 20 upvotes, there is nothing to indicate that once it has been moved to chat.  The points that people agreed with are then no longer recognized.  Could the upvotes on comments be translated into stars on the chat-comments?


Iirc, at first it's thought to be a comet. But it's discovered to be an alien satellite with an AI onboard. It's flying rapidly through the solar system and is just on a course to utilize the gravity of the sun to be flung off somewhere else. Humanity makes contact with the AI, but there's not a lot of time before it flies off. The story ends with something like the AI giving the location from where it was sent, and (maybe?) noting that it has sent a signal there, but it will take many thousands if not millions of years to get there, and that it doesn't even know if the alien civilization who sent it still exists.

I've been trying to remember where I read a perspective on religion, which I think comes from some Science Fiction author.  It goes somewhat like "we have observed many species, and those that developed religious ideas usually feature long childhood periods, with a strong bond between children and their parents". (If we remember right, they were talking about sentient species in the universe)  One of my friends recalls that we discussed this several years ago, and that I mentioned having read it in a SF book. I wish to identify the book and its author. I don't intend this question to be a discussion on religion.  Can someone help me identify the origin of this?


script: #!/bin/zsh  IFS=$'\n' arr=($(alias | grep 'git' | grep "^[g|\'g]" | sed 's/=.*//' | sed "s/'//"))  echo $arr  These two lines work in the normal command line: ~/test ·····································································································································  test-Cj2sK_tx ❮ IFS=$'\n' arr=($(alias | grep 'git' | grep "^[g|\'g]" | sed 's/=.*//' | sed "s/'//"))  ~/test ·····································································································································  test-Cj2sK_tx ❯ echo $arr g ga gaa gam gama gamc gams gamscp gap gapa gapt gau gav gb gbD gba gbd gbda gbl gbnm gbr gbs gbsb gbsg gbsr gbss gc gc!' gca gca!' gcam gcan!' gcans!' gcas gcasm gcb gcd gcf gcl gclean gcm gcmsg gcn!' gco gcount gcp gcpa gcpc gcs gcsm gd gdca gdct gdcw gds gdt gdw gf gfa gfg gfo gg gga ggpull ggpush ggsup ghh gignore gignored git-svn-dcommit-push gk gke gl glg glgg glgga glgm glgp glo glod glods glog gloga glol glola glols glp glum gm gma gmom gmt gmtvim gmum gp gpd gpf gpf!' gpoat gpristine gpsup gpu gpv gr gra grb grba grbc grbd grbi grbm grbo grbs grev grh grhh grm grmc grmv groh grrm grs grset grss grst grt gru grup grv gsb gsd gsh gsi gsps gsr gss gst gsta gstaa gstall gstc gstd gstl gstp gsts gsu gsw gswc gtl gts gtv gunignore gunwip gup gupa gupav gupv gwch gwip  However, it doesn't work when these two commands are in the script file... ~/test ·····································································································································  test-Cj2sK_tx ❯ /bin/zsh ./d-alias.sh # nothing here...  Thank you for any help. Many thanks.

In my ~/.bashrc file reside two definitions:   commandA, which is an alias to a longer path commandB, which is an alias to a Bash script   I want to process the same file with these two commands, so I wrote the following Bash script:    #!/bin/bash  for file in "$@"     do     commandA $file     commandB $file done   Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script.  What am I doing wrong?


Is Dabi Endeavors oldest son Toya Todoroki? I need to know because google is not working.

There always has been a lot of speculation about Dabi being Endeavor's son. But yesterday I saw a My hero academia Youtuber who said in the last manga (#202) was strongly hinted so. What happened in the last manga? Is Dabi Endeavor's son?


I have a foo.war file (JSF web app). I unzipped it just fine.  unzip foo.war   Then meta-inf and web-inf folders are extracted. I made a change to a properties file inside of web-inf and I repackageed it as foo.war.  However below command I tried didn't do it. It left out package name and Java classes under it from classes folder.  zip foo.war META-INF/* WEB-INF/*

Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too.


I came across different behavior of 'is' in python.  n = 50000 if n is 50000 :   #comparison is success     print "Its 50k" #Holds true   Switch over to python 'Terminal' (command prompt)  >>> n = 50000 >>> n is 50000 False   Why is the behavior different?  Version: 2.7.5+

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I am tripped up with the correct usage of 'are' or 'is' in the following sentence. Any quick explanations as to why this simple sentence may cause confusion?  Here 'are/is' the list of scholarships and the application.

It seems I put a   Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore -  this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say.    Original question:  Plurality of verb depending on plurality of list elements  An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English?    Someone linked a  for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and".  It seems there is a consensus that in that if the verb goes after the list, it will be plural.     an orange, some grapes, two apples and a small pile of cherries were on the plate.   There doesn't seem to be clear consensus for:     On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries   Adding more to the confusion is the abbreviated form: "There's"     One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's":           There's three apples on the table!      Could you please clarify this mess?


Im asked to prove that R =Z[x]/(x^3) Is integral extension of Z One way to do so would be to prove that Z[x]/(x^3) is a finitely generated Z module . But i cannot find a base to do the job Also since R includes all polynomails   of Z[x] just without the x^3 terms , if R is finitely generated then Z[x] would also be ?

It's $\mathbb{Z}\subseteq \mathbb{Z}[X]/(X^5-1)$ an integral extension?  $\mathbb{Z}[X]/(X^5-1) \simeq \mathbb{Z}[x]$ where $x^5-1=0$.  So is an integral extension because $x$ is integral  over $\mathbb{Z}$. It's right?


I do have 12.04 LTS and hearing that 14.04 LTS was released I (wrongly) assumed that I will be able to upgrade machines using the standard distribution upgrade path.  Still it seems that 'sudo do-release-upgrade' does not see any new release.  Why it doesn't show it and when is this going to be visible?  Obviously, I do not want to force the usage of development / unstable versions.   Also, considering the 14.04 was released on April 17, why it was released when it was not considered "stable" yet? ... there is something in the release process that doesn't make sense to me :p

I'm following the , but on launching the upgrade tool I get this response:  Checking for a new ubuntu release No new release found   Am I doing something wrong? Is there a workaround?


I want to see CPU usage. I used this command :  top -bn1 | grep "Cpu(s)" |             sed "s/.*, *\([0-9.]*\)%* id.*/\1/" |             awk '{print 100 - $1}'   But it returns 100%. What's the correct way?

How/Where do I check my ubuntu laptops's CPU usage?


Sorry I have deleted the text in the table (since it would be seen as plagiarism (on my thesis, I can publish it).    Here is my code. I have tried to use \begin{tabular}{|c|c{3in}|c|} in order to fix the second column width but it does not work :  \begin{table}[h!] \centering  \begin{tabular}{|c|c|c|}  \hline  & \textbf{Ohjdudfd fhedjeji veghjk} & \textbf{hedfj jddi}  \\  \hline  \textbf{hdiud-d} & 3-7-17-20-6-8-13-16-8-5-12-21-14-19-2-50-15-5- 14-11-1 & 5.62\%\\ \hline  \textbf{kdjd-hk}  & 7-80-16-7-6-87-2-8-83-5-71-4 -77-88-54-9-55-15-18-77-20 & 5.63\% \\ \hline  \textbf{ded ffvfr}  & --- & 74.58\% \\ \hline \end{tabular} \caption{Rusdh ohju tje dkjdk djdkd} \label{table:3} \end{table}  \begin{table}[h!] \centering  \begin{tabular}{|c|c|c|} \hline  & \textbf{ikji hikk hyhu} & \textbf{bhhy kokol}  \\  \hline  \textbf{njsd-h} & 2-8-3-7-2-8-5-4-4 & 77.30\%\\ \hline  \textbf{hcdh-j}  & 7-6-1-7-3-3-5-4-9 & 02.77\% \\ \hline  \textbf{Conhhjj mehjj}  & --- & 02.56\% \\ \hline \end{tabular} \caption{hhi ojj oool juui hjjj} \label{table:2} \end{table}

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that  \usepackage{array} \begin{tabular}{| c | c | m{5cm} |}   vertically centers the text in the last column, but justifies it horizontally (like text in normal paragraphs).  Update: With Jake's method, it seems both \\ and \hline cause an error. How to fix it?


I've done a clean install of Ubuntu 18.04.3 LTS. I'm trying to install a wi fi dongle to get internet access. The installation fails:  yoav@yoav-System:~/Documents/LINUX/Linux$ sudo chmod +x install.sh yoav@yoav-System:~/Documents/LINUX/Linux$ ./install.sh ################################################## Realtek Wi-Fi driver Auto installation script Novembor, 21 2011 v1.1.0 ################################################## Decompress the driver source tar ball: rtl8821AU_linux_v4.3.19.5_17672.20160506_BTCOEX20150921-58.tar.gz . . . rtl8821AU_linux_v4.3.19.5_17672.20160506_BTCOEX20150921-58 Authentication requested [root] for make clean:   And it won't accept my password.  Edit: Tried sudo ./install.sh  yoav@yoav-System:~/Documents/LINUX/Linux$ sudo chmod +x install.sh [sudo] password for yoav:  yoav@yoav-System:~/Documents/LINUX/Linux$ sudo ./install.sh ################################################## Realtek Wi-Fi driver Auto installation script Novembor, 21 2011 v1.1.0 ################################################## Decompress the driver source tar ball: rtl8821AU_linux_v4.3.19.5_17672.20160506_BTCOEX20150921-58.tar.gz . . Authentication requested [root] for make clean: bash: make: command not found Authentication requested [root] for make driver: bash: make: command not found ################################################## Compile make driver error: 127 Please check error Mesg   Regarding using sudo -i. Command Dir produces nothing under root0@yoav-System:~  I have no idea how to navigate to the directory where the install.sh file is.  Edit 2: Tried to install build-essential package: sudo apt-get install build-essential  Reading package lists... Done Building dependency tree        Reading state information... Done Package build-essential is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'build-essential' has no installation candidate   Does apt-get requires to be online? I am offline until I manage to install this driver.

lsusb relevant output Bus 001 Device 006: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter  Upon plugging the device it is recognized by lsusb, however when I go to wireless settings no adapter is recognized. The driver is installed (by going to software and updates -> addition drivers and selecting the open source driver).


As noted here    Windows 8.1 has available "generic keys" that will let you install Windows 8.1, but not activate. Does Windows 8 have similar keys, that let you install but not activate?

Windows 8 setup asks for the product key at the beginning of the setup without letting you install it.  I got the Windows 8 ISO from MSDN but I didn't get enough keys to install it on all my 7 computers. Also, my MSDN subscription level doesn't allow me to get the VL product key to Windows 8 Enterprise.  Is there any way I can install Windows 8 for a limited time period like we used to do for Windows 7 ?


trigger CheckDuplicate on Object_Configuaration__c (before insert,before update) {         List<Object_Configuaration__c> StaActiList = [Select Name, Operations__c from Object_Configuaration__c ];   for (Object_Configuaration__c staActnew : Trigger.new)   {           for(Object_Configuaration__c sa: StaActiList)         {                         if(sa.Name== staActnew.Name && sa.Operations__c == staActnew.Operations__c )                            {                      system.debug('sa.Name== staActnew.Name'+  sa.Name+'=='+ staActnew.Name    );                   system.debug(  'sa.Operations__c == staActnew.Operations__c '+  sa.Operations__c+''+staActnew.Operations__c );                     staActnew.addError('Duplicate record ');                           }             }    }      }   i want to restrict duplicates based on Name (standard field and Operation(pickliswt,custom field).suppose If Contact is Name and Create is selected from picklist,and if i enter Account and create it should save,but it is throwing error.,please help me how to do it.

I have an object in which there are two fields i.e Phone no. & email. The combination of these fields should be unique Right now I can create just one unique field But I want their composite to work like a unique field.   I know that I can create composite key in SQL but I dont know how to achieve this in salesforce.


To give you some context, I am trying to find out the optimal parameters for a research problem using Bayes rule, and my question here has to do with generating the prior probability distributions for these parameters.  Suppose that my two parameters are A and B. I know that the prior distribution for A is going to look like a Gamma distribution, and my distribution for B is going to look like a normalized Gaussian distribution. The goal is to plot these distributions on the x and y axes, and then plot the joint probability P(A,B) = P(A)*P(B) in the z-axis. If I can do that, then I can identify what values of A and B are most probable for my problem.  So I type in MATLAB  A = linspace(-50,50,1000); B = A; gamma = gampdf(A,5,5); norm = normpdf(B,0,5); [A B] = meshgrid(A,B); Z = gamma'*norm; surf(A,B,Z)   When I do that, I get this:    Rotating this perhaps gives me something I'm looking for, but since it's all black, I can't really tell for sure.   Is there a way I can make it more easy to distinguish and have the mesh work? (I'm guessing the mesh didn't work because my Z is not a function of A and B, but rather of gamma and norm).  Any help would be much appreciated, since I'm completely open to alternative ways of doing this.

The black lines are awful, how can I get rid of them? I want only the colored surfaces.


If time travel possible? If we can travel in future? If we can travel in past? Or Both actually?

I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping?


I made a mistake by setting root partition to only 10GB during 20.04 installation. I checked LVM so I gues Gparted is out.  Can you please tell me what is the easiest way to move 10GB from home to root partition?    Thx

Till today I was using ubuntu 13.04 in my windows7/ubuntu dual boot. Just now I have upgraded to ubuntu 14.04. My software updater showed an updates available message. I proceeded with  Install Now . Soon I got the following window.    Then I tried sudo apt-get clean as recommended. Nothing happened! Not even a window opened. Teach me deleting the temporary packages.   Deleting temporary files may not be highly helpful in case of further updates and installs for I don't have too much space left in my /. I wanna extend my / partition with the help of the unallocated space in my HD. The following is my Gparted window.       I got an answer . But it wasn't useful for me. I had two choices. But the answer wasn't working for both my chioces.  Choice 1: I may use the 4.25 GiB unallocated space to extend my /dev/sda10. To do so, I must need to move my linux-swap partition. But my Resize/Move option is disabled for the linux-swap partition. Choice 1 failed!   Choice 2: I may use the 14.35 GiB unallocated space instead. In this case I must move more than one partition. /dev/sda4  partition is the first on the list. Even that partition has the same problem. Resize/Move option is disabled. Choice 2 failed!  I am out of choices now.  What shall I do? Help me to extend my / with Gparted.


Getting a xml document from the http url, and printing of the documents works perfect (System.out.println(xmlResult)), but when I convert  string into xml Document it produces an Null Pointer exception  Java code  public static void main(String[] args) throws MalformedURLException, IOException, ParserConfigurationException, SAXException {         DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();         DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();         URL url = new URL("http://ops.epo.org/3.1/rest-services/published-data/publication/epodoc/US7039403/biblio");          HttpURLConnection epo = (HttpURLConnection) url.openConnection();         epo.setRequestMethod("GET");         epo.setRequestProperty("ContentType", "text/xml;charset=\"utf-8\"");         epo.setRequestProperty("Accept", "text/xml");          InputStream inputstream = epo.getInputStream();         BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputstream,"UTF-8"));              String xmlResult = "";             while ((xmlResult = bufferedReader.readLine()) != null) {                             }                        InputSource inputSource = new InputSource();             inputSource.setCharacterStream(new StringReader(xmlResult));             Document xmlDocument = documentBuilder.parse(inputSource);              System.out.println("Root element :" + xmlDocument.getDocumentElement().getNodeName());             }   Exception details  Exception in thread "main" java.lang.NullPointerException     at java.io.StringReader.<init>(StringReader.java:50)     at ExtractBiblio.Teser.main(Teser.java:62)  Line:inputSource.setCharacterStream(new StringReader(xmlResult));   help me to resolve it.

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'm using a laptop with an HDMI cable to an external monitor. I only use this monitor and turn my laptop display off to avoid performance issues when I'm playing games. Currently when I start my laptop up, I have to manually make the external display the main display every time.  I'd like to write a simple program that can automatically detect the display and make it the primary screen on start up. I have experimented with the Screen class but from what I understand, setting the primary monitor this way is not possible.   Many thanks for any help.

I'm trying to use the Windows API to set the primary monitor. It doesn't seem to work - my screen just flicks and nothing happens.      public const int DM_ORIENTATION = 0x00000001; public const int DM_PAPERSIZE = 0x00000002; public const int DM_PAPERLENGTH = 0x00000004; public const int DM_PAPERWIDTH = 0x00000008; public const int DM_SCALE = 0x00000010; public const int DM_POSITION = 0x00000020; public const int DM_NUP = 0x00000040; public const int DM_DISPLAYORIENTATION = 0x00000080; public const int DM_COPIES = 0x00000100; public const int DM_DEFAULTSOURCE = 0x00000200; public const int DM_PRINTQUALITY = 0x00000400; public const int DM_COLOR = 0x00000800; public const int DM_DUPLEX = 0x00001000; public const int DM_YRESOLUTION = 0x00002000; public const int DM_TTOPTION = 0x00004000; public const int DM_COLLATE = 0x00008000; public const int DM_FORMNAME = 0x00010000; public const int DM_LOGPIXELS = 0x00020000; public const int DM_BITSPERPEL = 0x00040000; public const int DM_PELSWIDTH = 0x00080000; public const int DM_PELSHEIGHT = 0x00100000; public const int DM_DISPLAYFLAGS = 0x00200000; public const int DM_DISPLAYFREQUENCY = 0x00400000; public const int DM_ICMMETHOD = 0x00800000; public const int DM_ICMINTENT = 0x01000000; public const int DM_MEDIATYPE = 0x02000000; public const int DM_DITHERTYPE = 0x04000000; public const int DM_PANNINGWIDTH = 0x08000000; public const int DM_PANNINGHEIGHT = 0x10000000; public const int DM_DISPLAYFIXEDOUTPUT = 0x20000000;  public const int ENUM_CURRENT_SETTINGS = -1; public const int CDS_UPDATEREGISTRY = 0x01; public const int CDS_TEST = 0x02; public const int CDS_SET_PRIMARY = 0x00000010;  public const long DISP_CHANGE_SUCCESSFUL = 0; public const long DISP_CHANGE_RESTART = 1; public const long DISP_CHANGE_FAILED = -1; public const long DISP_CHANGE_BADMODE = -2; public const long DISP_CHANGE_NOTUPDATED = -3; public const long DISP_CHANGE_BADFLAGS = -4; public const long DISP_CHANGE_BADPARAM = -5; public const long DISP_CHANGE_BADDUALVIEW = -6;      public static void SetPrimary(Screen screen) {   DISPLAY_DEVICE d = new DISPLAY_DEVICE();   DEVMODE dm = new DEVMODE();   d.cb = Marshal.SizeOf(d);   uint deviceID = 1;   User_32.EnumDisplayDevices(null, deviceID, ref  d, 0); //    User_32.EnumDisplaySettings(d.DeviceName, 0, ref dm);   dm.dmPelsWidth = 2560;   dm.dmPelsHeight = 1600;   dm.dmPositionX = screen.Bounds.Right;   dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;   User_32.ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_SET_PRIMARY, IntPtr.Zero); }   I call the method like this:  SetPrimary(Screen.AllScreens[1])   Any ideas?


The output of the following snippet should return the names of 5 cities in an array, but the result is a blank array. Why?    arr = [   {name: "London", population: 30},   {name: "Moscow", population: 20},   {name: "Delhi", population: 50},   {name: "New York", population: 35},   {name: "Paris", population: 42} ]  var temp = []; arr.forEach((item, index) => {   temp.push[item.name]; }); console.log(temp);

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


I really hate spiders and I'm afraid of them so this is really a problem for me. I use bike every day to get everywhere - to work, to shop etc. These nasty things can make a web in a matter of a few hours here (Cambridge, UK) - almost every morning when I want to get to work there is a web, almost every afternoon when I want to go home there is a web. Sometimes there is even a spider. It's really annoying and terrifying. I found this:  but it wasn't really helpful. I was thinking about spraying my bike with Raid or something, or maybe spraying it with some kind of water solution with washing liquid and essential oils (I read that some of them repel spiders). Do you have any advice on this? Or maybe at least some advice on dangerous fluids for my bike that I shouldn't use for this? (Like water makes my bike rusty)

I am an extreme arachnophobe, to the point that I've left dishes in the sink due to a dead spider the size of an M&M.  My bike at work is right in the open, and because of the soft winter, there are dozens of spiders around the parking lot. I very much doubt I can deal with one or more of them sitting or even forming webs on my bicycle without getting all freaked out about it.  I don't want them to get in my bike, form webs on it or even get within a couple of feet of it. Are there any methods I can use? I found , but most of those are hard to apply to bikes.


This is my code,i want to check against empid if cli and callduration both are same and evaluated before it..then show this cli and call duration is already evaluated..if cli is same but duration is different then show start evaluation and also if cli and duration both are different then also show start evaluation.  The problem which i am facing is that my code is only check one statement like empid=1,cli=123,calldurations is 1min &01:01 then its check only 1 min duration and on 01:01 duration print the statement start evaluation..the code should show call is already evaluated..  <?php $con = mysqli_connect("localhost","root","","usman"); $check = "SELECT COUNT(*) FROM eval WHERE empid = '$_POST[empid]' &&  cli =  '$_POST[cli]'  && callduration = '$_POST[callduration]' "; $result = mysqli_query($con,$check); $count = mysqli_fetch_array($result); if(current($count) > 0) {   echo "
This call is already evaluated against

 Emp-ID " . $_POST["empid"] . "

CLI - " . $_POST["cli"] . "

Call Duration - " . $_POST["callduration"] . "
"; } else {   echo " Click Here To Start Evaluation
";  } ?>

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?


About this question marked as duplicate, I wasn't asking about how to encode in the original question, the encoding was the answer to the question though.  In my php I've filled an array with data from a database (each object in the array is the row, stored as another array). I'm calling echo json_encode($json); so I can grab it through android but it doesn't output anything. I can call each array and every column like echo $json[#][#]; and get the expected result, so I know the arrays are filled. How do I get it all out there so people can touch it with their greedy little fingers?  php:  <?php     $host="HOST";     $username="USER";     $password="PASS";     $db_name="DATABASE";      $con=mysql_connect("$host", "$username", "$password")or die("cannot connect");     mysql_select_db("$db_name")or die("cannot select DB");     $sql = "SELECT * FROM Table WHERE Column = 1";     $result = mysql_query($sql);     $json = array();     if(mysql_num_rows($result))     {         while($row=mysql_fetch_assoc($result))         {             $json[] = array($row['col1'], $row['col2'], $row['col3'], $row['col4'], $row['col5'], $row['col6']);         }         echo json_encode($json);     } ?>    SOLVED The problem was with UTF8, on some columns that have text, occasionally specail characters are used (in this case, Å, Ä and Ö). Thanks to commenter @meda that suggested I use utf8_encode($row[col]) everything's fine.

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


$$\sum_{k=1}^{n} \frac1{k(k+1)}$$ I know the answer is $\frac{n}{n+1}$ but how do I get there?

How can I find the formula for the following equation?  $$\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$$  More importantly, how would you approach finding the formula? I have found that every time, the denominator number seems to go up by $n+2$, but that's about as far as I have been able to get:  $\frac12 + \frac16 + \frac1{12} + \frac1{20} + \frac1{30}...$ the denominator increases by $4,6,8,10,12,\ldots$ etc.  So how should I approach finding the formula? Thanks!


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


I have a Dell Vostro 3558 laptop.  My existing RAM size 4GB. It is DDR3 (PC3-12800 800 MHz) I have two slots in my laptop and one is unused.  I want to upgrade by 8GB or 4GB.  I understand low voltage can be used as well as it can save power but also searched and found comments saying mixing of voltages may not be good for laptops.  Can I buy a 8GB PC3L for my laptop or would you suggest anything else.  Below is snapshot of laptop RAM    P.S. Would highly Appreciate your suggestions. And I am thinking to buy

I have a pair of DDR3 SODIMM RAM modules in my laptop, and I want to replace the 2GB for a 4GB that is compatible. So far I haven't been able to find an exact match but I found a very similar with a PC3L label instead of PC3. Can they work together?  My DDR3 SODIMM RAM:    Memory module in question:    Installed RAM: 4GB DDR3 2Rx8 PC3 12800S 11 10 F2  Matching RAM:  4GB DDR3 2Rx8 PC3L 12800S 11 10 F3  Laptop:


Why does $\operatorname{rank}(\mathbf{X})$ equal $\operatorname{rank}(\mathbf{X^TX})$? Is this true in general, please? And what is $\dim(\mathbf{X^TX})$, please? Does it equal to $\dim(\mathbf{X})$ in general, please? Thank you!  Imagine I prove the first claim by assuming that $\mathbf{X}$ is an $n\times k$ matrix with $n>k$ and $\mathbf{X}$ has rank $l<k$. Then, we know $\operatorname{nullity}(\mathbf{X})+\operatorname{rank}(\mathbf{X})=\dim (\mathbf{X})=l<k.$  To this end, I need to show first that $\dim(\mathbf{X})=\dim (\mathbf{X^TX})=l$. And then show $\operatorname{nullity}(\mathbf{X})=\operatorname{nullity}(\mathbf{X^TX})$.  I do not know how to show the first claim. Any hint, please? Thank you!  Provided the first claim is true, it is easy to see the following. If $\mathbf{X}v=\bf{0}$, then $\mathbf{X^TX}v=\bf{0}$. If $\mathbf{X^TX}v=\bf{0}$, then $v^T\mathbf{X^TX}v=\bf{0}$, which implies that $\mathbf{X}v=\bf{0}$. Hence, the second claim is proved.

How can I prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$?   This is an exercise in my textbook associated with orthogonal projections and Gram-Schmidt process, but I am unsure how they are relevant.


I'm following  to install on Nexus 7.  When I add the PPA and update it gives me a failed to fetch 404 error  W: Failed to fetch http://ppa.launchpad.net/ubuntu-nexus7/ubuntu-nexus7-installer/ubuntu/dists/saucy/main/binary-amd64/Packages  404  Not Found W: Failed to fetch http://ppa.launchpad.net/ubuntu-nexus7/ubuntu-nexus7-installer/ubuntu/dists/saucy/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.

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


I have this formula which seems to work for the product of the first n odd numbers (I have tested it for all numbers from $1$ to $100$):  $$\prod_{i = 1}^{n} (2i - 1) =  \frac{(2n)!}{2^{n} n!}$$  How can I prove that it holds (or find a counter-example)?


The board shows two queens, a 9, 8, and 7. I'm holding a queen and a Jack. The other player is holding a queen and an Ace. Is this a split pot or does the Ace play?

In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2♣ and 3♣   Bob has 4♣ and 5♣   On the board are 6♣, 8♣, 10♣, 2♥, 5♦   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer.


asking so many questions these days.. In , I see versions focal, focal-backports, focal-proposed, focal-security and focal-updates. What are these different versions? and how can I get the sources of them? What I want to do is to compile the source after adding some debug information (prints, or debug-info) and use the changed installation .iso in my qemu virtual machine to debug install failure. p.s. : I know how to install the focal-updates version (in it, the one using network to install components).

I see the following lines in /etc/apt/apt.conf.d/50unattended-upgrades. But I'm not able to find the man page for them. Could anybody point me the detailed document for each of them? Thanks.  Unattended-Upgrade::Allowed-Origins {   "${distro_id}:${distro_codename}-security";   "${distro_id}:${distro_codename}-updates"; //  "${distro_id}:${distro_codename}-proposed"; //  "${distro_id}:${distro_codename}-backports"; };


All in the title basically. Not sure how to prove $a^{\log_a(b)}=b$.  Don't know how to use the rules to get that.

I'm currently doing a couple of exercises on logarithmic expressions, and I was a bit confused when presented with the following: $5^{\log_5 17}$.  The answer is $17$, which is the argument of the logarithm in the exponent, but I don't understand the reason why.  A previous question in the exercise was $12^{\log_{12} 144}$, which is pretty straight forward since $\log_{12} 144=2$ and $12^2=144$ but since $\log_5 17$ is an irrational number, I couldn't calculate it the same way.  So my question is, why is $x^{\log_x n}=n$?  [Update]  I've now managed to reason this out and realized how simple it is.  Basically, if $y=\log_x n$, then $y$ is the number that  $x$ must be raised to to become $n$; therefore, if I raise $x$ to that power $y$, I will naturally get $n$.  I guess my problem was that I tried to work out the question mechanically instead of intelligently and that's why I failed, because once I realized that I can't calculate $\log_5 17$, I was stumped.  Now that I reasoned it out, as explained in the previous paragraph, I understand it.


I would like to perform PCA on a dataset, however, not all of the data is in the same scale. Some variables are Height, Weight, Age, while others are Dribbles per Game, Shots per Game, Blocks per Game.  When I re-scale my data, can I use the standardizaiton method such that each newly transformed varaible has a mean of 0 and standard deviation of 1? So my process would be take each value, subtract the mean, divide by the standard deviation.   Also, I have read in some cases for variable like height or weight, it is better to take the log-normal transformation? Once you do that though, the scale is not helpful.  When I perfrom the PCA in R, I planned on using the covariance matrix to see how much of the data I explain with my 2 principal components.

What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results?


My JQuery: //script.js  $(document).ready( function() { $(".image").bind('mouseenter',  function() {     $(this).stop().animate(     {         backgroundColor: "blue"     },     {         queue:false,         duration:300,         easing: "swing"     }); }); $(".image").bind('mouseleave',  function() {     $(this).stop().animate(     {          backgroundColor: "green"     },     {         queue:false,         duration:300,         easing: "swing"     }); }); });   HTML: //index.html  <!DOCTYPE html>       <link rel="stylesheet" type="text/css" href="stylesheet.css"></link>

     CSS: //stylesheet.css  body { background-image: url("background.jpg"); margin:0 auto; padding:0; } .image { background-color: green; width: 100px; height: 100px;  }   Nothing happens with the div, but if I try it with css() it works! How can I fix this? Everything gets called correctly, even some stuff after animate() (I added an alert() to check lol) so I have no clue why...

I am trying to animate a change in backgroundColor using jQuery on mouseover.  I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div.  $(".usercontent").mouseover(function() {     $(this).animate({ backgroundColor: "olive" }, "slow"); });   Any ideas?


Forgive me if this has been asked before but I couldn't find any helpful resource for this information.  How can I delete my StackOverflow Careers profile? I tried searching here on the meta page too, but nothing came up.

Is there a way a registered user can remove his/her resume from careers.stackoverflow.com?