processing

Best book to learn the Processing programming language?

I am a programmer interested in learning Processing (the programming language). The main Processing site is obviously the primary resource. Indeed they have much great information. They even include a list of fairly expensive books: ... and others Let's assume that in addition to online resources, I want to get a book to study ...

Varying Colors in Processing

I've been working on porting some of my Processing code over to regular Java in NetBeans. So far so well, most everything works great, except for when I go to use non-grayscale colors. I have a script that draws a spiral pattern, and should vary the colors in the spiral based on a modulus check. The script seems to hang, however, and I...

How would you approach this data processing task?

I have a file containing 250 million website URLs, each with an IP address, page title, country name, server banner (e.g. "Apache"), response time (in ms), number of images and so on. At the moment, these records are in a 25gb flat file. I'm interested in generating various statistics from this file, such as: number of IP addresses re...

In PHP, is there a way to capture the output of a PHP file into a variable without using output buffering?

In PHP, I want to read a file into a variable and process the PHP in the file at the same time without using output buffering. Is this possible? Essentially I want to be able to accomplish this without using ob_start(): <?php ob_start(); include 'myfile.php'; $xhtml = ob_get_clean(); ?> Is this possible in PHP? Update: I want to do ...

Weird random data being sent from Arduino to Processing

I'm trying to read data from a photocell resistor and my Arduino Decimila and then graph it in real-time with Processing. Should be painfully simple; but its growing into a little bit of a nightmare for me. code I'm running on my Arduino: int photoPin = 0; void setup() { Serial.begin( 9600 ); } void loop() { int val = int( map( ...

What is your preferred pastime programming project?

By pastime programming project, I refer to any programming you do that's in your spare time and not work-related per se, although what is learned can be applied to work. I like using Processing to create generative illustrations. I do front-end web development for my work, and as you may have guessed, find it far less interesting. I am ...

Proper way of cancelling accept and closing a Python processing/multiprocessing Listener connection.

Hi! (I'm using the pyprocessing module in this example, but replacing processing with multiprocessing should probably work if you run python 2.6 or use the multiprocessing backport) I currently have a program that listens to a unix socket (using a processing.connection.Listener), accept connections and spawns a thread handling the requ...

Can you send dynamic data to a processing applet?

I have an ajax page which pulls data from a database. I'd like to add a processing applet to visualize the data but i can't figure out how to update the visualization as the data changes. The idea is to be able to push new data into the visualization. I'm not tied to the processing technology, anything will work. Processing just seems t...

jQuery Form Processing With PHP to MYSQL Database Using $.ajax Request

Question: How can I process a form using jQuery and the $.ajax request so that the data is passed to a script which writes it to a database? Problem: I have a simple email signup form that when processed, adds the email along with the current date to a table in a MySQL database. Processing the form without jQuery works as intended, addi...

How to animate a window with Processing?

I am using Processing to learn programming and wondered if there is a way to make an OS window grow, shrink, make it transparent or give it round edges. As far as I know Processing uses Java's Frame class and not the JFrame class, but I just can't figure out how to do this. Thanks for your help. For reference, similar question asked at...

More than a window in Processing

Is it even possible? Can you load more than one image and have them displayed in more than one window? ...

pyPdf for IndirectObject extraction

Following this example, I can list all elements into a pdf file import pyPdf pdf = pyPdf.PdfFileReader(open("pdffile.pdf")) list(pdf.pages) # Process all the objects. print pdf.resolvedObjects now, I need to extract a non-standard object from the pdf file. My object is the one named MYOBJECT and it is a string. The piece printed by...

compiling processing sketchs from the commandline?

I'm a blind student who has to use processing in a programming class. Is it possible with the current 1.01 version to compile sketch files from the commandline and view any errors? Update This link helped me fix my problems, I'll write a blog post about it when I have time. http://processing.org/discourse/yabb_beta/YaBB.cgi?board=os_co...

Absolute Mouse Positions on Processing

This is a copy paste of a post i made on the processing forum (where i haven't got an answer so far) thought i might as well try here. Processing is a very cool way to draw stuff, specially for the webpages. Just as a reference http://processing.org Hey, i'm new to processing, i'm using it to make a flashless website, so i'm pretty muc...

Multi line string containing special characters in javascript?

I'm trying to use the javascript port of processing found at http://ejohn.org/blog/processingjs/ I want to use the following constructor. Processing(CanvasElement, "some massive block of code"); I know javascript doesn't natively support multiline strings but is there a way to pass something like the following with out having to concaten...

Error: 'CanvasElement' is undefined

I get Error: 'CanvasElement' is undefined when trying to run the following code using the javascript port of processing. var p = Processing(CanvasElement); p.size(100, 100); p.background(0); p.fill(255); p.ellipse(50, 50, 50, 50); Any help with this would be appreciated. ...

printing out error messages in the javascript version of processing

To make a long story short I have to use processing in a class and I'm completely blind. The ide is completely inaccessible so I use the JavaScript version of processing to create a page and have a sited person describe the output to me. Unfortunately if the code has errors the page appears blank and there is no explanation of what’s wro...

How to access objects/arrays defined in JavaScript from Java applets.

Using LiveConnect getMember(String) method of a window JSObject, a Java object of type "Object" is returned but I don't find the expected members defined on it. Neither can I cast it to a JSObject to continue using the getMember(). Accessing DOM nodes and elements (DOM Objects) works as expected. ...

gsoap fault processing - sending application specific exceptions

Hello GSoap community! My application is crashing when I am sending application specific fault details. Here's how my SOAP_ENV__Detail looks like - struct SOAP_ENV__Detail { public: ex__ExceptionType *ex__Exception; /* optional element of type ex:ex__ExceptionType */ int __type; /* any type of element <fault> (defined below) ...

How to bind a PImage to a texture in Processing using jogl (straight OpenGL)

If you've loaded an image into a PImage in Processing, what's the best way to bind it to a texture using OpenGL calls? I'm not using any of the Processing rendering stuff. ...