Search Results

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

Page 140/224 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • using ruby test and selenium grid how can I keep the same browser window for multiple tests?

    - by George Horlacher
    Each of my tests start a new selenium client browser and tear it down so they can run stand alone with this code: def setup if $selenium @selenium = $selenium else @selenium = Selenium::SeleniumDriver.new("#$sell_server", 4444, "#$browser", "http://#$network.#$host:2086", 10000); @selenium.start end @selenium.set_context("test_login") end def teardown @selenium.stop unless $selenium assert_equal [], @verification_errors end What I'd like is to run a suite of tests that all use the same browser and don't keep opening and closing new browsers for every test. I've tried using $selenium as a global object / browser but each test still opens up a new browser and closes it. How should this be done?

    Read the article

  • What interprocess locking calls should I monitor?

    - by Matt Joiner
    I'm monitoring a process with strace/ltrace in the hope to find and intercept a call that checks, and potentially activates some kind of globally shared lock. While I've dealt with and read about several forms of interprocess locking on Linux before, I'm drawing a blank on what to calls to look for. Currently my only suspect is futex() which comes up very early on in the process' execution. Update0 There is some confusion about what I'm after. I'm monitoring an existing process for calls to persistent interprocess memory or equivalent. I'd like to know what system and library calls to look for. I have no intention call these myself, so naturally futex() will come up, I'm sure many libraries will implement their locking calls in terms of this, etc. Update1 I'd like a list of function names or a link to documentation, that I should monitor at the ltrace and strace levels (and specifying which). Any other good advice about how to track and locate the global lock in mind would be great.

    Read the article

  • What is the equivalent to IScriptControl for Web.UI.Page?

    - by Jeff Dege
    We've been using IScriptControl to tie javascript objects to our UserControls and ServerControls, and it's worked fine. The problem is that ASP.NET seems to provide no method to tie a javascript object to a Page. Up to now, we've been putting plain functions in the global namespace, but I am developing a serious allergy to that practice. It'd be easy enough to wrap our functions into a javascript class, and to include the javascript file on the page, but how to instantiate the object, how to reference it from callback events, and how to pass data to it from the code-behind, I haven't figured out. Or rather, the methods we've been using up to now (hidden fields, emitted javascript strings, etc.), really bug me. Anyone have better ideas?

    Read the article

  • Weblogic / EjbGen: worker manager configuration.

    - by Guillaume
    I want to declare a worker manager to perform some work in managed thread. Weblogic documentation tells that we can declare a global worker manager using the admin console or declare it in an ejb-jar.xml config file. I want to use the second option. But my ejb-jar.xml is generated by the ejbgen tool. There is no tag in ejbgen that would allow me to declare a worker manager. So how should I create a local worker manager declaration ?

    Read the article

  • System.Uri("") in default browser?

    - by Hallgaws
    I am using special program where it loads some url imagine it like window with automatically load www.google.com - program starts and it load the site - BUT when you click on some links in the program window it opens in default browser - how it can be opened in default browser - I am using this code: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form1 Inherits System.Windows.Forms.Form <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) Me.WB = New System.Windows.Forms.WebBrowser ..... ..... Me.WB.Url = New System.Uri("http://www.google.com/", System.UriKind.Absolute) Using Visual Basic 2008

    Read the article

  • Any solution or programming tips for Inner class?

    - by huahsin68
    Hi, I'm having some toubt here. Hope you guys can share out some programming tips. Just curious to know whether is it a good programming practice if I do something like the code below. class Outer { public: class Inner { public: Inner() {} } Outer() {} }; I have been doing this for structure where I only want my structure to be expose to my class instead of global. But the case is different here, I am using a class now? Have you guys facing such a situation before? Very much appreciated on any advice from you ;)

    Read the article

  • Teamcity NTLM Authentication change - admin user lost in transition

    - by hawkeye
    I've switched in teamcity from using basic authentication to using NTLM, on an existing installation. This works fine, except that the admin user didn't have a corresponding NT account, and so doesn't work on the NTLM configuration. (It is easy to roll back, so it is not a stress). My question is - what is the command to set a user to admin manually - ie modifying the database? (like this: TeamCity forgotten admin password - where to look?) but changing the role of a user to global system administrator.

    Read the article

  • Comparison between pointer and integer (cocoa)

    - by Cal S
    Hi, I'm just learning cocoa (coming from C#) but I'm getting a strange error for something that seems really simple... (charsSinceLastUpdate=36) #import "CSMainController.h" @implementation CSMainController //global vars int *charsSinceLastUpdate = 0; NSString *myString = @"Hello world"; // - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { ... } //other functions - (void)textDidChange:(NSNotification *)aNotification { NSLog(@"charsSinceLastUpdate=%i",charsSinceLastUpdate); if (charsSinceLastUpdate>=36) { // <- THIS line returns the error: Comparison between pointer and integer charsSinceLastUpdate=0; [statusText setStringValue:@"Will save now!"]; } else { charsSinceLastUpdate++; [statusText setStringValue:@"Not saving"]; } } //my functions - (void)showNetworkErrorAlert:(BOOL)showContinueWithoutSavingOption { ... } // @end Any help would be appreciated, thanks!

    Read the article

  • Web2py controllers with parameters?

    - by nickfranceschina
    I am building an app using Web2py framework... I don't want to have to use the request object to get all of the querystring parameters, instead I'd like to build my controller with named parameters and have the router unpack the querystring (or form data) dictionary into the named parameters and call my controller. so instead of a controller method of create_user(): where I would use the global request() object and look through the vars list... I would prefer instead to have create_user(first_name, last_name, email): like I see in other MVC platforms. is this possible in Web2py already? or is there a plugin for it? or do I need to add that myself?

    Read the article

  • Application_End() cannot access cache through HttpContext.Current.Cache[key]

    - by Carl J.
    I want to be able to maintain certain objects between application restarts. To do that, I want to write specific cached items out to disk in Global.asax Application_End() function and re-load them back on Application_Start(). I currently have a cache helper class, which uses the following method to return the cached value: return HttpContext.Current.Cache[key]; Problem: during Application_End(), HttpContext.Current is null since there is no web request (it's an automated cleanup procedure) - therefore, I cannot access .Cache[] to retrieve any of the items to save to disk. Question: how can I access the cache items during Application_End()?

    Read the article

  • Difference between these two namespaces in javascript

    - by Lol coder
    First off, all I'm trying to do is to structure my javascript code properly. I've been told I must not have anything global. So I took the 2 types of namespaces declaration from this answer and now asking you guys for the pros and cons of each. var namespace1 = new function () { var internalFunction = function () { }; this.publicFunction = function () { }; }; var namespace2 = { publicFunction: function () { } }; Also, how do i have a private function in the last one namespace2?

    Read the article

  • Best way to get an Application Context into a static method in Android

    - by Slapout
    I'm working on an Android application that has several Activities. In it I have a class with several static methods. I would like to be able to call these methods from the different Activities. I'm using the static methods to load data from an xml file via a XmlResourceParser. To create a XmlResourceParser requires a call on the Application Context. So my question is, what is the best way to get a reference to the Application Context into the static methods? Have each Activity get it and pass it in? Store it somehow in a global variable?

    Read the article

  • Passing parameters to a delphi TFrame

    - by ajob
    To avoid singletons and global variables I'd like to be able to pass parameters to a TFrame component. However since a TFrame normally is included on form at design time it is only possible to use the default constructor. The parent form can of course set some properties in the OnCreate callback after the TFrame has been created. However this does not ensure that a property is not forgotten, and the dependencies are not as clear as using a constructor. A nice way would be if it was possible to register a factory for creating components while the dfm file is being read. Then the required parameters could be passed to the TFrame constructor when created by the factory. Is there a way of accomplishing this? Or does anyone have a better solution on how to pass parameters to a TFrame?

    Read the article

  • How to stop Visual Studio from returning duplicates answers?

    - by Franck Mesirard
    In my team, we put all our projects (only 7 large ones) in the same solution. And since some code is common between project we tend to have the same file included in each project. This is fine and compiles/runs well. But when I do a global search in my solution, VS does a "stupid" search and goes through all the files in each project, without checking if a file has already been searched. This leads to longer searches whose results have duplicates. Do anyone know a fix for this issue?

    Read the article

  • Javascript: Using the Module Pattern for larger projects

    - by Rob
    I'm interested in using the Module Pattern to better organize my future projects. Unfortunately, there are only a few brief tutorials and proof-of-concept examples of the Module Pattern. Using the module pattern, I would like to organize projects into this sort of structure: project.arm.object.method(); Where "project" is my global project name, "arm" is a sub-section or branch of the project, "object" is an individual object, and so on to the methods and properties. However, I'm not sure how I should be declaring and organizing multiple "arms" and "objects" under "project". var project = window.project || {}; project.arm = project.arm || {}; project.arm.object = (function() { var privateVar = "Private contents."; function privateMethod() { alert(privateVar); } return { method: privateMethod }; }()); Are there any best practices or conventions when defining a complex module structure? Should I just declare a new arm/object underneath the last?

    Read the article

  • Play 2.0 RESTful request post-processing

    - by virtualeyes
    In regard to this question I am curious how one can do post-request REST processing a la (crude): def postProcessor[T](content: T) = { request match { case Accepts.Json() => asJson(content) case Accepts.Xml() => asXml(content) case _ => content } } overriding onRouteRequest in Global config does not appear to provide access to body of the response, so it would seem that Action composition is the way to go to intercept the response and do post-processing task(s). Question: is this a good idea, or is it better to do content-type casting directly within a controller (or other class) method where the type to cast is known? Currently I'm doing this kind of thing everywhere: toJson( i18n("account not found") ) toJson( Map('orderNum-> orderNum) ) while I'd like the toJson/toXml conversion to happen based on accepts header post-request.

    Read the article

  • When exactly does a method have side effects?

    - by Kim
    As I always understood it, any change to the programs state (or anything to do with IO) is a side effect. It does not matter, whether the change occurs in a global variable or in a private field of the object the method is called on. It follows that all methods which do not return anything either do nothing at all or have a side effect. My confusion comes from one of our university's instructors (who is still a student and thus not omniscient yet;) ) telling me setters don't have side effects.

    Read the article

  • XCode, error: '_object' undeclared. Need some help solving this problem

    - by user309030
    I've got this code in my viewController.m file - (void)viewDidLoad { [super viewDidLoad]; GameLogic *_game = [[GameLogic alloc] init]; [_game initGame]; ....... } GameLogic is another class which I created. in the same viewController.m file, I have got another function - (void)test { if([_game returnElecFence]) { NSLog(@"YES"); } else { NSLog(@"NO"); } } Problem is, whenever the test function is called, I get an error saying '_game' undeclared. I tried putting the GameLogic init code in the .h file and on top of the @implementation to make it global but every method I tried resulted in a worse error. TIA to anyone who can suggest some ideas to clear this error up

    Read the article

  • How should I implement items that are normalized in the Database, in Object Oriented Design?

    - by Jonas
    How should I implement items that are normalized in the Database, in Object Oriented classes? In the database I have a big table of items and a smaller of groups. Each item belong to one group. This is how my database design look like: +----------------------------------------+ | Inventory | +----+------+-------+----------+---------+ | Id | Name | Price | Quantity | GroupId | +----+------+-------+----------+---------+ | 43 | Box | 34.00 | 456 | 4 | | 56 | Ball | 56.50 | 3 | 6 | | 66 | Tin | 23.00 | 14 | 4 | +----+------+-------+----------+---------+ Totally 3000 lines +----------------------+ | Groups | +---------+------+-----+ | GroupId | Name | VAT | +---------+------+-----+ | 4 | Mini | 0.2 | | 6 | Big | 0.3 | +---------+------+-----+ Totally 10 lines I will use the OOP classes in a GUI, where the user can edit Items and Groups in the inventory. It should also be easy to do calculations with a bunch of items. The group information like VAT are needed for the calculations. I will write an Item class, but do I need a Group class? and if I need it, should I keep them in a global location or how do I access it when I need it for Item-calculations? Is there any design pattern for this case?

    Read the article

  • When to override OnError?

    - by Ek0nomik
    I'm looking into re-working and simplifying our error handling in an application I support. We currently have all of our pages inheriting from a base class we created, which in turn obviously inherits from System.Web.UI.Page. Within this base class, the OnError method is currently being overridden, and in turn calling MyBase.OnError, and then calling one of our custom logging methods. I don't see any benefit of overriding the OnError method, and I think it would be better to let the Application_Error method in the Global.asax take care of the unhandled exception (logging it) and then the customErrors section in the config would trigger a process to redirect the user. Looking online it looks like people override this method quite frequently, but I don't see a need to and this article from MSDN makes me think the same.

    Read the article

  • File paths with XSLT includes

    - by Andrew Parisi
    Hi again everyone. I'm working on a website with a large number of pages, and each one has this in it: <xsl:include href="team-menu.xsl" /> This xsl file is stored in the root directory. Essentially including my "team menu" on each page. My problem is when I include this on nested pages, e.g. "/teammembers/smith.xsl", the links in the menu are broken because they refer to pages that aren't in the same directory as the page i'm viewing. This is probably really easy, but I just don't know how to fix it. Is there a way to tell the XSL the root directory and/or set some sort of global directory? Thanks for your help!

    Read the article

  • How do you refresh the contents of an R gWidget?

    - by Richie Cotton
    I'm creating a GUI in R using gWidgets (more specifically gWidgetstcltk). I'd like to know how to update the contents of selection-type widgets, such as gdroplist and gtable. I currently have a rather hackish method of deleting the widget and re-creating it. I'm sure there's a better way. This simple example displays all the variables in the global environment. library(gWidgets) library(gWidgetstcltk) create.widgets <- function() { grp <- ggroup(container = win) ddl <- gdroplist(ls(envir = globalenv()), container = grp) refresh <- gimage("refresh", dirname = "stock", container = grp, handler = function(h, ...) { if(exists("grp") && !is.null(grp)) { delete(win, grp) rm(grp) } grp <- create.widgets() } ) } win <- gwindow() grp <- create.widgets()

    Read the article

  • How to refresh an activity?

    - by poeschlorn
    Hi Guys, after implementing some Android Apps, including several Map activities, I try to refresh the activity when the GPS listener's onLocationChanged() mehtod is called. I have no Idea how to tell the map activity to refresh on its own and display the new coords... the coords to store will have to be in global values, so that the location listener will have access to it. In my sample GPS-class (see code below) I just changed the text of a text view....but how to do that in map view? private class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { final TextView tv = (TextView) findViewById(R.id.myTextView); if (loc != null) { tv.setText("Location changed : Lat: " + loc.getLatitude() + " Lng: " + loc.getLongitude()); } } I think the solution of this Problem won't be very difficult, but I just need the beginning ;-) This whole app shall work like a really simple navigation system. It would be great if someone could help me a little bit further :) nice greetings, Poeschlorn

    Read the article

  • Making id'less url in asp.net mvc razor

    - by Sushant
    I am working with URL routing , and have some issues. I want my url to be like this: www.domain.com/p/myproduct But I also want to be able to retrieve the ID of the product, without accessing the database. I thought about having a URL like: www.domain.com/p/myproduct/1 But if I could hide the ID it would be better. So, how do I do it the simplest way? Currently my Global.asax has the following route: routes.MapLocalizedRoute("Product", "p/{productId}/{SeName}", new { controller = "Catalog", action = "Product", SeName = UrlParameter.Optional }, new { productId = @"\d+" }, new[] { "Nop.Web.Controllers" });

    Read the article

  • First try StructureMap and MVC3 via NuGet

    - by Angel Escobedo
    Hello Guys, I'm trying to figure how to config StructureMap for ASP.NET MVC3 I've already using NuGet and I notice that it creates App_Start Folder with a cs file named as StructuremapMVC, so I check it and notice that is the same code but simplified that will be written manually on App_Start section placed on Global.asax... My Question is when I inject some IoC on my Controllers as the follow (I use this pattern : Entity Framework 4 CTP 4 / CTP 5 Generic Repository Pattern and Unit Testable) : private readonly IAsambleaRepository _aRep; private readonly IUnitOfWork _uOw; public AsambleaController(IAsambleaRepository aRep, IUnitOfWork uOw) { _aRep = aRep; this._uOw = uOw; } public ActionResult List(string period) { var rs = _aRep.ByPeriodo(period).ToList<Asamblea>(); return View(); } I got an Exception Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >