Search Results

Search found 8397 results on 336 pages for 'implementation'.

Page 218/336 | < Previous Page | 214 215 216 217 218 219 220 221 222 223 224 225  | Next Page >

  • what to use for repetitive (daily, weekly, monthly) tasks ? Workflows, Windows Services, something e

    - by mare
    I've been writing Windows Services for a while and they always seem to work fine for things that need to run every day, few times a week, once a month, etc. but I've been lately thinking about going with Windows Workflow Foundation. However, I am unsure how would they run on a server without some container application (for instance SharePoint)? I worked with Sharepoint workflows before and I always had huge problems, at first with the bugs in the workflow architecture implementation (the problems with sleep and delay) and later when they eventually started to work, they were difficult to manage and change. On the other hand Windows Services were always quite easy to implement, easy to create a setup for them and install them and they were always quite resilient (they were often working for months without crashing or something else going wrong). What do you recommend? Please bear in mind we are working in .NET (version is of no problem, if 4.0 brings something new on this subject, we can use it).

    Read the article

  • How to test that invalid arguments raise an ArgumentError exception using RSpec?

    - by John Topley
    I'm writing a RubyGem that can raise an ArgumentError if the arguments supplied to its single method are invalid. How can I write a test for this using RSpec? The example below shows the sort of implementation I have in mind. The bar method expects a single boolean argument (:baz), the type of which is checked to make sure that it actually is a boolean: module Foo def self.bar(options = {}) baz = options.fetch(:baz, true) validate_arguments(baz) end def self.validate_arguments(baz) raise(ArgumentError, ":baz must be a boolean") unless valid_baz?(baz) end def self.valid_baz?(baz) baz.is_a?(TrueClass) || baz.is_a?(FalseClass) end end

    Read the article

  • Xcode can't find imported header files

    - by solerous
    I've used other IDE's in the past but am new to Xcode. I'm trying to bring in a bunch of C code from an open source project. I've imported them into a new Group and the .c files all show up under Implementation Files and the full list of files shows up in the Groups/Files group as well as my project directory in the finder. When I try to include or import one of these header files, code completion even works so I know Xcode is seeing them. But then when I go to build it says "no such file or directory". How can I get these files to import into my code?

    Read the article

  • Just how much do I want to make virtual?

    - by Alex
    I am writing an abstract superclass where literally every method is going to be overridden. There is some default functionality I could implement, but most of the time it's enough to leave the implementation to the subclass writer. Since just about every method is going to be overwritten, how much should I make virtual and how much should I just leave as regular methods? In the current incarnation, everything is virtual, but I still haven't let this loose to anyone to use, so the design is flexible. What advantages/disadvantages are there to virtual functions? Links to good reading material about this would be appreciated.

    Read the article

  • Passing a NSString to another ViewController using classes

    - by Jeff Kranenburg
    I know this insanely simple, but I am re-teaching myself the basics and trying to get my head around this:-) I have one ViewController called MainVC and I have one called ClassVC In ClassVC I have this code: @interface ClassVC : UIViewController { NSString *mainLine; } @property (nonatomic, retain) NSString *mainLine; @end and I have this in the implementation file: @synthesize mainLine = _mainLine; -(NSString *)_mainLine { _mainLine = @"This a string from a Class"; return _mainLine; } Now I was thinking that if I #import the ClassVC into MainVC I would be able to transfer that string along as well like so: This code is in the viewDidLoad _mainLabel.text = _secondClass.mainLine; NSLog(@"%@", _secondClass.mainLine); But that is not working - so cannot I not pass strings in through this way???

    Read the article

  • Is the FoldLeft function available in R?

    - by JSmaga
    Hi, I would like to know if there is an implementation of the foldLeft function (and foldRight?) in R. The language is supposed to be "rather" functional oriented and hence I think there should be something like this, but I could not find it in the documentation. To me, foldLeft function applies on a list and has the following signature: foldLeft[B](z : B)(f : (B, A) => B) : B It is supposed to return the following result: f(... (f(f(z, a0), a1) ...), an) if the list is [a0, a1, ..., an]. (I use the definition of the Scala List API) Does anybody know if such a function exists in R?

    Read the article

  • Object initialization sequence in Objective-C

    - by Alex
    Hello everyone. The Cocoa framework has a convention to always call self = [super init] in the init method of an inherited class, because [super init] may return a new instance. What will happen if I do this? @interface MyClass : NSObject /* or any other class */ { int ivar_; } @end @implementation MyClass - (id)init { ivar_ = 12345; if ((self = [super init])) { NSLog(@"ivar_'s value is %d", ivar_); } return self; } @end In the case when [super init] returns a new instance, what will I see in the console? ivar_'s value is 0? I can't think of a way to check this myself, because I don't know which class may return a new instance from its init method. Also, can't seem to find explicit clarification for this scenario in the docs. Could anyone help me out? Thanks!

    Read the article

  • How does OfType<T>() Work?

    - by TheCloudlessSky
    How does OfType() Work? I read this link about what's going on but how exactly does the LINQ provider know how to get all objects matching the specified type. I know the IQueryable<T> "chains" up requests and then evaluates when GetEnumerator() is called (right?). Specifically I want to know how does the framework quickly do type comparison? I wrote a method in a .NET 2.0 project that went like this (since 2.0 doesn't support these kind of features): public IEnumerable<TResult> OfType<TResult>() where TResult : class { foreach (TItem item in this.InnerList) { TResult matchItem = item as TResult; if (matchItem != null) { yield return matchItem; } } } Is this the best implementation?

    Read the article

  • Speed of interpolation algorithms, C# and C++ working together.

    - by Kaminari
    Hello. I need fast implementation of popular interpolation algorithms. I figured it out that C# in such simple algorithms will be much slower than C++ so i think of writing some native code and using it in my C# GUI. First of all i run some tests and few operations on 1024x1024x3 matrix took 32ms in C# and 4ms in C++ and that's what i basicly need. Interpolation however is not a good word because i need them only for downscaling. But the question is: Will it be faster than C# methods in Drawing2D Image outputImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb); Graphics grPhoto = Graphics.FromImage(outputImage); grPhoto.InterpolationMode = InterpolationMode.*; //all of them grPhoto.DrawImage(bmp, new Rectangle(0, 0, destWidth, destHeight), Rectangle(0, 0, sourceWidth, sourceHeight), GraphicsUnit.Pixel); grPhoto.Dispose(); Some of these method run in 20ms and some in 80. Is there a way to do it faster?

    Read the article

  • Accessing Java Connector Architecture (JCA) from a Non-Managed environment

    - by Paul Kuykendall
    Hi, We have been using a JCA to interface with a low-level network resource from within WebSphere, however we have a requirement to be able to access the same network resource externally from Tomcat (i.e. not in a managed environment). The network communication and protocol layouts is very verbose, so we would rather not copy/paste several thousand lines of code (and then have to maintain them separately). From reading the JCA spec, there is supposedly some support to execute the code in a non-managed environment (such as Tomcat). Unfortunately, I have no idea what the interfaces are supposed to do, or how to call them from outside a managed environment (the spec is pretty vague). Are there any implementation examples out there that show how to modify a JCA to be usable in a non-managed environment? Thanks!

    Read the article

  • How to I initialize a class with an interface button clicked? [Objective - C]

    - by seaworthy
    I am having a problem with figuring out how to initialize a class with button clicked. The code is listed below the line I have a problem with has "HELP NEEDED HERE" comment above it. // // Controller.m // #import "Controller.h" @implementation Controller - (id)init { self = [super init]; if(self){ numberTotal = 0; //HELP NEEDED HERE [self btnScore_Clicked:(id)sender]; } return self;} - (IBAction) btnScore_Clicked:(id)sender { numberTotal += 1; NSLog(@"Number Total: %d",numberTotal); } - (void)dealloc { [super dealloc]; } @end // // Controller.h // #import <UIKit/UIKit.h> @interface Controller : UIViewController { NSInteger numberTotal; } - (IBAction) btnScore_Clicked:(id)sender; @end Thanks!

    Read the article

  • Loading Nested JS Files on the Page

    - by Aidin
    Hi, I have a JS file that is dependent to another Js file. this Js file is something like this (Common.js) //Some codes here window.onload = PageLoad; //some codes here and then I implement PageLoad function in another Js file. ( I do this because every page has its own PageLoad implementation) and I Load these files like this on my Main.aspx : `<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">` `<\script language="javascript" type="text/javascript" src="PagesJS/pgeMain.js"></script>` `<\script language="javascript" type="text/javascript" src="JS/Common.js"></script>` ... ... `</asp:Content>` Every thing works fine on local but when I deploy it, sometimes I get PageLoad undefined Error! Can any one tells me what is wrong with this? Thanks. Aidin

    Read the article

  • Optimal diff between object lists in Java

    - by Philipp
    I have a List of Java objects on my server which is sent to the client through some serialization mechanism. Once in a while the List of objects gets updated on the server, that is, some objects get added, some get deleted and others just change their place in the List. I want to update the List on the client side as well, but send the least possible data. Especially, I don't want to resend Objects which are already available on the client. Is there a library available which will produce some sort of diff from the two lists, so that I can only send the difference and the new Objects accross the wire? I have found several Java implementation of the unix diff command, but this algorithm is unpractical for order changes. ie. [A,B,C] - [C,B,A] could be sent as only place changes [1-3] [3-1], while diff will want to resend the whole A and C objects (as far as I understand).

    Read the article

  • Commonly use Utility methods in projects

    - by Newbie
    In many projects, we come across various utility methods, e.g. Email validation Convert from dd/mm/yyyy to mm/dd/yyyy or other date formats I would like to know as what are the varoius common utility method that we genrally use? I know that some methods are project specific but many will be common. I searched in net to get a list of as much as possible but none I found to be very informative. Could you please help? Well I am more interested in the method behaviour and not in their implementation. If I can get the method names and what it does e.g. ConvertMMDDYYYY to ConvertDDMMYYYY it will server my purpose. Thanks

    Read the article

  • Java generic function for performing calculations on integer, on double?

    - by Daniel
    Is this possible? Surely if you passed in a double, any sort of function implementation code which casts an object to an Integer would not be able to work unless the cast 'Integer' was specifically used? I have a function like: public static void increment(Object o){ Integer one = (Integer)o; system.out.println(one++); } I cant see how this could be made generic for a double? I tried public static <E> void increment(E obj){ E one = (E)o; system.out.println(one++); } but it didn't like it?

    Read the article

  • What is a good way for a custom accessory view in a UITableViewCell to message the table view contro

    - by Alex Gosselin
    Hi Everyone, I am working on adding a custom accessory view, (a button) to a UITableViewCell, and I need it to tell the table view when it is touched, but I can't figure out how to communicate to the table view what button was pressed. Ideally I'd like to somehow call a function like this: [controller tableView:view didSelectCustomButtonAtIndexPath:indexPath usingCell:self]; when my custom view button is pressed. Sorry if this is a bit vague, I'm not really sure how to explain this well. I am basically looking for how to mimic the implementation for tableView:didSelectRowAtIndexPath: without having to subclass UITableViewCell. Thanks for any help.

    Read the article

  • In Django, using __init__() method of non-abstract parent model to record class name of child model

    - by k-g-f
    In my Django project, I have a non-abstract parent model defined as follows: class Parent(models.Model): classType = models.CharField(editable=False,max_length=50) and, say, two children models defined as follows: class ChildA(Parent): parent = models.OneToOneField(Parent,parent_link=True) class ChildB(Parent): parent = models.OneToOneField(Parent,parent_link=True) Each time I create an instance of ChildA or of ChildB, I'd like the classType attribute to be set to the strings "ChildA" or "ChildB" respectively. What I have done is added an _ _ init_ _() method to Parent as follows: class Parent(models.Model): classType = models.CharField(editable=False,max_length=50) def __init__(self,*args,**kwargs): super(Parent,self).__init__(*args,**kwargs) self.classType = self.__class__.__name__ Is there a better way to implement and achieve my desired result? One downside of this implementation is that when I have an instance of the Parent, say "parent", and I want to get the type of the child object linked with "parent", calling "parent.classType" gives me "Parent". In order to get the appropriate "ChildA" or "ChildB" value, I need to write a "_getClassType()" method to wrap a custom sql query.

    Read the article

  • How do i make a UILabel act as a link?

    - by user2918086
    I have built a "teacher directory" of sorts, i have the data fill into 3 fields, name, position, and email. All of the fields are UILabels. How do i make it so that you can click on the email and it opens a blank email? @interface PersonDetailTableViewController () @end @implementation PersonDetailTableViewController @synthesize fnameLabel, snameLabel, emailLabel, person; - (void)viewDidLoad { [super viewDidLoad]; [super viewDidLoad]; self.fnameLabel.text = self.person.fname; self.snameLabel.text = self.person.sname; self.emailLabel.text = self.person.email; } (this is the table view controller where the data is being displayed)

    Read the article

  • Mapview on tablet: How can I center the map with an offset?

    - by Waza_Be
    Hint: Here is a similar post with HTML. In the current tablet implementation of my app, I have a fullscreen MapView with some informations displayed in a RelativeLayout on a left panel, like this: (My layout is quite trivial, and I guess there is no need to post it for readability) The problem comes when I want to center the map on a specific point... If I use this code: mapController.setCenter(point); I will of course get the point in the center of the screen and not in the center of the empty area. I have really no idea where I could start to turn the offset of the left panel into map coordinates... Thanks a lot for any help or suggestion

    Read the article

  • Delegate Example From C# In Depth Confusion

    - by ChloeRadshaw
    I am looking at this example: List<Product> products = Product. GetSampleProducts() ; products.Sort( (first, second) => first.Name.CompareTo(second. Name) ) ; foreach (Product product in products) { Console. WriteLine(product) ; } What function is actually called in the API when you do that? Does the compiler create a class which implemnents the IComparer interface? I thought delegates were anonymous methods - Here it seems to be an anonymous interface implementation which is casuing confusion

    Read the article

  • NSString inheritance

    - by Stef
    Hi, I'm doing an useless thing for my first step in Obj-C @interface String : NSString { int m_isnull; } - (id) init; - (int) isNull; @end @implementation String - (id) init { self = [super init]; m_isnull=1; return self; } - (int) isNull { return m_isnull; } @end test : String *a; a=@"ok"; Works fine, but just 2 little questions 1) When I'm compiling I have this warning warning: incompatible Objective-C types assigning 'struct NSString *', expected 'struct String *' I don't know how to avoid it !? 2) a=@"ok" is a fastest way to initialize a string, but when I'm debugging, I don't stop by at my init constructor why ?

    Read the article

  • Why won't my movie play using MPMoviePlayerController?

    - by Nosrettap
    I'm trying to get a basic movie to play in an iPhone app; however, I can't seem to get it to work. Here's my entire code: #import <MediaPlayer/MediaPlayer.h> #import "ViewController.h" @implementation ViewController - (IBAction)playMoviePressed:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer]; moviePlayer.controlStyle = MPMovieControlStyleDefault; moviePlayer.shouldAutoplay = YES; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES]; [moviePlayer prepareToPlay]; [moviePlayer play]; } @end I have one button on screen that calls playMoviePressed when it is tapped. I know that this method is getting called. I have also tried this with .mov and .mp4 local files that I have dragged into xcode.

    Read the article

  • C++ standard: dereferencing NULL pointer to get a reference?

    - by shoosh
    I'm wondering about what the C++ standard says about code like this: int* ptr = NULL; int& ref = *ptr; int* ptr2 = &ref; In practice the result is that ptr2 is NULL but I'm wondering, is this just an implementation detail or is this well defined in the standard? Under different circumstances a dereferencing of a NULL pointer should result in a crash but here I'm dereferencing it to get a reference which is implemented by the compiler as a pointer so there's really no actual dereferencing of NULL.

    Read the article

  • Multiple WCF Services implementing same Service Contract interface

    - by andrewczwu
    Is it possible for multiple wcf services to implement the same service contract interface? What I want to do is allow for a test service to be interchangeable for the real service, and to specify which service to be used in the configuration file. For example: [ServiceContract] public interface IUselessService { [OperationContract] string GetData(int value); } Test implementation public class TestService : IUselessService { public string GetData(int value) { return "This is a test"; } } Real class public class RealService : IUselessService { public string GetData(int value) { return string.Format("You entered: {0}", value); } }

    Read the article

  • Help me vaildate these points regarding Ruby

    - by Bragaadeesh
    Hi, I have started learning Ruby for the past 2,3 weeks and I have come up with some findings on the language. Can someone please validate these points. Implemented in many other high level languages such as C, Java, .Net etc., Is slow for the obvious reason that it cannot beat any of the already known high level languages. Should never be compared with any other high level language. Not suitable for large applications. Completely open source and is in a budding state. Has a framework called Rails which claims that it would be good for Agile development Community out there is getting better day by day and finding help immediately should not be a problem as time goes by. Has significant changes between releases which many developers wont welcome right away. Running time cannot be comprehensively estimated since the language has several underlying implementation in several languages. Books are always outdated by the time when you finish them. Thanks.

    Read the article

< Previous Page | 214 215 216 217 218 219 220 221 222 223 224 225  | Next Page >