Posts

Showing posts from January, 2012

asp.net mvc 3 - How do I change Empty Template to Internet Template in MVC 3? -

a new mvc web application has been created empty razor template. in template found default controller,model , view missed. need change template empty internet application. i couldn't find option in properties change internet controller. how can without creating new project? you create new project in reverse. create new project based on internet template, , use compare tool (i rely heavily on beyondcompare) merge internet template differences existing project.

lucene - Elasticsearch - Error in bulk indexing - this IndexWriter is closed -

we indexing documents elasticsearch java application. unable index required docs indexing fails of them due following exception(found log) org.elasticsearch.index.engine.createfailedengineexception: [investigations][0] create failed [event#jebseiqaseemf6xthsauzw] @ org.elasticsearch.index.engine.internal.internalengine.create(internalengine.java:397) @ org.elasticsearch.index.shard.service.internalindexshard.create(internalindexshard.java:382) @ org.elasticsearch.action.bulk.transportshardbulkaction.shardindexoperation(transportshardbulkaction.java:401) @ org.elasticsearch.action.bulk.transportshardbulkaction.shardoperationonprimary(transportshardbulkaction.java:153) @ org.elasticsearch.action.support.replication.transportshardreplicationoperationaction$asyncshardoperationaction.performonprimary(transportshardreplicationoperationaction.java:556) @ org.elasticsearch.action.support.replication.transportshardreplicationoperationaction$...

sql server - SQL error: The multi-part identifier could not be bound -

i have sql query: select contactid, items.name, orders.confirmed, deleted, dbo.polish_date(orders.crdate), orders.orderid, idtowar, idspecial, idstatus, idtype, description orders, items left join contacts on orders.orderid = idorder (orders.iduser='38824' , orders.idtowar=items.itemid) order orders.crdate and have error every time: the multi-part identifier "orders.orderid" not bound. try this select contactid, items.name, orders.confirmed, deleted, dbo.polish_date(orders.crdate), orders.orderid, idtowar, idspecial, idstatus, idtype, description orders left join contacts on orders.orderid = idorder left join items on orders.idtowar = items.itemid orders.iduser='38824' order orders.crdate

extract some parts of a string array in c# -

i have string array 31 strings, have extract string 3rd position 27th position , pass part string array function. how accomplish in c#? you can use array.copy(array, int32, array, int32, int32) overload ; copies range of elements array starting @ specified source index , pastes them array starting @ specified destination index. array.copy(source, 2, destination, 0, 25); but create new array. can use linq istead skip , take methods like; var destination = source.skip(2).take(25).toarray(); i assume want 27th position also, that's why used 25 length (or count) in both example. if don't want 27th position, need change 25 24 in both case.

php - Why does Json not recognize MySQL calculated values/columns? -

good morning everybody, in php-file want several values mysql-database , encode in json. query includes values calculate within mysql-select. when call php-file calculated values 'null'. don't know , don't understand why. select correct, because able show results without json on page. maybe see mistake in code or has explanation habbit. my code following: <?php //-------------------------------------------------------------------------- // example php script fetching data mysql database //-------------------------------------------------------------------------- $host = "localhost"; $user = "root"; $pass = ""; $databasename = "boerse"; $tablename = "prices"; //-------------------------------------------------------------------------- // 1) connect mysql database //-------------------------------------------------------------------------- //include 'db.php'; $con = mysql...

javascript - jQuery unable to find element unless inside doc ready -

this question has answer here: why jquery or dom method such getelementbyid not find element? 6 answers i started simple code aim of calculating selector once. (function($) { var $mydiv = $('.mydiv'); var myfunc = function(){ $mydiv.css('background', 'red'); } $(document).ready(function(){ myfunc(); }); $(document).resize(function(){ myfunc(); }); })(jquery); but i'm able work moving selector inside of doc ready dont understand why need this. (function($) { var $mydiv; var myfunc = function(){ if(!$mydiv){ $mydiv = $('.mydiv'); } $mydiv.css('background', 'red'); } $(document).ready(function(){ myfunc(); }); $(document).resize(function(){ myfunc(); }); })(jquery); ...

javascript - Bootstrap-Select opens option under the div -

i have fixed size div. suppose 50px. inside have drop down. i've used bootstrap select make searchable. <div style="height=40px;width:200%; overflow-x:scroll;" id="hugewidth"> <select id="ss"> <option>1</option> <option>1</option> <option>1</option> <option>1</option> <option>1</option> </select> <br/><br/><br/> </div> now problem when open dropdown , options goes under hugewidth div. want dropdown open above div. see jsfiddle might clear problem. jsfiddle see!! goes under scrollbar. can please me this?? want dropdown option div go on scrollbar. if not possible, there way adjust div height according dropdown option size while open , close? dropdown options dynamic. one more thing. possible stop dropdown open upwards? example: jsfiddle you can add: data-container="body" to select element. ...

php - ORDER BY Not working with GROUP BY -

i have written sql code using group , order in here order not working can 1 me select " . db_prefix . "leaderboard_scores.* , sum(" . db_prefix . "leaderboard_scores.score) total_score, " . db_prefix . "customer.firstname, " . db_prefix . "customer.lastname " . db_prefix . "leaderboard_scores join " . db_prefix . "customer on " . db_prefix . "leaderboard_scores.philips_store_id = " . db_prefix . "customer.customer_id group " . db_prefix . "leaderboard_scores.phi_store_id order " . db_prefix . "leaderboard_scores.week desc this query work without php errors given middle rows without giving top weeks. weeks store using times stamp actual query select rc_leaderboard_scores.* , sum(rc_leaderboard_scores.score) total_score, rc_customer.firstname, rc_customer.lastname rc_leaderboard_scores join rc_customer on rc_leaderboard_scores.phi_store_id = rc_customer.customer_...

san - Suddenly bad disk I/O utilization on SQL-server even on weekend where we have few transactions -

on friday our ms sql-server 2012 showed 100% disk i/o utilization in new relic (performance monitor). hade made no updates ever , windows update showed nothing had happend. load on server low because fridays have low traffic on our website. disk i/o utilization has been kept high on weekend. the server vm-ware machine 16 procs , 36 gb of memory. disk located in san. we have 5 mb of reads per second , low on writes on database server. server has 500 i/o operations per second. cpu @ 25% the database stored in 12 files on separate drive on server. no long running task running. server defragmentet , indexeson database have been rebuilt. perfmon on sql server shows disk que @ peek 5. our server guys says san running smoothly. gues happend on friday whick keeps our sql have wait file operations. any ideas? there lots of reasons happen. most obvious, backup schedule? if traffic low on friday iis shut down application pool after idle timeout, next hit website trig...

sharepoint - Sharepoint2013 webpart can't load custom dll from GAC -

i'm trying use third party dll called asptokeninputlib in sharepoint2013 webpart . working while when loaded in bin directory when tried move gac won't work , it's stopped working if load in bin well. error object reference not set instance of object. sharepoint logs shows system.nullreferenceexception: object reference not set instance of object. @ asptokeninputlib.asptokeninput.onload(eventargs e) my package manifest file includes <assemblies> <assembly location="asptokeninputlib.dll" deploymenttarget="globalassemblycache" /> <assembly location="bidsearchwebpart.dll" deploymenttarget="globalassemblycache"> <safecontrols> <safecontrol assembly="bidsearchwebpart, version=1.0.0.0, culture=neutral, publickeytoken=59049686a9425568" namespace="bidsearchwebpart.visualwebpart1" typename="*" /> </safecontrols> </assembly> if remove asptokeninp...

c# - How are PCL references resolved? -

i'm looking options port wpf-oriented library pcl library can used on multiple platforms, windows store applications. from understand, portable class library references subset of .net libraries supported on platforms target, , limited following assemblies: mscorlib.dll system.dll system.core.dll system.xml.dll system.componentmodel.composition.dll system.net.dll system.runtime.serialization.dll system.servicemodel.dll system.xml.serialization.dll system.windows.dll (from silverlight) and microsoft adds following that: however, not of these assemblies supported on platforms. in portable class library project, specify platforms want target, , supported assemblies platforms referenced in project. if try reference assembly not supported platforms have targeted, visual studio warns of incompatibility. core assemblies (mscorlib.dll, system.dll, system.core.dll, , system.xml.dll) supported on platforms. now, when making pcl librar...

android - How to implement multi level expandable list view search functionality? -

i want implement search functionality in multi level expandable list view. hierarchy should expand during search has progressed. can plz me this? thanks in advance. for (int = 0; < list.size(); i++) { if (!list.get(i).isexpanded() && list.get(i).getwrappedobject().getlevel() != 0) { list.get(i).toggle(); } }

How to Bulk insert Hindi Text in SQL Server -

i have .text file in way केस रेयाज अन्सारी सय्यद शेबाज सय्यद गफ्फर i want make bulk insert when inserting using bulk command bulk insert [dbo].[test_enrollment2] 'c:\test\test2.txt' table shows value this αñòαÑçαñ╕ αñ░αÑçαñ»Î±Ã±╛αñ£ αñàαñ¿Î±Ã‘ìαñ╕αñ╛αñ░ी αñ╕αñ»Î±Ã‘ìαñ»Î±Ã±Âª αñ╢αÑçαñ¼Î±Ã±╛αñ£ αñ╕αñ»Î±Ã‘ìαñ»Î±Ã±Âª αñùαñ½Î±Ã‘ìαñ½Î±Ã±░ while making entry using insert command insert table (column name) values(n'केस रेयाज अन्सारी ') it shows proper please suggest it not possible write insert command because have more 5carore value my column type nvarchar(200) bulk insert [dbo].[test_enrollment2] 'c:\test\test2.txt' (fieldterminator = '","') - see more at: http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file#sthash.2zsf5t8q.dpuf you don't have delimiter in data sample data see.

Member lookup over generic constraint in C#? -

i have simple code : (simplified) class program { static void main(string[] args) { var s1 = new student(); var s2 = new student(); mygenericclass<student> mgc = new mygenericclass<student>(); mgc.eq(s1,s2); } } class mygenericclass<t> t : person { public void eq(t t1, t t2) { console.writeline(t1.equals(t2)); } } class person { public bool equals(person p) { return true; } } class student : person { public bool equals(student obj) { return true; } } the invoked method person's , here question : the mygenericclass initialized student t student. there constraint there : where t : person - means person should base class . ( , student accomplish this) question : 1) reason behavior relates generics ? 2) if , why still pers...

php - Found it browser is IE Using HTTP_USER_AGENT -

i trying write little script find out type of browser user using. i found following somewhere (i think so): $browser = array( 'version' => '0.0.0', 'majorver' => 0, 'minorver' => 0, 'build' => 0, 'name' => 'unknown', 'useragent' => '' ); $browsers = array( 'firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol' ); if (isset($_server['http_user_agent'])) { $browser['useragent'] = $_server['http_user_agent']; $user_agent = strtolower($browser['useragent']); foreach($browsers $_browser) { if (preg_match(...

Jquery animation of height width not working -

i've created simple animation using jquery. event doesn't trigger animation expand div height , width. $('img').click(function(){ $('.popup').animate({'height': '+= 100px','width':'+=100px' }) }) fiddle thank you. you need remove space between += , 100px when changing height : $('img').click(function(){ $('.popup').animate({'height': '+=100px','width':'+=100px' }) }) //-----------------------------------^ here jsfiddle note: i'm sure know, won't see effect whilst div has property display:none

doctrine2 - Member of In queryBuilder -

i need request users groups list. must use "member of" function same described here : http://docs.doctrine-project.org/en/2.0.x/reference/dql-doctrine-query-language.html but in projet, prefer use doctrine querybuilder (documented here : http://docs.doctrine-project.org/en/2.0.x/reference/query-builder.html ) doesn't found equivalent in query builder "member of" dql syntax. any idea ? unfortunately member of, , instance of, got added expr* classes, can see in commit: https://github.com/doctrine/doctrine2/commit/400f420925eea9d50eee9ea3d78a847b381865ce as far know, none of stable releases include @ moment, have wait next release.

jQuery in php loop in wordpress -

i have code on header.php <!-- img style --> <link href="<?php bloginfo('template_directory'); ?>/picanim files/picanim.css" rel="stylesheet" type="text/css" /> <script src="<?php bloginfo('template_directory'); ?>/picanim files/jquery-1.7.2.min.js"></script> <script src="<?php bloginfo('template_directory'); ?>/picanim files/jquery.picanim.min.js"></script> <script type="text/javascript"> $.noconflict(); jquery(document).ready(function($){ $('#test1 img').picanim({initef:'grayscale',hoveref:'fadein'}); }); </script> <!-- img style --> and have jquery in index.php : <div class="left-slide"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="boxgrid caption" > <div id="test1"> <img src=...

crontab - simple basic cron job not working -

i have cron job doesn't output command prompt/terminal- * * * * * echo "hey" i don't know why. add, want take mysql backup on server side (written in php) every hour. proceed that, tried basic cron job didn't work. tried running command- command: ps -ef | grep cron output: root 952 1 0 feb05 ? 00:00:08 cron ubuntu 3271 2707 0 11:26 pts/0 00:00:00 grep --color=auto cron

maven - Jenkins FATAL ERROR Timeout: killed the sub-process -

i running jenkins job creates findbugs report. seems findbugs memory , time hungry facing outofmemory error issue , increased memory setting maven_opts variable i.e. maven_opts=-xms512m -xmx1024m -xx:maxpermsize=512m. now facing timeout: sub-process interrupted exception. suggestion how rid of this? note: using "mvn clean compile findbugs:findbugs" command , if run manually working(without timeout exception). findbugs version: 2.5.3 jenkins version: 1.545 here error log: [info] [findbugs:findbugs {execution: default-cli}] [info] fork value false [java] jvm args ignored when same jvm used. timeout: sub-process interrupted [info] ------------------------------------------------------------------------ [error] fatal error [info] ------------------------------------------------------------------------ [info] timeout: killed sub-process [info] ------------------------------------------------------------------------ [info] trace : timeout: killed sub-process...

foreach - C# from db to treeview menu creation -

i aim create treeview menu using dt ,ds , geting data db tables. code down below. got error @ ds mark inside code can see.. gives error " incorrect systax near 'İşlemleri' " , İşlemleri part of value tnparent.text contains. ( gişe İşlemleri) void fill_tree2() { dataset prset = pdataset("select * mnu_tbl_mnuelmnlr"); treeview1.nodes.clear(); foreach (datarow dr in prset.tables[0].rows) { treenode tnparent = new treenode(); tnparent.text = dr["menuadi"].tostring(); /////////////////// 'gişe İşlemleri' tnparent.tag = dr["id"].tostring(); tnparent.expand(); treeview1.nodes.add(tnparent); fillchild(tnparent, tnparent.text); } } public void fillchild(treenode parent, string parentid) { dataset ds = pdataset("select altmenuadi mnu_tbl_altelmnlr ustmenuid = (select id mnu_tbl_mnuelmnlr)); parent.nodes.clear(); ...

c# - ASP Rest Services with Stream -

i trying building rest service stream input want save in file on server. problem when run service 'endpoint not found' i using vs 2010 .net 4.0 my service model under <services> <service name="wcfservice1.testservice" behaviorconfiguration="servicebehaviour"> <endpoint address="" binding="webhttpbinding" contract="wcfservice1.itestservice" behaviorconfiguration="web" /> </service> </services> <behaviors> <servicebehaviors> <behavior name="servicebehaviour"> <servicemetadata httpgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> </servicebehaviors> <endpointbehaviors> <behavior name="web"> <webhttp/> </behavior> </endpointbehaviors> ...

c++ - Initializing std::map with an array of std::pairs issue (pointer error?) -

i trying understand how initialize private const std::map properly. have studied this well-known topic none of answers suitable me, because forced use old gcc , boost versions (gcc 4.4, boost 1.41 -> c++11 features limited, boost::asign::map_list_of not compile ) and, moreover, don't want use class member function std::map initialization due need of doing outside class @ time of object construction. however, there overloaded constructor std::map accepts 2 iterators ( this thread inspired me too), , workaround: template <typename arg, typename callback> class callbackselector { private: const std::map<arg, callback> mapping; public: callbackselector(std::pair<arg, callback> _mapping[]): mapping(_mapping, _mapping + sizeof(_mapping)/sizeof(std::pair<arg, callback>)) { //boost_assert(sizeof _mapping)/(sizeof (std::pair<arg, callback>)) == 2); std::cout <...

c# - Starting exe with Process.Start(), weird stuff going on -

Image
im trying automate microsoft assessment , planning toolkit. i'm running problem. when start toolkit clicking icon on desktop, toolkit works fine. but, if execute exe using process.start(), toolkit bugs. (after change of selection in left pane, options not shown. next this, when toolkit closed error shown) started shortcut on desktop: started process.start(): the code starting exe: processstartinfo start = new processstartinfo(); start.filename = "c:\\program files\\microsoft assessment , planning toolkit\\bin\\maptoolkit.exe"; process p = process.start(start); anyone has idea be, or how solve behaviour? try using workingdirectory : processstartinfo start = new processstartinfo(); start.filename = "c:\\program files\\microsoft assessment , planning toolkit\\bin\\maptoolkit.exe"; start.workingdirectory = "c:\\program files\\microsoft assessment , planning toolkit\\bin"; process p = process.start(start);

google plus api : followers' list of a page (javascript) -

are there solutions list of followers (and ids) of page i'm managing ? (a page created account, different account's page) tried gapi.client.plus.people.list method userid replaced page's id, returns message 'undefined'. (used 'visible' collection parameter) if use same method account id, returns list of people added of circles. any solutions? not available. there api page management has functionality ( https://developers.google.com/+/api/pages-signup ), available larger page management systems unfortunately.

quartz scheduler - Is this Cron Trigger Expression valid? -

public static itrigger fireeverydayatmidnight() { itrigger trigger = triggerbuilder.create() .withidentity("trigger3", "group1") .withcronschedule("0 02 01 * * ?") .forjob("myjob", "group1") .build(); return trigger; } i have problem thoroughly understanding cron trigger expressions. intend schedule above trigger fire every day @ 2 minutes past midnight. want hear people more experienced cron expressions if expression above "0 02 01 * * ?", indeed run intended i.e run fire every day @ 2 minutes past midnight the cron in trigger execute @ 02:00 on 1st of every month. if wish execute @ 00:02 every day using 7 field quartz contrab format, use: 0 2 0 * * * * ? here 's quick summary of how crons formed, snipped cron how on ubuntu's site : each of sections separated space, final section having 1 or more spaces in it. no sp...

c# - how to split the field from datatable -

i have url contain data in xml format. please see code:- public partial class webform1 : system.web.ui.page { protected void page_load(object sender, eventargs e) { if (!ispostback) { griddata(); } } protected void griddata() { string url = "http://s3.amazonaws.com/webassets.ticketmob.com/feeds/31squares/tunestub-xml.xml"; xmldocument doc = new xmldocument(); dataset ds = new dataset(); datatable dt = new datatable(); ds.readxml(url); dt = ds.tables[1]; grid.datasource = ds.tables[1]; grid.databind(); } public override void verifyrenderinginserverform(control control) { } protected void btnexport_click(object sender, eventargs e) { response.clearcontent(); response.buffer = true; response.addheader("content-disposition", string.format("attachment; filename={0}", "exportvenue.xls")); response.contenttype = ...

java - Create a text/plain Jersey response -

i have code works, looking better way it. have restful web api want support json, xml, , text media types. json , xml easy jaxb annotated "bean" class. got text/plain work, wish jersey little more intelligent , able convert list of beans, list<machine> string using tostring . here resource class. json , xml media types use jaxb annotated bean class. text plain uses custom string format (basically stdout representation of command). @path("/machines") public class machineresource { private final machinemanager manager; @inject public machineresource(machinemanager manager) { this.manager = manager; } @get @path("details/") @produces({ mediatype.application_json, mediatype.application_xml }) public list<machine> details() { return manager.details(); } @get @path("details/") @produces({ mediatype.text_plain }) public string detailstext() { stringbuilder t...

ant - Setting sdk.dir for Android in Teamcity -

i've configuration in teamcity on windows: android project android sdk installed in c:\program files (x86)\android\android-sdk i'm using ant build project in ant step want set sdk.dir using additional ant parameters path space getting me problems. i've tried: -dsdk.dir=c:\program files (x86)\android\android-sdk -dsdk.dir=c://program files (x86)//android//android-sdk -dsdk.dir="c://program files (x86)//android//android-sdk" -dsdk.dir=%env.android_home% and same error: cannot find c:\program\tools\ant\build.xml as workaround i'm using short path name: -dsdk.dir=c:\progra~2\android\android-sdk is way? thank you. -dsdk.dir="c:\program files (x86)\android\android-sdk" should work. -dsdk.dir=%android_home% (assuming variable set correctly).

javascript - Update value in DB every five minutes -

i building webapp user have ranking based on twitter activity , activity on website. therefore i'd update rank every 5 minutes, pulling latest activity twitter , update in database. thinking of using this: var minutes = 5, the_interval = minutes * 60 * 1000; setinterval(function() { // update here }, the_interval); however, have several questions code: where should save make sure run? will slow program or problem pull data out of twitter every 5 minute? should use streaming api instead? note: using mongodb i'd suggest create scheduled task/chron job/etc. (depends on host os) call separate node.js application performs specific tasks want periodically , exit when complete. (or use childprocess potentially well). while node.js async, there's no need, given description provided, perform work within same application process serving web application. in fact, sounds "busy work", best handled distinct process avoid impacting directly of inte...

c# - How do I get the Vendor and Product strings in case of a HID device on Windows? -

i need information idproduct , idvendor of plugged in hid device on windows machine. how usb_device_descriptor given hid device? i searched internet, found examples of devices being queried using winusb library , getting usb_device_descriptor. understanding cannot use winusb plugged in hid device. what need use hid device then? if you're using hidlibrary , can device this: _device = hiddevices.enumerate(vendorid, productid, usagepage).firstordefault(); if (_device != null) { _device.opendevice(); string product = getproductstring(_device); string mfg = getmanufacturerstring(_device); } with latter 2 functions defined this: private string getproductstring(hiddevice d) { byte[] bs; _device.readproduct(out bs); string ps = ""; foreach (byte b in bs) { if (b > 0) ps += ((char)b).tostring(); } return ps; } private string getmanufacturerstring(hiddevic...

.htaccess - Redirect visitor from one domain to another but keep the requested domain name -

so have client wants have multilingual web site can accessed 2 domain names: domain_name_1.ru domain_name_2.ee (default) the client doesn't want log in , out every time he/she needs create content both sites. site running on wordpress , right russian version of site can viewed typing in: domain_name_2.ee/ru nb! domain names hosted @ 2 different web hosts. domain_name_1.ru web hosts options 1) redirect domain 2) change name servers because of this, i'd know if possible run both sites on 1 wordpress install , using .htaccess can domain name domain_name_2.ee/ru masked domain_name_1.ru when user visits site? the way want setup domain_name_1.ru domain use domain_name_2.ee/ru directory document root (can using virtual host , documentroot directive). otherwise you'll have use mod_proxy, , ensure it's loaded, , reverse proxy request other domain: rewriteengine on rewritecond %{http_host} ^(www\.)?domain_name_1\.ru$ [nc] rewriterule ^(.*)$...

vb.net - Specifying default array values in an optional array parameter -

optional parameters require default values, yet can't seem assign default array optional array parameter. example: optional byval myarray long() = nothing ' works however optional byval myarray long() = new long() {0, 1} ' isn't accepted. the ide tells me "constant expression required" in place of new long() {0, 1} . is there trick assigning default array of constants, or not allowed? it not "constant expression", expression can entirely evaluated @ compile time , produces single simple value can stored in assembly metadata. used, later, in other code makes call. optional values retrieved @ compile time, not runtime, strictly compiler feature. the new operator must executed @ runtime , requires code so. , therefore not constant expression. simple workaround use nothing , put code in method body: sub foo(optional byval myarray long() = nothing) if myarray nothing myarray = new long() {0, 1} '' etc... en...

HTML5 Sequence of grouping header and article -

i got question grouping headers article. of following more suitable , practice? should group both h1 , h2 in header element put inside article element, or; group h1 , h2 first go article element? the specification says, of <header> element: the header element represents introductory content nearest ancestor sectioning content or sectioning root element...when nearest ancestor sectioning content or sectioning root element body element, applies whole page. if not put them within sectioning content, may misinterpreted. place them within sectioning content; in case, <article> element.

java - JFrame, leaves trail of rectangle -

i'm trying create game. , everytime move, it's leaving trail code: package lt.mchackers.gametest.main; import java.awt.color; import java.awt.graphics; import java.awt.insets; import java.awt.event.keyevent; import java.awt.image.bufferedimage; import java.io.bufferedreader; import java.io.file; import java.io.filenotfoundexception; import java.io.filereader; import java.io.ioexception; import javax.imageio.imageio; import javax.swing.jframe; import lt.mchackers.gametest.handlers.inputhandler; /** * main class game */ public class main extends jframe { private static final long serialversionuid = -828018325337767157l; boolean isrunning = true; int fps = 30; int windowwidth = 320; int windowheight = 320; int speed; bufferedimage backbuffer; insets insets; inputhandler input; int x = 0; int y = 0; int xa = 0; int ya = 0; coordinates coords = new...