“除基取余 + 顺序栈” 实现十进制数转换成其他进制数,代码如下:#include #define MAX_L 100//定义栈typedef struct { int data[MAX_L]; int top; }Stack;//进制转换//origin是待转数,right是要转的目的数的...
分类:
其他好文 时间:
2014-09-21 01:23:39
阅读次数:
201
Chapter 10 UINavigationController1. When your application presents multiple screens of information, a UINavigationController maintains a stack of thos...
分类:
其他好文 时间:
2014-09-19 19:06:15
阅读次数:
130
题意:中文题。
思路:和普通数位dp一样,这里转换成二进制,然后记录有几个一,
统计的时候乘起来就好了。
代码:
#include"cstdlib"
#include"cstdio"
#include"cstring"
#include"cmath"
#include"stack"
#include"algorithm"
#include"iostream"
using namespace...
分类:
其他好文 时间:
2014-09-19 17:40:05
阅读次数:
210
同Java一样,Pyton异常对象来表示异常情况。遇到错误后,引发异常,如果异常对象并未对处理或捕捉,程序就会用所谓的回溯(Traceback)来终止执行;
>>> 1/0
Traceback (most recent call last):
File "", line 1, in
ZeroDivisionError: division by zero
程序可以通过rais...
分类:
编程语言 时间:
2014-09-19 17:37:55
阅读次数:
251
一个由c/C++编译的程序占用的内存分为以下几个部分1、栈区(stack)— 程序运行时由编译器自动分配,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。程序结束时由编译器自动释放。2、堆区(heap) — 在内存开辟另一块存储区域。一般由程序员分配释放, 若程序员不释放,程序结束...
分类:
其他好文 时间:
2014-09-19 16:53:55
阅读次数:
221
This post demonstrates how to use try clause to handle the exceptions....
分类:
编程语言 时间:
2014-09-19 15:44:15
阅读次数:
220
一个模板了 哈哈
/*
这里主要是逆波兰式的实现,使用两个stack 这里用字符串来模拟一个stack,第一步,将中缀表达式转变为后缀表达式
第二步,然后再使用一个stack,计算后缀表达式的结果,这一步很容易出错,考虑到浮点数的问题。
*/
#include
#include
#include
#include
#include
#include
using namespace s...
分类:
其他好文 时间:
2014-09-19 15:36:35
阅读次数:
198
org.hibernate.exception.SQLGrammarException: could not retrieve snapshot: [com.pear.zcp.hkgt.Option#10002] at org.hibernate.exception.SQLStateConve...
分类:
其他好文 时间:
2014-09-19 15:25:25
阅读次数:
268
摘要: 本文给出IAR设置堆栈合理大小的详细方法,并分享一些好博文(icf及map讲解)。 最近在MSP430-169LCD(MSP430F169,RAM为2KB)调试一些ucos演示例子,IAR for MSP430默认的堆栈大小是80字节,编译可以通过,运行结果不确定性,调试过程会提示"the ...
分类:
其他好文 时间:
2014-09-19 15:24:55
阅读次数:
205
package com.hephec;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
public class OutputStreamTest{
public static void main(String[] args) throws Exception{
...
分类:
编程语言 时间:
2014-09-19 12:11:45
阅读次数:
221