Tuesday, June 11, 2019

WD / Powershell

WD
Spotfire SQL
--SELECT * FROM TMP_MVX_REPORT_SQL_LOG order by REG_TIMESTAMP desc 
--Press ctrl + c to copy sql




#IMPORTANT AND CONCERNS
# -Set the $percentCritcal and $percentWarning basing on requirements
# -$Users: Set the user names for email notification
# -$reportPath : Set the report path basing on the location where you want to store the reports
# -$computers: refer the location Servers.txt in which all the machine names added to monitor
# -$smtpServer: set the SMTP server which you want to use for email notitifcation
#*********************************************************#

# Continue even if there are errors
$ErrorActionPreference = "Continue";

# Set your warning and critical thresholds
$percentWarning = 25;
$percentCritcal = 10;

# EMAIL PROPERTIES
 # Set the recipients of the report.
 $users = "Tan.ChengKean@wdc.com,NobleKing.Constantin@wdc.com,MOHAMMAD.NAZMUL.HUDA.RUBOL.CHOWDHURY@wdc.com,Abhishek.KumarAshu@wdc.com"; 
  

# REPORT PROPERTIES
 # Path to the report
  $reportPath = "D:\Diskspace\Logs\";  # set the location on wehere you want to store the reports

 # Report name
  $reportName = "DiskSpaceRpt_$(get-date -format ddMMyyyy).html";

# Path and Report name together
$diskReport = $reportPath + $reportName

#Set colors for table cell backgrounds
$redColor = "#FF0000"
$orangeColor = "#FBB917"
$whiteColor  = "#FFFFFF"
$greenColor  =  "#00FF00"

# Count if any computers have low disk space.  Do not send report if less than 1.
$i = 0;

# Get computer list to check disk space
$computers = Get-Content "D:\Diskspace\servers.txt";  #Set the location of server.txt file which contain all the server and desktop names which you want to monitor the disk space.
$datetime = Get-Date -Format "MM-dd-yyyy_HHmmss";

# Remove the report if it has already been run today so it does not append to the existing report
If (Test-Path $diskReport)
    {
        Remove-Item $diskReport
    }

# Cleanup old files..
$Daysback = "-7"  #Set to clean the reports which are older than 7 days
$CurrentDate = Get-Date;
$DateToDelete = $CurrentDate.AddDays($Daysback);
Get-ChildItem $reportPath | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item;

# Create and write HTML Header of report
$titleDate = get-date -uformat "%m-%d-%Y - %A %H:%M:%S"
$header = " 
  'Content-Type' content='text/html; charset=iso-8859-1'>
-->
  '100%'>
  '#548DD4'>
 
'7' height='30' align='center'>
  'calibri' color='#003399' size='4'>WD Server Disk Space  Report for $titledate  
"
 Add-Content $diskReport $header

# Create and write Table header for report
 $tableHeader = "
 '100%'> 

'10%' align='center'>Server

'5%'  align='center'>Drive 

'10%' align='center'>Total Capacity(GB)

'10%' align='center'>Used Capacity(GB)

'10%' align='center'>Free Space(GB)

'5%'  align='center'>Freespace 


"
Add-Content $diskReport $tableHeader
 
# Start processing disk space
  foreach($computer in $computers)
 { 
 $disks = Get-WmiObject -ComputerName $computer -Class Win32_LogicalDisk -Filter "DriveType = 3 AND DeviceID != 'P:'"
 $computer = $computer.toupper()
 $isEmailSend = 0
  foreach($disk in $disks)
 {        
  $deviceID = $disk.DeviceID;
        $volName = $disk.VolumeName;
  [float]$size = $disk.Size;
  [float]$freespace = $disk.FreeSpace; 
  $percentFree = [Math]::Round(($freespace / $size) * 100);
  $sizeGB = [Math]::Round($size / 1073741824, 2);
  $freeSpaceGB = [Math]::Round($freespace / 1073741824, 2);
        $usedSpaceGB = $sizeGB - $freeSpaceGB;
        $color = $whiteColor;
                       
# Set background color to Orange if just a warning

  if($percentFree -lt $percentWarning)      
    {
    $color = $orangeColor 
            }
  else{
   $color =$greenColor 
   }
# Set background color to Orange if space is Critical
      if($percentFree -lt $percentCritcal)
        {
        $color = $redColor
        $isEmailSend =1
       }        
 
 # Create table data rows 
    $dataRow = " 
'10%'>$computer 
'5%' align='center'>$deviceID 
'10%' align='center'>$sizeGB 
'10%' align='center'>$usedSpaceGB 
'10%' align='center'>$freeSpaceGB 
'5%' bgcolor=`'$color`' align='center'>$percentFree % 

"
Add-Content $diskReport $dataRow;
Write-Host -ForegroundColor DarkYellow "$computer $deviceID percentage free space = $percentFree";
    $i++  
 
 }
}

