Thursday, April 28, 2022

pop3 check php



Potreban i dovoljan uslov: 

https://stackoverflow.com/questions/9654453/fatal-error-call-to-undefined-function-imap-open-in-php


Prvo koristimo:

https://www.php.net/manual/en/function.imap-body.php

da preuzmemo mejlove, a zatim naredbu za brisanje odredjenog mejla koji je sumnjiv, na primer ima nedozvoljeni tip fajla ili sadržaj:


imap_delete($mbox1);

https://www.tutorialspoint.com/php/php_functions_imap_delete.htm

https://www.php.net/manual/en/function.imap-delete.php



PRIMER:

<?php
$user = "miki@rubirosa.rs";
$pass = "RamboAmadeus";

$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);

if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);

for ($x = 1; $x <= $num-1; $x++) {
  echo "The number is: $x <br>";
  echo imap_qprint(imap_body($imap, $x));
  echo "<hr>";
}

//imap_delete($imap, 1); //Delete first msg


/*
     if( $num >0 ) {
          echo imap_qprint(imap_body($imap, $num));
     }
*/



     //close the stream
     imap_close($imap);
}
?>


Malo bolje:

<?php
$user = "info@rubirosa.rs";
$pass = "Milena123";

//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}", $user, $pass);
//$imap = imap_open("{mail.rubirosa.rs:995/pop3/ssl/novalidate-cert}INBOX", $user, $pass);

$imap = imap_open("{mail.rubirosa.rs:110/pop3/notls}", $user, $pass);


if( $imap ) {
   
     //Check no.of.msgs
     $num = imap_num_msg($imap);
     
$header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;
}    
     
     

for ($x = 1; $x <= $num; $x++) {
  echo "The number is: $x <br>";
  echo imap_qprint(imap_body($imap, $x));
  echo "<hr>";
 
  $header = imap_header($imap, $x);
$from = $header->from;
foreach ($from as $id => $object) {
    $fromname = $object->personal;
    $fromaddress = $object->mailbox . "@" . $object->host;


echo $fromname . "<br>";
echo $fromaddress;


}


  //echo imap_qprint(imap_header($imap, $x));


  echo "<hr>";



}

//imap_delete($imap, 1);

/*
     if( $num >0 ) {
          echo imap_qprint(imap_body($imap, $num));
     }
*/



     //close the stream
     imap_close($imap);
}
?>

Gore navedeno su osnovne stvari koje su potrebne ako želite da napravite antispam online servis.

by:
https://vsc-rs.blogspot.com/2022/05/vscrs-programming-website.html


FREE VPN OF YOURS:



THE BRAND NEW KDE distro:


An independent RLXOS:


An Italian Linux for Academia:


++



Sunday, April 24, 2022

QR code in Google Sheet

 https://www.howtogeek.com/795025/how-to-make-a-qr-code-in-google-sheets/


https://www.howtogeek.com/255540/the-last-windows-7-iso-youll-ever-need-how-to-slipstream-the-convenience-rollup/


https://restic.net/


https://stackshare.io/stackups/d3-vs-plotly-js



++

EXCEL REPEAT FIRST ROW when print and list:

Use this feature if you would like a title row (or rows) to print at the top of every page of your data in Excel.

Note:
If you want column headings to remain at the top of your sheet when scrolling within a spreadsheet, you will need to freeze the top row.

  1. Click the [Page Layout] tab > In the "Page Setup" group, click [Print Titles].
  2. Under the [Sheet] tab, in the "Rows to repeat at top" field, click the spreadsheet icon.
  3. Click and select the row you wish to appear at the top of every page.
  4. Press the [Enter] key, then click [OK].
  5. Select File > Print > "Show Print Preview" to see what the printed spreadsheet will look like.

Note:
If the [Print Titles] button is locked (greyed out), it may be because you are currently editing a cell or you have chart selected. If the "Rows to repeat at top" spreadsheet icon is locked, it may be because you have more than one worksheet selected within your workbook. To unlock either button, you can also try clicking [File] > "Print" > "Page Setup."

Monday, April 18, 2022

Remember Screenter goodies

 ++

Freeware download:

THE NEW VERSION OF SCREENTER


Functions:

