Skip to content

Instantly share code, notes, and snippets.

View Raja0sama's full-sized avatar
😍
CODING DAY NIGHT

Raja Osama Raja0sama

😍
CODING DAY NIGHT
View GitHub Profile
@Raja0sama
Raja0sama / user.js
Created May 18, 2021 21:26
DVA Redux
import Auth from '@/services/auth';
import { queryCurrent, query as queryUsers } from '@/services/user';
import Firestore from '@/services/firestore';
import { refs, functions, auth, db } from '@/services/utils/firebase_config';
import { getAuthority, removeAuthority, setAuthority } from '@/utils/authority';
import { dispatch, RANDOMWORDS, redirectWhenLoggedIn, replacerFunc } from '@/utils/utils';
import { message } from 'antd';
import axios from 'axios';
import { loadAlerts } from '@/.umi/plugin-dva/connect';
import { history } from 'umi';
import React, { useState } from 'react';
import styles from './index.less';
import { Form, Input, Button, Checkbox } from 'antd';
import { UserOutlined, LockOutlined } from '@ant-design/icons';
import { useIntl, connect, FormattedMessage } from 'umi';
import { Login as Log } from '@/models/user';
const LoginMessage = ({ content }) => (
<Alert
style={{
@Raja0sama
Raja0sama / loadMore.js
Created June 17, 2021 12:04
Load more feature for any HTML element containing multiple childnodes.
let init = (el) => {
var container = document.getElementsByClassName(el)
let list = container[0].children
const defEl = 2
let def = defEl
Array.from(list).forEach(e => e.style.display = "none")
return () => {
let a = false
Array.from(list).forEach((e, i) => {
console.log({ i, def })
@Raja0sama
Raja0sama / index.java
Created March 15, 2022 12:22
I am stuck
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class App {
// Number of neurons in the input layer
private static final int INPUT_NEURONS = 4;
private static final int INPUTS_LENGTH = 64;
@Raja0sama
Raja0sama / data.json
Created August 22, 2022 12:55
Sample Car Data
[
{
"year": "2022",
"make": "honda",
"model": "civic",
"style": "401875382",
"url": "https://www.edmunds.com/car-maintenance/results.html?styleId=401875382&mileage=40000",
"styleModel": "LX 4dr Sedan (2.0L 4cyl CVT)",
"data": {
"makes": [{ "id": "200001444" }],