Git Product home page Git Product logo

myblog's People

Contributors

frozenluo avatar

Watchers

 avatar

myblog's Issues

在Github上的第一篇日志

这是我在Github上发的第一篇博客,为自己祝贺!!

这两天(2014.6.21-2014.6.22)在杭JS会议上,听了很多行业前辈和大神的分享,也有颇多感触。其中玉伯讲到**“最好的输入是产出”**,当时就觉得不能赞同更多。一直以来,我每天花的业余时间大部分都在输入,网易新闻、AOL Reader。殊不知,知识如果不整理就不能沉淀下来。所以从今天开始,坚持写日志,记录下自己每天的所思所想。

由一道转换数字题目引发的js数据类型的判断思考

使用toString来判断对象类型(基本类型&对象类型)

这是我的第二篇日志哈哈哈,撒花
所有的object自身都附带toString函数,因此可以使用Object.prototype.toString.call(obj)来判断obj的类型,返回的是一个字符串,格式为[object ***]
其中的类型有以下一些:

  • String
  • Number
  • Array
  • Boolean
  • Undefined
  • Null
  • Object (所有对象,包括function,都会返回这个类型)

Q: 那么如何判断一个变量是function呢:
A:使用instanceof Function来判断

Write a function that can convert anything to Integer

function toInteger(n) {
  return 0|n;
}

Now there are two main things happening in the solution above.

  1. Bitwise operators in JavaScript implicitly cast each side to an integer. For float values, the fractional part is discarded; it attempts to interpret strings as numbers; and for other values like objects, it just converts to 0. This conveniently matches the kata's requirement.
  2. If one input to bitwise OR is zero, then the result is simply the other input. So 0 | some_integer will always equal some_integer. It's basically a no-op.
    So since one input is 0, we're not really using the "real" purpose of bitwise OR; it just returns the other input. It's the side-effect we're after: it's a convenient way to convert a value to an integer.

UnboundID 的使用方法(InMemoryLDAPServer)

刚刚写了一半一提交结果被GFW墙掉了,天朝尼玛的网络

最近一直都在研究使用LDAP Server,由于项目采用了坑爹的Microsoft Active Directory来作为账号存储的服务器。由于后期项目的build会在其他地方,而且很可能无法连接测试用的LDAP Server,所以在项目的开发过程中,编写JUnit的时候,就必须考虑到无网络可用的情况。如果JUnit高度依赖环境,将会导致test挂掉,最终无法产生War包。
所以这几天我都在研究如何在内存中构建一个一次性的LDAP Server,从ldif中载入测试数据,那样JUnit就不依赖任何环境。在Google了接近两天时间之后,最终找到的解决方案有2种,各自的优缺点如下所示:

Apache DS:

  • 优点: 采用Apache License,对商业用途友好,无论是基于他们的库进行二次开发或者是借鉴其部分源代码都是允许的,无需遵从强制开源的规则,这对很多商业公司来说非常的重要。顺便吐槽下,我们公司真是伸手党
  • 缺点:版本跨度变化太大,官方所给出的JUnit示例是基于1.5.6版本的,该版本所依赖的log4j库与Spring所需的log4j版本相冲突,直接导致编译错误。

UnboundID LDAP SDK:

  • 优点:官方例子简单明了,稍微修改部分代码就能跑通,这对于我这种对LDAP一知半解的选手来说,无疑是救星般的存在。类和一些工具函数都对开发者友好,使用简单上手快。下载下来的SDK中直接包括了源代码,在遇到一些比较麻烦的情况下,可以直接查看源代码实现。
  • 缺点:使用的License是GPL,LGPL。因此如果直接使用官方代码的话,是需要强制开源的。另外虽然文档相比apache DS有比较好的商业支持,但是java doc写的也非常的简略。。。比如今天我就碰到了一个问题,Config对于Entry默认会添加一些Controll property

It provides an option to automatically generate a number of operational attributes for entries as they are added to the server, including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry. The modifiersName and modifyTimestamp attributes will be automatically updated whenever a modify or modify DN operation is processed, and entryDN will also be updated for modify DN operations.

今天就先写到这里吧,昨天熬夜看世界杯决赛,尼玛困死了~~~啊~~~

Scrum敏捷开发入门

敏捷开发中的三个角色

Product Owner

与产品经理的角色类似,代表消费者与市场,负责提出需求与时间节点,分配任务等等。

Team member

代表全体开发人员,在整个过程中负责估计项目所需时间,提出疑惑并讨论。要求每个成员都有很强的自我管理能力。

Scrum Master

引导大家完成整个流程,并防止组员因为外部事物而分心。

敏捷的流程

划分为一个个的sprint,在每个sprint流程中,兼有design,implement,test,deployment。

一个Sprint流程最多不超过30天。

每个sprint都是一个队列池,在队列的头部事件拥有最高优先级。每个事件都是一小片功能,当出现规模宏大的目标时,通过“故事会”的形式,将大目标转换为不同的用户使用场景,设计场景规则(共同协商添加限制),将其分割成可完成的小片。

客户能够容忍拥有部分功能的产品,带来的好处是能够及时反馈信息,避免产品质量失控。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.