1) create capture rectangle with SHIFT + F2, move and resize that rectangle as you wish, after that just press SPACE key to make a screenshot in a range of that rectangle. The picture file will be saved in c:\, because of that you must start screenter.exe app as administrator (right click, Run As Administrator)

2) For the first time screenshot is temporary transparent

3) You can open group of selected JPG's like dropped postcards on the table

4) You can freely rearrange all opened photographs in "always on top" manner

Have you ever seen anything like this before?



https://www.codeproject.com/Articles/1265115/Cross-Platform-AES-256-GCM-Encryption-Decryption

https://cs50.harvard.edu/college/2022/spring/

https://cassandra.apache.org/_/cassandra-basics.html

https://hbase.apache.org/

https://hadoop.apache.org/

https://www.instructables.com/Overlapping-Segments-Rotary-Digital-Clock/

https://www.howtogeek.com/752684/how-to-create-a-data-entry-form-in-microsoft-excel/

https://www.codeproject.com/Articles/878605/Getting-All-Special-Folders-in-NET

https://nextjs.org/


Beli lenor i negro bonbone za bube na vocnjaku kao mamac za rutave bube.


https://redux.js.org/


https://fydeos.io/


++


Resources: Cracking The Coding Interview: https://amzn.to/3jIPzjD Elements of Programming Interviews in Python: https://amzn.to/37hBzuP CS50: https://www.youtube.com/watch?v=NZxAL... Compiler is always right: https://blog.mozilla.org/nfroyd/2014/... Minimum network flow: https://math.stackexchange.com/questi... Knapsack problem: https://medium.com/@fabianterh/how-to... Greedy scheduling: https://www.cs.umd.edu/class/fall2017... Interview preparation: https://leetcode.com/ Mock interviews: https://www.pramp.com/






Thursday, April 14, 2022

Freebsd is nice

pkg install -y nano

pkg install -y xorg

pkg install -y xfce

pkg install -y slim slim-themes

sysrc dbus_enable=yes

sysrc hald_enable=yes

sysrc slim_enable=yes

sysrc sound_load=yes

sysrc snd_hda_load=yes

nano /home/your-user/.xinitrc

exec startxfce4

pkg install -y xfce4-pulseaudio-plugin

pkg install -y firefox libreoffice gimp thunderbird vlc tree

reboot

pkg install editors/vscode

pkg install vscode



RAM usage in HTOP = 790 MB = freebsd + xfce + firefox +youtube


Veoma sam prijetno iznenadjen jednostavnošću instalacije freebsd operativnog sistema.
Veoma je brz u xfce grafičkom okruženju, koristi vrlo malo memorije u odnosu na gomilu Linux distribucija. FreeBDS je mnogo brži od Arch, Manjaro xfce, Endeavour xfce, NuTyX xfce, MX xfce, Xubuntu, Linux Lite is ostalih xfce distribucija.

Kao dugogodišnji distrohopper u Linuxu, probao sam skoro sve bitnije Linux distribucije, kao i OpenBSD. OpenBSD se ne može porediti po jednostavnosti instalacije sa FreeBSD, naime FreeBSD je mnogo bolji, potpuniji i jednostavniji za instalaciju.
Šta reći, a ne zaplakati od sreće.
Čak i čuveni i nezaobilazni Microsoft Visual Studio Code (vsc) radi bolje nego pod Linuxom.
Programeri, nemate razloga da ne predjete na FreeBSD xfce. macOSX korisnicima će FreeBSD biti prilično poznat.




su
gpart show
boot0cfg -B ada0

shutdown -r now

df

uname -a

Friday, April 8, 2022

Jelo za programera



1 kašičica kakao
1 kašičica laneno seme (mleveno)
1 kašičica čia semenke
1/2 kašičice cimet
2 kašike ovsene/ražene pahuljice
6-7 suve šljive (ili šolja svežeg voća)
300 ml mleko (pirinčano, sojino, obrano) ili jogurt

Lan, orasi, soja, chia semenke: najbolji biljni izvori omega 3 masnih kiselina.

Spisak namirnica koje su, pored čokolade, bogate magnezijumom (na 100g):

heljda 231mg
ovas 138mg
kinoa 197mg
spanać 79mg
leblebije 79mg
integralni hleb 75mg
crveno sočivo 59mg
piletina 28mg
škampi 35mg

