Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
This file contains 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
let counter = 0; | |
let scriptMap = new Map(); | |
export const ScriptCache = (function(global) { | |
return function ScriptCache (scripts) { | |
const Cache = {}; | |
Cache._onLoad = function(key) { | |
return (cb) => { | |
let stored = scriptMap.get(key); |
This file contains 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.Text; | |
using System.Security.Cryptography; | |
namespace AES256 | |
{ | |
class Program | |
{ | |
private string encrypt(string clearText, string secretKey, string initVector) | |
{ |
This file contains 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
/** | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
*/ | |
export interface RequestOptions { | |
ignoreCache?: boolean; | |
headers?: {[key: string]:string}; | |
// 0 (or negative) to wait forever | |
timeout?: number; |
This file contains 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 android.support.annotation.Nullable; | |
import android.util.Base64; | |
import java.nio.ByteBuffer; | |
import java.security.SecureRandom; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; |
This file contains 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
<?php | |
/** | |
* Yii Application Config | |
* | |
* Edit this file at your own risk! | |
* | |
* The array returned by this file will get merged with | |
* vendor/craftcms/cms/src/config/app/main.php and [web|console].php, when | |
* Craft's bootstrap script is defining the configuration for the entire | |
* application. |
This file contains 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
<div class="main-wrapper"> | |
<div class="header"><h1>Vue Shopping Cart</h1></div> | |
<div id="vue"> | |
<cart :cart="cart" :cart-sub-total="cartSubTotal" :tax="tax" :cart-total="cartTotal" :checkout-bool="checkoutBool"></cart> | |
<products :cart="cart" :cart-sub-total="cartSubTotal" :tax="tax" :cart-total="cartTotal" :products-data="productsData"></products> | |
<checkout-area v-if="checkoutBool" :cart="cart" :tax="tax" :cart-sub-total="cartSubTotal" :cart-total="cartTotal" :products-data="productsData" :total-with-tax="totalWithTax"></checkout-area> | |
</div> | |
</div> |
The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.
Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
This file contains 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
<template> | |
<div> | |
<vue-editor v-model="content" ref="editor" :editor-options="toolbarOptions" @text-change="updateValue" useCustomImageHandler @imageAdded="uploadImage"></vue-editor> | |
</div> | |
</template> | |
<script> | |
import Vue from "vue"; | |
import axios from 'axios' | |
let VueEditor, Quill; |