nested

Nested IF statement

放肆的年华 提交于 2019-12-11 04:14:48
问题 The following is something I have tried after some research on nested IF's however it only gives expected results for the first part of the statement and not the remainder, can anyone explain why or do I need a different type of function? =if(h4="basic","basic",if(g17>=500,"Standard",if(h4="standard","Standard",if(g17>=750,"Standard+",if(g17<=500,"Basic",if(h4="Standard+","standard+",If(g17<=750,"Standard",if(g17>=850,"Platinum",if(h4="Platinum","Platinum",if(g17<=850,"Standard+","Platinum"))

Evaluate a path string which contains a nested movieclip in AS3

牧云@^-^@ 提交于 2019-12-11 04:13:21
问题 This should be fairly simple but I understand why it doesn't work. I am hoping there is a clever way to do the following: I have a string 'movieclip1.movieclip2' I have a container movieclip - Container. Now to evaluate the string normally I would look something like: this.container['movieclip']['movieclip2'] Because clip2 is a child of movieclip. But I would like to parse or evaluate the string with the dot syntax to read the string as a internal path. this.container[evaluatedpath]; // which

APNS PHP JSON Payload structure

这一生的挚爱 提交于 2019-12-11 04:09:29
问题 I am sending push notifications via a PHP script to connect to APNS server. Everything is working fine when I use the below payload structure. $body['aps'] = array( 'alert' => $message, 'badge' => $badge, 'sound' => 'default' ); $payload = json_encode($body); However, I need to add more parameters to the 'alert' element as well as want to add some more custom parameters. The way I do is is as follows, but APNS is not accepting the JSON. Is it a problem with my JSON creation method in PHP?

Writing nested dictionary (forest) of a huge depth to a text file in BFS style

纵然是瞬间 提交于 2019-12-11 04:07:34
问题 Continued to my older question: Writing nested dictionary (forest) of a huge depth to a text file Now I want to write the forest traversal in the BFS style: I have a huge depth dictionary that represents forest (many non-binary trees) which I want to process the forest and create a text file with the sequences of (father, son) relations from the forest, i.e. given the dictionary: {'a': {'b': {'c': {'x': {}}, 'd': {'p': {}}}, 'g': {}, 'f': {}}, 't': {'r': {'o': {}}, 'y': {}}} the generated

Two fixed factors nested and crossed factors in R

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:47:45
问题 I want to design a nested model. It is kind of difficult to explain so I drew a picture. All of the factors are fixed and there are 2 levels (0, 1) in each of them. A and B have nested factors C and D. E and F are independent with these guys and are crossed all over. I would like to know the interactions between them. I know that I can do this in R, for one nested factor: out <- lm(Y ~ A + A/B) But how can I do it when there are several nested factors, and there are other independent factors?

How to access data of nested objects in boost::spirit::karma?

回眸只為那壹抹淺笑 提交于 2019-12-11 03:45:30
问题 In an ItemList containing lists of Item objects, how do I access the Item objects in the generator? The following sample code compiles on VC9 (with boost include and link directories set apropriately). I don't know how to set up list_generator::item . #include <boost/config/warning_disable.hpp> #include <boost/foreach.hpp> #include <boost/assign/list_of.hpp> #include <boost/range/adaptors.hpp> #include <boost/range/algorithm.hpp> #include <boost/spirit/include/qi.hpp> #include <boost/spirit

jQuery tabs within tabs not showing correctly

大城市里の小女人 提交于 2019-12-11 03:37:53
问题 I have custom javascript code for tabs which works fine, but Im trying to put children tabs within, shown here: <div id="tabs" style="position:relative; "> <ul id="nav"> <li><a href="#prizes">Prizes</a></li> <li><a href="#basket">Your sack</a></li> <li><a href="#order-history">Order History</a></li> </ul> <div id="tab-prizes" class="tab"> <?php include('prizes.php');?> </div> And then within the prizes.php file: <div id="tabsprizes" style="position:relative; "> <ul id="nav1"> <li><a href="

VBA EXCEL Multiple Nested FOR Loops that Set two variable for expression

前提是你 提交于 2019-12-11 03:29:48
问题 Ok so I’ve done a good deal of searching found some and played and little. I cannot seem to get these loops to work fully I can get on part or another but not the whole. As is the first loop works fine then it goes wonky. T is the destination for the expression output t.Value = time1 - time2 Y is a set time and date that does not change = time1 X is time and date and has to be extracted from the range in the same column as the corresponding y . x= time 2 I have uploaded the corresponding

LISP - How to get the average length for nested lists?

白昼怎懂夜的黑 提交于 2019-12-11 03:29:32
问题 I have a problem. I need to get average length from this list: (1 (2 3 4) 5 (6 7) 8 (9)) . It should be 2. And I have no idea where to start... I tried to get (1 2 3 4 5 6 7 8 9) from (1 (2 3 4) 5 (6 7) 8 (9)) but I failed, because (reduce #'append list-name) isn't working. I have idea how to calculate this but I need to get all lists inside (1 (2 3 4) 5 (6 7) 8 (9)) like this: list1 = (1 5 8) list2 = (2 3 4) list3 = (6 7) list4 = (9) But I don't know how. Can u give me some help? 回答1: (defun

Summation of specific items in a nested list

戏子无情 提交于 2019-12-11 03:16:35
问题 I have a data file such as: 1 123 something else 2 234 something else 3 500 something else . . . 1 891 something else 2 234 something else 3 567 something else . . . I am trying to end up with a file with: 1 1014 2 468 3 1067 That is, add the numbers in column 2 (or some other column) if the number in column 1 is the same. I believe reading the columns into a nested list and proceeding from there is the way to go but I have been struggling with that. Another approach I tried was creating a