Skip to content

Instantly share code, notes, and snippets.

mkdir trydiff
git init
vim -p readme
git status
//predict the status
git diff
//predict the diff
//if diff is ok :
git add
git diff head
public class Lesson2{
private static void push(int[] stack,int elem,int top){
stack[top] = elem++;
//top = 0
top++;
//top = 1 top is just a local variable -
//changes made to it are not passed to main function
}
//Lesson1neeraj.java
public class Lesson1neeraj{
//instance method
private void sayHello(String name){
System.out.println("Hello "+name);
}
public static void main(String[] args){
{1,2,3,4,5,6}
String[] args = null
public class Lesson1neeraj{
//instance method
private void sayHello(String name){
System.out.println("Hello "+name);
}
public static void main(String[] args){
public class Lesson1neeraj{
public static void main(String[] args){
System.out.println("Hello "+args[0]);// array index out of bounds exception
}
}
table(autolink: false) do
# new topic
table(autolink: false) do
# Add label in config/locales/en.yml , filter is route of your admin, resource
admin:
filter:
buttons:
myfilter: "View Filter Results"
@karan-ta
karan-ta / perceptron.py
Last active March 13, 2020 16:05
Perceptron neural network in python from scratch - Under 10 lines of code - works for and gate , or gate
#Read this first - https://jontysinai.github.io/jekyll/update/2017/09/24/the-mcp-neuron.html
#Set The inputs and the desired Outputs for and gate.
x1,x2,y = [0,0,1,1],[0,1,0,1], [0,0,0,1]
#Set Random values for weights w1,w2 and for the bias b. initialize all to 0
w1,w2,b = 0,0,0
#try 100 iterations to see if the perceptron can guess that we need a fucking and gate.
for _ in range(100):
#iterate for each input:
for i in [0,1,2,3]:
#just guess a y value based on our random weights and bias
@karan-ta
karan-ta / helloflutterscaffold.dart
Created April 27, 2020 18:57
helloflutterscaffold
import 'package:flutter/material.dart';
void main() {
runApp(new HelloWorldText());
}
class HelloWorldText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(