Posts

Issues with 'checked' attribute in 'input' form tags within PHP while loops -

Issues with 'checked' attribute in 'input' form tags within PHP while loops - i'm using html form edit sql db, want have form display value in database. i'm using while loop display sql rows. simple radio button allowing user chose between 'listings' (shows '0' in sql) or 'recent transactions" (shown '1' in sql). the radio buttons not pre-filling value sqlas checked or not <form name="edit listing" action="edit_list.php" method="post" id="edit_form" > <ul> <?php while ($data=mysqli_fetch_assoc($result)): $transaction = $data['transaction']; $chkvalue='checked="checked"'; ?> <li> <fieldset> <legend>designation <h6>required</h6></legend> <input name="transaction" type="radio" tabindex="11" value="0" <?php if ...

json - Providing data models to use in Gulp Nunjucks templates -

json - Providing data models to use in Gulp Nunjucks templates - i'm looking utilize gulp render nunjucks templates either gulp-nunjucks or gulp-nunjucks-render. there way can pass 1 or series of .json files templating bundle utilize json info in nunjucks templates? ideally i'd have models/ directory each page having corresponding page.json file contents used in template. i'd know if it's possible either of above plugins , if how can implemented. examples single or series of .json files useful. look using gulp-data https://www.npmjs.org/package/gulp-data produces json source, json file, or database, sends downwards stream via new attribute on file object (file.data). nunjucks plugin need modified consume info property. json gulp nunjucks

node.js - Session data is not saving to memory while using express-session -

node.js - Session data is not saving to memory while using express-session - i encountering problem when seek next illustration using different express-session versions. using express-session 1.0.2 : var connect = require('express'), cookieparser = require('cookie-parser'), session = require('express-session'); var app = connect(); app.use(cookieparser()) .use(session({secret:'sessionsecret',cookie:{maxage:60000}})) .use(function(req,res,next){ if(req.session.views){ res.setheader('content-type','text/html'); res.write('<p>views ' + req.session.views + '</p>'); //here res.end(); req.session.views++; } else { req.session.views = 1; res.end('welcome demoe. seek refresh page'); } }) .listen(3000); this works; view counter keeps increasing when refresh page. however, when alter express-session 1.8.2 (the lat...

encryption - Generate AES key in C# for windows store app -

encryption - Generate AES key in C# for windows store app - i need genearte 256 bit key aes encryption in c# fore windows store app. ised next code , getting execption. please point me doing wrong. public string genaeskey() { uint32 keysize = 32; cryptographickey key; symmetrickeyalgorithmprovider algorithm = symmetrickeyalgorithmprovider.openalgorithm(symmetricalgorithmnames.aesecb); ibuffer keymaterial = cryptographicbuffer.generaterandom((keysize + 7) / 8); seek { key = algorithm.createsymmetrickey(keymaterial); homecoming key.tostring(); } grab { homecoming null; } the error "value not fall within expected range." @ algorithm.createsymmetrickey(keymaterial); command. my bad. problem in this. uint32 keysize = 32; changed to uint32 keysize = 256; and evrything goo...

C++ beginner - simple outputs -

C++ beginner - simple outputs - here have simple code serve calculator integers. //calculator, michael lowry #include <iostream> using namespace std; void main () { int input = 0; int input2 = 0; int reply = 0; int operation = 0; cout << "enter first number" << endl; cin >> input; cout << "type 1 addition, 2 subtraction, 3 multiplication, or 4 division" << endl; cin >> operation; cout << "enter sec number" << endl; cin >> input2; if (operation = 1) { input + input2 == answer; } if (operation = 2) { input - input2 == answer; } if (operation = 3) { input * input2 == answer; } if (operation = 4) { input / input2 == answer; } cout << "your reply " << cout << reply << endl; scheme ("pause"); } when com...

mozilla firefox extension: creating a javascript library and using it in a HTML page -

mozilla firefox extension: creating a javascript library and using it in a HTML page - i created library in firefox extension : ./components/main.js ./skin/icon.png ./install.rdf ./chrome.manifest my main.js utilize define class calling mozilla tcpscoket ( https://developer.mozilla.org/en-us/docs/web/api/tcpsocket) function mylib() {} mylib.prototype.dowork = function(arg1,arg2) { /* tcpscoket */} how should utilize library on client side in html ? i'm looking (?): <html><head><script> var mylib = mozillaapithing.createnewinstance("chrome://myextension/", "mylib"); .... </script>(...) chrome or resource (not in restartless) urls available direct urls (ie can come in them address-bar , show up). hence can utilize simple script src <script src="chrome://myextension/components/jsfile.js"></script> alternatively, can read js file (ie xmlhttprequest or fileutils.jsm or osfi...

Biztalk Map, How to execute a scripting functoid ONLY IF the source message contains a specific value? -

Biztalk Map, How to execute a scripting functoid ONLY IF the source message contains a specific value? - in biztalk map, how can execute scripting functoid if source message contains specific value? functoid combination can allow me this? edit i want check element specific value. scripting inline xslt. in response 40alpha first suggestion: method utilize can't connect scripting functoid value mapping functoid. i'm doing wrong here? the 2 easiest options (imo) be: what is: create equal functoid (1st status beingness "certain element" , 2nd status beingness text check against) create value mapping functoid , connect equal functoid (that made) first , connect scripting functoid. now connect scripting functoid desired target element(s). or simpler approach be: wrap xslt in scripting functoid: <xsl:if test="/yournode[text()="somevalue"]"> <!--your scripting here --> </xsl:if> biztalk ...