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
//For github issue 131 | |
@Test | |
public void test_fastInsert_rollback() { | |
dao.create(Pet.class, true); | |
final List<Pet> pets = new ArrayList<Pet>(); | |
for (int i = 0; i < 100; i++) { | |
Pet u = new Pet(); | |
u.setName("XXXX" + i); | |
pets.add(u); | |
} |
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
public static void main(String[] args) { | |
List list = (List) Proxy.newProxyInstance(List.class.getClassLoader(), | |
new Class[] { List.class }, | |
new InvocationHandler() { | |
public Object invoke(Object obj, Method method, Object[] args) | |
throws Throwable { | |
if ("size".equals(method.getName())) | |
return (int)(Math.random() * 1000); | |
return null; |
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.danoo.strato.ui.module.dev; | |
import java.io.IOException; | |
import java.util.Properties; | |
import lombok.Setter; | |
import org.apache.log4j.PropertyConfigurator; | |
import org.nutz.aop.interceptor.LoggingMethodInterceptor; | |
import org.nutz.ioc.Ioc; |
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
import java.io.File; | |
import javax.servlet.ServletContextEvent; | |
import javax.servlet.ServletContextListener; | |
public class XServletContextListener implements ServletContextListener { | |
public static String ROOT; | |
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
public Object list(@Param("page") int page, @Param("rows") int rows, @Param("..") Action obj) { | |
if (rows < 1) | |
rows = 10; | |
if (page < 1) { | |
page = 1; | |
} | |
// build SQL Where | |
XsqlBuilder builder = new XsqlBuilder(); | |
Map<String, Object> filters = new HashMap<String, Object>(); |
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 org.nutz.lang.util; | |
import java.io.BufferedInputStream; | |
import java.io.DataInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.HashMap; |
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 org.nutz.dao.impl; | |
import java.io.PrintWriter; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import javax.sql.DataSource; | |
import org.nutz.dao.Dao; | |
import org.nutz.lang.Lang; |
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 aop; | |
import org.nutz.aop.ClassAgent; | |
import org.nutz.aop.ClassDefiner; | |
import org.nutz.aop.DefaultClassDefiner; | |
import org.nutz.aop.InterceptorChain; | |
import org.nutz.aop.MethodInterceptor; | |
import org.nutz.aop.asm.AsmClassAgent; | |
import org.nutz.aop.matcher.MethodMatcherFactory; | |
public class UserAction { |
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
cmake_minimum_required (VERSION 2.6) | |
include_directories(${CMAKE_SOURCE_DIR}) | |
project(newlisp) | |
set(NEWLISP_SRC newlisp newlisp.c nl-symbol.c nl-math.c nl-list.c nl-liststr.c | |
nl-string.c nl-filesys.c nl-sock.c nl-import.c nl-xml.c nl-web.c nl-matrix.c | |
nl-debug.c pcre.c) | |
add_executable(newlisp ${NEWLISP_SRC}) | |
#add_library(newlisp SHARED ${NEWLISP_SRC}) |
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
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
server { | |
listen 80; | |
server_name nutz.cn *.nutz.cn; |
OlderNewer