Posts

Published version not communicating same way as Visual Studio debug version

the published stand-alone version of code not communicating (usb/rs232 converter on com 5 in case) same way visual studio debug version.  the serial port monitor using showing snippet vs serial communications - note time stamps: [28/08/2012 07:56:35] - written data 53 ee 02 f4 2e 50 53 ee sî.ô.psî 01 f6 53 ef 01 50       .ösï.p   [28/08/2012 07:56:35] - read data 71                       q        [28/08/2012 07:56:35] - written data 53 ee 01 f7 53 ef 01 50 sî.÷sï.p [28/08/2012 07:56:35] - read data 12                       .        [28/08/2012 07:56:35] - written data 53 ee 02 f4 34 50 53 ee sî.ô4psî 01 f6 53 ef 01 50       .ösï.p   [28/08/2012 07:56:35] - read data 9e                       ž ...

how to convert my C# winform program to service program ?

hi how convert c# winform program service program ? i need program work service (like listener) thanks in advance a service can have no ui component. so, said, if have designed winform app ui tier separate business logic tier easy. when write service typically start making console or winform app , work in separate class library. when satisfied logic intact create service project , include class have debugged in console. service app has unhandled exception stuff , timer or other mechanism call entry point in other class library.   Visual Studio Languages  ,  .NET Framework  >  Visual C# ...

C# code snippet to download files from shared location

hi team, i have test write results log file in multiple azure vm. have manually log in each vm , download files local system. thinking of making shared folder , use c# code download files. can please share c# code snippet download files shared location based on file extension , file last modified date time. hi, i suggest have job running on vms (could windows service) copies logfiles on regular time intervals azure blob storage. can use c# access files: http://robbincremers.me/2012/02/27/everything-you-need-to-know-about-windows-azure-blob-storage/ rgds mm ps: please mark answer if helpful. thanks! blog: http://www.manuelmeyer.net twitter: https://twitter.com/manumeyer1 Visual Studio Languages  ,  .NET Framework ...

How to create a manage metadata field using javascript object model in sharepoint 2013 ?

hi all, can 1 suggest me how create manage metadata field using javascript object model in sharepoint 2013 ?thanks in advance. regards, rajkishore hi, the following code reference: jquery(function($) { var scriptbase = _sppagecontextinfo.webserverrelativeurl + "_layouts/15/"; $.getscript(scriptbase + "sp.runtime.js", function () { $.getscript(scriptbase + "sp.js", function(){ $.getscript(scriptbase + "sp.taxonomy.js", executetaxonomyfunctions); }); } ); }); function executetaxonomyfunctions() { var context = sp.clientcontext.get_current(); var list = context.get_web().get_lists().getbytitle("resources"); var field = list.get_fields().getbyinternalnameortitle("resourcetype"); var txfield = context.castto(field, sp.taxonomy.taxonomyfield); context.load(field); context.load(tx...

Make DAC connection to SQL DB engine using C#

hi, i trying make dedicated administrator connection sql database engine using .net(c sharp). aware of making normal sql server connection using sqlconnection class. tried make connection follows string str = data source=admin:myservername;initial catalog=mydatabase;user id=myusername;password=mypassword; sqlconnection sqlobj = new sqlconnection(str); sqlobj.open();   but not succeed. can me this there limitation on way can connect dac. in particular, can read here: http://msdn.microsoft.com/en-us/library/ms189595.aspx , by default, connection allowed client running on server. network connections not permitted unless configured using sp_configure stored procedure remote admin connections option . only members of sql server sysadmin role can connect using dac. the dac available , supported through sqlcmd command-prompt utility using special administrator switch ( -a ). more information using sqlcmd , see using sqlcmd scripting variables . can connect prefixi...

Regex - Recognize same first name and last name in a sentence

hi, again regex :) need recognize string (many sentences) names of teh persones have same first name , last name. for example: john john bornyear maria magdalena son james james little bit younger. from ths sentence need recognize fact john first name , last name person , james. rule has start big letter , have duplicate word consecutively. thanks in advance, ciprian lupu you might want give try: \b([a-z]\w+)\s\1\b it appreciated if mark helpful entries helpful , if entry answers question, please mark answer link. Visual Studio Languages  ,  .NET Framework  >  Visual C# ...

Not able to read full content of xml file

hi, im trying read xml content string in c# using file.readalltext. after executing line read around 900 lines 3000 lines of code. not able read full content of file. happens in system.i have tried same other 2 systems working expected. please suggest why not read content in 1 machine.do need change settings in system? thanks regards, karthik.k file.readalltext read text without exception. there nothing configure or change. if reading partial file part of file there. wonder if you're reacting file copy notification or perhaps trying read file while still being written. Visual Studio Languages  ,  .NET Framework  >  Visual C# ...