码迷,mamicode.com
首页 > 其他好文
lpc1768的系统时钟
#define XTAL_FREQ 12000000#define VECT_TAB_OFFSET 0x0000void SystemInit(void){ //PLL0时钟配置 LPC_SC->SCS = 0X00000020; /*使能外部主晶振,频率范围1-20M*/ if (LPC_SC->...
分类:其他好文   时间:2015-03-15 02:02:41    阅读次数:282
LPC1768的USB使用--宏定义
#ifndef __USBREG_H#define __USBREG_H/* usb设备中断定义 usb_devintst usb_devinten usb_devintclr usb_devintdet*/#define FRAME_INT 0x00000001 //每隔1MS产生一次帧中断,该中...
分类:其他好文   时间:2015-03-15 02:00:19    阅读次数:803
aizu2249最短路Road Construction
题目链接求让城市1到其他城市在保证最短路的情况下求最小花费,最短路水题。#include #include #include #include using namespace std;const int INF=1e9;struct edge{ int u,v; int len,cost...
分类:其他好文   时间:2015-03-15 02:02:37    阅读次数:152
Print a Binary Tree in Vertical Order
Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / ...
分类:其他好文   时间:2015-03-15 02:01:09    阅读次数:134
LPC1768的看门狗定时器使用
void wwdg_init(void){ LPC_SC->PCLKSEL0 |= (3WDCLKSEL &= ~(3WDCLKSEL |= (1WDCLKSEL |= (1WDTC = 0xffff;//设定重载值 LPC_WDT->WDMOD |= (1WDFEED = 0xaa; LPC_WD...
分类:其他好文   时间:2015-03-15 02:01:05    阅读次数:235
[Leetcode]Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:其他好文   时间:2015-03-15 02:00:27    阅读次数:116
Print Nodes in Top View of Binary Tree
Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print the top view of it. The output ...
分类:其他好文   时间:2015-03-15 01:58:22    阅读次数:169
UE4 将本地图片转成UTexture2D 在runtime显示
UFUNCTION(BlueprintCallable, Category = "TextureFromDisk") static class UTexture2D* GetTexture2DFromDiskFile(const FString& FilePath);class UTe...
分类:其他好文   时间:2015-03-15 02:00:51    阅读次数:2565
点击响应之hit-TestView
前言:为什么我的UITextView无法滑动了?“当用户触发某一事件(触摸事件或运动事件)后,UIKit会创建一个事件对象(UIEvent),该对象包含一些处理事件所需要的信息。然后事件对象被放到一个事件队列中。这些事件按照先进先出的顺序来处理。当处理事件时,程序的UIApplication对象会从...
分类:其他好文   时间:2015-03-15 02:00:02    阅读次数:154
LPC1768的USB使用-枚举过程
枚举过程如下#ifndef __USBCORE_H__#define __USBCORE_H__/* USB端点0 发送数据结构体*/typedef struct _USB_EP_DATA{ U8 *pData; U16 Count;} USB_EP_DATA;/* USB全局变量 */extern...
分类:其他好文   时间:2015-03-15 01:59:30    阅读次数:298
做产品还是做技术?
稀里糊涂的进入一家通信公司工作,一直供职于软件平台部门。随着公司发展战略的转变,软件平台部门已经成为鸡肋。作为资源,被各个产品线各种呼来唤去。最后的绩效考核竟然由某一产品线的项目经理说了算,满眼都是累啊。下一份工作,在产品和技术之间,无论如何也要选择前者。随着年龄的增长,不可能一直做技术。做产品,能...
分类:其他好文   时间:2015-03-15 01:56:19    阅读次数:138
共享代码总结。。。做个备份,有时间再写一写心得
Verilog /Xilinx 五级流水CPU代码 http://www.oschina.net/code/snippet_1782684_46324 Verilog VGA http://www.oschina.net/code/snippet_1782684_46319 BP网络进行手写数字识别 http://www.oschina.net/code/sn...
分类:其他好文   时间:2015-03-15 00:57:46    阅读次数:184
Quartz2D随笔
1、自定义view的步骤 新建一个类,继承自UIView 实现- (void)drawRect:(CGRect)rect方法,然后在这个方法中 取得跟当前view相关联的图形上下文 绘制相应的图形内容 利用图形上下文将绘制的所有内容渲染显示到vie...
分类:其他好文   时间:2015-03-15 00:55:46    阅读次数:153
pysnmp中的调试接口
新的4.2.6 版本增加了调试接口,但是没有文档, 具体用法如下: from?pysnmp.debug?import?setLogger,Debug setLogger(?Debug(‘all‘)) #?Create?SNMP?engine?instance snmpEngine?=?engine.SnmpEngine() 下...
分类:其他好文   时间:2015-03-15 00:56:52    阅读次数:143
Gerrit2安装配置
Gerrit是用于Git版本控制系统的代码审核系统。 下载 当前最新版本的gerrit为2.8.1,从官方下载二进制war包即可。 数据库设置 gerrit可以使用H2,PostgreSQL,MySql和Oracle数据库。这个安装使用PostgreSQL数据库。 ...
分类:其他好文   时间:2015-03-15 00:56:15    阅读次数:263
LeetCode --- 58. Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defin...
分类:其他好文   时间:2015-03-15 00:55:38    阅读次数:170
LeetCode --- 59. Spiral Matrix II
题目链接:Spiral Matrix II Given an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1,...
分类:其他好文   时间:2015-03-15 00:52:27    阅读次数:386
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!