Posts

Hubot's github-pull-request-notifier.coffee -

i got hubot setup irc , works fine. i'm trying add this script. i'm not entirely understanding setup instructions however. setup instructions read curl -h "authorization: token <your api token>" \ -d '{"name":"web","active":true,"events":["pull_request"],"config":{"url":"<this script url>","content_type":"json"}}' \ https://api.github.com/repos/<your user>/<your repo>/hooks i don't understand "url":"<this script url>" refers to. know? i'm deploying heroku if helps. add more explanation @mikekusold 's answer the curl command create github hook , therefore set hook receiver notification. "config": { "url": "http://example.com/webhook", "content_type": "json" } the hook hubot plugin, url path defined in that script , see ...

Regex + vs *. What is the standard? -

i use regex quite bit find , replace, , want use best practices as possible. i understand difference between + , * characters. reference * find matches specified phrase, , + find last instance of specified phrase. that being said, when regex phrases on internet, see lot of people using + feel using * . standard use + instead of * on generic regex phrases or there convention missing? the site you've linked great, you're misunderstanding definitions of * , + . essentially, * means "zero or more," + means "one or more." in other words: x* means "any number of x characters in row, or possibly none @ all. " x+ means "any number of x characters in row, at least one. " so x+ equivalent xx* (or x*x ). both have infinite upper limit, different lower limits. as far 1 standard/best practice, answer "neither," since both have different meanings. however, if you're trying match 1 or more of so...

java - Real-Time Excel Updates -

i have third party application updates cell values opening excel file, setting values in cells, , writing (saving) excel file. suppose have excel spreadsheet open @ times, how have spreadsheet reflect these changes in real-time? every time there update, have re-open excel file see new changes. ps. using apache poi. thank you. you cannot using apache poi. if have excel spreadsheet open in excel, filenotfoundexception if attempt write changes file. @ least on windows, this: java.io.filenotfoundexception: myspreadsheet.xlsx (the process cannot access file because being used process) additionally, if worked, there nothing in apache poi api interacts excel application itself, cannot tell excel re-open spreadsheet.

c# - Nested looping XML elements -

this xml: <scenario> <steps> <step name="a"> <check name="1" /> <check name="2" /> </step> <step name="b"> <check name="3" /> </step> </steps> </scenario> i trying loop through xml elements by, each step, doing step's respective check elements. so: foreach(step step in steps) { foreach(check in step) { // } } it might output like: a1 a2 b3 the code i'm using is: foreach (xelement step in document.descendants("step")) { // start looping through step's checks foreach (xelement substep in step.elements()) { however not looping properly. nested loop structure above doing check elements each step, instead of doing child check elements of each step. example, output of code is: a1 a2 a3 b1 b2 b3 how can fix loops? your code fine. see this fore...

python - gevent-socketio not using my @app.route endpoint for socketio -

i using flask gevent-socketio: $ cat requirements.txt flask==0.10.1 jinja2==2.7.1 markupsafe==0.18 werkzeug==0.9.3 argparse==1.2.1 gevent==0.13.8 gevent-socketio==0.3.5-rc2 gevent-websocket==0.3.6 greenlet==0.4.1 itsdangerous==0.23 wsgiref==0.1.2 i'm using pretty standard setup start server: #called __main__ def run_dev_server(): app.debug = true port = 5000 dapp = werkzeug.debug.debuggedapplication(app, evalex = true) socketioserver(('', port), dapp, resource="socket.io").serve_forever() and pretty standard hook socketio namespace: @app.route('/socket.io/<path:rest>') def push_stream(rest): print 'ws connect', rest try: socketio.socketio_manage(request.environ, {'/join_notification': joinsnamespace}, request) except exception e: app.logger.error("exception while handling socketio connection", exc_info=true) return flask.response() however, i'm having probl...

How to add transparent image on Oracle Reports? -

in 1 of oracle report, have 2 images overlay each other , front image covered part of image on back, set watermark. is there way can add transparent image in oracle reports? i have tried make image transparent in gif , tif format, after load image oracle reports, transparent part of image tuns black colour instead of no colour (transparent). i know using photoshop or other tools make front image looks transparent way, want if there solution it. any suggestion welcomed. thanks.

c++ - Can I get a code page from a language preference? -

windows seems keep track of @ least 4 dimensions of "current locale": http://www.siao2.com/2005/02/01/364707.aspx default user locale default system locale default user interface language default input locale my brain hurts trying keep track of hell 4 separate locale's useful for... however, don't grok relationship between code page , locale (or licd, or language id), of appear different (e.g. japanese (japan) langid = 0x411 location code 1, code page japan 932). how can configure our application use user's desired language default mbcs target when converting between unicode , narrow strings? that say, used mbcs application. switched unicode. things work in english, fail in asian languages, apparently because windows conversion functions widechartomultibyte , multibytetowidechar take explicit code page (not locale id or language id), can set cp_acp (default ansi code page), don't appear have value "default user's default interfa...