月份:2015年4月

windows xp下打开火车头采集器报错

今天在windows xp下安装了火车头采集器,无法打开程序,报错:

.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

查了一下,有人提供了这样的解决方法,试了一下,成功:

修改Exe的Config文件,一般是与exe同名,例如test.exe对应test.exe.config,在其中的<configuration>标签内添加如下内容:

<startup> <supportedRuntime version=”v4.0.30319″ /> </startup>

当然,具体的版本号根据实际情况而修改

如果文件夹下没有Config文件,自己创建一个也有效果,内容如下:

<configuration> <startup> <supportedRuntime version=”v4.0.30319″ /> </startup>

</configuration>

翻译:Why Instagram Worked

原文:https://medium.com/backchannel/why-instagram-worked-45dbfeaa37c8

Why Instagram Worked

A co-founder looks back at how a stalled project turned into a historic success

Instagram的联合创始人回顾,一个停滞不前的项目怎么转变成一个历史性的成功案例。

Earlier this month we marked four years since Instagram launched. Throughout the day, I glanced at what time it was, and thought back to what we were doing four years ago:

 

  • 6am: Biking through a misty San Francisco morning to our shared co-working space at Dogpatch Labs.
  • 早说6点:早上骑车穿过雾蒙蒙的旧金山,到我们位于多帕奇实验室的共享的共同办公的地方。
  • 7am: Stomach in knots, Kevin and I scarf down bagels from Crossroads Cafe.
  • 早上7点:Kevin和我在Crossroads狼吞虎咽的吃完一顿百吉饼。
  • 8am: Press embargo lifts, our first users come streaming in.
  • 9am: Kevin and I panic as our tiny server crumbles under the weight of our first-day traffic.
  • 12pm: Relief as we get things sorted out and back up.
  • 2am: Still awake. 25,000 people have signed up.
  • 6am (again): Taking the N train back to the Haight and collapsing.

That first day was a preview of the rest of the year; alternating between giddiness that we might have created something that really resonated, with panic that we wouldn’t be able to keep up with demand, and that the wheels might come off the wagon.

Late night Instagram office in the Dogpatch neighborhood of San Francisco, 2010.

People often ask how much of Instagram’s adoption we anticipated. Working on a startup is a balancing act: being crazy enough to believe your idea can take off, but not crazy enough to miss the signs when it’s clearly not going to. We grappled with both in the year before launching Instagram.

At first, we were building an app called Burbn, a location-based social network written in HTML5. Burbn was well-liked and had a few passionate daily actives, but it wasn’t exactly setting the world on fire. Our attempts at explaining what we were building was often met with blank stares, and we peaked at around 1,000 users. For those early adopters, though, it was a new way of sharing what they were doing out in the world. Many of our favorite updates came from friends who posted to Burbn after putting their photos through some early filter apps, compensating for the lower image sensors on phones like the iPhone 3G.

Kevin and I took a walk down the Embarcadero after an investor meeting, mid-July 2010, and came to a decision. Locking ourselves in the single conference room at Dogpatch Labs, we said out loud what had been bubbling under the surface for weeks: we needed to scope down the product we were building, or risk failure in trying to be too many things at once. It was time to try something different — why don’t we take the photo updates from Burbn and make them into their own product?

Our fundamental idea was that people would want to connect and share experiences out in the real world, through snapshots of their lives. In retrospect, Instagram may seem “obvious” — communication through photos is universal. But products are defined by a series of decisions and assumptions, and our combination of being photos-first and public-by-default would prove to be a combination that solved an unmet need.

Early Instagram sketch by Mike Krieger, 2010

Kevin and I spent much of the next week at Crossroads Café in San Francisco, sketching pages and pages of user interface ideas. Nuggets of UI ideas from Burbn made their way in; photos were large and centered, rather than just thumbnails. Comments were present in-feed rather than hidden behind a link, even though that made our life more difficult in terms of scroll performance. Within two weeks, we had our first version, including Kevin’s first pass at filters. We wanted to learn quickly whether this was something worth exploring further, so we took 100 of our Burbn testers and sent them this email:

“For the last 6 weeks, we’ve been working on a native iPhone app for communicating & sharing in the real world through photos. We’ve taken parts of our HTML5 app experience that got people the most excited and focused on them. This means there are quite a few features that we wouldn’t have been able to do in HTML5, but also means there are elements of the HTML5 app that didn’t make as much sense to carry over. Try to approach this experience as “inspired by webapp Burbn” ☺”

