This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
struct A | |
{ | |
int a; | |
}varA,*p; | |
p = &varA; | |
p->a = 13; | |
printf("%d,%d,%d",p->a,(*p).a,varA.a); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
int i = 0, a[10] = {1,21,54,5848,46,4,15,415,4,45}; | |
int *pa = a+3; | |
sort(pa, 6); | |
for (;i < 6; i += 1) | |
{ | |
printf("%d%s", pa[i], ","); | |
} | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2013 Ray Yee. All rights reserved. | |
* | |
* @author Ray Yee | |
* Created 2013-2-16 下午3:37:51 | |
**/ | |
package eg | |
{ | |
import flash.utils.Dictionary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rayyee.reflect | |
{ | |
import flash.display.DisplayObject; | |
import flash.display.DisplayObjectContainer; | |
import flash.display.MovieClip; | |
import flash.utils.describeType; | |
import flash.utils.getDefinitionByName; | |
import flash.utils.getQualifiedClassName; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
{ | |
import com.adobe.utils.AGALMiniAssembler; | |
import flash.display3D.*; | |
import flash.geom.*; | |
import starling.core.RenderSupport; | |
import starling.core.Starling; | |
import starling.display.DisplayObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 从未知编码的二进制流中读取文本 | |
* @param ba | |
* @param len 读取长度,默认为-1,则读取至文件尾 | |
* @return | |
*/ | |
public static function readString(ba:ByteArray,len:int = -1):String | |
{ | |
if ((len != -1 && len > ba.bytesAvailable) || (len == -1)) len = ba.bytesAvailable; | |
var encode:String = 'gb2312'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//给数组原型增加一个获取随机数组元素的方法:randomItem | |
Array.prototype.getRandomItem = function(): * | |
{ | |
return this[Math.floor(Math.random() * this.length)]; | |
}; | |
//这里设置这个方法不可被(for...in、foreach...in)枚举,非常重要! | |
Array.prototype.setPropertyIsEnumerable('getRandomItem', false); | |
var arr:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User: Ray Yee | |
* Date: 14-3-6 | |
* All rights reserved. | |
*/ | |
package | |
{ | |
import flash.filters.ColorMatrixFilter; | |
public class ColorMatrixUtility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"selector": "source.jsfl", | |
"cmd": ["Flash" ,"$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2013 Amos Laber | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
OlderNewer