Search Results

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

Page 83/1118 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • How do I write to command line in c#?

    - by ben
    Hi I know how to write to console but if I write to console in my program and call my program from the command line it won't display anything. How do I make it so that when I say Console.WriteLine or Console.Out.Writeline ir prints to the command prompt from which it was called and not somewhere else? Once again I know how to do Console.WriteLine so it's not that :-p unless I'm doing it wrong. From what I can tell it's probably something to do with Console.SetOut(TextWriter t)

    Read the article

  • Java me : Can we retrieve bluetooth address of connected device from an open slave connection ?

    - by Rohit
    Here is a typical sequence of events that occur : Host device opens a service ( Host device accepts and opens all incoming connections) A remote device connects to host device. Now, we have a slave connection open at host device. At host device, I want to know the bluetooth address of remote device. I can always pass it as data from remote to host device, but can I extract it from connection object somehow without any data transfer? Thanks in advance...

    Read the article

  • php mysql_query return empty value

    - by proyb2
    I create a directory listing and came across this issue. what value does mysql_query($query1) return if there is no value My script received this message from $result, would it be alright to pass array(0)? Warning: mysql_fetch_array($result) expects parameter 1 to be resource, array given in

    Read the article

  • window.location call popup up empty dialog on safari

    - by memical
    Hi, on a web page i am trying to redirect the browser to another page on the same site. the code is very simple for that: window.location = "/path1/path2" on safari - both windows as well as mac - a message box containing only the text "http://domain.com" comes up. I have tried different ways of specifying this: location.href, windows.assign(...) ... and the all have the same behavior. Did any of you see this? and do you have a solution for this? Thanks.

    Read the article

  • format - Help with printing a table

    - by Michael Kohl
    This question will probably end in a facepalm, but I've tried for a while and am still stuck despite reading through the hyperspec. Basically what I want to do is something like (format t "~{|~{ ~5d~}|~%~}" '((1 23 2 312) (23 456 1 7890))) but instead of hard-coding the 5 it should be calculated from the list (length of longest element from any nested list + 1) to give something like | 1 23 2 312| | 23 456 1 7890| Maybe I'm thinking way too complicated here and there is an easier way to do what I want, but I think I ran myself into a mental corner that I can't get out of.

    Read the article

  • Count number of empty input boxes in table row

    - by Daniel Brink
    How do you calculate the number of input boxes with no value in a table row using jquery? example: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input type="text" value="10%" /></td> <td><input type="text" value="" /></td> <td><input type="text" /></td> </tr> <table> I'm looking for answer = 2

    Read the article

  • Writing Lucene StandardAnalyzer results to text file with OutputStreamWriter

    - by user3693192
    I'm getting ONLY the last result written to "outputStreamFile.txt". Can't figure out how to revise code so I can get ALL results written to text file. Sample input text: "1st line of text\n" "2nd line of text \n" Results in only 2nd line begin written (and not 1st line) as: "2nd line text\n" private static void analyze(String text) throws IOException { analyzer = new StandardAnalyzer(Version.LUCENE_30); Reader r = new StringReader(text); TokenStream ts = (TokenStream) analyzer.tokenStream("", r); TermAttribute term = ts.addAttribute(TermAttribute.class); File outfile = new File("C:\\Users\\Desktop\\outputStreamFile.txt"); FileOutputStream fileOutputStream = new FileOutputStream(outfile); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, "UTF8"); while(ts.incrementToken()) { //System.out.print(term.term() + " "); outputStreamWriter.write(term.term().toString() + "\r\n"); } outputStreamWriter.close(); }

    Read the article

  • Apache HTTPClient returns an empty page

    - by mariosangiorgio
    Hi, I am using the Apache HTTPClient for Java and I'm facing a really strange issue. Sometimes when I try to get a dynamically generated page it returns its actual content, but other times (with another parameter) all I get is a short sequence of \t,\r and \n. How could I track what's going on on the different cases in order to find where is the bug? My usage of the library is pretty straightforward, all I do is this few calls on an initialized HTTPClient object: String content = "/pageIwant.jsp?parameter=10101010"; HttpGet request = new HttpGet(content); HttpResponse response = client.execute(targetHost, request); HttpEntity entity = response.getEntity(); String page = EntityUtils.toString(entity);

    Read the article

  • Opencv video frame not showing Sobel output

    - by user1016950
    This is a continuation question from Opencv video frame giving me an error I think I closed it off, Im new to Stackoverflow. I have code below that Im trying to see its Sobel edge image. However the program runs but the output is just a grey screen where if I mouseover the cursor disappears. Does anyone see the error? or is it a misunderstanding about the data structures Im using IplImage *frame, *frame_copy = 0; // capture frames from video CvCapture *capture = cvCaptureFromFile( "lightinbox1.avi"); //Allows Access to video propertys cvQueryFrame(capture); //Get the number of frames int nframe=(int) cvGetCaptureProperty(capture,CV_CAP_PROP_FRAME_COUNT); //Name window cvNamedWindow( "video:", 1 ); //start loop for(int i=0;i<nframe;i++){ //prepare capture frame extraction cvGrabFrame(capture); cout<<"We are on frame "<<i<<"\n"; //Get this frame frame = cvRetrieveFrame( capture ); con2txt(frame); frame_copy = cvCreateImage(cvSize(frame->width,frame->height),IPL_DEPTH_8U,frame->nChannels ); //show and destroy frame cvCvtColor( frame,frame,CV_RGB2GRAY); //Create Sobel output frame_copy1 = cvCreateImage(cvSize(frame->width,frame->height),IPL_DEPTH_16S,1 ); cvSobel(frame_copy,frame_copy1,2,2,3); cvShowImage("video:",frame_copy1); cvWaitKey(33);} cvReleaseCapture(&capture);

    Read the article

  • Reading DWORD from binary file

    - by Archcegeloge
    Why these lines of code doesn't work when i try to read a DWORD num = 1880762702 using fread(&num, "file path", 1, FILE*); I get the result = 10574 if I change the num to any other number say 2880762702 only then it works.

    Read the article

  • PHP Form - Empty input enter this text - Validation

    - by James Skelton
    No doubt very simple question for someone with php knowledge. I have a form with a datepicker, all is fine when a user has selected a date the email is send with: Date: 2012 04 10 But i would like if the user has skipped this and left blank (as i have not made this required) to send as: Date: Not Entered (<-- Or something) Instead at the minute of course it reads: Date: Form input <input type="text" class="form-control" id="datepicker" name="datepicker" size="50" value="Date Of Wedding" /> This is the validator $(document).ready(function(){ //validation contact form $('#submit').click(function(event){ event.preventDefault(); var fname = $('#name').val(); var validInput = new RegExp(/^[a-zA-Z0-9\s]+$/); var email = $('#email').val(); var validEmail = new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/); var message = $('#message').val(); if(fname==''){ showError('<div class="alert alert-danger">Please enter your name.</div>', $('#name')); $('#name').addClass('required'); return;} if(!validInput.test(fname)){ showError('<div class="alert alert-danger">Please enter a valid name.</div>', $('#name')); $('#name').addClass('required'); return;} if(email==''){ showError('<div class="alert alert-danger">Please enter an email address.</div>', $('#email')); $('#email').addClass('required'); return;} if(!validEmail.test(email)){ showError('<div class="alert alert-danger">Please enter a valid email.</div>', $('#email')); $('#email').addClass('required'); return;} if(message==''){ showError('<div class="alert alert-danger">Please enter a message.</div>', $('#message')); $('#message').addClass('required'); return;} // setup some local variables var request; var form = $(this).closest('form'); // serialize the data in the form var serializedData = form.serialize(); // fire off the request to /contact.php request = $.ajax({ url: "contact.php", type: "post", data: serializedData }); // callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('.contactWrap').show( 'slow' ).fadeIn("slow").html(' <div class="alert alert-success centered"><h3>Thank you! Your message has been sent.</h3></div> '); }); // callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // log the error to the console console.error( "The following error occured: "+ textStatus, errorThrown ); }); }); //remove 'required' class and hide error $('input, textarea').keyup( function(event){ if($(this).hasClass('required')){ $(this).removeClass('required'); $('.error').hide("slow").fadeOut("slow"); } }); // show error showError = function (error, target){ $('.error').removeClass('hidden').show("slow").fadeIn("slow").html(error); $('.error').data('target', target); $(target).focus(); console.log(target); console.log(error); return; } });

    Read the article

  • asp:QueryStringParameter and empty query string parameter

    - by abatishchev
    I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client: View.aspx has to display everything, View.aspx?client=1 has to display only requests from client ID #1. So I'm using <asp:QueryStringParameter Name="client" QueryStringField="client" /> for query "EXEC getRequests @client". Everything works properly when some client is specified. But don't - if not. I tested my SP using SSMS - it works properly in both cases - when parameter is specified and when it isn't (NULL passed explicitly). What have I do?

    Read the article

  • Inability to detect the Output from inside a SSIS script component

    - by Danaja
    In the script of the script components the Output buffer is not being detected as an existing component. I am trying to use the following piece of code Output0Buffer.AddRow(); within the public override void Input0_ProcessInputRow(Input0Buffer Row) method. I know it should be available within this method because at the moment I am copying and using a component from a previous project that has this code and it works. but when I create a new component and put the same code in it doesn't Can any one explain why this is happening?

    Read the article

  • own drawImage / drawLine in OpenGL

    - by Chrise
    I'm implementing some native 2D-draw functions in my graphics engine for android, but now there's another question coming up, when I observe the performance of my program. At the moment I'm implementing a drawLine/drawImage function. In summary, there are following different values for drawing each different line / image: the color the alpha value the width of the line rotation (only for images) size/scale (also for images) blending method (subrtract, add, normal-alpha) Now, when an imageLine is drawn, I put the CPU-calculated vertex-positions and uv-values for 6 vertices (2 triangles), into a Floatbuffer and draw it immediately with drawArrays, after passing information for drawing (color,alpha, etc.) via uniforms to the shader. When I draw an image, the pre-set VBO is directly drawn after passing information. The first fact I recognized, is: of course drawing Images is much faster, than imagelines (beacuse of VBOs), but also: I cannot pre-put vertex-data into a VBO for imageLines, because imageLines have no static shape like normal images (varying linelength, varying linewidth and the vertex positions of x1,y1 and x2,y2 change too often) That's why I use a normal Floatbuffer, instead of a VBO. So my question is: What's the best way for managing images, and other 2D-graphics functions. For me it's some kind of important, that the user of the engine is able to draw as many images/2D graphics as possible, without loosing to much performance. You can find the functions for drawing images, imagelines, rects, quads, etc. here: https://github.com/Chrise55/LLama3D/blob/master/Llama3DLibrary/src/com/llama3d/object/graphics/image/ImageBase.java Here an example how it looks with many images (testing artificial neural networks), it works fine, but already little bit slow with that many images... :(

    Read the article

  • Xml output on HTML

    - by umitunal
    Hi, My xml data = &lt;Item "/api/items/4000000002011"&gt;&lt;ItemID&gt;4000000002011&lt;/ItemID&gt;&lt;Name&gt;Sample Item1&lt;/Name&gt;&lt;Description&gt;Sample Description&lt;/Description&gt;&lt;Rate&gt;34.00&lt;/Rate&gt;&lt;Tax1Name&gt;PST&lt;/Tax1Name&gt;&lt;Tax1Percentage&gt;8&lt;/Tax1Percentage&gt;&lt;Tax2Name/&gt;&lt;Tax2Percentage/&gt;&lt;/Item&gt; Html output=<Item uri="/api/items/4000000002011"> <ItemID>4000000002011</ItemID><Name>Sample Item1</Name><Description>Sample Description</Description><Rate>34.00</Rate><Tax1Name>PST</Tax1Name><Tax1Percentage>8</Tax1Percentage><Tax2Name/><Tax2Percentage/></Item> I want to html output.How do I? <Item "/api/items/4000000002011"> <ItemID>4000000002011</ItemID> <Name>Sample Item1</Name> <Description>Sample Description</Description> <Rate>34.00</Rate> <Tax1Name>PST</Tax1Name> <Tax1Percentage>8</Tax1Percentage> <Tax2Name/> <Tax2Percentage/> </Item>

    Read the article

  • Avoid Flickering in Windows Forms?

    - by user1733909
    Double buffering not working with combo-box. is there any another methods to avoid flickering in windows forms? i have one windows form with number of panels in it. I'm showing only one panel at a time based on my menu selection. i have one icon panel,one header panel and the combo box. based on the selected item of that combo-box the gridview1 and 2 are filling. when I'm rapidly selecting the combo-box item using my keyboard down arrow the icon panel and the header panel are always repainting. i need to keep that both without any change. this two panels producing some flashing effect(ie,they are blinking or flashing) while I'm changing the combo box selected index. is there any way to avoid this flashing.? i tried double-buffered enabled in form constructor and form load event. Please Help..............

    Read the article

  • MySQL update query, how to skip empty values?

    - by Pawel
    I've got such query: $sql = "UPDATE test_accs SET acc_owner = '$owner_id', acc_policy_version = '$version', acc_policy_last_update = '$approved', acc_policy_next_update = '$renewed' WHERE acc_id = '1'"; Now, all of these values on the web folmular are optional, one can set one of these values, two, or so. Now, after I submit the form, it goes in the query like that: UPDATE test_accs SET acc_owner = '2', acc_policy_version = '1.2', acc_policy_last_update = '2012-12-19', acc_policy_next_update = '2012-12-18' WHERE acc_id = '1' It works only when I submit all values from the form. Can you please show me how could it work even if not all the values has been sent, just for example one of them? When I set one value (f.ex. policy version), it looks like that: UPDATE test_accs SET acc_owner = '', acc_policy_version = '1.2', acc_policy_last_update = '', acc_policy_next_update = '' WHERE acc_id = '1' and it isn't working. It might be possible cause of the acc_owner table values? #1366 - Incorrect integer value: '' for column 'acc_owner' at row 1 Thanks in advice.

    Read the article

  • Yield and default case || do not output default case

    - by coulix
    Hello Railers, I have a simple yield use case and for some unknown reason the default case is never shown: In my super_admin layout I have: <%= yield :body_id || 'super_admin_main' %> My controller class Superadmin::GolfsController < ApplicationController layout "super_admin" def show end end My show view With or without <% content_for(:body_id) do %sadmin_golfs<% end % With: sadmin_golfs is shown. without: empty string is shown instead of super_admin_main Can anyone reproduce the same behavior ? Rails 3

    Read the article

  • Ant: how do I disable all non-error messages?

    - by java.is.for.desktop
    Hello, everyone! When running ant from command line on my Netbeans projects, I get the following messages hundreds of times, which is very annoying: Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java Depending of the kind of the project, there can be much more of such lines. And this is with the -q or -quiet option. Any idea, how to disable this message? Thank you!

    Read the article

  • PHP contact form sends empty data

    - by Alan Lawlessness
    I am trying to create a HTML5 contact form compatible with computer and mobile devices, when I clicked on send message it jumps into a blank white screen. I do get a email but it contains no information. I am quite new with PHP. For www.rare1.ca/test: <!DOCTYPE html> <html> <head> <title>Responsive HTML5/CSS3 template</title> <meta charset="utf-8" /> <meta name = "viewport" content = "width=device-width, maximum-scale = 1, minimum- scale=1" /> <link rel="stylesheet" type="text/css" href="css/default.css" media="all" /> <link rel="stylesheet" href="css/flexslider.css" type="text/css" /> <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css' /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="js/jquery.flexslider.js"></script> <script src="js/default.js"></script> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="js/respond.min.js"></script> <![endif]--> </head> <body> <div id="pagewidth"> <header id="header"> <div class="center"> <nav id="mainNav"> <ul> <li class="active"><a href="#pagewidth"><span>gallery</span></a></li> <li></li> <li></li> <li></li> <li></li> <li><a href="#contactUs"><span>contact us</span></a></li> </ul> </nav> </div> </header> <div id="content"> <section class="row"> <div class="center"> <h1><img src="img/logo.gif" width="142" height="78"></h1> <strong class="subHeading">Coming soon</strong> <div class="gallery"> <ul class="slides"> <li><img src="img/img-gallery.jpg" alt="image" /></li> <li><img src="img/img-gallery2.jpg" alt="image" /></li> <li><img src="img/img-gallery3.jpg" alt="image" /></li> </ul> </div> <div class="buttons"></div> </div> </section> <section id="contactUs" class="row grey"> <div class="center"> <h1>Contact Us</h1> <strong class="subHeading">lorem ipsum dolor sit amet, consectetur adipiscing elit</strong> <div class="columns"> <div class="half"> <form action="sendemail.php" class="form"> <fieldset> <h2>Feedback form</h2> <div class="formRow"> <div class="textField"><input type="text" name="Name" id="name" placeholder="Your name ..." /></div> </div> <div class="formRow"> <div class="textField"><input type="text" name="Email" id="email" placeholder="Your Email ..." /></div> </div> <div class="formRow"> <div class="textField"><textarea name="Message" cols="20" rows="4" placeholder="Your message ..."></textarea> </div> </div> <div class="formRow"> <button class="btnSmall btn submit right"> <span>Send Message</span> </button> </div> </fieldset> </form> </div> <div class="half"> <h2>How to find us</h2> <div id="map"> <div class="imgHolder"><img src="img/map.jpg" alt="google map" /></div> </div> </div> </div> </div> </section> </div> <footer id="footer"> <div class="center"> </div> </footer> </div> </body> </html> <?php // This is the script for sending email. // change the email address below to your own email address. $mailTo = '[email protected]'; $name = htmlspecialchars($_POST['Name']); $mailFrom = htmlspecialchars($_POST['Email']); $message_text = htmlspecialchars($_POST['Message']); $headers = "From: $name <$mailFrom>\n"; $headers .= "Reply-To: $name <$mailFrom>\n"; $message = $message_text; mail($mailTo, $subject, $message, $headers ); ?>

    Read the article

  • Drupal: empty CCK Text Area are shown with tag <br />

    - by Patrick
    hi, I'm using several CCK Text Area in my content page. The fields are optional, but if I don't fill them, I see them on the page anyway, and the content is .. i.e. FieldName: <br /> I would like to make them disappear instead.. I found out the problem is that CCKEditor add a even if I've never typed in that window. How can I disable this ? thanks

    Read the article

  • empty base class optimization

    - by FredOverflow
    Two quotes from the C++ standard, §1.8: An object is a region of storage. Base class subobjects may have zero size. I don't think a region of storage can be of size zero. That would mean that some base class subobjects aren't actually objects. Opinions?

    Read the article

  • PHP MSSQL : How to display output when query return no row

    - by vamps
    i have a problem with my PHP-MSSQL query. i have a join table that need to give a result something be like this: Department Group A Group B Total A+B WORKHOUR A OTHOUR A WORKHOUR B OTHOUR B WORKHOUR OTHOUR HR 10 15 25 0 35 15 IT 5 5 5 5 Admin 12 12 12 12 the query will count how many employee as per given date (admin will enter data and once submitted, the query will give the above result). The problem is, the final output is a mess when there's no row to be displayed. the column is shifted to the right. i.e: only Group A in IT only Group B in Admin Department Group A Group B Total A+B WORKHOUR A OTHOUR A WORKHOUR B OTHOUR B WORKHOUR OTHOUR HR 10 15 25 0 35 15 IT 5 5 5 5 Admin 12 12 12 12 my question is, how to prevent this to happen? i've tried everything with While.... if else.. but the result is still the same. how to display output "0" if no rows to return? echo "0"; this is my QUERY: select DD.DPT_ID,DPT.DEPARTMENT_NAME,TU.EMP_GROUP, sum(DD.WORK_HOUR) AS WORK_HOUR, sum(DD.OT_HOUR) AS OT_HOUR FROM DEPARTMENT_DETAIL DD left join DEPARTMENT DPT ON (DD.DEPT_ID=DPT.DEPT_ID) LEFT JOIN TBL_USERS TU ON (TU.EMP_ID=DD.EMP_ID) WHERE DD_DATE>='2012-01-01' AND DD_DATE<='2012-01-31' AND TU.EMP_GROUP!=2 GROUP BY DD.DEPT_ID, DPT.DEPARTMENT_NAME,TU.EMP_GROUP ORDER BY DPT.DEPARTMENT_NAME this is one of the logic that i've used, but doesn't return the result that i want:: while($row = mssql_fetch_array($displayResult)) { if ((!$row["WORK_HOUR"])&&(!$row["OT_HOUR"])) { echo "<td >"; echo "empty"; echo "&nbsp;</td>"; echo "<td >"; echo "empty"; echo "&nbsp;</td>"; } else { echo "<td>"; echo $row["WORK_HOUR"]; echo "&nbsp;</td>"; echo "<td>"; echo $row["OT_HOUR"]; echo "&nbsp;</td>"; } } please help. i've been doing this for 2 days. @__@

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >