Search Results

Search found 13889 results on 556 pages for 'results'.

Page 210/556 | < Previous Page | 206 207 208 209 210 211 212 213 214 215 216 217  | Next Page >

  • How do you access/configure summaries/snippets in Django Haystack

    - by mlissner
    I'm working on getting django-haystack set up on my site, and am trying to have snippets in my search results roughly like so: Title of result one about Wikis ...this special thing about wiki values is that...I always use a wiki when I walk...snippet value three talks about wikis too...and here's another snippet value about wikis. I know there's a template tag for highlighting, but how do you generate the snippets themselves? I know Solr generates these, but I can't figure out how to get them from Haystack.

    Read the article

  • Problems with CGI wrapper for PHP

    - by user205878
    I'm having a bugger of a time with a CGI wrapper for PHP. I know very little about CGI and PHP as CGI. Here's what I know about the system: Solaris 10 on a 386 Suhosin PHP normally running as CGI, with cgiwrap (http://cgiwrap.sourceforge.net/). I am not able to find an example wrapper.cgi on the server to look at. Shared hosting (virtual host), so I don't have access to Apache config. But the admins are not helpful. Switching hosts is not an option. Options directive cannot be overridden in .htaccess (ExecCGI, for example). .htaccess: AddHandler php-handler .php Action php-handler "/bin/test.cgi" ~/public_html/bin/test.cgi: #!/usr/bin/sh # Without these 2 lines, I get an Internal Server Error echo "Content-type: text/html" echo "" exec "/path/to/php-cgi" 'foo.php'; /bin/foo.php: <?php echo "this is foo.php!"; Output of http://mysite.com/bin/test.cgi: X-Powered-By: PHP/5.2.11 Content-type: text/html echo "Content-type: text/html" echo "" exec "/path/to//php-cgi" 'foo.php'; Output of http:/ /mysite.com/anypage.php: X-Powered-By: PHP/5.2.11 Content-type: text/html echo "Content-type: text/html" echo "" exec "/path/to//php-cgi" 'foo.php'; The things I note are: PHP is being executed, as noted by the X-Powered-By ... header. The source of /bin/test.cgi is output in the results. No matter what I put as the second argument of exec, it isn't passed to the php binary. I've tried '-i' to get phpinfo, '-v' to get the version... When I execute test.cgi via the shell, I get the expected results (the argument is passed to php, and it is reflected in the output). Any ideas about how to get this to work? UPDATE It appears that the reason the source of the test.cgi was appearing was due to errors. Anytime fatal error occurred, either within the cgi itself or with the command being executed by exec, it would cause the source of the cgi to appear. Within test.cgi, I can get the proper output with exec "/path/to/php-cgi" -h (I get the same thing as I would from CLI).

    Read the article

  • MVC and Pagination

    - by gms8994
    As an MVC newb, I keep getting caught up in the details. One in particular is making me pause longer than I'd expect; pagination. Should pagination go in the model, or in the controller? In case it matters, I'm using ZF, and would like to paginate the results of some SQL data.

    Read the article

  • Correlated SQL Join Query from multiple tables

    - by SooDesuNe
    I have two tables like the ones below. I need to find what exchangeRate was in effect at the dateOfPurchase. I've tried some correlated sub queries, but I'm having difficulty getting the correlated record to be used in the sub queries. I expect a solution will need to follow this basic outline: SELECT only the exchangeRates for the applicable countryCode From 1. SELECT the newest exchangeRate less than the dateOfPurchase Fill in the query table with all the fields from 2. and the purchasesTable. My Tables: purchasesTable: > dateOfPurchase | costOfPurchase | countryOfPurchase > 29-March-2010 | 20.00 | EUR > 29-March-2010 | 3000 | JPN > 30-March-2010 | 50.00 | EUR > 30-March-2010 | 3000 | JPN > 30-March-2010 | 2000 | JPN > 31-March-2010 | 100.00 | EUR > 31-March-2010 | 125.00 | EUR > 31-March-2010 | 2000 | JPN > 31-March-2010 | 2400 | JPN costOfPurchase is in whatever the local currency is for a given countryCode exchangeRateTable > effectiveDate | countryCode | exchangeRate > 29-March-2010 | JPN | 90 > 29-March-2010 | EUR | 1.75 > 30-March-2010 | JPN | 92 > 31-March-2010 | JPN | 91 The results of the query that I'm looking for: > dateOfPurchase | costOfPurchase | countryOfPurchase | exchangeRate > 29-March-2010 | 20.00 | EUR | 1.75 > 29-March-2010 | 3000 | JPN | 90 > 30-March-2010 | 50.00 | EUR | 1.75 > 30-March-2010 | 3000 | JPN | 92 > 30-March-2010 | 2000 | JPN | 92 > 31-March-2010 | 100.00 | EUR | 1.75 > 31-March-2010 | 125.00 | EUR | 1.75 > 31-March-2010 | 2000 | JPN | 91 > 31-March-2010 | 2400 | JPN | 91 So for example in the results, the exchange rate, in effect for EUR on 31-March was 1.75. I'm using Access, but a MySQL answer would be fine too. UPDATE: Modification to Allan's answer: SELECT dateOfPurchase, costOfPurchase, countryOfPurchase, exchangeRate FROM purchasesTable p LEFT OUTER JOIN (SELECT e1.exchangeRate, e1.countryCode, e1.effectiveDate, min(e2.effectiveDate) AS enddate FROM exchangeRateTable e1 LEFT OUTER JOIN exchangeRateTable e2 ON e1.effectiveDate < e2.effectiveDate AND e1.countryCode = e2.countryCode GROUP BY e1.exchangeRate, e1.countryCode, e1.effectiveDate) e ON p.dateOfPurchase >= e.effectiveDate AND (p.dateOfPurchase < e.enddate OR e.enddate is null) AND p.countryOfPurchase = e.countryCode I had to make a couple small changes.

    Read the article

  • F# equivalent to Eval

    - by akaphenom
    Is there an F# equivalent to eval? My intent is to have my app load a small code sample from a file and essentially let file = "c:\mysample" let sample = loadFromFile file let results = eval(sample) I am new to F# and trying to figure out some of the limitations before I apply it to a project. Thank you

    Read the article

  • Query string length limit in vba?

    - by datatoo
    I am trying to combine multiple audit tables, and then filter the results into an excel sheet. The Union All and parameters make the query in excess of 1200 characters. It appears the string is truncated when running this. What recommendations can anyone make. I have no control over the database structure and am only reading foxpro free tables. I am permitted table creation but can write into the excel sheet connecting to the datasource Thanks for suggestions

    Read the article

  • T SQL Count question

    - by johniom
    I'm making a report at work which looks at 5 columns which all contain v1aa, v1ab and v1ac. What I want to do is count up all the v1aa in the 5 columns and show the results (and the same for v1ab and v1ac) An example of how I like it to be displayed as is as follows :- Amber = 3 (v1aa code) Blue = 2 (v1ab code) Red = 1 (v1ac code) Could anyone give me any tips how to get me started?

    Read the article

  • Python encoding ISO to UTF8

    - by PanosJee
    Hello everyone, I am trying to read my emails using a Python script (Python 2.5 and PyPy) Some of my results are not in ASCII and i get strings like this: =?ISO-8859-7?B?0OXm7/Dv8d/hIPP07+0gyuno4enx/u3h?=' Is there any way to decode it and convert to utf-8 so that i can process it? I tried .decode('ISO-8859-7') but i got the same string

    Read the article

  • Need to validate a scientific spreadsheet written in Java

    - by geejay
    I need a validation framework, for an app written in Java, Eclipse RCP. The UI is a simple spreadsheet with many input fields and many output fields. The user input needs to be validated, for example: Thresholds for numerical fields Required fields for certain operations Context-sensitive help based on the validation results Multi-field validation, e.g a field is valid depending upon the values in other fields Wondering if there is anything out there?

    Read the article

  • PHP Summarize any URL

    - by Dylan Taylor
    Hey guys, How can I, in PHP, get a summary of any URL? By summary, I mean something similar to the URL descriptions in Google web search results. Is this possible? Is there already some kind of tool I can plug in to so I don't have to generate my own summaries? I don't want to use metadata descriptions if possible. -Dylan

    Read the article

  • Can I tweak a page's appearance using Google Chrome's developer tools?

    - by Nathan Long
    When I'm working on a web page layout, I often use Firefox and Firebug to tweak the CSS until it looks right, then modify my style sheet to match. Right now, I'm trying to fix something that looks fine in other browsers but wrong in Google Chrome. I have pulled up Chrome's Developer Tools, and can inspect the computed style, but don't see a way to edit values and see the results on my page. Is there a way to do this?

    Read the article

  • Using Include() with inherited entities problem

    - by Peter Stegnar
    In EF eager loading related entities is easy. But I'm having difficulties including inherited entities when loading data using table-per-type model. This is my model: Entities: ArticleBase (base article entity) ArticleSpecial (inherited from ArticleBase) UserBase (base user entity) UserSpecial (inherited from UserBase) Image Relations are as shown on the image (omitting many columns): In reality my users are always of type UserSpecial, since UserBase is used in another application, thus we can share credentials. That's the only reason I have two separate tables. UserBase table can't be changed in any way shape or form, because the other app would break. Question How am I suppose to load ArticleSpecial with both CreatedBy and EditedBy set, so that both are of type UserSpecial (that defines Image relation)? I've tried (unsuccessfully though) these options: 1. Using lambda expressions: context.ArticleBases .OfType<ArticleSpecial>() .Include("UserCreated.Image") .Include("UserEdited.Image"); In this case the problem is that both CreatedBy and EditedBy are related to UserBase, that doesn't define Image navigation. So I should somehow cast these two to UserSpecial type like: context.ArticleBases .OfType<ArticleSpecial>() .Include("UserCreated<UserSpecial>.Image") .Include("UserEdited<UserSpecial>.Image"); But of course using generics in Include("UserCreated<UserSpecial>.Image") don't work. 2. I have tried using LINQ query var results = from articleSpecial in ctx.ArticleBase.OfType<ArticleSpecial>() join created in ctx.UserBase.OfType<UserSpecial>().Include("Image") on articleSpecial.UserCreated.Id equals created.Id join edited in ctx.UserBase.OfType<UserSpecial>().Include("Image") on articleSpecial.UserEdited.Id equals edited.Id select articleSpecial; In this case I'm only getting ArticleSpecial object instances without related properties being set. I know I should select those somehow, but I don't know how? Select part in my LINQ could be changed to something like select new { articleSpecial, articleSpecial.UserCreated, articleSpecial.UserEdited }; but images are still not loaded into my context. My joins in this case are barely used to filter out articleSpecial results, but they don't load entities into context (I suppose). Can anybody provide any help regarding this problem? I think it's not so uncommon.

    Read the article

  • How one extends JNA interface mappings? (Java)

    - by rukoche
    User32 interface (platform library) is missing some WinAPI functions, so I tried extending it: package myapp import com.sun.jna.platform.win32.W32API public interface User32 extends com.sun.jna.platform.win32.User32 { myapp.User32 INSTANCE boolean IsWindow(W32API.HWND hWnd) } But then calling myapp.User32.INSTANCE.FindWindow(..) results in java.lang.NullPointerException: Cannot invoke method FindWindow() on null object

    Read the article

  • how to get Processor ID using Kernel32.dll

    - by Radian
    Hi, I want to know if there is an Entry point for kernel32.dll , that is related to any processor data (ID , Serial , etc ... ) and I tried to Google it but I didn't find good results . Note: I already know WMI , but I need something related to Kernel !

    Read the article

  • Login Script for PostGreSQL and PHP not working =[

    - by MrEnder
    Ok I'm quite new at logins what not so bare with me here lol but I gota learn so don't discourage me. I tried this so far <?php $error = ""; $conn = pg_connect("host=localhost dbname=brittains_db user=brittains password=XXXX" ); $sql = "SELECT * FROM logins"; $result = pg_query($conn, $sql); if($_SERVER["REQUEST_METHOD"] == "GET") { $userName=""; $password=""; } else if($_SERVER["REQUEST_METHOD"] == "POST") { $userName=trim($_POST["userNameLogin"]); $password=trim($_POST["passwordLogin"]); if(pg_fetch_result($results, $userName, "userName")==true && pg_fetch_result($results, $password, "userName")==true) { setcookie("userIDforDV", $userName, time()+43200); } else { $error = "Your username and or password is incorrect"; } } $userName = $_COOKIE['userIDforDV']; if(isset($userName) && $userName!="") { echo "Welcome " . $userName; } echo $error; ?> <form> <table> <tr> <td class="signupTd"> User Name:&nbsp; </td> <td> <input type="text" name="userNameLogin" value="" size="20" /> </td> </tr> <tr> <td class="signupTd"> Password:&nbsp; </td> <td> <input type="password" name="passwordLogin" value="" size="20" /> </td> </tr> <tr> <td class="signupTd" colspan="2"> <input type="submit" name="submit" value="Submit"/> </td> </tr> </table> </form> that was the idea I came up with... but its prolly a really bad idea and it doesn't work... how might I go about this properly? I need really detailed descriptions please. Thanks a tun Shelby

    Read the article

  • Is there a Markdown editor for Dojo

    - by Emilien
    Is there a good Markdown editor for Dojo? I have seen Control.TextArea (based on Prototype) and Stack Overflow's reverse-engineered version of WMD (seems to rely on jQuery) but I'd rather use a Dojo-based tool, as my site already uses this framework. Does such a tool exist? Googling for dojo markdown editor doesn't seem to return any useful results, apart from a Google Summer of Code 2008 student blogging that he's working on it...

    Read the article

< Previous Page | 206 207 208 209 210 211 212 213 214 215 216 217  | Next Page >