defaults write com.apple.screencapture location /path/
killall SystemUIServer
This file contains 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
#!/bin/bash | |
# Uninstall node.js | |
# | |
# Options: | |
# | |
# -d Actually delete files, otherwise the script just _prints_ a command to delete. | |
# -p Installation prefix. Default /usr/local | |
# -f BOM file. Default /var/db/receipts/org.nodejs.pkg.bom |
This file contains 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
/** | |
* Get table content in Email | |
*/ | |
public String[][] getTableContentInEmail(String subjectEmail, int tableNumOrder) throws Exception { | |
String emailContent = ""; | |
// get table content | |
// try { | |
// get table content | |
emailContent = getMessages(subjectEmail); | |
This file contains 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
class FractionHelper { | |
/* | |
* https://en.wikipedia.org/wiki/Continued_fraction | |
* Using this format instead float number (0.001) to avoid inaccurate value | |
* https://stackoverflow.com/questions/812815/php-intval-and-floor-return-value-that-is-too-low | |
*/ | |
const TOLERANCE = 1.e-4; |
This file contains 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
# Install homebrew | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
brew doctor | |
brew install ant | |
brew install maven | |
#https://gradle.org/install need to install latest version | |
brew install gradle 3.5 | |
#brew install android-sdk |
This file contains 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 cmpVersions (a, b) { | |
var i, diff; | |
var regExStrip0 = /(\.0+)+$/; | |
var segmentsA = a.replace(regExStrip0, '').split('.'); | |
var segmentsB = b.replace(regExStrip0, '').split('.'); | |
var l = Math.min(segmentsA.length, segmentsB.length); | |
for (i = 0; i < l; i++) { | |
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10); | |
if (diff) { | |
return diff; |
This file contains 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
public showSelectPopup(carInfo : CarInfo) { | |
let alert = this.alertCtrl.create(); | |
alert.setTitle(carInfo.selectOptions.title); | |
carInfo.values.forEach(element => { | |
alert.addInput({type: 'radio', label: element, value: element}); | |
}); | |
alert.addButton('CANCEL'); | |
alert.addButton({ | |
text: 'OK', | |
handler: data => { |
^([1-9]+\d{,2}(,\d{3})*|0)(.\d{2})?$
Test here http://rubular.com/
This file contains 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
// ts | |
import { Component, Input, Output, EventEmitter} from '@angular/core'; | |
@Component({ | |
selector: 'horizontal-tabs', | |
templateUrl: 'horizontal-tabs.html' | |
}) | |
export class HorizontalTabs { | |
@Input() componentId: string; | |
@Input() tabMenu: any |
This file contains 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
class Base64 { | |
private PADCHAR: string = '='; | |
private ALPHA: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
private getByte(s: string, i: number): number { | |
const x = s.charCodeAt(i); | |
return x; | |
} | |
private getByte64(s: string, i: number): number { |