What is a good algorithm for a stock market simulation?
How would I implement a realistic stock market?
Permission denied, are you root? I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal. I work on different types of monitors (CRT, LCD) and all PCs have the same screen refresh rate as 60 Hertz. Recently I've read an article which claims that low refresh rates cause headaches. The writer states that 60 Hertz is a low refresh rate and should be increased to the maximum value that the monitor supports. If I increase this value to the maximum as the monitor can display (for example 75 Hertz), does it damage the monitor in the long term? Answers about the pros and cons of low &amp; high refresh rates would be highly appreciated. When to use 'which' or 'in which' or 'that' (as relative pronouns)? I am confused about when to use:  'which' vs 'in which' vs or 'that'?    Would you please explain it as a writing rule? Here I have an example:       Authors reported shortened growth period and slower radial growth rate for low soil water potential which is directly attributed to the decrease in water potential, rather than to the constraints on carbon availability. I am using Log4Net with the AdoNetAppender to log messages from a simple systray application into a SQL Server 2005 database.  I want to log the machine name along with the log message because this application will be running on multiple machines and I need to know on which one the message originated.  But, I cannot find a way to expose this information via the log4net.Layout.PatternLayout that I am using with the appender.  Is there a way to log the machine name via log4net in this manner? Check synchronously if file/directory exists in Node.js Mirror changes to side of cube across all six sides proof of functional completeness of logical operators Where does the extra kinetic energy of the rocket come from? Consider a rocket in deep space with no external forces. Using the formula for linear kinetic energy $$\text{KE} = mv^2/2$$ we find that adding $100\ \text{m/s}$ while initially travelling at $1000\ \text{m/s}$ will add a great deal more energy to the ship than adding $100 \ \text{m/s}$ while initially at rest: $$(1100^2 - 1000^2) \frac{m}{2} \gg (100^2) \frac{m}{2}.$$ In both cases, the $\Delta v$ is the same, and is dependent on the mass of fuel used, hence the same mass and number of molecules is used in the combustion process to obtain this $\Delta v$. So I'd wager the same quantity of chemical energy is converted to kinetic energy, yet I'm left with this seemingly unexplained $200,000\ \text{J/kg}$ more energy, and I'm clueless as to where it could have come from. Using global variables in a function This is my follow up question. My previous question is here:   Problem:  If I add the image in my table, I get the following output as shown in the image below. Why is the Co-Supervisor going below?   I am using this code:  \begin{tabular}{|l|c|r|} \hline \bf Author: &amp; \hspace{5pt} &amp; \bf Research Supervisor:\\ \hline Mr. X &amp;  \hspace{5pt} &amp; Prof. Dr. Z\\ \hline \includegraphics[width=0.40\textwidth,height=10mm]{Figures/images} &amp;  \hspace{5pt} &amp; \bf Co-Supervisor:\\ \hline &amp;  \hspace{5pt} &amp; Prof. Dr. Y\\ \hline \end{tabular}   What I want is shown below:   PS: Please ignore the table borders, they are for demo only, I won't be using them in my final code.  The final product: that I desire is: I am foreign graduate student in USA. I recently completed my undergrad (from USA) and have a bit of money saved up. I know that F1 students cannot work off campus and other business activities such stock trading etc are prohibited as well. I wanted to know if opening an account in an investment management firm like Charles Schwabb or Betterment is allowed. I would not be working but I will still be earning a small interest on my deposits. If that is not allowed, are there any good and legal ways for foreign students to earn a little interest on savings? How to perform hard / cold reboot of iPhone or iPad? 'took several years to be built' or 'took several years to build' – which one is correct? Which one of these sentences is correct?  The palace took several years to build.  or  The palace took several years to be built.  I heard the first one while I was watching Discovery Channel and I think it is not correct because the palace did not build on its own – someone had to build it. So the passive form seems the correct sentence. Visiting Iran as a dual EU-American citizen /var/log/syslog constantly logging errors, growing at 1 MB/s It seems to be the same three errors repeated:  $ tail -n15 /var/log/syslog Apr  5 23:32:01 detoo kernel: [ 6042.078785] ACPI Error: [PGRT] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359) Apr  5 23:32:01 detoo kernel: [ 6042.078787] ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ffff8808554d42d0), AE_NOT_FOUND (20150619/psparse-536) Apr  5 23:32:01 detoo kernel: [ 6042.078788] ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F] (20150619/evgpe-592)   I noticed something was wrong when I was getting low disk space warnings. I've flashed to the latest UEFI available, I've tried enabling/disabling the C states in my UEFI.  I'm running Linux Mint 17.3 Cinnamon 64-bit with kernel 4.2.0-34-generic. I have a skylake processor and z170 motherboard.  I'm quite new to linux and am at a lost as what I should do next.  EDIT: I have the same problem when booting from a USB with Ubuntu 16.04, and nearly identical error logs being constantly spammed:  Apr  6 01:01:48 ubuntu kernel: [  152.594053] ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F] (20150930/evgpe-592) Apr  6 01:01:48 ubuntu kernel: [  152.594994] ACPI Error: [PGRT] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359) Apr  6 01:01:48 ubuntu kernel: [  152.594996] ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ffff8808554e02d0), AE_NOT_FOUND (20150930/psparse-542) Minecraft Vanilla 1.9 crash with problematic frame ig8icd64.dll I go to the Minecraft menu and click on singleplayer to test out the 1.9 update. I made a new world (no mods), it said downloading terrain and then it crashes every time (I've tried about 20 times now).  Has anyone else experienced similar issues and know what the fix may be?  Here is the launcher log:  Completely ignored arguments: [--nativeLauncherVersion, 301] [00:35:12] [Client thread/INFO]: Setting user: Teddy_Cromwell [00:35:12] [Client thread/INFO]: (Session ID is &lt;censored&gt;) [00:35:14] [Client thread/INFO]: LWJGL Version: 2.9.4 [00:35:14] [Client thread/WARN]: Removed selected resource pack resources (no region and battle music).zip because it's no longer compatible [00:35:14] [Client thread/INFO]: Reloading ResourceManager: Default [00:35:15] [Sound Library Loader/INFO]: Starting up SoundSystem... [00:35:16] [Thread-5/INFO]: Initializing LWJGL OpenAL [00:35:16] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [00:35:16] [Thread-5/INFO]: OpenAL initialized. [00:35:16] [Sound Library Loader/INFO]: Sound engine started [00:35:18] [Client thread/INFO]: Created: 1024x512 textures-atlas [00:35:26] [Server thread/INFO]: Starting integrated minecraft server version 1.9 [00:35:26] [Server thread/INFO]: Generating keypair [00:35:27] [Server thread/INFO]: Preparing start region for level 0 [00:35:28] [Server thread/INFO]: Preparing spawn area: 5% [00:35:29] [Server thread/INFO]: Preparing spawn area: 8% [00:35:30] [Server thread/INFO]: Preparing spawn area: 15% [00:35:31] [Server thread/INFO]: Preparing spawn area: 21% [00:35:32] [Server thread/INFO]: Preparing spawn area: 27% [00:35:33] [Server thread/INFO]: Preparing spawn area: 34% [00:35:34] [Server thread/INFO]: Preparing spawn area: 42% [00:35:35] [Server thread/INFO]: Preparing spawn area: 48% [00:35:36] [Server thread/INFO]: Preparing spawn area: 56% [00:35:37] [Server thread/INFO]: Preparing spawn area: 66% [00:35:38] [Server thread/INFO]: Preparing spawn area: 74% [00:35:39] [Server thread/INFO]: Preparing spawn area: 81% [00:35:40] [Server thread/INFO]: Preparing spawn area: 91% [00:35:41] [Server thread/INFO]: Preparing spawn area: 98% [00:35:42] [Server thread/INFO]: Teddy_Cromwell[local:E:6d7525a7] logged in with entity id 301 at (244.5, 69.0, 244.5) [00:35:42] [Server thread/INFO]: Teddy_Cromwell joined the game # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffcf6e6b37, pid=15456, tid=12424 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C  [ig8icd64.dll+0x16b37] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\Connor\AppData\Roaming\.minecraft\hs_err_pid15456.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release How to create meaningful relationships with NPCs How do I help the PCs to create meaningful relationships with NPCs?   Maybe it is a result of my group playing too many one-dimensional adventures trying to find whatever MacGuffin they are after each week, but most of the time my PCs don't tend to value NPCs too much. Every time they meet an NPC they quickly evaluate what immediate values the NPC can give or tend to ignore them.  What I would really like is to have some good relationships where the PCs actually go out of their way to help NPCs without selfish motivation or even just to try to think of NPCs more and how their actions affect others.  I am not looking for a specific game rules solution to this, but instead techniques to get the players to feel attachment to these fictional characters. How to buy plane tickets for job interviews? I am currently on the academic job market, and scheduling on-campus interviews with institutions that might want to hire me.  Suppose I am invited to an on-campus interview at the University of X, and must travel there by air.  They handle travel on a reimbursement basis: I buy the plane ticket, and then they reimburse me.  However, the interview is a few weeks away.  Since the job market sometimes moves fast, there is a chance that by the time of the scheduled interview, I may have already accepted another offer (say from the University of Y).  Of course I should then decline the interview at X, but I would have already bought the plane ticket.  How should I plan for this contingency?   I could buy a refundable ticket to X.  However, these are normally several times the price of a non-refundable ticket, and if I do end up traveling to X, they might balk at reimbursing me for such an expensive fare. I could buy a non-refundable ticket to X.  If I end up not going there, I could ask X to reimburse me for the cost of the ticket (or at least the "change fee" charged by the airline to let me use the ticket's value for a future flight).  However, I suspect they will be reluctant to reimburse me for a trip I'm not making, and might refuse to do so altogether, in which case I am out-of-pocket. I could wait until the last minute to buy a non-refundable ticket for X.  But it may still be expensive for them (or may exceed their limits), and the most convenient flights may be sold out. I could contact University of X and ask them for guidance.  I'm a bit hesitant to do this, as I am afraid that if I bring up the possibility that I might accept another position, they might think I am not seriously interested in theirs.   Is there a standard way to handle this situation?  This is in the United States, if it matters. How to import a module given the full path? I already searched the internet but could not find a solution to this. Maybe it is the same question as  but there was no answer.  I want to render a video with tracking, but the output "loses" color information and gets kind of greyish. I first thought that it is related to the renderer, but it happens in Cycles and Eevee. Therefore i made a sample image, added it to the image sequence editor and rendered it as 1 frame. Resulting in the same problem.  I placed the original image beside blenders output so that you can see the difference. The only idea I came up with is that something with the lighting is not correct but I can't find a setting for that.  I am using Blender 2.80 with the default settings. Only set the output resolution to match the input resolution.