Hi
I work on a big project in company. We collect data which we get via API methods of the CMS.
ex.
DataSet users = CMS.UserHelper.GetLoggedUser(); // returns dataset with users
Now on some pages we need many different data, not just users, also Nodes of the tree of the CMS or specific data of subtreee.
So we thought of write an ...
Hey, I wonder how all this is in VB.NET
In C#
UserSettings vUsers = new UserSettings();
UserSettings.IUserSettings vUserI = (UserSettings.IUserSettings)vUsers
I took a chance to try to write it in VB.NET, but is this right?
In VB.NET
Dim vUsers As UserSettings = New UserSettings()
Dim vUserI As UserSettings.IUserSettings = (UserS...
Hi there,
I was trying to create a prototype object with four attributes:
'name', 'basis' and 'rows', which are values taken from a form and
'head' which should be an array of string values.
Classdef:
var TableTemplate = Class.create();
TableTemplate.prototype = {
initialize: function(name, basis, head, rows) {
thi...
Hey.
I've always assumed that - in the absence of constructor parameters - the parenthesis (curly brackets) follow the class name when creating a class instance, were optional, and that you could include or exclude them at your own personal whim.
That these two statements were equal:
$foo = new bar;
$foo = new bar();
Am I right? Or ...
I have a nested class:
class WidgetType(object):
class FloatType(object):
pass
class TextType(object):
pass
.. and an oject that refers the nested class type (not an instance of it) like this
class ObjectToPickle(object):
def __init__(self):
self.type = WidgetType.TextType
Trying to ser...
As the title implies, or is it a pseudo-proposition?
thanks.
...
Hi,
We have seen lots of discussion in SO regarding the class vs struct in c#. Mostly ended with conclusions saying its a heap/stack memory allocation. And recommending to use structs in small data structures.
Now I have a situation to decide the simple data store among these two choices. Currenlty in our application we have thousands ...
Is it possible to make a namespace friend of a class, say I have a unit test namespace with many classes and I wanted the test namespace to be friend to a class so that it has access to private implementation details.
...
Hi
is it possible, by using jython to call jython classes from java code?
If yes, how please?
...
I'm trying to have method void run( string method ) which would run method in that class. For example:
class Foo {
public:
void run( string method ) {
// this method calls method *method* from this class
}
void bar() {
printf( "Function bar\n" );
}
void foo2() {
printf( "Function foo2\n" )...
Hi All.
I have an AppController class that looks after view/control in my app in the usual way.
There's a button on my app's main window in IB that causes AppController to instantiate a new window controller (accountPanelController) and show that secondary window:
- (IBAction) showAccountPanel:(id) sender
{
//Is accountController ...
I usually name by classes in the Business project as Manager.cs, like BaseManager.cs, CommentsManager.cs, ProfileManager.cs, etc...
How do you name your classes in the DataAccess project? Do you call it CommentsDA, CommentsDB, or what?
Just curious...BTW, I'm using .NET C#.
...
I have the following class in PHP
class MyClass
{
// How to declare MyMember here? It needs to be private
public static function MyFunction()
{
// How to access MyMember here?
}
}
I am totally confused about which syntax to use
$MyMember = 0; and echo $MyMember
or
private $MyMember = 0; and echo $MyMember
or
$this->My...
I'm trying to export a simple class to Lua using LuaBind. I took the code from two sites which showed roughly the same way to do it, but it's still failing.
// Default headers
#include <iostream>
#include <string>
// Lua headers
extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#include "luabind/luab...
I currently use sessions pretty heavy and I am re-coding my network site right now. 1 thing I have done is made a session class that has some simple methods for example here is how I would retrieve session data using my class.
$session = new Session();
// to set a session I would use this
echo $session->set('user_id');
// to view a...
class Foo
require 'somegem'
end
class Bar < Foo
def to_s
puts Somegem.somemethod
end
end
Why is this not working/how can I get something like this to work?
...
The function works well.
If add dynamical value located to other class, and i still want to declare the list0 at Main(). How to ?
Thank you.
using System;
using System.Collections.Generic;
using System.Text;
class Program
{
public static void Main()
{
List<string> list0 = new List<string>();
list0.Add("A");...
Hello I am just learning more about using classes in PHP. I know the code below is crap but I need help.
Can someone just let me know if I am going in the right direction.
My goal is to have this class included into a user profile page, when a new profile object is created, I would like for it to retrieve all the profile data from...
class a:
def b():
...
what is the Significance of b
thanks
class a:
@staticmethod
def b():
return 1
def c(self):
b()
print a.b()
print a().b()
print a().c()#error
and
class a:
@staticmethod
def b():
return 1
def c(self):
return self.b()
print a.b()
pr...
Hi all.
I've written a working tetris clone but it has a pretty messy layout. Could I please get feedback on how to restructure my classes to make my coding better. I focuses on making my code as generic as possible, trying to make it more an engine for games only using blocks.
Each block is created seperately in the game.
My game has ...