Search Results

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

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

  • XSLT - Catching parameters

    - by Brian Roisentul
    The situation is I have two xslt files: one is called from my ASP.NET code, and there, the second xslt file is imported. What I'd like to accomplish is to pass a parameter to the first one so the second xslt(the one that is imported at the first xslt) can read it. My c# code looks like this: var oArgs = new XsltArgumentList(); oArgs.AddParam("fbLikeFeatureName", "", "Facebook_Like_Button"); ltlContentBody.Text = xmlUtil.TransformXML(oXmlDoc, Server.MapPath(eSpaceId + "/styles/ExploringXSLT/ExploreContentObjects.xslt"), true); And I'm catching the param at the first xslt this way: <xsl:param name="fbLikeFeatureName" /> And then, passing it to the second xslt like this(previously, I import that file): <xsl:call-template name="Articles"> <xsl:with-param name="fbLikeFeatureName"></xsl:with-param> </xsl:call-template> Finally, I'm catching the param on the second xslt file as following: <xsl:value-of select="$fbLikeButtonName"/> What Am I doing wrong? I'm kind of new at xslt.

    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

  • 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

  • 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

  • iphone dev - activity indicator scroll with the table

    - by Brian
    In a view of my app I subclass tableViewController and has an activity indicator shown up when the table content is loading. I put it in the center of the screen but it scroll with the tableView (I guess the reason is I add it as a subview of the table view). Is there a way that I can keep the activity indicator in the center of the screen even the table is scrolling? Thanks in advanced.

    Read the article

  • C++ smart pointer for a non-object type?

    - by Brian
    Hi, I'm trying to use smart pointers such as auto_ptr, shared_ptr. However, I don't know how to use it in this situation. CvMemStorage *storage = cvCreateMemStorage(); ... use the pointer ... cvReleaseMemStorage(&storage); I'm not sure, but I think that the storage variable is just a malloc'ed memory, not a C++ class object. Is there a way to use the smart pointers for the storage variable? Thank you.

    Read the article

  • Problem changing Java version using alternatives

    - by Brian Lewis
    I'm not quite sure how I got into this mess, but for some reason I'm not able to change the current version of Java using alternatives. I can run alternatives --config java and type my selection but when I echo the version number for either java or javac, it spits back out 1.5 every time (despite alternatives showing the current version is 1.6). The server I'm working with is running RHEL5, by the way. I have verified that the paths used in alternatives are pointing to the correct directories. Here's some output from my session: [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java + 2 /usr/java/jdk1.5.0_10/bin/java 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number: 3 [brilewis@myserver]$ java -version java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode) [brilewis@myserver]$ sudo /usr/sbin/update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ** 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java 2 /usr/java/jdk1.5.0_10/bin/java + 3 /usr/java/jdk1.6.0_16/bin/java Enter to keep the current selection[+], or type selection number:

    Read the article

  • Is it valid for RSS feeds to include images with relative paths?

    - by Brian Armstrong
    I have an app which reads lots of RSS feeds. Someone added a feed recently that includes images in the html portion with relative URLS (i.e. it didn't include the http://www.domain.com/ part in front). Is this valid html for an RSS feed? I thought not, but I tried adding the feed to my Google reader and it picked up the images correctly, so they must be doing something smart where they guess the domain based on the feed's url parameter or something. Even if it's not valid, how common is it to see feeds like this in the wild? To display it correctly would require you to parse the html in the feed and find/replace parts of it to insert full URL's, so this seems wrong. But wanted to double check.

    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

  • Ruby get inheriting class

    - by Brian D.
    I'm working on creating my first plugin for rails. I'm still pretty new to ruby and I was wondering if its possible to get the inheriting class? For example, I'm trying to create a plugin that will allow unit testing and functional testing when you are not using migrations. What I'm trying to do is initialize a class variable named controller to be initialized to the type of controller that is being tested. If I have a base class ControllerTest: class ControllerTest < Test::Unit::TestCase attr_accessor :controller def initialize super @controller = "call function that will find the inheriting classes name and create an instance of that controller type." end end So what I'm currently stuck on is getting the name of the inheriting class. Is this possible? And if not, does anyone know another way on how I could go about implementing this? Thanks in advance.

    Read the article

  • How to package up a Python 3 script with modules

    - by Brian
    I created a small script that uses a few 3rd-party modules. I'm not sure how to distribute it. I tried Pyinstaller, but that doesn't seem to work. It can't find the modules. When I give the binary to a co-worker, it says it is looking for files in my home directory ( not his ) and dies. I have found that Pyinstaller is not able to find most modules. I am running Python 3 and installed Pyinstaller with pip from Python 2. It did not work trying to use pip from Python 3. When, I give it a path to my modules, it complains that they are python 3 modules. Just looking for some clarification. Ultimately, I'd like to run this on a linux or OS X box where python and my modules probably won't be installed. I just started Python yesterday and have a ton to learn.

    Read the article

  • DocuSign Connect xsd [on hold]

    - by Brian
    I'm trying to parse xml inbound to our system from the DocuSign Connect service (which publishes status updates to a given web service). I typiclly use jaxb to process xml but as far as I know I need xsd's in order to generate the jaxb. I don't have (or can't find) xsd's from DocuSign in order to do this. I could use other java classes/libraries to parse the xml but without xsd's I'd have to guess at types, restrictions and formats. Is there a way to generate jaxb without having xsd's?

    Read the article

  • Semantic stuff (RDF, OWL) on mobile phones - is it possible?

    - by Brian Schimmel
    I'm thinking about using semantic (web) technogies like RDF and OWL in an application on mobile devices. Currently I'm targeting android, but I'd also be interested in the possibilities on the iPhone and on J2ME. I would like to use a lib instead of implementing everything from scratch. I know that there are some libraries and frameworks like Jena, Redland, Protégé but they don't state on which platforms they are known to work. Having a dynamic object model and parsing from and to XML are must-haves for me. I'd also like to use reasoning, but I've been told it was rather computing-intensive, so that's only a nice-to-have. For all platforms mentioned, the question can be interpreted as Is it possible in theory (especially for J2ME I'm not sure) Are there libs that are known to work on those platforms? Is the performance on a mobile platform good enough for real world usage?

    Read the article

  • Java CountDownLatch used to wait for JFrame to dispose

    - by Brian
    I have referenced this previous question as well as other sources, but cannot get CountDownLatch to work correctly. Background: mainFrame creates new Frame called dataEntryFrame. When dataEntryFrame "Submit" button is clicked, record added to database and dataEntryFrame disposed. At this point, mainFrame should clear and reload a jList that shows all records. Issue: When dataEntryFrame loads, java freezes, dataEntryFrame components never load. I cannot get past this part... then, in the DataEntryFrame, CountDownLatch should only decrements after the submit button is clicked, successfully adds a record to a database table, and disposes itself. Or when the user clicks cancel... Code: From MainFrame CountDownLatch dataEntryDone = new CountDownLatch(1); DataEntryFrame f = new DataEntryFrame(dataEntryDone); Thread newThread = new Thread(f); newThread.start(); dataEntryDone.await(); Code: From DataEntryFrame public void run(){ initComponents(); loadOtherData(); this.setVisible(true); } void submit(){ addRecord(); this.dispose() dataEntryDone.countDown(); }

    Read the article

  • C++ Win32 API equivalent of CultureInfo.TwoLetterISOLanguageName

    - by Brian Gillespie
    The .NET framework makes it easy to get information about various locales; the Win32 C++ APIs are a bit harder to figure out. Is there an equivalent function in Win32 to get the two-letter ISO language name given an integer locale ID? In C# I'd do: System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(1034); string iso = ci.TwoLetterISOLanguageName; // iso == "es" now.

    Read the article

  • Rails functional testing without migrations

    - by Brian D.
    The name pretty much says it all. Does anyone know how to accomplish functional testing when you are not using migrations in Rails? I'd be open to any advice or third party libraries (if there are any). I thought of creating my own plugin to address this but it seems like a pretty big task and would rather not do this unless necessary. Thanks in advance.

    Read the article

  • MySQL Select names with last names starting with certain letter

    - by Brian
    I have a MySQL database with a field Name which contains full names. To select all people with last names starting with a particular letter, let's say A for this example, I use the following query: SELECT * FROM db WHERE Name LIKE '% A%'. However, this also selects users who have a middle name starting with A. Is there anyway to alter this query so that only a last name starting in A will be selected?

    Read the article

  • copy an element as HTML to clipboard

    - by Brian Scott
    I've managed to write some jQuery to find an element and copy it's html to the clipboard (ie only). The problem is that when I paste this into a rich text box area in sharepoint it pastes the HTML as text only. How do i replicate the user action of highlighting a link on a page and pressing copy. When I do this manually and then paste the clipboard contents the rich text area realises that it is markup and replicates the link as an anchor in the text content.

    Read the article

  • .NET TDD with a Database and ADO.NET Entity Framework - Integration Tests

    - by Brian
    Hello, I'm using ADO.NET entity framework, and am using an AdventureWorks database attached to my local database server. For unit testing, what approaches have people taken to work with a database? Obviously, the database has to be in a pre-defined state of change so that the tests can have some isolation from each other... so I need to be able to run through the inserts and updates, then rollback either between tests or after the batch of tests are done. Any advice? Thanks.

    Read the article

  • PHP / Zend Framework: Force prepend table name to column name in result array?

    - by Brian Lacy
    I am using Zend_Db_Select currently to retrieve hierarchical data from several joined tables. I need to be able to convert this easily into an array. Short of using a switch statement and listing out all the columns individually in order to sort the data, my thought was that if I could get the table names auto-prepended to the keys in the result array, that would solve my problem. So considering the following (assembled) SQL: SELECT user.*, contact.* FROM user INNER JOIN contact ON contact.user_id = user.user_id I would normally get a result array like this: [username] => 'bob', [contact_id] => 5, [user_id] => 2, [firstname] => 'bob', [lastname] => 'larsen' But instead I want this: [user.user_id] => 2, [user.username] => 'bob', [contact.contact_id] => 5, [contact.firstname] => 'bob', [contact.lastname] => 'larsen' Does anyone have an idea how to achieve this? Thanks!

    Read the article

  • What does Rails script/server -d do differently that would cause a cells template to not be found

    - by Brian Deterling
    I'm using cells. I used the generator to create a cell so the path to my template was automatically chosen to be app/cells/displayer/table.html.erb where displayer is the name of the cell and table is the name of the state. When I run script/server in the foreground, everything works perfectly. But when I run script/server -d, I get "Missing template displayer/table.erb in view path app/cells:app/cells/layouts". Even if I change table.html.erb to table.erb, I see the same message - the ActionView code is checking both but not finding either. Even if you're not familiar with cells, does anyone know what happens differently in daemon mode related to view paths? In this case, it appears that the plugin is not correctly registering the view path.

    Read the article

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