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
| #!/bin/bash | |
| while true; do | |
| mvn clean test-compile | |
| status=$? | |
| if [ $status -ne 0 ]; then | |
| opencode run "Fix mvn clean test-compile. We are trying to convert finance-related Doubles to float. Some compilation errors still exist. Convert all these doubles to float and fix them." | |
| else | |
| break | |
| fi |
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
| class {NameOfClass}Tests{ | |
| @Nested | |
| @DisplayName("{methodName} method") | |
| class {MethodName}Tests{ | |
| @Nested | |
| @DisplayName("WHEN {condition description}") | |
| class {ConditionDescription}Tests{ | |
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 numpy as np | |
| import cv2 | |
| from PIL import Image | |
| import time | |
| def get_webcam_frame(): | |
| cap = cv2.VideoCapture(0) | |
| time.sleep(1) #because camera needs time starting | |
| _, frame = cap.read() | |
| cap.release() |
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; | |
| //PART OF Clean Code series //https://medium.com/@ankushchoubey/series-tips-on-writing-clean-code-30d717f32ae4 | |
| class Student { // POJO 🤘 | |
| String name; | |
| List<Integer> grades; | |
| // skipping getter/setter: | |
| // tip: google "project lombok" | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| //Copy and paste this to developer console | |
| function selectArticlesToDelete() { | |
| var articles = document.getElementsByTagName('article'); | |
| var flag = false; | |
| for (i = 0; i < articles.length; i++) { | |
| article = articles[i]; | |
| if (article.getElementsByTagName('svg').length == 2 || article.textContent.includes('Best Of')) { | |
| } else { | |
| article.children[0].click(); | |
| flag = true; |