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
{-# LANGUAGE OverloadedStrings #-} | |
module Swap where | |
import Language.Marlowe.Extended.V1 | |
main :: IO () | |
main = printJSON $ contract | |
-- We can set explicitRefunds True to run Close refund analysis | |
-- but we get a shorter contract if we set it to False |
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
UIView.transitionWithView(self.view, duration: 0.5, options: UIViewAnimationOptions.TransitionNone, | |
animations: {self.view.addSubview(effectView)}, completion: nil) |
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
#!/usr/bin/env sh | |
for i in `objdump -d $1 | tr '\t' ' ' | tr ' ' '\n' | egrep '^[0-9a-f]{2}$' ` ; do echo -n "\x$i" ; done |
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
<h:commandLink> | |
Eliminar | |
<s:conversationPropagation type="begin" /> | |
<f:setPropertyActionListener target="#{cursoController.curso}" | |
value="#{curso}"/> | |
<f:ajax execute="@this" render=":mod:popup" | |
onevent="showModal"/> | |
</h:commandLink> |
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
sudo nohup command & |
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
List<String> list = new ArrayList<String>() { | |
{ | |
add("String A"); | |
add("String B"); | |
add("String C"); | |
} | |
}; |
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 | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
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
$scope.$watchCollection( 'myCollection', function( oldCollection, newCollection ) { | |
if( oldCollection === newCollection ) return; | |
// Gives the time to destroy dataTable, which is immediately | |
$( '#dataTable' ).dataTable().fnDestroy(); | |
$timeout(function () { | |
// After a few time, create the dataTable when DOM render is complete | |
$( '#dataTable' ).dataTable(); | |
}); | |
}); |
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
if (e.getClickCount() == 2) { | |
JTable target = (JTable) e.getSource(); | |
int row = target.getSelectedRow(); | |
Object value = target.getModel().getValueAt(row, 0); | |
for (ItemListener il : listeners) { | |
il.onItemDoubleClick(this, value, row); | |
} | |
} |
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
/** | |
* Created by IntelliJ IDEA. | |
* User: sergio | |
* Date: 7/12/12 | |
* Time: 05:31 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
import java.io.*; | |
import java.net.*; |
NewerOlder