I'm new to java can someone please explain to me whats wrong with this method:
clas Hello {
public static void main (String[]arg) {
Document.write ("hello world") ;
}}
Hi
is there a method / possibility to run a function when the scrollview is scrolling?
i found scroll start and scroll end solutions but nothing like a onIsScrolling ...
is there a built in solution? or whats the best workaround (nstimer)?
thanks
Alex
So I have a model with a FileField for excel spreadsheet. What I need to do this add another column in this spreadsheet, in each row let user pick from a drop-down list then save it and display it in html. All the picking and uploading will happen through the admin interface. So I have figured out way how to display a spreadsheet in html, however I have no idea how to write this save method. I could really use some hints and tips..
Hi All,
New to this and a bit confused as to why calling the following method creates a force close:
AudioManager myaudiomanager;
public void toggleSilent()
{
myaudiomanager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
}
I don't see any blatant errors and I have added permissions to the manifest regarding the audio manager.
Anyone able to direct me further?
When I run my asp.net mvc 2 site (shared hosting) I get the following error:
Method not found: 'Void System.Web.Mvc.DataAnnotationsModelValidatorProvider.set_AddImplicitRequiredAttributeForValueTypes(Boolean)'.
In the bin directory I have System.Web.Mvc.dll version 2.0.50217.0
On my local dev machine it runs fine.
Is it possible that if the hosting provider has a different mvc 2 version installed it would cause this error?
Thank you!
It's either because of the fact I'm tired or because I'm doing it wrong, but for some reason I can't get it to call a method.
Here's what I'm trying to call:
-(void)newHighScore:(int)d
Which right now just does an NSLog saying "yea I'm working!"
I'm calling it like this:
[highscore newHighScore:score];
highscore is what I called the HighScore class in the .h, and score is an int with the score.
hi,
i"m getting nuts in here.
everytime i try to do even an
ExternalInterface.call('alert','abc');
(which will work on every browser) i get an
object doesent support this propety or method
after the alert appears.
it even happens in the HTML generated by flash without me touching it...
there is any solution?!
thanks!
Hi,
If I'm correct then the releasing of the pool of autoreleased objects has something to do with the run loop.. I barely have an idea of what that 'run loop' is but my question is, is it possible that the object gets released before the end of the method is reached?
Hello I have a string and when i try to use replace method in for loop it doesn't work
String phrase="hello friend";
String[] wordds=phrase.split(" ");
String newPhrase="sup friendhello weirdo";
for (int g=0;g<2;g++)
{
finalPhrase+=newPhrase.replace(wordds[g],"");}
}
System.out.println(finalPhrase)
It prints out "sup hello weirdo" and i expect it to print "sup weirdo".
What am i doing wrong?
I noticed this full flash site and wonderring
http://www.houseoforange.nl/site/#/Photographers/Philip%20Riches/editorial%20women/
How can I apply the resize method like the way they did?
Any examples might help me a lot.
Right now my code works as such:
def method_a
self.method_b ==> 'method_b'
end
def method_b
puts self.name_of_calling_method
end
def name_of_calling_method
if /`(.*)'/.match(caller.first)
return $1
else
return nil
end
end
Instead of method_b printing 'method_b', how can I print the name of the calling method - 'method_a'?
when I try and run the "rake db:seed" command the rails console outputs "NoMethodError: undefined method `db' for #" not quite sure what going on. I'm using netbeans to build my rails project which is using the built-in JRuby 1.2 would that have anything to do with it?
In Python I can use the iterkeys() method to iterate over the keys of a dictionary. For example:
mydict = {'a': [3,5,6,43,3,6,3,],
'b': [87,65,3,45,7,8],
'c': [34,57,8,9,9,2],}
for k in mydict.iterkeys():
print k
gives me:
a
c
b
How can I do something similar in Javascript?
I use standard Cut, Copy and Paste commands (which is part of ApplicationCommands class). Is it possible to redefine CanExecute method?
Please give me a piece of C# code.
In rpsec 2.12 I expected this helper method definition to work:
module X
private
def build_them(type)
puts 'Catching the star'
end
end
context 'public/private instance methods' do
subject{ Class.new { extend(::X) } }
def subject.build(type)
puts "Throwing a star"
build_them(type)
end
it{ should respond_to :build}
end
The actual result is a failed spec:
expected #<Class:0x00000002ea5f90> to respond to :build
I expected the example to pass
Any suggestions on how to do this correctly?
What is the safest communication method between two applications on the same machine, both Java and C/C++ clients with a Java server.
Are SSL sockets safe enough or they can be broken by "man in the middle" attacks?
As i saw in the documentation and code samples, JSSE retrieves private/public keys and certificates from keystore files which a malicious user can see. The only thing that you can hide in the code is the password used to unlock the keystores.
Can hackers retrieve that password?
I have to call a callback method in iframe to return a value to opener.
I know SqueezeBox has "assign, open, close" static methods, but I do not understand how it works, can someone help me please?
- (IBAction)restoreUserDefaults {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if([defaults objectForKey:@"Exam Name"] == nil) {
examName = [[NSString alloc] initWithString:@"Name"];
} else {
examName = [[NSString alloc] initWithString:[defaults objectForKey:@"Exam Name"]];
}
[examNameLabel setText:[NSString stringWithFormat:@"%@",examName]];
}
Hey all,
Basically above is the method that is being called when one ViewController is being close and another is being opened the problem is, is that the UILabel in the new ViewController isn't changing to the value i need it to? Any ideas?
Regards
Lyon J Till
Basically, I want to have a database that's lightweight and I won't need to install a million other things on my clients computers for them to access this.
I just need a simple method of reading and writing values so that they're not hardcoded into the program. I could do MySQL (which is what I'm very familiar with), but it doesn't need to be making calls remotely.
I would have less than 10 fields and one table, if that matters.
Thanks!
How can I declare a method with keyword arguments just like rails do. some examples may be
Person.find(:all, :conditions => "...").
How can I use symbols to create methods similar to the above?
I am very new to ruby. Thanks in advance!
I was wondering, is the size() method that you can call on a existing ArrayList<T> cached?
Or is it preferable in performance critical code that I just store the size() in a local int?
I would expect that it is indeed cached, when you don't add/remove items between calls to size().
Am I right?
Hello,
what is PHP's safest encrypt/decrypt method, in use with MySQL - to store let's say passwords?
Of course, not for portal purposes.
I want to do little password (domain/mysql/ftp...) storage for whole team online, but I don't want really to endanger our clients' bussinesses. Hash can't be used for obvious reasons (Doesn't really make sense to run rainbow tables every time :D).
Any idea?
i tried the following code for cloning the object. while compiling it shows clone is protected and cannot be accessed, but i had extended Object class, hence the clone method will be public to my class . please explain me the reason.
class storeDate extends Object {
public static void main(String[] args)
{
storeDate d = new storeDate();
Object o = (storeDate)d;
o.clone():
}
}
I would like to know if something like below is possible ,
list<**MyObject**>.**removeAll**(list<**String**>)
I hope the context is understandable.
The list<MyObject : is a ArrayList<MyObject
The list<String : is a ArrayList<String
I know this can be achieved by overriding equals method in MyObject class. I would like to know if any other choice is prsent.
Thanks,Srinivas N
I've been following Ryan Bates' Railscasts tutorial on CarrierWave, which you can find here
Everything works fine, except for when I go to view my profile, it gives me this error:
undefined local variable or method `user'
I don't know why it is telling me this, as I am using Devise for my authentication, and that is the name of my model.
Below are some of the files which may be useful:
https://gist.github.com/amarh21/7439421
I am using Rails 4.0.1 and ruby 2.0.0