Tag Archive for filter

Image-less Dropshadow

#north {position: absolute;width: 200px;left: 100px;top: 100px;height: 5px;}

#east {width: 5px;position: absolute;height: 200px;top: 100px;left: 100px}

#south {position: absolute;width: 200px;height: 5px;left: 100px;top: 302px;}

#west {width: 5px;position: absolute;height: 200px;top: 100px;left: 305px}

.ds_ch {height: 1px;line-height: 1px;width: 100%;background: black;display: block;overflow: hidden;}

#east .ds_ch, #west .ds_ch {width: 1px;height: 100%;float: left;clear: none;display: inline;}

.o1 {opacity: .5;filter: alpha(opacity=50);}

.o2 {opacity: .4;filter: alpha(opacity=40);}

.o3 {opacity: .3;filter: alpha(opacity=30);}

.o4 {opacity: .20;filter: alpha(opacity=20);}

.o5 {opacity: .10;filter: alpha(opacity=10);}

/* For connecing the shadow in 2 corners */

.mv1 {margin-top: 0px;padding-bottom: 7px;}

.mv2 {margin-top: 1px;padding-bottom: 5px;}

.mv3 {margin-top: 2px;padding-bottom: 3px;}

.mv4 {margin-top: 3px;padding-bottom: 1px;}

.mv5 {margin-top: 4px;padding-bottom: 0px;}

.m1 {margin-left: 1px;padding-right: 8px;}

.m2 {margin-left: 2px;padding-right: 6px;}

.m3 {margin-left: 3px;padding-right: 4px;}

.m4 {margin-left: 4px;padding-right: 2px;}

.m5 {margin-left: 5px;padding-right: 0px;}

/*
ds = dropshadow

ch = child
pa = parent

o = opacity
m = margin
mv = margin vertical

*/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Author" content="#" />
<meta name="Description" content="#" />
<meta name="Copyright" content="#" />
<meta name="Robots" content="#" />
<meta name="Generator" content="#" />
<meta name="Keywords" content="#" />
<link rel="stylesheet" href="shadows.css" type="text/css"  media="screen"/>
</head>
<body>
<div id="north">
<div class="ds_ch o1 m1">
</div>
<div class="ds_ch o2 m2">
</div>
<div class="ds_ch o3 m3">
</div>
<div class="ds_ch o4 m4">
</div>
<div class="ds_ch o5 m5">
</div>
</div>
<div id="east">
<div class="ds_ch o5 mv5">
</div>
<div class="ds_ch o4 mv4">
</div>
<div class="ds_ch o3 mv3">
</div>
<div class="ds_ch o2 mv2">
</div>
<div class="ds_ch o1 mv1">
</div>
</div>
<div id="south">
<div class="ds_ch o5 m5">
</div>
<div class="ds_ch o4 m4">
</div>
<div class="ds_ch o3 m3">
</div>
<div class="ds_ch o2 m2">
</div>
<div class="ds_ch o1 m1">
</div>
</div>
<div id="west">
<div class="ds_ch o1 mv1">
</div>
<div class="ds_ch o2 mv2">
</div>
<div class="ds_ch o3 mv3">
</div>
<div class="ds_ch o4 mv4">
</div>
<div class="ds_ch o5 mv5">
</div>
</div>
</body>
</html>

source

Show filter en mxcollection

productos.php?show_filter_tfi_listproductos1=1

source

Parse an XML document with REXML and print some of the text nodes

require "rexml/document"
file = File.new( "MY_FILE.xml" )
doc = REXML::Document.new file
doc.elements.each("document/record/upload_list"){
|element| puts element.text if element.text
}

source

AS2 FuseFMP ONRY ドロップシャドウやぼかしのフィルタとして使う

import com.mosesSupposes.fuse.FuseFMP;

/*
このサンプルについて

FuseFMPは、ZigoEngineやfuseなしで、スタンドアローンのユーティリティとしても使う事ができます。

FuseFMPのクラス(static)メソッドを使うのに、その他のセットアップは必要ありません。
*/

FuseFMP.writeFilter(this.box1_mc,'Blur',{blurX:10, blurY:0});
FuseFMP.setFilterProps(this.box1_mc, 'DropShadow', {distance:20, alpha:.5});

source

AS2 レンズフィルターのように画像を拡大して移動する

/*
このスクリプトはattachされるインスタンスに書く
これ以外に ID: ins_Lenzの90pxの正円で写真(pic)をマスクしたリンケージシンボルを作成
*/

num = 15;
zr = 10;
vx = 5;
vy = 3;
ballD = 150;
boundary = [20, 20, 620, 360];
R = ballD/2;
boundary[0] += R;
boundary[1] += R;
boundary[2] -= R;
boundary[3] -= R;
scaleA = [];
scaleB = [];

