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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
</head> | |
<body> | |
<iframe id="myAppframe" src="http://xxx.xxx.xxx.xxx/myApp"></iframe> | |
<script> | |
$(document).ready(function() { | |
$("#myAppframe").contents().find("myAppFooter").remove(); |
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 controllers; | |
import play.*; | |
import play.mvc.*; | |
import views.html.*; | |
import services.*; | |
import javax.enterprise.inject.*; | |
import javax.enterprise.context.*; |
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 controllers; | |
import play.*; | |
import play.mvc.*; | |
import views.html.*; | |
import services.*; | |
import javax.enterprise.context.*; |
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
import com.google.common.base.Function; | |
import com.google.common.base.Optional; | |
import com.google.common.base.Predicate; | |
import com.google.common.collect.Collections2; | |
import com.google.common.collect.Iterables; | |
import com.google.common.collect.Lists; | |
import java.lang.reflect.Field; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; |
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
take 2.pills of chloroquinine in 6.hours | |
move left by 30.centimeters |
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
# build the modified Weld API | |
# we're using Ales Justin (JBoss Weld lead) branches because he does a very good job at keeping everything up to date with Weld upstream | |
git clone https://github.com/alesj/api.git | |
git checkout -b osgi origin/osgi | |
cd ${START}/api | |
mvn clean install | |
# build Weld core with Weld-OSGi included | |
git clone https://github.com/alesj/core.git | |
git checkout -b osgi origin/osgi |
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
public class MyBean extends Application { | |
@Inject HelloService service; | |
public void displayHello() { | |
display( service.hello(); | |
} | |
} | |
public class MyBean extends Application { | |
private HelloService service; |
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
@Inject Service<SocialProvider> providers; | |
public List<Post> getTimeline() { | |
List<Post> timeline = new ArrayList<Post>(); | |
for (SocialProvider provider : providers) { | |
timeline.addAll(provider.getTimeline()); | |
} | |
Collections.sort(timeline, new Comparator<Post>() { | |
public int compare(Post post1, Post post2) { | |
return post1.timestamp().compare(post2.timestamp()); |
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
@Stateless | |
public class ShortenService { | |
@PersistenceContext EntityManager em; | |
public List<Shorten> all() { | |
return em.createQuery("select o from Shorten o").getResultList(); | |
} | |
public long count() { |