Search Results

Search found 1393 results on 56 pages for 'brian genisio'.

Page 35/56 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Simple way to use Foreign Key values for sorting?

    - by Brian Rizzo
    Disclaimer: I jumped to C# 2008 recently and SubSonic 3 (3.0.0.4) at the same time. I haven't used Linq for much of anything in the past. Is there an easy way to use the foreign key display value for sorting, rather than the FK Id (which is numeric)? I've added a new Find method in my ActiveRecord.tt to help with sorting based on a string field name but after doing some testing I realized that even though its working as it should be, I am not handling foreign key fields at all (they are just sorting by their value). Even if I need to change how I am accessing the data it is early enough in the project to do that. Just looking for suggestions.

    Read the article

  • Does Eclipse Ganymede have a mouse-click bug in the Navigator view?

    - by Brian Deacon
    I've had to downgrade from Galileo to Ganymede in order to use the version of the FlexBuilder plugin that we are licensed for. Since the downgrade, I have several times accidentally dragged files or entire folders from one part of my project into another (or even into another project). I blamed this on fatfingers the first couple times, but I just now watched it do it to me on what I definitely know to have been a single left click on the folder that the file ended up moving to. Does anybody know if this is a known issue with Ganymede?

    Read the article

  • SED: Matching on 2 patterns on the same line

    - by Brian Knott
    Hi I want to delete a line using sed if it matches 2 regular expressions in the same line. EG the line starts with /* and end with */ (comment). The following script will do most of that. sed -e '/^\/*/ d' -e '/*\/$/ d' filename This script will remove all lines that start with * and end with */. I want it to remove the line only if is meets both criteria not one.

    Read the article

  • What would make offsetParent null?

    - by Brian Ramsay
    I am trying to do positioning in JavaScript. I am using a cumulative position function based on the classic quirksmode function that sums offsetTop and offsetLeft for each offsetParent until the top node. However, I am running into an issue where the element I'm interested in has no offsetParent in Firefox. In IE offsetParent exists, but offsetTop and offsetLeft all sum up to 0, so it has the same problem in effect as in Firefox. What would cause an element that is clearly visible and usable on the screen to not have an offsetParent? Or, more practically, how can I find the position of this element in order to place a drop-down beneath it?

    Read the article

  • Java - Creating a Compiler Help

    - by Brian
    So for my programming class we have had a project to create a virtual machine including a memory unit, cpu, Input, Output, Instruction Register, Program Counter, MAR, MDR and so on. Now we need to create a compiler using Java Code that will take a .exe file written in some txt editor and convert it to java byte code and run the code. The code we will be writing in the .exe file is machine code along the lines of: IN X IN Y ADD X STO Y OUT Y STOP DC X 0 DC Y 0 I am just a beginner and only have 2 days to write this and am very lost and have no idea where to start....Any Help will be much appreciated. Thanks

    Read the article

  • Collection wrapping a array is read-only. Possible to make it writeable without casting?

    - by Brian Triplett
    I have a Collection<T> property that wraps a array like T[] array; public Collection<T> Items { get { return new Collection<T>(array); } } When I attempt to assign to the collection via: T variable; Items[i] = variable; I get a NotSupportedException because the colleciton's IsReadOnly property is true. Turns out that this is a design choice by Microsoft. Does anyone know a workaround that does NOT involve enumeration? It could be done if the underlying data is not an array but I enjoy the performance gains because the data is fixed length.

    Read the article

  • Self updating application install with WIX?

    - by Brian ONeil
    I am writing an application that needs to be installed on a large number of desktops and also needs to update itself. We are looking at WIX for creating the installation. I have used ClickOnce and it is not a good solution for this install. WIX seems to fit, but there is no good process for auto update that I have found. I have looked at ClickThrough, but it doesn't seem ready for prime time yet. Does anyone have another good solution to use with WIX (or maybe another install program) to auto update an application install?

    Read the article

  • What are good educational resources for setting up .Net Webservice on a DMZ connecting to SQL Server

    - by Brian
    We are going to begin implementing a web service that will be hosted on a DMZ server. This web server will post data to a SQL server and we're trying to determine the best methodology to handle this. Things that concern us are web service authentication, SOAP, and whether or not to store the database on the DMZ or the local network. This same scenario will apply to ASP.Net apps. Trust me, I've already searched the web, but as usual, the online resources I've found either talk about just authentication, or just about SOAP, or etc, but does not show or suggest how the entire system can work together. Can you give me a list of resources such as links that I've missed, books, classes, or etc that would help? Thank You.

    Read the article

  • Should you remove all warnings in your Verilog or VHDL design? Why or why not?

    - by Brian Carlton
    In (regular) software I have worked at companies where the gcc option -Wall is used to show all warnings. Then they need to be dealt with. With non-trivial FPGA/ASIC design in Verilog or VHDL there are often many many warnings. Should I worry about all of them? Do you have any specific techniques to suggest? My flow is mainly for FPGAs (Altera and Xilinx in particular), but I assume the same rules would apply to ASIC design, possibly more so due to the inability to change the design after it is built.

    Read the article

  • CDI timeout results in an NPE

    - by Brian Leathem
    Is there a way (in JSF 2) to catch a Conversation timeout and redirect a user to a new page? I'm getting nasty NullPointerExceptions when the conversation times out. I could redirect the user on all NPE's, but that seems like too big a net.

    Read the article

  • Design patterns to avoid

    - by Brian Rasmussen
    A lot of people seem to agree, that the Singleton pattern has a number of drawbacks and some even suggest to avoid the pattern all together. There's an excellent discussion here. Please direct any comments about the Singleton pattern to that question. Are there other design patterns, that should be avoided or used with great care?

    Read the article

  • Xml files stop being served by IIS6 after allowing .net to process the .xml extension

    - by Brian Surowiec
    I added a route into my site to allow for a sitemap and everything worked fine in IIS7 but once I deployed the route stopped working. Since the live server is running IIS6 I needed to put a new mapping in for .xml to be processed by .net and then it started to work. My issue though is on every other xml file on the site now. I keep getting a 404 error when trying to view xml files, but the sitemap.xml route works. Is this a routing issue or an IIS setup issue? Here are my routes if it will help routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Gallery-Group-View", "Projects/{groupId}", new { controller = "Gallery", action = "GalleryList", groupId = "" }); routes.MapRoute( "Gallery-List-View", "Projects/{groupId}/{galleryId}", new { controller = "Gallery", action = "GalleryView", groupId = "", galleryId = "" }); routes.MapRoute( "Sitemap", "Sitemap.xml", new { controller = "XML", action = "Sitemap" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } );

    Read the article

  • Display message when user leaves site

    - by Brian Rasmusson
    Hi, I'm looking for a way to display a message to the user if he leaves my site after only viewing one page. I found this (http://www.pgrs.net/2008/1/30/popup-when-leaving-website) clever solution, but it has a few flaws: staying_in_site = false; Event.observe(document.body, 'click', function(event) { if (Event.element(event).tagName == 'A') { staying_in_site = true; } }); window.onunload = popup; function popup() { if(staying_in_site) { return; } alert('I see you are leaving the site'); } It displays the message also when refreshing the page or using the back button. Do you know a better solution or how to fix it in the above code? I'm no javascript master :) My intention is to add the code on very specific landing pages only, and display the message when people leave the page without downloading my trial software or reading other pages on my site.

    Read the article

  • NOAA web service for current weather

    - by Brian
    I want to get the current weather conditions from the NOAA. I know they have a SOAP web service that can be used to get weather forecasts and XML files for current weather conditions for each of their weather stations. I could just use the XML file for the weather station nearest to where I want, but there doesn't seem to be an easy way to search for the proper xml file by zipcode. Is there a simple way to get current weather conditions by zipcode from the NOAA?

    Read the article

  • iPhone CALayer Stacking Order

    - by Brian
    I'm using CALayers to draw to a UITableViewCell. I'm trying to figure out how layers are ordered with the content of the UITableViewCell. For instance: I add labels to the UITableViewCell in my cellForRow:atIndexPath method In the drawRect method of UITableViewCell I draw some content using the current context Also, in drawRect I add a few sublayers So what would be the order of these elements. I know I have zPosition on the CALayers but I'm not sure if they are always on top of any subviews of the UITableViewCell. And I'm not sure where the content that is drawn in drawRect comes in the order. Any help or links to documentation would be great. I have read through the Core Animation Programming Guide and didn't see anywhere where this would be answered.

    Read the article

  • How do I get rid of these warnings?

    - by Brian Postow
    This is really several questions, but anyway... I'm working with a big project in XCode, relatively recently ported from MetroWorks (Yes, really) and there's a bunch of warnings that I want to get rid of. Every so often an IMPORTANT warning comes up, but I never look at them because there's too many garbage ones. So, if I can either figure out how to get XCode to stop giving the warning, or actually fix the problem, that would be great. Here are the warnings: It claims that <map.h> is antiquated. However, when I replace it with <map> my files don't compile. Evidently, there's something in map.h that isn't in map... this decimal constant is unsigned only in ISO C90 This is a large number being compared to an unsigned long. I have even cast it, with no effect. enumeral mismatch in conditional expression: <anonymous enum> vs <anonymous enum> This appears to be from a ?: operator. Possibly that the then and else branches don't evaluate to the same type? Except that in at least one case, it's (matchVp == NULL ? noErr : dupFNErr) And since those are both of type OSErr, which is mac defined... I'm not sure what's up. It also seems to come up when I have other pairs of mac constants... multi-character character constant This one is obvious. The problem is that I actually NEED multi-character constants... -fwritable-strings not compatible with literal CF/NSString I unchecked the "Strings are Read-Only" box in both the project and target settings... and it seems to have had no effect...

    Read the article

  • Prefered method for looping sound flash as3

    - by Brian Heylin
    Hi there, I'm having some issues with looping a sound in flash AS3, in that when I tell the sound to loop I get a slight delay at the end/beginning of the audio. The audio is clipped correctly and will play without a gap on garage band. I know that there are issues with sound in general in flash, bugs with encodings and the inaccuracies with the SOUND_COMPLETE event (And Adobe should be embarrassed with their handling of these issues) I have tried to use the built in loop argument in the play method on the Sound class and also react on the SOUND_COMPLETE event, but both cause a delay. But has anyone come up with a technique for looping a sound without any noticeable gap?

    Read the article

  • How does an NSTextField know that it's value has changed?

    - by Brian Postow
    I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can page up and down with the next/prev buttons) I have the value of the text field bound to an int page variable. It seems to work correctly, when you type a page number in, it jumps, when you page up and down, the page number in the text box changes appropriately. However, at some level, when I page up and down, the text box doesn't seem to know that it's value has changed, because if I type 1 it doesn't do anything. It doesn't call the bound set-method or anything. It looks like the textfield is thinking "I'm already 1, so I don't need to do anything." Even though it was 5 because I hit next 4 times. If I type an number other than 1, it goes there. If I THEN type 1, it goes to page 1, because now it thinks it's on that other page. The problem seems to be that I'm changing the value of the textfield programatically, but some part isn't getting the message. Does this seem like a reasonable explanation? And either way, any ideas on what's causing it? thanks

    Read the article

  • parallel computation for an Iterator of elements in Java

    - by Brian Harris
    I've had the same need a few times now and wanted to get other thoughts on the right way to structure a solution. The need is to perform some operation on many elements on many threads without needing to have all elements in memory at once, just the ones under computation. As in, Iterables.partition is insufficient because it brings all elements into memory up front. Expressing it in code, I want to write a BulkCalc2 that does the same thing as BulkCalc1, just in parallel. Below is sample code that illustrates my best attempt. I'm not satisfied because it's big and ugly, but it does seem to accomplish my goals of keeping threads highly utilized until the work is done, propagating any exceptions during computation, and not having more than numThreads instances of BigThing necessarily in memory at once. I'll accept the answer which meets the stated goals in the most concise way, whether it's a way to improve my BulkCalc2 or a completely different solution. interface BigThing { int getId(); String getString(); } class Calc { // somewhat expensive computation double calc(BigThing bigThing) { Random r = new Random(bigThing.getString().hashCode()); double d = 0; for (int i = 0; i < 100000; i++) { d += r.nextDouble(); } return d; } } class BulkCalc1 { final Calc calc; public BulkCalc1(Calc calc) { this.calc = calc; } public TreeMap<Integer, Double> calc(Iterator<BigThing> in) { TreeMap<Integer, Double> results = Maps.newTreeMap(); while (in.hasNext()) { BigThing o = in.next(); results.put(o.getId(), calc.calc(o)); } return results; } } class SafeIterator<T> { final Iterator<T> in; SafeIterator(Iterator<T> in) { this.in = in; } synchronized T nextOrNull() { if (in.hasNext()) { return in.next(); } return null; } } class BulkCalc2 { final Calc calc; final int numThreads; public BulkCalc2(Calc calc, int numThreads) { this.calc = calc; this.numThreads = numThreads; } public TreeMap<Integer, Double> calc(Iterator<BigThing> in) { ExecutorService e = Executors.newFixedThreadPool(numThreads); List<Future<?>> futures = Lists.newLinkedList(); final Map<Integer, Double> results = new MapMaker().concurrencyLevel(numThreads).makeMap(); final SafeIterator<BigThing> it = new SafeIterator<BigThing>(in); for (int i = 0; i < numThreads; i++) { futures.add(e.submit(new Runnable() { @Override public void run() { while (true) { BigThing o = it.nextOrNull(); if (o == null) { return; } results.put(o.getId(), calc.calc(o)); } } })); } e.shutdown(); for (Future<?> future : futures) { try { future.get(); } catch (InterruptedException ex) { // swallowing is OK } catch (ExecutionException ex) { throw Throwables.propagate(ex.getCause()); } } return new TreeMap<Integer, Double>(results); } }

    Read the article

  • How might maven's buildNumber metadata become inconsistent across multiple build agents?

    - by Brian Laframboise
    We recently added a second build machine to our build environment and began experiencing very odd occasional build failures. I have two separate Maven build machines, A and B, each running Maven 2.2.1 and communicating to a shared Nexus 1.5.0 repository manager. My problem is that builds on B will occasionally fail because it refuses to download a newer version of a common dependency 'acme-1.0.0-SNAPSHOT' previously built by A and uploaded to Nexus. Looking inside the local repositories on both machines I noticed some oddities in the repository metadata. Machine A's acme\1.0.0-SNAPSHOT\maven-metadata-nexus.xml: <metadata> <groupId>acme</groupId> <artifactId>acme</artifactId> <version>1.0.0-SNAPSHOT</version> <versioning> <snapshot> <buildNumber>1</buildNumber> </snapshot> <lastUpdated>20100525173546</lastUpdated> </versioning> </metadata> Machine B's acme\1.0.0-SNAPSHOT\maven-metadata-nexus.xml: <metadata> <groupId>acme</groupId> <artifactId>acme</artifactId> <version>1.0.0-SNAPSHOT</version> <versioning> <snapshot> <buildNumber>2</buildNumber> </snapshot> <lastUpdated>20100519232317</lastUpdated> </versioning> </metadata> In Nexus's acme/1.0.0-SNAPSHOT/maven-metadata.xml: <metadata> <groupId>acme</groupId> <artifactId>acme</artifactId> <version>1.0.0-SNAPSHOT</version> <versioning /> </metadata> If I'm interpreting the metadata files correctly (documentation online is scant), it appears machine B believes it has a newer version of the acme dependency (based on buildNumber) despite the fact that machine A last built it 6 days after machine B did (based on timestamp). Nexus also appears to be unaware of a universally correct buildNumber. How could this situation possibly arise? What could I do to prevent my builds from failing due to inconsistent metadata? Have you experienced anything similar? Important notes: Both build machines have settings.xml files where the updatePolicy is "always". Nexus does indeed have the newer version of acme that was built by A. B simply refuses to download it. A and B are the only machines uploading to Nexus. Both servers share the same system time. All processes involved have write privileges to the metadata files so that they can be updated as necessary. I was unable to find any open Maven or Nexus issues describing this behaviour. Our CI server (Atlassian Bamboo) prevents builds of the same artifact from happening concurrently, so some race condition while uploading to Nexus is rather unlikely.

    Read the article

  • Can I interrupt javascript code and then continue on a keystroke?

    - by Brian Ramsay
    I am porting an old game from C to Javascript. I have run into an issue with display code where I would like to have the main game code call display methods without having to worry about how those status messages are displayed. In the original code, if the message is too long, the program just waits for the player to toggle through the messages with the spacebar and then continues. This doesn't work in javascript, because while I wait for an event, all of the other program code continues. I had thought to use a callback so that further code can execute when the player hits the designated key, but I can't see how that will be viable with a lot of calls to display.update(msg) scattered throughout the code. Can I architect things differently so the event-based, asynchronous model works, or is there some other solution that would allow me to implement a more traditional event loop? Am I making sense? Example: // this is what the original code does, but obviously doesn't work in Javascript display = { update : function(msg) { // if msg is too long // wait for user input // ok, we've got input, continue } }; // this is more javascript-y... display = { update : function(msg, when_finished) { // show part of the message $(document).addEvent('keydown', function(e) { // display the rest of the message when_finished(); }); } }; // but makes for amazingly nasty game code do_something(param, function() { // in case do_something calls display I have to // provide a callback for everything afterwards // this happens next, but what if do_the_next_thing needs to call display? // I have to wait again do_the_next_thing(param, function() { // now I have to do this again, ad infinitum } }

    Read the article

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