摘要:经常被计算结构体的sizeof给搞晕,于是找了个时间,静下心来,搞定它。一、为什么结构体计算这么乱?答案是字节对齐,计算机存储系统中以Byte为单位存储数据,不同数据类型所占的空间不同,如:整型(int)数据占4个字节,字符型(char)数据占一个字 节,短整型(short)数据占两个字节,等...
分类:
其他 时间:
2015-03-22 12:18:08
收藏:
0 评论:
0 赞:
0 阅读:
147
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以.....
分类:
其他 时间:
2015-03-22 12:17:58
收藏:
0 评论:
0 赞:
0 阅读:
163
先说说略读《软件工程》后对课程的理解软件工程是把系统的、有许的、可量化的方法应用到软件的开发、运营和维护上的过程。软件工程包括下列领域:软件需求分析、软件设计、软件构件、软件测试和软件维护对《软件工程》课程的疑问:现阶段学习这门课程的意义是什么?学生学完这门课程后需要掌握哪些知识点?学生该如何学好这...
分类:
其他 时间:
2015-03-22 12:17:38
收藏:
0 评论:
0 赞:
0 阅读:
169
2015年“甲骨文杯”全国Java程序设计大赛-赛前模拟...
分类:
其他 时间:
2015-03-22 12:13:33
收藏:
0 评论:
0 赞:
0 阅读:
261
线性布局上一节讲解了自定义布局的基本实现思路,这一节主要用自定义布局实现线性布局,做一个简单的图片浏览器效果。自定义布局类1. 自定义布局类/// 继承自UICollectionViewFlowLayout,是因为流水布局有左右滚动的功能
@interface CYLineLayout : UICollectionViewFlowLayout@end2. 重新父类的方法2.1 准备布局/// 准备...
分类:
其他 时间:
2015-03-22 12:13:13
收藏:
0 评论:
0 赞:
0 阅读:
213
github上完整项目:https://github.com/shixinga/1-show-the-phone-message.git
------------------------main.java---------------------
package com.example.tg;
import java.util.ArrayList;
import j...
分类:
其他 时间:
2015-03-22 12:13:04
收藏:
0 评论:
0 赞:
0 阅读:
248
The host '192.168.174.130' is unreachable.
the host may be down,or there may be a problem with the network connection.
Sometimes such problems can also be caused by a misconfigured firewa...
分类:
其他 时间:
2015-03-22 12:12:43
收藏:
0 评论:
0 赞:
1 阅读:
4917
问题描述给定N个整数(1<=N<=100),求出这N个数中的最大值,最小值。输入多组数据,第一行为一个整数N,第二行为N个不超过100的正整数,用空格隔开输出对每组数据输出一行,包含两个整数,用一个空格隔开,分别表示N个数中的最大值和最小值
import java.util.Scanner;/**
* 问题描述:给定N个整数(1<=N<=100),求出这N个数中的最大值,最小值。
* 输入:多组...
分类:
其他 时间:
2015-03-22 12:12:34
收藏:
0 评论:
0 赞:
0 阅读:
133
在SSH Secure Shell 连接Linux centos的时候,遇到F-Secure SSH File Transfer错误"too many authentication failures for root".A protocol error was detected.This usually indicates a bug in the SSH application(either...
分类:
其他 时间:
2015-03-22 12:12:23
收藏:
0 评论:
0 赞:
0 阅读:
1331
10130 SuperSale
There is a SuperSale in a SuperHiperMarket. Every person can take only one object of each kind, i.e.
one TV, one carrot, but for extra low price. We are going with a whole family to ...
分类:
其他 时间:
2015-03-22 12:12:13
收藏:
0 评论:
0 赞:
0 阅读:
125
import java.util.*;
import java.io.*;
public class 十进制数转八进制数 {
public static void toOct(int n) {
System.out.println(Integer.toOctalString(n));
}
public static void main(String[] args...
分类:
其他 时间:
2015-03-22 12:12:03
收藏:
0 评论:
0 赞:
0 阅读:
94
2005. Taxi for Programmers
Time limit: 0.5 second
Memory limit: 64 MB
The clock shows 11:30 PM. The sports programmers of the institute of maths and computer science have just finished th...
分类:
其他 时间:
2015-03-22 12:11:54
收藏:
0 评论:
0 赞:
0 阅读:
264
1 下载与安装 JDK
java 语言的软件开发包
官方下载
http://www.oracle.com/technetwork/java/javase/downloads/index.html
j2ee 类型
JDK 环境变量配置
http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html
2 eclipse
...
分类:
其他 时间:
2015-03-22 12:11:43
收藏:
0 评论:
0 赞:
0 阅读:
331
题目链接:symmetric-tree
import java.util.LinkedList;
//判断该二叉树是否是对称二叉树
/**
*
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this...
分类:
其他 时间:
2015-03-22 12:11:33
收藏:
0 评论:
0 赞:
0 阅读:
149
取值实例:取属性name,跟其他书包用法相同;取属性cnName;取编号,固定关键字HtokID;取节点名,固定用法,以编号为关键字;取文本,固定用法,以节点名为关键字;另外还有取父节点@{id:parentID}、取层数@{id:weTier}和取子节点数@{id:weSubs}三个固定关键字...
分类:
其他 时间:
2015-03-22 12:11:13
收藏:
0 评论:
0 赞:
0 阅读:
257
-----------------------main.java-------------------------
package com.example.hardware;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;...
分类:
其他 时间:
2015-03-22 12:10:34
收藏:
0 评论:
0 赞:
0 阅读:
296
编写一个Book类,包含name(书名)、writer(著者)、public_name(出版社)、price(价格)、number(数量)、NO(书号)等数据成员。定义成员函数setBook,用来为书籍的数据成员赋值,定义成员函数borrow和restore,分别办理借出和还回(借、还书时,暂时只完成数量的增1减1,这里的书仍是一种书的概念,随着课程进展,我们继续做真正的图书管理系统,每本书都能追...
分类:
其他 时间:
2015-03-22 12:10:14
收藏:
0 评论:
0 赞:
0 阅读:
159
题意:
给n(n
分析:
折半枚举。
代码:
//poj 3977
//sep9
#include
#include
using namespace std;
typedef long long LL;
const int maxN=40;
LL a[maxN];
LL myabs(LL x)
{
return x>=0?x:-x;
}
int main()
{
int n;
...
分类:
其他 时间:
2015-03-22 12:09:53
收藏:
0 评论:
0 赞:
0 阅读:
189
//hdu 1728
背景:wa了29次,最后还是借助别人的想法。
第一种想法:把visit数组的每一个位置储存为到达当前坐标点所需要的最小转弯数,最后对于每个走过的点都是到达该点的最小转弯数。这样的最小转弯数点又递推下一个最小转弯数点.....这样层层递推直到终点。
第二种方法:在普通情况下的bfs是每一步都走距离为1,找出所有的下一步放入队列,然后这样层层递推,而这个题中我们bfs每...
分类:
其他 时间:
2015-03-22 12:09:43
收藏:
0 评论:
0 赞:
0 阅读:
141
谁TM写的这段代码
星期五下班...
分类:
其他 时间:
2015-03-22 12:09:04
收藏:
0 评论:
0 赞:
0 阅读:
183