➜ ~ ruby habtm.rb
Active Record 4.1.1
-- create_table(:articles, {:force=>true})
-> 0.3158s
-- create_table(:publisher_magazines, {:force=>true})
-> 0.0005s
-- create_table(:articles_publisher_magazines, {:force=>true})
-> 0.0005s
#<ActiveRecord::Associations::CollectionProxy [#<Article id: 1>]>
@@ -303,13 +300,14 @@ | |
Get string length */ | |
ZEND_NAMED_FUNCTION(zend_if_strlen) | |
{ | |
- zval **str; | |
+ char *s1; | |
+ int s1_len; | |
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { | |
- ZEND_WRONG_PARAM_COUNT(); |
Rudimentary method of extracting JSON data from the ChicagoLobbyists sinatra app for a force directed graph
By adding transitions, we can more easily follow the elements as they are entered, updated and exited. Separate transitions are defined for each of the three states.
Note that no transition is applied to the merged enter + update selection; this is because it would supersede the transition already scheduled on entering and updating elements. It's possible to schedule concurrent elements by using transition.transition or by setting transition.id
, but it's simpler here to only transition the x-position on update; for entering elements, the x-position is assigned statically.
Want to read more? Try these tutorials:
Created by Christopher Manning
Created by Christopher Manning
Created by Christopher Manning
This generates a Sierpinski Triangle graph using a force-directed layout.
- Use the mousewheel to increase or decrease the iterations.
Created by Christopher Manning
- Drag left and right to adjust the width of the noise
- Drag up and down to adjust the height of the noise
- Use the mousewheel to increase or decrease the amplitude.