Posts

c++ - Unable to stop a windows service with net stop command -

i have created windows service running fine doing following. sc_handle hservice = ::createservice(*m_serviceconfig, // scm database name.c_str(), // name of service displayname.c_str(), // service name display service_all_access, // desired access service_win32_own_process | service_interactive_process, // service type (interactive debug) service_auto_start, // start type service_error_normal, // error control type path.c_str(), // path service's binary nullptr, // no load ordering group ...

asp.net mvc - Http Request Timeouts on Azure Web Apps -

we have collection of mvc 5 websites running on azure cloud hosting platform. have several different versions of environment these websites run (development, staging, production), , experiencing difficult troubleshoot issue. seems that, intermittently, when request made production environment, request rejected, or file served point of server timing out , aborting request. seems occur in production environment, , not appear happen in development or staging. given our websites started receiving traffic, production environment lesser used in case, not matter of machine being out of resources. also, have capability monitor resources of machine through web ui, , not see issues here. when configuring these systems, not have ton of control on how set up. end, it's unlikely there configuration difference between them, setup (presumably) image, , configured through web ui. settings on these systems same between them far can tell. ensure not issue of configuration of machine, have mi...

Can spring data couchbase be used to access reduced views -

i know there way access reduced view results using couchbase java sdk. unable use spring-data access reduced view. possible? view: view byidgetdatestats = defaultview.create("byidgetdatestats", "function (doc, meta) {" + "if(doc.doctype == \"com.bd.idm.model.daylog\"){" + " emit(doc.userid, doc.date)" +" }}" ,"_stats" ); when attempt use spring-data access view this: query query = new query(); query.setkey(complexkey.of(userid)).setreduce(true).setgroup(true); viewresult result = repo.findbyidgetdatestats(query); error message java.lang.illegalstateexception: failed execute commandlinerunner ... caused by: java.lang.runtimeexception: failed access view ... caused by: java.util.concurrent.executionexception: operationexception: server: query_parse_error reason: invalid url parameter 'group' or 'group_level...

Capture Screen in libGdx -

i want capture screen in libgdx . use code problem. on desktop work . when run on android , can't find image capture screen. how can fix it? reading question. public class screenshotfactory { private static int counter = 1; public static void savescreenshot() { try { filehandle fh; { if (gdx.app.gettype() == applicationtype.desktop) infor.linkscreenshot = "d://chupngoc" + counter + ".png"; else infor.linkscreenshot = gdx.files.getexternalstoragepath() + counter + ".png"; infor.nameimage = counter + ".png"; fh = new filehandle(infor.linkscreenshot); counter++; } while (fh.exists()); pixmap pixmap = getscreenshot(0, 0, gdx.graphics.getwidth(), gdx.graphics.getheight(), true); pixmapio.writepng(fh, pixmap); pixmap.dispose(); } catch (exception e) { ...

excel vba object required error when copying from one workbook to another -

does know why: set wb = workbooks.open(url) worksheets("mf in rates").range("c8:p8").copy destination:=workbooks("dashboard_final.xlsm").worksheets("hist cof").range(cells(current.row, 4), cells(current.row, 17)) would give me object required error? url valid , mf in rates valid sheet in opened spreadsheet. have give more specific filepath dashboard_final.xlsm though macro in work book?? for troubleshooting long references this, break them down individual lines , step through it. if write code this, able determine error is: dim obook workbook dim osheet worksheet dim orange range dim vcell1 variant dim vcell2 variant vcell1 = cells(current.row, 4) vcell2 = cells(current.row, 17) set obook = workbooks(dashboard_final.xlsm) set osheet = obook.worksheets("hist cof") set orange = osheet.range(vcell1, vcell2)

html - CSS - Curved Corner after using border-left and border-bottom -

Image
i have used border-left , border-bottom create sort of 1 sided parallelogram shape bootstrap navbar, need right side curved while keeping left side transparent. current outcome: wanted outcome: i have tried using border-top-right-radius nothing happens: .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; height: 20px; width: 100px; border-bottom: 50px solid rgba(58, 162, 178, 0.5); border-left: 50px solid transparent; /* tried */ border-top-right-radius: 2em; } i have made jsfiddle here: http://jsfiddle.net/6qfbhxty/ in example blue bar bottom border. won't work because can't give "end" of border curved look. you try apply blue color background , use :before create triangle. please notice apply same color background , border! body { background-image: url("http://lorempixel.com/800/800/abstract"); background-attachment: fixed; ...

python - Does precondition assertion testing replace assumptions in a function specification or vice versa? -

i'm confused when use assertion testing in python functions. if specify assumptions regarding input arguments function, should assume correct input being fed function or should use assertions check conditions on input args enumerated in specification? if you're writing "public" function, believe pythonic way check arguments (using if , not assert ), and, if they're invalid, raise exception type , info / message designed provide info possible. if you're writing function designed internal use, using assert check arguments seems idea me.