Search Results

Search found 1506 results on 61 pages for 'ben mezger'.

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

  • How can I adjust the CommandTImeout in DbFit for long running queries?

    - by Ben Farmer
    Is there any way to increase the CommandTimeout for DbFit queries? I have a long running stored procedure that times out when running it in a DbFit Test. It's possible for the procedure to run for a really long time (processing millions of records) and would like to have DbFit wait until it's completed, even if it takes several minutes. We are using the latest version of FitSharp (downloaded it yesterday) and use the version of DbFit that is included with FitSharp.

    Read the article

  • I have a having a a matrix index bounds in matlab

    - by Ben Fossen
    I keep getting the error( this is in Matlab) Attempted to access r(0,0); index must be a positive integer or logical. Error in == Romberg at 15 I ran it with Romberg(1.3, 2.19,8) I think the problem is the statment is not logical because I made it positive and still got the same error. anyone got some ideas of what i could do? function Romberg(a, b, n) h = b - a; r = zeros(n,n); for i = 1:n h = h/2; sum1 = 0; for k = 1:2:2^(i) sum1 = sum1 + f(a + k*h); end r(i,0) = (1/2)*r(i-1,0) + (sum1)*h; for j = 1:i r(i,j) = r(i,j-1) + (r(i,j-1) - r(i-1,j-1))/((4^j) - 1); end end disp(r); end function f_of_x = f(x) f_of_x = sin(x)/x; end

    Read the article

  • Saxon XSLT-Transformation: How to change serialization of an empty tag from <x/> to <x></x>?

    - by Ben
    Hello folks! I do some XSLT-Transformation using Saxon HE 9.2 with the output later being unmarshalled by Castor 1.3.1. The whole thing runs with Java at the JDK 6. My XSLT-Transformation looks like this: <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://my/own/custom/namespace/for/the/target/document"> <xsl:output method="xml" encoding="UTF-8" indent="no" /> <xsl:template match="/"> <ns:item> <ns:property name="id"> <xsl:value-of select="/some/complicated/xpath" /> </ns:property> <!-- ... more ... --> </xsl:template> So the thing is: if the XPath-expression /some/complicated/xpath evaluates to an empty sequence, the Saxon serializer writes <ns:property/> instead of <ns:property></ns:property>. This, however, confuses the Castor unmarshaller, which is next in the pipeline and which unmarshals the output of the transformation to instances of XSD-generated Java-code. So my question is: How can I tell the Saxon-serializer to output empty tags not as standalone tags? Here is what I am proximately currently doing to execute the transformation: import net.sf.saxon.s9api.*; import javax.xml.transform.*; import javax.xml.transform.sax.SAXSource; // ... // read data XMLReader xmlReader = XMLReaderFactory.createXMLReader(); // ... there is some more setting up the xmlReader here ... InputStream xsltStream = new FileInputStream(xsltFile); InputStream inputStream = new FileInputStream(inputFile); Source xsltSource = new SAXSource(xmlReader, new InputSource(xsltStream)); Source inputSource = new SAXSource(xmlReader, new InputSource(inputStream)); XdmNode input = processor.newDocumentBuilder().build(inputSource); // initialize transformation configuration Processor processor = new Processor(false); XsltCompiler compiler = processor.newXsltCompiler(); compiler.setErrorListener(this); XsltExecutable executable = compiler.compile(xsltSource); Serializer serializer = new Serializer(); serializer.setOutputProperty(Serializer.Property.METHOD, "xml"); serializer.setOutputProperty(Serializer.Property.INDENT, "no"); serializer.setOutputStream(output); // execute transformation XsltTransformer transformer = executable.load(); transformer.setInitialContextNode(input); transformer.setErrorListener(this); transformer.setDestination(serializer); transformer.setSchemaValidationMode(ValidationMode.STRIP); transformer.transform(); I'd appreciate any hint pointing in the direction of a solution. :-) In case of any unclarity I'd be happy to give more details. Nightly greetings from Germany, Benjamin

    Read the article

  • Design Question on when to save

    - by Ben
    Hi, I was just after peoples opinion on when the best time to save an object (or collection of objects) is. I appreciate that it can be completely dependent on the situation that you are in but here is my situation. I have a collection of objects "MyCollection" in a grid. You can open each object "MyObject" in an editor dialogue by double clicking on the grid. Selecting "Cancel" on the dialogue will back out any changes you have made, but should selecting "ok" commit those changes back to the database, or should they commit the changes on that object back to the collection and have a save method that iterates through the collection and saves all changed objects? If i have an object "MyParentObject", that contains a collection of childen "MyChildObjectCollection", none of the changes made to each "MyChildObject" would be commited to the database until the "MyParentObject" was saved - this makes sense. However in my current situation, none of the objects in the collection are linked, therefore should the "Ok" on the dialogue commit the changes to the database? Appreciate any opinions on this. Thanks

    Read the article

  • @font-face fonts only work on their own domain

    - by Ben
    I am trying to create a type of font repository for use on my websites, so that I can call to any font in the repository in my css without any other set-up. To do this I created a subdomain on which I placed folders for each font in the repository that contained the various file types for each font. I also placed a css file called font-face.css on the root of the subdomain and filled it with @font-face declarations for each of the fonts, the fonts a linked with an absolute link so that they can be used from anywhere. My issue is that it seems that I can only use the fonts on that subdomain where they are located, on my other sites the font does not show. Using firebug I determined that the font-face.css file was successfully being linked to and loaded. So why does the font not correctly load? Is there protection on the font files or something? I am using all fonts that I should be allowed to do this with, so I don't see why this is occurring. Maybe it is an apache issue, but I can download the font just fine when I link to it. Oh, and just to clarify, I am not violating any copyrights by setting this up, all the fonts I am using are licensed to allow this sort of thing. I would however like to set up a way that only I can have access to this repository of fonts but that's another project.

    Read the article

  • Add New Gist using the Github API

    - by Ben Shelock
    I'm making a small app in Adobe Air which I need to interact with the Github Gist API. However I'm kind of stuck. If you're not familiar with Adobe Air you can still help, the XMLHttpRequest javascript object can do cross domain requests, as there is no domain as such. So theres nothing Adobe Air specific here. Where I'm stuck is I think I need to authenticate myself then make the POST. I just don't understand it

    Read the article

  • rails accessing value from facebooker hash/array

    - by Ben
    This is my first time using the facebooker plugin with rails, and I'm having trouble accessing user info. The website uses FB connect to authenticate users. I am trying to get the name of the university that the logged in user attends. When I use the command <%= facebook_session.user.education_history[:name] %>, I get an error "Symbol as array index". I have also tried using education_history[1], but that just returns "# Facebooker::EducationInfo:<some sort of alphanumeric hash value>" When I use something like <%= facebook_session.user.relationship_status %> , it returns the relationship status just fine. Similarly, <%= facebook_session.user.hometown_location.city %> returns the city name just fine. I've checked out the documentation for facebooker, but I can't figure out the correct way to get the values I need. Any idea on how to get this to work? Thanks!

    Read the article

  • Why does UIImageView "darken"/saturate PNG images, and can I stop it?

    - by Ben
    I have a PNG file in a UIImageView, and next to that I have an EAGLView which displays the continuation of that same image (long story) as a texture, carved from the same original PNG. The point is, that these images, which should match up flawlessly, actually have somewhat differing color saturation. Normally I'd blame my handling of the PNG texture load in GL, but when I hold Preview (with the PNG) up to the iPhone simulator, it's GL that's spot on, and the UIImageView that's wrong! It's taken the image and made it ever-so-slightly more saturated. The image view is opaque with 100% alpha. I verified this on a clean UIImageView with another PNG file when put next to Preview. Anyone know what's up?

    Read the article

  • Can I expose only a portion of one .NET DLL's public classes via a different "API" DLL?

    - by Ben McIntosh
    I am designing a WPF application that uses a DLL with maybe 40 public classes. I need these to be public for a variety of reasons including ease of data binding and obfuscation. I would like to allow other people to use only a portion of these classes as an API for my software. I thought I would create the main library (core.dll) and an API library (coreAPI.dll) with the API DLL to be referenced in a new project. Is there a way to allow coreAPI.dll to expose only a few of the classes that exist in core.dll? It's not so much a security issue as I primarily want to simply hide some of the unwanted classes from the Visual Studio Intellisense. Again, internal classes for the ones I want to hide is not really an option because I need to data bind some of these classes in WPF and for that, they must be public. Are there any other ways of doing this?

    Read the article

  • Setting Position of source and listener has no effect

    - by Ben E
    Hi Guys, First time i've worked with OpenAL, and for the life of my i can't figure out why setting the position of the source doesn't have any effect on the sound. The sounds are in stero format, i've made sure i set the listener position, the sound is not realtive to the listener and OpenAL isn't giving out any error. Can anyone shed some light? Create Audio device ALenum result; mDevice = alcOpenDevice(NULL); if((result = alGetError()) != AL_NO_ERROR) { std::cerr << "Failed to create Device. " << GetALError(result) << std::endl; return; } mContext = alcCreateContext(mDevice, NULL); if((result = alGetError()) != AL_NO_ERROR) { std::cerr << "Failed to create Context. " << GetALError(result) << std::endl; return; } alcMakeContextCurrent(mContext); SoundListener::SetListenerPosition(0.0f, 0.0f, 0.0f); SoundListener::SetListenerOrientation(0.0f, 0.0f, -1.0f); The two listener functions call alListener3f(AL_POSITION, x, y, z); Real vec[6] = {x, y, z, 0.0f, 1.0f, 0.0f}; alListenerfv(AL_ORIENTATION, vec); I set the sources position to 1,0,0 which should be to the right of the listener but it has no effect alSource3f(mSourceHandle, AL_POSITION, x, y, z); Any guidance would be much appreciated

    Read the article

  • Why do jQuery fadeIn() and fadeOut() seem quirky in this example?

    - by Ben McCormack
    I've been playing with jQuery in an ASP.NET project and am finding some odd behavior with the .fadeIn() and fadeOut() functions. In the below example, a click on the button (ID Button1) is supposed to cause both the span of text with ID Label1 and the the button with the ID TextBox1 to do the following things: Fade Out Change the text of both the text box and the span of text to be You clicked the button Fade In Based on the browser I'm using, I get 3 different scenarios, and each element functions differently in each situation. Here's what happens when I actually click the button: TextBox1: In IE8, the text box fades out, changes text, then fades back in In IE8 Compatibility View, the text box fades out, changes text, then fades back in. However, the text in the box looks a little different than before the button was clicked. In FireFox 3.5.8, the text box doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. Label1: In IE8, the label doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. In IE8 Compatibility View, the label does fade out, change text, and fades back in, but the text looks a little different than before the button was clicked. In FireFox 3.5.8, the label doesn't fade out (but it does "pause" for the amount of time the fade would take), does change the text, then seems to "pause" again where it would be fading in. Two questions: What's going in to make each element to behave differently in different browsers? Is there a better way to get the functionality I'm looking for across multiple platforms? Here's the source code of the file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head><title> </title> <script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#Button1").click(function(event) { $("#Label1").fadeOut("slow", function() { $(this).text("You clicked the button"); $(this).fadeIn("slow"); }); $("#TextBox1").fadeOut("slow", function() { $(this).val("You clicked the button").fadeIn("slow"); $(this).fadeIn("slow"); }); event.preventDefault(); }); $("a").click(function(event) { $("#Label1").text("You clicked the link"); $("#TextBox1").val("You clicked the link"); event.preventDefault(); }); }); </script> </head> <body> <form name="form1" method="post" action="Default.aspx" id="form1"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTQwMjM5ODcyZGT6OfedWuFhLrSUyp+gwkCEueddvg==" /> </div> <div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwK56uWtBwLs0bLrBgKM54rGBotkyyA5RRsPBGNaPTPCe7F5ARwv" /> </div> <div> <span id="Label1" style="color:#009900;">Type Something Here:</span> &nbsp; <a href="http://www.google.com">This is a test Link</a> <input name="TextBox1" type="text" value="test" id="TextBox1" style="width:258px;" /> <br /> <br /> <input type="submit" name="Button1" value="Button" id="Button1" /> </div> </form> </body> </html>

    Read the article

  • Count all lists of adjacent nodes stored in an array.

    - by Ben Brodie
    There are many naive approaches to this problem, but I'm looking for a good solution. Here is the problem (will be implemented in Java): You have a function foo(int a, int b) that returns true if 'a' is "adjacent" to 'b' and false if 'a' is not adjacent to 'b'. You have an array such as this [1,4,5,9,3,2,6,15,89,11,24], but in reality has a very long length, like 120, and will be repeated over and over (its a genetic algorithm fitness function) which is why efficiency is important. I want a function that returns the length of each possible 'list' of adjacencies in the array, but not including the 'lists' which simply subsets of a larger list. For example, if foo(1,4) - true, foo(4,5) - true, foo(5,9)- false, foo(9,3) & foo(3,2) & foo(2,6), foo(6,15) - true, then there are 'lists' (1,4,5) and (9,3,2,6), so length 3 and 4. I don't want it to return (3,2,6), though, because this is simply a subset of 9,3,2,6. Thanks.

    Read the article

  • ABAP - increment an integer

    - by Ben
    Hi there, sometimes ABAP drives me crazy with really simple tasks - as incrementing an integer within a loop... Here's my try: METHOD test. DATA: lv_id TYPE integer. lv_id = 1. LOOP AT x ASSIGNING <y>. lv_id = lv_id+1. ENDLOOP. ENDMETHOD. This gives me a strange error I can hardly translate to english..

    Read the article

  • TFS Build Configuration Vs Test Manager

    - by Ben
    Hi, I have been tasked with setting up TFS 2010 for my company. After setting up TFS and configuring the basics (New collection, project, adding solution to souce control), i thought i would try out some unit testing with it. I configured the Build Controller and Agent for my solution and added in some basic unit tests. These ran ok and did exactly what i would expect (i broke the build then ran the Build Definition, and it showed me where the errors were). My question is, what advantages (apart from the "Black box call stack logger") does Test Manager have over the TFS builds? Is it worth the extra effort of setting that up and configuring it? Only knowing the basics of what Test Manager is, that may be a very naive question to ask, and i appoligise if it is. Thanks

    Read the article

  • How do I set a dependency on Spring Web Services in my POM.xml

    - by Ben
    I get this on a lot of Maven dependencies, though current source of pain is Spring. I'll set a Spring version and include it like so: <spring-version>3.0.0.RELEASE</spring-version> <!-- Spring framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring-version}</version> </dependency> Which works as expected. I am however having problems setting my dependency on spring-ws-core for web services. The latest I can find in any repo is 2.0.0-M1. http://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core Any clues on what I need to include in my maven POM to get Spring 3 web services to work :)

    Read the article

  • UIView animation only animating some of the things I ask it to

    - by Ben
    I have a series of (say) boxes on the screen in a row, all subviews of my main view. Each is a UIView. I want to shift them all left and have a new view also enter the screen from the right in lockstep. Here's what I'm doing: // First add a dummy view offscreen UIView * stagingView = /* make this view, which sets up its width/height */ CGRect frame = [stagingView frame]; frame.origin.x = /* just off the right side of the screen */; [stagingView setFrame:frame]; [self stagingView]; And then I set up animations in one block for all of my subviews (which includes the one I just added): [UIView beginAnimations:@"shiftLeft" context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(_animationDidStop:context:)]; [UIView setAnimationDuration:0.3]; for (UIView * view in [self subviews]) { CGRect frame = [view frame]; frame.origin.x -= (frame.size.width + viewPadding); [view setFrame:frame]; } [UIView commitAnimations]; Here's what I expect: The (three) views already on screen get shifted left and the newly staged view marches in from the right at the same time. Here's what happens: The newly staged view animates in exactly as expected, and the views already on the screen do not appear to move at all! (Or possibly they jump without animation to their end locations). And! If I comment out the whole business of creating the new subview offscreen... the ones onscreen do animate correctly! Huh? (Thanks!)

    Read the article

  • detail disclosure indicator on UIButton

    - by Ben Collins
    Is there a simple way to place a detail disclosure icon on a UIButton? I'm using a navigation controller and I want a button press to push a new view on the stack, so I thought a detail disclosure icon would be appropriate, but I haven't found a straightforward way to do that yet.

    Read the article

  • PHP script works fine until I send it a parameter from HTTPService in Flash Builder 4?

    - by ben
    I'm using a PHP script to read an RSS feed in my Flex 4 app. The script works when I put the url of the feed in the actual script, but I can't get it to work when I try to send the URL as a parameter from a HTTPService in Flex. Can anyone tell me what I'm doing wrong? Here is the HTTPService from Flex 4 that I'm using: <mx:HTTPService url="http://talk.6te.net/proxy.php" id="proxyService" method="POST" result="rssResult()" fault="rssFault()"> <mx:request> <url> http://feeds.feedburner.com/nah_right </url> </mx:request> </mx:HTTPService> This is the script that works: <?php $ch = curl_init(); $timeout = 30; $userAgent = $_SERVER['HTTP_USER_AGENT']; curl_setopt($ch, CURLOPT_URL, "http://feeds.feedburner.com/nah_right"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); $response = curl_exec($ch); if (curl_errno($ch)) { echo curl_error($ch); } else { curl_close($ch); echo $response; } ?> But this is what I actually want to use, but it doesn't work: <?php $ch = curl_init(); $timeout = 30; $userAgent = $_SERVER['HTTP_USER_AGENT']; curl_setopt($ch, CURLOPT_URL, $_REQUEST['url']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); $response = curl_exec($ch); if (curl_errno($ch)) { echo curl_error($ch); } else { curl_close($ch); echo $response; } ?> Here is the request and response output of the HTTPService from the network monitor in Flash Builder 4 (using the PHP script that doesn't work): Request: POST /proxy.php HTTP/1.1 Host: talk.6te.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Content-type: application/x-www-form-urlencoded Content-length: 97 url=%0A%09%09%09%09%09http%3A%2F%2Ffeeds%2Efeedburner%2Ecom%2Fnah%5Fright%0A%20%20%20%20%09%09%09 Response: HTTP/1.1 200 OK Date: Mon, 10 May 2010 03:23:27 GMT Server: Apache X-Powered-By: PHP/5.2.13 Content-Length: 15 Content-Type: text/html <url> malformed I've tried putting the URL in " " in the HTTPService, but that didn't do anything. Any help would be greatly appreciated!

    Read the article

  • Strange for loop

    - by Ben Baraga
    Hello! I was looking though a fellow developers code when I saw this .. for (;;){ .... .... .... } I have never seen ";;" used in a loop. What does this do exactly?

    Read the article

  • Difference between dates

    - by Ben C
    I want to calculate the difference between two times, one of which is the current time, and the other is just in the format HH:MM, always in the future. If I just subtract $futuretime from $now, it should, of course, be a positive number. This works fine until... If $now is in the afternoon or evening and $futuretime is, say, 7AM next morning, how can I force it to understand the the time is always going to be in the future? (It's for working out the time of something that occurs about every half an hour during working hours, and then stops until the following morning) Thanks in advance!

    Read the article

  • When *not* to use prepared statements?

    - by Ben Blank
    I'm re-engineering a PHP-driven web site which uses a minimal database. The original version used "pseudo-prepared-statements" (PHP functions which did quoting and parameter replacement) to prevent injection attacks and to separate database logic from page logic. It seemed natural to replace these ad-hoc functions with an object which uses PDO and real prepared statements, but after doing my reading on them, I'm not so sure. PDO still seems like a great idea, but one of the primary selling points of prepared statements is being able to reuse them… which I never will. Here's my setup: The statements are all trivially simple. Most are in the form SELECT foo,bar FROM baz WHERE quux = ? ORDER BY bar LIMIT 1. The most complex statement in the lot is simply three such selects joined together with UNION ALLs. Each page hit executes at most one statement and executes it only once. I'm in a hosted environment and therefore leery of slamming their servers by doing any "stress tests" personally. Given that using prepared statements will, at minimum, double the number of database round-trips I'm making, am I better off avoiding them? Can I use PDO::MYSQL_ATTR_DIRECT_QUERY to avoid the overhead of multiple database trips while retaining the benefit of parametrization and injection defense? Or do the binary calls used by the prepared statement API perform well enough compared to executing non-prepared queries that I shouldn't worry about it? EDIT: Thanks for all the good advice, folks. This is one where I wish I could mark more than one answer as "accepted" — lots of different perspectives. Ultimately, though, I have to give rick his due… without his answer I would have blissfully gone off and done the completely Wrong Thing even after following everyone's advice. :-) Emulated prepared statements it is!

    Read the article

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