自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(86)
  • 资源 (28)
  • 收藏
  • 关注

原创 python 2.7.14 pip

下载官方可执行文件已经带有pipcmd提示不识别pip处理方式 python -m ensurepip

2018-03-04 09:32:50 1089

原创 scipy 数据拟合

import numpy as npfrom scipy.optimize import curve_fit# 创建函数,直线f(x) = ax+bdef func(x, a, b):return a * x + b# 生成测试数据,f(x)=x+2x = np.linspace(0, 10, 100)y = func(x, 1, 2)# 给直线添加噪声,使之变形yn = y +

2017-09-15 13:55:45 2021 1

原创 在raspberry上安装skimage

raspberry为新烧录的系统https://www.raspberrypi.org/downloads/raspbian/sudo apt-get updatesudo apt-get upgradesudo apt-get install python-skimage

2017-09-09 10:18:38 1390

原创 skimage feature canny模块不存在

干货from skimage import filter as feature这和skimage版本有关

2017-09-08 09:48:59 1626 1

翻译 pip install scikit-image win安装错误

错误提示 tifffile.c skimage\external\tifffile\tifffile.c(75) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: Command "C:\Users\Administrator.PC-20

2017-09-07 13:26:56 4309

原创 基于django的简单ftp实现

目标环境 在d:/web/1. 建立工程D:\web>django-admin startproject ftpD:\web>python manage.py startapp sample2.修改sample/models.py

2017-09-01 17:28:02 3603

原创 python django中显示中文

python版本2.7.11setting文件中LANGUAGE_CODE = 'zh-Hans'

2017-08-30 10:28:28 686

转载 python获取公网ip的几种方式

from urllib2 import urlopenmy_ip = urlopen('http://ip.42.pl/raw').read()print 'ip.42.pl', my_ipfrom json import loadfrom urllib2 import urlopenmy_ip = load(urlopen('http://jsonip.com'))['ip']p

2017-08-29 09:40:29 19413 5

原创 windows python 与oracle 链接 python remote connect oracle

import cx_Oracledb = cx_Oracle.connect('test/test@192.168.0.43/mydb')#用户名/密码@目的地址/数据库名print db.versioncursor = db.cursor()sql = 'select * from v$database'cursor.execute(sql)rs = cursor.fetcha

2017-08-27 15:43:08 355

原创 keil硬仿卡死在while(RCC_GetSYSCLKSource() != 0x08);

void RCC_Configuration(void){ RCC_DeInit(); RCC_HSICmd(ENABLE); while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY)== RESET); RCC_HCLKConfig(RCC_SYSCLK_Div1); RCC_PCLK2Config(RCC_HCLK_Div1); RCC_PCLK1Conf

2017-07-05 13:14:25 4736 4

原创 C#项目图文说明 不允许所请求的注册表访问权 异常的一种解决方式

解决思路提高程序运行权限操作右击项目>添加>新建项选择应用程序清单文件添加后会在项目中多出一个manifest文件进入编辑,如下重新运行程序,将需要重启VS参考【注册表访问】

2016-04-27 22:17:52 3095

原创 针对nanopi2的hello word 驱动

nanopi2

2016-04-22 07:33:10 1318

原创 gdb使用介绍

1.

2016-04-15 22:54:11 757

原创 ubuntu 14.04 64位hello world驱动

一、环境及版本主机:vmware虚拟 ubuntu 14.04 64bit内核版本:3.16.0-30-generic二、思路介绍linux下驱动以模块的方式挂载,进而让程序调用。本文也就是一步步生成这个被挂载的模块。此模块以.ko结尾。三、实现步骤a、构造内核源码树先得查看本机的内核版本号,然后下载对应版本的源代码,构造源码树,否则模块无法挂载1.查看

2016-04-11 10:37:24 1812

原创 Qt状态机QStateMachine使用

状态机

2016-03-25 19:04:30 4627

原创 Qt通过样式表一键换皮肤 风格

