gui design – Floated label form fields – displaying hint text and validation

I’m making updates to a form, which features form fields with floated labels. I want to add hint text to some of the fields, but I’m unsure how to format these fields when I need to display validation errors.

I tried the following, but I’m worried this might be confusing to users. Any suggestions or feedback is greatly appreciated.

Note: I’m trying to avoid hiding the hint text in tooltips.

enter image description here

8 – Re-order node fields in views generated from ID

I have a content type with fields: title, hours_worked, work_done.

I’ve created a view that gets the node ID from URL and outputs the fields of the target node: hours_worked and work_done. How do I introduce the ability to re-order which of the fields comes first in a drag and drop manner.

It’s similar to the functionality you get in Draggableviews/sortableiews/weight modules which are for re-ordering list of nodes but this requirement is for fields of specific node.

magento2 – How to add icons to input fields if the field has not passed validation

I need to add a custom icon to the floor if the field does not pass validation, as in the screenshot.

enter image description here

I tried to implement this functionality with ‘:after’ in CSS

    &._error .control input {
        &:after {
            content: 'X';
            color: #000;
            font-size: 18px;
        }
    }

but the item is not displayed on the frontend

enter image description here

input fields – Forbid and deactivate alphanumeric keys in a form?

scenario: form validation

I ask myself the question: in a special input form for postcode for example, in which only numbers (integer) are allowed. In a usability view I would say, you should be allowed to input all keys (abcd, 1234), the logic should fit it in the background. Would you forbid and deactivate alphanumeric keys, that the user cannot put the wrong keys into the input field?
I think the user would be confused. What is your opinion?

The HTML-Input for numbers: no way. It is a desktop application on Windows.

Thank you!

postgresql – How to aggregate json fields when using GROUP BY clause in postgres?

I have the following table structure in my Postgres DB (v12.0)

id | pieces | item_id | material_detail
---|--------|---------|-----------------
1  | 10     | 2       | ({"material_id":1,"pieces":10},{"material_id":2,"pieces":20},{"material_id":3,"pieces":30})

