Posts

Showing posts from February, 2014

ffmpeg - When i try to convert live http streams to .flv file i am getting Unrecognized option 'c:v' error -

c:\program files\ffmpeg>ffmpeg -re -i http://82.135.224.134/udp/239.100.2.20:1234 -c:v libx264 -b:v 5m -pix_fmt yuv420p -c:a:0 libfdk_aac -b:a:0 480k -f flv abc.flv i running above command. getting folloing error: [h264 @ 0154f300]sps_id out of range [h264 @ 0154f300]non-existing sps 32 referenced in buffering period [h264 @ 0154f300]non-existing pps referenced [h264 @ 0154f300]sps_id out of range [h264 @ 0154f300]non-existing sps 32 referenced in buffering period [h264 @ 0154f300]non-existing pps 0 referenced [h264 @ 0154f300]decode_slice_header error [h264 @ 0154f300]no frame! . . . . . [mpegts @ 023c1700]max_analyze_duration reached [mpegts @ 023c1700]estimating duration bitrate, may inaccurate input #0, mpegts, 'http://82.135.224.134/udp/239.100.2.20:1234': duration: n/a, start: 63180.879433, bitrate: 62 kb/s program 1 stream #0.0[0x3e9]: video: h264, yuv420p, 720x576 [par 1:1 dar 5:4], 38.11 f ps, 25 tbr, 90k tbn, 50 tbc stream #0.1[0x3ea]: audio: aa...

encryption - Apache 2.4: Cipher suite depending on User Agent -

is possible enable/disable cipher suites depending on user agent (like browsermatch)? need single old/weak cipher suite old client application , have tried rewriterules forbid access server old cipher suite , not matching user agents. need enabled stronger , weaker cipher suites , protocols on vhost level allow access. "f" on https://www.ssllabs.com/ssltest . can increase rating (the insecure/weak cipher suite should not visible general user agents on initial handshake).

SQL subquery invalid in the select list -

