码迷,mamicode.com
首页 > 编程语言
Java 日期时间 Date类型,long类型,String类型表现形式的转换
1、java.util.Date类型转换成long类型java.util.Date dt = new Date();System.out.println(dt.toString()); //java.util.Date的含义long lSysTime1 = dt.getTime() / 1000; ...
分类:编程语言   时间:2014-08-02 12:27:43    阅读次数:168
C++里面的取整函数
#include double ceil(double x) //向上取整 double floor(double x) //向下取整 也能够用数据类型强制转换,那要看数据的大小 能够用int()或long() 比方int(10...
分类:编程语言   时间:2014-08-02 12:26:33    阅读次数:209
JAVA获取随机数
在Java中我们能够使用java.util.Random类来产生一个随机数发生器。它有两种形式的构造函数,各自是Random()和Random(long seed)。Random...
分类:编程语言   时间:2014-08-02 12:24:03    阅读次数:219
C# DumpBin使用 查看反射C++ dll 动态链接库中的函数
DumpBin是Microsoft提供的一个用于查看.exe、.dll文件信息的工具,其位于:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin,但直接运行这个程序会有错误,其环境配置有问题,所以要先启动cmd,然后运行C:\Prog...
分类:编程语言   时间:2014-08-02 12:23:33    阅读次数:686
JAVA(一)
忙了几天其他的事情,现在开始学JAVA,以《JAVA从入门到精通》这本书为教材,从这篇文章开始记录学习JAVA的过程。 第一章 目标:搭建JAVA环境,并写出第一个helloworld。 1、下载并安装JDK JDK1.8不是很好用,有同事下载后说用不了,所以我下的JDK1.7 地址:...
分类:编程语言   时间:2014-08-02 12:20:03    阅读次数:239
Climbing Stairs leetcode java
题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you....
分类:编程语言   时间:2014-08-02 12:19:43    阅读次数:389
Generate Parentheses leetcode java
题目:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is....
分类:编程语言   时间:2014-08-02 12:19:33    阅读次数:255
C++ Primer 笔记 第三章
C++ Primer 第三章 标准库类型3.1using声明例: using namespace atd; using std::cin;3.2string类型初始化方式 string s1默认构造函数,s1为空串string s2(s1)将s2初始化为s1的一个副本string s3(“valu....
分类:编程语言   时间:2014-08-02 12:19:23    阅读次数:310
Unique Paths II leetcode java
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spa....
分类:编程语言   时间:2014-08-02 12:19:13    阅读次数:241
Unique Paths leetcode java
题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at a....
分类:编程语言   时间:2014-08-02 12:17:23    阅读次数:279
Java的finally理解
1.为什么要用finally先看一个没有finally的异常处理try-catch语句:如果count为要使用到的资源,而且用完要求释放此资源。那么我们能够把释放资源的语句放到try-catch后运行,当前的程序无论是在运行完try语句块还是catch语句块,都会顺序运行到以下释放资源的语句。int...
分类:编程语言   时间:2014-08-02 12:14:03    阅读次数:273
Rotate Image leetcode java
题目:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?题解:这道题就是考察很....
分类:编程语言   时间:2014-08-02 10:02:03    阅读次数:261
Roman to Integer leetcode java
题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 题解:这道题跟interger to roman一样都得先熟悉罗马数字的规则。罗...
分类:编程语言   时间:2014-08-02 10:01:33    阅读次数:231
C++类与对象
【1】类的内存问题 类是抽象的,不占用内存,而对象是具体的,占用 存储空间。在一开始时弄清对象和类的关系是十分 重要的。【2】类的声明 如果在类的定义中既不指定private也不指定public,则系统就默认为是私有的。 归纳以上对类类型的声明,可得到其一般形式如下: class 类名 ...
分类:编程语言   时间:2014-08-02 09:59:53    阅读次数:328
C++表达式
冰哥哥最近在刷笔试题,昨晚问了一个没有意义,但很有意思的一个问题:求输出:#includeint main(){ int a=10; a+=a-=a++; std::cout操作符属于同一优先级,所以不能写出a->b++这样的表达式)于是,上面的运算表达式可以写成:a+=a-...
分类:编程语言   时间:2014-08-02 09:59:43    阅读次数:289
javascript编程规范
一、javascript模块化编程规范:二、关于commenjs规范和AMD规范:根本不同:前者用于服务器端同步加载模块;后者是客户端异步加载模块。同点:两者都有一个全局函数require(),用于加载模块;只是AMD规范中的require函数需要有2个参数。三、CommonJS出现时间更早,代表有...
分类:编程语言   时间:2014-08-02 09:58:03    阅读次数:382
在ubuntu linux 中编写一个自己的python脚本
在ubuntu linux 中编写一个自己的简单的bash脚本。实现功能:终端中输入简单的命令(以pmpy为例(play music python),为了区别之前说的bash脚本添加了py后缀),来实现音乐的播放。注:本人ununut中安装了audacious,所以就以audacious为例,来实现...
分类:编程语言   时间:2014-08-02 09:57:53    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!