This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Edit-XmlNodes { | |
| param ( | |
| [xml] $doc = $(throw "doc is a required parameter"), | |
| [string] $xpath = $(throw "xpath is a required parameter"), | |
| [string] $value = $(throw "value is a required parameter"), | |
| [bool] $condition = $true | |
| ) | |
| if ($condition -eq $true) { | |
| $nodes = $doc.SelectNodes($xpath) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Written by Assil Ksiksi | |
| # Date: Thursday, December 29th, 3:12 am (GMT +4) | |
| # I basically wrote this to determine whether or not a pattern exists in the products of the digits | |
| # of all 5-digit numbers. Sadly, none exist, or at least I didn't see one. | |
| # Runtime is fairly slow. It takes 1.05916786194s for all 5-digit numbers. I don't see how it | |
| # can be optimized, so that should do the trick. | |
| # References: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getJSON(aUrl,sheetname) { | |
| //var sheetname = "test"; | |
| //var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json"; | |
| var response = UrlFetchApp.fetch(aUrl); // get feed | |
| var dataAll = JSON.parse(response.getContentText()); // | |
| var data = dataAll.value.items; | |
| for (i in data){ | |
| data[i].pubDate = new Date(data[i].pubDate); | |
| data[i].start = data[i].pubDate; | |
| } |
NewerOlder