Posts

Showing posts from April, 2015

java - How avoid calling setApplicationContext on a Spring -

i'm setting spring mvc project thymeleaf, following tutorial at: http://www.thymeleaf.org/doc/tutorials/3.0/thymeleafspring.html#spring-mvc-configuration trying kiss code, first replaced implements applicationcontextaware , setter method @inject private applicationcontext applicationcontext . don't understand why have call setapplicationcontext() on springresourcetemplateresolver while inherits spring interface applicationcontextaware . how avoid this? edit: if remove templateresolver.setapplicationcontext(applicationcontext); line, exception when accessing root: java.lang.illegalargumentexception: application context cannot null org.thymeleaf.util.validate.notnull(validate.java:37) org.thymeleaf.spring4.templateresource.springresourcetemplateresource.<init>(springresourcetemplateresource.java:64) org.thymeleaf.spring4.templateresolver.springresourcetemplateresolver.computetemplateresource(springresourcetemplateresolver.java:69) org.thymele...

In javascript, how do you search an array for a substring match -

i need search array in javascript. search part of string match string have addtional numbers assigned it. need return matched array element full string. i.e. var windowarray = new array ("item","thing","id-3-text","class"); i need search array element "id-" in , need pull rest of text in element (ie. "id-3-text" ). thanks in specific case, can boring old counter: var index, value, result; (index = 0; index < windowarray.length; ++index) { value = windowarray[index]; if (value.substring(0, 3) === "id-") { // you've found it, full text in `value`. // might grab , break loop, although // having found depends on // need. result = value; break; } } // use `result` here, `undefined` if not found but if array sparse , can more efficiently properly-designed for..in loop: var key, value, result; (key in windowarray) { if (wind...

javascript - Create PDF from HTML using positionning (client side) -

i use html2canvas print piece of html/css page image. able same pdf picking multiple divs of page , positioning them pdf before download user. want done on client side only, using javascript functions. basically generate a4 pdf , place divs everywhere want in it. can think of possible solution such thing? i have found doesn't allow positionning : how use html2canvas , jspdf export pdf in proper , simple way thank help. kind regards.

vb.net - visual basic function discounts 1 and 2 -

i'm working on code class , i'm having trouble function part. i have this. need function accepts subtotal , calculates discount using subtotal > 200 discount of 1% subtotal > 100 discount of .5% i struggling functions , need if point me in right direction please , thank you. public class form1 const consthandwashprice decimal = 10d const constinteriorshampooprice decimal = 30d const constcarwaxprice decimal = 25d const constengineshampooprice decimal = 15d const constinteriorvacuumprice decimal = 16d const constoilchangeprice decimal = 34.95d const construstproofingprice decimal = 89.99d const consttirerotationprice decimal = 15d const constalignmentprice decimal = 63.88d const constfrontbrakesprice decimal = 75.66d const constrearbrakesprice decimal = 78.9d dim discount decimal dim total decimal dim subtotal decimal dim customername integer dim address integer private sub cbservices_selectedindexc...

Accelerated Swipe Carousel with jquery -

i wanna make carousel can accelerated on swipe. etc. if swipe right strong, carousel should pass 3-4 items @ once. if swipe smooth, should pass one. i've example in link: http://share.framerjs.com/huta4gmn918t/ i'm using owl carousel, prefer make on owl carousel. if can me on others, no problem me. thanks.

mysql-python-replicator binlog start pos for specific schema -

i'm using mysql-python-replicator dump data mysql specific database ,so can create binglogstream parameters only-schema: stream = binlogstreamreader(connection_settings=mysql_settings, server_id=1,only_schemas='tpch', log_file='mysql-bin.000001',log_pos=1 ) i have parameters log_file='mysql-bin.000001' ,and log_pos=1 ,because have no idea event position start,so ideas find start event position database in mysql-binlog ? guessing first binlog position won't work. file , position might not exist on server because mysql automatically rotates logs based on configuration. the library internally knows how start beginning. leave out 3 parameters needed resuming (or set them false / none): if binlog_filename none or binlog_position none: # connecting mysql binlog (from beginning)... binlog_stream = binlogstreamreader( connection_settings=m...

c# - Change Visual State in Animation/Timeline -

Image
i have different controls , want animate them. don't want have "fade" effect. should change color immediately. if make animation, there fade effect. made (for beginning) 3 visualstates. after 0.5s should change next 1 (vs1 -> vs2 -> vs3). change state on timeline not work. can please give me hint how this? visual state 1 visual state 2 visual state 3

metatrader4 - Why is an information in my printf() function incorrect in MQL4? -

Image
my print formatting giving me random answers, despite coding being correct. i'm trying display candle bar lengths of previous 2 candle bars prior trade entry. here coding i've used. pcl1 & pcl2 relevant field entries. divided _point give integer formatting. pcl2 = previous candle stick length, shift 2 pcl1 = previous candle stick length, shift 1 in example have focused on shift2 candlestick short_bull_2_close = iclose( symbol(), 0, 2 ); short_bull_2_open = iopen( symbol(), 0, 2 ); candlebody_2 = ( short_bull_2_close - short_bull_2_open ); // gives candlebody length in pips. and printf() coding: printf( "pcl1 [%d] pcl2 [%d]", candlebody_1 / point, candlebody_2 / point ); // ___________________________________________________________ sell// however, pictured & highlighted.. 1) mql4 strong typed language ( declaration precedes use of variable ) + mql...

sagepay - ReferrerId too short -

referrerid on sagepay documentation definited not mandatory, receive error 'referrer id short'. tried pass null or valorized vendor name received same error in both cases. anyone knows why , how resolve problem? using prolcol 3.00 , error on sagepay test environment. remove string completely. if field submitted sage pay try validate it's contents , return error if doesn't meet requirements. referrerid used validate sage pay partner has referred sage pay user.

How to display a javascript File object in Chrome's PDF viewer with its name? -

Image
i've got pdf file in form of blob object (generated jspdf ), want display in <iframe> element. i can way: iframe.src = url.createobjecturl( blob ) the pdf rendered correctly esoteric string in place of name (see image below of chrome's pdf viewer). so tried convert blob file object in order give human-readable name. var file = new file( [blob], 'a_name.pdf', { type: 'application/pdf' } ) iframe.src = url.createobjecturl( file ) it works firefox: name kept when saving file header's pdf viewer. unfortunately dropped in chrome , replaced random file name before being loaded in pdf viewer. do know if possible display pdf file object in <iframe> file name? you can set title of pdf generated jspdf setproperties method: var doc = new jspdf(); doc.setproperties({ title: "this title" }); ... that title displayed in pdf viewer in chrome. can test in live demo page.

php - Loading detail from database with ajax -

i'm trying simple yet can't make work , have no idea why. i'm trying load details on bootstrap modal windows database can edit them. button looks like <button onclick="getuserdetails('.$row['row_id'].')" class="btn btn-warning">update</button> then php part should load data include("../../misc/database.inc.php"); error_reporting(e_all); ini_set('display_errors', 1); $pdo = database::connect(); $pdo->setattribute(pdo::attr_errmode, pdo::errmode_exception); if(isset($_post['row_id']) && isset($_post['row_id']) != "") { $row_id = $_post['row_id']; $value = $pdo->prepare('select row_id, row_content, row_email excel_table row_id = ?'); $value->bindparam(1, $id, pdo::param_int); $value->execute(); $response = array(); if($value->rowcount() > 0){ while ($rs = $value->fetch(pdo::...

java - Retrying Android Socket connect on timeout -

i'm using socket connect server. i'm having variable time-outs depending on options i'm executing. want able retry "connect" method @ least 3 times before informing client connection couldn't opened. i've try wrapping "connect" method in try/catch , recalling "connect" when exception catch "sockettimeoutexception" hasn't worked. know answer involves putting whole process inside for/while loop, can't seem figure out how. any help? something this, maybe: private void dosomething() { socket socket = null; (int = 0; < 3; i++) { try { socket = connecttoserver(); break; } catch (ioexception e) { // log exception, // show message user, // etc. } } if (socket != null) { // ok } else { // not connect server. } } private socket connecttoserver() throws ioexception { // ret...

neo4j - can not do sorting and pagination on SpringDataNeo4j 4.2 M1 (Ingalls) -

Image
i need pagination , sorting on custom queries in sdn 4. upgraded sdn latest available release : version 4.2 m1 (ingalls) , based on ticket issue fixed in version. when try sorting or pagination throws exception saying : org.neo4j.ogm.exception.cypherexception: error executing cypher; code: n/a; description: unable convert org.springframework.data.domain.pagerequest neo4j value. this code use : pageable pageable = new pagerequest(0, 3, sort.direction.desc, "name"); owners = ownerrepository.getownersbyfacetgroupid(facetgroupid, pageable); and repository query : public interface ownerrepository extends neo4jrepository<owner> { @query("match (n:owner)-[r:has]-(c:facet_group) id(c)={0} return n") list<owner> getownersbyfacetgroupid(long id , pageable pageable);} and final request neo4j uses: request: match (n:owner)-[r:has]-(c:facet_group) id(c)={0} return n order n.name desc params {0=9275402, 1={sort=[{direction=desc, property=n....

vb.net - WebBrowser.DocumentText Property in WPF -

i have browser control, feeted text & plots etc. looks fine in browser control. now want export browser content word file can exported pdf/html/doc etc this works fine windows forms. use webbrowser1.documenttext property , write file etc. command: (system.io.file.writealltext(tempfilename, webbrowser1.documenttext) unfortunaley webbrowser.documenttext property no more available in wpf. how can solve problem ? here´s code forms: imports system.drawing imports microsoft.office.interop.word imports system.windows.forms imports system.io private sub button4_click(sender object, e eventargs) handles button4.click ' save document html, mhtm (embedded), document or pdf if dlgsavedoc.showdialog = system.windows.forms.dialogresult.ok ' create temp file of web browser document dim tempfilename string tempfilename = system.io.path.gettemppath() & "\" & now.tostring().replace(":", "...

sql - How can I pass dynamic cursor into temporary table? -

my temporary table is- begin stmt := create local temporary table fmo_app.dynamicsql(engine_family_code varchar2(30 byte), contract_name varchar2(200 byte) not null enable, contract_seq_id number(9, 0) not null enable, usage_month varchar2(10 byte), invoice_num varchar2(14 byte) not null, invoice_amt number(15, 2), invoice_billing_date date, created_date date, billing_invoice_type varchar2(255 byte), efh number(11, 3), ec number(9, 0), cancelled_invoice_num varchar2(14 byte), restored_esn varchar2(12 byte), ...

excel - Changeing date type with PHP -

i need help. here's code: $date_depo = date('d-m-y', strtotime($date_depot)); so in excel table have => 2 nov 16 00:00:00 , code changes => 02-11-2016 but if have 10 mai 13 00:00:00 changes 01-01-1970 means value 0 or that, how can change => 10-05-2013 edit: setlocale (lc_time, 'fr_fr.utf8','fra'); $date_depo = strftime('%y-%m-%d', $date_depot); doesn't work thanks in advance! $trans = array('janv' => 'january ','févr' => 'february','mars' => 'march ','avr' => 'april','mai' => 'may','juin' => 'june','juil' => 'july','août' => 'august','sept' => 'september','oct' => 'october','nov' => 'november','déc' => 'december'); $resulat= strtr($date_depot,$trans...

python 2.7 - Question marks in Flask Urls for routing -

this question has answer here: how data received in flask request 8 answers so have route in flask follows: @app.route("/menu-card/<google_place_id>", methods=['get']) on navigating http://127.0.0.1:5000/menu-card/chijaxxhiumurjsr5qoqvsqjcci , proper response. however tried changing url pattern follows: @app.route("/menu-card?id=<google_place_id>", methods=['get']) on navigating http://127.0.0.1:5000/menu-card?id=chijaxxhiumurjsr5qoqvsqjcci , 404 error.what doing wrong ? the part after ? query string, can using request.args. route should @app.route("/menu-card", methods=['get']) and can id using: google_place_id = request.args.get('id', none) where none default value if id not included in url. you'll have check if it's not equal none make sure has been pas...

angularjs - Spring Security + Angular JS + CORS issue - Error XMLHttpRequest cannot load http://localhost:8080/user. Response for preflight is invalid (redirect) -

note: have omitted http:// in links doesnt allow me post more 2 urls yet. i have angular ui served out of localhost:5000. have rest apis served out of localhost:8080. authenticate on rest api server using facebook oauth2. subsequently, want access /user endpoint on server authenticated. for example purpose here, refer spring sample in github.com/spring-guides/tut-spring-boot-oauth2.git. have modified code github example. i followed blog post , added filter follows @configuration public class myconfiguration { @bean public filterregistrationbean corsfilter() { urlbasedcorsconfigurationsource source = new urlbasedcorsconfigurationsource(); corsconfiguration config = new corsconfiguration(); config.setallowcredentials(true); config.addallowedorigin("http://localhost"); config.addallowedorigin("http://localhost:5000"); config.addallowedheader("*"); config.addallowedmethod("*...

c# - What's the best strategy to do a "update .. where" in Google Sheet using their API? -

i have table on google spreadsheet, , c# application needs update cells based on content of first column(s), similar "update ... ..." in sql. so far, current method clears sheet , adds rows again, not appropriate if users want add more columns manually table, , not find on sheets' .net library allow such thing, i'm wondering if there better strategy this. perhaps content of sheet object, modify in code , update sheet? i'm trying avoid because such heavy operation big table.

css - Are font family names which contain hyphens identical to the same font names with spaces instead of hyphens? -

after poking around many stylesheets different websites, have consistently noticed font or font-family values used not appear use correct font-family names. wondering if don't understand how reference font family names used css. for example, on this stylesheet , authors use following several times: font-family:"minion-pro"; however, far google tells me, no such font family exists. example, if google following: font minion-pro none of first several hits show "minion-pro", rather hits "minion" or "minion pro"; fifth hit this link , far understand css, requires user reference font as font-family: "minion pro"; i have seen on stylesheets font "myriad pro" which, when google font myriad-pro , return hits font "myriad" , "myriad pro". is, in css stylesheets, have seen this font-family: "myriad-pro"; but me, not correct, , should be font-family: "myriad pro"; so si...

excel - How can I get PivotTable Row and Column labels to change from their default value using Aspose Cells? -

i creating row , column pivot fields so: pivottable.addfieldtoarea(aspose.cells.pivot.pivotfieldtype.row, description_column); pivottable.addfieldtoarea(aspose.cells.pivot.pivotfieldtype.column, monthyr_column); this works, uses generic text labels, "row labels" , "column labels." want provide own labels replace those. using excel interop, can follows: // changes label "column labels" pivottable.compactlayoutcolumnheader = "months"; // changes label "row labels" pivottable.compactlayoutrowheader = "description"; i can't use excel interop of these reports, though, because slow converting large amounts of data pivottable makes sloths cheetahs , molasses appear moving @ speed of light. literally took several hours generate excel interop took 21 minutes using aspose cells. so equivalent of "compactlayoutcolumnheader" in aspose cells? makes intent little clearer (who think "compactlayoutcolumnheader...

ember.js - REST-API HTTP status code for invalid input on a Patch request -

there patch request on application updates user's password. have ember validator block invalid input except 1 business rule, should not password used 1 of past 5 passwords. we returning 400 bad request in case, company has dashboard component availability , counts 400 , 500 requests unavailability, because applications soap , expect 200 , 300s. though handle 400 appropriately through ui still ding against us. , puts on radar area poor availability. should take people monitor availability , have them change rest services become more common , common occurrence company creates more rest applications. or cave , return 200 states password not updated? i argue 400 response inappropriate service. if service responding 400 when user's password has been repeated within last 5 passwords, request was understood server. according w3c : the request not understood server due malformed syntax. client should not repeat request without modifications. in case, re...

listview - Android: how to save ArrayList items even if app shutdown? -

i developing app in have show installed applications in listview checkboxes.whenever user selects checkbox list application info object (corresponding checked checkbox) added global class variable (arraylist added_apps). succeed in doing so. problem whenever exits app of items user added added_apps arraylist not saved. have again add items in arraylist proceed further. have tried far , here code not work. code displaying installed application , added global class variable added_apps arraylist on checkboxclick listener: mainactivity.xml: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" tools:context="com.example.pc.fkidshell.teen3activity"> <listview android:id="@android:id/list" android:l...

android - Sqlite ArrayList<Float> query run with AsyncTask -

i trying create chart app , having trouble load data chart. gives me out of memory error. have been trying have sqlite query run in background thread using asynctask. tried not able create correctly. post code here , hope can me on this. many thanks!!!! here error message: java.lang.outofmemoryerror: failed allocate 103059952 byte allocation 4194304 free bytes , 53mb until oom @ java.util.arraylist.add(arraylist.java:118) here part of code provide me data source. pulling data sqlite database. query works. tested. need write code run query in background thread asynctask. public arraylist<float> ydata(){ arraylist<float> ynewdata=new arraylist<float>(); sqlitedatabase db=this.getreadabledatabase(); string sql="select sum("+ tabledata.tableinfo.col_s4_amt+") monthpiechartcategoryvalues,c."+ tabledata.tableinfo.col_c2_description+...

javascript - Blackbox by pattern in Google Chrome -

Image
i trying blackbox code on website has word "jquery" in it. there many files on site phrase such as: jquery.js, jquery-ui.min.js, jquery-migrate.min.js, etc... i've found many articles on internet showing how this, outdated , show older versions of google chrome. here 2 articles google developers: https://developer.chrome.com/devtools/docs/blackboxing#how-to-blackbox https://developers.google.com/web/tools/chrome-devtools/javascript/step-code#blackbox_third_party_code these great articles google, both show different ways this. i running windows 10 , chrome version 54.0.2840.99 m (64-bit) , settings panel has neither of these options. can please tell me how can find new blackbox pattern interface? i can't figure out how blackbox script version 54 either. my chrome canary version 57 has blackbox tab on settings panel works:

unity3d - Unity UI Text with markup tags - "String too long for TextMeshGenerator" -

i have text ui component in have 20 lines of 100 character long columns. works fine. if try enclose each character inside <color> </color> tags give them different colors, following error messages: string long textmeshgenerator. cutting off characters. argumentexception: mesh can not have more 65000 vertices i don't understand why tags count towards character limit, or why increase number of vertices. what best way solve this? using unity version 5.4.1f1. i believe unity uses 4 vertices/2 triangles per character, , rich text effects , outline/shadow effects duplicate geometry when applied (i using outline , on text.text , can too-many-vertices message much, smaller strings 20x100 chars). my use case scrolling activity log, different case. solutions people have suggested issues: use "paging" system instead of by-line-scrolling, limited amount of text displayed @ given time remains accessible use 3rd-party solution textmesh...

eventsource - PHP and events - flush to client does not happen until the script dies -

i trying create simple page sends events web page cannot php send output before page terminates. i using php-fpm , php5.6.27. this simple html page: <html> <head> <title>test events</title> </head> <body> testing events <ul id="pingeventlist" style="float: left"></ul> <ul id="messageeventlist" style="float: left"></ul> <script> var evtsource=new eventsource("./s_events.php?auth=e3b164ef33d802c45da829b8f1240d16"); var pingeventlist=document.getelementbyid('pingeventlist'); var messageeventlist=document.getelementbyid('messageeventlist'); evtsource.onmessage=function (e){ var newelement=document.createelement("li"); newelement.innerhtml="message: "+e.data; messageeventlist.appendchil...

Extracting Excel to text on Linux server -

i’ve been struggling converting *.xls files generated instrument text format on linux server. i’m unable process files spreadsheet::parseexcel, unless, manually open them, sign off on security warning , save them. otherwise, not recognized excel (tested sample code). !/usr/bin/perl -w use strict; use spreadsheet::parseexcel; $parser = spreadsheet::parseexcel->new(); $file = "/data/excel/matrix.xls"; $workbook = $parser->parse($file); if ( !defined $workbook ) { print "can't find workbook!!!"; die $parser->error(), ".\n"; } $worksheet ( $workbook->worksheets() ) { ( $row_min, $row_max ) = $worksheet->row_range(); ( $col_min, $col_max ) = $worksheet->col_range(); $row ( $row_min .. $row_max ) { $col ( $col_min .. $col_max ) { $cell = $worksheet->get_cell( $row, $col ); next unless $cell; ...

javascript - Why is `@input` decorator preferred over `inputs:[]` -

there 2 ways define input on component: @component({ inputs: ['displayentriescount'], ... }) export class mytable implements oninit { displayentriescount: number; and this @component({ ... }) export class mytable implements oninit { @input() displayentriescount: number; i assume first approach better since explicitly declares component's dependencies without need inspect complements class. however, this article renowned developer states second approach preferable: using @input preferred approach, don’t have use it. any ideas why? per angular style guide https://angular.io/docs/ts/latest/guide/style-guide.html#!#-a-id-05-12-a-decorate-input-and-output-properties-inline decorate input , output properties inline do use @input , @output instead of inputs , outputs properties of @directive and@component` decorators: do place @input() or @output() on same line property decorate. why? easier , more readable iden...

sql server - Select returns no rows - queries in trace file -

Image
i imported trace file using select * trace_table ::fn_trace_gettable('c:\my_trace.trc', default) while analyzing imported trace file noticed select statements take significant amount of time (duration) , cpu @ end not return rows ( rowscount == null ). select textdata, clientprocessid, eventclass , duration, starttime, endtime , reads, writes, cpu, rowcounts , eventsequence, textdata_md5_hash , applicationname, spid myimportedtrace textdata_md5_hash in (0x4a943f266010bdd2a47179dc3481bc7f) order spid, starttime, eventsequence example test in query window if copy same query textdata -field query window lot of rows (>200000) questions what might reason query did not return rows? was query terminated ? how recognize failed query executions in trace file? update / edit after answer accepted this query use mydatabase select ti.eventclass, te.eventname, count(*) countasterisk , sum(ti.rowcounts) rowc...

c++ - How to use lower_bound(upper_bound) to find position of any number in array? -

for example, have array elements 1,7,9,23,34,47,67,89,123,234,345,567. need know position of 123. declare , initialize array elements. create vector of ints. use upper_bound() on vector . here example: #include<iostream> #include<algorithm> #include<vector> using namespace std; int main() { int arr[] = {1,7,9,23,34,47,67,89,123,234,345,567}; int len = sizeof(arr)/sizeof(arr[0]); vector<int> v(arr,arr+len); vector<int>::iterator upper; upper = upper_bound(v.begin(), v.end(), 123); cout<<(upper-v.begin())<<endl; // output: 9 return 0; } hope helps!!

sql - Sum between specific dates -

i trying modify existing query add(sum) total amount of hours during week , push data table if on 40. novice when comes sql , have no idea @ point how implement formula. side note syntax checkers can use help? have modify. select dbo_associates.firstname , dbo_associates.lastname , dbo_events.date , sum(dbo_events.amount) sumofamount ( dbo_events inner join dbo_associates on dbo_events.associateid = dbo_associates.id ) inner join dbo_categories on dbo_events.categoryid = dbo_categories.id ( ( (dbo_categories.name) <> "sub-contractor" , (dbo_categories.name) <> "invoice" , (dbo_categories.name) <> "receipt" , (dbo_categories.name) <> "equipment" , (dbo_categories.name) <> "meetings" , (dbo_categories.name) <> "comp time" , (dbo_categories.name) <> "tra...

Is there a command key to editing the PR description on Github? -

Image
command-keys seem exist of major github processes, cannot fid 1 re-entering description-edit panel pr.

github - Unable to update composer in a Symfony project -

i imported symfony project github intellij idea. used usual method : https://www.jetbrains.com/help/phpstorm/2016.2/cloning-a-repository-from-github.html now want update composer , start working. when type command line : composer update i got error : your configuration not allow connections http://packagist.org/packages.json... and can't continue. please i'm wrong ? newer versions of composer not allow connections via unsecured http anymore default: defaults true. if set true https urls allowed downloaded via composer. if absolutely need http access can disable it, using let's encrypt free ssl certificate better alternative. source to resolve this, make sure use https connect repositories, or change composer config.

c# - Using Async with WebAPI2 and Entity Framework 6 with .Net 4.6 -

i had set controller , service layer not use async , task originally. updated code (below). correct way use async, task, , await? code benefit long term number of users grow? controller: public async task<ihttpactionresult> all() { var warmup = await _warmupservice.getallasync(); if (warmup != null) return ok(warmup); return notfound(); } the controller calls method in service layer: public async task<warmup> getallasync() { return await task.run(() => getwarmup()); } getwarmup() (also in service) makes db call using ef6: private warmup getwarmup() { var warmup = new warmup(); var factorytools = _db.factorytools.select(tool => new { tool.factory }); } it not best way it. if can, avoid using task.run when underlying code provides task or task<t> can await. instead of using task.run in piece of code public async task<warmup> getallasync() { return await task.ru...