自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(57)
  • 收藏
  • 关注

转载 ASPX和Ajax结合使用的例子

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="serve...

2014-03-16 10:04:00 393

转载 C++的第二个简单的类

1 // Cplus001.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 #include "iostream" 6 #include "string" 7 8 using namespace std; 9 1...

2013-12-24 16:04:00 135

转载 ASPX如何调用外界程序

调用外界程序,用到Process类,这个相当于在运行中输入命令,而不是在cmd中输入命令。.aspx.cs页,Start方法应该是静态方法1 using System.Diagnostics;2 .....3 Process.Start("cmd",@"/c shutdown -l");转载于:https://www.cnblogs.com/xtyang...

2013-12-20 18:15:00 140

转载 ASPX页显示数据的两种办法【公共变量或者方法】以及对数据的渲染

1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %> 2 3 <!DOCTYPE html> 4 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6...

2013-12-20 17:44:00 305

转载 ASPX防止重复执行Page_Load以及事件绑定的问题

1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %> 2 3 <!DOCTYPE html> 4 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6...

2013-12-20 13:43:00 206

转载 MatLab提取网络地址

1 clear;clc; 2 3 %initalize 4 UrlNums = 15; 5 urlpath{UrlNums}=''; 6 url{UrlNums}=''; 7 wb=waitbar(0,'Please wait...'); 8 9 for i=1:length(urlpath)10 waitbar(i/length(ur...

2013-11-21 12:43:00 296

转载 Powershell如何将两个文本的内容隔行交叉

1 $result = ""2 for($i=0;$i -le 398;$i++)3 {4 $result+= "`r`n"+(Get-Content "E:\FileTmp\5pages-1.txt")[$i]+"`r`n"+(Get-Content "E:\FileTmp\5页-1.txt")[$i]5 }6 Set-Content -path "d:...

2013-11-06 14:44:00 143

转载 三种画图不会消失的办法

1 protected override void OnPaint(PaintEventArgs e) 2 { 3 Graphics g = e.Graphics; 4 } 5 private void Pbo_Paint(object sender,PaintEventArgs e) 6 { 7 Graphics g = e.Graphic...

2013-11-04 17:39:00 339

转载 数组复制与拷贝的问题

1 string t = "I love you.";2 string tt = t;3 tt = "I do love you.";4 Console.WriteLine(t);结果是:I love you.string[] template = { "I love you", " China." };string[] tmp = template;...

2013-10-27 20:13:00 110

转载 批量格式化联系方式

进入一个新学校或者一个新公司,你可能会有大量的联系方式需要添加。一般来说,我们都是一个个的添加联系方式,但是这样真实太让人头痛了吧。事实上,许多智能手机的管理软件,都提供了联系方式导入的功能,但是这个需要一个格式化的联系方式文件,现在就介绍如何用正则表达式格式化手机的联系方式。一、腾讯手机管理软件到处的CSV文件,用记事本打开的结果。二、对于电子版的联系方式,建议用电脑整理成...

2013-10-27 12:42:00 83

转载 Matlab中的迭代方法

1 ep=10^(-8);dx=1;x0=0.5;k=0;2 while dx>ep3 k=k+1;4 x=exp(-x0);5 dx=abs(x-x0)/(1+abs(x));6 x0=x;7 end关键是4-6句,这就是迭代法的精华部分。转载于:https://www.cnblogs.com/xtyang/...

2013-09-18 09:53:00 4852

转载 网页导航示例

效果:html代码1 <div class="head">2 <ul class="navi">3 <li class="navi_menu_first"><a href="#">公司简介</a></li>4 <li class="navi_m...

2013-08-04 00:22:00 87

转载 纯CSS实现类winForm的分组控件效果

效果图片代码<div class="group"> <div class="over">用户评论</div></div>.group{ width: 400px;height: 150px;border: 1px solid silver;margin: 15px auto;positio...

2013-08-03 17:42:00 154

转载 用图片实现的三角箭头

1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <...

2013-08-01 16:22:00 53

转载 php类的继承,重载,扩展

1 <?php 2 //1.父类中用public/protected访问修饰符的方法或者变量可以在子类中继承和扩展和操作 3 //2.其中protected访问修饰符标志的仅用在子类中进行继承和扩展,不能外部访问。 4 //3.重载父类的方法,不能使用更严格的访问修饰符,即如果父类用public,子类不能用用private和protected。 5 //...

2013-08-01 09:20:00 97

转载 自己封装的mysql类

1 <?php 2 class link_mysql{ 3 //1.declear the variable.but without assignment sentence 4 //2.assignment sentence can only occur in a function body. 5 //3.'website' is a ...

2013-08-01 08:01:00 51

转载 CSS三角箭头注解

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head> <style type="text/css">...

2013-07-30 20:13:00 86

转载 [转载]纯css实现带三角箭头

原址:http://www.cnblogs.com/xueduanyang/archive/2010/11/09/1872261.html1.带三角指示箭头2.边框需要描边3.渐进圆角有了那篇文章的启发之后,我们这里做起来就简单了说做就做,咱先整个描了边的浮动层,效果如下接着给浮动层,加上三角的箭头指示,在div容器里面加入一个空的s标签,表示三角...

2013-07-30 17:16:00 107

转载 [转载]mysql的null和not null探究

地址:http://www.zixue.it/thread-7836-1-1.html相信很多用了mysql很久的人,对这两个字段属性的概念还不是很清楚,一般会有以下疑问:1、我字段类型是not null,为什么我可以插入空值2、为毛not null的效率比null高3、判断字段不为空的时候,到底要select * from table where column &l...

2013-07-30 07:50:00 67

转载 MySQL防注入[待续]

1.将输入的参数变成整数$id = isset[$_GET['tid']]?$_GET['tid']+0:0;可以防止:"*.php?tid=3 or 1"这样的语句.转载于:https://www.cnblogs.com/xtyang/p/3221469.html

2013-07-28 19:41:00 90

转载 return,exit,die

return:代表退出某个函数,但是函数体外的语句仍然需要执行。exit:退出程序,但是不从内存中卸载,exit其实也是可以输出语句的,加一个括号即可。die:退出程序,并且从内存中卸载。转载于:https://www.cnblogs.com/xtyang/p/3221465.html...

2013-07-28 19:39:00 69

转载 PHP中变量,常量,超级全局变量小结

//一般来说,变量在函数无法在函数体中无法访问,但是常量可以。//超级全局变量确实可以的,地址栏上的参数/*$GLOBALS //变量注册的信息$_GET //地址栏参数$_POST //表单参数常用这个来接$_REQUEST //可以接$_GET,$_POST,$_COOKIE的参数,是他们的并集。$_FILES //文件上传$_COOKIE //用户...

2013-07-28 14:36:00 103

转载 PHP和CS的引用传值

PHP的引用传值function change_value($num){ $num+=2;}$age = 3;change_value(&$age);echo $age;CS的引用传值static void Main(string[] args){ int age = 3; Console.WriteLin...

2013-07-28 14:18:00 71

转载 PHP动态函数

header('Content-type:text/html;Charset=utf8');function welcome(){ echo 'Welcome to you.';}function speak(){ echo 'Hello,my name is xtyang.';}$func = $_GET['func'];echo $fu...

2013-07-28 13:58:00 95

转载 list笔记总结

1.list是一个复合的复制函数,可以将一个数组一次赋给多个变量。我们常用以下语句遍历一个数组。$arr = array('东','男','西','北');while(list($k,$v)=each($arr)){ echo $k.'=>'.$v.'<br/>';}2.从上边可以看出,each($arr)似乎是一个包含两个元素的数组,...

2013-07-28 10:07:00 104

转载 PHP浮点数的精度

在百度知道上看到这么一个问题var_dump((0.3-0.2)==0.1);结果是:false后来查查手册,原来是浮点数的精度问题。那么0.3-0.2-0.1等于多少呢,结果:2.7755575615629E-17如果真的涉及到浮点数的比较,可以这样,设计一个精度,就可以比较了。$ps = 2.7755575615629*pow(10,-16);$_...

2013-07-27 18:05:00 101

转载 CS对于dll文件的引用

1.对于.net或者com型的组件,直接添加引用即可。2.对于标准的dll文件,利用DLLImport这个函数即可,如果要使用函数的别名,那么应该加入EntryPoint。示例:一般可以封装成一个类,然后在其他类中引用即可。using System.Runtime.InteropServices;public class MyWin32Wrapper{ [...

2013-07-27 16:40:00 442

转载 CS异步下载

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Net;using System.Text;using System....

2013-07-27 16:31:00 58

转载 文件编码大全

class Program{ static void Main(string[] args) { for (int i = 0; i < 65535; i++) { try { Console.WriteLine("{0} {1}}", i.ToString(),Encoding.GetEncoding(i).WebName...

2013-07-27 16:29:00 74

转载 字符串、流、字节、字符之间的转换

(1)流转换成字节 fs.seek(0,SeekOrigin.Begin); byte[] fsbyte = new byte[fs.length]; fs.Read(fsbyte,0,fsbyte)(2)字节转换成流 Stream stream = new MemoryStream(bytes);【字符串和字节的转换】 bt_content = Encoding.Default...

2013-07-27 16:27:00 88

转载 c#获取网页内容的三种方法

1.webclientWebClient wc = new WebClient();Stream stm = wc.OpenRead(str_url);StreamReader sr = new StreamReader(stm,Encoding.UTF8);//Encoding这个类的属性有:UTF8,Unicode等等Console.Write(sr.Read...

2013-07-27 16:25:00 197

转载 C#读写xml文件

using System.Xml.Linq;protected void WriteXml(string path){ XDocument Xdoc = new XDocument( new XDeclaration("1.0","utf-8","yes"), new XComment("Create Time:"+DateTime.Now),...

2013-07-27 16:22:00 46

转载 C#右键复制路径

using System;//Environmentusing System.Windows.Forms;//add referece of System.Windows.Forms :DataFormatsnamespace getfilepath{ class Program { [STAThreadAttribute]...

2013-07-27 16:20:00 111

转载 PHP与MySQL中编码的设置

php代码header("Content-type:text/html;Charset=utf8");myql_query("set names utf8");转载于:https://www.cnblogs.com/xtyang/p/3219676.html

2013-07-27 16:16:00 59

转载 MySQL常用操作

1.查看用户select user();2.更改账户密码use mysql;update user set password = password('pwd') where user = 'root' and host='localhost';3.查看所有数据库show databases;4.查看某个数据库的所有数据...

2013-07-27 16:10:00 47

转载 PHP分页

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>...

2013-07-26 17:55:00 56

转载 C++类(一)

1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 7 //找了很久,似乎都是类放在Main方法体上 8 9 class Person10 {11 private:12 string str_nam...

2013-07-26 12:30:00 48

转载 纪念大一的日子,一个简单的C++

//Author:xtyang//记得大一学C语言,永远都不明白如何调用一个函数,真是好可爱呀。#include<iostream>using namespace std;//定义函数原型int add(int m,int n);int minus(int m,int n);//Main,程序入口int main(){ in...

2013-07-26 10:34:00 82

转载 CSS导航指示箭头

效果图代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head...

2013-07-25 08:20:00 274

转载 PHP利用GD库画曲线

效果:PHP代码<?php Header('Content-type: image/png;Charset:utf-8'); //声明图片$im = imagecreate(400,200);//get color.$bg = imagecolorallocate($im,0,0,0);$red = imagecolorallocate(...

2013-07-23 14:49:00 402

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除