What is different between Inversion Of Control pattern and I rewrite old class while keeping same method name and parameter?
I just can not see what's advantage of IoC.
Can anyone enlighten me as to the differences between the two statements below.
[self playButtonSound];
AND:
[self performSelector:@selector(playButtonSound)];
I am just asking as I had some old code that used @selector, now with a little more knowledge I can't think why I did not use [self playButtonSound] instead, they both seem to do the same as written here.
gary
I have an old Access database that is being upgraded to work with Access 2007. The client is complaining that it is slow now. I am looking for ways to optimize it.
There is one subform that is in a particular tab on the form. I have been wondering -- does the subform still update/query even when it is not visible?
If this is configurable --- how?
hi
i m working on matlab GUI. in GUI axis button i placed some concentric circles. now i want to place one map on the same axis. then on that map i want to draw my concentric circles.
my map shouldnt disturb my old events. plzzzzzzzzzzzzz find me one good solution.
Whereas 99.99 * 0.01 = 0.99
Clearly this is the age old floating point rounding issue, however the rounding error in this case seems quite large to me; what I mean is I might have expected a result of 0.99990000001 or some similar 'close' result.
And for the record I got the same answer in a JavaVM and in a .Net environment.
(Newbie to Java, old time C# guy.)
I have noticed a lot of the use of @Override in Android example code. I thought that all Java methods were by default "Virutal"?
What then does @Override do?
Example:
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
Java is striving to be backward compatible. It is to such an extent that it crippled its generics for that (off-topic).
But are there situations when old code would not compile on newer versions (more importantly Java 5, and the forthcoming Java 7)
I have a client who wants to transition off their old environment into .NET.
The client has a good grounding in basic OO concepts (their existing development environment supports this) and are expert developers, but need a quick "up to speed" introduction to the .NET framework (C# as the chosen language) for building Line of Business applications (they're keen on Silverlight).
Any recommendations?
I have a client with 5000 emails from an old list he has that he wants to promote his services to. He wants to know which emails on the list are still valid. I want to check them for him - without sending out 5K emails randomly and then being listed as a spammer or something. Ideas?
I'm used to handle graphics with old-school libraries (allegro, GD, pygame), where if I want to copy a part of a bitmap into another... I just use blit.
I'm trying to figure out how to do that in android, and I got very confused.
So... we have these Canvas that are write-only, and Bitmaps that are read-only? It seems too stupid to be real, there must be something I'm missing, but I really can't figure it out.
hi every1. i have created a fb app that publishes my blog postings on my fb fan page. problem is when someone clicks the topic on the fan page it loads it on the same window instead of a blank new one. anyone knows how I can overcome this. i am using the old FB PHP REST client.
Based on a college-project I'm trying to realize a relatively simple game (Poker) where an iPad acts as Server and multiple iPod-Touchs connect to it as Clients.
Gamekit seems to drop out, since those old ipod-touch-devices don't have bluetooth-support.
Are there already some Frameworks out there simplifying the process, or do I have to fall back on TCP-Streaming-Sockets and implement it myself?
hello,
in struts2, i create a simple appln.I use client side validation(using ActionClass-Validation.xml),when i get validation error it displays the message well..but a error repeatedly occur it display the old and new message again and again..how can i solve the issue?
user name: xxx
password error
password error
password :
Button
thankss
I have used javascript to upload more than one file. when user clicks on 'add more' javascript appends new object to older div using innerHTML.
Now the problem is if I select a file and then click on "add more" then new file button exist but older selected file removes and two blank file buttons display. I want this old file must be selected when user add new file button.
If anybody can,
Help Plz!!!
tnX.
I am thinking of how I can implement std::vector from the ground up.
How does it resize the vector?
realloc only seems to work for plain old stucts, or am I wrong?
I have a php page that has a form that asks for an e-mail. When you press the send button, it gets to another php page, which gets the form data and does its stuff. I need to then be able to go back to the old page (the one that contained the form) and give it some data so that it will be able to change itself and say "You've sent your e-mail successfully, and will not display the form.
How do I do it?
I recently installed the release version of Visual Studio 2010. So far I'm less than impressed with the rewrite and was wondering if I'm the only one.
The thing I dislike the most is the inability to use the old-school MDI windows instead of the dreaded tabbed documents.
For the other side the usage generator seems like it may prove useful in time.
So what do you like or dislike about the changes to VS2010?
I have an old Moto Q that I would like to change the default alarm sound in the Calendar function. Right now, it seems to pick up the Alarm4.mid file in the Windows directory, which is embedded in ROM, so the filenames can't be changed. Is there a way to change the file pointer in the Calendar function to another file or is there another way to get around this?
I need your help to extend my base class, here is the similar structure i have.
public class ShowRoomA
{
public audi AudiModelA { get; set; }
public benz benzModelA { get; set; }
}
public class audi
{
public string Name { get; set; }
public string AC { get; set; }
public string PowerStearing { get; set; }
}
public class benz
{
public string Name { get; set; }
public string AC { get; set; }
public string AirBag { get; set; }
public string MusicSystem { get; set; }
}
//My Implementation class like this
class Main()
{
private void UpdateDetails()
{
ShowRoomA ojbMahi = new ShowRoomA();
GetDetails( ojbMahi ); // this works fine
}
private void GetDetails(ShowRoomA objShowRoom)
{
objShowRoom = new objShowRoom();
objShowRoom.audi = new audi();
objShowRoom.audi.Name = "AUDIMODEL94CD698";
objShowRoom.audi.AC = "6 TON";
objShowRoom.audi.PowerStearing = "Electric";
objShowRoom.benz= new benz();
objShowRoom.audi.Name = "BENZMODEL34LCX";
objShowRoom.audi.AC = "8 TON";
objShowRoom.audi.AirBag = "Two (1+1)";
objShowRoom.audi.MusicSystem = "Poineer 3500W";
}
}
// Till this cool.
// Now I got requirement for ShowRoomB with replacement of old audi and benz with new models and new other brand cars also added.
// I don't want to modify GetDetails() method. by reusing this method additional logic i want to apply to my new extended model.
// Here I struck in designing my new model of ShowRoomB (base of ShowRoomA) ... I have tried some thing like... but not sure.
public class audiModelB:audi
{
public string JetEngine { get; set; }
}
public class benzModelB:benz
{
public string JetEngine { get; set; }
}
public class ShowRoomB
{
public audiModelB AudiModelB { get; set; }
public benzModelB benzModelB { get; set; }
}
// My new code to Implementation class like this
class Main()
{
private void UpdateDetails()
{
ShowRoomB ojbNahi = new ShowRoomB();
GetDetails( ojbNahi ); // this is NOT working! I know this object does not contain base class directly, still some what i want fill my new model with old properties. Kindly suggest here
}
}
Can any one please give me solutions how to achieve my extending requirement for base class "ShowroomA"
Really appreciated your time and suggestions.
Thanks in advance,
Hi,
I had a problem where I was using the hibernate template to do most of my DB work but I had a part of the system that directly accessed the session to do batch persisting. I noticed that the hibernate template session was old and would be storing cached values which didnt take into account the objects save with the session directly.
What are the drawbacks of using alwaysUseNewSession? This fixes the problem as I always get up-to-date objects.
Thanks.
Can somebody explain to me why this works (in Python 2.5) :
class Foo(object):
pass
class Bar(Foo):
pass
print(Foo.__subclasses__())
but this doesn't :
class Foo():
pass
class Bar(Foo):
pass
print(Foo.__subclasses__())
The latter returns "AttributeError: class Foo has no attribute '__subclasses__'" but i'm not sure why. I know this is related to old-style vs. new-style classes but i'm not clear on why that would make this functionality unavailable.
I need to stop all the javascript running on the page, but I have a limitation:
I cannot control the tags content, I am editing the page after it's being loaded.
Also, I need to remove all the variables defined by the old script that was running and stop all the intervals.
I have an app which acts almost like a daemon. Sometimes it quits on error and many times it prints an error msg then ask users to press any key to close.
How can i relaunch the app when either case happens? I am more interested in the 2nd case. I can do this in c++, C# or python. The script is an old python that i dont want to change (a newer c# version is in the works but not stable)