Thursday, August 27, 2020

Tuesday, August 25, 2020

Read Write from text in C# CMD Unicode "Ћирилица Караџића Вука"

 https://stackoverflow.com/questions/5750203/how-to-write-unicode-characters-to-the-console


using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Net.Mail;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;

//Read a Text File
//using System;
//using System.IO;
namespace readwriteapp
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            String line;
            try
            {
                //Pass the file path and file name to the StreamReader constructor
//                StreamReader sr = new StreamReader("d:\\config2.ini", Encoding.Unicode, true);
                StreamReader sr = new StreamReader("d:\\config2.ini");
                //Read the first line of text
                line = sr.ReadLine();
                //Continue to read until you reach end of file
Console.OutputEncoding = System.Text.Encoding.UTF8;
                while (line != null)
                {
                    //write the lie to console window
                    Console.WriteLine(line);
                    //Read the next line
                    line = sr.ReadLine();
                }
                //close the file
                sr.Close();
                Console.ReadLine();
            }
            catch(Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
            finally
            {
                Console.WriteLine("Executing finally block.");
            }
        }
    }
}

//static void Main(){}
/*
//Write a text file - Version 2
//using System;
//using System.IO;
//using System.Text;
namespace readwriteapp
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            Int64 x;
            try
            {
                //Open the File
                StreamWriter sw = new StreamWriter("d:\\config2.ini", true, Encoding.Unicode);
                //Writeout the numbers 1 to 10 on the same line.
                for(x=0; x < 10; x++)
                {
                    sw.Write(x);
                }
sw.Write("Ћирилица Караџића Вука");
                //close the file
                sw.Close();
            }
            catch(Exception e)
            {
                Console.WriteLine("ExceptionW: " + e.Message);
            }
            finally
            {
                Console.WriteLine("ExecutingW finally block.");
            }
            String line;
            try
            {
                //Pass the file path and file name to the StreamReader constructor
                StreamReader sr = new StreamReader("d:\\config2.ini");
                //Read the first line of text
                line = sr.ReadLine();
                //Continue to read until you reach end of file
                while (line != null)
                {
                    //write the lie to console window
                    Console.WriteLine(line);
                    //Read the next line
                    line = sr.ReadLine();
                }
                //close the file
                sr.Close();
                Console.ReadLine();
            }
            catch(Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
            finally
            {
                Console.WriteLine("Executing finally block.");
            }
        }
    }
}
*/






Monday, August 24, 2020

INI file Read Write C#

 class INIFile
{
    private string filePath;
        
    [DllImport("kernel32")]
    private static extern long WritePrivateProfileString(string section,
    string key,
    string val,
    string filePath);
  
    [DllImport("kernel32")]
    private static extern int GetPrivateProfileString(string section,
    string key,
    string def,
    StringBuilder retVal,
    int size,
    string filePath);
        
    public INIFile(string filePath)
    {
        this.filePath = filePath;
    }
  
    public void Write(string section, string key, string value)
    {
        WritePrivateProfileString(section, key, value.ToLower(), this.filePath);
    }
  
    public string Read(string section, string key)
    {
        StringBuilder SB = new StringBuilder(255);
        int i = GetPrivateProfileString(section, key, "", SB, 255, this.filePath);
        return SB.ToString();
    }
          
    public string FilePath
    {
        get { return this.filePath; }
        set { this.filePath = value; }
    }
}

INIFile inif = new INIFile("D:\\config.ini");
inif.Write("Database", "Devs", "sa");
INIFile inif = new INIFile("D:\\config.ini");
Console.WriteLine("The Value is:" +inif.Read("Database", "Devs"));


//https://midnightprogrammer.net/post/readwrite-settings-to-ini-file-using-c/


Change INI File:

Easy way is to use WritePrivateProfileString and GetPrivateProfileString functions

