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.Serializable; | |
| import java.util.ArrayList; | |
| import java.util.Date; | |
| import java.util.List; | |
| import com.google.gwt.core.client.EntryPoint; | |
| import com.google.gwt.core.client.GWT; | |
| import com.google.gwt.editor.client.Editor.Path; | |
| import com.google.gwt.event.logical.shared.AttachEvent; | |
| import com.google.gwt.event.logical.shared.AttachEvent.Handler; |
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.sencha.gxt.text.client.larggrid; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import com.google.gwt.user.client.rpc.AsyncCallback; | |
| import com.google.gwt.user.client.ui.HasHorizontalAlignment; | |
| import com.google.gwt.user.client.ui.RootPanel; | |
| import com.sencha.gxt.core.client.ValueProvider; | |
| import com.sencha.gxt.data.client.loader.RpcProxy; |
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.concurrent.Semaphore; | |
| import java.util.concurrent.ThreadLocalRandom; | |
| public class DiningPhilosophers { | |
| static int philosophersNumber = 5; | |
| static Philosopher philosophers[] = new Philosopher[philosophersNumber]; | |
| static Fork forks[] = new Fork[philosophersNumber]; | |
| static class Fork { |
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
| /** | |
| * Based on Java listings by Bruce Eckel | |
| * Dining Philosophers in Java 8, Dec-29 2016 | |
| * http://bruceeckel.github.io/2016/12/29/dining-philosophers-in-java-8/ | |
| */ | |
| package concurrent | |
| // concurrent/StickHolder.scala |
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.elbart; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.QueryParam; | |
| import com.google.inject.servlet.RequestScoped; | |
| @Path("bound/perrequest") |
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.pillartechnology.mail; | |
| public class AddressInputQueue { | |
| public String next() { | |
| return null; //TODO: not implemented yet. | |
| } | |
| } |
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.example; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| @RestController | |
| @RequestMapping("/api") |
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
| oc login https://api.starter-us-east-1.openshift.com --token=xxxxxxx | |
| oc new-project villains | |
| oc new-app lordofthejars/crimes:1.0 --name crimes | |
| oc expose svc crimes --name=crimeswelcome | |
| oc import-image crimes:1.1 --from=lordofthejars/crimes:1.1 | |
| oc patch dc/crimes -p '{"spec": { "triggers":[ {"type": "ConfigChange", "type": "ImageChange" , "imageChangeParams": {"automatic": true, "containerNames":["crimes"],"from": {"name":"crimes:1.1"}}}]}}' | |
| oc rollout latest dc/crimes | |
| oc describe dc crimes |