Posts

Javascript Canvas one item flickering -

i trying make objects move towards each other in canvas, when meet , overlap 1 should disappear , other should fall down. got animation that, 1 of items flickering. <!doctype html> <html> <head> <style> canvas{border:#666 3px solid;} </style> </head> <body onload="draw(530,15); draw1(1,15);"> <canvas id="canvas" width="600" height="400"></canvas> <script> function draw(x,y){ var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.save(); ctx.clearrect(x, y, 600, 400); ctx.fillstyle = "rgba(0,200,0,1)"; ctx.fillrect (x, y, 70, 50); ctx.restore(); x -= 0.5; if(x==300) { return; }; var looptimer = settimeout('draw('+x+','+y+')',5); }; function draw1(w,e){ var canvas = document.getelementbyid('canvas'); var ct...

ASP.NET Core System.TypeLoadException DependencyInjection.Extensions.ServiceCollectionExtensions error -

i new asp.net core. while creating simple mvc project got following error. system.typeloadexception not load type 'microsoft.extensions.dependencyinjection.extensions.servicecollectionextensions' assembly 'microsoft.extensions.dependencyinjection.abstractions, version=1.0.0.0, culture=neutral, publickeytoken=adb9793829ddae60'. @ microsoft.extensions.dependencyinjection.optionsservicecollectionextensions.addoptions(iservicecollection services) @ microsoft.extensions.dependencyinjection.mvccoreservicecollectionextensions.addmvccore(iservicecollection services, action setupaction) @ microsoft.extensions.dependencyinjection.mvcservicecollectionextensions.addmvc(iservicecollection services, action setupaction) @ poc.startup.configureservices(iservicecollection services) system.reflection.targetinvocationexception exception has been thrown target of invocation. @ system.runtimemethodhandle.invokemethod(object target, object[] argume...

codeigniter 2 - I added cron from cpanel in codeignitor thats not working -

i tried add cron job cpanel below url every minutes , added command /usr/local/lib/php /home/bestofwo/public_html/index.php pilots/rouwadvertenties rouwmediaapi importtest similar below /usr/local/bin/php -f /home/{cpanel_user}/public_html/index.php controller function but cron not running...how can check cpanel ? please suggest try redirect cron output in log file , check if there error cron. /usr/bin/php -q /home/{cpanel_user}/public_html/index.php >> cron.log

php - The result of $_GET is getting corrupted -

i working on password system, email sent , have click on link go page password reset. there information in link encrypted, , supposedly de-encrypted on other side. here example http://www.somewebpage.com?p=8e428904890e31a93c563e1f18c11ff6&c=u2fsdgvkx1+ldnfkzczxragpyya9mgzahauh/wlj3t4= now use $_get['c'] encrypted data. decrypt using decrypt code. now here problem if works decrypt($key,"u2fsdgvkx1+ldnfkzczxragpyya9mgzahauh/wlj3t4="); and gives me original text. but if this. doesn't work decrypt($key,$_get['c']); it gives me mangled characters. the question why doesn't encrypt routine work when user $_get['c'] , works if put string in directly. is web url adding hidden characters or something? if can strip added. the encrypt data contain character not pass through browser correctly. when generate key try use function urlencode() echo '<a href="mycgi?foo=', urlencode($encryptdata), '...

c - Force minimum size of linker script section -

i have set of linker script sections interrupt vector table. sections located in ram , loaded ram code. each vector must @ absolute location, there separate section (and separate memory region) each vector. some vectors may not used application, whilst others will. ensure copy code still works need make sure that, if vector not present, equivalent space in rom (two bytes) filled. tried advancing location pointer of course affects vma , doesn't me @ all. how can ensure section takes required amount of space in rom? i.e. how can move lma on if there no data in section? any hints or tips appreciated. i have abridged current linker script below: output_arch(msp430) entry(_start) memory { rom (rx) : origin = 0x9c02, length = 0x61fe vect1 : origin = 0x5b80, length = 0x0002 vect2 : origin = 0x5b82, length = 0x0002 ... vect63 : origin = 0x5bfc, length = 0x0002 } sections { __interrupt_vector_1 : { __vectable_load__...

Write a query join sum groupby in laravel -

please me write query. have 2 table: "projects" , "debts" "debts" table have id | project_id | currency_list | total 1 | 1 | 1 | 1000 2 | 1 | 2 | 500 3 | 2 | 1 | 1000 4 | 2 | 2 | 500 ... i need write query take 1000 rows projects , sum "total" group "currency_list" thanks lot :) hey tried hope working :) first should have tow models tables in project model call public function debts(){ return $this->hasmany('app\debt','project_id')->selectraw('debts.*,sum(total) sum')->groupby('currency_list'); } and call in controller $projects = project::with('debts')->get()->toarray(); check dd($projects) array edit : use in controller function $projects = db::table('projects') ->join('debts', 'projects.id', '=', ...

java - Passing parameters in MultiJob Project Jenkins -

Image
i try pass parameter maven profile in multijob project unfortunately jenkins doesn`t see , execute: 'mvn clean install $profile'. know solution? you can specify maven command clean install -dprofile=dev here "profile" parameter , "dev" value.