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 React, { Component } from 'react'; | |
import { render } from 'react-dom'; | |
import TimeAgo from 'react-timeago'; | |
class App extends Component { | |
render() { | |
return ( | |
<div> | |
<TimeAgo date={Date.now()} formatter={(value, unit, suffix) => { | |
switch (unit) { |
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
body { | |
margin: 0; | |
padding: 0; | |
} | |
.crop-image { | |
position: absolute; | |
background-color: rgba(71, 71, 71, 0.901); | |
top: 0; | |
right: 0; |
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
#include "grade_util.hpp" | |
#include "mem.hpp" | |
Segment* mk_segments(RawSegment* segs, int size) { | |
if (size == 0) | |
return nullptr; | |
Segment** head = new Segment*; | |
Segment** next_seg = head; | |
Segment* last_seg = nullptr; |
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
% This code is to perform the transfer matrix method | |
% T{1},T{2},T{3}, have been already calculated. they are | |
% obviously 2 by-2 matrices. Now we want to obtain vector D{i} for each transfer matrix coefficients above. | |
T{1} = [0.9982 - 0.0616i, -0.0119 + 0.0121i; | |
-0.0119 - 0.0121i, 0.9982 + 0.0616i]; | |
T{2} = [0.9831 - 0.1845i, -0.0157 - 0.0149i; | |
-0.0157 + 0.0149i, 0.9831 + 0.1845i]; |
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 React, { ChangeEventHandler } from "react"; | |
import Image from 'next/image' | |
import * as Helpers from "./helpers"; | |
import { CustomImage } from "./custom-image"; | |
import './style.css' | |
export function MainFunc() { | |
const [uploadedImages, setUploadedImages] = React.useState<CustomImage[]>([]); | |
const handleImageUpload = React.useCallback< | |
ChangeEventHandler<HTMLInputElement> |
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
// TerminalloadingAnimation.js | |
import React, { useState, useEffect } from 'react'; | |
const TerminalloadingAnimation = () => { | |
const [loadingAnimation, setLoadingAnimation] = useState('|'); | |
useEffect(() => { | |
const animationCharacters = ['|', '/', '-']; | |
const updateLoadingAnimation = () => { |
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
``` | |
'use client' | |
import EditProfile from "@/components/pages/profile/edit/edit"; | |
import { useState, useEffect } from "react"; | |
import secureLocalStorage from "react-secure-storage"; | |
import Reload from '@/components/layout/Reload'; | |
import { ProfileInfoFetching} from "@/services/auth"; | |
import Notfound from "@/app/not-found"; | |
export default function Home() { |
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
const nodemailer = require('nodemailer'); | |
const fs = require('fs'); | |
// Create a transporter using Gmail SMTP | |
const transporter = nodemailer.createTransport({ | |
service: 'Gmail', | |
auth: { | |
user: '[email protected]', // Your Gmail address | |
pass: 'your Application-specific password here', // Your Application-specific password | |
}, |
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
function solveFirstOrderODE() | |
function dydx = myODE(x, y) | |
dydx = -2 * x * y; %lets say dy/dx=−2xy | |
end | |
% Define the range of x values | |
xspan = [0 5]; % Define the start and end values of x | |
% Define the initial condition y(x0) = y0 |
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 time | |
from collections import defaultdict | |
# readign nodes data from nodes.csv | |
def read_nodes(file): | |
with open(file, 'r', encoding='utf-8') as f: | |
lines = f.readlines()[1:] # Skip header | |
nodes = {} |
OlderNewer