现在位置: 首页 > republish发表的所有文章
  • 05月
  • 14日
综合 ⁄ 共 552字 评论关闭
前一段时间,公司里面来了一个北京过来的程序界里行走多年的哥们N兄帮忙,共同编程过程中,N兄亮出的很多工作方法值得作为一个普通程序员的我学习,迫于项目进度,一直没有仔细的做个总结。高手给出的一个总结就是”coding有了方法论,走遍天下都不怕“,高手都有哪些方法论呢? 1,写文档 如何才能写出合格的技术文档呢? 那就是站在自己的模块角度,从本模块软件运行角色考虑各种资源需求,逻辑顺序,程序处理,这样写出来的技术文档就八九不离十了。 2,工作携带A4笔记本 程序写到了一定的高度,是绝对需要笔记本(注意,不是笔记......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 1201字 评论关闭
经典的N皇后问题,可以通过回溯的方式进行求解,我这里使用递归实现 II只是统计了I的解的规模 bool iscan(int x,int y,vector<string>map){ for(int i=0;i<x;i++) for(int j=0;j<map[0].size();j++) if(map[i][j]=='Q'){ if(j==y||i+j==x+y||i-j==x-y)return false; } return true; } void NQueens(int N,vector<vector<string> >&res,vector<string>t,int k){ if(N==k){res.push_back(t);return;}......
阅读全文
  • 03月
  • 09日
移动开发 ⁄ 共 13053字 评论关闭
954.上传文件的时候获得文件的MIME content-type 1.得到文件的MIME content-type类型 mime-util-2.1.3.jar slf4j-api-1.7.5.jar slf4j-nop-1.7.5.jar e.g. File f = new File("d:\\new_ailise.png"); MimeUtil.registerMimeDetector("eu.medsea.mimeutil.detector.MagicMimeMimeDetector"); Collection<?> mimeTypes = MimeUtil.getMimeTypes(f); System.out.println(mimeTypes); 2.JAVA自带,类型不全    //得到文件的content-type //   String ct = new MimetypesFileTypeMap().getContentType(f); //   System.out.print......
阅读全文
  • 12月
  • 20日
算法 ⁄ 共 4207字 评论关闭
Sum It Up Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 4   Accepted Submission(s) : 1 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1], then there are four different sums that equal 4: 4,3+1,2+2, and 2+1+1.(A number can be......
阅读全文
  • 05月
  • 14日
综合 ⁄ 共 799字 评论关闭
终于开始学习go了,思绪很快,持续很难,记下来就会好点 1.安装 安装方式有很多选择,比如直接apititude golang,在ubuntu下,但为了可定制,还是直接去golang官方网站下载安装包自行安装,具体过程见: golang.org网站上下载安装了一个,直接解压至/usr/local下面 2.go运行配置路径: export GOROOT=/usr/local/go export PATH=$PATH:/usr/local/go/bin 3.工作环境路径配置: export GOPATH=/home/@user/work/go export GOBIN=$GOPATH/bin export PATH=$GOPATH/bin:$PATH 这样可以去确保找到你自己编译的package 也可以是自......
阅读全文
  • 05月
  • 06日
综合 ⁄ 共 64字 评论关闭
查询时去掉重复行:   SELECT distinct id,name FROM table   关键是在查询条件前面加distinct        
阅读全文
  • 04月
  • 19日
综合 ⁄ 共 6203字 评论关闭
Android手机定位应用小解 Android, 手机定位, 小解, 应用 Android提供了令人激动的地理定位服务的API。该地理定位服务可以用来获取当前设备的地理位置。应用程序可以定时请求更新设备当前的地理定位信息。应用程序也可以借助一个 Intent接收器来实现如下功能:以经纬度和半径划定的一个区域,当设备出入该区域时,可以发出提醒信息。       让我们来看下android.location包下一些比较重要的功能类。       Android Location API:       以下是几个Android关于定位功能的包中比较重要的类:       LocationManager: 本类提......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 4557字 评论关闭
大家好.Fragment现在越来越广泛了,中文翻译为碎片,下面我就就碎片代替了,当时谷歌出碎片的原因是因为Android设备屏幕大小不统一,碎片出来了.用一套APP就可以解决平板跟手机上的UI问题.对于新手让碎片跟Activity交互很困难,因为碎片是依附在Activity上面的,他们不是一个整体,好,废话少说,让我们看看到底如何让碎片跟Activity交互. 我是这样的设计的,在Activity里面一个Button,点击这个Button让下面的碎片显示一段文件,当这段文字显示出来以后碎片里面也有个Button,点击碎片里面的这个Button让Activity换个碎片. 首先我先在Activi......
阅读全文
  • 02月
  • 18日
综合 ⁄ 共 157字 评论关闭
银光? 在这些天的学习中,慢慢的认识到银光的很多的东东。 XAML ? c# 一切是综合的那么完美 ……………………………… 脑子里的 ASP XMl 等 一切都化为了乌有。   只有一点C#的浅薄,甚至连 double 都不会用了   近日一直被 一个DataGrid 困住了,咋就解决不了一个删除行的问题呢?? 杯具啊!!   也不知什么时候来点灵感。  
阅读全文
  • 01月
  • 20日
综合 ⁄ 共 3452字 评论关闭
Shell Pyramid Time Limit : 5000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 6   Accepted Submission(s) : 5 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description In the 17th century, with thunderous noise, dense smoke and blazing fire, battles on the sea were just the same as those in the modern times. But at that time, the cannon ,were extremely simple. It was just like an iron cylinder, with its rearward end sealed a......
阅读全文
  • 01月
  • 19日
综合 ⁄ 共 808字 评论关闭
题目大意:闯关答题,每一个题可以用两个trick中的一个来解决,一个trick最多只能使用一次,问最多可以连续答对多少题。 思路:我一开始就想到了二分图最大匹配,但是思路完全想歪了。我看每个题有两个trick可以用,就用这个来拆点建图,显然是错的。。 正确的是用每个题和每个trick来建边,来一个问题就建两条边,然后看能不能找到增广路,如果不能就无法答对这个题,输出。 CODE: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define MAX 5010 using namespace ......
阅读全文
  • 01月
  • 11日
综合 ⁄ 共 2659字 评论关闭
I often get asked by up-and-coming technologists, "what things should I be doing to work towards becoming an architect"? Of course, as is often the case when asking an architect a question, the answer is "it depends". However, I've found the following list to be a good starting point.What items would you add or remove? What advice would you give to someone seeking to become an architect?Here's the list that I've come up with: You must continuously seek to improve. If there was one right......
阅读全文