Moved to Designing, programming, testing, writing & other useful topics.
This file contains 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.javaforu.rsync; | |
import com.javaforu.rsync.Sync.CharRingBuffer.Visitor; | |
import rollinghash.RabinKarpHash; | |
import java.util.*; | |
import java.util.zip.CRC32; | |
/** | |
* Author: Ashwin Jayaprakash / ashwin.jayaprakash@gmail.com / http://www.ashwinjayaprakash.com |
This file contains 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 | |
a=(user1 pass1 user2 pass2) | |
for ((i=0; i<${#a[@]}; i+=2)); do | |
echo "Loop 1: ${a[i]}: ${a[i+1]}" | |
done | |
a1=(user1 user2) | |
a2=(pass1 pass2) | |
for ((i=0; i<${#a1[@]}; i+=1)); do |
This file contains 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.foo; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.runner.Runner; | |
import org.openjdk.jmh.runner.RunnerException; | |
import org.openjdk.jmh.runner.options.Options; | |
import org.openjdk.jmh.runner.options.OptionsBuilder; | |
import java.util.Random; | |
import java.util.function.Supplier; |
This file contains 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.foo; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class LambdaCapture { | |
public static void main(String[] args) { | |
List<String> strings = new LinkedList<>(); | |
strings.add("one"); | |
strings.add("two"); |
OlderNewer