Search Results

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

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

  • Best Practices with MVC Route

    - by codemnky
    if this is asked before just point me in the right direction I am a OO and MVC newbie. I am following along the MVC Storefront(a little outdated now) where they are talking about routes and adding them to global.asax.cs My question is this. wouldn't it be better if only 1 route is defined and after that everything is done programatically? I dont want the user to navigate using the address bar thank you

    Read the article

  • Changing settings in multiple VS project

    - by Danra
    Hey, Is there any way to change settings for multiple projects in a Visual Studio 2008 C++ solution? For example, adding a library dependancy for all the projects, or ignoring a specific warning. I am aware being able to change some global settings in the IDE itself, but I'm looking for settings which will be stored in the solution/project files. Thanks, Dan

    Read the article

  • HOw to use local instance of TPrinter

    - by gorann
    Hi, I need to do some printing using TPrinter. The problem is I can not, for varoius reasons, use Global object Printer. I want to be able to create my instance of TPrinter and print using that one. I tried with: MyPrinter := TPrinter.Create; MyPrinter.BeginDoc; but this generates AV. Any idea what does it take to print something using my instance of TPrinter? Regards Goran Nagy

    Read the article

  • pthread and child process data sharing in C

    - by mustafabattal
    hi everyone, my question is somewhat conceptual, how is parent process' data shared with child process created by a "fork()" call or with a thread created by "pthread_create()" for example, are global variables directly passed into child process and if so, does modification on that variable made by child process effect value of it in parent process? i appreciate partial and complete answers in advance, if i'm missing any existing resource, i'm sorry, i've done some search on google but couldn't find good results thanks again for your time and answers

    Read the article

  • PHP Mcrypt - Encrypting / Decrypting file

    - by whitman6732
    Trying to write a couple of functions that will encrypt or decrypt a file and am using the class found here to try and accomplish this: http://www.itnewb.com/v/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt The encryption function below seems to work, in that it appears to encrypt the file and place it in the intended directory. I'm trying to decrypt the file now, and it just dies with the message "Failed to complete decryption" (which is coded in there...) There's nothing in the php error logs, so I'm not sure why it's failing, but as mcrypt is entirely new to me, I'm more than inclined to believe I'm doing something wrong here... Here are the functions: //ENCRYPT FILE function encryptFile() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/ftpd')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/encrypted/'.$file.'.txt'; $msg = file_get_contents(PATH.'/ftpd/'.$file); $encrypted = $cryptastic->encrypt($msg, $key) or die("Failed to complete encryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $encrypted); fclose($nfile); unlink(PATH.'/ftpd/'.$file); } } closedir($handle); } //DECRYPT FILE function inFTP() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/encrypted')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/decrypted/'.$file; $msg = PATH.'/encrypted/'.$file; $decrypted = $cryptastic->decrypt($msg, $key) or die("Failed to complete decryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $decrypted); fclose($nfile); //unlink(PATH.'/encrypted/'.$file); } } closedir($handle); } //$crypt->decrypt($file); }

    Read the article

  • Hook into Application_Start in a HttpModule

    - by Jakob Gade
    I’m implementing a simple HttpModule, where I want some code to run when the web application is started. But I’m surprised to find that the Application_Start event I would normally use from Global.asax is not available from a HttpModule. Is that correct, or am I missing something here? How do I hook into the Application_Start event from an HttpModule?

    Read the article

  • Recommendations for SMS gateways with API-support

    - by knorv
    I'm building a web application that needs to send notifications by SMS. What SMS gateway service providers with API support fulfill the following requirements: Reliable Global delivery - I will send globally with no specific region being sent to more than others Ideally cheap What are your recommendations? Why?

    Read the article

  • Where to keep a querystring parameter in session ?

    - by hoang
    Users will get to my site using a specific parameter, e.g. : http://www.mysite.com/whatever/?keepTrackOfThisValue=foo or http://www.mysite.com/who/cares/?keepTrackOfThisValue=bar I would like to store the value of this peculiar parameter in Session everytime I found it in the QueryString. I'm currently using the Session_Start event in Global.asax in order to store this but I would like to override the value each time the parameter value change, which is not possible my way. Where would you do this ?

    Read the article

  • NSMutableArray & Multiple Views

    - by Antonio
    I am trying to write an application that has a NSMutableArray that needs to be accessed and modified in a different View. The MainViewController displays a table that gets the information from an NSMutableArray. The SecondaryViewController is used to addObjects into the array. How do I go about this without declaring it as a global variable?

    Read the article

  • Extending the IndexController with a BaseController in Zend

    - by BillA
    I'm trying to extend my controllers with a global base controller as such: class BaseController extends Zend_Controller_Action { // common controller actions public function listAction() { // do stuff } } class IndexController extends BaseController { // index controller specific actions } class LoginController extends BaseController { // login controller specific actions } But I get this error: PHP Fatal error: Class 'BaseController' not found in /var/www/Zend/project/application/controllers/IndexController.php on line 3 Any ideas on how to get Zend to "see" this controller?

    Read the article

  • Using of ApplicationSettings in markup code

    - by Dirk
    I want to use ApplicationSettings in the markup code of an ASP.NET Web Application. Inspired by code behind this was my first try: <%= My.Settings.MyApplicationSetting %> No success. I ended up with this lengthy statement <%= Global.MyRootNameSpace.My.MySettings.Default.MyApplicationSetting %> I can’t believe that this is the best solution. Isn’t it?

    Read the article

  • How can I get 'git status' to always use short format?

    - by Adam Lindberg
    I'd like git status to always use the short format: $ git status --short M src/meck.erl M test/meck_tests.erl ?? erl_crash.dump ?? meck_test_module.coverdata There does not seem to exist a configuration option for this, and git config --global alias.status "status --short" does not work. I haven't managed to create and alias in zsh either. How can I make git status to use the short format by default.

    Read the article

  • How do I tell ReSharper that an attribute means that a method is used?

    - by Roger Lipscombe
    I'm playing with SpecFlow, and ReSharper thinks that my step definitions are unused (I guess because they're used via reflection): [Binding] public class StepDefinitions { // ... [When(@"I press add")] public void WhenIPressAdd() // R# thinks this is unused { _calculator.PressAdd(); } // ... } How can I tell ReSharper that methods with [Given], [When], [Then] attributes (etc.) are actually used? I don't want to use // ReSharper disable UnusedMember.Global comments.

    Read the article

  • SharePoint and Log4Net

    - by Nico
    I'm looking for best practices to integrate log4net to SharePoint for web request, feature activation and all timer stuff. I have several subprojects in my farm, and I would like to have only one Log4Net.config file. [Edit] Not only I need to configure log4net for the web application, which is easy to do (I use global.asax, and a log4net.config file, so I can modify log settings withtout reloading the webapp), but I also need to log asynchronous events: Event Handler (like ItemAdded) Timer Jobs ...

    Read the article

  • OCCI createEnvironment Blocks My Thread

    - by sahs
    Hello, I'm writing a multi-threaded application, where there is a main thread which distributes tasks to the worker threads. According to the task, a worker thread creates a connection, by using a global occi environment. When a worker thread completes its task, it closes the connection (I'm sure, there is no exception thrown while termination). My problem is that after a while(sometimes 5 mins, sometimes 5 hours) the threads cannot get connection from the environment, and they get blocked there. What can be the problem?

    Read the article

  • How do I call a basic YUI3 function from within a normal JavaScript function?

    - by Justin Tanner
    I'd like to call a simple YUI3 function from within a JavaScript function. Here is some code that does what I want in a very verbose way: function changeContent (message) { YUI().use("node", function(Y) { Y.all('#content-div').setContent(message); }); } Is there a better way to do this? NOTE: I don't want to attach this function to any event, I just want a global changeContent() function available.

    Read the article

  • Handling exceptions raised in observers

    - by sparky
    I have a Rails (2.3.5) application where there are many groups, and each Group has_many People. I have a Group edit form where users can create new people. When a new person is created, they are sent an email (the email address is user entered on the form). This is accomplished with an observer on the Person model. The problem comes when ActionMailer throws an exception - for example if the domain does not exist. Clearly that cannot be weeded out with a validation. There would seem to be 2 ways to deal with this: A begin...rescue...end block in the observer around the mailer. The problem with this is that the only way to pass any feedback to the user would be to set a global variable - as the observer is out of the MVC flow, I can't even set a flash[:error] there. A rescue_from in the Groups controller. This works fine, but has 2 problems. Firstly, there is no way to know which person threw the exception (all I can get is the 503 exception, no way to know which person caused the problem). This would be useful information to be able to pass back to the user - at the moment, there is no way for me to let them know which email address is the problem - at the moment, I just have to chuck the lot back at them, and issue an unhelpful message saying that one of them is not correct. Secondly (and to a certain extent this make the first point moot) it seems that it is necessary to call a render in the rescue_from, or it dies with a rather bizarre "can't convert Array into String" error from webbrick, with no stack trace & nothing in the log. Thus, I have to throw it back to the user when I come across the first error and have to stop processing the rest of the emails. Neither of the solutions are optimal. It would seem that the only way to get Rails to do what I want is option 1, and loathsome global variables. This would also rely on Rails being single threaded. Can anyone suggest a better solution to this problem?

    Read the article

  • simpledb, sql azure, mysql + memcached

    - by sirmak
    For a new scalable high traffic global ecommerce website (asp.net) project which technology fits best (max. scalability & performance, min. price & maintenance)? amazon simpledb, microsoft sql azure, mysql + memcached combo, or your solution...

    Read the article

  • VB - Convert Web Site to Web Application

    - by Dave
    Hi This is my first time doing VB :-) I've inherited a web site, which I've converted into a web application in VS2008. The conversion has worked for everything except a Gallery control. The compile error I'm getting is: Type 'Gallery' is not defined in file: gallery_oct07.aspx.designer.vb Option Strict On Option Explicit On Partial Public Class gallery_oct07 '''<summary> '''Gallery1 control. '''</summary> '''<remarks> '''Auto-generated field. '''To modify move field declaration from designer file to code-behind file. '''</remarks> Protected WithEvents Gallery1 As Global.Gallery End Class with squiggly lines under Global.Gallery. The gallery_oct07.aspx.vb is: Partial Class gallery_oct07 Inherits System.Web.UI.Page End Class Gallery.ascx is: <%@ Control Language="C#" AutoEventWireup="true" Codebehind="Gallery.ascx.cs" Inherits="WebApplication1.Gallery"%> <asp:Repeater runat="server" ID="rptGallery"> <HeaderTemplate> <ul class='<%#CssClass%>'> </HeaderTemplate> <ItemTemplate> <li><a href='<%#ImageFolder + Eval("Name") %>' class="thickbox" rel="gallery"><img src='<%#ImageFolder + "thumb/" + Eval("Name") %>' /></a></li> </ItemTemplate> <FooterTemplate> </ul></FooterTemplate> </asp:Repeater> and the code behind is: using System; using System.IO; namespace WebApplication1 { public partial class Gallery : System.Web.UI.UserControl { public string _ImageFolder; public string ImageFolder { get { return _ImageFolder; } set { _ImageFolder = value; } } private string _cssClass = "gallery"; public string CssClass { get { return _cssClass; } set { _cssClass = value; } } protected void Page_Load(object sender, EventArgs e) { DirectoryInfo dir = new DirectoryInfo(MapPath(ImageFolder)); FileInfo[] images = dir.GetFiles("*.jpg"); rptGallery.DataSource = images; rptGallery.DataBind(); } protected void Page_PreRender(object sender, EventArgs e) { } } } The feels like a namespace issue.. My project namespace is WebApplication1. Cheers!

    Read the article

  • Get coordinates in parent, but not in stage.

    - by Bart van Heukelom
    I know about Flash's localToGlobal and globalToLocal methods to transform coordinates from the local system to the global system, but is there a way to achieve the intermediate? To transform coordinates from an arbitrary system to any other arbitrary system? I have a clickable object inside a Sprite, and the Sprite is a child of the stage. I want to retrieve the clicked point in the Sprite.

    Read the article

  • Making all variables accessible to namespace

    - by Gökhan Sever
    Hello, Say I have a simple function: def myfunc(): a = 4.2 b = 5.5 ... many similar variables ... I use this function one time only and I am wondering what is the easiest way to make all the variables inside the function accessible to my main name-space. Do I have to declare global for each item? or any other suggested methods? Thanks.

    Read the article

  • What does the following Regex expression do?

    - by Jim
    Hi, I would like to understand what the following code is doing. This logic is part of a routine to strip out html from the body of an email message. mBBSREgEx.IgnoreCase = True mBBSREgEx.Global = True mBBSREgEx.Pattern = "<[^>]*>" sResult = mBBSREgEx.Replace(sResult, "") Thank you, Jim

    Read the article

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