# Create table at end of report showing legend of colors for the critical and warning
 $tableDescription = "


'100%'>
  'White'> 
           
'15%' align='center' bgcolor='#00FF00'>Info - greater than 25% free space will be in green color

   
'10%' align='center' bgcolor='#FBB917'>Warning - less than 25% free space

'10%' align='center' bgcolor='#FF0000'>Critical - less than 10% free space


"
 Add-Content $diskReport $tableDescription
 Add-Content $diskReport "
"

# Send Notification if alert $i is greater then 0
if ($isEmailSend  -gt 0)
{
    foreach ($user in $users)
{
        Write-Host "Sending Email notification to $user"
  
  $smtpServer = "smtp.wdc.com" #set the SMTP server
  $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
  $msg = New-Object Net.Mail.MailMessage
  $msg.To.Add($user)
        $msg.From = "Tan.ChengKean@wdc.com" # set the user name from which email should send
                         
  $msg.Subject = "WD Server Disk Space Report for $titledate"
        $msg.IsBodyHTML = $true
        $msg.Body = get-content $diskReport
  $smtp.Send($msg)
        $body = ""
    }
  }





#IMPORTANT AND CONCERNS
# -Set the $percentCritcal and $percentWarning basing on requirements
# -$Users: Set the user names for email notification
# -$reportPath : Set the report path basing on the location where you want to store the reports
# -$computers: refer the location Servers.txt in which all the machine names added to monitor
# -$smtpServer: set the SMTP server which you want to use for email notitifcation
#*********************************************************#

# Continue even if there are errors
$ErrorActionPreference = "Continue";

# Set your warning and critical thresholds
$percentWarning = 25;
$percentCritcal = 10;

# EMAIL PROPERTIES
 # Set the recipients of the report.
 $users = "Tan.ChengKean@wdc.com,NobleKing.Constantin@wdc.com,MOHAMMAD.NAZMUL.HUDA.RUBOL.CHOWDHURY@wdc.com,Abhishek.KumarAshu@wdc.com"; 
 

# REPORT PROPERTIES
 # Path to the report
  $reportPath = "D:\Diskspace\Logs\";  # set the location on wehere you want to store the reports

 # Report name
  $reportName = "DiskSpaceRpt_$(get-date -format ddMMyyyy).html";

# Path and Report name together
$diskReport = $reportPath + $reportName

#Set colors for table cell backgrounds
$redColor = "#FF0000"
$orangeColor = "#FBB917"
$whiteColor  = "#FFFFFF"
$greenColor  =  "#00FF00"

# Count if any computers have low disk space.  Do not send report if less than 1.
$i = 0;

# Get computer list to check disk space
$computers = Get-Content "D:\Diskspace\servers.txt";  #Set the location of server.txt file which contain all the server and desktop names which you want to monitor the disk space.
$datetime = Get-Date -Format "MM-dd-yyyy_HHmmss";

# Remove the report if it has already been run today so it does not append to the existing report
If (Test-Path $diskReport)
    {
        Remove-Item $diskReport
    }

# Cleanup old files..
$Daysback = "-7"  #Set to clean the reports which are older than 7 days
$CurrentDate = Get-Date;
$DateToDelete = $CurrentDate.AddDays($Daysback);
Get-ChildItem $reportPath | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item;

