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/sh | |
| # Reference: http://roboojack.blogspot.in/2014/12/bulk-upload-your-local-maven-artifacts.html | |
| if [ "$#" -ne 3 ] || ! [ -d "$1" ]; then | |
| echo "Usage:" | |
| echo " bash run.sh <repoRootFolder> <repositoryId> <repositoryUrl>" | |
| echo "" | |
| echo "" | |
| echo " Where..." |
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.pig; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| public class cir { | |
| public static void main(String[] args) { | |
| ArrayLineList arrayLineList =new ArrayLineList(new ArrayList<Integer>(Arrays.asList(0,1,2,3,4))); | |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: nginx | |
| replicas: 2 # tells deployment to run 2 pods matching the template | |
| template: |
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.pig22; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| import java.util.concurrent.locks.LockSupport; | |
| public class MainLockFree { |
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.pig22; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| import java.util.concurrent.locks.LockSupport; | |
| public class MainSolu { |
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.pig22; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| import java.util.concurrent.locks.LockSupport; | |
| public class MainLockFree { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub |
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.pig22; | |
| public class Main { | |
| public static void main(String[] args) { | |
| } | |
| public static class StandardStack<T>{ | |
| private StackNode<T> head; |
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.pig21; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| public class Main { | |
| public static void main(String[] args) { | |
| String oldName = "old name"; | |
| String newName = "new name"; | |
| AtomicReference<String> atomicReference = new AtomicReference<>(oldName); |
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.pig21; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| public class Main { | |
| public static void main(String[] args) { | |
| String oldName = "old name"; | |
| String newName = "new name"; | |
| AtomicReference<String> atomicReference = new AtomicReference<>(oldName); |
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.pig20; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| public class Main { | |
| public static void main(String[] args) throws InterruptedException { | |
| InventoryCounter inventoryCounter =new InventoryCounter(); | |
| IncrementingThread incrementingThread=new IncrementingThread(inventoryCounter); | |
| DecrementingThread decrementingThread=new DecrementingThread(inventoryCounter); |