2017年6月13日

指针的好处

摘要: //struct parameter p; // p.fd=555; // p.hit=666 struct parameter*pptr=malloc(sizeof(struct parameter)); 阅读全文

posted @ 2017-06-13 23:15 freshman2014 阅读(503) 评论(0) 推荐(0) 编辑

c 结构体中存在指针,指针的不同赋值方法

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>struct parameter{ char *fd; int hit;};int main() { struct parameter*pptr = (struct parameter*)mal 阅读全文

posted @ 2017-06-13 22:59 freshman2014 阅读(2120) 评论(0) 推荐(0) 编辑

2017年4月24日

c++ std::find函数

摘要: template <class InputIterator, class T>InputIterator find (InputIterator first,InputIterator last,​ const T& val); first,last 分别指向一个序列中初始及末尾位置的输入迭代器。这 阅读全文

posted @ 2017-04-24 22:16 freshman2014 阅读(2084) 评论(0) 推荐(0) 编辑

istringstream 用法

摘要: istringstream 类用于执行C++风格的串流的输入操作 istringstream用空格作为字符串分隔符 #include <iostream>#include <sstream>#include <string>using namespace std;void test(){ { //i 阅读全文

posted @ 2017-04-24 22:11 freshman2014 阅读(4106) 评论(0) 推荐(0) 编辑

2017年4月16日

毕业论文总结

该文被密码保护。 阅读全文

posted @ 2017-04-16 20:59 freshman2014 阅读(5) 评论(0) 推荐(0) 编辑

2016年8月13日

java PreparedStatement和statement的区别

摘要: 1、 PreparedStatement接口继承Statement, PreparedStatement 实例包含已编译的 SQL 语句,所以其执行速度要快于 Statement 对象。2、作为 Statement 的子类,PreparedStatement 继承了 Statement 的所有功能。 阅读全文

posted @ 2016-08-13 16:37 freshman2014 阅读(219) 评论(0) 推荐(0) 编辑

HashMap的工作原理

摘要: 前言 首先再次强调hashcode (==)和equals的真正含义(我记得以前有人会说,equals是判断对象内容,hashcode是判断是否相等之类): equals:是否同一个对象实例。注意,是“实例”。比如String s = new String("test"); s.equals(s), 阅读全文

posted @ 2016-08-13 10:35 freshman2014 阅读(162) 评论(0) 推荐(0) 编辑

2016年8月4日

java中的锁

摘要: 1.自旋锁是采用让当前线程不停地的在循环体内执行实现的,当循环的条件被其他线程改变时 才能进入临界区 public class SpinLock { private AtomicReference<Thread> owner =new AtomicReference<>(); public void 阅读全文

posted @ 2016-08-04 21:25 freshman2014 阅读(142) 评论(0) 推荐(0) 编辑

String,StringBuffer与StringBuilder的区别?

摘要: String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全) 简要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等 阅读全文

posted @ 2016-08-04 20:07 freshman2014 阅读(120) 评论(0) 推荐(0) 编辑

2016年3月9日

关于计算机网络的问题

该文被密码保护。 阅读全文

posted @ 2016-03-09 20:45 freshman2014 阅读(1) 评论(0) 推荐(0) 编辑

导航