Skip to content

Instantly share code, notes, and snippets.

@namespace Components
<MudChart ChartType="ChartType.Bar" ChartSeries="@Series"
XAxisLabels="@XAxisLabels.ToArray()"
Width="100%" Height="350px" ChartOptions="chartOptions"></MudChart>
@code {
[Parameter] public string SeriesName { get; set; }
You have to use "::deep" on CSS that is applied to custom components such as MudBlazor components. Custom components have to be enclosed in a nativ component thus the "<div>".
"::deep" CSS does not work on nativ components as it seems.
@page "/"
<h1>@pageTitle</h1>
<div class="mainPaper">
@DateTime.Now.ToLongTimeString()
import React from 'react'
import IconButton from '@material-ui/core/IconButton';
import { render } from 'react-dom';
import Modal from '@material-ui/core/Modal';
import Backdrop from '@material-ui/core/Backdrop';
import Fade from '@material-ui/core/Fade';
import Paper from '@material-ui/core/Paper';
import Grid from '@material-ui/core/Grid';
import { makeStyles } from '@material-ui/core/styles';
import { Divider, Typography } from '@material-ui/core';
@kiranmaya
kiranmaya / gist:0e3b528e2b17265067afc9ad4ba0d94e
Created July 6, 2020 18:33
Zerodha Kite Brokerage Calculation
//Order Value is StockPrice X Quanity
//This is INTRADAY EQUITY,for Futures Change Percentages of charges as stated in brokerage caliculator page
static decimal GetBrokerage(decimal OrderValue)
{
decimal brokerage = 0;
decimal zerodhaFee = OrderValue * 0.0003m;
if( zerodhaFee > 20 ) zerodhaFee = 20;
zerodhaFee *= 2;
brokerage += zerodhaFee;
@kiranmaya
kiranmaya / notes
Created February 7, 2020 23:07
Colab python
saving model in gogle drive
from google.colab import drive
drive.mount('/content/gdrive')
model_save_name = 'classifier.pt'
path = F"/content/gdrive/My Drive/{model_save_name}"
torch.save(model.state_dict(), path)
public class testDQN
{
public class Env
{
int n_action;
int n_expericePool;
int n_expericeSamples;
int n_samplesEveryType;
int NDaction_last = 0;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NeroTrader
{
public class PivotPointResult
{
static string ApplicationName = "Google Sheets API .NET Quickstart";
string url = "https://docs.google.com/spreadsheets/d/1FTbqxgf1qdgXdPIQFgOg9cjzHP827S2gkpGy1kwJ6Cw/edit#gid=0";
public fbEth()
{
}
@kiranmaya
kiranmaya / Remap c# float Unity3d
Created May 16, 2017 12:01
convert from one range to another equivalent range
float extension
public static float Remap(this float value, float from1, float to1, float from2, float to2,bool isClamped= false)
{
if(isClamped)
{
value = Mathf.Clamp(value,from1,to1);
}
return (value - from1) / (to1 - from1) * (to2 - from2) + from2;
}
http://www.codeproject.com/Articles/259621/Google-Image-Search-Client-in-Csharp-and-WPF
c# api search
https://developers.google.com/api-client-library/dotnet/get_started
image url http://stackoverflow.com/questions/3615800/download-image-from-the-site-in-net-c