Search Results

Search found 15438 results on 618 pages for 'static allocation'.

Page 51/618 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Corrupted image if variable is not static

    - by Jaka Jancar
    I'm doing the following: static GLfloat vertices[3][3] = { {0.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0} }; glColor4ub(255, 0, 0, 255); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, vertices); glDrawArrays(GL_TRIANGLES, 0, 9); glDisableClientState(GL_VERTEX_ARRAY); This works ok: However, if I remove static from vertices and therefore re-create the data on the stack on each rendering, I get the following: This happens both on the simulator and on the device. Should I be keeping the variables around after I call glDrawArrays?

    Read the article

  • Large tables of static data with DBGhost

    - by Paulo Manuel Santos
    We are thinking of restructuring our database development and deployment processes by using DBGhost, we want to move away from the central development database and bring the database to the source control. One of the problems we have is a big table with static data (containing translated language strings), it has close to 200K rows. I know that our best solution is to move these stings into resource files, but until we implement that, will DbGhost be able to maintain all this static data and generate our development and deployment databases in a short time? And if not is there a good alternative to filling up this table whenever we need to?

    Read the article

  • Finding an HTTP proxy that will intercept static resource requests

    - by pkh
    Background I develop a web application that lives on an embedded device. In order to make dev times sane, frontend development is done using apache serving static documents, with PHP proxying out to the embedded device for specifically configured dynamic resources. This requires that we keep various server-simulation scripts hanging around in source control, and it requires updating those scripts whenever we add a new dynamic resource. Problem I'd like to invert the logic: if the requested document is available in the static documents directory, serve it; otherwise, proxy the request to the embedded device. Optimally, I want a software package that will do this for me (for Windows or buildable on cygwin). I can deal with forcing apache to do it with PHP, but I'm unsure how to configure it to make it happen. I've looked at squid and privoxy, but neither of them seem to do what I want. Any ideas? I'd rather not have to roll my own.

    Read the article

  • iPhone: Setup static content of UITableView

    - by Martin
    This guide from apple https://developer.apple.com/iphone/prerelease/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html (you need login) explains how to use "The Technique for Static Row Content" to use Interface Builder to setup the cells in a tableview. I have some cells with different heights in my tableview. Without using the heightForRowAtIndexPath method everything get messed up. Do I still need to use this method or can I in some way setup the height of the cells inside the IB as I created them there? Also when using the "The Technique for Static Row Content" from the guide you still need to use the cellForRowAtIndexPath to setup the cells even if they are created in IB. I would like to setup the full layout of the tableview with all cells in IB (drag the cells right into the tableview), is that possible in some way? Thanks!

    Read the article

  • Having problem reaching client which don't have static ip address

    - by user317311
    i am making a messenger over internet. it has a server which listens to clients but when it try to send the reply to any request to client it shows the error of client not found. however my clients are connecting to that server because it has a static ip address and live server. having problem reaching client because they can be behind any firewall or network and dont have static ip addresses. so how can i reach to my client?? any Suggestions..

    Read the article

  • PHP Array To Class Static Public Values.

    - by what
    I want to make a class that has all the values of an array as a static object in that class. For example: $vars=array(... );//some array with actual values $Class_code='class MyClass{'; for($i=0; $i<count($vars); $i++){ $Class_code.='static public $'.strval($vars[i]).';'; } eval($Class_code.'}'); /* When I echo the line above it says that the vars for MyClass (MyClass::vars) are missing even with strval(). */ So, how can I get $vars[i] to be a string if strval didn't work?

    Read the article

  • Javascript/Iframe in Static FBML

    - by Loveleen Kaur
    Is there any way the following script be embedded in Static FBML <script src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: 4, interval: 6000, width: 250, height: 300, theme: { shell: { background: '#333333', color: '#ffffff' }, tweets: { background: '#000000', color: '#ffffff', links: '#4aed05' } }, features: { scrollbar: false, loop: false, live: false, hashtags: true, timestamp: true, avatars: false, behavior: 'all' } }).render().setUser('twitter').start(); </script> I have tried following code in the Static FBML but it doesnt seem to work <fb:iframe scrolling='no' frameborder='0' marginheight='0' src='http://www.demo.kaazunut.com/twitter-box.html' height='500' width='500'></fb:iframe>

    Read the article

  • Shared static classes between AppDomains in loaded library code

    - by Christian Stewart
    I'm working on a program in which I want to do something similar to what the Photon Server system does: Offer a common "API" class library, which contains common data classes, enumerations, and interfaces for working with the host program. Have client programs (class libraries) reference this DLL and implement interfaces listed within it. Have the "host" application load built DLL client libraries into separate AppDomains and reference the interfaces that lie within to have polymorphic client code from within a dll file. I have something like this worked out: a class library that contains common code, but I've run into the following question How should I handle static classes? Should I add a method that is called by the host program to synchronize data? How do I keep a static class the same between AppDomains? Should I discard these classes in favor of better interfaces between the code levels? And in general, how do I share data between these loaded AppDomains?

    Read the article

  • Calling gwt static method from parent of iframe

    - by Richard Wallis
    I'd like to know how to call a GWT static method from the parent of the iframe in which the gwt module is loaded. As a simple example suppose I have the following gwt class: public class Simple { public static void showWindow() { Window.alert("Hello from the iframe"); } } I create an html host page called "iFrameHost.html" that can run the function above. Then in an unrelated GWT module on a different page I call: Frame iFrame = new Frame("iFrameHost.html"); RootPanel.get().add(iFrame); How do I now call the showWindow() method from the parent page?

    Read the article

  • Can't use static const as param in function call within binding tags in Flex 3

    - by buzzer
    I'm having a problem in flex 3 where if a static const I have defined is used as the parameter to a function call within binding tags I get a "1120: Access of undefined property NodePropertyMatrix". _propMtx is a ArrayCollection. <mx:HBox visible="{_propMtx.getItemAt(NodePropertyMatrix.srcParent)}"> Above code throws the error, but the following code does not <mx:HBox visible="{NodePropertyMatrix.srcParent}"> NodePropertyMatrix is an AS class as follows: package model.constants { import mx.collections.ArrayCollection; public class NodePropertyMatrix { public static const srcParent:Number = 0; } } Anyone know what is wrong here?

    Read the article

  • What is the proper way to localize a static website

    - by Pavel
    Hey! I need to localize our site to a number of languages. The site consists of several static pages, no dynamic backend. We have a nice international community and the people are ready to help us. The problem is how to arrange website translation, what is the right workflow? What are the best practices for static website localization? Is it possible to arrange translation in a wiki way, where several translators could translate site pages online?

    Read the article

  • Can you make an Extension Method Static/Shared?

    - by Matt Thrower
    OK, I've probably misunderstood something here but, as far as I can see ... An extension method has to be contained in a module, not a class You can't make methods in modules Static/Shared Therefore you can't use an extension method on a class without instantiating it. In other words you can't make an extension method on String called "MyExtensionMethod" and use: String.MyExtensionMethod("String") But instead .. Dim test As String test.MyExtensionMethod("string") Is this correct? Or is there a way I can get extension methods to work as static methods?

    Read the article

  • Best way to delay access to static web pages until services become available with J2EE

    - by Dean Povey
    I have a J2EE application front-ended by a bunch of GWT pages. When the server is starting up, it is possible that these static pages can be accessed before the services required to implement the GWT RPC calls (database etc) are available. I wondering what the best approach is to prevent a user accessing this static content before these services become available. For the purpose of this exercise, assume that there is an isInitialized() method somewhere. I am happy with either a page displaying an error message or simply refusing the connection.

    Read the article

  • public (static) swap() method vs. redundant (non-static) private ones...

    - by Helper Method
    I'm revisiting data structures and algorithms to refresh my knowledge and from time to time I stumble across this problem: Often, several data structures do need to swap some elements on the underlying array. So I implement the swap() method in ADT1, ADT2 as a private non-static method. The good thing is, being a private method I don't need to check on the parameters, the bad thing is redundancy. But if I put the swap() method in a helper class as a public static method, I need to check the indices every time for validity, making the swap call very unefficient when many swaps are done. So what should I do? Neglect the performance degragation, or write small but redundant code?

    Read the article

  • Static assembly initialization

    - by ph0enix
    I'm attempting to develop an Interceptor framework (in C#) where I can simply implement some interfaces, and through the use of some static initialization, register all my Interceptors with a common Dispatcher to be invoked at a later time. The problem lies in the fact that my Interceptor implementations are never actually referenced by my application so the static constructors never get called, and as a result, the Interceptors are never registered. If possible, I would like to keep all references to my Interceptor libraries out of my application, as this is my way of (hopefully) enforcing loose coupling across different modules. Hopefully this makes some sense. Let me know if there's anything I can clarify... Does anyone have any ideas, or perhaps a better way to go about implementing my Interceptor pattern? TIA, Jeremy

    Read the article

  • C++ Static Array Initialization - Memory Issue

    - by donalmg
    Hi, I have a header file which contains a member variable declaration of a static char array: class ABC { public: static char newArray[4]; // other variables / functions private: void setArray(int i, char * ptr); } In the CPP file, I have the array initialized to NULL: char ABC::newArray[4] = {0}; In the ABC constructor, I need to overwrite this value with a value constructed at runtime, such as the encoding of an integer: ABC::ABC() { int i; //some int value defined at runtime memset(newArray, 0, 4); // not sure if this is necessary setArray(i,newArray); } ... void setArray(int i, char * value) { // encoding i to set value[0] ... value [3] } When I return from this function, and print the modified newArray value, it prints out many more characters than the 4 specified in the array declaration. Any ideas why this is the case. I just want to set the char array to 4 characters and nothing further. Thanks...

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >