Posts

node.js - Node Express - empty query after form submit -

i pars url after form submit. have simple form: form(method='post', action='/recipe/create') hr div div.input.text label(for='recipetitle') tytuł przepisu: input(type='text', name='recipetitle', id='recipetitle') div.input.text label(for='photofilename') nazwa zdjęcia: input(type='text', name='photofilename', id='photofilename') after submit code executed. exports.create = function(req, res){ var url = require('url'); var url_parts = url.parse(req.url, true); console.log(url_parts); my question why console shows empty query { protocol: null, slashes: null, auth: null, host: null, port: null, hostname: null, hash: null, search: '', query: {}, pathname: '/recipe/create', path: '/recipe/create', href: '/recipe/create' } this happens because you're posting url...

iphone - Create a UIView in storyboard -

how create uiview in storyboard uibarbuttonitem presenting popovercontroller. possible create separate uiview without having uiviewcontroller? requirement uibarbuttonitem in uiviewcontroller when pressed should present uiview popover controller, has uitableview in it. thanks help. if want present table view, better off having table view controller, regardless how showing table (popover or otherwise). simply setup new view controller in storyboard, add segue bar button , specify "style" popover.

Where is Ruby's string literal juxtaposition feature officially documented? -

i realized if juxtapose sequence of ruby string literals (e.g. 'a' "b" 'c' ), it's equivalent concatenation of string literals. however, can't find language feature documented anywhere. i've searched using terms "juxtaposition" , "concatenation", found reference in couple of stackoverflow responses. can point me definitive reference? update this now officially documented in rdoc ships ruby. changes propagate rubydoc next time build documentation. the added documentation: adjacent string literals automatically concatenated interpreter: "con" "cat" "en" "at" "ion" #=> "concatenation" "this string contains "\ "no newlines." #=> "this string contains no newlines." combination of adjacent single-quote, double-quote, percent strings concatenated long percent-string not last. %q{a} 'b' ...

c# - Error with Mongo Client -

when try connected mongo server mongo client, following warning: error while trying show server startup warnings: no such cmd it still gives me access , can access database. issue when try accessing db c#. warning throws exception, , application terminates. the mongod command used mongod --port 30000 no startup scripts far can tell. the mongo server running on debian, on machine. update the error thrown .net is unable connect server xxx.xxx.xxx.xx:30000: command 'ping' failed: no such cmd (response: { "errmsg" : "no such cmd", "bad cmd" : { "ping" : 1 }, "ok" : 0.0 }). solved. server version older client version.

Calling nant from msbuild -

i'm attempting run existing nant task msbuild targets file. there way this? google gives me lots of examples of calling msbuild nant, nothing other way around. thank you. you call nant msbuild's exec command. don't think there's other command in msbuild call nant specifically. calling nant target msbuild this <exec command="nant -buildfile:your.build yourtarget"/> and if want nant return something, try in nant: <echo message="yourreturnparameter" file="yourfile.tmp" /> and let msbuild read it: <readlinesfromfile file="yourfile.tmp" > <output taskparameter="lines" itemname="yourreturnparameter"/> </readlinesfromfile> source: http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx

asp classic - SQL Server Stored Procedure SCOPE_IDENTITY() issue -

i have stored procedure , inside can see use 2 scope_identity(); problem second scope_identity assign @status variable when execute stored output @status variable null strange thing 2 inserts works fine. i want return output of stored scope_identity of second insert. can me? alter procedure [dbo].[sp_userinsert] ( @username nvarchar(50)=null, @password nvarchar(50)=null, @email nvarchar(50)=null, @roleid int = 0, @userid int = 0, @typeop int, @status int = 0 output ) begin set nocount on; if (@typeop = 1) /*creazione nuovo recordo nella tabella utenti*/ begin if exists(select * gruppi gruppi.groupid =@roleid) begin insert dbo.utenti(username,password,email) values(@username,@password,@email) set @userid = scope_identity() if (@userid > 0) begin insert dbo.ruoli(userid,groupid) values(@userid,@roleid) set @status = @@rowcount end end end end now hav...

c# - I don't understand a piece of someones answer -

this odd question in someones else's answer in different question posted following try { pingreply reply = pinger.send(nameoraddress); pingable = reply.status == ipstatus.success; } how pingable = reply.status == ipstatus.success; work? me looks if statement without if. reply.status == ipstatus.success will return boolean assigned pingable variable. same thing happen inside if statement: first expression calculated, true or false result, , result checked branch condition.