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.

Thursday, March 31, 2022

Fix Fail 0x0000007c Shared Printer Cannot be Installed

 1
2
3
4

5
6












Napunite zdjelu jednakih omjera šećera, vode, octa, bijelog vina i pet do deset kapi deterdženta za pranje. Ostavite zdjelu preko noći, te ujutro provjerite koliko ih se ‘udavilo’ u ovoj ubojitoj smjesi. Možete ih i dehidrirati stavljanjem soli, sode i octa u odvod. Prolijte ovu smjesu po odvodu tijekom noći, a ujutro ulijte lonac kipuće vode u odvod kako biste ih rastjerali




Tuesday, March 29, 2022

Golang Windows 10 initial settings

1) 

https://osdn.net/projects/mingw/


2)

https://go.dev/dl/


https://go.dev/dl/go1.18.windows-386.msi


3)

Environment variables:


GOPATH %USERPROFILE%\go;C:\go

PATH %USERPROFILE%\go\bin;C:\MinGW\bin\;c:\go\bin;C:\MinGW\


4)

https://code.visualstudio.com/



5) Install GO plugins for VSC

  #include <stdio.h>
  #include <sqlite3.h>
 
  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){
    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(argv[1], &db);
    if( rc ){
      fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
      sqlite3_close(db);
      return(1);
    }
    rc = sqlite3_exec(db, argv[2], callback, 0, &zErrMsg);
    if( rc!=SQLITE_OK ){
      fprintf(stderr, "SQL error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
    }
    sqlite3_close(db);
    return 0;
  }

https://www.oazazdravlja.rs/novosti/16-kurkuma-cudotvorac


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


//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];

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

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

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

    }

    fclose(fp);
    fclose(file);
    return 0;
}

Sunday, March 27, 2022

Go, SQLITE, CSV, TXT, and HTML5+CSS3 are quite usable in command prompt applications with arguments

https://medium.com/hacker-toolbelt/i3wm-on-debian-10-buster-c302420853b1

https://www.codeproject.com/Articles/1127103/Introduction-to-ELENA-Programming-Language

1-read text from csv or command text file

2-sqlite

3-write text result to html


Balkan to Tokyo:

++

 +

Operations With Files

Let's read a text file line by line:

C++
import system'io;
import extensions;

public program()    
{
    // getting a file name from the command line argument
    var fileName := program_arguments[1];

    // opening a text file reader
    using(auto reader := File.assign(fileName).textreader())
    {
        // repeating until all the lines are read 
        while (reader.Available)
        {
            // read the line
            string line := reader.readLine();
            
            // print the line
            console.printLine(line);            
        };
    }    
}

Let's write into the file:

C++
import system'io;
import extensions;

public program()    
{
    // getting a file name from the command line argument
    var fileName := program_arguments[1];

    // opening a text file writer
    using(auto writer := File.assign(fileName).textwriter())
    {
        // repeating until the empty line is entered
        for(string line := console.readLine(), line != emptyString, line := console.readLine())
        {
            // save to the file 
            writer.writeLine(line)
        }
    }    
}

If the file with the specified name exists, it will be overwritten.

If we want to append to the existing file, then we should use logger() method, e.g.:

C++
using(auto writer := File.assign(fileName).logger())

Let's read a binary file:

C++
import system'io;
import extensions;
import system'collections;

public program()    
{
    // getting a file name from the command line argument
    var fileName := program_arguments[1];

    // creating a list to hold the read data
    List<byte> dump := new List<byte>();

    // opening a binary file reader
    using(auto reader := BinaryFileReader.new(fileName))
    {
        // repeating until all the file is read 
        while (reader.Available)
        {
            // read the current byte into a variable b
            // note the variable is declared just-in-place
            reader.read(ref byte b);
            // add the read byte to the dump 
            dump.append(b);
        };
    };
    
    // print the file content as a list of bytes
    console.printLine(dump.asEnumerable());
}

And finally, let's search for the files and directories:

C++
import system'io;
import extensions;
   
