Is there any good framework for comparing whole objects?
now i do
assertEquals("[email protected]", obj.email);
assertEquals("5", obj.shop);
if bad email is returned i never get to know if it had the right shop, i would like to get a list of incorrect fields.
Hi,
I'm hoping that someone will explain to me what preferred access point name refers to in the android system , and what is it's role . Also I'd like to know if by messing with all APN (adding a suffix to the "apn" and "type" fields to disable 3G/EDGE/GPRS connections , and the deleting this suffix ) , the preferred APN can be disrupted.
Also if it need special settings in case an APN manipulation is desired.
I have three models, user, achievement, badge and I plan on using has_many :through instead of has_many_and_belongs_to since I will have a few extra fields in the join tables.
According to a Railscast I watched, using this method requires coming up with new model names and not user_badge or user_achievement.
For my User Achievement join what do you think of Accomplishment?
For my User Badge join what do you think of Distinction?
I'm building a custom UIView, which draws its own content in a drawRect: Method. I want to stroke a CGPath with a color, and then grow this selection 1px and stroke with another color. Has somebody worked out a method to do this quite easily?
Is there any kind of PHP script that has a user database with custom tables that I can access through a RESTful API? I am wanting to create an iPhone app that interacts with the user database.. such as register, login, update info...
Any ideas? Thanks!
Hi,
I'm using the validation plugin for jquery:
http://docs.jquery.com/Plugins/Validation.
I want to know how would I exempt a field to be validated? Currently all fields inside the form are automatically checked.
How to make the use of hidden variables as array for consecutive submission of data so that they can be used to display the records list.
I have a form with 4 text fields and a file upload field.. as i submit he form it should get appended to the list which needs to be displayed below the form, such that these values are NOT stored in the DB..
So in this case how can i use the post array to collect the data and display in the list below?
I have a form with multiple fields in it along with a image input field, just below the form i have a list to be displayed on every submit of this form... this has to be done without the use of DB..
I think this can be achieved by using session but its not working with me, as evrytime page gets refreshed and session gets recreated/reset..
Please help me in resolving this issue
Hi,
I've seen plenty of classes in .NET which have private constructor (Stream is one of them I think). When would I want to model a class like this?
I keep thinking that if my class has no internal state/fields, then I can make it have a private constructor.
Am I on the right track with this idea? I can understand the use of a factory (I've run into the tipping point a few times), but not with a private constructor class.
Thanks
I am stuck on how to pass data from one control to another. If I have a listbox control and the Contol Item contains a datatemplate which renders out 5 fields ( first name, last name, email, phone and DOB) all of which come from an observable collection. How can I allow the user to select a listbox item and have the valuesbe stored within a new listbox control?
Is this done through the creation of a new collection or is there a more simple way to bind these values to a new control?
thank you,
Now i have a problem below:
i've added a div on my page to forbid user to click buttons, links or fields when user click the DOWNLOAD button. So i need to remove this div when the IE file download prompt pops up or when user clicks "save", "save as" or "cancel" on it.
How can I reach this?
I use Rules-Module. I want to add 1 to a cck integer field on an action. Someone told me to create custom token doing this addition.
So, I installed tokenSTARTER module.
Now, how do i access the content profile (I load it in the rules chain) where needed cck field is in?
I am writing a custom error handling/reporting function for php file upload and I noticed that the error codes returned is one of numbers 0 to 8 except 5.
Is this a typo in the source I am using or is it really this way? And if it is so, I am curious why they have skipped number '5'.
Thanks.
In Visual Studio 2010 we have MSBuild for C++ project. Also we can add additional custom properties files "*.props" to projects, which are just MSBuild scripts.
Is it possible in imported "some.props" file know its directory?
for example there is "project.vcxproj" file and "common.props" file.
I would like to write something:
<IncludeDir>$( [and something for common.props file directory here] )\include</IncludeDir>
What should I write there?
I'm trying to add facebook connect button to my ZF web site. After i click on FB connect button the popup with email and password fields opens. But when i send email and password to login with facebook the popub don't close and reload the same page where the facebook connect button was.
Any idea?
Sorry for my english ..
I have a custom UIView with a UILabel and a UIImageView subview. (tried using UIImageView subclass aswell). I assign an image to it and add the view to the screen. I wrote a function which adds the amount of LetterBoxes to the screen (my custom class):
- (void)drawBoxesForWord:(NSString *)word {
if(boxesContainer == nil)
{
/*
Create a container for the LetterBoxes (animation purposes)
*/
boxesContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 205, 320, 50)];
[self.view addSubview:boxesContainer];
}
/*
Calculate width of letterboxes
*/
NSInteger numberOfCharacters = [word length];
CGFloat totalWidth = numberOfCharacters * 28 + (numberOfCharacters - 1) * 3;
CGFloat leftCap = (320 - totalWidth) / 2;
[letters removeAllObjects];
/*
Draw the boxes to the screen
*/
for (int i = 0; i < numberOfCharacters; i++) {
LetterBox *letter = [[LetterBox alloc] initWithFrame:CGRectMake(leftCap + i * 31 , 0, 28, 40)];
[letters addObject:letter];
[boxesContainer addSubview:letter];
[letter release];
}}
This gives me the image below:
http://www.imgdumper.nl/uploads2/4ba3b2c72bb99/4ba3b2c72abfd-Goed.png
But sometimes it gives me this:
imgdumper.nl/uploads2/4ba3b2d888226/4ba3b2d88728a-Fout.png
I add them to the same boxesContainer but they first remove themselves from the superview, so it's not like you see them double or something.
What I find weird is that they are all good or all bad.. This is the init function for my LetterBox:
if (self == [super initWithFrame:aRect]) {
/*
Create the box image with same frame
*/
boxImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
boxImage.contentMode = UIViewContentModeScaleAspectFit;
boxImage.image = [UIImage imageNamed:@"SpaceOpen.png"];
[self addSubview:boxImage];
/*
Create the label with same frame
*/
letterLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
letterLabel.backgroundColor = [UIColor clearColor];
letterLabel.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:26];
letterLabel.textColor = [UIColor blackColor];
letterLabel.textAlignment = UITextAlignmentCenter;
[self addSubview:letterLabel];
}
return self;}
Does anyone have an idea why this could be? I'd rather have them display correctly every time :)
Hello,
I have several custom MKPinAnnotationView on my map with different images(colored pins). Everything works fine until I either click on a pin or change the map to a different view(satellite/road)... when I do either of these, my pins will revert back to the classic red color.
Any help would be greatly appreciated.
How can I protect my web server, if I run custom users code on server. If any user can submit his python source on my server and run it.
Maybe some modules or linux tools for close any network and hardware activity for this script.
Thank's all for help!
Consider I have an array of elements out of which I want to create a new 'iterable' which on every next applies a custom 'transformation'. What's the proper way of doing it under python 2.x?
For people familiar with Java, the equivalent is Iterables#transform from google's collections framework.
I've read this post about mocking location with custom provider, but I am looking for a way to mock the location during a presentation, is that possible?
I am a student programmer and relatively new to the industry. Once I get out into the real world and have money to blow, which events/conventions/conferences/etc. should I look into attending? Which do you consider a must-attend-at-least-once-in-your-life-as-a-developer type of event?
Just to clarify, any language, company, size, are acceptable. I'm mostly looking to generate a list of highly regarded conferences for a variety of different fields/interests.
Everything works as expected but I would like to improve the directory structure that the .zip produces.
When I create a deployment package I have it create in a custom directory which works fine but the .zip it creates is in the structure of:
content/c_c/users/pcName/documents/VS2010/Projects/ProjectName/obj/release/package/packageTmp
Only in the packageTmp directory do I get to the files I want!
Is there a way for the created zip to not include all of those empty directories?
I'm new to Rails and am working with the collection_select method.
I have two fields I'd like to display in my select box:
first_name and last_name
So far, I can only display one or the other, not both.
Here's the code I'm working with:
collection_select(:hour,:shopper_id,@shoppers,:id,"last_name")
Thank you.
Hi,
i have this page.
login: [email protected]
password: m
I've gave a width to "td.select_edad label" but it doesnt work..
I know it's deprecated, so what is your advice?
Another question: why "height" (also deprecated) is working ok for the fields of the filter?
Regards
Javi