Posts

Error while running ant build.xml -

hi below code when iam running code command prompt ant run iam getting error error: f:\xxx\build.xml:29: problem: failed create task or type target cause: name undefined. action: check spelling. action: check custom tasks/types have been declared. action: check <presetdef>/<macrodef> declarations have taken place. this code: <target name="checkout" description="checkout code perforce"> <exec executable="cmd"> <arg value="/c"/> <arg value="p4 -u -p sync"/> <arg value="-p"/> </exec> </target> <target name="getlatestcode" description="checkout , latest code perforce"> <exec executable="cmd"> <arg value="/c"/> <arg value="p4"/> <arg value="-p"/> </exec...

machine learning - mahout for content based recomendation -

i have list user data : user name, age, sex , address, location etc , a set of product data : product name, cost , description etc now build recommendation engine able : 1 figure out similar products eg : name : category : cost : ingredients x : x1 : 15 : xx1, xx2, xx3 y : y1 : 14 : yy1, yy2, yy3 z : x1 : 12 : xx1, xy1 here x , z similar. 2 recommend relevant products product list user how kind or recommendation engine can implement mahout ? available methods ? there useful tutorial/link available ? please help in mahout v1 here https://github.com/apache/mahout can use "spark-rowsimilarity" create indicators each type of metadata, categroy, cost, , ingredients. give 3 matrices containing similar items each item based on particular metadata. give "more this" type of recommendation. can try combining metadata 1 input matrix , see if gives better results. to personalize record items user has expressed preference for. index indica...

joomla3.0 - Joomla user registration insert file -

i looking file in joomla 3, query inputs db values registration fields? thanks in advance. if follow code com_users see loads , uses model usersmodeluser (loaded /administrator/models/user.php ) in turn uses class juser (loaded /libraries/joomla/user/user.php ). if want create/alter users, should load , instance of usersmodeluser , use it's load() load existing user , it's save() method store change or create new user entries. by using usersmodeluser , therefore juser of niceties two-factor authentication (if it's configured) , correct hash password based on authentication system/plugins in use. generate random password if don't pass 1 in data used create new user.

java - Any workaround for distributing(sharding) key of collections like Lists, Sets etc -

we using redis 2.8.17 jobqueues. we using rpush , brpoplpush making reliable queue. as per our current design multiple app-servers push(rpush) jobs single job queue. since brpoplpush operation atomic in redis, jobs later poped(brpoplpush) , processed of server's consumers. since app servers capable of scaling out, bit concerned redis might become bottleneck in future. i learnt following documentation on redis partitioning: "it not possible shard dataset single huge key big sorted set" i wonder whether pre-sharding queues app servers option scale out. is there cluster can in above design? the main thing need consider whether you'll need shard @ all. entire stackexchange network (not stackoverflow -- all network) runs off of 2 redis servers (one of i'm pretty sure exists redundancy), uses aggressively. take @ http://nickcraver.com/blog/2013/11/22/what-it-takes-to-run-stack-overflow/ redis absurdly fast (and remarkably space-efficient), 1...

android - In custom LayoutManager (extends RecyclerView.LayoutManager) RecyclerView.getChildViewHolderInt NullPointerException issue -

after trying similar (simplify version): @override public void onlayoutchildren(recyclerview.recycler recycler, recyclerview.state state) { .... addview(new textview(mrecyclerview.getcontext())) } i have exception: java.lang.nullpointerexception @ android.support.v7.widget.recyclerview.getchildviewholderint(recyclerview.java:2497) @ android.support.v7.widget.recyclerview$layoutmanager.addviewint(recyclerview.java:4807) @ android.support.v7.widget.recyclerview$layoutmanager.addview(recyclerview.java:4803) @ android.support.v7.widget.recyclerview$layoutmanager.addview(recyclerview.java:4791) i can't add recyclerview child view without viewholder? new children should never added recyclerview directly in layout manager. views adds should obtained attached recyclerview.adapter, accounted , have valid viewholder attached.

api - What is the appropriate HTTP status code to ask a client to redo an operation -

i have endpoint on web application takes data client , once enough data collected, operation performed. if result of operation invalid, need inform client operation must redone. i send response sort of flag in it, if status code exists purpose already, i'd rather utilize it. looking @ definitions of status codes here , seems there not 1 appropriate, however, if take names account , not descriptions, status code 406 not acceptable sounds appropriate. 406 not acceptable not appropriate because status code content negotiation: the 406 (not acceptable) status code indicates target resource not have current representation acceptable user agent, according proactive negotiation header fields received in request (section 5.3), , server unwilling supply default representation. -- https://tools.ietf.org/html/rfc7231#section-6.5.6 202 accepted seems better: the 202 (accepted) status code indicates request has been accepted processing...

asp.net mvc - Kendo UI Grid binding with scaffolding/CRUD operations to model -

first of all, i'm complete novice kendo ui/client side code. i'm used using standard mvc scaffolding display tables (entity first): +------------------------------------+ | +--------------------------------+ | | |___id___|__name_|__price_|______| | | | | | |crud | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +--------+-------+--------+------+ | +------------------------------------+ where crud part shows: @html.actionlink("edit", "edit", new { id=item.id }) | @html.actionlink("details", "details", new { id=item.id }) | @html.actionlink("delete", "delete", new { id=item.id }) in terms of kendo grid, however, i'm @ loss incorporating actions these. i.e. how meant 'adding' inline or (preferably) pop up editing this? my model database tabl...