- 1
- 2
- 3
- 4
- 5
try{
characterParser.parse(_daeXML);
}catch(e:ScriptTimeoutError){
characterParser.parse(_daeXML);
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−111
try{
characterParser.parse(_daeXML);
}catch(e:ScriptTimeoutError){
characterParser.parse(_daeXML);
}
чувак решил проблему пятнадцати секунд
−122
var mapDress:BitmapData = MathUtils.getTransformationMapTShort(bottomMovie.width, bottomMovie.height, pointFilterTopLeft, pointFilterBezierLeft, point1, pointFilterLimitLeft, pointFilterTopRight, pointFilterBezierRight, point2, pointFilterLimitRight, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);
"752 см позитива!"
−122
this.cutUnderLineAndG((this.getChildAt(bottomIndex.layer) as MovieClip).getChildAt(bottomIndex.child) as MovieClip, point1, point2, pointG, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_right, this.clothes[bottomIndex.layer][bottomIndex.child].colored_set[this.clothes[bottomIndex.layer][bottomIndex.child].currentColorVariant].variants[this.clothes[bottomIndex.layer][bottomIndex.child].currentWearVariant][this.currentView].arm_points_left);
Нет слов...
−117
private function dateLabel(item:Object, column:AdvancedDataGridColumn):String
{
var df:DateFormatter = new DateFormatter();
df.formatString = "DD.MM.YYYY JJ:SS"
return df.format(item[column.dataField]);
}
перепутал минуты с секундами, тестер долго понять не мог, на сколько часы на сервере спешат )
−92
var num = 100000;
function setArray(num){
var arr = new Array();
var i:Number = 0;
for (i=0;i<num;i++){
arr[i] = 'ytrjnjht pyfxtybt';
}
}// 422
function setArray2(num){
for (i=0;i<num;i++){
arr[i] = 'ytrjnjht pyfxtybt';
}
}//562
function setArray3(num){
for (var i=0;i<num;i++){
arr[i] = 'ytrjnjht pyfxtybt';
}
}//344
function setArray4(num){
var arr:Array = new Array();
var i:Number = 0;
for (i=0;i<num;i++){
arr.push('ytrjnjht pyfxtybt');
}
}//516
function setArray5(num){
var arr:Array = new Array();
for (var i=0;i<num;i++){
arr.push('ytrjnjht pyfxtybt');
}
}//531
function setArray6(num){
for (var i=0;i<num;i++){
arr.push('ytrjnjht pyfxtybt');
}
}//188
function setArray7(num){
arr = null;
for (var i=0;i<num;i++){
arr.push('ytrjnjht pyfxtybt');
}
}//141
Любопытный тест производительности.
−112
public class BaseEntity extends Entity
{
public function BaseEntity()
{
name = 'inctanse' + _ii++ + '-' + name ? name : '';
super();
}
...
}
лулзы продолжаются )
−117
var regs:Vector.<DisplayObject> = new Vector.<DisplayObject>();
var i:uint=0;
while(map["reg"+i])
{
regs.push(map["reg"+i]);
i++;
}
trace("<xml>")
for(i=0;i<regs.length;i++)
{
trace('<reg id="'+i+'">');
trace("<name>"+getQualifiedClassName(regs[i])+"</name>");
trace("<url></url>");
trace('</reg>');
}
trace("</xml>")
мои (промежуточные) извращения на тему карты россии с кликабельными регионами и данными в xml.
−122
public static function hide (target:MovieClip, time:Number = .1, finshCallBack:Function = null, time2:Number = 0):void
{
if (!target) return;
cansel(target);
var fun:Function = function (event:Event = null):void
{
var tw:Tween = new Tween(target, 'alpha', null, target.alpha, 0, time, true);
tw.addEventListener(TweenEvent.MOTION_FINISH, hideEnd);
if (finshCallBack != null) tw.addEventListener(TweenEvent.MOTION_FINISH, finshCallBack);
if (target['tw']) target['tw'].stop();
target['tw'] = tw;
target['is_hide'] = true;
if (target.hasOwnProperty('is_over')) target['is_over'] = false;
}
if (time2 == 0)
{
fun();
}
else
{
var timer:MyTimer = new MyTimer(time2 * 1000, 1);
target['timer'] = timer;
timer.addEventListener(TimerEvent.TIMER_COMPLETE, fun);
timer.start();
}
}
Вот такой недотвин)
−362
// Если FlowerItem, то ложим продукт в подарки, иначе ложим на склад
Блядь, ну ведь не ложим, а кладем!
−114
function cleanFrame() {
removeChild(MaskedScienseClip);{
trace("MaskedScienseClip added");}
removeChild(MaskedScienseShape);{
trace("MaskedScienseShape removed");}
removeChild(blink1);{
trace("blink1 removed");}
removeChild(btn_sciense);{
trace("btn_sciense removed");}
removeChild(MaskedComputersClip);{
trace("MaskedComputersClip removed");}
removeChild(MaskedComputersShape);{
trace("MaskedComputersShape removed");}
removeChild(blink2);{
trace("blink2 removed");}
removeChild(btn_computers);{
trace("btn_computers removed");}
removeChild(MaskedHumansClip);{
trace("MaskedHumansClip removed");}
removeChild(MaskedHumansShape);{
trace("MaskedHumansShape removed");}
removeChild(blink3);{
trace("blink3 removed");}
removeChild(btn_humans);{
trace("btn_humans removed");}
removeChild(MaskedAnimalsClip);{
trace("MaskedAnimalsClip removed");}
removeChild(MaskedAnimalsShape);{
trace("MaskedAnimalsShape removed");}
removeChild(blink4);{
trace("blink4 removed");}
removeChild(btn_animals);{
trace("btn_animals removed");}
removeChild(MaskedNatureClip);{
trace("MaskedNatureClip removed");}
removeChild(MaskedNatureShape);{
trace("MaskedNatureShape removed");}
removeChild(blink5);{
trace("blink5 removed");}
removeChild(btn_nature);{
trace("btn_nature removed");}
removeChild(MaskedWorldClip);{
trace("MaskedWorldClip removed");}
removeChild(MaskedWorldShape);{
trace("MaskedWorldShape removed");}
removeChild(blink6);{
trace("blink6 removed");}
removeChild(btn_world);{
trace("btn_world removed");}
removeChild(MaskedEnterClip);{
trace("MaskedEnterClip removed");}
removeChild(MaskedEnterShape);{
trace("MaskedEnterShape removed");}
removeChild(blink7);{
trace("blink7 removed");}
removeChild(btn_enter);{
trace("btn_enter removed");}
removeChild(MaskedSportClip);{
trace("MaskedSportClip removed");}
removeChild(MaskedSportShape);{
trace("MaskedSportShape removed");}
removeChild(blink8);{
trace("blink8 removed");}
removeChild(btn_sport);{
trace("btn_sport removed");}
removeChild(MaskedTransportClip);{
trace("MaskedTransportClip removed");}
removeChild(MaskedTransportShape);{
trace("MaskedTransportShape removed");}
removeChild(blink9);{
trace("blink9 removed");}
removeChild(btn_transport);{
trace("btn_transport removed");}
removeChild(categorySTXT);{
trace("categorySTXT removed");}
removeChild(scienseTXT);{
trace("scienseTXT removed");}
removeChild(computersTXT);{
trace("computersTXT removed");}
removeChild(humansTXT);{
trace("humansTXT removed");}
removeChild(animalsTXT);{
trace("animalsTXT removed");}
removeChild(natureTXT);{
trace("natureTXT removed");}
removeChild(worldTXT);{
trace("worldTXT removed");}
removeChild(enterTXT);{
trace("enterTXT removed");}
removeChild(sportTXT);{
trace("sportTXT removed");}
removeChild(transportTXT);{
trace("transportTXT removed");}
removeChild(logo_small);{
trace("logo_small removed");}
}
Ледящая душу красота.