码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
C# unicode 转中文
//Unicode 转中文 private void button1_Click(object sender, EventArgs e) { string unicode = @"\U5fae"; string result = string.Empty; string...
分类:Windows程序   时间:2015-05-11 23:27:56    阅读次数:210
JAVA_线程的基本概念
1 public class TestThread1 { 2 public static void main(String args[]) { 3 Runner1 r = new Runner1(); 4 //r.start(); 5 //r...
分类:编程语言   时间:2015-05-11 23:23:38    阅读次数:193
【Java总结】static,静态代码块
staticstatic可以修饰属性,方法,代码块,内部类特点 随着类的加载而加载 优先于对象存在 修饰的成员被所有对象所共享 访问权限允许时,可以不创建对象,直接被类调用 static修饰的属性,存储在内存中的静态区域,整个程序中只有这一个成员 public class Test { public static void main(String[] args) { Pers...
分类:编程语言   时间:2015-05-11 22:07:55    阅读次数:142
设计模式C++实现六: 原型模式
原型模式(Prototype):用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。原型模式其实就是从一个对象再创建另一个可定制的对象,而且不需知道创建的具体细节。 #ifndef PROTOTYPE_H #define PROTOTYPE_H #include #include using namespace std; class Resume { string nam...
分类:编程语言   时间:2015-05-11 22:07:26    阅读次数:140
不包含适合于入口点的静态“Main”方法
问题背景 建立一个C#项目之后,删除了自带的Class1类。完成了程序的编写之后提示如下错误: 问题解决 方案1 在 public partial class MainForm : Form下面添加这句话  public static void Main(string[] args)         {             // Starts the applicatio...
分类:其他好文   时间:2015-05-11 22:05:11    阅读次数:132
C#对象初始化器
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 对象初始化器 { class Program { static void Main(string[] args) { //第二种初始化...
分类:Windows程序   时间:2015-05-11 22:02:15    阅读次数:184
LINQ语句的两种语法实现方式
using System; using System.Linq; namespace LINQ语法实现 { class Program { static void Main(string[] args) { int[] a = { 3,1,2,4}; //1.Query syntax ...
分类:其他好文   时间:2015-05-11 21:56:58    阅读次数:119
Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. class Solution { public: int romanToInt(string s) { unordered_map mp = {{"M",...
分类:其他好文   时间:2015-05-11 21:55:41    阅读次数:133
Integer to Roman
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. class Solution { public: string intToRoman(int num) { map mp = {{1000,"M"},{9...
分类:其他好文   时间:2015-05-11 21:55:30    阅读次数:130
字符串翻转
//将student a am i 转换成 i am a student #include #include //翻转一个单词 /*void reverse_string(char *l,char*r) { while(l<r) { char tmp; tmp=*l; *l=*r; *r=tmp; l++; r--; } } //由空格判断一个单词,调用reverse...
分类:其他好文   时间:2015-05-11 21:53:36    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!