LSA UDS Label List

page 50501 "LSA UDS Label List"
{
    ApplicationArea = All;
    Caption = 'UDS Label List';
    PageType = List;
    SourceTable = "LSA UDS Label";
    UsageCategory = Tasks;

    layout
    {
        area(content)
        {
            repeater(General)
            {
                Caption = 'UDS Label Label';
                field(Referece; Rec.Referece)
                {
                    ApplicationArea = All;
                    ToolTip = 'Specifies the value of the Re

Barcode

report 50500 "LSA Receipt Label"
{
    DefaultLayout = RDLC;
    RDLCLayout = './src/Layouts/UDSReceiptLabel.rdl';
    Caption = 'UDS Receipt Label';

    dataset
    {

        dataitem(LSAUDSLabel; "LSA UDS Label")
        {
            dataitem(CopyLoop; Integer)
            {
                DataItemTableView = SORTING(Number);
                column(CompanyInfoPicture; CompanyInfo.Picture) { }
                column(NoUDS; LSAUDSLabel."UDS No.") { }
                column(It

geo

<php
if (!empty($_SERVER['HTTP_CLIENT_IP'])) $ip = $_SERVER['HTTP_CLIENT_IP'];
    elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    else $ip = $_SERVER['REMOTE_ADDR'];
$countryXX = geoip_country_code_by_name($ip);
 if ($countryXX == 'UA') {
 
 }
?>

Animations

<div class="flex justify-around p-20">
  <!-- Wiggle animation -->
  <div class="flex flex-col gap-4">
    <span>wiggle</span>
    <div class="h-16 w-16 animate-wiggle rounded-md bg-pink-400"></div>
  </div>

  <!-- heartBeat animation -->
  <div class="flex flex-col gap-4">
    <span>heartBeat</span>
    <div class="h-16 w-16 animate-heartBeat rounded-md bg-blue-400"></div>
  </div>

  <!-- flipHorizontal animation -->
  <div class="flex flex-col gap-4">
    <span>flipHorizontal<

Array_flip : keys from input become values and values from input become keys

<?php
   $input = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
   
   print_r(array_flip($input));
?> 

Angular render Html from API

HTML
<div class="scroll-light" style="flex:1;overflow: auto; background-color: #dae0de; padding: 10px; " [innerHTML]="htmlData">

CONTROLLER
  htmlData:any;
  ngOnChanges(changes: SimpleChanges) {
    if (changes.requestFilter && changes.requestFilter.currentValue) {
      this.kpiApiSvc.getSummary({...this.requestFilter, currentUrl: window.location.href}).subscribe(data => {
        this.htmlData = data;
      })
    }
  }
  
  API
  getSummary(filter:GroupFilterRequestDto): Observable<any> {
 

Сон в linux альтернативная программа | Sleep in linux alternative program

Сон в linux альтернативная программа | Sleep in linux alternative program
# Сон в linux альтернативная программа | Sleep in linux alternative program

## Установка 
	sudo apt install pm-utils

## Usage
	sudo pm-suspend

topo

vector<int> topo(vector<int> al[], int n) 
{
    //finding the indegegree of all the nodes
    vector<int> ans;
    vector<int> ind(n,0);
    for(long long i=0;i<n;i++)
    {
        for(long long j=0;j<al[i].size();j++)
        {
            ind[al[i][j]]++;
        }
    }

    queue<int> q;
    // doing the first insertion in the queue
    for(long long i=0;i<n;i++)
    {
        if(ind[i]==0) q.push(i);
    }

    while(!q.empty())
    {
        int x=q.front();
      

Array_filter*: Iterates over each value in the input array passing them to the callback function

<?php
   function odd($var) {
      return($var & 1);
   }
   
   function even($var) {
      return(!($var & 1));
   }
   
   $input1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
   $input2 = array(6, 7, 8, 9, 10, 11, 12);
   
   echo "Odd Values:\n";
   print_r(array_filter($input1, "odd"));
   
   echo "Even Values:\n";
   print_r(array_filter($input2, "even"));
?> 

Array Fill Key: Add a teacher's name to specified dates of a month

<?php
//Array Fill Key: Add a teacer's name to specified dates of a month
$dates = array(2,4,6,8);
$input = array_fill_keys($dates, 'Benny');
   print_r($input);
?>

Array Fill: Add a teacer's name into 6 days from 5th of a month

<?php
//Array Fill: Add a teacer's name into 6 days from 5th of a month
$input = array_fill(5, 6, 'Benny');
   print_r($input);
?>

Array Diff : Find out failed students in a new exam, compare with previous list

<?php
//Array Count Values :  Find out failed students in a new exam, compare with previous list
$failed_new = array('ram','ben','kevin','don');
$failed_old = array('ram','ben','mahesh','don');
print_r(array_diff($failed_new,$failed_old));
?>

Git Info

## git exclude
if exclusion is not added into **.gitignore** list, check out **.git/info/exclude** file

## git ignore local existing files and pull
https://stackoverflow.com/questions/4157189/how-to-git-pull-while-ignoring-local-changes
```
git clean -df  # optional, this will clean all local untracked files
git reset --hard
git pull
```

## git command
| description | command |
| ----------- | ----------- |
| checkout a specific version | git checkout {{version}} |

Regex Expression Python Example

import re
pattern = r"test"

#match - must from beginning
if re.match(pattern, str)

#search - can be in between
if re.search(pattern, str)

#findall - return all found
if re.findall(pattern, str)

Regular Expression Cheatsheet


[davechild_regular-expressions.pdf](https://cdn.cacher.io/attachments/u/3hfpxtbwj1bih/cLyej6aBQx-BAvRT7PuL0h_l4QcKONTu/davechild_regular-expressions.pdf)

Regular Expression (regex) Searching Example

| example | regex |
| ----------- | ----------- |
| number between 50-99 | [5-9]\d |
| 3 digits | \d{3} |
| 1-3 digits | \d{1,3} |