public program()
{
    // specifying the target directory
    var dir := Directory.assign(".");
    
    var files := dir.getFiles();
    var dirs := dir.getDirectories();

    console.printLine("Directory ", dir);
    console.printLine("files:", files.asEnumerable());
    console.printLine("directories:", dirs.asEnumerable());
}

Golang is quite usable !


Jedite bademe. Bademi sadrže veoma male količine natrijuma, što je od velike važnosti za održavanje krvnog pritiska na zdravom nivou. S druge strane, bademi su bogati kalijumom koji pomaže da srčani mišići i nervne transmisije ostanu jake. Rezultat ove bolje srčane funkcije jeste da krvni pritisak nema priliku da se podiže iznad normalnih vrednosti. Oko 60 g badema dnevno je svršena količina za očuvanje zdravlja, kažu nutricionisti.

Pijte vodu od kokosa. Istraživanja su pokazala da kalijum, magnezijum i vitamin C koji se nalaze u kokosovoj vodi ovaj napitak čine veoma zdravim. Najzdravija je ona voda pronađena u mladim plodovima.

Kuvajte sa kurkumom. Kurkuma je začin koji bi svakako trebalo da imate u svojoj kuhinji iz mnoštva razloga, a jedan od njih je što su istraživanja pokazala da 80 mg kurkume dnevno ima značajan uticaj na snižavanje povišenog krvnog pritiska. Pored toga, kurkumin koji se u kurkumi nalazi dokazano smanjuje rizik od nastanka bolesti jetre i Alchajmerove bolesti.

Više se krećite. Ako imate redovnu fizičku aktivnost, šanse da patite od povišenog krvnog pritiska su veoma male i to zato što vežbanje jača srce, a jako srce ispumpava više krvi sa manje napora. Ako se vaše srce manje napreže, snaga arterija raste, a krvni pritisak se snižava. Svega pola sata vežbanja nekoliko puta u toku nedelje je dovoljno da vam pritisak bude na zdravom nivou.

Pevajte pod tušem. Vrištite u jastuk kad ste pod stresom, plešite po kući, nađite način da se istresete i otpustite stres na bezazlen način. Kad smo pod stresom naše srce brže kuca, a kao rezultat toga, krvni sudovi se krive i krvni pritisak skače.

Odloženi stres koga se ne oslobađamo na duge staze može uzrokovati hipertenziju. Veoma je važno da se s stresom borite na vreme, i to tako da to ne utiče pritisak vaše okoline.

Friday, March 25, 2022

Ultra light Linux = MiYO Linux distro

 https://sourceforge.net/projects/miyolinux/

https://gosamples.dev/read-file/#:~:text=The%20simplest%20way%20of%20reading,by%20line%20or%20in%20chunks.

https://stackoverflow.com/questions/37122401/execute-another-go-program-from-within-a-golang-program

https://zetcode.com/golang/exec-command/

https://gist.github.com/hyg/9c4afcd91fe24316cbf0

https://www.instructables.com/Complete-Guide-for-Tech-Beginners/


Working on Golang:

package main

import (
    "fmt"
    "log"
    "os/exec"
    "runtime"
)

func openbrowser(url string) {
    var err error

    switch runtime.GOOS {
    case "linux":
        err = exec.Command("xdg-open", url).Start()
    case "windows":
        err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
    case "darwin":
        err = exec.Command("open", url).Start()
    default:
        err = fmt.Errorf("unsupported platform")
    }
    if err != nil {
        log.Fatal(err)
    }

}

func main() {

    openbrowser("d:/go/dokument.htm")

}



Working on TCC:


#include <stdio.h>
#include <wchar.h>
#include <stdlib.h>
#include <locale.h>
int main ()
{
  setlocale(LC_ALL, "en_US.UTF-8");
  FILE * fin;
  FILE * fout;
  wint_t wc;
  fin=fopen ("in.txt","r");
  fout=fopen("out.txt","w");
  while((wc=fgetwc(fin))!=WEOF){
        // work with: "wc"
        putchar(wc);
        fprintf(fout,"%c",wc);
  }
  fclose(fin);
  fclose(fout);
  printf("File has been created...\n");
  return 0;
}