++



++



++

Aplikacije otvarac i tragac, tragac je bolji od Windows Search opcije

Otvarač vam omogućuje da pratite istoriju svih otvorenih dokumenata i aplikacija koje vi želite.

Programer bez aplikacije Otvarač je kao muva bez glave, budite organizovani, ne dozvolite da nemate pojma šta ste ikada radili i gde se šta nalazi.

Tragač je najefikasnija pretraga datoteka po njihovim nazivima. Mnogo brža i efikasnija od Windows Search i Cortana aplikacija, čak je bolja i od Total Commander Search pretrage.

Sound keyboard for Windows 7-8-10-11

Screenter and JanuarPacker applications for Windows

Programer bez Screenter aplikacije je mnogo sporiji i manje produktivan, jer Scrinter ima tri najvažnije funkcije koje ni jedan drugi screenshot program nikada nije imao, a to je da pritiskom na kombinaciju Shift +F2, zatim pomeranjem pravougaonika i njegovim resizeom, a potom klikom na SPACE slika označeni pravougaoni deo ekrana koji ostaje uvek na vrhu medju otvorenim prozorima i transparentan je pa lako možete prekucavati sadržaje sa drugih non-copy-paste aplikacija. 

Druga osobina je da snima automatski sve screenshoot-ove na C:\ root putanju tako da ih lako možete posle otvoriti hronološkim redom, dodela naziva je automatska.

Pošto Screenter zahteva admin rights da snima u C:\ na Windowsima novijim od Windows XP, funkcija automatskog snimanja na C:\ funkcioniše samo ako ste aplikaciju Screenter.exe otvorili sa administratorskim pravima (to se postiže desnim klikom miša, pa Run As Administrator).

Treća osobina je da možete više fotografija ili screenshot-ova otvoriti odjednom kao da ste ih razbacali na ekranu i lako se prebacivati sa jedne na drugu, a sve stoje uvek iznad svih otvorenih prozora, always on top.

Masovna provera ispravnosti tekucih racuna

Ukoliko imate HALKOM ili neku drugu tekstualnu datoteku sa spiskom tekućih računa i želite znati koji su pogrešni, dobro došli u moj svet i moju aplikaciju. Idealno za sve knjigovodje, posebno one koji koriste Trezor.

Aplikaciju sam vremenski zaštitio, pa datum kompjutera privremeno vratite na 2014. godinu ako želite da se uverite koliko je moćna, ko želi aplikaciju bez ove zaštite neka me kontaktira za profi verziju (koja je identična, ali nema ovu datumsku zaštitu).

Organizuj se, Organizuj se, Organizuj se, Organize more:


STORMOS:


MORE USEFUL INFO:




Thursday, April 7, 2022

Alpine Linux Sound kao dobar izbor

setup-alpine

apk add nano doas

adduser vladimir

adduser vladimir wheel

nano /etc/doas.d/doas.conf

Add the following line and save the file  (ctrl+O, crl+X):

permit persist :wheel


apk update


setup-xorg-base

apk add elogind polkit-elogind

adduser root video
adduser root input
adduser root sound

adduser vladimir video
adduser vladimir input
adduser vladimir sound


apk add xfce4 xfce4-terminal xfce4-screensaver lightdm-gtk-greeter dbus

rc-service dbus start

rc-update add dbus

rc-update add udev

rc-service lightdm start

rc-update add lightdm

$ echo "exec startxfce4" >> ~/.xinitrc

startx

Alpine Linux Sound working if you try this:

Please do not install original thing from Alpine Linux Sound tutorial, instead try this...

Alpine Linux sound workaround (enough to install only two stuff):

https://docs.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/start 

apk add xfce4-pulseaudio-plugin

apk add pavucontrol

apk add xfce4-xkb-plugin

reboot

------------

Warning: just type su command for root access.

Initial password for root not exists, just press enter. There is no root password for the first time in Alpine Linux.

-------

nano /etc/lighdm/lightdm.conf

Add the following line and save the file (ctrl+O, crl+X):

default-user vladimir

-------



https://ratfactor.com/dwm

https://gist.github.com/erlendaakre/12eb90eef84a3ab81f7b531e516c9594


Alpine Linux installed in OracleVM take only 1,62 GB of HDD. (Complete xfce4 and Firefox)


