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
sciApp.controller('AngularedCollectionController', ['$scope', '$compile', function ($scope, $compile) { | |
$scope.index = 1; | |
$scope.init = function (collectionId) { | |
var indexes = []; | |
$('#' + collectionId).find('input[type=hidden]').each(function () { | |
var attrName = $(this).attr('name'); | |
var indexFinder = new RegExp('\\]\\[(\\d+)\\]\\['); |
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 static org.junit.Assert.*; | |
import java.util.*; | |
import org.junit.Test; | |
import org.mvel2.MVEL; | |
/** | |
* @author Zilvinas Vilutis |
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
/** | |
* Moon Phase Calculator | |
* | |
* @author Zilvinas Vilutis | |
*/ | |
public class MoonPhaseCalc { | |
public final static String format = "yyyy-MM-dd"; | |
private static final int moonPhaseHours = 709; |
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
/** | |
* The problem: | |
* | |
* http://stackoverflow.com/questions/15314616/removing-minimal-letters-from-a- | |
* string-a-to-remove-all-instances-of-string-b | |
* | |
* <p> | |
* If we have string A of length N and string B of length M, where M < N, can I | |
* quickly compute the minimum number of letters I have to remove from string A | |
* so that string B does not occur as a substring in A?<br/> |