What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-05 15:25:03
javascript canvas mousemove
// on brouser var canv = document.getElementById('my_canvas'); canv.addEventListener('mousemove', e => { console.log({x:e.offsetX, y:e.offsetY, z:e}) }); // for mobile on touch var canv = document.getElementById('my_canvas'); canv.addEventListener... Add solution -
Python 2021-10-05 14:41:02
date object into date format python
%a - Abbreviated weekday name. (Sun, Mon, ...) %A - Full weekday name. (Sunday, Monday, ...) %w - Weekday as a decimal number. (0, 1, ..., 6) %d - Day of the month as a zero-padded decimal. (01, 02, ..., 31) %-d - Day of the month as a decimal number. (1,... Add solution -
Javascript 2021-10-05 07:55:03
simple parallax button scrolling jquery codepen
/* jQuery codes for smooth scrolling. The following code is from https://css-tricks.com/snippets/jquery/smooth-scrolling/*/$(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.repl... Add solution -
Python 2021-10-04 22:06:02
numpy annotate with three arrows
def my_annotate(ax, s, xy_arr=[], *args, **kwargs): ans = [] an = ax.annotate(s, xy_arr[0], *args, **kwargs) ans.append(an) d = {} try: d['xycoords'] = kwargs['xycoords'] except KeyError: pass try: d['arrowprops'] = kwargs['arrow... Add solution -
PHP 2021-10-03 11:22:05
php preg_match
<?php //Syntex : int preg_match( $pattern, $input, $matches, $flags, $offset) // Declare a variable and initialize it $str = "Check For Testing."; // case-Insensitive search for the word "Check" if (preg_match("/\bChec... Add solution
Best helpers
Ranking is empty