Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="handleCreationComplete(event)"
>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var arrayCollection:ArrayCollection;
private function listFonts():void {
var fontArray:Array = Font.enumerateFonts(false);
for(var i:int = 0; i < fontArray.length; i++) {
var thisFont:Font = fontArray[i];
if (thisFont.fontType == "embedded") {
ta1.text += "FONT " + i + ":: name: " + thisFont.fontName + "; typeface: " +
thisFont.fontStyle + "; type: " + thisFont.fontType + "\n";
}
}
}
@lukesh
lukesh / rdelete
Created September 15, 2009 15:29
#!/bin/bash
if [ "$#" -lt 1 ]
then
echo "Usage: $0 <parameter>"
echo "where parameter is pattern of file to be recursively deleted"
exit 1
fi
echo "Recursively removing for pattern: '$1'"
find . -iname "$1" -print0 | xargs -0 rm -rf
#!/bin/bash
if [ "$#" -lt 3 ]
then
echo "Usage: $0 <filepattern> <searchterm> <replaceterm>"
echo "where <filepattern> is pattern of file to be scanned"
echo " <searchterm> is the pattern of the string to be found"
echo " <replaceterm> is the string that will replace <searchterm>"
exit 1
fi
private function handleItemDoubleClick(event:ListEvent):void
{
var dg:DataGrid = DataGrid(event.target);
dg.editable = true;
dg.editedItemPosition = event; // { rowIndex: event.rowIndex, columnIndex: event.columnIndex };
}
private function handleItemEditEnd(event:DataGridEvent):void
{
var dg:DataGrid = DataGrid(event.target);
package flexUnitTests {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.utils.setTimeout;
import flexunit.framework.Assert;
import mx.core.mx_internal;
import mx.rpc.AsyncToken;
// Letting Flex generate PropertyChangeEvents for you
// (most codegen by Flex, most inefficient, easiset to implement.
[Bindable]
public var field1 : String;
// You do everything. You don't necessarily need to fire a PropertyChangeEvent
// to trigger proper binding, as long as the event name == the name specified
// in the metadata.
//
// Note that [fieldname]Change is the Flex default, which means if you specify:
newSelectedItems.filter(function (e:*, i:int, a:Array) : Boolean {
return a.indexOf(e,i + 1) == -1;
};
---
author: lmarburger
layout: post
---
As you may be aware, we had quite a day at CloudApp yesterday. An individual
named Dustin Curtis took it upon himself to make a simple web page he called
[CloudApp Roulette]. The premise is simple: pick a random public URL and display
the image stored there.
nnoremap <C-W>O :call MaximizeToggle ()<CR>
nnoremap <C-W>o :call MaximizeToggle ()<CR>
nnoremap <C-W><C-O> :call MaximizeToggle ()<CR>
function! MaximizeToggle()
if exists("s:maximize_session")
exec "source " . s:maximize_session
call delete(s:maximize_session)
unlet s:maximize_session
let &hidden=s:maximize_hidden_save