Posts

how to setup a local repo of mercurial -

here complete scenario: main repository: http://10.0.1.8:8000/ptest i clone @ host 10.1.0.115 , in folder /local-repo then, publish using command hg serve -p 9900 -d --webdir-conf hgwebconfig hgwebconfig file having [paths] ptest = /local_repo/ptest [web] style = gitweb now, on same host 10.0.1.115, create seperate folder /qa , do: hg clone http://10.0.1.115:9900/ptest and files, want make changes , push them repo on http://10.0.1.115:9900/ptest using command hg push ssh://10.0.1.115//??/ptest i don't know correct value ?? . questions are: how setup user/password push changes repo on 10.0.1.115 ? what corect syntax in case? when try push changes error: hg push ssh://user@10.0.1.115/ptest user@10.0.1.115's password: remote: abort: there no mercurial repository here (.hg not found)! abort: no suitable response remote hg! do need push via ssh:// when pulled via http:// ? after hg clone http://10.0.1.115:9900/ptest clone should able...

difference between c# and java write() -

i trying establish serialport communication between eftpos terminal connected serialport , computer. eftpos manual has c# code testing , in have following lines write port , read port straightaway. port.writeline("@pl"); console.writeline(port.readline()); but in java if use application goes halt. using eventhandlers in java read response eftpos terminal. still couldnot work. have doubt writeline("@pl") of c# , outputstream.write(bytearray) of java. these 2 methods phrases string in same whay when written on port ?? because eftpos respond if message "@pl". solution problem great relief me.. it's possible they're writing in different encodings. if eftpos terminal expecting ascii , java writing utf-16, won't work.

xslt - Find maximum value of all child elements and only get the max row of that child using xsl transformation 1.0 -

for example source xml <records> <record> <personid>111</personid> <location>australia</location> <year>1999</year> </record> <record> <personid>222</personid> <location>netherland</location> <year>1919</year> </record> <record> <personid>111</personid> <location>usa</location> <year>2000</year> </record> </records> now after xsl should below takes latest year's (max on elemtnt year) , discards old records personid: <records> <record> <personid>222</personid> <location>netherland</location> <year>1919</year> </record> <record> <personid>111</personid> <location>usa</location> <yea...

ajax - What's the most efficient / fast way to display website within another website? -

i developing portfolio website , thought nice show websites i've created within portfolio website. so have header navigation of portfolio website , beneath or website portfolio list. i mentioned , i've heard can such job, have no idea of how use them. so please suggest way efficient, browser friendly, wouldn't take lot of server resources display different websites (and job). additionally: way planning having links different websites http://webpage.com/portfolio.php?url= http://anotherwebpage.com when user clicks website shown in (or else) http://anotherwebpage.com . if possible suggest "ajax" method not require page refresh , show different webpage in (or else ;d ) instantly after user clicks on different links thank ))) use javascript , iframe <a href="http://yourpage.com" onclick="document.getelementbyid('iframe').src=this.href;return false">my page</a> <iframe id="iframe"...

.net - What is a "mostly complete" (im)mutability approach for C#? -

since immutability not baked c# degree f#, or framework (bcl) despite support in clr, what's complete solution (im)mutability c#? my order of preference solution consisting of general patterns/principles compatible with a single open-source library few dependencies a small number of complementary/compatible open-source libraries something commercial that covers lippert's kinds of immutability offers decent performance (that's vague know) supports serialization supports cloning/copying (deep/shallow/partial?) feels natural in scenarios such ddd, builder patterns, configuration, , threading provides immutable collections i'd include patterns community might come don't fit in framework such expressing mutability intent through interfaces (where both clients shouldn't change , may want to change can through interfaces, , not backing class (yes, know isn't true immutability, sufficient): public interface ix { int y{ get; } re...

Unable to debug MVC source code in Visual Studio 2010 -

Image
i'm trying debug mvc source code in visual studio 2010 using microsoft symbols server. i've configured debugging options seen below: and project targeting .net framework 4.0. (as said in debug .net framework's source code shows disassembly in visual studio 2010 ) when try load symbols of system.web.mvc.dll, window pops saying they're being loaded. in end, modules window says couldn't found, call stack lines still grayed out , code disassembly window. anyone knows happening? microsoft has not provided symbols/source code entire .net framework via symbol server. mvc opened source can seperately download mvc source microsoft: http://aspnet.codeplex.com/releases/view/58781

node.js - How do I update a property with the current date in a Mongoose schema on every save? -

in database collections, want update 'lastchanged' field every time record updated current datetime. want in same format mongoose's default date like: isodate("2011-10-06t14: 01: 31.106z") any words of wisdom? if want iso string use: new date().toisostring()