Wellness:

Aditivi koje bi trebalo koristiti uz oprez

E 252 kalijum-nitrat

E 251 natrijum-nitrat

E 250 natrijum-nitrit

E 249 kalijum-nitrit

E 171 titan-dioksid

E 142 zelena S

E 129 alura-crvena 4C

E 124 ponso ar (košenila crvena A)

E 122 azorubin (karmoizin)

E 110 oranž-žuta S

E 104 hinolin-žuta

E 102 tartrazin


Bezbedni, neosnovano optuženi da su štetni

E 621 mononatrijum-glutaminat

E 300 vitamin C

E 330 limunska kiselina

E 210 benzojeva kiselina

E 322 lecitin


Vitamini kao aditivi

E 101 vitamin B2

E 160a provitamin A

E 300, E 301, E 302, E 304 vitamin C i njegovi derivati

E 306, E 307, E 308, E 309 vitamin E i njegovi derivati


Windows 10 Sound Keyboard Application



++

Monday, April 4, 2022

Alpine Linux

 IDLE RAM USAGE APLINE XFCE ~ 197MB:



APLINE XFCE WITH FIREFOX AND YOUTUBE ENGAGED ~600MB:



WOW TRY THIS IN ARCH, "MALO MORGEN" !

Ideja za jelo:
riba
ovas
biber
kim
origano
kurkuma
sir
tikvice
crni luk
jaja




Sastojci za Jezekiljev hleb: 

  • Osam šolja pšeničnog brašna od celog zrna
  • Četiri šolje ječmenog brašna
  • Dve šolje skuvanog i izgnječenog sočiva
  • pola šolje mlevenog prosa
  • pola šolje raženog brašna
  • Šolja i po vode
  • kašičica soli
  • Šest kašika maslinovog ulja
  • Sedam grama sirovog kvasca ili kašika suvog kvasca
  • pola šolje tople vode
  • Jedna kašika meda

Priprema:

Kvasac otopite u vreloj vodi i ostavite da odstoji deset minuta. Pomešajte pšenično i raženo brašno, i potom dodajte proso i ječam. 

Sočivo i ulje pomešajte sa malo vode i izblendajte, a onda sipajte u posudu sa ostatkom vode. U mešavinu brašna i otopljenog kvasca dodajte so i ostatak brašna. 

Umešanu smesu izručite i mesite dok ne postane glatko. 

Stavite testo u nauljenu posudu i sačekajte da dva puta više naraste.

Pecite na 375 stepeni 45 minuta. 

http://www.elektrovojvodina.rs/sc/korisnicki_servis/prijava-ocitanog-stanja

A evo i linkova ka sajtu Republičke izborne komisije koji vas vode do rezultata:

Rezultati parlamentarnih izbora u Srbiji 2022:

www.rik.parlament.gov.rs/zapisnici/288966

Rezultati predsedničkih izbora u Srbiji 2022:

www.rik.parlament.gov.rs/zapisnici/288987

Rezultati beogradskih izbora 2022:

www.rik.parlament.gov.rs/zapisnici/289008

Rezultati lokalnih izbora u Srbiji 2022:

www.rik.parlament.gov.rs/zapisnici/289002

PORTEUS TIPS:

first download firefox

cp /tmp/firefox-98.0.1-x86_64-en-US.xzm /mnt/sda1/porteus/modules

M stuff:

https://www.christitus.com/opencore-mac/

or

https://github.com/popey/sosumi-snap

https://snapcraft.io/install/sosumi/ubuntu

https://www.linuxadictos.com/en/sosumi-o-como-instalar-una-maquina-virtual-de-macos-en-linux.html

https://glosbe.com/en/sr/walter

http://www.avtera.rs/src/search.php?page=1&level1=xC1&level2=xKS&level3=x&search=&advancedsearch=&ident=&pricefrom=0&priceto=0&onsale=0&onstock=0&sortfield=pricewdiscountwotax&sorttype=text&sortorder=desc


Saturday, April 2, 2022

Happy new Serbian 7530 year

 Када Сунце у подне, 3. априла 2022. године, пређе преко Пећке патријаршије почиње Ново Лето 7530. месеца априла у трећем дану, по Српском календару Светог Саве. Тог дана укрстиће се северна и јужна енергија Сунца и најавити долазак српске нове године.

