Search Results

Search found 2068 results on 83 pages for 'thomas stock'.

Page 38/83 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • PHP / Zend Framework: Which object would handle a complex table join?

    - by Thomas
    I think one of the more difficult concepts to understand in the Zend Framework is how the Table Data Gateway pattern is supposed to handle multi-table joins. Most of the suggestions I've seen claim that you simply handle the joins using a $db-select()... Zend DB Select with multiple table joins Joining Tables With Zend Framework PHP Joining tables wthin a model in Zend Php Zend Framework Db Select Join table help Zend DB Select with multiple table joins My question is: Which object is best suited to handle this kind of multi-table select statement? I feel like putting it in the model would break the 1-1 Table Data Gateway pattern between the class and the db table. Yet putting it in the controller seems wrong because why would a controller handle a SQL statement? Anyway, I feel like ZF makes handling datasets from multiple tables more difficult than it needs to be. Any help you can provide is great... Thanks!

    Read the article

  • Named parameters lead to inferior readability?

    - by Thomas Jung
    With named parameters like def f(x : Int = 1, y : Int = 2) = x * y your parameter names become part of the interface f(x=3) Now if you want to change the parameter names locally, you are forced to perserve the public name of the parameter: def f(x : Int = 1, y : Int = 2) = { val (a,b) = (x,y) a * b } If this a real problem? Is there a syntax to support this directly? Who do other languages handle this?

    Read the article

  • Additional Pssnapins

    - by Guy Thomas
    I can see the 6 or so native PSSnapins, thanks to get-PSSnapin I have added the useful QAD snapins, thanks to add-PSSnapin My question is could you recommend any other useful third-party Snapins for PowerShell?

    Read the article

  • How does Maven find a Artifact in a remote repository?

    - by Thomas
    I'm trying to create a maven plugin to generate a file with the URL to all the dependencies in a project. I have been able to get the dependencies and their artifact, but I'm having trouble getting the download URL. Using ArtifactResolver and ArticateMetadataSource I get some of the artifact information. However I fail to get all the information for all the dependencies. I haven't been able to find documentation on the resolution logic, so that I can call it form my plugin. I can use an ArtifactResolver to download the artifact, but what I really wanted was just the URL. The Maven Artifact API has a a method called getDownloadURL (see http://maven.apache.org/ref/2.0.4/maven-artifact/apidocs/org/apache/maven/artifact/Artifact.html). However I cant seem to find a way to get a real value into it. I always get a null value. Is there a way to have it resolved (downloading or not) and get the URL for where the file came from?

    Read the article

  • Prolog: Finding the Nth Element in a List

    - by Thomas
    I am attempting to locate the nth element of a List in Prolog. Here is the code I am attempting to use: Cells = [OK, _, _, _, _, _] . ... next_safe(_) :- facing(CurrentDirection), delta(CurrentDirection, Delta), in_cell(OldLoc), NewLoc is OldLoc + Delta, nth1(NewLoc, Cells, SafetyIdentifier), SafetyIdentifier = OK . Basically, I am trying to check to see if a given cell is "OK" to move into. Am I missing something?

    Read the article

  • VB.NET Window Screen Capture (ALT+PRINTSCREEN)

    - by Steve Thomas
    Hi, I found that code somewhere and I find it quite useful but I would like to find a way to make it work so it capture only the given window target. Maybe with a processID or Window Name. Even if that window is not active. I do not want to make that window active but want to get a screen capture like if I was doing Alt+PrintScreen on it. Here is the code that works for full Screen Capture Private bmpScreenShot As Bitmap Private gfxScreenshot As Graphics bmpScreenShot = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb) gfxScreenshot = Graphics.FromImage(bmpScreenShot) gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy) bmpScreenShot.Save(fileName, ImageFormat.Png) I use the Visual Basic 2008 Express Thank you in advance!

    Read the article

  • What bug tracking software do you use?

    - by Thomas Owens
    I'm currently looking at Bugzilla and Trac, as they seem to be the most popular (and I'm hoping that also means if there are any problems, it will be easier to get help), but I'm curious what solutions you use or have used and what your thoughts are. I'm currently leaning toward Trac, as it's Wiki functionality can be used to support documentation. But that might not be a good enough reason to jump on Trac.

    Read the article

  • How can I check if an order with a given increment id already exists in magento?

    - by Thomas Vander Stichele
    I am new to Magento. What's the proper way to check if an order with a given increment id already exists ? The obvious way: $order = Mage::getModel('sales/order')->loadByIncrementId($reservedOrderId); if ($order) { Mage::log('already have order with id ' . $reservedOrderId); return $order; } does not work, because I get a new and empty model instance back. What's the correct way in magento to see if I have no such model for that id ?

    Read the article

  • Create a callback function within a custom jQuery function

    - by Thomas
    I'm not sure how to approach this as I am fairly new to jQuery. I'm wanting to create a callback function within a custom function. Here's my example: function doSomething() { var output = 'output here'; // Do something here // This is where I want to create the callback function and pass output as a parameter } I want the callback function to be accessible by any number of scripts (e.g. more than one script can access this callback). This function (doSomething) is not part of a plugin but rather part of another callback function itself. I've also created a var within the function and want to pass that through the callback function as well. How can I do this?

    Read the article

  • How to find the worst performing queries in MS SQL Server 2008?

    - by Thomas Bratt
    How to find the worst performing queries in MS SQL Server 2008? I found the following example but it does not seem to work: SELECT TOP 5 obj.name, max_logical_reads, max_elapsed_time FROM sys.dm_exec_query_stats a CROSS APPLY sys.dm_exec_sql_text(sql_handle) hnd INNER JOIN sys.sysobjects obj on hnd.objectid = obj.id ORDER BY max_logical_reads DESC Taken from: http://www.sqlservercurry.com/2010/03/top-5-costly-stored-procedures-in-sql.html

    Read the article

  • R plotting multiple histograms on single plot to .pdf as a part of R batch script

    - by Bryce Thomas
    I am writing R scripts which play just a small role in a chain of commands I am executing from a terminal. Basically, I do much of my data manipulation in a Python script and then pipe the output to my R script for plotting. So, from the terminal I execute commands which look something like $python whatever.py | R CMD BATCH do_some_plotting.R. This workflow has been working well for me so far, though I have now reached a point where I want to overlay multiple histograms on the same plot, inspired by this answer to another user's question on Stackoverflow. Inside my R script, my plotting code looks like this: pdf("my_output.pdf") plot(hist(d$original,breaks="FD",prob=TRUE), col=rgb(0,0,1,1/4),xlim=c(0,4000),main="original - This plot is in beta") plot(hist(d$minus_thirty_minutes,breaks="FD",prob=TRUE), col=rgb(1,0,0,1/4),add=T,xlim=c(0,4000),main="minus_thirty_minutes - This plot is in beta") Notably, I am using add=T, which is presumably meant to specify that the second plot should be overlaid on top of the first. When my script has finished, the result I am getting is not two histograms overlaid on top of each other, but rather a 3-page PDF whose 3 individual plots contain the titles: i) Histogram of d$original ii) original - This plot is in beta iii) Histogram of d$minus_thirty_minutes So there's two points here I'm looking to clarify. Firstly, even if the plots weren't overlaid, I would expect just a 2-page PDF, not a 3-page PDF. Can someone explain why I am getting a 3-page PDF? Secondly, is there a correction I can make here somewhere to get just the two histograms plotted, and both of them on the same plot (i.e. 1-page PDF)? The other Stackoverflow question/answer I linked to in the first paragraph did mention that alpha-blending isn't supported on all devices, and so I'm curious whether this has anything to do with it. Either way, it would be good to know if there is a R-based solution to my problem or whether I'm going to have to pipe my data into a different language/plotting engine.

    Read the article

  • ASP.Net Vertical Menu with Scroll functionality

    - by Thomas
    Referring to Menu / Scrolling Example I would like to create / find the same functionality for a vertical menu. I tried the following. <asp:Menu ID="menuAccountMembers" runat="server" StaticSubMenuIndent="16px" Visible="true" RenderingMode="Table" ScrollDownImageUrl="~/Resources/scrolldown.jpg" ScrollUpImageUrl="~/Resources/scrollup.jpg"> <Items> But it doesnt display any scrolling images. I am using .net 4.0 Tried setting menuAccountMembers.RenderingCompatibility = new Version(3, 5); as well. If there a property to only display the first 5 root menu items, then show scroll bars for the rest? It can be click-able, no need to hover over to show next item.

    Read the article

  • Is there a table of OpenGL extensions, versions, and hardware support somewhere?

    - by Thomas
    I'm looking for some resource that can help me decide what OpenGL version my game needs at minimum, and what features to support through extensions. Ideally, a table of the following format: 1.0 1.1 1.2 1.2.1 1.3 ... multitexture - ARB ARB core core texture_float - EXT EXT ARB ARB ... (Not sure about the values I put in, but you get the idea.) The extension specs themselves, at opengl.org, list the minimum OpenGL version they need, so that part is easy. However, many extensions have been accepted and became core standard in subsequent OpenGL versions, but it is very hard to find when that happened. The only way I could find is to compare the full OpenGL standards document for each version. On a related note, I would also very much like to know which extensions/features are supported by which hardware, to help me decide what features I can safely use in my game, and which ones I need to make optional. For example, a big honkin' table like this: MAX_TEXTURE_IMAGE_UNITS MAX_VERTEX_TEXTURE_IMAGE_UNITS ... GeForce 6xxx 8 4 GeForce 7xxx 16 8 ATi x300 8 4 ... (Again, I'm making the values up.) The table could list hardware limitations from glGet but also support for particular extensions, and limitations of such extension support (e.g. what floating-point texture formats are supported in hardware). Any pointers to these or similar resources would be hugely appreciated!

    Read the article

  • Check if a variable is empty

    - by Thomas
    I have some user-submitted variables that I want to display in a different part of my site like this: <div class="pre_box">Term: </div> <div class="entry"><?php $key='term'; echo get_post_meta($post->ID, $key, true); ?></div> Occasionally, these variables might be empty in which case I don't want to display the label for the empty variable. In the example above I would want to hide the <div class="pre_box">Term: </div> part. Is there some simple way to check if a php variable like the one above is empty and prevent the label from being displayed?

    Read the article

  • Sort List by occurrence of a word by LINQ C#

    - by Thomas
    i have stored data in list like List<SearchResult> list = new List<SearchResult>(); SearchResult sr = new SearchResult(); sr.Description = "sample description"; list.Add(sr); suppose my data is stored in description field like "JCB Excavator - ECU P/N: 728/35700" "Geo Prism 1995 - ABS #16213899" "Geo Prism 1995 - ABS #16213899" "Geo Prism 1995 - ABS #16213899" "Wie man BBA reman erreicht" "this test JCB" "Ersatz Airbags, Gurtstrammer und Auto Körper Teile" now i want to query the list with my search term like geo jcb if you look then the word geo has stored many times in the description field. so i want to sort my list in such way that the word in search term found maximum that data will come first. please help me to do so. thanks

    Read the article

  • using usort to re-arrange multi-dimension array

    - by Thomas Bennett
    I have a large array: [0] => stdClass Object ( [products] => Array ( [0] => stdClass Object ( [body_html] => bodyhtml [published_at] => 2012-12-16T23:59:18+00:00 [created_at] => 2012-12-16T11:30:24+00:00 [updated_at] => 2012-12-18T10:52:14+00:00 [vendor] => Name [product_type] => type ) [1] => stdClass Object ( [body_html] => bodyhtml [published_at] => 2012-12-16T23:59:18+00:00 [created_at] => 2012-12-16T10:30:24+00:00 [updated_at] => 2012-12-18T10:52:14+00:00 [vendor] => Name [product_type] => type ) ) ) and I need to arrange each of the products by the date they where created... I've tried and failed all kinds of usort, ksort, uksort techniques to try and get it to be in a specific order (chronological) but failed! any guidance would be most appreciated

    Read the article

  • jQuery - search for previous selector relative to current

    - by Thomas Slater
    I have a form with 3 sections in it. Each section has a dedicated div for fairly long contextual help messages regarding the input that has focus. My question is, if I give each of these help divs a class of "form-tip" and each input that has a tip the class "has-tip", how can I get the tip to always show up in the previous "form-tip" div? Something like: $('.has-tip').each(focus(function() { var tip = $(this).attr('title'); // Find most recent $('.form-tip') in the DOM and populate it with tip })); I hope that makes sense... Thanks for any help.

    Read the article

  • Executing JavaScript with Python without X.

    - by Thomas
    I want to parse a html-page that unfortunately requires JavaScript to show any content. In order to do so I use a small python-script that pulls the html-code of the page, but after that I have to execute the JavaScript in a DOM-context which seems pretty hard. To make it even harder I want to use it in a server environment that has no X11-server. Note: I already read about http://code.google.com/p/pywebkitgtk/ but it seems to need a X-server.

    Read the article

  • How to check for undefined or null variable in javascript

    - by Thomas Wanner
    We are frequently using the following code pattern in our javascript code if(typeof(some_variable) != 'undefined' && some_variable != null) { // do something with some_variable } and I'm wondering whether there is a less verbose way of checking that has the same effect. According to some forums and literature saying simply if(some_variable) { // do something with some_variable } should have the same effect. Unfortunately, Firebug evaluates such a statement as error on runtime when some_variable is undefined, whereas the first one is just fine for him. Is this only an (unwanted) behavior of Firebug or is there really some difference between those two ways ?

    Read the article

  • C++ integer floor function

    - by Thomas
    I want to implement greatest integer function. int x = 5/3; My question is with greater numbers could there be a loss of precision as 5/3 would produce a double? EDIT: Greatest integer function is integer less than or equal to X. Example: 4.5 = 4 4 = 4 3.2 = 3 3 = 3 What I want to know is 5/3 going to produce a double? Because if so I will have loss of precision when converting to int. Hope this makes sense. RE-EDIT: What OP calls 'greatest integer' most of us call 'floor'.

    Read the article

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