Daily Archives

Articles indexed Friday June 18 2010

Page 31/76 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Testing complex entities

    - by Carlos
    I've got a C# form, with various controls on it. The form controls an ongoing process, and there are many, many aspects that need to be right for the program to run correctly. Each part can be unit tested (for instance, loading some coefficients, drawing some diagnostics) but I often run into problems that are best described with an example: "If I click here, then here, then change this, then re-open the form, then click here, it crashes or produces an error" I've tried my best to use common code organisational ideas (inheritance, DRY, separation of concerns) but there never seems to be a way to test every single path, and inevitably, a form with several controls will have a huge number of ways to execute. What can I read (preferably online) that addresses this kind of issue, and is there a (non-generic) term for it. This isn't a specific problem I'm having, but one that creeps up on me, especially with WinForms.

    Read the article

  • C# beginner help

    - by ThickBook
    Can you help in this example? I am a beginner. Thanks using System; class Program { public static void Mian(string[] args) { Console.Write("Your Name?: "); string name = Console.Read(); Console.WriteLine("Welcome {0}", name); } }

    Read the article

  • Use case modelling for calculator

    - by kyrogue
    hi, i need help modelling a use case diagram from a topic, it will be in java GUI Design a Calculator that 1.Allow user to key in a legitimate arithmetic statement that involves number, operator +, - and bracket '(' and ')' ; 2.When user press “Calculate” button, display result; 3.Some legitimate statement would be ((3+2)-4+2) (equals 3) and (-2+3)-(3-1) (equals -1); 4.You should NOT use a pre-existing function that just take in the statement as a parameter and returns the result but you should write the logic of parsing every character in your code. 5.Store the last statement and answer so it is displayed when user press the “Last calculation” button. i have designed two use case diagrams using UML on netbeans 6.5.1, one of the use case i am not sure whether is it containing too much use cases etc, while the other is what i think could be too vague for the topic.i hope to get some feedback on whether the use case diagram are appropriate, thanks.

    Read the article

  • Regexp match in Java

    - by tinti
    Regexp in Java I want to make a regexp who do this verify if a word is like [0-9A-Za-z][._-'][0-9A-Za-z] example for valid words A21a_c32 daA.da2 das'2 dsada ASDA 12SA89 non valid words dsa#da2 34$ Thanks

    Read the article

  • [NSCustomView isOpaque]: message sent to deallocated instance 0x123456

    - by JxXx
    Hi all I receive that message in debugger console since I added the following arguments for debugging my application with XCode. NSZombieEnabled: YES NSZombieLevel: 16 I was looking for zombie objects... Before doing so, the application failed before I could know where what and why was happening.... Now I´m pretty sure that 'something' outside code is trying to access an object previously released and I can't know where or why it happens neither where it was released... My application is based on this proof of concept (very interesting and colorful) of QuartzCore Framework: http://www.cimgf.com/2008/03/03/core-animation-tutorial-wizard-dialog-with-transitions/ Based on it, I added a few more nsviews to my project and a title and an index to each one, also I added some buttons, text and images depending on what 'dialog' (ACLinkedView object) it was... The transition from an ACLinkedView object to another is going through a validation that depends on the view where you are ... As you see I used this proof of concept as the foundation of my application and it grew and grew into an application that makes use of configuration files, web services (using gSOAP and C ...) I hope you can give me some clues to where is my error ... I´ve been the hole week debugging unsuccessfully, as I said before, I think that that message comes from a point outside my code. I'd say that the problem s related with bad memory allocation or automatisms (nearly completely unknowns for me) during loading the nib components... I will try to explain all this with parts of mycode. This is my ACLinkedView definition: #import <Cocoa/Cocoa.h> @interface ACLinkedView : NSView { // The Window (to close it if needed) IBOutlet NSWindow *mainWindow; // Linked Views IBOutlet ACLinkedView *previousView; IBOutlet ACLinkedView *nextView; // Buttons IBOutlet NSButton *previousButton; IBOutlet NSButton *nextButton; IBOutlet NSButton *helpButton; //It has to be a Button!! IBOutlet NSImageView *bannerImg; NSString *sName; int iPosition; } - (void) SetName: (NSString*) Name; - (void) SetPosition: (int) Position; - (NSString*) GetName; - (int) GetPosition; - (void) windowWillClose:(NSNotification*)aNotification; @property (retain) NSWindow *mainWindow; @property (retain) ACLinkedView *previousView, *nextView; @property (retain) NSButton *previousButton, *nextButton, *helpButton; @property (retain) NSImageView *bannerImg; @property (retain) NSString *sName; @end The ACLinkedView's AwakeFromNib is this: #import <Cocoa/Cocoa.h> @interface ACLinkedView : NSView { // The Window (to close it if needed) IBOutlet NSWindow *mainWindow; // Linked Views IBOutlet ACLinkedView *previousView; IBOutlet ACLinkedView *nextView; // Buttons IBOutlet NSButton *previousButton; IBOutlet NSButton *nextButton; IBOutlet NSButton *helpButton; //It has to be a Button!! IBOutlet NSImageView *bannerImg; NSString *sName; int iPosition; } - (void) SetName: (NSString*) Name; - (void) SetPosition: (int) Position; - (NSString*) GetName; - (int) GetPosition; - (void) windowWillClose:(NSNotification*)aNotification; @property (retain) NSWindow *mainWindow; @property (retain) ACLinkedView *previousView, *nextView; @property (retain) NSButton *previousButton, *nextButton, *helpButton; @property (retain) NSImageView *bannerImg; @property (retain) NSString *sName; @end (As you can see the initialization of each ACLinkedView object depends on it's position wich is seted up into the Interface Builder by linking actions, buttons and CustomViews... Does I explain enough? Do you think that I should put more of my code here, i.e. AppDelegate definition or it´s awakeFromNib method? Can you help me in any way? Thanks in advance. Juan

    Read the article

  • SQL running slow when i executes thru java

    - by user270885
    I am trying to execute a query in oracle db. When i try to run thru SQLTools the query is executing in 2 seconds and when i run the same query thru JAVA it is exectuting in more than a minute. I am using a hint /*+ordered use_nl (a, b)*/ I am using ojdbc6.jar Is it because of any JARS? Please help whats causing this?

    Read the article

  • Jython saying "No visible constructors for class"

    - by clutch
    I have a jython servlet as part of a large application running in tomcat5. I tested a few Spring Framework classes and create the objects in the Jython servlet. When I try to create objects of classes in the application I catch an Exception message "No visible constructors for class". These java classes do have a public constructor class, such as: public SchoolImpl() { } I create the object in python: from com.dc.sports.entity import SchoolImpl ... school = SchoolImpl() What am I doing wrong?

    Read the article

  • Binding data to scroll view

    - by Rahul Varma
    Hi, I am new to iphone dev. I have a Label and a scroll view. I am trying to get data from url and bind it to label and a scroll view. I am able to bind the data to label by using... UrlValues *asana=[[data yoga]objectAtIndex:i]; self.AsanaName.text = [asana asanatitle]; Similarly i want to bind some other data in the url to a scroll view. The data i want to bind is 4 or 5 sentences. So, can anyone help me how to do it... Any sample code will be really helpful... Thanks

    Read the article

  • NHibernate which cache to use for WinForms application

    - by chiccodoro
    I have a C# WinForms application with a database backend (oracle) and use NHibernate for O/R mapping. I would like to reduce communication to the database as much as possible since the network in here is quite slow, so I read about second level caching. I found this quite good introduction, which lists the following available cache implementations. I'm wondering which implementation I should use for my application. The caching should be simple, it should not significantly slow down the first occurrence of a query, and it should not take much memory to load the implementing assemblies. (With NHibernate and Castle, the application already takes up to 80 MB of RAM!) Velocity: uses Microsoft Velocity which is a highly scalable in-memory application cache for all kinds of data. Prevalence: uses Bamboo.Prevalence as the cache provider. Bamboo.Prevalence is a .NET implementation of the object prevalence concept brought to life by Klaus Wuestefeld in Prevayler. Bamboo.Prevalence provides transparent object persistence to deterministic systems targeting the CLR. It offers persistent caching for smart client applications. SysCache: Uses System.Web.Caching.Cache as the cache provider. This means that you can rely on ASP.NET caching feature to understand how it works. SysCache2: Similar to NHibernate.Caches.SysCache, uses ASP.NET cache. This provider also supports SQL dependency-based expiration, meaning that it is possible to configure certain cache regions to automatically expire when the relevant data in the database changes. MemCache: uses memcached; memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Basically a distributed hash table. SharedCache: high-performance, distributed and replicated memory object caching system. See here and here for more info My considerations so far were: Velocity seems quite heavyweight and overkill (the files totally take 467 KB of disk space, haven't measured the RAM it takes so far because I didn't manage to make it run, see below) Prevalence, at least in my first attempt, slowed down my query from ~0.5 secs to ~5 secs, and caching didn't work (see below) SysCache seems to be for ASP.NET, not for winforms. MemCache and SharedCache seem to be for distributed scenarios. Which one would you suggest me to use? There would also be a built-in implementation, which of course is very lightweight, but the referenced article tells me that I "(...) should never use this cache provider for production code but only for testing." Besides the question which fits best into my situation I also faced problems with applying them: Velocity complained that "dcacheClient" tag not specified in the application configuration file. Specify valid tag in configuration file," although I created an app.config file for the assembly and pasted the example from this article. Prevalence, as mentioned above, heavily slowed down my first query, and the next time the exact same query was executed, another select was sent to the database. Maybe I should "externalize" this topic into another post. I will do that if someone tells me it is absolutely unusual that a query is slowed down so much and he needs further details to help me.

    Read the article

  • Apache service hung and incoming requests not accepted

    - by Gnanam
    Hi, My production server is running Apache v2.2.4 with mod_mono v1.2.4 on CentOS release 5.2 (Final). Suddenly, Apache service hung during normal usage time (approx. 1 pm EDT). Traffic is not too high at this time. This is the first time we're noticing this kind of behaviour in our server. I noticed from access log that even subsequent requests are also not received, even though there were incoming requests. I then manually tried to invoke my application call from web browser, it never returned successfully but it was still loading. I found no unusual behaviour/activity in: 1) Apache access_log and error_log 2) No kernel level errors found in /var/log/messages I've no other option but ended up restarting Apache service. Any idea on what would cause Apache to hang and thereby not allowing subsequent incoming requests? How do I debug/diagnose when this happens next time? Experts advice/recommendation on this are highly appreciated.

    Read the article

  • PHP not loading php.ini in directory or following error_reporting() on Windows 7

    - by Marcus
    Normally I develop under E_ALL error level, but for sanity on this project I want notices and strict off. So initially tried: error_reporting(E_ALL & ~(E_STRICT|E_NOTICE)); And several other combinations of the same thing, nothing worked. Next I tried to create a local php.ini the directory with error_reporting = E_ALL & ~E_NOTICE but nope, that didn't work either. phpinfo() is reporting: Scan this dir for additional .ini files: (none) Can someone help me fix either of these problems? Preferably both! Thanks! I'm running PHP Version 5.2.13 on Apache/2.2.14 under Windows 7 x64.

    Read the article

  • WCF service The maximum array length quota (16384) has been exceeded

    - by dmitry.baranovsky
    I have a wsf service and a client application. While trying to communicate the client and the service I've gotten the following message: "The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:blob. The InnerException message was 'There was an error deserializing the object of type FileBlob. The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 25931.'. Please see InnerException for more details." I have the customBinding element and it doesn't allow me to insert "readerQuotas" section. In both the client and service configs I have the following binding element: <customBinding> <binding name="LicenseServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"> <security authenticationMode="UserNameOverTransport"> <localClientSettings maxClockSkew="00:07:00" /> <localServiceSettings maxClockSkew="00:07:00" /> </security> <windowsStreamSecurity /> <httpsTransport maxReceivedMessageSize="2147483646"/> </binding> </customBinding> Thanks in advance for any help:)

    Read the article

  • PhysX SDK - error LNK2019: unresolved external symbol when compiling "wavefront.cpp"

    - by user370102
    Hi all, I'm using the PhysX SDK and I'm trying to load an .obj file with the WavefrontObj object which is defined by the files "wavefront.h/.cpp", localized in the samples directory. When I'm compiling my project, I got this error: 1Linking... 1wavefront.obj : error LNK2019: unresolved external symbol "char * __cdecl FindMediaFile(char const *,char *)" (?FindMediaFile@@YAPADPBDPAD@Z) referenced in function "public: void __thiscall WAVEFRONT::InPlaceParser::SetFile(char const *)" (?SetFile@InPlaceParser@WAVEFRONT@@QAEXPBD@Z) 1C:\Users\Nicolas\Documents\GI05\CSED451 - Computer Graphics\ToyFK_Project\Debug\ToyFK_Project.exe : fatal error LNK1120: 1 unresolved externals I guess I forgot to link a library or something but I really can't find what... It's driving me crazy!!! Does somebody have an idea? Thank you

    Read the article

  • mod_rewrite: remove trailing slash (only one!)

    - by tshabalala
    Hello. I use mod_rewrite/.htaccess for pretty URLs. I'm using this condition/rule to eliminate trailing slashes (or rather: rewrite to the non-trailing-slash-URL, by a 301 redirect; I'm doing this to avoid duplicate content and because I like URLs with no trailing slashes better): RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_HOST} !^\.localhost$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] Working well so far. Only drawback: it also forwards "multiple-trailing-slash"-URLs to non-trailing-slash-URLs. Example: http://example.tld/foo/bar////// forwards to http://example.tld/foo/bar while I only want http://example.tld/foo/bar/ to forward to http://example.tld/foo/bar. So, is it possible to only eliminate trailing slashes if it's actually just one trailing slash? Sorry if this is a somewhat annoying or weird question! Thanks.

    Read the article

  • Oracle select query

    - by Jasim
    I have a table like this C1 C2 C3 Code 1 2 3 33 1 2 3 34 2 4 1 14 1 2 3 14 i want to select only those record whose code is appearing only in single row. ie, in this case rows with code 33 and 34.. as they appear only once in this table. How can i write a query for that

    Read the article

  • How to write INT64 to CString

    - by sxingfeng
    I am coding in c++ windows. INT64 dirID = -1; CString querySQLStr = _T(""); querySQLStr.Format(L"select * from ImageInfo where FolderPath=%64d;", dirID); querySQLStr always like this: select * from ImageInfo where FolderPath= 1214; is it right to use %64d? Many Thanks

    Read the article

  • Setting up a (web) development environment

    - by mnml
    Hi, I would like to know how I can improve my development environment. At the moment: I'm using Netbeans as my IDE. My local Dev server runs on a RHEL5 VirtualMachine similar to my production server. My Netbeans project is editing the VM files via ssh (I have mounted the server as a local drive) But: It's slow Files can disapear ( netbeans delete them ? ) I can't use git on it because it's slow. The idea would be to be able to have a shared filesytem between the guest os and the host os.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >