码迷,mamicode.com
首页 > 其他好文
Find all the permutations of a string
就是permutations II考虑有重复字母的情况。String str = "someString"; char[] charArray = str.toCharArray();对char array进行排序:Arrays.sort(charArray)之后再把CharArray转化成stri...
分类:其他好文   时间:2016-01-23 07:57:10    阅读次数:129
TableLayout
分类:其他好文   时间:2016-01-23 07:58:30    阅读次数:122
Relativelayout
分类:其他好文   时间:2016-01-23 07:58:27    阅读次数:125
Count the number of occurrences in a sorted array
Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[]. Expected time complexity is O(Logn)Examples: I....
分类:其他好文   时间:2016-01-23 07:56:01    阅读次数:134
Ruby on Rails入门篇
Ruby是一门面向对象的脚本语言。Ruby On Rails简称为RoR或Rails,是按照MVC结构开发的开源网络应用框架。设计原则:Don't repeat yourself和Conventions over ConfigurationRubyGems是Ruby语言的包管理工具。学习资料:htt...
分类:其他好文   时间:2016-01-23 07:56:47    阅读次数:197
mongo .update
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},false,false) 存在更新一条记录,不存在不插入upsert,multidb.classes.update({"count":{$gt:20}},{$set:{"name":"...
分类:其他好文   时间:2016-01-23 07:56:01    阅读次数:178
找到所有变位词
typedef std::list List;typedef std::map Map;Map getAnagrams(List& input){ Map result; for (const auto& s : input){ auto key = s; ...
分类:其他好文   时间:2016-01-23 07:57:35    阅读次数:158
hdu 1978 How many ways(dp)
Problem Description这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下: 1.机器人一开始在棋盘的起始点并有起始点所标有的能量。 2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。 3.机器人不能在原地停留。 4...
分类:其他好文   时间:2016-01-23 07:54:05    阅读次数:144
Queue 笔记
队列:QueueQueue.Queue(maxsize) FIFO先进先出Queue.LifoQueue(maxsize) LIFO后进先出Queue.PriorityQueue(maxsize) 优先级队列介绍一下此包中的常用方法: Queue.qsize() 返回队列的大小 Queue.empt...
分类:其他好文   时间:2016-01-23 07:54:16    阅读次数:139
五布局
layout_gravity调整该布局相对父布局的位置gravity是调整该布局中子布局的位置
分类:其他好文   时间:2016-01-23 07:56:30    阅读次数:135
*Tree child->parent relationships
Given a list of child->parent relationships, build a binary tree out of it. All the element Ids inside the tree are unique.Example:Given the following...
分类:其他好文   时间:2016-01-23 07:54:09    阅读次数:138
uwsgi.xml
uwsgi.xml 中配置文件django_wsgi而和managy同目录下 我建立的文件为 django_uwsgi.py 两个名字不一致,因此启动的时候报Internal Server Error 同时也没有生成django_uwsgi.pyc文件日志中可以看到 ImportError: No ...
分类:其他好文   时间:2016-01-23 07:51:18    阅读次数:167
[?]*Shuffle an array
Shuffle a given array such that each position is equally likely.算法导法里的一个算法:function randomize(A)n=A.lengthfor i=1 to nj=random(i,n)swap A[i],A[j]
分类:其他好文   时间:2016-01-23 07:53:18    阅读次数:168
RadioGroup开关
RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup); radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeList...
分类:其他好文   时间:2016-01-23 07:52:06    阅读次数:126
服务器端cs文件
服务器端向mysql数据库写数据using System;using Newtonsoft.Json;using Newtonsoft.Json.Linq;using System.Collections.Generic;using System.Linq;using System.Web;usin...
分类:其他好文   时间:2016-01-23 07:52:04    阅读次数:133
《软件开发者路线图——从学徒到高手》—— 读后总结
这本书读起来很快,而且很多地方都感觉到了共鸣!收获还是不少的...空杯心态这是我最喜欢的一个主题,书中有一个故事: 意思是说,如果我们自己的心态不摆正,骄傲浮躁,不能静下心来好好学习,那么看再多的书也是无用的。 只有以一种求知的心态学习,才会有收获。关于技能 对于软件开发者来说,在入职之前...
分类:其他好文   时间:2016-01-23 07:50:19    阅读次数:180
Spark IMF传奇行动第17课Transformations实战总结
今晚听了王家林老师的Spark IMF传奇行动第17课Transformations实战,作业是用SCALA写cogroup:def main(args: Array[String]): Unit = { val sc = sparkContext("Transformations") ...
分类:其他好文   时间:2016-01-23 07:48:38    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!