I am moving into my first home and am wanting to mount my 43" flat screen tv above the fireplace. There are multiple outlets surrounding the fireplace, however there is not one above it. What are some ways to install this? Or some different ideas. I am set on putting it above the fireplace.

I'm going to mount my 47" LCD above my fireplace. I'm not looking for arguments against this decision. I'm looking for wiring solutions. The diagram below should help explain the situation.   _________________________________________________ |     |     |    | |   |   |   | |    |     |     | |     |     |    | |   |   |   | |    |     |     | |     |     |    | |   |   |   | |    |     |     | |     |     |    | | p |   | m | |    |     |     | |     |     |    | |   |   |   | |    |     |     | |     |     |    #################    |     |     | |     |     |    ##             ##    |     |     | |     |     |    ##             ##    |     |     | |    P|     |    ##             ##  m |     |P C  | |_____|_____|____##_____________##____|_____|_____|    | = stud # = fireplace brick P = existing power outlet C = existing cable outlet p = new power outlet m = new media outlet   Essentially, there is an existing power outlet on either side of the fireplace and a cable outlet on the far right side of the fireplace. I'm intending to put my non-TV media equipment on the right side of the wall and the television above the fireplace. This means I need two things above the fireplace: power and HDMI. I don't want to just run an HDMI cable in the wall. I'd prefer to have some sort of conduit to simplify replacing the cable or having a second (with one of these on each end: ). I only need to drill through two studs that are 6" apart above the right side of the fireplace in order to access the vertical space where I want the other end. For the power, I need to drill through two 6"-spaced studs above the left-side of the fireplace, but then another 2 full-height studs.  There are a couple of caveats:   This is an externally facing wall, which means there's insulation. I'm assuming this will make things more difficult. I'd like to refrain from cutting more holes in the wall than is necessary for the outlets (to reduce drywall damage/repair).   I've considered a couple of options:   Cut the openings for the outlets above the fireplace, and use a flexible drill bit to drill through the studs above the fireplace. This minimizes dry-wall damage, but how difficult is this with insulation in the wall, how can I feed the conduit through those holes, and how would I drill through the full-height studs on the left for power? Cut a wide section of dry-wall (4" high?) from the desired media outlet to the right until reaching the gap above the desired lower outlet. This results in some dry-wall damage, but would allow more control for drilling holes in the studs and running conduit. This still doesn't solve the problem of getting through the full-height stud for the power. For the power, I would need to extend the cut-out two studs further.   What should I do?


I have installed ubuntu 12.04 lts I have 500 gb single partitioned hard disk on which this ubuntu is installed  now i want to create two partition  but when I try using gparted it is only showing unmount option(all other options are grey) so how can i do it without losing any data

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I know digital cameras have ISO options, and that ISO is the camera's sensitivity to light, but if you set  higher ISO then you can get a noisy image. I also know there are two other camera options, shutter speed and aperture.   What is the relationship of between them? Is there any equation, or something like that?  For example, if I set the ISO to 640, then how should I set the shutter speed and aperture?

What is the exposure triangle? How do the "sides" affect my photographs?


Let $X$ be a non-negative random variable on $(\Omega, \mathcal{F}, P)$ such that $E[X]<\infty$. I need to show that: $E[X]=\int_0^\infty P(X>t) \ dt$ (Riemann integral) where $E[X]=\int_\Omega X \ dP =\int_\mathbb{R}x \  dP_X$   (Lebesgue integral). Any help would be appreciated, thank you.

Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X>  t)$. Although how useful integrating that is, I really have no idea.


Lets not talk on the of scale of big data center. Keep it simple. Every users gets an internet connection from an ISP. And if i want to run a web server. I usually forward the packets from my router to the desired computer. This is called as port forwarding.  Lets take for instance, I have two servers in my lan. I want both the servers to be actively responding. I have a single external ip say 182.22.XXX.XXX. I can only port forward to one computer. How can i port forward the same port 80 to two computers in the lan. can how does the person outside the lan differentiate the computers that is inside the lan. since we have only one external ip in our case??

I have multiple web servers behind a single firewall (SVN, Exchange, etc.).  I want to be able to access all of the various servers remotely, but since they are All using the same port (the standard HTTPS), is this possible?  If I set it up so that each is listening on different ports, would it be possible to make it so that I could access each server using a different sub-domain (so svn.domain.com would point to svn, mail.domain.com would point to exchange server)?  Is there perhaps a way to set up my router to forward a port differently depending on which sub-domain the client requested?  How do people normally go about this issue?


I run Ubuntu 16 on VMWare machine. After removing X11 configuration files I got this message during startup:  The system is running in low-graphics mode  Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   Mouse and keyboard don't work after displaying this message. How can I boot in a very basic mode and get a console? ctrl+alt+F1 etc to select text console doesn't work.  This is not duplicate, since I'm asking not about fixing displayed error, but how to get to console mode.

Is there any way to temporarily disable GUI (X server) when booting an Ubuntu 16.04 LTS installation?  There are various guides advising to add text option onto the line GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub or directly on the linux line in GRUB. These methods work well in Ubuntu 14.04 LTS but I always end up in LightDM when trying them in 16.04 LTS.


I am trying to start up an old ubuntu machine I had in my room but I don't remember the password, is there any way to get into the main account without the password?

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


If you would be so kind to explain and answer my dilemma, I'd be grateful of all of you.  Here is the error:  Error mounting /dev/sda1 at /media/ubuntu/System: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999,dmask=0077,fmask=0177" "/dev/sda1" "/media/ubuntu/System"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda1': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   Problem: I cannot mount my System or "Windows" Drive. In the first place, it said i cannot boot windows, so i got Ubuntu instead. So after trying to get my 800gb Windows drive back, this error popped up. Any help would be wonderful.

I've got this error and I can't access my files located in a different partition when I'm using Ubuntu, but when I'm using Windows 8 my files are accessible. I'm using Ubuntu as my main OS. I tried shutting down Windows 8 properly but still nothing happened. Is there any way where this can be fixed?  Error mounting /dev/sda4 at /media/kris/BackUp Files:  Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/kris/BackUp Files"' exited with non-zero exit status 14:  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


As the title says, when I cast a close vote using the Android app, it shows a mesage saying "Flag submitted":    It should say "Close Vote submitted" instead, or maybe "Your vote has been recorded" like on desktop. Apparently, this , but it seems it has reappeared.  Also, the button on the dialog you get when entering a custom close reason also says "Flag" - it should say "Vote to close" or something like that instead.

When I use the Android app to submit a close vote, the green "pop-up bar" on the top of the screen says "flag submitted."  Instead, it should say something like "vote cast."  This was somewhat confusing, given that it is possible for lower-rep users to flag as off-topic instead of voting to close.   Below is a screencapture, with a freehand circle to highlight the problem.  (This message is displayed after voting to close, not submitting a flag.)


Pirates of the Caribbean: Dead Men Tell No Tales seems to contradict the entire movie series, because the compass Jack possesses was allegedly given to him by Tia Dalma. But in Dead Men Tell No Tales it is said that the compass was handed over to Jack by a dying pirate. Who actually gave Jack the compass?

In the earlier films it is said that Jack bartered for the compass from Tia Dalma. However, in the newest film during Salazar's flashback it shows that the captain of his ship is wounded and hands the compass to Jack.  So how did Jack get his compass and why does this feel like a discrepancy in the plot?


How can I format my disk to NTFS I need to delete everything so I can buy Windows XP and reinstall thanks Barara

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I would like to draw lines which have two colors along the complete length. In principle I could draw two lines next to each other which are slightly shifted, however, this seems like a whole lot of fiddling with coordinates to get everything right. Is there some generic way to do this, or has somebody already written something like this and made it so that it is portable?  A short example:  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}   \node [circle,fill] (e0) at (5,1.5) {};   \node [circle,fill] (e1) at (0,0) {};   \node [circle,fill] (e2) at (10,0) {};   \node [circle,fill] (e4) at (5,3.5) {};   \draw [ultra thick, blue] (e1) to  (e2);   \draw [ultra thick, green] (e1) to (e4);   \draw [ultra thick, blue](e1) to (e4);   \draw [ultra thick, blue] (e2) to (e4);   \draw (e1) to (e2);   \draw [ultra thick, green] (e0) to (e1);   \draw (e0) to (e2);   \draw [ultra thick, green] (e0) to (e4); \end{tikzpicture} \end{document}   I would like the edge from e1 to e4 to be green and blue, with the green line running along the inside of the triangle and the blue line along the outside of the triangle.

How can parallel lines elegantly be added to an existing path? I am looking for a solution or hint to, how a general style can be made, that works with any path.  Example path:  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}   \draw (0,0) -- (1,1) -| (2,2) -- (3,2) -- (3,1); \end{tikzpicture} \end{document}     Same path, with customizable extra lines:    Here I have drawn two extra lines, just to show, what I mean. Ideally a solution should only add one extra line, but somehow be expandable to any number of lines.  The question: , where my solution is less than elegant, has inspired me to ask this question.