https://www.calculate-linux.org/


https://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-windows-vista/

??:



#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>

int main(void)
{
FILE *stream;
wchar_t wcs[100];

if (NULL == (stream = fopen("fgetws.dat", "r"))) {
printf("Unable to open: \"fgetws.dat\"\n");
exit(1);

}

errno = 0;
if (NULL == fgetws(wcs, 100, stream)) {
if (EILSEQ == errno) {
printf("An invalid wide character was encountered.\n");
exit(1);

}

else if (feof(stream))
printf("End of file reached.\n");
else
perror("Read error.\n");
}
printf("wcs = \"%ls\"\n", wcs);
fclose(stream);
return 0;

/************************************************************
Assuming the file fgetws.dat contains:
This test string should not return -1
The output should be similar to:
wcs = "This test string should not return -1"
************************************************************/

}


int sqlite3_exec16(
sqlite3 *db, /* The database on which the SQL executes */
const short *zSql, /* The SQL(16) to be executed */
sqlite3_callback16 xCallback, /* Invoke this callback routine */
void *pArg, /* First argument to xCallback() */
short **pzErrMsg /* Write error messages here */
){
int rc = SQLITE_OK;
const short *zLeftover;
sqlite3_stmt *pStmt = 0;
short **azCols = 0;

int nRetry = 0;
int nCallback;

if( zSql==0 ) return SQLITE_OK;
while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0]
){
int nCol;
short **azVals = 0;

pStmt = 0;
rc = sqlite3_prepare16_v2(db, zSql, -1, &pStmt, &zLeftover);
assert( rc==SQLITE_OK || pStmt==0 );
if( rc!=SQLITE_OK ){
continue;
}
if( !pStmt ){
/* this happens for a comment or white-space */
zSql = zLeftover;
continue;
}

nCallback = 0;

nCol = sqlite3_column_count(pStmt);
azCols = sqliteMalloc(2*nCol*sizeof(const short *) + 1);
if( azCols==0 ){
goto exec_out;
}

while( 1 ){
int i;
rc = sqlite3_step(pStmt);

/* Invoke the callback function if required */
if( xCallback && (SQLITE_ROW==rc ||
(SQLITE_DONE==rc && !nCallback && db->flags&SQLITE_NullCallback))
){
if( 0==nCallback ){
for(i=0; i<nCol; i++){
azCols[i] = (short *)sqlite3_column_name16(pStmt, i);
}
nCallback++;
}
if( rc==SQLITE_ROW ){
azVals = &azCols[nCol];
for(i=0; i<nCol; i++){
azVals[i] = (short *)sqlite3_column_text16(pStmt, i);
}
}
if( xCallback(pArg, nCol, azVals, azCols) ){
rc = SQLITE_ABORT;
goto exec_out;
}
}

if( rc!=SQLITE_ROW ){
rc = sqlite3_finalize(pStmt);
pStmt = 0;
if( rc!=SQLITE_SCHEMA ){
nRetry = 0;
zSql = zLeftover;
while( iswspace((unsigned char)zSql[0]) ) zSql++;
}
break;
}
}

sqliteFree(azCols);
azCols = 0;
}

exec_out:
if( pStmt ) sqlite3_finalize(pStmt);
if( azCols ) sqliteFree(azCols);

rc = sqlite3ApiExit(0, rc);
if( rc!=SQLITE_OK && rc==sqlite3_errcode(db) && pzErrMsg ){
*pzErrMsg = sqlite3_malloc(1+strlen(sqlite3_errmsg16(db)));
if( *pzErrMsg ){
strcpy(*pzErrMsg, sqlite3_errmsg16(db));
}
}else if( pzErrMsg ){
*pzErrMsg = 0;
}

assert( (rc&db->errMask)==rc );
return rc;
}