Skip to content

Instantly share code, notes, and snippets.

Rafael R rafaelrinaldi

Block or report user

Report or block rafaelrinaldi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rafaelrinaldi
rafaelrinaldi / filterArray.as
Created Jun 25, 2009
Search something inside an array, using filters similars to "LIKE" filters from Oracle.
View filterArray.as
package rinaldi.array
{
import rinaldi.string.isInString;
/**
*
* Search something inside an array, using filters similars to "LIKE" filters from Oracle.
* The search is case sensitive!
*
* @param p_arr Data provider.
@rafaelrinaldi
rafaelrinaldi / rm_svn_files.sh
Created Aug 22, 2009
Remove SVN files from any folder
View rm_svn_files.sh
# Remove SVN files from any folder
rm-svn-files() {
find "$1" -name *.svn | xargs rm -rf
}
@rafaelrinaldi
rafaelrinaldi / has_svn_files.sh
Created Aug 22, 2009
Check if there's any .svn file into some folder
View has_svn_files.sh
# Check if there's any .svn file into some folder
has-svn-files() {
if [[ `find $1 -name *.svn` = "" ]]; then
echo "false"
else
echo "true"
fi
}
@rafaelrinaldi
rafaelrinaldi / removeDataGridIndices.as
Created Oct 30, 2009
Util to remove DataGrid items.
View removeDataGridIndices.as
package rinaldi.utils {
import mx.controls.DataGrid;
/**
*
* Util to remove DataGrid items.
*
* @param p_grid DataGrid instance.
* @param p_indices Indices to be removed.
@rafaelrinaldi
rafaelrinaldi / sortArray.as
Created Nov 5, 2009
Sort unidimensional arrays.
View sortArray.as
package rinaldi.array {
/**
*
* Sort unidimensional arrays.
* The funcionality of this method is based in one technique teached in ActionScript 3.0 Cookbook.
*
* @param p_array Array to sort.
*
* @return A sorted array.
@rafaelrinaldi
rafaelrinaldi / every.as
Created Aug 27, 2010
Util to loop any array items.
View every.as
package rinaldi.util
{
import flash.utils.Dictionary;
/**
*
* Util to loop any array items.
*
* @param p_data An array with all the items or just a number of loops needed.
* @param p_function Function to be fired on every data occurrences.
*
@rafaelrinaldi
rafaelrinaldi / fire.as
Created Sep 17, 2010
Useful method to fire a function without be careful about null pointer exception.
View fire.as
package rinaldi.util
{
/**
*
* Useful method to fire a function without be careful about null pointer exception.
*
* @param p_function Function to be fired.
* @param args A list of parameters.
*
* @example
@rafaelrinaldi
rafaelrinaldi / replace.as
Created Oct 4, 2010
Replace one display object for another one.
View replace.as
package rinaldi.display
{
/**
*
* Replace one display object for another one.
*
* @param p_scope Scope of the items.
* @param p_oldObject Object to be replaced.
* @param p_newObject New object to replace the old object.
@rafaelrinaldi
rafaelrinaldi / getVisualBounds.as
Created Oct 20, 2010
Useful to get the real bounds of an object.
View getVisualBounds.as
package rinaldi.display
{
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.geom.Rectangle;
/**
*
* This method returns a Rectangle with the real visual DisplayObject bounds.
*
@rafaelrinaldi
rafaelrinaldi / isVector.as
Created Nov 5, 2010
Just check if an object is a Vector instance or not.
View isVector.as
package rinaldi.util {
import flash.utils.getQualifiedClassName;
/**
*
* Just check if an object is a Vector instance or not.
*
* @param p_object Object to be checked.
You can’t perform that action at this time.