手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:python

macjournal打开隐藏选项

 Macjournal是一款??软件。这个问号,我实在不知道怎么说,主要是因为:

  1. 它支持wordpress等的导入导出,也能将写的文章发布到wordpress上面
  2. 它也有日程
  3. 它也能写作,专门有一个book的模版
  4. 笔记也能够按日历查看还有记录等
  5. 可对单一文章进行特殊标识:打tag,设置地点,rating,设置心情。。。等等,我晶,太多了吧?比如设置颜色、设置。。。。
我用它来是做笔记的,本来是用evernote,但新版的evernote实在是不支持层级关系了。觉得不爽,所以还是一咬牙换成了macjournal,可以设置备份,我将备份扔到了快盘的目录下。
 
跑题了跑题了,我这里是说,如何打开macjournal的隐藏选项,因为隐藏选项支持markdown。。。
1、进入设置
2、点击advance
3、按住cmd+ctl键,你会发现,原来的:reveal in fiider 变了,变成打开隐藏选项
4、点击,打开了隐藏选项,oh yeah,居然这么多??
大小: 152.99 K
尺寸: 440 x 376
浏览: 1706 次
点击打开新窗口浏览全图
 
 PS:如果你的版本不是6.x,建议你看这个:http://danschimpf.com/hiddenprefs.html
 
 

Tags: macjournal

JS 刷新页面的几个技巧

做WEB开发,有时候会需要在获取数据后重新刷新页面,如果删除一条数据时,就需要刷新一下显示。以前很多时候,我都是用location.reload()来解决的。
今天再看到某篇 文章的时候才发现,原来还有那么多的技巧,一下子傻眼了。

JavaScript代码
  1. history.go(0)   
  2. location.reload()   
  3. location=location   
  4. location.assign(location)   
  5. document.execCommand('Refresh')   
  6. window.navigate(location)   
  7. location.replace(location)   
  8. document.URL=location.href    

第一种,我真的没想过。第三种,第七种我看过,其他的还。。。。真没有注意过。
我OUT了。。

Tags: js, refresh

附上昨天晚上进制转换的代码

写的烂,不要见怪。。

JavaScript代码
  1.  <script>  
  2. function QRank(scores){  
  3.     this._scores=this._rank = 0;  
  4.     this._max = 10000;  
  5.     this.setScore(scores);  
  6. }  
  7. QRank.prototype.setScore = function(scores){  
  8.     this._scores = parseInt(scores);  
  9. }  
  10. QRank.prototype.getScore = function(){  
  11.     return this._scores;  
  12. }  
  13. QRank.prototype.setRank = function(){  
  14.     //this._rank = Math.floor(Math.sqrt(this._scores+4));  
  15.     var score = this.getScore();  
  16.     var j=0;  
  17.     for(var i=0;i<this._max;i++){  
  18.         if(this.getScore() < j){  
  19.             this._rank = (i-1);  
  20.             break;  
  21.         }  
  22.         j+=(5+i*2);  
  23.     }     
  24. }  
  25. QRank.prototype.getRank = function(){  
  26.     return this._rank;  
  27. }  
  28. QRank.prototype.getStar = function(){  
  29.     var rank;  
  30.     if((rank = this.getRank()) == 0){  
  31.         this.setRank();  
  32.         rank = this.getRank();  
  33.     }  
  34.     var rank4 = rank.toString(4).split("").reverse(); //convert  
  35.     var icon = '';  
  36.     var iconarr = ['☆','★','○','●','$'];  //对应,星星,月亮,太阳,皇冠,美元对应未知。
  37.     for (var i in rank4){  
  38.         icon = iconarr[i].repeat(rank4[i]) + icon;  
  39.     }  
  40.     document.write(icon);  
  41. }  
  42. String.prototype.repeat = function(num){  
  43.     str = [];  
  44.     for (var i=0;i <num ; i++){  
  45.         str.push(this.toString().split(""));  
  46.     }  
  47.     return str.join("");  
  48. }  
  49. var q = new QRank(1000);  
  50. q.getStar();  
  51. alert(q.getRank());  
  52.  </script>  

Tags: qq, rank

郁闷

郁闷。春节没一天睡的好的,吵啊,外面的鞭炮声就没停过,再加上又喝了点酒。比上班累多了,原来准备写点自己的东西的计划全乱了,到现在还头疼。。。。

自 WAP 发表

YUI PHP Loader Utility

YUI是一个低调又强大的框架。你不能说它有什么,但它确实就存在着。。。
jQuery是Yii框架自带的一个工具,比如ZII里集成的全是JQuery,但YUI也是有着自己的工具,比如这个YUI PHP Load Ulility

The YUI PHP Loader Utility is a server-side utility that allows you to load specific YUI components and their dependencies into your page via PHP. YUI PHP Loader can operate as a holistic solution by loading all of your necessary YUI components, or it can be used to add one or more components to a page on which some YUI content already exists.

YUI also contains a client-side loader, which provides similar functionality from JavaScript.

YUI PHP Loader adds value in the following ways:

  1. Reliable, sorted loading of dependencies: YUI comprises more than two-dozen components, many of which work together to provide the best possible compromise between compartmentalization and code reuse. Because of this, YUI components often need to load with specific dependencies in a specific order. YUI PHP Loader understands which components depend on one another, and based on this knowledge it ensures that the right resources are loaded in the right order.
  2. Automatic use of rolled-up files. YUI PHP Loader knows about all of the built-in rollup files that ship with YUI — like the yahoo-dom-event.js file that contains the Yahoo Global Object, the Dom Collection, and the Event Utility, three components that are commonly used together. By automatically using rolled-up files when it makes sense to do so, the YUI PHP Loader helps you reduce HTTP requests and thereby keep your page as efficient as possible.

As you think about how you want to load YUI on the page, you may find it useful to refer to this overview of some of the most common loading strategies and their relative merits:

YUI的CSS其实也不错,现在细想想如果不是当年YAHOO那么强势的推PHP,如今的PHP也不会被这么多公司所能够接受吧。google是在强推python,虽然现在有着go语言,但python也正在被越来越多的公司所接受了,比如它的兼容性,它的运行速度。。。我还是比较喜欢的。。。。。。

Tags: yui, javascript, framework, jquery, yii

Records:912