When you have a beta testing group of 100, all you can measure is relative success. Within a couple days of rolling Instagram (then simply called “Codename”) out to that test group, though, we knew we were onto something much bigger. Weekends had always been our peak days, and the first weekend that Instagram was in testers’ hands, the output of that small group already eclipsed what we were seeing on Burbn. Not all of our Burbn users loved it; some left and never came back. We had to drop Android support, at least for the time being, which meant one of our most-engaged Burbn users could not longer participate.

Those who fell in love, though, started documenting their daily lives with dedication, and after some polish and iteration with our beta testers, we launched to the world. Within a week, we were being surprised by how people were using Instagram. Halfway through day one, Kevin turned to me and said, “I don’t know how big this is going to be, but I think there’s something here.” Roughly 100,000 people signed up in the first week.

Mike Krieger’s first official Instagram photo, 2010.

A few days later, an urgent-alert automated phone call from our monitoring systems brought me awake at 3 a.m. At first we were confused; shouldn’t everyone be asleep? The answer, of course, was time zones; Instagram had started to take off in Japan, and our users there had gotten off work and started using Instagram on their commute home, overloading our servers. I couldn’t read any of the captions, but it didn’t matter; I explored Tokyo through snapshots, and fell in love with @umetaturou’s Border Collie Sora.

These border-crossing connections are my favorite thing about what we’re building at Instagram. You see those connections everywhere, in amazing accounts like @everydayafrica, to a gathering of 900 Instagrammers (known as an Instameet) in Jakarta, to an independent illustrator or photographer who is building a following through sheer talent. It’s this time- and space-travel that I’m most excited about continuing to build, whether I’m connecting back with friends and family in Brazil, or seeing the digital footprints of other visitors to a foreign country I find myself in.

At the end of that first all-nighter sprint in October of 2010, Kevin and I looked up, bleary-eyed, from our desks and noticed fireworks above AT&T Park. The Giants were ahead of the Braves in the MLB playoffs, and when we looked at our stats, we noticed a few dozen people were already using Instagram to share their experiences at the stadium. With the Giants in the playoffs again this year and thousands of photos being shared from each game, I love seeing how far we’ve come.


Mike Krieger founded Instagram in 2010 with Kevin Systrom. Both have remained with the company after Facebook purchased it in 2012, with Mike serving as technical lead.

Hello,Growth Hacking !

今天参加公司组织的工程师大会,最有收获的就是一个大牛分享的Growth Hacking环节,之前听说过这个名词,但是没有深入了解。会议结束后,自己查了一些资料,有了进一步的了解。

1、什么是Growth Hacking

“相较于把Growth Hacking看成一组技术驱动的营销工具,我更愿意把Growth Hacking看成一种技术驱动用户增长,又与行为经济学结合的产品思维。”

来源:http://www.forbeschina.com/news/news.php?id=39692

2、Growth Hack4步方法论

确定要提升的用户指标->假设有助于提升指标的所有功能优化->测试并记录各种产品组合效果->找到对提升指标最有效的优化并加以实施

3、Growth Hacking常见指标以及对应产品功能改进

“Growth hacking 现在算是有了自己的一套最佳实践方法,比如优化 landing page、A/B 测试、email 送达率、SEO、content management、大平台整合等等,以此完善 growth hacking 中总结出来的5个过程:Acquisition(用户获取)、Activation(激活注册)、Retention(保留活跃)、Referral(推荐分享)和 Revenue(变现模式)。”

来源:http://www.jianshu.com/p/ca2bfa0b9208

也就是:

1.转化率=注册用户/浏览用户

-简化注册流程

-接入其他平台用户API

-突出注册好处。限时免费等。

2.活跃用户比=1定周期有登录的用户/总用户

-UGC周报(例,知乎周报)

-用户提醒邮件(例,亚马逊特惠邮件提醒)

3.跳出率=只浏览了1个页面就不看的用户/总浏览用户。

-改进内容的易读性、趣味性

-提供浏览相关文章的链接

4.推荐率=有向身边朋友推荐过品牌的用户数/总用户数。

-明确提醒用户,可以通过推荐支持品牌发展。

-CGC用户推荐计划,奖励推荐行为。(例,uber的老用户推荐优惠码)

5.社交媒体提及数

-提供文章的“‘分享”按钮

-策划营销事件

来源:http://www.forbeschina.com/news/news.php?id=39692