样式表文件以qss为后缀新建sample.qss文件QMainWindow{ //背景图 background-image:url(:/image/test.jpg);}QPushButton{ //背景色 background-color: rgba(100, 225, 100, 30); //边框样式 border-style:ou

2016-03-24 21:47:31 3158

原创 QPalette 设置控件颜色

添加头文件#include 在界面上添加如下控件给按钮添加单击响应槽函数 ui->setupUi(this); QPalette palette = ui->pushButton->palette(); palette.setColor(QPalette::ButtonText, Qt::red); palette.setColor(QPal

2016-03-24 19:59:28 6066 1

原创 QList 多线程操作

测试QList是否支持多线程访问建立两个线程向QList中写数据(慢速)WriteThread建立一个线程从QList中取数据(快速)ReadThread取数据线程头文件readthread.h#ifndef READTHREAD_H#define READTHREAD_H#include #include class ReadThread:public QThread

2016-03-23 13:49:25 6419 4

原创 C# 泛型约束

主要约束类型参数可指定零个或一个主要约束不可指定的引用类型System.Object System.Array System.Delegate System.MulticastDelegate System.ValueType System.Enum System.Voidclass Sample where T: Stream{}有两个特殊的主要约束class

2016-03-15 21:30:24 940

原创 C# 无参属性 set与get

无参属性一开始我们的对象是这样的public sealed class Emplyee{ public string Name; public int Age;}

2016-03-09 21:37:26 718

翻译 C# 并发队列ConcurrentQueue

测试函数static async Task RunProgram(){ var taskQueue = new ConcurrentQueue(); var cts = new CancellationTokenSource(); //生成任务添加至并发队列 var taskSource = Task.Run(() => TaskProducer(taskQu

2016-03-08 21:26:50 26880

原创 C# 并发容器之ConcurrentDictionary与普通Dictionary带锁的性能对比

结果已经写在注释中static void Main(string[] args){ var concurrentDictionary = new ConcurrentDictionary(); var dictionary = new Dictionary(); var sw = new Stopwatch(); sw.Start(); for (

2016-03-06 21:29:41 18587

原创 VS2015快捷键设置

VS2015 自动缩进 自动对齐 快捷键

2016-03-06 15:58:34 3149

原创 c# 线程池RegisterWaitForSingleObject的一个Demo

static void Main(string[] args) { Console.WriteLine("first time 5s"); RunOperations(TimeSpan.FromSeconds(5)); Console.WriteLine("second time 7s");

2016-03-06 10:22:54 1624

原创 C# 调用委托线程BeginInvoke与EndInvoke

第一步,委托的申明private delegate string RunOnThreadPool(out int threadId);第二步,将被作为线程运行的函数private static string Test(out int threadId){ Console.WriteLine("starting..."); Console.WriteLine("is

2016-03-06 10:19:36 633

原创 C# BackgroundWorker的一个Demo

BackgroundWorker作用基本就能用名字来表达了具体工作内容函数 static void Worker_DoWork(object sender, DoWorkEventArgs e) { Console.WriteLine("doworker thread pool thread id: {0}", Thread.Curre

2016-03-05 21:23:16 610

原创 C# 手动调用线程与线程池方式调用的开销对比

UseThreads为手工线程UseThreadPool为线程池方式 static void Main(string[] args) { const int numberOfOperations = 500; var sw = new Stopwatch(); sw.Start();

2016-03-04 21:46:35 925

原创 C# 线程池中取消线程的三种方式

三种方式都使用CancellationToken,只是使用方式不同,有类似于采用全局标志位的方式第一种 检测IsCancellationRequested方式 static void AsyncOperation1(CancellationToken token) { Console.WriteLine("starting the fi

2016-03-04 21:41:16 4842

原创 C# 引用类型、值类型与拆箱、装箱

引用类型 任何可被称为‘类’的类型 如:System.Exception, System.IO.FileStream,System.String值类型 被称为结构或枚举的类型 如:System.Int32, System.Boolean,System.Decimal, System.TimeSpan, System.DayOfWeek, System.IO.FileAt

2016-03-04 20:59:31 700

原创 C# 开放类型与封闭类型

开放类型 具有泛型类型参数的类型封闭类型 为所有类型参数都传递了实际的数据类型using System;using System.Collections.Generic;namespace TypeObjectDemo{ internal sealed class DictionaryStringKey:Dictionary{ } class Prog

2016-03-03 21:15:35 3373

原创 C#在线程池中调用委托

在线程池中调用线程,同时启用超时等待。可应场景:发送信号,等待回复;收到回复->回复处理;未收到回复->超时处理using System;using System.Threading;namespace InvokingADelegate{ class Program { static void Main(string[] args)

2016-03-02 21:11:01 1452

原创 C#线程间同步的几种实现方式

一、使用信号量using System;using System.Threading;namespace SemaphoreDemo{ class Program { static void Main(string[] args) { for(int i = 0; i <= 6; i++)

2016-03-01 20:30:47 1524

原创 C# 泛型之list<T>与ArrayList<object>比较

类型List中采用泛型T的方式加入内容而ArrayList中采用object的方式加入内容using System;using System.Collections.Generic;using System.Collections;using System.Diagnostics;namespace ListDemo{ class Program {

2016-03-01 20:23:12 1195

原创 C# 中线程资源访问互斥量

使用mutex,进行互斥访问示例中运行第一个窗口显示running此时运行第二个窗口显示 空白 处于等待。若在5秒内在第一个窗口中输入,将释放资源,此时第二个窗口将显示runningusing System;using System.Threading;namespace MutexDemo{ class Program { static voi

2016-02-29 20:44:03 1909

原创 C# 中线程资源访问互斥锁

一个加减数值的例子说明问题using System;using System.Threading;namespace ThreadLockingDemo{ class Program { static void Main(string[] args) { Console.WriteLine("incorrect c

2016-02-28 22:02:10 1066

原创 C# 5.0 使用任务调试表TaskScheduler来运行task

示例效果与winform中this.invoke(new delegete{})跨线程操作资源类似建立WPF项目,使用4.5框架mainwindow.xml文件如下<Window x:Class="TaskSchedulerDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/prese

2016-02-25 23:11:14 1892

原创 C# 5.0 Task中实现异常抛出

using System;using System.Threading;using System.Threading.Tasks;namespace ExceptionsDemo{ class Program { static void Main(string[] args) { Task task;

2016-02-25 20:05:37 3824

原创 C#5.0 采用CancellationTokenSource方式取消Task

贴一种取消任务的方式using System;using System.Threading;using System.Threading.Tasks;namespace CancellationDemo{ class Program { static void Main(string[] args) { var

2016-02-24 22:03:59 4495

原创 C# 5.0 以Task方式实现EAP

调用BackgroundWorker相关的方法以下代码参考自《Multithreading in C# 5.0 Cookbook》using System;using System.ComponentModel;using System.Threading;using System.Threading.Tasks;namespace EAPDemo{ class Pro

2016-02-24 22:00:11 1170

原创 C#5.0 以Task方式实现APM

基于事件的异步模式 (Event-based Asynchronous Pattern, EAP) 异步编程模型 (Asynchronous Programming Model, APM) 基于任务的异步模式 (Task-based Asynchronous Pattern, TAP)换个方式也就是说,将TAP实现原来Thread中的AutoResetEvent、ManualReset

2016-02-23 21:50:24 1185

programming linux games

A few years ago I was browsing the computer section at a local bookstore when I bumped into another computer enthusiast. He introduced himself as a game programmer, mentioned a few of the projects he had worked on, and told me about his latest fascination: Linux. It meant little to me at the time, but I filed the conversation away for future reference, and eventually I remembered the name and installed Linux on my home computer.

2009-05-24

uCOS-II The Real-Time Kernel.pdf

My first book, “ μC/OS, The Real-Time Kernel ” is now 6 years old and the publisher has sold well over 15,000 copies around the world. When I was asked to do a second edition, I thought it would be a fairly straightforward task; a few corrections here and there, clarify a few concepts, add a function or two to the kernel, etc. If you have a copy of the first edition, you will notice that “μC/OS-II, The Real-Time Kernel” i in fact a major revision. For some strange reason, I wasn’ s t satisfied with minor corrections. Also, when my publisher told me that this time, the book would be a ‘ hard cover’ I really wanted to give you your moneys worth. In all, I added more than 200 , new pages, and re-wrote the majority of the pages I did keep. I added a porting guide to help you port μ C/OS-II to the processor of your choice. Also, I added a chapter that will guide you through upgrading a μC/OS port to μ C/OS-II. The code for μC/OS-II is basically the same as that of μ C/OS except that it contains a number of new and useful features, is much better commented, and should be easier to port to processor architectures. μ C/OS-II offers all the features provided in μC/OS as well as the following new features: • A fixed-sized block memory manager, • A service to allow a task to suspend its execution for a certain amount of time (specified in hours, minutes, seconds and milliseconds), • User definable ‘ callout’functions that are invoked when: a task is created, a task is deleted, a context switch is performed, a clock tick occurs. • A new task create function that provides additional features, • Stack checking, • A function returning the version of μ C/OS-II, • And more.

2009-09-24

椭圆曲线带图解释原理说明

从别人借来的资料,觉得好就上传了,若想知道SM2的更多请参考我的博文。

2013-06-24

acm程序集 算法 C程序1. 最小生成树(2)

acm 算法 C程序1. 最小生成树(2) Kruskal (GCC)(3) 最优比例生成树 (GCC(4) 最小度限制生成树 (GCC)2. 最短路:.............

2009-05-30

Embedded Systems Building Blocks.pdf

Embedded Systems Building Blocks.pdf

2009-09-24

C51单片机SPI双机通信

C51 单片机 SPI 双机通信 从机可控制ISD4004(也为SPI的控制程序)和LCD12864 我调试过,可以用,不过由于从机要完成上次所下达的任务,必需等到完成任务后才能接下一个任务,主机的延时等待不够长,也就不能顺着主机的控制顺序来控制。

2009-08-19

C51单片机双机串口通信

下载直接可用,分为主机和从机,我刚调试过的。双机串口通信,主机键盘发送数据并让灯显示,从机接收数据并让灯显示。有简单的数据校验、长度测试。

2009-07-16

PHP项目开发案例全程实录.pdf

PHP项目开发案例全程实录 完整电子书 带部分目录可供参考

2018-11-24

故障树JAVA源代码

故障树JAVA源代码,注释乱码了,不想处理了,相关的说明请参考我的相关博文

2013-07-06

AD6 9 10 pcb logo 制做

用于AD altium designer 的logo转换脚本 注意导入图片为位图,可用photoshop转为灰度图再转为位图,再导入 教程如下http://blog.csdn.net/conquerwave/article/details/8450962

2014-07-23

大数计算库

文件包含如下: main.c 测试实例 convert.h convert.c 进制转换函数 smath.h smath.c 大数加减乘除及取模、移位、模逆 头文件中唯一的亮点是模逆计算,基于扩展欧几基里得原理 其它的函数,本人数学能力有限优化还在进行中 有兴趣一起做的可以联系我hugewave@yeah.net 基于此可以实现国密SM2中的k倍点,不过效率比较低 官方的数据实际测试中得花去1分20秒左右

2013-06-06

国密k倍点测试中间数据

计算K倍点的中间测试数据,国密SM2算法 分别列出了K=1,2,3,4,5,6,7,8,0xFFFF,0xFF00FFFF 所对应的倍点值 基点及模P为官方文档中的数据

2013-06-06

关于ubuntu桌面的xorg.conf

我的桌面,可用来初始化。 可能选用高级图形后,显卡驱动会安装不上。

2009-02-03

大数计算器

功能介绍: 1.加法 a+b 2.减法 a-b 3.乘法 a*b 4.除法 a/b 5.模运算 a%b 6.模逆运算

2013-08-23

bacnet开发demo

来自sourceforge,基于C#实现的bacnet开源demo 可使用vts测试,不收费

2015-12-17

rails简单实例_rake数据导入

来自practical rails social networking sites上的第二章的实例,应用了数据导入,导入数据到mysql后就可以使用,命令: rake db:migrate(进入文件夹"railscoder")

2010-03-28

raspberry pi tensorflow1.10.0

下载源地址 https://www.piwheels.org/simple/tensorflow/tensorflow-1.11.0-cp35-none-linux_armv7l.whl#sha256=f82577f25f1e87940d99cc6986d63089fdce1e54e95bb0d32f4dbe16f4a60a2c pip3 install tensorflow-1.11.0-cp35-none-linux_armv7l.whl安装

2018-11-23

win-dkk分片断上传共230M左右part2

win-dkk分片断上传共230M左右 ddk driver development kit是winXP的 网上有链接,但不稳定,我好不容易下下来了

2010-01-18

GNU c++ linux part2

深入学习:GNU C++ for Linux 编程技术 part2 非常好的书,自己转换的,独一无二!文件比较大,分为四份上传。

2009-05-23

数据结构课程设计报告

1. 平面曲线问题 2. 最佳旅游路线 3. 推广Huffman编码 4. 单词接龙 5. 挖宝藏 6. 迷宫 7. 骑士问题 8. 分油 9. 士兵排队 10. 矩阵排列 11. 填L型 12. FBZ串 13. 3N的方格问题 14. 数串中1的个数问题 15. 数列问题 16. 求最长公共子序列 17. 关键点和桥

2009-06-30

win-dkk分片断上传共230M左右part1

win-dkk分片断上传共230M左右 ddk driver development kit 网上有链接,但不稳定,我好不容易下下来了

2010-01-18

c++数据结构(3)

C++数据结构,英文,不想要分的,无耐自己没分了

2009-05-22

railscoders添加用户实例ruby on rials实例

ruby on rails 实例 practical rails social networking sites ruby on rails 第三章内容代码,我自己写进去的,导入数据可以直接用,developemnt阶段,test没有做

2010-03-31

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除