simple

How to use on_mouse_motion to move around a lable via pyglet?

How can one move a label around in the hello world example using the on_mouse_motion function? The docs aren't clicking for me. on_mouse-motion hello_world_example.py ...

Variables behaving badly - in javascript - in functions

First off, here's my code: var variable1 = 10; function f1 (){ alert(variable1); } //When button is pressed, call function $("#button").click(f1); Why can I not access variable1 inside the function? Many thanks and a Happy Christmas. Modified question $(document).ready(function() { var how_many_words = 3; alert(how_many_words...

super simple program is not working

I'm working on the book "programming in objective c 2.0" and im not understanding why this program is not working. basically i need to build a program to convert a fahrenheit value to a celcius one. I figured to just solve it very simply without objects and just use a straight procedural methodology, any way the problem I'm having is th...

A "CMS" for a one-page site?

I'm going to build a site for a client that consists of only one page. The page has only one div with editable content; the rest can be hard-coded in a template file. The client wants CMS-like behavior: logging in on the site and editing that single piece of text (preferably inline). I usually build larger sites with Drupal, but that wo...

simple database engine for data manipulation

I have a bunch of data in text format and I need to do some analysis on it. I think SQL will be very efficient but don't want to install a server (like sql server or mysql) all I need is a simple engine I can import the data into and then do a few queries (from the local machine) is there such a database ? ...

Simple java input problem

Hi, I'm new to java and having problems with getting input. This is my code which seems to get the first input as required, but then skips the next two "read" function calls? Any suggestions? // open up standard input BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int battMax, battMin, numN...

Simple layer problem [iphone]

Basically I'm sorting through objects in an array by y value (The furthest down the page is at the start of the array) but I'm having a bit of trouble. I assign all of the UIImageViews in an array a value: for (UIImageView *Blocky in objectsArray){ [Blocky.layer setValue:[NSString stringWithFormat: @"%f", ...

Simple PHP CMS as an alternative to hacking Wordpress

For creating common user modifiable site I've been forcing Wordpress to do the work of a CMS. It's worked and the back-end is purdy but it's just too hacky for my tastes. So I'd like a simple CMS that is easy to customize and add dynamic content to. Right now it looks like modx is my best bet. I've tried Joomla a while ago but it was a ...

Simple Interaction with an Active MATLAB Session from Outside MATLAB

I'm trying to give a Java application the ability to change the working directory within an active session of MATLAB. Basically, the user will press a button to launch MATLAB. Then, they will be able to press other buttons that change the working directory of the active MATLAB. I've tried a few different approaches, but with no luck. I'v...

Create a simple mootools 1.2 tab system

Hi all, I'm trying to create a very simple tab interface using the mootools 1.2 version. I need to have a fadein-fadeout effect, no sliding or morphing. I've tried to find some demos online but they all refer to different versions of mootools or they are too complicated comparing to my needs. Can you please give me some guidelines? This...

PHP/MySQL database design for various/variable content - modular system

Hello, I'm trying to build (right now just thinking/planning/drawing relations :] ) little modular system to build basic websites (mostly to simplify common tasks we as webdesigners do routinely). I got little stuck with database design / whole idea of storing content. 1., What is mostly painful on most of websites (from my experience...

Universal Key Code (Java)

Hi I'm programming a listener that based on the key pressed by the user, must act in a certain manner. I need to be able to determine if a user press the 'i' key or 'm' key. Actually I'm doing it like: // If pressed the 'i' key if ( evt.getKeyCode() == 73) { // } ... I look out here and with the sample applet determine that the i...

Very Simple Image Gallery

Does anybody have any suggestions as to where I could get a really simple gallery (projected below) that uses the basic html framework of the following snippet? A previous-next gallery <ul> <li><img src="image01.jpg" width="500" height="450"></li> <li><img src="image02.jpg" width="200" height="450"></li> <li><img src="image03.jpg"...

C# REPL tools; quick console-like compiling tool.

Often times, I start a new instance of Visual Studio, just to create a console application that has some output and/or input. It's a temporary sandbox I use to test a method or something else and close a few minutes later. Can you think of any tools to replace this? I use to have an application that had two text fields: one on top to t...

Smart-like template engine for java?

Is there any template engine (open source) that is like Smart? I want to make it easy for users to design their templates in HTML and then use it, which the smarty-template really is good for. JTPL is close to my example of what I'm looking for, but I want the "foreach" part in the template to be able to let users customize the result pa...

Algorithm for finding possible ways of simple, multiple encryption with the alphabet

When using a simple encryption method in which the letters are replaced by the indexing numbers of the alphabet, there are multiple ways of decrypting them, ex. ABOR is 121518 but 121518 could also be AYEAH or LAER. Well I need an algorithm to calculate how many possible ways there are for a given number to decrypt the message via the ...

Stuck selecting classes or id's using PHP Simple HTML DOM Parser

Hi everyone, I'm trying to select either a class or an id using PHP Simple HTML DOM Parser with absolutely no luck. My example is very simple and seems to comply to the examples given in the manual(http://simplehtmldom.sourceforge.net/manual.htm) but it just wont work, it's driving me up the wall. Other example scripts given with simple ...

Problem getting contents of class using php simple dom parser

Hi everyone, I can't work out how to get the contents of the second span 'cantfindme' using php simple html dom parser(http://simplehtmldom.sourceforge.net/manual.htm). Using the code below I can get the contents of the first span 'dontneedme'. I cant seem to get anything from second span at all. $html = str_get_html('<html><body><tab...

Is there a cleaner or more efficient to do this Python assignment?

Here's the code I have now: lang = window.get_active_document().get_language() if lang != None: lang = lang.get_name() Is there a better way to do that? I'm new to Pythonic and was wondering if there's a more Python way to say "something equals this if x is true, else it equals that." Thanks. ...

Android - SIMPLE Object Orientation

Hey guys I've got a rather short question. I am using Android and I'm on the way to write a small Game in SIMPLE (The Programming-Language which is like BASIC). Now I would like to know if SIMPLE is Object-oriented? I wasn't able to figure this out... I just saw that a programmer has the opportunity to write multiple ".simple" files i...