分别有两列数据, A列作为数据源, B列中数据都来自于A列. 现在需要验证B列中的数据是否都能在A列中匹配到相同的数据.
http://liguoliang.com/pub/utils/StringMatcher/StringMatcher.html
var sourceArray:Array = strSource.split("\n"); // Get array from String;
/** * Convert array to Map, array value as the key, and the total nuber of the same value in the array as the value. */ private static function convertArrayToMap(array:Array):Object { var map:Object = new Object(); for each (var str:String in array) { var value:int = map[str] == null ? 0 : map[str]; if(value < 1) { map[str] = 1; // init count; }else { map[str] = value + 1; // Add one } } return map; }
Adobe AIR 最近一年升级火速, 去年1.5.3创建的Project使用高版本的SDK后会因为配置文件引发各类错误, 譬如:
Error1: Namespace 1.5.3 in the application descriptor file should be equal or higher than the minimum version 2.6.0 required by Flex SDK.
OK, 那替换1.5.3为2.6.0:
Process terminated without establishing connection to debugger.
invalid application descriptor: Unknown namespace: http://ns.adobe.com/air/application/2.6.0
Ok, 看来2.6.0只是个提示信息, 并不存在2.6.0这个命名空间, 于是参考新的Project, 修改为2.6;
继续尝试, 错误又来:
Error2: Process terminated without establishing connection to debugger.
invalid application descriptor: versionNumber must have a non-empty value.
Ok, 结构变化了, versionNumber 这个必须要有, 增加一下:
<versionNumber>0.0.0</versionNumber>
今天碰到一个诡异的问题:
新同事安装完毕FlashBuilder4,作为插件版安装完毕后,启动Eclipse,极为异常, 无法import已有project.
询问才知他使用的是Eclipse 3.7,如果没有记错, 应该是下一版本(4.6)才能支持Eclipse 3.7。
不过FlashBuilder 4.5 并未发布独立的插件版本,不知4.6会否发布插件版了,我还是比较喜欢作为插件版安装到Eclipse中。
When I try to install some plugins for my eclipse, there always some error like:
An error occurred while uninstalling
session context was:(profile=epp.package.java,
phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Uninstall,
operand=[R]org.apache.commons.lang 2.3.0.v200803061910 –>
[R]org.apache.commons.lang 2.3.0.v201005080501,
action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
Error while loading manipulator.
Error while loading manipulator.
At first, I think maybe it’s because my proxy set up. but after try my times, I think maybe because my eclipse has been changed.
So I download a pure eclipse, and I can install the plugins now.
Then I check the config file of Eclipse(eclipse.ini), it has been modifed, and just few paramerters like: xms, xmx…I think it’s just because the config. and here is a bug page:https://bugs.eclipse.org/bugs/show_bug.cgi?id=325757(some one think it’s a bug)
And my solution is:
Check your eclipse config file(eclipse.ini), make sure it’s correct, see: http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F
随着FlashBuilder4.5的发布, 用户组里堆满了关于移动开发的帖子, 关于AIR能否火起来, AIR性能的问题, 暂不考虑, 没有调查没用应用就没有发言权. 但如果本身应用是基于Flex的, 很多类库或UI都可以复用, 在这种情况下如果要做移动应用, 那选择AIR无疑能够节省大量时间.
基于浏览器的Flex应用根标签为Application;
基于AIR的桌面应用为WindowedApplication; Android应用则为ViewNavigatorApplication.
由于Android应用也是基于AIR的, 所以与Flex或桌面AIR开发并无很大差异, 不同的只是在View切换上.
1. 应用入口类型为: ViewNavigatorApplication
2. 具体页面的类型为:View;
1. 创建ViewNavigatorApplication
在ViewNavigatorApplication中有一个property为: private var _firstView:Class, 可定义应用启动后的默认View; 同时用一个navigator, 负责切换View.
2. 创建View: 使用View组件或继承spark.components.View类创建组件;
3. 切换View: 在View中使用navigator.popView();切换到前一页面, 或使用navigator.pushView(DetailsView, list.selectedItem);切换到下一页面, 并可在切换时传递data(navigator中有一个NavigationStack, 故名思意, Stack, pop/push, 先入后出)
4. 获得View切换时的数据: 在view中直接使用data即可获得.
>>点此浏览源代码(托管于Google Code)<<
svn checkout http://androidhelloworldinflex.googlecode.com/svn/trunk/ androidhelloworldinflex-read-only
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.