Categories
Mastering Development

SQL script generate insert statement with comma separated values

I have a table-column containing a contact-person(s), separated by a comma(firstname lastname, firstname lastname). I am trying to generate a script that is generating insert statements, but can’t seem to find a way to handle inserts where there are more than 1 contact-person within the value. SELECT(‘INSERT INTO contact(KundeId,FirstName,LastName,deleted,contactIdId) (‘+ ‘SELECT ‘ + ‘Kunder.Id’ + […]

Categories
Mastering Development

org.apache.avro.AvroTypeException: Expected record-start. Got VALUE_STRING

I am doing simple json to Avro Record conversion, But I am getting this issue, I tried lot of ways, I applied more than 15 solutions from stackoverflow and online. My File look like this { “namespace”: “test”, “type”: “record”, “name”: “root”, “doc”: “This stream contains raw data.”, “fields”: [ { “name”: “aaa”, “doc”: “You […]

Categories
Mastering Development

Compare two list of complex object

I am in the situation of comparing two lists of complex objects, to find the elements inserted, the elements modified and those deleted: small example public class pippo { public int fluido; public int abc; } public partial class Form1 : Form { public Form1() { InitializeComponent(); List<pippo> lstact= new List<pippo>(); List<pippo> lstprec = new […]

Categories
CMS Development

Redactor image button not showing up

I have seen a few questions the same as this, but none with answers that work. I am trying to use redactor to allow for dynamic blog posts to be written by my team. In my redactor set up file I have: buttons: [‘html’, ‘format’, ‘bold’, ‘italic’, ‘deleted’, ‘lists’, ‘image’, ‘file’, ‘link’], AND imageUpload: true […]

Categories
Development

How to get Added/Modified/Deleted lines of code in Gerrit [closed]

I have Gerrit application administrator permission and I want to collect Added/Modified/Deleted lines of code(LOC) metrics from certain date to till date for specific site(UK project) users from all their working git/gerrit (240) repositories. i tried below command but i can able to retrieve the data from particular git repository & author. git log –author=”<authorname>” […]

Categories
Development

How to get Added/Modified/Deleted lines of code in Gerrit [closed]

I m the Gerrit application administrator and I need to collect the Added/Modified/Deleted lines of code(LOC) metrics for specific site(UK project) users from all their working git/gerrit (240) repositories. i tried below command but i can able to retrieve the data from particular git repository & author. git log –author=”<authorname>” –oneline –shortstat Also the below […]

Categories
Development System & Network

Display OUs from AD in mod_shared_roster_ldap

I have a test installation in the virtual environment – Win2008R2 Server as AD controller; – Centos 7 + ejabberd 19.09 I want to display names of the Active Directory’s OUs. The OUs structure in my case looks like this: [-] test.local [+] Builtin … [-] ORG [-] GRP1 deleted GRP2 where ORG, GRP1, deleted, […]

Categories
Development MySQL

MySQL – Joining the same table twice but grabbing different results

I previously asked a question in regards to the same situation here but since I was so vague about my query, the provided solution didn’t work for my specific case. Here’s my second attempt at resolving this: I have a series of tables that are connected in strange ways… Here’s the end result I’m trying […]

Categories
Development

how can i make a confirm dialog?

I have created a todo app in android studio. when you click on the list of task item, it deletes itself. but i want to show a confirm dialog before that. so i used this code to delete the item and it was working: @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) […]

Categories
Development MySQL

How to get the most recent element by id in MySQL table using PHP

I tried the below code to get the last inserted id so as to insert it to another table but somehow using $this->$conn->lastInsertId() doesn’t seem to work. Anyone has any idea? if (!( $stmt = $this->conn->prepare(“INSERT INTO company(company_name,address_line1,address_line2,postal_code,country,contact_no,email,wifi_name,website_url,contact_person,parent_id,created_by,created_date,updated_date,deleted, wifi_name2) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)”))) { echo “Prepare failed: (” . $this->conn->errno . “)” . $this->conn->error; } else { if […]