Programming :: Convert A Colour Value From Hex (e.g. #FF8000) Into The Format Required By The Set_source_rgb Function?
Jul 4, 2010
I've recently starting dabbling with python and gtk/cairo bindings. Can anyone point me to a quick and easy way to convert a colour value from hex (e.g. #FF8000) into the format required by the set_source_rgb function?E.g. I have this:
I'm in the process of debugging and compiling about sixty FORTRAN 95 programs and could use a little bit of your help before my brain is fried and fingers are cramped. Thanks for your time!
just wondering is there a simple script to convert datetime to UTC format. I have been searching different forums but most answers are for converting UTC to datetime. For example what is a simple command/script to convert todays datetime to UTC format i.e. '2009-10-09 11:47:59'.
Dont know how to explain this properly but in some forums on the net, no matter what text colour i change its always very light in colour. How can I change this so that the text is black as in when typing here for eg? its not the actual setting of the forum as I have looked through it thoroughly.
OpenSUSE 11.2 installation DVD has many many applications that are installed by default.How can I install just the minimum for a working system. As an excercise I am trying to build a Nas system which I can install into our Windows Active Directory at work and have user access controlled via an Active Directory user group. I have no need therefore for so many of the applications available. I have tried uninstalling some applications and have managed to remove some features that I infact needed to keep.just a minor thing like the Gnome interface (gee!). Is there a list available of core applications required to function etc. that would help me to streamline my build?
I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.
I Just got a Removable Hard drive! Now I need to format it because I need it to hold more then 4 GB file sizes. What format should i used. I'll only need compatibility with Other LINUX computers. So should i use NTFS, BTRFS, or EXT4? How would i take ownership of the backup drivers file system and not ROOTS permissions
What should my partitions look like? I want to install this to my hard drive, I'm currently running it from DVD. My drive is sdb It has 153.3 GB (157065 MB) I want to know what format type should the partitions be, and how many megs they should be. Which partitions to encrypt, and which I don't need to.
I have some .mp4 files. While open this file using vlc-player the resolution is fine. Then I convert this .mp4 format to .avi format using "ffmpeg". While open the .avi file using vlc-player the resolution is not fine.
What is the best way using Linux to convert a DVD from NTSC to PAL format? I have a DVD made from an HD recording using a video camera. Made a standard DVD by copying from the Camera to the DVD recorder [ergo NTSC].
Is there any way to convert *.flv and *.mp4 videos to *.swf format please? I have some videos downloaded with .....-dl that are in the above format. I would like to make them all into SWF files, so anyone can watch them in their browser, without having to find a suitable multimedia player.
I guess many guys got lots of eBooks in PDF and other formats, but some e-readers like Sony Reader, Barnes & Noble Nook, Hanlin eReader and phones/devices using Android only support specific formats with their default reader apps, especially newly-released and hot iPad. What's the best way to convert those PDFs to ePub (ePub is the only ebook format iTunes accepts)?
I have a Humax HDPVR-1000C digital cable set-top box. Now I want to transfer some of the shows I had recorded with the box to a DVD. So I copy a movie from the Humax box to an external USB hard drive and then plug the hard drive to my OpenSUSE box. The hard drive now contains three files: one with the extension .hmt, one with the extension .nts and a fairly large file with the extension .ts.
After doing some googling I found out that the .hmt and .nts files are apparently related to Microsoft HighMAT technology. So it seems that the Humax box stores the recordings in M$ HighMAT format.
My question is that how do I fit these files to a DVD that can be played in a DVD player? VLC can play these files just fine, but really would like to burn them on a DVD.
I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.
#!/bin/bash addelementtoarray() { local arrayname=$1
I use Linux for my everyday work but lately I've been faced with a trouble when I send out file printouts from my browser from my Debian system to (normally) window$ systems, where they are not readable. Is there a way for me to convert the postscript files into pdf format? Most window$ users will have some sort of pdf reader installed but I am still to find one user that has Ghostscript and Ghostview installed. where can I find the TTF fonts that are shipped with every standard installation of Debian? I'm sometimes forced to print files through a windows system and because the fonts loaded in that system are not the ones I use in Debian (URW Gothic L, as an example) I end up having my official documents disfigured. If I can carry around with me a ready-to-install fonts package I can get over this obstacle.
I am running my fedora box as a media server and my xbox (sorry) doesn't see mkv files and I have been looking for a while for a way to convert the mkv files to any format readable any ideas?
I have a PDF File here with upright ("portrait" format) pages, and I want to convert it so that each page gets "split" in the middle and becomes two wide ("landscape" format) pages.
Something like "print multiple pages on one page", only reversed
Is there any way to do such a thing with CUPS or something?
I'm trying to extract audio and then convert to mp4 format a bunch of flv files downloaded from internet. There are three files I intend to use ffmpeg in the following options:
ffmpeg -i input.flv -acodec copy output.mp3 and ffmpeg -i "input.flv" -f mp4 -vcodec libxvid -s 640x360 -b 768kb -r 25 -aspect 16:9 -acodec libfaac -ab 96kb -ar 44100 -ac 2 "output.mp4" So I started writing a script like this: #!/bin/bash -x cd /home/koli/exp