What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-21 14:40:31
code to convert rgb to hsl color
// see: https://en.wikipedia.org/wiki/RGB_color_model // see: https://en.wikipedia.org/wiki/HSL_and_HSV // expects R, G, B, Cmax and chroma to be in number interval [0, 1] // returns undefined if chroma is 0, or a number interval [0, 360] degrees functio... Add solution -
Javascript 2021-11-20 19:30:21
strapi.io react
import React from 'react'; // Parses the JSON returned by a network request const parseJSON = resp => (resp.json ? resp.json() : resp); // Checks if a network request came back fine, and throws an error if not const checkStatus = resp => { if (r... Add solution -
Html 2021-11-20 07:57:20
bootstrap 5 starter template
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=... Add solution -
PHP 2021-11-20 05:23:10
create config value file in php
<?php return (object) array( 'host' => 'localhost', 'username' => 'root', 'pass' => 'password', 'database' => 'db' ); ?> This allows you to use the object syntax when you include the php : $configs->host instead o... Add solution -
Javascript 2021-11-19 21:16:29
react native setstate object
import React, { useState } from 'react' const Example = () => { const [ account, setAccount ] = useState({ username: "", password: "" }) return( <div> <p>Debug { JSON.stringify(account) } <form> ... Add solution -
Javascript 2021-11-19 05:17:21
javascript to pop browser notification
<!doctype html> <head> <title>Show Notification using Javascript</title> </head> <body> <h3>Show Notification using Javascript</h3> <script> /* JS comes here */ askForApprova... Add solution -
Other 2021-11-19 01:08:14
__typename remove graphql
There are three ways of doing this **First way** Update the client parameter like this it will omit the unwanted fields in graphql. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> apollo.cr... Add solution -
Other 2021-11-18 19:39:18
https://stackoverflow.com/questions/27420014/how-to-filter-json-object
public class Test { public static void main(String[] args) throws Exception { Type type = new TypeToken<List<Student>>() {}.getType(); Gson gson = new GsonBuilder().registerTypeAdapter(type, new Student.StudentListDeseria... Add solution