Development / Javascript

How do Remove Element From an Array – Simple

/** Set – New Array */ const users = []; /** * Add – New Element/Item */ users.push({ id: socket.id, name: ‘Visitor’}); /** * Find – Index of Element */ var foundIndex = users.findIndex(x => x.id == socket.id); /** * Update/Add – New Data an Founded Element */ users[foundIndex].name = data.name; /** * Remove */ users.splice(foundeIndex, 1); Example from My Home Hobby Project: const users = []; nsp.on(‘connection’, (socket) => { console.log(‘Kullanici :’ + socket.id + ‘Baglandi’); users.push({ id: socket.id, name: ‘Visitor’}); socket.on(‘sendUserData’, (data) => { console.log(‘Server => ‘ + data.name + ‘ Connected.’); var foundIndex = users.findIndex(x => x.id […]

Development / PHP

My Experiences with Laravel 5.5

First Project / Look : I have had some experience in module writing my company software solution for an Aid Organization. This project was with Laravel 5.1, what the customer wants as a correction or update… What have I had? First of all, some pre-installed plugins(from the old developer at company) need to be updated, because these plugins work not nicely or stable.. But isn’t possible, because XYZ Plugin needed higher version another ABC, DEF Plugins, this plugin needed higher version of laravel/framework.  If I framework updated, then you get several errors, because main core functions or classes changed or […]

Development / Linux / PHP / Raspberry Pi Zero W / Server

Raspberry Pi Zero W + USB Modem – SMS Gateway

This Article updated on 08.09.2019 Install usb-modeswitch, smstools, wvdial sudo apt-get install usb-modeswitch usb-modeswitch-data smstools wvdial Find right device and baudrate with this command; sudo wvdialconf …my modem information (modem on ttyUSB1 and baudrate 9600)… ttyUSB0<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud ttyUSB0<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 9600 baud ttyUSB0<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up. ttyUSB1<*1>: ATQ0 V1 E1 — OK ttyUSB1<*1>: ATQ0 V1 E1 Z — OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 — ERROR ttyUSB1<*1>: ATQ0 V1 E1 &C1 — ERROR […]