- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 989 Articles for Software & Coding
![Yash Sanghvi](https://www.tutorialspoint.com/assets/profiles/301668/profile/60_20218-1616474822.jpg)
4K+ Views
CRC stands for Cyclic Redundancy Check (CRC). It is, in simple words, an algorithm used to detect errors in received messages. The idea is similar to parity, but this is much more robust.If a transmitter is sending a packet to a receiver, the transmitter will calculate a CRC code based on some polynomial calculations on the packet, and append it to the packet. The receiver will perform the same calculations on the packet, and check if the generated CRC matches the CRC that came in with the packet. If the two match, there were no errors introduced in the transmission, ... Read More
![Yash Sanghvi](https://www.tutorialspoint.com/assets/profiles/301668/profile/60_20218-1616474822.jpg)
687 Views
AVR libraries are developed by Atmel. You might be knowing that the microcontrollers used in most Arduino boards are Atmel microcontrollers (ATmega328P, ATmega2560, etc.). AVR libraries for several specific operations (sleep, time, etc.) already exist, and therefore, we may greatly benefit if we are able to import AVR libraries within Arduino. The good news is that we can!As per Arduino's website, "AVR libraries have the potential to greatly extend the Arduino language. The Arduino system is based on the avr-gcc compiler and makes use of the standard AVR libc libraries, which are open-source C libraries, specifically written for Atmel hardware, ... Read More
![Yash Sanghvi](https://www.tutorialspoint.com/assets/profiles/301668/profile/60_20218-1616474822.jpg)
6K+ Views
A watchdog timer is an essential part of any microcontroller. It resets the program if the program gets stuck anywhere. Very briefly, this is how the watchdog timer works −The timer keeps incrementing.The program has to ensure that it keeps resetting the timer, i.e. does not allow it to overflow.If the timer overflows, it means that the program was stuck somewhere and therefore was unable to reset the timer. An interrupt is generated on timer overflow which resets the microcontroller.To implement watchdog timer in Arduino, we use the avr wdt library.The code is given below −#include void setup() { ... Read More
![Yash Sanghvi](https://www.tutorialspoint.com/assets/profiles/301668/profile/60_20218-1616474822.jpg)
5K+ Views
The tone function can be used to generate a square wave (50% duty cycle) of a specific frequency on a pin.SyntaxThe syntax is −tone(pin, frequency)pin is the pin number on which to generate the tone. The frequency is specified in Hz.This function can also take in a third optional argument − the millisecond duration for which the tone should be generated on the pin.tone(pin, frequency, duration)If you don’t specify the duration, the tone will continue till the noTone() function is called on the same pin. The syntax of the noTone() function is −noTone(pin)where pin is the pin number on which ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
8K+ Views
We can retrieve the file extension using multiple ways. First, using the [System.IO.Path] class.PS C:\> [System.IO.Path]::GetExtension("C:\temp\25Aug2020.txt") .txt PS C:\> [System.IO.Path]::GetExtension("C:\temp\azcopy.zip") .zipThis is the easiest way to get the file extension. Otherways, Using programmatically, PS C:\> ((Split-Path "C:\Temp\azcopy.zip" -Leaf).Split('.'))[1] zip PS C:\> ((Split-Path "C:\Temp\25Aug2020.txt" -Leaf).Split('.'))[1] txtUsing Get-ChildItem, PS C:\> (Get-ChildItem C:\Temp\azcopy.zip).Extension .zip PS C:\> (Get-ChildItem C:\Temp\25Aug2020.txt).Extension .txtUsing Get-Item, PS C:\> (Get-Item C:\Temp\azcopy.zip).Extension .zipRead More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
1K+ Views
To copy the files using the specific files extension using PowerShell, we can use the Copy-Item command.The below command will copy only the .ps1 files from the source to the destination.For example, PS C:\> Copy-Item -Path C:\Temp -Recurse -Filter *.ps1 -Destination C:\Temp1\ -VerboseIf the C:\Temp1 doesn't exist, it will create the destination folder and then copy the content of the file but the problem with this command is it copies the subfolders as well which doesn’t have the .ps1 file.So to copy the with the same folder structure without empty directories and the specific file extension we can write the ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
1K+ Views
To get the disabled local user accounts using PowerShell on the local and the remote system, we can use the WMI or the CIM instance method with the Win32_UserAccount class and the Disabled property to filter the result.PS C:\> gwmi win32_useraccount | where{$_.Disabled -eq $true}You can filter out the properties using the specific properties use the Select-Object pipeline command.PS C:\> gwmi win32_useraccount | where{$_.Disabled -eq $true} | Select Name, FullName, CaptionYou can also use the CIM instance method alternatively, PS C:\> Get-CimInstance win32_useraccount | where{$_.Disabled -eq $true}To get the disabled accounts on the remote systems, use the -ComputerName parameter in ... Read More
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
1K+ Views
To get the locked user accounts on the local or the remote machines using PowerShell, we can use the wmi method.PS C:\> gwmi win32_useraccount | where{$_.Lockout -eq $true}You can also use the CIM instance method alternatively.PS C:\> Get-CimInstance Win32_Useraccount | where{$_.Lockout -eq $true}To get the locked local user accounts on the remote computer, you can use the -ComputerName parameter in the WMI class or the CIM instance. For example,PS C:\> gwmi win32_useraccount -ComputerName TestMachine1, TestMachine2 | where{$_.Lockout -eq $true}
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
2K+ Views
To set the local user account settings related to the account or the password expiration, we can use the Set-LocalUser command.The below command will change the local user Testuser account and password set to never expire.Set-LocalUser -Name Testuser -AccountNeverExpires -PasswordNeverExpires $true -VerboseThe below command will set the account expiry,Set-LocalUser -Name Testuser -AccountExpires 05/11/2022 -VerboseTo run the above commands on the remote computers, use the Invoke-Command.Invoke-Command -ComputerName Computer1, computer2 -ScriptBlock{ Set-LocalUser -Name Testuser -AccountNeverExpires -PasswordNeverExpires $true -Verbose } Invoke-Command -ComputerName Computer1, computer2 -ScriptBlock{ Set-LocalUser -Name Testuser -AccountExpires 05/11/2022 -Verbose }
![Chirag Nagrekar](https://www.tutorialspoint.com/assets/profiles/163503/profile/60_109370-1581658197.png)
10K+ Views
To change the local user account password using PowerShell, we can use the Set-LocalUser command with the Password parameter. This password parameter should be in the secure string. So we need to ask the user to input the password as a secure string or need to explicitly convert the plain text password to the secure string. For example, $localuser = Read-Host "Enter Local UserName" $password = Read-Host "Enter local user account password " -AsSecureString Set-LocalUser -Name $localuser -Password $password -VerboseIf you need to set the password without asking the user prompt then you need to convert the plain text password ... Read More