Search Results

Search found 197 results on 8 pages for 'nate greenwood'.

Page 7/8 | < Previous Page | 3 4 5 6 7 8  | Next Page >

  • C# Event routing in code behind

    - by Nate
    I'm building a WPF MVVM-ish application. I want to be able to display an event log containing items in a collection that exists in my viewmodel. I want any of the objects in the model to be able to add data to the event log. Therefore every object needs to be able to pass data back to one central collection for databinding in the view. I could implement an event in every one of my data classes and manually pass the events up the object heirarchy but this seems super clumsy. On the visual tree a Routed Event would take care of this, is there some equivelent in the model scope? Any other ideas?

    Read the article

  • Embedded scripting engine in .Net app

    - by Nate
    I am looking to replace an old control being used for scripting an application. The control used to be called SAX Basic, but is now called WinWrap. It provides us with two primary functions. 1) It's a scripting engine (VB) 2) It has a GUI for developing and debugging scripts that get run in the hosting application. The first feature it provides is actually pretty easy to replace. There are so many great methods of running just about any kind of code at runtime that it's almost a non-issue. Just about any language targeting the .Net runtime will work for us. We've looked at running C#, PowerShell, VB.Net, IronPython, etc. I've also taken a brief look at Lua and F#, but honestly the language isn't the biggest barrier here. Now, for the hard part that seems to keep getting me stuck. We want a code editor, and debugger. Something simple, not unlike PowerShell's ISE would be fine. Just as long as a file could be created, saved, debugged and executed. I'm currently looking into Visual Studio 2010 Shell (Isolated) and I'm also looking at the feasibility of embedding PowerShell ISE in my application. Are there any other editor's I could embed/use in my application? Purchasing a product is not out of the question. It comes down to a combination of ease of use, how well it meets our needs, and how simple deployment and licensing is for developers. Thanks for the pointers

    Read the article

  • C# - Keep track of open child forms

    - by Nate Shoffner
    I currently have a parent control (Form1) and a child control (Form2). Form1 contains a listview that stores a list of of file data (each file is a separate item). Form2 contains only a textbox. Upon clicking on one of these listviewitems in Form1, Form2 is opened up and accesses the file's data and loads it into the textbox in Form2 in plain text format. The issue I'm having is, I would like to be able to detect, upon clicking of a listviewitem, whether that file is already opened in said child form and if so, to activate it (bring it to the front) and if it is not already opened, open it. I'm not sure what the best method of doing this would be since this can involve many child forms being open at once. This is not an MDI application. Any ideas on how this could be accomplished are appreciated and samples even more so. Thank you.

    Read the article

  • C# - .WAV Playback Randomly High Pitch

    - by Nate Shoffner
    For some reason, when a WAV file is played back using the snippet below, it randomly plays back screwy, like a high pitch noise. It doesn't happen all the time, just randomly. It seems to happen more often when it is played back more frequently. The WAV properties are below along with the code snippet I am using. WAV Properties: Bit Rate - 750kbps Audio Sample Size - 16 bit Channels - 1 (mono) Audio Sample Rate - 44kHz Audio Format - PCM Snippet: System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(Captcha.Properties.Resources.sound1); myPlayer.Play(); Is this because of the way I am playing the file or the file itself? Thank you.

    Read the article

  • DotNetOpenAuth I need some help please

    - by Nate Gates
    I know this has been posted before, but never really answered, I'm using the DotNetOpenAuth to try and do GoogleID login, and every time I do details = OResponse.GetExtension<ClaimsResponse>(); I always, always, always get back null, I don't get whats the point of the GoogleID if I can't get back any information, I would think at the very least I would get an email address, so I could associate it other login information in my databse. I just don't understand could really use some help, Im probably just looking at openID in the wrong way. I'm using ASP.NET and looking to use openID/Facebook as my sole means of logging in users, I really don't want to mess with membership roles, or extra junk that ASP.NET likes to add.

    Read the article

  • Why does jQuery's $().each() function seem to be losing track of the DOM?

    - by Nate Wagar
    I've recently started encountering a very strange problem. To be honest, I'm not entirely sure how to describe it other than to just show it. Here's the relevant HTML: <div class="component container w100 noEdit" id="contentWrapper"> <div class="component container w50" id="container1"> <div class="component text w50" id="text1"> Text1 </div> </div> <div class="component container w25" id="container2"> Container2 </div> <div class="component container w25" id="container3"> Container3 </div> <div class="component container w25" id="container4"> Container4 </div> </div> And the relevant JavaScript: $(document).ready(function () { //Add the Grab Bar to container components on the page. $('.component').each(wrapComponentForEdit); $('#contentWrapper').sortable(); $('#contentWrapper').disableSelection(); }); var wrapComponentForEdit = function() { if (!$(this).hasClass('noEdit')) { $(this).html('<div class="componentBorder">' + $(this).html() + '</div>'); $(this).prepend('<div class="grabBar_l"><div class="grabBar_r"><div class="grabBar"></div></div></div>'); alert($(this).attr('id')); } } The end result of this is that I see an alert pop up for container1, text1, container2, container3, container 4. And yet only the containers (not the text) end up with the visual changes that the $().each() is supposed to make. Anyone have any idea what the heck is going on? Thanks! EDIT - A different way to do it, that still fails I tried this, with the same result: $(document).ready(function () { //Add the Grab Bar to container components on the page. var matched = $('.component'); var componentCount = $(matched).size(); for (i = 0; i < componentCount; i++) { wrapComponentForEdit($(matched).eq(i)); } $('#contentWrapper').sortable({ handle: '.grabBarBit', tolerance: 'pointer'}); $('#contentWrapper').disableSelection(); }); var wrapComponentForEdit = function(component) { if (!$(component).hasClass('noEdit')) { $(component).html('<div class="grabBar_l grabBarBit"><div class="grabBar_r grabBarBit"><div class="grabBar grabBarBit"></div></div></div><div class="componentBorder">' + $(component).html() + '</div>'); alert($(component).attr('id')); } } EDIT 2: Another alternate method, but this one works I tried another way of doing things, and this way it works. However, the initial question still stands. Judging by how this new way works, it seems to me that the DOM is being updated, but jQuery isn't updating with it, so it loses track of the child element. $(document).ready(function () { //Add the Grab Bar to container components on the page. var componentCount = $('.component').size(); for (i = 0; i < componentCount; i++) { wrapComponentForEdit($('.component').eq(i)); } $('#contentWrapper').sortable({ handle: '.grabBarBit', tolerance: 'pointer'}); $('#contentWrapper').disableSelection(); }); var wrapComponentForEdit = function(component) { if (!$(component).hasClass('noEdit')) { $(component).html('<div class="grabBar_l grabBarBit"><div class="grabBar_r grabBarBit"><div class="grabBar grabBarBit"></div></div></div><div class="componentBorder">' + $(component).html() + '</div>'); alert($(component).attr('id')); } }

    Read the article

  • How to search a pdf after opening it from a new intent?

    - by Nate
    I've used the code from the PDF rendering question http://stackoverflow.com/questions/2883355/how-to-render-pdf-in-android And it works! Props to the answerer, but my question is about doing that same thing but also sending a keyword to search in the pdf. I have no idea how to do this, should I set a flag? Any help would be greatly appreciated.

    Read the article

  • Is there anything wrong with having a few private methods exposing IQueryable<T> and all public meth

    - by Nate Bross
    I'm wondering if there is a better way to approach this problem. The objective is to reuse code. Let’s say that I have a Linq-To-SQL datacontext and I've written a "repository style" class that wraps up a lot of the methods I need and exposes IQueryables. (so far, no problem). Now, I'm building a service layer to sit on top of this repository, many of the service methods will be 1<-1 with repository methods, but some will not. I think a code sample will illustrate this better than words. public class ServiceLayer { MyClassDataContext context; IMyRepository rpo; public ServiceLayer(MyClassDataContext ctx) { context = ctx; rpo = new MyRepository(context); } private IQueryable<MyClass> ReadAllMyClass() { // pretend there is some complex business logic here // and maybe some filtering of the current users access to "all" // that I don't want to repeat in all of the public methods that access // MyClass objects. return rpo.ReadAllMyClass(); } public IEnumerable<MyClass> GetAllMyClass() { // call private IQueryable so we can do attional "in-database" processing return this.ReadAllMyClass(); } public IEnumerable<MyClass> GetActiveMyClass() { // call private IQueryable so we can do attional "in-database" processing // in this case a .Where() clause return this.ReadAllMyClass().Where(mc => mc.IsActive.Equals(true)); } #region "Something my class MAY need to do in the future" private IQueryable<MyOtherTable> ReadAllMyOtherTable() { // there could be additional constrains which define // "all" for the current user return context.MyOtherTable; } public IEnumerable<MyOtherTable> GetAllMyOtherTable() { return this.ReadAllMyOtherTable(); } public IEnumerable<MyOtherTable> GetInactiveOtherTable() { return this.ReadAllMyOtherTable.Where(ot => ot.IsActive.Equals(false)); } #endregion } This particular case is not the best illustration, since I could just call the repository directly in the GetActiveMyClass method, but let’s presume that my private IQueryable does some extra processing and business logic that I don't want to replicate in both of my public methods. Is that a bad way to attack an issue like this? I don't see it being so complex that it really warrants building a third class to sit between the repository and the service class, but I'd like to get your thoughts. For the sake of argument, lets presume two additional things. This service is going to be exposed through WCF and that each of these public IEnumerable methods will be calling a .Select(m => m.ToViewModel()) on each returned collection which will convert it to a POCO for serialization. The service will eventually need to expose some context.SomeOtherTable which wont be wrapped into the repository.

    Read the article

  • Performance when querying a View

    - by Nate Bross
    I'm wondering if this is a bad practice or if in general this is the correct approach. Lets say that I've created a view that combines a few attributes from a few tables. My question, what do I need to do so I can query against this view as if it were a table without worrying about performance? All attributes in the original tables are indexed, my concern is that the result view will have hundreds of thousands of records, which I will want to narrow down quite a bit based on user input. What I'd like to avoid, is having multiple versions of the code that generates this view floating around with a few extra "where" conditions to facilitate the user input filtering. For example, assume my view has this header VIEW(Name, Type, DateEntered) this may have 100,000+ rows (possibly millions). I'd like to be able to make this view in SQL Server, and then in my application write querlies like this: SELECT Name, Type, DateEntered FROM MyView WHERE DateEntered BETWEEN @date1 and @date2; Basically, I am denormalizing my data for a series of reports that need to be run, and I'd like to centralize where I pull the data from, maybe I'm not looking at this problem from the right angle though, so I'm open to alternative ways to attack this.

    Read the article

  • Why doesn't HashTable.Contains() just simply return false if it is passed a null?

    - by Nate Pinchot
    I understand why passing a null to HashTable.Contains() doesn't work, but I don't understand what the point of it throwing an ArgumentNullException is - instead of just simply returning false? What is the benefit of throwing the exception (other than to make me do null checks before calling .Contains())? Caused By [System.ArgumentNullException] Key cannot be null. Parameter name: key at System.Collections.Hashtable.ContainsKey(Object key) at System.Collections.Hashtable.Contains(Object key)

    Read the article

  • C++: recursively computer all permutaions of digits 0 - 9

    - by Nate
    I have a homework assignment where part of the requirement is to recursively compute all the permutations of integers 0 - 9. The professor actually gave us the algorithm for this part of the question. I've finished the rest of the assignment, but I can't get the permute function working...I'm implementing it exactly like it was shown on the assignment information. However, when I run it each permutation is repeated multiple times (and I'm not sure if I'm even getting all the correct permutations.) I think he must've made a mistake on the assignment instructions. I've been working on this for a couple of hours and can't seem to figure out where I'm going wrong. Can anybody help point me in the right direction? Here's the current code: void permute(int v[], int curr) { for (int i = curr; i < MAX; i++) { swap(v[i], v[curr]); permute(v, curr + 1); swap(v[curr], v[i]); } } EDIT: Actually, right after posting this I realized it has to do with the swap, right? Because right now i and curr are the same, so I'm swapping identical numbers. Hm, should it be swap(v[i], v[curr+1])?

    Read the article

  • Reserved Memory Addresses?

    - by Nate
    Is there a list of reserved memory addresses out there - a list of addresses that the memory of a user-space program could never be allocated to? I realize this is most likely per-OS or per-architecture, but I was hoping someone might know some of the more common OSes and Arches. I could only dig one up for a few versions of windows: for windows NT,2k and XP that would be: 0x00000000 - 0x0000ffff - lowest page is protected to simplify debugging 0x00001000 - 0x7ffeffff - memory area for your application 0x7fff0000 - 0x7fffffff - protected area to keep memory-functions from damaging the following part 0x80000000 - 0xffffffff - memory where the system including drivers and so on is located Anyone know about for Linux, or BSD (or anything else, for that matter)?

    Read the article

  • Prism: How to render one view on top of another

    - by Nate Noonen
    We have a Prism/WPF application and are using an expander to animate a menu. When the expander expands, the content is rendered behind the main region's content. The menu is in a different region than the content it is supposed to overlay (since the menu governs what items go into that region) which is why this is occurring. We have tried setting the Z-Index of the ContentControls to no avail.

    Read the article

  • Dart Can't get logging statements to compile

    - by Nate Lockwood
    I'm trying to learn how to implement logging using the examples/tutorial in: http://blog.dartwatch.com/2013/05/campaign-to-use-real-logging-instead-of.html#comment-form But having imported the libraries this line in main will not compile because the class 'PrintHandler' is not recognized and Google has not been a help in this case. My server application consists of a main and three classes. I'm new at Dart. Below I've extracted the logging code that I added. In what library is 'PrintHandler'? Is this a class I need to write? library server; import 'package:logging_handlers/logging_handlers_shared.dart'; import 'package:logging/logging.dart'; final _serverLogger = new Logger("server"); // top level logger void main() { Logger.root.onRecord.listen(new PrintHandler()); // default PrintHandler _serverLogger.fine("Server created"); } class A { } class B { } class C { }

    Read the article

  • WPF Databinding and Styling based on Data in an item in an IList

    - by Nate Bross
    I have a ListBox bound to a list of Items (for arguement, lets say its got a string and two dates Entered and Done). I would like to make the background color of items in the ListBox have a gray color if the Done DateTime is != DateTime.MinValue. Edit: Should I make a converter? and convert DateTime to a Brush based on the value of the DateTime? Is something like this my best option? or is there a simple Xaml snippet I could use? [ValueConversion(typeof(DateTime), typeof(Brush))] class MyConverter : IValueConverter { ... }

    Read the article

  • Make a <div> square when there is a dynamically changing width based on percentage

    - by Nate
    I am working on a web app that will generate an NxN grid based on the user's selection of N. I want the total width of the grid to be relative (ie 100% of the available space) so that users can print on various paper sizes. I can easily calculate the width of the squares in the grid by % (ie: 100%/N), but I am having issues calculating the height. The height of a web page is always going to be infinite unless I artificially limit it which, like I said, I don't want to do. How can I make the squares in my grid be square versus rectangular when the height and width constraints of my grid are dynamic and not square? Thanks in advance!

    Read the article

  • HTTP 401.3 when PUT, DELETE to ADO.NET Data Service (.svc)

    - by Nate
    I have an ADO.NET Data Service (we'll call it service.svc). When I deploy it to an IIS 6 site with Integrated Windows Authentication turned on, all requests (GET, POST, PUT, and DELETE) work fine for me, because I am an administrator on the box. However, when a non-admin user hits the service, only GET and POST requests work. When they try a PUT or DELETE request, they get an HTTP 401.3 "Access is Denied" error: "Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the web server's administrator to give you access to '...\service.svc'." If I give the "Authenticated Users" local group write access to the .svc file, everything works as it should, but I really don't want to do this (and don't think I should have to do this to get this to work). In fact, I'm confused as to why changing the file permissions would affect this at all, but it definitely seems to be the problem. I've found a couple of different suggestions to fix somewhat similar problems in the Microsoft forums (Here, and I would post more links, but am being told that new users can only post one link in a post), but none of the solutions help. Any help is much appreciated. I am certainly no IIS expert, and this one has got me stumped.

    Read the article

  • Returning a list in this recursive coi function in python.

    - by Nate
    Hello. I'm having trouble getting my list to return in my code. Instead of returning the list, it keeps returning None, but if I replace the return with print in the elif statement, it prints the list just fine. How can I repair this? def makeChange2(amount, coinDenomination, listofcoins = None): #makes a list of coins from an amount given by using a greedy algorithm coinDenomination.sort() #reverse the list to make the largest position 0 at all times coinDenomination.reverse() #assigns list if listofcoins is None: listofcoins = [] if amount >= coinDenomination[0]: listofcoins = listofcoins + [coinDenomination[0]] makeChange2((amount - coinDenomination[0]), coinDenomination, listofcoins) elif amount == 0: return listofcoins else: makeChange2(amount, coinDenomination[1:], listofcoins)

    Read the article

  • Monitor File Changes On Windows System

    - by user10487
    I am looking for a utility that can take a snapshot of the files in directories that I am interested in and then compare that snapshot to the current state of the system and show me any files that have been added, changed, or deleted. Does anyone know of solutions that provide this functionality? Thanks, Nate

    Read the article

  • How to use USB Key in Xen 5.6 Environment?

    - by Az
    I am looking for a way to use USB key on a guest OS running on a 5.6 Xen Server environment. The catch is that I need to actually detect in the Guest OS (Win2003 Server) like an actual USB Key. Attaching it as a storage drive doesnt work (It is a key with special attributes that servers as a licensing mechanism). Just wondering if anyone has had a similar need and found a good solution? Thanks, Nate

    Read the article

  • Google I/O 2012 - Android Design for Success

    Google I/O 2012 - Android Design for Success Rachel Garb, Jens Nagel, Nate Streu, Matias Duarte You have a great idea for an Android app. You want it to stand out among hundreds of thousands. You want your users to love it and tell everyone they know. The Android User Experience team is here to help. We'll talk about the Android Design guide and other tricks of the trade for creating apps that delight users and help them accomplish their goals. No design background is required. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 46 5 ratings Time: 01:03:04 More in Science & Technology

    Read the article

< Previous Page | 3 4 5 6 7 8  | Next Page >