When doing locale -av on Lubuntu, the result returned shows that all of the locales uses the UTF-8 character encoding.  Is there a way to add a locale with the ISO-8859-1 character encoding?
I need the cs_CZ.ISO8859-2 locale to exist on Ubuntu 12.04 so a specific unit test can pass. The test makes the following call:  std::locale("cs_CZ.ISO8859-2")   On my OS X Lion install, this locale does exist, so the call to std::locale should work:  $ locale -a | grep cs cs_CZ cs_CZ.ISO8859-2 cs_CZ.UTF-8 $   However, on my Ubuntu 12.04 install, there is only a UTF8 variant, and no ISO8859-2 version of the cs_CZ locale, despite having installed language-pack-cs:  $ dpkg -l | grep language-pack-cs ii  language-pack-cs                       1:12.04+20120417                        translation updates for language Czech ii  language-pack-cs-base                  1:12.04+20120417                        translations for language Czech $ locale -a | grep cs_ cs_CZ.utf8 $   The unit test fails on this machine. Running the unit test under strace shows that it really is looking for the ISO8859-2 variant and not finding it anywhere:  open("/usr/lib/locale/cs_CZ.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs_CZ.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs_CZ/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)   I know absolutely nothing about locales, i18n, etc. However, I would like to get this test passing, and changing the test is not an option. If anyone can offer any insight into how to make this locale exist on Ubuntu 12.04 I would appreciate it greatly.
How to resize my dual-boot partitions I have a dual-boot laptop with both Windows 10 and Ubuntu 16.04.  Currently, the Windows side has too much disk space, and I want to resize things so that the Ubuntu side has more.  Firstly, I went into the Windows disk management and shrunk the Windows partition by 20GB. I then wanted to expand the Ubuntu partition, but it seemed like this option was greyed out.  Can I expand the Linux partition from Windows or do I need to be in Ubuntu or do I need to create a boot disk and do it that way?  Or do I need third party software?  Any help gratefully received. I have a JavaScript widget which provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created.   I've added an Ajax call into this function using jQuery:  beforecreate: function (node, targetNode, type, to) {   jQuery.get('http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value),    function (result) {     if (result.isOk == false)          alert(result.message);   }); }   But I want to prevent my widget from creating the item, so I should return false in the mother-function, not in the callback. Is there a way to perform a synchronous AJAX request using jQuery or any other in-browser API? how do I get my code to use the value of the $HOME variable? I'm trying to put together a generic script that will check the existence of several key directories for various users on different servers. Additionally, I want to leverage each user's $HOME variable.  For eg, let's say this were true:   on server 1: jdoe's home is /home/jdoe  on server 2: jdoe's home is /opt/jdoe2 server 3 hasn't been built yet; we won't know where they build his $HOME until the server is built. on server 4: mysql's home is /opt/home/mysql   This is what I have for my important directories (ordered from most to least impt):  $ cat mylist.txt $HOME/most_impt_dir1 $HOME/most_impt_dir2 $HOME/most_impt_dir3 $HOME/misc $HOME/junk   ...I want to find the most impt dir owned by this user.   Here's what I'm trying:  for i in `cat mylist.txt` do    if [[ -O $i ]] &amp;&amp; [[ -d $i ]]; then     echo "found it: $i"     break   else     echo "$i is not it."   fi  done   The above code does not work for anything in my list because it is literally checking for dirs beginning with $HOME. How do I get my code to use the value of the user's $HOME variable? In MySql, find strings with a given prefix Let $A\in M_{n\times n}(\Bbb R)$ so that $I\notin span(A,A^2,...,A^n)$. Prove that $\det(A)=0$.   I was thinking of showing $A$ is not invertible, meaning it has an eigenvalue of $0$. Since no matter the power you give to $A$, it is still not the identity, you can deduce that at least one eigenvalue is indeed $0$. However this doesn't work if you have different eigenvalues in the Matrix, so I got stuck.  Help will be most appreciated. How does the kernel prevent a malicious program from reading all of physical RAM? If I write a program that tries to read memory at every possible address, and I run it on a "full" Unix, it will not be able to access all of the physical RAM.  But how does the operating system prevent it from doing so?  I am more familiar with small CPU architectures where any piece of assembly code can access everything. I don't understand how a program (the kernel) can detect such malicious operations. Get Age of a person in MySQL what's different between each and collect method in Ruby Google Chrome Address Bar Font has gone too large, how can we reduce it Running Unity on my desktop (2*20" LCD displays), I initiated a standard daily update on my Ubuntu 14.04 LTS today and Google Chrome updated itself to Version 35.0.1916.114.  The URL address bar input now shows IMO a too larger font size which then proceeds to auto show in green. I prefer the smaller font size and have no need for 'gooey slime green' auto complete font colours. Any advice on how to revert back to smaller, generic Address font styling.  I use both FF and Chrome for numerous tasks, Chrome being my primary browser and I've checked my system Unity 'default' theme (Ambiance! LOL.. yes I'm tired of that also).  Thanks for sharing. Can I view the Markdown-source of an unedited question/answer? Once a post has been edited, you can go into the revision list, and click "View Source".  If a post has not been edited (and I don't have the edit privilege) is there any way to see the raw Markdown?  The reason I ask I because of  - it's impossible to see the source markdown, and how it's different from the rendered Markdown.  Not exactly a huge issue, just curious! How to run a command that requires sudo at login Stop jQuery .load response from being cached I have the following code making a GET request on a URL:  $('#searchButton').click(function() {     $('#inquiry').load('/portal/?f=searchBilling&amp;pid=' + $('#query').val());             });   But the returned result is not always reflected. For example, I made a change in the response that spit out a stack trace but the stack trace did not appear when I clicked on the search button. I looked at the underlying PHP code that controls the ajax response and it had the correct code and visiting the page directly showed the correct result but the output returned by .load was old.  If I close the browser and reopen it it works once and then starts to return the stale information. Can I control this by jQuery or do I need to have my PHP script output headers to control caching? In python, if I say  print 'h'   I get the letter h and a newline.  If I say   print 'h',   I get the letter h and no newline.  If I say  print 'h', print 'm',   I get the letter h, a space, and the letter m.  How can I prevent Python from printing the space?  The print statements are different iterations of the same loop so I can't just use the + operator. Does the verb "unvelcro" exist or what can we use instead? I know that the following word pairs exist:  button – unbutton tie – untie  Can we use an analogous process with the verb &quot;velcro&quot;? It was announced on  (at 1:05:26) that Stack Exchange has its own URL shortener, http://s.tk/. Users can't create their own, they can only use the ones that are built-in. What shortened URLs are available through it? Touchpad not recognized on Asus N550JK - TP500L (FocalTech) I'm installing a new laptop and the touchpad is not fully recognized. Specifically, two finger scrolling does not work.  extract from /proc/bus/input/devices  I: Bus=0011 Vendor=0002 Product=0001 Version=0000 N: Name="PS/2 FocalTech FocalTech Touchpad in mouse emulation mode" P: Phys=isa0060/serio1/input0 S: Sysfs=/devices/platform/i8042/serio1/input/input5 U: Uniq= H: Handlers=mouse0 event4 B: PROP=1 B: EV=7 B: KEY=30000 0 0 0 0 B: REL=3   Also, xinput list gives me:  ⎡ Virtual core pointer  id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer id=4   [slave  pointer  (2)] ⎜   ↳ ELAN Touchscreen id=10    [slave  pointer  (2)] ⎜   ↳ PS/2 FocalTech FocalTech Touchpad in mouse emulation mode id=14   [slave pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Video Bus                                 id=8    [slave  keyboard (3)]     ↳ Sleep Button                              id=9    [slave  keyboard (3)]     ↳ USB2.0 HD UVC WebCam                      id=11   [slave  keyboard (3)]     ↳ Asus WMI hotkeys                          id=12   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]   And finally, synclient tells me there is no synaptics driver active:     Couldn't find synaptics properties. No synaptics driver loaded?   So, it seems the touchpad is not recognized as a synaptics touchpad. It works, but not the synaptics specific parts.  It's in mouse emulation mode (no idea what it means). And it works together with other pointing devices, especially the touchscreen (I can confirm this works).  I have tried adding i8042.nomux=1 to the kernel parameters, but it didn't change anything... Any hint ? Add default syntax highlighting for the [dart] tag I just approved several edits from a user adding  to questions with the  tag. Apparently , Google Code Prettify has added support for Dart.  I suggest it's time to follow suit and update the default syntax highlighting associated with the  tag. Adding it manually to every question sounds like way too much work, even if I all I have to do is click the "Approve" button. Is there anyway to restore the Blender default Cloth settings? Or is there anyway to find what the default settings are?  I didn't realize at the time that by changing the values I was overriding the default values.  Using Blender v2.76. How to compare two different files line by line in unix? File1:  123 234 345 456   File2:  123 234 343 758   Expected output: File3:  TRUE TRUE FALSE FALSE   so the code should compare two files and print 'TRUE' if it matches otherwise it should print 'FALSE' in the new file. Could anyone please provide the solution for this? Can I list the resources in a given package?