求三角形的面积
利用向量点乘得到三角形的面积
三个for循环嵌套即可
#include
#include
#include
#include
using namespace std;
const double INF = 1e9+50;
double x[1000];
double y[1000];
double area(int i, int j, int k)
{
do...
分类:
其他 时间:
2014-08-13 14:56:26
收藏:
0 评论:
0 赞:
0 阅读:
273
三维BFS...
分类:
其他 时间:
2014-08-13 14:56:16
收藏:
0 评论:
0 赞:
0 阅读:
386
bfs基础算法水题
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int Max = 1e5+50;
int dist[Max];
vector tree[Max];
int N, D, T;
void init()
{
for(int i = 0; ...
分类:
其他 时间:
2014-08-13 14:56:06
收藏:
0 评论:
0 赞:
0 阅读:
273
??上周Wijmo 2014 V2版本刚刚发布(下载地址), 有网友下载后发现仅仅使用了40个Widgets的一小部分,还需要加载全部的jquery.wijmo-pro.all.3.20142.45.min.js包? 即对仅使用部分的Widget,有无办法优化而提高网络性能呢。答案是肯定的,有办法。其中针对这种情况,使用Require.JS再合适不过了,实际上Wijmo 2013年已经开始支持R...
分类:
Web开发 时间:
2014-08-13 14:55:56
收藏:
0 评论:
0 赞:
0 阅读:
486
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int Max = 100050;
char str[Max][10];
int mark[16][16];
int num[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2...
分类:
其他 时间:
2014-08-13 14:55:46
收藏:
0 评论:
0 赞:
0 阅读:
269
今天做项目的时候,碰到一个问题,需要把String类型的变量转化成int类型的。按照常规,我写了var i = Integer.parseInt("112");但控制台报错,说是“'Integer' 未定义”。后来,才知道,原来js中String转int和Java中不一样,不能直接把Java中的用到js中。改成var j = parseInt("11");就ok了。...
分类:
Web开发 时间:
2014-08-13 14:55:36
收藏:
0 评论:
0 赞:
0 阅读:
363
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
printf("a e\nbdf\nc g\n");
printf("h n\ni mo\njl p\nk q\n");
printf("r z\ns ya\nt x b\nuw c\...
分类:
其他 时间:
2014-08-13 14:55:26
收藏:
0 评论:
0 赞:
0 阅读:
300
最长上升子序列就是求给定序列的最长的递增序列,其中不要求序列的元素在原序列中保持连续。
为了方便理解,可以举个例子:
inta[] = {0,2,1,5,3,6,4,8,9,7}(数组下标从1开始)的一个最长的子序列1,3,4,7,9。
利用动态规划的思想,可以方便的求取这个解。
为了方便解释,我们定义dp(n)为长度为1至下标为n的最长子序列的长度(数组下标假设从1开始),{a[1],a...
分类:
其他 时间:
2014-08-13 14:55:17
收藏:
0 评论:
0 赞:
0 阅读:
377
【前言】
以前听过跨域要用到jsonp,今天早上突然有需求要用到jsonp,
这几天比较烦躁,在网上看例子,都是说的一堆一堆的的,但是前台后台的代码却没有,很是郁闷,
下午花点时间研究了下jsonp,搞清楚了是怎么回事。
【推荐文章】
这个文章比我说的好,推荐看看:
http://www.cnblogs.com/dowinning/archive/2012/04/19/json...
分类:
Web开发 时间:
2014-08-13 14:55:06
收藏:
0 评论:
0 赞:
0 阅读:
336
1、用当前时间减去从开机到现在经过了的时间: DWORD dwStartTicks = GetTickCount() / 1000 / 60; // 分钟
SYSTEMTIME sysTime;
GetSystemTime(&sysTime);
FILETIME fileTime;
ULARGE_INTEGER ulTime;
SystemTimeToFileTime(&sysTim...
分类:
其他 时间:
2014-08-13 14:54:46
收藏:
0 评论:
0 赞:
0 阅读:
259
When creating instances of POCO entity types, the Entity Framework often creates instances of a dynamically generated derived type that acts as a prox...
分类:
其他 时间:
2014-08-13 14:53:56
收藏:
0 评论:
0 赞:
0 阅读:
393
今天意外的发现了appstore居然还提供通过url获取json格式的客户端信息链接:http://itunes.apple.com/lookup?id=$id通过此地址可以获取应用的icon、介绍、截图、版本号以及版本说明例如请求秘密的json信息:Java代码http://itunes.appl...
分类:
移动平台 时间:
2014-08-13 14:53:26
收藏:
0 评论:
0 赞:
0 阅读:
359
我们建完的class,并编进了相关变量和方法,但是,类只是一个模板,如果需要使用还需要对其进行实例化,也就是生成相应的对象。而对象的使用则包括引用对象的成员变量和方法 ,通过“.”运算符可以实现对实例变量的访问和对实例方法的调用。class Superclass { int x=3;// Supe....
分类:
其他 时间:
2014-08-13 14:53:16
收藏:
0 评论:
0 赞:
0 阅读:
319
function PageUnloader() { //當用戶退出時是否需要拋出一個提示 this.UnloadTips = true; var _this = this; this.Init = function() { //當用戶退出時拋出一個提示 ...
分类:
其他 时间:
2014-08-13 14:53:06
收藏:
0 评论:
0 赞:
0 阅读:
323
angular 也提供了animate service涉及$animate,$animateProvider1.2办法后通过angular-animate.js 还扩展了一些功能先来说说大致执行过程实现手法。现代游览器我们通常是用css3的动画取代了jQeury那种动画实现手法。我们通过给一个ele...
分类:
其他 时间:
2014-08-13 14:52:46
收藏:
0 评论:
0 赞:
0 阅读:
593
Putty使用公钥认证时,按照常规方法设置,一直报错:Disconnected: No supported authentication methods available (server sent:public key)。如截图:找了半天没找到问题出在哪里,sshd的设置一切正常。这个做过多次居然...
分类:
其他 时间:
2014-08-13 14:52:36
收藏:
0 评论:
0 赞:
1 阅读:
1553
this指针指向的是对象的地址,与对象第一个成员变量的关系是怎样的呢?看下面这个例子:struct CPlex{ CPlex* pNext; void* data() { return this+1; }};int main(int argc, char* argv[]){ CPlex p; voi...
分类:
其他 时间:
2014-08-13 14:52:16
收藏:
0 评论:
0 赞:
0 阅读:
290
文能深情寻萝莉,武能仗义护人妻[问题描述]Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return ...
分类:
其他 时间:
2014-08-13 14:51:56
收藏:
0 评论:
0 赞:
0 阅读:
316
【课程内容】1、Hadoop分布式文件系统(HDFS)2、YARN/MapReduce的工作原理3、如何优化Hadoop机群所需要的硬件配置4、搭建Hadoop机群所需要考虑的网络因素5、Hadoop机群维护和控制6、如何利用Hadoop配置选项进行系统性能调优7、如何利用FairScheduler...
分类:
其他 时间:
2014-08-13 14:51:36
收藏:
0 评论:
0 赞:
0 阅读:
331
由于SDK提供的ImageButton只能添加图片,不能添加文字;而Button控件添加的文字只能显示在图片内部;当我们需要添加文字在图片外部时就不能满足我们的需求了,顾只能自己写个自定义ImageButton。说是ImageButton,其实并不是继承于ImageButton,而是从LinearL...
分类:
移动平台 时间:
2014-08-13 14:51:16
收藏:
0 评论:
0 赞:
0 阅读:
336