My code
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i=0,totalNums,totalNum,j=0;
size_t count;
float numbers[20][100];
char *line = malloc(100);
FILE *myFile;
myFile = fopen("vel.txt", "r");
if (myFile == NULL)
{
printf("Error Reading File\n");
exit (0);
}
while(getline(&line, &count, myFile)!=-1) {
for (; count > 0; count--, j++)
sscanf(line, "%f", &numbers[i][j]);
i++;
}
totalNums = 100;
totalNum = 20;
for (i=0 ; i<totalNums ; i++) {
for (j=0 ; j<totalNum ; j++) {
printf("\n%f", numbers[i][j]);
}
}
fclose(myFile);
return 0;
}
My goal is to read 2d array.
My vel.txt
2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0
2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0
2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0 2900.0
3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0
3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0
3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0
3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0 3600.0
4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0
4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0 4700.0
4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 4900.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5100.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0 5400.0
I have compiled with gcc my code but I got :
milenko#milenko-HP-Compaq-6830s:~$ ./n1
Segmentation fault (core dumped)
Why?
Some bugs:
float numbers[20][100]; is a 20 x 100 array. This:
totalNums = 100;
totalNum = 20;
for (i=0 ; i<totalNums ; i++) {
for (j=0 ; j<totalNum ; j++) {
printf("\n%f", numbers[i][j]);
}
}
iterates over a 100 x 20 array. The use of better variable names than "totalNums" (for example something like max_x and max_y) would likely have eliminated this bug.
count is uninitialized before use. Enable compiler warnings.
You don't free() the variable line anywhere. Actually there is no reason to use dynamic allocation here at all.
fix like this
size_t count=0;
float numbers[20][100];
char *line = NULL;
...
while(i < 20 && getline(&line, &count, myFile)!=-1) {
int len = 0, pos = 0;
j = 0;
while(j < 100 && 1 == sscanf(line + pos, "%f%n", &numbers[i][j++], &len))
pos += len;
i++;
}
free(line);
totalNums = i;
totalNum = 100;//j;
The following code:
while(getline(&line, &count, myFile)!=-1) {
for (; count > 0; count--, j++)
sscanf(line, "%f", &numbers[i][j]);
i++;
}
Will put in count the** number of bytes read**. But in next line, you consider it as the number of numbers to read... And on number is at least composed of 2 bytes (one per character + one for the space).
You should try to read the line with some function like strtok. Warning, this function is not so trivial to use, read carrefully the documentation.
Your count is not initialized before calling getline, try this:
size_t count = 100;
char *line = malloc(count);
while(getline(&line, &count, myFile)!=-1) { ... }
Related
Hi I am a beginner to tailwind css and all i want is a problem that has been occuring to me I want to create a scrollable view with the title headings staying in place and the data below the heading in the table to be scrollable but when I use flex flex-col
the scroll seems to be working but the data seems to contract but as soon as I remove flex flex-col
it comes back to the position but the scroll doesn't work. Can you please say me how do I do it 🙏. I want the title to stay in place but the data should be scrollable.Please note that there is a search bar on top of this table.I want the table to be static also and be seen so top-0 didn't work for me. This is my code 👇.
<div className="mt-5 overflow-x-auto rounded-lg">
<table className=" h-80 w-full text-left text-sm text-gray-400">
<thead className="bg-[#292A33] text-xs uppercase">
<tr className="">
<th className=" px-6 py-3">
nft Name
</th>
<th className=" px-6 py-3">
nft Status
</th>
<th className=" px-6 py-3">
nft Size
</th>
<th className=" px-6 py-3">
nft Type
</th>
<th className=" px-6 py-3">
nft Origin
</th>
<th className=" px-6 py-3">
nft Image
</th>
<th className=" px-6 py-3">
Total Price
</th>
</tr>
</thead>
<tbody className="overflow-y-scroll">
{nftinfo.map((nft) => (
<tr className=" hover:bg-zinc-700 ">
<th scope="row" className="px-6 py-4 font-medium text-white ">
</th>
<td className="px-6 py-4">{nft.status}</td>
<td className="px-6 py-4">{nft.size}</td>
<td className="px-6 py-4">{nft.type}</td>
<td className="px-6 py-4">{nft.origin}</td>
<td className="px-6 py-4">{nft.image}</td>
<td
className={`px-6 py-4 ${
nft.totalprice > 5000
? ` text-green-500`
: `text-red-500`
}`}
>
$ {nft.totalprice}
</td>
</tr>
))}
</tbody>
</table>
</div>
You can use the below table to I have created, just make sure to replace class to className and do changes accordingly.
Try to watch the below code with full page as it is for desktop screen and do changes according to mobile view if you want.
<script src="https://cdn.tailwindcss.com"></script>
<div class="container m-auto p-4">
<h1 class="mb-8 text-center text-3xl font-bold">Scrollable Table Fixed Height</h1>
<table class="w-full border-[1px] border-black text-left">
<thead class="flex w-full bg-[#292A33] text-xs text-gray-400">
<tr class="flex w-full hover:bg-zinc-700">
<th class="w-1/4 p-4">NFT NAME</th>
<th class="w-1/4 p-4">NFT STATUS</th>
<th class="w-1/4 p-4">NFT SIZE</th>
<th class="w-1/4 p-4">NFT TYPE</th>
<th class="w-1/4 p-4">NFT ORIGIN</th>
<th class="w-1/4 p-4">NFT IMAGE</th>
<th class="w-1/4 p-4">TOTAL PRICE</th>
</tr>
</thead>
<!-- Remove the nasty inline CSS fixed height on production and replace it with a CSS class — this is just for demonstration purposes! -->
<tbody class="flex w-full flex-col items-center justify-between overflow-y-scroll bg-white text-gray-400" style="height: 60vh;">
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
<tr class="flex w-full hover:bg-zinc-700">
<td class="w-1/4 p-4">nft.name</td>
<td class="w-1/4 p-4">nft.status</td>
<td class="w-1/4 p-4">nft.size</td>
<td class="w-1/4 p-4">nft.type</td>
<td class="w-1/4 p-4">nft.origin</td>
<td class="w-1/4 p-4">nft.image</td>
<td class="w-1/4 p-4">total price</td>
</tr>
</tbody>
</table>
</div>
Can someone please provide some tip how to solve this issue with my script?
Script description:
Its script which creates HTML signature from GUI created in WPF.
Problem description:
First run script with WPF creates folder with right name, copy images and create HTML with right name but HTML file is blank only with images. After second run of script the folder, html file and images are filled right but with information from first run.
I guess it has something with $Global variables, because this issue is detected after i add in some $Global vars.
Thank you for any help.
PS1. script:
Add-Type -Name Window -Namespace Console -MemberDefinition
[DllImport("Kernel32.dll")]
public static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);'
[Console.Window]::ShowWindow([Console.Window]::GetConsoleWindow(), 0)
#-------------------------------------------------------------#
#----Initial Declarations-------------------------------------#
#-------------------------------------------------------------#
Add-Type -AssemblyName PresentationCore, PresentationFramework
$Xaml = #"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="647" Height="630" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:src="clr-namespace:ListBoxStyle">
<Window.Resources>
<Style x:Key="_ListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border Name="_Border" Padding="2" SnapsToDevicePixels="true">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="_Border" Property="Background" Value="#18509c"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Name="GTX_Podpis" Margin="-2,-1,2,1" MinWidth="1500" MinHeight="1000">
<Image HorizontalAlignment="Left" Height="112" VerticalAlignment="Top" Width="137" Margin="10.84375,11,0,0" Name="Gumotex" Source="\\gtxdc1\Skupiny\Posta podpisy\Husařík_Jakub\logo_gumotex.png"/>
<TextBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" VerticalAlignment="Top" Height="30" Width="120" TextWrapping="Wrap" Margin="185,24,0,0" Name="TitulPred" Tag="TitulPred" Text="" ToolTip="TitulPřed"/>
<TextBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" VerticalAlignment="Top" Height="30" Width="120" TextWrapping="Wrap" Margin="321,24,0,0" Name="TitulZa" Tag="TitulZa" Text="" ToolTip="TitulZa"/>
<TextBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="187,76,0,0" Name="Jmeno" ToolTip="Jméno" Text="" Tag="Jmeno"/>
<TextBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="187,133,0,0" Name="Prijmeni" Tag="Prijmeni" Text="" ToolTip="Přijmeni"/>
<TextBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="189,183,0,0" Name="Funkce" Tag="Funkce" Text="" ToolTip="Funkce"/>
<TextBox HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="189,235,0,0" Name="Email" BorderBrush="#18509c" BorderThickness="2"/>
<TextBox HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="190,290,0,0" Name="Mobil" BorderBrush="#18509c" BorderThickness="2"/>
<TextBox HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="181" TextWrapping="Wrap" Margin="189,349,0,0" Name="PevnaLinka" BorderBrush="#18509c" BorderThickness="2"/>
<ListBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" Height="88" VerticalAlignment="Top" Width="164" Margin="7,75,0,0" Name="Divize" Tag="Divize" ToolTip="Divize" Foreground="#000000" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ItemContainerStyle="{DynamicResource _ListBoxItemStyle}"
>
<ListBoxItem Content="DIVIZE SERVICE"/>
<ListBoxItem Content="DIVIZE COATING"/>
<ListBoxItem Content="AUTOMOTIVE DIVISION"/>
<ListBoxItem Content="COATING DIVISION"/>
</ListBox>
<ListBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" Height="304" VerticalAlignment="Top" Width="243" Margin="387,75,0,0" Name="Zavod" Tag="Závod" ToolTip="Závod" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ItemContainerStyle="{DynamicResource _ListBoxItemStyle}"
>
<ListBoxItem Content="PRÁZDNÉ"/>
<ListBoxItem Content="ZÁVOD BŘECLAV"/>
<ListBoxItem Content="ZÁVOD TŘEBÍČ"/>
<ListBoxItem Content="ZÁVOD JAROMĚŘ"/>
<ListBoxItem Content="ZÁVOD MYJAVA"/>
<ListBoxItem Content="ZÁVOD ROŽNOV"/>
<ListBoxItem Content="PRODUCTION PLANT BRECLAV"/>
<ListBoxItem Content="PRODUCTION PLANT TREBIC"/>
<ListBoxItem Content="PRODUCTION PLANT JAROMER"/>
<ListBoxItem Content="PRODUCTION PLANT MYJAVA"/>
<ListBoxItem Content="PRODUCTION PLANT ROZNOV"/>
<ListBoxItem Content="ENGINEERING DEPARTMENT BRECLAV"/>
<ListBoxItem Content="ENGINEERING DEPARTMENT TREBIC"/>
<ListBoxItem Content="ENGINEERING DEPARTMENT JAROMER"/>
<ListBoxItem Content="ENGINEERING DEPARTMENT MYJAVA"/>
<ListBoxItem Content="ENGINEERING DEPARTMENT ROZNOV"/>
</ListBox>
<ListBox HorizontalAlignment="Left" BorderBrush="#18509c" BorderThickness="2" Height="109" VerticalAlignment="Top" Width="164" Margin="7,184,0,0" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ItemContainerStyle="{DynamicResource _ListBoxItemStyle}" Name = "Adresa"
>
<ListBoxItem Content="BŘECLAV"/>
<ListBoxItem Content="TŘEBÍČ"/>
<ListBoxItem Content="JAROMĚŘ"/>
<ListBoxItem Content="MYJAVA"/>
<ListBoxItem Content="ROŽNOV"/>
</ListBox>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Adresa" Margin="9,164,0,0" Name="AdresaLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Divize" Margin="8,54,0,0" Name="DivizeLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="TitulPred" Margin="184,5,0,0" Name="TitulPredLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Jméno" Margin="188,56,0,0" Name="JmenoLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="TitulZa" Margin="321,5,0,0" Name="TitulZaLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Přijmení" Margin="187,112,0,0" Name="PrijmeniLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Funkce" Margin="188,164,0,0" Name="FunkceLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Závod" Margin="388,55,0,0" Name="ZavodLabel"/>
<Button Content="Vytvoř podpis" HorizontalAlignment="Left" VerticalAlignment="Top" Width="224" Margin="6,527,0,0" Name="VytvorPodpisButton" Background="#18509c" Foreground="#efefef" Height="55" FontSize="15"/>
<Button Content="Zavřít" HorizontalAlignment="Left" VerticalAlignment="Top" Width="224" Margin="403,529,0,0" Height="55" Name="ZavritButton" Background="#18509c" Foreground="#ffffff" FontSize="15"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Email" Margin="189,214,0,0" Name="EmalLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Mobil" Margin="190,267,0,0" Name="MobilLabel"/>
<Label HorizontalAlignment="Left" VerticalAlignment="Top" Content="Pevná linka" Margin="189,327,0,0" Name="PevnaLinkaLabel"/>
</Grid>
</Window>
"#
#-------------------------------------------------------------#
#----Global variables-----------------------------------#
#-------------------------------------------------------------#
$Global:ZavodHTML
$Global:AdresaInHTML
# Břeclav
$Global:VarAdresaBreclavUlice = "Mládežnická 3062/3a"
$Global:VarAdresaBreclavMesto = "690 02 Břeclav"
$Global:VarAdresaBreclavStat = "Česká republika"
$Global:VarAdresaBreclav
# Jaroměř
$Global:VarAdresaJaromerUlice = "V Lužinách 113, Pražské Předměstí"
$Global:VarAdresaJaromerMesto = "551 01 Jaroměř"
$Global:VarAdresaJaromerStat = "Česká republika"
$Global:VarAdresaJaromer
# Třebíč
$Global:arAdresaTrebicUlice = "Žďárského 184"
$Global:VarAdresaTrebicvMesto = "674 01 Kožichovice"
$Global:VarAdresaTrebicvStat = "Česká republika"
$Global:VarAdresaTrebic
# Myjava
$Global:VarAdresaMyjavaUlice = "Prostredná 1227/9"
$Global:VarAdresaMyjavavMesto = "907 01 Myjava"
$Global:VarAdresaMyjavaStat = "Slovenská republika"
$Global:VarAdresaMyjava
# Rožnov
$Global:VarAdresaRoznovUlice = "Televizní 2614"
$Global:VarAdresaRoznovMesto = "756 61 Rožnov pod Radhoštěm"
$Global:VarAdresaRoznovStat = "Česká republika"
$Global:VarAdresaRoznov
# Právní odstavce
#...........................................................................................................................................................................
# Český odstavec
$HTMLTextPravoS = #"
Tato zpráva má pouze informativní charakter. Obsah této zprávy obchodní společnost GUMOTEX, akciová společnost, ani žádnou jinou osobu, která s ní tvoří koncern (dále jen "GUMOTEX"), nezavazuje. GUMOTEX nemá v úmyslu touto zprávou jakoukoliv smlouvu uzavřít, přijmout nabídku nebo uzavření jakékoliv smlouvy potvrdit a zpráva ani nezakládá jeho předsmluvní odpovědnost. Kterákoliv smlouva pro GUMOTEX závazná musí mít výhradně tištěnou písemnou formu, náležitosti dle příslušných právních předpisů a musí být podepsána osobou, která je za GUMOTEX oprávněna jednat nebo GUMOTEX zastupovat. Tato zpráva může obsahovat důvěrné informace. Pokud nejste jejím určeným příjemcem, jakékoliv její zveřejnění, kopírování, rozesílání nebo jiné užití jejího obsahu je přísně zakázáno. Nejste-li určeným příjemcem zprávy, informujte v takovém případě prosím ihned jejího odesílatele a poté zprávu, včetně případných příloh, bezodkladně z Vašeho zařízení smažte.
"#
# Anglický odstavec
$HTMLTextPravoENS =
#"
This e-mail message is intended only for informational purposes. The content of this message is not binding for neither the company GUMOTEX, akciová společnost, nor any other entity forming the GUMOTEX Group (hereinafter „GUMOTEX“). GUMOTEX does not intend to conclude any agreements, to accept any offers or to confirm the conclusion of any contracts via this message. This message shall not give rise to GUMOTEX precontractual liability. Any agreement binding GUMOTEX shall be in a written form and printed, shall comply with all statutory requirements and shall be signed by a person authorized to act on behalf of or for GUMOTEX. This e-mail message may contain confidential information. If you are not the intended recipient of this message, any disclosure, copying, distribution or use of its contents is strictly prohibited. Please notify the sender immediately and delete the message (including any attachments) from your system.
"#
#...........................................................................................................................................................................
#-------------------------------------------------------------#
#----HTML-----------------------------------------------------#
#-------------------------------------------------------------#
$HTML = #"
<!DOCTYPE html>
<html lang="cs">
<head>
<title>Mail signature</title>
<meta charset="Windows-1250">
<style>
a {
text-decoration: none;
color: #000000;
}
a:hover {
color: #20549A;
}
a:active {
color: #20549A;
</style>
</head>
<body>
<table>
<tr>
<td style="font-family: arial; font-weight: bold; color: #000000; font-size: 16px;">$($TitulPred.Text+$Jmeno.Text+" "+$Prijmeni.Text + $TitulZa.Text)</td>
</tr>
<td style="font-family: arial;font-size: 1px;"> </td>
</tr>
<tr>
<td style="font-family: arial; color: #434442; font-size: 14px;">$($Funkce.Text)</td>
</tr>
$Global:ZavodHTML
<tr>
<td style="font-family: arial; color: #20549A; font-weight: bold; font-size: 14px;">$(($Divize.SelectedItem.Content))</td>
</tr>
</tr>
<td style="font-family: arial;font-size: 10px;"> </td>
</tr>
<tr>
<td><img src="logo_gumotex.png" alt="GUMOTEX"></td>
</tr>
<td style="font-family: arial;font-size: 8px;"> </td>
</tr>
</tr>
</table>
<table>
<tr>
<td><img src="icon_envelope_2.png" alt="Email"></td>
<td style="vertical-align: middle;font-family: arial; color: #000000; font-size: 12px;"> $($Email.Text)</td>
</tr>
<!-- Zde bude promenna pro logiku telefonniho a mobilniho cisla -->
<tr>
<td><img src="icon_phone_2.png" alt="$AliasS"></td>
<td style="vertical-align: middle;font-family: arial; color: #000000; font-size: 12px;"> +$FullTelefonS | +$MobilS</td>
</tr>
</table>
$Global:AdresaInHTML
<table>
<tr>
<td><img src="icon_web_2.png" alt="Web"></td>
<td><img src="icon_fb_2.png" alt="Facebook"></td>
<td><img src="icon_ln_2.png" alt="Linkedin"></td>
<td><img src="icon_yt_2.png" alt="YouTube"></td>
</tr>
</table>
<span style="font-family: arial; color: #8f8f8f; font-size: 9px;">
<table>
</tr>
<td style="font-family: arial;font-size: 4px;"> </td>
</tr>
</table>
$TextPravoS
<table>
</tr>
<td style="font-family: arial;font-size: 4px;"> </td>
</tr>
</table>
$TextPravoENS
<table>
</tr>
<td style="font-family: arial;font-size: 1px;"> </td>
</tr>
</table>
</span>
</body>
</html>
"#
#-------------------------------------------------------------#
#----Control Event Handlers-----------------------------------#
#-------------------------------------------------------------#
#Write your code here
$Window = [Windows.Markup.XamlReader]::Parse($Xaml)
[xml]$xml = $Xaml
$xml.SelectNodes("//*[#Name]") | ForEach-Object { Set-Variable -Name $_.Name -Value $Window.FindName($_.Name) }
#-------------------------------------------------------------#
#----Functions------------------------------------------------#
#-------------------------------------------------------------#
# Formátuje Mobil/Pevnou linku z formátu +420XXXXXXXXX na +420 XXX XXX XXX
<#
Function Format-Contact {
param (
[String]$FormatPevnaLinka,
[String]$FormatMobil
)
if (![String]::IsNullOrWhitespace($PevnaLinka.Text)) {
$HTMLFullTelefonS = $FormatPevnaLinka.Insert(4," ").Insert(8," ").Insert(12," ")
}
if (![String]::IsNullOrWhitespace($Mobil.Text)) {
$HTMLMobilS = $FormatMobil.Insert(4," ").Insert(8," ").Insert(12," ")
}
}
#>
function CreateFolder_forSignature {
$FolderName = $Jmeno.Text +"_"+ $Prijmeni.Text
If(!(Test-path -path "\\gtxdc1.gumotex.cz\Skupiny\posta podpisy\$FolderName"))
{
New-Item -ItemType Directory -Force -Path "\\gtxdc1.gumotex.cz\Skupiny\Posta podpisy\" -Name $FolderName
}
else {
[System.Windows.MessageBox]::Show("Složka $FolderName na síťovém disku:\\gtxdc1\skupiny\posta podpisy\ již existuje, pokud chcete vytvořit znovu tuto složku prosím smažte/přejmenujte/přesuňte stávající složku.")
}
}
function CopyImages_ToNewFolder {
$FolderName = $Jmeno.Text +"_"+ $Prijmeni.Text
Copy-Item -Path "\\gtxdc1\skupiny\posta podpisy\Obrazky\*" -Destination "\\gtxdc1\skupiny\posta podpisy\$FolderName" -Recurse
}
# Functions
# Funkce pro logiku Zavodu
function CreateZavod_toHTML {
<#if ($Zavod.SelectedItem.Content -eq "PRÁZDNÉ")
{
$Global:ZavodHTML = $null
}
else {#>
$Global:ZavodHTML = #"
<tr>
<td style="font-family: arial; color: #20549A; font-weight: bold; font-size: 14px;">$($Zavod.SelectedItem.Content)</td>
</tr>
"#
}
# Funkce pro logiku Adresy
function CreateAddress_ToHTML {
$VarUlice
$VarMesto
$VarStat
switch ($Adresa.SelectedItem.Content) {
"BŘECLAV" {
$VarUlice = $Global:VarAdresaBreclavUlice
$VarMesto = $Global:VarAdresaBreclavMesto
$VarStat = $Global:VarAdresaBreclavStat
}
"TŘEBÍČ" {
$VarUlice = $Global:VarAdresaTrebicUlice
$VarMesto = $Global:VarAdresaTrebicvMesto
$VarStat = $Global:VarAdresaTrebicvStat
}
"JAROMĚŘ" {
$VarUlice = $Global:VarAdresaJaromerUlice
$VarMesto = $Global:VarAdresaJaromerMesto
$VarStat = $Global:VarAdresaJaromerStat
}
"MYJAVA" {
$VarUlice = $Global:VarAdresaMyjavaUlice
$VarMesto = $Global:VarAdresaMyjavavMesto
$VarStat = $Global:VarAdresaMyjavaStat
}
"ROŽNOV" {
$VarUlice = $Global:VarAdresaRoznovUlice
$VarMesto = $Global:VarAdresaRoznovMesto
$VarStat = $Global:VarAdresaRoznovStaT
}
}
$Global:AdresaInHTML = #"
<table>
</tr>
<td style="font-family: arial;font-size: 4px;"> </td>
</tr>
<tr>
<td style="font-family: arial; color: #717270; font-size: 11px;">$VarUlice</td>
</tr>
<tr>
<td style="font-family: arial; color: #717270; font-size: 11px;">$VarMesto</td>
</tr>
<tr>
<td style="font-family: arial; color: #717270; font-size: 11px;">$VarStat</td>
</tr>
</tr>
<td style="font-family: arial;font-size: 10px;"> </td>
</tr>
</table>
"#
}
function CreateHTMLSignature {
$FolderName = $Jmeno.Text +"_"+ $Prijmeni.Text
$FileName = $Jmeno.Text +"_"+ $Prijmeni.Text + ".html"
New-Item -ItemType File -Path "\\gtxdc1\Skupiny\Posta podpisy\$FolderName\" -Name $FileName
Set-Content -Path "\\gtxdc1\Skupiny\Posta podpisy\$FolderName\$FileName" -Value $HTML
}
$ZavritButton.Add_Click({
$Window.Close()
})
$VytvorPodpisButton.Add_Click({
CreateFolder_forSignature
CopyImages_ToNewFolder
CreateAddress_ToHTML
CreateZavod_toHTML
CreateHTMLSignature
$Window.Close()
})
#endregion
#-------------------------------------------------------------#
#----Script Execution-----------------------------------------#
#-------------------------------------------------------------#
#Format-Contact -FormatPevnaLinka $PevnaLinka.Text -FormatMobil $Mobil.Text
$Window.ShowDialog()
solution founded: At beginning of script i put this line of code:Remove-Variable * -ErrorAction SilentlyContinue Which is solved the issue
I have just downloaded HTML purifier in order to clean my wysigyg editor inputs but it seems to be stripping out tables.
If I input this text:
<font face="Times New Roman" size="3">
</font><p style="margin: 0in 0in 0pt; line-height: 150%; mso-outline-level: 3;"><span style='color: black; line-height: 150%; font-family: "Arial","sans-serif"; font-size: 12pt; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'>Recruitment methods</span></p><font face="Times New Roman" size="3">
</font><table style="border: currentColor; border-image: none; border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0"><font face="Times New Roman" size="3">
</font><tbody><tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;"><font face="Times New Roman" size="3">
</font><td width="37" style="padding: 0in 5.4pt; border: 1pt solid windowtext; border-image: none; width: 27.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt;"><font face="Times New Roman" size="3">
</font><p align="center" style="margin: 0in 0in 0pt; text-align: center; line-height: normal;"><span style='font-family: "Arial","sans-serif"; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'><font size="3">No.</font></span></p><font face="Times New Roman" size="3">
</font></td><font face="Times New Roman" size="3">
</font><td width="180" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 134.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font><td width="210" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 157.5pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font><td width="211" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 2.2in; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font></tr><font face="Times New Roman" size="3">
</font><tr style="mso-yfti-irow: 1;"><font face="Times New Roman" size="3">
</font><td width="37" style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: rgb(0, 0, 0) windowtext windowtext; padding: 0in 5.4pt; border-image: none; width: 27.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"><font face="Times New Roman" size="3">
</font><p align="center" style="margin: 0in 0in 0pt; text-align: center; line-height: normal;"><span style='font-family: "Arial","sans-serif"; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'><font size="3">1</font></span></p><font face="Times New Roman" size="3">
</font></td><font face="Times New Roman" size="3">
</font><td width="180" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 134.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font><td width="210" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 157.5pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font><td width="211" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 2.2in; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td><font face="Times New Roman" size="3">
</font></tr><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font></tbody></table><font face="Times New Roman" size="3">
</font><p align="center" style="margin: 0in 0in 10pt; text-align: center;"><span style='line-height: 115%; font-family: "Arial","sans-serif"; font-size: 12pt; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'> </span></p><font face="Times New Roman" size="3">
</font><p style="margin: 0in 0in 10pt;"><font face="Times New Roman" size="3">
</font><br>
I get this output:
<font face="Times New Roman" size="3">
</font><p style="margin:0in 0in 0pt;line-height:150%;"><span style="color:#000000;line-height:150%;font-family:Arial, 'sans-serif';font-size:12pt;">Recruitment methods</span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p align="center" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">No.</font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p align="center" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Method</font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p align="center" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Strengths</font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p align="center" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Weaknesses</font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p align="center" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">1</font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><p style="margin:0in 0in 0pt;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Internal recruitment</font></span></p><font face="Times New Roman" size="3">
</font><p style="margin:0in 0in 0pt;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Promotion</font></span></p><font face="Times New Roman" size="3">
</font><p style="margin:0in 0in 0pt;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3">Lateral transfer</font></span></p><font face="Times New Roman" size="3">
</font><p style="margin:0in 0in 0pt;line-height:normal;"><span style="font-family:Arial, 'sans-serif';"><font size="3"> </font></span></p><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3"> etc...
My setup looks like this:
require_once 'purify/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML.Allowed', 'p,span[style|class],a[href|title],abbr[title],acronym[title],b,strong,blockquote[cite],code,em,i,iframe[src|width|height],img[alt|title|class|src|height|width],h1,h2,h3,h3,ol,ul,li,table[class|style],tr,td,hr');
$purifier = new HTMLPurifier($config);
I only added the HTML.Allowed line in order to try and specifically allow tables, but that didn't work. Does anyone have any idea why it is stripping out tables even though it shouldn't be?
Thanks
It is a bit odd - initially I thought maybe one of the <font> tags (an inline element) were surrounding a block-level element, thus forcing it to get stripped, and the error then cascading up from there, but after running the code through a basic (dumb) HTML formatter, it looks like they're all fairly self-contained.
But turning on Error Collection shows us what's going on. The trouble seems to be that despite being self-contained, HTML Purifier closes the <table> tag once it encounters the first <font>, it doesn't remove the <font> (as one might think):
Notice Line 7, Column 8: <table> started on line 6 auto-closed by <font>
Error Line 10, Column 8: style attribute on <tr> removed
Notice Line 11, Column 12: <tr> started on line 10 auto-closed by <font>
Notice Line 11, Column 12: <tbody> started on line 9 auto-closed by <font>
Warning Line 31, Column 8: Unnecessary </tr> tag removed
Error Line 34, Column 8: style attribute on <tr> removed
Notice Line 35, Column 12: <tr> started on line 34 auto-closed by <font>
Warning Line 55, Column 8: Unnecessary </tr> tag removed
Warning Line 59, Column 8: Unnecessary </tbody> tag removed
Warning Line 60, Column 4: Unnecessary </table> tag removed
Notice End of Document: <p> tag started on line 66 closed by end of document
Warning End of Document: Contents of <div> node reorganized to enforce its content model
That's the output of the demo if you select CollectErrors: Yes and plug in the following HTML:
<font face="Times New Roman" size="3">
</font>
<p style="margin: 0in 0in 0pt; line-height: 150%; mso-outline-level: 3;"><span style='color: black; line-height: 150%; font-family: "Arial","sans-serif"; font-size: 12pt; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'>Recruitment methods</span></p>
<font face="Times New Roman" size="3">
</font>
<table style="border: currentColor; border-image: none; border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0">
<font face="Times New Roman" size="3">
</font>
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<font face="Times New Roman" size="3">
</font>
<td width="37" style="padding: 0in 5.4pt; border: 1pt solid windowtext; border-image: none; width: 27.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt;">
<font face="Times New Roman" size="3">
</font>
<p align="center" style="margin: 0in 0in 0pt; text-align: center; line-height: normal;"><span style='font-family: "Arial","sans-serif"; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'><font size="3">No.</font></span></p>
<font face="Times New Roman" size="3">
</font>
</td>
<font face="Times New Roman" size="3">
</font>
<td width="180" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 134.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
<td width="210" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 157.5pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
<td width="211" style="border-width: 1pt 1pt 1pt 0px; border-style: solid solid solid none; border-color: windowtext windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; border-image: none; width: 2.2in; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
</tr>
<font face="Times New Roman" size="3">
</font>
<tr style="mso-yfti-irow: 1;">
<font face="Times New Roman" size="3">
</font>
<td width="37" style="border-width: 0px 1pt 1pt; border-style: none solid solid; border-color: rgb(0, 0, 0) windowtext windowtext; padding: 0in 5.4pt; border-image: none; width: 27.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;">
<font face="Times New Roman" size="3">
</font>
<p align="center" style="margin: 0in 0in 0pt; text-align: center; line-height: normal;"><span style='font-family: "Arial","sans-serif"; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'><font size="3">1</font></span></p>
<font face="Times New Roman" size="3">
</font>
</td>
<font face="Times New Roman" size="3">
</font>
<td width="180" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 134.95pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
<td width="210" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 157.5pt; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
<td width="211" style="border-width: 0px 1pt 1pt 0px; border-style: none solid solid none; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); padding: 0in 5.4pt; width: 2.2in; background-color: transparent; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt;"> </td>
<font face="Times New Roman" size="3">
</font>
</tr>
<font face="Times New Roman" size="3">
</font><font face="Times New Roman" size="3">
</font>
</tbody>
</table>
<font face="Times New Roman" size="3">
</font>
<p align="center" style="margin: 0in 0in 10pt; text-align: center;"><span style='line-height: 115%; font-family: "Arial","sans-serif"; font-size: 12pt; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi;'> </span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin: 0in 0in 10pt;"><font face="Times New Roman" size="3">
</font><br>
There's another thread on the HTML Purifier forum that might make this a bit more understandable. Symptoms were described like this:
When I try to purify this code:
<table>
<tr>
<td>
<li>fffff</li>
</td>
</tr>
</table>
I get:
<table>
<tr>
<td>
</td>
</tr>
</table>
fffff
And (my, heh) response back then:
I imagine what's happening is that HTML Purifier is detecting that <li> cannot be opened at that position - but rather than strip the <li> first, it auto-closes the other open tags at that point, resulting (initially) in:
<table>
<tr>
<td>
</td>
</tr>
</table>
<li>fffff</li>
</td>
</tr>
</table>
Then removing extraneous closing tags...
<table>
<tr>
<td>
</td>
</tr>
</table>
<li>fffff</li>
And then stripping the <li>, resulting in what is being observed:
<table>
<tr>
<td>
</td>
</tr>
</table>
fffff
You could try to switch the Lexer to DirectLex and see if that changes the behaviour, but I doubt it - you might be stuck with this behaviour. Give it a whirl, though.
var User = React.createClass({
render: function() {
console.log("User");
console.log(this.props);
return (
<div className="user">
<h2 className="userName">
{this.props.name}
</h2>
<img src={this.props.avatarHash} alt="" width="100" height="100" />
</div>
);
}
});
How can I append/mix HTML with properties?
What I've tried and failed:
<img src="http://foo.bar/{this.props.avatarHash}" alt="" width="100" height="100" />
<img src="http://foo.bar/"{this.props.avatarHash} alt="" width="100" height="100" />
You can use Template literals
<img
src={ `http://foo.bar/${ this.props.avatarHash }` }
alt=""
width="100"
height="100"
/>
or String concatenation
<img
src={ 'http://foo.bar/' + this.props.avatarHash }
alt=""
width="100"
height="100"
/>
i am working on wpf window that show list of items next each other with wrapping, i have tried to use WrapPanel in this way:
<Grid>
<ItemsControl>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Items>
<Button Content="01" Height="30" Width="70"/>
<Button Content="02" Height="35" Width="72"/>
<Button Content="03" Height="20" Width="74"/>
<Button Content="04" Height="25" Width="76"/>
<Button Content="05" Height="18" Width="78"/>
<Button Content="06" Height="50" Width="70"/>
<Button Content="07" Height="40" Width="72"/>
<Button Content="08" Height="55" Width="74"/>
<Button Content="09" Height="45" Width="76"/>
<Button Content="10" Height="25" Width="78"/>
<Button Content="11" Height="20" Width="80"/>
<Button Content="12" Height="30" Width="70"/>
<Button Content="13" Height="45" Width="72"/>
<Button Content="14" Height="30" Width="74"/>
<Button Content="15" Height="20" Width="76"/>
<Button Content="16" Height="25" Width="78"/>
<Button Content="17" Height="35" Width="80"/>
<Button Content="18" Height="50" Width="70"/>
<Button Content="19" Height="55" Width="72"/>
<Button Content="20" Height="45" Width="74"/>
<Button Content="21" Height="20" Width="76"/>
<Button Content="22" Height="60" Width="78"/>
<Button Content="23" Height="20" Width="80"/>
<Button Content="24" Height="25" Width="70"/>
<Button Content="25" Height="30" Width="72"/>
</ItemsControl.Items>
</ItemsControl>
</Grid>
and this is the result:
Actually this result is unsatisfactory for me because if you imagine the WrapPanel as grid(rows and columns) you will find that there is no columns, but there are fixed size rows. i need to make WarpPanel or some control else without columns too, look at this imaginary image:
notice that there is no rows and no columns. this is what i wanna make.
anybody have ideas to solve this issue?
You could write your own custom Panel class. There are some tutorials on the web, simply google "wpf custom panel".
It boils down to overriding the MeasureOverride and ArrangeOverride methods.
public class CustomPanel : Panel
{
protected override Size MeasureOverride(Size availableSize)
{
Size panelDesiredSize = new Size();
foreach (UIElement child in InternalChildren)
{
child.Measure(availableSize);
// Use child.DesiredSize, availableSize.Width and the positions
// and sizes of the previous children to calculate the position of
// the current child. Then determine the resulting Panel height.
panelDesiredSize = ...
}
return panelDesiredSize;
}
protected override Size ArrangeOverride(Size finalSize)
{
foreach (UIElement child in InternalChildren)
{
// Arrange each child according to the position calculations
// done in MeasureOverride
Point position = ...
child.Arrange(new Rect(position, child.DesiredSize));
}
return finalSize;
}
}
UPDATE: The following simple custom Panel might more or less do what you want.
public class PackPanel : Panel
{
protected override Size MeasureOverride(Size availableSize)
{
foreach (UIElement child in InternalChildren)
{
child.Measure(availableSize);
}
var positions = new Point[InternalChildren.Count];
var desiredHeight = ArrangeChildren(positions, availableSize.Width);
return new Size(availableSize.Width, desiredHeight);
}
protected override Size ArrangeOverride(Size finalSize)
{
var positions = new Point[InternalChildren.Count];
ArrangeChildren(positions, finalSize.Width);
for (int i = 0; i < InternalChildren.Count; i++)
{
var child = InternalChildren[i];
child.Arrange(new Rect(positions[i], child.DesiredSize));
}
return finalSize;
}
private double ArrangeChildren(Point[] positions, double availableWidth)
{
var lastRowStartIndex = -1;
var lastRowEndIndex = 0;
var currentWidth = 0d;
var desiredHeight = 0d;
for (int childIndex = 0; childIndex < InternalChildren.Count; childIndex++)
{
var child = InternalChildren[childIndex];
var x = 0d;
var y = 0d;
if (currentWidth == 0d || currentWidth + child.DesiredSize.Width <= availableWidth)
{
x = currentWidth;
currentWidth += child.DesiredSize.Width;
}
else
{
currentWidth = child.DesiredSize.Width;
lastRowStartIndex = lastRowEndIndex;
lastRowEndIndex = childIndex;
}
if (lastRowStartIndex >= 0)
{
int i = lastRowStartIndex;
while (i < lastRowEndIndex - 1 && positions[i + 1].X < x)
{
i++;
}
while (i < lastRowEndIndex && positions[i].X < x + child.DesiredSize.Width)
{
y = Math.Max(y, positions[i].Y + InternalChildren[i].DesiredSize.Height);
i++;
}
}
positions[childIndex] = new Point(x, y);
desiredHeight = Math.Max(desiredHeight, y + child.DesiredSize.Height);
}
return desiredHeight;
}
}
You Can Either use Canvas:
Or Use Grid and set the Margin of each Buttons according to requirenment
<Canvas >
<Button Content="s" Width="50" Canvas.Left="17" Canvas.Top="20" />
<Button Canvas.Left="73" Canvas.Top="32" Content="s" Width="60" Height="42" />
<Button Canvas.Left="139" Canvas.Top="10" Content="s" Height="42" Width="60" />
</Canvas>
<Grid >
<Button Content="01" Height="30" Width="70" Margin="20,12,414,268" />
<Button Content="02" Height="35" Width="72" Margin="426,148,6,128" />
<Button Content="03" Height="20" Width="74" Margin="190,122,240,170" />
<Button Content="04" Height="25" Width="76" Margin="386,26,40,260" />
<Button Content="05" Height="18" Width="78" Margin="376,202,48,92" />
<Button Content="06" Height="50" Width="70" Margin="385,64,48,196" />
<Button Content="07" Height="40" Width="72" Margin="162,202,269,68" />
<Button Content="08" Height="55" Width="74" Margin="20,154,408,102" />
<Button Content="09" Height="45" Width="76" Margin="21,95,406,171" />
<Button Content="10" Height="25" Width="78" Margin="44,47,382,239" />
<Button Content="11" Height="20" Width="80" Margin="386,120,38,170" />
<Button Content="12" Height="30" Width="70" Margin="95,13,338,268" />
<Button Content="13" Height="45" Width="72" Margin="290,6,140,260" />
<Button Content="14" Height="30" Width="74" Margin="210,38,220,244" />
<Button Content="15" Height="20" Width="76" Margin="128,48,299,242" />
<Button Content="16" Height="25" Width="78" Margin="265,189,160,97" />
<Button Content="17" Height="35" Width="80" Margin="176,154,246,122" />
<Button Content="18" Height="50" Width="70" Margin="100,146,333,116" />
<Button Content="19" Height="55" Width="72" Margin="270,121,160,135" />
<Button Content="20" Height="45" Width="74" Margin="348,148,81,118" />
<Button Content="21" Height="20" Width="76" Margin="94,78,332,212" />
<Button Content="22" Height="60" Width="78" Margin="270,60,155,192" />
<Button Content="23" Height="20" Width="80" Margin="176,74,247,216" />
<Button Content="24" Height="25" Width="70" Margin="194,95,238,191" />
<Button Content="25" Height="30" Width="72" Margin="117,104,314,177" />
</Grid>