Wednesday, 24 May 2023

starting ssh in windows

 if you are getting the following error when you are trying to turn on SSH service via following command in power shell

>> Start-Service ssh-agent

Start-Service : Service 'OpenSSH Authentication Agent (ssh-agent)' cannot be started due to the following error:
Cannot start service ssh-agent on computer '.'.
At line:1 char:1
+ Start-Service ssh-agent


Solution :/

setting the service to start manually.

 Start power shell in admin mode.

> Get-Service -Name ssh-agent | Set-Service -StartupType Manual
>then start the service
>  Start-Service ssh-agent

Monday, 11 October 2021

Making local machine as hub server

 open command prompt


open the drive where u have downloaded the standalone server file


Lets say E:

E:\java -jar selenium-server-standalone-3.141.59.jar -role hub



Copy the node link and clients link

Nodes should register to http://192.168.192.1:4444/grid/register/

Clients should connect to http://192.168.192.1:4444/wd/hub


Monday, 1 March 2021

Google Sheets - Dependent Drop Down List for Entire Column, Multiple Levels

 

  var mainWsName = "Master";
  var sourceWsName = "Slave";

    var firstLevelColumn = 1;
   var secondLevelColumn = 2;
   var thirdLevelColumn = 3;
  var ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(mainWsName);
  var wsOptions = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sourceWsName);

  var optionswsOptions.getRange(2,1,wsOptions.getLastRow()-1,3).getValues();
 

/*function myFunction() {

  var list = ["a","b","c"];
  var cell = ws.getRange("C2");
  applyValidationToCell(list,cell);
}*/


function onEdit(e){
  var activeCell=e.range;

  var valactiveCell.getValue();
  var r=activeCell.getRow();
  var c =activeCell.getColumn();
  var wsNameactiveCell.getSheet().getName();
  if (wsName === mainWsName && c === firstLevelColumn && r > 1){
applyFirstLevelValidation(val,r);
else if(wsName === mainWsName && c === secondLevelColumn && r > 1){}
applySecondLevelValidation(val,r);

}

function applyFirstLevelValidation(val,r){
  
  if (val === ""){
  ws.getRange(r,secondLevelColumn).clearContent();
  ws.getRange(r,secondLevelColumn).clearDataValidations();
 
}else{
ws.getRange(r,secondLevelColumn).clearContent();
  var filterOptions=  options.filter(function(o){return o[0]=== val});
  var listToApply = filterOptions.map(function(o){return o[1]});

var cell = ws.getRange(r,secondLevelColumn);
  applyValidationToCell(listToApply,cell);}
}

function applySecondLevelValidation(val,r){
  
  if (val === ""){
  ws.getRange(r,thirdLevelColumn).clearContent();
  ws.getRange(r,thirdLevelColumn).clearDataValidations();
 
}else{
ws.getRange(r,thirdLevelColumn).clearContent();
var firstLevelColValuews.getRanger,firstLevelColumn).getValue();
  var filterOptions=  options.filter(function(o){return o[0]=== firstLevelColValue && o[1] === val});
  var listToApply = filterOptions.map(function(o){return o[2]});
  
var cell = ws.getRange(r,thirdLevelColumn);
  applyValidationToCell(listToApply,cell);}
}

function applyValidationToCell(list,cell) {

  var rule=SpreadsheetApp
  .newDataValidation()
  .requireValueInList(list)
  .setAllowInvalid(false)
  .build();
  
  cell.setDataValidation(rule);
}

Sunday, 14 February 2021

Taking uniqure value from three different columns

 =UNIQUE({K5:K80;L5:L80;M5:M80})

sort in ascending order the transponsed unique dates

 =TRANSPOSE(sort(UNIQUE($L$2:$L$5001),1,true))

Importrange to import large data

 =QUERY({IMPORTRANGE("1ZTtsquwfJIlTJisS7gD_13u4Evfcz4Nr-T9N9p3-SYQ/edit#gid=847332267","Action Data!$A$23000:$H$54002");

IMPORTRANGE("1ZTtsquwfJIlTJisS7gD_13u4Evfcz4Nr-T9N9p3-SYQ/edit#gid=847332267","Action Data!$A$54003:$H$78005")}, 

"select Col2,Col4,Col5,Col8 where Col1='"&B32&"' and Col3= '"&B11&"' and Col2 >= Date '"&TEXT(A2,"yyyy-MM-dd")&"' and Col2 <= Date '"&TEXT(B2,"yyyy-MM-dd")&"'")

How to use Google query with "order by"

 =QUERY(IMPORTRANGE("1ZTtsquwfJIlTJisS7gD_13u4Evfcz4Nr-T9N9p3-SYQ/edit#gid=620793866","Call Data!$B$20000:$K$40000"),"select Col4,Col5,Col10 where Col1= '"&B40&"'and Col4 >= Date '"&TEXT(A2,"yyyy-MM-dd")&"' and Col4 <= Date '"&TEXT(B2,"yyyy-MM-dd")&"' order by Col4",0)

Wednesday, 25 November 2020

How to custom_complier, Hspice and Wave_view on CMC server

$ source /CMC/scripts/synopsys.hspice.2020.03.csh 

 command for invoke the tool is      hspice

 

$ source /CMC/scripts/synopsys.waveview.2017.12-SP1.csh 

or 

$source /CMC/scripts/synopsys.wv.2020.03.csh

 command for invoke the tool is    sx

 

$ source /CMC/scripts/synopsys.customcompiler.2020.03-SP2-1.csh

  command for invoke the tool is  

custom_compiler -tcl /CMC/tools/synopsys/custom_compiler_vQ-2020.03-SP2-1/customcompiler/Q-2020.03-SP2-1/.ccompiler.tcl





How to run CASPass on Linux machine

 /CMC/apps/CADpass-v3/APPGclnt-single/bin/agclient

 

 Enter CMC login and Password, (check your university / Supervisor for activation)


double click on "Activate this workstation"