2  | 20     | 2       | ({"material_id":1,"pieces":40}
3  | 30     | 3       | ({"material_id":1,"pieces":20},{"material_id":3,"pieces":30}

I am using GROUP BY query for this records, like below

SELECT SUM(PIECES) FROM detail_table GROUP BY item_id HAVING item_id =2 

Using which I will get the total pieces as 30. But how could I get the count of total pieces from material_detail group by material_id.

I want result something like this

 pieces |  material_detail
 -------| ------------------
  30    |  ({"material_id":1,"pieces":50},{"material_id":2,"pieces":20},{"material_id":3,"pieces":30})

As I am from MySQL background, I don’t know how to achieve this with JSON fields in Postgres.

Note: material_detail column is of JSONB type.

reference request – What is the state-of-the-art for solving polynomials systems over fields that are not algebraically closed?

I am not working in the field of algorithmic algebraic geometry – yet, for my current work, I need some results from it.

More specifically, what is the state-of-the-art when it comes to solving (whatever “solving” means in this case) system of polynomials of fields that are not algebraically closed, whose ideal has dimension $>0$?
Could you recommend a survey paper that summarizes what has been achieved so far?

For the case of $0$-dimensional ideals, there seems to exist many heavily cited papers, like “Solving Zero-dimensional Algebraic Systems” by D. Lazard, which seem mostly to be concerned with finding ways of to display the system of polynomials in a nice way (e.g. triangularly). Are these articles already superseded, or does it make sense to read them?

Woocommerce custom meta fields, sort by date

I’ve got a list of user orders, with a custom field named “Delivery Date”. This lets users pick a date when they want their order delivered. I am trying to make this custom field ‘sortable’ so the admin can sort orders by the delivery dates instead of the order date. This is the code I am using to display this custom meta field on the Orders page:

add_filter( 'manage_edit-shop_order_columns', 'bbloomer_add_new_order_admin_list_column' );
    function bbloomer_add_new_order_admin_list_column( $columns ) {
    $columns('delivery_date') = 'Delivery Date';
    return $columns;
}

and this is the code I am using to make this a ‘sortable’ column:

// Sort by custom column ==> changed (working)
add_filter( "manage_edit-shop_order_sortable_columns", 'custom_woo_admin_sort' );
function custom_woo_admin_sort( $columns )
{
    $custom = array(
        'delivery_date'    => 'delivery_date',
    );
    return wp_parse_args( $custom, $columns );
}

Now it does make the column clickable, however it does not order the dates properly. It generates this url: edit.php?post_type=shop_order&wc-hide-notice=template_files&orderby=delivery_date&order=desc but the delivery dates still show up in the wrong order. Where am I going wrong here?

Photo for reference: https://prnt.sc/so1cgv

sql – there are a better solutions to set FIELDS as data at ADODB query from xls file (exported from SAP)

My excel program import from another workbook, exported from SAP, some columns to update my dashboard.

To do this I use ADODB, the code run right and fast (26K rows and 32 columns on 00:00:26:1226).

But I see that some columns with data/time aren’t correctly formatted, the poblem is that not all date columns just some, I think are a Sap problem, but i get this file from customer and it will my problem.

enter image description here

So, this are my query without any custom format, just extraction:

cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & WsFrom.FullName & "; Extended Properties=""Excel 8.0;HDR=Yes;"";"

SELECT '1.1' as IdKpi, ((06)-Data creazione)*1 as DateCreation,  '' as Divisione, 
((01-A)-Ordine d'acquisto) as Orders, 
switch(((07)D-Modalità Trasp) = 'AOG','AOG',
((07)D-Modalità Trasp) <> 'AOG','STD') as Trasporto,
((07)-Fine carico att) as StartDateSap, 
((07)-Ora attfine car) as StartTimeSap, 
((01-A)-Data di reg) as EndDateSap, ((01-A)-Ora di acquisizione) as EndTimeSap, 
((07)-Inizio trasp att) as StartDateBlock, 
((07)-Ora attinizio trasp) as StartTimeBlock, 
((07)-Data FINE Sdoganamento) as EndDateBlock, 
((07-A)-Sdogan-Fine-EffOra) as EndTimeBlock, 
((02)-Utente) as Users, ((06-A)-Blocco-In-Data) as DateBlockIn, 
((07)-Tipo di trasporto) as DoganaTax1, 
((09-A)-Controllo conferma) as DoganaTax2,
from (Sheet1$);

rs.Open strsql, cn, adOpenStatic, adLockReadOnly, adCmdText
rs.MoveFirst
dbSh.Range("A2").CopyFromRecordset rs

this is the 1th test, I updated code (I change (data/time_Field) as customName to Cdate((data/time_Field)) as customName.
the update show me all data/time fields like as data/time the qry run on 00:01:08:128

cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & WsFrom.FullName & "; Extended Properties=""Excel 8.0;HDR=Yes;"";"

SELECT '1.1' as IdKpi, ((06)-Data creazione)*1 as DateCreation,  '' as Divisione, 
((01-A)-Ordine d'acquisto) as Orders, 
switch(((07)D-Modalità Trasp) = 'AOG','AOG',
((07)D-Modalità Trasp) <> 'AOG','STD') as Trasporto,
((07)-Fine carico att)*1 as StartDateSap, 
((07)-Ora attfine car) as StartTimeSap, 
((01-A)-Data di reg)*1 as EndDateSap, ((01-A)-Ora di acquisizione) as EndTimeSap, 
((07)-Inizio trasp att)*1 as StartDateBlock, 
((07)-Ora attinizio trasp) as StartTimeBlock, 
((07)-Data FINE Sdoganamento)*1 as EndDateBlock, 
((07-A)-Sdogan-Fine-EffOra) as EndTimeBlock, 
((02)-Utente) as Users, ((06-A)-Blocco-In-Data)*1 as DateBlockIn, 
((07)-Tipo di trasporto)*1 as DoganaTax1, 
((09-A)-Controllo conferma)*1 as DoganaTax2,
from (Sheet1$);

rs.Open strsql, cn, adOpenStatic, adLockReadOnly, adCmdText
rs.MoveFirst
dbSh.Range("A2").CopyFromRecordset rs

this is the 2th test, I updated code (I change (data/time_Field) as customName to (data/time_Field)*1 as customName.
the update show me all date fields like as data/time the qry run on 00:00:44:1244

cn.Open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & WsFrom.FullName & "; Extended Properties=""Excel 8.0;HDR=Yes;"";"

SELECT '1.1' as IdKpi, ((06)-Data creazione)*1 as DateCreation,  '' as Divisione, 
((01-A)-Ordine d'acquisto) as Orders, 
switch(((07)D-Modalità Trasp) = 'AOG','AOG',
((07)D-Modalità Trasp) <> 'AOG','STD') as Trasporto,
((07)-Fine carico att)*1 as StartDateSap, 
((07)-Ora attfine car) as StartTimeSap, 
((01-A)-Data di reg)*1 as EndDateSap, ((01-A)-Ora di acquisizione) as EndTimeSap, 
((07)-Inizio trasp att)*1 as StartDateBlock, 
((07)-Ora attinizio trasp) as StartTimeBlock, 
((07)-Data FINE Sdoganamento)*1 as EndDateBlock, 
((07-A)-Sdogan-Fine-EffOra) as EndTimeBlock, 
((02)-Utente) as Users, ((06-A)-Blocco-In-Data)*1 as DateBlockIn, 
((07)-Tipo di trasporto)*1 as DoganaTax1, 
((09-A)-Controllo conferma)*1 as DoganaTax2,
from (Sheet1$);

rs.Open strsql, cn, adOpenStatic, adLockReadOnly, adCmdText
rs.MoveFirst
dbSh.Range("A2").CopyFromRecordset rs

So, my workaround work fine, for me is slow and I’m not sure that is a good code, there are a better way?

8 – Image Alt and Title fields aren’t migrated

I’m in the process of D7 to D8 migration, I generated config files using drush and running individual configuration based on my needs. When I run upgrade_d7_file.yml all my images are migrated but ALT and Title fields are not migrated.

I am kind of stuck and I need help.

This is the content of the upgrade_d7_file.yml file.

langcode: en
status: true
dependencies: {  }
id: upgrade_d7_file
class: DrupalmigratePluginMigration
field_plugin_method: null
cck_plugin_method: null
migration_tags:
  - 'Drupal 7'
  - Content
migration_group: migrate_drupal_7
label: 'Public files'
source:
  plugin: d7_file
  scheme: public
  constants:
    source_base_path: 'http://127.0.0.1/d7/'
process:
  fid:
    -
      plugin: get
      source: fid
  filename:
    -
      plugin: get
      source: filename
  source_full_path:
    -
      plugin: concat
      delimiter: /
      source:
        - constants/source_base_path
        - filepath
    -
      plugin: urlencode
  uri:
    -
      plugin: file_copy
      source:
        - '@source_full_path'
        - uri
  filemime:
    -
      plugin: get
      source: filemime
  status:
    -
      plugin: get
      source: status
  created:
    -
      plugin: get
      source: timestamp
  changed:
    -
      plugin: get
      source: timestamp
  uid:
    -
      plugin: get
      source: uid
destination:
  plugin: 'entity:file'
migration_dependencies:
  required: {  }
  optional: {  }

gt.geometric topology – Transverse invariant measures to vector fields

Apologies if this is a naive question.

Given a smooth, non-vanishing vector field on a compact manifold, when does the 1-dimensional foliation given by its integral curves admit a transverse invariant measure?

I’ve seen examples of higher-dimensional foliations not admitting transverse invariant measures, but I’d imagine the same question is much easier to address one way of the other in the one-dimensional case.