自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(23)
  • 收藏
  • 关注

转载 angularjs 开发之南 01

开发人员指南 开发人员指南

2014-06-15 17:41:34 576

转载 angularjs 教程14 end

Our application is now complete. Feel free to experiment with the code further, and jump back to previous steps using thegit checkout command.For more details and examples of the Angular concepts

2014-06-15 17:41:12 414

转载 angularjs 教程13

In this final step, we will enhance our phonecat web application by attaching CSS and JavaScript animations on top of the template code we created before.Workspace Reset Instructions ➤Gi

2014-06-15 17:40:53 603

转载 angularjs 教程12

In this step, you will improve the way our app fetches data.Workspace Reset Instructions ➤Git on Mac/LinuxGit on WindowsReset the workspace to step 11.git checkout -f step-11

2014-06-15 17:40:29 492

转载 angularjs 教程11

In this step, you will add a clickable phone image swapper to the phone details page.Workspace Reset Instructions ➤Git on Mac/LinuxGit on WindowsReset the workspace to step 10.

2014-06-15 17:39:53 478

转载 angularjs 教程10

In this step you will learn how to create your own custom display filter.Workspace Reset Instructions ➤Git on Mac/LinuxGit on WindowsReset the workspace to step 9.git checkou

2014-06-15 17:39:31 459

转载 angularjs 教程9

In this step, you will implement the phone details view, which is displayed when a user clicks on a phone in the phone list.Workspace Reset Instructions ➤Git on Mac/LinuxGit on Windows

2014-06-15 17:39:06 610

转载 angularjs 教程8

In this step, you will learn how to create a layout template and how to build an app that has multiple views by adding routing.Workspace Reset Instructions ➤Git on Mac/LinuxGit on Window

2014-06-15 17:38:41 668

转载 angularjs 教程7

In this step, you will add thumbnail images for the phones in the phone list, and links that, for now, will go nowhere. In subsequent steps you will use the links to display additional information abo

2014-06-15 17:37:53 413

转载 angularjs 教程6

Enough of building an app with three phones in a hard-coded dataset! Let's fetch a larger dataset from our server using one of Angular's built-inservices called$http. We will use Angular'sdepend

2014-06-15 17:37:38 691

转载 angularjs 教程5

In this step, you will add a feature to let your users control the order of the items in the phone list. The dynamic ordering is implemented by creating a new model property, wiring it together with t

2014-06-15 17:37:16 430

转载 angularjs 教程4

We did a lot of work in laying a foundation for the app in the last step, so now we'll do something simple; we will add full text search (yes, it will be simple!). We will also write an end-to-end tes

2014-06-15 17:36:45 515

转载 angularjs 教程3

Now it's time to make the web page dynamic — with AngularJS. We'll also add a test that verifies the code for the controller we are going to add.There are many ways to structure the code for an appl

2014-06-15 17:36:33 482

转载 angularjs 教程2

In order to illustrate how Angular enhances standard HTML, you will create a purelystatic HTML page and then examine how we can turn this HTML code into a template that Angular will use to dynamical

2014-06-15 17:35:16 384

转载 angularjs 教程1

You are now ready to build the AngularJS phonecat app. In this step, you will become familiar with the most important source code files, learn how to start the development servers bundled with angular

2014-06-15 17:34:44 485

原创 makefile模板 可执行文件版

DESTINATION := Main.exeLIBPATH := LIBS := INCLUDES := BIN=.RM := rm -rfPS=cppCC=g++CPPFLAGS = -g -Wall -O0CPPFLAGS += $(addprefix -I,$(INCLUDES))CPPFLAGS += -MMDSOURC

2014-05-18 20:25:42 372

原创 makefile模板 so版

DESTINATION := lib${shell pwd |awk -F\/ '{print $$NF}'}.soLIBPATH := -L../../libsLIBS := dl pthread utilsINCLUDES := ../include/audit_task_public ../includeBIN_DIR := ../../libsRM := rm -f

2014-05-18 20:25:26 306

原创 内存泄露

前一阵子遇到一个内存泄露的事情,怎么查都查不出问题。所有new的地方都delete掉了,但是内存泄露依然没有解决。后来才发现,原来是在基类中没有写虚析构函数,导致在删除基类指针(此时已经是指向派生类的对象)时,并不能删除派生类的对象(此时不会运行派生类对象的析构函数)。最终造成了一大堆的内存泄露问题。

2011-11-14 14:14:53 226

原创 关于基类与派生类的析构函数

当我们删除基类的指针时,如果此时基类的指针是指向一个派生类的对象时,析构函数的行为将会变得特殊。1. 如果基类的析构函数是虚函数,此时将依次运行派生类的析构函数,再运行基类的析构函数。2. 如果基类的析构函数不是析构函数,此时不会发生动态绑定,将只运行基类的析构函数。3. 如果基类没有定义析构函数,此时撤销对象时的行为时不可预测的,它将不运行派生类的析构函数。综上,只有当基

2011-11-11 13:50:50 584

原创 C++设计模式:工厂模式

可以方便的使用继承来实现创建方法的多样性,区别于使用静态方法定义简单工厂。工厂方法模式:定义了一个创建对象的接口,但由于子类决定要实例化的类是哪一个。工厂方法让类把实例化推迟到了子类。依赖倒置原则:要依赖抽象,不要依赖具体类以下指导方针将避免你再OO设计中违反依赖倒置原则:(尽量达到这个原则,不一定全要依赖)1. 变量不可以持有具体类的引用2. 不要让类派生自具

2011-10-25 19:02:01 219

原创 C++设计模式:装饰者模式

C++中的设计原则:开放封闭原则:类应该对扩展开放,对修改封闭装饰者模式:动态地将责任附加到对象上。若要扩展功能,装饰者模式提供了比继承更有弹性的替代方案。利用继承得到“类型匹配”,而不是利用类型得到“行为匹配”如果依赖继承,那么类的行为只能在编译时静态决定。也就是说利用继承,行为不是来自超类,就是来自子类覆盖后的版本。动态地将责任附加到对象上。

2011-10-25 19:01:42 191

原创 C++设计模式:观察者模式

设计原则:为了交互对象之间的松耦合设计而努力,可以让我们建立由弹性的OO系统。观察者模式定义:观察者模式定义了对象之间的一对多关系,这样一来,当一个对象的状态改变时,它会通知所有与之关联的对象,使之得到更新。一个对象可以同时是观察者和主题。suject       observerOO原则:抽象封装变化多用组合,少用继承针对接口编程,不针对实现编程为

2011-10-25 19:01:30 190

原创 C++设计模式:策略模式

1. 对于一个超类来说,所有的派生类都将继承它的共有特性。但是如果对于某个派生类来说,继承基类的某个特征是不合适,那么可以用空函数来覆盖。    如果每次新的需求一来,都会使某方面的代码发生变化,那么你就可以确定,这部分代码需要被抽出来,和其他的稳定代码有所区别。   把会变化的部分取出并“封装”起来,好让其他部分不会受到影响。2. 针对接口编程,而不是针对实现编程。“针对接口编程”的

2011-10-25 19:01:00 265

空空如也

空空如也

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

TA关注的人

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