Skip to content

Instantly share code, notes, and snippets.

View AlBannaTechno's full-sized avatar

Osama Al Banna AlBannaTechno

View GitHub Profile
@AlBannaTechno
AlBannaTechno / 1_create_ApplicationDevices_table.sql
Last active September 14, 2021 23:45
extra_separate_devices_from_customers
create table ApplicationDevices
(
Id int identity
constraint ApplicationDevices_pk
primary key nonclustered,
SerialNumber varchar(64) not null,
OperationSystemType int,
CreationDate datetime2,
ModifiedDate datetime2,
Registered bit
@AlBannaTechno
AlBannaTechno / main.sql
Created September 13, 2021 13:12
eXtra_CustomerStatus_seed
insert into CustomerStatus (CustomerId, CreationDate, CompletedRequestsCount, OperationSystemType, DeviceId, Registered,
ModifiedDate)
select distinct cus.Id as CustomerId,
cus.CreationDate as CreationDate,
(
select Count(prs1.Id)
from ServiceRequests as prs1
where prs1.CustomerId = cus.Id AND prs1.Status = 2
)
as CompletedRequestsCount,
// Part Of SmartTech.NGOIPPF.Application
using System;
using System.Collections.Generic;
namespace SmartTech.NGOIPPF.OuHome.DTO
{
public class TenantUnitsMoneyDetailsForUserDto
{
public int UserId { get; set; }
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 = "المملكة العربية السعودية"
@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
}
// 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 / 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:

@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 / 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 / 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