I have a very strange issue.    on one of my 2008R2 file servers that has been around for years  yesterday about half of the folders in one of the shares started showing hex values instead of the folder names.  the subfolders still show their correct names.   example ,,  share/ {14270683-1693-1584-1493-948150471693}\finance PO   this is affecting about 1000 folders on a 7tb share drive    All other folders in that share are listed by their names.   windows 2008R2 fiber connected SAN,   Symantec AV,  SCCM client installed.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I'm looking to split a given string into a list with elements of equal length, I have found a code segment that works in versions earlier than python 3 which is the only version I am familiar with.   string = "abcdefghijklmnopqrstuvwx" string = string.Split(0 - 3) print(string)  >>> ["abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx"]   When run in python 3 it returns the following error message:  TypeError: Can't convert 'int' object to str implicitly   What changes can I make to make this compatible with python 3?

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


I encrypted my computer with FileVault full disk encryption on Yosemite. FileVault gave me an emergency decryption code to use when I forgot my password.  For some reason, when I changed my account password while the drive was being encrypted it gave me another emergency code. How can I verify which one works?

I have a volume that is encrypted with OS X Lion's full-disk FileVault. When I enabled FileVault I was given a recovery key, which I wrote down. I'd like to verify that the recovery key that I wrote down is correct before I store it somewhere safe.  How can I verify that a FileVault recovery key is correct?


Show whether:  $$\sum_{n=1}^{\infty}\frac{n!}{n^n}$$  converges.

I can clearly see that $\dfrac{n!}{n^n}\to 0$ when $n\to\infty$. But how do I know if the sum $$\sum_{n=1}^{\infty}\frac{n!}{n^n}$$ is convergent or not? I know this might be basic, but thank you if anyone can help me.


I am trying to do SVD by hand:  m<-matrix(c(1,0,1,2,1,1,1,0,0),byrow=TRUE,nrow=3)  U=eigen(m%*%t(m))$vector V=eigen(t(m)%*%m)$vector D=sqrt(diag(eigen(m%*%t(m))$values))  U1=svd(m)$u V1=svd(m)$v D1=diag(svd(m)$d)  U1%*%D1%*%t(V1) U%*%D%*%t(V)   But the last line does not return m back. Why? It seems to has something to do with signs of these eigenvectors... Or did I misunderstand the procedure?

I performed principal component analysis (PCA) with R using two different functions (prcomp and princomp) and observed that the PCA scores differed in sign. How can it be?  Consider this:  set.seed(999) prcomp(data.frame(1:10,rnorm(10)))$x              PC1        PC2  [1,] -4.508620 -0.2567655  [2,] -3.373772 -1.1369417  [3,] -2.679669  1.0903445  [4,] -1.615837  0.7108631  [5,] -0.548879  0.3093389  [6,]  0.481756  0.1639112  [7,]  1.656178 -0.9952875  [8,]  2.560345 -0.2490548  [9,]  3.508442  0.1874520 [10,]  4.520055  0.1761397  set.seed(999) princomp(data.frame(1:10,rnorm(10)))$scores          Comp.1     Comp.2  [1,]  4.508620  0.2567655  [2,]  3.373772  1.1369417  [3,]  2.679669 -1.0903445  [4,]  1.615837 -0.7108631  [5,]  0.548879 -0.3093389  [6,] -0.481756 -0.1639112  [7,] -1.656178  0.9952875  [8,] -2.560345  0.2490548  [9,] -3.508442 -0.1874520 [10,] -4.520055 -0.1761397   Why do the signs (+/-) differ for the two analyses? If I was then using principal components PC1 and PC2 as predictors in a regression, i.e. lm(y ~ PC1 + PC2), this would completely change my understanding of the effect of the two variables on y depending on which method I used! How could I then say that PC1 has e.g. a positive effect on y and PC2 has e.g. a negative effect on y?    In addition: If the sign of PCA components is meaningless, is this true for factor analysis (FA) as well? Is it acceptable to flip (reverse) the sign of individual PCA/FA component scores (or of loadings, as a column of loading matrix)?


Recently our teacher asked us to arrange a circle, a square, a rectangle in the order of their increasing areas(perimeters are equal).  I found that circle has much area then a square.  But I was unable to find relation of third one.  Please help me to arrange them (with proof).

I was given a question which was like:     Suppose that a circle, square, rectangle and triangle have same perimeter. How area their areas related??   My work:  I broke the question in parts and tried to prove it seperately:  STEP $1$. Suppose the given perimeter is $P$.So the radius of circle will be ${r=P/2\pi}$.  And hence area of the circle will be:   ${P^2/4\pi}$.  Side of square will be $P/4$ and hence area of square will be $P^2/16$.   It is obvious that ${P^2/4\pi}$  >  $P^2/16$.   So Area of circle is more than area of square.  STEP $2$: Whether by using $AM>GM$ inequality or by using a bit of differentiation, we can get that product off two quantities is maximum when they are equal.  So, Area of square is more than Area of rectangle.  Here, the hardest part come (at least for me). I can't relate the area of triangle to any of Circle, Square or Rectangle. It would have been easy if the triangle was Equilateral, Right angle but the question is talking about a general triangle.  However, when I considered the situation with different examples (Assuming the perimeter and calculating the area, I got the relation:  Circle > Square > Rectangle > Triangle.  I shall be highly thankful if you guys can establish the relation in purely mathematical way.  EDIT: This question does not ask that whether circle have the largest area among all 2-D figures or not. The OP just want to relate the areas of Circle, Square, Rectangle, Triangle in a pure mathematical way.


I am using windows 10 pro for couple of months. I had no problem like this in past. My internet speed is 1.5 mbps. A windows built in program called svchost.exe (netsvcs) is taking all of my bandwidth and I can't even visit any website. Here are some screen shots:    Disclaimer: I am 100% sure this not happening for windows update and my system is up to date. I dont use any antivirus like avast or avg .I use windows defender and it is also up to date.  What can I do to prevent this?  Edit:  No one couldn't give me any correct method(answer). I think I have to uninstall windows and install linux or buy a mac. It's a super buggy os and the start menu crashes 100 times a day! I have to lose my favourite programs which is not available in mac or linux! Some one marked this question as duplicate. This is a different question.

I'm having a problem with Windows 7 64-bit. I thought it was slow and all, but then I saw that the CPU usage was always around 80% and started searching for a solution.  There are two svchost.exe's consuming around 30% each and in the resources monitor there's a system interrupts consuming 45% all the time. I tried closing the applications, but it makes no difference.  I tried some other things that I've found on Google, like disable system updates, but it didn't work.  I don't know if it will help but here's my specifications:  Core 2 Duo 4400 ATI Radeon 4850 4 GB DDR2 RAM     EDIT  I ran the suggested program and got this information; did I get it right?      EDIT  As you asked here it is, did I get it right now? The other TCP/IP there's nothing.    EDIT  I ran msconfig and took the services that one of the svchost.exe processes was using out of the startup and now my CPU is around 50%, but I still would like to improve it further. I can't lose that much CPU power just because of Windows...    EDIT  Yeah, there's nothing I can do here. I am going to reinstall Windows XP soon, it's really weird...


My terminal is set to UTF-8. If I type this:  echo -n 'ýá' | xxd   I can see this output:  00000000: c3bd c3a1   Which is fine. Now I would like to remove the 'ý' character from the string, so I use:  echo -n 'ýá' | tr -d 'ý' | xxd   But the result will be:  00000000: a1   The tr removes also the next c3 byte, but that is part of the 'á' character. Why is working this way? Is this a bug? Or should I set something?

I'm trying to remove some characters from file(UTF-8). I'm using tr for this purpose:   tr -cs '[[:alpha:][:space:]]' ' ' <testdata.dat    File contains some foreign characters (like "Латвийская" or "àé"). tr doesn't seem to understand them: it treats them as non-alpha and removes too.  I've tried changing some of my locale settings:  LC_CTYPE=C LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' <testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' <testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8 tr -cs '[[:alpha:][:space:]]' ' ' <testdata.dat   Unfortunately, none of these worked.  How can I make tr understand Unicode?


I'm trying to change an item in a nested list. I thought this would be very straightforward. I have the following:  temp = [1, 2, 3, 4] my_list = [temp for i in xrange(4)] print "my_list = ", my_list  out: my_list =  [[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]   So just a normal list of lists. I want to access one item:  print my_list[0][1]  out: 2   As expected. The problem comes when changing the item. I just want to change item in my_list[0][1], but I get the following:  my_list[0][1]= "A" print my_list  out: [[1, 'A', 3, 4], [1, 'A', 3, 4], [1, 'A', 3, 4], [1, 'A', 3, 4]]   Why is it changing the four positions, instead of just one? How to avoid it?

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?


What's it called when someone blames you or accuses you of doing something because they're doing it themselves? For example, when your boyfriend/girlfriend is cheating on you, so they assume you're also cheating on them. I remember finding a word for it, but I can't seem to find it anymore...

