Posts

tfs2013 - Create bug on failed release -

i have customized xaml tfs build building sql server project , it's deploying .dacpac file target database. in case of failure build creating bug in tfs. i'd move "deploy" part tfs build release management area. it's possible accomplish same result tfs release management? in case of release failure automatically create bug in tfs. update 1: referring vnext templates. out of box? no. you write powershell script or .net application uses tfs api create bug, call in "rollback always" block within rm release template, though.

javascript - Sum all properties in object -

i have following object: {"speed":299,"equipment":49,"teleabb":49,"additional":50,"optional":"299"} i want sum values , print out. how can sum properties values? :) iterate on object properties using for(var in) use parseint since of integers in string form var obj = {"speed":299,"equipment":49,"teleabb":49,"additional":50,"optional":"299"}; var sum = 0; for(var key in obj){ sum += parseint(obj[key]); } document.write(sum);

magento - Creation of bundle products in a loop -

i have loop create several bundle products programmatically. creation of new bundles works fine, if have existing bundle , try add/remove options, fails. if run import code first time, bundles created. second time, options removed , last bundle of array has options set. $ids = [8663,8665,8664]; foreach ($ids $id) { createbundle($id); } function createbundle($id) { mage::unregister('product'); try { $bundleproduct = mage::getmodel('catalog/product')->load($id); mage::register('product', $bundleproduct); // try assigned options , remove them $selectioncollection = $bundleproduct->gettypeinstance(true)->getselectionscollection( $bundleproduct->gettypeinstance(true)->getoptionsids($bundleproduct), $bundleproduct ); // remove assigned options // works fine foreach ($selectioncollection $option) { $optionmodel = mage::getmodel('bu...

sql - How to find list of tables used in stored procedure without "With (nolock)" words -

i have large table data , each table need end statement (nolock) @ end , please me find in stored procedure. example: if store-procedure used 2 tables , b , 1 table b doesn't end (nolock) need return following details. sp_name,table_name if understand correctly, looking store procedure names have nolock keyword: select routine_name, routine_definition information_schema.routines routine_definition '%nolock%' , routine_type='procedure'

user interface - Creating a vertically draggable container in Adobe Flex 3.5 -

i attempting create container can drag bottom edge down increase height of container. cannot find container default or 1 apply functionality setting property (resizable="true"). the vdividedbox has dragging functionality similar looking for, however, can used drag divider located between 2 panels within preset height, cannot increase height of vdivivdedbox need happen. i have found few examples use wrapper class wraps uicomponent implement dragability. however, trying avoid adding several different classes achieve effect. the source code below uses mx:hbox contain , display text, however, willing use different container if allows me implement vertical dragability need. if has solution, or link solution, greatful. .... <?xml version="1.0" encoding="utf-8"?> <mx:windowedapplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="750" width="1080" xmlns:a...

java - Using intent between activities, in reverse - Android -

i quite new android programming (aswell java in general) , have run issue has me stumped. building basic app (for practice) accesses built website www.shodan.io . far know there no android app particular site yet , quite enjoy research. have app has 4 activities, of load beautifully (after stack forums). are: loadingpage, mainactivity, searchpage, , exploitsearch. on mainactivity, have webview display different pages, buttons switch between, logos, etc. search , exploit buttons each load respective pages without issue. question/problem. i have search , exploit activities take input (which purpose), save said input string, accessible mainactivty , used search query url. my search far has turned many forums telling how take data activity1 , have readable activity2 using "intent". however, cant seem find resources doing reverse, or saving string (maybe in temp file, , preferably can recalled later... kinda "input"+\n not overwritten) thank time (ps. let me k...

python - How to slice middle element from list -

rather simple question. have list like: a = [3, 4, 54, 8, 96, 2] can use slicing leave out element around middle of list produce this? a[some_slicing] [3, 4, 8, 96, 2] were element 54 left out. would've guessed trick: a[:2:] but result not expected: [3, 4] you cannot emulate pop single slice, since slice gives single start , end index. you can, however, use 2 slices: >>> = [3, 4, 54, 8, 96, 2] >>> a[:2] + a[3:] [3, 4, 8, 96, 2] you wrap function: >>> def cutout(seq, idx): """ remove element @ `idx` `seq`. todo: error checks. """ return seq[:idx] + seq[idx + 1:] >>> cutout([3, 4, 54, 8, 96, 2], 2) [3, 4, 8, 96, 2] however, pop faster . list pop function defined in listobject.c .