Search Results

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

Page 101/224 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • Conditional skin file in ASP.Net Theme based off of browser

    - by Dan Appleyard
    Is there a way to use a skin file in a theme only when a certain browser is used? The theme stays the same, I just want skin A to apply when a certain browser is used, and skin B when another browser is used. I know I can have server-side code to check and then set the SkinId of the control to either or, but is there another, more global way? Thanks

    Read the article

  • Are there any solutions for translating measurement units on Rails?

    - by Leonid Shevtsov
    I'd like to implement measurement unit preferences in a Ruby on Rails app. For instance, the user should be able to select between displaying distances in miles or in kilometers. And, obviously, not only displaying, but entering values, too. I suppose all values should be stored in one global measurement system to simplify calculations. Are there any drop-in solutions for this? Or should I maybe write my own?

    Read the article

  • Best practice to include log4Net external config file in ASP.NET

    - by Martin Buberl
    I have seen at least two ways to include an external log4net config file in an ASP.NET web application: Having the following attribute in your AssemblyInfo.cs file: [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)] Calling the XmlConfigurator in the Global.asax.cs: protected void Application_Start() { XmlConfigurator.Configure(new FileInfo("Log.config")); } What would be the best practice to do it?

    Read the article

  • How do you manage the namespaces of your extension methods?

    - by Robert Harvey
    Do you use a global, catchall namespace for all of your extension methods, or do you put the extension methods in the same namespace as the class(es) they extend? Or do you use some other method, like an application or library-specific namespace? EDIT: I ask because I have a need to extend System.Security.Principal.IIdentity, and putting the extension method in the System.Security.Principal namespace seems to make sense, but I've never seen it done this way.

    Read the article

  • What is the closest thing MATLAB has to namespaces?

    - by rlbond
    We have a lot of MATLAB code in my lab. The problem is there's really no way to organize it. Since all the functions have to be in the same folder to be called (or you have to add a bunch of folders to MATLAB's path environment variable), it seems that we're doomed have loads of files in the same folder, all in the global namespace. Is there a better way to organize our files and functions? I really wish there were some sort of module system...

    Read the article

  • explicitly refer to the a class without a namespace in C#

    - by JoelFan
    The code I'm working with has a class called Environment that is not in any namespace. Unfortunately if I am in a class that imports the System namespace, there is no way to refer to the custom class called Environment. I know this was an unfortunate choice and should be refactored, but is there any way I can explicitly refer to the conflicting class? In C++ it seems the way to do this is by using ::, and in Java there is something called global:: How do I do it in C#?

    Read the article

  • How to apply styles to the whole silverlight pplication?

    - by Subhen
    Hi I have created two different grid background and radio button style in my App.xaml. User can select any style to change the look of the page i.e: Changing the background and style of the radiobutton. Now When I click on the raduio button the application navigates to another page and the style disappears. Is there a way to Set the style in application level or I need to store the styleVar as Global Var and check on the second page load and then apply the styles as per the styleVar.

    Read the article

  • vim: Executing a list of editor commands

    - by gveda
    Hi, Is there a way in vim to give a list of editor commands? I want to execute a series of 'global' commands, and there is some pattern to the commands. So I would ideally like to generate the list of commands (using regex search & substitute), and then run them, instead of having to type in each command. Thanks! Gaurav

    Read the article

  • Globally disable Ext JS Animations

    - by ifwdev
    I'm testing an intranet web app in the iPad but the animations to open "windows" and show message boxes are horribly slow. I've tried setting the global Ext.enableFx to false, and confirmed that flag is still false after page load in Firebug. The animations are still occurring though so I must be doing something wrong. Thanks...

    Read the article

  • Is it possible to do a #define in Adobe Flex?

    - by Without me Its just Aweso
    I'm looking for a way to do something similar to a c/c++ #define in adobe flex. I'd like to have lots of different paths a project build can take depending on wither or not something was defined. Does such a thing exist in flex? I know there is ways to set global variables but that wont really suit my purpose. being able to have structures with numerous #ifndefined and such is really what i'm in need of. thanks!

    Read the article

  • A python code to convert a number from any base to the base of 10 giving errors . What is wrong with this code?

    - by mekasperasky
    import math def baseencode(number, base): ##Converting a number of any base to base10 if number == 0: return '0' for i in range(0,len(number)): if number[i]!= [A-Z]: num = num + number[i]*pow(i,base) else : num = num + (9 + ord(number[i])) *pow(i,base) return num a = baseencode('20',5) print a Errors I get are Traceback (most recent call last): File "doubtrob.py", line 19, in <module> a = baseencode('20',5) File "doubtrob.py", line 13, in baseencode if number[i]!= [A-Z]: NameError: global name 'A' is not defined

    Read the article

  • how to send some data to the Thread module on python and google-map-engine

    - by zjm1126
    from google.appengine.ext import db class Log(db.Model): content = db.StringProperty(multiline=True) class MyThread(threading.Thread): def run(self,request): #logs_query = Log.all().order('-date') #logs = logs_query.fetch(3) log=Log() log.content=request.POST.get('content',None) log.put() def Log(request): thr = MyThread() thr.start(request) return HttpResponse('') error is : Exception in thread Thread-1: Traceback (most recent call last): File "D:\Python25\lib\threading.py", line 486, in __bootstrap_inner self.run() File "D:\zjm_code\helloworld\views.py", line 33, in run log.content=request.POST.get('content',None) NameError: global name 'request' is not defined

    Read the article

  • where can I find the rake tasks delivered with rails

    - by ash34
    I am looking for tasks like tmp:clear or db:migrate. Where can I find the code for these tasks. I remember seeing them before but don't recollect where. Also, is there a way I can set some global variables in a .rake file that can be accessed by all tasks in that file without passing them as arguments to each task. thanks, ash

    Read the article

  • How to adjust asp.net URL routing based on domain/host?

    - by DrewF
    What's the best way to adjust the path destination for a routing table created in the global.asax Application_Start event based on the domain/sub domain/host? The following worked in IIS6, but with IIS7 the request object is decoupled from the Application_Start event and therefore does not work anymore: Dim strHost As String = Context.Request.Url.Host Dim strDir As String = "" If strHost.Contains("domain1.com") Then strDir = "area1/" Else strDir = "area2/" End If routes.MapPageRoute("Search", "Search", "~/" & strDir & "search.aspx")

    Read the article

  • thread management in nbody code of cuda-sdk

    - by xnov
    When I read the nbody code in Cuda-SDK, I went through some lines in the code and I found that it is a little bit different than their paper in GPUGems3 "Fast N-Body Simulation with CUDA". My questions are: First, why the blockIdx.x is still involved in loading memory from global to share memory as written in the following code? for (int tile = blockIdx.y; tile < numTiles + blockIdx.y; tile++) { sharedPos[threadIdx.x+blockDim.x*threadIdx.y] = multithreadBodies ? positions[WRAP(blockIdx.x + q * tile + threadIdx.y, gridDim.x) * p + threadIdx.x] : //this line positions[WRAP(blockIdx.x + tile, gridDim.x) * p + threadIdx.x]; //this line __syncthreads(); // This is the "tile_calculation" function from the GPUG3 article. acc = gravitation(bodyPos, acc); __syncthreads(); } isn't it supposed to be like this according to paper? I wonder why sharedPos[threadIdx.x+blockDim.x*threadIdx.y] = multithreadBodies ? positions[WRAP(q * tile + threadIdx.y, gridDim.x) * p + threadIdx.x] : positions[WRAP(tile, gridDim.x) * p + threadIdx.x]; Second, in the multiple threads per body why the threadIdx.x is still involved? Isn't it supposed to be a fix value or not involving at all because the sum only due to threadIdx.y if (multithreadBodies) { SX_SUM(threadIdx.x, threadIdx.y).x = acc.x; //this line SX_SUM(threadIdx.x, threadIdx.y).y = acc.y; //this line SX_SUM(threadIdx.x, threadIdx.y).z = acc.z; //this line __syncthreads(); // Save the result in global memory for the integration step if (threadIdx.y == 0) { for (int i = 1; i < blockDim.y; i++) { acc.x += SX_SUM(threadIdx.x,i).x; //this line acc.y += SX_SUM(threadIdx.x,i).y; //this line acc.z += SX_SUM(threadIdx.x,i).z; //this line } } } Can anyone explain this to me? Is it some kind of optimization for faster code?

    Read the article

  • Multi table Triggers ms sql noob

    - by Chin
    I have a load of tables all with the same 2 datetime columns (lastModDate, dateAdded). I am wondering if I can set up global Insert Update trigger for these tables to set the datetime values. Or if not, what approaches are there? Any pointers much appreciated

    Read the article

  • When are static class variables initialized during runtime?

    - by Jake
    Hi, I have the following: class Thing { static Thing PREDEFINED; type _private; Thing() { _private = initial_val; } } Thing Thing::PREDEFINED = redefined_val; in global scope, i have this Thing mything = Thing::PREDEFINED; but it does not have the desired effect. mything is still initial_value and there were no errors too. So, may I ask when is the static class variable initialized during runtime?

    Read the article

  • MATLAB clear current figure

    - by rlbond
    I want to clear MATLAB's global CurrentFigure property, because I need a plot that I make to not be overwritten if a careless user uses plot without opening a new figure. I tried set(0, 'CurrentFigure', []); But it doesn't seem to work. Is this impossible?

    Read the article

  • best articles about organizing code files in C

    - by kliketa
    Can you recommend me what should I read/learn in order to make a well organized code in C? One of the things I want to learn is the principles of splitting project in .h and .c files, what goes where and why, variable naming, when to use global variables ... I am interested in books and articles that deal with this specific problem.

    Read the article

  • jquery event listening, non-standard events

    - by Stacey
    I'm attempting to build a way for my selectors to 'listen' to 'global' events that are beyond the typical 'click' 'change' 'submit' etc. I've explored the various 'eventmanagers' that I could find, and they're all still designed for forms. Is there any way to do something like this for non-standard (i.e. custom) events? The goal is to have selectors subscribe to an event, and then be able to trigger it in one place and it will raise it for everything subscribed to it.

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >