How to set predefined screen Resoloution ( Display screen not connected ) I use Ubuntu MATE +Raspberry Pi 3.  While RPI is connected to an external display via HDMI, resolution is adapted automatically to screen res. BUT when ext. screen is not connected ( remote control via VNC ), screen res probably takes a default\ minimal res - 720X480.  How can I define a default res to be 1920X1080 if no ext display is detected ?
Adding newmode with Xrandr - "800x480_60.00" I have 5-inch a 800x480 tft connected to the LVDS connector on a Portwell WADE-8020 mini-ITX embedded system board. I would like to build a XMBC/Kodi box for streming my music from my freenas PC with the tft showing what is been played, I got as fare as this...   sudo xrandr --newmode "800x480_60.00"  29.50  800 824 896 992  480 483 493 500 -hsync +vsync`enter code here   then,  sudo xrandr --addmode LVDS1 800x480_60.00   now that I get the correct resolution, I now have a black band on the top of the screen.  sudo xrandr --output LVDS1 --set "scaling mode"  "Full aspect"   However this did not solve the issue, also I know I need to amend the /bin/sh file with this from googling so I don't need to keep doing this at every boot. But I don't know how to as I'm very new to Linux.  #!/bin/sh xrandr --newmode "800x480_60.00"  29.50  800 824 896 992  480 483 493 500 -hsync +vsync xrandr --addmode LVDS1 800x480_60.00
Single Variable Calculus Reference Recommendations Break a long command to multiple lines I got a shell script and inside I got the command as below #!/bin/sh sh ../jboss/bin/standalone.sh --server-config=standalone-full.xml -Djboss.node.name=node1 -b 0.0.0.0 -bmanagement 0.0.0.0  How can I break the line to multiple lines for better understanding and management #!/bin/sh sh ../jboss/bin/standalone.sh    --server-config=standalone-full.xml   -Djboss.node.name=node1   -b 0.0.0.0   -bmanagement 0.0.0.0  Tried with backslash at the end of each line and it doesnt work. I know that a gas is made of atoms or molecules moving freely in space.  When these particles hit the walls of where they're kept in they cause something called pressure.  But these particles never pile up on each other and push a surface down by their weight so that we can measure it as weight, not pressure.  So why do gases have weight? Using NPN transistor as switch Here are some tips for tagging questions. These guidelines will help you more accurately tag your questions, which in turn will help them get more attention and lead to better answers faster.     For more information, see "" in the . SubView slide in animation, iphone Why WordPress choose data serialization over json_encode? In my little age with WordPress, I've seen WordPress itself and its friendly plugins are using PHP serialize() in storing data into db in many cases. But in a recent search I found a serious community support for the json_encode() over the serialize().     And I personally tested an associative array with both of 'em, that shows:  serialize() stores 342 chars json_encode() stores 285 chars  Why I'm asking this? I'm on a project while I'm going to store repeating meta fields to a post. Where:  Data would be basically in English, but sometimes can be Bengali Data would be associative array, 3 level deep (I hope I understood levels correctly):   array(     1 =&gt; array(         'key'=&gt;'value',         'key2'=&gt;'value'     ),     2 =&gt; array(         'key'=&gt;'value',         'key2'=&gt;'value'     ) )  I've checked the postmeta table's meta_value field it's a longtext,  a length of 4,294,967,295 chars (4GB). So I need a robust solution into storing things. How would you implement an LRU cache in Java? Please don't say EHCache or OSCache, etc. Assume for purposes of this question that I want to implement my own using just the SDK (learning by doing). Given that the cache will be used in a multithreaded environment, which datastructures would you use? I've already implemented one using  and , but I'm curious if any of the new concurrent collections would be better candidates.  UPDATE: I was just reading through  when I found this nugget:     If you need constant-time access and want to maintain the insertion order, you can't do better than a LinkedHashMap, a truly wonderful data structure. The only way it could possibly be more wonderful is if there were a concurrent version. But alas.   I was thinking almost exactly the same thing before I went with the LinkedHashMap + Collections#synchronizedMap implementation I mentioned above. Nice to know I hadn't just overlooked something.  Based on the answers so far, it sounds like my best bet for a highly concurrent LRU would be to extend  using some of the same logic that LinkedHashMap uses. Enqueue Stylesheets After Theme's "rtl.css" I am currently developing a theme with internationalization support, and would like to load stylesheets after my theme's rtl.css (an alternative style.css loaded for languages with a right-to-left reading order).  I am familiar with enqueueing my stylesheets and controlling their load order with dependencies using the wp_register_style() and wp_enqueue_style() functions, however rtl.css is loaded automatically by WordPress whenever the locale's language direction is rtl, and there doesn't seem to be a way to specify the stylesheet as a dependency.  I know I can conditionally enqueue stylesheets using the is_rtl() function, however  these stylesheets' &lt;link&gt; elements are still printed out before WordPress automatically prints rtl.css's. I could also simply manually insert &lt;link&gt;s to the stylesheets that I wish to depend on rtl.css right after the call to wp_head() in my theme's header.php file, but I believe it's bad practice to do so, and I would like my theme to be commercial quality.  How can I load stylesheets after WordPress loads rtl.css? The reminder email says:     We noticed you have not accepted our invitation to join Stack Overflow Careers. Only 3 days remain before it expires [...]      But please act soon: this invitation expires in 14 days [...]   Is it 3 days or 14 days now? How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay? Machine learning cookbook / reference card / cheatsheet? I find resources like the  and  incredibly useful. They obviously serve well as references but also help me to organize my thoughts on a subject and get the lay of the land.   Q: Does anything like these resources exist for machine learning methods?  I'm imagining a reference card which for each ML method would include:   General properties When the method works well When the method does poorly From which or to which other methods the method generalizes. Has it been mostly superseded? Seminal papers on the method Open problems associated with the method Computational intensity   All these things can be found with some minimal digging through textbooks I'm sure. It would just be really convenient to have them on a few pages. Right so seeing as the new Deadpool movie shows the origins of Deadpool: specifically, he got cancer... blah blah had to get him the healing factor from Wolverine.  But that makes no sense — they used the same actor, so I'm assuming there must be some connection, right... right? Integer coefficient polynomial $p(x)$ has no integer roots of $\,p(0)$ and $p(1)$ are odd [Parity Root Test] This came up an a training piece for the Putnam Competition and also in Ireland and Rosen.  The question posed was basically:  Let $p(x)$ be a polynomial with integer coefficients satisfying that $p(0)$ and $p(1)$ are odd. Show that $p$ has no integer zeros.  I&amp;R give an example:  $p(x) = x^2 - 117x + 31$  and show (no problem) that for any $n$ whether even or odd, $p(n)$ will be odd. And claim that this shows $p(n)$ will never be $0$.  I can see, e.g., that $x^2 + 2x + 1$ will be odd substituting an even $n$ and even for an odd $n$.   But would appreciate help in understanding the underlying math and what is happening here.  Also, as a second part, can a general statement about the existence of an integer solution be made if $n$, even and odd, generates an even and an odd as in the last example.  I can see that if you look at these equations (mod $2$), you can distinguish whether there is an integer solution. And I would guess this is intimately connected with the question.  Thanks as always. Why do electrons not fully fill up all the orbitals sequentially? Why do electrons not fully fill up all the orbitals sequentially? By this I mean: why don't the electrons fully take up the previous orbit first and then move onto the next orbit? Take calcium for example, it's electron config is 2, 8, 8, 2. Why isn't it 2, 8, 10? Why does another orbit need to be created when there are still many spots to fill up?  (I know that this is a chemistry question in a physics forum, but I really could not find a chemistry or even a broader science type forum here ) Preventing robots from crawling specific part of a page As a webmaster in charge of a tiny site that has a forum, I regularly receive complains from users that both the internal search engine and that external searches (like when using Google) are totally polluted by my users' signatures (they're using long signatures and that's part of the forum's experience because signatures makes a lot of sense in my forum).  So basically I'm seeing two options as of now:   Rendering the signature as a picture and when a user click on the "signature picture" it gets taken to a page that contains the real signature (with the links in the signature etc.) and that page is set as being non-crawlable by search engine spiders).  This would consume some bandwidth and need some work (because I'd need an HTML renderer producing the picture etc.) but obviously it would solve the issue (there are tiny gotchas in that the signature wouldn't respect the font/color scheme of the users but my users are very creative with their signatures anyway, using custom fonts/colors/size etc. so it's not that much of an issue). Marking every part of the webpage that contains a signature as being non-crawlable.   However I'm not sure about the later: is this something that can be done?  Can you just mark specific parts of a webpage as being non-crawlable? Case insensitive 'Contains(string)' How do I disable search-as-you-type text in Ubuntu 17.10 and later? I cannot find enable-interactive-search in    gsettings set org.gnome.nautilus.preferences enable-interactive-search true.     I searched using    gsettings list-recursively | grep search     and    gsettings list-recursively | grep interactive     but no such option.  Can you help me disable this in Ubuntu 17.10 and later? A man wonders why perforations don't work. He decides nothing is the strongest thing in the universe. He exploits his finding. Is it possible to check who is entering your website in PHP. I have a web application ( written in PHP) that should only allow users entering from some particular websites. Is it possible to get the referral websites by examining the _Request object? If yes, how?