码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
7、C#基础整理(类)
String类概念:是一个class类型的类,里面包含许多处理字符串的方法和属性1、length方法。 例:string s = "hello";Console.WriteLine("s的长度为{0}",s.Length);//获取字符串长度,返回int值2、Trim & ToUpper方法。例:s...
分类:Windows程序   时间:2014-12-17 20:27:27    阅读次数:250
Java读取图片并修改像素,创建图片
public void replaceImageColor(String file, Color srcColor, Color targetColor) throws IOException{ URL http; if(file.trim().startsWith("h...
分类:编程语言   时间:2014-12-17 20:25:16    阅读次数:763
Java泛型01--任意数组中两元素交换
package com.zl.generic;/** * 交换“任意”数组 中两个元素 */public class GenericSwapArray { public static void main(String[] args) { swap(new String[]{"1","2","3"}....
分类:编程语言   时间:2014-12-17 20:24:58    阅读次数:190
play freamwork 框架中 设置文件大小
public static String getFormatSize(long size) { double kiloByte = size / 1024; if (kiloByte < 1) { return size + "B"; } double megaByte = kiloBy...
分类:其他好文   时间:2014-12-17 20:15:52    阅读次数:267
难道没有人吐槽 Asp.net Web Api 的吗
一个APP新项目为了赶时髦,用上了Asp.net Web API,可能我不是太熟悉,经过我几天潜心研究,web api 确实没啥用,简直属于狗尾续貂之作。新创建一个api controller,大概方法如下public IEnumerable Get();public string Get(int ...
分类:Windows程序   时间:2014-12-17 20:14:13    阅读次数:247
C# 文件流相关操作
二进制转换成图片: MemoryStream ms = new MemoryStream(bytes);ms.Position = 0;Image img = Image.FromStream(ms);ms.Close();this.pictureBox1.ImageC#中byte[]与string...
分类:Windows程序   时间:2014-12-17 20:13:59    阅读次数:234
Python——errno
该模块实现标准的errno系统符号,每一个对应于一个整数,名称和描述借鉴了linux/include/errno.h。errno.errorcodeDictionary providing a mapping from theerrnovalue to the string name in th.....
分类:编程语言   时间:2014-12-17 20:12:41    阅读次数:267
python 输出彩色文字
直接上代码,写了一个选择双色球号码的小东西来显示字体颜色。pipinstallclint将以下代码复制,执行变可看到python在list与string转化,以及彩色文字的输出有多么方便了。#!/usr/bin/python importrandom importstring fromclint.textuiimportcolored red=[] blue=[] red_res=[..
分类:编程语言   时间:2014-12-17 18:49:31    阅读次数:356
android MD5加密方式
32位加密 public static String getMD5(String strSrc) { StringBuffer buf = null; try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(strSrc.getBytes()); byte b[] = md.diges...
分类:移动开发   时间:2014-12-17 18:33:21    阅读次数:136
C++ 字符串处理
#include #include #include using namespace std; int main() { string str("1 2 3 4 5 6 7 8"); char ch[] = "abcdefgh"; string a; string str_1(ch); string str_2(str, 2, 5); string str_3(ch, ...
分类:编程语言   时间:2014-12-17 18:29:29    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!