Search Results

Search found 1573 results on 63 pages for 'adam lane'.

Page 33/63 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Is it possible to write a class that interacts with controls on my WPF form?

    - by Adam S
    Hi all, I'm trying to write a class that I can use to interact with a group of similar controls in my wpf application. I have hit a few roadblocks and now I am wondering if this is a poor approach to begin with. I want to do this primarily to make my code more manageable - I have to interact with around 200 - 300 controls with my code, and it could get very tricky to have all my code in the main window class. Here's something I'd like to be able to do: class ProcControl { private CheckBox * [] Boxes = new CheckBox[10]; ProcControl() { //set boxes 0-9 to point to the actual checkboxes } //provides mass checking/unchecking functionality public void Refactor(CheckBox box) { //see what box it is int box_index = 0; while (Boxes[box_index] != box) { box_index++; } } } This doesn't work as it is right now. I have not figured out how to get my Boxes[] array to point to the actual checkboxes on my form, so I can't interact with them yet. Is it even possible to make an array that points to a bunch of controls so that I may process their properties in a nice manner? Why can't I access the controls at all from inside my class?

    Read the article

  • WS-Security using the ASMX file in ASP.NET 3.5

    - by Adam
    Basically I need to setup my ASMX file so that when I pull it up in a browser to display the WebMethod specification the Soap Header conforms to this format: <soap:Header> <wsse:Security> <wsse:UsernameToken wsu:Id='SecurityToken-securityToken'> <wsse:Username>Username</wsse:Username> <wsse:Password>Password</wsse:Password> <wsu:Created>Timestamp</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soap:Header> Back-story: I'm integrating with a client application that is already built (and owned by another company). Basically this client application already has their soap messages all set up from its past integrations with other companies. So we've opted to just build a web service using an ASMX file that matches the WSDL that they're already setup to consume. Is it possible to get WS-Security working on an ASMX file or is ASMX too simplistic and I have to upgrade to WFC (which I really don't want to do)?

    Read the article

  • How do I change JAVASCRIPT_DEFAULT_SOURCES for my application?

    - by Adam Lassek
    When you call javascript_include_tag :defaults you usually get: prototype.js, effects.js, dragdrop.js, and controls.js. These are stored in a constant in ActionView::Helpers::AssetTagHelper called 'JAVASCRIPT_DEFAULT_SOURCES`. My application uses jQuery, so I want to replace the Prototype references with something more useful. I added an initializer with these lines, based on the source code from jRails: ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES = %w{ jquery-1.4.min jquery-ui jquery.cookie } ActionView::Helpers::AssetTagHelper::reset_javascript_include_default But when I do this, I get: warning: already initialized constant JAVASCRIPT_DEFAULT_SOURCES during startup. What's the correct way of changing this value? In the source code it checks for the constant before setting it, but apparently that happens before it runs the initializer scripts. The Rails 3.0 release will provide much greater flexibility with choice of JS libraries, so I guess this is a problem with an expiration date.

    Read the article

  • LPVOID not recognized in C++/CLI

    - by Adam Haile
    I'm trying to use the following code to convert a native string to a managed string in C++\CLI: System::String^ NativeToDotNet( const std::string& input ) { return System::Runtime::InteropServices::Marshal::PtrToStringAnsi( (static_cast<LPVOID>)( input.c_str() ) ); } I originally found the code here: But when I try to build it throws the error: syntax error : identifier 'LPVOID' Any idea how to fix this?

    Read the article

  • Launching an external application from within a NPAPI Plugin

    - by Adam Cobb
    I am trying to work out why an NPAPI plugin I have written, which works fine in terms of performing operations triggered via Javascipt calls, cannot use CreateProcess() or ShellExecute() to launch an application from a path specified via the Javascript call. I can seemingly use either of these methods and they return success, i.e. no error code. But the application just does not launch. I have tried modifying the parameters used when calling them, to create new process group etc. But seemingly with no effect. I know this may seem like a bit of a security risk, but for the very specific purpose we wish to use it for it shouldn't be a problem. Thanks.

    Read the article

  • ASP.NET Hosting Options

    - by Adam Haile
    I'm not trying to start a "which language is better" argument here, so please don't go there. I typically use PHP for most of my web development (mostly because hosting is cheap), but for various reasons I'm looking to use ASP.NET for a couple new projects. But one of the major reasons I've stayed away from ASP.NET up until now is the cost. I've seen some budget hosting options, but they always seem a little sketchy to me. From what I've generally found, that's just the way the hosting scene looks for ASP.NET unless you want to go dedicated. Does anyone have any good suggestions for a solid ASP.NET host with a good feature set and reliability for my money? Also, are there any options out there along the lines of Amazon's Elastic Compute Cloud? And yes, I know... Mono. I'm talking about Windows based "grid" hosting options?

    Read the article

  • Expression Tree with Property Inheritance causes an argument exception

    - by Adam Driscoll
    Following this post: link text I'm trying to create an expression tree that references the property of a property. My code looks like this: public interface IFoo { void X {get;set;} } public interface IBar : IFoo { void Y {get;set;} } public interface IFooBarContainer { IBar Bar {get;set;} } public class Filterer { //Where T = "IFooBarContainer" public IQueryable<T> Filter<T>(IEnumerable<T> collection) { var argument = Expression.Parameter(typeof (T), "item"); //... //where propertyName = "IBar.X"; PropertyOfProperty(argument, propertyName); } private static MemberExpression PropertyOfProperty(Expression expr, string propertyName) { return propertyName.Split('.').Aggregate<string, MemberExpression>(null, (current, property) => Expression.Property(current ?? expr, property)); } } I receive the exception: System.ArgumentException: Instance property 'X' is not defined for type 'IBar' ReSharper turned the code in the link above into the condensed statement in my example. Both forms of the method returned the same error. If I reference IBar.Y the method does not fail.

    Read the article

  • Carbide / Symbian C++ - Change Application Icon

    - by adam
    I am using Carbide (just upgraded to 2.0) to develop an S60 3rd Edition application. I would like to know the easiest way to change the icon (both the application icon on the device menu and the icon at the top left of the main view) because I have the need to skin my application in many different ways as easily as possible. All my efforts with messing around with .mif files have so far failed. I have a 44x44 .svg icon I made with Illustrator, could someone please help me in the right direction? Thanks!

    Read the article

  • Can a memory page be moved by modifying the page table?

    - by Adam
    Is it possible (on any reasonable OS, preferably Linux) to swap the contents of two memory pages by only modifying the page table and not actually moving any data? The motivation is a dense matrix transpose. If the data were blocked by page size it would be possible to transpose the data within a page (fits in cache) then swap pages to move the blocks into their final place. A large matrix would have many many pages moved, so hopefully flushing the TLB wouldn't cause trouble.

    Read the article

  • Select only items in a specific DIV using HtmlAgilityPack

    - by Adam Haile
    I'm trying to use the HtmlAgilityPack to pull all of the links from a page that are contained within a div declared as <div class='content'> However, when I use the code below I simply get ALL links on the entire page. This doesn't really make sense to me since I am calling SelectNodes from the sub-node I selected earlier (which when viewed in the debugger only shows the HTML from that specific div). So, it's like it's going back to the very root node every time I call SelectNodes. The code I use is below: HtmlWeb hw = new HtmlWeb(); HtmlDocument doc = hw.Load(@"http://example.com"); HtmlNode node = doc.DocumentNode.SelectSingleNode("//div[@class='content']"); foreach(HtmlNode link in node.SelectNodes("//a[@href]")) { Console.WriteLine(link.Value); } Is this the expected behavior? And if so, how do I get it to do what I'm expecting?

    Read the article

  • google maps api v2 - tens of thousands of markers

    - by Adam
    Hello, my problem is with XXk (aka XX000) markers, atm I have 7k markers and will be more, and more, problem is in marker database, because atm this is 4MB (link to my DB http://tinyurl.com/ybau9ce) and problem is, how load that fast? for example DOWNLOAD only this what are show now, DOWNLOAD because load I have with ClusterMarker and problem is not with java but with download that database I think...

    Read the article

  • Implementing a Mutex Lock in C

    - by Adam
    I'm trying to make a really mutex in C and for some reason I'm getting cases where two threads are getting the lock at the same time, which shouldn't be possible. Any ideas why it's not working? void mutexLock(mutex_t *mutexlock, pid_t owner) { int failure; while(mutexlock->mx_state == 0 || failure || mutexlock->mx_owner != owner) { failure = 1; if (mutexlock->mx_state == 0) { asm( "test:" "movl $0x01,%%eax\n\t" // move 1 to eax "xchg %%eax,%0\n\t" // try to set the lock bit "mov %%eax,%1\n\t" // export our result to a test var "test %%eax,%%eax\n\t" "jnz test\n\t" :"=r"(mutexlock->mx_state),"=r"(failure) :"r"(mutexlock->mx_state) :"%eax" ); } if (failure == 0) { mutexlock->mx_owner = owner; //test to see if we got the lock bit } } }

    Read the article

  • [AS2] Use for variable as parameter and keep it different for each iteration

    - by Adam Kiss
    Hello, I have a basic for loop to loop through buttons and set some stuff and onPress handlers: for (i=1;i<=20;i++){ //do some stuff _root["button"+i].onPress = function(){ someMC.gotoAndStop(i+1); } } However, as I noticed, all buttonsthen link to one and same frame - all point to last i + 1 - Is there any possibility to call gotoAndStop with "static" Number, so in next iteration, it won't change? Edit: Ex. for last statement: Iteration 5 will call gAS /*gotoAndStop:]*/(6); Iteration 6 -> gAS(7); Iteration 7 -> gAS(8);

    Read the article

  • Input array is longer than the number of columns in this table

    - by Adam
    I've recently started to use SQLite and began to integrate it into a C# project I'm working on. However, randomly my project will throw the exception: Input array is longer than the number of columns in this table I'm having a hard time trying the trace the problem because it seems to be thrown on a random basis. DataTable table = new DataTable(); //exception is thrown here table = Global.db.ExecuteQuery("SELECT * FROM vm_manager"); Some of the data that gets returned from this query is as follows: http://i.imgur.com/9rlLN.png If anyone has any advice, I'd be grateful. EDIT: I'm unable to show the execute query function as it resides inside a dll from the following sql lite wrapper http://www.codeproject.com/KB/database/cs_sqlitewrapper.aspx

    Read the article

  • Rails How to get all the grandchildren of an ojbect.

    - by adam
    I have 3 models User has_many :quetions has_many :corrections end Question has_one :correction belongs_to :user end Correction belongs_to :user belongs_to :question So if user Bob asks a question then user Terry can check it and if its wrong offer a correction. Lets stay with bob and assume he as kindly corrected 5 other users, i.e and lets assume he has been lucky to get 3 corrections from other users. I want to be able to do something like this @bob.corrections_offered = 5 correction objects @bob.corrections_received = 3 correction objects the first one is easy as its really just @bob.corrections under the hood. But i dont know how to implement the latter one. Can anyone help?

    Read the article

  • What's the point of Mono on Windows

    - by Adam Haile
    This may be a dumb question...but I was just looking into the Mono project and they have a section about installing Mono on Windows. But, since Windows obviously already has the .NET runtime can anyone tell me what exactly is the point of having Mono for Windows? Does it help with cross platform development or something?

    Read the article

  • Handling incremental Data Modeling Changes in Functional Programming

    - by Adam Gent
    Most of the problems I have to solve in my job as a developer have to do with data modeling. For example in a OOP Web Application world I often have to change the data properties that are in a object to meet new requirements. If I'm lucky I don't even need to programmatically add new "behavior" code (functions,methods). Instead I can declarative add validation and even UI options by annotating the property (Java). In Functional Programming it seems that adding new data properties requires lots of code changes because of pattern matching and data constructors (Haskell, ML). How do I minimize this problem? This seems to be a recognized problem as Xavier Leroy states nicely on page 24 of "Objects and Classes vs. Modules" - To summarize for those that don't have a PostScript viewer it basically says FP languages are better than OOP languages for adding new behavior over data objects but OOP languages are better for adding new data objects/properties. Are there any design pattern used in FP languages to help mitigate this problem? I have read Phillip Wadler's recommendation of using Monads to help this modularity problem but I'm not sure I understand how?

    Read the article

  • How should I implement lazy session creation in PHP?

    - by Adam Franco
    By default, PHP's session handling mechanisms set a session cookie header and store a session even if there is no data in the session. If no data is set in the session then I don't want a Set-Cookie header sent to the client in the response and I don't want an empty session record stored on the server. If data is added to $_SESSION, then the normal behavior should continue. My goal is to implement lazy session creation behavior of the sort that Drupal 7 and Pressflow where no session is stored (or session cookie header sent) unless data is added to the $_SESSION array during application execution. The point of this behavior is to allow reverse proxies such as Varnish to cache and serve anonymous traffic while letting authenticated requests pass through to Apache/PHP. Varnish (or another proxy-server) is configured to pass through any requests without cookies, assuming correctly that if a cookie exists then the request is for a particular client. I have ported the session handling code from Pressflow that uses session_set_save_handler() and overrides the implementation of session_write() to check for data in the $_SESSION array before saving and will write this up as library and add an answer here if this is the best/only route to take. My Question: While I can implement a fully custom session_set_save_handler() system, is there an easier way to get this lazy session creation behavior in a relatively generic way that would be transparent to most applications?

    Read the article

  • Rounded corners?

    - by adam
    When converting PSD's into html or even html5 and css, how much more difficult is it to round the corners and make those corners consistent across all browsers especially IE. Assuming the corners were rounded with code not images.

    Read the article

  • Storing ASP.Net MVC Views in the Database

    - by Adam Albrecht
    For an ASP.Net MVC application, I'm interested in storing some views and/or partial views in the database so that a few semi-technical users can do some basic view logic. Does anyone have any tips or lessons from experience on doing this? I know Phil Haack wrote a blog post on this about a year ago. He used IronRuby for scripting his views, (which would be fine for me). He created a quick proof-of-concept, but I can't find any other information on the topic. Any ideas, thoughts, tips, etc would be appreciated. Thanks!

    Read the article

  • iPhone Text entry with completion and DONE button (not search)

    - by Adam Jack
    Using iPhone SDK 3.0, I wish to allow text entry with (optional) completion options that appear as typing is occurring, i.e. also allowing freeformat entry. As such I am using a UISearchBar (which has the text change events) and a UISearchDisplayController to present options. The problems is I want the DONE button to say DONE and not SEARCH, however I cannot find a way to set that. Clearly I feel I am missing something, or Interface Builder of the SDK API would have some property to set. I have seen other apps (in the store) that have achieved the result I want (free format entry, completion, DONE button) so maybe there is an alternative approach I am missing. Thanks in advance for any pointers.

    Read the article

  • IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference

    - by Adam Driscoll
    I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference: var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>(); var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this; var view = editorFactory.CreateVsTextViewAdapter(serviceProvider); 'this' is a Microsoft.VisualStudio.Shell.Package implementation. Any ideas?

    Read the article

  • Rails - How do I write this string condition as an array condition

    - by adam
    named_scope :correct, :include => :correction, :conditions => "checked_at IS NOT NULL AND corrections.id IS NULL" On a side note I have googled loads and looked through books but i cant seem to find a list of all the various types of conditions you can use and how they differ when implenting them as strings, arrays or hashes. Is there a list of the syntax anywhere?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >