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
| Dim objShell, lngMinutes, boolValid | |
| Set objShell = CreateObject("WScript.Shell") | |
| lngMinutes = InputBox("How long you want to keep your system awake?" & Replace(Space(5), " ", vbNewLine) & "Enter minutes:", "Awake Duration") 'we are replacing 5 spaces with new lines | |
| If lngMinutes = vbEmpty Then 'If the user opts to cancel the process | |
| 'Do nothing | |
| Else | |
| On Error Resume Next | |
| Err.Clear | |
| boolValid = False |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Data.Common; | |
| using System.Linq; | |
| namespace Extensions | |
| { | |
| public static class DataReaderExtension | |
| { |
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
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Threading.Tasks; | |
| using Microsoft.Data.SqlClient; | |
| using PLXS.EmailInvoice.Database.DbContext; | |
| namespace Extensions | |
| { | |
| public static class ApplicationContextExtension | |
| { |
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
| var serials = new[] | |
| { | |
| "00001", "00002", "00003", "00004", "00005", | |
| "00006", "00007", "00008", "00009", "00010", | |
| "00011", "00012", "00013", "00014", "00015", | |
| }; | |
| const int rows = 5; | |
| var columns = (int)Math.Ceiling((double)serials.Length / rows); | |
| var result = string.Empty; |
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
| ### | |
| POST http://localhost:8080/login/register | |
| Content-Type: application/json | |
| { | |
| "username":"ignacio", | |
| "password":"hola" | |
| } | |
| ### |
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"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| <!-- Latest compiled and minified CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" | |
| integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
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 { useState, useEffect } from 'react'; | |
| export default function useFetch(url, options) { | |
| const [loading, setLoading] = useState(true); | |
| const [result, setResult] = useState(null); | |
| const [error, setError] = useState(null); | |
| useEffect(() => { | |
| (async () => { | |
| try { |
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* toArray(obj) { | |
| for (let prop of Object.keys(obj)) | |
| yield obj[prop]; | |
| } |