Say person A and person B are having a discussion/argument.   Person A tells person B that his views are arrogant, or closed-minded, or some other derogatory adjective. But in fact it is person A's views that are arrogant, closed-minded, etc. Person B's views are usually the exact opposite of what person A is accusing him of.  This sort of situation happens a lot when discussing politics or religion, for example.  What do you call person A, for calling person B something that he himself is?  I guess, for the most part, person A doesn't actually realize that he is the one that the adjective applies to, and not person B. Maybe there is a different name if person A knows the adjective also applies to him.


I'm trying to add a node before the last node in a linked list but I'm having a null pointer expecption on one on of my tests. my code:     IntegerNode current = head; IntegerNode newNode = new IntegerNode( value ); IntegerNode prev = head;   }

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 saw this show in France in the late 70s. I believe it was in black an white so it may have originated in the 60s. As far as I recall this was a short story. It had the same feeling as the Twilight Zone and it could possibly be a part of it. The story takes place with scientists in some kind of research lab that looked contemporary for the time. The leading character, a scientist, start to receive in his mail some electronic components he hasn't ordered and when he decides to test what they are, he seems very surprised that they don't have the same characteristics as anything he knows. In one scene he demonstrates to one of his colleagues how it takes a lot to blow one of them compared to the ones they normally have. The backstory is some aliens sending him parts to build equipment that will allow communication.

Bits I remember about this SF movie which probably originated in late 50s / early 60s:   Humans are flying in a light, general aviation, high winged, single engine aircraft. An alien in a flying saucer abducts the whole kit & kaboodle (plane & passengers). Takes them to a secret terrestrial base Eventually tells them that his computer is damaged and he needs their help to get back to his planet. He needs an astronomer for planetary masses & other information. He needs a mathematician to calculate trajectories and perform other calculations. He needs the woman as eye candy, lol They eventually make it back to the alien home planet which is under attack by its enemy. The attacking aliens are bombarding the original alien's home planet with meteors / asteroids.   That's about all I remember.


If I have a property group with a lot of properties, and I want to define a single update function that is called when any one of them changes, is there a way to send details about the variable being updated to that handler?  Something like..  def OnPropertyChange(self, context, identifier):     property_that_changed = self[identifier]  ...  class Props(bpy.types.PropertyGroup):     MyVal : BoolProperty(update=OnPropertyChange("MyVal"))   If this is not possible, is there any way to use a single handler like this without defining separated/specific handlers for every property? The only strategy I've come up with to get this working is by doing this, which is pretty terrible when you have a lot of them:  def GlobalPropertyChange(self, context, identifier):     property_that_changed = self[identifier]  def PropChangeMyVal(self, context):     GlobalPropertyChange( self, context, "MyVal" )  def PropChangeOtherVar(self, context):     GlobalPropertyChange( self, context, "OtherVar" )  def PropChangeThirdThing(self, context):     GlobalPropertyChange( self, context, "ThirdThing" )   I know it may be possible to define classes and functions dynamically in Python (I haven't tried it yet), which may be better than this in terms of maintenance. But I'm hoping there is a much simpler idea that I'm totally missing out on.  Appreciate any advice

I'd like to use the same update function for several properties but I will need to know which property calls this function like in this script exemple.  import bpy from bpy.types import Panel, PropertyGroup from bpy.props import BoolProperty, PointerProperty  def update_function(self, context):     #if firstProp use this function:     #   do this     #elif secondProp use this function:     #   do that   class MyCollectionProperty(PropertyGroup):      firstProp = BoolProperty(             name = "Fisrt",             default = False,             update = update_function,             )      secondProp = BoolProperty(             name = "Second",             default = False,             update = update_function,             )  class TestPanel(Panel):     bl_idname = "test_panel"     bl_label = "Test Panel"     bl_space_type = "VIEW_3D"     bl_region_type = "TOOLS"     bl_category = "category"      def draw(self, context):         myProps = context.window_manager.myProps         layout = self.layout          layout.prop(myProps, "firstProp")         layout.prop(myProps, "secondProp")  def register():     bpy.utils.register_module(__name__)     bpy.types.WindowManager.myProps = PointerProperty(type = MyCollectionProperty)  def unregister():     del bpy.types.WindowManager.myProps     bpy.utils.unregister_module(__name__)  if __name__ == "__main__":     register()   Is this possible or are we obliged to create a function per property?


I'm trying to install VMWare Player. I've downloaded .bundle file in ~/Downloads. To install I switched to root account, changed directory to ~/Downloads and ran apt-get install VMware-Player-15.0.2-10952284.x86_64.bundle. But I'm getting:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package VMware-Player-15.0.2-10952284.x86_64.bundle E: Couldn't find any package by glob 'VMware-Player-15.0.2-10952284.x86_64.bundle' E: Couldn't find any package by regex 'VMware-Player-15.0.2-10952284.x86_64.bundle'   How do I install VMWare successfully?

I am new to Ubuntu and want to install VMWare Player. What is the step by step procedure to install that?


Can i move my reputation from one website (like ) to another website(like )?  Is it possible?   Thanks!

I have a 5k rep on SO.  I don't visit Server Fault or Super User often, so I have much less rep on those sites.    Whenever I see a question on SU or SF which does not belong or needs correction, I immediately move my mouse pointer to the question options.  But I won't see them as I don't have enough rep.  Do you feel that SO reputation should be considered in these circumstances?


I have been told that X is a sufficient cause of Y if every time X happens, Y happens, too. However, isn't it the same as 'correlation'? For instance, if I say that global temperature is correlated with human average height, is it valid to say that a rise in global temperature is a sufficient cause of an increase in human average height?

What is the difference between correlation and causation?  Pirates and Global Temperature Example  For example, how do we know when we're dealing with correlation only and not also causation here?   What Certain Philosophers Seem to Hold Regarding This  It would seem that   Hume would saycorrelation ≡ causation. Aristotle would say that in generalcorrelation ≢ causationand thatcausation ⇔ correlationonly if we are not dealing with chance events.   ("≡" means "is identical to," and "⇔" means "implies each other.")


Its my first time traveling in USA, and i will be transit in Atlanta airport for two hours. I am afraid to lose the next plane to Florida. Could you please give me any advice what should I do?

Is 1 hr and 30 mins enough time for first time travelers at Atlanta airport? I am flying first time from USA to Bombay and my first transit is at Atlanta. I assume I have to go from the domestic terminals to the international departures for which I have to take the "Light Train".  Is it easy to find the stations for those trains? Is it enough time to make it to the next flight?


Hi I am a beginner in blender, it worked fine until I tried to render a video from video editing section in blender and after that my render stopped working, here's before:  And here's after:

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Let $a,b,c$ be positive, not equal. Prove that $3(a^3+b^3+c^3) > (a+b+c)(a^2+b^2+c^2)$.  I know the proof by subtracting LHS by RHS and then doing some arrangement.  But isn't there any inequality which can be used in $(1+1+1)(a^3+b^3+c^3) >(a+b+c)(a^2+b^2+c^2)$, or an easy proof?


Stackoverflow continues to suffer from a quality problem. I don't think any amount of policing can solve the problem. Stuff may get cleaned up, but there's still a ton of garbage temporarily for me to see. No matter how fast the street sweepers go, when I look outside, there's still litter to see.  The real problem is that users that drive by and ask questions are not invested in the site. Not even a little. They want their answer, and there's enough smart reputation starved psychic debuggers out there to figure out there problem for them. We've massed an army of awesome super programming ninja. However, there's hordes of barbarians at the frontier. We know there's like 99 bad wanna-be can't fizz-buzz programmers out there for every competent programmer. We can't win a war of attrition with them. There's just too many bad programmer barbarians at the frontier of our Civilization to make a dent with moderation, down-voting, etc.  What we really want is question askers who are going to be invested in the community. People who, despite their newb status, want to learn and get better. We want people who don't just want their current problem solved, they want to make themselves better programmers.  I think we've reached the point where to participate, you have to prove your worth or at least interest to the community somehow. This is unabashably the Starship Troopers model of Stack Overflow. Force people to contribute before they take away. I think its a good model. If we don't do something, this is just going to devolve into the dead newsgroups of yore. Lots of newbs and lots of moderators. And nobody else. The true meat of society -- artisans, craftspeople, etc -- having long left the festering ruins for others to pick over. Because nobody cares about worrying about moderating every question (they just want to have fun providing answers). If the inside baseball takes over, then we're doomed.  I propose that a questioner on StackOverflow should have had to prove themselves to the community. The simplest way to do this is to require they answer a question and get it upvoted by somebody before they can ask questions. Maybe we should actually enforce a required amount of rep before a question can be asked. Maybe some rep on another, lower traffic SE site would be sufficient to prove some investment. Maybe there's other ideas I haven't thought of...  I'm wondering if I'm way off the mark? What are your thoughts?

I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement.


I was banned permanently from the US in 2009 for misrepresenting a document issued by an agent that I used. I'm applying for a Canadian student permit and I would like to know if this ban would affect my application?

