A GIF decoder: an exercise in Go interfaces  一个GIF解码器:go语言接口训练 25 May 2011 Introduction At the Google I/O conference in San Francisco on May 10, 2011, we announced that the Go language is now available on Google App Engine. Go is the first language t…
Documentation文档   The Go programming language is an open source project to make programmers more productive. go语言是一个开源项目,是程序员开发更有效率. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get t…
Introducing the Go Race Detector 26 June 2013 Introduction Race conditions are among the most insidious and elusive programming errors. They typically cause erratic and mysterious failures, often long after the code has been deployed to production. W…
Profiling Go Programs  分析go语言项目 24 June 2011 At Scala Days 2011, Robert Hundt presented a paper titled Loop Recognition in C++/Java/Go/Scala. The paper implemented a specific loop finding algorithm, such as you might use in a flow analysis pass of a…
Godoc: documenting Go code  编写良好的文档关于godoc 31 March 2011 The Go project takes documentation seriously. Documentation is a huge part of making software accessible and maintainable. Of course it must be well-written and accurate, but it also must be ea…
C? Go? Cgo! 17 March 2011 Introduction Cgo lets Go packages call C code. Given a Go source file written with some special features, cgo outputs Go and C files that can be combined into a single Go package. To lead with an example, here's a Go package…
The Go image/draw package  go图片/描绘包:图片/描绘包的基本原理 29 September 2011 Introduction Package image/draw defines only one operation: drawing a source image onto a destination image, through an optional mask image. This one operation is surprisingly versatil…
The Go image package  go图片包:图片包的基本原理 21 September 2011 Introduction The image and image/color packages define a number of types: color.Color and color.Model describe colors, image.Point and image.Rectangle describe basic 2-D geometry, and image.Image…
The Laws of Reflection  反射定律:反射包的基本原理 6 September 2011 Introduction 介绍 Reflection in computing is the ability of a program to examine its own structure, particularly through types; it's a form of metaprogramming. It's also a great source of confusion…
Gobs of data 24 March 2011 Introduction To transmit a data structure across a network or to store it in a file, it must be encoded and then decoded again. There are many encodings available, of course: JSON, XML, Google's protocol buffers, and more.…
Error handling and Go go语言错误处理 12 July 2011 Introduction If you have written any Go code you have probably encountered the built-in error type. Go code uses error values to indicate an abnormal state. For example, the os.Openfunction returns a non-ni…
Organizing Go code 16 August 2012 Introduction Go code is organized differently to that of other languages. This post discusses how to name and package the elements of your Go program to best serve its users. Choose good names The names you choose af…
JSON and Go 25 January 2011 Introduction JSON (JavaScript Object Notation) is a simple data interchange format. Syntactically it resembles the objects and lists of JavaScript. It is most commonly used for communication between web back-ends and JavaS…
Go Slices: usage and internals  GO语言切片: 使用和内部 5 January 2011 Introduction Go's slice type provides a convenient and efficient means of working with sequences of typed data. Slices are analogous to arrays in other languages, but have some unusual prop…
Defer, Panic, and Recover 4 August 2010 Go has the usual mechanisms for control flow: if, for, switch, goto. It also has the go statement to run code in a separate goroutine. Here I'd like to discuss some of the less common ones: defer, panic, and re…
Go Concurrency Patterns: Timing out, moving on  GO并发模式: 超时, 继续前进 23 September 2010 Concurrent programming has its own idioms. A good example is timeouts. Although Go's channels do not support them directly, they are easy to implement. Say we want to…
JSON-RPC: a tale of interfaces 27 April 2010 Here we present an example where Go's interfaces made it easy to refactor some existing code to make it more flexible and extensible. Originally, the standard library's RPC package used a custom wire forma…
这几天在做dxva2硬件加速,找不到什么资料,翻译了一下微软的两篇相关文档.并准备记录一下用ffmpeg实现dxva2,将在第三篇写到.这是第二篇.,英文原址:https://msdn.microsoft.com/en-us/library/aa965245(v=vs.85).aspx 第一篇翻译的Direct3D device manager,链接:http://www.cnblogs.com/betterwgo/p/6124588.html 本主题描述如何在DirectShow的解码器中支持…
MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications 论文链接:https://arxiv.org/pdf/1704.04861.pdf 摘要和Prior Work就略了,懒:)   Summary: 总的来说,MobileNet相对于标准卷积过程有以下几点不同: 1) 将标准的卷积操作分为两步:depthwise convolution和pointwise convolution.即…
浅入浅出 Go 语言接口的原理 接口是 Go 语言的重要组成部分,它在 Go 语言中通过一组方法指定了一个对象的行为,接口 interface 的引入能够让我们在 Go 语言更好地组织并写出易于测试的代码.然而很多使用 Go 语言的工程师其实对接口的了解都非常有限,对于它的底层实现也一无所知,这其实成为了我们使用和理解 interface 的最大阻碍. 在这一节中,我们就会介绍 Go 语言中这个重要类型 interface 的一些常见问题以及它底层的实现,包括接口的基本原理.类型断言和转换的过程…
作者:小傅哥 博客:https://bugstack.cn - 原创系列专题文章 沉淀.分享.成长,让自己和他人都能有所收获! 一.前言 场地和场景的重要性 射击…
作者:小傅哥 博客:https://bugstack.cn - 原创系列专题文章 沉淀.分享.成长,让自己和他人都能有所收获! 一.前言 知道的越多不知道的就越多 编程开发这条路上的知识是无穷无尽的,就像以前你敢说精通Java,到后来学到越来越多只想写了解Java,过了几年现在可能想说懂一点点Java.当视野和格局的扩大,会让我们越来越发现原来的看法是多么浅显,这就像站在地球看地球和站在宇宙看地球一样.但正因为胸怀和眼界的提升让我们有了更多的认识,也逐渐学会了更多的技能.虽然不知道的越来越多,但…
Lab 1 Exercise 3 设置一个断点在地址0x7c00处,这是boot sector被加载的位置.然后让程序继续运行直到这个断点.跟踪/boot/boot.S文件的每一条指令,同时使用boot.S文件和系统为你反汇编出来的文件obj/boot/boot.asm.你也可以使用GDB的x/i指令来获取去任意一个机器指令的反汇编指令,把源文件boot.S文件和boot.asm文件以及在GDB反汇编出来的指令进行比较. 追踪到bootmain函数中,而且还要具体追踪到readsect()子函数…
18 复制 18 复制 18.1 复制配置 18.1.1 基于Binary Log的数据库复制配置 18.1.2 配置基于Binary log的复制 18.1.2.1 设置复制master的配置 18.1.2.2 创建复制要用的用户 18.1.2.3 获取复制Binary Log坐标 18.1.2.4 选择同步数据快照的方法 18.1.2.5配置Slave 18.1.2.6 为复制环境增加一个slave 18.1.3 基于全局事务标示符的复制 18.1.3.1 GTID概述 18.1.3.2 使…
Exercise 1:Linear Regression---实现一个线性回归 关于如何实现一个线性回归,请参考:http://www.cnblogs.com/hapjin/p/6079012.html Exercise 2:Logistic Regression---实现一个逻辑回归 问题描述:用逻辑回归根据学生的考试成绩来判断该学生是否可以入学. 这里的训练数据(training instance)是学生的两次考试成绩,以及TA是否能够入学的决定(y=0表示成绩不合格,不予录取:y=1表示录…
安装环境:CentOS Linux release 7.0.1406 (Core) 0x01 到官网http://httpd.apache.org/download.cgi#apache24下载apache http最新版 tar zxf httpd-2.4.18.tar.gz [root@localhost httpd-2.4.18]# rpm -qa | grep apr          查看当前主机上是否安装apr/apr-util,这个库为apache提供跨平台的支持 [root@lo…
欢迎访问我的blog:http://blog.thinkinside.me 关于android中openmax中hardware decoder的调用中,整合过程比较简单.主要是对OMXCodec的封装进行调用. 这里记录一下碰到的主要的问题: 1 现象:开关几次后程序出现crash.   几台设备都有此现象,内存大的机器可以开关的次数多些,内存小的机器开关次数少.video尺寸小的可开关的次数多些,video尺寸小的可开关次数少.典型的内存泄露,而且与video decoder的解码buffe…
Linux2.4下驱动中定时器的应用 我的内核是2.4.18的.Linux的内核中定义了一个定时器的结构: #include<linux/timer.h> struct timer_list { struct list_head list; unsigned long expires; //定时器到期时间 unsigned long data; //作为参数被传入定时器处理函数 void (*function)(unsigned long); }; 利用这个结构我们可以在驱动中很方便的使用定时…
转载来自:http://www.jianshu.com/p/8952944f7566  原文最后编辑时间:2015.05.19 网易新闻iOS版在开发过程中曾经使用过的第三方开源类库.组件 1.AFNetworkingAFNetworking 采用 NSURLConnection + NSOperation, 主要方便与服务端 API 进行数据交换, 操作简单, 功能强大, 现在许多人都用它取代 ASIHTTPRequest 2.Apple Reachability网络监测,可以参考下这篇文章i…
来自练习2.18 请定义出过程reverse,它以一个表为参数,返回的表中所包含的元素与参数表相同,但排列顺序与参数表相反: (reverse (list 1 4 9 16 25)) (25 16 9 4 1) 有几个难点: 0.不能采用(cons (reverse (cdr lst) ) (car lst))的方式.在cons过程中,如果表参数在前,那么出来的就是嵌套表而不是单独的表. 1.不能采用之前实现的append过程,例如(append (reverse (cdr lst)) (car…