Posts

Showing posts from June, 2013

r - Extracting coefficients from a regression 1 model with 1 predictor -

i have following regression model: > print(summary(step1)) call: lm(formula = model1, data = newdat1) residuals: min 1q median 3q max -2.53654 -0.02423 -0.02423 -0.02423 1.71962 coefficients: estimate std. error t value pr(>|t|) (intercept) 0.3962 0.0532 7.446 2.76e-12 *** i2 0.6281 0.0339 18.528 < 2e-16 *** i following returned data frame: estimate std. error t value pr(>|t|) i2 0.6281 0.0339 18.528 < 2e-16 i have following code: > results1<-as.data.frame(summary(step1)$coefficients[-1,drop=false]) which yields: > results1 summary(step1)$coefficients[-1, drop = false] 1 6.280769e-01 2 5.320108e-02 3 3.389873e-02 4 7.446350e+00 5 1.852804e+01 6 2.764...

vb.net - Need Help! Upgraded to a new PC and from Visual Studio 2008 to 2013. ODBC Data Connections are Broken in all my projects -

i have been using visual studio 2008 create basic search apps work. in 2008 go "add new datasource", select odbc connection , select iseries access odbc driver, select tables wanted, drag them onto datagridview in windows form. when go in vs 2013 second click on 1 of odbc connections add datasource window either disappears or error saying "object reference not set instance of object". there difference in way visual studio 2008 handles odbc connections vs visual studio 2013? i sure simple missing, really need these connections work. appreciated. *edit, have tried complete uninstall , reinstall of vs 2013 , still have same problem. visual studio 2008 continues work without issue. since have new pc, data source may not defined. check in pc admin tools > odbc data sources > as400 odbc driver >configure > server tab > lib list. libraries want access may not listed in lib list.

windows - Whatis the difference between a 32bit program on a 32bit OS and 32bit program on a 64bit OS? -

in computer running 32bit os on 64bit processor. application installed 32bit , computer having 2gb ram. if install 64bit os while keeping same 32bit applications, improve performance?? or there disadvantage? talking 32-bit , 64-bit software means such software developed in order take advantage of cpus 32-bit or 64-bit registers size. registers tiny portions of memory (not ram) used directly processing unit temporarily save operations results (kind of variables), e.g. when summing 2 numbers alu reads 2 registers, performs operation , writes answer in register. bigger registers, bigger values can handle. 32-bit processor has registers can handle values 32 bits of size, 64-bit processors can deal numbers of double size 32-bit-based processors, results in 2^32 more values. a 32-bit os os works performing cpu operations on machine 32-bit cpu registers; 64-bit os works fine on 64-bit processors, not on 32-bit ones because registers small such os. as program runs on os, 32...

php - Errors with login system.... I cant see a issue -

here code first of all <?php session_start(); //start session define(admin,$_session['name']); //get user name registered super global variable if(!session_is_registered("admin")){ //if session not registered header("location:login.php"); // redirect login.php page } else //continue current page header( 'content-type: text/html; charset=utf-8' ); ?> and i'm getting following errors notice: use of undefined constant admin - assumed 'admin' in c:\users\andrew\documents\server2server\admin\dashboard.php on line 3 notice: undefined index: name in c:\users\andrew\documents\server2server\admin\dashboard.php on line 3 fatal error: call undefined function session_is_registered() in c:\users\andrew\documents\server2server\admin\dashboard.php on line 4 does know why i'm getting these errors? here fixed code: <?php session_start(); //start session define("admin",$_session['name...

python - web.py doesn't find file -

i try create little website using web.py , webpysocketio, , have problem: web.py doesn't seem find file besides index.html. here's webpy app: import web socketio import socketioserver gevent import monkey monkey.patch_all() webpy_socketio import * urls = ( '/', 'index', ) urls += socketio_urls app = web.application(urls, globals()) socketio_host = "" socketio_port = 8080 application = app.wsgifunc() if __name__ == "__main__": socketioserver((socketio_host, socketio_port), application, resource="socket.io").serve_forever() class index: def get(self): render = web.template.render('templates/') return render.index() @on_message(channel="my channel") def message(request, socket, context, message): socket.send_and_broadcast_channel(message) in template folder have index.html ( and socketio_scripts.html ): <html> <head> <meta charset="utf...

