What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-11-15 20:43:24
checkout master with previous commit
git checkout 307a5cd # check out the commit that you want to reset to git checkout -b fixy # create a branch named fixy to do the work git merge -s ours master # merge master's history without changing any files git checkout master ... Add solution -
Javascript 2021-11-14 21:56:29
debug react routes
import React, { Component } from 'react'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import Login from 'components/Login' import DefaultComponent from 'components/DefaultComponent' class DebugRouter extends BrowserRouter { constru... Add solution -
Python 2021-11-14 21:26:20
plotting graphs in keras
# Visualize training history from keras.models import Sequential from keras.layers import Dense import matplotlib.pyplot as plt import numpy # load pima indians dataset dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=","... Add solution -
Other 2021-11-14 19:08:11
ruby sqlite
require 'sqlite3'# Browser history db = SQLite3::Database.new "places.sqlite"# List all tables db.execute "SELECT * FROM sqlite_master where type='table'"# List all visited URLs (History)db.execute "SELECT url FROM moz_places... Add solution -
Javascript 2021-11-14 14:42:17
cordova android close app with back button
document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady(){ document.addEventListener("backbutton", function(e){ if($.mobile.activePage.is('#homepage')){ e.preventDefault(); ... Add solution -
Javascript 2021-11-13 19:11:19
push a new route only triggers URL change but not location change
<ConnectedRouter history={history}> <BrowserRouter> <Switch> <PrivateRouter exact path="/" component={App} /> <Route exact path="/login" component={Login} /> <Route com... Add solution -
SQL 2021-11-13 16:05:07
sql server historical table
CREATE TABLE Department ( DeptID INT NOT NULL PRIMARY KEY CLUSTERED , DeptName VARCHAR(50) NOT NULL , ManagerID INT NULL , ParentDeptID INT NULL , SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL , SysEndTime DATETIME2 GENERATED... Add solution