This file contains hidden or 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
var MyApp = angular.module('MyApp'); | |
MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
var msgBus = {}; | |
msgBus.emitMsg = function(msg, data) { | |
data = data || {}; | |
$rootScope.$emit(msg, data); | |
}; | |
msgBus.onMsg = function(msg, func, scope) { | |
var unbind = $rootScope.$on(msg, func); | |
if (scope) { |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" | |
applicationComplete="init(event)" xmlns:base="com.ultrapower.tomas.screen.base.*"> | |
<fx:Script> | |
<![CDATA[ | |
import com.ultrapower.tomas.screen.view.ResourceComp; | |
import flash.utils.getQualifiedClassName; |
This file contains hidden or 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
# coding=utf-8 | |
# 功能:删除某个文件夹下面所有的cvs文件夹 | |
import os,shutil | |
# 删除某个项目里面所有为CVS的文件夹 | |
def del_dirs(path): | |
for parent,dirnames,filenames in os.walk(path): | |
for dirname in dirnames: | |
if dirname == 'CVS': | |
p = os.path.join(parent,dirname) |
This file contains hidden or 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
# coding=utf-8 | |
# 功能:替换文件夹下面文件里面的某个字符 | |
# 这次是把specialtopic下面所有的代码中删除掉cmonitor.字样 | |
import os,re | |
# 获得所有的代码文件绝对路径列表 | |
def get_allfiles(path): | |
allfiles = [] | |
for parent,dirnames,filenames in os.walk(path): | |
for filename in filenames: |
This file contains hidden or 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
# -*- coding:utf-8 -*- | |
import sys | |
import string | |
#查看python版本 | |
# print sys.version | |
#列出string模块所有方法和变量 | |
# print dir(string) |
This file contains hidden or 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
常用数学公式 |
This file contains hidden or 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 | |
{ | |
import flash.display.Sprite; | |
import flashx.textLayout.container.ContainerController; | |
import flashx.textLayout.conversion.TextConverter; | |
import flashx.textLayout.elements.TextFlow; | |
import flashx.textLayout.formats.BlockProgression; | |
import flashx.textLayout.formats.TextLayoutFormat; | |
This file contains hidden or 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
Flex Tip | |
1、查看编译成as的编译器参数 | |
-keep-generated-actionscript=true |
This file contains hidden or 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
======================================================= | |
================== sublime text tip =================== | |
==================== liekkas.zeng ===================== | |
======================================================= | |
1、列选择 | |
* 按住鼠标滚轮移动,进入列选择模式,或者鼠标右键+Shift进入 | |
* 放开鼠标后,用方向键进行逐个移动 | |
* Ctrl+方向键进行逐字移动,这个真心强大,文本不对齐的时候也能同时操作 |
This file contains hidden or 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.ultrapower.tomas.special.utils | |
{ | |
import mx.formatters.DateFormatter; | |
/*************************************************************\ | |
* 相关日期工具类 | |
* | |
* @author liekkas.zeng | |
* @since 2012.03.31 | |
\*************************************************************/ |
NewerOlder