上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页
摘要: -copy, as implemented by mutable Cocoa classes, alwaysreturns their immutable counterparts. Thus, when an NSMutableArray is sent -copy, it returns an NSArray containing the same objects.一些参考:http://stackoverflow.com/questions/9859719/objective-c-declared-property-attributes-nonatomic-copy-strong-wea 阅读全文
posted @ 2014-02-27 16:50 $walker 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 最近诸事不顺,今天更新/安装nodejs各种包也全都卡在各个环节,用ie设了全局代理貌似也没什么改观,于是到网上找找有没有国内镜像站,倒是发现了cnpmjs.org这个网站被推荐比较多,看他们主页,他们并不志在提供国内镜像,而是一个Private npm registry and web for Enterprise,反正我换成它后,至少是没碰到卡着不动的问题了,方法参见这篇文章。 阅读全文
posted @ 2014-02-25 14:26 $walker 阅读(8059) 评论(0) 推荐(0) 编辑
摘要: angular 1.2以后(或更早?)移除了ng-bind-html-unsafe,那么我要用这个directive来绑定html代码怎么办?随便一测试,它是不支持把html直接传给它的: //html //js $scope.m="text"; //error: [$sce:unsafe] Attempting to use an unsafe value in ... 阅读全文
posted @ 2014-02-20 00:30 $walker 阅读(3043) 评论(0) 推荐(0) 编辑
摘要: 之前不小心看到EF的code first在appharbor上进行migration的时候比较麻烦,今天碰巧也要更新数据库了,顺便试试。modify modelpublic class SiteInfo : Entity{ [JsonProperty("id")] public string UserId { get; set; } [JsonProperty("sitename")] public string SiteName { get; set; } [JsonProperty("socialid")] public stri 阅读全文
posted @ 2014-02-19 00:01 $walker 阅读(1187) 评论(1) 推荐(1) 编辑
摘要: 参考:Preventing Cross-Site Request Forgery (CSRF) AttacksValidating .NET MVC 4 anti forgery tokens in ajax requests 在mvc中,微软提供了一个简单的方法来防止CSRF,就是在前端form表单里加上Anti-Forgery Tokens razor的写法很简单:@using (Html.BeginForm("Manage", "Account")) { @Html.AntiForgeryToken()}后端只需要在action上加上[Valida 阅读全文
posted @ 2014-02-18 16:32 $walker 阅读(2494) 评论(2) 推荐(0) 编辑
摘要: 基础知识,可由此衍生。原文:http://uniapple.net/blog/?p=2050 In this post, I will show you how to upload a file using Ajax (Asynchronous JavaScript and XML) and receive the binary data in Asp.net C#. And it is ult... 阅读全文
posted @ 2014-02-16 18:46 $walker 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 远端删除文件而不影响本地文件git rm [-r]--cached file_or_dir_name利用.gitignore来自动删除所有匹配文件我试过网上推荐的写法git rm --cached git ls-files -i --exclude-from=.gitignore gitcommit -m 'Removed all files that are in the .gitignore'git push origin master --exclude-from=.gitignore顺便可以简写成-X .gitignore,所以是这样:git rm --cached g 阅读全文
posted @ 2014-02-14 12:02 $walker 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 企业内部的包需要通过nuget来管理发布,或者一些不允许上外网的企业,通过自己的nuget服务器来使用nuget,都会考虑到自建一个nuget服务器。本文整理了一些有用的链接和使用心得,以备不时之需。教程NuGet.Server的简单教程官方文档, 注意以下几节即可:Creating and Publishing a PackageConfiguration File and Source Code TransformationsNuspec Reference笔记简单来说,就是创建一个配置文件给msbuild来读取,以生成打包文件(*.nupkg)至于怎么生成,第一个教程已经给出了三种方式( 阅读全文
posted @ 2014-02-11 14:32 $walker 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 有时候我们定义了如{controller}/{action}/{id}之类的路由规则,但是后面还可能跟上一堆可能会有可能不会有,但是路由规则是一样的,如{controller}/{action}/{id}/{usertype}/{group},我们能把id, usertype, group通通设成option吗?几个“可选”的参数显然会打架,maproute提供了一种曲线的方法,就是{*catchName},这个catchName你可以自定义,也就是说,把所有自定义的片段都用一个变量捕获起来,实例如下:routes.MapRoute("MyRoute", "{co 阅读全文
posted @ 2014-01-26 13:20 $walker 阅读(688) 评论(0) 推荐(0) 编辑
摘要: 已测试通过,原文:http://blog.csdn.net/songjinshi/article/details/8945809一、颜色高亮显示针对terminal采用bash模式:编辑 ~/.bash_profile, 加入以下代码:export CLICOLOR=1export LSCOLORS=gxfxaxdxcxegedabagacad保存,然后重启terminal,搞定,恢复正常了.详细讲解代码中的涵义:CLICOLOR: 前景色和背景色的字符串合并值LSCOLORS: 对于不同变量所采用的颜色方案,具体看如下表格:a blackb redc gr... 阅读全文
posted @ 2014-01-23 16:13 $walker 阅读(7351) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页