Last update: 30-01-2024
Last view: 01-05-2025
Go to your work folder, mine is located at:
F:/Work/EnterpriseName/
And then create a .gitconfig-work
with the following data:
package com.mattmalec.resample; | |
public class Resample { | |
public static byte[] resample(byte[] data, int length, boolean stereo, int inFrequency, int outFrequency) { | |
if (inFrequency < outFrequency) | |
return upsample(data, length, stereo, inFrequency, outFrequency); | |
if (inFrequency > outFrequency) | |
return downsample(data, length, stereo, inFrequency, outFrequency); |
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.quarkus:quarkus-smallrye-reactive-messaging-kafka:1.9.0.CR1 | |
//DEPS io.quarkus:quarkus-smallrye-health:1.9.0.CR1 | |
//DEPS org.testcontainers:kafka:1.15.0-rc2 | |
//JAVAC_OPTIONS -parameters | |
//JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager | |
//JAVA_OPTIONS -Dmp.messaging.outgoing.movies-out.connector=smallrye-kafka -Dmp.messaging.outgoing.movies-out.topic=movies -Dmp.messaging.outgoing.movies-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer | |
//JAVA_OPTIONS -Dmp.messaging.incoming.movies.connector=smallrye-kafka -Dmp.messaging.incoming.movies.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer -Dmp.messaging.incoming.movies.auto.offset.reset=earliest | |
//JAVA_OPTIONS -Dmp.messaging.incoming.movies.failure-strategy=dead-letter-queue | |
//JAVA_OPTIONS -Dmp.messaging.incoming.dead-letter-topic-movies.connector=smallrye-kafka -Dmp.messaging.incoming.dead-letter-topic-movies.value.deserializer=org.apache.k |
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS info.picocli:picocli:4.2.0 | |
//DEPS org.eclipse.jgit:org.eclipse.jgit:5.8.1.202007141445-r | |
import org.eclipse.jgit.api.ListBranchCommand; | |
import org.eclipse.jgit.api.errors.GitAPIException; | |
import org.eclipse.jgit.lib.Ref; | |
import org.eclipse.jgit.lib.Repository; | |
import org.eclipse.jgit.revwalk.RevCommit; |
<?php | |
/** | |
* This is a proof of concept. In real life you would split up the various parts and allow for different cell value | |
* types. Also read Leviscowles1986's comment below: | |
* https://gist.github.com/thehelvetian/2e94d60b796735b167dfb1c7560049ae#gistcomment-1822986 | |
* | |
* @param array $ary_values An array containing the cell values | |
* @return bool Request status | |
*/ | |
function addRowToSpreadsheet($ary_values = array()) { |
cd $OPENSHIFT_DATA_DIR | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.tar.gz | |
tar -zxvf jdk-8u31-linux-x64.tar.gz | |
rm -f jdk-8u31-linux-x64.tar.gz | |
# JAVA_HOME and PATH are set in startup hook according to these paths |
public class ProgressDialogFragment extends DialogFragment { | |
public final static String TITLE = "title"; | |
public final static String MESSAGE = "message"; | |
public final static String MAX = "max"; | |
public final static String CANCELABLE = "cancelable"; | |
public static ProgressDialogFragment newInstance() { | |
return new ProgressDialogFragment(); | |
} |
import com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.Response.ErrorListener; | |
import com.android.volley.Response.Listener; |
//Anonymous procedure approach by Lars Fosdal | |
type | |
TArg<T> = reference to procedure(const Arg: T); | |
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>); | |
const | |
CReadBuffer = 2400; | |
var | |
saSecurity: TSecurityAttributes; | |
hRead: THandle; |
apply plugin: 'java' | |
apply plugin: 'scala' | |
// For those using Eclipse or IntelliJ IDEA | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
def findPlay20(){ | |
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null } | |
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){ | |
for(playExec in ['play.bat', 'play.sh', 'play']){ |