Skip to content

Instantly share code, notes, and snippets.

View john-nash-rs's full-sized avatar
🎯
Focusing

Harsh Vardhan john-nash-rs

🎯
Focusing
View GitHub Profile
package app.skillcaptain.learningProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/my_first_api")
public class HelloWorldController {
package app.skillcaptain.learningProject;
import org.springframework.data.jpa.repository.JpaRepository;
public interface StudentRepository extends JpaRepository<Students, Long> {
}
package app.skillcaptain.learningProject;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class Students {
import java.util.Scanner;
public class ArithmeticCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the first number: ");
double num1 = scanner.nextDouble();
System.out.print("Enter the second number: ");
@john-nash-rs
john-nash-rs / StringDemo.java
Created June 11, 2023 12:18
To demo case matching in java : toLowerCase() and equalsIgnoreCase
import java.util.ArrayList;
import java.util.List;
public class StringDemo {
public static void main(String[] args) {
System.out.println("** Demo of String Functions **");
List<String> demoList = new ArrayList<>();
demoList.add("Bread");
demoList.add("Jam");
demoList.add("Egg");
package my.netty.http.upload;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.http.HttpRequestDecoder;
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
import React from 'react';
import { QueryRenderer } from 'react-relay';
import environment from './RelayEnvironment'
import graphql from 'babel-plugin-relay/macro';
import './tailwind.output.css';
export default class App extends React.Component {
//this.state = {farmCropId:1}
constructor(props) {
import {
Environment,
Network,
RecordSource,
Store,
} from 'relay-runtime';
function fetchQuery(
operation,
variables,
{
"name": "relay-example",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",