- 博客(27)
- 资源 (7)
- 收藏
- 关注
原创 windows上pip install出错怎么办
可以下载编译好的二进制包,比如http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
2016-09-24 23:39:23
652
原创 解决AngularJS在安卓WebView中跳转时不刷新的问题
终于碰到坑,AngularJS在安卓WebView中,无论是用$location.path()还是用$window.location.href()都不刷新,加了$window.location.reload()也不好使。最后用<a href="..." target="_self">解决的。
2015-07-26 00:10:58
2163
原创 lamdas
C#delegate int del(int i);static void Main(string[] args){ del myDelegate = x => x * x; int j = myDelegate(5); //j = 25}Javapublic class ThreadTest { public static void main(String
2015-01-09 23:11:57
550
原创 Java EE单元测试笔记
1. 单元测试 1.1 测试对象。1) OracleResource 是一个 Enterprise JavaBeans (EJB) 3.1 bean,用(REST) 来公开他的预言。@Path("javafuture")@Statelesspublic class OracleResource { @Inject Instance company; @In
2014-12-28 20:51:14
742
5
原创 Web 测试工具合集
1. SeleniumCommonly Used Selenium CommandsTo conclude our introduction of Selenium, we’ll show you a few typical Seleniumcommands. These are probably the most commonly used commands for buildi
2014-12-15 23:30:58
693
原创 Java基础语法
public class Hello{ public static void main(String[] args) { }}Arrayint[] anArray=new int[10];anArray[0] = 100;char[] array = {'d', 'e', 'c', 'a', 'f', 'f', 'e', '
2014-12-10 09:36:21
435
原创 R maxent
只是简单走一遍> library(maxent)> datadata 大体是这样的 Article_IDDateTitleSubjectTopic.Code1412461-Jan-96Nation's Smaller Jails Struggle T
2014-12-03 10:06:19
2756
2
原创 NLTK学习笔记(7)- Extracting information from text
先来一张信息提取流程图1. NP Trunking用正则表达式的一个简单例子>>> sentence = [("the", "DT"), ("little", "JJ"), ("yellow", "JJ"),... ("dog", "NN"), ("barked", "VBD"), ("at", "IN"), ("the", "DT"), ("cat", "NN")]>>
2014-12-01 22:54:28
1875
原创 NLTK学习笔记(6)
1. 探索上下文语境(Exploiting Context)上下文语境特征往往提供关于正确标记的强大线索——例如:标注词fly,如果知道它前面的词是“a”将使我们能够确定它是一个名词,而不是一个动词。如果前面的词是“to”显然它是一个动词。所以今天我们构造的词性分类器,它的特征检测器检查一个词出现的上下文以便决定应该分配的词性标记。特别的,前面的词被作为一个特征。>>> def pos
2014-12-01 20:22:36
1132
原创 NLTK 学习笔记(5)
1. 文档分类Step1: 我们根据已经分类好的语料库构建一个前2000个最频繁词的链表。然后,定义一个特征提取器,简单地检查这些词是否在一个给定的文档中。>>> from nltk.corpus import movie_reviews>>> documents = [(list(movie_reviews.words(fileid)), category)... for
2014-12-01 16:08:55
1013
转载 Porting your code to NLTK 3.0
Original link: https://github.com/nltk/nltk/wiki/Porting-your-code-to-NLTK-3.0NLTK 3.0 contains a number of interface changes. These are being incorporated into a new version of the NLTK book, upd
2014-12-01 15:54:27
821
原创 NLTK 学习笔记(4)
文本分类1. 有监督分类先来个经典的图(1) 性别判定我们使用特征提取器处理名称数据,并划分特征集的结果链表为一个训练集和一个测试集。训练集用于训练一个新的“朴素贝叶斯”分类器。之后,我们在上面测试一些没有出现在训练数据中的名字(Neo and Trinity from 黑客帝国):>>> def gender_features(word):... retur
2014-11-30 23:08:46
1027
原创 nltk 3.0 的parse
怕自己忘了,先记下来。原文8-2的程序grammar2 = nltk.parse_cfg("""S -> NP VPNP -> Det Nom | PropNNom -> Adj Nom | NVP -> V Adj | V NP | V S | V NP PPPP -> P NPPropN -> 'Buster' | 'Chatterer' | 'Joe'Det -> 'the
2014-11-30 19:20:37
1389
原创 NLTK 学习笔记(3)
分类和标注词汇(tagging)1. POS tagger>>> text = nltk.word_tokenize("And now for something completely different")>>> nltk.pos_tag(text)[('And', 'CC'), ('now', 'RB'), ('for', 'IN'), ('something', 'NN'), (
2014-11-30 13:00:37
3113
原创 NLTK 学习笔记(2)
POS速查表标记含义例子ADJ形容词new, good, high, special, big, localADV副词really, already, still, early, nowCNJ连词and, or,
2014-11-30 10:57:41
649
原创 NLTK 学习笔记(1)
1. 规范化文本(Normalize)1.1 分词 (Tokenize/Segment)(1) 词干提取(Steaming)【原文】Porter 和Lancaster 词干提取器按照它们自己的规则剥离词缀。请注意Porter 词干提取器正确处理了词lying(将它映射为lie ),而Lancaster 词干提取器并没有处理好。我们完全按照书上的例子来试一下:>>> raw
2014-11-30 09:17:11
1770
原创 从PHP+JSON说起
最近小试iOS应用的牛刀(恩,吹牛的牛~~),遇到了一些经典的问题,记录一下。主要用代码说话~1. 简单式<?php$test=array("id"=>"1","name"=>"Liu Daye");echo json_encode($test);?>输出结果: {"id":"1","name":"Liu Daye"}真方便。2. 中文<?php$test=arr
2013-04-29 13:29:27
458
转载 Dart VS. JavaScript - 上篇:JavaScript 的历史包袱
文章转载自:谷奥——探寻谷歌的奥秘 [http://www.guao.hk]Dart VS. JavaScript - 上篇:JavaScript 的历史包袱2011年10月18日 161 敬告:本文作者没写过上万行的代码,文中信息全部为道听途说,未经查证;文中观点可能偏颇狭隘一根筋,谨做抛砖引玉之
2011-10-22 20:00:36
588
转载 水木:java进程 代码注入 (Powered by zms)
java进程 代码注入 (Powered by zms)http://www.btsmth.com/show_topic.php?en_name=Java&gid=277398楼主 zms (小美)此代码注入非依赖注入,是hack里的 代码注入场景是这样滴
2011-09-30 13:03:57
1466
转载 转自水木:快速读懂Ruby代码问答
快速读懂Ruby代码问答http://www.btsmth.com/show_topic.php?en_name=Programming&gid=156911楼主 FenRagwort(Secluded Life)【 以下文字转载自 Ruby 讨论区 】发信人
2011-09-19 11:15:33
1108
原创 码农眼中的HTML5和Flash 之Video
既是码农,自不多言,上码:Flex的Video控件 <mx:VideoDisplay id="video" x="50" y="25" width="700" height="350" autoPlay="true" bufferTi
2011-08-22 23:20:47
863
原创 Effective Perl
<br /><br />netbooty-dev-client-5:~ labuser$ perl -e '"adsf bbb"=~/(?=.*(adsf))(?=.*(bbb)).*$/; print $1." ".$2."/n";'<br />adsf bbb<br />netbooty-dev-client-5:~ labuser$ perl -e '"bbb adsf"=~/(?=.*(adsf))(?=.*(bbb)).*$/; print $1." ".$2."/n";'<br />adsf b
2011-03-24 16:01:00
388
原创 Java Clipboard
<br />import java.awt.AWTException;import java.awt.Robot;import java.awt.Toolkit;import java.awt.datatransfer.Clipboard;import java.awt.datatransfer.DataFlavor;import java.awt.datatransfer.StringSelection;import java.awt.datatransfer.Transferab
2011-03-24 15:59:00
1109
原创 Robot and Clipboard
import java.awt.AWTException;import java.awt.Robot;import java.awt.Toolkit;import java.awt.datatransfer.Clipboard;import java.awt.datatransfer.DataFlavor;import java.awt.datatransfer.StringSelection;import java.awt.datatransfer.Transferable;i
2010-08-27 11:31:00
455
原创 Send "aaa" to NotePad through handle
<br /> HWND hW=FindWindowEx(hWndTmp, NULL, "Edit", NULL); //hWndTmp is handle of Notepad got from WinSpy<br /> ::SendMessage(hW,WM_SETTEXT,0,(LPARAM)"aaa" );
2010-08-23 23:53:00
298
cusolver64_10.zip
2021-01-30
OBS-Studio-25.0.4-Full-Installer-x64.exe
2020-04-11
virt-manager-0.9.0-31
2017-09-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人