Search Results

Search found 362 results on 15 pages for 'graham mitchell'.

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • Dangers when deploying Flash/Flex UI test automation hooks to production?

    - by Merlyn Morgan-Graham
    I am interested in doing automated testing against a Flex based UI. I have found out that my best options for UI automation (due to being C# controllable, good licensing conditions, etc) all seem to require that I compile test hooks into my application. Because of this, I am thinking of recommending that these hooks be compiled into our build. I have found a few places on the net that recommend not deploying bits with this instrumentation enabled, and I'd like to know why. Is it a performance drain, or a security risk? If it is a security risk, can you explain how the attack surface is increased? I am not a Flash or Flex developer, though I have some experience with threat modeling. For reference, here's the tools I'm specifically considering: QTP Selenium-Flex API I am having problems finding all the warnings/suggestions I found last night, but here's an example that I can find: http://www.riatest.com/products/getting-started.html Warning! Automation enabled applications expose all properties of all GUI components. This makes them vulnerable to malicious use. Never make automation enabled application publicly available. Always restrict access to such applications and to RIATest Loader to trusted users only. Related question (how to do conditional compilation to insert/remove those hooks): Conditionally including Flex libraries (SWCs) in mxmlc/compc ant tasks

    Read the article

  • OOP design issue: Polymorphism

    - by Graham Phillips
    I'm trying to solve a design issue using inheritance based polymorphism and dynamic binding. I have an abstract superclass and two subclasses. The superclass contains common behaviour. SubClassA and SubClassB define some different methods: SubClassA defines a method performTransform(), but SubClassB does not. So the following example 1 var v:SuperClass; 2 var b:SubClassB = new SubClassB(); 3 v = b; 4 v.performTransform(); would cause a compile error on line 4 as performTransform() is not defined in the superclass. We can get it to compile by casting... (v as SubClassA).performTransform(); however, this will cause a runtime exception to be thrown as v is actually an instance of SubClassB, which also does not define performTransform() So we can get around that by testing the type of an object before casting it: if( typeof v == SubClassA) { (cast v to SubClassA).performTransform(); } That will ensure that we only call performTransform() on v's that are instances of SubClassA. That's a pretty inelegant solution to my eyes, but at least its safe. I have used interface based polymorphism (interface meaning a type that can't be instantiated and defines the API of classes that implement it) in the past, but that also feels clunky. For the above case, if SubClassA and SubClassB implemented ISuperClass that defined performTransform, then they would both have to implement performTransform(). If SubClassB had no real need for a performTransform() you would have to implement an empty function. There must be a design pattern out there that addresses the issue.

    Read the article

  • Jquery code breaks page Javascript

    - by Graham
    I required a function to remove URLs from <a> divs found within <div class="rj_insertcode">. Not being familiar with with direction to tackle this, I eventually mustered up the following Jquery code: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $('div.rj_insertcode a').each(function() { $(this).replaceWith($(this).html()); }); }); </script> </head> My site uses Joomla CMS and I was able to add the above script to the bottom of the template index.php. It works quite well and removes the links generated between the defined tags. My problem: Pages that also include JavaScript do not operate correctly. JavaScript appears to be disabled or not functioning. What can I change to ensure JavaScript still operates correctly, or is there another method I could adopt?

    Read the article

  • mod_rewrite with anchor link

    - by Graham
    Hi, thanks for looking. I know you can't redirect anchor URLs to another page, but is it possible to redirect a URL to only a single anchor? So http://www.example.com/video/{title} always gets sent to http://www.example.com/video.php?title={title}#player The only thing that changes is the title, anchor is always the same... I need to redirect to a certain slide on a coda slider

    Read the article

  • Calling a Add-in function from Excel's VBA

    - by graham
    I am using an Excel Add-in for an Erlangs: http://abstractmicro.com/erlang/helppages/ref-erlbblockage.htm I try to call the Erlang-B function within the Add-in from within VBA thus: Function Erl(Erlangs As Double, Capacity As Double) Erl = Application.WorksheetFunction.ErlbBlockage(Capacity, Erlangs) End Function ...but it doesn't work. I get #VALUE! returned in the Excel cell. I think it is because the function is not part of standard Excel (it is in the Add-in). So how do I call it?

    Read the article

  • Locked visible cells Excel problem

    - by graham.reeds
    I have a problem with an Excel Template in Excel 2007. I need to remove a row from a summary report but the developer who created this report has somehow managed to set it so that only certain number of rows & columns are visible (in case you are interested it is A1:G30) - no headers, no grid, just blue nothingness. Deleting the offending line just peels back the white-ness. I want to change the resolution of the visible grid to A1:G29. I would ask on google but I haven't the foggiest what the tool would be called to do this (if I did I probably wouldn't be asking). Giving generic terms gives very generic results. I've been through every ribbon and came up blank. Help me out my misery - please!

    Read the article

  • Where does the delete control go in my Cocoa user interface?

    - by Graham Lee
    Hi, I have a Cocoa application managing a collection of objects. The collection is presented in an NSCollectionView, with a "new object" button nearby so users can add to the collection. Of course, I know that having a "delete object" button next to that button would be dangerous, because people might accidentally knock it when they mean to create something. I don't like having "are you sure you want to..." dialogues, so I dispensed with the "delete object". There's a menu item under Edit for removing an object, and you can hit Cmd-backspace to do the same. The app supports undoing delete actions. Now I'm getting support emails ranging from "does it have to be so hard to delete things" to "why can't I delete objects?". That suggests I've made it a bit too hard, so what's the happy middle ground? I see applications from Apple that do it my way, or with the add/remove buttons next to each other, but I hate that latter option. Is there another good (and preferably common) convention for delete controls? I thought about an action menu but I don't think I have any other actions that would go in it, rendering the menu a bit thin.

    Read the article

  • Deleting partial data from a field in MySQL

    - by Graham
    I am trying to remove a specific set of data from a MySQL database field, however I am not sure what the best statement would be for this. For example, if I have a data in a field such as... The use of a secondary password will allow you to gain access to your account from a non-authenticated computer. A non-authenticated computer is any computer that is not your primary computer, an elected authenticated computer or a computer that automatically deletes cookies. <p>This is a test</p> ...and I want to remove <p>This is a test</p> from the field, what statement would be best?

    Read the article

  • jQuery UI Draggable 'stop' event called too many times?

    - by Graham
    I have a feeling I'm either misunderstanding the 'stop' event or not doing it right, but it seems to be called several times while the element is bound to is being dragged. makeAllDragable = function () { $(".test-table").draggable({ start: function (event, ui) { $(this).click(); }, stop: function (event, ui) { foo() } }).click(function () { selectTable($(this)); }); } foo = function () { alert("test"); } In this example foo is called about 30 times, shouldn't is just be when I release the draggable? The jQuery docs don't actually say one where or another though.

    Read the article

  • simple rank formula

    - by Graham
    I'm looking for a mathmatical ranking formula. Sample is 2008 2009 2010 A 5 6 4 B 6 7 5 C 7 8 2 I want to add a rank column for each period code field rank 2008 2009 2010 2008 2009 2010 B 6 7 5 2 1 1 A 5 6 4 3 2 2 C 7 2 2 1 3 3 please do not reply with methods that loop thru the rows and columns, incrementing the rank value as it goes, that's easy. I'm looking for a formula much like finding the percent total (item / total). I know i've seen this before but an havning a tough time locating it. Thanks in advance!

    Read the article

  • Matlab - Propagate unit vectors on to the edge of shape boundaries

    - by Graham
    Hi I have a set of unit vectors which I want to propagate on to the edge of shape boundary defined by a binary image. The shape boundary is defined by a 1px wide white edge. I also have the coordinates of these points stored in a 2 row by n column matrix. The shape forms a concave boundary with no holes within itself made of around 2500 points. What would be the best method to do this? Are there some sort of ray tracing algorithms that could be used? Or would it be a case of taking the unit vector and multiplying it by a scalar and testing after multiplication if the end point of the vector is outside the shape boundary. When the end point of the unit vector is outside the shape, just find the point of intersection? Thank you very much in advance for any help!

    Read the article

  • Should I use a modified singleton design pattern that only allows one reference to its instance?

    - by Graham
    Hi, I have a class that would normally just generate factory objects, however this class should only used once throughout the program in once specifix place. What is the best design pattern to use in this instance? I throught that having a modified singleton design which only allows one reference to instance throughout the program would be the correct way to go. So only the first call to getInstance() returns the factory library. Is this a good or bad idea? Have I missed out another fundermental design pattern for solving this problem? Thanks for your help.

    Read the article

  • Sorting 1000-2000 elements with many cache misses

    - by Soylent Graham
    I have an array of 1000-2000 elements which are pointers to objects. I want to keep my array sorted and obviously I want to do this as quick as possible. They are sorted by a member and not allocated contiguously so assume a cache miss whenever I access the sort-by member. Currently I'm sorting on-demand rather than on-add, but because of the cache misses and [presumably] non-inlining of the member access the inner loop of my quick sort is slow. I'm doing tests and trying things now, (and see what the actual bottleneck is) but can anyone recommend a good alternative to speeding this up? Should I do an insert-sort instead of quicksorting on-demand, or should I try and change my model to make the elements contigious and reduce cache misses? OR, is there a sort algorithm I've not come accross which is good for data that is going to cache miss?

    Read the article

  • How can I filter a report with duplicate fields in related records?

    - by Graham Jones
    I have a report where I need to filter out records where there is a duplicate contract number within the same station but a different date. It is not considered a duplicate value becuase of the different date. I then need to summarize the costs and count the contracts but even if i suppress the "duplicate fields" it will summarize the value. I want to select the record with the most current date. Station Trans-DT Cost Contract-No 8 5/11/2010 10 5008 8 5/12/2010 15 5008 9 5/11/2010 12 5012 9 5/15/2010 50 5012

    Read the article

  • Iterating multple lists consecutively (C++)

    - by Graham Rogers
    I have 3 classes, 2 inheriting from the other like so: class A { public: virtual void foo() {cout << "I am A!" << endl;} }; class B : public A { public: void foo() {cout << "B pretending to be A." << endl} void onlyBFoo() {cout << "I am B!" << endl} }; class C : public A { public: void foo() {cout << "C pretending to be A." << endl} void onlyCFoo() {cout << "I am C!" << endl} }; What I want to do is something like this: list<A> list_of_A; list<B> list_of_B; list<C> list_of_C; //put three of each class in their respective list for (list<B>::iterator it = list_of_B.begin(); it != list_of_B.end(); ++it) { (*it).onlyBFoo(); } for (list<C>::iterator it = list_of_C.begin(); it != list_of_C.end(); ++it) { (*it).foo(); } //This part I am not sure about for (list<A>::iterator it = list_of_all.begin(); it != list_of_all.end(); ++it) { (*it).foo(); } To output: I am B! I am B! I am B! I am C! I am C! I am C! I am A! I am A! I am A! B pretending to be A. B pretending to be A. B pretending to be A. C pretending to be A. C pretending to be A. C pretending to be A. Basically, sometimes I want to only loop the Bs and Cs so that I can use their methods, but sometimes I want to loop all of them so that I can use the same method from each i.e. iterate the As, then the Bs, then the Cs all in one loop. I thought of creating a separate list (like the code above) containing everything, but it would create lots of unnecessary maintenance, as I will be adding and removing every object from 2 lists instead of one.

    Read the article

  • Getting the type of an array of T, without specifying T - Type.GetType("T[]")

    - by Merlyn Morgan-Graham
    I am trying to create a type that refers to an array of a generic type, without specifying the generic type. That is, I would like to do the equivalent of Type.GetType("T[]"). I already know how to do this with a non-array type. E.g. Type.GetType("System.Collections.Generic.IEnumerable`1") // or typeof(IEnumerable<>) Here's some sample code that reproduces the problem. using System; using System.Collections.Generic; public class Program { public static void SomeFunc<T>(IEnumerable<T> collection) { } public static void SomeArrayFunc<T>(T[] collection) { } static void Main(string[] args) { Action<Type> printType = t => Console.WriteLine(t != null ? t.ToString() : "(null)"); Action<string> printFirstParameterType = methodName => printType( typeof(Program).GetMethod(methodName).GetParameters()[0].ParameterType ); printFirstParameterType("SomeFunc"); printFirstParameterType("SomeArrayFunc"); var iEnumerableT = Type.GetType("System.Collections.Generic.IEnumerable`1"); printType(iEnumerableT); var iEnumerableTFromTypeof = typeof(IEnumerable<>); printType(iEnumerableTFromTypeof); var arrayOfT = Type.GetType("T[]"); printType(arrayOfT); // Prints "(null)" // ... not even sure where to start for typeof(T[]) } } The output is: System.Collections.Generic.IEnumerable`1[T] T[] System.Collections.Generic.IEnumerable`1[T] System.Collections.Generic.IEnumerable`1[T] (null) I'd like to correct that last "(null)". This will be used to get an overload of a function via reflections by specifying the method signature: var someMethod = someType.GetMethod("MethodName", new[] { typeOfArrayOfT }); // ... call someMethod.MakeGenericMethod some time later I've already gotten my code mostly working by filtering the result of GetMethods(), so this is more of an exercise in knowledge and understanding.

    Read the article

  • Database migration

    - by graham.reeds
    We are migrating a client's own database schema to our own (both SQL-Server). Most of the mappings from their schema to ours have been indentified and rules been agreed on if the columns don't exactly align (default values etc.) Previously, depending on who was assigned the task, this has been done either with a mixture of sql scripts or one-off vb apps. I was thinking there must be a application (commercial or otherwise) where you can assign these mappings/rules and have it stream the data across. Surely the setting up and configuration of this tool would be less than the creation of ad-hoc scripts... Is there an app? Apart from the obvious 'be careful' any tips to mitigate the stress of a non-DBA porting one schema to another?

    Read the article

  • Is there a way to send text to an aspcontrol via jquery

    - by Garrith Graham
    Is there a way to send data to an aspcontrol say a label called label1? Via jquery? I know jquery only likes html but is there a way to just send the raw text to an asp control using a similar method below: <script type="text/javascript"> $(document).ready(function () { var label = $("#<%= testLabel.ClientID %>"); var div = $("<div></div>").html("content").attr('id', 'test'); var serializer = new XMLSerializer(); label.text(serializer.serializeToString(div)); }); </script>

    Read the article

  • Asychronous page update with ASP.NET MVC

    - by Graham
    Hi, I'm learning ASP.NET MVC 1.0 and need to implement an asynchronous/dynamic page update. I'm new to MVC and jQuery so I'm not sure what to look for. What I want to do is to allow a user to start a monitoring a domain layer function (similar to a news ticker) and then do a partial page update based on the continously changing results. In ASP.NET I'd do this with a javascript timer to cause a postback, and an AJAX update panel..... but this seems a bit "hacky" for ASP.NET MVC. Is there a better way?

    Read the article

  • Convert a binary tree to linked list, breadth first, constant storage/destructive

    - by Merlyn Morgan-Graham
    This is not homework, and I don't need to answer it, but now I have become obsessed :) The problem is: Design an algorithm to destructively flatten a binary tree to a linked list, breadth-first. Okay, easy enough. Just build a queue, and do what you have to. That was the warm-up. Now, implement it with constant storage (recursion, if you can figure out an answer using it, is logarithmic storage, not constant). I found a solution to this problem on the Internet about a year back, but now I've forgotten it, and I want to know :) The trick, as far as I remember, involved using the tree to implement the queue, taking advantage of the destructive nature of the algorithm. When you are linking the list, you are also pushing an item into the queue. Each time I try to solve this, I lose nodes (such as each time I link the next node/add to the queue), I require extra storage, or I can't figure out the convoluted method I need to get back to a node that has the pointer I need. Even the link to that original article/post would be useful to me :) Google is giving me no joy. Edit: Jérémie pointed out that there is a fairly simple (and well known answer) if you have a parent pointer. While I now think he is correct about the original solution containing a parent pointer, I really wanted to solve the problem without it :) The refined requirements use this definition for the node: struct tree_node { int value; tree_node* left; tree_node* right; };

    Read the article

  • Python new-style classes and __subclasses__ function

    - by Fraser Graham
    Can somebody explain to me why this works (in Python 2.5) : class Foo(object): pass class Bar(Foo): pass print(Foo.__subclasses__()) but this doesn't : class Foo(): pass class Bar(Foo): pass print(Foo.__subclasses__()) The latter returns "AttributeError: class Foo has no attribute '__subclasses__'" but i'm not sure why. I know this is related to old-style vs. new-style classes but i'm not clear on why that would make this functionality unavailable.

    Read the article

  • Multiple repositories, single setup

    - by graham.reeds
    If I use multiple repositories, all located under a single root folder, how can I set it up so that they will use a single master svnconf/passwd file for setup but still allow me to customize each if the need arises? This is on windows but I guess the process would be similar on other systems. Update: I am using svnserve as a service.

    Read the article

  • A Tkinter StringVar() Question

    - by Graham
    I would like to create a StringVar() that looks something like this: someText = "The Spanish Inquisition" #Here's a normal variable whose value I will change eventually TkEquivalent = StringVar() #and here's the StringVar() TkEquivalent.set(string(someText)) #and here I set it equal to the normal variable. When someText changes, this variable will too... HOWEVER: TkEquivalent.set("Nobody Expects " + string(someText)) If I do this, the StringVar() will no longer automatically update! How can I include that static text and still have the StringVar() update to reflect changes made to someText? Thanks for your help.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >