Daily Archives

Articles indexed Saturday May 29 2010

Page 27/76 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • sql server procedure error

    - by Mohan
    CREATE PROCEDURE USP_SEARCH_HOTELS ( @Text varchar(50), @Type varchar(40) ) AS BEGIN Declare @Query VARCHAR(60) IF @Type = 'By Country' BEGIN SET @Query = 'Hotel.countryName like '+ @Text+'%' END ELSE IF @Type = 'By State' BEGIN SET @Query = 'HOTEL.stateName like '+ @Text+'%' END ELSE IF @Type='By Property Name' BEGIN SET @Query='hotel.propertyname like'+ @Text+'%' End ELSE IF @Type='By Rating' BEGIN SET @Query='hotel.starRating='+ Cast(@Text as INT) END ELSE IF @Type='By City' BEGIN SET @Query='hotel.cityName like '+ @Text+'%' END begin select * from hotel,tbl_cust_info where hotel.agentID=Tbl_Cust_Info.Cust_ID and (@Query) end END WHAT IS THE ERROR IN THIS PROCEDURE PLEASE HELP.

    Read the article

  • how to update UI controls in cocoa application from background thread

    - by AmitSri
    following is .m code: #import "ThreadLabAppDelegate.h" @interface ThreadLabAppDelegate() - (void)processStart; - (void)processCompleted; @end @implementation ThreadLabAppDelegate @synthesize isProcessStarted; - (void)awakeFromNib { //Set levelindicator's maximum value [levelIndicator setMaxValue:1000]; } - (void)dealloc { //Never called while debugging ???? [super dealloc]; } - (IBAction)startProcess:(id)sender { //Set process flag to true self.isProcessStarted=YES; //Start Animation [spinIndicator startAnimation:nil]; //perform selector in background thread [self performSelectorInBackground:@selector(processStart) withObject:nil]; } - (IBAction)stopProcess:(id)sender { //Stop Animation [spinIndicator stopAnimation:nil]; //set process flag to false self.isProcessStarted=NO; } - (void)processStart { int counter = 0; while (counter != 1000) { NSLog(@"Counter : %d",counter); //Sleep background thread to reduce CPU usage [NSThread sleepForTimeInterval:0.01]; //set the level indicator value to showing progress [levelIndicator setIntValue:counter]; //increment counter counter++; } //Notify main thread for process completed [self performSelectorOnMainThread:@selector(processCompleted) withObject:nil waitUntilDone:NO]; } - (void)processCompleted { //Stop Animation [spinIndicator stopAnimation:nil]; //set process flag to false self.isProcessStarted=NO; } @end I need to clear following things as per the above code. How to interrupt/cancel processStart while loop from UI control? I also need to show the counter value in main UI, which i suppose to do with performSelectorOnMainThread and passing argument. Just want to know, is there anyother way to do that? When my app started it is showing 1 thread in Activity Monitor, but when i started the processStart() in background thread its creating two new thread,which makes the total 3 thread until or unless loop get finished.After completing the loop i can see 2 threads. So, my understanding is that, 2 thread created when i called performSelectorInBackground, but what about the thrid thread, from where it got created? What if thread counts get increases on every call of selector.How to control that or my implementation is bad for such kind of requirements? Thanks

    Read the article

  • Port forwarding on D-Link DIR-615 super-slow, useless

    - by Jaroslav Záruba
    Hello I have replaced my old router with DIR-615 from D-Link, and now the port forwarding is so slow it makes the router practically useless for requests coming from outside of my network. Accessing the router itself (admin UI) from outside is without any issues, no delay whatsoever. But when I try to access a service residing on any of the computers in my network from outside the requests take minutes and minutes. (E.g. I can see source of my GWT-app main page, but loading additional CSS and JS files takes years.) If anyone could recommend any further diagnostics I should do to figure out what is happening it would be great. Few notes: happens with more services (web-app on Tomcat, viewing directory index via Apache) it does not make a difference whether the service is hosted on wired or wireless PC accessing the service on a localhost works fine, as does any 'inner' communication turning off firewall on target PC does not make difference either (makes sense) when I replace this router with the old one (both 192.168.1.1) everything works fine I see nothing suspicious in the router's log I believe I have the latest firmware (4.11) DIR-615 sucks, it already died once completely Regards Jarda Z.

    Read the article

  • Silverlight dataGrid binding with ria Service doesn' work

    - by Abdulrhman
    hi every one i'm new to Silverlight and it's totally driving me crazy !! i'm using SL4 and trying to bind datagrid with a Domain Service Query: what i did exactly is i generate an ado.net entity model from my database, then create a domain Service class from this model. then in my page i put Datagrid & button. in the click event for this button i write this code: RRDomainContext rr = new RRDomainContext(); this.dataGrid1.ItemsSource = rr.Rooms; this.rr.Load(this.rr.GetRoomsQuery()); when this method executed the nothing changed at the datagrid. can anyone help me with this ?

    Read the article

  • MapPath strange error

    - by Cristian Boariu
    Hi, I have the following code: string path = "~/Others/Muzica/Demo/"+interpret+"_"+album+"/"; CMSUtils.CreateFolder(MapPath(path)); where CreateFolder method is like: public static void CreateFolder(string path) { if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } } So i create that folder if it does not exists... All works great locally BUT i do not understand why, if i put it on the server it gives: Failed to map the path '/gramma_prod/Others/Muzica/Demo/Vitamina C_De n-ai fi fost Tu /'. at CMSUtils.CreateFolder(MapPath(path)); I have checked if: /gramma_prod/Others/Muzica/Demo/ exists on the server and of course it exists... Does anybody see the problem?

    Read the article

  • Recursion in an ASP.NET MVC view

    - by Dennis Palmer
    I have a nested data object for a set of items within categories. Each category can contain sub categories and there is no set limit to the depth of sub categories. (A file system would have a similar structure.) It looks something like this: class category { public int id; public string name; public IQueryable<category> categories; public IQueryable<item> items; } class item { public int id; public string name; } I am passing a list of categories to my view as IQueryable<category>. I want to output the categories as a set of nested unordered list (<ul>) blocks. I could nest foreach loops, but then the depth of sub categories would be limited by the number of nested foreach blocks. In WinForms, I have done similar processing using recursion to populate a TreeView, but I haven't seen any examples of using recursion within an ASPX MVC view. Can recursion be done within an ASPX view? Are there other view engines that include recursion for view output?

    Read the article

  • Can't add domain users to Reporting Services 2008

    - by Jeremy
    I have SSRS 2008 setup on the database server. The server is part of the domain. Reporting Services is running under NetworkService. When I try to add a domain user using the web interface (Site Settings -- Security -- New Role Assignment), the page posts back but the user is not in the list. The server's log file contains the following Unhandled Exception: ui!ReportManager_0-1!954!01/12/2009-10:14:52:: Unhandled exception: System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated. at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess) at System.Security.Principal.SecurityIdentifier.Translate(Type targetType) at System.Security.Principal.WindowsIdentity.GetName() at System.Security.Principal.WindowsIdentity.get_Name() at ReportingServicesHttpRuntime.RsWorkerRequest.GetServerVariable(String name) at System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Any one have an idea on how to fix this?

    Read the article

  • Writing the tests for FluentPath

    Writing the tests for FluentPath is a challenge. The library is a wrapper around a legacy API (System.IO) that wasnt designed to be easily testable. If it were more testable, the sensible testing methodology would be to tell System.IO to act against a mock file system, which would enable me to verify that my code is doing the expected file system operations without having to manipulate the actual, physical file system: what we are testing here is FluentPath, not System.IO. Unfortunately, that...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • problem with nitro pdf

    - by Nrew
    Im converting lots of .doc files into .pdf using nitro pdf express.The program isn't finish converting the 37 files yet maybe 10 are converted and are in the output directory already. But when I cancelled it, even the converted one's are deleted. Can I still find it somewhere or are they gone for good.

    Read the article

  • Burn 24/96 flac files to play on standalone player

    - by takeshin
    I have vinyl record rip in 24/96 flac format. Each track is almost 200 MB big, so the album won't fit on CD. How to burn these files on a DVD to play with the same quality on standalone DVD player? My player supports SACD, DVD Audio and DVD video as well. My OS is Ubuntu Lucid (preferred), but I have also WinXp with Nero installed. BTW, is there any difference between DVD+ and DVD- for audio?

    Read the article

  • Auto refresh when new user comes online

    - by Luke
    Hello. I have a table in the database which includes all active users. I then have a user list which needs refreshing to see who is the latest users online. Whats the best way to tackle this? The user list is always just who is in the active_users table. Thanks for reading.

    Read the article

  • Shouldn't this cause an Overflow? It doesn't!

    - by Cyberherbalist
    What's up with this, anyway? I do a simple multiplication: Int64 x = 11111111111; Int64 y = 11111111111; Int64 z = x * y; And at the end of the multiplication, z shows a value of: -5670418394979206991 This has clearly overflowed, but no exception is raised. I'd like one to be raised, but... Note that this is on Windows Phone 7, but I don't think this has any bearing on the issue. Or does it?

    Read the article

  • Mindmapping as a Documentation Tool

    - by mcass20
    My team has recently begun using XMind to organize development projects. It seems to be a pretty powerful brainstorming software. I'm just wondering if other developers have employed similar techniques to aid in documenting software design.

    Read the article

  • Looking for the log file on iPhone

    - by zp26
    Hi, I have a problem. I have the code below for save a data on file. I build my app on the device, and run. The result variable is TRUE, but i don't find the file on the my iPhone device. Can you help me? Thank and sorry for my english XP -(void)saveXML:(NSString*)name:(float)x:(float)y:(float)z{ NSMutableData *data = [NSMutableData data]; NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; [archiver setOutputFormat:NSPropertyListXMLFormat_v1_0]; [archiver encodeFloat:x forKey:@"x"]; [archiver encodeFloat:y forKey:@"y"]; [archiver encodeFloat:z forKey:@"z"]; [archiver encodeObject:name forKey:@"name"]; [archiver finishEncoding]; NSString* filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"XML Position"]; BOOL result = [data writeToFile:filePath atomically:YES]; if(result) [self updateTextView:@"success"]; [archiver release]; }

    Read the article

  • Could not load file or assembly

    - by sldevelop
    Hi guys, I'm tring to create a generic collection of dynamic type at runtime of Silverlight application. My code: Type listType = Type.GetType("System.Collections.ObjectModel.ObservableCollection`1[[" + type.AssemblyQualifiedName + "]], System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e", true); type - is variable of Type type. That Type is creating at runtime. At that code line I've got error: Could not load file or assembly ', Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. How can I resolve that error?

    Read the article

  • Text rendering blurred in Firefox and Internet Explorer using jQuery

    - by Sixfoot Studio
    Not sure what causes this? If I user slideDown in Firefox the text rendering cuts off the top of the letters before the animation is complete. This is ok in IE. If I then change the animation to use fadeIn instead, the blur does not happen in Firefox but the text is very jagged in IE. From another question I have asked in the past pertaining to animation, the guy told me that I should wrap that which I want to animate in another DIV and animate that instead. This sorted out the jerkiness caused by the padding on the content inside the .animateDiv. Is there a trick to the text rendering as well in jQuery

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >