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
class Student | |
{ | |
String Name; | |
int Roll; | |
} | |
class Result extends Student | |
{ | |
float Mark; | |
void buildResult(){ | |
Name = "Rakibul Hasan"; |
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
class Student | |
{ | |
String name; | |
int roll; | |
Student(String N, int R) | |
{ | |
name = N; | |
roll = R; | |
} | |
Student(Student s) |
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
class Over | |
{ | |
public void add(int x, int y) | |
{ | |
int sum = x + y; | |
System.out.println("Sum of integer numbers: " + sum); | |
} | |
public void add(float x, float y) | |
{ | |
float sum = x + y; |
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 { Field, reduxForm } from 'redux-form'; | |
import { Form, Icon, Button, Message } from 'semantic-ui-react'; | |
import { LabelInputField } from 'react-semantic-redux-form'; | |
import { Redirect } from 'react-router-dom'; | |
import './Login.css'; | |
const LoginForm = props => { | |
const { handleSubmit, loginData } = props; | |
if (loginData.loggedIn) { |
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
componentDidMount() { | |
this.socket = io('http://localhost:3200'); | |
this.socket.on('new_checkin', data => { | |
console.log('*** New Data Arrived! ***'); | |
if (this.props.history.location.pathname !== '/business/discount') { | |
// When outside discount page, Discount Menu counter badge will show number of new data. | |
console.log('Outside Discount Page'); | |
this.props.checkinCounter(); | |
} | |
if (this.props.history.location.pathname === '/business/discount') { |
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
/* | |
** These are two actions for user login & logout. | |
** login action makes a api POST request with email & password in body. | |
** The reponse contains user id, token & a unique socket channel for current user. | |
** example => response: { data: { channelName: 'uniqueChannel', id: 1, token: 'JWT-TOKEN' } } | |
** logout action makes a api GET request with | |
** user id & token in header. | |
*/ | |
// See the socket middleware - https://gist.github.com/r4iku/bbe4c036afdffdc1ed73b3cedb8b4d3b |
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
// actions -> https://gist.github.com/r4iku/25bf72f7528ca6f226a578b0236c8ba8 | |
const SOCKET_CONNECT = 'SOCKET_CONNECT'; | |
const SOCKET_CLOSE = 'SOCKET_CLOSE'; | |
export const socketIOMiddleware = socket => ({ dispatch, getState }) => next => action => { | |
if (action.type === SOCKET_CONNECT) { | |
// subscribe socket on channelName | |
// it dispatches an action whenever there |
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
function callGf() { | |
var name = 'Jorina'; | |
function calling() { | |
console.log('Calling ' + name + ' jaan...'); | |
} | |
calling(); | |
} | |
callGf(); |
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
function callGf() { | |
var name = 'Jorina'; | |
return function() { | |
console.log('Calling ' + name + ' jaan...'); | |
} | |
} | |
var calling = callGf(); | |
calling(); | |
// same as doing: callGf()(); |
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
function showCallback(item) { | |
return function() { | |
showCalling(item.calling); | |
showInfo(item.info); | |
} | |
}; |
OlderNewer