I am developing with ag-grid 26.2.0 version(react).
And making a function Excel Export.
When using gridApi.exportDataAsExcel(parameters) is there a value that should not be included in the parameter sheetName?
As a result of my testing, an error occurred in the downloaded file when the following characters were inserted into the sheet. String that causes an error: []<>&"/\*:?
gridRef.current.api.exportDataAsExcel({
onlySelected : selRows.length > 0,
sheetName : `Test & my sheetName`,
fileName : `ExportedData_.xlsx`,
author : 'v1.0'
});
Image when downloaded in the form above:
I am trying to copy a tutorial for a Wordle solving bot but its just not going well. whenever I try to run a test on the code it doesn't work at certain points, I'll either get 'Uncaught SyntaxError: Unexpected identifier'. I'm doing this on UIlicious.
Here's what I've got so far:
I.goTo("https://www.powerlanguage.co.uk/wordle/")
I.click("reject")
I.see("Guess the Wordle")
I.click('/html/body', 40, 80)
let guessWord = null
for(Let r=0 ; r<6 ; ++r) {
guessWord = solver.suggestWord(gameState)
I.type(guessWord);
I.pressEnter()
I.wait(2)
}
let rowList = document.querySelector("game-app").shadowRoot. //
querySelector("game-theme-manager"). //
querySelector("#board").querySelectorAll("game-row");
you are probably referring to the article I wrote here : https://uilicious.com/blog/automate-wordle-via-uilicious/
This test script, is designed specifically to use uilicious.com, so you will need to edit and run it through the platform.
You can do so via the snippet here : https://snippet.uilicious.com/test/public/N5qZKraAaBsAgFuSN8wxCL
If you have syntax error there, do let me know with a snippet link - and I will try to help you respectively.
Also the snippet you provided so far, excludes the "solver" class which was initialised much further down.
I am currently developing a backup manager for Hyper-V using PowerShell.
I ran into problems when starting an export job like this:
$job = (export-vm -name "Windows 10" -path F:\VM_Backup\ -asjob)
Now when querying the progress of the job I realized that two objects are inside my Progress property:
> $job.progress
ActivityId : 0
ParentActivityId : -1
Activity : Export wird ausgeführt
StatusDescription : Gelöscht
CurrentOperation :
PercentComplete : 1
SecondsRemaining : -1
RecordType : Processing
ActivityId : 0
ParentActivityId : -1
Activity : Export wird ausgeführt
StatusDescription : Gelöscht
CurrentOperation :
PercentComplete : 37
SecondsRemaining : -1
RecordType : Processing
While the second progress update makes real progress (increasing percentage), the first one always stays like above.
I have never seen this behavior before and that really doesn't make any sense to me. How do I (programmatically) select the "right" job?
By design, the .Progress property collects all progress messages written by the job - it doesn't just reflect the latest status.
The most recently written message is the last one added to the .Progress collection, so you can use index [-1] to retrieve it.
$job.Progress[-1]
Note: For Start-Job-created jobs, you must access the .Progress property on the (one and only) child job instead: $job.ChildJobs[0].Progress[-1] - see about_Job_Details.
The following PowerShell script results in unexpected, and in my case unwanted, output to the console:
$table = New-Object System.Data.DataTable
$table.Columns.Add("NewFieldName")
Unexpected output:
AllowDBNull : True
AutoIncrement : False
AutoIncrementSeed : 0
AutoIncrementStep : 1
Caption : NewFieldName
ColumnName : NewFieldName
Prefix :
DataType : System.String
DateTimeMode : UnspecifiedLocal
DefaultValue :
Expression :
ExtendedProperties : {}
MaxLength : -1
Namespace :
Ordinal : 0
ReadOnly : False
Table : {}
Unique : False
ColumnMapping : Element
Site :
Container :
DesignMode : False
Expected output:
My questions are:
Why?
How can I prevent this output from going out to the console with the rest of my output?
TLDR: Add [void] like this
[void]$table.Columns.Add("NewFieldName")
Why? Because PowerShell tends to output the command's return value/object to the console (or whatever is receiving the output) by default.
How can I prevent this output from going out to the console with the rest of my output? Thank you to #PetSerAl for pointing out the solution of adding [void] to the left of the command. This casts the command's return type to a [void] which will not output to the console.
After #PetSerAl pointed me in the right direction I found these pages that helped clear things up:
Into the [void]
Gotcha #10 in PowerShell Gotchas
I like to understand why this perl module is always creating this error message:
In my script I do many things with the exif information of some pictures, that works fine.
Here my minimized script:
#! /usr/bin/perl
use strict;
use warnings;
use Image::EXIF;
my $foto = "test/DSC01340.JPG";
my $exif = Image::EXIF->new;
print "exif is defined\n";
$exif->file_name($foto);
print "got exif info\n";
And the output:
exif is defined
(null): maker note not supported
got exif info
So the line "$exif->file_name($foto);" is causing the message to stderr. I get this message with all my pictures, but why?
In this message:
How to disable the warning in module Image::EXIF
someone wants to simply supress this message.
But I would like to understand and preferable not create this message, not just redirecting it. My script works fine afterwards, I get all information I want, so what is the reason, this message is created in the first place. Do I introduce it the wrong way? Do my picture have EXIF information, which this module can not understand? There must be a reason why this error message is created.
Thank you in advance for any hint, on this matter.
Do my picture have EXIF information, which this module can not understand?
Well, that's what the message says, so I presume so.
Looking into the source, the module recognises the maker notes of many makers, so it's more specifically one of the following:
It's information in a maker-specific format the module doesn't recognise, or
No manufacturer tag was encountered before the maker note tag to indicate the format of the maker note field.
But I would like to understand and preferable not create this message
Add support for that maker's maker notes to Image::EXIF,
Add a configuration option to Image::EXIF to silence this warning, or
remove the maker notes from your image.
Some relevant code:
struct makerfun makers[] = {
{ 0, "unknown", NULL, NULL }, /* default value */
{ EXIF_MKR_CANON, "canon", canon_prop, canon_ifd },
{ EXIF_MKR_OLYMPUS, "olympus", olympus_prop, olympus_ifd },
{ EXIF_MKR_FUJI, "fujifilm", fuji_prop, fuji_ifd },
{ EXIF_MKR_NIKON, "nikon", nikon_prop, nikon_ifd },
{ EXIF_MKR_CASIO, "casio", NULL, casio_ifd },
{ EXIF_MKR_MINOLTA, "minolta", minolta_prop, minolta_ifd },
{ EXIF_MKR_SANYO, "sanyo", sanyo_prop, sanyo_ifd },
{ EXIF_MKR_ASAHI, "asahi", asahi_prop, asahi_ifd },
{ EXIF_MKR_PENTAX, "pentax", asahi_prop, asahi_ifd },
{ EXIF_MKR_LEICA, "leica", leica_prop, leica_ifd },
{ EXIF_MKR_PANASONIC, "panasonic", panasonic_prop, panasonic_ifd },
{ EXIF_MKR_SIGMA, "sigma", sigma_prop, sigma_ifd },
{ EXIF_MKR_UNKNOWN, "unknown", NULL, NULL },
};
...
/*
* Try to process maker note IFDs using the function
* specified for the maker.
*
* XXX Note that for this to work right, we have to see
* the manufacturer tag first to figure out makerifd().
*/
if (makers[t->mkrval].ifdfun) {
if (!offsanity(prop, 1, dir))
dir->next =
makers[t->mkrval].ifdfun(prop->value, md);
} else
exifwarn("maker note not supported");
Images from digital cameras include some proprietary information whose format isn't specified in the Exif standards.
Image::ExifTool does a good job at interpreting a lot of maker notes. Other modules may just skip over the parts they don't understand, so it's probably a warning to not that it found the maker note, but doesn't know how to interpret it.