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
| if ($('.summary-counts:first:visible').length > 0) { | |
| var edits = $('.summary-counts:first').text().match(/\d+/g)[0], | |
| target, | |
| width = getWidth(edits); | |
| function getWidth(editsMade) { | |
| if (editsMade > 0 && editsMade < 501) { | |
| target = 500; | |
| } else if (editsMade > 500 && editsMade < 1001) { | |
| target = 1000; |
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
| PrintWriter pw = new PrintWriter("uids.txt", "UTF-8"); | |
| BigInteger i = new BigInteger("0"); | |
| String uidPrefix = "20"; | |
| String uid = ""; | |
| while (!uid.equals("219999999999999999999")) { | |
| i = i.add(BigInteger.valueOf(1)); | |
| uid = uidPrefix; | |
| if (String.valueOf(i).length() < 19) { | |
| for (int a = 0; a < 19 - String.valueOf(i).length(); a++) { | |
| uid += "0"; |
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
| Map<String, Integer> map = new HashMap<>(); | |
| Map<String, Integer> sortedByValues; | |
| map.put("C++", 14); | |
| map.put("Java", 8); | |
| map.put("Python", 3); | |
| sortedByValues = map.entrySet().stream() | |
| .sorted(Collections.reverseOrder(comparing(Entry::getValue))) | |
| .collect(toMap(Entry::getKey, Entry::getValue, |
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 simulate(element, eventName) { | |
| var options = extend(defaultOptions, arguments[2] || {}); | |
| var oEvent, eventType = null; | |
| for (var name in eventMatchers) { | |
| if (eventMatchers[name].test(eventName)) { | |
| eventType = name; | |
| break; | |
| } | |
| } |
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
| var keyName = "number"; | |
| var obj = { | |
| number: 1 | |
| } | |
| console.log(obj.number); //=>1 | |
| console.log(obj[keyName]); //=>1 |
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
| Camera camera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT); | |
| camera.takePicture(null, null, | |
| new PhotoHandler(getApplicationContext())); |
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
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int input[10] = {}; | |
| int max = 0; | |
| int min = 0; | |
| for (int i = 0; i < 10; i++) { |
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.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.util.stream.IntStream; | |
| public class Main { | |
| public static void main(String[] args) { | |
| java7Way(); | |
| java8Way(); |
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
| (for %%1 in ("%~f1\*") do @echo %%1) >> list.txt |