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
/* file uploading */ | |
$config['upload_path'] = './uploads/intro/'; | |
$config['allowed_types'] = 'gif|jpg|png'; | |
$config['encrypt_name'] = true; | |
$this->load->library('upload', $config); | |
if ($this->upload->do_upload('file_to_upload')) | |
{ $file_data = $this->upload->data(); | |
` $file_name = $file_data['file_name']; | |
} |
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
<!--HTML --> | |
<div class="owl"> | |
<div class="hand"></div> | |
<div class="hand hand-r"></div> | |
<div class="arms"> | |
<div class="arm"></div> | |
<div class="arm arm-r"></div> | |
</div> | |
</div> | |
<div class="form"> |
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
function myFunction() { | |
var exString="My Name is Franklin" | |
var numExample=107 % 97 | |
Logger.log(exString[1]) | |
//var exSqrt=Math.sqrt(numExample) | |
var examLog= Math.log(numExample) | |
//Logger.log(exSqrt) | |
Logger.log(examLog) | |
} |
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
/* | |
This function renders the html file | |
*/ | |
function doGet(event){ | |
Logger.log(event); | |
return HtmlService.createHtmlOutputFromFile('page'); | |
} | |
function userClick(name){ |
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
/* | |
This function renders the html file | |
*/ | |
function doGet(event){ | |
return HtmlService.createTemplateFromFile("page").evaluate(); | |
} | |
function userClick(Userinfo){ |
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
/* | |
A function to copy data from one SpreadSheet to another Spreadsheet | |
*/ | |
function CopyDataToNewFile() { | |
var sss = SpreadsheetApp.openById('1beVqbhcXrDTUNDiqbgO9Q-VgXau6ixOOc03BMTNFCqM');//Source spreadsheet ID | |
var ss = sss.getSheetByName('Data'); | |
var SRange = ss.getDataRange(); | |
var SData = SRange.getValues(); | |
var tss = SpreadsheetApp.openById('1aSXgCJfsEtSZfVQJcfZmwWod2xQbds5PHHTX5_O6rFU');//Target spreadsheet ID |
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
function shouldRunTrigger() { | |
var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; | |
var date = new Date(); | |
var day = days[date.getDay()]; | |
var hours = date.getHours(); | |
if ((day === "Fri" && hours >= 17) || (day === "Sat" && hours <= 22)) { | |
return false; | |
} | |
return true; | |
} |
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
function onEdit(event) { | |
var sheet = event.source.getActiveSheet(); | |
var range = event.source.getActiveRange(); | |
// move | |
if (sheet.getName() == 'Problems' && range.getColumn() == 12 && range.getValue() == 'Resolved') { | |
var row = range.getRow(); | |
var numColumns = sheet.getLastColumn(); | |
var tRange = sheet.getRange(sheet.getLastRow() + 1, 1, 1, numColumns); | |
tRange.setValues(sheet.getRange(row, 1, 1, numColumns).getValues()); | |
tRange.setBackgroundColor('#99ccff'); |
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
I wrote a test function to read ACTIVE sheet values and write different vendor reports in separate sheets. If you wanna know more about my code, let me know in comment. | |
function test() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var values = sheet.getDataRange().getValues(); | |
// remove header row values from array | |
values.shift(); | |
// will be months present in data |
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
function deleteRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var values = sheet.getDataRange().getValues(); | |
values.forEach(function(v, i) { | |
// get row index | |
var row = i+1; | |
// look for required values in cells | |
if (v[14] == '' && v[6] == 'PREBOOKED') { | |
// might have to modify this line based on Sheets API |
OlderNewer