Skip to content

Instantly share code, notes, and snippets.

View tangyumeng's full-sized avatar

tangyumeng tangyumeng

View GitHub Profile
@tangyumeng
tangyumeng / gist:7334149
Last active December 27, 2015 13:29
网络封装
@interface ProjectsRequest : AFHTTPClient
+ (ProjectsRequest *)sharedProjectsRequest;
@end
@implementation ProjectsRequest
+ (ProjectsRequest *)sharedProjectsRequest
{
static ProjectsRequest *_sharedADLoginRequest = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
@tangyumeng
tangyumeng / TimerTask
Created December 1, 2013 08:27
TimerTask的使用方法
import java.util.Timer;
class MyTimerTask1 extends java.util.TimerTask {
@Override
public void run() {
// TODO Auto-generated method stub
System.out.println("start");
}
}
@tangyumeng
tangyumeng / rect
Created December 1, 2013 14:15
CGRect 的初始化方法
self.imageView.frame = (CGRect){ .origin = CGPointZero,
.size = self.photo.size };
- (IBAction)btnClick:(id)sender {
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 ];
rotationAnimation.duration = 1.0;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = 1;//HUGE_VALF;
[self.pic_fresh.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
@tangyumeng
tangyumeng / iOS7 适配
Created December 3, 2013 04:28
iOS7 适配相关的知识收集
http://www.cnblogs.com/zcw-ios/articles/3340197.html
index.jsp
-----------------
<html>
<body>
<form action="main.jsp" method="GET">
First Name: <input type="text" name="first_name"> <br /> Last
Name: <input type="text" name="last_name" /> <input type="submit"
value="Submit" />
</form>
@tangyumeng
tangyumeng / 自动刷新
Created January 2, 2014 06:03
自动刷新的使用
<%@ page import="java.io.*,java.util.*" %>
<html>
<head>
<title>Auto Refresh Header Example</title>
</head>
<body>
<center>
<h2>Auto Refresh Header Example</h2>
<%
// Set refresh, autoload time as 5 seconds
@tangyumeng
tangyumeng / gist:8215610
Created January 2, 2014 06:04
application 的使用
<%@ page import="java.io.*,java.util.*" %>
<html>
<head>
<title>Applcation object in JSP</title>
</head>
<body>
<%
Integer hitsCount =
(Integer)application.getAttribute("hitCounter");
@tangyumeng
tangyumeng / jsp 数据库
Created January 2, 2014 06:37
jsp 数据库
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<html>
<head>
<title>SELECT Operation</title>
</head>
<body>
@tangyumeng
tangyumeng / jsp 数据库
Created January 2, 2014 06:37
jsp 数据库
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<html>
<head>
<title>SELECT Operation</title>
</head>
<body>