Skip to content

Instantly share code, notes, and snippets.

<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('test.db');
}
}
$db = new MyDB();
if(!$db){
<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('test.db');
}
}
$db = new MyDB();
if(!$db){
<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('test.db');
}
}
$db = new MyDB();
if(!$db){
@harshityadav95
harshityadav95 / homebrew.mxcl.jenkins-lts.plist
Created September 28, 2021 17:45
How to Setup Docker in Jenkins on Mac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.jenkins-lts</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/openjdk@11/bin/java</string>
<string>-Dmail.smtp.starttls.enable=true</string>
@harshityadav95
harshityadav95 / ApplicationContextConfiguration.java
Created July 15, 2021 19:30
ApplicationContextConfiguration for Spring Web application
package learnmavenone;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration
public class ApplicationContextConfiguration {
def searchIndex(self,arr,target):
low,high=0,len(arr)-1
while low<=high:
mid=low+int((high-low)/2)
if arr[mid][1]>target:
high=mid-1
else:
low=mid+1
return max(0,low-1)
@harshityadav95
harshityadav95 / hello-world-in-pytorch-creating-neural-network-from-scratch-in-pytorch.ipynb
Created May 13, 2020 14:27
Hello World in Pytorch | Creating Neural Network from Scratch in Pytorch.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harshityadav95
harshityadav95 / webcam-in-google-colab-working.ipynb
Created May 5, 2020 15:26
Webcam in google colab working.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harshityadav95
harshityadav95 / kraken-in-google-colab.ipynb
Created May 4, 2020 19:33
kraken in google colab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@harshityadav95
harshityadav95 / shell.md
Last active May 2, 2020 07:30
Importing Data in Google Colab Notebook

1 .Using wget

 !wget http://your_domain/your_file.zip
  1. Mounting Google Drive locally
drive.mount(‘/content/gdrive’)