码迷,mamicode.com
首页 >  
搜索关键字:class    ( 183544个结果
Leetcode Add and Search Word - Data structure design
public class WordDictionary { // Adds a word into the data structure. private Node root;public WordDictionary(){root = new Node('/');}static class Node{public Character val;public List children;public...
分类:其他好文   时间:2015-05-16 14:54:18    阅读次数:272
经典的图片上传并绘制缩略图的类的代码
首先我们有3个文件 1个文件夹images文件夹是默认存储图片地址index.php是主页面fileupload.class.php是图片上传类ResizeImage.class.php是图片缩略图类fileupload.class.php代码如下:setOption($key, $val); .....
分类:Web程序   时间:2015-05-16 14:51:35    阅读次数:147
[LeetCode] Reverse Linked List(递归与非递归反转链表)
Reverse a singly linked list.解题思路对于非递归实现,思路是依次将从第二个结点到最后一个结点的后继设为头结点,然后将该节点设为头结点(需记住将原头结点的后继设为空)。 对于递归实现,首先反转从第二个结点到最后一个结点的链表,然后再将头结点放到已反转链表的最后,函数返回新链表的头结点。递归实现代码1//Runtime:10 ms class Solution { publ...
分类:其他好文   时间:2015-05-16 14:51:32    阅读次数:147
HashMap,HashTable,HashSet
1,HashMap ????(1)public class HashMap extends AbstractMap implements?Map{} ????(2)key允许且只有一个可以为null,value 可以有多个null ????(3)非线程安全,但是可以通过 Collection.s...
分类:其他好文   时间:2015-05-16 13:30:02    阅读次数:97
第十一周 阅读程序-继承和派生1
#include using namespace std; class Data { public: Data(int i):x(i) { cout<<"A"; } ~Data() { cout<<"B"; } private: int x; }; class Base { public: Base(...
分类:其他好文   时间:2015-05-16 13:28:37    阅读次数:192
[Unity实战]一个简单的任务系统(一)
对于任务系统来说,最重要的就是处理脚本之间的消息传递,所以任务系统的核心必定就是事件委托了。这里给出核心代码: using UnityEngine; using System.Collections; public class TaskCondition { public string id;//条件id public int nowAmount;//条件id的当前进度 ...
分类:编程语言   时间:2015-05-16 13:28:01    阅读次数:615
第11周 阅读程序-继承和派生2
#include using namespace std; class G { public: static int m; G( ) //构造函数 { m++; cout<<"G begins\n"; } ~G( ) { cout<<"G ends\n"; m--; } }; ...
分类:其他好文   时间:2015-05-16 13:27:54    阅读次数:126
第11周 程序阅读-继承和派生3
#include using namespace std; class A { private: int x; protected: int y; public: int z; A(int a,int b,int c) { x=a; y=b; z=c; } int Getx() {...
分类:其他好文   时间:2015-05-16 13:26:37    阅读次数:151
新闻信息的javaBean
//新闻信息的javaBeanpublic class News { //新闻属性 private int id; //id private int categoryId ;//新闻类别id private String title;//新闻标题 private String summary;/.....
分类:编程语言   时间:2015-05-16 13:18:24    阅读次数:189
User implements HttpSessionBindingListener
public class User implements HttpSessionBindingListener { private int id; private String userName; private String password; private String...
分类:Web程序   时间:2015-05-16 13:12:12    阅读次数:99
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!