simple

How to use the same widget twice in pygtk?

This doesn't work well: image_log = gtk.Image() image_log.set_from_file("test.png") self.out_button = gtk.Button() self.out_button.add(image_log) self.err_button = gtk.Button() self.err_button.add(image_log) another_box.pack_start(self.out_button, False) another_box.pack_start(self.err_button, False) ...

Looking for a very simple file-based CMS

I'm building a site for a friend for free, and am trying to work out a good way for her to be able to easily make updates. I haven't used any CMSs before. I was browsing the web today looking at some, and they all seem way too complicated for what I'm after. Basically, all I want is a really simple CMS that pulls together HTML snippets ...

In Perl, how can I change an element in an XML file without changing the format of the XML file?

Hi, I have a XML file of the format: <outer1> <inner1> <name>Stonecold</name> <profession>warrior</profession> <org>wwf</org> </inner1> <inner1> <name>Shanebond</name> <profession>Bowler</profession> <org>newzealand</org> </inner1> <inner1> <name>brain schemidit</name> <profes...

basic php problem I think answer will involve arrays

I want to make a conditional if statement that does this if($get_['b']=="1") { $offer1a=$offer1XXX; $offer1e=$offer1YYY; $offer2a=$offer2XXX; $offer2e=$offer2YYY; $offer3a=$offer3XXX; $offer3e=$offer3YYY; $offer4a=$offer4XXX; $offer4e=$offer4YYY; } All the way to offer #12. It seems like a lot to write out. There are other valu...

Can you attach a CMS to an existing static web site created in Dreamweaver?

I am not a programmer, but a designer. I created a static web site in Dreamweaver (CS4) and my client would like to be able to update a news page on his own. I have looked in to several CMS options and haven't found one that seems to fit my needs. Mainly, simple to set up, possible to set up and, preferrably, free to set up. Any sugg...

How do I append a url typed into a input text field to an anchor then follow it when anchor is clicked?

I want to have a text field where people can type in a value. Then I want to have a href open a url with the text field appended to the end. So if the text field says "elephant" then when they click the link, a page will open with at example.com/elephant. I think javascript would be the easiest way to accomplish this but I just don't k...

$_get/htaccess question (php)

I'm trying to make it so that $_session['kw']=$_GET['kw']. If I use the url index.php?kw=example, then when i echo $_GET['kw'] i get a blank. Is there anything that would cause $_GET to not work? I figured out that it must be caused by the .htaccess file there are rewrite rules in there that go like this: RewriteRUle ([-a-z0-9_]+)_re...

Upload clocking script

How can I make a script that, once a day, will upload a file via ftp to several different servers, then take note (in a log) of how much time the uploads took? Thanks to Rajax I have the cronjob set up to execute this so far as the script, let's say it's called ftpScript.sh: #!/bin/sh HOST='ftp.users.qwest.net' USER='MYUSERNAME' PASSW...

Basic cocoa application using dock in Python, but not Xcode and all that extras

It seems that if I want to create a very basic Cocoa application with a dock icon and the like, I would have to use Xcode and the GUI builder (w/ PyObjC). The application I am intending to write is largely concerned with algorithms and basic IO - and thus, not mostly related to Apple specific stuff. Basically the application is suppose...

Stuck with Simple Html Dom and extracting information

I'm trying to use simple html DOM to extract everything inside a tag with the class "sitepoint". Here is my code that doesn't work: <?php include_once('simple_html_dom.php'); $html = file_get_html('examplewebsite'); $ret = $html->find('.sitepoint'); echo $ret; ?> Below is an example of one of the sitepoint tags (there are ten or so)...

Send a dynamic id to a Simple Modal confirm dialog confirmation

I see how the Simple Modal example is working, but I don't see a way to send an id to it. I have a recordset on my page with many rows that have a delete button for each. I need to send the id for each one to the modal function to attach the id to the url when redirected. Here is the example site. It's the Confirm Override one. thanks ...

Bash comparing stored "boolean" value with what?

Hi, I'm trying to make a program that takes in one argument. A file. And then checks what has happened to the file 60 seconds later. To do this, I need to store the result from "-e $1" in a variable and then check it 60 seconds later. I can not seem to be able to make the if expression listen to me, and I know it's wrong. For testing pur...

Very simple greasemonkey script to select a dropdown

Would anyone be able to tell me the grasemonkey code to have this page http://www.easportsworld.com/en%5FUS/clubs/nhl Have "Any" as the default selected spoken language from the dropdown. It defaults to English as selected for me. ...

Java binary tree which return type for iterator over nodes, interface or class?

I'm writing a class for a binary tree, and in the tree interface this function is defined: /** Returns an iterable collection of the the nodes. */ public Iterable<Position<E>> positions(); The problem is that the type of the node is MY class implementing the position interface in the task. Not the interface itself, Position. That ...

Compiling assembly for windows on linux

This is a homework task, but it's very simple. The task comes with a working assembly file. I just need help to compile it on linux instead of windows. I'm using Ubuntu. I've installed mingw32. The task itself is to add some functionality, not compiling it. The file itself is here: here. To much code for including it, and besides the c...

Simple Query using subsonic 2.2 with Oracle.dataclient error.

I am using subsonic 2.2 with Oracle provider. I can use active record but my simple query does not work! int record = new Select(VenApplication.ApplicationidColumn).From(VenApplication)().GetRecordCount(); The error that i got is ORA-00923: FROM keyword not found where expected Description: An unhandled exception occurred during the ...

displaying only thumbnails in directory, but linking to full size image

I have a directory with fullsize images and thumbnails. The thumbnails are prefixed with thumb_ and then share the same name as the full size counterparts. What do i need to do the script below to get both the full image and the thumb, so i can echo the correct link? As is, it returns all images. <? $dirHandle = opendir("images"); ...

Simple Binding of Data from code behind to XAML

Hi, I am new to WPF concepts. I want to just display a string in a textbox. I tried the following C# code and XAML to bind a string to a TextBox.Text property. C# code: public partial class Window1 : Window { public int TmpVal; public string TmpStr; public Window1() { TmpVal = 50; TmpStr = "Windows Cr...

Linking to external files in ruby?

Sorry if this question is very easy, but I can't find the answer anywhere. How do you refer to an external ruby file in a ruby script if, for example, the file you want is in the same folder as the one you are writing? Thanks in advance. ...

Simple Increment in assembler

Hi, I'm stuck with this. I'm self studying assenbler and translating some basics instructions. But i can't with this one. Can anyone help me, please? int secuencia ( int n, EXPRESION * * o ) { int a, i; for ( i = 0; i < n; i++ ){ a = evaluarExpresion( *o ); // Im trying to do this: o++; __asm { mov eax,dword ptr [...