public class StringTest { public static void main(String[] args) { String strA = "abc"; String strB = "abc"; String strC = new String("abc"); Sy...
分类:
编程语言 时间:
2015-09-30 00:50:51
阅读次数:
187
最近还一直在刷leetcode,当然,更多时候只是将题解写在自己的电脑上,没有分享出来。偶尔想起来的时候,就写出来。public class Solution { public void nextPermutation(int[] nums) { if(nums==null||nu...
分类:
其他好文 时间:
2015-09-29 23:40:34
阅读次数:
357
1 package Yuju; 2 3 public class yuju { 4 5 public static void main(String[] args) { 6 // 7 8 int age =18; 9 ...
分类:
其他好文 时间:
2015-09-29 23:35:15
阅读次数:
241
在GUI程序中使用printf函数:#include #include void InitConsole() { int nRet= 0; FILE* fp; AllocConsole(); nRet= _open_osfhandle((long...
分类:
编程语言 时间:
2015-09-29 23:31:25
阅读次数:
180
class Program { static void Main(string[] args) { Test t = new Test(); } } public class Test ...
// .h 文件 #pragma once class CConsoleDump { public: explicit CConsoleDump(LPCTSTR lpszWindowTitle = NULL); virtual ~CConsoleDump(void); ...
分类:
其他好文 时间:
2015-09-29 23:22:12
阅读次数:
244
常见的前序、中序、后序都很常见,最近用到了按层遍历,记录一下:思路:用一个队列来作为辅助空间。依次存储头结点,左节点和右节点。每次循环输出节点的值,直到队列为空这样一来就利用了队列先进先出的性质实现了非递归按层遍历二叉树。具体实现:void levelOrderTraverse(const BiTr...
分类:
其他好文 时间:
2015-09-29 22:10:27
阅读次数:
234
将第二个文件中的textField中的值传到第一个文件的lable中第一步:重命名 typedef void (^passValueBlock) (NSString *);? @Property SenondViewController: UIViewController@Property (no....
分类:
其他好文 时间:
2015-09-29 22:10:09
阅读次数:
191
关于提示框的编辑弹出框自己消失-(void)rightrightBarButtonItemAction:(UIBarButtonItem *)sender{UIAlertView *alertView=[[UIAlertView alloc]initWithTitle:@”提示” message:@...
分类:
其他好文 时间:
2015-09-29 22:02:29
阅读次数:
173
每次循环把最小的值往前移C++代码:Sorter.hpp#ifndef _Algorithm_Sorter_H_#define _Algorithm_Sorter_H_template class Sorter{public: static void selectionSort(Item a[...
分类:
编程语言 时间:
2015-09-29 21:57:14
阅读次数:
343