neo4j连接java目前主要有嵌入式、jdbc和rest api。嵌入式:使用到的lib包在neo4j下载包的lib里(对于windows,不建议下载exe版,因为不包含代码需要的lib包)创建节点和关系:final String DB_PATH = "E:/neo4jdb"; //数据库路径Gr...
分类:
编程语言 时间:
2015-01-18 16:58:17
阅读次数:
408
Question:Givenastringoflowercasecharacters,reorderthemsuchthatthesamecharactersareatleastdistancedfromeachother.Input:{a,b,b},distance=2Output:{b,a,b}http://leetcode.com/2010/05/here-is-another-google-phone-interview.htmlpublicvoidreorder(int[]A,intd)
{
//S..
分类:
其他好文 时间:
2015-01-18 15:51:15
阅读次数:
170
package com.latrobe.spark
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by spark on 15-1-18.
* 计算出每个key对应的value的数量
*/
object CountByKey {
def main(args: Array[String]) {
v...
分类:
其他好文 时间:
2015-01-18 15:48:22
阅读次数:
251
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What co...
分类:
编程语言 时间:
2015-01-18 14:30:02
阅读次数:
239
打开文件或程序'API函数声明Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lp...
分类:
数据库 时间:
2015-01-18 13:10:01
阅读次数:
232
当使用c#自带的MailMessage类发送excel附件时,再次打开excel会提示处于锁定状态。解决思路:Attachment是添加附件的类,邮件发送后没有释放该类public string SendSmtpeMail(string strSmtpServer, string strFrom, ...
标题:Valid Parentheses通过率:27.7%难度:简单Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The b...
分类:
其他好文 时间:
2015-01-18 12:57:08
阅读次数:
130
- G: a vector of strings, find a pair with max of strlen(a) * strlen(b) 1. O(n*k): get std::bitset() of each string 2. O(nlgn): sort strings by leng.....
分类:
其他好文 时间:
2015-01-18 11:48:41
阅读次数:
168
1、直接去掉android:label="@string/app_name"
...
分类:
其他好文 时间:
2015-01-18 10:37:59
阅读次数:
178
早上看到一篇关于变量作用域的文章, 然后我的思维就发散了, 于是有了下面一段代码和注释。。。权当好玩了
package just4fun;
public class SomePlace {
private String longlong = "强龙:个性宣言,权贵的儿子就是diao";
public void compete() {
String longlong =...
分类:
其他好文 时间:
2015-01-18 10:34:58
阅读次数:
115