A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
It has always been weird to me to see that the delete operator was not actually going to call all the destructor on objects. That is, if you create a class B that derives from a class A, deleting an object when cast to A does not (by default) call the destructor defined in class B.
The result is that ALL classes should define their destructor as virtual. This doesn't make sense because you shouldn't have to have a virtual table in all your objects just for the destructor to work right. On the other hand, class A has no way to know that it will be derived by class B so its destructor
I have a computer with Ubuntu 11.04 (the host) on which I installed a version of Ubuntu 11.10 (the guest) using QEMU. Both are 64bit on an i5 quad.
What I'm trying to do is allow the host to access the guest via a br0 bridge and possibly using all static addresses so they don't change on me (there still seem to be some DHCP going on the guest side and maybe that's part of the problem.)
When I start qemu with nic/user, it works as expected (well... somehow the nameserver 10.0.2.3 fails now... since I installed my br0 bridge, but I can fix the ...
Today I tried to move an SVN folder to another.
In my first attempt, I tried to copy the folder to a sub-folder that was not in SVN. The result is that the move failed, but nothing seemed to change in the SVN environment.
So I tried again, this time making sure that the destination folder would be an SVN folder.
The second time, however, it failed. The move instruction reported a conflict... Then the svn commit would not work. The SVN system was thinking that I changed something with the first svn mv as the failure did not clear the conflict.
svn mv a tmp/a-1.x        # fails saying tmp/ ...
  
The following are some commands I use to read certificate and otherwise work with OpenSSL which I otherwise find somewhat difficult to use.
To read a certificate, you use the -text and -noout to get the result in stdout. Use the -in to specify the
openssl x509 -text -noout -in server.pem
The first parameter is the type of of key. I'm not sure where you should use what, but in general you can use x509 (csr file) and rsa (rsa files). I'm not too sure why they cannot just detect what's what...
Assuming you were able to install your .pem certificate and private key on your HTTP ...
When you use Ubuntu X11 you at times want to start an application as Root.
In your console you'd use the sudo tool which gives the command temporary super-user powers.
sudo my-command
In Ubuntu Gnome you can do the same using the gksu command. So add an icon, enter the usual information, and for your command, add gksu in front of it. When clicked, you'll first get a prompt asking you your sudo password, then the command is executed as if the root user had started it.
gksu faxanwer ttyS0
Ever wondered whether you could ask bash auto-complete to ignore some of your files?
You can with the FIGNORE feature and the bind feature:
export FIGNORE=CVS:\~:.o:.svn bind 'set match-hidden-files off'
You had one or both of these lines to your .bashrc file and then the .svn and CVS folders won't be used anymore! Add all the extensions you don't like in there and you'll feel better soon!
Note: The \ in front of ~ is to avoid the bash expansion of that character.
As I upgraded from Ubuntu 10.04 to 11.04, I got a bit of a surprise... many system windows started using a new type of scrollbar that is pretty much unusable (at least it slows down my production time on my desktop.)
Yes, these invisible scrollbars (which they call Overlay Scrollbar) are... invisible. Now you have to hover the mouse at the right place to get arrows that you can grab and move up and down. Oh! Did I say that you have to however in one place and these arrows, on purpose, appear AWAY from your mouse? This means you need to then move the mouse over those arrows before you can
Got an email from SourceForge.net today and they mentioned a new binary editor that works under MS-Windows.
Yes, they have one in DevStudio, but it's cumbersome to open a file in that more. You have to go through hoops and it often changes a tiny bit between versions and even just installs!
This one's small and fast and works on large files too.
It's called Frhed.
Ubuntu (and Debian) come with many "alternatives".
The system offers many editors, browsers, compilers, shells, etc. Just have a look at the large selection under /etc/alternatives.
ls /etc/alternatives
Under Unix, one can create soft links to soft links to soft links to an actual file. The alternatives work in that way. The soft links defined in the /etc/alternatives folder are pointers that one can change to make his/her system more likeable.
To change one of these alternatives, Ubuntu offers the update-alternatives script. For example, if you don't like Nano, change your
When writing a CRON job script that you want to install under /etc/cron.*/job-name you must remember to apply the following steps:
1. Write the script and test it as root
2. Make sure to give it execution permission, usually 755
3. The ownership is expected to be root:root
4. The filename cannot include a period or the file it completely ignored
5. The script MUST start with #!/bin/sh or an equivalent (i.e. #!/bin/bash works too.)
6. Use full paths for most everything1
Recent Posts on The Linux Page: