source_repo string | license string | text string | word count int64 | letter count int64 | author_username null | id string |
|---|---|---|---|---|---|---|
009Kings/Dem_Dice | no_license | import 'package:flutter/material.dart';
import 'dart:math';
void main() => runApp(DemDice());
class DemDice extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Dem Dice',
theme: ThemeData(
primarySwatch: Colors.teal,
),
home: All... | 251 | 1,560 | null | 5275911293897746 |
00Bhuwan/pet_aid | no_license | import React from "react";
import { View, Text, FlatList, Image, TouchableOpacity, SafeAreaView } from "react-native";
import { Ionicons } from "@expo/vector-icons"; // Use expo vector icons
import { doctorsData } from "@/constants/data"; // Data file for doctors
// Card component to display individual doctor det... | 281 | 1,578 | null | 5329710419755985 |
00Bhuwan/pet_aid | no_license | import { Stack } from "expo-router";
import { useFonts } from "expo-font";
import { useEffect } from "react";
import * as SplashScreen from "expo-splash-screen";
import "./global.css";
export default function RootLayout() {
const [fontsLoaded] = useFonts({
"GentlyDemo-Regular": require("../assets/fonts/GentyDemo... | 60 | 401 | null | 9313698710825809 |
00Bhuwan/pet_aid | no_license | import React from "react";
import { View, Text, FlatList, Image, TouchableOpacity } from "react-native";
import { useCart } from "@/app/(root)/(tabs)/context/CartContext";
import product from "@/constants/data";
const allProducts = Object.values(product).flat(); // Combine all product categories
const Home = (... | 152 | 980 | null | 5246494847676830 |
00Bhuwan/pet_aid | no_license | import icons from "./icons";
import images from "./images";
// Sample Data
const product = {
toys: [
{ id: "1", name: "Benebone Dental Dog Chew Toy", price: "Rs 800", image: images.bone },
{ id: "2", name: "Pet Qwerks Nylon Dog Bone", price: "Rs 500", image: images.haddi1 },
{ id: "3", name: "i... | 482 | 1,873 | null | 2029726862488492 |
00Bhuwan/pet_aid | no_license | import React from 'react';
import { View, Text, ScrollView, Image, TouchableOpacity } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import images from '@/constants/images';
import icons from '@/constants/icons';
import { Link } from 'expo-router';
const SignIn = ( ) => {
const... | 265 | 1,768 | null | 3919077562198080 |
00Bhuwan/pet_aid | no_license | import { View, Text } from 'react-native'
import React from 'react'
import { router, useLocalSearchParams } from "expo-router";
const Property = () => {
const { id } = useLocalSearchParams();
return (
<View>
<Text>Property {id} </Text>
</View>
)
}
export default Property; | 42 | 188 | null | 6125327328850466 |
00Bhuwan/pet_aid | no_license | import React, { useState } from "react";
import { View, Text, TouchableOpacity, Modal, FlatList, Image, Button,ScrollView } from "react-native";
import { useRouter } from "expo-router";
import { useCart } from "@/app/(root)/(tabs)/context/CartContext";
import product from "@/constants/data";
const categories = [... | 259 | 1,616 | null | 2998768516058967 |
00Bhuwan/pet_aid | no_license | import { View, Text, ScrollView, Image, TouchableOpacity, TextInput } from 'react-native'
import React from 'react'
import { SafeAreaView } from 'react-native-safe-area-context'
import images from '@/constants/images';
import icons from '@/constants/icons';
import { Link } from 'expo-router';
const SignUp = () ... | 348 | 2,304 | null | 4882994733800473 |
00Bhuwan/pet_aid | no_license | import React, { createContext, useContext, useState } from "react";
import { Alert } from "react-native";
interface Product {
id: string;
name: string;
price: string;
image: any;
}
interface CartContextType {
cart: Product[];
addToCart: (item: Product) => void;
clearCart: () => void;
}
... | 179 | 847 | null | 3557569795290019 |
00Bhuwan/pet_aid | no_license | /** @type {import('tailwindcss').Config} */
module.exports = {
// NOTE: Update this to include the paths to all of your component files.
content: ["./app/**/*.{js,jsx,ts,tsx}","./component/**/*.{js,jsx,ts,tsx}"],
presets: [require("nativewind/preset")],
theme: {
extend: {
fontFamily: {
Gilroy:... | 78 | 327 | null | 8864748998576114 |
00Bhuwan/pet_aid | no_license | import google from "@/assets/icons/google.png";
import account from "@/assets/icons/account.png";
import add from "@/assets/icons/add.png";
import back from "@/assets/icons/back.png";
import cart from "@/assets/icons/cart.png";
import created from "@/assets/icons/created.png";
import doctor from "@/assets/icons/d... | 80 | 632 | null | 2158588069643328 |
00Bhuwan/pet_aid | no_license | import { Text, View } from "react-native";
import { Link } from "expo-router";
import React from "react";
import SignIn from "@/app/sign-in";
export default function Index() {
// return (
// <View
// style={{
// flex: 1,
// justifyContent: "center",
// alignItems: "center... | 87 | 408 | null | 9430339627755189 |
00Bhuwan/pet_aid | no_license | import greenlogo from "@/assets/images/greenlogo.png";
import whitelogo from "@/assets/images/whitelogo.png";
import autofood1 from "@/assets/images/autofood1.png";
import autofood2 from "@/assets/images/autofood2.png";
import autofood3 from "@/assets/images/autofood3.png";
import collar1 from "@/assets/images/col... | 143 | 1,276 | null | 6468193395967241 |
00Bhuwan/pet_aid | no_license | import React from "react";
import { View, Text, FlatList, Image, TouchableOpacity } from "react-native";
import { SafeAreaView } from 'react-native-safe-area-context';
import images from "@/constants/images";
import icons from "@/constants/icons";
import { Link } from "expo-router";
const MyAccountScreen: Rea... | 277 | 1,575 | null | 2760662462695700 |
00Bhuwan/pet_aid | no_license | import React from "react";
import { View, Text, FlatList, TouchableOpacity, Image } from "react-native";
import { useCart } from "@/app/(root)/(tabs)/context/CartContext";
import { useRouter } from "expo-router";
const Cart = () => {
const { cart, clearCart } = useCart();
const router = useRouter();
re... | 146 | 921 | null | 1502552954871379 |
00Bhuwan/pet_aid | no_license | import { View, Text, ScrollView, Image, TouchableOpacity, TextInput } from 'react-native'
import React from 'react'
import { SafeAreaView } from 'react-native-safe-area-context'
import images from '@/constants/images';
import icons from '@/constants/icons';
import { Link } from 'expo-router';
const LogIn = () =... | 255 | 1,767 | null | 1623718561518575 |
00Bhuwan/pet_aid | no_license | import { Image, ImageSourcePropType, Text, View } from 'react-native';
import React from 'react';
import { Tabs } from 'expo-router';
import icons from "@/constants/icons";
import { CartProvider } from "@/app/(root)/(tabs)/context/CartContext";
const TabIcon = ({
focused,
icon,
}: {
focused: boolean;
... | 233 | 1,236 | null | 3339230695184879 |
00steve/engine.control.loadscreen | no_license | bin/
ojb/
*.layout
*.depend
**.o* | 5 | 19 | null | 5150369472920030 |
00steve/engine.control.loadscreen | no_license | #ifndef __MAIN_H__
#define __MAIN_H__
#include <windows.h>
#include <engine/core/enginecontrol.h>
#include <engine/core/varmap.h>
#include "loadingscreen.h"
/* To use this exported function of dll, include this header
* in your project.
*/
#ifdef BUILD_DLL
#define DLL_EXPORT __declspec(dllexport)
#else
#... | 54 | 341 | null | 2837006904394387 |
00steve/engine.control.loadscreen | no_license |
#ifndef LOADING_SCREEN_H
#define LOADING_SCREEN_H
#include <gl/glu.h>
#include <engine/core/enginecontrol.h>
#include <engine/core/double3.h>
#include <engine/graphics/camera.h>
class LoadingScreen : public EngineControl {
private:
Camera* camera;
protected:
virtual void OnSetSettings();
virtual void OnG... | 47 | 410 | null | 4081043842519219 |
00steve/engine.control.loadscreen | no_license | #include "main.h"
// a sample exported function
extern "C" {
DLL_EXPORT EngineControl* Build()
{
return new LoadingScreen();
}
}
extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
... | 75 | 393 | null | 0851500567191039 |
00steve/engine.control.loadscreen | no_license | #include "loadingscreen.h"
LoadingScreen::LoadingScreen(){
}
LoadingScreen::~LoadingScreen(){
}
void LoadingScreen::Update(){
EngineControl::Update();
}
void LoadingScreen::Draw(){
glBegin(GL_LINES);
glColor3f(1,1,1);
glVertex3f(-1,0,0);
glVertex3f(0,0,0);
glColor3f(1,0,0);
glVertex3f(0... | 161 | 1,301 | null | 3059265188020607 |
01fe22bca209/Student_Details | no_license | class Student extends Course{
String name;
String usn;
String department="Computer Applications";
String program="BCA";
String registered_courses[]={"C#","JAVA","Python"};
public void display(){
System.out.println("-----Student Details-----");
name="Keerthi";
usn="01... | 45 | 470 | null | 3879028422972807 |
01fe22bca209/Student_Details | no_license | class Course{
public String course[]={"C#","JAVA","Python"};
public int marks[]={80,68,30};
public void displayMarks(){
System.out.println("Marks obtained for the courses");
System.out.println("Courses\t\t\tMarks");
for(int i=0;i<3;i++){
System.out.println(course[i]+"\t\... | 44 | 322 | null | 4876903155702623 |
01mailau/1SA_2SE_Laurin_Mair | no_license | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace _1SA_2SE_Laurin_Mair
{
public partial class tanken : Form
{
public tanken()
{
Initializ... | 106 | 667 | null | 3558525925829977 |
01mailau/1SA_2SE_Laurin_Mair | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace _1SA_2SE_Laurin_Mair
{
static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
... | 37 | 294 | null | 0591881965390200 |
01mailau/1SA_2SE_Laurin_Mair | no_license | # 1SA_2SE_Laurin_Mair | 2 | 14 | null | 0612081425461688 |
024VH98/synack-challenge | no_license | <!DOCTYPE html>
<html>
<head>
<title>Search Engine</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0... | 38 | 315 | null | 8683226675075311 |
024VH98/synack-challenge | no_license | import { useState, useEffect } from "react";
const getSearchResults = (query) => {
const [results, setResults] = useState(undefined);
useEffect(() => {
fetch(`/api/search${query}`)
.then((response) => response.json())
.then((data) => setResults(data.data));
}, []);
return results;
};
export ... | 36 | 217 | null | 6932086170504109 |
024VH98/synack-challenge | no_license | import React from "react";
const TextInput = ({ htmlFor, innerref, label = "", ...props }) => (
<label htmlFor={htmlFor}>
{label}
<input
type="text"
id={htmlFor}
name={htmlFor}
ref={innerref}
autoComplete="off"
{...props}
/>
</label>
);
export default TextInput;
| 33 | 174 | null | 1712473607270425 |
024VH98/synack-challenge | no_license | module.exports = {
collectCoverageFrom: ["<rootDir>/app/javascript/**/*.{js,jsx}"],
setupFilesAfterEnv: ["<rootDir>/app/javascript/setup-tests.js"],
globalSetup: "<rootDir>/app/javascript/global-setup.js",
roots: ["<rootDir>/app/javascript"],
};
| 12 | 176 | null | 9103672959265833 |
024VH98/synack-challenge | no_license | GET http://localhost:3000/api/search?e[]=bing&e[]=google&q=Platzi HTTP/1.1
| 3 | 48 | null | 3931412875318385 |
024VH98/synack-challenge | no_license | require "rails_helper"
RSpec.describe "Health endpoint", type: :request do
describe "GET /api/health" do
before { get '/api/health' }
it "should return OK" do
expect(payload).not_to be_empty
expect(payload['api']).to eq('OK')
end
it "should return status code 200" do
expect(respon... | 44 | 274 | null | 3136284230093771 |
024VH98/synack-challenge | no_license | import React from "react";
import { connect } from "react-redux";
import queryString from "query-string";
import { useHistory } from "react-router-dom";
import { setQuery, setEngines } from "../actions/index";
import Button from "./buttons/Button";
import Select from "./inputs/Select";
import TextInput from "./inputs/T... | 194 | 1,212 | null | 5509057059477060 |
024VH98/synack-challenge | no_license | import React from "react";
const Title = ({ children, ...props }) => <h1 {...props}>{children}</h1>;
export default Title;
| 17 | 76 | null | 7182598688891913 |
024VH98/synack-challenge | no_license | class Api::SearchController < ApiController
before_action :validate_params, only: [:search]
def search
search_result = SearchService.search(params[:q], params[:e])
return render json: {
data: search_result
}, status: :ok
end
private
def validate_params
validate_included_params
vali... | 60 | 472 | null | 0839421096789440 |
024VH98/synack-challenge | no_license | import React from "react";
const ResultCard = ({ result }) => {
const { title, url, overview, source } = result;
return (
<a href={url} target="blank">
<div className="result-card shadow">
<h3>{title}</h3>
<p>{overview}</p>
<span>{`Engine: ${source}`}</span>
</div>
</a>
... | 40 | 191 | null | 7609958409927063 |
024VH98/synack-challenge | no_license | import React from "react";
import { render, screen } from "@testing-library/react";
import ResultCard from "./ResultCard";
const result = {
title: "This is the title",
url: "www.google.com",
overview: "This is the overview",
source: "google",
};
describe(ResultCard, () => {
it("should render the result", as... | 60 | 422 | null | 4016281086288608 |
024VH98/synack-challenge | no_license | import React from "react";
import RestultCard from "./ResultCard";
import Spinner from "./Spinner";
const ResultsContainer = ({ results }) => {
if (results === undefined) return <Spinner />;
if (results.length === 0) return <>No hay resultados</>;
return (
<>
{results.map((result) => (
<Restult... | 52 | 255 | null | 7766791958093060 |
024VH98/synack-challenge | no_license | {
"name": "rails_react_recipe",
"private": true,
"scripts": {
"dev": "rails s || ./bin/webpack-dev-server",
"test": "jest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"app/javascript/**/*.{js,jsx}": [
"prettier --write",
"eslint"
]
... | 103 | 584 | null | 9610069386363955 |
024VH98/synack-challenge | no_license | /* eslint-disable import/no-extraneous-dependencies */
import fetchMock from "jest-fetch-mock";
import "@testing-library/jest-dom";
fetchMock.enableMocks();
afterEach(() => {
jest.resetAllMocks();
fetch.resetMocks();
});
| 17 | 163 | null | 3668678953302256 |
024VH98/synack-challenge | no_license | class BingSearchApi
BING_API_KEY = ENV['BING_API_KEY']
BING_URI = ENV['BING_URI']
BING_PATH = ENV['BING_PATH']
def self.web(query)
uri = URI("#{BING_URI}#{BING_PATH}?q=#{URI.escape(query)}&responseFilter=webpages")
request = Net::HTTP::Get.new(uri)
request['Ocp-Apim-Subscription-Key'] = BING_API_KE... | 68 | 529 | null | 4849861268535094 |
024VH98/synack-challenge | no_license | ### Implementation Notes
<!-- Here comes your notes -->
### Tasks
<!-- Here you can place all your tasks -->
### Testing
- [ ] Frontend tests
- [ ] Render
- [ ] Behavior
- [ ] Backend Tests
- [ ] Request
- [ ] Services
| 48 | 130 | null | 4762239990245339 |
024VH98/synack-challenge | no_license | import React from "react";
const Select = ({ label, htmlFor, innerref, options, ...props }) => (
<label htmlFor={htmlFor}>
{label}
<select id={htmlFor} name={htmlFor} ref={innerref} {...props}>
{options.map((option) => (
<option key={option.value} value={option.value}>
{option.title}
... | 39 | 228 | null | 8184224642476702 |
024VH98/synack-challenge | no_license | .search-container * {
margin: 10px 10px;
}
.result-container {
display: flex;
flex-direction: column;
margin-left: 500px;
border-left: 2px solid #34495e;
}
.spinner-container {
display: inline-block;
text-align: center;
}
.fixed-search{
position: fixed;
}
a {
color: #2c3e50;
text-decoration: non... | 64 | 331 | null | 2081048403309773 |
024VH98/synack-challenge | no_license | import React from "react";
import { render, screen } from "@testing-library/react";
import TextInput from "./TextInput";
describe(TextInput, () => {
it("should render TextInput", async () => {
render(<TextInput htmlFor="name" label="Name" />);
expect(await screen.findByLabelText("Name")).toBeInTheDocument();... | 34 | 222 | null | 7489896700820470 |
024VH98/synack-challenge | no_license | import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import { createStore, applyMiddleware } from "redux";
import reduxThunk from "redux-thunk";
import App from "../containers/App";
import reducer from "../reducers";
import "../assets/index.css";
const initialState = {
... | 65 | 462 | null | 2260445531642027 |
024VH98/synack-challenge | no_license | require "rails_helper"
RSpec.describe "Search endpoint", type: :request do
let!(:google_results) { generate_results("google") }
let!(:bing_results) { generate_results("bing") }
describe "GET /search" do
context "Invalid params" do
context "Missing" do
it "both query params" do
get "/a... | 190 | 1,567 | null | 3717291885935704 |
024VH98/synack-challenge | no_license | name: CI Tests
on: push
jobs:
backend-tests:
name: Backend Tests
runs-on: ubuntu-18.04
env:
api-dir: ./
services:
postgres:
image: postgres:11.6
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-... | 163 | 886 | null | 0067682923580884 |
024VH98/synack-challenge | no_license | class GoogleSearchService
def self.search(query, limit = 10)
search_result_encoded = Rails.cache.fetch("google-#{query}", expires_in: 1.hours) do
search_result = GoogleSearchApi.web(query)
return [] if search_result.has_key? "error"
JSON.generate(search_result)
end
Rails.cache.delete("go... | 32 | 300 | null | 9505026649722491 |
024VH98/synack-challenge | no_license | # Synack Challenge

### Overview
- In this repo you will find the solution for Synack challenge.
- This is built using Ruby on Rails and ReactJS, both are in the same repo, because Rails is rendering React views.
 => {
switch (action.type) {
case SET_QUERY:
return {
...state,
query: action.payload,
};
... | 63 | 314 | null | 6461137487730771 |
024VH98/synack-challenge | no_license | class GoogleSearchApi
def self.web(query)
normalize_response(GoogleCustomSearchApi.search(query))
end
def self.normalize_response(payload)
return {error: payload["error"]} if payload["error"]
{
results: payload['items'].map do |result|
{
id: result["link"],
title: re... | 34 | 268 | null | 3335617997970988 |
024VH98/synack-challenge | no_license | import React from "react";
import { render, screen } from "@testing-library/react";
import Select from "./Select";
const ENGINE_OPTIONS = [
{ value: "google", title: "Google" },
{ value: "bing", title: "Bing" },
{ value: "both", title: "Google and Bing" },
];
describe(Select, () => {
it("should render Select"... | 60 | 312 | null | 2788741133264740 |
024VH98/synack-challenge | no_license | import React from "react";
import { render, screen } from "@testing-library/react";
import Title from "./Title";
describe(Title, () => {
it("should render Title", async () => {
render(<Title>Some title</Title>);
expect(await screen.findByText("Some title")).toBeInTheDocument();
});
});
| 33 | 196 | null | 1448192018888081 |
024VH98/synack-challenge | no_license | class ApiController < ApplicationController
rescue_from Exception, with: :internal_error
rescue_from ActionController::BadRequest, with: :bad_request
def bad_request exception
render json: {error: exception.message}, status: :bad_request
end
def internal_error exception
render json: {error: exceptio... | 33 | 284 | null | 4557834663928133 |
024VH98/synack-challenge | no_license | class SearchService
def self.search(query, engines)
limit = 10 / engines.size
bing_results = []
google_results = []
normalized_query = query.downcase
bing_results = BingSearchService.search(normalized_query, limit) if engines.include? "bing"
google_results = GoogleSearchService.search(normaliz... | 38 | 295 | null | 6778510028886974 |
024VH98/synack-challenge | no_license | * {
margin: 0;
padding: 0;
font-family: 'Montserrat', sans-serif;
outline: none;
}
input[type=text] {
padding: 10px;
border: 1px solid #ccc;
border-radius: 10px;
box-sizing: border-box;
}
select {
padding: 10px;
border: 1px solid #ccc;
border-radius: 10px;
box-sizing: border-box;
}
.search-f... | 94 | 425 | null | 0741665861036203 |
024VH98/synack-challenge | no_license | import React from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import Button from "./Button";
describe(Button, () => {
it("should render Button", async () => {
render(<Button />);
expect(await screen.findByText("Search")).toBeInTheDocument();
});
it("should call onClick f... | 56 | 368 | null | 9977217621115743 |
024VH98/synack-challenge | no_license | class BingSearchService
def self.search(query, limit = 10)
search_result_encoded = Rails.cache.fetch("bing-#{query}", expires_in: 1.hours) do
search_result = BingSearchApi.web(query)
return [] if search_result.has_key? "error"
JSON.generate(search_result)
end
Rails.cache.delete("bing-#{q... | 32 | 292 | null | 0640450098881251 |
04tee/serverless-architecture-lab | no_license | {
"dependencies": {
"storage1": {
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/datalakebqepsizkbjydi",
"type": "storage.azure",
"connectionId": "AzureWebJobsStorage"
}
}
} | 14 | 215 | null | 3026281287535052 |
0Chuzz/rbc-rs | no_license | use crate::aig::*;
use std::collections::BTreeSet;
use std::collections::HashMap;
use std::iter::FromIterator;
use std::cell::RefCell;
use typed_arena::Arena as TypedArena;
#[derive(PartialEq, Eq, Hash, Clone)]
enum NodeKey<'a> {
Input(&'a String),
And(BTreeSet<AigEdge<'a>>)
}
pub struct Formula<'a> {
no... | 297 | 1,638 | null | 6449651041912195 |
0Chuzz/rbc-rs | no_license | extern crate rbc;
use std::collections::hash_map::HashMap;
use rbc::formula::Formula;
#[test]
fn test_hello() {
let f = Formula::new();
let empt = HashMap::default();
assert_eq!(f.trueval().eval(&empt), true);
}
#[test]
fn it_works() {
let f = Formula::new();
let a = f.var(&String::from("a"));
... | 51 | 300 | null | 6006707129036171 |
0Chuzz/rbc-rs | no_license | use std::collections::HashMap;
use crate::formula;
use crate::aig;
use generic_array::*;
use generic_array::sequence::GenericSequence;
pub trait BooleanLike {
fn truth() -> Self;
fn conjunction(a: &Self, b: &Self) -> Self;
fn negation(a: &Self) -> Self;
}
pub trait SymbolicEval<K, B: BooleanLike + Clone>... | 226 | 1,035 | null | 5458635658004351 |
0Chuzz/rbc-rs | no_license | use super::aig::AigEdge;
use ascii::AsciiStr;
use nom::*;
use nom::number::streaming::be_u8;
use nom::character::streaming::digit1;
use nom::character::is_digit;
use std::io::BufRead;
use std::str::FromStr;
//fn from_bytes(b: &[u8]) -> u32 {
// b.as_ascii_str().map_err(?.as_str()FromStr::from_str().expect("error par... | 177 | 954 | null | 1068784794485283 |
0Chuzz/rbc-rs | no_license |
pub mod aig;
pub mod symbolic;
pub mod aiger;
pub mod formula;
| 12 | 47 | null | 2795667212997640 |
0Chuzz/rbc-rs | no_license | use std::collections::HashMap;
use std::cmp::Ordering;
use std::option::Option;
//pub struct AigEdge;
#[derive(PartialEq, Eq, Hash)]
pub enum AigNode<'a> {
TrueNode,
VarNode(&'a str),
AndNode(AigEdge<'a>, AigEdge<'a>),
}
#[derive(PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AigEdge<'a> {
pub fli... | 137 | 673 | null | 4322992102103477 |
0Chuzz/rbc-rs | no_license | [package]
authors = ["Stefano <<EMAIL>>"]
name = "rbc"
version = "0.1.0"
edition = '2018'
[dependencies]
generic-array = "*"
typed-arena = '*'
nom = "*"
ascii = "*" | 27 | 89 | null | 2701575658181611 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { useSelector } from 'react-redux';
import { selectReadingType } from '../store/slices/uiSlice';
import { selectAllVerses } from '../store/slices/quranSlice';
import { BookLayout } from '../components/BookLayout';
import { VerseCard } from '../components/VerseCard';
export func... | 75 | 463 | null | 0417985978277080 |
0MeMo07/Quran-Web-Application | no_license | import { createBrowserRouter } from 'react-router-dom';
import { SurahPage } from './SurahPage';
import { VersePage } from './VersePage';
import { NotesPage } from './NotesPage';
import App from '../App';
import { ErrorPage } from '../components/ErrorPage';
export const router = createBrowserRouter([
{
... | 87 | 432 | null | 9821324901874640 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { X, Save } from 'lucide-react';
interface NotePopupProps {
isOpen: boolean;
onClose: () => void;
onSave: () => void;
content: string;
onChange: (content: string) => void;
verseNumber: number;
verseText?: string;
isEditing: boolean;
t: {
notes: {
addNote: s... | 238 | 1,636 | null | 4987451590426500 |
0MeMo07/Quran-Web-Application | no_license | {
"name": "quran",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-popov... | 85 | 483 | null | 2812244419721622 |
0MeMo07/Quran-Web-Application | no_license | import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
import { fetchAuthors } from '../../api/quranApi';
import type { RootState } from '../store';
import type { Author } from '../../api/types';
interface TranslationsState {
authors: Author[];
selectedAuthor: Author | null;
loading: boolean;
error:... | 235 | 1,656 | null | 6459203283609858 |
0MeMo07/Quran-Web-Application | no_license | /** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
arabic: ['Amiri', 'serif'],
hafs: ['KFGQPC Uthmanic Script HAFS', ... | 46 | 213 | null | 6842866162887681 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import Select from 'react-select';
import type { Language, Edition } from '../types';
interface LanguageSelectorProps {
languages: Language[];
selectedEditions: Edition[];
onEditionChange: (editions: Edition[]) => void;
}
export function LanguageSelector({
languages,
selectedEdi... | 110 | 716 | null | 1183611185944671 |
0MeMo07/Quran-Web-Application | no_license | import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
import { fetchSurahVerses, fetchSurahs, fetchVerseById } from '../../api/quranApi';
import type { RootState } from '../store';
import type { Surah, Verse } from '../../api/types';
interface QuranState {
surahs: Surah[];
currentSurah: number;
curre... | 433 | 2,757 | null | 8429910181002861 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
const globalStyles = `
em {
background-color: #D1FAE5;
border-radius: 4px;
padding: 2px 4px;
font-weight: 500;
color: #065F46;
font-style: normal;
}
`;
interface HighlightedTextProps {
text: string;
}
export const HighlightedText = ({ text }: HighlightedTextPr... | 54 | 266 | null | 5446526830303036 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { Copy, Share, X } from 'lucide-react';
import { useTranslations } from '../translations';
import { useSelector } from 'react-redux';
import { selectSelectedAuthor } from '../store/slices/translationsSlice';
interface ShareMenuProps {
isOpen: boolean;
onClose: () => void;
... | 244 | 1,696 | null | 1154433487788809 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { Book, AlignVerticalSpaceAround } from 'lucide-react';
import { useDispatch, useSelector } from 'react-redux';
import { selectReadingType, setReadingType } from '../store/slices/uiSlice';
import { useTranslations } from '../translations/index';
export type ReadingType = 'card' ... | 145 | 1,021 | null | 3529448987775032 |
0MeMo07/Quran-Web-Application | no_license | import React, { useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { BookLayout } from '../components/BookLayout';
import { selectAllVerses, setBookCurrentSurahId } from '../store/slices/quranSlice';
import { AppDispatch } from '..... | 107 | 714 | null | 5364648266856669 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { useNavigate, useRouteError } from 'react-router-dom';
import { useTranslations } from '../translations';
import { Home } from 'lucide-react';
export function ErrorPage() {
const error = useRouteError() as any;
const navigate = useNavigate();
const t = useTranslations()... | 136 | 865 | null | 1021147252350579 |
0MeMo07/Quran-Web-Application | no_license | import React, { useState } from 'react';
import { MessageSquare, Pencil, Trash2, Save, X } from 'lucide-react';
import { useDispatch, useSelector } from 'react-redux';
import { addNote, deleteNote, selectNotes } from '../../store/slices/uiSlice';
interface CardNoteSectionProps {
verseId: number;
surahId: number;
... | 335 | 2,307 | null | 9613858863977151 |
0MeMo07/Quran-Web-Application | no_license | import React, { useEffect } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { BookLayout } from '../components/BookLayout';
import { selectAllVerses, setBookCurrentSurahId } from '../store/slices/quranSlice';
import { AppDispat... | 78 | 502 | null | 7756614078730235 |
0MeMo07/Quran-Web-Application | no_license | export interface Author {
id: number;
name: string;
description: string;
language: string;
url: string | null;
}
export interface Surah {
id: number;
name: string;
name_en: string;
name_original: string;
slug: string;
verse_count: number;
page_number: number;
audio: Audio;
}
export interface... | 248 | 1,418 | null | 1249854109035065 |
0MeMo07/Quran-Web-Application | no_license | import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import type { RootState } from '../store';
export type ReadingType = 'card' | 'book';
export type ViewType = 'meal' | 'meal+kuran' | 'kuran+meal' | 'kuran';
export interface Note {
id: string;
verseId: number;
surahId: number;
surahName:... | 376 | 2,728 | null | 9243874142926485 |
0MeMo07/Quran-Web-Application | no_license | import { useState, useRef, useCallback } from 'react';
export function useAudioPlayer() {
const [isPlaying, setIsPlaying] = useState(false);
const [currentAudioId, setCurrentAudioId] = useState<number | null>(null);
const audioRef = useRef<HTMLAudioElement | null>(null);
const stopCurrentAudio = useCal... | 116 | 797 | null | 5007428255940447 |
0MeMo07/Quran-Web-Application | no_license | import { Author, Surah, Verse, SearchResponse, RandomSearchResponse } from './types';
const BASE_URL = 'https://api.acikkuran.com';
async function fetchData<T>(url: string): Promise<T> {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
co... | 172 | 1,229 | null | 0712239448236725 |
0MeMo07/Quran-Web-Application | no_license | import React, { useEffect } from 'react';
import { Search, X } from 'lucide-react';
import { useTranslations } from '../translations';
import { useSelector, useDispatch } from 'react-redux';
import { selectReadingType } from '../store/slices/uiSlice';
import { selectSelectedAuthor } from '../store/slices/translationsSl... | 310 | 2,319 | null | 8127555102086167 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import { NotesLayout } from '../components/notes/NotesLayout';
export const NotesPage = () => {
return <NotesLayout />;
}; | 21 | 104 | null | 6232724881215325 |
0MeMo07/Quran-Web-Application | no_license | import { Loader2 } from 'lucide-react';
import { useTranslations } from '../translations';
export function LoadingSpinner() {
const t = useTranslations();
return (
<div className="flex items-center justify-center min-h-screen bg-gradient-to-br from-emerald-50 to-teal-50 dark:from-gray-900 dark:to-gray-... | 50 | 354 | null | 0708852775862314 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
interface DeleteNotePopupProps {
isOpen: boolean;
onClose: () => void;
onConfirm: () => void;
t: {
notes: {
delete: string;
cancel: string;
deleteConfirmation: string;
};
};
}
export const DeleteNotePopup: React.FC<DeleteNotePopupProps> = ({
isOpen,
o... | 119 | 786 | null | 2176511154750805 |
0MeMo07/Quran-Web-Application | no_license | import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit';
import { searchQuran, getRandomVerse } from '../../api/quranApi';
import type { RootState } from '../store';
import type { SearchHit } from '../../api/types';
interface SearchState {
results: SearchHit[];
randomVerse: SearchHit... | 270 | 1,709 | null | 5556352558045395 |
0MeMo07/Quran-Web-Application | no_license | import { configureStore } from '@reduxjs/toolkit';
import quranReducer from './slices/quranSlice';
import translationsReducer from './slices/translationsSlice';
import uiReducer from './slices/uiSlice';
import searchReducer from './slices/searchSlice';
export const store = configureStore({
reducer: {
quran: qura... | 51 | 403 | null | 5477071671053017 |
0MeMo07/Quran-Web-Application | no_license | import React from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';
import { RouterProvider } from 'react-router-dom';
import { store } from './store/store';
import { router } from './routes';
import './index.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
... | 42 | 281 | null | 2467470034703628 |
0MeMo07/Quran-Web-Application | no_license | # Contributing to Quran Web Application
🎉 First off, thanks for taking the time to contribute! 🎉
## Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
## How Can I Contribute?
### Reporting Bugs 🐛
... | 460 | 2,122 | null | 8140144645179320 |
0MeMo07/Quran-Web-Application | no_license | @import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');
@layer base {
body {
font-family: 'Inter', sans-serif;
}
.font-arabic {
font-family: 'Amiri', serif;
}
}
@layer utilities {
.scrollbar-hidden {
scrollbar-width: none;
... | 40 | 297 | null | 9728971231293958 |
0MeMo07/Quran-Web-Application | no_license | <div align="center">
<img src="src/assets/quran.png" alt="Quran Web Application" width="200"/>
<h1>📖 Quran Web Application</h1>
<p>A modern, feature-rich Quran application built with React and TypeScript</p>
<div align="center">
<img src="https://img.shields.io/badge/React-20232A?style=for-the-badge... | 279 | 1,785 | null | 3354474588383947 |
0V0h/passwdbook | no_license | # PasswordBook
PasswordBook 是用于加密记录密码信息的 Python 小工具,验证主密码通过后即可对密码本的信息进行增删查。
## 安装
安装依赖:```pip install -r requirements.txt```
## 使用
执行命令启动 ```python passwordbook.py```
- 如存在其他密钥文件须删除,仅保留py脚本。
- 在首次运行 PasswordBook 时,需生成密钥对,更新默认主密码。
- 建议将文件目录添加到环境变量中,以便使用。
## 依赖
- colorama
- pycryptodome
| 31 | 218 | null | 7094620578543017 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.