I was approved for an immigrant visa and later deny me before picking up my visa at the US embassy after a few days of my interview, cause they found out that from my previous interview (2005) 4 years before the recent one in(2009), that my information was mixed up on my passport. Eg, My name on my old passport had John Olamide Obie and the new one had John Seun Obie, But my full name is John Seun Olamide Obie on my birth certificate. The reason why i had issues with that was that we are only allowed to put 3 names on our passport. Plus old passport had 30 January 1985( Agent made mistake with my passport application) and my real birthday is 30 January 1979.  I have been giving the offer to study in Canada, but I don't know if that would affect my Canadian immigration application, since I had issues with the Us embassy in Nov 2009.  My understanding is based on the section that says:  In general: Any alien who, by fraud or willfully misrepresenting a material fact, seeks to procure (or has sought to procure or has procured) a visa, other documentation, or admission into the United States or other benefit provided under this Act is inadmissible.  Does that affect North American countries, since they share databased?  Thank You.


Do we have any possibility that we get , $ p^2 = 2q^2 $, $ \forall p,q \in {N} $ I just reading the properties of Square Numbers on [  ] I found that property no.7:  There are $n$ natural numbers $p$ and $q$ such that $p^2 = 2q^2$. I tried but did not get any pair of numbers. I tried some  examples:  If we have $12^2=144=2(72)$, and $72$ is not perfect square  $10^2=100=2(50)$, and $50$ is not perfect square  $ 22^2=484=2(242)$, and $242$ is not a perfect square  $ 16^2=256=2(128)$, $128$ is not perfect square.   Do we have any possibility with $p,q\in\mathbb{N}$ such that $p^2=2q^2$ holds?

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


I am new to LaTex, though I wrote three research papers in LaTex with the help of this forum. Thanks to all users, who answered my queries. I found LaTex very interesting and am motivated to write my Ph. D thesis in LaTex. However, there are a number of templates available and I am slightly confused, which one should I choose. Our Institute does not have any specific template. Kindly suggest which one will be easier for me?

Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)


Trademark names that start with a lowercase letter -- do we cap the lowercase letter when it starts a sentence?  E.g.:  iTunes is a hot spot in the app store.  Not: ITunes is a hot spot ...  iPhone sales have plummeted since the inception of the Samsung S5.  Not:  IPhone sales have plummeted since the inception of the Samsung S5.

I was always taught to capitalize the first letter of the first word in a sentence, and also the first letter of proper nouns. In the last few years it's been common for certain firms to name their brands something that is always spelled with a small first letter and a capital second letter. It is almost as if they demand the rules of usage are changed. What do you do about this? Where is the inquisition when you need it? Should you start a sentence with "IPhone"? Should you use "iphone" in the middle of a sentence?


I found this old post (concerning QGIS 1.x)   and was wondering whether this had been solved in QGIS 2.0. Is there a way of only showing the attributes in the legend that are visible on the map?  It seems to me that this is not straightforward in ArcGIS either and I think it would make sense to impement this (in QGIS as I'm trying to use ArcGIS as little as possible). Imagine how useful it would be when you have a geology maps and you don't want to show hundreds of formation but only the few formations you can actually see in the map composer ...

Is there in QGIS a function or a plugin that works similar to Legend Limiter in ArcGIS? The attribute I want to show in my legend has many possible values, I want my legend to only show those values that are visible on my view in the print composer.


I am using Matlab glmfit for logistic regression. Now I know that usually people use the cross entropy to evaluate the error in predictions against the true labels ( which different than the linear regression where they use Mean Square Error (MSE) or Sum of Squares SS). My questions:   1) Is true that whenever I use builtin logistic regression function (as in glmfit in matlab) I would assume they use the cross entropy as a cost function? I read through the documentation of glmfit here but nothing mentioned about that.   2) And in general if someone handed me a logistic regression solution (or read a paper that says they implemented a logistic regression) is it fair to assume that they used cross entropy as a cost function unless stated otherwise?  Note my question is mathematical, rather it is about the implementation in matlab and the norm in this field..

I read about two versions of the loss function for logistic regression, which of them is correct and why?  From  (in Chinese), with $\beta = (w, b)\text{ and }\beta^Tx=w^Tx +b$: $$l(\beta) = \sum\limits_{i=1}^{m}\Big(-y_i\beta^Tx_i+\ln(1+e^{\beta^Tx_i})\Big)  \tag 1$$  From my college course, with $z_i = y_if(x_i)=y_i(w^Tx_i + b)$: $$L(z_i)=\log(1+e^{-z_i}) \tag 2$$    I know that the first one is an accumulation of all samples and the second one is for a single sample, but I am more curious about the difference in the form of two loss functions. Somehow I have a feeling that they are equivalent.


This pipe has a very slow leak. What is the pipe for and what is the best way to stop the leak?

I noticed there is a square knob sticking out of my basement wall. Does anyone know what this is?


by repeatedly asking the same question. The user would ping individuals with the same message. I've asked the user to please stop bugging people and moved the messages to bin (message trashcan). Unfortunately, the OP continued, so I started to flag his messages (about 5). I deliberately flagged all those to give those able to moderate the chance to have some sense of context about whats happening. Then the OP started to accuse us of being unhelpful. We explained once more what we think of his behavior. He started to flag some of our messages in turn. Shortly afterwards, someone from the C++ chat comes in and complains about the flagging and a new argument started. Since this is not about pointing fingers or who said what to whom in what channel and to what effect, I'll just give you the quintessence:  Every time you guys flag something, all 10k+ users across the whole chat are asked to validate a flag given only a context free message and a link to the chat. That is terribly annoying. […] That button popping up irks me to no end. It's like a phone ringing, I cannot concentrate on anything else, and just have to pick it up.  Regardless of whether you agree with this or not, here is my suggestion: Since there has been  about how the  works in the past, I think we should add an opt-out for those not wanting to participate in chat moderation (or improve the process in some other way). If people simply mass-(in)validate just to get rid of the flags, the tool is ineffective. I'd rather have those willing to participate handle flags with care instead.

I'm not a moderator. I have ~50k rep on Server Fault. I am a regular in chat.  Because chat allows all 10k+ users across the network to act on chat flags, I (and many other regulars in SF chat) see some problematic users from other chats flagging things that aren't actually offensive.  I disagree with the current chat moderation model where anyone from any community with enough rep can vote on small snippets of text that provide no context. I think that's a bad system. It's been brought up time and again that there must be a better way to handle it, but nothing has happened to date.  If the global chat moderation system won't be re-thought, I would like to be given a way to opt out of seeing chat flags that originate from outside rooms that I'm currently in.   I was never elected as a mod, I never asked to be able to see them, and they get on my nerves.    TL;DR - I don't want to see chat flags from rooms that I'm not in. Let me opt out of seeing them.


While programming an iPhone application, how can I find the timezone of any city / country?

Is there a web service of some sort (or any other way) to pull a current time zone settings for a (US) city. For the parts of the country that don't follow the Daylight Saving Time and basically jump timezones when everyone else is switching summer/winter time... I don't fancy creating own database of the places that don't follow DST. Is there a way to pull this data on demand?   I need this for the database server (not for client workstations) - there entities stored in the database that have City, State as properties. I need know current timezone for these entities at any moment of time.


I have the following html code.  <!DOCTYPE html>

My First Heading

My first paragraph.

Paragraph First

alice

bob

foo

grow

coding

fun

Paragraph Second

           I want to get the text of all the elements to an array(pre order transverse preffered). So for the following example array consists of,  [My First Heading, first paragraph, Paragraph First, alice, bob, foo, grow, coding, fun]   I can use jQuery if it needsHow. can I achieve this ?  My own non-working attempt  var root = document.documentElement;  recursivePreorder(root); // Recusively find and handle all text nodes  function recursivePreorder(node) {      // If node is a text node      if (node.type == 3) {     //add to the array      }   // else recurse for each child node      else {          for(var i=0; i<node.childNodes.length; i++)              recursivePreorder(node.childNodes[i]);      } }    UPDATE  when my tag is
boblink textalice
 it gives me as [bob, link text, alice] . But I want the output as [boblink textalice] means links are working correctly. This is my current solution,  var arr=$('body').find('*').contents().filter(function () { return this.nodeType === 3&&this.textContent.trim()!=""; });    how to solve this problem ?

I would like to get all descendant text nodes of an element, as a jQuery collection. What is the best way to do that?


My laptop keyboard is not working from last week. I found that it is ok in Boot mode. Therefore, I have planned to replace my windows with ubantu 18.04. I have UEFI boot. In the past, I tried to convert my machine in dual boot setup with ubantu 14. However, it did not work. I got the o.s options the first time. I select windows, from the 2nd time it stopped given me o.s options selection and directly boot to windows. Therefore, I am little bit afraid about ubantu installation. Will it boot correctly with UEFI?

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


