Automate a command line when I power on my computer? With Ubuntu 18.04, I need the command line xrandr --output DP-1 --scale 0.5x0.5. How can I automate that command when I power on my computer?  EDIT  I created the /etc/rc.local file, and in that file I have written  #!/bin/bash  xrandr --output DP-1 --scale 0.5x0.5  exit 0   The problem is if I restart the computer, the screen is identical and wrong. It seems to work if I run the command bash /etc/rc.local, but not if I restart the computer. How can I fix that?
How to run xrandr commands at startup in Ubuntu How can I run the following xrandrcommand on startup?  xrandr   cvt 1368 768  xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync xrandr --addmode VGA1 1368x768_60.00 xrandr --output VGA1 --mode 1368x768_60.00
Insert result of a parallellized select query into a table, in Postgresql According to ,      "Even when it is in general possible for parallel query plans to be   generated, the planner will not generate them for a given query if any   of the following are true:       The query writes any data or locks any database rows. If a query contains a data-modifying operation either at the top level or within   a CTE, no parallel plans for that query will be generated. This is a   limitation of the current implementation which could be lifted in a   future release."   Indeed, when I try to insert result of a parallel SELECT query into a table (either by SELECT.. INTO either by WITH..SELECT..INTO, the query is not executed as parallel query.  My question is: Is there any way to trick the Postgresql so that a SELECT query is executed as parallel query and then its result inserted into a table? We are seeing this error in a Winform application.  Can anyone help on why you would see this error, and more importantly how to fix it or avoid it from happening.   System.ComponentModel.Win32Exception: Error creating window handle.    at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)    at System.Windows.Forms.Control.CreateHandle()    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)    at System.Windows.Forms.Control.CreateControl()    at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)    at System.Windows.Forms.ButtonBase.OnVisibleChanged(EventArgs e) Get content from a url using php Content Assist for JSF2 + CDI (weld) beans + Eclipse Helios Double Sideband Suppressed Carrier modulator List I am using ring modulator for DSB-SC  am modulation in a transmitter circuit. Can anyone please tell me about more DSB SC modulator for am modulation? I want to know which one to use where? Does this need a comma? I'm proofing a story, and at one point, as it is written at the moment, one the characters exclaims:     Prepare to die you fool!   Should there be comma after "die"? This is the command I entered in the command block: testfor @p {Inventory:[{id:minecraft:diamond,Count:10}]}  But it doesn't seem to work. What am I doing wrong? When using \textsc, LaTeX issues warning: Font shape `OT1/cmr/bx/sc' undefined Did English ever have a formal version of "you"? From the top of my head, Danish "De" (practically never used), German "Sie", Chinese "您", French "vous", Spanish "usted" are a formal way of addressing someone, especially if one isn't familiar with the addressee. Did English ever have this? It sounds as though Proto-Indo-European might have had this (based on my 4 examples), but perhaps someone can enlighten me? Can you check if a PSN code is valid without redeeming it? I have a code for additional content on a Playstation game, and I want to know whether it is still valid, but I don't want to redeem it for myself.  If I enter it in the Playstation Store (on PS3, PS4 or the website), does it get redeemed to my account automatically, or can I enter it without redeeming? If it gets redeemed automatically, is there another way to check if it is valid? Intuition for groups This is quite a non-standard question, certainly for mathematics, though I believe it is no less important (for me and my peers, i.e. grads).  The course I am reading so far introduced us to Groups, rings, fields, etc. in the first year, progressing to characters, reps etc in the latter years.  However, even with representation theory I still don't feel like I have a good intuition.  How do you gain intuition in such an area. I know there will be a response of doing examples, but this doesn't really help - I've done lots already.  Am I doomed. Scaling vs Offsetting in Quasi-Poisson GLM I  modeled insurance claim frequency assuming a Quasi-Poisson distribution in R. My frequency dependent variable was calculated, in advance of modeling, as the number of claims per underlying exposure. Someone  that it would be incorrect to do this, and that the correct method was to model the observed claim counts and use the underlying exposure as an offset.   Can someone explain the theoretical and practical differences between scaling and offsetting? I ran the code both ways and noticed that the deviance residuals are significantly smaller when using offsets, but otherwise there were no material differences in variable selection.   P.S. Note the similar but still different question . Where should I put software I compile myself? Why don't electrons crash into the nuclei they "orbit"? I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it. How do I avoid the "S to Skip" message on boot? After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message:  The disk drive for /osshare is not ready yet or not present Continue to wait; or Press S to skip mounting or M for manual recovery   Funny thing is, if I skip, then /osshare/ is mounted once I log in.   I've a similar setup on my desktop, and it works fine. Fstab on desktop:  UUID=4663-6853  /osshare        vfat    utf8,umask=007,gid=46 0       1   /etc/fstab on laptop:  UUID=1234-5678 /osshare vfat utf8,auto,rw,user 0 0 How to put a variable in anchor tag The orbit of satellites around Earth eventually decays, or so I read. This is typically caused either by atmospheric drag, or by tides. I would assume most satellites have a limited service life in orbit. Hence the question - What is the typical orbital life of a satellite? How long before it's successor must be launched into orbit ?  EDIT: For instance, a weather satellite SSH tunnelling with multiple dynamic port forwardings I am trying to monitor multiple JVMs running on different servers through an ssh tunnel.  Thanks to one of the UNIX gurus here, I have managed to get this running for a single server by:   Run jstatd on the target server Set up Visual VM to use 9696 as its socks proxy port. On my local PC, run:  ssh -L 2222:server1:22 bastion-host  On my local PC, run:  ssh -o port=2222 -D 9696 -L 1099:localhost:1099 localhost    This does the trick. Now when I try and tunnel to a second server I try:   On my local PC, run:  ssh -L 3333:server2:22 bastion-host  On my local PC, run:  ssh -o port=3333 -D 9696 -L 2099:localhost:1099 localhost    However, the last step complains with:  bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 9696   Has anyone managed to do something similar?  Update:  The reason this is so complex is that jstatd is an RMI server application:    As with RMI applications, these register with an rmiregistry. Using rmi through a firewall requires me to use SOCKS as described here:    Unfortunately, visualvm only lets me set the SOCKS proxy port once, and the -D option won't allow me to forward the same local port to both servers... Is there a way to send a file using POST from a Python script? Reason behind this self invoking anonymous function variant