Search Results

Search found 27946 results on 1118 pages for 'output buffer empty'.

Page 55/1118 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • MySQL: fetching a null or an empty string

    - by Oden
    Hey, I know whats the difference between a NULL value and an empty string ("") value, but if I want to get a value by using the OR keyword, I get no result for a NULL value The table i want to query looks like this: titles_and_tags +----+----------+------+ | id | title | tag | +----+----------+------+ | 1 | title1 | NULL | | 2 | title2 | tag1 | | 3 | title3 | tag2 | +----+----------+------+ The query i use looks like this: select * from `titles_and_tags` WHERE `title` LIKE "title" AND `tag` = "tag1" OR `tag` IS NULL So i want to get here a rows (id: 1,2), BUT this results 0 rows. What have i done wrong?

    Read the article

  • How can I create an empty dummy HttpResponse

    - by jax
    I am using org.apache.http.HttpResponse I want to create an empty dummy resposne, I am going to use this to return when errors occur instead of passing back null. I tried to create one and it has lost of weird params. Can someone tell me how to create one.

    Read the article

  • JSTL <c:out> where the element name contains a space character...

    - by Shane
    I have an array of values being made available, but unfortunately some of the variable names include a space. I cannot work out how to simply output these in the page. I know I'm not explaining this well (I'm the JSP designer, not the Java coder) so hopefully this example will illustrate what I'm trying to do: <c:out value="${x}"/> outputs to the page (artificially wrapped) as: {width=96.0, orderedheight=160.0, instructions=TEST ONLY. This is a test., productId=10132, publication type=ns, name=John} I can output the name by using <c:out value="${x.name}"/> no problems. The issue is when I try to get the "publication type"... because it has a space, I can't seem to get <c:out> to display it. I have tried: <!-- error parsing custom action attribute: --> <c:out value="${x.publication type}"/> <!-- error occurred while evaluating custom action attribute: --> <c:out value="${x.publication+type}"/> <!-- error occurred while parsing custom action attribute: --> <c:out value="${x.'publication type'}"/> <!-- error occurred while parsing custom action attribute: --> <c:out value="${x.publication%20type}"/> I know the real solution is to get the variable names formatted correctly (ie: without spaces) but I can't get the code updated for quite a while. Can this be done? Any help greatly appreciated.

    Read the article

  • Command output as string

    - by rik
    I want to get output from command C:\Program Files (x86)\Java\jre7\bin\java.exe" -version as string variable. I tried this way: $out = &"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version but it gives error message: java.exe : java version "1.7.0_05" At line:1 char:9 + $out = & <<<< "C:\Program Files (x86)\Java\jre7\bin\java.exe" -version + CategoryInfo : NotSpecified: (java version "1.7.0_05":String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Java(TM) SE Runtime Environment (build 1.7.0_05-b05) Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing) $out variable seems empty. What am I doing wrong?

    Read the article

  • Terminal-based snake game: input thread manipulates output

    - by enlightened
    I'm writing a snake game for the terminal, i.e. output via print. The following works just fine: while status[snake_monad] do print to_string draw canvas, compose_all([ frame, specs, snake_to_hash(snake[snake_monad]) ]) turn! snake_monad, get_dir move! snake_monad, specs sleep 0.25 end But I don't want the turn!ing to block, of course. So I put it into a new Thread and let it loop: Thread.new do loop do turn! snake_monad, get_dir end end while status[snake_monad] do ... # no turn! here ... end Which also works logically (the snake is turning), but the output is somehow interspersed with newlines. As soon as I kill the input thread (^C) it looks normal again. So why and how does the thread have any effect on my output? And how do I work around this issue? (I don't know much about threads, even less about them in ruby. Input and output concurrently on the same terminal make the matter worse, I guess...) Also (not really important): Wanting my program as pure as possible, would it be somewhat easily possible to get the input non-blockingly while passing everything around? Thank you!

    Read the article

  • AWK Shift empty column to left (to start position)

    - by Filip Zembol
    INPUT: fofo jojo tst fojo jofo sts rhr hrhh dodo jojo hoho jojo zozo roro vovo OUTPUT: fofo jojo tst fojo jofo sts rhr hrhh dodo jojo hoho jojo zozo roro popo NOTE: Please help me, I need to shift all rows, which have first column empty. Every fields are tab delimited. In this file some rows start from first column, but some rows start from second or third column. Thank you

    Read the article

  • Codesample with bufferoverflow (gets method). Why does it not behave as expected?

    - by citronas
    This an extract from an c program that should demonstrate a bufferoverflow. void foo() { char arr[8]; printf(" enter bla bla bla"); gets(arr); printf(" you entered %s\n", arr); } The question was "How many input chars can a user maximal enter without a creating a buffer overflow" My initial answer was 8, because the char-array is 8 bytes long. Although I was pretty certain my answer was correct, I tried a higher amount of chars, and found that the limit of chars that I can enter, before I get a segmentation fault is 11. (Im running this on A VirtualBox Ubuntu) So my question is: Why is it possible to enter 11 chars into that 8 byte array?

    Read the article

  • Paramiko ssh output stops at --more--

    - by Anesh
    The output stops printing at --more-- any idea how to get the end of the output >>> import paramiko >>> ssh = paramiko.SSHClient() >>> ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) >>> conn=ssh.connect("ipaddress",username="user", password="pass") >>> channel = ssh.invoke_shell() >>> channel.send("en\n") 3 >>> channel.send("password\n") 9 >>> channel.send("show security local-user-list\n") 30 >>> results = '' >>> channel.send("\n") 1 >>> results += channel.recv(5000) >>> print results bluecoat>en Password: bluecoat#show security local-user-list Default List: local_user_database Append users loaded from file to default list: false local_user_database Lockout parameters: Max failed attempts: 60 Lockout duration: 3600 Reset interval: 7200 Users: Groups: admin_local Lockout parameters: Max failed attempts: 60 Lockout duration: 3600 Reset interval: 7200 Users: <username> Hashed Password: Enabled: true Groups: <username> Hashed Password: Enabled: true **--More--** As you can see above the output stops printing at --more-- any idea how to get the output to print till the end.

    Read the article

  • minifying final html output using regex with codeigniter

    - by Aman
    Google pages suggest you to minify html i.e. remove all the un-necessary spaces. Codeigniter does have feature of giziping output or it can be done via .htaccess. But still I also would like to remove un-necessary spaces from final html output as well. I played a bit with this peace of code to do it, and it seem to work. This does indeed result in html that is without excess spaces and removes other tab formatting. class Welcome extends CI_Controller { function _output() { echo preg_replace('!\s+!', ' ', $output); } function index(){ ... } } Now the problem with this is there may be tag like <pre>,<textarea>, etc.. which may have space in it and regx should remove them. So, how do I remove excess space from final html, without effecting spaces or formatting for these certain tags using regx? Thanks to @Alan Moore got the answer, this worked for me echo preg_replace('#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre)\b))*+)(?:<(?>textarea|pre)\b|\z))#', ' ', $output); @ridgerunner here did very good job of analyzing this regx, ended up using his solution. Cheers to ridgerunner.

    Read the article

  • C++: Avoid .cpp files with only an empty (de)constructor

    - by Martijn Courteaux
    Hi, When I have a header file like this: #ifndef GAMEVIEW_H_ #define GAMEVIEW_H_ #include <SDL/SDL.h> class GameView { public: GameView(); virtual ~GameView(); virtual void Update() = 0; virtual void Render(SDL_Surface* buffer) = 0; }; #endif /* GAMEVIEW_H_ */ I need to create a .cpp file like this: #include "GameView.h" GameView::~GameView() { } GameView::GameView() { } This is a bit stupid. Just a .cpp file for an empty constructor and deconstructor. I want to implement that method simply in the header file. That is much cleaner. How to do this?

    Read the article

  • Why does the output look like this?

    - by cjk
    I have a c program below, I would like to send out a 32 bit message in a particular order Eg.0x00000001. #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <stdint.h> struct test { uint16_t a; uint16_t b; }; int main(int argc, char const *argv[]) { char buf[4]; struct test* ptr=(struct test*)buf; ptr->a=0x0000; ptr->b=0x0001; printf("%x %x\n",buf[0],buf[1]); //output is 0 0 printf("%x %x\n",buf[2],buf[3]); //output is 1 0 return 0; } Then I test it by print out the values in char array. I got output in the above comments. Shouldn't the output be 0 0 and 0 1? since but[3] is the last byte? Is there anything I missed? Thanks!

    Read the article

  • ant (1.8.0/1.8.1) zip empty directories

    - by andersonbd1
    Hi, I noticed that neither the zip or jar targets are including empty directories. I googled a little and found this was a regression issue way back with 1.6 (.2 I think), but it was claimed to have been fixed. I was using 1.8.0 so I upgraded to 1.8.1, but am having the same issue. Anyone know of any workarounds besides adding dummy files to those directories? Thanks, Ben Anderson

    Read the article

  • Handling of data truncation (short reads/writes) in FUSE

    - by Vi
    I expect any good program should do all their reads and writes in a loop until all data written/read without relying that write will write everything (even with regular files). Am I right? Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer (using -o direct_io). Some programs work, some not (notably mountlo). Are them buggy or programs should not expect truncated writes and reads from the regular files? In general, are seekable file descriptors expected to truncate data like sockets and pipes?

    Read the article

  • Why GUID is returned as empty?

    - by jess
    Hi, After loading an entity from the database using LINQ-to_SQL,I pass the entity.ID to a method having argument of type GUID.When I access this parameter in the method,I get an empty value,and not the GUID.Why is it so?

    Read the article

  • Getting normal information from OpenGL render output

    - by okamiueru
    I'll try to keep this simple. I want a way to access the normal information of the scene, from the Frame Buffer output (or similar). The same way one is able to access the Depth Buffer using glGetTexImage and GL_DEPTH_COMPONENT. I know I could set up a fragment shader which outputs the normal information in RGB color space, which could in turn be read from the rendered image. I'm wondering however if there is a way to do this within the openGL API. I'll clarify anything upon request as best as I can, Thank you

    Read the article

  • Delete document with an empty ID

    - by Damien MATHIEU
    Hello, I have a CouchDB database in production. One of the documents has been edited (in Futon by an other developer). And it's lost it's ID (don't ask me how he did it). So now the document's id is an empty string, which makes it impossible to edit or delete via Futon. Is there a way I could hack into CouchDB to delete that document anyway ?

    Read the article

  • NHibernate Empty Set Clauses in SQL Update Statements

    - by Brian Wilkinson
    I'm getting SQL update statements from NHibernate having a empty set clause ie UPDATE SET WHERE x == ? This propblem is occuring when a child entity is being updated for some reason the sql statement is being run against the Parent Entity, for some reason NHibenate is saying the parent has changed but when the set clause is being built no changes are found, can anyone help. The application I am constructing isn 3 tier. The domain entities are light weight data contract only entities.

    Read the article

  • useless class storage specifier in empty declaration

    - by robUK
    Hello, gcc 4.4.1 c89 I have the following code and I get a warning: unless class storage specifier in empty declaration static enum states { ACTIVE, RUNNING, STOPPED, IDLE } However, if i remove the static keyword I don't get that warning. I am compiling with the following flags: -Wall -Wextra Many thanks for any suggestions,

    Read the article

  • How it is called when write or read return less that requested?

    - by Vi
    What term should I use to describe situations (or bugs in software) caused by read, write, send, recv doing less work than expected? For example, write(fd, "123456", 6); may return 3 and we need to write "456" to finish our work. I expect any good program should do all their reads and writes in a loop until without relying that write will write everything. Am I right? /* Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer. Some programs work, some not. Are them buggy? */

    Read the article

  • C# empty statement

    - by dotnetdev
    In C#, I can write something like: using (new MyDisposableClass().MethodA()); The semicolon causes a compiler warning to be shown which states possible mistaken empty statement. I haven't run the above code but won't the method still be called? What uses is there of this type of coding convention? I saw another thread on here about this but I ask in case there areny differences now/therefore different replies. Thanks

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >