Skip to content

Instantly share code, notes, and snippets.

#include "testApp.h"
void testApp::setup()
{
ofAddListener(httpUtils.newResponseEvent, this, &testApp::newResponse);
httpUtils.start();
ofxHttpForm form;
form.action = "http://example.com/images/hoge.jpg";
#include "testApp.h"
void testApp::setup()
{
updateHandler = drawHandler = &testApp::empty;
}
void testApp::update()
{
(this->*updateHandler)();
$ git checkout -b <LOCAL BRANCH> <REMOTE BRANCH>
/**
* linkage view and logic cross over each swf.
*/
package com.example.ui
{
import flash.display.*;
[Embed(source='path/to/assets.swf', symbol='com.example.assets.SomeClass')]
public class SomeClass extends Sprite
{
-- find current processes.
mysql> SHOW PROCESSLIST;
-- kill process by process id
mysql> KILL <PROCESS ID>;
-- find lock.
--
-- When In_use is 0, anyone locked it. otherwise someone locked.
-- When Name_locked is 1, DDL locked it.
(function () {
var id = (function () {
var i, l, q, div, el, qs;
el = document.getElementsByTagName('SCRIPT');
el = el[el.length-1];
qs = el.src.split('?').pop().split('&');
l = qs.length;
for (i=0; i<l; i++) {
q = qs[i].split('=');
if (q[0]=='id') {
>>> import datetime
>>> import pytz
>>>
>>> tz_tokyo = pytz.timezone('Asia/Tokyo')
>>>
>>> now = datetime.datetime.now()
>>> now.strftime('%Y-%m-%dT%H:%M:%S%z')
'2010-07-10T03:31:34'
>>>
>>> now = tz_tokyo.localize(now)
package
{
import flash.display.Sprite;
import org.osflash.signals.Signal;
/**
* as3-signals サンプル 1
*/
public class Sample1 extends Sprite
{
if (!event || !event.bubbles) return;
//// Bubble the event as far as possible.
var currentTarget:Object = this.target;
while ( currentTarget && currentTarget.hasOwnProperty("parent")
&& (currentTarget = currentTarget.parent) )
{
if (currentTarget is IBubbleEventHandler)
{
// onEventBubbled() can stop the bubbling by returning false.
// same as getQualifiedClassName.
Type.getClassName(Type.getClass(OBJ));