Posts

jekyll - Does Liquid have a does not contain or not in array operator? -

when calling items , array in liquid template, how call does not contain or not in array ? unless rescue ! create [a, b, c] array. {% assign input = "a,b,c" | split:"," %} unless print if constrain not met. this prints nothing: {% unless input contains 'a' %}no a{% endunless %} this prints " no z ": {% unless input contains 'z' %}no z{% endunless %}

How do I configure global Mercurial options (like extensions) in Cloudbees Jenkins? -

i have cloudbees jenkins instance configured build several mercurial projects. configure global mercurial options go in ~/.hgrc , such as: [extensions] eol = when setting own standalone jenkins instance, log in user running jenkins , set environment. for cloudbees, it's not clear how should handle this. don't see way configure mercurial jenkins plugin use specific configuration file. if that, i'm not sure or when fill in file. can somehow create ~/.hgrc applies entire cloudbees jenkins instance? or need on per-job basis? might able set hgrcpath in pre-build step via envinect , or maybe modify project .hgrc via script build action. however, seems neither of these happen enough in build process take effect when job starts. i feel i'm missing obvious. can suggest proper way accomplish this? go system configuration page , create new mercurial installation. leave installation directory blank , set executable hg , set whatever need in custo...

c# - Asp.net visible button when 2 parameters match -

hello want make button visibile when userid stored in database match current userid. string clientid = context.user.identity.getuserid(); jobdescriptions job = new jobdescriptions(); if (job.postedby == clientid) { button2.visible = true; else { button2.visible = false; } postedby id of user posted on website saved on jobs table. problem button not visibile when statement should work. the solution if (!string.isnullorwhitespace(request.querystring["id"])) { int id = convert.toint32(request.querystring["id"]); jobreqmodel model = new jobreqmodel(); jobdescriptions job = model.getjob(id); string clientid = context.user.identity.getuserid(); if (job.postedby == clientid) { button2.visible = true; ...

How to get response from python to php? -

php never response if use sleep 5 minutes or more in python. using sleep around 2 minutes , working, not know happening, problem? sample code uploadfile_database.php: <?php $file_id=1; $response=exec('python /home/xyz/test.py '.$file_id); echo $response; ?> test.py import os, json import sys sleep(300) #sleep(420) print "hello" exec not work you're expecting. output of python script need pass output parameter exec . ex. $output = array(); $exit_code = exec('python /home/xyz/test.py '.$file_id, &$output); you use shell_exec work you're expecting

image - Weird behaviour of bwareafilt in MATLAB and what algorithm does it use? -

i have following questions: what algorithm bwareafilt uses? weird behaviour: when input matrix totally black, following error error using bwpropfilt (line 73) internal error: p must positive. error in bwareafilt (line 33) bw2 = bwpropfilt(bw, 'area', p, direction, conn); error in colour_reception (line 95) iz=bwareafilt(b,1); actually, using function take snapshots webcam, when block webcam totally, above following error. so believe error due internal implementation mistake. case? how overcome this? let's answer questions 1 @ time: what algorithm bwareafilt use? bwareafilt function image processing toolbox accepts binary image , determines unique objects in image. find unique objects, connected components analysis performed each object assigned unique id. can think of performing flood fill on each object individually. flood fill can performed using variety of algorithms - among them depth-first search can consider image graph edges c...

c++ - non-blocking communications in MPI: order of messages -

what happens if processors sends same message same destination same tag? when receiver wants read it, read last one? what if 2 different processors send same message (same tag) 1 processor? 1 receive , in order? 3- how can know how many pending messages specific processor in queue in order receive of them?

vbscript - paypal payment not going through with any of the options -

using asp classic paypal live express checkout it shows payment amount @ checkout, payment doesn't go through. payment doesn't leave customer's account. have tried using wife's paypal account complete checkout. i using paypal checkout system , have added api information in expresscheckout.asp , paypalfunctions.asp i have tried adding these api options too, still wouldnt work l_paymentrequest_n_namem l_paymentrequest_n_numberm l_paymentrequest_n_amtm l_paymentrequest_n_qtym any great.... tks