javascript - How to make function wait for another? -

i have function, call function: function_name(1) function function_name (i) { multiply(i) console.log(i); // 1 } function multiply (i) { = i*2 } when it's executing, console.log(i) return "1". need console.log(i) return "2". how can make wait till multiply() executed? there no need wait, methods synchronous console.log() executing after multiply() executed. problem updating local scoped variable i in multiply locally scoped variable i in function_name not modified actions in multiply you can return result multiply , use value in calling function like function_name(1); function function_name(i) { = multiply(i); console.log(i); // 1 } function multiply(i) { return * 2; }

Send pdf attachment to emails in mysql database using php -

code: <?php $servername = "localhost"; $username = "username"; $password = "****"; // create connection $conn = new mysqli($servername, $username, $password); // check connection if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } $sql = "select email, name myguests"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $conn->close(); ?> <table width="348" border="0"> <tr> <td width="88">name</td> <td width="98">email</td> <td width="148">select <label> <input type="checkbox" name="checkbox" id="checkbox"> </label> </td> </tr> <tr> <?php {?><td><?php echo $row["na...

oracle - PLS-00221: 'C1'(cursor) is not a procedure or is undefined -

i creating package use jasper reports learnt need sys_refcursor cannot seem able loop cursors:eg create or replace package body fin_statement_spool procedure fin_main_spool(vacid in varchar2, vfromdate in date, vtodate in date,c1 out sys_refcursor,c2 out sys_refcursor) cramount number; dramount number; countcr number; countdr number; begin open c1 select .......; open c2 select ........; begin in c1--error here loop rnum := 0; cramount := 0; dramount := 0; countdr := 0; countcr := 0; .......... isn't right way? you appear have confused explicit cursors, e.g.: declare cursor cur...

java - Update JLabel repeatedly with results of long running task -

i'm writing program pings server. wrote code check once , put ping in jlabel , put in method called setping() . here code private void formwindowopened(java.awt.event.windowevent evt) { setping(); } that worked did once, did: private void formwindowopened(java.awt.event.windowevent evt) { for(;;){ setping(); } } but doesn't work first time. i didnt put setping method because long here is: public string setping(){ runtime runtime = runtime.getruntime(); try{ process process = runtime.exec("ping lol.garena.com"); inputstream = process.getinputstream(); inputstreamreader isr = new inputstreamreader(is); bufferedreader br = new bufferedreader(isr); string line; while ((line = br.readline()) != null) { int = 0; = line.indexof("average"); if(i > 0){ string finalping = ""; line.tochararray(); try ...

Cannot install devtools package after upgrading R -

i have upgraded r 3.2.1, , can no longer install devtools package. i following output: install.packages('devtools') trying url 'http://cran.ma.imperial.ac.uk/bin/macosx/mavericks/contrib/3.2/devtools_1.8.0.tgz' content type 'application/x-gzip' length 324861 bytes (317 kb) ================================================== downloaded 317 kb downloaded binary packages in /var/folders/zd/112dtz1x3575n4z10cm7nflw0000gn/t//rtmpzsbsdp/downloaded_packages load library: library('devtools') error in loadnamespace(j <- i[[1l]], c(lib.loc, .libpaths()), versioncheck = vi[[j]]) : there no package called ‘curl’ error: package or namespace load failed ‘devtools’ i have read following post - problems when installing devtools packages - seems have solution linux(?), have curl installed on system, , can't see how me. the error message says: there no package called ‘curl’ run: install.pack...

android - How to access a server running inside genymotion emulator from my computer? -

i've installed simplehttpserver app on genymotion emulator (google nexus 9 - 5.1.0 - api 22). the app created http server on android , allows access phone browser using following urls: http://10.0.3.15:12345/ http://192.168.56.101:12345/ now can access these urls android browser inside emulator when try access them outside emulator using browser (windows) connection error / 404. how can connect serversocket on android outside emulator? p.s. can access apache server (installed on computer / windows) genymotion emulator using http://192.168.56.1/ or http://10.0.3.2 , there no way access http server running inside genymotion emulator windows? i had following working adb forward tcp:[host port] tcp:[virtual device port] from here

DirectX Stereoscopic Projection Transformation for 3D Perception -

i trying change monocular directx engine into stereoscopy renderengine oculus rift. missing, stereoscopic projection transformation achieve 3d perception. for now, using still standard monocular projection matrix: 1.50888 0 0 0 0 2.41421 0 0 0 0 1.0001 -0.10001 0 0 1 0 // setup projection matrix. fieldofview = (float)xm_pi / 4.0f; screenaspect = (float)screenwidth / (float)screenheight; // create [monoscope]projection matrix 3d rendering. xmmatrix projectionmatrix_xmmat = xmmatrixperspectivefovlh(fieldofview, screenaspect, screennear, screendepth); xmstorefloat4x4(&projectionmatrix_, projectionmatrix_xmmat); i translating left camera -0.032 creating view matrix, , right eye x_translated 0.032 creating view matrix. problem stereo off-center projection matrix (which think need). guess need somehow: http://paulbourke.net/exhibition/vpac/theory2.gif trying alot of different calculations, got weird results unfortunately .. already researched alot, people here succedi...

asp.net mvc - Skipping Azure ACS home realm discovery -

i've been looking way integrate azure acs home realm discovery page our asp.net mvc5 app login page rather use default 1 hosted on acs itself. what want suggested here: http://www.cloudidentity.com/blog/2014/11/17/skipping-the-home-realm-discovery-page-in-azure-ad/#comment-126567 i’m building mvc 5.1 on .net 4.5.1 azure web role needs authenticate users multiple corporate identity providers – aad, adfs – , list grow on time. has been simple enough set-up azure acs federation provider. presents home realm discovery (hrd) page , flow works. things become complicated when try , follow instructions adding hrd login page directly (following instructions given in acs application integration pages using home realm discovery metadata feed , example html + js). able present hrd buttons struggling wiring sign in process owin wsfederation setup, in application knows acs wsfederationmetadataurl. i’ve got in configureauth method: app.usewsfederationauthentication(wsfederationopt...

python - Restricting User access to different apps in Django -

i have 2 models in project. both of reference user class (i used user model gain access methods such authenticate , login_required) class customer(models.model): customer = models.onetoonefield(user) customerid = models.charfield(max_length = 15) phone_regex = regexvalidator(regex = r'\d{10}', message = 'enter 10 digit mobile number') phone_no = models.charfield(max_length = 10,validators = [phone_regex],blank = true) customer_wallet = models.integerfield(default = 100) class merchants(models.model): merchant = models.onetoonefield(user) merchantid = models.charfield(max_length = 15) storename = models.charfield(max_length = 25) currently user(regardless of him being merchant or customer) has access entire site. use restrict customer /customer url , merchant /merchant url? def check_if_merchant(user): try: user.__getattribute__('merchants') except attributeerror: return false i tried user_pass...

Python // Remove String // Array -

i have array including u-strings (the array can larger or shorter; elements occurrence can different) [u'alpha beta gamma', u'delta-espilon phi', u'alpha&omega theta', u'delta&epsilon ny', u'delta gamma xeta theta 53422'] i remove elements array not include delta? if delta included whole element should stay. array should shrink size of elements include delta. has way how to? you can use list comprehension perform filtering >>> [i in l if 'delta' in i] ['delta-espilon phi', 'delta&epsilon ny', 'delta gamma xeta theta 53422']

sql server 2012 - Adding relatively complex business logic to a sql query -

i've had superb assistance fellow user on last few days, knowledge of sql way above mine. advice more knowledgeable me once again. question follows on here . i have adapted original query meet requirements such looks this: declare @startdate date = '2015-01-05', @enddate date = '2015-06-05', @tempdeduction decimal(10, 4) = null select (select contactid '@contactid', vesselowner '@owner', owed '@owed', weeklydeductionrate '@weeklydeductionrate', fromminimumreturn '@fromminimumreturn', deductionrate '@deductionrate', totaldeductions '@totaldeductions', totaltobereturned '@totaltobereturned', internalcommission '@internalcommissionrate', internaldeduction '@internaldeductionrate', (select distinct ld1.productid '@productid', format(avg(ld1.unitprice), 'n2') '@cost', format(s...

No results found in KIbana with ElasticSearch -

Image
i have set index in elasticsearch, included mapping have data. when make request, can check contents follows: { "took": 5, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 9, "max_score": 1, "hits": [ { "_index": "flights", "_type": "yatra", "_id": "au5tq5qxevkx_fdbbqf9", "_score": 1, "_source": { "go_duration": 13.5, "return_arrival_time": "2015-09-26 09:55:00", "go_arrival_city": " nrt ", "return_departure_city": "nrt", "cost": 44594, "return_duration": 11.5, "_timestamp": "2015-07-08t19:43:42.254412...

PHP auto detect upload url path -

i work in responsivefilemanager , in config file have 2 line: $upload_dir = '/user/uploads/files/'; // path base_url base of upload folder (with start , final /) $current_path = '../../../../uploads/files/'; // relative path filemanager folder upload folder (with final /) this wroked in xammp system (with sub folder. /user/ sub folder). if move in real server need edit 2 line , remove sub folder , 1 ../ 2 line. now, need auto detect url path. mean : if install in sub folder or root folder 2 line worked in script without manual editing. how can create this? there no particular way autodetect directory upload to. easiest solve checking if directory exists , use other directory if not found. however, i'd suggest having same relative structure on both systems best solution. same relative structure should work across servers , systems without having change anything.

python - Add custom border to certain cells in a matplotlib / seaborn plot -

Image
right i`m using seaborn's clustermap generate clustered heatmaps - far good. for use case, need draw colored borders around specific cells. there way that? or pcolormesh in matplotlib, or other way? you can overplotting rectangle patch on cell want highlight. using example plot seaborn docs import seaborn sns import matplotlib.pyplot plt sns.set() flights = sns.load_dataset("flights") flights = flights.pivot("month", "year", "passengers") g = sns.clustermap(flights) we can highlight cell doing from matplotlib.patches import rectangle ax = g.ax_heatmap ax.add_patch(rectangle((3, 4), 1, 1, fill=false, edgecolor='blue', lw=3)) plt.show() this produce plot highlighted cell so: note the indexing of cells 0 based origin @ bottom left.

Using a context menu to send a file to another application in C# -

i'm creating application hold multiple images, i've decided on image context menu appear when right clicking , have option send image editing application such photoshop, gimp, paint etc... i know how create context menu, unsure on code use in order send image application itself. if want open file in default application answered . if want same explorer doing on "edit" context menu item, add these 2 lines in "original, complicated answer" link above: if (psi.verbs.contains("edit", stringcomparer.ordinalignorecase)) psi.verb = "edit"; you should check existence of verb want in psi.verbs per msdn . if there's no "edit" verb code calls default app.. default. if want give user list of image editing apps user have installed have have hardcoded database of such apps installation guids, check if installed, find out installed (maybe not in default place), , make list of them, calling each file command line a...

android - Making WebView scrollable within FrameLayout -

<framelayout android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview1" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:focusableintouchmode="true" /> <view android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/darkview" android:background="#99000000" android:visibility="gone" /> </framelayout> i want webview scrollable in current scenario. it's not scrolling right now. should do? the complete .xml file of above code part of is: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:androi...

caching - solr query warmup troubles and solrconfig.xml -

i trying configure warmup queries in solrconfig.xml on solr version 4.10.3, no matter how cache seems disappear after minute or so, , first search again takes 20 secs., subsequent searches coming straight away. the query looks (filter variable search-term): solr/nyheder/select?q=overskrift:" & filter & "+or+underrubrik:" & filter & "+or+tekst:" & filter&fl=id+oprettet+overskrift+underrubrik+tekst+pix &sort=oprettet+desc and solrconfig.xml section (which seems nothing) looks (it similar event="firstsearcher"): <listener event="newsearcher" class="solr.querysenderlistener"> <arr name="queries"> <lst> <str name="q">*:*</str> <str name="sort">oprettet desc</str> <str name="fl">id oprettet overskrift underrubrik tekst pix</str> </lst> <lst> <str name=...

reactive programming - How create revisor observable in rxjava -

problem have many observables, periodically emits items. need every running task(observable), running revisor observable, example logs execution time, emitted results!, etc. example : when user(subscriber) subscribes on observable, revisor observable starts. it's should transparent subscribers how best way that?

php - Display data in a section HTML -

i have array want select , display data depending criteria in sidebar. show data in section in body, , change made section when select criteria on sidebar. for moment solution create page each criteria , connect link criteria in sidebar. normally there solution show dynamically <html> <head> <meta charset='utf-8'> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="script.js"></script> </head> <body> <?php require_once ".\classes\phpexcel\iofactory.php"; $objphpexcel = phpexcel_iofactory::load("zfg0...

objective c - Http event listener IOS(Persistent http connection) -

is there way create http listener in ios httplistener: mean, create persistent http channel using post request, sever push events channel. want create channel wait server event. -(void)httppost:(nsstring *)url andxml:(nsstring *)xml{ nshttpcookiestorage *cookiestorage = [nshttpcookiestorage sharedhttpcookiestorage]; nsurl *urls = [nsurl urlwithstring:url]; nsmutableurlrequest *request1 = [[nsmutableurlrequest alloc] initwithurl:urls]; nsdata *postdata = [xml datausingencoding:nsasciistringencoding allowlossyconversion:yes]; nsstring *username =[[applicationstorage applicationstorage] username]; nsstring *password = [[applicationstorage applicationstorage] password]; //http basic authentication nsstring *authenticationstring = [nsstring stringwithformat:@"%@:%@", username, password]; nsdata *authenticationdata = [authenticationstring datausingencoding:nsutf8stringencoding]; nsstring *authenticationvalue = [authenticationdata ba...

java - Hibernate Search- Index not created -

i writing final dissertation in university topic of integrating search functionalities existing web application , want use hibernate search. but struggling indexing of entities in existing application. seems indexing not working, because no index files generated when create new entity. also, base index directory configured in hibernate configuration not created when start application. application uses spring framework , hibernate core hibernate-jpa 2.0 (see pom.xml). i no errors when executing application, there info concerning hibernate search info annotationsessionfactorybean:780 - building new hibernate sessionfactory info hibernatesearcheventlistenerregister:75 - unable find org.hibernate.search.event.fulltextindexeventlistener on classpath. hibernate search not enabled. i read don´t need integrate these listeners when using hibernate annotations, can´t source of problem, right? extract pom.xml <dependencies> ... <dependency> ...

javascript - jQuery Mobile: dymamically created elements don't have click events -

on jquery mobile website give user possibility add select menus on click. additional select menus appear, not work. no options shown when select menus being clicked. here comes code: jsfiddle: http://jsfiddle.net/ncs6u/82/ html: <div id="select-con"> <div class="select-row"> <form class="select-form"> <select class="select-class" name="select-name" data-native-menu="false"> <option value="0" data-placeholder="choose">choose</option> <option value="1">option 1</option> <option value="2" selected="selected">option 2</option> <option value="3">option 3</option> </select> </form> </div> <!-- raw select menu adding --> <div ...

asp.net mvc - Redirect user to page where he was before session expires.(backbone and asp mvc5) -

i using backbone js @ front-end index pages , asp mvc 5 @ back-end. how should redirect user page before session expired. using returnurl problem backbone pages indexed using "#" , server neglect address after #. application redirect homepage.

How to filter out sequences based on a given data using Python? -

i filter out sequences don't want based on given file a.fasta. original file contain sequences , fasta file file starts sequence id followed nucleotides represented a, t, c, g. can me? a.fasta >chr12:15747942-15747949 tgacatca >chr2:130918058-130918065 tgacctca original.fasta >chr3:99679938-99679945 tgacgtaa >chr9:135822160-135822167 tgacctca >chr12:15747942-15747949 tgacatca >chr2:130918058-130918065 tgacctca >chr2:38430457-38430464 tgacctca >chr1:112381724-112381731 tgacatca expected output c.fasta >chr3:99679938-99679945 tgacgtaa >chr9:135822160-135822167 tgacctca >chr2:38430457-38430464 tgacctca >chr1:112381724-112381731 tgacatca code import sys import warnings bio import seqio bio import biopythondeprecationwarning warnings.simplefilter('ignore',biopythondeprecationwarning) fasta_file = sys.argv[1] # input fasta file remove_file = sys.argv[2] # input wanted file, 1 gene name per line result_file = sys.argv[3] # ...

AngularJS: Response header returns empty object -

i using angularjs $http post methods response header manipulate location parameter. when inspect browser; shows response header containing location parameter value when comes angularjs response header object dosent containing @ empty object. $http.post(mns_domain + server.message_proxy, json.stringify(payload)) .success(function(data, status, headers, config) { $scope.messagelocation = headers(); $scope.success = sucess_data_sent; clearformdata(); }) .error(function(errorcallback) { $scope.error = errorcallback; console.log("error " + errorcallback); }) . finally(function() { console.log("rest call send message"); }); console.log($scope.error); }; i have done using headers – {function([headername])} – header getter function. you can this: var headerobject = data.headers(); , access propertie...

ios - Hiding UITextView and UILabels in Autolayout -

Image
i have picker view , when user picks value picker view want hide textviews , labels together: [label1] [----textview1----] [label2] [----textview2----] [label3] [----textview3----] so want is: if (picker value equal "somevalue") { - hide label 2 , textview 2 - shift label 3 , text view 3 positioned below label 1 , textview1 } i tried this solution change priorities , this solution still no luck. need hide label , textview @ once. set constraints this then looks in gif code keep 3 property @property (weak, nonatomic) iboutlet uilabel *secondlabel; @property (weak, nonatomic) iboutlet uitextfield *secondtextfield; @property (weak, nonatomic) iboutlet nslayoutconstraint *tochangeconstraint; then hide self.secondlabel.hidden = true; self.secondtextfield.hidden = true; self.tochangeconstraint.constant = -20; [uiview animatewithduration:0.5 animations:^{ [self.view layoutifneeded]; }]; then outlet constraint one

c# - Why is Http code 500 returned although I catch the exception -

although if-clause executed in fiddler see http error 500 , not 404, why that? public class globalexceptionhandler : exceptionhandler { public override void handle(exceptionhandlercontext context) { if (context.exception resourcenotfoundexception) { context.request.createerrorresponse(httpstatuscode.notfound, context.exception.message); } else { base.handle(context); } } } this in fiddler response: http/1.1 500 internal server error content-length: 3945 content-type: application/json; charset=utf-8 server: microsoft-iis/7.5 x-powered-by: asp.net date: wed, 08 jul 2015 08:14:45 gmt {"message":"an error has occurred.","exceptionmessage":"the resource not found!","exceptiontype":"erpapplicationendpoints.resourcenotfoundexception","stacktrace":" @ ... removed clarity....

Multiple apps, one database heroku rails -

a friend , have idea create multiple apps via heroku using postgres. is there away can tie in databases 1 singular database either pushing each 1 individually or having them indexed? yes use heroku config in app provisioned database connection string. use heroku config:set pg_url=3829w:8eh8fe78hfd@ffeiwfafdsa.amazonaws.com/8fdhufdsa set database in other app. both apps use same database. won't overwrite each other, write same db.

node.js - Close readable stream to FIFO in NodeJS -

i creating readable stream linux fifo in nodejs this: var stream = fs.createreadstream('fifo'); this works , can receive data fifo fine. problem want have method shut software down gently , therefore need close stream somehow. calling process.exit(); does have no effect stream blocking. i tried destroy stream manually calling undocumented methods stream.close() stream.destroy() described in answers of question . i know kill own process using process.kill(process.pid, 'sigkill') feels bad hack , have bad impacts on filesystem or database. isn't there better way achieve this? you can try minimal example reproduce problem: var fs = require('fs'); console.log("creating readable stream on fifo ..."); var stream = fs.createreadstream('fifo'); stream.once('close', function() { console.log("the close event emitted."); }); stream.close(); stream.destroy(); process.exit(); after creating fifo calle...

java - Unable to get Fuzzy C means working -

i need find out why centroid positions close each other? i found fuzzy c means code here http://msugvnua000.web710.discountasp.net/posts/details/3347 , tried hard convert java code (below) there missing. i tried looking @ implementation http://www.codeproject.com/articles/91675/computer-vision-applications-with-c-fuzzy-c-means code looks similar it's different because instead of updating cluster indexes membership values updates - i'm not sure why change implemented? public class cmeansalgorithm3 { private static int fuzzyness = 2; private final map<double, species> integerclusterhashmap = new hashmap<double, species>(); /// array containing points used algorithm private list<job> points; /// gets or sets membership matrix public double[][] u; /// algorithm precision private double eps = math.pow(10, -5); /// gets or sets objective function private double j; /// gets or sets log message public s...