<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2376655286569024124</atom:id><lastBuildDate>Wed, 27 Aug 2025 12:43:35 +0000</lastBuildDate><category>PHP</category><category>jQuery</category><category>Apache</category><category>MySQL</category><category>Git</category><category>WordPress</category><category>docker</category><category>react</category><category>AJAX</category><category>JSON</category><category>array</category><category>htaccess</category><category>html table</category><category>oracle 12c</category><category>update</category><category>.htaccess</category><category>DOM</category><category>Highlight</category><category>IF</category><category>SSH</category><category>SVN</category><category>Symfony</category><category>TypeScript</category><category>VirtualBox</category><category>Windows</category><category>aliases</category><category>axios</category><category>branch</category><category>database table</category><category>debug</category><category>delete</category><category>execute</category><category>file permissions</category><category>insert</category><category>install</category><category>linux</category><category>multiple sites</category><category>nodejs</category><category>object</category><category>push</category><category>query</category><category>remote repo</category><category>replace</category><category>search</category><category>xdebug</category><category>1.1</category><category>302</category><category>APC</category><category>API</category><category>CASE</category><category>CRYPT_BLOWFISH</category><category>Dependancy Injection</category><category>FIND_IN_SET</category><category>Form</category><category>GKE</category><category>GNOME desktop</category><category>Google Kubernetes Engine</category><category>Google Maps</category><category>HEAD</category><category>JSONP</category><category>KDiff3</category><category>Meld</category><category>OOP</category><category>Override</category><category>PDO</category><category>PEAR</category><category>PHP Design Patterns</category><category>Prepare</category><category>Production</category><category>Redirect</category><category>Rewrite Tips</category><category>SOAP</category><category>SWITCH CASE</category><category>SimplePostTool</category><category>SoapClient class</category><category>TDD</category><category>Text</category><category>Twitter</category><category>WP</category><category>XML</category><category>add</category><category>add file to SVN ignore</category><category>additions</category><category>and criteria</category><category>animate</category><category>apache solr</category><category>assertion</category><category>async</category><category>auto increment</category><category>await</category><category>backend</category><category>bearer token</category><category>bindParam</category><category>blowfish</category><category>boostrap</category><category>bower</category><category>branch as commit</category><category>branch from commit</category><category>branches</category><category>browser</category><category>cache</category><category>cart</category><category>centos</category><category>checkbox</category><category>chmod</category><category>chown</category><category>clear cache</category><category>client id</category><category>client secret</category><category>clone</category><category>command</category><category>commit</category><category>compare</category><category>composer</category><category>concurrent calls</category><category>conflict resolution</category><category>connect derived table</category><category>console</category><category>controller</category><category>create linux user</category><category>create user and database</category><category>cross site</category><category>crypt</category><category>curl</category><category>database connectivity</category><category>delay</category><category>delete file</category><category>dependancy</category><category>difftool</category><category>docker image</category><category>download file</category><category>dry run</category><category>dumping variable</category><category>eclipse</category><category>env. variable</category><category>error log</category><category>event attach</category><category>event remove</category><category>exception</category><category>expand partition</category><category>failed</category><category>filter array of objects</category><category>flashback</category><category>for loop</category><category>foreach</category><category>function</category><category>get</category><category>getter</category><category>git deamon</category><category>git protocol</category><category>gitlab</category><category>gparted</category><category>grant type</category><category>grunt</category><category>gulp</category><category>helm chart</category><category>hierarchical</category><category>hooks</category><category>httpd.conf</category><category>iFrame</category><category>in</category><category>inner join</category><category>install Aptana</category><category>install JDK</category><category>iterate</category><category>js</category><category>jwt</category><category>list numeric permisssions</category><category>loader</category><category>local</category><category>local repository</category><category>lodash</category><category>log</category><category>loop</category><category>lufthansa api</category><category>mass</category><category>mcrypt</category><category>member</category><category>merge</category><category>merge branch</category><category>mergetool</category><category>migrate</category><category>model</category><category>mongodb</category><category>mount usb</category><category>nmp install</category><category>node_modules</category><category>npm</category><category>null</category><category>on</category><category>one way hash</category><category>oracle</category><category>out</category><category>pack</category><category>pagination</category><category>params</category><category>parent_id</category><category>parse</category><category>parse table</category><category>passphrase</category><category>password</category><category>phpstorm</category><category>phpunit</category><category>portion</category><category>private</category><category>procedure</category><category>protected</category><category>proximity search</category><category>public</category><category>publisher</category><category>put</category><category>queue</category><category>reactjs</category><category>ready to rumble</category><category>rebase</category><category>remote repository</category><category>replace object</category><category>repository</category><category>resize volume</category><category>restful api</category><category>revert</category><category>row</category><category>row by row</category><category>rsa</category><category>run</category><category>salt</category><category>same table</category><category>save</category><category>search JSON</category><category>set ajax header</category><category>setter</category><category>shell script</category><category>shortcode</category><category>single IP</category><category>single hosting account</category><category>split VMDK</category><category>stopPropagation</category><category>stored</category><category>string</category><category>subfolders</category><category>subscriber</category><category>table</category><category>tar</category><category>test memcache</category><category>test memcached</category><category>timing</category><category>token</category><category>tracking branch</category><category>translate string</category><category>translate theme</category><category>trigger</category><category>trunk</category><category>ubuntu</category><category>undefined</category><category>unpack</category><category>update object</category><category>upgrade</category><category>upload folder</category><category>useMemo</category><category>useState</category><category>version control</category><category>watch variable</category><category>web</category><category>web server</category><category>webgrind</category><category>webroot</category><category>workflow</category><category>zip archive</category><title>Mike Arnold Tutorials</title><description>Best tutorials and tips for developers.</description><link>https://all4developer.blogspot.com/</link><managingEditor>noreply@blogger.com (Nikola Bodrozic)</managingEditor><generator>Blogger</generator><openSearch:totalResults>105</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-3819653311414581177</guid><pubDate>Sat, 25 Feb 2023 17:04:00 +0000</pubDate><atom:updated>2023-02-25T14:23:22.087-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">useMemo</category><title>useMemo Hook</title><atom:summary type="text">useMemo prevents unnecessary rendering of child components:

