ubuntu-10.04
what is the meaning of restrict in the function signature?
It’s something introduced in C99 which lets the compiler know that the pointer passed in there isn’t pointing to the same place as any other pointers in the arguments. If you give this hint to the compiler, it can do some more aggressive optimizations without breaking code. As an example, consider this function: int add(int … Read more
How to grep ‘—‘ in Linux? grep: unrecognized option ‘—‘
This happens because grep interprets — as an option instead of a text to look for. Instead, use –: grep — “—” your_file This way, you tell grep that the rest is not a command line option. Other options: use grep -e (see Kent’s solution, as I added it when he had already posted it … Read more
How to correct this error: “‘Adminsite’ object has no attribute ‘root'”
Your url for admin should be: url(r’^admin/’, include(admin.site.urls)) not (r’^admin/(.*)’, admin.site.root) – it’s for Django 1.0. For Django 1.3 it wouldn’t work.
upstart logging output enabled
Ok, I’ve found one way to get it : $ sudo initctl log-priority # gives the actual (default) logging level $ sudo initctl log-priority –help # gives available logging levels $ sudo initctl log-priority info # is enough to get : $ tail -f /var/log/syslog # – log of upstart events $ tail -f /var/log/boot.log … Read more
Start JBoss 7 as a service on Linux
After spending a couple of hours of snooping around I ended up creating /etc/init.d/jboss with the following contents #!/bin/sh ### BEGIN INIT INFO # Provides: jboss # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop JBoss AS v7.0.0 … Read more
NameVirtualHost *:80 has no VirtualHosts
I had ignored the same error for the 2 months I have had an Ubuntu server. I found this post nicely solved the error. Thank you Michael!. As did you Jay, I found the culprit at /etc/apache2/ports.conf . I tried simply this: # NameVirtualHost *:80 I only commented out that line and no other changes … Read more
Are there any uml tools on Ubuntu ? [closed]
I use Dia for drawing UML diagrams (as well as other diagrams), but it cannot generate code (at least not without some additional tools, like dia2code). It’s more like a general-purpose diagram drawing tool with a decent support for UML. Umbrello is a tool dedicated to UML-based modelling. It’s comparable to Dia in terms of … Read more
Good diff tools under Ubuntu GNOME
Meld is an actively-developed, open-source GUI-based diff utility targeted at developers. It is free It runs on Linux GNU License 40+ posts tagged as meld on Stack Overflow. Actively developed through February 2013 (the time of this posting) Allows two and three way comparison between files and folders Supports Subversion, Git, and Mercurial
Install jq JSON processor on Ubuntu 10.04
It is possible to perform sudo apt-get install jq however you need to inform the system where to find jq. âšī¸ Note: Ubuntu 14+ users can skip to step 3! đ Install Open your sources file in a text editor: sudo vim /etc/apt/sources.list Add the following line to the end of that file (note deb … Read more