View HttpUploadServerInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
View nginx.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
View App.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
View RelayEnvironment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Environment, | |
Network, | |
RecordSource, | |
Store, | |
} from 'relay-runtime'; | |
function fetchQuery( | |
operation, | |
variables, |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", |
View relay.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// ... | |
// Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`. | |
src: "./src", | |
schema: "./data/schema.graphql", | |
exclude: ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"], | |
} |
View MetaData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MetaData { | |
private UUID uuid; | |
private String fileName; | |
private int startIndex; | |
private int lastIndex; | |
private int size; | |
} |
View json-demo.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "encoding/json" | |
var m map[string]string | |
var mDup map[string]string | |
func main() { | |
m = make(map[string]string) |
View struct-student.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Student struct { | |
Name string | |
Address string | |
Class string | |
} |
View mapsDemo.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
students := make(map[int]string) | |
students[0] = "Harsh" | |
students[1] = "Yash" | |
fmt.Println(students) | |
delete(students, 1) | |
fmt.Println(students) | |
students[1] = "Jain" | |
for roll, name := range students{ | |
fmt.Printf("Roll number of %s is %d \n",name, roll) |
NewerOlder