Pages

Monday, November 15, 2021

Fetch Folder name in php

 <?php


    $path ="indus-img";
    $contents = scandir($path);


    $new_src=$contents[2];
    $count=count($contents);
    echo $new_src;
    echo $count;
 


?>

Fetch Json Data in JAVASCRIPT

 <script>

    fetch('./data.json')
    .then(function(resp){
        return resp.json();
    })
        .then(function(data){
        console.log(data.items[p].name.substr(7));
        content=data.items[p].name.substr(7)


        

    });
  

</script>

Friday, November 12, 2021

Google Sheets Create Json Api

function doGet(e) {
  var sheet = SpreadsheetApp.getActive();
  var nse = sheet.getSheetByName("NSEE");
  var data =[];
  var rlen=nse.getLastRow();
  var clen=nse.getLastColumn();
  var rows = nse.getRange(1,1,rlen,clen).getValues();
  for(var i=1;i<rows.length;i++ ){
    var datarowrows[i];
    var record ={};
    for (var j=0;j<clen;j++){
      record[rows[0][j]] = datarow[j];

    }
    data.push(record);
  }
  console.log(data);
  var result = JSON.stringify(data);
  return ContentService.createTextOutput(result).setMimeType(ContentService.MimeType.JSON);
  
 }

KeyPoints-Series-1

  The Android architecture has the Main Thread AKA UI thread, which updates the UI after every  16ms  frame.