of Kernel32.dll for reading and writing into INI file. Example: For Writing to INI: [DllImport("kernel32.dll", EntryPoint = "WritePrivateProfileString")] public static extern long WriteValueA(string strSection, string strKeyName, string strValue, string strFilePath); Usage: WriteValueA("SectionToWrite", "KeyToWrite", "Value", @"D:\INIFile.ini"); For Reading from INI: [DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString")] public static extern int GetKeyValueA(string strSection, string strKeyName, string strEmpty, StringBuilder RetVal, int nSize, string strFilePath); Usage: StringBuilder temp = new StringBuilder(255); int i = GetKeyValueA("TargetSection", "KeyToRead", string.Empty, temp, 255, @"D:\INIFile.ini"); string sValue = temp.ToString(); //desired value of the key

CMD:

systeminfo

driverquery

tasklist

ipconfig /all

color a

color b

cls



Friday, August 21, 2020

Inventions

 http://www.newneurophone.info/

https://hub.docker.com/_/wordpress

https://www.instructables.com/id/The-Ultimate-FM-Transmitter/

Super e-mail application, super office apps


Prisustvo na otisak prsta, a evidencija u bazi podataka:

++

++




MORE TIPS:


https://www.kaspersky.com/enterprise-security/mitre-attack

https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

https://www.softperfect.com/products/networkscanner/

https://youtu.be/bGqbdErUcWA

https://www.instructables.com/id/PCB-making-guide/

https://www.instructables.com/id/Heatless-cold-Toner-Transfer-for-PCB-Making/

e:

How to create your first VPS on DigitalOcean: A complete guide from zero to having a DigitalOcean VPS

The `cd` Linux command used to change folder

The `mkdir` Linux command used to create folders

How to test for an empty object in JavaScript

How to set up hot reload on Electron a

How to change a Next.js app port: Learn how to change the port that Next.js runs on in development mode

How to get the index of an item in a JavaScript array: Here is how to retrieve the index of an item in a JS array based on its value

That's it for this week, thank you for tuning in!

Don't forget that as a subscriber to my newsletter you have free access to the 12 books I published about React, Node, JS, Next, Svelte, and much more!

Let me know by replying to this email if there's a topic you'd like to read more about.

See you next Tuesday, have a great week ahead!

Flavio



Tuesday, August 18, 2020

Android Apps Maker



https://go.bitrise.io/

https://flutter.dev/

https://console.firebase.google.com/

https://appsgeyser.com/create/start/

https://appsgeyser.com/dashboard/

https://www.mobiroller.com/

https://phonegap.com/

https://cordova.apache.org/docs/en/latest/guide/cli/

https://github.com/ymrdf/html-2-apk


https://phonegap.com/getstarted/


Zaradi pomoću PHP and PayPal Credit Card

https://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/

it's Tuesday, and like every Tuesday I have an update for you, with of all the new free tutorials I wrote:
What is a reverse proxy? Find out what is a reverse proxy and what is it useful for!
How to solve the `util.pump is not a function` error in Node.js. I got this error while trying to run some old Node snippet I found on the Web, and here's how I solved it.
Serve an HTML page using Node.js. Find out how to serve an `index.html` HTML page using Node.js with no dependencies.
Gatsby, fix the "cannot find module gatsby-cli/lib/reporter" error. How I fixed a weird Error: Cannot find module gatsby-cli/lib/reporter error I got while creating a Gatsby site and finding the solution was not fast, so I wrote a post about it.
How to find the command that is using a port. You might want to start a server on a port, but the port is already taken by another server. Which one? Here's how to find out.

How to configure Nginx for HTTPS: How to set up HTTPS on your Web Server using Let's Encrypt.
I also published 2 videos on YouTube: How to create a loop in a React Component's JSX and Running React Tests Automatically in the Cloud with GitHub Actions! This last one is the one I'd recommend watching. I am not as consistent as I'd like to be with videos. It's something I want to improve: being better at making videos, since it's something I struggle with, and also being better at making more videos. The two things are linked, making more videos is the only way to improve the quality, as practice is essential. Anyway, if you subscribe to the channel I'm happy to have your encouragement!
That's it for this week, thank you for tuning in!
Don't forget that as a subscriber to my newsletter you have free access to the 12 books I published about React, Node, JS, Next, Svelte, and much more!
Let me know by replying to this email if there's a topic you'd like to read more about.
See you next Tuesday, have a great week ahead!
Flavio


Monday, August 17, 2020

Apache Cassandra

https://cassandra.apache.org/doc/latest/getting_started/index.html

https://cassandra.apache.org/doc/latest/getting_started/drivers.html#php

https://cassandra.apache.org/download/

https://www.apache.org/index.html#projects-list



Dijeta sa pasuljem je veoma popularna dijeta jer se za 7 dana može skinuti i do 5 kilograma! Sam pasulj je bogat lako svarljivim proteinima, vitaminima: B, C, E i PP zatim mineralima: kalcijumom, fosforom, bakrom, cinkom, gvožđem kao i aminokiselinama, a najzastupljenije su: triptofan, lizin, arginin, tirozin i metionin.
Dijeta sa pasuljem je odlična za hladniji deo godine jer sprečava blagu avitaminozu koja je karakteristična upravo za hladne dane i dijetni način ishrane. Pasulj ima i odlična dejstva na jetru i žučnu kesu – pomaže im da bolje rade, a kada je u pitanju digestivni trakt – možemo ga mirne duše nazvati pravim „čistačem“. U red pohvala ovoj namirnici ide i to što osnažuje kardiovaskularni sistem i poboljšava stanje i izgled kože. Preporučuje se da se posle dijete još nekoliko dana jede pasulj kao glavno jelo, a da se smanji unos hleba i slatkiša.
Važno: Za vreme dijete trebalo bi piti dosta tečnosti (najbolje čiste vode) i potpuno isključiti šećer i so. Svake večeri pre nego što odete u krevet popijte 1 šolju malomasnog jogurta ili još bolji izbor je kefir!
Obratite pažnju na jelovnik – iako pojedini dani izgledaju slično – postoje razlike koje su značajne. Što se kuvanja pasulja tiče, kuva se gust, sa što manje masnoće i poželjno je bez zaprške (naravno, začini se mogu dodati po ukusu).


Read more https://www.dijeta.net/dijeta-sa-pasuljem/



MSDOS goodies:

wmic memorychip list full

wmic diskdrive list full

wmic baseboard list full

wmic cdrom list full

pause

Rasad jabuke:
https://savacoop.rs/kontakt

Thursday, August 6, 2020

Pohovani kolutići lignji na Srpski način

1) Pohovani kolutić lignje umočiti u senf.