import React, { useState, useEffect, useMemo } from "react";
&amp;nbsp;
const Child = ({ param }) =&amp;gt; {
  useEffect(() =&amp;gt;
    console.log("child rendered at ", new Date().toLocaleTimeString())
  );
  return &amp;lt;div&amp;gt;prop in child: {param}&amp;lt;/div&amp;gt;;
};
&amp;nbsp;
const App = () =&amp;gt; {
  const [counter, setCounter] = useState(3);
  </atom:summary><link>https://all4developer.blogspot.com/2023/02/usememo-hook.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-1639266469786505426</guid><pubDate>Tue, 01 Nov 2022 00:21:00 +0000</pubDate><atom:updated>2023-02-25T10:12:27.660-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">add</category><category domain="http://www.blogger.com/atom/ns#">array</category><category domain="http://www.blogger.com/atom/ns#">replace</category><category domain="http://www.blogger.com/atom/ns#">useState</category><title>React useState Hook</title><atom:summary type="text">Working with Array of Objects and Objectanother example with delete update

</atom:summary><link>https://all4developer.blogspot.com/2022/10/react-usestate-hook.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEi0M0ULSXXSx77brlU6jV43Nt_kleHx7XJqAXFfGh9SrTCJK688wwOkqSDVxIlsIabrdkH_AI_QnV-70R2MRNZ9i5ZbOnSR0UxoBdHU9-xGSC7y6Sf6e4aVlqH-8-8eknSAXtTQWjUxB5gyDaGMsTuVfvo-d2FH5Cbu-gHxngIj_AUr4bUjOPKRd_64qA=s72-w400-h364-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-8074847283430618438</guid><pubDate>Thu, 01 Sep 2022 10:43:00 +0000</pubDate><atom:updated>2022-09-01T03:52:18.966-07:00</atom:updated><title>NodeJS and ES6</title><atom:summary type="text">Bable can transpile ES6 code to JS code that can be processed by Node.Folder and file structure:Here is package.json

&lt;!--HTML generated using hilite.me--&gt;{
  "name": "node-server-using-es6",
  "version": "1.0.0",
  "description": "Node Server compiles code to ES6 using babel",
  "main": "lib/index.js",
  "scripts": {
    "build": "rimraf build &amp;amp;&amp;amp; babel src -d dist",
    "start": "nodemon</atom:summary><link>https://all4developer.blogspot.com/2022/09/nodejs-and-es6.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEhoHtGbp2k8cCSebooVkOlom8RL0c04CYlZJDyM8_MuVjGlTAMnQcpMU0vZr6Eu8bCi-jhSa0sS15thn3_kml03KQWR-1hxRchbQ6wZalpit1EZDZRMARE3UZYtAi0uUZPng9CZChqEN59XD40VkuMXPYGC7gqhNabrJglJNrXkeDLdjkgD4CZ3OF3p4Q=s72-c" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-570185014848350744</guid><pubDate>Thu, 27 Jan 2022 09:45:00 +0000</pubDate><atom:updated>2022-01-27T01:47:01.156-08:00</atom:updated><title>Launch Browser in Code</title><atom:summary type="text">For React project create folder .vscode an in it launch.json

&lt;!--HTML generated using hilite.me--&gt;{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome on localhost:3000",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}/src",
            "userDataDir": "$</atom:summary><link>https://all4developer.blogspot.com/2022/01/launch-browser-in-code.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-1770644041362924256</guid><pubDate>Fri, 21 Jan 2022 17:15:00 +0000</pubDate><atom:updated>2022-01-21T09:15:46.935-08:00</atom:updated><title>React callback</title><atom:summary type="text">Passing function as argument and callback in setState.

&lt;!--HTML generated using hilite.me--&gt;import React from 'react';

export default class App extends React.Component {
  state = {
    users: [],
    status: 'initial',
  };

  componentDidMount() {
    this.getUsers();

    this.myCoolFunction('first', 'second', (result) =&amp;gt; console.log('yay the result is', result));
    this.myCoolFunction(</atom:summary><link>https://all4developer.blogspot.com/2022/01/react-callback.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-3410878874882953539</guid><pubDate>Mon, 22 Nov 2021 19:12:00 +0000</pubDate><atom:updated>2021-11-22T11:22:40.300-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">delete file</category><category domain="http://www.blogger.com/atom/ns#">gulp</category><category domain="http://www.blogger.com/atom/ns#">react</category><category domain="http://www.blogger.com/atom/ns#">replace</category><title>Gulp &amp; React</title><atom:summary type="text">Replace &amp;amp; Delete files in build folder using Gulp

gulpfile.js&amp;nbsp;

&lt;!--HTML generated using hilite.me--&gt;const gulp       = require('gulp');
const replace    = require('gulp-string-replace');
const rimraf     = require('gulp-rimraf');

function changeLang() {
    const searchFor = '&amp;lt;html lang="en"&amp;gt;';
    const replaceBy = '&amp;lt;html lang="de"&amp;gt;';
  
    return gulp.src('./build/*.</atom:summary><link>https://all4developer.blogspot.com/2021/11/gulp-react.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-6161061420880904167</guid><pubDate>Sat, 20 Nov 2021 00:54:00 +0000</pubDate><atom:updated>2021-11-19T16:56:12.840-08:00</atom:updated><title>CSP and Dynamically Generated JavaScript tag</title><atom:summary type="text">CSP HTTP header and Meta Tag must be synchronized. There must be two hashes one for hard coded JavaScript other for generated JavaScript tag.&amp;nbsp;

index.html

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge" </atom:summary><link>https://all4developer.blogspot.com/2021/11/csp-and-dynamically-generated.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-5042309348811159626</guid><pubDate>Mon, 15 Nov 2021 20:47:00 +0000</pubDate><atom:updated>2022-06-07T11:41:53.429-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">gitlab</category><category domain="http://www.blogger.com/atom/ns#">react</category><title>GitLab Pipeline and React</title><atom:summary type="text">GitLab for React


Make sure you are using same node image in the pipeline and Dockerfiles

optimised .gitlab-ci.yml using artifacts

stages:
  - build
  - test
  - push

image:
  name: node:16-alpine
  entrypoint: [""]

build_r:
  stage: build
  artifacts:
    paths:
      - node_modules/
      - package.json
      - package-lock.json
    expire_in: 1 day
  before_script:
    - apk -U upgrade
  </atom:summary><link>https://all4developer.blogspot.com/2021/11/gitlab-pipeline-and-react.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-5653803287109815572</guid><pubDate>Fri, 10 Sep 2021 19:04:00 +0000</pubDate><atom:updated>2021-09-10T12:04:44.981-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Apache</category><category domain="http://www.blogger.com/atom/ns#">docker</category><title>Apache on Ubuntu</title><atom:summary type="text">Dockerfile for installing Apache on Ubuntu:
FROM ubuntu:20.04

ENV TZ=Europe/Berlin

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;amp;&amp;amp; echo $TZ &amp;gt; /etc/timezone

RUN apt-get update &amp;amp;&amp;amp; apt-get -y install apache2

EXPOSE 80

CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]



Build and run
&lt;!--HTML generated using hilite.me--&gt;docker build -t ubu-apache .
docker run --name=</atom:summary><link>https://all4developer.blogspot.com/2021/09/apache-on-ubuntu.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-2950645575706491519</guid><pubDate>Sun, 18 Jul 2021 16:31:00 +0000</pubDate><atom:updated>2021-07-18T09:42:03.375-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">boostrap</category><category domain="http://www.blogger.com/atom/ns#">checkbox</category><category domain="http://www.blogger.com/atom/ns#">react</category><category domain="http://www.blogger.com/atom/ns#">TypeScript</category><title>React CheckBox</title><atom:summary type="text">Working with React Bootstrap checkbox


 import React, { PureComponent } from &amp;quot;react&amp;quot;;
import Form from &amp;quot;react-bootstrap/Form&amp;quot;;

interface CheckBoxState {
  checkedColors: any[];
}

interface CheckBoxProps {
  foo: string;
}

class CheckBox extends PureComponent&amp;lt;CheckBoxProps, CheckBoxState&amp;gt; {
  constructor(props: CheckBoxProps) {
    super(props);
    this.state = {
</atom:summary><link>https://all4developer.blogspot.com/2021/07/react-checkbox.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-8220497896722426236</guid><pubDate>Fri, 07 May 2021 16:54:00 +0000</pubDate><atom:updated>2021-05-07T09:56:38.351-07:00</atom:updated><title>Postgres &amp; Adminer on Docker</title><atom:summary type="text">Postgres &amp;amp; Adminer on Docker stack.

version: '3'

services:

  postgres:
    image: postgres:13.2-alpine
    restart: always
    environment:
      POSTGRES_PASSWORD: secret
      POSTGRES_USER: pguser
      POSTGRES_DB: pgdb
    ports:
      - "5432:5432"
    volumes:
      - pg-data:/var/lib/postgresql/data
    networks:
      - pg-network
&amp;nbsp;

  adminer:
    image: adminer:</atom:summary><link>https://all4developer.blogspot.com/2021/05/postgres-adminer-on-docker.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-3509457165448548327</guid><pubDate>Thu, 15 Apr 2021 18:57:00 +0000</pubDate><atom:updated>2021-07-20T11:00:52.097-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">null</category><category domain="http://www.blogger.com/atom/ns#">TypeScript</category><category domain="http://www.blogger.com/atom/ns#">undefined</category><title>TypeScript Question Mark and Exclamation Mark</title><atom:summary type="text">Here is how to use in combination to determine if property is null or undefined.


interface Product {
    id: number,
    name?: any 
}

let product: Product = {id: 5, name: "some str"};

if(product!.name) console.log("ok")

product = {id: 5}
if(product!.name) console.log("not printed")

product = {id: 5, name: null}
if(product!.name) console.log("not printed")


Second if will not be excecated </atom:summary><link>https://all4developer.blogspot.com/2021/04/typescript-question-mark-and.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><georss:featurename>Munich, Germany</georss:featurename><georss:point>48.1351253 11.5819805</georss:point><georss:box>19.824891463821153 -23.5742695 76.445359136178837 46.7382305</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-872822743173337275</guid><pubDate>Thu, 04 Feb 2021 21:34:00 +0000</pubDate><atom:updated>2021-02-04T13:34:46.591-08:00</atom:updated><title>Oracle Spool</title><atom:summary type="text">Here is how to create a log file for your script:

SET echo ON
SET feedback ON
SET SERVEROUTPUT ON
SET linesize 500
COL spoolname new_value filename
SELECT TO_CHAR(systimestamp, 'YYYY_MM_DD_HH24_MI_') || 
	(SELECT SYS_CONTEXT ('userenv', 'current_schema') FROM  dual) || 
	'_log_name.log' AS spoolname FROM dual;
SPOOL &amp;amp;filename

-- start main SQL script
INSERT INTO my_table (total) VALUES (25)</atom:summary><link>https://all4developer.blogspot.com/2021/02/oracle-spool.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-505656048021912952</guid><pubDate>Fri, 22 Jan 2021 00:58:00 +0000</pubDate><atom:updated>2021-01-21T17:52:58.430-08:00</atom:updated><title>Oracle Package</title><atom:summary type="text">Oracle package with procedure, function and global variable
CREATE OR REPLACE PACKAGE my_package AS
    g_fav_num NUMBER := 5;
    PROCEDURE my_proc (val INTEGER);
    FUNCTION  double_func (in_val IN NUMBER) RETURN NUMBER; 
END my_package;
/

CREATE OR REPLACE PACKAGE BODY my_package ASPROCEDURE my_proc (val INTEGER) IS
  BEGIN
      g_fav_num := g_fav_num + val;
      INSERT INTO my_table ( </atom:summary><link>https://all4developer.blogspot.com/2021/01/oracle-package.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-8929467608784578252</guid><pubDate>Thu, 17 Dec 2020 22:37:00 +0000</pubDate><atom:updated>2020-12-17T14:41:21.209-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">log</category><category domain="http://www.blogger.com/atom/ns#">oracle 12c</category><category domain="http://www.blogger.com/atom/ns#">table</category><title>Logging Table in Oracle</title><atom:summary type="text">In Oracle 12c&amp;nbsp; you create table:
CREATE TABLE msg_log (
    id            NUMBER
        GENERATED BY DEFAULT ON NULL AS IDENTITY,
    ts            TIMESTAMP WITH LOCAL TIME ZONE,
    schema_name   VARCHAR2(15),
    message       VARCHAR2(250)
);

&lt;!--Created using ToHtml.com on 2020-12-17 22:31:01 UTC--&gt;
&amp;nbsp;Create procedure:
CREATE OR REPLACE PROCEDURE log_message (
    message IN </atom:summary><link>https://all4developer.blogspot.com/2020/12/logging-table-in-oracle.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-2738385454558996643</guid><pubDate>Thu, 10 Dec 2020 07:44:00 +0000</pubDate><atom:updated>2020-12-18T14:41:18.601-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">exception</category><category domain="http://www.blogger.com/atom/ns#">in</category><category domain="http://www.blogger.com/atom/ns#">oracle</category><category domain="http://www.blogger.com/atom/ns#">out</category><category domain="http://www.blogger.com/atom/ns#">params</category><category domain="http://www.blogger.com/atom/ns#">procedure</category><category domain="http://www.blogger.com/atom/ns#">stored</category><title>Oracle Stored Procedure</title><atom:summary type="text">Sample of Oracle stored procedure with in &amp;amp; out params &amp;amp; exceptions.

&lt;!--HTML generated using hilite.me--&gt;CREATE OR REPLACE PROCEDURE proc_name (
  p1 IN VARCHAR2,   p2 OUT VARCHAR2
) 
AS 
  msg VARCHAR2(30) := 'hello ';
  ex_some_exception EXCEPTION;

BEGIN   IF length(p1) &amp;lt; 2 THEN RAISE ex_some_exception;
  END IF;
  p2 := msg || p1;
EXCEPTION 
  WHEN ex_some_exception THEN </atom:summary><link>https://all4developer.blogspot.com/2020/12/oracle-stored-procedure.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-1221131069622124905</guid><pubDate>Sun, 30 Aug 2020 09:18:00 +0000</pubDate><atom:updated>2020-08-30T02:30:04.564-07:00</atom:updated><title>Kill Session in Oracle</title><atom:summary type="text">Launch SQLPlus:

[oracle@localhost ~]$ sqlplus
Enter user-name: hr

Enter password: 

EXEC HI -- HI is long running stored procedure


Connect to Oracle as DBA and replace HR with you user


sqlplus sys as sysdba

select sid, serial#, status, program from v$session where username='HR';

ALTER SYSTEM KILL SESSION 'sid, serial#';



In SQL Developer:

select s.username,s.sid,s.serial#,</atom:summary><link>https://all4developer.blogspot.com/2020/08/kill-session-in-oracle.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-5603197945385996330</guid><pubDate>Wed, 01 Jul 2020 06:59:00 +0000</pubDate><atom:updated>2021-04-17T10:35:05.840-07:00</atom:updated><title>OpenShift on Public IP</title><atom:summary type="text">Install OpenShift Origin on cloud machine with public IP

Login to remote host

$ ssh -i private_key user@nnn.nnn.nnn.nn

Firewall settings&amp;nbsp;cat /etc/firewalld/zones/public.xml

&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;zone&amp;gt;
  &amp;lt;short&amp;gt;Public&amp;lt;/short&amp;gt;
  &amp;lt;description&amp;gt;For use in public areas..&amp;lt;/description&amp;gt;
  &amp;lt;service name="ssh"/&amp;gt;
  &amp;lt;service name="</atom:summary><link>https://all4developer.blogspot.com/2020/06/openshift-on-public-ip.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-3901529627920920369</guid><pubDate>Fri, 12 Jun 2020 08:13:00 +0000</pubDate><atom:updated>2020-09-10T15:31:31.768-07:00</atom:updated><title>NodeJS Template Engine</title><atom:summary type="text">Node file app.js

var nunjucks = require('nunjucks')

var res = nunjucks.render(
  'foo.html', {
    messages: ['foo', 'bar'],
    username: "mike"
  }
);

console.log(res)
template file foo.html
{% if username === 'mike' %}
    {{ username }}
{% endif %}

{% for message in messages %}
    {{ message }}
{% endfor %}

Run 
node app.js

Practical example for oracle log message 
var nunjucks = </atom:summary><link>https://all4developer.blogspot.com/2020/06/nodejs-template-engine.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-2165464988994161805</guid><pubDate>Wed, 18 Dec 2019 00:12:00 +0000</pubDate><atom:updated>2019-12-17T16:29:18.463-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">GKE</category><category domain="http://www.blogger.com/atom/ns#">Google Kubernetes Engine</category><category domain="http://www.blogger.com/atom/ns#">helm chart</category><category domain="http://www.blogger.com/atom/ns#">MySQL</category><title>Helm Chart for MySQL in GKE</title><atom:summary type="text">Here is how to deploy and test connectivity of MySQL in Google Kubernetes Engine GKE

# connect to cluster in Google Kubernetes Engine
$ gcloud container clusters get-credentials &amp;lt;your-cluster&amp;gt; --zone &amp;lt;your-zone&amp;gt; --project &amp;lt;your-project&amp;gt;
$ git clone --depth=1 https://github.com/helm/charts.git
$ cd charts/stable/mysql
$ vim values.yaml
$ helm install --name dbserver -f </atom:summary><link>https://all4developer.blogspot.com/2019/12/helm-chart-for-mysql-in-gke.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-2381183629559370299</guid><pubDate>Tue, 17 Dec 2019 22:19:00 +0000</pubDate><atom:updated>2021-07-23T10:16:59.896-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">array</category><category domain="http://www.blogger.com/atom/ns#">filter array of objects</category><category domain="http://www.blogger.com/atom/ns#">iterate</category><category domain="http://www.blogger.com/atom/ns#">js</category><category domain="http://www.blogger.com/atom/ns#">lodash</category><category domain="http://www.blogger.com/atom/ns#">object</category><category domain="http://www.blogger.com/atom/ns#">replace object</category><category domain="http://www.blogger.com/atom/ns#">update object</category><title>Useful JavaScript Snippets</title><atom:summary type="text">By using lodash you can loop through arrays and objects with ease

const _ = require("lodash");
// replace object in array
var arr = [{ id: 1, name: "Adam" }, { id: 2, name: "Bob" }];
var index = _.findIndex(arr, { id: 1 });
arr.splice(index, 1, { id: 100, name: "New man" });
document.write(JSON.stringify(arr));
document.write(`&amp;lt;hr/&amp;gt;`);
// update object in array
var mike = { id: 17, name: "</atom:summary><link>https://all4developer.blogspot.com/2019/12/useful-javascript-snippets.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-4786550406008358388</guid><pubDate>Sat, 16 Nov 2019 09:48:00 +0000</pubDate><atom:updated>2021-09-09T14:32:49.005-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">docker</category><category domain="http://www.blogger.com/atom/ns#">docker image</category><category domain="http://www.blogger.com/atom/ns#">push</category><category domain="http://www.blogger.com/atom/ns#">react</category><category domain="http://www.blogger.com/atom/ns#">reactjs</category><category domain="http://www.blogger.com/atom/ns#">repository</category><title>Images, Containers and Docker Registry</title><atom:summary type="text">This tutorial shows how to create images and containers and push to hub.docker.com registry. GitHub repo is at https://github.com/nikola-bodrozic/Docker-ReactJS
Simple Build on LinuxApache web server no Dockerfile, $(pwd) prints path to current folderdocker run -d --name apa -e TZ=UTC -p 8080:80 -v $(pwd)/html/:/var/www/html/ ubuntu/apache2
Development Build
docker build -t reactapp:1.0 .docker </atom:summary><link>https://all4developer.blogspot.com/2019/11/images-containers-and-docker-registry.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-121218323277490815</guid><pubDate>Sat, 22 Jun 2019 21:04:00 +0000</pubDate><atom:updated>2019-11-19T10:56:30.199-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">docker</category><category domain="http://www.blogger.com/atom/ns#">env. variable</category><category domain="http://www.blogger.com/atom/ns#">Override</category><category domain="http://www.blogger.com/atom/ns#">shell script</category><title>Override env. variable and shell script</title><atom:summary type="text">Override env. variable and shell script defined in Docker file in run command.

build an image

docker build -t busybox .
run container with env. variable &amp;amp; run CMD in Dockerfile

docker run busybox
override env. variable in Dockerfile
docker run --env ENV_TARGET=yahoo.com busybox
override CMD in Dockerfile
docker run busybox sh -c 'whoami &amp;amp;&amp;amp; pwd'
Dockerfile

FROM busybox

WORKDIR /</atom:summary><link>https://all4developer.blogspot.com/2019/06/override-env-variable-and-shell-script.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-6249804834578484401</guid><pubDate>Sat, 22 Jun 2019 20:38:00 +0000</pubDate><atom:updated>2019-06-22T13:45:05.910-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">axios</category><category domain="http://www.blogger.com/atom/ns#">concurrent calls</category><title>axios concurrent calls</title><atom:summary type="text">Axios can make multiple concurrent calls. In app.js calls to two end-points are started at the same time so total waiting time is 4 seconds. Server latency is 4 seconds for demo purposes.

app.js

const axios = require('axios')
&amp;nbsp;
try {
    console.log("start");
    function getUserName() {
        return axios.get('http://localhost:3000/heroes');
    }
&amp;nbsp;
    function getId() {
        </atom:summary><link>https://all4developer.blogspot.com/2019/06/axios-concurrent-calls.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2376655286569024124.post-6234811977778839561</guid><pubDate>Mon, 17 Jun 2019 20:29:00 +0000</pubDate><atom:updated>2019-06-22T13:48:48.463-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">async</category><category domain="http://www.blogger.com/atom/ns#">await</category><category domain="http://www.blogger.com/atom/ns#">axios</category><category domain="http://www.blogger.com/atom/ns#">delay</category><category domain="http://www.blogger.com/atom/ns#">download file</category><title>axios async await</title><atom:summary type="text">Sometimes you need to wait for one (axios) call to finish to continue with next one. It's accomplished by using async/await. Last axios call in app.js downloads a file without waiting for getUser() to be finished.

set server delay to 4 seconds for demo purposes

{
  "name": "async-await",
  "scripts": {
    "serve-json": "json-server --delay 4000 --watch db.json",
    "start": "node app.js"
  },</atom:summary><link>https://all4developer.blogspot.com/2019/06/axios-async-await.html</link><author>noreply@blogger.com (Nikola Bodrozic)</author><thr:total>0</thr:total></item></channel></rss>