{{ message }}

Instantly share code, notes, and snippets.

# Luca Pandini lpand

• Milan – Italy
Last active Jan 28, 2016
View WebConfig.java
 package com.italtel.newpm.fe.config; import java.text.SimpleDateFormat; import java.util.List; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ResourceBundleMessageSource;
Created Jan 11, 2016
View ActCtrl.java
 @RestController @RequestMapping(path = "/act-tracking") public class ActivityTrackingController { @RequestMapping( path = { "", "/" }, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public List query( @RequestParam(name="q", defaultValue="") String q, @RequestParam(name="page", defaultValue="0") int page,
Created Jan 29, 2014
View eight-queens-puzzle.md

### Exercise 2

Implement a recursive procedure (function/class, you choose) that answers to the eight-queens puzzle problem.

The eight-queens puzzle asks how to place eight queens on a chessboard so that no queen is in check from any other (i.e., no two queens are in the same row, column, or diagonal).

#### Spoiler: one possible solution

One possible solution is shown in figure 2.8. One way to solve the puzzle is to work across the board, placing a queen in each column. Once we have placed k - 1 queens, we must place the kth queen in a position where it does not check any of the queens already on the board. We can formulate this approach recursively: Assume that we have already generated the sequence of all possible ways to place k - 1 queens in the first k - 1 columns of the board. For each of these ways, generate an extended set of positions by placing a queen in each row of the kth column. Now filter these, keeping only th

Last active Jan 4, 2016
View Enrichment.md

# Enrichment

## Index

Last active Dec 26, 2015
View biomart-notes.md

# Weighted Network

We're going to gather gene pairs from single query results searching for genes sharing the same annotation term.

G1 A1

G2 A1 -> G1 G2 A1

G2 A3

Created Oct 1, 2013
View resizer.js
 function resizeHandler () { if (this._svg && !this._svg.empty()) { this._svg.attr({ width: \$(window).width() height: \$(window).height() }) } } function resize (listener, interval) {
Created Sep 30, 2013
This is the martexplorer main.js hardcoded!
View martexplorer.js
 (function(\$) { /* * Author: jhsu * * This file + required modules contains all the JavaScript to run MartExplorer. * * The workflow starts from the biomart.martexplorer.init function, and ends with _stepCallback function. * * The _stepCallback function has an array (bound by closure) that maps to each of the four steps.
Last active Dec 24, 2015
Keeps the bubbles inside the force bounds and draws text if so configured
View force_layout_tick.js
 config.force.tick = function() { graphChart.links.attr({ x1: function(d) { return d.source.x }, y1: function(d) { return d.source.y }, x2: function(d) { return d.target.x }, y2: function(d) { return d.target.y } }) graphChart.bubbles .selectAll('circle') .attr({
Created Sep 28, 2013
graph configuration
View graph_config_test.js
 var nodes = [ { name: 0, value: 0 }, { name: 1, value: 1 }, { name: 2, value: 2 }, { name: 3, value: 3 } ] var edges = [ { source: nodes[0], target: nodes[1] },
Created Jun 25, 2015
View simple-gold.tmTheme
 author lpand