Search Results

Search found 20383 results on 816 pages for 'hello'.

Page 50/816 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Output to console while preserving user input in ruby

    - by CaptnCraig
    I have a ruby script that is simultaneously and asynchronously receiving and displaying messages from a server, and allowing user input on the console. When a message is received, it is currently being written in the middle of what the user is typing. The input itself isn't garbled, but it looks horrible. Ideally, it would save the users current input, output the message, and then restore the input on the next line. I've done this in c by intercepting every key stroke, but all I remember is that it was a major hassle. I'm fairly new to ruby, so I'm not sure if there is a good way to do this, or how to do it. Example: User is typing >abcde, and message hello comes in, and user types fgh after. The console would now show: >abcdehellofgh and user can continue typing at the end. I would like it to show: hello >abcdefgh

    Read the article

  • How to add custom hooks to controllers in ASP.NET MVC2

    - by Adrian
    Hi, I've just started a new project in ASP.net 4.0 with MVC 2. What I need to be able to do is have a custom hook at the start and end of each action of the controller. e.g. public void Index() { *** call to the start custom hook to externalfile.cs (is empty so does nothing) ViewData["welcomeMessage"] = "Hello World"; *** call to the end custom hook to externalfile.cs (changes "Hello World!" to "Hi World") return View(); } The View then see welcomeMessage as "Hi World" after being changed in the custom hook. The custom hook would need to be in an external file and not change the "core" compiled code. This causes a problem as with my limited knowledge ASP.net MVC has to be compiled. Does anyone have any advice on how this can be achieved? Thanks

    Read the article

  • Why am I getting a segmentation fault when I use binmode with threads in Perl?

    - by jAndy
    Hi Folks, this call my $th = threads->create(\&print, "Hello thread World!\n"); $th->join(); works fine. But as soon as I add binmode(STDOUT, ":encoding(ISO-8859-1)"); to my script file, I get an error like "segmentation fault", "access denied". What is wrong to define an encoding type when trying to call a perl thread? Example: use strict; use warnings; use threads; binmode(STDOUT, ":encoding(ISO-8859-1)"); my $th = threads->create(\&print, "Hello thread World!\n"); $th->join(); sub print { print @_; } This code does not work for me. Kind Regards --Andy

    Read the article

  • Console output window in DLL

    - by user303907
    Hello, I am trying to redirect the output from my DLL to an external console window for easy debugging. I have been told about AllocConsole but I am not able to reproduce it, i.e. the console window does not appear. My current environment is Visual Studio 2005. I tried the following example which is gotten off the Internet, AllocConsole(); HANDLE han = GetStdHandle(STD_OUTPUT_HANDLE); WriteConsole(han,"hello",6,new DWORD,0); yet nothing happens. Can someone point me in the right direction if creating a console window via DLL is possible in the first place. Thanks in advance!

    Read the article

  • jQuery AJAX converting variable string to html styled text

    - by sadmicrowave
    I've got an AJAX transmission of a variable string in my primary coding language (Visual FoxPro 9) that looks like this: AjaxResponse = CREATEOBJECT("Custom") lcMessage = "<li class='hello'>Hello</li>" AjaxResponse.AddProperty("Reply", lcMessage) Response.ContentType = "text/html" Response.Write(AjaxResponse.Reply) While using the jQuery function .ajax() I've created a success: function that looks like this: $.ajax({ url: 'index?Proc=GetUuserHistory', dataType: "html", success: function(data){ $("div#history-text").text(data); }; }); My problem is that the text inserting into 'div#history-text' is unformatted and contains the li tags still. I've tried substituting the .text for .prepend, .append, and .html with no luck...is there a way to convert this string back to html format after its been received using Ajax?

    Read the article

  • How to generate GIR files from the Vala compiler?

    - by celil
    I am trying to create python bindings to a vala library using pygi with gobject introspection. However, I am having trouble generating the GIR files (that I am planning to compile to typelib files subsequently). According to the documentation valac should support generating GIR files. Compiling the following helloworld.vala public struct Point { public double x; public double y; } public class Person { public int age = 32; public Person(int age) { this.age = age; } } public int main() { var p = Point() { x=0.0, y=0.1 }; stdout.printf("%f %f\n", p.x, p.y); var per = new Person(22); stdout.printf("%d\n", per.age); return 0; } with the command valac helloworld.vala --gir=Hello-1.0.gir doesn't create the Hello-1.0.gir file as one would expect. How can I generate the gir file?

    Read the article

  • Are large include files like iostream efficient? (C++)

    - by Keand64
    Iostream, when all of the files it includes, the files that those include, and so on and so forth, adds up to about 3000 lines. Consider the hello world program, which needs no more functionality than to print something to the screen: #include <iostream> //+3000 lines right there. int main() { std::cout << "Hello, World!"; return 0; } this should be a very simple piece of code, but iostream adds 3000+ lines to a marginal piece of code. So, are these 3000+ lines of code really needed to simply display a single line to the screen, and if not, do they create a less efficient program than if I simply copied the relevant lines into the code?

    Read the article

  • How can I put double quotes inside a string within an ajax JSON response?

    - by karlthorwald
    I receive a JSON response in an Ajax request from the server. This way it works: { "a" = "1", "b" = "hello 'kitty'" } But I did not succeed in putting double quotes around kitty. When I convert " to \x22 in the Ajax response, it is still interpreted as " by JavaScript and I cannot parse the JSON. Should I also escape the \ and unescape later (which would be possible)? How to do this? Edit: I am not sure if i expressed it well: I want this string inside of "b" after the parse: hello "kitty" If necessary I could also add an additional step after the parse to convert "b", but I guess it is not necessary, there is a more elegant way so this happens automatically?

    Read the article

  • problem in return value from server to client in ajax useing zend-framework

    - by user1400
    hello i try to use ajax and zend in my application , i could pass variable to server but i can not get data from server , it does not return values, it return all html code page, where is my mistake? $('#myForm').submit(function($e){ $e.preventDefault(); var $paramToServer=$("#myForm").serialize(); $.ajax({ type:'POST', url:'test', data:$paramToServer , success:function(re){ var res = $.evalJSON(re); console.log(res.id); // to see in firebog }, dataType:'json' }); }); public function testAction() { // action body $this->_helper->getHelper('viewRenderer')->setNoRender(); // If you use layout, disable it Zend_Layout::getMvcInstance()->disableLayout(); $name=$this->getRequest()->getParam ( 'name' ); //pass $name to server $return = array( 'id' => '5', 'family' => 'hello ', ); $return = Zend_Json::encode( $return); // Response $this->getResponse()->setBody($return); }

    Read the article

  • Cakephp database migration error

    - by Vijay Kumbhar
    Hello All, I am using Ubuntu + cakephp 1.3. I am trying the database migration with the help of cakeDC migration plugin. I configured the plugin as per the instructions. But when i goes to the terminal, goes to the path of the application application_path/app/ dir then fire a command 'cake migration help' it gives me following error, Hello user, Welcome to CakePHP v1.2 Console Current Paths: -working: /path/to/cake/ -root: /path/to/cake/ -app: /path/to/cake/app/ -core: /path/to/cake/ Changing Paths: your working path should be the same as your application path to change your path use the '-app' param. Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp Available Shells: app/vendors/shells/: - none vendors/shells/: - none cake/console/libs/: acl api bake console extract To run a command, type 'cake shell_name [args]' To get help on a specific command, type 'cake shell_name help' Then i followed the steps given in the : http://book.cakephp.org/view/108/The-CakePHP-Console $ cake -app /path/to/app But i am not getting the success. Can anybody help me out from this issue... Thanks in adavnce.

    Read the article

  • Active Directory public key use

    - by Chris Meadows
    I have a client who has a requirement to validate users logging into my web application against his active directory using LDAP. In trying to connect using the DirectoryEntry and DirectorySearcher .NET classes, I can connect to his AD Server but not access it. The client's AD server has an SSL Certificate for which he has given me a public key file but I don't know how to use this public key file in my C# code. When I issue the connect command through code, I see, via Wireshark, my application sending the connection request. I then see the server responding with "Server Hello, Certificate, Certificate Request, Server Hello Done". Then my application never responds after that. In using another application, written by somebody else for which I do not have code, I see the same request from the server and then see the application respond with "Certificate, Client Key Exchange" and then the application connects and runs. With that said, my question then becomes, how can I get my C# application to load and send the key file I got from the client?

    Read the article

  • How to get the request url from HttpServletRequest

    - by Gagan
    Say i make a get request like this: GET http://cotnet.diggstatic.com:6000/js/loader/443/JS_Libraries,jquery|Class|analytics|lightbox|label|jquery-dom|jquery-cookie?q=hello#frag HTTP/1.0 Host: cotnet.diggstatic.com:6000 My servlet takes request like this: HttpServletRequest req; When i debug my server and execute, i get the following: req.getRequestURL().toString() = "http://cotnet.diggstatic.com:6000/js/loader/443/JS_Libraries,jquery%7cClass%7canalytics%7clightbox%7clabel%7cjquery-dom%7cjquery-cookie" req.getRequestURI() = "/js/loader/443/JS_Libraries,jquery%7cClass%7canalytics%7clightbox%7clabel%7cjquery-dom%7cjquery-cookie" req.getQueryString() = "q=hello" How does one get the fragment information ? Also, when i debug the request, i see a uri_ field of type java.net.URI which has the fragment information. This is exactly what i want. How can i get that ?

    Read the article

  • arguments into instance methods in ruby

    - by aharon
    So, I'd like to be able to make a call x = MyClass.new('good morning', 'good afternoon', 'good evening', 'good night', ['hello', 'goodbye']) that would add methods to the class whose values are the values of the arguments. So now: p x.methods #> [m_greeting, a_greeting, e_greeting, n_greeting, r_greeting, ...] And p x.m_greeting #> "good morning" p x.r_greeting #> ['hello', 'goodbye'] I realize that this is sort of what instance variables are to do (and that if I wanted them immutable I could make them frozen constants) but, for reasons beyond my control, I need to make methods instead. Thanks!

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >