Posts

Showing posts from March, 2011

How to filter only printable characters in a file on Bash (linux) or Python? -

i want make file including non-printable characters include printable characters. think problem related acscii control action , not find solution , not understand meaning of .[16d (ascii control action character??) in following file. hexdump of input file: 00000000: 4845 4c4c 4f20 5448 4953 2049 5320 5448 hello th 00000010: 4520 5445 5354 1b5b 3136 4420 2020 2020 e test.[16d 00000020: 2020 2020 2020 2020 2020 201b 5b31 3644 .[16d 00000030: 2020 when cat ed file on bash , got: "hello ". think because default cat interprets ascii control action, 2 .[16d s. why 2 .[16d strings make cat file print "hello"?, and... how can make file include printable characters, i.e., "hello "? the hexdump shows dot in .[16d escape character, \x1b . esc[ n d ansi escape code delete n characters. esc[16d tells terminal delete 16 characters, explains cat output. there various ways remove ansi escape codes file, either using bash comm

php - Magento Soap api product custom option list not getting all options -

Image
i have installed mageworks advanced custom option extension in magento. i trying fetch product custom option using soap api v2 i able following details title sku sort_order price and required following details description qty i using following snippet $proxy = new soapclient('http://magentohost/api/v2_soap/?wsdl'); $sessionid = $proxy->login('apiuser', 'apikey'); $result = $proxy->catalogproductcustomoptionlist($sessionid, '1'); var_dump($result); try $result = $proxy->catalogproductcustomoptioninfo($sessionid, '1');

python - How can I upload whole folder instead of one by one file in rackspace -

right using threading slow. looking upload folder api. def run(self): """starts uploading thread.""" try: file_name in self.files["thumbs"]: self.transfer_rackspace(file_name, self.container_thumbs) except exception: pass try: file_name in self.files["tiles"]: self.transfer_rackspace(file_name, self.container_tiles) except exception: pass try: file_name in self.files["cube"]: self.transfer_rackspace(file_name, self.container_photo) except exception: pass try: file_name in self.files["image"]: self.transfer_rackspace(file_name, self.container_photo) except exception: pass pyrax.settings.set('identity_type', 'rackspace') pyrax.set_credentials(config.app_config[

Python dictionary key is not identified -

i have method following, @staticmethod def get_repo(tenant_id): """ :param int tenant_id: :return: gitrepository object :rtype: gitrepository """ agentgithandler.log.info(agentgithandler.__git_repositories) agentgithandler.log.info("tenant id %s" %tenant_id) key,value in agentgithandler.__git_repositories.iteritems(): if tenant_id == key: agentgithandler.log.info("key matching") agentgithandler.log.info(agentgithandler.__git_repositories[key]) agentgithandler.log.info("key %s : value %s ", key,value) if tenant_id in agentgithandler.__git_repositories: return agentgithandler.__git_repositories[tenant_id] agentgithandler.log.info("false condition") return none i trying call above function following, git_repo = agentgithandler.get_repo(tenant_id) git_repo.scheduled_update_task.terminate() tena

javascript - Get id attribute from a node in nodelist -

i have got nodelist using document.getelementsbyclassname method in javascript. check if first node has children , if not return document.getelementbyid nodes id. unsure of how id node list. var columns = document.getelementsbyclassname('.col-md-4.column'); if (countchildren(columns[0].childnodes) == 0) { return document.getelementbyid(columns[0].) //not sure goes here } if have dom node, has id property, can't use getelementbyid property var columns = document.queryselectorall('.col-md-4.column'); if ( countchildren(columns[0].childnodes) == 0 ) { return columns[0].id; } note getelementsbyclassname takes classes without period, better support might use queryselectorall

c# - Reusing same session from asp.net aspx page to ashx handler -

i trying call ashx handler asp.net page , retrieve xml data handler. var url = "http://localhost/settings/myhandler.ashx?errors=false"; var request = (httpwebrequest)webrequest.create(url); request.method = "get"; using (var response = (httpwebresponse)request.getresponse()) { using (var stm = response.getresponsestream()) { using (var sr = new streamreader(stm)) { var data= sr.readtoend(); } } } now, due nature of asp.net creating new session each webrequest, not able reuse same session asp.net page ashx handler. both files same project. how can reuse same session asp.net ashx handler.? please note: have marked handler implement irequiresessionstate, has session. issue aspx page , ashx handler have 2 different sessions.. everytime when invoke handler creates new session. instead have reuse same session of

linux - Java BeautyEye look and feel empty JMenuBar items -

Image
i using beautyeye , feel in java desktop program found out jmenubar shows empy jmenuitems shown in screenshot below. as can see area of menu there same colour jframe contentpane , no menu text visible. a sample program test (download beautyeye library here ) is: import java.awt.*; import javax.swing.*; import org.jb2011.lnf.beautyeye.beautyeyelnfhelper; public class javamenubarexample implements runnable { private jframe frame; private jmenubar menubar; private jmenu filemenu; private jmenuitem openmenuitem; public static void main(string[] args) { try { beautyeyelnfhelper.frameborderstyle = beautyeyelnfhelper.frameborderstyle.oslookandfeeldecorated; org.jb2011.lnf.beautyeye.beautyeyelnfhelper.launchbeautyeyelnf(); uimanager.put("rootpane.setupbuttonvisible", boolean.false); } catch (exception ex) { ex.printstacktrace(); } // proper way show jframe (invo

c# - hittesting on Listitems in a Listbox -

i customized listbox show pie-chart (each listitem 1 slice of pie). used itemtemplate (for now) consists of shape . make shapes form full circle, calculated start/endangle each piece , used custom itemspaneltemplate stack items on top of each other. when click anywhere near pie, "last" item gets selected since located on top of others. quite obvious, hoped since itemtemplate contains shape , inherit hit-testing there , not assume items represented rectangles. where supposed include hittesting? set ishittestvisible="false" inside itemtemplate , except shape - since doesn't contain except shape, stuck right now. edit: i tried surrounding shape grid transparent background, on did set ishittestvisible="false" . still results in selecting last element on each click while would've assumed nothing selected. think might confused how hittesting supposed work? code: since new wpf might have missed during implementation. added relevant code

android - How to show my layout below the navigation drawer? -

Image
i have implemented navigation drawer following this . after adding in xml activity not showing imageview in center position. following xml file <android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#2ba886" app:contentinsetend="0dp" app:contentinsetstart="0dp" > </android.support.v7.widget.toolbar> <android.support.v4.widget.drawerlayout android:id="@+id/drawerlayout" android:layout_width="match_parent" android:layout_height="match_parent" > <framelayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="

MySQL : When stored procedure parameter name is the same as table column name -

let's have stored procedure setcustomername has input parameter name, , have table customers column name. inside stored procedure want set customer's name. if write update customers set name = name; this incorrect , see 2 other ways: update customers set name = `name`; update customers set customers.name = name; first 1 works, didn't find in documentation can wrap parameters inside ` characters. or did miss in documentation (link appreciated in case). what other ways there , standard way such case? renaming input parameter not me (because have automatic object-relational mapping if know mean). update: so, there link backticks ( http://dev.mysql.com/doc/refman/5.0/en/identifiers.html ) it's not explained deep enough how use them (how use them parameters , column names). and there strange thing (at least me): can use backticks either way: update customers set name = `name`; //or update customers set `name` = name; //or update customers set `name` = `

Java gomoku minimax -

i'm trying create strategy play against human or strategy game gomoku. have kind of minimax function, although don't quite understand how work , have getscore function, should send best score minimax ? problem getscore function not recognize if there 4 or 5 circles in row/col/diagonally. here code: public class jarmostrategyv1 implements computerstrategy { public static int lrow = 0; public static int lcol = 0; public static int drow = 0; public static int dcol = 0; public static final int e = 0; public static final int x = 1; // black public static final int o = -1; // white public static final int winscore = 100; private static final int wincount = 5; public location getmove(simpleboard board, int player) { // let's operate on 2-d array int[][] b = board.getboard(); system.out.println(getscore(b, player)); (int row = 0; row < b.length; row++) { (int col = 0; col < b[0].len

markup - Structured-Data > Microdata > Schema > Article > Author Itemscope > Properties > Google Validation Error -

i developing own site locally. first site relative 'noob'. i have begun process of marking site microdata format using schema.org vocabulary. i using google's structured data tester test microdata markup. on webpage have marked article. the problem i getting errors properties person itemscope connected article itemscope . not matter how person linked, whether author or creator or otherwise. for example, if link person article using author property , try mark name name property, gives red error so: ! http://www.example.com/name : name where property name cited in url/property format, , 'name' property value want. if click on error message, says: the property http://www.example.com/name not recognised google object of type thing. it otherwise: showing other article properties fine; and creating person-type property article fine (eg author, creator, etc); and creating name:value pairs properties of person (eg name).

Can we crawl and index Google Drive documents using nutch and solr? -

i have tried indexing public url of google drive document, seems not work . there way crawl google drive documents via nutch , make index using solr? use google drive api read/manage files https://developers.google.com/drive/web/about-sdk drive public url's page won't have direct links subdirectories, nothing if crawl pages.

android - Nested fragments created twice on orientation change -

i created example understand lifecycle of android fragments @ screen orientation change. mainactivity container drawerlayout, drawerlayout allows choose fragment, fill mainactivity screen. public class mainactivity extends actionbaractivity { ... @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); log.d("mainactivity", "oncreate savedinstancestate = "+(savedinstancestate == null ? "null" : "not null")); ... mdrawerlist.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { if (position == 0) { if (viewingposition == position) { mdrawerlayout.closedrawer(mdrawerlist); return; } getsupportfragmentmanager() .begintransaction() .replace(r.id.content

optimization - How to model this hash with values as list in redis? -

i have store data in redis, data stored of form { "key" : { "k1":["v1", "v2", "v3"], "k2":["v4", "v5"], "k3":["v1", "v2]} }, "key1" :{ "k1":["v11", "v2"], "k2":["v4", "v15", "v3"], "k3":["v12", "v2]} } } according documentation, can not have list value in hash data structure. best way modelling this, list generated 1 value @ time, need append or add. should there different database each of top level keys?, or should there different instances of redis needs brought top level keys used identify specific database or instance in mid level key can used key load values in list or set? redis quite flexible regarding how can structure data, here possible approach. since hash values have strings, can keys refer

javascript - How to set the cursor position to initial position of a text field? -

Image
i have text field within in div. in case width of text field more width of div. have used overflow: hidden div(ui modification not possible now). have 'clear' button clear text field. now issue facing is, type long string in text field. now click on clear button clear text. now when type again, find first character hidden ui. later when press home able see complete text. in chrome works fine guess , found issue in firefox. here simple example, $('#but').on("click", function() { $("#fname").val(""); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="maindiv" style="width:100px; overflow: hidden;border: 2px solid black; margin:20px"> <input type="text" id="fname" style="width: 250px;border: 5px solid red;"> </div> <input type="button" id="but" valu

javascript - How to store Configuration file and read it using React -

i new on react.js have implemented 1 component in fetching data server , use like, callenterprise:function(tenantid){ fetchdata('http://xxx.xxx.xx.xx:8090/enterprises?tenantid='+tenantid+' &format=json').then(function(enterprises) { enterpriseperspectiveactions.getenterprise(enterprises); }).catch(function() { alert("there issue in api call please contact admin"); //componentappdispatcher.handleviewaction({ // actiontype: metaitemconstants.receive_error, // error: 'there problem getting enterprises' //}); }); }, i want store url in configuration file when deployed on testing server or on production have change url on config file not in js file don't know how use configuration file in react.js can please guide me how can achieve ? with webpack can put env-specific config externals field in webpack.config.js externals: { 'config': json.str

html - Extra Word spacing of h tag -

Image
i have h2 tag , there content :before . html <h2 class="glyphicon arrow-heading text-white margin-zero" style="z-index: 1;"> h2 tag , has word spacing problem </h2> css .arrow-heading:before { content: "\e072"; color: #9b0d25; float: left; } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'glyphicons halflings'; font-style: normal; font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .text-white { color: #fff; } .margin-zero { margin: 0em; } h2 { font-size: 1.5vw; } but spacing shown below without text-align: justify; i want no spacing. edit with text-align: justify; i answered in comments, glyphicon haflings font being applied entire <h2> tag, , cause spacing problem. font should applied element containing glyphicon. to increase specificity, use <i> tag first chil

php - Mysqldump and --where not compatible with "<" and ">", how to do? -

that, it's ok: exec("c:/wamp/bin/mysql/mysql5.6.17/bin/mysqldump.exe --host=".$host." --user=".$username." --password=".$password." ".$db." ".$table." --where=date_timestamp=1432883235 > ".$rep_local.$file." "); that (--where=date_timestamp>1432883235) , it's not ok: exec("c:/wamp/bin/mysql/mysql5.6.17/bin/mysqldump.exe --host=".$host." --user=".$username." --password=".$password." ".$db." ".$table." --where=date_timestamp>1432883235 > ".$rep_local.$file." "); because ">" it's file out. how can do? i tried it: exec("c:/wamp/bin/mysql/mysql5.6.17/bin/mysqldump.exe --host=".$host." --user=".$username." --password=".$password." ".$db." ".$table." --where="date_timestamp>1432883235" > ".$rep_local.$file." "); but

angular ui router - Shared views in ionic framework -

i have 1 template 'song-detail' want access 2 other parts of application. however, can use nav history first one. i want access 'song-detail' both browse nav view, , favourites nav-view. can access fine both, 'back' history tabs.browse. is possible nav history when sharing single 'song-detail' view this? .state('tabs', { url: '/tab', abstract: true, templateurl: 'templates/tabs.html' }) .state('tabs.browse', { url: '/browse', views: { 'tab-browse': { templateurl: 'templates/tab-browse.html', controller: 'browsectrl' } } }) .state('tabs.song-detail', { url: '/songs/:song_id', views: { 'tab-browse': { templateurl: '

c# - ActionNotSupportedException occurred after change EndpointAddress -

i working wcf , silverlight. want change endpointaddress code behind dynamically: endpointaddress endpointadress = new endpointaddress(serviceurl); var proxy = new serverconnectionclient(context); proxy.endpoint.address = endpointadress; connection opened successful after call method service occurred actionnotsupportedexception. web.config : <configuration> <system.servicemodel> <bindings> <custombinding> <binding name="nettcpbinding"> <binarymessageencoding /> <tcptransport maxreceivedmessagesize="2147483647" maxbuffersize="2147483647" /> </binding> </custombinding> </bindings> <client> <endpoint address="net.tcp://myipaddress:4502/engine/net" binding="custombinding" bindingconfiguration="nettcpbinding" contract="ctmsconnection.iserverconnection" nam

android - What techniques do you think duolingo used to make its lesson list in the app?(pic included) -

i'm trying make duolingo lesson list fun because im big fan of app, im beginner programmer. basically id opinion on how think did it. here looks https://s-media-cache-ak0.pinimg.com/236x/a3/a8/65/a3a865c47153078e7004b74652af7757.jpg i think might scroll view , linear layout, perhaps class each icon/progress/name combo change based on progress i think table layout might easier solution. check out here: https://developer.android.com/guide/topics/ui/layout/grid.html

linux - Script for deleting multiple directories based on directory name using shell or bash script -

i trying write shell script removed directories , contents based on directory name instead of last modified time. i have following directories in /tmp/ location 2015-05-25 2015-05-26 2015-05-27 2015-05-28 2015-05-29 2015-05-30 2015-05-31 now delete directories till 2015-05-29 . last modified date same directories. can 1 please suggest? a straightforward not flexible way (in bash) is: rm -rf 2015-05-{25..29} a more flexible way involve coding: ls -d ./2015-* | sort | sed '/2015-06-02/,$d' | xargs rm -r sort lexcially directories follow name pattern 2015-* use 'sed' remove files after (inclusive) 2015-06-02 use 'xargs' delete remaining ones

html - Append another dropdown using jquery -

i'm trying append dropdown. i'm trying add dropdown of button. dropdown should contain same items in existing dropdown. below code. this jquery script condition user can't create more 10 dropdown box. $("#addbutton").click(function() { if (counter > 10) { alert("only 10 dropdowns allowed"); return false; } var newddboxdiv = $(document.createelement('div')) .attr("id", +counter); newddboxdiv.after().html('<label>dropdown #' + counter + ' : </label>' + '<select type="text" name="dropdown' + counter + '" id="dropdown' + counter + '" value="" >'); newddoxdiv.appendto("#mb"); counter++; }); $("#removebutton").click(function() { if (counter == 1) { alert("no more dropdown remove"); return false; } counter--; $

sql server - SSIS : Flat File Source : FastParse property - Date column - error -

Image
i have created ssis package , reading csv file using flat file source control. in csv file : 1. column name - expiration 2. date format - 5/31/2015 3. column data type - dt_date now, when set fastparse property column in output, gives me below error message. title: package validation error package validation error ------------------------------ additional information: error @ data flow [read csv source file [73]]: "fastparse" custom property "read csv source file.outputs[flat file source output].columns[expiration]" cannot set true. column data type must 1 of following: dt_i1, dt_i2, dt_i4, dt_i8, dt_ui1, dt_ui2, dt_ui4, dt_ui8, dt_dbtimestamp, dt_dbtimestamp2, dt_dbtimestampoffset, dt_date, dt_dbdate, dt_dbtime, dt_dbtime2, or dt_filetime. error @ data flow [ssis.pipeline]: "read csv source file" failed validation , returned validation status "vs_isbroken". error @ data flow [ssis.

machine learning - HOG Feature Extraction of Arabic Line Images -

i doing project on writer identification. want extract hog features line images of arabic handwriting. , use gaussian mixture model classification. link database containing line images : http://khatt.ideas2serve.net/ so questions follows; there 3 folders namely test, train , validate. so, folder need extract features. , purpose should use each of folders. do need extract features individual images , merge them or there method extract features of images together. test, train , validate read stats se question: what difference between test set , validation set? this basic machine learning, should go , review course literature, since seems you're missing pretty important machine learning concepts. do need extract features individual images , merge them or there method extract features of images together. it seems, again, you're missing basic concepts here. histogram of oriented gradients subdivides image , finds oriented gradient. see question e

javascript - RedirectToAction in Ajax call blocks other calls -

Image
i sending ajax call kendo treeview partial view, partial view located controller named "commoncontroller" , requires configdata kendo treeview partial send using tempdata. action method in commoncontroller returns kendo tree partial view. bellow code: ajax call controller $.ajax({ url: deploymentdirsim + "/formjs/foldersandfilestreepartialview", type: "get", contenttype: "'application/json; charset=utf-8'", success: function(sdata) { $("#fftreeviewdiv").html(sdata); }, error: function(e) { console.log(e); } }); controller method public actionresult foldersandfilestreepartialview() { foldersandfilestreeconfigdata configdata = new foldersandfilestreeconfigdata { name = "treeviewfolderfile", htmlattributes = "height:100%; overflow:hidden;", checkboxes = false, sh

javascript - How to set different home page of website for mobile and pc? -

i creating website, working fine on desktop version when trying open on android mobile problems occurring are: the menu not appear user.(the black section below header section) in categories section drop-down list not opening (i have used jquery in section). here (demo) website url: link . jquery /* * easydropdown - drop-down builder styleable inputs , menus * version: 2.1.4 * license: creative commons attribution 3.0 unported - cc 3.0 * http://creativecommons.org/licenses/by/3.0/ * software may used freely on commercial , non-commercial projects attribution author/copyright holder. * author: patrick kunka * copyright 2013 patrick kunka, rights reserved */ (function($){ function easydropdown(){ this.isfield = true, this.down = false, this.infocus = false, this.disabled = false, this.cutoff = false, this.haslabel = false, this.keyboardmode = false, this.nativetouch = true, this.wrapperclass = &

python - Solving System of Differential Equations using SciPy -

i'm trying solve following system of differential equations using scipy: q1''(t) + m/l1 * q2''(t) + r1/l1 * q1'(t) + 1/(c1 * l1) * q1(t) = 0 q2''(t) + m/l2 * q1''(t) + r2/l2 * q2'(t) + 1/(c2 * l2) * q2(t) = 0 i'm trying use scipy.integrate.odeint obtain numerical solution. substitution: y[0] = q1 y[1] = q1' y[2] = q1'' y[3] = q2 y[4] = q2' y[5] = q2'' i used following code solution. def deriv(y, t): return np.array([ y[1], (-ml1 * y[5] - r1l1 * y[1] - y[0] / c1l1), ?? y[4], (-ml2 * y[2] - r2l2 * y[4] - y[3] / c2l2), ?? ]) def main(): t = np.arange(0.0, 500.0, 0.01) initial_cond = [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] sol = integrate.odeint(deriv, initial_cond, t) print(sol) my question put derivatives of q1''(t) , q2''(t). there different substitution can use instead? you have 2 coupled second order

c# - Late timer label display while page loading using update panel -

i have used c# timer updatepanel in webpage, working except during page loads timer label displays after 3 seconds ie: 3:00 mins timer displays 2:57 secs . so how resolved. in advance.... my aspx code is: <div> <asp:scriptmanager id= "sm1" runat="server"> </asp:scriptmanager> <asp:timer id="timer1" runat="server" interval="1000" ontick="timer1_tick"> </asp:timer> </div> <div> <asp:updatepanel id="updpnl" runat="server" updatemode="conditional"> <contenttemplate> <asp:label id="lbltimer" runat="server" font-bold="true" font-names="arial" font-size="x-large" forecolor="#6600cc"></asp:label>&nbsp;&nbsp; </contenttemplate> <triggers> <asp:asyncpostbacktrigger controlid="tim

android - Save sqlite db in external memory -

i want save sqlite db file in external memory. i written code save in internal memory below.but want extract " xxx.db " in run time , check whether db fields saved or not. manifest.xml <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.permission.read_external_storage" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> and dbhelper.java private static string db_path = "data/data/com.example.myapp/databases/"; private static final string database_table = "mydb"; private static final int database_version = 1; private static final string database_name = "mydb.db"; public void createdatabase() throws ioexception{ boolean doesdbexist = checkdatabase(); if(doesdbexist){

memory leaks - C# code calling C++/CLI class method - new instance still has old instance values -

i newbie in terms of working both c# , c++/cli code together. in c# code, creating new instance of class fooclass , running method fooclass:parsecmdargs, takes in system::string, converts std::string, , pushes vector "bars" variable. print out "bars" content @ end of parsecmdargs function. getting unexpected output described below. c# code - wpf application private void button_click_1(object sender, routedeventargs e) { clrclass.fooclass foo = new clrclass.fooclass(); list<string> args = new list<string>(); args.add("1st run - 1"); args.add("1st run - 2"); args.add("1st run - 3"); args.add("1st run - 4"); args.add("1st run - 5"); foo.parsecmdargs(args.count, args.toarray()); args.clear(); args.add("2nd run - 1"); args.add("2nd run - 2"); args.add("2nd run - 3"); args.add("2nd run - 4"); args.add(&quo

java - How To Implement Rest Full Web Service with Auth Token using Spring Security 4.0.1.RELEASE -

i trying design api manager restful webservice. in spring's new release, can combine in java code without using web.xml nor securityconfig.xml . according authtoken concept, api manager should have authtoken , refresh token user authentication. please, can give me sample source code or guidance how implement restfull webservice spring security. i need know how configurations implement in java code. it should have authtoken concept also. this tutorial correct way this. http://www.beingjavaguys.com/2014/10/spring-security-oauth2-integration.html but spring configuration in spring.xml file. i need put them in java level also. the people @ stormpath have quite straightforward solution achieving oauth. please take @ using stormpath api authentication . as summary, solution this: you use stormpath java sdk delegate user-management needs. when user presses login button, front end send credentials securely backend-end through rest api. 2.1. way, storm

java - JUnit 4.11 not showing parameter value but index -

we have project number of junit testclasses has been using eclipse internal junit implementation until recently. in order run our tests ant build script have changed build path our project use external junit-4.11.jar , required hamcrest-core library. of our test classes use parameterized junit runner (name = "{0}") option in @parameters annotation. while running these test classes eclipse built-in junit output showed value of first parameter instead of index. now, after using external junit index shown no matter if run test inside eclipse or ant build script "test" target. here's test class: package foo; import java.util.arrays; import org.junit.test; import org.junit.runner.runwith; import org.junit.runners.parameterized; import org.junit.runners.parameterized.parameter; import org.junit.runners.parameterized.parameters; @runwith(parameterized.class) public class parametertest { public parametertest(string _name, string _value) { name