Categories
Linux Mastering Development Ubuntu

Ubuntu 18.04 & 19.10 don’t see Macbook Air ssd disk during the installation

i think the title is quite self explanatory: USB key work well, the boot is ok, i’m able to run the live and activate the wifi but when I try to install the system i don’t see the disk. Also Gparted and Fdisk don’t see the disk. In my searches i saw this is almost […]

Categories
Development User Help

5 GHz AP Mode with Atheros QCA6174A chipset on centOS8

I am trying to set up an 5 GHz access point on a machine with an Atheros QCA6174A-equipped WiFi card running centOS8. However, all 5 GHz bands are blocked (no-ir flag set) for operation in AP mode (see output of iw list below). Interestingly, the iw reg get output does not indicate the prohibition of […]

Categories
CMS Development Drupal

How to define default values in case of no results of a query? [closed]

I use this query on custom content entities to define default values for a form: $database = \Drupal::database(); $query = $database->select(‘member’, ‘am’); $query->leftJoin(‘person’, ‘ap’, ‘ap.member_id = am.id’); $query->fields(‘ap’, [‘id’, ‘lastname’, ‘firstname’, ’email’, ‘cellphone’, ‘iscontact’]) ->fields(‘am’, [‘id’, ‘designation’, ‘addresssupplement’, ‘street’, ‘postalcode’, ‘city’, ‘contact_id’, ‘telephone’, ‘status’]) ->condition(‘am.contact_id’, $iCurrentUserId, ‘=’) ->orderBy(‘iscontact’, ‘DESC’); $results = $query->execute()->fetchAll(); The query may […]

Categories
CMS Development Drupal

How to define default values in case of no results of a query? [closed]

I use this query on custom content entities to define default values for a form: $database = \Drupal::database(); $query = $database->select(‘member’, ‘am’); $query->leftJoin(‘person’, ‘ap’, ‘ap.member_id = am.id’); $query->fields(‘ap’, [‘id’, ‘lastname’, ‘firstname’, ’email’, ‘cellphone’, ‘iscontact’]) ->fields(‘am’, [‘id’, ‘designation’, ‘addresssupplement’, ‘street’, ‘postalcode’, ‘city’, ‘contact_id’, ‘telephone’, ‘status’]) ->condition(‘am.contact_id’, $iCurrentUserId, ‘=’) ->orderBy(‘iscontact’, ‘DESC’); $results = $query->execute()->fetchAll(); The query may […]

Categories
CMS Development Drupal

How to define default values in case of no results of a query?

I use this query on custom content entities to define default values for a form: $database = \Drupal::database(); $query = $database->select(‘member’, ‘am’); $query->leftJoin(‘person’, ‘ap’, ‘ap.member_id = am.id’); $query->fields(‘ap’, [‘id’, ‘lastname’, ‘firstname’, ’email’, ‘cellphone’, ‘iscontact’]) ->fields(‘am’, [‘id’, ‘designation’, ‘addresssupplement’, ‘street’, ‘postalcode’, ‘city’, ‘contact_id’, ‘telephone’, ‘status’]) ->condition(‘am.contact_id’, $iCurrentUserId, ‘=’) ->orderBy(‘iscontact’, ‘DESC’); $results = $query->execute()->fetchAll(); The query may […]

Categories
Development Linux

Understanding difference between P2P-client and P2P-device

I’m going through WiFi direct, learning about it and how to set it up on linux. I’ve ran iw list to see what my wireless card supports, and this is what I get. Supported interface modes: * managed * AP * AP/VLAN * monitor * mesh point * P2P-client * P2P-GO * P2P-device … valid […]

Categories
Development

Read dinamically CSV files in Python

How I read CSV’s files dinamically in Python, when change the suffix name files? Example: import pandas as pd uf = [‘AC’, ‘AL’, ‘AP’, ‘AM’, ‘BA’, ‘CE’, ‘DF’, ‘ES’, ‘GO’, ‘MA’, ‘MT’, ‘MS’, ‘MG’, ‘PA’, ‘PB’, ‘PR’, ‘PE’, ‘PI’, ‘RJ’, ‘RN’, ‘RS’, ‘RO’, ‘RR’, ‘SC’, ‘SP1’, ‘SP2’, ‘SE’, ‘TO’] for n in uf: {n} = […]

Categories
Development

PoLCA ALERT: at least one manifest variable contained only one outcome category, and has been removed from the analysis

I am running PoLCA on RStudio: f <- cbind( B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF, AG, AH, AI, AJ, AK, AL, AM, AN, AO, AP, AQ, AR, AS, AT, AU, […]

Categories
Development

c string isn’t added to string correctly and outputs □ when using printf

I’ve been programming a script where a string should be added to a string. But the printf function in my code prints the first time □ the second time □□ and the third time □□□. It should print A,Ap, App. Here’s a quick overview of my code: #include<stdio.h> #include<stdlib.h> int i = 0; char * […]

Categories
Development Javascript

javascript to validate random characters in password like “a1a, aKa, a$a, aJ^lG, G78%s# [duplicate]

This question already has an answer here: Regex to validate password strength 9 answers Reference – Password Validation 1 answer I am having a password change page where I want to validate my password with “2 small letters, 2 capital letters, 3 symbols, 2 digits and so on. Now from the below code I am […]