// 内側に行くほど拡大した写真をマスクしている
for (i=1; i<=num; i++) {
scaleA[i] = 10+90*(num+1-i)/num;
scaleB[i] = 100+zr*i;
this.attachMovie("ins_Lenz", "lenz_"+i, i);
this["lenz_"+i]._xscale = this["lenz_"+i]._yscale=scaleA[i];
this["lenz_"+i].pic._xscale = this["lenz_"+i].pic._yscale=100*scaleB[i]/scaleA[i];
}
//
function f_ballMove() {
this._x+vx;
if (this._x+vx>boundary[2]) {
this._x = boundary[2];
vx *= -1;
} else if (this._x+vx<boundary[0]) {
this._x = boundary[0];
vx *= -1;
} else {
this._x += vx;
}
if (this._y+vy>boundary[3]) {
this._y = boundary[3];
vy *= -1;
} else if (this._y+vy<boundary[1]) {
this._y = boundary[1];
vy *= -1;
} else {
this._y += vy;
}
for (i=1; i<=num; i++) {
this["lenz_"+i].pic._y = -1*scaleB[i]/scaleA[i]*this._y;
this["lenz_"+i].pic._x = -1*scaleB[i]/scaleA[i]*this._x;
}
}
f_ballMove();

source

Filter Expression for a DataTable

//This was the hard way.
public static Lookup.StatusDataTable GetStatuses(bool intranetMode)
{
//TODO: Handle Intranet vs Internet mode.
LookupTableAdapters.StatusTableAdapter sta = new LookupTableAdapters.StatusTableAdapter();
Lookup.StatusDataTable sdt = sta.GetStatusData();
DataRow[] rows = sdt.Select("Status <> 'Unapproved' and Status <> 'Closed'");
Lookup.StatusDataTable retVal = new Lookup.StatusDataTable();
foreach(DataRow dr in rows)
{
retVal.Rows.Add(dr.ItemArray);
}
return retVal;
}

//Here's the easy way:
public static Lookup.StatusDataTable GetStatuses(bool intranetMode)
{
LookupTableAdapters.StatusTableAdapter sta = new LookupTableAdapters.StatusTableAdapter();
Lookup.StatusDataTable sdt = sta.GetStatusData();
if (!intranetMode)
{
sdt.DefaultView.RowFilter = "Status <> 'Unapproved' and Status <> 'Closed'";
}
return sdt;
}

source

apply glow filter

import flash.filters.GradientGlowFilter;

var gradientGlow:GradientGlowFilter = new GradientGlowFilter(0, 45, [2359295,0], [0, 1], [0, 123], 40, 40, 1, 1, "outer");
orb1.orb.filters=[gradientGlow];
/*FuseFMP.setFilterProps(orb1.orb, 'GradientGlow', {
GradientGlow_type:"outer",
GradientGlow_knockout:false,
GradientGlow_strength:1,
GradientGlow_quality:1,
GradientGlow_blur:20,
GradientGlow_ratios:"0,123",
GradientGlow_alphas:"0,1",
GradientGlow_colors:"2359295,0",
GradientGlow_angle:45,
GradientGlow_knockout:true,
GradientGlow_distance:0});*/
//FuseFMP.traceAllFilters()

/*trace("GradientGlow_type:"+FuseFMP.getFilterProp(orb1.orb,"GradientGlow_type" ));
trace( "GradientGlow_knockout:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_knockout"));
trace("GradientGlow_strength:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_strength"));
trace("GradientGlow_quality:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_quality"));
trace("GradientGlow_blur:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_blur"));
trace("GradientGlow_ratios:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_ratios"));
trace("GradientGlow_alphas:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_alphas"));
trace("GradientGlow_colors:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_colors"));
trace("GradientGlow_angle:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_angle"));
trace( "GradientGlow_distance:"+FuseFMP.getFilterProp(orb1.orb, "GradientGlow_distance"));*/

source

Exclude some directories from grep

find . -name "*.html" ( -name 'dirFoo' -prune -o  -name 'dirBar' -prune ) | xargs grep -n "THE_PATH_YOU_ARE_LOOKING_FOR"

source

Tail requests for HTML files

tail -f access.log|grep -P "GET[^"]*.html"

source

filterXMLAssocArray

// Filters specified tags from a supplied XML Node resource by tag name.
// Returns a new associative array with the filtered tags' attributes.
private function filterXMLAssocArray(filterNodeName:String, xmlNodes:Array):Array{

var tmpArray:Array = new Array();

var indexCounter:Number = 0;
for (var i:Number = 0; i<xmlNodes.length; i++){
if (xmlNodes[i].nodeName == filterNodeName){
tmpArray[indexCounter] = new Array();
tmpArray[indexCounter] = xmlNodes[i].attributes;
indexCounter ++;
}
}
return tmpArray;
};

source