创新APP
zenius · 共 23 篇文章
[置顶] 程序员的乐趣
C/C++语言是有趣的,因为它是“计算机科学”发展的产物。 Python和Ruby是有趣的,因为它是“天才”的产物,尽管Ruby的作者是个日本人。 与之不同的是很多程序员认为Java是无趣的。 Java是软件工程发展的产物,当“编程”遇上“快速生产”和“工程”的时候,乐趣就开始退化了。Java通过理念、框架、规范、中间件等等等等,使得软件开发更加模式化和规范化,令软件行业向大规模工业化生产方式向前迈进了一大步。 Java本身是成功的,而陷于Java的程序员则多半难以成功。我们现在常常赞赏地说:XX技术XX框架让程序员更关注于业务逻辑。我们在享受他们所带来的便捷的同时,也正在慢慢丧失程序员的天…
2009-09-20 21:31 · 随笔 · 评论(3)
Parse-轻松构建移动APP的后台服务(2)
Parse支持的数据类型 目前Parse的table column支持NSString, NSNumber, NSDate, NSData, 或者另外一个PFObject。同时也可以使用NSDictionary and NSArray保存结构化的数据。其中NSArray 支持相对应的查询。虽然可以使用NSData保存二进制数据,但是推荐先使用PFFile保存文件,比如照片等,而在对应的column保存PFFile的引用。 常用的查询 类似SQL,查询时先创建PFQuery对象,然后设置查询条件。 先看个简单的,查询GameScore表中playName等于 “Dan Stemokoski”的…
2012-08-17 12:46 · mobile · 评论(0)
Parse-轻松构建移动APP的后台服务(1)
目前正在开发的产品告一段落,有时间总结下经验,也顺便分享一下我们主要使用的平台-Parse。 什么是Parse? Parse是一群美国人开发的专为移动APP服务的云计算平台,与现有的其他云计算平台相比,Parse除了提供Restful的service 之外,也提供了官方的iOS和Android SDK。个人认为高质量的client端SDK是Parse区分与其他云服务的核心优势。为什么呢?看完我的文章就知道了。 为什么要用Parse? 先想想开发一个简单的需要保存用户数据的APP,你需要做什么。非技术背景的人多半会认为只需要找个人做几个手机界面就行了。慢!身为程序员的我们会告诉这个不懂技术的朋…
2012-08-17 12:42 · mobile · 评论(1)
Useful ios link
Table view: http://www.cocoachina.com/bbs/read.php?tid=103145 动画效果: http://pro.ctlok.com/2010/03/iphone-uiview.html http://blog.csdn.net/xiaoguan2008/article/details/6291425 Cocos2d-x: http://www.cocoachina.com/gamedev/gameengine/2012/0428/4206.html UIView: http://www.cocoachina.com/newbie/basic/20…
2012-05-15 13:31 · mobile · 评论(0)
Spring AOP
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springfram…
2009-10-09 22:22 · Spring · 评论(0)
Maven configruation sample with codehaus and surefile
4.0.0 tools CodeGenerator 0.0.1-SNAPSHOT CodeGenerator <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${compileSource}</source> <target>${compileSource}</target> </configuration> </plugin> <plugin> <groupId>org.a…
2009-07-19 22:46 · Java · 评论(0)
Customized JSF Tags
<render-kit> <description>Some replacements for the standard renderers</description> <renderer> <description>Replacement renderer for h:outputLabel</description> <component-family>javax.faces.Output</component-family> <renderer-type>javax.faces.Label</renderer-type> <renderer-class>com.mycompany.ap…
2009-07-02 00:20 · JSF · 评论(0)
Exception Handle
import org.springframework.webflow.engine.RequestControlContext; import org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler; import org.springframework.webflow.execution.FlowExecutionException; import org.springframework.webflow.execution.RequestContext; publ…
2009-04-19 12:57 · 评论(0)
Velocity Sample
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you…
2009-04-15 00:37 · Java · 评论(0)
Dozer Sample
Configurable dozer converter: public class BalanceConverter implements ConfigurableCustomConverter { public Object convert(Object destinationFieldValue, Object sourceFieldValue, Class destinationClass, Class sourceClass, String param) { Balance[] source = (Balance[]) sourceFieldValue; //BigDecimal …
2009-04-14 01:07 · Java · 评论(0)
JSF Special Code
Logging phaselistener: public class RequestLoggingPhaseListener implements PhaseListener { private Log logger = LogFactory.getLog(RequestLoggingPhaseListener.class); public void afterPhase(PhaseEvent event) { // no-op } public void beforePhase(PhaseEvent event) { if (logger.isDebugEnabled()) { logg…
2009-03-17 00:12 · JSF · 评论(0)
javascript
Javascript menu function loadOptionTabsMenu() { var current = document.location.toString(); $('.options-tabs ul li a').each(function() { var url = $(this).attr('href'); if (current.indexOf(url) != -1) { alert(1); $(this).parent().addClass("current"); } else { $(this).parent().removeClass("current")…
2009-03-05 23:56 · javascript · 评论(0)
Maven
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.3</version> <configuration> <configLocation>checkstyle.xml</configLocation> </configuration> </plugin> </plugins> </reporting> Maven and ANT maven-file-plugin maven…
2009-03-04 22:58 · Java · 评论(1)
Spring Special Configuration
PropertyPlaceholderConfigurer <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>classpath:com/foo/jdbc.properties</value> </property> </bean> <bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataS…
2009-03-03 09:05 · Spring · 评论(0)
Spring Special Code
Set flow and menu item mapping public void setLocationMaps(MenuComponent[] menuComponents) { for (MenuComponent menuComponent: menuComponents) { if (null == this.locationMapping.get(menuComponent.getLocation()) || null != menuComponent.getParent()) { this.locationMapping.put(menuComponent.getLocati…
2009-03-03 09:04 · Spring · 评论(1)