Hello. I am sorry to bother so late, but i am very much a bundle of nerves. I have tried to understand how to use the information in the couple of objective-c and objective-c game design books I have purchased, but unfortunately, the information is laid out in a way which I dont really comprehend.
I would like to state my query and is...
Hi, I have a number of different clases located in a class library in my project. I am using Quartz.NET (a scheduling system) to schedule and load jobs, and the actual job execution is done in these class libraries. I plan to have many types of job types, and each one will have their own class for execution in the class library.
An issu...
i have a php script that runs perfectly
but i get 2 errors:
Warning: The magic method __set() must have public visibility
and cannot be static in C:\wamp\www\class.XMLHttpRequest.php on line 63
Warning: The magic method __get() must have public visibility
and cannot be static in C:\wamp\www\class.XMLHttpRequest.php on line 89...
Hi, I get the following error:
undefined method `[]' for nil:NilClass
The related snippet in line 50:
47: <%=h @contact.date_entered.to_date %></br>
48: Next event:
49: <% next_delayed_todo = @contact.next_delayed_todo %>
50: <% unless next_delayed_todo[:event].nil? %>
52: <%= next_delayed_todo[:event].title %> </br>
...
I've got the following class:
public class Matriz
{
...
static public void create(Matriz a, Matriz b)
{
...
a=new Matriz(someValue,anotherValue);
b=new Matriz(someValue,anotherValue);
...
}
}
And in my main method:
public static void main(String[] args)
{
Matriz a=null,b=null;
Matriz.create(a,b);
...
Hi,
I am creating some xsl to transform my xml into text (which will be csv eventually). I am using VS2008. When I use the editor to create the xsl, the transformed output is indented as per my xsl. However, if I edit the xsl and remove the formatted whitespaces it outputs correctly - but doing it like this is a nightmare to work wit...
I have this class
loader.h
#import <Foundation/Foundation.h>
@class Reachability;
@interface loader : NSObject {
}
- (void)startLoading;
@end
loader.m
#import "loader.h"
#import "Reachability.h"
@implementation loader
- (void)startLoading{
NSLog(@"Check network");
}
@end
Is the code bellow the correct way to include the above c...
So, if I have a polymorphic association throughout my application, is there a way to add methods to it? For instance, if :post, :photo and :user are all associated to :rankings with a polymorphic association named :rankable, can I somehow create methods on :rankable that would then be inherited by :post, :photo or :user? My guess is th...
So this is what I am trying to accomplish. I am trying to use a sax parser to parse some XML. it looks like I need to call all their methods as statics. So if I want to pass a value back from say startElement it is static void startElement. Which brings me to my example code. I have been pulling my hair on how to update a value in a Nes...
How (actual with which instuments like ReSharper) in VS10 developer can find "unsafe" method invokes - i.e. invokes, which unattainable by call stack in no one safe block (try-catch) ?
class A
{
public static vois f()
{
try
{
...
B.DoSome(); // safe call, exceptions handled
}
...
i have the following classes.
class base {
private function __construct(){
//check if foo method exists
//$this->foo(); // if it exists
}
public static function singleton(){
if(!isset(self::$singleton)){
self::$singleton = new base();
}
return self::$singleton;
}
}
...
I created an object in the method viewDidLoad:. In another method that I create, I want to access this object.
One way to do it is to declare the object in the h file.
Another way to do it is to pass it as a parameter.
Are there any other ways?
...
I was trying to write an answer to this question and was quite surprised to find out that there is no find method for lists, lists have only the index method (strings have find and index).
Can anyone tell me the rationale behind that?
Why strings have both?
...
As part of learning ruby/rails, I'm trying to implement http://github.com/professionalnerd/simple-private-messages into my application from scratch, instead of just installing the plugin. (I know, causing myself trouble but it's a good learning experience.)
I created the model, and the associations seem ok and I can create new messages ...
I'd prefer not to change the way anArray is designed because it is also used elsewhere as a dataSource for a UITableView. The odd number values are "user names", and the even number values are their matching "dates". (The "pairs" must remain together.)
How would I sort "by user name"?
How would I sort "by date"?
Should I be using s...
I know how to use a method and that is solves some task but I do not get what exactly are they good for. Every pages says "it is a block of code...blabla", but I have not seen any simple explanation that says what are the methods good for and why are so important. I would be very grateful if someone could give me clear answer. Thank you!...
When an attribute is not found object.__getattr__ is called. Is there an equivalent way to intercept undefined methods?
...
In Ruby, on certain occasions (ruby/gosu/texplay) I'v seen code like the following used:
image.paint {
circle 20, 20
pixel 10, 10
}
Would it be possible for me to write a similar function that can be used like so?:
my_function {
"one"
"two"
"three"
}
that would return and array:
["one", "two", "three"]
p.s...
I have an NSMutableArray object that I want to add custom methods to. I tried subclassing NSMutableArray but then I get an error saying "method only defined for abstract class" when trying to get the number of objects with the count method. Why is the count method not inherited?
I read somewhere else that I will have to import some NSMu...
On MSDN I found:
In C#, every executed instruction is done so in the context of a method.
But I also read that an int A=5; statement can be in the class body. It seems it's not in a method body, so why this is possible? It is probably just term confusion but I would like to know.
...