Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
427
JsonTools
package com.example.weather_json.tools;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import co...
分类:
Web程序 时间:
2014-04-29 13:37:21
阅读次数:
1039
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
398
1.修改/boot/grub/grub.cfg的权限
2打开grub.cfg这个文件,vim grub.cfg,找到下图当中的 set timeout=-1
.
将"set timeout=-1" 修改为"set timeout=0"
这一方法将解决---意外关机后界面将停留在grub的问题...
分类:
其他好文 时间:
2014-04-29 13:25:20
阅读次数:
282
jdbc驱动到官网下载,放在jdk的相关目录下面,或者jar文件加入到工程下面
package test_mysql;
import java.sql.*;
import java.util.Set;
public class testjdbc {
public static Connection getConnection() throws ClassNotFoundException, S...
分类:
数据库 时间:
2014-04-29 13:22:20
阅读次数:
428
实现一个登陆系统。
思路:
1 使用map,在map中的就是已经注册的了
2 使用数据结构保存用户名,是否登陆和密码
3 使用if else判断处理第一个字符串-命令
类似很多人都写的什么图书馆管理系统,什么信息系统之类的登陆控制管理,都是很简单的东西,一步一步写就不会错了,完成速度相当于打字速度。...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
298
set容器是以红黑树容器为基础实现的,在其基础上稍加改变接口即可
#ifndef MY_SET_H_INCLUDED
#define MY_SET_H_INCLUDED
#include"my_rb_tree.h"
namespace juine
{
template
struct identity
{
const T& operator()(cons...
分类:
其他好文 时间:
2014-04-29 13:16:20
阅读次数:
376
建立elements目录
mkdir -p elements/lamp/install.d/
vim 70-lamp
#!/bin/bash
set -eux
install-packages wordpress mariadb-server httpd memcached
生成一个带wordpress的镜像
export ELEMENTS_PATH=...
分类:
其他好文 时间:
2014-04-29 13:14:21
阅读次数:
475
参考了别人的demo之后发现建立一个管理类看起来舒服些,显得比较有条理……
但在建立与服务器连接当中,发现
Connect Error: {
NSLocalizedDescription = "You must set myJID before calling connect.";
}
这样的一个问题,知道是jid没有设置好,但是jid怎么设置呢?今天仍然没有弄清,如果有清楚...
分类:
其他好文 时间:
2014-04-29 13:13:20
阅读次数:
352