Search Results

Search found 5586 results on 224 pages for 'global illumination'.

Page 104/224 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • What is the best way to create a Singleton Webservice in PHP?

    - by ChronoFish
    Hello, We have a need to access a DB that only allows one connection at a time. This screams "singleton" to me. The catch of course is that the singleton connection will be exposed (either directly or indirectly) via a web-service (most probable a SOAP based web-service - located on a separate server from the calling app(s) ) - which means that there may be more than one app / instance attempting to connect to the singleton class. In PHP, what is the best way to create a global singleton or a web-service singleton? TIA

    Read the article

  • How to pass parameters dynamically in PHP?

    - by user198729
    I need to pass the $route to its inner function,but failed: function compilePath( $route ) { preg_replace( '$:([a-z]+)$i', 'pathOption' , $route['path'] ); function pathOption($matches) { global $route;//fail to get the $route } } I'm using php5.3,is there some feature that can help?

    Read the article

  • C++ header files and variable scope

    - by MrDatabase
    I want to organize my c++ variables and functions in the following way: function prototypes in a header file "stuff.h", function implementation in "stuff.cpp", then say #include "stuff.h" in main.cpp (so I can call functions implemented in stuff.cpp). So far so good. Now I want to declare some variables in stuff.cpp that have global scope (so I can modify the variables in functions implemented in stuff.cpp and main.cpp). This doesn't seem to work. How can I do this?

    Read the article

  • How to disable caching in Rails by IP address?

    - by huacnlee
    I was used caches_page/caches_action for some page, it set expire in a time(1 hour or 1 day), I don't expire cache when the data updated. When the editors create or update the content them can't view the new result in the page. I want to disable the global caching when the visitor IP in my company. How to do it?

    Read the article

  • Is it safe to make GL calls with multiple threads?

    - by user146780
    I was wondering if it was safe to make GL calls with multiple threads. Basically I'm using a GLUtesselator and was wondering if I could divide the objects to draw into 4 and assign a thread to each one. I'm just wondering if this would cause trouble since the tesselator uses callback functions. Can 2 threads run the same callback at the same time as long as that callback does not access ant global variables? Are there also other ways I could optimize OpenGL drawing using multithreading? Thanks

    Read the article

  • Shared/Static Variable Should Be Nothing but Isn't - what gives?

    - by Denis
    I have the following code: Public Class TestClass Public Sub Test() If theGlobal IsNot Nothing Then Throw New Exception("What gives!") End Sub Private Shared theGlobal As Object = Nothing Private Shared ReadOnly Property Global Get If theGlobal Is Nothing Then theGlobal = New Object() End If Return theGlobal End Get End Property End Class Am stumped... Why is theGlobal object NOT Nothing?

    Read the article

  • Zend Framework in a subfolder, but images taken from site root

    - by Pentium10
    I have a dev project setup in a subfolder on my testing machine and it must stay there. However all the Zend frameworks views are linked to server root. CSS are linked like: <link type="text/css" href="<?php echo $this->baseUrl('/css/frontend.css') ?>" rel="Stylesheet" /> Which must be stayed this way, but it should link to localhost/a/b/c/prj1/css/frontend.css How can I setup a global subdirectory for this?

    Read the article

  • How to treat 64-bit words on a CUDA device?

    - by pikkio
    Hi, I'd like to handle directly 64-bit words on the CUDA platform (eg. uint64_t vars). I understand, however, that addressing space, registers and the SP architecture are all 32-bit based. I actually found this to work correctly (on my CUDA cc1.1 card): __global__ void test64Kernel( uint64_t *word ) { (*word) <<= 56; } but I don't know, for example, how this affects registers usage and the operations per clock cycle count.

    Read the article

  • Asp.net mvc route map problem

    - by coure06
    I have created a new control VidController public class VidController : Controller { public ActionResult GetVids() { return View(); } } Right clicked inside the method and created View with default name GetVids. Now when i try to open ~/VidController/GetVids there is no page opening... What i have to set in Global file?

    Read the article

  • where to get this Java.exe file for ORacle installation

    - by vas
    Hi just installed oracle 11g and tried to start the "Oracle SQL developer" so as to start writing queries. Its asking me Enter the full pathname for the java.exe file . Where do i find this. I did a global search for java.exe and am sure did not got some oracle related pdf files. Also my Oracle is installed out of users/vas

    Read the article

  • Install Dll in the GAC for .Net

    - by tkg
    Hi all, I am a beginner in .Net development. I need to ask about .Net winform deployment. If i have 1 exe file, some class libraries, and 3rd party components (DevExpress). Should i install these Dlls (class library and 3rd party component) in the GAC (Global Assembly Cache) in client computers ? Thank you for the explanations.

    Read the article

  • Does OpenCL allow concurrent writes to same memory address?

    - by Wonko
    Is two (or more) different threads allowed to write to the same memory location in global space in OpenCL? The write is always changing a uchar from 0 to 1 so the outcome should be predictable, but I'm getting erratic results in my program, so I'm wondering if the reason can be that some of the writes fail. Could it help to declare the buffer write-only and copy it to a read-only buffer afterwards?

    Read the article

  • Does Application_Start block all incoming requests

    - by Jeeji
    Hi I have some code that initializes a static singleton class, which is needed by all requests. Therefore I thought I could add it to global.asax Application_Start. Can I be 100% sure that all requests will block while Application_Start is loading to guarantee that all the requests will have access to it? Thanks a lot Jeeji

    Read the article

  • SQLite user_version() expression

    - by ralf.w.
    how can I get user_version into an expression (for SELECT or WHERE) ? I would also appreciate any clue to how to save ANY global variable in SQLite. Does anyone know of such an extension (dll) ? BTW: I know that PRAGMA user_version; gives me the right answer, but I cannot use that inside a WHERE-clause !

    Read the article

  • TSQL Writing into a Temporary Table from Dynamic SQL

    - by Jeff
    Consider the following code: SET @SQL1 = 'SELECT * INTO #temp WHERE ...' exec(@SQL1) SELECT * from #temp (this line throws an error that #temp doesn't exist) Apparently this is because the exec command spins off a separate session and #temp is local to that session. I can use a global temporary table ##temp, but then I have to come up with a naming scheme to avoid collisions. What do you all recommend?

    Read the article

  • Include a tpl file with variables (Smarty)

    - by user1640660
    I have a "links.tpl" file which contains lines with many variables such as below {assign var=link_main value="index.php"} {assign var=link_login value="?a=login"} but when i include this file in home.tpl using {include file="file.tpl"} the variables {$link_main}, {$link_login} are not included i put the {assign var=link_main value="index.php"} in home.tpl and it works but not from included file i have tried adding scope=global to variable and parent to include but nothing happened I tried the last few hours finding a solution, any help is appreciated

    Read the article

  • Session_End Alternatives

    - by grimus
    I have seen in some other questions that using Session_ End() in Global.asax.cs is not advised. This is because if you're not using the default Session handler, Session_End won't get called, correct? Is there any other cases where it won't get called? The big question is: If you can't depend on Session_End(), what do you do to determine when a session has closed?

    Read the article

  • How to return a const QString reference in case of failure?

    - by moala
    Hi, consider the following code: const QString& MyClass::getID(int index) const { if (i < myArraySize && myArray[i]) { return myArray[i]->id; // id is a QString } else { return my_global_empty_qstring; // is a global empty QString } } How can I avoid to have an empty QString without changing the return type of the method? (It seems that returning an empty QString allocated on the stack is a bad idea) Thanks.

    Read the article

  • programicly tigger a Copy or paste in c#

    - by Crash893
    I have a program that I'm working on that register global hotkeys I would like to use that ability to trigger highlighted text or data to be copied to the clipboard and then read from the clipboard into a variable in my program which i will later use in reverse to paste it back out. (example ctrl+1 copys to quque #1 and alt+1 pasts what is in quque 1) thanks so much.

    Read the article

  • Session vs singleton pattern

    - by chobo
    Hi, I have a web application where I would like to pull user settings from a database and store them for Global access. Would it make more sense to store the data in a Singleton, or a Session object? What's the difference between the two? Is it better to store the data as an object reference or break it up into value type objects (ints and strings)? Thanks!

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >