List (and List) instances can be readonly, seeing ReadOnly property; methods throws exceptions in the case the collection have the property ReadOnly property.
How can I create readonly List instances? What are the main uses?
Is it possible to override the to_sentence method just for one model in my rails application?
More generally, how do I modify methods for an Array of my models?
Does anyone know of a good (read: quick to code) method for converting DTOs to View Models or mapping DTO members to View Model members? Lately I've been finding myself writing many conversion and helper methods but this is a very arduous and tedious task. Moreover, it will often needs to be done twice (DTO - View Model, View Model - DTO).
Is there a methodology, technique, or technology which would allow me to do this more quickly and efficiently?
Hello everyone,
I would like to achieve the following: all the workflows created should have the same structure (validation, execution, save results), and all the developers should implement those three stages (maybe leaving it empty). Similar to inheritance with abstract methods.
Any ideas?
I have a controller method with the following signature:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateValues(int id, MyViewModel[] array)
{
}
The id is normally picked up as part of the Url on other GET controller methods (I have a working route that does this)
I am successfully passing the array1 from the form in my view to the controller method, but how do I also put the id onto my Url so that when the user clicks the Submit button, the controller method will pick up the ID?
Hi,
I have resize images exceeding a max size. Methods I tried so far are not good enough :-(
System.Drawing.Image.GetThumbnailImage generates very poor quality images in general.
Playing with options like this one I can generate better images in quality but heavier than the original one.
Probably the second option (or something similar) is the best option and I would need to resize using the proper options.
Any advice?
Hi,
I have preperd a remote service, i would like to know if it's possible somehow via this service to call another activities?
coz usually what ive seen so far, is how external apps calling the remote service and using it's methods, but i want vice versa.. that the remote service will call an external app's activity,
thanks,
moshik.
Hi Guys,
I need a help from ur side.
Actually I need to call a method automatically when I click on to the textview.
Is there any delegate methods or any other process for this.
Anyone's help will be much appreciated.
Thank you,
Monish.
From what I gather, there are two major methods to perform alignment on point clouds, Iterative Closest Point (ICP) and Particle Filtering. What are the advantages of each method? And can someone point me some good tutorials.
For what I am currently doing, I think ICP would be easier, I can't seem to find any simple reference implementations online for 2d point sets. Has anyone seen (psuedo)code for ICP with details on the transformation step?
Thanks in advance.
I woudl like to know how to use a System.Collections.Hashtable in F#. The reason it is a Hashtable is because I am referencing C# assemblies.
How would I call the following methods?
- Add
- Get value from key
I have not been able to find anything useful in google about this. Any help would be appreciated.
Thanks
Well i have a WCF service and has to methods one that gives a list of a object and one that gives a list of objects..
the object returned from method one is part of the list from method two.
Im using wpf and binding a combo box to the two the results..
but the problem is that the combo box dosent know how to compare the objects as WCF did not generate this for me.. is there some way to fix this??
I am fiddling around with JBOSS's Web Services, and I have created the following:
http://127.0.0.1:8080/IM/TestService?wsdl
Now I need to access Web Methods from that Web Service from JavaScript.
Say I have a web method named foo in TestService, how do I make an ajax call to it?
I tried accessing the method via http://127.0.0.1:8080/IM/TestService/foo, but I'm getting an HTTP Status 404.
Hi dudes,
i'm starting to implement AdWhirl in my application. i follow the instructions which is belong to adwhirl but i cant see any ad in my application.i add the following methods in my viewcontroller class
- (void)viewDidLoad {
[super viewDidLoad];
AdWhirlView *adView=[AdWhirlView requestAdWhirlViewWithDelegate:self];
[self.view addSubview:adView];
}
-(NSString *) adWhirlApplicationKey{
return @"myAdWhirlKey";
}
-(UIViewController *) viewControllerForPresentingModalView{
return self;
}
i doesn't display anything. please help how to implement AdWhirl
OK, I know how to create a class extension, using something like that:
on .h
@interface UIButton (myExtensionName)
// my extended methods
@end
and then on .m
@implementation UIButton (myExtensionName)
// my implementations
@end
But how do I declare the extended delegates I may create?
If this was a normal class I would do
@protocol myExtensionName <NSObject>
// my delegate declarations
@end
but how do I do that on a class extension?
thanks
I found a lot of links on metaclasses, and most of them mention that they are useful for implementing factory methods. Can you show me an example of using metaclasses to implement the design pattern?
Hi
Raising an event, will call its event handler. eg http://msdn.microsoft.com/en-us/library/aa645739%28VS.71%29.aspx
What is the difference between using the events mechanism and direct calls to other methods (eg if a condition is met in method A(), call B() )?
And what is the difference between consuming and raising events?
Thanks
I have this list
http://pastebin.me/dde64f8c185de9dd5e429f84701a01ce
Anytime you click on an image extra content appears . I have tryed several css methods but i cant get the images to remain in their position and get the text to go underneath . Anyone has a solution ?
Is there any difference between these two methods of moving a file?
System.IO.FileInfo f = new System.IO.FileInfo(@"c:\foo.txt");
f.MoveTo(@"c:\bar.txt");
//vs
System.IO.File.Move(@"c:\foo.txt", @"c:\bar.txt");
Details on all Web Service Authentication methods and How to apply those?? i.e Way to apply Basic and Digest Authentication in C# Web Application.
More: I'm creating a Web Service and want to deploy it on IIS 5.0. In order to authenticate user I want to use Digest Authentication. How this is done? The authentication should contain some through which the user is checked inside database for authentication and then if valid user then return success or else failure...
I'm using GitHub for code and Heroku for the deployment platform for my rails app.
I don't want to have sensitive data under Git. Such data include database file settings (database.yml) and some other files that have secret API keys.
When I deploy to heroku, how can I deal with files that are not under revision control.
When I use Capistrano, I can write some hook methods, but I don't know what to do with Heroku.
I have a big table with vertical scroll bar.
I would like to scroll to a specific line in this table using jQuery/Javascript.
Should I look for plug-ins for this task, or there are built-in methods ?
Here is a little example to play with.
Thanks a lot !
I've seen developers use various methods to prevent spam on a basic html contact form
Method 1 is where the developer uses a Captcha image and Method 2 where only a Question is asked eg. Are you Human? with a radio button.
Which one is the better one to use and why?
I am doing some input/output between a c++ and a python program (only floating point values) python has a nice feature of converting floating point values to hex-numbers and back as you can see in this link:
http://docs.python.org/library/stdtypes.html#additional-methods-on-float
Is there an easy way in C++ to to something similar? and convert the python output back to C++ double/float? This way I would not have the problem of rounding errors when exchanging data between the two processes...
thx for the answers!