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.dvlcube.generators; | |
import java.util.HashSet; | |
import java.util.Set; | |
/** | |
* Combination table generator for java, inspired by: | |
* https://stackoverflow.com/questions/10723168/generating-truth-tables-in-java/10761325 | |
* | |
* @since 25 de jan de 2022 |
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
description: License Manager Basics | |
actors: | |
- actor: WEB | |
segments: | |
- segment: 1 | |
actions: | |
- description: Verify that the submit button is visible | |
action: org.getopentest.selenium.AssertElementVisible | |
args: | |
locator: { css: .link.hk } |
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
/** | |
* @since 04/07/2013 | |
* @author dvlcube | |
*/ | |
public class RangeMapping { | |
/** | |
* @param n | |
* value from range A | |
* @param ra1 | |
* range A, min value |
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 it.murah.utils; | |
import java.util.ArrayList; | |
import java.util.List; | |
import it.murah.utils.ex.Range; | |
/** | |
* @since 04/07/2013 | |
* @author Ulisses Lima |
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.HashMap; | |
import java.util.concurrent.TimeUnit; | |
import java.util.function.Function; | |
/** | |
* Time-to-live map. | |
* <p> | |
* Items have a specified amount of time to be accessed before they are removed. | |
* Verification is done on get. Time to live is specified on map creation. | |
* <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
/** | |
* Fonte: https://www.youtube.com/watch?v=39HikyRBWA4 | |
* @since 2019-07-11 | |
* @author Dilma Rousseff | |
*/ | |
public class DilmasSourceLegitimacyDefinitionAlgorithm { | |
public static void main(String[] args) { | |
String legitimacy = sourceLegitimacy(Boolean.valueOf(args[0]), Boolean.valueOf(args[1])); | |
System.out.println(legitimacy); | |
} |
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 it.murah.license.server.jpa; | |
import java.io.Serializable; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import javax.persistence.EntityManager; | |
import javax.persistence.criteria.CriteriaBuilder; | |
import javax.persistence.criteria.CriteriaQuery; |
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
// paste this snippet on to a javascript console with the steam wishlist page open to dump all app ids | |
let app_set = new Set(); | |
function getAppId(mutationList, observer) { | |
mutationList.forEach((mutation) => { | |
if (mutation.addedNodes && mutation.addedNodes[0]) app_set.add(mutation.addedNodes[0].dataset.appId); | |
if (mutation.removedNodes && mutation.removedNodes[0]) app_set.add(mutation.removedNodes[0].dataset.appId); | |
}); | |
} |
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.io.PrintStream; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
/** | |
* Connect to an Oracle database and perform queries/updates. Easily adaptable | |
* to other databases. |
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 | |
tmp=tmp-unicode-escape.txt | |
tmp_out=out-$tmp | |
text="$1" | |
if [ ! -n "$text" ]; then | |
echo "first arg must be the text to escape" | |
exit 1 | |
fi |
NewerOlder