반응형
반응형

 

This works similarly to other nUnit testing frameworks, though somewhat customized for javascript. It is exceedingly small, but also surprisingly powerful.

Go to HowToWriteAndRunTests to learn how to use this framework.

Ant Based Javascript Testing Framework

In its original form RhinoUnit is run from an ANT scriptdef task using the Rhino engine - and uses all the helpful things that ANT provides for that. It is intended, however, that in the future the framework can be reused in other forms.

Unit Testing Javascript

It will do all the normal tests

  • string and object comparisons
  • regexp comparisons
  • collection comparisons (contains, containsExactly, etc)

 

And does them in a more natural form. For example assert.that("string", not(matches(/somethingelse/))); checks that the string "string" doesn't match the regular expression /somethingelse/.

Advanced Tests

RhinoUnit provides some more advanced tests. You can

  • ensure that a function has been called (by wrapping it with assert.mustCall(), or using an assert.functionThatMustBeCalled()). See AssertMustCall
  • ensure that an exception is thrown (using shouldThrowException(...)
  • ensure that the global namespace isn't polluted by poor variable scoping

See APIDescription for a list of all assertions and functions that are available.

반응형
반응형

ASP 날짜, 시간 - date(), Now(), time()

 

    now_a = Now()
    now_b = Left(Now(), 10)
    now_c = Mid(Date(),1,4) & Mid(Date(),6,2) & Mid(Date(),9,2) & left(FormatDateTime(Now(), 4),2)

                right(FormatDateTime(Now(), 4),2) & right(FormatDateTime(Now(), 3),2)


    response.write " now_a = "& now_a
    response.write " now_b = "& now_b
    response.write "<br> now_c = "& now_c

 

 

Now() ==> 2009-07-09 오후 4:48:49
Date() ==> 2009-07-09
Time() ==> 오후 4:48:49

FormatDateTime(Now(), 0) ==> 2009-07-09 오후 4:48:49
FormatDateTime(Now(), 1) ==> 2009년 7월 9일 목요일
FormatDateTime(Now(), 2) ==> 2009-07-09
FormatDateTime(Now(), 3) ==> 오후 4:48:49
FormatDateTime(Now(), 4) ==> 16:48

 

* YYYY-MM-DD HH24:MI:SS (오라클 기준)
FormatDateTime(Now(), 2) ==> 2009-07-09
FormatDateTime(Now(), 4) ==> 16:48
Right(Now(), 3) ==> :49
====> 2009-07-09 16:48:49

 

Left(Date(), 4) ==> 2009 (년)
Mid(Date(), 6, 2) ==> 07 (월)
Int(Mid(Date(), 6, 2)) ==> 7 (월)

반응형
반응형

Robomongo 0.8.2

Shell-centric cross-platform MongoDB management tool

http://www.robomongo.org/

About

Robomongo — is a shell-centric cross-platform open source MongoDB management tool (i.e. Admin GUI). Robomongo embeds the same JavaScript engine that powers MongoDB's mongo shell. Everything you can write in mongo shell — you can write in Robomongo!

This is an early beta version of Robomongo, that we are publishing in a hope to validate usefulness of application. We really welcome your feedback! Please submit any issues and proposals to GitHub Issues.

Features

Full Power of MongoDB Shell

Robomongo embeds the same JavaScript engine (based on Mozilla SpiderMonkey), that powers MongoDB's mongo shell. It means that you can reuse your existing skills of MongoDB Shell in Robomongo!

Robomongo provides you with syntax highlighting, autocompletion, different view modes (text, tree, custom) and more.

With great power comes great responsibility. Robomongo will not stop you from executing "undesired" code. Be careful, as you do with MongoDB Shell!

Tip! Select any part of code and press Ctrl + Enter. Only selected code will be executed.



Multiple Shells

Open as many shells as you need. Every tab in Robomongo — is a MongoDB shell, fully isolated from each other.

You can have many opened shells for single MongoDB database, or many shells for many different databases.

Tip! Press Ctrl + T to open new shell, based on currenly opened.



Multiple Results

Robomongo executes your code in statement by statement way. That means that you will receive as many result as many statements you have.

This feature can assist you, for instance, when you would like to view and analyse documents side by side.

Tip! Press F10 to toggle results orientation from vertical to horizontal.



Autocompletion

Robomongo provides you with autocompletion for all objects (and thus functions) that are known by JavaScript runtime, including autocompletion for databases, collections and even your document objects.

To assist Robomongo autocompletion — execute your code. This will make your objects available to JavaScript runtime, and autocompletion will work even for your custom functions and documents.

Tip! To see code of any JavaScript function, just type its name and execute (Ctrl + Enter)


Articles

 

반응형
반응형

Perimeter.js: Detect mouse breaches of an invisible perimeter

perimeter.js

 

반응형
반응형

URLcrypt: Securely encode and decode data in URLs

urlcrypt

반응형
반응형

[SNS] facebook에 url공유를 했는데, 자꾸 이전정보가 나온다면?

페이지를 찾지 못한다면?

 

그건 페이스북에 해당 url에 대한 cache가 남아있어서이다.

 

아래 url로 들어가서 원하는 url을 입력하고 테스트 해보면 확인 가능하고, cache도 지워진다.

 

 

https://developers.facebook.com/tools/debug

 

 

 

 

 

반응형

+ Recent posts