I have this HashMap:  HashMap<String, Integer> m   which basically stores any word (String) and its frequency (integer). The following code is ordering the HashMap by value:  public static Map<String, Integer> sortByValue(Map<String, Integer> map) {         List<Map.Entry<String, Integer>> list = new LinkedList<Map.Entry<String, Integer>>(map.entrySet());          Collections.sort(list, new Comparator<Map.Entry<String, Integer>>() {              public int compare(Map.Entry<String, Integer> m1, Map.Entry<String, Integer> m2) {                 return (m2.getValue()).compareTo(m1.getValue());             }         });          Map<String, Integer> result = new LinkedHashMap<String, Integer>();         for (Map.Entry<String, Integer> entry : list) {             result.put(entry.getKey(), entry.getValue());         }         return result;     }   Now the scenario has changed and i have this:  HashMap<String, doc>;  class doc{ integer freq; HashMap<String, Double>; }   How can i sort this HashMap by value, following the same approach as sortByValue?

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I've been using dd for a couple of years now, most of the time successfully. I usually use it to dd Linux images to USB drives. My workflow doing so is as such:   convert .iso image to a .img format using hdiutil convert -format UDRW output.img input.iso unmount the drive using diskutil unmountDisk /dev/diskX dd the image to the drive using dd if=./image.img of=/dev/rdiskX bs=1m   Lately, and namely since I upgraded to Yosemite, dd has been showing some weird behavior. When I specify the block-size flag (bs=1m), it quits after about a minute, showing the default successful write message with the numbers of records in/out and bytes transferred and all that. What you would expect on a successful write. The problem is, it writes just a very small part of the image, then quits.  When I do not specify the block-size flag dd behaves as expected, writing the image to the disk in the ordinary fashion. Does anyone have any idea why this is happening?

Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write?  Long version — preamble: dd is often used to copy data, especially from or to a device (). It's sometimes attributed mystical properties of being able to access devices at a lower level than other tools (when in fact it's the device file that's doing the magic) — yet dd if=/dev/sda is the same thing as cat /dev/sda. dd is sometimes thought to be faster, but . Nonetheless, .  Problem: dd if=foo of=bar is not, in fact, the same as cat <foo >bar. On most unices¹, dd makes a single call to . (I find  fuzzy on what constitutes “reading an input block” in dd.) If read() returns a partial result (which, according to POSIX and other reference documents, it's allowed to unless the implementation documentation says otherwise), a partial block is copied. Exactly the same issue exists for write().  Observations: In practice, I've found that dd can cope with block devices and regular files, but that may just be that I haven't exercised it much. When it comes to pipes, it's not difficult to put dd at fault; for example try :  yes | dd of=out bs=1024k count=10   and check the size of the out file (it's likely to be well under 10MB).  Question: In what circumstances is dd safe to use for copying data? In other words, what conditions on the block sizes, on the implementation, on the file types, etc, can ensure that dd will copy all the data?  ( has a fullblock flag to tell it to call read() or write() in a loop so as to transfer a full block. So dd iflag=fullblock is always safe. My question is about the case when these flags (which don't exist on other implementations) are not used.)  ¹  I've checked on OpenBSD, GNU coreutils and BusyBox.


Is it wrong to initialize a virtual property in the constructor? It just does not feel right because if you override the property in a derived class the property will first be initialized with the value from the base class constructor then it will be assigned again by the derived class constructor. is there an alternative for doing this? I'm talking about something like this  internal class B1 {     public B1()     {         Ti = "Hello";     }      public virtual string Ti { get; set; } }  internal class B2 : B1 {     public B2()     {         Ti = "HelloKitty";     }      public override string Ti { get; set; } //<--"Hello" will be assigned first then "HelloKitty" will be assigned }  internal class Program {     private static void Main(string[] args)     {         var b2 = new B2();         Console.WriteLine(b2.Ti);         Process.GetCurrentProcess().WaitForExit();     } }   UPDATE 1: As recommended by @AK_  internal class Bb1 {     private string _ti;      public Bb1()     {         _ti = "Hello";     }      public virtual string Ti     {         get { return _ti; }         set { _ti = value; }     } }  internal sealed class Bb2 : Bb1 {     public Bb2()     {         Ti = "HelloKitty";     }      public override string Ti { get; set; } }   the variable _ti in the base class is initialized by "Hello".   what if instead of string type I'm using type which explicitly needs to be exposed?

I'm getting a warning from ReSharper about a call to a virtual member from my objects constructor.   Why would this be something not to do?


It is common  that the universe is 13.8 ± 0.037 billion years - but how was this calculated?

Many times I have read statements like, "the age of the universe is 14 billion years" . For example this wikipedia page .   Now, my question is, which observers' are these time intervals? According to whom 14 billion years?


This is an intriguing scenario that came to my mind. I have not done this and am not planning on doing it, but I am curious about it. Of course, it’s well known that if you hire a paper writer to write your assignment for you, that’s cheating. But what about this situation?:  You have a difficult writing assignment. You follow all the rules, do it yourself, turn it in, and then you get your grade, and it’s a poor grade. But you want to learn what a really good paper for that assignment would look like, for the purposes of gaining knowledge, not grades. So you hire one of those paper writers people usually use to cheat, who is known for getting (dishonest, of course) As on all the papers they write, to nix it for you, so you’ll have an example of what an excellent paper would look like for your study pleasure.  So my question is: is this unethical, and if so, why, and what might be the consequences were it found out? The reason it seems interesting is because it’s being done after the assignment is turned in, so you’re not doing anything to deceive/defraud the teacher or get grades you did not merit – all transactions with the teacher were done by the book. But on the other hand you are going through the motions you’d go through to cheat, not to mention paying money to someone people pay to cheat. So where does this situation stand, ethically, and why?

According to one of my friend's suggestion, I visited a website and was going to find some tutoring support, then I ended up hiring a person to write the essay.   However, I changed my mind and I did work on the essay by myself without reading the bought essay. I am going not to come back to the website again. So if I just hired the essay writer but am not using their work, am I called a cheater? If I pay for a writer am I already cheating, or only when I use their work?


Please help!  I made a Latex (using texworks) and it will not recognize my png file. I have the file in the same directory as the .tex and, when I scroll over the command in tex works, the image appears. I used R to compile the graph. Below are my packages:  \documentclass[12pt,a4paper,oneside,draft]{article}  %\setlength{\columnsep}{.1in} \usepackage{fullpage} \usepackage{graphicx} \usepackage{color} %added \usepackage{longtable} %added \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{amscd} \usepackage{amsopn} \usepackage{amsxtra} \usepackage{amstext} \usepackage{fancyhdr} \usepackage{geometry} \usepackage[english]{babel} \usepackage{setspace} \usepackage{hyperref} \usepackage{harvard} \usepackage{array} \usepackage{multicol} \usepackage{setspace}  \renewcommand\harvardurl[1]{\textbf{URL:} \url{#1}} \geometry{letterpaper}  \geometry{margin=1in}  \renewcommand{\headrulewidth}{-5pt} \lhead{}\chead{}\rhead{\phantom{X} \thepage}   All I am getting is this image below in my document,   Please, any help would be appreciated. I'm on a strict deadline!  Best,  -Chuck

I'm using IEEEtran to format an article, and I wanted to include an image. I included the graphicx and hyperref packages, and used the following code, like normal, to include an image.  \begin{figure}[!t] \centering \includegraphics[width=3in]{fetch} \caption{Pipeline: Fetch Instruction} \label{fig:fetch} \end{figure}   What appears, however, is this:    Fetch.png is a file in the directory, and if I remove it, pdflatex errors instead of producing an output. I'm using MiKTeX 2.9 on Windows 7. Any ideas?


How to Take Print Screen in Samsung Galaxy ace Duos? Can please some body help me.

Is there a way to take a screenshot of an Android device and save it as an image file?


I would know the proof of the union of two non mutual exclusive events. I know that two mutual exclusive events has the union defined like: $P(A\cup B) = P(A)+P(B)$ if $A\cap B = \varnothing  $ Can someone give me the proof that $P(A\cup B) = P(A)+P(B)-P(A\cap B)$ Thank you so much

Say we have a venn diagram with A on the left, intersection C in the middle and B on the right.   I want to show that $P(A\cup B) = P(A) + P(B)  - P(A\cap B)$  I know what it can be written as A+B+C, but a lot of the proofs  go from:  $P(A\cup B) = P(A) + P(B)  + P(C)$ to  $P(A) + P(B) = P(A\cup B)  + P(C) $  and then rearrange to  get the proof and get $P(A\cup B) =P(A) + P(B)-  P(C) $ . I just don't get how the left side of the inequality get go from $P(A\cup B)$  to $P(A) + P(B)$. Doesn't that only happen if we assume that they are disjoint. In this case, do we assume that they are disjoint? I know how to write the proof but just having a hard time actually understanding it.


i'm new in C++.i am basically a C programmer.At present i'm learning about reference.It's very confusing.In C a pointer is the address of the variable and there is a difference b/w pointer and pointer variable.However many times pointer variable short-handed as pointer.  1.My question is that what is meant by reference then.In c++ are reference and address of variable means the same thing?If some one differentiate pointer from reference do he/she mean pointer variable and not pointer.They just written the pointer variable as pointer? If No then what is the difference b/w pointer and reference?   2.In C &a=b is illegal.But in C++ it is not.Why? please help as i am ver confused with it.I had searched about it but couldn't find the satisfactory answer.

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


My function to clear the results of search, works in Chrome, IE, ME, but, in Firefox doesn't works.    My action function:  <apex:actionFunction name="callClean" action="{!cleanResults}" reRender="pageblockid" />`   My class:  public void cleanResults(){         integer deleteRegistros = registro.size();         if(deleteRegistros != 0){             for(integer i=0; i < deleteRegistros; i++){                 registro.remove(0);             }         }     }`

I want to clear the inputtext used to search, and clear all search results using a commandbutton. I tried the following on the 'Reset' button I added but it only clears the inputtext and the search results are not clearing.  <apex:pageBlockSectionItem >                     <apex:outputPanel layout="block" Rendered="true">                     <apex:inputText value="{!ReportSearchString}" />                     <apex:commandButton value="Search" action="{!searchReports}" reRender="ReportSearchResults, "/> &nbsp;&nbsp;                      <apex:commandButton value="Back" action="{!BackToCreateFeedPage}"/>&nbsp;                     <apex:commandButton value="Reset" onclick="this.form.reset();return false;"/>                     </apex:outputPanel>                 </apex:pageBlockSectionItem>                             </apex:pageBlockSection>                         <apex:pageBlockSection id="ReportSearchResults">                 <apex:outputText value="{!warningMessage}" rendered="{!!showTable}" />                 <apex:pageBlockTable value="{!reportList}" var="item" rendered="{!showTable}">                     <apex:column headerValue="Report Name" >                         <apex:commandLink value="{!item.Name}" action="{!BackToCreateFeedPage}">                             <apex:param value="{!item.Id}" name="SelectedReport" assignTo="{!selectedReportId}" />                         </apex:commandLink>   This is my search function, it works fine. I need to clear the results of this search on clicking 'Reset' button.   public void searchReports()     {         showTable = false;               reportList = new List<Report>();          reportSearchResult = new Map<Id, Report>();          selectedReport = new Report();         if((ReportSearchString != null && ReportSearchString != '') && ReportSearchString.length() >= 3)         {             reportSearchResult = new Map<Id, Report>([Select Id, Name From Report Where Name Like :'%'+ReportSearchString+'%' limit 2000]);              warningMessage = 'No Result Found';         }         else         {             warningMessage = 'Search text should have atleast 3 characters';         }     }


I have a brand new iPhone SE, literally opened it two days ago, and for some reason my apps won't download or update? I do not have any paused downloads, and I made sure my iTunes works without internet, and I really do NOT want to restore my iPhone to factory settings, what should I do?

I'm using iPhone 6s 16 GB. My storage isn't full but still I can't download anything. Every time I wanted to start a download it keeps telling:  app name* could not be download at this time


Assume the following tables:  CREATE TABLE X (x_name VARCHAR(100)); CREATE TABLE Y (y_name VARCHAR(100)); INSERT INTO X VALUES ('blue'); INSERT INTO X VALUES ('red'); INSERT INTO Y VALUES ('blue');   Resulting in:  +---------+        +---------+ | Table X |        | Table Y | +---------+        +---------+ |  x_name |        |  y_name | +---------+        +---------+ |  'blue' |        |  'blue' | |   'red' |        +---------+ +---------+   The results of the following queries are as expected:   SELECT * FROM X WHERE x_name IN (SELECT y_name FROM Y); will return one row | 'blue' |. SELECT * FROM X WHERE x_name NOT IN (SELECT y_name FROM Y); will return one row | 'red' |.   Let's insert NULL into table Y:  INSERT INTO Y VALUES (NULL);   The first query will return the same result (blue). However, the second query from above will return no rows. Why is this?

This issue came up when I got different records counts for what I thought were identical queries one using a not in where constraint and the other a left join. The table in the not in constraint had one null value (bad data) which caused that query to return a count of 0 records. I sort of understand why but I could use some help fully grasping the concept.  To state it simply, why does query A return a result but B doesn't?  A: select 'true' where 3 in (1, 2, 3, null) B: select 'true' where 3 not in (1, 2, null)   This was on SQL Server 2005. I also found that calling set ansi_nulls off causes B to return a result.


had a problem with a database on a machine that needed to be formatted, and I backed up the MySQL Server folder yesterday containing the .IDB and .FRM data regarding the DB structure and data.  When replacing files of the same structure on another machine and attempting to perform a query, the database is corrupted. After a bit of research I read that after version 5.5 MySQL creates a reference so it does not exchange this data.  How could I recover this data? Is there any other tool for me to read the file?

I have previously saved a copy of /var/lib/mysql/ddms directory ("ddms" is the schema name). Now I installed a new MySQL on a freshly installed Ubuntu 10.04.3 LTS by running apt-get install mysql-server, I believe version 5.1 was installed. After I copy the ddms directory under /var/lib/mysql, some of its tables work fine, these are the tables with an associated set of three files: a .frm file, a .MYD file and a .MYI file.  However, there are two tables with a different set of files: a .frm file and a .ibd file. These two tables didn't show up in the table list in phpMyAdmin. When I look at the error log, it says:  [ERROR] Cannot find or open table ddms/dictionary_item from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support.   Please help with restoring these two tables. Thanks.


I am developing an android app on android studio & Firebase.  There are 4 different types of users (student, tutor, parent, admin). I want to do it with if statements something like this:   if (user.profile.userstatus == "Student")      intent studentactivity  if (user.profile.userstatus == "Tutor")      intent tutoractivity   So, my main question is that how can I bring the data from firebase?  And, this is my code for distinguishing:  if (isRegistering) {     mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {         @Override         public void onComplete(@NonNull Task<AuthResult> task) {         showProgress(false);              if (!task.isSuccessful()) {                 Toast.makeText(LoginActivity.this, "Could Not Register", Toast.LENGTH_SHORT).show();             } else {                 // show username diaglog                 UsernameDialogFragment dialog = new UsernameDialogFragment();                 dialog.show(getFragmentManager(),null);             }         }     }); } else {     Task<AuthResult> authResultTask = mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {         @Override         public void onComplete(@NonNull Task<AuthResult> task) {             showProgress(false);             if (task.isSuccessful()) {                 // Sign in success, update UI with the signed-in user's information                 FirebaseUser user = mAuth.getCurrentUser();                   //student login                 if (get idstatus == "Student")                 Intent studentintent = new Intent(getBaseContext(), studentActivity.class);                 startActivity(studentintent);                  //admin login                 else if (get idstatus == "Admin")                 Intent adminintent = new Intent(getBaseContext(), AdminActivity.class);                 startActivity(adminintent);                  //parent login                 else if (get idstatus == "Parent")                 Intent parentintent = new Intent(getBaseContext(), ParentActivity.class);                 startActivity(parentintent);                  //tutor login                 else {                 Intent tutorintent = new Intent(getBaseContext(), TutorActivity.class);                 startActivity(tutorintent);                 }             } else {                 // If sign in fails, display a message to the user.                  Toast.makeText(LoginActivity.this, "Authentication failed.",                         Toast.LENGTH_SHORT).show();              }   And this is code for storing data(now working):  public void onClick(DialogInterface dialog, int id) {     // sign in the user ...      //https://myapplication4-124da.firebaseio.com/ https://console.firebase.google.com/project/myapplication4-124da/database/myapplication4-124da/data/      EditText usernameField = ((AlertDialog) dialog).findViewById(R.id.username);     EditText firstnameField = ((AlertDialog) dialog).findViewById(R.id.firstname);     EditText lastnameField = ((AlertDialog) dialog).findViewById(R.id.lastname);     String username = usernameField.getText().toString();     String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();     String firstname = firstnameField.getText().toString();     String lastname = lastnameField.getText().toString();      User aUser = new User(username, firstname, lastname, choice, 0.0);      FirebaseDatabase.getInstance().getReference("users").child(userId).child("profile").setValue(aUser);      Intent intent = new Intent(getActivity().getBaseContext(), studentActivity.class);     startActivity(intent);

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


I made something with the mirroring tool and now when I'm sculpting there's a gap between the two sides? How can I fix that?

When I add a mirror modifier it sometimes doesn't mirror correctly, giving me an overlapping mesh. How can I fix this?


I have done my HW already but our instructor wants us to submit our HWs as yourID_BFS_DFS.java. And I can't do that, it returns error. I know that numbers are not Java letters and it is illegal (I checked other answers already) but still I want to ask you guys if there is a way (maybe a trick) to do that or he simply wants us to accomplish something illegal? And if I am not wrong, java language is updated recent days, and maybe it is about that, I don't know really.  B.t.w. I can't reach him to ask, he never replies. That's why I am asking here again.

What characters are valid in a Java class name? What other rules govern Java class names (for instance, Java class names cannot begin with a number)?


I want to take some chocolates to offer in my luggage. Chocolates are a bit sensitive to heat, though. What is the average temperature inside a cargo hold? 'Average by' itself can be misleading. What is the max temperature there?  I don't know much about airplane mechanics but I assume they have some cooling systems like any other engine. Such systems, depending on where they are placed, might influence temperature in the cargo hold. I also fear temperatures in the ground while exterior temperatures are higher, and luggage is being put inside. What are max temperatures near the airplane in such situation?

I'm taking some freeze-sensitive items in a checked luggage for a short flight. It's cheese, chocolate, toothpaste and wine. I would like to know whether the luggage can get "frozen" in the aircraft. Sometimes it happened to me that my stuff actually was quite cold after the flight, so I'd like to be quite sure. Especially the cheese was really expensive and freezing it would very likely demage it.  Usually I pack everything well in clothes, but this time the things are just too many so it's tough to do more than just protect the wine from breaking.  Some details: It's an A320 flight taking 1.5 hours, with Czech Airlines, from Paris CDG to Prague PRG.


I have assigned some data to the one object and I want that object in future as it was like the first time. Whenever I do changes for the parent object it is getting reflected in the child object too. How can I solve this? Please give all possible answer for the object, arrays, maps also.  var parentObject = someData; const childObj = Object.assign({}, parentObject);   I want to change only parent object and I want to keep child object as constant to use in the future.

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I want to search a question of mine which contains an answer posted by myself.   I have tried user:me is:question is:answer but this returns all questions and all answers posted by me.  But I want to search only for my questions which contain my answer.  Any ideas?  Edit  This would be better if this feature would be added in future:  user:me is:question + is:answer   Or  user:me is:question And is:answer

Is there a way to find self-answers with the advanced search? Preferably, not using the  and including results of all time and not just the recent ones with the new share your knowledge, Q&A-style


I have a following directory structure (assume no two files have the same name):  Apple1  apple1.jpg apple2.jpg   Apple2  apple3.jpg apple4.jpg   Apple3 Tomato Peach  And i would like to move one directory to the top directory all the *.jpg files inside the directories, which names start from Apple. As a result I expect the Apple directories to be empty and the images from Apple directories to be in the top. I have tried doing like mv "Apple*/*.jpg" ., or find . "Apple*/*.jpg" -exec mv -t . {} +  as prescribed here . But this doesn't work. When executing mv i receive a following message: mv: cannot stat ‘Apple*/*.jpg’: No such file or directory  Seems like it has not found anything matching the pattern. And other option simply outputs nothing. Maybe the reason is, that in the case of subdirectories regular expression needs to be modified? I would be very grateful for help and suggestions.

This will be an easy one, but in my memories, when shell scripting, using double quotes would allow expanding globbing and variables.  But in the following code:  #!/bin/sh  echo *.sh echo "*.sh" echo '*.sh'  echo $LANG echo "$LANG" echo '$LANG'   I get this result:  bob.sh redeployJboss.sh *.sh *.sh en_US.utf8 en_US.utf8 $LANG   So single quoting prevent glob AND variable expansion but double quoting allows only variable expansion and no globbing?  Can I glob in any quoting pattern?


( du /etc; du /var; ) > tmp.txt  { du /etc; du /var; } > tmp.txt   Is there a difference between the () and {}?  The output of tmp.txt seems exactly the same, and I was wondering whether i'm missing something here.

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I remember reading this when I was in middle school so late 1990's. Dystopian society. Jobs have been given to robots. Young adults can no longer get jobs so they have this trial program going on. Groups are teleported to what they believe is a virtual world and have to learn to survive there, they go three times; each time the ability and severity of an accident can become greater before being brought back.  I dont remember the author, name, any any character names either. I believe the groups were groups of five, and it seems they were actually teleported to another world, not virtually.

I'm trying to recall the title of a young adult-targeted book. It was probably published by Scholastic, or at least sold through their take-home pamphlets, which means it was probably published before I started high school in 1996. It's about a group of teenagers who receive invitations to play a game at an invitation-only arcade. When they go there, they are put in an immersive VR game in which they must learn to survive on an alien planet. I believe the game ends and they wake up back in the real world after they fall asleep on the alien one. They are invited back the the game a couple times, and then it turns out…      …they go to play the game again, but they are unable to exit it. Eventually they realize that they actually are on an alien planet now, and that the previous game-playing sessions were just training for the real thing. I believe the epilogue states that all of the players have coupled up and the females have become pregnant, and they are optimistic about populating the new planet.   I think it was told in the first-person perspective of a female player. I don't think there was a real protagonist or strong conflict; just the group of players learning how to survive in the game. One of the other players had a photographic memory and used it to map the planet's surface. I think the cover art featured of a girl wearing a VR headset over her eyes, with her hair being blown back and her mouth open in surprise.


What is the importance of a 4-terminal shunt resistor? What is real purpose behind using two seperate terminal for the voltage measurement across the shunt resistor?

I want to know if the four-terminal resistor and the shunt resistor are the same.   Is there another use for the four-terminal resistor except measuring current?


i wanted to find out the association between two variables and it reduced to 6X4 contingency table. grand total is 103. the spss output of chi square test displayed "82.1% cells have expected count less than 5". test shows as significant by the p value. is this reliable enough to reject the null hypothesis? or how to make it reliable? can i used monte carlo confidence intervals to check the pa value? please guide me. thanks

I don't have the minimum required data of 5 in each cell for a chi-squared test, but my contingency table is greater than 2x2, so I can't use a Fisher's exact. Would it help to use a chi-squared test set to either exact or Monte Carlo to prevent it from making the assumption of normal distribution?  I'm looking at trauma patterns created by five different tools; six categories of trauma have been defined. I would like to see whether the patterns of trauma (by occurrence of each type) differ significantly from one another. N=67, but not all tools have all types of trauma.


I want to install to PC2 all the packages, that were installed by apt install on PC1. That is for Debian, but i think that since Debian and Ubuntu share same package system - the solution would be same. How to do that?

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?


Lets suppose a British investor has some participations (say, for a value of £10000) in a Britih (not hedged) fund or ETF whose underlying assets are in US dollars, but that is denominated in pounds sterling.  If the pound sterling goes down with respect to the dollar, will that make the fund/ETF's value go up in the same proportion?  if not, how does this work? I'm aware that a fund manager needs to convert from pounds to dollars and, if the investor sells, then he/she will need to convert the dollars back in pounds, so if the pound has lose value this change should be more beneficial, am I missing something?  What would happen with hedged ETFs/funds?

I'm interested in buying ETFs that track the US market, but because of the latest EU  regulations, I'm only allowed to purchase investment products that come accompanied by some "KID", a Key Information Document.  Fine. There are plenty European alternatives for the more popular US-based ETF. Most of them have  in their name and are denominated in EUR.  The problem is that I'm wary about the EU. Would a major downturn in EUR/USD affect the value of a EUR-denominated ETF that tracks a US index?


When running sudo apt-get update I get the error:     Failed to fetch  Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)   But this used to work until a few days ago. The mentioned web address dl.google.com/.../stable/Release actually exists but it contains only Architectures: amd64. The error message mentions binary-i386, which is not amd64.  I tried all the usual fixes for general "Failed to fetch" problems but it did not make any difference in this case. Any suggestions? How can I fix the error message?

I am using Google Chrome 48.0 32-bit. Today when I launched Google Chrome, I got this message:    This computer will soon stop receiving Google Chrome updates because this Linux system will no longer be supported   I thought Ubuntu 14.04 is supported for five years, what's exactly happening here?  And on 64-bit Ubuntu, I get an error from Update Manager and apt-get update:  Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   Some index files failed to download.   They have been ignored, or old ones used instead.


I have observed a recent trend to pronounce "the" as "thuh" even if it is followed by a vowel (as in "thuh evening.")  Is this regional (I live in Alabama) or national?  I think it's the latter.   And does anyone have an idea about why this has happened?  Has the glottal stop become fashionable?  Is it typical of an age group?

Although there are rather simple rules determining the pronunciation of "the", native speakers quite often deviate from these rules (including, e.g., TV shows). According to the Longman Pronunciation Dictionary,     The EFL learner is advised to use [ðə] before a consonant sound (the   boy, the house), [ði] before a vowel sound (the egg, the hour). Native   speakers, however, sometimes ignore this distribution, in particular   by using [ðə] before a vowel (which is in turn usually reinforced by a   preceding ʔ), or by using [ði:] in any   environment, though especially before a hesitation pause. Furthermore,   some speakers use stressed [ðə] as a strong form, rather than the   usual [ði:].   My question is: when native speakers use [ðə] instead of [ði] before a vowel sound, do they do it on purpose or accidentally? If it is on purpose, how do they (typically) decide which pronunciation to use? What is a valid reason to use [ðə] before a vowel sound?


I just installed Windows 8.1, but I can't locate the setting to disable the Metro start screen, and boot directly to the desktop instead.  So how do you configure Windows 8.1 to boot straight to the desktop?

Is it possible to automatically log you into classic Windows desktop in Windows 8.1?  Either with Windows settings or by using 3rd party software..  This is pretty important for me since I don't know if I should buy this OS.  Thanks in advance


I use Avira, but it see no trouble. The problem is that I get strange redirects in my Chrome browser. Also I got many ads while browsing after installed this add-on.

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


I know that it stands for Exposure Value, so my 6D focuses in 2.5EV worse light than a 600D.  But it's relative to... what?  What makes it meaningful? What's the "base unit" for AF sensitivity?

I know there is already a question about EV, but it doens't quite answer my question. I understand EV as a relative measurement, 1 EV being one stop (doubling or halving the amount of light), but what is 0 EV? What does it mean when Nikon claims that a camera can autofocus in -2 EV?


Does JavaScript pass by references or pass by values? Here is an example from . I am very confused about the my parameter for the rectangle function. It is actually undefined, and redefined inside the function. There are no original reference. If I remove it from the function parameter, the inside area function is not able to access it. Is it a closure? But no function is returned. var shape = function (config) {     var that = {};     that.name = config.name || "";     that.area = function () {         return 0;     };     return that; };  var rectangle = function (config, my) {     my = my || {};     my.l = config.length || 1;     my.w = config.width || 1;     var that = shape(config);     that.area = function () {         return my.l * my.w;     };     return that; };  myShape = shape({     name: "Unhnown" });  myRec = rectangle({     name: "Rectangle",     length: 4,     width: 6 });  console.log(myShape.name + " area is " + myShape.area() + " " + myRec.name + " area is " + myRec.area());

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


public static void reverseArray(int[] arr) {     int[] reversed = new int[arr.length];     for (int i = arr.length - 1; i > -1; --i) {         reversed[arr.length - i - 1] = arr[i];     }     arr = reversed; }   Here I have a reverse array method. If I call  int[] v = new int[] {1, 2, 3, 4}; reverseArray(v); //print v   I would get "1 2 3 4"  But if I changed the reverseArray function to  public static void reverseArray(int[] arr) {     int[] reversed = new int[arr.length];     for (int i = arr.length - 1; i > -1; --i) {         reversed[arr.length - i - 1] = arr[i];     }     for (int i = 0; i < arr.length; ++i) {        arr[i] = reversed[i];     }  }   It will work as intended and print out "4 3 2 1" Why didn't the "arr = reversed;" work? They are both pointers so if I assign one to the other it should point to the same objects like with the 2D arrays. If I do  int[][] mat = //some assignment  public void reverseMatrix() {         reverseAllRows();         int[][] c = new int[mat.length][mat[0].length];         for (int i = 0; i < mat.length; ++i) {             c[mat.length - 1 - i] = mat[i];         }         mat = c; //This works for some reason }   It works without having me to copy each one of the elements. Why is that and how do I know when it is the case to use equals and when not to?


Account is a parent to Object B and Object C. Object B and Object C does not have any relationship. From Object B I want to find Object C's fields(like name etc.,) using Account in a single SOQL query. Below is the SOQL query: Select id, Account.Name from ObjB where Account.Name IN(select Account__c from ObjC). In the inner query I am passing the Account__c, but I want to find the value of Name field from ObjC. Is this achievable in any way?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List<sObject> or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code?


I understand that for a countable noun, one is supposed to use the singular form if and only if the number is equal to one or negative one; for example:   one degree negative one degree 0.75 degrees   Now my question is, what if the number is not expressed explicitly as one or negative one, but is essentially equal to one? For example, which of the following is correct:   1.0 degree or 1.0 degrees? negative four over four degree or negative four over four degrees?   Edit: I just realised that for the difference between 1.0 degrees and 1.0 degree, it has been answered . However, the question about negative four over four degree or negative four over four degrees remains unclear to me.

Do we say "-1 thing" or "-1 things"?  I am interested in both      two things minus one thing(s)    and      minus/negative one thing(s)


I have installed Ubuntu 14.04 on my DELL Inspiron 15R.  Since I have installed it, my fan is constantly spinning, even I do absolutely nothing. I found  and I decided to install i8kutils. Just after I installed it, my fans are now not spinning at all!! This is very dangerous for my laptop... If I run i8kfan -1 2 my fan is spinning for 1-2 seconds in full power, and then stops again. What I should do?  I also tried the following that exist in :   Put ENABLED=1 in /etc/default/i8kmon  Put set config(auto)        1 in /etc/i8kmon.conf  UPDATE:  Please also find the output of this command $ /usr/bin/i8kmon --verbose   ps1: I should mention that my laptops fans work flawlesly when using windows.  ps2: I also know that there are numerous similar questions out there. I spent many hours studying them and I couldn't find any good answer. Therefore, I am seeking for a good answer, than closing down my question as duplicate.

Problem  I installed Ubuntu 12.04 on a Dell Inspiron 15R. As soon as I boot, the fan starts at full speed and stays constantly on. I've seen similar posts, where installing fan control apps are recommended like  i8kmon   jupiter mesa-utils   but in general, these do not allow for automatic fan speed control and one has to manually set the fan speed, while keeping track of the processor's temperature. See:   Technical specs   - Processor: Intel® Core™ i5-3337U CPU @ 1.80GHz × 4  - RAM: 6 GB  - Disk: 500 GB  - Graphics: Standard Intel drivers  - OS type: Ubuntu 12.04 (64-bit)   lm-sensors  coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +45.0°C  (high = +87.0°C, crit = +105.0°C) Core 0:         +40.0°C  (high = +87.0°C, crit = +105.0°C) Core 1:         +45.0°C  (high = +87.0°C, crit = +105.0°C)   Any hint on how to solve this ?


Suppose $f: [0,1] \to [0,1]$ has a periodic orbit ${x_1 < x_2 < x_3 < x_4}$ such that $f(x_i)= x_{i+1}$ for $i < 4$ and $f(x_4) = x_1$. Show that $f$ has periodic points of all periods. This problem is in a chapter about Sharkovsky Theorem, thus I think I have to use it. I somehow need to show that $f$ has a point of period 3, and then we are done by Sharkovsky. However, how do we show it has a point of period 3?

Suppose that $T$ is continuous map from an interval $I$ to itself. Moreover, suppose that there exists $x_1 < x_2 < x_3 < x_4 $ such that   $$T(x_1) = x_2, T(x_2) = x_3, T(x_3) = x_4\ \  \text{ and }\ \ T(x_4) \le x_1.$$   Prove that $T$ has an orbit of period 3.   I don't really know how to start the problem. I am wondering how do I apply Sharkovskii's Theorem to the problem? Helps are much appreciated!  As we are given $x_1 < x_2 < x_3 < x_4 $ such that $T(x_1) = x_2, T(x_2) = x_3, T(x_3) = x_4 $ and $T(x_4) \le x_1$, we get  $ x_1 < x_2 = T(x_1) < x_3 = T(x_2) < x_4 = T(x_3)$. Also note that $T(x_4) \le x_1$, then $T(x_4) \le x_1 < T(x_3)$.


I am currently learning to texture a model and I encountered a problem after unwrapping: the UV grid (checkerboard pattern) is only showing up on certain parts of my model and not in the others.    Do you know how to fix it, please?  Thank you very much!

I can't seem to get these particular faces to take the UV Mapping. I selected the entire object, entered edit mode, hit U>Unwrap.   The rest of the mesh takes the uv wrapping, but not those faces for some reason.    It looks normal in solid mode.     Does anyone know what could be causing this?


I am making battleship in java. I'm at the very end of the game but I cannot figure out how to reduce playersShips/computersShips when they are 'hit'. Is there a way to modify x and y so if they are reduced to 4, the int value does not reset at 5?  I've looked around and I know that int values cannot be modified this way, but I read something about using a wrapper class? Did not know if that could be applied here? I also considered changing the int value to a char array and using something like (a-e), then converting the letter to the ascII table and reducing it from there, but that does not seem very efficient.  At the current way I am trying to make the game I cannot return the int value because in my playersTurn method it has the possibility of returning either x or y, and you can only return 1 value (correct?).   If Tl:Dr, simply put I need a way to reduce x and y in a way that the values stays at the new integer. 5->4->3->2->1->Game over. Below is simplified code. Thank you!  public static void main(String[] args) {    int x = 5; //PlayersShips    int y = 5; //ComputersShips    play(field, x, y);  }  public static void play(char[][] field, int x, int y){    while(x != 0 || y != 0) {         playersTurn(field, x, y);         computersTurn(field, x, y);         } }  public static void computersTurn(char[][] field, x, y){     //Computer randomly chooses an x and y coordinate to 'attack'.     //The '&' symbol is the player's ships     if(field[x][y] == '&') {       x--; }


I have bug with my huawei EC1260-2 modem connecting into ubuntu 14.04 beta2. It detect my modem but it cannot establish the connection and the bug dialog doesn't appear. It runs fine on ubuntu 12.04 - 13.10 So how the most efficient (and maybe easiest) way for reporting the bug to launchpad?

I found a problem with an application on Ubuntu.   Questions :   How do I best report the issue?  What sort of information should I provide?


i was re watching episode 25 of the original Pokemon series and while ash threw a ball at manky, manky threw a rice ball back and the rice ball was captured just like a Pokemon but opened when it landed in ash's hands. from what i know, poke balls can capture nothing but Pokemon and it doesn't react to anything but Pokemon. so how does this work?

Can a Pokeball be used for things other than storing pokemon?   Like a "" from Dragon Ball or even to imprison humans?


I am just curious. It was a Huge, destructive and a famous war.  Ministry of Magic could have helped them, but why did it not help?  Please help.

Is there any hint that the MoM or anywhere else got support in combating voldemort the first time around? Or is everything completely UK-centric?  I can't remember anyone in the second war being specifically sent from europe to help, even though we see international wizards in book 4. But I don't think all the events of the first war are covered in the books.  So are other bodies like the MoM involved in the first war, or was it isolated in the UK?