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
// START: HTTP library code | |
var isFetch = typeof fetch !== 'undefined' && fetch !== null; | |
var httpCall = function (url, method, headers, payload, callback) { | |
if (isFetch) return fetchWrapper(url, method, headers, payload, callback); | |
return invokeXHR(url, method, headers, payload, callback); | |
}; | |
var invokeXHR = function (url, method, headers, payload, callback) { | |
const xhr = new XMLHttpRequest(); |
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 convertToHrsMinsFormat(seconds) { | |
return "" + Math.floor(seconds / 3600) + ":" + Math.floor((seconds % 3600) / 60); | |
} | |
function convertToSeconds(hoursMinsStr) { | |
var secondsList = hoursMinsStr.split(":"); | |
return (secondsList[0] * 60 * 60) + (secondsList[1] * 60); | |
} |
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
name | quadrant | ring | isNew | description | |
---|---|---|---|---|---|
standard-name 1 | Developers | Adopt | TRUE | <p>standard-name 1 - description blah blah blah</p> | |
standard-name 2 | Developers | Adopt | TRUE | <p>standard-name 2 - description blah blah blah</p> | |
standard-name 3 | Developers | Adopt | TRUE | <p>standard-name 3 - description blah blah blah</p> | |
standard-name 4 | Developers | Trial | TRUE | <p>standard-name XYZ - description blah blah blah</p> | |
standard-name 5 | Developers | Trial | TRUE | <p>standard-name XYZ - description blah blah blah</p> | |
standard-name 6 | Developers | Trial | FALSE | <p>standard-name XYZ - description blah blah blah</p> | |
standard-name 7 | Developers | Assess | FALSE | <p>standard-name XYZ - description blah blah blah</p> | |
standard-name 8 | Developers | Assess | FALSE | <p>standard-name XYZ - description blah blah blah</p> | |
standard-name 9 | Developers | Hold | TRUE | <p>standard-name XYZ - description blah blah blah</p> |
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
### Keybase proof | |
I hereby claim: | |
* I am vemahendran on github. | |
* I am vemahendran (https://keybase.io/vemahendran) on keybase. | |
* I have a public key whose fingerprint is E728 33B0 9540 8015 D2C6 D42B 1EC8 28A6 BC87 3092 | |
To claim this, I am signing this object: |
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
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.HashMap; | |
class Solution { | |
static final String EXPECTED_OUTPUT = String.join( | |
System.getProperty("line.separator"), | |
"==== Just Falafs ====", | |
" ~ Menu ~", |
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
package com.tutorial; | |
import java.util.Stack; | |
public class ExpressionEvaluation { | |
public static void main(String[] args) { | |
String expr1 = "10+5*13+2"; // 77 | |
double result1 = evaluate(expr1); | |
String expr2 = "10*5+13*2"; // 76 |
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
package com.tutorial; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.Map; | |
import java.util.Queue; | |
import java.util.Stack; | |
public class ExpressionEvaluation { |
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
public void useParallelStream(List<MyTask> tasks) { | |
System.out.println("Run using a parallel stream. \nWait…"); | |
Instant startTime = Instant.now(); | |
List<Integer> result = tasks.parallelStream() | |
.map(MyTask::calculate) | |
.collect(Collectors.toList()); | |
Instant endTime = Instant.now(); |
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
public void useCompletableFutureWithExecutor(List<MyTask> tasks) { | |
System.out.println("Run CompletableFutures with a custom Executor \nWait…"); | |
final int NUM_OF_THREADS = 1000; | |
Instant startTime = Instant.now(); | |
ExecutorService executor = Executors.newFixedThreadPool( | |
Math.min(tasks.size(), NUM_OF_THREADS)); | |
NewerOlder