Skip to content

Instantly share code, notes, and snippets.

@dnagirl
dnagirl / childRowColumn.html.twig
Created September 7, 2016 13:28
childRowColumn class for stwe/DatatablesBundle
{
'name': "{{ column.name }}",
'orderable': false,
'searchable': false,
'visible': true,
'className': "{{ column.class }}",
'data': "{{ column.data }}"
{%- if column.ajax is defined -%}
,
'render': function( data, type, row ){
@dnagirl
dnagirl / DefaultController.php
Created October 15, 2015 13:15
Symfony form type with DataMapper
<?php
namespace ACC\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class DefaultController extends Controller
{
@dnagirl
dnagirl / cytoscapedemo.js
Last active August 29, 2015 14:23
problems with cytoscape
$(document).ready(function(){
eles = function(){
var es = {nodes:[], edges: []};
$.each(my_data.nodes,function(){
this.use_wt = Number(this.use_wt);
this.expertise_wt = Number(this.expertise_wt);
es.nodes.push( {'data': this});
});
$.each(my_data.edges,function(){
this.edge_wt = Number(this.edge_wt);
@dnagirl
dnagirl / badDisable.R
Created May 29, 2015 14:35
demo of shinyjs::disable with slider
library(shiny)
library(shinyjs)
server <- function(input, output, session) {
output$msg = renderText({
paste(input$slide, input$words)
})