博文

JUnit4

1.javadoc : http://junit.org/javadoc/latest/index.html 2.lib : 2.1.  https://code.google.com/archive/p/hamcrest/downloads  hamcrest-core-xx.jar and hamcrest-library-xx.jar are for the assertThat function. 2.2. https://github.com/junit-team/junit/wiki/Download-and-Install http://search.maven.org/#search|gav|1|g:%22junit%22%20AND%20a:%22junit%22  junit-4.12.jar is for junit. 3.assertThat:         int z = new T1().add(5,3); //        assertEquals(8, z); //        assertTrue(z>3); //       // assertTrue(z>10); //        assertTrue("heeeee",z>10);               assertThat(z, is(8));         assertThat(z,allOf(greaterThan(5),lessThan(10))); /* assertThat(n,allOf(greaterThan(1),lessThan(...

review onkeypress in Html

only number in input 1. <input onkeypress ="return (/[\d]/.test(String.fromCharCode(event.keyCode)))" style=" ime-mode:Disabled ">" The ime-mode CSS property controls the state of the input method editor for text fields.   Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode 2. <input type=text onkeypress=" return test();" style=" ime-mode:Disabled " > function test(){    return /[\d]/.test(String.fromCharCode(event.keyCode)); } 3<input type=text onkeypress="test()" style=" ime-mode:Disabled " > function test(){   //if ( isNaN (this.value)){    window.event.returnValue =false;   }    } other: <input name="username" type="text" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"> only letter, number, &, = and @ <input name="username" type="text" onkeyup="value=value.replace(/[^\w=@&]|_/ig,''...

bootstrap

1.Grid  12 columns. 3-6-3 、4-8、3-5-4、2-8-2 < div   class = "row" >     < div   class = "span8" > ... </ div >     < div   class = "span4" > ... </ div >   </ div >  2. Responsive < link   href = "/css/bootstrap-responsive.css"   rel = "stylesheet" > media query  (min-width and max-width) < link   rel = "stylesheet"   href = "base.css"   />   < link   rel = "stylesheet"   media = "(min-width: 1200px)"   href = "large.css"   />   < link   rel = "stylesheet"   media = "(min-width: 768px) and (max-width: 979px)"     href = "tablet.css"   />   < link   rel = "stylesheet"   media = "(max-width: 767px)"   href = "tablet.css"   />   < link   rel = "stylesheet"   media = "(max-width: 480px)"   hr...

Install Oracle 12C 12.1.0.1 on Windows

图片
dbaora .com/ install-oracle-12c-12-1-0-1-on-windows/ /dbaora .com /category/installations/ Install Oracle 12C 12.1.0.1 on Windows Posted on July 11, 2013 This article presents how to quickly install Oracle Database 12C Release 1 (12.1.0.1) on Windows. Software used: Oracle Database 12C Release 1(12.1.0.1) – 64 bit for Windows Windows 8 Pro edition 64 bit Binaries Database 12C Release 1(12.1.0.1) winx64_12c_database_1of2.zip - database software winx64_12c_database_2of2.zip - database software Hardware and software requirements: at least 2GB ram as minimumat least 10G space Windows Server 2008 x64 and up – Standard, Enterprise, Datacenter, Web, and Foundation editions. Windows Server 2012 x64 – Standard, Datacenter, Essentials, and Foundation editions Windows 7 x64 – Professional, Enterprise, and Ultimate editions Windows 8 x64 – Pro and Enterprise editions I installed database software on Windows 8 Pro edition. Grid 12C is not supported for Windo...

review : oracle sqlplus login

Version: 11.2.0 C:\app\x\product\11.2.0\dbhome_1\BIN>sqlplus sys/pass1234@orcl as sysdba SQL> conn user01/pass@orcl; C:\app\x\product\11.2.0\dbhome_1\BIN>sqlplus user01/pass@orcl Version : 12c1   sqlplus /@127.0.0.1: 1522 / pdborcl as sysdba

bootstrap-01 -- /2.3.0/css/bootstrap-combined.min.css

Ref:  w w w . revillweb .com / tutorials/twitter-bootstrap-tutorial/ demosthenes . info / blog / 814  /CSS-Level-4-And-More-Whats-Coming-In-2014 http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css (important) <!DOCTYPE html> <head> <title>Twitter Bootstrap Tutorial - A responsive layout tutorial</title> <link href=" http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css " rel="stylesheet"> <style type='text/css'> body { background-color: #CCC; } </style> </head> <body><div class="container">   <h1>TWITTER BOOTSTRAP TUTORIAL</h1>  <div class='navbar navbar-inverse'>   <div class='navbar-inner nav-collapse' style="height: auto;">     <ul class="nav">       <li class="active"><a href="#">Home</a></li...

review: Array.sort - javascript

Example 1: <html> <body> <script type="text/javascript"> Array.prototype.sort02=function(a,b){   return -1; } var arr = new Array(6) arr[0] = {"A":0}; arr[1] = {"A":1}; arr[2] = {"A":2}; arr[3] = {"A":3}; arr[4] = {"A":4}; arr[5] = {"A":5}; arr.sort(function(a,b){ // document.write("a.A"+a.A+"--b.A" + b.A+"<br/>");  return 1; }); document.write("Array.sort:----<br/>"); for (var i in arr){   if(typeof(arr[i])=="object")   document.write("arr["+i+"]:"+arr[i].A+"<br/>"); } arr.sort02(); document.write("Array.sort02:----<br/>"); for (var i in arr){   if(typeof(arr[i])=="object")   document.write("arr["+i+"]:"+arr[i].A+"<br/>"); } </script> </body> Result:-------------- Array.sort:---- arr[0]:5 ar...