码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果
VHDL细节笔记(含std_logic Libraries标准库的技术手册)
q '0'); 表示将q的所有位赋值为0,当q位数较多时比较方便。。。 信号属性函数:用来得到有关信号的行为功能信息; 信号‘event:当前的一个相当小的时间间隔内有信号事件发生,则返回’true’,否则返回‘false’; 关于conv_std_logic_vector 和 conv_integer 这两个函数的使用问题...
分类:其他好文   时间:2014-06-11 06:26:39    阅读次数:240
int vs Integer
在项目开发过程中,有时候在选择int还是Integer会有些纠结.今天就来聊一下这个问题.当然,下面所说的基本也适用于java中其他基本类型和其包装类型。Definitions: int是原始类型,并不是一个Object.int的取值范围为-2的31次方到2的31次方.int的在计算时具备非常高.....
分类:其他好文   时间:2014-06-10 09:39:26    阅读次数:280
[leetcode]First Missing Positive @ Python
原题地址:https://oj.leetcode.com/problems/first-missing-positive/题意:Given an unsorted integer array, find the first missing positive integer.For example,G...
分类:编程语言   时间:2014-06-09 17:44:43    阅读次数:980
Java整数和字符串转换
字符串转换整数: 虽然有类似的Integer.parseInt(),但是笔试面试明显不会如此: 转字符串可以考虑为: 1、单个字符的转换 2、权值 如:从前往后依次扫描,则每次扫描一个字符 前面数值*10; 如345,扫描3,再3*10+4,再...
分类:编程语言   时间:2014-06-09 17:21:02    阅读次数:228
[LeetCode] String to Integer (atoi) [7]
这是个老题目了,主要考察的是能不能考虑到所有的情况,还有就是怎么判断是否溢出。 情况大致分为如下四种:(下面我使用@代替空格,x代表除数字之外的所有字符) 1. "@@[+-]3232343@@" 2. "@@[+-]333x54" 3. "@@[+-]4343" 4. "2147483648"或者"-2147483649"(也就是溢出的情况) 下面代码中给出了两个判断是否溢出的方法。...
分类:其他好文   时间:2014-06-08 15:47:49    阅读次数:270
[LeetCode] Palindrome Number [13]
题目: Determine whether an integer is a palindrome. Do this without extra space. 解题思路: 判断一个int型整数是不是回文数字,这个题也不难,依次取得数字最高位和最低位进行比较,就可以判断是不是回文数字。需要注意的是负数不是回文数字。 代码实现:...
分类:其他好文   时间:2014-06-08 15:35:48    阅读次数:375
[LeetCode] Reverse Integer [8]
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321。 解题思路: 颠倒一个整数中数字的位置,哈哈,类似翻转字符串一样,只不过整数需要计算,需要考虑溢出,其他无而。写出代码不难,只是溢出的时候怎么办,我这里是按照返回-1处理的,在leetcode上可以AC。 代码实现:...
分类:其他好文   时间:2014-06-08 14:47:58    阅读次数:257
显示进度条
static void jindutiao_ZF(Args _args){ RunBaseProgress progress; integer i,j;; i = 10000; progress = new...
分类:其他好文   时间:2014-06-08 07:24:32    阅读次数:189
Merge Sorted Array
题目 Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional el...
分类:其他好文   时间:2014-06-08 05:05:47    阅读次数:268
Java 自动装箱和拆箱
JDK1.5之后的功能自动装箱:指的是开发人员可以把一个基本数据类型直接赋给对应的包装类自动拆箱:指开发人员可以把一个包装类对象直接赋给对应的基本数据类型public static void main(String[] args) { Integer i = 1; //装箱 int j...
分类:编程语言   时间:2014-06-07 23:38:09    阅读次数:350
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!