摘要: java_side 这个插件,运行时需要分辨rails应用是否激活了一些功能,常用的方法是判断参数值,比如:if config.spring require 'java_side/spring' p 'spring supported'endSymptoms of Mycoplasmapneumonia但是,这么做有问题——用户很容易就忘记设置config里面的spring参数,结果这个读取属性的方法不存在.../railties-3.0.6/lib/rails/railtie/configuration.rb:77:in `method_missing' 阅读全文
posted @ 2011-06-08 14:21 ctou45 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: 1、获取屏幕尺寸:Display display = getWindowManager().getDefaultDisplay();int width = display.getWidth();int height = display.getHeight();TCSTAR7034DisplayMetrics dm = new DisplayMetrics(); dm = getResources().getDisplayMetrics(); int screenWidth = dm.widthPixels; int screenHeight = dm.heightPixels; float d 阅读全文
posted @ 2011-06-08 09:40 ctou45 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 有些情况下 Flex自带的使弹出窗口居中的方法并不能满足我们的要求,例如Flex应用有多个层次时所以我们有时必须手动设置弹出窗口的位置:TCSTAR7034PopUpManager.addPopUp( window, this, true );PopUpManager.centerPopUp( window );// 下面两行是关键的,如果有多个几层弹出窗口的话使用上面的方法没法居中,必须手动设置窗口位置,// 当然这个只是居中于屏幕中间,如果你是想居中于上一级弹出窗口的中间的话,那就不能添加下面两行代码了window.x=Application.application.stage.stage 阅读全文
posted @ 2011-06-08 09:40 ctou45 阅读(336) 评论(0) 推荐(0) 编辑