Daily Archives

Articles indexed Wednesday April 21 2010

Page 14/126 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • windows service "soft link"

    - by fred smith
    I would like to be able to have a nice management tool to allow the rollout of different versions of a windows service over time. for example I would like to deploy my software (windows service) in version numbered folders, e.g. c:\wss\v1.0 c:\wss\v1.1 etc however I dont want to have to reinstall the windows service each time but rather would like to be able to easily point the windows service manager to the new folder. Are there tools to get this done? NB: I have used Windows Junctions before (from sysinternals) however I am wondering if there is a nice GUI tool to do this.

    Read the article

  • Free web hosting that allows JavaScript and CSS

    - by Raul Agrait
    I was considering using Google Sites to host some webpages with HTML5 and JavaScript experiments I'm trying out, but it seems that they don't allow JavaScript. Does anybody have any good suggestions for a free web hosting service where I can upload simple HTML/CSS & JavaScript experiments? I don't have large bandwidth needs, nor do I need a WYSIWYG editor. Ideally I'd like to just upload the HTML, CSS, and JS files directly.

    Read the article

  • Don’t just P2V that server for Testing!

    - by Jonathan Kehayias
    If you use virtualization in your company, at some point in time you might be tempted to perform a Physical-To-Virtual conversion, also known as P2V.  The ability to create a complete working copy of a physical server as a virtual machine is really useful for migrating to a virtualized datacenter, but it can also wreak havoc in your environment if you use it to generate a copy of a server for testing and the only change you make is the name of the server.  The Problem: Consider that you...(read more)

    Read the article

  • how to compile f# on mono

    - by leon
    I am trying to compile this example in mono on ubuntu. However I get the error wingsit@wingsit-laptop:~/MyFS/kitty$ fsc.exe -o kitty.exe kittyAst.fs kittyParser.fs kittyLexer.fs main.fs Microsoft (R) F# 2.0 Compiler build 2.0.0.0 Copyright (c) Microsoft Corporation. All Rights Reserved. /home/wingsit/MyFS/kitty/kittyAst.fs(1,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' /home/wingsit/MyFS/kitty/kittyParser.fs(2,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' /home/wingsit/MyFS/kitty/kittyLexer.fsl(2,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' wingsit@wingsit-laptop:~/MyFS/kitty$ I am a newbie in F#. Is there something obvious I miss?

    Read the article

  • DTO or Domain Model Object in the View Layer?

    - by smayers81
    I know this is probably an age-old question, but what is the better practice? Using a domain model object throughout all layers of your application, and even binding values directly to them on the JSP (I'm using JSF). Or convert a domain model object into a DTO in the DAO or Service layer and send a lightweight DTO to the presentation layer. I have been told it makes no sense to use DTOs because changes to the database will result in changes to all your DTOs whereas using Model Objects everywhere will just require changes to the affected model object. However, the ease of use and the lightweight nature of DTOs seems to outweigh that. I should note that my app uses Hibernate Model Objects AND uses its own custom-created model objects (meaning not bound to any DB session, always detached). Is either of the above scenarios more beneficial to a strict Model Object pattern? Using Hibernate has been a huge PITA with regards to things like Lazy Initialization Exceptions.

    Read the article

  • How can I release this NSXMLParser without crashing my app?

    - by prendio2
    Below is the @interface for an MREntitiesConverter object I use to strip all html tags from a string using an NSXMLParser. @interface MREntitiesConverter : NSObject { NSMutableString* resultString; NSString* xmlStr; NSData *data; NSXMLParser* xmlParser; } @property (nonatomic, retain) NSMutableString* resultString; - (NSString*)convertEntitiesInString:(NSString*)s; @end And this is the implementation: @implementation MREntitiesConverter @synthesize resultString; - (id)init { if([super init]) { self.resultString = [NSMutableString string]; } return self; } - (NSString*)convertEntitiesInString:(NSString*)s { xmlStr = [NSString stringWithFormat:@"<data>%@</data>", s]; data = [xmlStr dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; xmlParser = [[NSXMLParser alloc] initWithData:data]; [xmlParser setDelegate:self]; [xmlParser parse]; return [resultString autorelease]; } - (void)dealloc { [data release]; //I want to release xmlParser here but it crashes the app [super dealloc]; } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)s { [self.resultString appendString:s]; } @end If I release xmlParser in the dealloc method I am crashing my app but without releasing I am quite obviously leaking memory. I am new to Instruments and trying to get the hang of optimising this app. Any help you can offer on this particular issue will likely help me solve other memory issues in my app. Yours in frustrated anticipation: ) Oisin

    Read the article

  • JSP page is not getting reflected in Jetty

    - by [email protected]
    I am using Jetty web server, and while loading JSP page, its getting loaded from cache and not from the server. my updated jsp page is not getting reflected. I was deleted my file and checked out from CVS also. There is no use, the same result came again. What will be the reason ? Thanks in advance.

    Read the article

  • Serialization of Queue type- Serialization not working; C#

    - by Soham
    Hi All, Consider this piece of code: private Queue Date=new Queue(); //other declarations public DateTime _Date { get { return (DateTime)Date.Peek();} set { Date.Enqueue(value); } } //other properties and stuff.... public void UpdatePosition(...) { //other code IFormatter formatter = new BinaryFormatter(); Stream Datestream = new MemoryStream(); formatter.Serialize(Datestream, Date); byte[] Datebin = new byte[2048]; Datestream.Read(Datebin,0,2048); //Debug-Bug Console.WriteLine(Convert.ToString(this._Date)); Console.WriteLine(BitConverter.ToString(Datebin, 0, 3)); //other code } The output of the first writeline is perfect. I.e to check if really the Queue is initialised or not. It is. The right variables are stored and et. all [I inserted a value in that Q, that part of the code is not shown] But the second writeline is not giving the right expected answer: It serializes the entire Queue to 00-00-00. Want some serious help! Soham

    Read the article

  • LINQ Nested Where

    - by griegs
    If I have the following model; public List<RecommendedProduct> recommendations Then public class RecommendedProduct public List<Product> Products Then the Product; public class Product public string Code The recommendations list has, as an example, 10 items in it. Each recommendations item has two Products in it. How, with LINQ, can I find the recommendations object that has products with both "A" and "B" product codes?

    Read the article

  • How to invalidate cache when benchmarking?

    - by Michael Buen
    I have this code, that when swapping the order of UsingAs and UsingCast, their performance also swaps. using System; using System.Diagnostics; using System.Linq; using System.IO; class Test { const int Size = 30000000; static void Main() { object[] values = new MemoryStream[Size]; UsingAs(values); UsingCast(values); Console.ReadLine(); } static void UsingCast(object[] values) { Stopwatch sw = Stopwatch.StartNew(); int sum = 0; foreach (object o in values) { if (o is MemoryStream) { var m = (MemoryStream)o; sum += (int)m.Length; } } sw.Stop(); Console.WriteLine("Cast: {0} : {1}", sum, (long)sw.ElapsedMilliseconds); } static void UsingAs(object[] values) { Stopwatch sw = Stopwatch.StartNew(); int sum = 0; foreach (object o in values) { if (o is MemoryStream) { var m = o as MemoryStream; sum += (int)m.Length; } } sw.Stop(); Console.WriteLine("As: {0} : {1}", sum, (long)sw.ElapsedMilliseconds); } } Outputs: As: 0 : 322 Cast: 0 : 281 When doing this... UsingCast(values); UsingAs(values); ...Results to this: Cast: 0 : 322 As: 0 : 281 When doing just this... UsingAs(values); ...Results to this: As: 0 : 322 When doing just this: UsingCast(values); ...Results to this: Cast: 0 : 322 Aside from running them independently, how to invalidate the cache so the second code being benchmarked won't receive the cached memory of first code? Benchmarking aside, just loved the fact that modern processors do this caching magic :-)

    Read the article

  • Finding if all elements in a vector<string> are in a string

    - by devin
    I have a vector and I need to see if all the strings in that vector are substrings of another given string. eg vector<string> v; v.push_back("str1"); v.push_back("str2"); string s1 = "str1, str2, str3"; string s2 = "str1, str3"; Is there a way to get true from s1 and false from s2 without looping over the vector? Also, note that due to my environment, I can't use boost. I think if I had boost, I could do this.

    Read the article

  • IE8 disappearing image bug

    - by Joe Fletcher
    In IE8 (& maybe others), when I leave my page to go to another tab in IE and then come back to my page's tab, each time the cursor runs over an image it disappears until I refresh the page. I've heard of disappearing image bugs, but I couldn't find anything on this particular case, especially given this isn't a weird pre-IE8 bug. I am using a lightbox, so possibly something to do with javascript? http://dev.bwmsnow.co.nz/snowboarding

    Read the article

  • invoke sql function using nhibernate?

    - by net205
    I want to query like this: select * from table where concat(',', ServiceCodes, ',') like '%,33,%'; select * from table where (','||ServiceCodes||',') like '%,33,%'; so, I wrote this code: ICriteria cri = NHibernateSessionReader.CreateCriteria(typeof(ConfigTemplateList)); cri.Add(Restrictions.Like(Projections.SqlFunction("concat", NHibernateUtil.String, Projections.Property("ServiceCodes")), "%,33,%")); I get sql similar : select * from table where (ServiceCodes) like '%,33,%'; But it is not what I want,how to do it??? thanks!

    Read the article

  • Right Hand Column Does Not Align Properly in IE6/7/8

    - by Kalpesh Vasta
    Hi Guys, I'm new to this but here goes. I have been developing this website http://www.panelmaster.co.uk and i have managed to solve the majority of design problems but one! If you take a look at the site in IE the right column seems to drop down and is not aligned with the right and centre column. This problem only occurs in IE as upon testing i found it was fine in firefox and safari. I have provided below the CSS for the website. I would appreciate if you guys can help me with the problem. Thanks in advance. :) ========================== body { margin: 0; padding: 0; line-height: 1.5em; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; color: #666; background-image: url(images/templatemo_body_top.jpg); background-color: #90857c; background-repeat: repeat-x; background-position: top; text-align: left; } a:link, a:visited { color: #073475; text-decoration: none; font-weight: normal; } a:active, a:hover { color: #073475; text-decoration: underline; } h3 { color: #1e7da9; font-size: 16px; font-weight: bold; } h2 { color: #1e7da9; font-size: 16px; font-weight: bold; } h1 { color: #696969; font-size: 20px; font-weight: bold; } p { margin: 0px; padding: 0px; } img { margin: 0px; padding: 0px; border: none; } .cleaner { clear: both; width: 100%; height: 0px; font-size: 0px; } .cleaner_h30 { clear: both; width:100%; height: 30px; } .cleaner_h40 { clear: both; width:100%; height: 40px; } .float_l { float: left; } .float_r { float: right; } .margin_r20 { margin-right: 20px; } #templatemo_body_wrapper { width: 100%; background: url(images/templatemo_body_bottom.png) repeat-x bottom center; } #templatemo_wrapper { width: 970px; padding: 0 10px; margin: 0 auto; background: url(images/templatemo_wrapper_top.jpg) no-repeat top center; } /* header */ #templatemo_header { clear: both; width: 890px; height: 60px; padding: 20px 40px } #templatemo_header #site_title { float: left; padding-top: 15px; } #site_title a { font-size: 24px; color: #FFFFFF; font-weight: bold; text-decoration: none; } #site_title a:hover { font-weight: bold; text-decoration: none; } #site_title a span { display: block; margin-top: 5px; font-size: 14px; color: #fff; font-weight: bold; letter-spacing: 2px; } /* end of header */ /* menu */ #templatemo_menu { clear: both; width: 970px; height: 80px; background: url(images/templatemo_menubar.png) no-repeat; } #search_box { width: 990px; height: 35px; text-align: right; } #search_box form { margin: 0; padding: 5px 40px; } #search_box #input_field { height: 20px; width: 300px; color: #000000; font-size: 12px; font-variant: normal; line-height: normal; border: 1px solid #CCCCCC; background: #FFFFFF; } #search_box #submit_btn { height: 24px; width: 100px; cursor: pointer; font-size: 12px; text-align: center; vertical-align: bottom; white-space: pre; outline: none; color:#666666; border: 1px solid #CCCCCC; background: #FFFFFF; } #templatemo_menu ul { width: 890px; height: 35px; margin: 0; padding: 7px 40px; list-style: none; } #templatemo_menu ul li { padding: 0px; margin: 0px; display: inline; } #templatemo_menu ul li a { float: left; display: block; margin-right: 40px; font-size: 13px; text-decoration: none; color: #fff; font-weight: normal; outline: none; } #templatemo_menu ul li a:hover, #templatemo_menu ul .current { color: #162127; } /* end of menu */ /* contetnt */ #templatemo_content_wrapper { clear: both; padding: 0px 0; } #templatemo_content { float: left; margin-left: 10px; width: 550px; } #banner { margin: 0 0 10px 0; } #templatemo_content #content_top { width: 550px; height: 20px; background: url(images/templatemo_content_top.png) no-repeat; } #templatemo_content #content_bottom { width: 550px; height: 20px; background: url(images/templatemo_content_bottom.png) no-repeat; } #templatemo_content #content_middle { width: 510px; padding: 5px 20px 0px 20px; background: url(images/templatemo_content_middle.png) repeat-y; } #content_middle p { text-align: justify; } .templatemo_sidebar_wrapper { width: 200px; } .templatemo_sidebar { width: 197px; padding-right: 3px; background: url(images/templatemo_sidebar_middle.png) repeat-y; } .templatemo_sidebar_top { width: 200px; height: 20px; background: url(images/templatemo_sidebar_top.png) no-repeat; } .templatemo_sidebar_bottom { width: 200px; height: 20px; background: url(images/templatemo_sidebar_bottom.png) no-repeat; } .templatemo_sidebar .sidebar_box { clear: both; padding-bottom: 20px; } .sidebar_box1 { padding: 15px; } .sidebar_box h2 { color: #2d84ad; font-size: 16px; padding-left: 25px; font-weight: bold; margin: 0 0 10px 10px; background: url(images/templatemo_sidebar_h1.jpg) left center no-repeat; } .sidebar_box .sidebar_box_content { padding: 15px; background: url(images/templatemo_sidebar_box_top.png) top repeat-x; } .sidebar_box img { border: 1px solid #999; margin-bottom: 5px; } .sidebar_box .discount { margin: 5px 0 0 0; font-weight: bold; } .sidebar_box .discount span { color: #C00; } .left_sidebar_box .discount a { font-weight: bold; color: #000; } .sidebar_box .categories_list { margin: 0; padding: 0; list-style: none; } .categories_list li { padding: 0; margin: 0; } .categories_list li a { display: block; color: #201f1c; padding: 5px 0 5px 20px; background: url(images/list.png) center left no-repeat; } .categories_list li a:hover { color: #439ac3; text-decoration: none; } .news_box { clear: both; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid #999; } .news_box h4 { padding: 2px 0; margin: 0; } .news_box h4 a { font-size: 12px; font-weight: normal; color: #1893f2; } #newsletter_box label { display: block; margin-bottom: 10px; } #newsletter_box .input_field { height: 20px; width: 155px; padding: 0 5px; margin-bottom: 10px; color: #000000; font-size: 12px; font-variant: normal; line-height: normal; } #newsletter_box .submit_btn { float: right; height: 30px; width: 80px; margin: 0px; padding: 3px 0 15px 0; cursor: pointer; font-size: 12px; text-align: center; vertical-align: bottom; white-space: pre; outline: none; } .product_box { float: left; width: 223px; padding: 10px; margin-bottom: 20px; border: 1px solid #CCC; text-align: center; } .product_box img { margin-bottom: 10px; } .product_box h3 { color: #2a2522; font-size: 12px; margin: 0 0 10px; } .product_box p { margin-bottom: 10px; } .product_box p span { color: #cf5902; font-size: 14px; font-weight: bold; } .product_box .detail { float: right; } .product_box .addtocard { float: left; font-weight: bold; padding-right: 20px; background: url(images/templatemo_shopping_cart.png) bottom right no-repeat; } /* end of content */ /* footer */ #templatemo_footer_wrapper { background: url(images/templatemo_footer.png) repeat-x; } #templatemo_footer { width: 910px; height: 85px; padding: 50px 40px 30px 40px; margin: 0 auto; text-align: center; color: #a9a098; } #templatemo_footer a { color: #d7d1cc; font-weight: normal; } #templatemo_footer a:hover { text-decoration: none; color: #FFFF33; } #templatemo_footer .footer_menu { margin: 0 0 30px 0; padding: 0px; list-style: none; } .footer_menu li { margin: 0px; padding: 0 20px; display: inline; border-right: 1px solid #d7d1cc; } .footer_menu li a { color: #d7d1cc; } .footer_menu .last_menu { border: none; } /* end of footer */ /*twitter*/ #twitter_div {border-top: 0px;} #twitter_div a {color: #0000ff !important;} #twitter_update_list {margin-left: -1em !important; margin-bottom: 0px !important;} #twitter_update_list li {list-style-type: none; padding-right: 5px; } #twitter_update_list li a {color: #0000ff; padding-right: 5px;} #twitter_div {border-bottom: 0px; padding-bottom: 10px; padding-top:6px; padding-right: 5px;} #twitter_div a, #twitter_update_list li a {text-decoration: none !important;} #twitter_div a:hover, #twitter_update_list li a:hover {text-decoration:underline !important;}

    Read the article

  • Serialization of Queue type not working

    - by Soham
    Consider this piece of code: private Queue Date=new Queue(); //other declarations public DateTime _Date { get { return (DateTime)Date.Peek();} set { Date.Enqueue(value); } } //other properties and stuff.... public void UpdatePosition(...) { //other code IFormatter formatter = new BinaryFormatter(); Stream Datestream = new MemoryStream(); formatter.Serialize(Datestream, Date); byte[] Datebin = new byte[2048]; Datestream.Read(Datebin,0,2048); //Debug-Bug Console.WriteLine(Convert.ToString(this._Date)); Console.WriteLine(BitConverter.ToString(Datebin, 0, 3)); //other code } The output of the first WriteLine is perfect. I.e to check if really the Queue is initialised or not. It is. The right variables are stored etc. (I inserted a value in that Queue, that part of the code is not shown.) But the second WriteLine is not giving the right expected answer: It serializes the entire Queue to 00-00-00.

    Read the article

  • jGrowl with asp.net server side processing

    - by Mike
    Hi, Is it possible to create a new thread in asp.net to do some processing, and then upon completion, set a flag so that when the user requests the next page, I can insert some extra text or code to perform some notification? Or if it is possible to send some text to the browser after the request has completed? For example jGrowl would be great to have a notification after some processing has been performed. Thanks

    Read the article

  • How can I get the dimensions of a drawn string without padding?

    - by Dan Herbert
    I'm trying to create an image with some text on it and I want the image's size to match the size of the rendered text. When I use System.Windows.Forms.TextRenderer.MeasureText(...) to measure the text, I get dimensions that include font padding. When the text is rendered, it seems to use the same padding. Is there any way to determine the size of a string of text and then render it without any padding? This is the code I've tried: // Measure the text dimensions var text = "Hello World"; var fontFamily = new Font("Arial", 30, FontStyle.Regular); var textColor = new SolidBrush(Color.Black); Size textSize = TextRenderer.MeasureText(text, fontFamily, Size.Empty, TextFormatFlags.NoPadding); // Render the text with the given dimensions Bitmap bmp = new Bitmap(textSize.Width, textSize.Height); Graphics g = Graphics.FromImage(bmp); g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; g.DrawString(text, fontFamily, textColor, new PointF(0, 0)); bmp.Save("output.png", ImageFormat.Png); This is what currently gets rendered out: This is what I want to render: I also looked into Graphics.MeasureString(...), but that can only be used on an existing Graphics object. I want to know the size before creating the image. Also, calling Graphics.MeasureString(...) returns the same dimensions, so it doesn't help me any.

    Read the article

  • Error in Mono Compiler: Files in libraries or multiple-file applications must begin with a namespace

    - by leon
    I am trying to compile this example in mono on ubuntu. However I get the error wingsit@wingsit-laptop:~/MyFS/kitty$ fsc.exe -o kitty.exe kittyAst.fs kittyParser.fs kittyLexer.fs main.fs Microsoft (R) F# 2.0 Compiler build 2.0.0.0 Copyright (c) Microsoft Corporation. All Rights Reserved. /home/wingsit/MyFS/kitty/kittyAst.fs(1,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' /home/wingsit/MyFS/kitty/kittyParser.fs(2,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' /home/wingsit/MyFS/kitty/kittyLexer.fsl(2,1): error FS0222: Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule' wingsit@wingsit-laptop:~/MyFS/kitty$ I am a newbie in F#. Is there something obvious I miss?

    Read the article

  • Nokogiri: add <tbody> after <table> elements as FireFox does

    - by wefwgeweg
    i have a problem: Firefox adds <tbody> whether it's there or not, after <table>. I have no problem with this. Nokogiri doesn't add it. I need Nokogiri to emulate Firefox's behavior. How can i add tbody after <table> elements to a given HTML page ? If tbody is already there, then move on to the next <table>....until all <tbody> tags are placed by Nokogiri. Thank you.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >