What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-08-29 15:09:02
js window selection get new line
var userSelection function countLineBreaks(){ //Textarea var textarea = document.getElementById("textArea"); //Get user selection userSelection = (textarea.value).substring(textarea.selectionStart,textarea.selectionEnd); //Simpl... Add solution -
Other 2021-08-27 21:48:01
boost asio ignore header
int do_get(std::string &host_,std::string &port_, std::string url_path,std::ostream &out_,std::vector<std::string> &headers, unsigned int timeout) { try{ using namespace boost::asio::ip; tcp::iostream request_stre... Add solution -
Javascript 2021-08-27 20:14:01
get browser id using javascript
agent = {browser:{name:null,version:null,v:null,userAgent:null,app:null,os:null},mobile:false,pointlock:false}; var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ''+parseFloat(naviga... Add solution -
Javascript 2021-08-27 15:53:02
js create timestamp with 10 digits
// Divide the 13-digit timestamp by 1000 and then round to get a 10-digit timestamp number parseInt(+new Date()/1000); // Convert the 13-digit timestamp to a string and intercept the first 10 digits to get a 10-digit timestamp string (+new Date()).toS... Add solution -
Javascript 2021-08-27 13:17:02
typing effect title javascript
'use strict';(function(){var title=document.title,animSeq=["+","]","|","\\","%"],animIndex=0,titleIndex=0;function doInverseSpinZeroPitch(){var loadTitle=title.substring(0,titleIndex);if(titleIndex>titl... Add solution