Skip to content

Instantly share code, notes, and snippets.

View drex44's full-sized avatar
🎯
Focusing

Dhanraj Acharya drex44

🎯
Focusing
View GitHub Profile
@drex44
drex44 / error
Created March 7, 2016 07:35
Error while executing exec loader.sce
addinter(libbuild_lib_path + filesep() + 'libbuild_lib' + getdynlibext(), 'libbuild_lib', list_functions);
Link failed for dynamic library '/home/dhanraj/gsoc/scilab/scilab/scilab/modules/sha256//libbuild_lib.so'.
An error occurred: /home/dhanraj/gsoc/scilab/scilab/scilab/modules/sha256//libbuild_lib.so: undefined symbol: sha256
Link failed for dynamic library '/home/dhanraj/gsoc/scilab/scilab/scilab/modules/sha256//libbuild_lib.so'.
An error occurred: /home/dhanraj/gsoc/scilab/scilab/scilab/modules/sha256//libbuild_lib.so: undefined symbol: sha256
at line 15 of executed file /home/dhanraj/gsoc/scilab/scilab/scilab/modules/sha256/loader.sce
addinter: The shared archive was not loaded: (null)
@drex44
drex44 / builder_gw_c.sce
Created March 8, 2016 16:26
error while executing builder
// This file is released under the 3-clause BSD license. See COPYING-BSD.
function builder_gw_c()
includes_src_c = ilib_include_flag(get_absolute_file_path("builder_gateway_c.sce") + "../../src/c");
// PutLhsVar managed by user in sci_sum and in sci_sub
// if you do not this variable, PutLhsVar is added
// in gateway generated (default mode in scilab 4.x and 5.x)
WITHOUT_AUTO_PUTLHSVAR = %t;
@drex44
drex44 / privateRoute.js
Created August 28, 2018 15:19
Create private/protected route in react using react router v4
import { Switch, Route, Redirect } from "react-router-dom";
export const PrivateRoute = ({ component: Component, ...rest }) => (
<Route
{...rest}
render={props =>
props.isLoggedIn === true ? (
<Component {...props} />
) : (
<Redirect
// types of action
const Types = {
CREATE_ITEM: "CREATE_ITEM",
DELETE_ITEM: "DELETE_ITEM"
};
// actions
const createItem = task => ({
type: Types.CREATE_ITEM,
payload: task
});
import ACTIONS from "./action";
import _ from "lodash";
const defaultState = {
items: []
};
const todoReducer = (state = defaultState, action) => {
switch (action.type) {
case ACTIONS.Types.CREATE_ITEM: {
import { createStore, applyMiddleware } from "redux";
// Logger with default options
import logger from "redux-logger";
import reducer from "./reducer";
export default function configureStore(initialState) {
const store = createStore(reducer, initialState, applyMiddleware(logger));
return store;
import React, { Component } from "react";
import {
withStyles,
List,
ListItem,
ListItemSecondaryAction,
ListItemText,
IconButton,
Grid,
TextField,
import React, { Component } from "react";
import logo from "./logo.svg";
import "./App.css";
import ToDO from "./pages/todo";
import { Provider as ReduxProvider } from "react-redux";
import configureStore from "./modules/store";
const reduxStore = configureStore(window.REDUX_INITIAL_DATA);
class App extends Component {