Skip to content

Instantly share code, notes, and snippets.

View Anil8753's full-sized avatar
🎯
Focusing

Anil Kumar Anil8753

🎯
Focusing
View GitHub Profile
/////////////////////////////////////////////////////////////////////////////
// Name: src/osx/cocoa/nonownedwnd.mm
// Purpose: non owned window for cocoa
// Author: DavidStefan Csomor
// Modified by:
// Created: 2008-06-20
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
if (i < (text.Length() - 1)) // if ch is not the last character in text
{
wxUniChar chNext = text.at(i+1);
if (chNext == wxUniChar(0x3001) || chNext == wxUniChar(0x3002)) // Judou punctuation marks '、' and '。'
{
m_wrapped.RemoveLast();
i--;
}
m_wrapped << '\n';
@Anil8753
Anil8753 / MongoDB_Backup_and_Restore.txt
Last active August 1, 2020 13:17
MongoDB Backup and Restore
Reference:
https://www.w3resource.com/mongodb/mongodb-backup-restore.php
"============ BACKUP ==========="
Default
Dumps all the databases into current directory
D:\mongodb\bin>mongodump
Backup a Database with mongodump specify the --host and --port
D:\mongodb\bin>mongodump --host 19.110.108.46 --port 27017
@Anil8753
Anil8753 / struct-json-sort.go
Last active December 22, 2021 14:37
json.Marshal() retains the struct keys order in which they are define in the struct. This snippet `JsonRemarshal` sort the struct keys
package main
import (
"encoding/json"
"fmt"
)
type AmountType struct {
Value string `json:"value"`