随笔 - 78  文章 - 1  评论 - 126  阅读 - 19万

随笔分类 -  小代码

1 2 下一页
关于NTLM认证的.NET,php,python登录
摘要:早期SMB协议在网络上传输明文口令。后来出现 LAN Manager Challenge/Response 验证机制,简称LM,它是如此简单以至很容易就被破解。微软提出了WindowsNT挑战/响应验证机制,称之为NTLM。现在已经有了更新的NTLMv2以及Kerberos验证体系。NTLM是windows早期安全协议,因向后兼容性而保留下来。NTLM是NT LAN Manager的缩写,即NT LAN管理器。NTLM 是为没有加入到域中的计算机(如独立服务器和工作组)提供的身份验证协议。NTLM验证允许Windows用户使用当前登录系统的身份进行认证,当前用户应该是登陆在一个域(domain 阅读全文
posted @ 2013-03-25 13:52 myx 阅读(2972) 评论(0) 推荐(0) 编辑
php里的html内容切取
摘要:HTMl内容的切取,找了很多都不行或有乱码,然后我组合了一个。 1 /** 2 * Truncates text. 3 * 4 * Cuts a string to the length of $length and replaces the last characters 5 * with the ending if the text is longer than length. 6 * 7 * @param string $text String to truncate. 8 * @param integer $le... 阅读全文
posted @ 2012-10-12 15:33 myx 阅读(1452) 评论(0) 推荐(0) 编辑
js生成新加坡的NRIC号码
摘要:<!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> <title> new document </title> <meta name="generator" co 阅读全文
posted @ 2012-08-01 16:24 myx 阅读(1835) 评论(0) 推荐(0) 编辑
Sina站内应用的登录
摘要:在APP首页:if 没有登录 {<script src="http://tjs.sjs.sinajs.cn/t35/apps/opent/js/frames/client.js" language="JavaScript"></script><script>function authLoad() {App.AuthDialog.show({client_id: '2069027236', //必选,appkeyredirect_uri: 'http://apps.weibo.com/randyt 阅读全文
posted @ 2012-07-24 20:45 myx 阅读(727) 评论(0) 推荐(0) 编辑
OAuth with Facebook
摘要:1. 链接到这登录https://graph.Facebook.com/oauth/authorize?type=user_agent&client_id=CLIENT_ID&redirect_uri=REDIRECT_URL&scope=user_photos,email,user_birthday,user_online_presence2. 回调地址里获取access_token并保存。http://REDIRECT_URL?access_token=142279789131336%7C2.WKMyHmlbzscco7HjrkJUMw__.3600.1304560 阅读全文
posted @ 2011-06-10 14:42 myx 阅读(1367) 评论(0) 推荐(0) 编辑
QQ微博API使用记录
摘要:下载SDK下载地址: http://open.t.qq.com/download/C%23-SDK.7z ,不过下载这SDK在发送图片的时候有问题。稍候讲解。1. Oauth 登录 a. 获取request_token /// <summary> /// 获取request_token /// </summary> /// <param name="appKey"></param> /// <param name="appSecret"></param> /// <return 阅读全文
posted @ 2011-06-10 10:21 myx 阅读(1327) 评论(0) 推荐(0) 编辑
根据Flickr的分享Url获取图片地址
摘要:string strUrl = "http://www.flickr.com/photos/anali_t/5617851444/"; Flickr.CacheDisabled = true; Flickr.CacheLocation =System.Web.HttpContext.Current.Server.MapPath("~/FlickrCache"); Flickr flickr = new Flickr("key", "Secret"); SizeCollection sc = flickr.Photo 阅读全文
posted @ 2011-04-15 10:28 myx 阅读(719) 评论(0) 推荐(0) 编辑
AjaxUpload
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<script>jQuery(function(){varupload=newAjaxUpload(jQuery('#test4'),{action:'upload-test.php',n... 阅读全文
posted @ 2010-05-11 16:56 myx 阅读(1234) 评论(0) 推荐(0) 编辑
JBind (jQuery Bind Template)
摘要:Url:http://arashkarimzadeh.com/index.php/jquery/11-jbind-jquery-bind-template.html<style>.block{ border-top: #bbb 1px solid; margin-top: 1px;}.viewBlock, .viewBlockLeft { border: #006699 1px sol... 阅读全文
posted @ 2010-03-26 11:57 myx 阅读(801) 评论(0) 推荐(0) 编辑
用.net导出Yahoo的地址簿
摘要:直接上代码:[代码]测试: YahooExtract yhe = new YahooExtract(); NetworkCredential credential = new NetworkCredential(user,pwd); MailContactList list = new MailContactList(); Console.WriteLine(yhe.Extract(credent... 阅读全文
posted @ 2009-10-16 11:47 myx 阅读(512) 评论(0) 推荐(0) 编辑
asp.net jquery ajax 跨域调用
摘要:js:[代码] <div id="feeds"> </div>t1.ashx[代码] 阅读全文
posted @ 2009-08-27 12:15 myx 阅读(1847) 评论(1) 推荐(0) 编辑
编程遍历页面上所有TextBox控件并给它赋值为string.Empty?
摘要:void EmptyTextBox(ControlCollection cc) { for (int i = 0; i < cc.Count; i++) { if (cc[i].GetType() == typeof(TextBox)) { ((TextBox)cc[i]).Text = string.Empty; } if (cc[i].HasControls()) { EmptyText... 阅读全文
posted @ 2009-03-19 10:43 myx 阅读(801) 评论(0) 推荐(0) 编辑
ajax OPTION
摘要:[代码][代码] 阅读全文
posted @ 2009-02-12 14:28 myx 阅读(428) 评论(0) 推荐(0) 编辑
获取海洋天气预报
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> protected string GetTq(out string publishDate) { string getTxt = string.Empty; ... 阅读全文
posted @ 2009-02-11 11:06 myx 阅读(755) 评论(0) 推荐(0) 编辑
WebImageButton does not change images after being enabled in Javascript
摘要:用这 document.getElementById("WebImageButton1").disabled = true; 要鼠标点击了图片才变。 如果鼠标不点用js控制就得这样写: ig_getWebControlById("WebImageButton1").setEnabled(false); 具体见:http://help.infragistics.com/Help/NetAdva... 阅读全文
posted @ 2009-02-06 12:05 myx 阅读(291) 评论(0) 推荐(0) 编辑
在WebAsyncRefreshPanel控件里面的页面跳转和弹出提示
摘要://页面跳转 private void PageRedirect(string url, Infragistics.WebUI.Misc.WebAsyncRefreshPanel _WebAsyncRefreshPanel) { _WebAsyncRefreshPanel.Controls.Add(new LiteralControl("")); } ... 阅读全文
posted @ 2009-02-06 11:03 myx 阅读(515) 评论(1) 推荐(0) 编辑
datatable to csv
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> /// /// DataTableToCsv /// /// /// 文件名称,不用后缀 /// /// 文件格式 ///每条记... 阅读全文
posted @ 2009-02-04 14:45 myx 阅读(1606) 评论(0) 推荐(0) 编辑
UltraWebGrid 新增加行
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> //取出UltraWebGrid1的key() ArrayList alItemId = new ArrayList(); Ro... 阅读全文
posted @ 2009-01-19 17:59 myx 阅读(477) 评论(0) 推荐(0) 编辑
DataTable
摘要:选择DataTable中的唯一值 在.NET Framework2.0中,选择DataTable等数据源中的唯一值(类似SQL中Distinct的返回结果)非常简单,如下即可: DataTable d = dataSetName.dataTableName.DefaultView.ToTable(true, new string[] { "ColumnName" }); 在.NET Framewo... 阅读全文
posted @ 2008-12-04 17:54 myx 阅读(376) 评论(0) 推荐(0) 编辑
RedirectFromLoginPage转到指定页面
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System.Reflection; PropertyInfo Info; Info = Request.QueryString.GetType... 阅读全文
posted @ 2008-10-09 18:59 myx 阅读(1034) 评论(0) 推荐(0) 编辑

1 2 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示