2015年10月4日

3*(4+6)-7 # 用代码实现这个运算表达式,仅包含逆波兰式部分,算术结果部分未写出

摘要: #include#include#includeusing namespace std;void pr(char *str){ cout s1(strlen(str)); vector s2(strlen(str)); int i=0; while(str[i]!='\0')... 阅读全文

posted @ 2015-10-04 14:50 邗影 阅读(252) 评论(0) 推荐(0) 编辑

2015年10月3日

给出一个十六进制的数0xFF 0x80 (只有2“位”) 将其转换成有符号的一字节的十进制整数

摘要: #include #include#include #includeusing namespace std;int main(){ char ch[8]; char ch2[8]={'0','0','0','0','0','0','0','0'}; ltoa(strtol("0xb... 阅读全文

posted @ 2015-10-03 15:18 邗影 阅读(3498) 评论(0) 推荐(0) 编辑

2015年10月1日

给一文本, 找出所有包含“某单词”的句子并输出

摘要: package pack1; import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOExcep 阅读全文

posted @ 2015-10-01 15:41 邗影 阅读(856) 评论(3) 推荐(0) 编辑

2015年9月30日

给一字符串, 输出第一个出现两次的字母

摘要: package pack1; import java.util.Arrays;import java.util.Scanner; public class one { void search(String str){ int len=str.length(); char arr[]=str.toCh 阅读全文

posted @ 2015-09-30 12:56 邗影 阅读(733) 评论(2) 推荐(0) 编辑

2015年9月3日

二分查找

摘要: 二分查找 阅读全文

posted @ 2015-09-03 21:27 邗影 阅读(262) 评论(0) 推荐(0) 编辑

2015年9月2日

java中的nextline()

摘要: 转自:gold_worker http://www.cnblogs.com/gold-worker/archive/2013/04/10/3013063.htmlJava中Scanner的nextInt(),next(),nextLine()方法总结今天在java上机课时遇到了个小问题,使用Sc... 阅读全文

posted @ 2015-09-02 10:13 邗影 阅读(816) 评论(0) 推荐(0) 编辑

2015年8月17日

链表创建途中遇到的问题

摘要: #include <iostream> #include<new> using namespace std; struct node{ int data; node *next; }; class list{ public: node *head; list(){head=null}; list(i 阅读全文

posted @ 2015-08-17 11:13 邗影 阅读(247) 评论(0) 推荐(0) 编辑

2014年4月14日

cipher的各个模式

摘要: block cipher 工作模式(引自百度)Electronic Codebook Mode 最经典的模式,把明文按64比特为单位分为block, 对所有block使用同样的密钥来加密,最后把输出的密文块连接起来,成为最后的密文。Cipher Block Chainning Mode 使用Elec... 阅读全文

posted @ 2014-04-14 15:04 邗影 阅读(1107) 评论(0) 推荐(0) 编辑

2014年4月8日

控制台输出到txt

摘要: //PrintStream 为其他输出流添加了功能,使它们能够方便地打印各种数据值表示形式。//PrintStream不同于PrintWriter,PrintStream输出的是字节内容。//public PrintStream(OutputStreamout)创建新的打印流。PrintStream ps=new PrintStream(new FileOutputStream(new File("文件名.txt"),true));//第二个参数是免覆盖免去用inputstream。fileinputstream,bufferedwriter(字节,字符,缓冲,数组,数据, 阅读全文

posted @ 2014-04-08 14:53 邗影 阅读(479) 评论(0) 推荐(0) 编辑

java链接JDBC中的?问题

摘要: String sql = "select * from student where name= ?"; PreparedStatement pst = conn.prepareStatement(sql); pst.setString(1,n); ResultSet result = pst.executeQuery( sql);第一句感觉没问题呀。。。。可是为啥??com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; chec... 阅读全文

posted @ 2014-04-08 14:41 邗影 阅读(218) 评论(0) 推荐(0) 编辑

导航