protected void Application_Start()
2: {
3: ...
4: MvcHandler.DisableMvcResponseHeader = true;
5: ...
6: }
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
| dism /online /enable-feature /featurename:IIS-ASPNET45 /all |
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
| #In Package Manager Console: | |
| #1. Re-format all files of the selected project | |
| #Format-Document | |
| #2. Re-format all files of the whole solution | |
| #Get-Project -All | Format-Document | |
| # Print all project items | |
| Recurse-Project -Action {param($item) "`"$($item.ProjectItem.Name)`" is a $($item.Type)" } | |
| # Function to format all documents based on https://gist.github.com/984353 |
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 class DisposableResource : IDisposable | |
| { | |
| private SafeHandle managedResource; | |
| private IntPtr unmanagedResource; | |
| public DisposableResource() | |
| { | |
| //managedResource = ... | |
| //unmanagedResource = ... | |
| } |
Что бы использовать Api vk.com нужно получить access token аккаунта.
- Для этого вам потребуется Standalone-приложение, которое можно создать тут.
- После того как вы создали приложение его можно найти на вкладке Приложения.
- Далее нам потребуется его id, который можно получить перейдя по ссылке на приложение в вашем аккаунте. Ссылка будет выглядеть так: https://vk.com/app123456. Где 123456 и есть id приложения.
- Теперь осталось перейти по ссылке вида:
https://oauth.vk.com/authorize?client_id=123456&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=messages,wall,offline&response_type=token - После перехода ВК попросит подтвердить доступ к аккаунту и перенаправит вас на страницу с предупреждением, где в url будет содержаться access token:
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
| /** | |
| * Processes a large array in async mode and gives the UI thread a chance to process any pending UI events | |
| * between each chunk which will keep the UI active | |
| * @param array - source array | |
| * @param process - function that processes one array item | |
| * @param maxTimePerChunk - number milliseconds per chunk | |
| * @param complete - function that is called upon completion | |
| */ | |
| function processArrayAsync(array, process, maxTimePerChunk, complete) { | |
| maxTimePerChunk = maxTimePerChunk || 100; |
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
| { | |
| "extends": "plugin:react/recommended", | |
| "env": { | |
| "es6": true, | |
| "browser": true | |
| }, | |
| "parserOptions": { | |
| "ecmaVersion": 6, | |
| "sourceType": "module", | |
| "ecmaFeatures": { |
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 User { | |
| constructor(name) { | |
| this.name = name; | |
| } | |
| sayHello(...who) { | |
| who.forEach(e => alert(`Hello from ${this.name}, ${e}`)); | |
| } | |
| } |
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> | |
| <head> | |
| <title>Tooltip by CSS3</title> | |
| <meta charset="UTF-8" /> | |
| <style type="text/css"> | |
| div { | |
| padding: 150px; | |
| display: inline-block; | |
| } |
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> | |
| <head> | |
| <title>Tooltip by CSS2</title> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <style type="text/css"> | |
| div { | |
| padding: 150px; | |
| display: inline-block; | |
| } |
NewerOlder