simple

VB.net 2008 Property Array

Hi can anyone help here? I am currently learning VB.net but for a project I need to create and array and pass it using a property. The data to be passed will be a train's destination, the time its due and the expected time of the train. I was wondering if someone could simplly explain how to first produce an array and then show how to pa...

Really Cheap Command-Line Option Parsing in Ruby

Sometimes I want to very cheaply hack some command line options into a simple script. A fun way to do it, without dealing with getopts or parsing or anything like that, is: ... $quiet = ARGV.delete('-d') $interactive = ARGV.delete('-i') ... # Deal with ARGV as usual here, maybe using ARGF or whatever. It's not quite the normal U...

Python web framework with low barrier to entry

I am looking for a LAMPish/WAMPish experience. Something very transparent. Write the script, hit F5 and see the results. Very little, if any abstraction. SQLAlchemy and (maybe) some simple templating engine will be used. I need simple access to the environment - similar to the PHP way. Something like the COOKIE, SESSION, POST, GET obje...

Python - simple reading lines from a pipe

I'm trying to read lines from a pipe and process them, but I'm doing something silly and I can't figure out what. The producer is going to keep producing lines indefinitely, like this: producer.py import time while True: print 'Data' time.sleep(1) The consumer just needs to check for lines periodically: consumer.py import ...

Java Swing: Approach for dynamically appending text in text area, have scrollbar update

What is the general approach with Java swing to update a textarea with lines of text (say from a Thread) and then have the text caret flow to the bottom of the textarea as text is being added. Also update the scrollbar so that it is at the bottom. I was thinking that I would have a stringbuffer and append text to that and then set the ...

summer-holiday-programming-club - Looking for examples

This post is related to my older one: summer-holiday-programming-club - Which language suits best?. Please read it first if you don't know about the background of this question. After deciding about a programming language I am now looking for simple examples that can be easily implemented in Python and help to understand basic concepts....

Beginner question for a simple database

I have an iPhone application that emails my GPS coordinates to an email account. I have some code (here) that I'm using to search that account for emails that contain the GPS coordinates. I wanted a Windows Forms application that would allow me to store the date, time, latitude, longitude and res information of the emails into some sor...

How to move an element in a list in Haskell?

I'm reading through Learn You a Haskell and reached a spot where I'm trying to move an element in a list to the head. I've come up with what I think is the naive way and I'm curious if someone can show me what the experienced Haskell programmer would do instead. In this example, I have a list of Integers and I want to move the elemen...

HOW-TO: The Most Simple Audio Engine?

Hello, I am curious. How would one implement the most simple audio engine ever? I have something like a stream for audio data in mind using your default audio device. Playing a lot with RtAudio, I think if one could drop some of the features, this would be possible. Someone any idea where to start? Thank you so much for reading my que...

C/C++ counting the number of decimals?

Lets say that input from the user is a decimal number, ex. 5.2155 (having 4 decimal digits). It can be stored freely (int,double) etc. Is there any clever (or very simple) way to find out how many decimals the number has? (kinda like the question how do you find that a number is even or odd by masking last bit). ...

Javascript opening maximized window when unintended

Hey. The following line was opening a 490x610 window, but after modifying some other code, it started to open up the full page new window. Any ideas as to why? <a href="cart_display.php" onclick="window.open('uploader/upload_files.php?order_id=32063700', '','width=490,height=610')">Upload Here</a> ...

Simple XML - Dealing With Colons In Nodes

Im trying to read an RSS feed from Flickr but it has some nodes which are not readable by Simple XML (media:thumbnail, author flickr:profile, ...) How do I get round this? Im trying to get the thumbnail by the way. P.S. My head hurts when I look at the documentation for the DOM. So I'd like to avoid it as I dont want to learn. ...

Should BASIC continue to be recommended for non-programmers and beginners?

I just came across a new BASIC implementation for Google Android application called Simple. You can read about it here: http://google-opensource.blogspot.com/2009/07/programming-made-simple.html Clearly, a lot of time and effort has been recently put into enabling this functionality for Android. Should the software industry continue t...

Give no one access in a directory .htaccess

Hi It is probably very simple but I can't find it. I want to make a .htaccess file so no one can get into the folder. except for the php on the server. does anyone know the code line? Thanks Matthy ...

read from argv[0]

Hi i have a simple C question .. : int main(int argc,char *argv[]) { char *text; int textLen,repNum; text = stream2string(stdin,&textLen); //....text = argv[0] doesnt work :( so how can i read from argv[0]? I use netbeans .. and everytime i have to type in stdin.. when i use argv then the programm will execute without my inp...

Simple GWT hosting

Hi, I have designed a website with the GWT, This is purely a static site and it doesnt have any servlet or any rpc part involved in it. Its just a plain static pages in GWT .I have compiled with the GWT and there are all related html ,.js files are present in the public folder. Now i want to host the same in any of the web host. Good ...

front-end configurable products from simple products in magento?

hello all, a client has imported 1000 items to magento as simple products. many of these SHOULD be configurable products (ie, 4 yellow dresses of different sizes). the psuedo-configurable products all have the same "Style" number, so our 4 yellow dresses would have different SKU values but all 4 would share the Style. is there a way to...

Javascript arranaged so that things are OK when there's no Javascript ?

Don't overthink this - there's a very commonly used term and I ... have ... completely ... forgotten ... it ! ;-) What is it called when a web page makes use of Javascript (generally in a sophisticated fashion that adds a significant amount to the functionality of the page) but things are arranged in such a way that if the browser has J...

iPhone dev - help with using Model

(By the way, I don't use Interface Builder) I have a little project consisting of a root UIViewController which manages 5 other View Controllers with a UITabBar, I'm not using UITabBarController. The Root View Controller only ever keeps one of its View Controllers instantiated, when a tab bar item is selected, the View Controller ...

sreg Yahoo problems

Hello May you please look at the issue: You may test Yahoo sreg at "https://test-id.org/OP/Sreg.aspx" ID : "https://me.yahoo.com/" username: [email protected] password: paranoid Now the problem This code work with Google but not with Yahoo sreg, becase response.GetUntrustedExtension() alwase returns null values for properties for Ya...