Categories
Mastering Development

How to show notification when user app run in background?

I was creating a chating application with using of firebase in android studio ,my all activity working properly expect my background notification , what I wanted is,user gets notifications when other user send the message and when user unseen the message and app runs in background. I will try this but I got notification both […]

Categories
Database Development

CASE Statement returning unpredictable results

First time using Postgresql and building a query with a CASE statement. I am trying to end up with a collection of data whereby one of the columns in the data (status) qualifies the row based on conditions. I have 3 tables (in a Posqtgresql DB) as follows: Table devices: id serial_number retired last_reported_utc_at other_data […]

Categories
Database Development

CASE Statement returning unpredictable results

First time using Postgresql and building a query with a CASE statement. I am trying to end up with a collection of data whereby one of the columns in the data (status) qualifies the row based on conditions. I have 3 tables (in a Posqtgresql DB) as follows: Table devices: id serial_number retired last_reported_utc_at other_data […]

Categories
Mastering Development

Compile error initializing struct member with enum class

Following program giving compilation error as following // Example program #include <iostream> #include <string> enum class Animation: int{ Hide=0, Show, Flicker }; struct Icon { int id; char name[10]; Animation currentAnim; Animation nextAnim; int isActive; }; static struct Icon IconList[]= { {1, "Offline", Animation::Hide, Animation::Hide, 1}, {2, "Training", Animation::Hide, Animation::Hide, 1}, {0, 0, Animation::Hide, Animation::Hide, […]

Categories
Mastering Development System & Network

I can not remove the “bad” disk from the zfs pool

There were 2 disks in the pool /dev/sde /dev/sdf The disk /dev/sde was damaged, I excluded it from the pool and replaced it with a new disk. The raid has become degraded. After adding a new /dev/sde disk to the pool, I got the following configuration: zpool status pool: rpool state: DEGRADED status: One or […]

Categories
Linux Mastering Development

searching logs for failures using grep with wordlist?

I am building a wordlist which will contain words like error,fail,kill,warn,out of,over,too much…..etc. so that I can filter tons of logs for issues within seconds. Log levels 0,1,2,3,4 greperror() { grep -i ‘error\|kill\|fail\|warn’ $* } Especially, it’s for linux logs digging. Edit 1: https://github.com/cornet/ccze static char *words_bad[] = { “warn”, “restart”, “exit”, “stop”, “end”, “shutting”, […]

Categories
Linux Mastering Development

Fullscreen glitch / problem / blackout when using online video (Youtube, Netflix) on browser (Firefox, Midori, Chrome) elementary OS

I’m a bit new to linux environment but I did all the research I can before posting here. I will just go to the point. When I open a Youtube or Netflix video (and sometimes other fullscreen apps like Rambox + Whatsapp) the screen goes black for a second or two and comes back. Sound […]

Categories
Development

how to identify updated record in postgresql

I have loaded some 5000 records in PostgreSQL using the CSV file. Now, there is some incremental load the same as the CSV file. This incremental load has 15 records(5 new records and 10 records are updated). Here I want to identify which column has got updated. For example: sales table(first load) region, country, item_type, […]

Categories
Development

How to adjust variable to sync events from one calendar to a group calendar

I’m trying to create/modify a script where a team member can add an event in their calendar under a certain keyword. I used this script because I also needed the group calendar I’m using the script on to have vacation and OOO time auto-populated. This works fine, but my additional keywords aren’t working. I’m using […]

Categories
Development Google

Google Script Calendar Event List Search in Multi-languages Environment

Using Google script Calendar.events.list in a multi-language environment. I am not sure if a decoding function is necessary. function findEvents(user, keyword, start, end, optSince) { var params = { q: keyword, timeMin: formatDateAsRFC3339(start), timeMax: formatDateAsRFC3339(end), showDeleted: true, }; if (optSince) { // This prevents the script from examining events that have not been // modified […]