This file contains 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
/** | |
* Used to read a delimited file. | |
*/ | |
public class SSSCsvReader { | |
private String delim = ','; | |
// the input data | |
private String[] buffer; | |
public SSSCsvReader(String data){ | |
this.buffer = data.split('\n'); |
This file contains 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
@isTest | |
private class SSSCsvReaderTest { | |
static testmethod void testSplitCsvSimple(){ | |
String line = 'abc,efg'; | |
String[] splitted = new SSSCsvReader(line).readLine(); | |
System.assertEquals(2, splitted.size()); | |
System.assertEquals('efg', splitted[1]); | |
System.assertEquals('abc', splitted[0]); | |
} |
This file contains 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
/** | |
* Used to read a delimited file. | |
*/ | |
public class SSSCsvReader { | |
private String delim = ','; | |
// the input data | |
private String[] buffer; | |
public SSSCsvReader(String data){ | |
this.buffer = data.split('\n'); |
This file contains 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
/// <summary> | |
/// Static class containing utilities to decrypt strings encrypted with the SLX RW EL | |
/// </summary> | |
public class SlxRwEl | |
{ | |
/// <summary> | |
/// Decode the specified data. | |
/// </summary> | |
/// <param name="data"></param> |
This file contains 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
@isTest | |
private class SSSCsvReaderTest { | |
static testmethod void testSplitCsvSimple(){ | |
String line = 'abc,efg'; | |
String[] splitted = new SSSCsvReader(line).readLine(); | |
System.assertEquals(2, splitted.size()); | |
System.assertEquals('efg', splitted[1]); | |
System.assertEquals('abc', splitted[0]); | |
} |
This file contains 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
<?php | |
// Execute with php -S 0.0.0.0:3000 to serve API | |
// And point the client to http://localhost:3000/cors-proxy.php/api | |
// | |
$path = $_SERVER['PATH_INFO']; | |
$base_url = MY_BASE_URL; | |
$url = $base_url . $path; | |
if(isset($_SERVER["QUERY_STRING"])) { | |
$url = $url . '?' . $_SERVER["QUERY_STRING"]; |
This file contains 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
var http = require('http'); | |
var stdin = process.openStdin(); | |
const PORT = 8080; | |
function handleRequest(request, response) { | |
console.log('Incoming request...'); | |
body = ''; | |
request.on('data', function(chunk) { | |
body += chunk; | |
}); |
This file contains 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
// build a switch function that examines a key/value collection based on an object literal, | |
// and return the first match | |
// | |
// Example usage: | |
// ``` | |
// const result = switchBy({ | |
// entering: 'A', | |
// entered: 'B', | |
// default: 'C' | |
// })(props) |
This file contains 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
#set($stringObjectName = "${pagegenerator.FormName}${qfcontrol.ControlId}_Strings") | |
## -----------Column and Grid macros ----------------------------------------------- | |
#macro(doDefaultColParts $col) | |
field: '$col.DataField', | |
#if($col.TextFormatString != "") | |
displayFields: ['$col.DataField'], | |
displayFormatString: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("FormatString"))'] || '$col.TextFormatString', | |
#end | |
#doHideCondition($col) | |
label: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("ColumnHeading"))'] || '$col.ColumnHeading', |
This file contains 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
define(['Sage/UI/Dashboard/DashboardPage', 'dojo/aspect', 'dojo/query', 'dojo/dom-construct', './MultiSelectDropdown', './PicklistDataStore'], | |
function (DashboardPage, aspect, query, domConstruct, MultiSelect, PicklistDataStore) { | |
var _portalAccess = undefined; | |
aspect.after(DashboardPage.prototype, '_editOptionsMenu', function () { | |
var trButtons = query('.dijitDialog .edit-options-table > table > tbody > tr'); | |
if (trButtons.length == 0) { | |
console.warn('Unable to find options dialog'); | |
return; | |
} |
NewerOlder