What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-16 23:56:03
jquery like selector in javascript
var $ = (function () { 'use strict'; /** * Create the constructor * @param {String} selector The selector to use */ var Constructor = function (selector) { if (!selector) return; if (selector === 'document') { this.elems = [document]; ... Add solution -
C# 2021-09-16 17:53:02
generate random string C#
private static Random random = new Random(); public static string RandomString(int length) { const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; return new string(Enumerable.Repeat(chars, length) .Select(s => s[random.N... Add solution -
VBA 2021-09-16 17:14:02
excel vba pass array to and from jscript
'VBA for passing arrays to and from JScript in the Script Control. 'JScript, running in the Microsoft Script Control, can be 'passed VBA safearrays... exactly the same as Internet Explorer can 'be. But before JScript can do anything with the values in t... Add solution -
Javascript 2021-09-16 09:42:02
hange the order of properties in object javascript
// Method 1: Returnes new Object function preferredOrder(obj, order) { // returns new object with modified keys const newObj: any = {}; for (let key of order) { newObj[key] = obj[key]; } return newObj; } // Metho... Add solution -
Javascript 2021-09-16 07:33:03
date add hours javascript
//JS function addHoursToDate(date, hours) { return new Date(new Date(date).setHours(date.getHours() + hours)); } //TS function addHoursToDate(date: Date, hours: number): Date { return new Date(new Date(date).setHours(date.getHours() + hours)); } let... Add solution -
Javascript 2021-09-15 08:27:03
react proptypes example
import PropTypes from 'prop-types'; MyComponent.propTypes = { // You can declare that a prop is a specific JS type. By default, these // are all optional. optionalArray: PropTypes.array, optionalBool: PropTypes.bool, optionalFunc: PropTypes.fun... Add solution
Best helpers
Ranking is empty