This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function recieves balance which is not really in this unit scope. | |
// so we dont need to care what balance.getBalance() does. | |
static double getBalanceWithDecimalPoint(Balance balance, int dp) throws NegativeBalanceException { | |
if (balance.getBalance() < 0) { | |
throw new NegativeBalanceException(); | |
} | |
System.out.println("Converting to " + dp + "decimal point"); | |
return balance.getBalance(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.mycompany.mavenproject1; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*.flv' -exec cp {} ./videos/ \; | |
# [finds all files which contain '.flv' in the name in this folder and copies them to videos] | |
grep -Hin 'msg' ./* | |
# finds in folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "Sunburst", | |
"editor.fontFamily": "Monaco, 'Courier New', monospace", | |
"window.zoomLevel": 0, | |
"editor.tabSize": 2, | |
"search.exclude": { | |
"**/node_modules": true, | |
"**/bower_components": true, | |
"**/tmp": true, | |
"**/log": true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myPowerConstructor(x) { | |
var that = otherMaker(x); | |
var secret = f(x); | |
that.priv = function () { | |
... secret x that ... | |
}; | |
return that; | |
} |
NewerOlder