//croyden tram stops included in TUB $node_types = array('tube', 'tram'); $stops_path = $data_path . 'tube_stops.dat'; $p2p_path = $data_path . 'tube_p2p.dat'; break; } $metaphones = $data_path . 'metaphones.txt'; function inspect_data($path, $depth) { $data = file_get_contents($path); //, FILE_BINARY); $map = clb_blob_dec($data); qpre(pfind_shallow($map, $depth)); } if (($val = clb_val(FALSE, $_REQUEST, 'p')) && in_array($val, array('prim', 'near', 'stops', 'p2p'))) { echo clb_tag('a', 'back to generator', '', array('href' => clb_make_url())) . '<br />'; $path = $val . '_path'; $data = file_get_contents(${$path}); //, FILE_BINARY); $map = clb_blob_dec($data); qpre($map); exit; } if (clb_val(FALSE, $_REQUEST, 'p') == 'dist') { $flat = 'wp_mfw_dists'; $sel1 = $wpdb->get_results('SELECT DISTINCT a FROM ' . $flat, ARRAY_A); $a = clb_column($sel1, 'a'); $sel1 = $wpdb->get_results('SELECT DISTINCT b FROM ' . $flat, ARRAY_A); $b = clb_column($sel1, 'b'); $a = array_merge($a, $b); $a = array_unique($a);
} if (IS_CLI) { db_close(); exit; } else { if ($path) { clb_timing(__LINE__); $data = file_get_contents($path, FILE_BINARY); clb_timing('load'); $map = clb_blob_dec($data); qpre(clb_timing('decode'), 'count', count($map, 1)); qpre('file content length/array', $path, strlen($data), $map); } } db_close(); $base = clb_make_url() . '?m='; echo clb_tag('p', '', clb_tag('a', 'near', '', array('href' => $base . 'near'))); echo clb_tag('p', '', clb_tag('a', 'raw', '', array('href' => $base . 'raw'))); echo clb_tag('p', '', clb_tag('a', 'stops', '', array('href' => $base . 'stops'))); echo clb_tag('p', '', clb_tag('a', 'links', '', array('href' => $base . 'links'))); echo clb_tag('p', '', clb_tag('a', 'p2p', '', array('href' => $base . 'p2p'))); echo clb_tag('p', '', clb_tag('a', 'interchange', '', array('href' => $base . 'interchange'))); echo clb_tag('p', '', clb_tag('a', 'check_raw_ends', '', array('href' => $base . '7'))); echo clb_tag('p', '', clb_tag('a', 'hardcoded test case', '', array('href' => $base . '8'))); echo clb_tag('p', '', clb_tag('a', 'audit of tyube stops', '', array('href' => $base . '9'))); echo clb_tag('p', '', clb_tag('a', 'hardcoded tests for specific short paths', '', array('href' => $base . '10'))); echo clb_tag('p', '', clb_tag('a', 'arrays connecting nodes to raw segs', '', array('href' => $base . '11'))); echo clb_tag('p', '', clb_tag('a', 'hardcoded insert of link record', '', array('href' => $base . '12'))); echo clb_tag('p', '', clb_tag('a', 'hardcoded test', '', array('href' => $base . 'test'))); ?> <pre>