|
|
So you have given us a useless image and an excel file that nobody in their right mind is going to open, given what excel spreadsheets can contain in terms of malware ...
And that's it: "this has to obey rules I'm not going to tell you":
Quote: It must comply with the software rules for the job. Otherwise, errors will occur. And it looks like you haven't been told either:Quote: I can't find the rules after trying some methods. Not only that be you haven't told us what you have tried!
There is nowhere near enough information here for us to begin to help you - we have no idea what you are trying to do, or where you are starting from.
We don't even have any idea where you are stuck, or what help you might need - and that's kinda important, don't you think?
Start here: Asking questions is a skill[^] and think about what you need to know, and what you need to tell us in order to get help.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
thank you for your reply
That picture is not useless. From left to right is its sorting rule.
I have tried RGB, HSB, HSV, HSL single condition, double condition, and even three conditions, and tried to sort them with no results.
Later, we will find more HWB, HSI, , JzAzBz, JzCzHz, Oklab, Oklch, Okhsv, Okhsl, Okhwb, CAM02, CAM16..etc.
I feel like there are special skills or techniques to achieve it. That’s why I asked.
As for Excel, if you have any doubts, you can leave it alone.
It only records the Format16bppRgb555 pixel data sorted in the picture. As well as the RGB, HSB, HSV, HSL, HWB, HSI, XYZ, xyY, WXY, LAB, LUV, LCH, LCHab, LCHuv, HSLuv, HPLuv, YPbPr, I recorded. YCbCr, YCgCo, YUV, YIQ, YDbDr, TSL, XYB, IPT, ICtCp, JzAzBz, JzCzHz, Oklab, Oklch, Okhsv, Okhsl, Okhwb, CAM02, CAM16.. and other data!
|
|
|
|
|
Member 15840006 wrote: That picture is not useless. From left to right is its sorting rule. What does that mean? All I can see is a lot of coloured bars, which is not anywhere near an explanation of what you mean by "sorting rule". So please do what @OriginalGriff already suggested and explain exactly what you are trying to do, and what the actual rules are. And make sure you do this using proper programming terms (even showing sample code) and not in some vague images.
|
|
|
|
|
I understand! Thanks again for your replies
|
|
|
|
|
My approach is to first use these pixel data to randomly scramble them.
Because I don't know the rules, I try to use RGB, HSB, HSV, HSL, HWB...etc. data.
Use their elements to match each other for sorting. See if you can achieve the same sorting order as shown in the picture.
I just don’t know the rules. So I tried many ways and asked to see if there are any new ideas and directions!
As for the sample code, it is only used in conjunction with the sorting functions of list.OrderBy or ThenBy, etc., so I have not posted it!
|
|
|
|
|
It's useless to us, because we have no idea of the broader context of your project.
"Sorting an image" doesn't mean anything to us: you can "sort images" by saying "this image contains one bus, this one has two busses, and this one has three busses" - but sorting an individual image makes no sense without external context, because an image is a collection of colour values which are only relevant as an image when combined with their location data within a specific picture: if you sort by pixel colour you discard the location data and what you get isn't an image in conventional terms.
So throwing an image at us and saying "this is it's sorting rule" doesn't help anyone because we have no idea what you are trying to do! Context is relevant: just as a pixel needs colour it also needs context - the location of each pixel of that colour!
So stop, think, and try to explain what exactly you are trying to do, because without that context we can't help you!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I understand. Maybe it’s because I didn’t explain it clearly. Maybe it’s because my English is not that good!
My project is a software material "file" (such as xxx.bin). It is not an image file (such as bmp png...etc.) but a processed file (such as 0x4000~0x5000 blocks to store each pixel) Corresponding position, 0x7000~0x8000 block stores the pixel values used, sorted and stored)
After the software reads the file and then performs the internal calculation of the calculation software, the result will be displayed on the software as a material graphic.
The other parts have been parsed, and the "arrangement order" of the remaining pixel value data cannot be solved, so I don't care about the corresponding position of its pixel (the corresponding position has been parsed in the block where it is stored). So my need is the pixel The arrangement has nothing to do with the structure of the graph. I have a rough understanding of the image format you mentioned. So I'm just talking about the arrangement of pixels.
It may be that my English is not good. Some of the translations used caused trouble in asking questions. I’m sorry!
The illustration is for viewing and understanding. It is drawn using VS according to its stored block pixel data.
Otherwise it is just a group of arranged pixel values.
|
|
|
|
|
|
I'm working on a C++ project and need to do some graphics. This includes labeled axis and various format of data lines. How can I do it since visual studio does not have any graphics capability.
The Irishman
|
|
|
|
|
Hello everyone.
I want to create a Windows service in C# that can create a snapshot and send it to the server.
but my problem is when using "Screen.PrimaryScreen.Bounds". Visual Studio cannot speak.
I've searched a lot about this but can't seem to get any results.
thank you for helping me.
|
|
|
|
|
|
HoraceKHering wrote: it shows a little square.
That is a display problem. Might or might not be a data problem.
You are attempting to 'display' the data that you go via some mechanism so that your eyes can see it. That means that the computer must attempt to take the data and map it to a character set. That involves at least one and perhaps more than one transformation. Any of those can fail in different ways.
The surest way to show data is to learn what hex is and then create (or find) code that displays your data in hex. Every character set I have ever looked at will show hex data. (I think even EBCDIC but I could be mistaken and you are really unlikely to have to deal with that.)
|
|
|
|
|
Hi all, can you tell me what are the differences between pass-by-value and pass-by-reference in C++? thankyou
|
|
|
|
|
|
Pass-by-value is when someone presents an answer to your problem.
Pass-by-reference is when someone tells you "Why don't you just f***g google it?"
For being slightly more helpful:
Pass-by-value is when the caller makes a copy of the argument and hands this copy over to you. It carries no information about where your copy of the value is taken from - it may very well be the value of an expression directly stated in the argument list of the actual call. The copy is yours, and whatever you do to it won't affect anyone else. The value (copy) exists only as long as your method is running.
Pass-by-reference is when the caller doesn't give you a copy of the value, but rather tells you where you can find it, i.e. the location (address) in memory where the value is stored. You have to go and look there to find the value. In most cases, other parts of the program will be looking in the same location, and if your method changes the value stored, others who subsequently look there, will see your modifications to the value. The location exists both before and after the call to your method.
There is nothing C++ specific to this; it goes for all languages (or rather: all languages providing both call-by-value and call-by-reference - which are most of them).
|
|
|
|
|
Victor gave "value" AND a "reference". Should he read it out loud or copy and paste it?
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
hello every body.
I wanna to create windows service with c # that ,it able tack snapshot and send to server.
but my problem is when using "Screen.PrimaryScreen.Bounds" .visual studio cant know this.
I was so much search bout this problem but I cant get result.
thank you for help me.
|
|
|
|
|
You can't.
Services can't access the screen, keyboard, mouse, or any other element of the user interface at all. They can't start an app that can access the UI either!
Why not? Becauses services are designed to run when there is no user, and hence no user interface.
I don't know what you are trying to achieve, but you will not get this to work at all.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm having an issue with a nested button flyout that I can't figure out.
( Screenshot of the problem --> Uwp Flyout Issue[^] )
Basically, a hamburger button's flyout contains a Splitview, where the pane is a Listview menu. When a menu item is chosen, the SplitView's content frame navigates to an associated page. Simple enough.
On a menu page, if I have a button with a flyout that contains a ColorPicker, there seems to be some sort of dismiss area overlap problem. I've tried various combination of LightDismissOverlayMode settings on the SplitView and the button flyouts, to no avail.
Here's the hamburgar button within the StackPanel of the main page:
<StackPanel>
<Button x:Name="BtnMainMenu"
Content=""
ToolTipService.ToolTip="Main Menu"
Margin="10,10,0,0"
FontFamily="Segoe MDL2 Assets"
Style="{StaticResource StandardButton}">
<Button.Flyout>
<Flyout x:Name="MainMenuFlyout"
Placement="TopEdgeAlignedLeft"
FlyoutPresenterStyle="{StaticResource MainMenuFlyoutStyle}"
Closed="MainMenuFlyout_Closed">
<SplitView x:Name="MainSplitView"
IsPaneOpen="True"
DisplayMode="Inline"
OpenPaneLength="180">
<SplitView.Pane>
<ListView
x:Name="MainMenuListView"
ItemsSource="{x:Bind MenuLinks}"
ItemTemplate="{StaticResource MainMenuItemTemplate}"
SelectionMode="Single"
Background="#FF808080"
IsItemClickEnabled="True"
ItemClick="MainMenuListView_ItemClick"/>
</SplitView.Pane>
<SplitView.Content>
<Frame x:Name="MainMenuContentFrame"/>
</SplitView.Content>
</SplitView>
</Flyout>
</Button.Flyout>
</Button>
</StackPanel>
... and the main layout StackPanel of the selected menu page that contains the ColorPicker in a button's flyout:
<StackPanel Background="{StaticResource MenuPageBg}" Width="230" Height="300">
<Border Style="{StaticResource MenuPageHeaderStyle}">
<TextBlock Text="Menu 4" Style="{StaticResource MenuPageTitleStyle}"/>
</Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="10"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ToggleSwitch Name ="Enabled" OnContent="Enabled" OffContent="Disabled"
Grid.Row="1" Grid.Column="1"
FontSize="18"/>
<ToggleSwitch Name="Floating" OnContent="Goodbye World" OffContent="Hello World"
Grid.Row="2" Grid.Column="1"
FontSize="18"/>
<Button x:Name="BtnColor" Grid.Row="3" Grid.Column="1"
Width="49" Height="48" Background="Gray" BorderBrush="{StaticResource WAVGray}" BorderThickness="1">
<Rectangle Width="30" Height="27">
<Rectangle.Fill>
<SolidColorBrush Color="{x:Bind TheColorPicker.Color, Mode=OneWay}"/>
</Rectangle.Fill>
</Rectangle>
<Button.Flyout>
<Flyout Placement="TopEdgeAlignedLeft">
<ColorPicker x:Name="TheColorPicker"
ColorSpectrumShape="Ring"
IsMoreButtonVisible="False"
IsColorSliderVisible="True"
IsColorChannelTextInputVisible="False"
IsHexInputVisible="False"
IsAlphaEnabled="True"
IsAlphaSliderVisible="True"
IsAlphaTextInputVisible="False" />
</Flyout>
</Button.Flyout>
</Button>
</Grid>
</StackPanel>
</Page>
Regards,
R. Wey
|
|
|
|
|
You're varying different backgrounds; it looks like you're creating a partial transparency (which might be inherited).
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
That's a good theory, and it led me to the solution.
If you refer back to the picture linked in the OP, the problem smells of two transparencies overlapping each other, but even when removing all transparent colors from my code, the problem persisted.
So, for a final test I went into my Windows Settings/Personalization/Colors and noticed "Transparency Effects" was enabled. Disabling it solved the problem, and I guess it makes sense since my app inherits its theme from the Windows settings on my PC. Nevertheless, this seems like an odd behavior from the base Windows theme for it to show up only when related to flyouts.
I'm guessing there's a way to override the base theme on a child flyout, but for now I'm just going to leave Transparency Effects disabled.
Thanks for nudging me in the right direction!
Regards,
R. Wey
|
|
|
|
|
this is bullshit, the first VAO without std::vector get drawn but not the second with vector :
Vector3f Vertices[4];
Vertices[0] = Vector3f(-1.0f, -1.0f, 0.5773f);
Vertices[1] = Vector3f(0.0f, -1.0f, -1.15475f);
Vertices[2] = Vector3f(1.0f, -1.0f, 0.5773f);
Vertices[3] = Vector3f(0.0f, 1.0f, 0.0f);
unsigned int Indices[] = { 0, 3, 1,
1, 3, 2,
2, 3, 0,
0, 1, 2 };
GLuint VBO[2];
GLuint IBO[2];
unsigned int id[2];
glGenVertexArrays(2, id);
glGenBuffers(2, VBO);
glGenBuffers(2, IBO);
glBindVertexArray(id[0]);
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(Vertices), Vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IBO[0]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(Indices), Indices, GL_STATIC_DRAW);
struct Vertex
{
Vector3f position;
//Vector2f texCoord;
//Vector3f normal;
//int Boneindices[4];
//float Weights[4];
};
vector<vertex*> Vertices2;
Vertex* v=new Vertex();
v->position = Vector3f(-1.0f, -0.0f, 0);
Vertices2.push_back(v);
v->position = Vector3f(1.0f, -0.0f, -1);
Vertices2.push_back(v);
v->position = Vector3f(1.0f, -0.0f, 0);
Vertices2.push_back(v);
v->position = Vector3f(0.0f, 1.0f, 0.0f);
Vertices2.push_back(v);
struct Triangle
{
int indices[3];
};
Triangle* t = new Triangle();
t->indices[0]=0;
t->indices[1]=3;
t->indices[2]=1;
vector<triangle*> Indices2;
Indices2.push_back(t);
t->indices[0] = 1;
t->indices[1] = 3;
t->indices[2] = 2;
Indices2.push_back(t);
t->indices[0] = 2;
t->indices[1] = 3;
t->indices[2] = 0;
Indices2.push_back(t);
t->indices[0] = 0;
t->indices[1] = 1;
t->indices[2] = 2;
Indices2.push_back(t);
glBindVertexArray(id[1]);
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex)* Vertices2.size(), &Vertices2[0], GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IBO[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(Triangle)* Indices2.size(), &Indices2[0], GL_STATIC_DRAW);
for (size_t i = 0; i < 2; i++)
{
glBindVertexArray(id[i]);
glDrawElements(GL_TRIANGLES, 12, GL_UNSIGNED_INT, 0);
glBindVertexArray(0);
}
|
|
|
|
|
Your vector contains pointers to vertex , not the actual vertices. In fact it contains the same pointer four times, so even if OpenGL can handle pointers to vertex data you only have the same vertex repeated. The index buffer suffers from the same problem.
|
|
|
|
|
Isawyouoo wrote: this is bullshit Well you wrote it.
Look at the following line:
glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex)* Vertices2.size(), &Vertices2[0], GL_STATIC_DRAW);
The third parameter is supposed to be a pointer to the data you wish to copy, but you are passing a pointer to a pointer. The vector contains a list of pointers to vertex elements, so &Vertices2[0] is the address of the first pointer item in the vector. It should be:
glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex)* Vertices2.size(), Vertices2[0], GL_STATIC_DRAW);
Without the & on parameter three.
|
|
|
|
|