This file contains hidden or 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
/** | |
* | |
* @param {string} price | |
* @returns {string} | |
*/ | |
function truncatePrice(price){ | |
if(!price){ | |
return '0.00' | |
} |
This file contains hidden or 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 { useState } from 'react' | |
// These api states should be imported into whichever component uses this hook | |
// and should use ApiStates.{state} to do comparisons and not do direct string comparisons. | |
export const ApiStates = { | |
IDLE: 'IDLE', | |
LOADING: 'LOADING', | |
ERROR: 'ERROR', | |
SUCCESS: 'SUCCESS', | |
} |
This file contains hidden or 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
#!/bin/bash | |
for name in *.png; do | |
if ! test -f "${name%.*}.json" | |
then | |
echo "$name" | |
fi | |
done | |
# To run this script - |
This file contains hidden or 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 'package:flutter/material.dart'; | |
import 'package:flutter/animation.dart'; | |
import 'package:flutter/services.dart'; | |
void main() { | |
return runApp(MyApp()); | |
} | |
const LOREM_IPSUM = | |
'''Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Cursus metus aliquam eleifend mi in nulla posuere sollicitudin. Ultrices sagittis orci a scelerisque purus semper. Egestas pretium aenean pharetra magna ac placerat vestibulum lectus mauris. Diam vel quam elementum pulvinar etiam non quam lacus. |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class bricksLeft : MonoBehaviour { | |
private int BricksCount; | |
private brick Bricksleft; | |
public Text text; |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class brick : MonoBehaviour { | |
public int maxHits; | |
private int timesHit; | |
private LevelManager levelManager; | |
int notTimesHit; | |
//I made notTimesHit So later i can use it to change color |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class Paddle : MonoBehaviour | |
{ | |
// Use this for initialization | |
void Start() | |
{ |