Search Results

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

Page 96/224 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • TreeView Controls - HTREEVIEW

    - by nXqd
    I'm new to win32 API programming and I try to understand source code of treeview from codeproject. But I really don't understand this : BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { // blah blah HTREEVIEW Selected = (HTREEITEM)SendDlgItemMessage(hWnd,ID_TREE,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected); // halb halb } It doesn't work ( Selected is used without initializing) until I declare Selected as global variable. Thanks for reading this and I need your help .

    Read the article

  • failsafe jQuery code

    - by David
    Can anyone explain what the jquery documentation is exactly referring to with this statement: "the argument to write failsafe jQuery code using the $ alias, without relying on the global alias" when referring to using the following: jQuery(function($) { }); I have been using jquery for a while now so understand what this code is doing to a certain extent but the phrase used in the documentation about writing failsafe jquery code puzzles me and i am unsure whether it is important or not.

    Read the article

  • use Data Annotation to my Linq to SQL

    - by Khalid Omar
    i have a mvc web project and i'm using linq to sql i'm using dataannotaion like this public class ClientValidation { [Required] public string name1st { get; set; } } then in the linq class i add that above client class [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.Client")] [MetadataType(typeof(ClientValidation))] public partial class Client : INotifyPropertyChanging, INotifyPropertyChanged { } every thing is going ok the question is when i re generate the linq when i add table or change any thing in database i need to rewrite [MetadataType(typeof(ClientValidation))] is there any other method to enable me regenerate the model and keep the data annotation as it

    Read the article

  • Using ruby's OptionParser to parse sub-commands

    - by rampion
    I'd like to be able to use ruby's OptionParser to parse sub-commands of the form COMMAND [GLOBAL FLAGS] [SUB-COMMAND [SUB-COMMAND FLAGS]] like: git branch -a gem list foo I know I could switch to a different option parser library (like Trollop), but I'm interested in learning how to do this from within OptionParser, since I'd like to learn the library better. Any tips?

    Read the article

  • Can I retain a Google apps session token permanently for a specific user who logs into my google app

    - by Ali
    Hi guys, is it possible to retain upon authorization a single session token for a user who signs into my gogle application. CUrrently my application seems to every now and then require the user to authenticate into google apps. I think it has to do with session dying out or so. I have the following code: function getCurrentUrl() { global $_SERVER; $php_request_uri = htmlentities(substr($_SERVER['REQUEST_URI'], 0, strcspn($_SERVER['REQUEST_URI'], "\n\r")), ENT_QUOTES); if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') { $protocol = 'https://'; } else { $protocol = 'http://'; } $host = $_SERVER['HTTP_HOST']; if ($_SERVER['SERVER_PORT'] != '' && (($protocol == 'http://' && $_SERVER['SERVER_PORT'] != '80') || ($protocol == 'https://' && $_SERVER['SERVER_PORT'] != '443'))) { $port = ':' . $_SERVER['SERVER_PORT']; } else { $port = ''; } return $protocol . $host . $port . $php_request_uri; } function getAuthSubUrl($n=false) { $next = $n?$n:getCurrentUrl(); $scope = 'http://docs.google.com/feeds/documents https://www.google.com/calendar/feeds/ https://spreadsheets.google.com/feeds/ https://www.google.com/m8/feeds/ https://mail.google.com/mail/feed/atom/'; $secure = false; $session = true; //echo Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session);; return Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session).(isset($_SESSION['domain'])?'&hd='.$_SESSION['domain']:''); } function _regenerate_token() { global $BASE_URL; if(!$_SESSION['token']) { if(isset($_GET['token'])): $_SESSION['token'] = Zend_Gdata_AuthSub::getAuthSubSessionToken($_GET['token']); return; else: _regenerate_sessions(); _redirect(getAuthSubUrl($BASE_URL . '/index.php?'.$_SERVER['QUERY_STRING'])); endif; } } _regenerate_token(); I know I'm doing it all wrong here and I don't know why :( I have a CONSUMER SECRET code but only use it whereever I need to access a google service. However something is wrong with my authentication as the user has to periodically 'grant access to my application' and reauthorise himself... help please

    Read the article

  • Codeigniter initializing multiple times per page load

    - by Clayton
    I'm using Codeigniter for my application and have something wrong with my configuration. When I load a page, the framework initializes several times (see logs below). I have built other applications with Codeigniter and have never seen this behavior before. Log output: DEBUG - 2010-03-27 14:50:32 --> Config Class Initialized DEBUG - 2010-03-27 14:50:32 --> Hooks Class Initialized DEBUG - 2010-03-27 14:50:32 --> URI Class Initialized DEBUG - 2010-03-27 14:50:32 --> Router Class Initialized DEBUG - 2010-03-27 14:50:32 --> Output Class Initialized DEBUG - 2010-03-27 14:50:32 --> Input Class Initialized DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Global POST and COOKIE data sanitized DEBUG - 2010-03-27 14:50:32 --> Language Class Initialized DEBUG - 2010-03-27 14:50:32 --> Loader Class Initialized DEBUG - 2010-03-27 14:50:32 --> Config file loaded: config/redux_auth.php DEBUG - 2010-03-27 14:50:32 --> Config file loaded: config/email.php DEBUG - 2010-03-27 14:50:32 --> Helper loaded: url_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: form_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: html_helper DEBUG - 2010-03-27 14:50:32 --> Database Driver Class Initialized DEBUG - 2010-03-27 14:50:32 --> Session Class Initialized DEBUG - 2010-03-27 14:50:32 --> Helper loaded: string_helper DEBUG - 2010-03-27 14:50:32 --> Helper loaded: file_helper DEBUG - 2010-03-27 14:50:32 --> Session routines successfully run DEBUG - 2010-03-27 14:50:32 --> Form Validation Class Initialized DEBUG - 2010-03-27 14:50:32 --> Model Class Initialized DEBUG - 2010-03-27 14:50:32 --> Controller Class Initialized DEBUG - 2010-03-27 14:50:32 --> Language file loaded: language/english/form_validation_lang.php DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Config Class Initialized DEBUG - 2010-03-27 14:50:32 --> Hooks Class Initialized DEBUG - 2010-03-27 14:50:32 --> URI Class Initialized DEBUG - 2010-03-27 14:50:32 --> Router Class Initialized DEBUG - 2010-03-27 14:50:32 --> Output Class Initialized DEBUG - 2010-03-27 14:50:32 --> Input Class Initialized DEBUG - 2010-03-27 14:50:32 --> XSS Filtering completed DEBUG - 2010-03-27 14:50:32 --> Global POST and COOKIE data sanitized DEBUG - 2010-03-27 14:50:32 --> Language Class Initialized DEBUG - 2010-03-27 14:50:32 --> Loader Class Initialized ... This repeats three more times

    Read the article

  • UIColor app crashing

    - by coure06
    i have a global variable UIColor *textColor; I am update this variable by the code textColor = [UIColor colorWithRed:fr green:fg blue:fb alpha:1.0]; then assigning this color to Label like this myLabel.textColor = textColor; It only work once, when i again call with updated values and assign label new values app crashes... textColor = [UIColor colorWithRed:fr green:fg blue:fb alpha:1.0]; myLabel.textColor = textColor;

    Read the article

  • linq2sql: singleton or using, best practices

    - by zerkms
    what is the preferred practice when linq2sql using (in asp.net mvc applications): to create "singleton" for DataContext like: partial class db { static db _db = new db(global::data.Properties.Settings.Default.nanocrmConnectionString, new AttributeMappingSource()); public static db GetInstance() { return _db; } } or to retrieve new instance when it needed within using: using (db _db = new db()) { ... } the usage of using brings some limitations on code. so I prefer to use singleton one. is it weird practice?

    Read the article

  • java.lang.VerifyError during ejb method call

    - by Bastien
    Hi, When I try to call a method from a local ejb I have this error : java.lang.VerifyError: com/pwc/lu/ejb/hcfollowup/staff/HCFStaffManagerLocal.getPersonById(Ljava/lang/Integer;)Lcom/pwc/lu/mapping/hcfollowup/hibernate/global/Person; HCFStaffManagerLocal is my local interface and getPersonById an ejb method. Person, the result type. I can get my ejb but error occurs when trying to call getPersonById method. I don't understand why it get an exception for Person class... Any ideas ?

    Read the article

  • How can I switch between 2 Connection Strings in my Web.Config (Activate one for DBML)

    - by Alex
    Hello! I have two connection strings (both in Web.Config: CS_Local and CS_Production) for my DBML (Linq to SQL). In my Global.Asax/Application_Start I run some production preparation methods if the request is non-local (!HttpContext.Current.Request.IsLocal). Within that part, I'd also like to change the current connection string used by my DBML from the standard CS_Local to CS_Production. How would I do that? Some help please..

    Read the article

  • How can I call a function at the very end of document.ready

    - by Umair
    I have multiple document.ready functions on a page and I want a function to be called when all my document.ready functions have been executed. I simply want the function to be called at the very end, after all other document.ready functions have executed. An example of this could be that each document.ready function increments a global variable when it has been executed, and the last function needs to check the value of that variable at the very end. Any ideas ?

    Read the article

  • link nasm program for mac os x

    - by Fry Constantine
    i have some problems with linking nasm program for macos: GLOBAL _start SEGMENT .text _start: mov ax, 5 mov bx, ax mov [a], ebx SEGMENT .data a DW 0 t2 DW 0 fry$ nasm -f elf test.asm fry$ ld -o test test.o -arch i386 ld: warning: in test.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: could not find entry point "start" (perhaps missing crt1. fry$ nasm -f macho test.asm fry$ ld -o test test.o -arch i386 ld: could not find entry point "start" (perhaps missing crt1.o) can anyone help me?

    Read the article

  • Override variables while testing a standalone Perl script

    - by BrianH
    There is a Perl script in our environment that I now need to maintain. It is full of bad practices, including using (and re-using) global variables throughout the script. Before I start making changes to the script, I was going to try to write some test scripts so I can have a good regression base. To do this, I was going to use a method described on this page. I was starting by writing tests for a single subroutine. I put this line somewhat near the top of the script I am testing: return 1 if ( caller() ); That way, in my test script, I can require 'script_to_test.pl'; and it won't execute the whole script. The first subroutine I was going to test makes a lot of use of global variables that are set throughout the script. My thought was to try to override these variables in my test script, something like this: require_ok('script_to_test.pl'); $var_from_other_script = 'Override Value'; ok( sub_from_other_script() ); Unfortunately (for me), the script I am testing has a massive "my" block at the top, where it declares all variables used in the script. This prevents my test script from seeing/changing the variables in the script I'm running tests against. I've played with Exporter, Test::Mock..., and some other modules, but it looks like if I want to be able to change any variables I am going to have to modify the other script in some fashion. My goal is to not change the other script, but to get some good tests running so when I do start changing the other script, I can make sure I didn't break anything. The script is about 10,000 lines (3,000 of them in the main block), so I'm afraid that if I start changing things, I will affect other parts of the code, so having a good test suite would help. Is this possible? Can a calling script modify variables in another script declared with "my"? And please don't jump in with answers like, "Just re-write the script from scratch", etc. That may be the best solution, but it doesn't answer my question, and we don't have the time/resources for a re-write.

    Read the article

  • Software Engineering Papers

    - by kunjaan
    Please recommend me software engineering/methodology/practices paper. So far I have enjoyed: 1968 Dijkstra : Go To Statement Considered Harmful Nikalus Wirth : Program Development by Stepwise Refinement 1971 David Parnas : Information Distribution Aspects of Design Methodology 1972 Liskov : Design Methodology for Reliable Software Systems Extensible Language : Schuman and P Jourrand R. Balzer Structured Programming : Dahl - Hierarchical Program StructuresImplementation Patterns 1971 Jim Morris Protection in Programming Languages 1973 Bill Wulf and Mary Shaw Global Variable Considered Harmful 1974 : Lisko and Zilles ADTs

    Read the article

  • Want to get cursor position within textInput .

    - by Anshuman Jaiswal
    I am using textInput within grid using rendrer. I am populating a suggestion box just below the text input field on the basis of typed character and index of text input.Problem is that if i shrink grid column then suggestion box is not populating at the right place so I want global position of cursor in the text input field .

    Read the article

  • Addthis: Sharing for unique items on page

    - by Espen Arnoy
    I am using addthis (addthis.com) to offer sharing on items listed on a page (stage.hverdagskupp.no). Since each item on the page is unique, I want the shared information to be unique as well. However, facebook and twitter only seems to allow global page information to be shared. Anyone knows how to define item specific sharing information with addthis, for facebook and twitter?

    Read the article

  • BuddyPress: Stop overriding default parameters passed to the template loop?

    - by 55skidoo
    How do I stop BP from overriding default parameters passed to the template loop? For example, on the Activity page, let's say you want BP to "forget" the user's last viewed parameter (like "My Forums" or "@user Mentions") and go right back to All Members or My Friends every time you reload the page. I tried deleting the contents of ajax.php and global.js, and the overriding behavior still happens. Where do I look next?

    Read the article

  • Idea: CodeIgniter codecompletion in Eclipse

    - by ToS
    I just figured out that all code completion for Eclipse is stored in plain files located here (example): .\eclipse\plugins\org.eclipse.php.core_2.1.1.v20090921-1100\Resources\language I tried adding global variables like $_POST, $_GET, $_SERVER to the end of basic.php but without any luck (did try to restart Eclipse). Is there a way to create compatible files for the needs of "smooth integration" of (ie.)CodeIgniter framework by adding or changing files located here and how would it be done?

    Read the article

  • Exclude routing parameters in VaryByParam for Asp.Net 4

    - by HasanGursoy
    I have a routing setting in my global.asax file: routes.MapPageRoute("video-browse", "video/{id}/{title}/", "~/routeVideo.aspx"); My routeVideo.aspx page has caching setting: <%@ OutputCache Duration="10" Location="ServerAndClient" VaryByParam="id" %> But when I request http://localhost/video/6/example1 and http://localhost/video/6/example2 after this, the page is created again. So I think VaryByParam works for * but I only want compile when id changes. Is there a way to define routing parameters at VaryByParam?

    Read the article

  • convert special characters but not tags

    - by Tom
    I've got some text which needs converting to use HTML entities, but it also contains tags. Here's a sample: <p>Ofcom issued the warning to Global-owned GWR in Bristol – which is required to operate as a "contemporary and chart music and information station" – for operating outside the music </p> The (" and -) need to be converted but the paragraph tags must remain HTML. Using something like htmlentities converts everything, how can I convert everything but the tags?

    Read the article

  • Host WCF IIS could not find assembly .dll

    - by ozsenegal
    Im trying to host a WCF service on IIS.I created a virtual directory,set application pool to v.4.0 framework,set the pysichal path to the application path. And when try to run the service i get follow error: "Could not load file or assembly 'ingdnp.dll' or one of its dependencies." Does anyone what is that DLL?I couldnt find anything on google. UPDATE: I need to register DLL in GAC (Global Assembly Cache). THK All

    Read the article

  • ARM cortex: mutex using bit banding

    - by Jeff V
    Given that, on the ARM Cortex M3, I can: atomically read a single bit atomically set a single bit atomically clear a single bit How can I combine these for a mutex style set of operations: try lock take lock release lock It seems that try_lock or take_lock would require two operations that would not be atomic. Do I need more control to accomplish this? Disable global interrupts would do it but it seems there should be a more surgical approach.

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >