Daily Archives

Articles indexed Thursday May 13 2010

Page 24/119 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • lucene.net get starting and end index of a highlighted fragment in a searched field

    - by user339995
    "My search returns a highlighted fragment from a field. I want to know that in that field of particular searched document, where does that fragment starts and ends ?" for instance. consider i am searching "highlighted fragment" in above lines (consider the above para as single document). I am setting my fragmenter as : SimpleFragmenter fragmenter = new SimpleFragmenter(30); now the output of GetBestFragment is somewhat like : "returns a highlighted fragment from" Is it possible to get the starting and ending index of this fragment in the text above (say starting is 10 and ending is 45)

    Read the article

  • How do I correctly decode unicode parameters passed to a servlet

    - by Grant Wagner
    Suppose I have: <a href="http://www.yahoo.com/" target="_yahoo" title="Yahoo!&#8482;" onclick="return gateway(this);">Yahoo!</a> <script type="text/javascript"> function gateway(lnk) { window.open(SERVLET + '?external_link=' + encodeURIComponent(lnk.href) + '&external_target=' + encodeURIComponent(lnk.target) + '&external_title=' + encodeURIComponent(lnk.title)); return false; } </script> I have confirmed external_title gets encoded as Yahoo!%E2%84%A2 and passed to SERVLET. If in SERVLET I do: Writer writer = response.getWriter(); writer.write(request.getParameter("external_title")); I get Yahoo!â„¢ in the browser. If I manually switch the browser character encoding to UTF-8, it changes to Yahoo!TM (which is what I want). So I figured the encoding I was sending to the browser was wrong (it was Content-type: text/html; charset=ISO-8859-1). I changed SERVLET to: response.setContentType("text/html; charset=utf-8"); Writer writer = response.getWriter(); writer.write(request.getParameter("external_title")); Now the browser character encoding is UTF-8, but it outputs Yahoo!â?¢ and I can't get the browser to render the correct character at all. My question is: is there some combination of Content-type and/or new String(request.getParameter("external_title").getBytes(), "UTF-8"); and/or something else that will result in Yahoo!TM appearing in the SERVLET output?

    Read the article

  • AJAX Panel not throwing exceptions

    - by Grant
    Hi, i have just noticed something strange in some asp.net markup. I have a standard form with a couple of textboxes and a submit button. When clicked the code behind will attempt to perform some logic and then return. If the input values are not valid it used to throw an exception. The moment i wrapped the controls in an AJAX update panel and try to submit bad data, no exception is thrown and the panel returns like nothing was wrong. Does anyone know how to return this to the previous behavior whilst keeping the update panel?

    Read the article

  • Visual Studio IDE freezing while initializing ToolBox

    - by Mohanavel
    I'm working on Visual Studio 2008, Smart Client + infragistics controls are installed and we have more than 50 User Controls. When opening the Visual Studio "Tool Box", Visual Studio is completely freezing. I couldn't work after that. I have to kill the process and open again. At this point CPU usage is around 50, CPU usage is 1 or 2 when i work on code. How to get rid out of this issue. This is really time consuming process.

    Read the article

  • Skype does not start on Vista 64

    - by Suma
    I have a computer with Vista 64 and I have a problem with Skype on it. It does not start automatically. I have checked the corresponding option in the Skype settings (Start Skype when I start Windows) is ticked. What troubleshooting steps could I try to find why it does not start?

    Read the article

  • jquery sucess dropdown

    - by mckenzie
    hi, //codes success: function(html){ // this is for input box - working document.getElementById('val').value=''; $('#val').value=''; // how do i set it for dropdown box to reset after sucess? document.getElementById('val2').value=''; $('#val2').value=''; } Once user submit dropdown box, i need it to reset to value="" but now it sticks with user option even after submitted. Any idea how to achieve that?

    Read the article

  • Auto update after specific day passed

    - by Crays
    Hey guys, i've this theme of the week script, easy, just post like normally, save in database and echo it in a column. But since its theme of the week, i would like it to automatically renew the value to say "none" or "not set" after a week. I know cron jobs could do this but is there another way? [Running in PHP]

    Read the article

  • Split SQL statements

    - by eaZy
    Hello, I am writing a backend application which needs to be able to send multiple SQL commands to a MySQL server. MySQL = 5.x support multiple statements, but unfortunately we are interfacing with MySQL 4.x. I am trying to find a way (hint: regex) to split SQL statements by their semicolon, but it should ignore semicolons in single and double quotes strings. http://www.dev-explorer.com/articles/multiple-mysql-queries has a very nice regex to do that, but doesn't support double quotes. I'd be happy to hear your suggestions.

    Read the article

  • Storyboard as timer in WPF

    - by Adrian
    Hi, I'm trying to do smooth animation in procedural code. For this (in Silverlight at least), it's recommended to use the Storyboard timer rather than a DispatcherTimer. So I use something like this: Storyboard _LoopTimer = new Storyboard(); public void StartAnimation() { _LoopTimer.Duration = TimeSpan.FromMilliseconds(0); _LoopTimer.Completed += new EventHandler(MainLoop); _LoopTimer.Begin(); } void MainLoop(object sender, EventArgs e) { // Do animation stuff here // Continue storyboard timer _LoopTimer.Begin(); } And in Silverlight, this works fine. But in WPF, I only hit MainLoop() once. Setting RepeatBehaviour to Forever doesn't help, either. So what's the right way to do this in WPF with a Storyboard? Thanks very much.

    Read the article

  • Facebook application development resources

    - by Michael
    What is the most efficient way to start learning develop Facebook applications? Any web resource or book that you would recommend to start from? Any MUST READ or Bibles available for this? There are plenty of them in Amazon, but which one really worth to spend time? What kind of development technologies are used in this? Is PHP/MySQL/JS enough to jump in? Thanks

    Read the article

  • Lightbox-style dialog shows below YouTube movie on Mac OS 10.6

    - by Mark
    This is a "but it works on my machine" one and could be tricky: I have a lightbox-style HTML dialog that shows a menu on top of a web page. It can be injected into any web page via a JavaScript bookmarklet. One of my users is trying to use it on YouTube.com with the result that the flash movie is rendered on top of the dialog (a div with high z-index). I can't reproduce this. It works just fine for me. The dialog shows up on top of everything else on youtube.com, the video included. I had him save the page in Safari as Webarchive and send it to me. Even that shows the menu rendered correctly for me. I use the exact same version of Safari (4.0.5/531.22.7) and Flash (10.1 r53, latest beta). Only difference I could find is that he uses Snow Leopard (10.6.6) and I "only" 10.5.8. Has anybody noticed similar problems? I'm afraid that the usual wmode recommendation won't solve this (I tried & it works on my machine anyway)... Thanks! Mark

    Read the article

  • Display database resume to user

    - by Domnic
    Im using upload control to upload my resume(word document) in sql server 2005 database.and i can download it from database when i click link button...Its all working file...My problem is how can i show my full resume to user (how to display my resume) from my database?

    Read the article

  • How would you show a file with cURL?

    - by Kyle
    There is an epic lack of PHP cURL love on the Internet for beginners like me. I was wondering how to use cURL to download & display an ICS file (They're plain text to me...) in my PHP code. Unless fopen() is 1,000 times easier, I'd like to stick with cURL for this one.

    Read the article

  • Expose JSON as queryable for jQuery

    - by Ted
    I am trying to expose some data, user names, as json format on my server. I want to use jQuery.getJSOn() method to query data. I can get my data converted to json with newtonsoft.dll on server and save it in a file. But as far as I know it is not queryable. I want something like http://search.twitter.com/search.json?callback=?&q=abc Can anyone help me out to expose my data ion the above format.

    Read the article

  • Is it possible to make notepad++ support tamil language functionality?

    - by Pandiya Chendur
    Notepad++ (from v2.3) supports the multilanguage functionality by means of a translated xml file (from english.xml). Normally you don't need it if you install Notepad++ by its installer. You may need the language file if you install Notepad++ from zip format binary (or if your language is not supported by NSIS installer). Is it possible to make notepad++ support tamil language functionality?

    Read the article

  • XAMPP vs WAMP security and other on Windows XP

    - by typoknig
    Not long ago I found WAMP and thought it was a God send because it had all the things I wanted/needed (Apache, PHP, MySQL, and phpMyAdmin) all built into one installer. One thing about WAMP has been making me mad is an error I get in phpMyAdmin about the advanced features not working. I have tried to fix that error long enough on that error for long enough. http://stackoverflow.com/questions/2688385/problem-with-phpmyadmin-advanced-features I now read that most people prefer XAMPP over WAMP, but I am a bit concerned that XAMPP might have some extra security holes with Mercury and Perl, two thing that I don't really need or want right now. Are my security concerns justified or not? Is there any other reasons to go with XAMPP over WAMP or vice versa?

    Read the article

  • Multiple wifi cards and Internet connections on Win-7

    - by Dpp
    Hello, I have two wifi cards and two separated internet connections. I connect to the Internet with both of them but one does all of the internet transactions (and I have not seen any place where I can specify which one I would prefer to use!) What I would like to do is use one of them for the browser and skype only, and the other one for stock exchange software for instance. Any idea if it is possible?

    Read the article

  • How to reset textbox values in dialog after destroy?

    - by user281180
    I have a dialog in which there are 2 textboxes. I want to reset the textboxes values once the dialog is destroyed. How can I do that? If I have entered values in the textboxes and clicked cancel, reopening the dialog will show the data entered previously. function setDialogWindows($element) { $('#change').dialog({ autoOpen: true, width: 380, buttons: { "Cancel": function() { $(this).dialog('destroy'); }, "Accept": function() { } }): } $(#link').click(function() { setDialogWindows('#change'); }); <div id="change" title="Change password" > <input type="hidden" id="User_Name" name="Name"/> <input type="textbox" id="text1" /> <input type="textbox" id="text2" /> </div>

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >