[Solved] Matrix sorting in C

#include <stdio.h> #include <stdlib.h> typedef int(*comparer) (int a, int b); int compareasc ( const void *pa, const void *pb ) { const int *a = *(const int **)pa; const int *b = *(const int **)pb; if(a[0] == b[0]) return a[1] – b[1]; else return a[0] – b[0]; } int comparedsc ( const void *pa, const … Read more

[Solved] can’t upload file , all element submit but the file element not

I’m not sure why your code is not working.. ..but can you try this form below. I have taken your form and removed all the PHP. This should still submit a file to tyo.php.. <form enctype=”multipart/form-data” action=”tyo.php” method=”post”> <input type=”hidden” name=”test” value=”123″/> <input type=”file” name=”attac” value=”” /> <input type=”submit” name=”submit” value=”save” /> </form> Your code.. … Read more

[Solved] How fgets reads line after line from a file?

EDIT: added extra explanation as @KlasLindbäck pointed out that my answer wasn’t entirely correct The File is a struct that contains a field “fd” which is an integer that identifies the OS file descriptor of this file, this file descriptor can be used to retrieve the current location in the file you’re reading. If you … Read more

[Solved] How can I run an exe file without the user finding out?

As @Cheers and hth. -Alf points out in the comments, you can simply make a GUI application with no window instead of a console application. Since you’re using Windows, you can change your code from: int main() to: #include <Windows.h> int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) You’ll need to change your linker options. You can … Read more

[Solved] SVG Path animation with Jquery

Here’s how to do this without using jQuery: <?xml version=”1.0″ encoding=”UTF-8″?> <svg viewBox=”0 0 480 360″ xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink”> <title>Animates a path</title> <path id=”arc” d=”M0 0″/> <script> var circle = document.getElementById(“arc”), startangle = -90, angle = startangle, radius = 100, cx = 240, cy = 180, increment = 5; // make this negative to animate counter-clockwise … Read more

[Solved] How to use reflection to run two variables

I have worked out a different way off doing it. To do it you make a new file let’s say it called ButtonDefinition and the code you would do to run it is new ButtonDefinition().ButtonDefinition1(); Then you would add in ButtonDefinition file if (main1.equals(“Test”)){ if (main2.equals(“Test2”)){ New Test().Test2(); } } So for each file you … Read more

[Solved] JavaScript replace text with images problem

The code is working when I test it. One possible reasons why it would fail is that you have some other code that is replacing the load event that you set, for example by setting the onload attribute in the body tag. Replacing the entire body content might conflict with other code that is manipulating … Read more