MiniGallery
Friday, January 2nd, 2009I just finished writing another PHP script that I’ve entitled “MiniGallery”. It is used to embed a small gallery right into a page with a little HTML/PHP. Check it out at http://www.redgalaxy.net/minigallery.
I just finished writing another PHP script that I’ve entitled “MiniGallery”. It is used to embed a small gallery right into a page with a little HTML/PHP. Check it out at http://www.redgalaxy.net/minigallery.
So, I sat down and wrote a small little program on my website for cellphones. It’s a text message based command line system. It receives text messages, processes the command, and sends a response back to my cellphone if necessary.
Some of the commands I currently have programmed in are reading/writing to a notepad file, checking my email, checking the weather, and getting other information from my website.
It was a small project, and only took a few hours to complete.. but it’s probably one of the more useful things I’ve written recently.
In a little more detail, the whole program is based on a PHP backend which runs every few minutes that checks for new messages. If it finds a message, it takes the first word, assumes it’s a command, and runs the PHP file associated with that command, and forms a response, and then sends the response back to the sender.
I’d give out the address for everyone to test, but I’m still working on security features
So, I decided to update the kernel on my laptop today to the latest and greatest (2.6.27.2 at the time of this posting). Unfortunately, it has a nvidia card on it, and the nvidia drivers you can get off the repositories don’t work.
So, what did I do? Of course, I did what every programmer does best. I dived into linux header files and the nvidia source and changed a few things around. My result was a working nvidia for 2.6.27.x
Here’s the link to the source. Should work on all 2.6.27.x
http://www.redgalaxy.net/src/nv.tar.bz2
Happy compiling
In the case of Microsoft Windows machines, sometimes downgrading is better. Even in the case of some games, down grading can help the player. But my host downgrading my PHP version from 5.x to 4.x is simply outrageous.
I first noticed this today when I go to log on to my Question-Answer website to see if there are any questions posted that need answering. Right when I jump on the home page I see PHP spewing out all sorts of errors about how I’m using str_replace incorrectly.. which is a relatively common function and rather difficult to break. My first instinct is to check if I was hacked [again], so I look into all the databases and files, and everything is perfectly fine and unchanged.
I then check the php manual to see if they discovered any recent bugs. It’s there that I saw that the str_replace I use only supported in 5.x, so something clicks. I print out phpversion(), and what do you know, I’m running 4.x! I’ve been downgraded!
So, please, have some patience with me and my host. if this isn’t corrected soon, they will find an angry email in their inbox tomorrow morning.
I have created a video tutorial outlining some of the basic functions of phpMyAdmin. This includes database and table creation, inserting data rows into the table, row functions, and general database layout.
Enjoy, and feel free to comment. Below you can find the high quality version of this video:
MonoDevelop is an IDE which is used primarily for developing C# programs on the Mono framework. It also has abilities to write cross platform applications using the .NET framework in Windows.
I’m a somewhat experienced developer, and I found this IDE very intuitive. I had never programmed in C# before, and never used GTK# as well. I programmed a text editor in roughly 15 minutes.
Overall, MonoDevelop is the only C# IDE I’d ever use for linux. The one thing I find about the combination of C#/GTK#/MonoDevelop is the ease to make GUI applications. For anyone looking to rapidly make a GUI application for multiple platforms, this is what you need.
The only downside to the applications is that it has a tendency to crash once in a while for me. This could just be a side effect of using the unstable Debian version, however. I still suggest it regardless of the random application crashes.
The next project I hope to be working on is a web-based file explorer. I had been writing one ages ago but then I discovered some core issues with the development and it stopped production.
Now, given my new knowledge on AJAX and PHP web programming, I hope to restart the project with even more advanced features and security updates. It should be just like every other file viewer out there, but with my own special features. Some of the features I intend to include, besides the obvious (upload/download): Picture viewing, video viewing, audio listening (using flash client), full AJAX updating – meaning no page loading, along with information on a per-file basis provided by AJAX.
I hope to release this application within the next few weeks.
Work continues on my PeerUFS. If you don’t know what this is, it’s a GPL’d project to take filesystems on many different computers and union them using p2p style networking code. So far I’ve tested the project three-way locally, and it worked fine. When I tested it two-way remotely, however, I ran into a few bugs where the program would “freeze”. It didn’t actually go into an infinite loop or anything, it just was so slow I considered it useless (a reaction time of 120+ seconds). I’m not entirely sure where this huge delay is coming from. I know it has to do with data transfer timing out, but I’m not sure why.
I hope to work with some friends later to figure out the problem, but for now.. well.. ya. I need realworld setup to help debug this program.
Well, back to a streak of linux Applications of the Day. Code::Blocks is a C++ IDE with all the features you could ask for in a modern C++ IDE. It has tabbed code display, split screen, code autocomplete, a well featured debugger. color coding, different compiling profiles (ie Debug, Release, etc), along with other features I don’t know about. In addition it has a plugin based system where people have written many different features like a class wizard and library finder.
Previously I had used Eclipse for my C++ IDE because it was the only well featured IDE I could find for linux that had the autocomplete feature. Well, eclipse was obviously made for Java, thus it had trouble parsing C++ code. I often had to wait 2+ seconds for the autocomplete window to come up which made coding annoying. Code::Blocks’ version is not only faster, but does a better job at the system providing quicker and more accurate options. It still has some problems with identifying templated code, however.
The only downside is some of the split screen functionality is limited. I learned quickly to deal with it as all the other features were better than Eclipse, so there was no turning back.
My only other complaint I have (which isn’t really Code::Blocks’ fault) is that it was somewhat difficult to install on my distro. Code::Blocks’ requires the latest packages of certain libraries. I run Debian Sid (untested/experimental). Sid has the latest packages.. and they wanted newer ones than I had. So I had to do some searching around until I found a new repository that had these packages. Once they were installed everything was happy. To save you the trouble, here are the repos I added to /etc/apt/sources.list:
#New wxWidgets repository (we always want the newest stuff,right?)
deb http://apt.wxwidgets.org/ etch-wx main
deb-src http://apt.wxwidgets.org/ etch-wx main
Then just download the latest deb package off their homepage (http://www.codeblocks.org/) and you’re all set.
P.S. – They also have a windows version.
http://gobby.0×539.de/trac/What is Gobby? Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms.
So, what do you think? Sounds cool, eh? I played around with it before and it does have some practical uses – one being collaborative coding. I found myself, however, being distracted by the fact that I could see other people typing half the time. If you want to code together at the same exact time, then this is fine (though it is still in development and has a tendency to crash once in a while.. especially on Windows). If you just want to just do some collaborative coding, then just use cvs or [preferably] subversion. Makes life much easier, and you can have it automatically compile every night!
One of gobby’s pitfalls is its inability to extract all files as separate files from its internal format (which basically bunches all the different files together). This makes it nearly impossible to do an automatic processing and compiling of the project. Of course you can start up a client and save the files one by one.. but if you have a project containing more than 20 files, this becomes a hassle to do often.
It does have nice code coloring, though.
The bottom line: Great little program to play with, maybe even write a few full fledged programs with, but it does not seem practical for a professional development environment.