2020 m. birželio 5 d., penktadienis

React native

$ npm install expo-cli --global

Creating new project
$ expo init my-project

Starting application
$ expo start 

React fonts documentation; google fonts

React navigation getting started; version 5
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'


React navigation stack 
$ npm install react-navigation-stack

Drawer
$ npm install @react-navigation/drawer


Checking for uused dependecies:
$ sudo npm install -g depcheck


2020 m. gegužės 24 d., sekmadienis

Tomcat linux working tutorial

Tomcat working install tutorial

$ sudo ./bin/startup.sh
$ sudo ./bin/shutdown.sh
$ sudo ./bin/shutdown.sh && sudo ./bin/startup.sh #Restart

$ sudo catalina.sh run #command will print the logs to your terminal 


http://localhost:8080 




Skiping tests

mvn install -DskipTests
mvn clean package

2020 m. gegužės 20 d., trečiadienis

Java spring logging


The available logging levels in Logback are:

OFF (output no logs)
ERROR
WARN
INFO
DEBUG
TRACE

Loging messeage meanings:
LOGGER.trace("doStuff needed more information - {}", value);
LOGGER.debug("doStuff needed to debug - {}", value);
LOGGER.info("doStuff took input - {}", value);
LOGGER.warn("doStuff needed to warn - {}", value);
LOGGER.error("doStuff encountered an error with value - {}", value);


To disable dublicating log code to log, add to logback.xml:
additivity="false"


Adding logger like:
private static final Logger log = LoggerFactory.getLogger(YourClassName.class);


Sources:

2020 m. gegužės 19 d., antradienis

2020 m. gegužės 12 d., antradienis

Java .jar generavimas


jaro generavimas
$ jar cvfe VardasCalc.jar lt.vtmc.ems.Main -C bin .

Priklausomybiu generavimas
$ jdeps bin/lt/vtmc/ems/Main.class > calcdependency.txt


2020 m. balandžio 22 d., trečiadienis

Windows 10 update time script

You can add this in Task Scheduler and make it run automatically

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "Start-Process cmd -ArgumentList '/s,/c,C:\Windows\System32\net.exe start w32time & w32tm /resync"' -Verb runAs"

2020 m. balandžio 16 d., ketvirtadienis

Teksto atpažinimas - OCR


Nemokami variantai:

Online:
https://www.onlineocr.net/
https://github.com/naptha/tesseract.js#tesseractjs
https://www.gdpicture.com/solutions/ocr-sdk/
Microsoft OneNote- (Copy Text from Picture )
Google Drive - Upload .pdf or img and open 'As Document'.


Mokamos:
https://finereaderonline.com/en-us/Tasks


Pavyzdys naudojant tesseract, išvestis į terminalo langą out, norint išsaugoti į failą, rašomas 'file.txt'

$ tesseract '/home/sup/Pictures/Screenshot from 2019-01-31 17-25-22.png' stdout

Resolution 0 dpi. Using 70 instead.
Estimating resolution as 147
SIANDIEN = DARBODIENA —SAVAITGALIS