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
k = [8,10,4,0] | |
console.log(k) | |
d = _(k).map(function(el,index,list){if(0==index) return 0; else return _(list.slice(0,index)).foldr(function(x,y){return x+ y})}) | |
console.log(d) | |
_(d).map(function(el,index,list){return list[index+1]-el}).slice(0,this.length-1) |
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 org.endeios.scala | |
import org.endeios.scala.mypack.AClass | |
import java.lang.Exception; | |
object BigApplication extends App { | |
//case classes are usefull for printing in console!! | |
case class MyEl(val data: Int, var Total: Int); | |
def a = MyEl(8, 0); |
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
/* | |
* http://www.drdobbs.com/open-source/currying-and-partial-functions-in-javasc/231001821?pgno=2 | |
* here because i like it | |
* this script requires underscore | |
* http://underscorejs.org/ | |
* */ | |
function schonfinkelize(fn) { | |
var slice = Array.prototype.slice, stored_args = slice.call(arguments, 1); | |
return function() { | |
var new_args = slice.call(arguments), args = stored_args |
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 org.endeios.listeners; | |
import java.util.Map; | |
import org.activiti.engine.TaskService; | |
import org.activiti.engine.delegate.DelegateTask; | |
import org.activiti.engine.delegate.TaskListener; | |
import org.activiti.engine.impl.context.Context; | |
public class MyTaskListener implements TaskListener { |
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 'dart:html'; | |
import 'package:web_ui/web_ui.dart'; | |
import 'dart:async'; | |
// initial value for click-counter | |
int startingCount = 5; | |
/** | |
* Learn about the Web UI package by visiting | |
* http://www.dartlang.org/articles/dart-web-components/. |
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
/*STUDIO FOR GROOVY*/ | |
def orderListExcluding(List<Map> aList,List exclusions){ | |
return aList.sort{it["robe"].minus(exclusions).size()}.reverse() | |
} | |
a = ["id":3784923874,"robe":["coli","clebsiella"]] | |
b = ["id":371231923874,"robe":["coli"]] | |
c = ["id":3712586923874,"robe":[]] |
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 socket | |
import futures | |
import logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG) | |
def loltest(ronfz): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd "> | |
<!-- An empty blueprint descriptor --> | |
</blueprint> |
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 chap4 | |
sealed trait Option[+A] { | |
def map[B](f: A => B): Option[B] = this match { | |
case None => None | |
case Some(a) => Some(f(a)) | |
} | |
def flatMap[B](f: A => Option[B]): Option[B] = this match { | |
case None => None |
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 propBased | |
import java.net.ServerSocket | |
import java.io.BufferedReader | |
import java.net.Socket | |
import java.io.InputStreamReader | |
import java.io.Writer | |
import java.io.Reader | |
import java.io.PrintWriter |
OlderNewer