现在位置: 首页 > tensile发表的所有文章
  • 09月
  • 23日
综合 ⁄ 共 913字 评论关闭
其实是很裸的一道几何题,题目要求的就是判断一个小的多边形是否完全且严格(两个多边形不能有交点)包含在另一个凸多边形里面。而解决的方法有很多,我这里用到的就是判断一个点是否完全且严格包含在一个多边形内,判断的时候用到了二分和叉积。 题目 #include<iostream> #include<cstdio> #include<cstring> using namespace std; #define N 100005 struct node { int x,y; }p[N]; __int64 xcross(node t,node t1,node t2) { return (__int64)(t1.x-t.x)*(t2.y-t.y)-(__int64)(t2.x-t.x)*(t1.y-t.y);......
阅读全文
  • 09月
  • 05日
综合 ⁄ 共 1161字 评论关闭
Java Decompiler 官网:http://jd.benow.ca/ 官网上有介绍如何安装该插件,但在我使用在线安装方式的时候Myeclipse10长期无反应,因此没有使用在线安装方式。 离线文件下载:http://jd.benow.ca/jd-eclipse/downloads/jdeclipse_update_site.zip 将压缩文件解压到jdeclipse文件夹中,然后拷贝到%MYECLIPSE_HOME%/MyEclipse 10/dropins目录,重启Myeclipse即可。 默认情况下jdeclipse反编译出的代码左边有行号,如果不喜欢可以去掉,在"Window>Preferences>Java>Decompiler"中取消“Show line numbers”选项即可,如下所......
阅读全文
  • 08月
  • 26日
综合 ⁄ 共 651字 评论关闭
话说这csdn博客每天最多只允许贴20篇文章,这让我这个疯狂学习者怎够用,于是打算在这里贴一些连接,下面走起。。。 python: http://www.freebuf.com/tools/3503.html   [Python脚本]Admin Finder管理后台扫描工具 http://blog.csdn.net/littlethunder/article/details/9399957 一系列python数据结构的东东   2013/08/19 c#: http://blog.csdn.net/xiongwjw/article/details/7247885        c#多线程 http://www.gbtags.com/gb/share/3854.htm      极客标签 极客Web前端开发资源大荟萃#005   此网站有大量web前端资源......
阅读全文
  • 08月
  • 14日
综合 ⁄ 共 979字 评论关闭
TIOBE排行榜是根据互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!、百度)以及Wikipedia、Amazon、YouTube统计出排名数据,只是反映某个编程语言的热门程度,并不能说明一门编程语言好不好,或者一门语言所编写的代码数量多少。 TIOBE开发语言排行榜[1]每月更新一次,依据的指数是基于世界范围内的资深软件工程师和第三方供应商提供,其结果作为当前业内程序开发语言的流行使用程度的有效指标。 该指数可以用来检阅开发者的编程技能能否跟上趋势,或是否有必要作出战略改变,......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 337字 评论关闭
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; public class CollectionTest { public static void main(String[] args) {Collection<String> list=new ArrayList<>();list.add("a");list.add("b");list.add("c");Iterator<String> it=list.iterator();while (it.hasNext()){String string =(String)it.next();System.out.println(string);} } }
阅读全文
  • 05月
  • 08日
综合 ⁄ 共 2070字 评论关闭
/* Reverse the bytes in a 16-bit value */ #define BITSWAP16(val) \ ((uint16)((((uint16)(val) & (uint16)0x00ffU) << 8) | \ (((uint16)(val) & (uint16)0xff00U) >> 8))) /* Reverse the bytes in a 32-bit value */ #define BITSWAP32(val) \ ((uint32)((((uint32)(val) & (uint32)0x000000ffU) << 24) | \ (((uint32)(val) & (uint32)0x0000ff00U) << 8) | \ (((uint32)(val) & (uint32)0x00ff0000U) >> 8) | \ (((uint32)(val) & (uint32)0x......
阅读全文
  • 04月
  • 14日
综合 ⁄ 共 567字 评论关闭
一、fnbl_last_sync表存在以下几个字段: last_anchor_server last_anchor_client start_sync end_sync last_anchor_server:记录上一次同步的时间戳,他与手机端发送过来的<last>节点中的值进行比较,                                         如果相等进行快同步,否则进行慢同步。在同步结束时,将手机端发送过来的                                        <next>节点中的值保存到该字段; last_anchor_client:调用processInitMessage时的系统当前时间戳; start_sync:当状态为STATE_STATE,初始化......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 69字 评论关闭
SQL、Linux 脚本与 Ruby 之比较 http://oracle.chinaitlab.com/PLSQL/755199.html  
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 3552字 评论关闭
Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 17298   Accepted: 5939 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this representation of melodies ignores the notion of musical timing; but, this programming task is about notes and not timings.  Many composers structure their music around a repeat......
阅读全文
  • 02月
  • 05日
综合 ⁄ 共 3435字 评论关闭
直接在Javascript代码放在标记对<script>和</script>之间 由<script />标记的src属性制定外部的js文件 放在事件处理程序中,比如:<p onclick="alert('我是由onclick事件执行的Javascript')">点击我</p> 作为URL的主体,这个URL使用特殊的Javascript:协议,比如:<a href="javascript:alert('我是由javascript:协议执行的javascript')">点击我</a> 利用javascript本身的document.write()方法写入新的javascript代码 利用Ajax异步获取javascript代码,然后执行 第3种和第4......
阅读全文
  • 02月
  • 04日
综合 ⁄ 共 2129字 评论关闭
查询及删除重复记录的方法 (一) 1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1) 2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录 delete from people where peopleId in (select peopleId from people ......
阅读全文
  • 01月
  • 16日
综合 ⁄ 共 3596字 评论关闭
toupper, tolower地球人都知道 C++ 的 string 没有 toupper ,好在这不是个大问题,因为我们有 STL 算法: string s("heLLo");transform(s.begin(), s.end(), s.begin(), toupper);cout << s << endl;transform(s.begin(), s.end(), s.begin(), tolower);cout << s << endl; 当然,我知道很多人希望的是 s.to_upper() ,但是对于一个这么通用的 basic_string 来说,的确没办法把这些专有的方法放进来。如果你用 boost stringalgo ,那当然不在话下,你也就不需要读这篇文章了。 -------------------------......
阅读全文