封装加密方法:
public string DecodeBase64(string code_type, string code)
{
string decode = "";
byte[] bytes = Convert.FromBase64String(code);
try
{
decode = Encoding.GetEncoding(code_type).G...
分类:
其他好文 时间:
2015-05-13 10:43:38
阅读次数:
236
public class Solution { public String convert(String s, int numRows) { String res = ""; if (s.length() < numRows || numRows == 1) { ...
分类:
其他好文 时间:
2015-05-13 06:17:07
阅读次数:
108
Parse类型转换Parse()函数int、double都能调用Parse()函数,Parse(string str);如果转换成功就成功,失败就会抛出一个异常;TryParse()函数相应地有一个TryParse函数,bool TryParse(string str,out int a);这里的out参数相当于c++中的&,引用(区别是c#的这个方法里必须对a赋值,且所有分支都要赋值)。如果能够...
JS中的“==”符号及布尔值转换规则what are the rules for how == converts types?关于"=="的比较规则:1. Comparing numbers and strings will always convert the strings to numbers...
分类:
Web程序 时间:
2015-05-12 20:32:30
阅读次数:
118
在用户控件中,获取父页面的方法1:方法没有参数(userInfor())string userInfor = Convert.ToString(this.Page.GetType().GetMethod("userInfor").Invoke(this.Page, null)); //获取到的值是o...
分类:
Web程序 时间:
2015-05-12 18:45:04
阅读次数:
144
使用 CONVERT:CONVERT ( data_type [ ( length ) ] , expression [ , style ] )参数expression是任何有效的 Microsoft® SQL Server? 表达式。。data_type目标系统所提供的数据类型,包括 bigint...
分类:
数据库 时间:
2015-05-12 15:29:09
阅读次数:
166
查询和排序过程中cast函数和convert函数的运用...
分类:
数据库 时间:
2015-05-12 01:43:11
阅读次数:
141
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
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
题目: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 romanTo...
分类:
其他好文 时间:
2015-05-11 17:35:39
阅读次数:
150