Posts

excel - IF AND statement where all three conditions are met -

i have if , statement using . i trying ensure conditions met true. failing @ . please see formula below: =if(and(e5="yes",f5="closed",and( g5="no")),"found guy","that isn’t him") problem : above formula not returning correct value. example above formula should return "found guy" ie conditions have been satisfied. you not need have more 1 and. if true, , statement true. =if(and(e5="yes", f5="closed", g5="no"),"found guy","that isn’t him")

windows batch: echo a multi-line variable with special characters (JiraRelease Notes from jenkins) -

i using jiraplugin in jenkins produe releasenotes , build job in jenkins uses batch files. in executed batch file, when issue set , can see varibale exists jira release notes. multi-line , starts # character. my goal echo %release_notes_jenkins% > releasenotes.txt but never works. tried using !! instead of %% around variable not work. echo off. when try echo variable. again, set show correct content: release_notes_jenkins=# new feature - [xxxx-3525] blahblahblah - [xxxx-3268] blahblahblah - [xxxx-3119] blahblahblah # unknown - [xxxx-3545] [security] blahblahblah ... jenkins runs on windows 7 server. specific windows batch (cmd.exe) since piping variable file works when jenkins runs on linux environment. any idea on how make work? try set release_notes_jenkins > releasenotes.txt instead of echo .

twitter bootstrap - how can i concatenate multiple classes with css? -

i have these bootstrap classes , want concatenate each 1 li, there best option add li before each class? mean, way group bootstrap classes , concatenate li. .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 in case want these four: li .col-xs-4 li .col-sm-4 li .col-md-4 li .col-lg-4 prefer generally. i think you're looking this. li[class*='col-'], li[class^='col-'] { ... } remember not include space between li , [class*='col-'] . combination of 2 selector...

Arithmetic operation on all elements in BASH array -

say have bash array integers: declare -a arr=( 1 2 3 ) and want arithmetic operation on each element, e.g. add 1. there altenative loop: for (( i=0 ; i<=${#arr[@]}-1 ; i++ )) ; arr[$i]=$(( ${arr[$i]} + 1 )) done i have tried few options: arr=$(( ${arr[@]} + 1 )) fails, while arr=$(( $arr + 1 )) results in echo ${arr[@]} 2 2 3 thus first (zeroth) element being changed. i read awk solutions, know if bash arithmetics support such batch operations on each array element. i know question not fresh new can accomplish want declaring array integer , applying substitution: declare -ia arr=( 1 2 3 ) value=1 declare -ia 'arr_added=( "${arr[@]/%/+$value}" )' echo "arr_added: ${arr_added[*]}" value=42 declare -ia 'arr_added=( "${arr[@]/%/+$value}" )' echo "arr_added: ${arr_added[*]}" it outputs: arr_added: 2 3 4 arr_added: 43 44 45 you can perform other math operations well: value=3 declar...

java - Error when trying to implement amazon mturk SDK into android studio project -

i trying implement amazon's mechanical turk android app. have followed instructions: http://docs.aws.amazon.com/awsmechturk/latest/awsmechanicalturkgettingstartedguide/creatingahit.html#java when specifying third party .jar files, gives me error:gradle: execution failed task ':app:dexdebug'. com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command '/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home/bin/java'' finished non-zero exit value 1 i have tried taking out every combination of .jar files , found out jaxrpc.jar file causing error. without file, error when running project is: exception in thread "main" java.lang.noclassdeffounderror: javax/xml/rpc/serviceexception @ com.example.mturk.homeworkrequest.<init>(homeworkrequest.java:20) @ com.example.mturk.homeworkrequest.main(homeworkrequest.java:39) @ sun.reflect.nativemethodaccessorimpl.invoke0(nat...

Python add string to list while adding list items (iterating) -

this partially working: list = ["abc %d" % d d in range(1, 1000)] but need like: list = ["a %value% bc %d" % d d in range(1, 1000) foreach %value%] %value% should 20 value list or something. can me fix code? would work? list = ["a %s bc %d" % (v, d) d in range(1, 1000) v in value]

javascript - Array.push() and console.log() gives different variables -

i want modify this var array = [{"host": ["example.com", "www.example.com"], "from": "test1", "to": "test2"}, {"host": ["example.net", "www.example.net"], "from": "test3", "to": "test4"}]; into on chrome 43.0.2357.134 m [{"host": "example.com", "from": "test1", "to": "test2"}, {"host": "www.example.com", "from": "test1", "to": "test2"}, {"host": "example.net", "from": "test3", "to": "test4"}, {"host": "www.example.net", "from": "test3", "to": "test4"}]; i used code array.foreach(function(rule){ rule.host.foreach(function(host){ var tmp = rule; tmp.host = host; res...