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 { env } from "cloudflare:workers"; | |
| import { parse } from "node-html-parser"; | |
| async function processWebsite(url: string, content: string) { | |
| const div = parse(content); | |
| const ogImage = div | |
| .querySelector(`[property="og:image"]`) | |
| ?.getAttribute("content"); |
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 from 'react'; | |
| class Menu extends React.Component { | |
| static Options = ({ className, children }) => { | |
| return ( | |
| <div className={'some-menu-options ' + className}>{ children }</div> | |
| ); | |
| } | |
| static Option = ({ className, children, onSelected }) => { |
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 showNotification(_notification){ | |
| let notificationNode = document.createElement('div'); | |
| notificationNode.id = _notification.id; | |
| notificationNode.innerText = _notification.message; | |
| wrapper.appendChild(notificationNode); | |
| setTimeout(() => wrapper.removeChild(document.getElementById(_notification.id)), _notification.duration); | |
| } |
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 notifEvent = (message, options) => { | |
| return new CustomEvent('a-notification', { detail: {message, options} }); | |
| } | |
| export const notify = ( message, opts = {} ) => { | |
| const defaultOptions = { duration: 2000, position: 'top' }; | |
| const options = { ...defaultOptions, ...opts }; | |
| document.dispatchEvent( notifEvent(message, options) ); | |
| } |
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 wrapper = document.createElement('div'); | |
| wrapper.classList.add('notifications'); | |
| document.body.appendChild(wrapper); | |
| document.addEventListener('a-notification', (e) => { | |
| const { message, options } = e.detail; | |
| const _notification = { message, ...options }; | |
| _notification.id = 'a-notif-' + Math.random().toString(36).substr(2, 5); |
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
| package com.example.waky.denti; | |
| import android.media.Ringtone; | |
| import android.media.RingtoneManager; | |
| import android.net.Uri; | |
| import android.os.StrictMode; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.View; |
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
| class ExpertRated extends Notification | |
| { | |
| use Queueable; | |
| private $rating; | |
| private $user; | |
| public function __construct(Rating $rating, User $user) | |
| { | |
| $this->rating = $rating; |
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
| <?php | |
| //Follows Schema | |
| //Here is the schema for the follows table | |
| Schema::create('follows', function (Blueprint $table) { | |
| $table->increments('id'); | |
| $table->integer('user_id'); | |
| $table->integer('followed_id'); | |
| $table->timestamps(); | |
| }); |
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
| protected void onCreate(Bundle savedInstanceState) { | |
| File folder = null; | |
| try { | |
| folder = new File(Environment.getExternalStorageDirectory() | |
| + "/Hymns Kali"); | |
| if(audioExist(folder, item_src)){ | |
| audio_state = 1; | |
| } | |
| } catch (Exception e) { | |
| e.printStackTrace(); |