i working on below code recursively same table getting error *column 'checkinout.userid' invalid in select list because not contained in either aggregate function or group clause.* *column 'checkinout.checktime' invalid in select list because not contained in either aggregate function or group clause.* select convert(varchar,checktime, 106) gatedate, convert(varchar,checktime, 106) gatein ,( select top 1 convert(varchar(5),ch001.checktime, 108) checkinout ch001 checktype ='i' , ch001.userid= mm001.userid , (convert(varchar, ch001.checktime, 112) =convert(varchar, mm001.checktime, 112)) ) timein checkinout mm001 userid=@empid select convert(varchar,checktime, 106) gatedate, convert(varchar,checktime, 106) gatein ,( select top 1 convert(varchar(5),ch001.checktime, 108) checkinout ch001 checktype ='i' , ch001.userid= mm001.userid , (convert(varchar, ch00...

oracle11g - Display Result From one column in SQL -

i have 1 table stores row id , col id different item name , related quantity....which described follows.... rowid colid value 3 2 laptop 4 2 mouse 4 4 80 3 4 50 i need output: value qty laptop 50 mouse 80 select a.value value, b.value qty (select rowid, value test colid = 2 order rowid) a, (select rowid, value test colid = 4 order rowid) b a.rowid = b.rowid

extjs - extjs5 : How to disable all dates after today's date -

i using extjs datefield ext.create('ext.form.panel', { renderto: ext.getbody(), width: 300, items: [{ xtype: 'datefield', fieldlabel: 'from', maxvalue: new date() }, { xtype: 'datefield', fieldlabel: 'to', }] }); when using code in extjs 4 works disable dates after today's date , done using maxvalue= date() .in extjs 5 user can't select day after today's date not disable. how can disable these dates ?? thanks in advance not sure can... invalid days have been given right classes, , have correct setup. html different. in ext4, template rendering date cell is '<a role="presentation" hidefocus="on" class="{parent.basecls}-date" href="#"></a>', but in ext5, template is '<div hidefocus="on" class="{parent.basecls}-date"></div>', the other problem sass...

sql - perhaps impossible view - so complicated -

i try implement 1 view knowledge not enough. this query try make view declare @cte table(documentid varchar(50),documentno varchar(50),xmlcontent xml); declare @tbl table(documentid varchar(100),documentno varchar(100),vdata varchar(100),vpublika varchar(100),vvatreshen varchar(100)); insert @cte select documentid,documentno,cast(replace(cast(content nvarchar(max)),'utf-8','utf-16') xml) xmlcontent mainsqltable doctypeid = 2; insert @tbl select documentid,documentno, replace( replace (convert(varchar(100),xmlcontent.query('/idmsdocument/documentcontent/attribute[@name="Публикa"]/value/value')),'</value>','') ,'<value>','') vpublika, replace( replace (convert(varchar(100),xmlcontent.query('/idmsdocument/documentcontent/attribute[@name="Дата"]/value/date')),'</date>','') ,'<date>','') vdata, replace( replace (convert(varchar(100),xml...

Convert XNA + VB.Net game into MonoGame -

i'm writing strategy game in xna , vb.net. technology combination looked quite choice, right until decided switch monogame (but keep game logic in vb.net intact). the problem monogame not support vb.net. did research , seems have 2 options: rewrite code c# write small c# wrapper around monogame , turn game logic code library needless say, both of these options suck. missing option here? don't mind giving considerable effort making thing work in monogame, rewriting isn't option. my findings far: while browsing web, stumbled across a monogame template vb.net . while looked needed, crashed upon loading after running plain new project. proceeded google error, got near running thing. to explain technology choice (because will ask): why xna? used before, i'm familiar , though it's outdated, suits needs , should still work couple years. why vb.net? have huge experience , prefer it's syntax on c#. important me since i'm writing rather l...

core data - Xcode 6.1 Mac OS X new project for command line tool -

i following ios core data tutorial, core data tutorial my xcode version 6.1 while tutorial uses older one. when needs create new project mac command line, tutorial says "change type “core data”", in xcode, there no such core data option. so, how shall start "core data" command line project? i'm doing same thing, exact same problem. solution start new cocoa project, give checkbox use core data. generate core data stack access gubbins. implementation straight forward there, except work done in appdelegate.m. main() function replaced applicationdidfinishlaunching:().. method. the changes required are (nsmanagedobjectmodel *)managedobjectmodel { // managed object model application. fatal error application not able find , load model. if (_managedobjectmodel) { return _managedobjectmodel; } nsurl *modelurl = [[nsbundle mainbundle] urlforresource:@"failedbankcd" withextension:@"momd"]; _managedobject...

linux kernel - reserve system memory, ioremap()? -

is bad call ioremap() on system dram. reserve space in system dram not used other process. way it? know dram not io memory wasn't sure if considered bad practice. is bad call ioremap() on system dram. system memory managed kernel should not remapped using ioremap() . these multiple mappings can cause data corruption on architectures/processors. refer this article on issue arm. you try ensure single mapping (using ioremap() ) excluding memory region in question @ boot time kernel's management. on arm specify reduced physical memory using atags (the atag_mem tag(s)) or device tree (the memory property). otherwise use memmap= kernel parameter in kernel command line: 1835 memmap=nn[kmg]$ss[kmg] 1836 [knl,acpi] mark specific memory reserved. 1837 region of memory reserved ss ss+nn. 1838 example: exclude memory 0x18690000-0x1869ffff 1839 me...

sql - update field value with multiple rows -

i have stored proc have temp table , need update value of "day_name" column. loop throug temp table , update value this example of data(there multiple student names): student studentid courseid course_name period day_name bray, clifford 14088 10064 physical education 9gym 1 bray, clifford 14088 10064 physical education 9gym 1 b bray, clifford 14088 10064 physical education 9gym 1 c bray, clifford 14088 10064 physical education 9gym 1 d bray, clifford 14088 10064 physical education 9gym 2 bray, clifford 14088 10064 physical education 9gym 2 b bray, clifford 14088 10064 physical education 9gym 2 c bray, clifford 14088 10064 physical education 9gym 2 d bray, clifford 14088 10065 physical education 11gym 3 b bray, clifford 14088 10065 physical education...

java - android VM won't let us allocate 10458756 bytes Error on setBackgroundResource of Button -

i want change image of button on click. button looks "clicked" , "not clicked" button image size not big:164 kb my code worked fine android version 2.3.3 on latest versions started errors i have read lot of stuff in internet , still can't find answer. @override public boolean ontouch(view v, motionevent event) { if(event.getaction() == (motionevent.action_up)){ //do whatever want after press center_button.setbackgroundresource(r.drawable.button); } if(event.getaction() == (motionevent.action_down)){ //do whatever want during press //((bitmapdrawable)center_button.getdrawable()).getbitmap().recycle(); center_button.setbackgroundresource(r.drawable.clicked); count++; } return false; i have tried following things , didn't help: ((bitmapdrawabl...

c# - Entity Framework SaveChanges Async -

i working on audit trail feature , using entity framework. the current code works takes long time run. public class mydbcontext : dbcontext { public int savechanges() { // changes changetracker.detectchanges() // generate custom audit trail records return base.savechanges(); } } i thinking of moving audit trail building after save changes , doing async public int savechanges() { // changes changetracker.detectchanges() int ret = base.savechanges(); // call async function create audit return ret; } i have tried using async-await encountered problems object has been disposed. i'm not used threading/async calls. is there way "partial" return parent process gets desired return inorder continue process, while object still alive/not-disposed continue async task. public int savechanges() { // changes changetracker.detectchanges() int ret = base.savechanges(); // partial return ret; // continue process in generating audit...

A very strange deadlock on key lock in SQL Server -

it strange when there 2 connections running below transaction on different rows, deadlock detected. why query optimizer require transaction t1 have resource key2 row updated transaction t2? key1 (row 1) key: 5:72057594048348160 (150fa2746afc) key2 (row 2) key: 5:72057594048348160 (1bec117e39ae) 2 transactions updating different rows @ same time. suppose not interfering each other uplock , rowlock? begin tran select * table with(uplock, rowlock) pk_col1 = ? , pk_col2 = ? update table set col3 = ? pk_col1 = ? , pk_col2 = ? end the following deadlock list <process id="process10e7502c8" taskpriority="0" logused="0" waitresource="key: 5:72057594048348160 (150fa2746afc)" .... <process id="process10e750988" taskpriority="0" logused="0" waitresource="key: 5:72057594048348160 (1bec117e39ae)" ... <resource-list> <keylock hobtid="72057594048348160" dbid="5" ...

mysql - how to write query for 3 where_in() in codeigniter -

i have query run don't how write in codeigniter here query select id,contact,firstname,email `user` `id` in(select id `hr` `hr_id` in(select hr_id `admin_hr` id_admin_hr = 8) ) , `id_category` =1 you can add sub-query part in where() method, try this $this->db->select("id,contact,firstname,email") ->where("id in(select id `hr` `hr_id` in(select hr_id `admin_hr` id_admin_hr = 8))") ->where("id_category", 1) ->get("user")

c++ - Dynamically adding to a graph data structure -

let me first state want direction, not actual code, unless small snippet way point across. i need create directed graph data structure using adjacency list or matrix in c++, , add vertices/edges standard input, means dynamically. i think i'd able create graph fine if able instantiate set of vertices first, create edges , add them graph, don't understand how possible add edge contains vertex hasn't been instantiated yet. for example, first line standard input reads: miami -> new york/1100 -> washington/1000 -> albuquerque/1700 how supposed add edge miami new york if new york vertex hasn't been added graph yet? thanks direction everyone! how possible add edge contains vertex hasn't been instantiated yet. simple: instantiate it.. i not see issue this. assume v vertex set seen far. v empty. read input x->y , end points ( x , y ). if 1 of them not instantiated (i.e., not in v ), instantiate , add vertex set. anot...

html - Making a whole image round in shape while maintaining aspect ratio -

i trying display whole image in circle form(without cropping or hiding part of it) while maintaining aspect ratio. want use css. i tried this: #propic { width:150px; height:150px; background-size:cover; display:block; border-radius:100px; -webkit-border-radius:100px; -moz-border-radius:100px; } which show image in circle form doesnt maintain aspect ratio. again tried this: #propic { width:150px; height:auto; background-size:cover; display:block; border-radius:100px; -webkit-border-radius:100px; -moz-border-radius:100px; } which maintain aspect ratio shape becomes oval. how can achieve this? thanks in advance. it's not entirely clear mean 'maintain aspect ratio` since div circle. if maintain aspect ratio on wide image there blank area top , bottom fit width of circle #propic { width:150px; height:150px; border-radius:50%; background-image: url(http://lorempixel.com/g/400/200/); background-position: center; background-s...

php - Advanced Custom Fields checkbox inside repeater -

i'm trying use checkbox inside repeater field show different images. if user checks "chicken" , "roast" must display 2 images front-end. if nothing checked, nothing displayed. i have tried advanced custom fields documentation , can null or these names "chicken" , "roast" front-end. piece of code inside repeater loop. <?php if (get_field('selection') == 'chicken') { ?> //some piece of code <?php } else if (get_field('selection') == 'roast') { ?> //some more code <?php } ?> a checkbox creates list of check-able items. in other words, need check string in array() . example: if( in_array( 'chicken', get_field('field_name') ) ) { //... } read more checkboxes in acf codex: http://www.advancedcustomfields.com/resources/checkbox/

Parsing string to array using Regex in c# -

im making c# application receives string serialport, , need parse data can stuff it. the strings send through serialport formatted this: *ntf,ctrl,sql,open,+,-66*ntf,ctrl,dbusy,on,+,-63*ntf,ctrl,dbusy,off*ntf,ctrl,sql,close* now im wondering how can split string segments on * symbol, have made couple attempts @ myself couldnt figure out. the attempts made are: string[] tmp = data.tostring().split('*'); foreach(string word in tmp) { if (word.contains(",80") || word.contains(",81")) { com_port_info_box.text += word + "\r\n"; } } which gave me: ntf,ctrl,sql,open,+,-66 ntf,ct rl,dbusy ,on,+,-6 3 ntf,ct rl,dbusy ,off ntf,ct rl,sql,c lose i have tried: var regex = new regex('*'+".+"+'*'); var matches = regex.matches(data); but gave me error. what want achieve: the formatted string this: ntf,ctrl,sql,open,+,-66 ntf,ctrl,dbusy,on,+,-63 ntf,ctrl,dbusy,off ntf,ctrl,sql,close edit...

python - How to crawl a site that redirects to "/" -

i using scrapy crawl several websites. spider isn't allowed jump across domains. in scenario, redirects make crawler stop immediately. in cases know how handle it, weird one. the culprit is: http://www.cantonsd.org/ i checked redirect pattern http://www.wheregoes.com/ , tells me redirects "/". prevents spider enter parse function. how can handle this? edit: code. i invoke spider using apis provided scrapy here: http://doc.scrapy.org/en/latest/topics/practices.html#run-scrapy-from-a-script difference spider custom. created follows: spider = domainsimplespider( start_urls = [start_url], allowed_domains = [allowed_domain], url_id = url_id, cur_state = cur_state, state_id_url_map = id_url, allow = re.compile(r".*%s.*" % re.escape(allowed_path), re.ignorecase), tags = ('a', 'area', 'frame'), attrs = ('href', 'src'), response_type_whitelist = [r"text/html", r"application...

facebook - Using the FB API, can you share a link, but serve an image that is not on the page -

Image
i can post photo if had time app approved. can share link pulls in photo page. goal post link goes x, image hosted somewhere else. is possible? yes, it's possible using javascript sdk , share dialog. example, can following, shares link custom image, name , caption. overwrites og data on page. function fb_share() { fb.ui( { method: 'feed', name: "facebook api: tracking shares using javascript sdk", link: "https://www.webniraj.com/2013/05/11/facebook-api-tracking-shares-using-the-javascript-sdk/", picture: "https://stackexchange.com/users/flair/557969.png", caption: "tracking facebook shares on website or application useful way of seeing how popular articles readers. in order tracking shares, must used facebook javascript sdk." }, function( response ) { // nothing } ); } $(document).ready(function(){ $('button.share-btn').on( 'click', fb_sha...

mongodb - Publish and subscribe for a collection depending on a document field with different IDs with Meteor -

i building magnetic poetry game in meteor http://test-magnets.meteor.com/ the homepage allows online play on same "fridge" want have option allows create own fridge without public disturbing it. i used iron router generate url based on userid. magnets have fridgeid. fridgeid home page 1 , when user goes url based on userid, magnets fridgeid gets updated same userid. currently when move magnet in homepage makes change in user's private fridge. possible use publish , subscribe or iron router update database magnets depending on generated fridgeid? suggestions appreciated. thanks -john here code have now. iron router router.map(function() { this.route('home', { path: '/' }); var user = meteor.userid(); this.route('private', { path: '/' + user }); }); magnets collection if (meteor.isserver) { meteor.publish('magnets', function(){ return magnets.find(); }); } if (meteor.isclient) { m...

R data.frame integer column convert NA -

i have data below in csv file. read data data.frame in r using read.csv command my play2 column after import has values (7,na, na,na etc) want convert nas blanks @ same time maintain column integer column how that? time_s it_rms play play2 play3 0 0.744608402 # 7 abc 60 1.540045857 @ na na 120 2.217387915 1 ! null * 2 5.052185059 216 13.14362144 ^ 7.940382004 298 9.155433655 na nan 4 5 i tried below code. final_data_file name of data.frame had data, changed datatype of column :( final_data_file$play2[is.na(final_data_file$play2)]="" final_data_file$play2[is.na(final_data_file$play2)] character(0)

oauth 2.0 - 403 Forbidden Error While accessing Google MapsAPI -

i trying establish connectivity google maps api using service account. have project in place in google maps api, , have relvant clientid, .p12 key, email address. using google libraries credentials , call api below. code: package mapsengine;import com.google.api.client.auth.oauth2.credential; import com.google.api.client.googleapis.auth.oauth2.googlecredential; import com.google.api.client.http.httptransport; import com.google.api.client.http.javanet.nethttptransport; import com.google.api.client.json.jsonfactory; import com.google.api.client.json.jackson2.jacksonfactory; import com.google.api.services.mapsengine.mapsengine; import com.google.api.services.mapsengine.model.map; import com.google.api.services.mapsengine.model.layer; import java.io.file;import java.io.ioexception; import java.util.collections; public class main { /** provide id of map wish read. */ private static final string map_id = "my map id gave"; private static final string application_name = ...

xilinx - Verilog for error while synthesizing -

when try synthesize verilog project following errors: error:xst:2634 - "shiftman.v" line 15: loop stop condition should depend on loop variable or static. error:xst:2634 - "shiftman.v" line 22: loop stop condition should depend on loop variable or static. i think understand causes error, can't find way fix it. module shiftman(in,sh,out); input[47:0] in; input[8:0] sh; output[47:0] out; reg[47:0] out; reg[7:0] r; reg i; always@(in or sh) begin r=sh[7:0]; out=in; if(sh[8]==0) for(i=0; i<r; i=i+1) begin out[23:0]={1'b0,out[23:1]}; end else for(i=0; i<r; i=i+1) begin out[47:24]={1'b0,out[47:25]}; end end endmodule the reason synthesis failing because cannot uses variable-iteration loops in synthesizable code. when synthesizing, tool attempt unroll loop, cannot if termination condition loop not static or determinable @ synthesis. condition i <= r such condition canno...

sqlite - Creating a Windows 8.1 Tablet App with a Local Database that links back to SQL Server -

i'm working on project needs create windows 8.1 tablet application has localize database on tablet. tablet application must replicate sql server (2012 exact). application needs privately deployed out via our servers also. we use sql ce (compact edition). problems sql ce in deprecation (support end in 2016) , winrt doesn't seem support sql ce. the other option see using sqlite create application local database. haven't seen on how transmit data , forth between sqlite , sql server 2012. is there other choices in window 8.1? suggestions appreciated. if not need app windows store app, can use sqlce. rob tiffany has book describes how that. if must store app must use sqlite. can use zumero sync in case.

php - How to display info if a tag value is X -

i know how can display na info xml if value of tag canfonti. so, have na updated xml page: http://www.cidadehoje.pt/musics/musics/te.xml snippet: <onairplaylist radio="radio cidade hoje"> <element> <author>doismileoito</author> <title>sÓ faÇo bem (2011)</title> <genre>pop</genre> <table>canfonti</table> <id>0019826001</id> </element> <element> <author>anotherguy</author> <title>let's play song</title> <genre>foo</genre> <table>bar</table> <id>9999999991</id> </element> </onairplaylist> and code: <?php $x = simplexml_load_file('http://www.cidadehoje.pt/musics/musics/te.xml'); echo '<font color="#ffffff" face="raleway-light" size="+3" style="display:inline...

Deleting a node in a B-Tree - using inorder Predecessor vs. Successor as the replacement key -

Image
suppose wanted delete 70 tree using inorder predecessor replacement key , after using inorder successor replacement key. what difference between two? this deletion of 70 using inorder predecessor this deletion of 70 using inorder successor

How to add padding for Menu item in Settings Action Bar from Android Lollipop? -

Image
i have following menu: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/action_refresh" android:title="@string/refresh_data" android:showasaction="never"/> </menu> how can add padding on top button lower on menu , doesn't cover title ? menu standard settings menu in actionbar. i've updated lollipop also.

PHP Post - Speical Characters not making it to the server -

i have migrated server (whm / cpanel) , have set "exactly" same old server. everything working fine except when user post odd / special character "–" via form field. when happens post field set blank (when var_dump out screen). on old server , local testing server it's working fine. i can't see why. i've tried changing character sets via whm php, still no joy.

php - Extending Models and Seeding Tables with Eloquent in Laravel -

i'm trying figure seeding has whether or not extend model base model extends eloquent or not because when turn user model extending eloquent , run seed file works keep way puts empty values fillable fields. any ideas why happening , how possibly fix it? user model <?php use illuminate\auth\usertrait; use illuminate\auth\userinterface; use illuminate\auth\reminders\remindabletrait; use illuminate\auth\reminders\remindableinterface; class user extends basemodel implements userinterface, remindableinterface { use usertrait, remindabletrait, softdeletingtrait; protected $fillable = ['first_name', 'last_name', 'username', 'avatar', 'role_id', 'status_id', 'email_address', 'password']; protected static $rules = [ 'first_name' => 'required', 'last_name' => 'required', 'username' => 'required|unique:users', ...

typeclass - vector reflexivity under setoid equality using CoRN MathClasses -

i have simple lemma: lemma map2_comm: forall (f:a->a->b) n (a b:t n), (forall x y, (f x y) = (f y x)) -> map2 f b = map2 f b a. which able prove using standard equality (≡). need prove similar lemma using setoid equality (using corn mathclasses). new library , type classes in general , having difficulty doing so. first attempt is: lemma map2_setoid_comm `{equiv b} `{equiv (t b n)} `{commutative b a}: forall (a b: t n), map2 f b = map2 f b a. proof. intros. induction n. dep_destruct a. dep_destruct b. simpl. (here '=' 'equiv'). after 'simpl' goal "(nil b)=(nil b)" or "[]=[]" using vectornotations. finish using 'reflexivity' tactics gives me: tactic failure: relation equiv not declared reflexive relation. maybe need require setoid library. i guess need somehow define reflexivity vector types, not sure how that. please advise. first of lemma definition needs adjusted ...

angularjs - Angular Strap: Date Range (Start Date Not Working) -

i building simple angular search form, uses bootstrap design framework , angular strap module (found here: http://mgcrea.github.io/angular-strap/ ). everything works great except dynamic date ranges based on angular models. what want quite simple: second date input starts 1st input selected. heres code not work: depart date (1st input) [works fine] <input required name="dapart_date" class="form-control" id="leave_date" placeholder="mm/dd/yyyy" ng-model="flightsearchdata.depart_date" data-date-format="mm/dd/yyyy" data-use-native="true" data-autoclose="true" data-min-date="today" bs-datepicker> return date (2nd input) [ data-start-date doesn't work] <input required name="return_date" class="form-control" id="return_date" placeholder="mm/dd/yyyy" ng-model="flightsearchdata.return_date" data-date-format="mm/dd/yyyy...

How to determine FreeBSD kernel size -

i'm trying remove options generic reduce kernel size. how can find kernel size track changes? well, "ls -al /boot/kernel/kernel" 1 obvious way. "kldstat -v" , looking @ "size" field another.

android - Jenkins: adding CUSTOM variables for a build -

jenkins create build android , uploads s3 server. build contains environment name, version number different each build. these version number, environments read pom profiles. example url of s3 http://example.com/android/staging/abc-project-v0.1.58-staging-aligned.apk i file name cd $workspace/target/ file_name=$(echo *aligned.apk) so link http://example.com/dev/file_name but visible in shell script. want use in email template software test engineers can access it. looking way in can temporarily assign value variable , put in email template. email template is: <html> <body> <h3>$project_name</h3> <h4>build #$build_number - $build_status</h4> <h4>${cause}</h4> <h4>$default_content</h4> <h4>git branch: ${git_branch}</h4> changes since last build: ${changes} </body> </html> assuming email step later part of jenkins build process, you'll need use envinject plugin . own exam...

Multiply two fuzzy numbers -

can please give me step step procedure on how multiply 2 fuzzy numbers , b where {(x+1)/2 |(-1<x<=1), ua(x) = {(3-x)/2 |(1<x<=3), {0 |otherwise {(x-1)/2 |(1<x<=3), ub(x) = {(5-x)/2 |(3<x<=5), {0 |otherwise multiplication bit tricky, if have simple triangular membership functions. there step-by-step description here: http://debian.fmi.uni-sofia.bg/~cathy/softcpu/fuzzy_book/chap5-3.pdf in cases, however, simpler approximation described in example 5.12 (p 8) enough. in multiply each of 3 mf-numbers in 1 set 3 corresponding numbers in other. (the results are, however, not intuitive numbers close 0 - care comment on/explain this?)

windows - c# event when something on screen changes -

not sure if it's possible. searched, not find solution question... what i'm trying write tracks changes on screen (changes not related app - i'm subscribing change software changes on screen). example, if there movie playing on windows media player - display keeps on changing - time. or example animation in ie (or other browser / app) shows on screen. app notified there "movement" on screen, , if possible, area movement occurred. is such thing possible?

php - Laravel : Undefined variable in a POST function -

i'm trying send post request containing variable, says variable undefined, here code .. first function view containing form. second function callback of post request of form. echo'ed out variable in view , succeeded error shows in second function .. public function reset($code) { return view::make('recover', array('code' => $code, 'passwordreset' => 1,'nologinform' => 1)); } public function postresetpassword() { $validator = validator::make(input::all(), array('temppassword' => 'required','newpassword' => 'required|min:6','cnewpassword' =>'required|same:newpassword')); if($validator->fails()) return view::make('recover', array('passwordreset' => 1,'nologinform' => 1))->witherrors($validator); else { // error shows in following line in code variable comparison $user = user::where('temp_password',...

config - arch-linux qtile keybinds no reaction -

installed qtile x manager on archlinux os. got repository. installed needed packages: pycairo-xcb-git xorg-xpyb-git qtile-git qtile started. show information on bottom panel (version of config, time, etc.) there no reaction on default keybinds (for example open xterm). qtile have log files, or any? you need mention log file if using .xinitrc start qtile: exec qtile >> ~/.qtile.log this open qtile write output .qtile.log; not have file, create 1 : cat > ~/.qtile.log

How to construct this binary variable in R? -

the aim check if value @ index 1 , make previous 6 entries 1. x <- c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1) ## required output y <- c(1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1) ## attempt for(j in seq_along(x)){ if(x[j] == 1){ for(i in (j-6):j) x[i] = 1 }} could solve or better approach ? thanks. a vectorized solution using filter : as.integer( #turn logical value numbers as.logical( #coerce logical --> 0 becomes false, else true rev( #reverse order filter( #linear filtering c(rep(0, 6), #pad zeros in beginning avoid nas rev(x)), #revers order of input vector c(rep(1, 7)), sides=1 #y_i = x_i * 1 + x_(i-1) * 1 +...+ x_(i-6) * 1 )[-(1:6)]))) #remove na values #[1] 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1

angularjs - Can a router resolve be set as a function of a controller class? -

background i've been reading todd motto's opinionated style guide, in particular part relating router resolves - scroll down ' controller.resolve property: ' part: https://github.com/toddmotto/angularjs-styleguide#routing-resolves i've disliked fact had resolve logic defined in router definition, in theory quite liked solution, in practice, don't see how it's possible? todd states: 'this keeps resolve dependencies inside same file controller , router free logic' so understanding of - using example - you'd have controller logic in 1 file (for arguments sake controllers.js) defined as, app.module('myapp') .controller('mainctrl', mainctrl); function mainctrl() { ///some controller logic here } mainctrl.resolve = { somestuff: function() { //resolve here } } and in file (routes.js) you'd have, app.module('myapp') .config(config); function config ($routeprovider) { $...

javascript - jQuery: Loaded HTML is invisible -

Image
i try load html code div using jquery , code: <script language="javascript"> $(function(){ $(".loadmain").click(function(){ $("#main-content").load("startjourney2.html"); }); }); </script> i have got button here: <a class="loadmain">play</a> and div below <div id="main-content" class="abs dark-template"> and last not least code in startjourney2.html <div class="page-wrapper"> <!--page sidebar--> <div class="page-side"> <div class="inner-wrapper vcenter-wrapper"> <div class="side-content vcenter"> <div class="title"> <span class="second-part">start your</span> <span>journey</span> </div> <p>some text...

Write SAS Data-Labels to Excel file -

i try write labels of each variable excelsheet in sas. im using option dblabel=yes which allows print labels column headings in excel. unfortunately seems labels long. has solution? here code m using: data test; length 3. b 3. c 3.; input b c; label = "this label long writing sas excel"; datalines; 18 20 15 25 20 80 63 72 14 run; libname xls oledb provider="microsoft.ace.oledb.12.0" preserve_tab_names=yes preserve_col_names=yes datasource="f:my workspace\test_9.xls" provider_string="excel 12.0"; data xls.test (dblabel=yes); set test; run; libname xls clear; this ther error receive. error: error binding parameters: invalid column name: label long writing sas excel thanks in advance this doesn't appear problem proc export instead. proc export data=test outfile="c:\test.csv" label; run;

Send stop signal for command from user input in java programatically -

i executing simple command user gives options(args) , made logic args in java program in using wait() particular time command take minimum time execute.i saving data in file after that. within time if user wants end process ,should able stop process smoothly giving input "exit" in command prompt. please help. the standard way of interrupting command line program adding ctrl-c handler app: runtime.getruntime().addshutdownhook(new thread() { public void run() { // cleanup logic here } }); see question more details. since insist. here implementation when commands executed in background threads. hope complexity of example deter implementing it: import java.util.scanner; import java.util.concurrent.executorservice; import java.util.concurrent.executors; import java.util.concurrent.timeunit; public class shell { private static final int num_parallel_commands = 5; private static final int sleep_duration = 1000; public static void main(strin...

sql server - How to get output values from a MS SQL stored procedure using PHP? -

i have following stored procedure on ms sql server: create procedure checkfollowing ( @mymemberid int, @othermemberid int ) begin if exists (select 1 followers follower = @mymemberid , followed = @othermemberid) return 1 else return 0 end go in php code have method far: function iamfollowing($mymemberid, $othermemberid) { $query = "exec checkfollowing @mymemberid = ?, @othermemberid = ?"; $stmt = sqlsrv_query($this->con, $query, array(&$mymemberid, &$othermemberid)); $result = sqlsrv_fetch_array($stmt); return $result[0]; } as have realised now, can't return values sqlsrv_fetch_array() command. canøt seem figure out how fetch outpur value using php. know how achieve this? any gratly appreciated. solution create procedure checkfollowing ( @mymemberid int, @othermemberid int ) begin if exists (select 1 followers follower = @mymemberid , followed = @othermemberid) select 1 'output' els...

css - How to vertically align text within a table cell? -

i working on baseball scores website. have got head-to-head matchups table conference games. the home teams in table horizontally. away teams (like below) in table cell vertically. the name mississippi state makes table cell long top bottom. how alabama , auburn align bottom of table cell? i using html 5. placing valign="bottom" won't work html 5. <td> a<br> l<br> a<br> b<br> a<br> m<br> a<br> </td> <td> a<br> u<br> b<br> u<br> r<br> n<br> </td> <td> m<br> i<br> s<br> s<br> i<br> s<br> s<br> i<br> p<br> p<br> i<br> <br> s<br> t<br> a<br> t<br> e<br> </td> -------- edit ------ here's page working on: http://www.hitsnruns.com/pages/matchups/matchups.php -------- edit 3/30/16 ------- got figured out: http://www.hitsnruns.com/2016/head-to-h...

web services - Delphi XE6 - SOAP built with 'USE_INDY' connecting to a webservice over a proxy issue -

Image
i have application connects webservice using thttprio component. webservice has basic authentication. i've compiled delphi soap units using 'use_indy' directive in order thttprio component use winhttp. now need through proxy webservice. looking soap.soaphttptrans unit i've fixed bugs, not know how should set thttprio component through proxy. i've tried set proxy property of httprio.httpwebnode.proxy string like: http://user:pass@ip:port but 407 unauthorized error.... proxy application ccproxy.

javascript - How to avoid reentrancy in AngularJS? -

bootstrap selectpicker hides original select , creates additional element filling options select. when using ngoptions selectpicker doesn't automatically updates itself. so i've created directive listens ngoptions collection changes , calls element.selectpicker() it works fine if no filtering applied ngoptions. otherwise filering function returns new array each time called causes $watch callback fire recreates selectpicker. angular detects dom has changed , starts new digest cycle infinitely looping process. after 10 iterations angular expected throws exception. i need temporarily unsubscribe watch when creating selectpicker und later subscribe again when digest cycles finished. possible? update1 thougt little more , have idea try. filter defines factory returning filtering function can use captured array store filtered content - reference won't change listener fire when contents of collection changes. about temporarily stop watching: $watch retur...

sql - Select query to Access from VBA not returning duplicate values -

any issue appreciated. i trying retrieve access, means of select, multiple values same id , have pasted excel sheet. running code excel vba. the query using retrieve said values is: select role roles app_id=(select id apps name='app name'); which assigned variable , afterwards executed using set variable = cn.execute(variable) . problem query, executed excel vba, returns first value found. now, if run query access returns every value id specified app. i have tried tried using inner join, in, having, etc. wont retrieve of values excel. said, query works fine when used in access know must limitation in excel. thank guys can provide. assuming using adodb in excel, keep in mind execute function returns recordset . can loop through recordset see additional rows. set rng = activesheet.range("a2") set rst = cn.execute(strsql) rst while not .eof rng = cstr(!role) set rng = rng.offset(1) .movenext loop end ...

tsql - SQL Trigger Update After Insert -

i trying create trigger add calculated field 1 field after insertion. i've been playing around days , use set of eyes. basically, if field policynum empty , couple other parameters met, trigger fire, inserted function couple of housekeeping items. alter trigger policynumber on consolidated after insert begin if exists (select i.policynum, i.plancode inserted join consolidated c on c.id = i.id , c.seqn = i.seqn c.policynum = '' , c.plancode '%nyl%' ) declare @policynumber nvarchar(255) declare @imisid nvarchar(10) declare @seqid int exec @policynumber = [dbo].[fn_getnylpolicynumber] --updating record update consolidated set policynum = @policynumber, updatedby = 'trigger', updateddate = getdate() (id = @imisid) , (seqn = @seqid) end alter trigger policynumber on consolidated after insert begin if exists (select i.policynum, i.plancode inserted join consolidated c on c.id = i.id , c.seqn = i.seqn...

padding - PostgreSQL adds trailing zeros to numeric -

recently migrated db postgresql has columns defined numeric(9,3) , numeric(9,4) . in testing app have found when data saved these columns there trailing zeros being added value inserted. using hibernate, , logs show correct values being built prepared statements. an example of data inserting 0.75 in numeric(9,3) column , value stored 0.750 . example numeric(9,4) column: insert value 12 , db holding 12.0000 . i found related question: postgresql numeric type without trailing zeros . did not offer solution other quote 9.x documentation saying trailing zeros not added. question, answer quoted docs (which have read) said: numeric values physically stored without leading or trailing zeroes. thus, declared precision , scale of column maximums, not fixed allocations. however, question poster, see trailing zeros being added. raw insert generated hibernate in logs not show baggage. assuming postgresql thing have not set correctly, can't find how got wrong. ...

java - Implementing Pseudo-Code for Multikey Sort -

the idea sort list of objects each hold 2 key values. the pseudocode preform such algorithm given me so: to sort list of objects more 1 key each key position p, least significant significant key establish 1 queue each of key values each object o in list, place o in queue corresponding key or o in position p end end end i not know how translates code, i'm having hard time understanding psuedo code. lets have this: class main(){ sorter.build(); sorter.sort(); } class sorter(){ public static arraylist<lyrics> deck = new arraylist<>(); public void build(){ //add.card objects arraylist deck } public void sort(){ // how begin sort? } class card(){ public string suite; public string rank; public card(string s, string r){ suite = s; rank = r; }

php - Can't get variables to work in WPDB UPDATE query -

i've tried can query not work. i've tried prepare, adding ' both variables, adding ' set variable, using springf, using formatted string both values inserted %s, nothing works. i've spent whole night on , right feel crying. this query works when hard-code values or paste dump directly in phpmyadmin. $trans = strval($_post["trans"]); $status = strval($_post["status"]); global $wpdb; $wpdb->show_errors; $query = "update donations set donation_status='".mysql_real_escape_string($status)."' donation_reference = '".mysql_real_escape_string($trans)."'"; $result = $wpdb->query($query); $wpdb->print_error; exit( var_dump( $wpdb->last_query ) ); another funny thing query works when replace first 2 lines hard-coded values, like: $trans = "12345678"; $status = "transaction successful"; but long values read $_post variables, query doesn't work. i'm using...

c# - error in automapper with child type -

i'm having error during automapper in win app in c# row: config.createmap<t432, proc>() .formember(d => d.tipo.cod_tipo , o => o.mapfrom(s => s.cod_tipo)) the error : expression 'd => d.tipo.cod_tipo' must resolve top-level member , not child object's properties. use custom resolver on child type or aftermap option instead.\r\nnome parametro: lambdaexpression"} where class t432 { public string cod_tipo { get; set; } } class proc { public tipo_proc tipo { get; set; } } class tipo_proc { public string cod_tipo { get; set; } } how correct automapper? thanks in advance you need use custom type converter automapper cannot configure "nested" objects , sets top level properties, take @ example on automapper site https://automapper.codeplex.com/wikipage?title=custom%20type%20converters here example: mapper.createmap<string, datetime>().convertusing(new datetimetypeconverter()); public...