static

keeping screen static when click link

Hi I was wondering if anyone know how to keep the screen in a static position with jquery when a link which has a "#" href is clicked? Regards, Phil ...

In PHP, are there any advantages to using forward_static_call_array() instead of call_user_func_array() when dynamically calling a static method?

Specifically, is one more efficient than the other? ...

PHP isset($this) and using the same object method in a static and object context

I'm working on a class which needs to be accessible via static function calls as well as object methods. One thing I have found is that I'm duplicating logic across multiple functions. Simplified example: class Configurable{ protected $configurations = array(); protected static $static_configurations = array(); public fu...

Help Deadlock analysis

The Deadlock occurs in my application when initialization of local static variable happens in the function called from DLLMain Entry point with param DLL_THREAD_DETACH. Below is Windbg analysis This is usually caused by another thread holding the loader lock. Following are the Locks Held. CritSec ntdll!LdrpLoaderLock+0 at 7c97e178 ...

Is there any way for a static method to access all of the non-static instances of a class?

This is probably a dumb question but I'm going to ask it anyways... I am programing in C#.NET. I have a class that contains a non-static, instance EventHandler. Is it possible to trigger that EventHandler for every instance of the class that exists from a static method?? I know this is a long shot! ...

Why Static variable initialization internally tries to acquire _lock(_EXIT_LOCK1)

Why Static variable initialization internally tries to acquire _lock(_EXIT_LOCK1)? Here is the calls stack when the initialization of a local static variable happens. *MSVCR80!_lock+0x2e MyDLL32.dll!_onexit(int (void)* func=0x0864ae10) Line 103 C MyDLL32.dll!atexit(void (void)* func=0x0864ae10) Line 127 + 0x9 bytes C* Can you p...

Is it possible to create a static dictionary in a C++/CLI environment?

I used in my C++/CLI project static array's like: static array < array< String^>^>^ myarray= { {"StringA"}, {"StringB"} }; Is it possible to create a dictionary the same way? I was not able to create and initialize one. static Dictionary< String^, String^>^ myDic= { {"StringA", "1"}, {"StringB", "2"} }; Thx ...

haskell vs python typing

I am looking for example where things in python would be easier to program just because it is dynamically typed? I want to compare it with Haskell type system because its static typing doesn't get in the way like c# or java. Can I program in Haskell as I can in python without static typing being a hindrance? PS: I am a python user an...

Compiling Libs for iPhone projects

I'm new to XCode. My iPhone project is dependent on FreeType. I got the source, but it needs to be statically compiled and included with my project. I tried adding a target and adding the include and src directories but this resulted in 3200 compiler errors, most of which complaining about no build rules. I'm just not sure how to do this...

STL Structures in Static Memory 'Losing' Data Across Threads

Hey all - I'm writing a multi-threaded demo program using pthreads, where one thread loads data into an STL queue, and another thread reads from it. Sounds trivial, right? Unfortunately, data pushed into the queue is vanishing. I'm not new to multithreading, nor am I unfamiliar with memory structures - however, this has me stumped. ...

PHP accelerators and static fields.

Hi all! I would like to know about static (class) field representation within PHP interpreter. For example, when you load a class in Java, static fields will be associated with that Class object; that means two applications running same JVM (and same classloader) will have some kind of shared global variable ;) I'm just wondering, if ...

how to call a static method in a custom magento class

I have a custom model in a custom Magento model with a static function: class ABC_Module_Model_ClassName { static public function send ( $something) { // do something static } } Now I call the function like this: ABC_Module_Model_ClassName::send($something); // works and is nothing wrong with it More for consis...

StaticResource vs DynamicResource behaviour on Combobox.ItemsSource

I've noticed a behavior difference between static and dynamic resource on ComboBox.ItemsSource, when the ComboBox gets out the visual tree. in the static exemple the selected destination remains in the dynamic exemple, the underlying object gets a null value Binding seems OK, because when the comboboxes gets in focus, and have their ...

wpf static binding question

Ok guys, I have a serious problem with this. I have a static class with static properties providing some colors as a hex string: namespace com.myCom.Views { public static class MyColorTable { private const string _Hex0 = "#FFFFFFFF"; private const string _Hex1 = "#FFE5E5E5"; public static String Hex0 { get { r...

C++ static const and initialization (is there a fiasco)

Hi all, I am returning to C++ after a long absence and I am stumbling a little over my understanding of the fairly well known static initialization problem. Let's say I have a simple class Vector2 as given below (note that I am aware that x and y should be private with getters and setters, these have just been omitted for brevity): cl...

asp.net declaring global variable/class in application scope 3 ways. Which one is best?

I am looking for differences between those 3 ways of using static class in asp.net application scope. Will all of these point to the same class? Which one is preferable >object< defined declaratively inside global.asax or static class ? examples: <object runat="server" scope="application" class="classname" ID="objID"></object> VS pu...

using map.root on rails to map to a static path

I'm using static URLs in my RoR project. There is really no controller or action to map to so I tried putting in map.root "/static_page" or map.root "static_page" but I get errors. How do I just map to a path? Edit: I am using a controller to serve up static pages, these aren't html pages, but a static controller I'm using here: http://...

Creating an LUT in C# at compile time or run time

I feel like this is a stupid question, but I can't think of a good way to do it. What I want to do is create a sine wave LUT at compile time or run time. Ideally compile time, but run time is fine if it is much easier to code. However, I want this static object to be accessible by everything that includes its library (I don't want to ...

Storing connection in a static class (ASP.NET)

Since I'm using Postgresql and can't use LINQ to SQL, I wrote my own wrapper classes. This is a part of the Student class: public class Student : User { private static NpgsqlConnection connection = null; private const string TABLE_NAME = "students"; public int Id { get; set; } public string FirstName { get; set; } ...

PHP static $link from db function to db object for transactional queries

I have multiple functions, each running their own SQL query that needs to be inside a transaction... I'm using a static $link to save having to pass around links between functions... for example: function db() { $user = "username"; $pass = "password"; $db = "database"; $server = "localhost"; static $link; if(is_null($link)){ $l...