Hi,
I am working on a REST based interface where people get a json file. The client needs to access the file from another Domain. I use jsonp which works so far. My problem is the rendering in Grails. At the moment I use the 'as JSON' to marshalling the object:
render "${params.jsoncallback}(${user as JSON})"
The Json file getting to...
Is there a simple command line switch or a trick to renaming the generated class name when running svcutil.exe to generate a client proxy?
...
I am trying to write code for an assignment for the c# intro class at my college but am ahead and am running into problems. I am getting a NullReferenceException when i run the program - i think the problem is coming from the fact that i am creating a 'Line' which contains the 'Point' class... i have tried for 3hrs to fix this - any help...
In XCode and objective c, if I want to use a UIGlassButton in interface builder, I put the following line in my header file:
@class UIGlassButton;
I am now using monotouch c#. Is there a similar statement I can use to import the UIGlassButton class?
I guess the question becomes did the Monotouch team port UIGlassButton to C# and Mon...
okay, so here is what im doing:
class Connection
{
public int SERVERID;
private Thread connection;
public Connection()
{
connection = new Thread(new ThreadStart(this.Run));
}
public void Start(int serverid)
{
SERVERID = serverid;
connection.Start();
}
void Run()
{
w...
I have two programs: one CLI program, and one GUI. The GUI is a frontend for the CLI, but also a GUI for another program as well.
I am importing the CLI's classes and extending them in the GUI to add GUI elements to the classes, and all is great.
But now I want to split the CLI that I currently have embedded in the GUI (as an include...
Ok, so ive been writing a very complex multiserver irc bot recently, and ive encountered an issue..
i stipped down the code as much as i could because its very large, the full code is here:
http://pastie.org/691449.txt
so what my issue is, when i call the Disconnect() void in Connection, instead of disconnecting and closing the given se...
Again disclaimer disclaimer still learning C# and OOP generally so I hope you'll be patient with me :)
I am currently working with a CMS that has a class called FileVersion which basically contains a list of properties pertaining to a file such as filename, filetype, size in bytes, id, date uploaded, is-latest-version, etc.
A list of F...
Hello,
I'm currently using both C++ and Java in a project and I'd like to be able to send an object which is contained in C++ to my Java interface in order to modify it via a GUI and then send the modification back in C++.
So far I've been returning either nothing, an int or a boolean to Java via the JNI interface. This time I have to ...
I know it wouldn't be exactly equivalent to $this, but is there a way to reference a static class from within itself without using the name of the class itself? ( like super but for itself )
This is just a way to avoid having to refactor all the class references if the class is renamed.
Example:
class foo {
function bar() {
static_this...
I have a class in which I'm trying to overload the << operator. For some reason, it is not being overloaded.
Here is my .h file:
friend std::ostream& operator<<(std::ostream&, const course &); //course is my class object name
in my .cpp, I have this as my implementation:
std::ostream& operator<<(std::ostream &out, const course & rhs...
I've come across a Registry Class and I'm wondering whether to bother with this or just go constants, or are there separate uses for site-wide global variables such as database connection information, website URI, etc?
Here's the class I came across:
<?php
Class Registry {
private $vars = array();
public function __se...
Hello, I am a PHP beginner. I have developed a social networking website similar to Orkut in PHP.
The basic program flow of my website is redirect everything to index.php
The index.php determines the $_SERVER['REQUEST_URI'] and does what needs to be done and render the output.
I initiaze all the classes at the top of index.php I want ...
Hello,
I'm creating some entities (class) for my project and I want to set a default binging property for it, here is an example
namespace MyNamespace
{
[System.ComponentModel.DefaultBindingProperty("Name")]
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
public int ...
I see a lot of stuff
include ActiveRecord::XXXX::InstanceMethods
extend ActiveRecord::XXXX::SingletonMethods
I am unaware of the property or there working, just wanted a easy to understand answer.
if it has a good reason to be used.
...
How could I get the string value from a hashtable without calling toString() methode?
example: my class:
public class myHashT : Hashtable
{
public myHashT () { }
...
public override object this[object key]
{
get
{
return base[key].ToString(); <--this doesn't work!
}
set
...
I have a working memoize decorator which uses Django's cache backend to remember the result of a function for a certain amount of time. I am specifically applying this to a class method.
My decorator looks like:
def memoize(prefix='mysite', timeout=300, keygenfunc=None):
# MUST SPECIFY A KEYGENFUNC(args, kwargs) WHICH MUST RETURN A ST...
Hi,
I like to write my code slim and sexy (on the performance and memory side), I am using Mootools and was wondering if I was using it the correct way, also you can help me by telling me how to test my code to find the answers I am looking for my self.
//First we create a class like so:
var FirstClass = new Class {(
'someFunc': fu...
What is the size of reference of a class in Java? Is it constant for a particular JVM and OS irrespective of the class for which the reference is made.
Class A
Class B
Class C
A a;
B b;
C c;
Is size of a , b and c are same irrespective of the size of A, B and C classes?
...
Is it possible to constrain the type of generic to, say, two different classes?
Like so:
TSomeClass<T: FirstClass; T: SecondClass> = class
// ...
end;
(Sorry about the lack of formatting - the SO tool bar has disappeared from my browser).
I know the above won't compile, its only written so to give you guys an idea. I tried
TSomeCl...