Skip to content

Instantly share code, notes, and snippets.

View Boggartfly's full-sized avatar
🎉
Focusing

Parth Sane Boggartfly

🎉
Focusing
View GitHub Profile
@Boggartfly
Boggartfly / struct.c
Last active August 29, 2015 14:00
Structures in C
#include<studio.h>
#include<conio.h>
struct employee {
int emp_id;
float salary;
char sex;
}emp[100];
void main()
{
/**
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
*/
public class AccountUtils {
/**
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
*/
package com.username.ussd;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.util.Log;
@Boggartfly
Boggartfly / rt_linux.h
Created December 1, 2014 06:00
patched rt_linux.h file for mt7601u driver
/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2010, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
@Boggartfly
Boggartfly / oclMat_custom_kernel.cpp
Created April 13, 2016 18:23 — forked from atinfinity/oclMat_custom_kernel.cpp
sample code to execute custom OpenCL kernel on OpenCV 2.4.9
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/ocl/ocl.hpp>
// cl_mem構造体を参照するためにインクルード
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
var graphics = Graphics.FromHwnd(IntPtr.Zero); // This gets the graphics configuration of the current screen
var scaleX = graphics.DpiX / 96; // 96 was our standard design DPI, remember?
var scaleY = graphics.DpiY / 96;
this.button1.Location = new System.Drawing.Point((int)Math.Round(20 * scaleX), (int)Math.Round(20 * scaleY));
this.button2.Location = new System.Drawing.Point((int)Math.Round(30 * scaleX), (int)Math.Round(30 * scaleY));
//Use this with C# and change x,y values.
@Boggartfly
Boggartfly / Create iOS Icons.jsx
Last active September 4, 2016 17:55 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@Boggartfly
Boggartfly / The Technical Interview Cheat Sheet.md
Created September 26, 2018 19:51 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@Boggartfly
Boggartfly / JSONEncoding.swift
Created December 10, 2018 00:58
JSON Encoding Swift
let encodedData = try jsonEncoder.encode(surveyFormResults)
let jsonRespresentation = String(data:encodedData,encoding:.utf8)
print(jsonRespresentation!)

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.