Search Results

Search found 6 results on 1 pages for 'keya'.

Page 1/1 | 1 

  • Recursive Batch File

    - by MCZ
    I have a file that looks this: head1,head2,head3,head4,head5,head6 a11,a12,keyA,a14,a15,a16 a21,a22,keyB,a24,a25 a31,a32,keyC,a34 a41,a42,keyB,a44,a44 a51,a52,keyA,a54,a55,a56 a61,a62,keyA,a64,a65,a66 a71,a72,keyC,a74 some message Objective: Write list of unique keys to a text file. For example, the result for the file described above should be: keyA, keyB, keyC Here's the pseudocode I would like to implement in batch file recur.bat Read second line of inputfile If no key exist on second line, return else continue Append keyX to list FINDSTR /v keyX inputfile Pipe results to recur.bat I don't know if this is the most efficient way to do this without using actual programming language. Any suggestions for actual batch file code?

    Read the article

  • Jquery set tr with empty td lower than with text in td

    - by PavelBY
    I have html, and jquery for sorting my table (also there is non-standart sorting (with multi-tbody)). My code could be found here: http://jsfiddle.net/GuRxj/ As you can see there, td with prices (on russian ????) are sorted ascending (but tech-as not!? why? (it a question too))... But as you see, i need to send this tr's with prices to top of this tbody (now there are in the bottom), while empty-price-tr send to bottom... How to do this? part of js: $('.prcol').click(function(e) { var $sort = this; var $table = $('#articles-table'); var $rows = $('tbody.analogs_art > tr',$table); $rows.sort(function(a, b){ var keyA = $('td:eq(3)',a).text(); var keyB = $('td:eq(3)',b).text(); if (keyA.length > 0 && keyB.length > 0) { if($($sort).hasClass('asc')){ console.log("bbb"); return (keyA > keyB) ? 1 : 0; } else { console.log(keyA+"-"+keyB); return (keyA > keyB) ? 1 : 0; } } }); $.each($rows, function(index, row){ //console.log(row); $table.append(row); //$("table.123").append(row); }); e.preventDefault(); });

    Read the article

  • XML Validation

    - by Keya
    Hi, I want to validate an XML file against RELAXNG schema provided. Searching on the net gave me hints to create a Schema instance using SchemaFactory by providing the appropriate Schema Language. So as per my requirement I used: *SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);* But the following exception was thrown at run: Exception in thread "main" java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://relaxng.org/ns/structure/1.0 could be loaded at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:207) I am using Java6 and observed that only 'W3C_XML_SCHEMA_NS_URI' works. Rest all the schema URIs throws the similar exception. I am fairly new to using the XML validation APIs. Can someone please provide me the appropriate usage in case I am not doing it correctly? Thanks & Regards, Keya

    Read the article

  • how does array_diff work?

    - by SpawnCxy
    I just wonder how array_diff() works.And obviously it couldn't work as follows function array_diff($arraya, $arrayb) { $diffs = array(); foreach ($arraya as $keya => $valuea) { foreach ($arrayb as $valueb) { if ($valuea == $valueb) { break; } $diffs[$keya]=$valuea; } } return $diffs; } //couldn't be worse than this Hope someone can show me some better solution. Thanks.

    Read the article

  • chaining and getting the value of an input

    - by cf_PhillipSenn
    This code gets the text that's in a certain column of a table row: var keyA = $(a).children('td').eq(column).text().toUpperCase(); Q: How do I rewrite this to get the value of an input tag that's in the table cell? var keyA = $(a).children('td').eq(column).('input').val().toUpperCase();

    Read the article

  • handling large arrays with array_diff

    - by bigmac
    I have been trying to compare two arrays. Using array_intersect presents no problems. When using array_diff and arrays with ~5,000 values, it works. When I get to ~10,000 values, the script dies when I get to array_diff. Turning on error_reporting did not produce anything. I tried creating my own array_diff function: function manual_array_diff($arraya, $arrayb) { foreach ($arraya as $keya => $valuea) { if (in_array($valuea, $arrayb)) { unset($arraya[$keya]); } } return $arraya; } source: http://stackoverflow.com/questions/2479963/how-does-array-diff-work I would expect it to be less efficient that than the official array_diff, but it can handle arrays of ~10,000. Unfortunately, both array_diffs fail when I get to ~15,000. I tried the same code on a different machine and it runs fine, so it's not an issue with the code or PHP. There must be some limit set somewhere on that particular server. Any idea how I can get around that limit or alter it or just find out what it is?

    Read the article

1