Windows 10 cannot install .NET Framework 3.5

Posted on August 27, 2020 by chanmingman

This short article shows you how to install .NET Framework 3.5 if you keep getting error in Add and Remove features. Download the iso from Microsoft, must be the same version. Mount the iso then run the following command. The drive that I have mounted is G drive.


DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:G:\sources\sxs

https://chanmingman.wordpress.com/2020/08/27/windows-10-cannot-install-net-framework-3-5/?WT.mc_id=DP-MVP-36769

http://slampp.abangadek.com/info/index.php?page=home

https://www.tianocore.org/

https://medium.com/nitrux/the-road-to-nitrux-2-0-bring-the-big-guns-vmetal-improvements-to-znx-19ee09fdea57


e-Faktura:

https://www.efaktura.gov.rs/tekst/330/konacni-primeri-xml-datoteka-po-ubl-21-standardu.php

https://www.efaktura.gov.rs/tekst/368/krajnja-specifikacija-aplikativnog-interfejsa-za-neposredan-pristup-sistemu-elektronskih-faktura.php

https://www.efaktura.gov.rs/view_file.php?file_id=119&cache=sr

Remote goodies:

https://winscp.net/eng/docs/lang:srl

https://www.cs.wcupa.edu/rkline/php/remote-netbeans

rdesktop -u username -p password 192.168.1.131 -g 1024x640
rdesktop -u username -p password 192.168.1.131 -f 

https://stackoverflow.com/questions/8485029/possible-to-connect-to-remote-desktop-with-php

++



Friday, April 1, 2022

TCC, SQLITE, UTF-8 super working (command line tool creation) * pure C is awesome

#include<stdio.h>
#include<stdlib.h>
   #include <sqlite3.h>

 // Compile instructions:
// tcc ctext.c sqlite3.def

// If you use ulaz.txt file saved as utf-8 text file,
// than first line of text must be empty
// just put all select, insert, update and other sqlite commands in ulaz.txt
//line by line
//callback can be modified to write data formated to HTML TABLE, than open it

  static int callback(void *NotUsed, int argc, char **argv, char **azColName){
    int i;
    for(i=0; i<argc; i++){
      printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
    }
    printf("\n");
    return 0;
  }

//int main(int argc, char* argv[])
int main()
{

char const* const fileName = "ulaz.txt";

FILE* file = fopen(fileName, "r");

if(!file){
printf("\n Unable to open : %s ", fileName);
return -1;
}

    char line[500];
    const char algv1[8] = "dora.db";

    //algv1 = "dora.db";

    char str[50];
    FILE *fp;
    fp = fopen("izlaz2.txt", "w");

    if(fp == NULL)
    {
        printf("Error opening file\n");
        exit(1);
    }

    sqlite3 *db;
    char *zErrMsg = 0;
    int rc;

/*  
    if( argc!=3 ){
      fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]);
      return(1);
    }
*/

    rc = sqlite3_open("dora.db", &db);
    if( rc ){
      fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
      sqlite3_close(db);
      return(1);
    }

/*
    rc = sqlite3_exec(db, "select * from dora where a4 like '%Сремски%'", callback, 0, &zErrMsg);
    if( rc!=SQLITE_OK ){
      fprintf(stderr, "SQL error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
    }

*/

//    sqlite3_close(db);

int i=0;
 
while (fgets(line, sizeof(line), file)) {
        printf("%s", line);
//        fputs(str, fp);
        fputs(line, fp);

if (i>0) {
    rc = sqlite3_exec(db, line, callback, 0, &zErrMsg);
    if( rc!=SQLITE_OK ){
      fprintf(stderr, "SQL error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
    }
}
    i = i + 1;

    }

    fclose(fp);
    fclose(file);
        sqlite3_close(db);

    return 0;

} 

OR YOU CAN TRY THIS IN GOLANG TOO:


But in GOLANG, you must to install GCC first and:

https://github.com/mattn/go-sqlite3

too many hussle for the same result.

On Windows GCC best installation is MinGW way.

Hundreds and hundreds megabytes for simple peace of code.

On the other hand in TCC you need to install only 1,2 MB and we are in business.

TCC need only dll and def files from main SQLITE web site.