Quantcast
Browsing all 35570 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Python与MySQL首次交互

             前两天在工作之余研究了一下Python,对基础有了大致了解,就想拿她很MqSQL交互一下。 一开始就遇到了问题,要import...

View Article


Image may be NSFW.
Clik here to view.

easyhadoop初识以及各种问题

版本:easyhadoop 1.2.1,操作系统:Centos 6.4; 首先,我要说的是要用对版本,这点很重要。我使用ubuntu12.04 64bit 的虚拟机是不行的,安装直接报错。所以就下载了centos的iso,好像最新的比较好找,所以就下载了6.4的。下面就一步一步来看我的安装吧:...

View Article


CF round#202 A (13.09.28)

A. Cinema Line time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The new "Die Hard" movie has just been released! There are n people at the...

View Article

整型数组处理算法(六)合并两个数组

给定含有m、n个元素的两个有序(非降序)整型数组a和b。 合并两个数组中的元素到整型数组c,要求去除重复元素并保持c有序(非降序)。 例子如下: a = 2,3,4,6,8,9 b = 7,9,10 c = 2,3,4,6,7,8,9,10 实现如下: // 合并两个含有nA、nB个元素的有序数组 void Merge(int *a, int *b, int *c, int nA, int nB,...

View Article

Leetcode: Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total...

View Article


Image may be NSFW.
Clik here to view.

BNU 12680 Jupiter Atacks! (线段树)

题意:给定一个区间,,两种操作,一种是将x的值赋为y,另一种为询问区间(x,y)的sum值,此处sum值的运算为: H(fi,..., fj) = Bkfj-k    ( mod P) 例如: H(f2,..., f5) = B^0 * f5 + B^1 * f4 + B^2 * f3 + B^3 * f2 ( mod P) 这题隐藏的好深~~~...

View Article

应该在什么时候使用Hadoop

...

View Article

宝贵财富

维持两月的创业历程,交给了我人生一笔不朽的财富! 总结过往得失,如开复所言:我确实做了太过极端的选择;但事分两面,如果当时的冲动离开,又怎么会今日的宝贵经验;试问人生有什么比做选择来的珍贵,感激自己的恍然醒悟~~ 经验总结: 1.没有丰富经验,确实不该太过盲动,三思后行,绝不为过!...

View Article


c\c++ 复习基础要点04 C与C++程序的内存结构的不同

C与C++内存机制的不同   C与C++的内存机制虽然非常相似,但还是有些不同的地方   一.C内存机制 1.      栈(Stack): 栈内存只在程序运行时出现,在函数内部使用的变量、函数的参数以及返回值将使用栈空间,栈空间由编译器自动分配和释放。 2.      堆(Heep):...

View Article


srm 592 div 2

很少做TC,第一次写报告。 第一题: 题目意思: 有n个不同的数,求第二小的m个的和。 解题思路: 贪心,从小到大排序。去掉第m个加上第m+1个即可。 代码: #include<iostream> #include<cmath> #include<cstdio> #include<cstdlib> #include<string>...

View Article

Leetcode: Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where...

View Article

linux系统(centos)下安装Tomcat详细教程!!!

为了在网络上挂载一个WEB,作为android软件的WEB后台,特地买了一个月的服务器,还是linux的!刚开始还以为能像windows那样远程桌面,觉得很简单。后台买到才知道,尼玛都是DOS命令行+一个类似FTP,这就是你管理服务器的全部工具了。为此,我特地花了好几天学了点linux,没办法,谁叫linux便宜呢 如何连接上传您的linux服务器我不多说了,自己网上查。 一、安装JDK...

View Article

整型数组处理算法(七)重排问题

给定含有n个元素的整型数组a,其中包括0元素和非0元素,对数组进行排序,要求: 1. 排序后所有0元素在前,所有非零元素在后,且非零元素排序前后相对位置不变 2. 不能使用额外存储空间 例子如下: 输入 0, 3, 0, 2, 1, 0, 0 输出 0, 0, 0, 0, 3, 2, 1 分析:...

View Article


Leetcode: Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings. string longestCommonPrefix(vector<string> &strs) { // Start typing your C/C++ solution below // DO NOT...

View Article

Codeforces Round #202 (Div. 2) B.Color the Fence

大坑题啊大坑题 以为过了 5 2 2 2 2 2 2 2 2 3 就对了的。 结果。。。 19 9 9 9 9 9 9 5 6 8 输出 987 哈哈哈 跟上面那种是一样的原理。先刷小的。刷不够了换一个小的加剩余的  看能不能凑一个大的 但是凑了一个大的以后呢。可能还有余数。那就还要去凑。 #include <iostream> #include <cstdio>...

View Article


Image may be NSFW.
Clik here to view.

我的Android进阶之旅------>Android之动画之Frame Animation实例

============================首先看看官网上关于Frame animation的介绍================================ 地址:http://developer.android.com/guide/topics/resources/animation-resource.html#Frame Frame animation An...

View Article

Leetcode: Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For...

View Article


Windows Server 2012 R2超级虚拟化之九 数据中心漫步App Controller 2012 R2

                                               Windows Server 2012 R2超级虚拟化之九 数据中心漫步App Controller 2012 R2 App Controller 提供一般的自助服务体验,可以帮助你在私有云和公有云内轻松配置、部署以及管理虚拟机和服务。注意App Controller 2012...

View Article

CF#202DIV2: A. Cinema Line

http://codeforces.com/contest/349/problem/A   The new "Die Hard" movie has just been released! There are n people at the cinema box office standing in a huge line. Each of them has a single100,50 or...

View Article

CF#202DIV2:B. Color the Fence

http://codeforces.com/contest/349/problem/B Igor has fallen in love with Tanya. Now Igor wants to show his feelings and write a number on the fence opposite to Tanya's house. Igor thinks that the...

View Article
Browsing all 35570 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>