This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <meta name="x-apple-disable-message-reformatting"> | |
| <title></title> | |
| <!--[if mso]> | |
| <noscript> |
This file contains hidden or 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
| #Define a valid SMTP server to send your emails through | |
| $smtpServer = 'SERVER HERE' #e.g smtp.local.com | |
| #Define a new SMTP object using the server defined above | |
| $smtpObject = New-Object Net.Mail.SmtpClient($smtpServer) | |
| #Create a new mail message object | |
| $msg = New-Object Net.Mail.MailMessage | |
| $msg.From = '[email protected]' | |
| $msg.ReplyTo = '[email protected]' | |
| $msg.BCC.Add('[email protected]') |
This file contains hidden or 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 New-RandomPassword(){ | |
| Add-Type -AssemblyName 'System.Web' | |
| return [System.Web.Security.Membership]::GeneratePassword(10,5) | |
| } |
This file contains hidden or 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
| import 'dart:async'; | |
| import 'package:rxdart/rxdart.dart'; | |
| ///The class for the timer | |
| class TimerState { | |
| ///The Stopwatch object for running the timer | |
| final Stopwatch _sWatch = Stopwatch(); | |
| ///Creating a BehaviorSubject of type String for the Stopwatch display | |
| BehaviorSubject<String> _subjectDisplay; |
This file contains hidden or 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
| StreamBuilder( | |
| stream: _timerState.timerObservable, | |
| builder: (context, snapshot){ | |
| if(snapshot.hasData){ | |
| return Text(snapshot.data) | |
| }else{ | |
| return Text('No data') | |
| } | |
| } | |
| ) |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:rxdart_timer/blocs/timer_state.dart'; | |
| class TimerView extends StatefulWidget { | |
| @override | |
| _TimerViewState createState() => _TimerViewState(); | |
| } | |
| class _TimerViewState extends State<TimerView> { | |
| //Create a new instance of the timer for the stateful widget |
This file contains hidden or 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
| #Creating a list to hold the people using the Person class | |
| $People = New-Object 'System.Collections.Generic.List[PSObject]' | |
| #Creating a new Person | |
| $newPerson = [PersonClass]::new() | |
| $newPerson.Name = "Roy Orbison" | |
| $newPerson.Age = "24" | |
| #Adding the new Person to the People list $People.Add($newPerson) | |
| $People.Add($newPerson) |
This file contains hidden or 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
| class MusicArtist{ | |
| [String]$Name | |
| [Int]$Age | |
| [Album[]]$Albums | |
| } |
OlderNewer