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 checkedVals = $('input[type=checkbox]:checked').map(function() { | |
| return this.value; | |
| }).get().join(","); | |
| $(*TARGET*).val(checkedVals); |
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 Slugify(string) { | |
| const a = 'àáäâãåèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;' | |
| const b = 'aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------' | |
| const p = new RegExp(a.split('').join('|'), 'g') | |
| return string.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word characters | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - |
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
| <rule name="Force HTTPS" stopProcessing="true"> | |
| <match url="(.*)" ignoreCase="false" /> | |
| <conditions> | |
| <add input="{HTTPS}" pattern="off" /> | |
| </conditions> | |
| <action type="Redirect" url="https://www.example.com/{R:1}" appendQueryString="true" redirectType="Permanent" /> | |
| </rule> |
Information pertaining to the tables created when UmbracoCMS is installed
- cmsMemberType : Member properties
- cmsPropertyType : Data of the member properties
- cmsMember2MemberGroup : The relationship between Members and MemberGroups
Stores information relating to Member properties.
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
| RewriteEngine on | |
| RewriteCond %{REMOTE_ADDR} !^11\.22\.33\.44$ [NC] # Can add multiple lines here for different IPs | |
| RewriteCond %{REQUEST_URI} !^/maintenance.html$ [NC] | |
| RewriteRule ^(.*)$ "/maintenance.html" [R=302,L] |
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
| /****** Script for SelectTopNRows command from SSMS ******/ | |
| SELECT TOP (1000) [id] | |
| ,[contentNodeId] | |
| ,[versionId] | |
| ,[propertytypeid] | |
| ,[dataInt] | |
| ,[dataDecimal] | |
| ,[dataDate] | |
| ,[dataNvarchar] | |
| ,[dataNtext] |
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
| <rule name="[Rule name]" stopProcessing="true"> | |
| <match url="[URL to match]" ignoreCase="false" /> | |
| <conditions> | |
| <add input="{REMOTE_HOST}" pattern="^[ip.\address]" ignoreCase="false" negate="true" /> | |
| </conditions> | |
| <action type="Redirect" redirectType="Found" url="[Target URL]" /> | |
| </rule> |
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
| // Select all links with hashes | |
| $('a[href*="#"]') | |
| // Remove links that don't actually link to anything | |
| .not('[href="#"]') | |
| .not('[href="#0"]') | |
| .click(function(event) { | |
| // On-page links | |
| if ( | |
| location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') | |
| && |
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
| public static class EnumHelper | |
| { | |
| /// <summary> | |
| /// Gets an attribute on an enum field value"/> | |
| /// </summary> | |
| /// <typeparam name="T">The type of the attribute you want to retrieve</typeparam> | |
| /// <param name="enumVal">The enum value</param> | |
| /// <returns>The attribute of type T that exists on the enum value</returns> | |
| /// <example><![CDATA[string desc = myEnumVariable.GetAttributeOfType<DescriptionAttribute>().Description;]]></example> | |
| /// <see href="https://stackoverflow.com/a/9276348/3990156"/> |
OlderNewer