(1)主要用了paint ,canvas 两个类中的方法
(2)主要用了画线和画圆的方法。
(3)drawline(起始点轴坐标,起始点y轴坐标,终点轴坐标,终点y轴坐标)
(4)drawcircle(圆心x轴坐标,圆心y轴坐标,半径,画布)
效果图:
直接上代码了:
package com.example.drawpicture;
import android.conten...
分类:
移动开发 时间:
2014-04-27 22:44:20
阅读次数:
364
了解了数据结构--栈(基础知识)
下面简单整理了下有关栈的几个应用。
递归
把一个直接调用自己,或间接调用自己的函数,成为递归函数。
这里有一个比较好的例子,看下面一组数:
你是否发现了这组数的规律呢,没错你会发现从第三个数开始,每个数都是前面两个数的之合。
现在我们通过程序来实现这个算法,如下java代码:
public class Test {
private ...
分类:
其他好文 时间:
2014-04-27 22:37:30
阅读次数:
404
在AndroidManifest中Activity的launchMode有四种类型: 1.standard 2.singleTop 3.singleTask 4.singleInstance今天就简单介绍一下,附上一个参考地址,人家写的牛逼http://blog.csdn.net/moreevan/article/details/6788048下面还是看代码吧,都放到注释里了:package co...
分类:
移动开发 时间:
2014-04-27 22:34:18
阅读次数:
442
二维码的用处俺也就不说了,看一下用PHP生成的二维码吧。
利用谷歌提供的API 生成二维码,现在很多国外网站都提供了这类API
看下代码吧《=======================》
<?php
$urlToEncode="http://gz.altmi.com";
generateQRfromGoogle($urlToEncode);
function generateQRfro...
分类:
Web程序 时间:
2014-04-27 22:33:19
阅读次数:
339
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2170
贴个baka爷的代码留念。。
数据出的有问题,输入的字符串长度不超过1000
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define inf 0x3f3f3f...
分类:
其他好文 时间:
2014-04-27 22:16:18
阅读次数:
359
BP神经网络
function [W,err]=BPTrain(data,label,hiddenlayers,nodes,type)
%Train the bp artial nueral net work
%input data,label,layers,nodes,type
%data:dim*n
%label:1*n
%layers:m:number of hidden layers
%...
分类:
其他好文 时间:
2014-04-27 21:48:00
阅读次数:
460
我们一般切换UIViewController的时候用的是如下代码
#import "UIViewControllerDemo.h"
UIViewControllerDemo *vc = [UIViewControllerDemo alloc] initWithNibName:nil bundle:nil] autorelease];
[self.navigationController pushViewController:vc animated:YES];...
分类:
其他好文 时间:
2014-04-27 21:21:00
阅读次数:
294
Hadoop从2.4.0版本开始支持hdfs的ACL,在CDH5.0当中也继承了该特性,下面对其进行一些测试:
一、启用ACL:
dfs.permissions.enabled
true
dfs.namenode.acls.enabled
true
二、测试ACL:
①
[hadoop@master ~]$ groups
hadoop
创建目录并上传文件:
[...
分类:
其他好文 时间:
2014-04-27 21:18:00
阅读次数:
306
MyBatis 在编码中的最大的改变就是将一个最常用的 API 由 SqlMapClient 改为SqlSessionFactory。另外,类型处理器接口也由原来的 TypeHandlerCallback 改为了 TypeHandler。最后 DataSourceFactory 也进行了调整,移动到 org.apache.ibatis.datasource 包下,其中的方法也作了微调。总之,代码层面公开的部分改动较少,不会给开发者造成较大的移植成本。...
分类:
其他好文 时间:
2014-04-27 21:11:00
阅读次数:
477