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 Link from 'next/link'; | |
import { InferGetStaticPropsType, GetStaticProps } from "next"; | |
import { FC, useState, useEffect } from 'react'; | |
interface PeopleData { | |
name: string; | |
website: string; | |
email: string; | |
} |
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
//e.g., key in the web config | |
<appSettings> | |
<add key="FromAddress" value="[email protected]"/> | |
</appSettings> | |
*** | |
//namespace to call. | |
+using System.Configuration; | |
// e.g., calling the value. |
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.Linq; | |
using System.Web; | |
using System.Linq.Expressions; | |
using System.Web.Mvc.Html; | |
using System.ComponentModel; | |
using System.Web.Mvc; | |
using System.Reflection; |
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
//Ref: Vulcraft project, NewsReleaseArchive.cshtml and EnumExtensions.cs class | |
//1. Implement the extenstion method. E.g., Helpers>>Extensions>>EnumExtensions.cs | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Vulcraft.Web.Helpers.Extensions | |
{ |
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
//e.g SocialMediaItemPart.cs | |
using Cadence.Web.Models.N2.Base; | |
using N2; | |
using N2.Details; | |
using N2.Persistence.Serialization; | |
namespace Cadence.Web.Models.N2.Parts { | |
//similar to the PageDefinition attribute on the page template, this attribute | |
//tells N2 that this is a Part with the friendly name "Social Media Link" |
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
/*Example with Code Explations | |
https://gist.github.com/davecowart/b1f448dbc7b32f1e624b#file-contentpage-cs | |
ContentPage.cs | |
Attribute|Property…Attribute|Property…Attribute|Property… | |
*/ | |
//1. The N2>>Model>> Page Template | |
using System.Collections.Generic; | |
using Cadence.Web.Helpers.Attributes; | |
using Cadence.Web.Helpers.Extensions; |
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
PS C:\Users\admin> Send-MailMessage -SMTPServer appmail -To [email protected] -From [email protected] -Subject "This is a test email" -Body "Hi dude, this is a test email sent via PowerShell" |
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
--1. The following query gets ALL the header values and ALL the associated datatypes and lengths. | |
-- After running this, you can copy and paste to the next query to easily create the new table. | |
-- just put your tablename within <<yourTableName>> | |
SELECT | |
c.name 'Column Name', | |
t.Name 'Data type', | |
c.max_length 'Max Length', | |
c.precision , | |
c.scale , |
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
//1. Creating a Map, and looping though it. | |
//Create a map, a collection of key value pairs | |
var myTranslation = { | |
"my house": "mein Haus", | |
"my boat": "mein Boot", | |
"my horse": "mein Pferd" | |
} | |
// quick console test.. | |
myTranslation |
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 fruits = ['banana', 'orange', 'apple', 'mango']; | |
>fruits | |
<["banana", "orange", "apple", "mango"] | |
>var fruitClone = fruits.slice(0); | |
>fruitClone | |
<["banana", "orange", "apple", "mango"] |
NewerOlder