# Create and write HTML Header of report
$titleDate = get-date -uformat "%m-%d-%Y - %A %H:%M:%S"
$header = "
   
   
 
  DiskSpace Report
 
 
    
   

   
   
  WD Server Disk Space  Report for $titledate
 
  
  
  
"
 Add-Content $diskReport $header

# Create and write Table header for report
 $tableHeader = "
  

   
 Server
 Drive 
 Total Capacity(GB)
 Used Capacity(GB)
 Free Space(GB)
 Freespace 

 "
Add-Content $diskReport $tableHeader
 
# Start processing disk space
  foreach($computer in $computers)
 { 
 $disks = Get-WmiObject -ComputerName 172.21.41.251 -Class Win32_LogicalDisk -Filter "DriveType = 3 AND DeviceID != 'P:'"
 $computer = $computer.toupper()
 $isEmailSend = 0
  foreach($disk in $disks)
 {       
  $deviceID = $disk.DeviceID;
        $volName = $disk.VolumeName;
  [float]$size = $disk.Size;
  [float]$freespace = $disk.FreeSpace; 
  $percentFree = [Math]::Round(($freespace / $size) * 100);
  $sizeGB = [Math]::Round($size / 1073741824, 2);
  $freeSpaceGB = [Math]::Round($freespace / 1073741824, 2);
        $usedSpaceGB = $sizeGB - $freeSpaceGB;
        $color = $whiteColor;

# Set background color to Orange if just a warning

  if($percentFree -lt $percentWarning)     
    {
    $color = $orangeColor 
}
  else{
   $color =$greenColor 
   }
# Set background color to Orange if space is Critical
      if($percentFree -lt $percentCritcal)
        {
        $color = $redColor
$isEmailSend =1
       }       
 
 # Create table data rows 
    $dataRow = "
   
        $computer
  $deviceID 
  $sizeGB
  $usedSpaceGB
  $freeSpaceGB
  $percentFree % 
 
 "
Add-Content $diskReport $dataRow;
Write-Host -ForegroundColor DarkYellow "$computer $deviceID percentage free space = $percentFree";
    $i++ 
 
 }
}

# Create table at end of report showing legend of colors for the critical and warning
 $tableDescription = "


 
    
Info - greater than 25% free space will be in green color
    Warning - less than 25% free space
 Critical - less than 10% free space

 "
 Add-Content $diskReport $tableDescription
 Add-Content $diskReport "
"
# Send Notification if alert $i is greater then 0
if ($isEmailSend  -gt 0)
{
    foreach ($user in $users)
{
        Write-Host "Sending Email notification to $user"
 
  $smtpServer = "smtp.wdc.com" #set the SMTP server
  $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
  $msg = New-Object Net.Mail.MailMessage
  $msg.To.Add($user)
        $msg.From = "Tan.ChengKean@wdc.com" # set the user name from which email should send

  $msg.Subject = "WD Server Disk Space Report for $titledate"
        $msg.IsBodyHTML = $true
        $msg.Body = get-content $diskReport
  $smtp.Send($msg)
        $body = ""
    }
  }

Tuesday, January 15, 2019

Travel RESUME CV

ceac.state.gov


purbachal sector 21, end of purbachal 300 ft road, just behind the new China Bangladesh Exhibition Center Project (New Banijjo Mela Location) This vlog is about Purbachal Lake & Lake fantasy restaurant which is beside the lake. This lake is also called Lake-21 as this is situated in sector 21 of Purbachal Town.

Location: Lake Fatasy Restaurent https://goo.gl/maps/9nLvLbrWvxVEsDBb7



iCrest SDN BHD
Senior Software Developer  
From Feb 2018 to Present.
C-1-06, CoPlace 2, 2260, Jalan Usahawan 1,
City :  Cyberjaya,
STATE :  Selangor,
POST CODE:  63000

Malaysia.
| Fax: +603 8319 6905 | 

Data Path Ltd
Senior Software Engineer
Ambon Complex, 7th, 8th and 9th Floor,
99 Mohakhali Commercial Area
Dhaka
POST CODE:   1212
Bangladesh
Phone: 880-2-9863216
 From June 2012 to Feb 2018.

