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
<div style="position:absolute;top:-999px;left:-999px"> | |
<svg | |
id="effectSvg" | |
width="200" | |
height="200" | |
viewBox="0 0 200 200" | |
xmlns="http://www.w3.org/2000/svg"> | |
<filter id="displacementFilter4"> |
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
/** | |
* @typedef {( | |
* "text/plain" | | |
* "text/html" | | |
* "text/css" | | |
* "text/javascript" | | |
* "application/javascript" | | |
* "application/json" | | |
* "application/xml" | | |
* "application/x-www-form-urlencoded" | |
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.mirrordust.gpscellinfodemo; | |
public class BaseStation { | |
private int mcc; // Mobile Country Code | |
private int mnc; // Mobile Network Code | |
private int lac; // Location Area Code or TAC(Tracking Area Code) for LTE |
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 mongodb::{ bson::doc, options::IndexOptions, Collection, Database, IndexModel }; | |
pub async fn auto_indexing_collection<T>(db: Database, key: Vec<String>, collection_name: String) | |
where T: serde::Serialize + serde::de::DeserializeOwned + Unpin + Send + Sync | |
{ | |
let options = IndexOptions::builder().unique(true).build(); | |
let collection: Collection<T> = db.collection(&collection_name); | |
for k in key { | |
let model = IndexModel::builder() | |
.keys(doc! { k : 1 }) |
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 helpers | |
import ( | |
"context" | |
"log" | |
"time" | |
"go.mongodb.org/mongo-driver/bson" | |
"go.mongodb.org/mongo-driver/mongo" | |
"go.mongodb.org/mongo-driver/mongo/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 ProvidersTree = BuildProvidersTree([ | |
[ProviderOne], | |
[ProviderTwo], | |
[ProviderThree, {data:data}], | |
]); | |
function App(): React.JSX.Element { | |
// something else.. | |
return ( | |
<ProvidersTree /> |
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
export const objectToFormData = ( | |
obj: Record<string, any>, | |
form?: FormData, | |
namespace?: string, | |
): FormData => { | |
const formData = form || new FormData(); | |
for (const property in obj) { | |
if (obj.hasOwnProperty(property)) { | |
const key = namespace ? `${namespace}[${property}]` : property; |
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
pub mod chrono_datetime_option_as_bson_datetime_option { | |
use bson::{ Bson, DateTime }; | |
use chrono::{ DateTime as ChronoDateTime, Utc }; | |
use serde::{ Deserialize, Deserializer, Serialize, Serializer }; | |
use std::result::Result; | |
use serde::de::Error; | |
pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<ChronoDateTime<Utc>>, D::Error> | |
where D: Deserializer<'de> | |
{ |