For example you make a function to get rating; getRating(score: number): string { let rating: string; console.count('RatingPipe'); if(score > 249000){ rating = "Daniel Boone"; } else if(score > 200000){ rating = "Trail Guide"; }…
https://developer.apple.com/swift/blog/?id=39 Increasing Performance by Reducing Dynamic Dispatch Like many other languages, Swift allows a class to override methods and properties declared in its superclasses. This means that the program has to dete…
First, how to use a build in pipe: <div class="pipe-example"> <label>Uppercase Pipe: {{ message | uppercase }}</label> </div> <div class="pipe-example"> <label>Lowercase Pipe: {{ message | lowercase…
Angular allows us to conveniently use the async pipe to automatically register to RxJS observables and render the result into the template once the request succeeds. This has some drawbacks, especially if we want to bind the same data in multiple par…
以下为自定义过滤器 import { Pipe, PipeTransform, Injectable } from '@angular/core'; import { DomSanitizer} from '@angular/platform-browser'; @Pipe({ name: 'weekPipe' }) //数字转中文 export class WeekPipe implements PipeTransform { transform(value: any, args?: any)…
The talk from here. 1. The lifecycle in Angular component: constructor vs ngOnInit: Constructor: only used for injection. ngOnInit: for data initlization. About ngOnInit:  I am not sure the example is good or not. Because it is not a good choice to u…
catalogue . 漏洞复现 . 漏洞代码原理分析 . 漏洞利用前提 . 临时缓解 && 修复手段 1. 漏洞复现 . SMB登录上去 . 枚举共享目录,得到共享目录/文件列表,匿名IPC$将会被跳过 . 从中过滤目录,检测是否可写(通过创建一个.txt方式实现) . 生成一个随机8位的so文件名,并将paylaod写入so中 . 最后一步,连接到\\192.168.206.128\\IPC$,在smb登录状态下,创建/打开一个named pipe 0x1: POC1 # -*- co…
AngularJs 1.x 中使用filters来帮助我们转换templates中的输出,但在Angular2中使用的是pipes,以下展示Angular 1.x and Angular 2中filter和pipe的对比: Filter/Pipe Name Angular 1.x Angular 2 currency ✓ ✓ date ✓ ✓ uppercase ✓ ✓ json ✓ ✓ limitTo ✓ ✓ lowercase ✓ ✓ number ✓   orderBy ✓   filte…
http://blog.csdn.net/win_lin/article/details/8242653 译文在后面. State Threads for Internet Applications Introduction State Threads is an application library which provides a foundation for writing fast and highly scalable Internet Applications on UNIX-li…
译文在后面. State Threads for Internet Applications Introduction State Threads is an application library which provides a foundation for writing fast and highly scalable Internet Applications on UNIX-like platforms. It combines the simplicity of the multi…
译文在后面. State Threads for Internet Applications Introduction State Threads is an application library which provides a foundation for writing fast and highly scalable Internet Applications on UNIX-like platforms. It combines the simplicity of the multi…
In order for the "you buildit, you break it" motto to be real, there are roles beyond the traditionaldeveloper that are necessary. Specifically, engineering roles that enable developersto do testing efficiently and effectively have to exist. At…
catalogue . Twisted理论基础 . 异步编程模式与Reactor . Twisted网络编程 . reactor进程管理编程 . Twisted并发连接 1. Twisted理论基础 0x1: 异步编程模型 事件驱动编程是一种编程范式,这里程序的执行流由外部事件来决定.它的特点是包含一个事件循环,当外部事件发生时使用回调机制来触发相应的处理.另外两种常见的编程范式是(单线程)同步以及多线程编程 在这个模型中,任务是交错完成,值得注意的是: 这是在单线程的控制下.这要比多线程模型简…
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLists and ArrayLists (and Vectors) (Page last updated May 2001, Added 2001-06-18, Author Jack Shirazi, Publisher OnJava). Tips: ArrayList is faster than…
1. 那些被遗漏的objective-c保留字:http://blog.devtang.com/blog/2013/04/29/the-missing-objc-keywords/   2. 使用crashlytics来保存应用崩溃信息:http://blog.devtang.com/blog/2013/07/24/use-crashlytics/   3. iOS开发工具篇,AppStore统计工具:http://blog.devtang.com/blog/2013/06/16/ios-dev…
Custom filter in AngularJS 1. Is a function that returns a function 2. Use the filter function to create a custom filter Let us understand creating custom filter with an example. Script.js : In the example below we are using the filter function to cr…
原文地址: https://software.intel.com/en-us/articles/enhancing-the-scalability-of-memcached-0 1 Introduction - Memcached and Web Services Memcached is a Key-Value cache used by cloud and web service delivery companies, such as Facebook [1], Twitter [2], R…
http://technet.microsoft.com/en-us/library/bb742455.aspx Abstract Network Load Balancing, a clustering technology included in the Microsoft Windows 2000 Advanced Server and Datacenter Server operating systems, enhances the scalability and availabilit…
如果在不需要波形,只需要快速知道结果的情况下,可以用优化选项.这适用于做大量case的仿真阶段.因为这一阶段多数case都是通过的,只需要快速确认即可,然后把没通过的case拿出来做全波形的仿真调试. 根据“Quick Reference Guide for Increasing Performance”,经典的办法是 3-step method1) Compile2) Optimize3) Simulate 脚本如下vlib workvlog *.vvopt -o testbench_opt…
InvenSense®Technology Overview Our technology is comprised of five coreelements: our patented Nasiri-Fabrication process, our advanced MEMS motionsensor designs, our mixed-signal circuitry for sensor signal processing, ourMotionFusion™ and calibratio…
原创作品转载请注明出处<Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000 如果我写的不好或者有误的地方请留言 题目自拟,内容围绕系统调用system_call的处理过程进行: 博客内容中需要仔细分析system_call对应的汇编代码的工作过程,特别注意系统调用返回iret之前的进程调度时机等. 总结部分需要阐明自己对“系统调用处理过程”的理解,进一步推广到一般的中断处理过程. 实验报告: 1.将myfork()和…
Every now and again someone comes along and writes an R package that I consider to be a 'game changer' for the language and it's application to Data Science. For example, I consider dplyr one such package as it has made data munging/manipulation that…
摘自windbg帮助文档(windbg中输入.hh): Debugging Tools for Windows (安装WinDbg后这些工具都会安装在目录C:\Program Files (x86)\Debugging Tools for Windows (x86)下) List of Tools and Documentation Microsoft Debugging Tools for Windows includes a number of debuggers and other too…
Writing Data You may want to jump right in and start throwing data into your TSD, but to really take advantage of OpenTSDB's power and flexibility, you may want to pause and think about your naming schema. After you've done that, you can procede to p…
The wait type of CMemThread shows up in outputs such as sys.dm_exec_requests.  This post is intended to explain what a CMemThread is and what you might be able to do to avoid the waits.  The easiest way to describe a CMemThread is to talk about a sta…
持续关注MongoDB博客(https://www.mongodb.com/blog)的同学一定会留意到,技术大牛Daniel Coupal 和 Ken W. Alger ,从 今年 2月17 号开始,在博客上持续发表了 如何在MongoDB中设计数据库模式的方法.截止到今日(4月20号),12种模式设计的方法已全部与读者见面.本人认为,此系列文章,总结的非常全面,很多地方有首创性,涵盖的场景也很多,并且有理论总结,也有案例分析.文中分享的很多知识使人"如听仙乐耳暂明",开卷受益,常读…
Basic Concepts There are a few concepts that are core to Elasticsearch. Understanding these concepts from the outset will tremendously help ease the learning process. 有一些概念是Elasticsearch的核心.从一开始就理解这些概念将极大地帮助简化学习过程. Near Realtime (NRT) Elasticsearch i…
ElasticSearch 6.6.0 官方:https://www.elastic.co/ 一 简介 ElasticSearch简单来说是对lucene的分布式封装,增加了shard(每个shard是一个子索引,也是一个lucene的index)和replica的概念:所以在ElasticSearch也可以见到lucene中的概念,比如index.document等. Elasticsearch is a highly scalable open-source full-text search…
[EOS.IO Technical White Paper v2] Abstract: The EOS.IO software introduces a new blockchain architecture designed to enable vertical and horizontal scaling of decentralized applications. This is achieved by creating an operating system-like construct…
简介 2014年,苹果公司在WWDC上发布Swift这一新的编程语言.经过几年的发展,Swift已经成为iOS开发语言的“中流砥柱”,Swift提供了非常灵活的高级别特性,例如协议.闭包.泛型等,并且Swift还进一步开发了强大的SIL(Swift Intermediate Language)用于对编译器进行优化,使得Swift相比Objective-C运行更快性能更优,Swift内部如何实现性能的优化,我们本文就进行一下解读,希望能对大家有所启发和帮助. 针对Swift性能提升这一问题,我们可…