Spectrum Engineering Consortium Ltd
Software Engineer
BDBL Bhaban (7th Floor), 12 Kazi Nazrul Islam Avenue, Kawran Bazar
 Dhaka
1215
From Jan 2011
May 2012

Daffodil Institute of IT (DIIT) Research Cell
Software Engineer
House 7; Road 14(New), DHANMONDI
1209
Dhaka
July 2004 Dec 2010





  
























https://www.ivisa.com/
https://www.ivisa.com/thailand-e-visa?nationality=BD


https://easymanpower.co/new-requirement-employment-pass-dp10-category-ii-iii/




Tuesday, January 1, 2019

Top Site

*Top 10 Sites for your career:* 1. LinkedIN 2. Indeed 3. Naukri 4. Monster 5. JobBait 6. Careercloud 7. Dice 8. CareerBuilder 9. Jibberjobber 10. Glassdoor *Top 10 Tech Skills in demand in 2019:* 1. Machine Learning 2. Mobile Development 3. SEO/SEM Marketing 4. Data Visualization 5. Data Engineering 6. UI/UX Design 7. Cyber-security 8. Cloud Computing/AWS 9. Blockchain 10. IOT *Top 10 Sites for Free Online Education:* 1. Coursera 2. edX 3. Khan Academy 4. Udemy 5. iTunesU Free Courses 6. MIT OpenCourseWare 7. Stanford Online 8. Codecademy 9. Open Culture Online Courses *Top 10 Sites to learn Excel for free:* 1. Microsoft Excel Help Center 2. Excel Exposure 3. Chandoo 4. Excel Central 5. Contextures 6. Excel Hero 7. Mr. Excel 8. Improve Your Excel 9. Excel Easy 10. Excel Jet *Top 10 Sites to review your resume for free:* 1. Zety Resume Builder 2. Resumonk 3. Resume dot com 4. VisualCV 5. Cvmaker 6. ResumUP 7. Resume Genius 8. Resumebuilder 9. Resume Baking 10. Enhancv *Top 10 Sites for Interview Preparation:* 1. Ambitionbox 2. AceTheInterview 3. Geeksforgeeks 4. Leetcode 5. Gainlo 6. Careercup 7. Codercareer 8. InterviewUp 9. InterviewBest 10. Indiabix



Sunday, December 30, 2018

Spotfire

SpotFire

insert data into view
https://www.codeproject.com/Articles/236425/How-to-Insert-Data-Using-SQL-Views-Created-Using-M

https://spotfired.blogspot.com/
https://www.tibco.com/products/tibco-spotfire/learn/videos?field_video_type_target_id=821
https://www.youtube.com/watch?v=rvZf4ahc3bY&list=PLVHgQku8Z935xrGJK3r4uLv452vE9GzGt&index=4
https://www.youtube.com/user/intellipaaat/search?query=spotfire

SpotFire
https://spotfired.blogspot.com/
https://www.youtube.com/watch?v=Soq428T8mDY&list=PL-nvlz_b2YHgnrD1L5WlP3qkpWOiizT1R&index=1
https://www.tibco.com/products/tibco-spotfire/learn/videos?field_video_type_target_id=821
https://www.youtube.com/watch?v=yQbrv3swz2M&list=PLU3U6HmS8SigjQfLbN1wzcQ2gVxTMxUtp&index=1

Scripting
https://www.youtube.com/watch?v=m1OCnOzUHew
https://wiki.python.org/moin/

https://www.youtube.com/watch?v=yQbrv3swz2M&list=PLU3U6HmS8SigjQfLbN1wzcQ2gVxTMxUtp

https://community.tibco.com/wiki/ironpython-scripting-tibco-spotfire#toc-2

Filter
https://www.youtube.com/watch?v=WVROLbcXyic

TextArea
https://datashoptalk.com/unscrambling-spotfire-text-area/

pls do some POC on pthyon and scripting

Denton

Denton  House Address 2113 Paxton Way, Denton, TX 76209  WiFi Info Network: TE Paxton Password: Paxtonrental222 Peterbilt Motors Corporate H...