Skip to content

Instantly share code, notes, and snippets.

View iamsardorbek's full-sized avatar

Sardorbek Khujaev iamsardorbek

View GitHub Profile
async function orderCompliesWithMML() {
let data = {
room_id: d.room_id,
person_id: d.person_id,
currency_id: ctrl.currency_id,
delivery_date: d.delivery_date,
ignore_balance: ctrl.ignore_balance,
price_type_id: priceTypeIds(),
payment_type_id: d.payment_type_id,
@iamsardorbek
iamsardorbek / assortment_check_equipment.sql
Created July 29, 2022 05:14
assortment_check_equipment.sql
select t.Company_Id,
(select k.Name
from Md_Companies k
where k.Company_Id = t.Company_Id) Company_Name,
t.Assortment_Id,
(select k.Name
from Tmcg_Assortments k
where k.Company_Id = t.Company_Id
and k.Assortment_Id = t.Assortment_Id) Assortment_Name,
t.Product_Id,
@iamsardorbek
iamsardorbek / query.sql
Created July 19, 2022 05:49
MFGs with Input with 0 amount, >= 2 outputs
with Input_Item_Amount as
(select case t.Coa_Id
when 101336 then
'M'
when 101356 then
'P'
when 101360 then
'G'
end Inventory_Kind,
k.Source_Id Manufacture_Id,
@iamsardorbek
iamsardorbek / query.sql
Created July 19, 2022 05:49
Unique products participated in mfg (CRG)
select count(*)
from (select distinct Product_Id
from Mfg_Manufacture_Outputs
union
select distinct Product_Id
from Mfg_Manufacture_Inputs);
@iamsardorbek
iamsardorbek / Query for CRG problematic manufacture items
Last active July 18, 2022 10:28
Query for CRG problematic manufacture items (with input item amounts)
with Input_Item_Amount as
(select case t.Coa_Id
when 101336 then
'M'
when 101356 then
'P'
when 101360 then
'G'
end Inventory_Kind,
k.Source_Id Manufacture_Id,
@iamsardorbek
iamsardorbek / Query for CRG problematic manufacture items
Last active July 18, 2022 05:29
Query for CRG problematic manufacture items
with Manufacture_Items as
(select 'I' Item_Kind,
Mi.Company_Id,
Mi.Input_Item_Id Item_Id,
Mi.Manufacture_Id,
Mi.Product_Id,
Mi.Inventory_Kind,
Mi.Quantity,
null Amount
#include <iostream>
#include <queue>
#include <fstream>
#define TIMESTAMP_A 2000 //milliseconds
#define TIMESTAMP_B 200 //milliseconds
#include <thread>
#include <mutex>
#include <map>
@iamsardorbek
iamsardorbek / OS_assignment_threads_with_mutex.py
Created February 13, 2021 12:30
OS assignment on threads (problem solved)
import threading
import time
var = 0
mutex = threading.Lock()
def runner0():
i = 0
global var
while i < 1000000:
@iamsardorbek
iamsardorbek / OS_assignment_threads_without_mutex.py
Created February 13, 2021 12:28
OS assignment on threads (unpredictable counters problem)
import threading
import time
var = 0
def runner0():
i = 0
global var
while i < 1000000:
@iamsardorbek
iamsardorbek / MainActivity.java
Created March 26, 2020 11:30
Приложение для считывания QR Code
package uz.akfa.qrscanner;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Camera;
import android.os.Bundle;