4、几个不错的思路

  • 目前几乎所有的公司,产品设计和用户获取是由两个独立的团队完成。更好的获取用户的方法,是我们回到我们的用户,梳理用户的场景。然后再根据场景反推用户获取策略。总能为一部分细分群体找到频率高一点,involve人数多一些,用户密度也比较高的场景,并提供有针对性的服务或者产品的。也就是说:推广要start with customers。从推广的需求出发,针对一部分细分群体设计一些新的产品,这是最可能带来惊喜的地方。
  • PC/WAP 是基于Visits的转换,渠道不外乎,SEO、SEM、展示广告等等,建议所有人都不要忽视WAP渠道,百度搜索渠道量还是很可观的。App是基于设备的,预装、刷榜、官方市场等等。线下找到密度比较高的群体,地推也是不错的方法
  • 所有的渠道整个流量和用户跟踪和转换体系要建立好,每个渠道的转换成本,用户价值等等都需要很好的衡量。同时需要牢记用户价值是有差异的,2/8原则很显著。平均留存、平均价值会掩盖很多东西。这些都需要一套完整的数据体系。也就是说:要设计好的数据跟踪体系,渠道成本,用户长期价值等等。这是完全可控的能做德很好的地方,但是应该说很多公司是做的不够好。
  • 需要结合用户的使用流程,在适当的节点,通过利益等刺激提高用户分享的动力。

来源:知乎回复 http://zhi.hu/faV2

  • 实现增长什么都要做,但中心是analytics…growth hacker的人叫hacker,是所谓有技能有头脑面对问题劈山砍柴(这词用错了?)搞出个方法解决问题的人。

354257b8329b26809fea7be7ff03a0b0_b

 

 

5、几篇不错的文章

知乎提问:什么是 Growth Hacker?

http://www.zhihu.com/question/20629136

知乎话题:Growth Hack

http://www.zhihu.com/topic/19800630

网友翻译的国外案例:

http://superguanvv.lofter.com/post/1cd8ac52_646e797

王登科博文(一个很有想法的90后):

http://www.wdk.pw/742.html

https://medium.com/@michaelx/-7d6f704b64c

待补充

我的2015书单

自己做一个读书计划管理:

序号书名作者分类开始日期结束日期耗时/天进度读书笔记
我爱这哭不出来的浪漫严明0完成查看
《从0到1:开启商业与未来的秘密》彼得·蒂尔0完成查看
1活着余华2015-5-132015-5-174完成查看
2一网打尽 : 贝佐斯与亚马逊时代2015-5-182015-5-235完成查看
3金钱有术知乎2015-5-242015-5-290完成
解忧杂货店2015-5-302015-5-310完成查看
免费0完成
让顾客自己来定价0
只有偏执狂次才能生存0
动物庄园0
19842015-09-082015-10-070完成
美丽新世界0
我们0
创新者的窘境Clayton Christensen0
困境与出路Clayton Christensen0
只有偏执狂才能生存情商0
怪诞行为学产品市场与用户行为必读 2015-07-012015-07-120完成
娱乐至死0
用户体验的要素偏重于Web产品经理
无价营销完成
麦肯锡教我的写作武器
史玉柱自述:我的营销心得 营销2015-07-132015-07-28完成
神们自己
17天搞定gre单词学习方法2015-07-19
理解媒介:论人的延伸
MBA教不了的创富课雕爷2015-07-282015-08-09完成
营销管理科特勒
创业维艰本·霍洛维茨2015-08-312015-08-09完成
30岁后,你拿什么养活自己张笑恒2015-06-302015-07-14完成
社群营销:方法、技巧与实践秋叶,秦阳 等
当我谈跑步时我谈些什么村上春树2015-10-072015-10-18完成
用户体验要素:以用户为中心的产品设计(第二版)2015-10-20
遇见孩子,遇见更好的自己2015-12-12完成
小王子2015-12-12
了不起的盖茨比2015-12-182015-12-22完成

 

 

 


此表格用wp的插件WP-Table Reloaded生成:

https://wordpress.org/support/plugin/wp-table-reloaded

最新版本改名为tablepress,需要最新的wordpress版本才能安装:

TablePress

Python模块学习:BeautifulSoup入门笔记

今天准备使用python-wordpress-xmlrpc模块来采集内容并自动发布到wordpress,使用正则表达式模块re解析html比较麻烦,不好用,直接学习一下更易用的BeautifulSoup吧。

Beautiful Soup 是用Python写的一个HTML/XML的解析器,它可以很好的处理不规范标记并生成剖析树(parse tree)。 它提供简单又常用的导航(navigating),搜索以及修改剖析树的操作。它可以大大节省你的编程时间。

1、安装BeautifulSoup

下载解压,然后安装:

shell#python setup.py install

或者用pip安装:

shell#pip install beautifulsoup4

测试安装是否成功。键入 import BeautifulSoup 如果没有异常,即成功安装

