Daily Archives

Articles indexed Tuesday May 11 2010

Page 2/123 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Why does my perl server stop working when i press 'enter'?

    - by David
    I have created a server in perl that sends messages or commands to the client. I can send commands just fine, but when i am being prompted for the command on my server i have created, if i press 'enter', the server messes up. Why is this happening? Here is part of my code: print "\nConnection recieved from IP address $peer_address on port $peer_port "; $closed_message = "\n\tTerminated client session..."; while (1) { print "\nCommand: "; $send_data = <STDIN>; chop($send_data); if ($send_data eq 'e' or $send_data eq 'E' or $send_data eq ' E' or $send_data eq ' E ' or $send_data eq 'E ' or $send_data eq ' e' or $send_data eq ' e ' or $send_data eq 'e') { $client_socket->send ($send_data); close $client_socket; print "$closed_message\n"; &options; } else { $client_socket->send($send_data); } $client_socket->recv($recieved_data,8000); print "\nRecieved: $recieved_data"; } }

    Read the article

  • How can I rebuild the index in Thunderbird 3.0?

    - by Martin
    Hello, I have just deleted a lot of old messages (about 3,000) from my Thunderbird 3.0 profile. When I now use the new search feature (search all messages), TB still finds the deleted ones. I deleted them this way: I moved the messages to an own "archive" folder (not the built-in archive feature). Then I stopped TB and moved the archive files and folders to a different place on my file system. Then restarted TB. I archive my messages this way for years now. So, it seems that Thunderbird does not notice the deletion of my messages, thus the index is not updated. How can I tell TB to instantly rebuild the index?

    Read the article

  • jquery Ajax sortable list stops being sortable when Ajax call updates the list html

    - by Trevor
    Hi, I am using jquery 1.4.2 and trying to achieve the following: 1 - function call that sends a value to a php page to add/remove an item 2 - returns html list of the items 3 - list should still be sortable 4 - save (serialise list) onclick My full WIP is located here [http://www.chittak.co.uk/test4/index_nw3.php][1] I tried to delegate from the level above the UL but I could get this to work $("#construnctionstage").delegate('ul li', 'click', function(){ The initial list is sortable, when you click add/remove the ajax function returns a new list with the a number of items, BUT I am doing something wrong as the alert message continues to work while the list is no longer sortable. $(document).ready(function(){ $('ul').delegate('li', 'click', function(){ alert('You clicked on an li element!'); /*$("#test-list").sortable({ handle : '.handle', update : function () { var order = $('#test-list').sortable('serialize'); $("#info").load("process-sortable.php?"+order); } });*/ }).sortable({ handle : '.handle', update : function () { var order = $('#test-list').sortable('serialize'); $("#info").load("process-sortable.php?"+order); } }); }); <div id="construnctionstage"> <ul id="test-list"> <li id="listItem_1">

    Read the article

  • matrices&searching [closed]

    - by gcc
    question 1) between different characters&real numbers , finding specific one how could i do question 2) myfriend asked me a good question : can we divide two matrices to each other // in math , we havenot learned but maybe someone knows where we find the answer

    Read the article

  • Mp3 Player IE Bug Issue

    - by Belgin Fish
    Ok, well on my site http://www.easyasmp3.com/ for some reason the esnips (first) results arn't playing in internet explorer on the results page. When you click the little play button it's not doing anything. Works fine in firefox. Could anyone help Thanks!

    Read the article

  • UINavigationController crashes after pushing 3 views onto stack

    - by joec
    I have a navigation controller, which has the following structure: Category Item Item Detail I can choose a category, and then choose an item to see its details. I can do this twice, i.e. go Back to the list of items and select another item. If i try this a third time, the app crashes, I get objc_msgSend in stack but thats all. But, instead of choosing another item, i go to the list of categories, and choose a different category, I can select two items in that category, before it crashes also. What would be causing this? Thanks

    Read the article

  • C# Find and Replace RegEx with wildcard search and addition of value

    - by fraXis
    Hello, The below code is from my other questions that I have asked here on SO. Everyone has been so helpful and I almost have a grasp with regards to RegEx but I ran into another hurdle. This is what I basically need to do in a nutshell. I need to take this line that is in a text file that I load into my content variable: X17.8Y-1.Z0.1G0H1E1 I need to do a wildcard search for the X value, Y value, Z value, and H value. When I am done, I need this written back to my text file (I know how to create the text file so that is not the problem). X17.8Y-1.G54G0T2 G43Z0.1H1M08 I have code that the kind users here have given me, except I need to create the T value at the end of the first line, and use the value from the H and increment it by 1 for the T value. For example: X17.8Y-1.Z0.1G0H5E1 would translate as: X17.8Y-1.G54G0T6 G43Z0.1H5M08 The T value is 6 because the H value is 5. I have code that does everything (does two RegEx functions and separates the line of code into two new lines and adds some new G values). But I don't know how to add the T value back into the first line and increment it by 1 of the H value. Here is my code: StreamReader reader = new StreamReader(fDialog.FileName.ToString()); string content = reader.ReadToEnd(); reader.Close(); content = Regex.Replace(content, @"X[-\d.]+Y[-\d.]+", "$0G54G0"); content = Regex.Replace(content, @"(Z(?:\d*\.)?\d+)[^H]*G0(H(?:\d*\.)?\d+)\w*", "\nG43$1$2M08"); //This must be created on a new line This code works great at taking: X17.8Y-1.Z0.1G0H5E1 and turning it into: X17.8Y-1.G54G0 G43Z0.1H5M08 but I need it turned into this: X17.8Y-1.G54G0T6 G43Z0.1H5M08 (notice the T value is added to the first line, which is the H value +1 (T = H + 1). Can someone please modify my RegEx statement so I can do this automatically? I tried to combine my two RegEx statements into one line but I failed miserably. Thanks so much, Shawn

    Read the article

  • Configuring log4net appenders via XML file *and* code

    - by Dave
    I started to play with log4net today and so far, I really like it. In order to preserve our current logging functionality, the app needs to create a new log file whenever the application is started. The log file name has the date and time stamp encoded in it. Currently, I've got log4net configured via an XmlConfigurator, which works great, except that the filename for my RollingFileAppender is hardcoded in the configuration XML file. I'd like to continue to use the XmlConfigurator, but after calling Configure(), I want to get at the RollingFileAppender and, in code, change its file value to be a dynamically-generated string. The sample documentation online seems to be down right now, but I've poked through the SDK reference, and it looks like I could use the Heirarchy and GetAppenders() to do what I need to do. Am I on the right track?

    Read the article

  • One to two relationship in Doctrine with YAML

    - by Jeremy DeGroot
    I'm working on my first Symfony project with Doctrine, and I've run into a hitch. I'm trying to express a game with two players. The relationship I want to have is PlayerOne and PlayerTwo each being keyed to an ID in the Users table. This is part of what I've got so far: Game: actAs: { Timestampable:- } columns: id: { type: integer, notnull: true, unique: true } startDate: { type: timestamp, notnull: true } playerOne: { type: integer, notnull: true } playerTwo: { type: integer, notnull: true } winner: { type: integer, notnull:true, default:0 } relations: User: { onUpdate: cascade, local: playerOne, foreign: id} User: { onUpdate: cascade, local: playerTwo, foreign: id} That doesn't work. It builds fine, but the SQL it generates only includes a constraint for playerTwo. I've tried a few other things: User: { onUpdate: cascade, local: [playerOne, playerTwo], foreign: id} Also: User: [{ onUpdate: cascade, local: playerOne, foreign: id}, { onUpdate: cascade, local: playerTwo, foreign: id}] Those last two throw errors when I try to build. Is there anyone out there who understands what I'm trying to do and can help me achieve it?

    Read the article

  • Ldap query returns null result when deployed.

    - by Trey Carroll
    I'm using a very simple Ldap query in my asp.net mvc 2.0 site: String ldapPath = ConfigReader.LdapPath; String emailAddress = null; try { DirectorySearcher search = new DirectorySearcher(ConfigReader.LdapPath); search.Filter = String.Format("(&(objectClass=user)(objectCategory=person)(objectSid={0})) ", securityIdentifierValue); // add the mail property to the list of props to retrieve search.PropertiesToLoad.Add("mail"); var result = search.FindOne(); if (result == null) { throw new Exception("Ldap Query with filter:" + search.Filter.ToString() + " returned a null value (no match found)"); } else { emailAddress = result.Properties["mail"][0].ToString(); } } catch (ArgumentOutOfRangeException aoorEx) { throw new Exception( "The query could not find an email for this user."); } catch (Exception ex) { //_log.Error(string.Format("======!!!!!! ERROR ERROR ERROR !!!!! in LdapLookupUtil.cs getEmailFromLdap Exception: {0}", ex)); throw ex; } return emailAddress; It works fine on my localhost machine. It works fine when I run it in VS2010 on the server. It always returns a null result when deployed. Here is my web.config: Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config -- section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. -- <!-- -- section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. -- I'm running it under the default app pool. Does anybody see the problem? This is driving me crazy!

    Read the article

  • Removing default mysql on Slackware 13

    - by bullettime
    I was playing around the default mysql that comes with Slackware 13, and I think I broke it somehow. I don't want to fix it, I'd like to start from scratch, building from source and everything, but first I have to remove this broken installation. How can I do this?

    Read the article

  • Lilypond: Is there a way to auto-crop the paper

    - by Boldewyn
    In Lilypond the paper size can be set to A4, A5, Letter and so forth. However I have only a short song, and I want to embed it lateron. Therefore the output from Lilypond must be cropped somehow. Is there a possibility to let Lilypond itself do this? Some setting to the \paper{} block, perhaps?

    Read the article

  • Stream video from one app to another in OS X (Software video input device)

    - by Josh
    Is there any way to take a video stream from one application, for example VLC Media Player, and present that video stream to other applications as a video input source? For example, could I broadcast a video file from my hard disk to a website that allows video conferencing using a Flash applet? Basically, I'm looking for something like Soundflower, but for video streams. Is this possible?

    Read the article

  • The 4 'P's of SEO

    Search engine optimization (SEO) and its role in building a successful online business is about the 4 'P's. Passion, personal relationships, process and persistence. Like everything in life, rewards follow process and persistence. But those alone will not work without good personal relationships which build trust, and passion which is really about caring about what you are offering and to whom you are offering it.

    Read the article

  • How to order by column with non-null values first in sql

    - by devlife
    I need to write a sql statement to select all users ordered by lastname, firstname. This is the part I know how to do :) What I don't know how to do is to order by non-null values first. Right now I get this: null, null null, null p1Last, p1First p2Last, p2First etc I need to get: p1Last, p1First p2Last, p2First null, null null, null Any thoughts?

    Read the article

  • url rewrite & redirect question

    - by Shawn
    Say currently I have url like : http://mydomain.com/showpost.php?p=123 Now I want to make it prettier : http://mydomain.com/123/post-title I'm using apache rewrite which grabs segment '123' and put the url back to http://mydomain.com/showpost.php?p=123 OK. Here is the problem. I want to redirect the original non-pretty urls which were indexed by Google to the pretty versions, I want this because I heard that Google may punish me if he sees multiple urls pointing to identical content. So I need to redirect /showpost.php?p=123 to /123/post-title This I have to do in my php code coz there's no way Apache to be able to figure out the 'post-title', but if I put the redirect code in php code, then it will be a infinite loop, such as : Request : /showpost.php?p=123 redirected to : /123/post-title rewritten to: /showpost.php?p=123 redirected again to : /123/post-title ... So on and so forth. Sorry I should Google the solution first but I really don't know how to describe my situation in English to make Google return reasonable results. Please help me. Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >