I hereby claim:
- I am jsdbroughton on github.
- I am jsdbroughton (https://keybase.io/jsdbroughton) on keybase.
- I have a public key ASD9MDNNldvt4eBSV4q3hnncrfpiyp12bKkCxXekFyxrPQo
To claim this, I am signing this object:
| const uniqueIds: Set<number> = new Set(); | |
| let lastId = 1; | |
| // All treeviewItems | |
| treeItems.forEach( ( item ): void => { | |
| if ( item && item.data ) { | |
| uniqueIds.add( item.data.uniqueId ); | |
| lastId += 1; | |
| } | |
| }); |
| [{ id: 6, name: `A`, children:[ | |
| { id: 7, name:`00`, children: [ | |
| { id: 8, name:`Retail`, children:[ | |
| { id: 1, name: `1`, data:{ uniqueId:99, building:`A`, floor:`00`, zone:`Retail`, mark:`1` } } | |
| ] } | |
| ] }, | |
| { id: 9, name:`01`, children: [ | |
| { id: 10, name:`Commercial`, children:[ | |
| { id: 2, name: `1`, data:{ uniqueId:22, building:`A`, floor:`01`, zone:`Commercial`, mark:`1` } } | |
| ] } |
| [ | |
| {id:1, data: {uniqueId:16, building:`A`, floor:`00`, zone:`Retail`}}, | |
| {id:2, data: {uniqueId:32, building:`A`, floor:`01`, zone:`Commercial`}}, | |
| {id:3, data: {uniqueId:64, building:`A`, floor:`02`, zone:`Commercial`}}, | |
| {id:4, data: {uniqueId:128, building:`A`, floor:`02`, zone:`Commercial`}}, | |
| {id:5, data: {uniqueId:256, building:`B`, floor:`03`, zone:`Residential`}} | |
| ]; |
I hereby claim:
To claim this, I am signing this object:
| // IfcGuid | |
| // ---------------------------------------------------------------------------- | |
| // This class is a service class providing methods to generation and conversion | |
| // between compressed and uncompressed string representations of GUIDs | |
| // according to the algorithms used by the Industry Foundation Classes (IFC). | |
| // The algorithm is based on an implementation in c as follows: | |
| // originally proposed by Jim Forester. | |
| // implemented previously by Jeremy Tammik using hex-encoding | |
| // Peter Muigg, June 1998 | |
| // Janos Maros, July 2000 |
| /** | |
| * Returns an array of indirect single cell references from different sheets. | |
| * @param {A2:A} sheets The column containing sheets' names. | |
| * @param {"E1"} ref The range to return from each sheet. | |
| * @param {string} key Value to match | |
| * @param {int} column The column from which to return a value | |
| * @param {int} headers The number of header rows to ignore in the lookup range | |
| * @customfunction | |
| */ | |
| function ILOOKUP(sheets, ref, keys, column, headers) { |
| /** | |
| * Returns a sum for each row of a given array. | |
| * @param {range} range The range or array to sum. | |
| * @customfunction | |
| */ | |
| function ROW_SUM(range) { | |
| if (!range.map) { | |
| range = [[range]]; // deal wih single cell ranges. | |
| } |
| /** | |
| * Returns an array of indirect single cell references from different sheets. | |
| * @param {A2:A} sheets The column containing sheets' names or an array of sheet names | |
| * @param {"E1:E50"} range The single column range reference to totalise from each sheet. | |
| * @customfunction | |
| */ | |
| function INDIRECT_SUM(sheets, range) { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(), | |
| result = []; |
| function findDateCellWithinADataRow() { | |
| // Assumes an embedded script. | |
| var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
| // Pretend this is the way you want to get teh data | |
| // perhaps from the Google Form submission event. | |
| var row = ss.getRange(rowId, 1, 1, ss.getLastColumn()); | |
| var rowValues = row.getValues()[0]; | |
| if (!Array.prototype.transpose) { | |
| Array.prototype.transpose = function() { | |
| return this.reduce(function(array, next) { | |
| return next.map(function(item, i) { | |
| return (array[i] || []).concat(next[i]); | |
| }); | |
| }, []); | |
| } | |
| } |