2、使用BeautifulSoup

2.1  导入BeautifulSoup ,并创建BeautifulSoup 对象

  1. from BeautifulSoup import BeautifulSoup           # HTML
  2. from BeautifulSoup import BeautifulStoneSoup      # XML
  3. import BeautifulSoup                              # ALL
  4. doc = [
  5.     ‘<html><head><title>Page title</title></head>’,
  6.     ‘<body><p id=”firstpara” align=”center”>This is paragraph <b>one</b>.’,
  7.     ‘<p id=”secondpara” align=”blah”>This is paragraph <b>two</b>.’,
  8.     ‘</html>’
  9. ]
  10. # BeautifulSoup 接受一个字符串参数
  11. soup = BeautifulSoup(”.join(doc))

 

百度的头条,让我无语

刚才无意中扫了一眼百度的头条新闻,都是些什么内容!为了博取网友眼球,引起关注,推送的这些新闻除了负面,就是变态新闻,就不能多点正能量的头条吗?百度如此,就别提其他媒体了。

 

孩子每天晒太阳,还要补充维生素D吗?

自从有了娃,就开始关注崔玉涛医生的微信公众号,很有帮助。现在开始做个收集,将一些有用的育儿经验归纳一下。

有的家长很重视日光浴,会根据给孩子晒日光浴时间的长短,调整口服维生素D的摄入量。虽然阳光会促进维生素D的合成,但也不要因此神话阳光的这种作用,目前还没有数据显示光照时间与维生素D产生之间的关系,况且还有晒伤的风险。所以选择纯母乳喂养和混合喂养的婴儿,不要因晒太阳时间的长短,口服维生素D的量就有所增减。 纯母乳喂养和混合喂养婴儿,会因母乳中维生素D含量不足而导致缺乏维生素D,所以要从婴儿满两周~两个月开始,每天口服200至400国际单位维生素D,何时停止,要根据喂养方式而定。如果婴儿接受纯母乳喂养已达6个月,即使已开始添加辅食仍需坚持维生素D的补充,如果添加辅食正常且母乳量充足,在孩子1岁至1.5岁即可停止补充维生素D。对于需要添加一些配方粉的混合喂养婴儿,家长可根据配方粉罐上的成分表,按照婴儿配方粉的食量计算一下,酌情考虑每天应补充维生素D的量。 如果婴儿很早开始接受的是全配方粉喂养,每天可达700ml,就可满足每日维生素D的需求,不必补充了。 对于大些的孩子,普通鲜牛奶中维生素D的含量不足,家长应该给儿童选择强化维生素D的鲜牛乳或者给孩子补充维生素D制剂。 有的家长为了使维生素D的吸收效果更佳,会考虑到给孩子注射维生素D。不推荐这种方法,以免注射过量,出现维生素D中毒。

———来自崔玉涛医生的微信公众号。

python小程序,处理kindle的My Clippings.txt文件

用kindle看书做标注,看完以后想把批注导出然后做读书笔记,发现不是很方便,现在使用一个在线转换的工具(https://www.clippings.io/),将My Clippings.txt(位于kindle的Document文件夹下)文件转换,提取出每本书的批注。

这个在线工具用的还行,但是现在自己正在学习python,想到python处理这个文件应该是没问题的,先上网一搜,有很多人已经写过了。但是找了两个,都不能用,可能kindle的My Clippings.txt文件格式有所变化,代码不适用了。自己在他们的代码基础上做一下修改吧。

  1. import os
  2. output_folder = os.path.join(‘output’)
  3. if not os.path.exists(output_folder):
  4.     os.mkdir(output_folder)
  5. title_filename = os.path.join(output_folder,’ ! titleAll.txt’)
  6. with open(‘My Clippings.txt’,’r’) as clipping_file:
  7.     line = clipping_file.readlines()
  8.     titleline = set()
  9.     for i in rangelen(line) ):
  10.         if line[i] == ‘==========\n’:
  11.             titleline.add(line[i-4])
  12. with open(title_filename,’w’) as title_file:
  13.     for i in titleline:
  14.         title_file.write(i)
  15. for x in titleline:
  16.     x2 = x.decode(‘utf-8’)
  17.     filename = os.path.join(output_folder, x2.strip() +’.txt’)
  18.     with open(filename,’w’) as out_file:
  19.         with open(‘My Clippings.txt’,’r’) as clipping_file:
  20.             line = clipping_file.readlines()
  21.             for i in rangelen(line) ):
  22.                 if x == line[i]:
  23.                     out_file.write(line[i+1])
  24.                     out_file.write(line[i+2])
  25.                     out_file.write(line[i+3])
  26.                     out_file.write(line[i+4])

