上一页 1 ··· 227 228 229 230 231 232 233 234 235 ··· 329 下一页
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace if语句 { class Program { static void Main(string[] args) { //如果张三的考试成绩大于90,那么爸爸奖励他100块钱。 Console.WriteLine("请输入张三的成绩"); int cj = Convert.ToInt32(Console.ReadLine()); if (cj > 90) { / Console.Wri 阅读全文
posted @ 2013-06-19 20:19 jlins 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 最近在看Spring的时候回顾了一下ThreadLocal,下面是ThreadLocal的使用说明。概述首先,谈到ThreadLocal的使用,我们先来了解一下ThreadLocal是什么?ThreadLocal是在JDK1,2的版本中开始提供的,他不是一个线程,而是一个线程的本地化对象。当某个变量在使用ThreadLocal进行维护时,ThreadLocal为使用该变量的每个线程分配了一个独立的变量副本,每个线程可以自行操作自己对应的变量副本,而不会影响其他线程的变量副本。 从线程的角度看,每个线程都保持一个对其线程局部变量副本的隐式引用,只要线程是活动的并且 ThreadLocal... 阅读全文
posted @ 2013-06-19 20:17 jlins 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1. 静态函数库 这类库的名字一般是libxxx.a;利用静态函数库编译成的文件比较大,因为整个 函数库的所有数据都会被整合进目标代码中,他的优点就显而易见了,即编译后的执行程序不需要外部的函数库支持,因为所有使用的函数都已经被编译进去了。当然这也会成为他的缺点,因为如果静态函数库改变了,那么你的程序必须重新编译。2. 动态函数库 这类库的名字一般是libxxx.so;相对于静态函数库,动态函数库在编译的时候 并没有被编译进目标代码中,你的程序执行到相关函数时才调用该函数库里的相应函数,因此动态函数库所产生的可执行文件比较小。由于函数库没有被整合进你的程序,而是程序运行时动态的申请并调用,所. 阅读全文
posted @ 2013-06-19 20:16 jlins 阅读(3922) 评论(0) 推荐(0) 编辑
摘要: 1.二进制数中1的个数①有一个字节(8bit)变量,求其二进制表示中"1"的个数。思路一:二进制数的最低位如果为1,那么它不可以被2整除,反之可以。我们可以先判断最后一位是否为1,然后右移一位,重复判断最后一位是否为1,直至该数为0;这个算法时间复杂度为O(N),其中N是这个二进制数的位数;思路二:对于一个二进制数X,运算X&(X-1)可以将最后二进制表示中的最后一位1置为0,重复该操作直至该数为0;这个算法时间复杂度为O(M),其中M为二进制表示中1的个数;代码:int Count(int v){ int num = 0; while(v)[ num += v & 阅读全文
posted @ 2013-06-19 20:14 jlins 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 命名空间表aopProvides elements for declaring aspects and for automatically proxying @AspectJannotated classes as Spring aspects.beansThe core primitive Spring namespace, enabling declaration of beans and how they should be wired. context Comes with elements for configuring the Spring application cont... 阅读全文
posted @ 2013-06-19 20:12 jlins 阅读(209) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace 练习 { class Program { static void Main(string[] args) { //第一题 打印100次——“欢迎来到CSDN DOT班学习!” int i=0; while(i<100) { Console.WriteLine("欢迎来到CSDN DOT班学习!"); i++; } //第二题 计算1到100这100个整数的和 1+2+3+4+100 阅读全文
posted @ 2013-06-19 20:10 jlins 阅读(1089) 评论(0) 推荐(0) 编辑
摘要: 上会写的Flexigrid折行显示时,获取值有问题,报错。getRows: function(){ //add by jej var rtnList = new Array(); var objRows = $('.trSelected', $(t)); if(objRows!=null){ for(var i=0;i<objRows.length;i++){ var row = objRows[i]; var rowMap = new Object(); for(var j=0;j<row.cells.length;j++)... 阅读全文
posted @ 2013-06-19 20:08 jlins 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 原创文章,转载请注明出处:http://blog.csdn.net/zhy_cheng/article/details/9128819XML是一种非常重要的文件格式,由于C++对XML的支持非常完善,cocos2d-x选择XML作为主要的文件存储格式。在cocos2d-x中集成了libxml2来解析XML数据。定义一个用于解析的类,这个类继承CCSAXDelegator和CCObject,然后实现CCSAXDelegator的纯虚函数。#ifndef XMLANALYSIS_H_H#define XMLANALYSIS_H_H#include "cocos2d.h"#inc 阅读全文
posted @ 2013-06-19 20:06 jlins 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 【1、】CPngButton.h(资源是最后图片)#pragma once #include<atlimage.h> #define PNUM 19 #define PLAYTIME 100 // CPngButton class CPngButton : public CButton { DECLARE_DYNAMIC(CPngButton) public: CPngButton(); virtual ~CPngButton(); virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual void P... 阅读全文
posted @ 2013-06-19 20:04 jlins 阅读(2226) 评论(0) 推荐(0) 编辑
摘要: 本系统使用的是基于JSP+SERVLET+TOMCAT6数据库使用的是MYSQLIDE是MYECLIPSE8.5,页面编辑使用的是百度的ueditor,比较适合咱国人采用MVC模式,使用的关键技术,通用的分页技术,一些项目开发的小技巧,如批量删除,,,本文章适合刚学习JSP+SERVLET,但没有实战经验的童鞋。欢迎交流学习。1,第一个模块是登陆处理。关键代码如下: <form action="${pageContext.request.contextPath }/user?method=login" onsubmit="return submitCheck 阅读全文
posted @ 2013-06-19 20:03 jlins 阅读(1258) 评论(0) 推荐(0) 编辑
上一页 1 ··· 227 228 229 230 231 232 233 234 235 ··· 329 下一页