static

How to set text in a static label to bold style?

Hello, I'm writing an application for a Pocket PC 2003 device. In it there is a dialog where various text information is shown. The information is separated so that each piece resides inside its own label, defined as LTEXT in the resource file. Now my problem is that, at the moment, all text lables have the same font and style (normal ...

IE position:relative displaying as if position: static

Hi Guys, i have the following html (excerpt from larger code-base) <div class="diary-event ui-corner-all" title="[title]"> <span id="delete"></span> <div class="diary-event-title ui-corner-all">[title]</div> <div class="diary-event-body ui-corner-all"> <p class="hyphenate">[body]</p> </div> </div> (where [titl...

How to initialize a static member in C++ ?

Is it possible to initialize a static const value outside of Constructor ? at member declerations ? class A{ private: static const int a = 4; ... ... }; ...

A Clean Syntax for Changing Static Member Initialisation Behaviour

I recently read that Java now sports initialisation blocks like the following: class C { public C() { /* Instance Construction */ } static { /* Static Initialisation */ } { /* Instance Initialisation */ } } I was particularly interested in the static block. It got me thinking about the static initialisation order problem...

Extension methods in C#: why does this work?

I'm a little confused as to why this doesn't give an error. I found this code deep inside of some outdated legacy software and was surprised to see it work. public static string CleanFileName(this string fileName) { return CleanFileName(fileName, 64); } public static string CleanFileName(this string fileName, int maxLength) { //so...

How can I get the name of a C# static class property using reflection?

I want to make a C# Dictionary in which the key is the string name of a static property in a class and the value is the value of the property. Given a static property in the class called MyResources.TOKEN_ONE, how can I get the at the name of the property rather than its value? I only care about the end part of the property name (e.g. ...

Defining static members in C++

Hi all ! I am trying to define a public static variable like this : public : static int j=0; //or any other value too I am getting a compilation error on this very line : ISO C++ forbids in-class initialization of non-const static member `j'. Why is it not allowed in C++ ? Why are const members allowed to be initiali...

How does Thread.sleep() work when called from multiple threads.

Hi, sleep() is a static method of class Thread. How does it work when called from multiple threads. and how does it figure out the current thread of execution. ? or may be a more generic Question would be How are static methods called from different threads ? Won't there be any concurrency problems ? ...

Linkage of various const/static variables

I have a few questions about the linkage from the following variables. By examples of 7.1.1/7 of C++03 and experimenting with compilers (Comeau, Clang and GCC), I came to the following linkage kinds: First static, then extern static int a; // (a) extern int a; // (b) valid, 'a' still internal It's clear to me with accordance to sect...

When compiling a static libssh2 library as i386 it always returns an x86_64 library

Hey, Been working on this for hours now so any insight would be greatly appreciated. I'm trying to compile libssh2 for the iPhone Simulator on OS X (I already have it compiled successfully for the device). I'm using the following environment variables and commands: export DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Develope...

C# abstract class static field inheritance

I feel like I skipped a C# class or two, but here's my dilemma: I have an abstract class from which I derive multiple child classes. I know for sure that for each of the child classes I will have a constructor that needs a certain static object as a model and this object will be different for each of the child classes. My first approa...

Static method from servlet

Hello, I'm writing my Servlet application and would like to use the following static method which will multiply x and y. public class Helper { private Helper() { throw new AssertError(); } public static int mutltiply(int a, int b) { int c = a*b; return c; } } I understand that Servlets are mu...

Static libraries or anything else

hello, I am trying to hide my source codes in iphone projects. however I didnt understand the static library concept. Most of the tutorials about static library points out that including the whole .xcodeproj . can anybody point out a direction to me please. thanks ...

How to find a static String in a Interface

I have the folowing interface; public static interface Attributes { public final static String InterestDeterminationDate = "InterestDeterminationDate"; public final static String CreditType = "CreditType"; public final static String NumberInternal = "NumberInternal"; public final static String InterestRat...

Accessibility of variables.

HI, i have small doubt related to the accessibility of variables. int i; //default the linkage is external const int i; //default linkage is internal extern int i; //explicitly assigning linkage as external class a { int l; //Default linkage is external void f() { int k; //default linkage is e...

Can singleton class be static?

Hi, Can singleton class be static? ...

inherited factory method should return instances of own class not inherited class

I have a class that has a complex static factory method, lets call it ClassA. I have extended ClassA into ClassB and I want ClassB's factory method to do everything that ClassA's factory method does, except return a ClassB. class ClassA{ static public function Factory($construct_args, $contents){ $new = new ClassA($construct_a...

How to write a Fortran program that supports both static and dynamic memory management?

Hello, I'm working on a public release if a model using Fortran 9x and I'd like to design the code to support both static or dynamic memory management. I've only seen one example of a code that supports something like this. It is implemented using preprocessors that look something like this: The code would include some memory manageme...

Why does the '{' throw a NullReferenceException in a static method?

This one is sort of esoteric. I ran into a NullReferenceException while trying to open a form (in the winforms designer) in a winforms project in visual studio 2008. The stack trace points to the fourth line of the following code: public static class Logger { public static void LogMethodEnter() { var frame = new StackFr...

guava-libraries - Is the Ordering class thread safe?

The guava-libraries have a class Ordering. I'm wondering if it's thread safe. For example, can it be used as a static variable? public static Ordering<String> BY_LENGTH_ORDERING = new Ordering<String>() { public int compare(String left, String right) { return Ints.compare(left.length(), right.length()); } }; ...