XML to HTML table format help

I’m querying SQL server using nintex sql action and trying to display result as a Table. My query works fine to retrieve XML PATH, values retrieved are in one line. From there I’m trying to display a HTML table.

Query info XML PATH is : (datatableinfo)–(< row >username< PONum>130254< /PONum>P< /ApprovalStatus>< OrderDate>2020-05-29username</ EntryPerson>136187< ApprovalStatus >P2021-02-18)

Usind calc value to display table,replacing above info in datatableinfo.

–‘< table class=”dataTable”>EntryPersonPoNumApprovalStatusOrderDate’+replace(replace(replace(replace(datatableinfo,”, ”),'</(?!td|tr)(a-zA-Z)+><(?!td|tr)(a-zA-Z)+>’,”), ”, ”,”, ”),”)+”

My data table is cutoff after PoNum as shown below

table cutoff

date format – Postgresql use to_date only for year

In PostgreSQL want to transform a column (lets name it columnname) with a character varying type that contains only 4 digit years (e.g. 1911) to date format. This is my code:

alter table tablename
alter column columnname type date using to_date(columnname,'YYYY');

However my output has the format 1911-01-01. I am aware that I could just extract the year from this format again but is there a way to convert the year to date in one step without -01-01 ?

terminal – How to convert file format of massive image

Question: How can I convert a very large ppm file into a png on MacOS. More details and problems I have encountered below.

Brief overview

I have a massive ppm image on my computer. The file is ~70 GB and I need to convert it to a png which would make it ~100 MB. I have cleared up enough space (>70 GB) on my machine to complete the conversion but am having some issues.

Here is what I tried

Open image in preview and export to png
Preview refuses to show the image and instead just shows a black square. When I try to export it tells me that the exported file will be zero bytes. So… no dice.

Use ImageMagick to convert the file from terminal
This actually runs and tries to convert the file, but problems arise after about a minute of computation. First, my computer freezes then after a minute or two restarts because of a kernel panic.

magento2 – how to change address information format in invoice, shipment and credit memo?

I want to change the address information format in shipment, invoice, and credit memo. Right now the format is Magento address information format like this

enter image description here

I want to display the area and subdistrict. I tried to check the core file. And for displaying the account and order and address information is bundled in this line <?= $block->getChildHtml('order_info') ?>. I find out about the parent class of this block to check the getChildHtml but I have not found the root class to bundle all those information. anyone knows how Magento bundle all of this information? or is there another way to change this address information format?

hard drive – SSD quick format data recovery possible?

today I was doing some tests with two SSDs, my question was how to safely delete SSDs, that no data can be recovered. The first test was a quick format in Windows. After that I run two recovery programs, Recuva and Testdisk. None of the two tools were able to recover any files. Both SSDs were connected via USB adapter (Samsung SSD and SandDisk SSD).

I was surprised by that as usually with normal HDDs its possible to recover data. Does this mean, that a quick format of SSDs is enough to safely delete them?

Andy

enter image description here

enter image description here

enter image description here

enter image description here

c – Simple library for an undocumented archive format

I’m writing a little library for some undocumented file formats. The original program uses a path string to find files in an archive and this function tries to do the same.

The archive contains a magic string, an offset into the file list, the data in the files and the file list itself. A entry in the filelist consists of a path (256 bytes long, 0-padded) and three numbers, the second one being the offset from the archive start to the entry file. The entries are sorted alphabetically respecting case; here are some mockup paths to demonstrate the ordering:

Entry/Graphics/Sprite.cgf
Entry/Sound/Ding.wav
Quit/Graphics/exit.cgf
_RAW8123

Here are the relevant utility functions and defines. These are defined in Utils.h and Utils.c, I’ve put them here together for context.

#define BYTESZE sizeof(char)

typedef unsigned int uint;
typedef unsigned char byte;

uint readU4L(FILE* file) {
    byte buf(4);
    fread(buf, BYTESZE, 4, file);
    return buf(3) << 24 | buf(2) << 16 | buf(1) << 8 | buf(0);
}

Finally, here’s the “library”:

// ====== BIGfile.h
#define BIG_MAGIC_LEN 7

#define BIG_SEEK_SUCC 1
#define BIG_SEEK_FAIL 0

typedef struct BIGFile {
    char magic(BIG_MAGIC_LEN);
    uint offset;
    FILE* read;

} BIGFile;

BIGFile* load_BIGFile(char* fpath);

int seekToEntry(BIGFile* bigfile, char* path);

// ====== BIGFile.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "Utils.h"
#include "BIGFile.h"

BIGFile* load_BIGFile(char* fpath) {
    BIGFile* bigfile = malloc(sizeof(BIGFile));

    fopen_s(&(bigfile->read), fpath, "rb");

    if (!bigfile->read) {
        printf("Can't open file.n");
        return 0;
    }

    fread(bigfile->magic, BYTESZE, BIG_MAGIC_LEN, bigfile->read);
    bigfile->offset = readU4L(bigfile->read);
    return bigfile;
}

int seekToEntry(BIGFile* bigfile, char* path) {

    fseek(bigfile->read, bigfile->offset, SEEK_SET);
    
    byte buf(256);

    int pos = 0;

    // while not EOF, read string part
    while (fread(buf, BYTESZE, 256, bigfile->read)) {
        
        // seek over entry data
        fseek(bigfile->read, 12, SEEK_CUR);
        
        // loop until given path != read path
        while (path(pos)==buf(pos)) {
            pos++;

            // path has ended, so buf == path
            if (!path(pos)) {

                // seek back into entry data
                fseek(bigfile->read, -8, SEEK_CUR);

                // read unsigned little endian 4-byte int
                uint res = readU4L(bigfile->read);

                // seek there and return success
                fseek(bigfile->read, res, SEEK_SET);
                //printf("found at %dn", res);
                return BIG_SEEK_SUCC;
            }
        }
        // path char is smaller than buf char
        // we seeked past where the entry could bem return failure
        if (path(pos)<buf(pos)) {
            return BIG_SEEK_FAIL;
        }
    }
    // EOF, return failure
    return BIG_SEEK_FAIL;
}

I’d like some feedback on general style, as well as on the seekToEntry function, perhaps this can be improved somehow? Thanks in advance!

Format of codes

For example, in .wl file, I typed a symbol like this,
enter image description here

However, When I reopen the file, it becomes like this.enter image description here
How can I keep expression of the form of first picture in .wl file?

c++ – How can I create a custom 3D model format and implement it with OpenGL?

I want to create a 3D model format which would be easy for me to use and implement it into my game using C++

If it may be necessary, I use Visual Studio Code and Manjaro KDE Linux.

as requested by @DMGregory:

format in (x, y, z)

    #corners
    #the numbers are the identification number so all this mess is organised
    v 0 1.000000,-1.000000,1.000000
    v 1 1.000000,-1.000000,-1.000000
    v 2 -1.000000-1.000000,1.000000
    v 3 -1.000000,-1.000000,-1.000000
    v 4 1.000000,1.000000,1.000000
    v 5 1.000000,1.000000,-1.000000
    v 6 -1.000000,1.000000,1.000000
    v 7 -1.000000,1.000000,-1.000000
    #edges displayed in two corners like (x, y, z), (x, y, z)
    vt 0, 4
    ...
    #faces displayed in three corners like (x, y, z), (x, y, z), (x, y, z)
    f 0, 4, 6
    ...

for the textures i’m thinking about having an identifier face and having an identifier section n the texture so the engine will unwrap correctly

c++ – how can i go about creating a custom 3d model format and implement it to opengl

i basically want to create a 3d model format which would be easy for me to use and implement it into the game using C++

if it may be necessary i use visual studio code and manjaro kde linux.

i tried searching on google and i didn’t find anything. like nothing at all. so i hope someone here has a good solution that’s easy for me.

i also need help with another problem: https://gamedev.net/forums/topic/709325-how-to-start-coding-opengl-games/

excel – Formula to check if content of the cell is matching a format, regex?

I have to check if the content of a cell matchs with a specific format.

If it is the case, then I have to put Yes else No in the Result column.

Format is the following one : REFXXXX(,REFXXXX,...).

Content into bracket is optional and X should be a sequence of number (minimum 8, maximum 12).

Data example

Reference                              | Result
REF12324567                            | Yes
REF1                                   | No
                                       | No
Some text                              | No
REF1234567,REF789654123,REF741258963   | Yes

With a regex, it can be REF(d{8,12})((,REF(d{8,12}))*)

However I don’t know if it is possible to use a regex as Excel formula.

Can you please explain me how to do?

Thank you, Regards