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, { Component } from 'react'; | |
import './App.css'; | |
import { Items } from '../containers/Items' | |
export default class App extends Component { | |
render() { | |
return ( | |
<div> | |
<Items /> |
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, {Component} from 'react'; | |
import {graphql} from 'react-apollo'; | |
import addLike from '../queries/addLikes.js'; | |
import removeLike from '../queries/removeLikes.js'; | |
import getSongQuery from '../queries/fetchSongByID'; | |
class Likes extends Component { | |
onAddLikeClick(){ |
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, {Component} from 'react'; | |
import {graphql, compose} from 'react-apollo'; | |
import addLike from '../queries/addLikes.js'; | |
import removeLike from '../queries/removeLikes.js'; | |
import getSongQuery from '../queries/fetchSongByID'; | |
class Likes extends Component { | |
onAddLikeClick(){ |
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
//throtteling bandwith in chrome network to see what is actual happeing | |
import React, {Component} from 'react'; | |
import {graphql, compose} from 'react-apollo'; | |
import addLike from '../queries/addLikes.js'; | |
import removeLike from '../queries/removeLikes.js'; | |
import getSongQuery from '../queries/fetchSongByID'; | |
class Likes extends Component { |
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
# for https://www.codewars.com/kata/sum-of-the-first-nth-term-of-series/train/python | |
# solution is using decimal | |
from decimal import Decimal, ROUND_HALF_UP | |
def series_sum(n): | |
raise_by = 3 | |
multiplier = 1; | |
sum_list = [] | |
for i in range(1,n+1): |
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
``` | |
declare type Deal = { | |
id?: string, | |
dealId?: number, | |
invoiceId?: string, | |
paymentToken?: string, | |
createdAt?: string, | |
expiresAt?: string, | |
campaign?: string, | |
owner: Owner, |
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
#this should be copied into schulcloud-server/backup/setup | |
#goto schulcloud-server/backup/setup and pyhton seed_schulcloud-server.py | |
import os | |
for filename in os.listdir(os.getcwd()): | |
print(len(filename.split('.'))) | |
if len(filename.split('.')) <= 2: | |
string = str('mongoimport --db schulcloud --collection '+str(filename.split('.')[0])+' --drop --jsonArray '+str(filename)) | |
print(string) |
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
<template> | |
<div | |
:class="cssClasses()" | |
class="cmp-radio-wrap" | |
> | |
<input | |
:type="type" | |
:id="id" | |
:name="name" | |
:disabled="disabled" |
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 * as Actions from '../constants/actions'; | |
import {createAction} from 'redux-actions'; | |
import axios from 'axios'; | |
import {isNullOrUndefined} from "util"; | |
import * as generals from './general'; | |
function createAxiosInstance() { | |
const jwt_token = localStorage.getItem('token'); | |
return axios.create({ |
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 * as React from 'react'; | |
import {connect} from 'react-redux'; | |
import {RouteComponentProps} from 'react-router'; | |
import {emptyDeal} from '../../models/emptyDeal'; | |
import * as fetchDealItemActions from '../../actions/deals'; | |
import * as swalActions from '../../actions/general'; | |
import * as Sticky from 'react-sticky-el'; | |
import {DealForm} from '../../components/Deals/dealForm'; | |
import {IChangeEvent} from 'react-jsonschema-form'; |
OlderNewer