Skip to content

Instantly share code, notes, and snippets.

View AlBannaTechno's full-sized avatar

Osama Al Banna AlBannaTechno

View GitHub Profile
@AlBannaTechno
AlBannaTechno / python-es6-comparison.md
Created August 14, 2018 12:03 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@AlBannaTechno
AlBannaTechno / IndexedDB101.js
Created September 23, 2018 15:30 — forked from cauerego/IndexedDB101.js
Very Simple IndexedDB Example
// quite untested, adapted from BigstickCarpet's gist, attempt to make it simpler to use
function openIndexedDB (fileindex) {
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
var openDB = indexedDB.open("MyDatabase", 1);
openDB.onupgradeneeded = function() {
var db = {}
@AlBannaTechno
AlBannaTechno / GEOVIA Surpac Resoueces.md
Created November 25, 2019 15:56
GEOVIA Surpac Videos & Books
[many tutorials]https://www.youtube.com/user/agosie/playlists

[from beginner to advanced] : https://www.youtube.com/watch?v=7nqM2P6vXb4&list=PLXjEkCD7CwxhaBdtzgnqaOVooUse0o2se

[From Beginner to advanced for Surpac 6.6.2+] : https://www.youtube.com/watch?v=YPBPIuUIIhg&list=PL_7hR7sVzPsLZrdcKX3bixt3zfZ2PhOxd

[modern tutorials] : https://www.youtube.com/watch?v=L2Y477QS8RY&list=PLeMIZhmqTIlCH_ZQJtNNRarqbvTRRlwEs
@AlBannaTechno
AlBannaTechno / SimpleViewModelViewHost.xaml
Last active May 10, 2020 05:05
SimpleViewModelViewHost
<UserControl x:Class="Sample.EnhancedViewModelViewHost"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:NetReactorLGS.Desktop.Helpers"
mc:Ignorable="d"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
d:DesignHeight="450" d:DesignWidth="800">
<ContentPresenter
@AlBannaTechno
AlBannaTechno / main.cpp
Last active April 16, 2021 05:02
Solve [Marwa] Accounts Information System - v1
#include<iostream>
#include <sstream>
#include<iomanip>
using namespace std;
string int_to_str(int i) // convert int to string
{
stringstream s;
s << i;
@AlBannaTechno
AlBannaTechno / dotnet_intrinsics_search.md
Created June 22, 2021 11:46 — forked from BastianBlokland/dotnet_intrinsics_search.md
Playing around with the new hardware intrinsics of .net core 3.0

.Net Core 3.0 (currently in preview) adds support for hardware intrinsics.

So now we can write simd instructions in c# 🎉

Intel has a nice website for browsing through the available instructions: Intel intrinsics guide

Everything from Avx2 down seems supported. (Given that your cpu supports it ofcourse)

For double checking what c# call maps to what instruction you can check the summary of the methods:

// Part Of SmartTech.NGOIPPF.Application
// All rights reserved © 2021 AlBannaTechno(OsamaAlBanna)
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
namespace SmartTech.NGOIPPF.Helper
{
/// <summary>
@AlBannaTechno
AlBannaTechno / main.sql
Created August 24, 2021 09:46
eXtra_update_statistics
/*
public enum StatisticsType
{
IosDevices = 1,
AndroidDevices = 2,
TotalDownloads = 3,
ServiceRequests = 4,
Sharing = 5
}
public async Task<GetAddressDetailMappingResponse> GetMappingDetails(GetAddressMappingData data)
{
#region Predefined
var ksaCountry = new AddressDetailMappingViewModel()
{
DetailId = Guid.Parse("33B45801-854A-42F8-B842-2D1BF42802FB"),
DetailMasterCodeid = Constants.MasterCodesID.COUNTRY,
DetailName = "Saudi Arabia",
DetailNameAR = "المملكة العربية السعودية"
// Part Of SmartTech.NGOIPPF.Application
using System;
using System.Collections.Generic;
namespace SmartTech.NGOIPPF.OuHome.DTO
{
public class TenantUnitsMoneyDetailsForUserDto
{
public int UserId { get; set; }