Skip to content

Instantly share code, notes, and snippets.

Avatar
🇵🇱
Working on the biggest, free programming course in Poland - CodersCamp.pl

Mateusz Nowak nowakprojects

🇵🇱
Working on the biggest, free programming course in Poland - CodersCamp.pl
View GitHub Profile
View CodersCampReactSolution.tsx
import React, { useCallback, useEffect, useState } from "react";
import { StockApi, StockInfo, StockSymbol, SubscriptionId } from "../api";
interface LiveStockViewProps {
readonly symbol: StockSymbol;
}
interface LiveStockViewState {
prevStockInfo?: StockInfo;
stockInfo?: StockInfo;
View App.tsx
import React, {useEffect, useState} from "react";
import {AppProps} from "./LegacyApp";
import {StockApi, StockInfo, StockSymbol, SubscriptionId} from "../api";
function App(props: AppProps) {
const [state, setState] = useState({selectedSymbol: props.symbols[0]})
const handleOnClick = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault();
const symbol = (e.target as HTMLAnchorElement).getAttribute(
View RealmListParcelConverter.java
public class RealmListParcelConverter implements TypeRangeParcelConverter<RealmList<? extends RealmObject>, RealmList<? extends RealmObject>> {
private static final int NULL = -1;
@Override
public void toParcel(RealmList<? extends RealmObject> input, Parcel parcel) {
if (input == null) {
parcel.writeInt(NULL);
} else {
parcel.writeInt(input.size());
for (RealmObject item : input) {
@nowakprojects
nowakprojects / KompendiumProgramistyJavaCwiczeniaWydanieIX_.idea_.name
Created Apr 28, 2016
My home JAVA exercises from Programmist Compendium by Herbert Schildt BOOK.
View KompendiumProgramistyJavaCwiczeniaWydanieIX_.idea_.name
KompendiumProgramistyJavaCwiczeniaWydanieIX