Search Results

Search found 187 results on 8 pages for 'nate shoffner'.

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

  • 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

  • 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

  • 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

  • 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#, Fastest (Best?) Method of Identifying Duplicate Files in an Array of Directories

    - by Nate Greenwood
    I want to recurse several directories and find duplicate files between the n number of directories. My knee-jerk idea at this is to have a global hashtable or some other data structure to hold each file I find; then check each subsequent file to determine if it's in the "master" list of files. Obviously, I don't think this would be very efficient and the "there's got to be a better way!" keeps ringing in my brain. Any advice on a better way to handle this situation would be appreciated.

    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

  • 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

  • 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

  • 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

  • How can I get my meshes to work with Bullet Physics?

    - by Molmasepic
    The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game. When I attempted doing this method with my GLM(model loading library by nate robins) model, I get a segmentation fault in the debug, so I figured that it doesnt like the coordinate variables of the model. If i use blender to export my model as a collision file, what type of file should I use? I have heard of a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program.

    Read the article

  • Fullcalendar jquery plugin Show years on nextYear buttons

    - by Nathan Neff
    I'm using the fullcalendar jquery plugin, and would like to display 2009 and 2011 in the nextYear and prevYear buttons. For exmaple: 2009 May 2010 2011 I know I can put static text on the buttons like this: buttonText: { prevYear: '2009', nextYear: '2011' }, But I would like those years to change, depending on the year that the calendar is currently viewing. There's documentation about 'year' here: http://arshaw.com/fullcalendar/docs/current_date/ but I don't know how to get that 'year' property. Any examples would be appreciated, Thanks, --Nate

    Read the article

  • Visual Studio 2008 Report Server Project Design View not working.

    - by skynate
    When I create a new Reporting Services report or try to open an existing report (that has been working) in Visual Studio 2008. I cannot view the design. I get no error message and it only shows html code in the "Design View". I've tried reinstalling VS2008 and BIDS, but hasn't worked. This was all working when I last used it 2 weeks ago. -nate

    Read the article

  • find: Prevent .git folders from printing to STDOUT

    - by Nathan Neff
    Hello, I have a find command that I run, to find files named 'foo' in a directory. I want to skip the ".git" directory. The command below works, EXCEPT, it prints an annoying ".git" any time it skips a .git directory find . ( -name .git ) -prune -o -name 'foo' How can I prevent the skipped ".git" directories from printing to STDOUT? Thanks, --Nate

    Read the article

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