How do you flip the inverted pyramid? - loops

So I need to create an hourglass using two asterisks triangle in a function with one parameter. My problem is I am not sure how to flip it. I got the regular triangle down but it is still not fully correct:
I would like to put my code here to show what I did. But I’m not sure how u do that here?
However the print part is supposed to look like this.(https://i.stack.imgur.com/zJrzV.jpg
And the output should look like this:
(https://i.stack.imgur.com/5Q5Ez.jpg)

Related

Splidejs - I can't make a image bigger inside the slider

Im trying to make one item on my splidejs carusel get sacale out, but is cut by the overflow hidden rule. I think the rule is defined by Splidejs itself. I cant find a solution for this :S
This is want I want get
But it looks like this:

Beyond Compare: compare whole function calls or xml blocks

I want to compare c and XML files with Beyond Compare. But I want to detect if there are differences within a Block to the corrosponding on the other file and if there is a difference in a block I dont want Beyond Compare to Show the difference in the block, but handle it like this block is not in the other file. I Need this because in my files are certain Code blocks which are nearly the same but do have different Signalnames in it.
So for example i got a c file that Looks like this:
//1
functioncall(
Singalname1,
Singalname2,
Singalname3,
Singalname4,
Singalname5,
Singalname6);
//2
functioncall(
Singalname31,
Singalname32,
Singalname33,
Singalname34,
Singalname53,
Singalname36);
And a second file which Looks like this:
//1
functioncall(
Singalname1,
Singalname2,
Singalname3,
Singalname4,
Singalname5,
Singalname6);
//2
functioncall(
Singalname371,
Singalname372,
Singalname373,
Singalname374,
Singalname573,
Singalname376);
If I compare those two files with BeyondCompare it determines the difference within the second function call because the signalnames all contain a 7. But i want Beondcompare compare the whol functioncall an if there are differences in the functionCall to Show the functioncall beside empty space so i can add it eaily to the second file.
So not like this:
I want it like this:
I tried to add some comments with a begin comment and an end comment with a incrementing number in it something like this:
//begin1
functioncall(
Singalname1,
Singalname2,
Singalname3,
Singalname4,
Singalname5,
Singalname6);
//end1
And then adding a specific rule in beyond compare. Unfortnatly i did not manage to add this rule to beyond compare.
Furthermore Ithink the Code is not good with this comments in it.
Beyond Compare doesn't provide a method to do this. The best workaround is to use the right click Align With command to shift the function alignment.
Did you try the "Never align differences" checkbox in the Alignment tab of the session settings?

calculate char's bbox with mupdf fz_stext_char_bbox

I occur an strange phenomenon using mupdf, which when I use fz_stext_char_bbox to get char's bbox, a lot of bbox are correct, but a little are wrong. I draw the bbox with red rectange on screen. Following picture is my capture:
these wrong bbox are always 0 on lefttop. In my code,
I get the fz_page by pageNo first.
then I use fz_new_stext_sheet, fz_new_stext_page and fz_new_stext_device create necessary parameter.
I use fz_run_page with current matrix and above parameters.
then I following the mupdf to use fz_stext_char_bbox in order to get the bbox.
I'm not sure it's necessory to list my code here, becaause it maybe too long. I seems my transform matrix is right but don't know why has wrong bbox. Do I forget something?

Cannot plot in Matlab. It says my matrix is empty. Weird?

Doing some simple plotting and I cannot seem to figure out why I can't plot my data. I troubleshooted it first by checking to see if I had any data in my arrays first. I did not!! I'm completely lost on how to fix this.
I also tried creating a script to see if maybe it solved the issue instead of using the command window. I still get the same error.
Code:
t=0:1e-6:((2e-3-1e-6)-1);
vm=sin(2*pi*1e3*t);
vc=sin(2*pi*20e3*t);
vdsb=vc.*vm;
plot(t,vdsb,'b')
You probably don't want that last -1 in your code setting up t. Try changing t to:
t=0:1e-6:((2e-3-1e-6));
Or, if you really want it negative, you need to change the step size to negative:
t=0:-1e-6:((2e-3-1e-6)-1);
Otherwise, t is defined from 0:psotiveStep:negativeNumber and so it is empty.

Can I put letters instead of some numbers as ticks in a ValueAxis?

this is my program:
Program before
and I want it to look like this:
Program after
is this possible to add letters at some specific points in the ValueAxis?
I'm afraid that your links are not working, you may get a better responce using Imager and adding some example code or a Short, Self Contained, Correct Example.
In the meantime is this what you are trying to do

Resources