Posts

Showing posts from August, 2020

ORACLE :: UTL_FILE Stub

DECLARE  fileHandler UTL_FILE .FILE_TYPE; BEGIN  fileHandler := UTL_FILE.FOPEN ('/user/temp/', ' test_file.txt ', ' W ');   UTL_FILE.PUTF (fileHandler, 'Writing TO a file\n');   UTL_FILE.FCLOSE (fileHandler); EXCEPTION  WHEN utl_file.invalid_path THEN  raise_application_error(-20000, 'ERROR: Invalid PATH FOR file.'); END; /

Encrypt and Decrypt with Classic ASP

  Encrypt and Decrypt with Classic ASP ' USE: sField = Decode(request.querystring(encode("sParm")))   Function Decode(sIn)     dim x, y, abfrom, abto     Decode="": ABFrom = ""       For x = 0 To 25: ABFrom = ABFrom & Chr(65 + x): Next     For x = 0 To 25: ABFrom = ABFrom & Chr(97 + x): Next     For x = 0 To 9: ABFrom = ABFrom & CStr(x): Next       abto = Mid(abfrom, 14, Len(abfrom) - 13) & Left(abfrom, 13)     For x=1 to Len(sin): y=InStr(abto, Mid(sin, x, 1))         If y = 0 then             Decode = Decode & Mid(sin, x,...

NODE JS :: Next() Handler

Next() simple express app example: var express = require ( 'express' ); var app = express (); app . get ( '/user/:id' , function ( req , res , next ) { console . log ( 'FIRST request handler' ); next (); }); app . get ( '/user/:id' , function ( req , res , next ) { console . log ( 'USED request' ); res . sendStatus ( 200 ); next (); }); app . get ( '/user/:id' , function ( req , res , next ) { console . log ( 'FINAL request handler' ); next (); }); app . listen ( 3000 , function () { console . log ( 'Example app listening on port 3000!' ) }); If you do http : //localhost:3000/user/999 you will see this printed to console: FIRST request handler USED request FINAL request handler Now if you comment out the call to  next()  in the middle handler like this: app . get ( '/user/:id' , function ( req , res , next ) { console . log ( ...