Posts

Showing posts from February, 2012

asp.net mvc - Umbraco + mvc page redirect with data -

Image
i want redirect other umbraco page model data. currently redirecting other umbraco page not model data. public actionresult cnoreplacement(masterviewmodel model) { viewbag.testdata = "testing viewbag data passing !!"; return redirecttoumbracopage(1098); } even have tried passing viewmodel not working. [httpget] public actionresult aaa() { gamemodel model = new gamemodel() { id = 10 }; return redirecttoaction("bbb", "game", model); } public actionresult bbb(gamemodel model) { return view(); } >

java - Sorting data based on column in javafx using handler -

how call sort function without clicking on column header? when clicking on table header, records getting sorted. want sort records without clicking on table header. possible add handler column header, if handler need call. you can modify the sortorder of tableview , use the sorttype property of tablecolum . example element type public class element { private final string a; private final string b; public element(string a, string b) { this.a = a; this.b = b; } public string geta() { return a; } public string getb() { return b; } } constructing tableview tableview<element> tv = new tableview<>(fxcollections.observablearraylist( new element("a", "a"), new element("a", "b"), new element("b", "a"), new element("b", "b"))); tablecolumn<element, str

ios - How to prevent using cache when new data is available? -

i'm caching data in coredata within app reduce updating request when there's nothing new. here's caching logic in pseudo code: if cacheexistsincoredata { if cacheisoutdated { loaddatafromremoteandcacheitwithcurrentdate() }else { usecache() }else { loaddatafromremoteandcacheitwithcurrentdate() } how check if cache outdated: func checkifcacheisoutdated { if lastcacheddate isorderthan selfdefinedcheckingdate { return true // need load new data }else { return false // use cache } } this mechanism works fine time. while in rare situation find program caches wrong data right date, means user might see older data , not update when new 1 available. if there's nothing wrong caching logic, wonder if reason when remote data fetched app before gets updated , gets stored in core data latest date time. a cache in core data includes: data(provided remote server) //nothing can it... date(provided me using nsdate()) how can

Let's encrypt certificate, Python and Windows -

i changed webserver http https "let"s encrypt" . webserver contains api, , have python application, uses api. under linux fine, under windows receive below, when i'm logging in. [ssl: certificate_verify_failed] certificate verify failed (_ssl.c:590) my thought was, ssl certificate isn't installed. so downloaded "isrgrootx1.der" , "lets-encrypt-x1-cross-signed.der" renamed both ending "*.cer". then opened windows console, , run this: certutil -addstore "root" "isrgrootx1.cer". certutil -addstore "root" "lets-encrypt-x1-cross-signed.cer". the second command failed, because isn't root certificate. question is: in group has "lets-encrypt-x1-cross-signed.cer" installed? i faced same issue while using python-requests library. here's worked me: r = requests.post(url, *verify=false*) # verify=false being key element here requests.packages.urllib3.u

Stack guard exception while using OpenCV for java in eclipse- ubuntu 15.04 -

i have installed opencv 3.0.1 in ubuntu 15.04.trying develop program image keypoint detection. here java code error occurs: system.loadlibrary(core.native_library_name); mat blurredimage = new mat(); when compile in eclipse generates warning openjdk 64-bit server vm warning: have loaded library opencv-3.1.0/build/lib/libopencv_java310.so might have disabled stack guard. vm try fix stack guard now . it's highly recommended fix library 'execstack -c <libfile>', or link '-z noexecstack' . when try use mat object shown above gives me error: exception in thread "main" java.lang.unsatisfiedlinkerror: org.opencv.core.mat.n_mat()j @ org.opencv.core.mat.n_mat(native method) @ org.opencv.core.mat.<init>(mat.java:24). can how fix it?

angular2 routing - Angular 2 outlets side by side -

Image
how render components side side using route-outlets? understand using auxiliary outlets not solve problem views/routes connected , should opened in specific order. primarytemplate: <h1>primaryview</h1> <div class="col-lg-6"> <!-- using bootstrap --> <first-level-child [firstid]="firstidfromrouterparam"></first-level-child> </div> <div class="col-lg-6"> <router-outlet></router-outlet> </div> primarycomponent: @routeconfig([ { path: 'first/:firstid/second/:secondid', name: 'secondlevelchild', component: secondlevelchildcomp} ]) you can find discussions on topic @ bottom of issue: https://github.com/angular/angular/issues/6204

