Static is a term used in some programming languages to define a function or data storage area (field) that is not bound to any specific object instance.

learn more… | top users | synonyms

0
votes
2answers
22 views

C++ Static vector loses data after exiting function

I have a static function: void TextManager::printDialogue(vector<Button*>* options, int optionsCount, vector<string> outputDisplayText) { active = true; buttons = *options; ...
4
votes
1answer
36 views

Replacing static function in kernel module

Folks, I'm trying to hack a kernel module by modifying its symbol. The basic idea is to replace the original function with new function by overwriting its address in the symtab. However, I found when ...
1
vote
1answer
41 views

How is this struct referenced? And what are the colons (:) at the bottom?

static struct { uint16_t foo; uint16_t bar; uint16_t foo1; uint16_t bar1; } foo_bar = { foo : 1500, bar : 1500, foo1 : 1500, bar1 : 1500 }; What i am wondering is ...
171
votes
10answers
100k views

When to Use Static Classes in C#

Here's what MSDN has to say under When to Use Static Classes: static class CompanyInfo { public static string GetCompanyName() { return "CompanyName"; } public static string ...
2
votes
2answers
42 views

Access Static properties using PHP object

This is with reference to Get a static property of an instance, I am a newbie and have the following code : class Foo { public static $my_static = 1; } class Bar extends Foo { } $foo = new ...
0
votes
6answers
55 views

function non static in class calling [duplicate]

hello i whave an function which it take the number after the (.) and after "Vl" in string so i want call this function on the code but they tell me this error non-static method Ajuster(String) cannot ...
-1
votes
3answers
62 views

Singleton instance instantiation

I am starting to get used to the keywords static and volatile in Java. In regards to a singleton class I am building, why do I see the following design? public class Singleton{ private static ...
14
votes
4answers
465 views

Why does this C++ static singleton never stop?

i have implemented a singleton (static version) in C++. I know all the controversy about this pattern and potential thread-safety issues, but i am curious why this exact implementation won't halt. The ...
0
votes
0answers
11 views

How to convert Dynamic URL to Static URL - So that the PHP Sends an URL to browser and .htaccess converts it and sends its back to the PHP

I am new to .htaccess, I tried googling every questions I had on .htaccess to understand. I found few tutorials, but I am couldnot understand anything. First Question: What is the difference between ...
0
votes
1answer
40 views

static const to an object in a shared library in C++. Is it share between processes?

I've been writing a shared library in C++, but I want to share some instance of a class through users of the library. I mean, a read-only object loaded just one time from the library and used by every ...
1
vote
1answer
12 views

pass by reference an object in a static function C++?

Can static functions have pointers as parameters? For example this code: static void myFunctionName(Object &object1) Thank you.
1
vote
2answers
74 views

Why static final variables are accepted in inner classees?

I know that it's possible to do the following: public class Indeed{ private class inner { static final int try1 = 10; } } Why? what's the point of allowing such a declaration? ...
0
votes
1answer
28 views

How to serve static file using Restify

I am working with a node application, where I need to serve static files(js,css). My project structure is like below: -Projectroot -restifyServer -server.js -frontEnd ...
0
votes
1answer
78 views

Will static keyword helps here

class A{ int _a; public: /--/ void setfunc(int a) ............. will static works here { _a=a; } int getValue(){return _a}; }; class B{ public: ...
0
votes
2answers
46 views

Is static memory out of the Java heap? [duplicate]

Where are static variables stored? Is there any separate memory for the static variables? I know that they are not a part of the object, are they also not part of the Java heap and store d somewhere? ...

1 2 3 4 5 365
15 30 50 per page