2) Kolutić pojesti sa jednim zalogajem svežeg crnog luka.

3) Sve to zaliti gutljajem svežeg hladnog jogurta.

Prijatno !



II način, ako nemate senfa, može poslužiti i Leskovački Ajvar iako ukus nije ni približan originalu, ali se svakako i ova kombinacija slaže.

Oni koji vole pivo kada sve kolutiće pojedu mogu popiti pivo, jer se ono odlično slaže sa senfom.






Monday, August 3, 2020

The Tesla Spirit Radio



++
++


https://www.instructables.com/id/Easy-to-Build-WIFI-24GHz-Yagi-Antenna/?utm_content=buffer87480&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer


http://ham.pirot.org/

all the new free tutorials I wrote.
This week we have 3 new posts on Redis, continuing the mini-series about this really cool and popular key-value store:
Soon we'll wrap all those Redis posts in a little ebook, what do you think?
The more interesting (I think!) post I wrote this week is about Sequelize, the famous Node.js library that we use to interact with databases.
Here's a tutorial about how to use it along with PostgreSQL in How to use Sequelize to interact with PostgreSQL.
This week I also had to generate a local SSL certificate and install it on my MacBook, so I detailed the process in How to generate a local SSL certificate and How to Install a local SSL certificate on macOS.
It's not simple to figure out, but once you know what to do, it is :) Oh by the way, fun fact: did you know that we use the term "SSL certificate" but SSL was replaced by the TLS (Transport Layer Security) protocol a long time ago? Like.. 20+ years ago. But the SSL term sticked around.
Finally, while working on a Svelte+Sapper app I stumbled on a little problem so here's how to access a URL parameter in Sapper outside of script module.
That's it for this week!
Don't forget that as a subscriber to my newsletter you have free access to my 12 free books about React, Node, JS, Next, Svelte, and much more!
Let me know by replying to this email if there's a topic you'd like to read more about.
See you next Tuesday, have a great week, and a great month of August!
Flavio