javascript - Creating dependant fields in Reactjs? -

this render <select> <option>1</option> <option>2</option> </select> on selecting of options dropdown .i must render another dropdown list next it . <select> <option>1</option> <option>2</option> </select> <select> <option>1.1</option> <option>1.2</option> </select> then on selecting options second dropdown list .i must render input field of type text next it. how implement in react? var react = require('react'); var reactdom = require('react-dom'); var view = react.createclass({ getinitialstate: function() { return { value: '------' } }, handlechange: function(event){ this.setstate({value: event.target.value}); this.getfields(event.target.value); }, handleclick : function(){ }, render : function(){ return (<div> <p> <i classna

c - How to inject packets into Receive (Rx) path using LWF driver on Windows? -

i developing ndis 6 light-weight filter (lwf) driver based on winpcap. can imagine there're 2 paths network adapter: tx , rx . tx sending way. rx receiving way. we know winpcap able send packets network (so tx way). want know if it's possible send packets rx , means injecting packet adapter , pretending packet arrival packet network . first don't know if viable? if yes, continue read: i have written code, using ndisfindicatereceivenetbufferlists call indicate crafted packet upper layer, free packet in filterreturnnetbufferlists handler. upper layer modules including windows os know there's new packet coming network (actually not truth). however, approach doesn't work. used nping (from nmap) ping gateway, , nping window freezes, can't terminated task manager. must driver halt. i noticed way should possible based on: jeffery's answer post: is filtersendnetbufferlists handler must ndis filter use ndisfsendnetbufferlists? an exaplan

php - Why i can not register and login in Laravel 5.2? -

i have faced problem laravel 5.2 login , register.i used here laravel 5.2 default login.blade.php , register.blade.php .all things going when trying register user , fill form , submit not insert data in database , same page show in browser window.browser did not showed error though have made debug true . here routes.php: <?php use app\member; use illuminate\http\request; /* |-------------------------------------------------------------------------- | routes file |-------------------------------------------------------------------------- | | here register of routes in application. | it's breeze. tell laravel uris should respond | , give controller call when uri requested. | */ route::get('/', function () { return view('welcome'); }); route::get('/home', function () { return view('home'); }); route::get('/members', 'membercontroller@index'); route::post('/member', 'membercontroller@store'); route

How to access elements from imported csv file with pandas in python? -

apologies basic question. new python , having problem codes. used pandas load in .csv file , having problem accessing particular elements. import pandas pd dateytm = pd.read_csv('date.csv') print(dateytm) ## result # date # 0 20030131 # 1 20030228 # 2 20030331 # 3 20030430 # 4 20030530 # # process finished exit code 0 how can access first date? tried many difference ways wasn't able achieve want? many thanks. you can use read_csv parameter parse_dates loc , see selection label : import pandas pd import numpy np import io temp=u"""date,no 20030131,1 20030228,3 20030331,5 20030430,6 20030530,3 """ #after testing replace io.stringio(temp) filename dateytm = pd.read_csv(io.stringio(temp), parse_dates=['date']) print dateytm date no 0 2003-01-31 1 1 2003-02-28 3 2 2003-03-31 5 3 2003-04-30 6 4 2003-05-30 3 #df.loc[index, column] print dateytm.loc[0, 'date'] 2

css - Why can't be <header> tag renamed in html? -

in following code tags defined inside style tags except <header> can renamed, <!doctype html> <html> <head> <style> header { background-color:black; color:white; text-align:center; padding:5px; } nav { line-height:30px; background-color:#eeeeee; height:300px; width:100px; float:left; padding:5px; } section { width:350px; float:left; padding:10px; } footer { background-color:black; color:white; clear:both; text-align:center; padding:5px; } </style> </head> <body> <header> <h1>city gallery</h1> </header> <nav> london<br> paris<br> tokyo </nav> <section> <h1>london</h1> <p>london capital city of england. populous city in united kingdom, metropolitan area o

node.js - How to show online and offline properly using socketio -

so far have been doing testing on online , offline features using socketio, stumble upon weird bug. bug user (browser a) , user b (browser b) when user open browser, connected via socketio user b. how make both of them online, 1 of them online , other not online i got socket.request using passport.socketio module, every logged in user connected via library here's code serverside io.on('connection', function(socket) { // happen whenever user online. user.findbyid({ _id: socket.request.user._id}, function(err, founduser) { if (err) console.log(err); founduser.socketid = socket.id; founduser.online = true; founduser.save(function(err) { if (err) console.log(err); socket.broadcast.emit('connection', 'online'); }); }); socket.on('disconnect', function() { user.findbyid({ _id: socket.request.user._id}, function(err, founduser) { if (err) console.log(err)

javascript - Get only the string inside a curly brackets -

this question has answer here: regex string between curly braces “{i want what's between curly braces}” 11 answers i have number of strings var str="#{zydt8spgzoa.mi8uhat7o47}+#{z3penrrf0cn.mi8uhat7o47}+#{lhubsvcmpwu.mi8uhat7o47}+#{ynpiwu7fw9m.mi8uhat7o47}"; i need content inside curly bracket array. (in above case array of length 4). how can achieve this? var found = [], rxp = /{([^}]+)}/g, str = "#{zydt8spgzoa.mi8uhat7o47}+#{z3penrrf0cn.mi8uhat7o47}+#{lhubsvcmpwu.mi8uhat7o47}+#{ynpiwu7fw9m.mi8uhat7o47}", mat; while( mat = rxp.exec( str ) ) { found.push(mat[1]); } alert(found);

java - Updating the PATH Environment Variable stops Eclipse working -

to set jdk , have added following path environment variable in windows . c:\app\a_mcleod\product\11.2.0\client_1\jdk\bin the problem eclipse no longer opens , error; failed load jni shared library "c:\app\a_mcleod\product\11.2.0\client_1\jdk\bin..\jre\bin\server\jvm.dll". how can both eclipse , jdk working simultaneously? ensure version of eclipse , jdk match, either both 64-bit or both 32-bit (you can't mix-and-match 32-bit 64-bit). see here

java - How to connect to MySQL from script in Gradle -

i want connect mysql through build.gradle not want pick driver specified folder below commented line //loader.addurl(file(jdbc_archive_path).tourl()) . want pick driver dependencies specified in build.gradle dependencies { compile 'mysql:mysql-connector-java:5.1.37' } how can that? task loaddriver { urlclassloader loader = groovyobject.class.classloader //loader.addurl(file(jdbc_archive_path).tourl()) java.sql.drivermanager.registerdriver(loader.loadclass(analyticsdriverclassname).newinstance()) } // connect database // task expects following properties: // * analyticsdburl // * analyticsdbusername // * analyticsdbpassword task calldatabase() { println "connecting database '$analyticsdburl' user '$analyticsdbusername' ..." def sql = groovy.sql.sql.newinstance(analyticsdburl, analyticsdbusername, analyticsdbpassword) println '... connected' } import com.mysql.jdbc.driver buildscript{ repositories

c++ - return a char function with random options and local variables -

i have created unit test harness test program. wanted able randomly test each run i'm not sure how go doing this. here think stuck on next, guidance appreciated. int main (void) { int testnumber = 1; //for testing char carname[] = ""; double carcost = 0; carname = carchosen (testnumber); carcost = assesscost (carname); //assesscost takes in car name , checks cost of car (error checking cars can chosen) return 0; } "testnumber" seeded time create different number's 1 - 15, in situation it's going "1" testing. this next bit i'm having trouble with. within function there 15 diffrent car options , return 1 depending on randomly created number. char carchosen (int randnum) { char carone[] = "honda"; char cartwo[] = "ford"; if (randnum == 1) { return carone; //local variables, not going work... } else if (randnum == 2) { return cartwo; // again, these return's here better rep

java - debugging a jetty application -

i'm using atmosphere framework ( https://github.com/atmosphere/atmosphere ) runs on jetty server , brings websockets browser. the problem i'm having strange reason messages broadcasted connected clients arrive on webclient running on same platform jetty server. (localhost:8080) other clients recieve messages (all @ once) when server stops. (ip server:8080) i'm not sure weither issue jetty 8/atmopshere/my network. i'm using eclipse run-jetty-run plugin. so question : there way debug system/for locating problem is? you can issue follwoing command command prompt. mvndebug jetty:run-exploded antrun:run wil come know on port jetty listening after go run->debug configuration there can debug server. in debug configuration can find option remote java application here create 1 new debug configuration new remote java application , here can define new server again mvndebug jetty:run-exploded should see new port.

jquery - Displaying events based on dates in fullcalendar -

i have events recurring weekly recurring events displaying before current week well. can recurring events rendered current week , beyond? im using following code display recurring week not working. my recurring event events: [ id: 1, title: hello, start: 2016-01-26t02: 00: 00.000-07: 00, end: 2016-01-26t05: 30: 00.000-07: 00, allday: false, eventtype: availability, rendering: background, color: black, dow: [1,4] ], and code attempt criteria eventrender: function(event, element) { return (event.start>=moment().startof('week')); } i think should use moment property,this should help: eventrender: function(event, element) { if(((moment(event.eventdate))>($('#calendar').fullcalendar('getdate').endof('week'))) { element.hide(); } }

c - static variables and local -

the output : 100 -10 0 100 -5 2 10. why? after running first time b() static x @ end of b() -5 (i check) why c() gave 0, isn't use static x? #include <stdio.h> extern int x; void a() { int x=100; printf("% d ",x); x+=5; } void b() { static int x=-10; printf("%d ",x); x+=5; } void c() { printf("%d ",x); x+=2; } int main() { int x=10; a(); b(); c(); a(); b(); c(); printf("%d ",x); return 0; } int x=0; in void c() { printf("%d ",x); x+=2; } it not use static copy of x allocated in defination function b() . it use global copy of variable x have declared in last line of program. int x=0; change last line of x different value , output changed c() why global 1 , not static? so here in scope of static variable x limited body of b() in c() can not used. c() depending on global copy of x. if remove global definition of x in

c# - Alternative solution to Java applet -

i want create architecture below web browser sends http request. web server accepts , returns response port client machine. windows service setted @ client machine accept reponse , process it. i want realize project via java applet. chrome doesn't support npapi. , firefox terminate support till end of 2016. therefore decided solve problem above way. how can realize it?

javascript - JQuery Fancybox Form -

i've started learning jquery, , i'm doing fine it. though, i'm using fancybox , i'm having trouble. i want display form inside <div> rather iframe. i'm not sure how display <div style="display: hidden;"> fancybox. http://jsfiddle.net/nlcmh/21/ i have form inside hidden div tag , want use fancybox display it. fancybox type of jquery lighbox. if need more options try fiddle: $("a.openform").click(function () { $.fancybox( $('.form').html(), { 'width' : 950, 'height' : 1100, 'autoscale' : false, 'transitionin' : 'none', 'transitionout' : 'none', 'hideoncontentclick': false, 'onstart': function () {

Time limit on Azure Webjobs triggered by Queue -

are there time limits on queue triggered function inside azure web job. function takes 20-30 mins since needs go on lot of records in db. function status in end never finished. put in settings.job file { "stopping_wait_time": 1800 } - no effect. within 5 minutes or status set never finished. searched , yes found ppl asking similar questions - no definitive answers. found exceptions in logs , exceptions seemed generated azure storage. searched , found there issues logging, commented out logging code within function - still no go. found 1 question mentioned connection strings - have these; azurewebjobsstorage, azurewebjobsdashboard, azurejobsruntime, azurejobsdata - pointing same storage account - still no go. i tried debug, , see timeout occurs , seems happening before function hit, output below; a first chance exception of type 'system.net.webexception' occurred in system.dll first chance exception of type 'system.net.webexception' occurred in system

c# - React on Visual Studio Stop -

is there possibility run code when code stopped when running visual studio? i using cefglue library build winforms application , realized there issues when pressing stop button ranging exception 2 windows no content opening. separate process continues run in background. in order stop cef nicely need exectue cefruntime.shutdown(); maybe because not run application in visual studio hosting process, because cefglue has problem (see this ). not affect production nasty while developing , testing, nevertheless execute code fix problem. i guess not possible if interesting know. so looking way execute code when visual studio stopping application when pressing stop button while in development. note: using visual studio 2013 , 2015. edit issue not reproducibly few lines of code. nevertheless have tried create simplified example here what basicly looking solution using visual studio sdk. you can build own add-ins implementing idtextensibility interface . in onconnecti

asp.net mvc - how to refresh the context in entity framework 7? -

how refresh context in entity framework 7 using asp.net 5. data stored procedure does't have result on time code load stored procedure private dbset<featurereport> dbfeaturereport { get; set; } internal ienumerable<featurereport> getfeaturereport() { return dbfeaturereport.fromsql("exec [dbo].[featurereport]"); }

PHP/MYSQL Inline editing after type password -

i want create simple cms allow editing site in place (inline editing). what i've done: login panel on php , mysql editing page inline editor bootstrap wyswihtml5 fully working saving , reading mysql via wyswihtml5 but, have site read tables mysql normal user. , second mirror site first added bootstrap wyswihtml5, admin can change content of site first. so annoyingly must have mirrored site... have idea if go url: http://example.com/admin , have login forms. if password correct redirect first (and one) page, value. on site if function , if logged editor enabled. it's simple write here that, have no idea how that. maybe more experienced members of stackoverflow me. why not implement login check php ? save login-state in php $_session variable after login. check variable on regular website. if admin logged in print out html code wysiwyg, make page redirect, or whatever prefer. read this: http://www.php.net/manual/en/function.session-start.php

jQuery UI slider labels -

i have following ui slider on page. jquery( document ).ready(function( $ ) { $( "#slider-payback" ).slider({ range: "min", value:100, min: 18, max: <?php echo json_encode($max_payback); ?>, step: 6, slide: function( event, ui ) { $( "#payback-period" ).val( "" + ui.value ) totalpayablefunc(); monthlypaymentsfunc(); } }); $( "#payback-period" ).val( "" + $( "#slider-payback" ).slider( "value" ) ); totalpayablefunc(); monthlypaymentsfunc(); }); is possible add 'min' , 'max' label on slider though? i'm yet attempt because i'm unsure of best way tackle it. thanks i not sure external library not possible jquery slider itself. but since need min , max header use following combination htm

java - Does there exist a fix / best-practice approach for sorting JTables with dynamic model -

i found the following question regarding sorting jtable whichs model not "static" elements may added it, automatically updating sort order. accepted answer states: so, changed firetablecellupdated(row, col); to firetablerowsupdated(0, data.size() - 1); and sorts properly, upon data changes, , selection preserved. since question on 5 years old, java 8 , co. happening, wanted ask if there new / better solution achieve sorting. in model implementing abstracttablemodel call firetablecellupdated(newrowid, newcolid); when new item added. the code in ui looks following: jtable table = new jtable(); table.setmodel(mymodel); // mymodel declared somewhere above table.setautocreaterowsorter(true); table.getrowsorter().setsortkeys(arrays.aslist(new rowsorter.sortkey(0, sortorder.ascending))); do have go solution proposed in other question or there "better" / best-practice way this?

c# - Object out of context -

my object eventtypelist goes out of context, if in using. advice? error message: objectcontext instance has been disposed , can no longer used operations require connection. public actionresult geteventtypelist() { list<eventtype> eventtypelist; using (var db = new icttbentities()) { eventtypelist = (from et in db.eventtypes select et).tolist(); var result = new { result = "ok", records = eventtypelist }; return json(result, jsonrequestbehavior.allowget); } } the problem 1 or more relations being lazily loaded rather eagerly loaded. news don't need using statement dbcontext context manages connections, leaving little need dispose (cf, http://stephenwalther.com/archive/2008/08/20/asp-net-mvc-tip-34-dispose-of-your-datacontext-or-don-t.aspx ). alternatively, can make sure relations have eagerly loaded setting load options context. note: if use ioc , inject context rather create directly, can avoid p

python - Unicode strings returned by API not equal to my dict -

so i'm trying compare dict have created dict response returned boto3 call. the response representation of json document , want check same. boto3 returned strings unicode. here's response: {u'version': u'2012-10-17', u'statement': [{u'action': u'sts:assumerole', u'principal': {u'service': u'ec2.amazonaws.com'}, u'effect': u'allow', u'sid': u''}]} i created dict this: default_documment = {} default_documment['version'] = '2012-10-17' default_documment['statement'] = [{}] default_documment['statement'][0]['sid'] = '' default_documment['statement'][0]['effect'] = 'allow' default_documment['statement'][0]['principal'] = {} default_documment['statement'][0]['principal']['service'] = 'ec2.amazonaws.com' default_documment['statement'][0]['action&#

command line arguments - 'javac is not recognized' , Java 7-Windows 8 -

this question has answer here: javac not recognized internal or external command, operable program or batch file [closed] 6 answers i've been trying setup javac, keep getting dreaded error message javac not recognized internal or external command, operable program or batch file ive added location of javac (c:\program files\java\jdk1.7.0_17\bin) path in environment variables .. restarted console etc, error persists. missing here? i had same issue yours , i've fixed this: in system variables made new variable, called java_home, , set value to: c:\program files\java\jdk1.7.0_17. after that, edited path, in system variables , added : ;%java_home%\bin. i hope !

c++ - How to restart a stopped webbrowser-control -

the official documentation stated iwebbrowser2::stop method "cancels pending navigation or download, , stops dynamic page elements, such background sounds , animations". i use webbrowser control show local stuff (files) remote content (urls) means of iwebbrowser2::navigate2() . in circumstances, need change content before load has finished. the stop() method seem ok task , indeed stop load. after that, navigation engine seem frozen , unable respond new navigate2() calls. the question is: there trickery restart control without create new one?

MS Windows 10 Edge Live tiles system cache -

i've changed paths (polling uri's) xml data windows still requests old 1 xml url. i updating xml url in following steps: turn live tiles off unpin tile ms edge browser cache , history clearing delete content within c:/users/ user_name /appdata/local/packages/microsoft.microsoftedge_ randomized_hash /localstate/pinnedtiles delete file iconcache.db inside c:/users/ user_name /appdata/local disk cleanup so start ms edge again , pin tiles start menu. see windows still requests old xml path via server logs. how update it? there must system cache suppose ... i've spent lot of time , appreciate advice! microsoft support replied question. reason ms edge cache. these steps helped me, hope it'll else. please try below steps reset edge browser , check. please know resetting microsoft edge remove bookmarks , history. follow instruction provided below , check. a. navigate location: c:\users\%username%\appdata\local\packages\micros

java - How can you crop an image to pieces in javafx in order to create a game puzzle with tiles? -

i trying project javafx can't create figures puzzle game tiles, in order push them click of button. how can image cropped , saved individual tile ? the imageview class used display image. has viewport property represents portion of image viewing. can create multiple image views same image, each different viewport: can add image views pane of kind, register mouse handlers on them, etc. if need store each piece individual image, can snapshot image view create new image it. you'll find don't need this, however.

intellij idea - Grails 2.4.4 jdk8u60 SEVERE: Problems copying method. Incompatible JVM? -

this question has answer here: incompatible jvm in ggts (eclipse) , java 1.8 10 answers i created project grails 2.4.4 in intellij idea 15 (jdk1.8u60) when try run project long endless log generated: jan 27, 2016 1:09:41 pm org.springsource.loaded.jvm.jvm copymethod severe: problems copying method. incompatible jvm? java.lang.reflect.invocationtargetexception @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.springsource.loaded.jvm.jvm.copymethod(jvm.java:134) @ org.springsource.loaded.ri.originalclassinvoker.createjavamethod(originalclassinvoker.java:68) @ org.springsource.loaded.ri.reflectiveinterce

java - JDBC API to trim String length to match with database column specification -

my input string longer database column specification is. have api in jdbctemplate automatically trim string match database column limit. not yet sure, limit in column may change in future , may vary according environment. limiting string in code not feasible solution, want store as possible. no. should part of input validation. please note in case should never trust client side, client-side input validation (i.e. putting maxlength on input field) required it's not enough. should perform server side input validation, , in case should not allow input exceed database column limit.

github - Git branching strategies for CICD -

just looking thought on below branching strategies keeping cicd in mind. master branch - 1.1 development branch - fork master team branch - fork development branch , merge development branch after feature implementation qa/integration testing team b branch - same above 1.1.1 release branch - goes in prod once team , team b branch merge , qa verification done, create release branch , have final regression on it. release branch go production. then merge release master branch. intent - master branch stable , production running code available in it. team branch can deployed on dev environment , have required cicd configuration on server. any issue approach? to being doing ci (and ci required cd) merge master regularly , not have long lived feature branches. believe once day expected "ci". an alternative approach 1 suggest have short lived developer branches daily wo

javascript - Initialise slider after jQuery load -

i using jquery slider (swiper) in project. initialising slider works fine if load page, when loading in new content (with slider) html files slider not initialise. current steps: creating new section: var section = $('<section class="cd-section overflow-hidden '+newsection+'"></section>').appendto(maincontent); loading content html file new section section.load(newsection+'.html .cd-section > *', function(event){...}) ; i'm trying initialise after load event, not working. section.load(newsection+'.html .cd-section > *', function(event){ if(typeof swiper == "undefined") { console.log("ready rumble"); $.getscript('js/swiper.jquery.min.js', function() { var swiper = new swiper('.swiper-container', { pagination: '.swiper-pagination', paginationtype: 'progress', nextbutton: '.s

regex - Xml Schema Pattern At The Beginning Of A String -

i new xml schema , regex. i want define pattern matches following structure: <fantastic>:item.attribute</fantastic> as as: <fantastic>:item.attribute,:item.attribute,:item.attribute</fantastic> i have pairs of items , attributes. if there more 1 pair, pairs should seperated comma. tell parser following: 'if pattern starts @ beginning of string no comma put before it. else comma needs put before (repeated) string.' the pattern item , attribute more complicated. works exception of comma seperation between pairs. i have done research , found out ^ used tell parser previous character has @ beginning of string. but not use in xml schema pattern . exist in xml anyway? how write this? kind regards

java - How to Connect a MySQL Database with SmartFoxServer 2X? -

i have started use smartfoxserver 2x . used use smartfoxserver pro , decided should use html5 , did it. anyway, there problem database manager. first, tell have done far: i downloaded "mysql-connector-java-5.1.38-bin.jar" file mysql's website. and copied "smartfoxserver 2x\sfs2x\extensions__lib__" folder. after that, entered admin tool > zone configurator > database manager. activate = yes database driver class = com.mysql.jdbc.driver connection string = jdbc:mysql://localhost:3306/login username = root password = my_mysql_password test sql = select * users and restarted server. it gave me error: exception: java.lang.classnotfoundexception message: com.mysql.jdbc.driver description: initialization of dbmanager has failed. possible causes: if database driver not 'seen' int server classpath setup fails. make sure deploy driver .jar file in extensions/__lib__/ folder , restart server. +--- --- ---+ stack trace: +--- --- ---+ java

r - Subtract values of a single row from all relevant columns in a data frame -

i have following data set: foo=data.frame(index=rep(1:10,3), type=rep(c("a","b","c"),each=10), ping=rnorm(30), pong=runif(30)) i want subtract values of columns ping , pong index==5 , type=="b" , whole columns ping , pong . works: vec=matrix(subset(foo,index==5 & type=="b",select=ping:pong),2,1) foo[,c("ping","pong")]=foo[,c("ping","pong")]-vec however, i'm surprised had specify vec column vector, instead row vector. have thought need subtract same row vector (similar subsets of the) rows of foo . can explain why is? also, if same result can obtained simpler or cleaner code, please let me know. you want this: myselect <- with(foo, index ==5 & type == "b") mycol <- c('ping','pong') foo[, mycol] <- foo[, mycol] - as.list(foo[myselect, mycol]) vec should list, substraction of li

iphone - Draw rectangle on touch in iOS subview -

i'm trying port sudoku app created in cocoa on ios, , i'm having trouble translating mousedown events had in mac app touchbegan events on ios. i have subview created in parent view has grid drawn , initial values of sudoku game in place. whenever try tap on empty square in simulator update value, console gives me these errors: mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextsetfillcolorwithcolor: invalid context 0x0 mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextsavegstate: invalid context 0x0 mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextsetflatness: invalid context 0x0 mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextaddpath: invalid context 0x0 mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextdrawpath: invalid context 0x0 mar 24 14:59:56 macintosh-94.local sudokios[95817] <error>: cgcontextrestoregstate: invalid context 0x0 h