使用方法:

1、将My Clippings.txt与kindleSpliter.py置于相同文件夹
2、运行kindleSpliter.py,生成output文件夹
3、output文件夹中有以书名命名的txt文件以及” ! titleAll.txt”
4、” ! titleAll.txt”包含所有做过笔记书摘的书名列表
5、有新的书摘时,更新My Clippings.txt并再次运行kindleSpliter.py,所有导出的txt会自动更新

kindle的批注并不包括章节信息,这点kindle做得不好,光看批注,不知道是哪章的,根本不知道上下文意思。有没有办法修改kindle的系统呢?

原代码地址:https://github.com/mescoda/kindleSpliter

Snip20150402_5

修改WordPress后台登录地址,提高安全性

分享下通过修改WordPress后台登录地址,提高WordPress安全性的方法。将下面的代码添加到当前主题的 functions.php 文件:

  1. //保护后台登录
  2. add_action(‘login_enqueue_scripts’,’login_protection’);
  3. function login_protection(){
  4.     if($_GET[‘xxx’] != ‘password’)header(‘Location: http://www.xiangphone.com/’);  
  5. }

wordpress文章目录免插件的简单实现方法

文章内目录插件Content Index for WordPress已经很久不更新了,样式不太好看,自己也不会调,找了另外一个不用插件的方式实现文章内目录索引。

文章目录免插件的简单实现方法

其实现这样的一个功能还是比较简单的,也就是在文章内容中插进标题标签,然后弄成目录就是了,下面是我写的一个简单的代码,用文本编辑器打开当前主题目录下的functions.php,将以下代码放到 <?php 下面就可以(记得用UTF-8编码保存,否则中文会乱码):

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
function article_index($content) {
/**
* 名称:文章目录插件
* 作者:露兜
* 博客:http://www.ludou.org/
* 最后修改:2015年3月20日
*/

$matches = array();
$ul_li = ;

$r = “/<h3>([^<]+)<\/h3>/im”;

if(is_singular() && preg_match_all($r, $content, $matches)) {
foreach($matches[1] as $num => $title) {
$title = trim(strip_tags($title));
$content = str_replace($matches[0][$num], ‘<h3 id=”title-‘.$num.‘”>’.$title.‘</h3>’, $content);
$ul_li .= ‘<li><a href=”#title-‘.$num.‘” title=”‘.$title.‘”>’.$title.“</a></li>\n;
}

$content = \n<div id=\”article-index\”>
<strong>文章目录</strong>
<ul id=\”index-ul\”>\n
. $ul_li . “</ul>
</div>\n
. $content;
}

return $content;
}

add_filter( ‘the_content’, ‘article_index’ );

使用说明

在编辑文章的时候,切换到HTML模式,将需要添加到目录中的标题用<h3></h3>括起来就可以了,如<h3>我是索引标题</h3>。当然你也可以用其他标签,如<h1><p>等,将以上代码第12和17行中的h3改成你自己的标签名称就可以了。

上面这段代码只是在文章显示的时候插入文章目录,并不会修改你的文章内容。以上代码也不包括样式美化代码,所以只添加以上代码,文章目录看起来一篇混乱,所以你得自己添加一些css代码来美化一下这个目录。如果你不会css,可以用我写的,将以下css代码放到主题目录下的style.css中就可以了(并不是每个网站都适用):

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
#article-index {
-moz-border-radius: 6px 6px 6px 6px;
border: 1px solid #DEDFE1;
float: right;
margin: 0 0 15px 15px;
padding: 0 6px;
width: 200px;
line-height: 23px;
}
#article-index strong {
border-bottom: 1px dashed #DDDDDD;
display: block;
line-height: 30px;
padding: 0 4px;
}
#index-ul {
margin: 0;
padding-bottom: 10px;
}
#index-ul li {
background: none repeat scroll 0 0 transparent;
list-style-type: disc;
padding: 0;
margin-left: 20px;
}

功能更强大的文章目录插件

以上代码的功能比较单一,只有单级目录,不能实现多层级的复杂而完善的索引目录功能,如果你需要这些功能可以试试这以下这几个插件,使用也都比较简单:

  • Content Index for WordPress(很久不更新了)
  • jQuery Table of Contents | 没有用过
  • WP-TOC (没用过)激活该插件后,在文章中插入[toc depth=”2″]即可,2表示h2、h3、h4…等都会被插进目录,类推[toc depth=”3″]则表示h3、h4…等都会被插进目录