Search Results

Search found 31994 results on 1280 pages for 'input output'.

Page 7/1280 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Using OUTPUT/INTO within instead of insert trigger invalidates 'inserted' table

    - by Dan
    I have a problem using a table with an instead of insert trigger. The table I created contains an identity column. I need to use an instead of insert trigger on this table. I also need to see the value of the newly inserted identity from within my trigger which requires the use of OUTPUT/INTO within the trigger. The problem is then that clients that perform INSERTs cannot see the inserted values. For example, I create a simple table: CREATE TABLE [MyTable]( [MyID] [int] IDENTITY(1,1) NOT NULL, [MyBit] [bit] NOT NULL, CONSTRAINT [PK_MyTable_MyID] PRIMARY KEY NONCLUSTERED ( [MyID] ASC )) Next I create a simple instead of trigger: create trigger [trMyTableInsert] on [MyTable] instead of insert as BEGIN DECLARE @InsertedRows table( MyID int, MyBit bit); INSERT INTO [MyTable] ([MyBit]) OUTPUT inserted.MyID, inserted.MyBit INTO @InsertedRows SELECT inserted.MyBit FROM inserted; -- LOGIC NOT SHOWN HERE THAT USES @InsertedRows END; Lastly, I attempt to perform an insert and retrieve the inserted values: DECLARE @tbl TABLE (myID INT) insert into MyTable (MyBit) OUTPUT inserted.MyID INTO @tbl VALUES (1) SELECT * from @tbl The issue is all I ever get back is zero. I can see the row was correctly inserted into the table. I also know that if I remove the OUTPUT/INTO from within the trigger this problem goes away. Any thoughts as to what I'm doing wrong? Or is how I want to do things not feasible? Thanks.

    Read the article

  • XSL transformation generating output from other nodes

    - by Abel Morelos
    I have the following XSL template: <xsl:template match="SOAP-ENV:Body/*[local-name()='Publisher']"> <html> <xsl:call-template name="body" /> </html> </xsl:template> The previous template generates the output I want, it's generating the tags containing the output generated by the "body" template. The issue I'm having is that before the opening tag I'm getting text output from a previous node. Not sure why this is happening since I'm not selecting these other nodes. For example: <SOAP-ENV:Header> <!-- Many child nodes here--> </SOAP-ENV:Header> <SOAP-ENV:Body> <publishParty:Publisher> <!-- Many child nodes here--> </publishParty:Publisher> </SOAP-ENV:Body> Given the previous sample XML fragment, my output would contain what I would expect of formatting the Publisher element, but I'm also getting the text nodes of the children of the SOAP-ENV:Header node. Any ideas? Thanks!

    Read the article

  • adding Form Validation Javacript of jquery???

    - by user634599
    How can I add inline Validation to make sure a choice of radio input must be selected <script type="text/javascript"> function choosePage() { if(document.getElementById('weightloss').form1_option1.checked) { window.location.replace( "http://google.com/" ); } if(document.getElementById('weightloss').form1_option2.checked) { window.location.replace( "http://yahoo.com/" ); } } </script> <form id="weightloss"> <input type="radio" id="form1_option1" name="weight-loss" value="5_day" class="plan"> <label for="form1_option1"> 5 Day - All Inclusive Price</label><br> <input type="radio" id="form1_option2" name="weight-loss" value="7_day"> <label for="form1_option2"> 7 Day - All Inclusive Price</label><br> <input type="button" value="Place Order" alt="Submit button" class="orange_btn" onclick="choosePage()"> </form>

    Read the article

  • Output columns not in destination table?

    - by lance
    SUMMARY: I need to use an OUTPUT clause on an INSERT statement to return columns which don't exist on the table into which I'm inserting. If I can avoid it, I don't want to add columns to the table to which I'm inserting. DETAILS: My FinishedDocument table has only one column. This is the table into which I'm inserting. FinishedDocument -- DocumentID My Document table has two columns. This is the table from which I need to return data. Document -- DocumentID -- Description The following inserts one row into FinishedDocument. Its OUTPUT clause returns the DocumentID which was inserted. This works, but it doesn't give me the Description of the inserted document. INSERT INTO FinishedDocument OUTPUT INSERTED.DocumentID SELECT DocumentID FROM Document WHERE DocumentID = @DocumentID I need to return from the Document table both the DocumentID and the Description of the matching document from the INSERT. What syntax do I need to pull this off? I'm thinking it's possible only with the one INSERT statement, by tweaking the OUTPUT clause (in a way I clearly don't understand)? Is there a smarter way that doesn't resemble the path I'm going down here? EDIT: SQL Server 2005

    Read the article

  • Rogue black-box java application not responding to standard input redirect

    - by Stefan Kendall
    I have an external java application (blackbox), which requires authentication. I need to run this application in a batch setting, but it seems to be reading from standard input in some nonstandard way. That is, if I set the calling of the program to redirect STDIN to a file (... <password.txt) or pipe data to it (echo mypasword | ...), it does not recognize the input. As I run it, also, it seems to intercept Cntrl+c and Cntrl+d and Cntrl+z as legitimate password characters, so it must be doing something odd and not just reading from standard in. Any idea what this application could be doing to read in input? I need to be able to send it information programmatically, and I'm stumped for the moment.

    Read the article

  • MPI C fprintf() output not showing up if the process hangs on MPI_Recv

    - by Karolis
    I'm writing an MPI C program. I have troubles debugging it, because whenever I use fprintf, like this: fprintf(stdout, "worker: %d", worker); if the program hangs, because of some blocking MPI_Recv, I can't see any output. I'm sure the line of code is reached, because I can put a return statement after the fprintf statement, in which case the process finishes execution and the output is printed. Any ideas, on how to print (see the output) even though the process gets blocked later by Recv? I hope this makes sense.

    Read the article

  • How to Redirect a Python Console output to a QTextBox

    - by krishnanunni
    Hello, I'm working on developing a GUI for the recompilation of Linux kernel. For this I need to implement 4-5 Linux commands from Python. I use Qt as GUI designer. I have successfully implemented the commands using os.system() call. But the output is obtained at the console. The real problem is the output of command is a listing that takes almost 20-25 min continuous printing. How we can transfer this console output to a text box designed in Qt. Can any one help me to implement the setSource() operation in Qt using source as the live console outputs.

    Read the article

  • How do I get rid of extra lines in my output from Rails

    - by Dan B
    I am using Rails 2.1 to output tables from a database. But the output includes lots of extra lines and tabs. I am using a while loop with lots of nested if statements. I am also wrapping all of my non-output lines in <%- code -%. Any idea what might be happening and a solution? Thanks, ex: <tr> <td>Some data</td> <td>more data</td>

    Read the article

  • my output parameters are always null when i use BeginExecuteNonQuery

    - by CharlesO
    I have a stored procedure that returns a varchar(160) as an output parameter of a stored procedure. Everything works fine when i use ExecuteNonQuery, i always get back the expected value. However, once i switch to use BeginExecuteNonQuery, i get a null value for the output. I am using connString + "Asynchronous Processing=true;" in both cases. Sadly the BeginExecuteNonQuery is about 1.5 times faster in my case...but i really need the output parameter. Thanks!

    Read the article

  • Run command with no terminal output

    - by Insomaniacal
    Hello, I've searched around online, but can't find the answer to my question. What I want to do is run a command in pythong, using the subprocess module, and store the output in a variable. However, I do not want the command's output to be printed to the terminal. For this code: def storels(): a = subprocess.Popen("ls",shell=True) storels() I get the directory listing in the terminal, instead of having it stored in a. I've also tried def storels(): subprocess.Popen("ls > tmp",shell=True) a = open("./tmp") [Rest of Code] storels() This also prints the output of ls to my terminal. I've even tried this command with the somewhat dated os.system method, since running "ls tmp" in the terminal doesn't print ls to the terminal at all, but stores it in tmp. However, the same thing happens. I'm using python 2.6. Any suggestions? Thanks in advance!

    Read the article

  • How do I fix a corrupted harddrive after failed upgrade?

    - by Nil
    The problem originated when I was trying to fix this problem. Things went horribly, horribly wrong and I ended up with a new problem altogether. The last thing I did was run sudo apt-get install and that caused my system to freeze. I restarted my computer and it would not boot from the harddrive. I ran a copy of Ubuntu 12.10 from a flashdrive that I had and ran gparted to see if my partitions were all there. It returned this message: Invalid partition table on /dev/sda -- wrong signature 5208. The drive appeared as a 2TiB unallocated drive with an error. The drive had 4 partitions before (plus random unallocated space). There was a fat32 partition, an ext4 partition which contained ubuntu 13.04/13.10 (I don't even know which one at this point), an extended partition which contained a swap partition for my ubuntu partition (I was meaning to move that ubuntu partition into the extended partition, never got around to it), and another partition (I don't remember how I formatted it). I should also mention this is a 1TB harddrive. So in short, I have a corrupted partition table on my primary harddrive from which I boot from, how can I fix this? I tried mounting the drive with sudo mount /dev/sda1 /media/ubuntu then I changed my directory to said folder and tried to list files and this monstrosity happened: $ ls ls: cannot access ??w?j^?.: Input/output error ls: cannot access ??(? ?x?.|: Input/output error ls: cannot access 6W_@?)?._??: Input/output error ls: cannot access HB0v???.A}?: Input/output error ls: cannot access ???.?X: Input/output error ls: cannot access t)?.+?l: Input/output error ls: cannot access ?h@ ?.@ : Input/output error ls: cannot access >? @??.???: Input/output error ls: cannot access m???.??: Input/output error ls: cannot access @ if??a?: Input/output error ls: cannot access ?M!vN$?.??n: Input/output error ls: cannot access ?o? ??.Bm`: Input/output error ls: cannot access ?:I??? M. : Input/output error ls: cannot access W??.??: Input/output error ls: cannot access ?: Input/output error ls: cannot access ?W?s??: Input/output error ls: cannot access ?v?k?.???: Input/output error ls: cannot access 5?$<N??: Input/output error .x????.??i: Input/output error ls: cannot access je????.j?1: Input/output error XjD?.???: Input/output error ls: cannot access W??n???.?: Input/output error ls: cannot access ?^x.$"?: Input/output error ls: cannot access !??*!??j.??: Input/output error ls: cannot access '-??k?^?.???: Input/output error ls: cannot access b?w?w?b.\??: Input/output error ls: cannot access o????"z.??B: Input/output error ls: cannot access ??b?h.?3-: Input/output error ls: cannot access ??.$7: Input/output error ls: cannot access )??K.bk: Input/output error ls: cannot access s??z?.?(?: Input/output error ls: cannot access ?F@?0?.@?: Input/output error .?D: Input/output error .??: Input/output error ls: cannot access?????. @: Input/output error ls: cannot access ?/?? ?.??: No such file or directory ls: cannot access rk?p4q(?.?k: Input/output error This looks promising. This is the output of fdisk -l $ sudo fdisk -l /dev/sda Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: ignoring extra data in partition table 5 Warning: invalid flag 0x5208 of partition table 5 will be corrected by w(rite) Disk /dev/sda: 2199.0 GB, 2199023132672 bytes 255 heads, 63 sectors/track, 267349 cylinders, total 4294967056 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x44fdfe06 Device Boot Start End Blocks Id System /dev/sda1 113305600 894715903 390705152 c W95 FAT32 (LBA) /dev/sda2 894715904 1489307647 297295872 83 Linux /dev/sda3 1489309694 1497307135 3998721 5 Extended /dev/sda4 1497309184 1953523711 228107264 7 HPFS/NTFS/exFAT /dev/sda5 ? 3013257822 3688738171 337740175 aa Unknown

    Read the article

  • user input of one php script pass to another php without modification in first php script

    - by ish12
    hi all.. Consider two php scripts(o.php & t.php) o.php contains both html and php. html here gets user input for eg:user name and password this information is passed to php using php-self. I want the user input of o.php passed to t.php without any modification in o.php. I ve used include and require in the t.php but the problem is it displays the output of o.php but i need only the user input values from o.php without displaying the output of o.php. Using functions or session in o.php we can pass user input but am in the situation tat i should not add or modify o.php. thanks in advance!!

    Read the article

  • Collapse span when input button is hidden

    - by Evan
    I have a style that wraps around an input button, so the button can be styled very creatively. When the button is hidden in .Net, i would like the style to collapse so it renders like its hidden as well. What the style does, as a result of no value in the button or its hidden, is it keeps a small shape. Click to see a demo: http://media.apus.edu/it/evan-testing/button.htm <style> .button { cursor:pointer; text-decoration:none; background:url(button_bg.gif) no-repeat right top; padding-right:10px; display:inline-block; line-height:29px; height:29px; font-size:12px; color:#FFFFFF; font-weight:bold; } span.button { vertical-align: middle; } .button span { background:url(button_bg.gif) no-repeat left top; padding-left:10px; line-height:20px; height:29px; display:inline-block; } .button span span { background:transparent; padding:0; font-size:12px; } .button span input { cursor:pointer; font-weight:bold; background:transparent; border:0; padding-top:.4em; font-size:12px; font-family:verdana; color:#FFFFFF; } .button:hover { background-position:right -39px; } .button:hover span { background-position:left -39px; } .button:active { background-position:right -78px; } .button:active span { background-position:left -78px; } </style> Input button wrapped in a span with no value: <span class="button"><span><input type="button" value=""></span></span> <P> Input button wrapped in a span with a value: <span class="button"><span><input type="button" value="test"></span></span> <P> Span with no data value: <span class="button"><span></span>

    Read the article

  • Validating User Input? C#

    - by Alex
    Hi, in an assignment, I have designed a input validation loop in C#, and I would like it to be able to check for the correct input format. I'm not for sure, but I think my designed loop is not checking the type of input, just what char is entered. I know I could use a try-catch block, but shouldn't you only use exceptions for exceptional situations? This is not an exceptional situation, because I expect that the user would enter an incorrect value. Input validation is not part of my assignment, so the loop is in a homework assignment, but is not part of the homework assignment. Question: Is there a way I could redesign this loop so that it checks for valid input type as well? Code: do { Console.Write("Do you wish to enter another complex number?: (Y or N)"); response = char.Parse(Console.ReadLine()); response = char.ToUpper(response); if (response != 'Y' && response != 'N') Console.WriteLine("You must respond Y or N!"); } while (response != 'Y' && response != 'N'); Thanks!!

    Read the article

  • How to read LARGE Sqlite file to be copied into Android emulator, or device from assets folder?

    - by Peter SHINe ???
    I guess many people already read this article: Using your own SQLite database in Android applications: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/comment-page-2/#comment-12368 However it's keep bringing IOException at while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } I’am trying to use a large DB file. It’s as big as 8MB I built it using sqlite3 in Mac OS X, inserted UTF-8 encoded strings (for I am using Korean), added android_meta table with ko_KR as locale, as instructed above. However, When I debug, it keeps showing IOException at length=myInput.read(buffer) I suspect it’s caused by trying to read a big file. If not, I have no clue why. I tested the same code using much smaller text file, and it worked fine. Can anyone help me out on this? I’ve searched many places, but no place gave me the clear answer, or good solution. Good meaning efficient or easy. I will try use BufferedInput(Output)Stream, but if the simpler one cannot work, I don’t think this will work either. Can anyone explain the fundamental limits in file input/output in Android, and the right way around it, possibly? I will really appreciate anyone’s considerate answer. Thank you. WITH MORE DETAIL: private void copyDataBase() throws IOException{ //Open your local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); }

    Read the article

  • horizontal scroll bar of IE and input text box

    - by sharpboy2008
    I have a situation, where I have a text input box in IE(input type='text') But the horizontal scroll bar of IE will be shown when it has lots of texts , and the box is not fixed-size. What I would like to have is: 1. The input box should accommodate the whole text(not fixed -size). the horizontal scroll bar of IE will not be shown.

    Read the article

  • 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

  • Keyboard input with timeout in Python

    - by J. Pablo Fernández
    How would you prompt the user for some input but timing out after N seconds? Google is pointing to a mail thread about it at http://mail.python.org/pipermail/python-list/2006-January/533215.html but it seems not to work. The statement in which the timeout happens, no matter whether it is a sys.input.readline or timer.sleep(), I always get: <type 'exceptions.TypeError'>: [raw_]input expected at most 1 arguments, got 2 which somehow the except fails to catch.

    Read the article

  • $_POST goes empty after adding a new input type "file"

    - by heldrida
    Hi, I'm not finding a way to understand and fix this and I've done a lot. I've got a script, wish is a simple form, that sends a file trough POST. The second file, process the info. By default, I give to the user a few fields, one of them being a input field of type "file" and there's also, a few "hidden" one's, that gives me values to work with on POST. I found that, when adding a new input of type "file", the $_POST returns array 0, even $_FILES returns nothing. I have no idea how to fix this, and it works just fine when keeping the default input box of type "file". This is the form http://pastie.org/872488 This only happens when: Exists! var_dump( $_POST ), or $_FILES, print_r(), etc Returns nothing. I've tryed to create a array on the input of type "files", like img_p_child[], but nothing. How to solve this ? Thanks for taking your time!

    Read the article

  • Cloning input type file and set the value

    - by jribeiro
    I know that it isn't possible to set the value of an input type="file" for security reasons... My problem is: I needed to style an input type="file" so what I did was have a button and hide the file input. like: <a href="#" onclick="$('input[name=&quot;photo1&quot;]').click(); return false;" id="photo1-link"></a> <input type="file" name="photo1" class="fileInput jqtranformdone validate[required]" id="photo1" /> These works great in all browsers except IE which gives me an access denied error on submitting through ajax. I'm using the ajaxSubmit jquery plugin (malsup.com/jquery/form/) So after reading for a while I tried to do: var photo1Val = $('#photo1').val(); var clone1 = $('#photo1').clone().val(photo1Val); $('#photo1').remove(); clone1.appendTo('form'); console.log(photo1Val) //prints the right value C:/fakepath/blablabla.jpg $('form').ajaxSubmit(options); The problem is that after this the value of $('#photo1') is empty... Any ideas how to work around this? Thanks

    Read the article

  • How to change this C++ code to make input work better

    - by Phenom
    cout << "Input street number: "; cin >> streetnum; cout << "Input street name: "; cin >> streetname; cout << "Input resource name: "; cin >> rName; cout << "Input architectural style: "; cin >> aStyle; cout << "Input year built: "; cin >> year; The problem with the above code happens if you enter in spaces between words. For example if I enter "Ampitheater Parkway" for streetname, then it puts "Ampitheater" in streetname, skips the prompt for resource name and enters "Parkway" into the next field. How can I fix this?

    Read the article

  • Accessing the value of an input element with XPath in an XSLT

    - by asymmetric
    Hi! I'm developing a web app that has a button that triggers an XSLT transformation of the document DOM, with a stylesheet fetched via AJAX. Here's a portion of the HTML: <html> <head> <title>Static Javascript-based XMR Form Creator</title> </head> <body> <h1 id="title">Static Javascript-based XMR Form Creator</h1> <div class="opt_block" id="main_opts"> Form name <input type="text" id="form_name" /> Form cols <input type="text" id="form_cols" size="3" maxlength="3" /> </div> <button id="generate">Generate source</button> <textarea rows="20" cols="50" id="xmr_source" ></textarea> </body> Inside the stylesheet, I want to access the value attribute of the first input field, the one with id form_name. The XSLT looks like this: <xsl:template match="/html/body/div[@id = 'main_opts']" > <form> <xsl:attribute name="fname"> <xsl:value-of select="input[@id = 'form_name']/@value" /> </xsl:attribute> </form> </xsl:template> The problem is that the XPath that should do the work: <xsl:value-of select="input[@id = 'form_name']/@value" /> returns nothing. Can anyone help?

    Read the article

  • Running a Java program with input from a file

    - by Katy
    I am writing a program that reads the input from a file and then prints it to the screen. When I run it without taking the input from the file, it works perfectly fine. However, every time I try to run it from the file it gives me an "Exception in thread "main" java.util.NoSuchElementException: No line found at" error that occurs every place the input is suppose to be read. I have no idea what is going on.

    Read the article

  • I need a small parser (jquery) that knows if an input is URL:PORT format

    - by Johua
    You have a user input string from a textbox for example var strInput = $("#txtBox").val(); strInput has some string now. I need to now if it is of this format: IP:PORT Basically a user can input something like this: http://192.168.300.22:20000 1) Frist part (protocol): http:// always needs to be replaced by: https:// 2) Second part (everything until the ":" sign): 192.168.200.22 (or www.google.com) 3) Third part (port): everyhing after ":" (example: 9999, 100000) I step): TAKE THE INPUT var strInput = $("#txtBox").val(); II) step): PARSE THE INPUT III) results): var strProtocol = "https//"; var strIP = parsedIP; var strPORT = parsedPORT; So i need 2 know how to get the values (parsedIP and parsedPORT).

    Read the article

  • input field placeholder in jQuery

    - by Hristo
    I'm trying to create a Login page, not worrying about actually logging in yet, but I'm trying to achieve the effect where there is some faded text inside the input field and when you click on it, the text disappears or if you click away the text reappears. I have this working for my "Username" input field, but the "Password" field is giving me problems because I can't just do $("#password").attr("type","password"). Here's my code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <!-- Links --> <link rel="stylesheet" type="text/css" href="style.css" /> <!-- Scripts --> <script type="text/javascript" src="jQuery.js"></script> <script> // document script $(document).ready(function(){ // login box event handler $('#login').click(function(){ $('.loginBox').animate({ height: '150px' }, '1000' ); $('#username').show(); // add pw placeholder field $('#password').after('<input type="text" id="placeHolder" value="Password" class="placeHolder" />'); $('#password').hide(); }); // username field focus and blur event handlers $('#username').focus(function() { if($(this).hasClass('placeHolder')){ $(this).val(''); $(this).removeClass('placeHolder'); } }); $('#username').blur(function() { if($(this).val() == '') { $(this).val('Username'); $(this).addClass('placeHolder'); } }); // password field focus and blur event handlers $('#placeHolder').focus(function() { $('#placeHolder').hide(); $('#password').show(); $('#password').focus(); }); $('#password').blur(function() { if($('#password').val() == '') { $('#placeHolder').show(); $('#password').hide(); } }); }); </script> </head> <body> <div id="loginBox" class="loginBox"> <a id="login">Proceed to Login</a><br /> <div id="loginForm"> <form> <input type="text" id="username" class="placeHolder" value="Username" /> <input type="password" id="password" class="placeHolder" value="" /> </form> </div> </div> </body> </html> Right now, I can click on the password input box and type in it, but the text is not disappearing and the "type" doesn't get set to "password"... the new input field I create isn't being hidden, it just stays visible, and I'm not sure where the problem is. Any ideas? Thanks, Hristo

    Read the article

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