[Solved] How to download images from a website that are running in a loop?

[ad_1] I assume you mean that you get a URL of the form: “http://www.niederschlagsradar.de/images.aspx? jaar=-6&type=europa.precip&datum=201309171500&cultuur=en-GB&continent=europa” And you want to extract that date and time bit so you can compare it against a list of images that you already have. So in the above, you want to get the 201309171500. You can do that with a … Read more

[Solved] How to return an array in C# without creating array inside the method? [closed]

[ad_1] static IEnumerable<int> Number(int number1, int number2){ for(int i=number1; i<=number2; i++) { if(i%2==1) { yield return i; } } } or static int[] Number(int number1, int number2){ var x = new int[number2]; int y = 0; for(int i=number1; i<=number2; i++) { if(i%2==1) { x[y] = i; y++; } } return x; } This is what … Read more

[Solved] How can I have xy coordinates in a grid that can’t be used? [closed]

[ad_1] Just loop over the creation until your condition is satisfied: var forbidden = new List<Tuple<int, int>>(); forbidden.Add(new Tuple<int, int>(5, 5)); forbidden.Add(new Tuple<int, int>(7, 9)); while(true) { x = random.Next(0, 20); y = random.Next(0, 20); if(forbidden.All(t => x != t.Item1 || y != t.Item2)) break; } This way, the loop will only terminate if you … Read more

[Solved] How to open one window and close another on button click [closed]

[ad_1] Let’s say you have a main form. Call it frmMain. In frmMain before IntializeComponent frmLogin loginForm = new frmLogin(); //Set the dialog result on login form depending on ok and cancel button //close the application if user wants to cancel if(loginForm.DialogResult == DialogResult.Cancel) this.Close(); //else you can continue to call your frmMain initializeComponent method … Read more

[Solved] The head of the snake is a couple points away from the body (c++ game) [closed]

[ad_1] I think your problem is probably partly in the get_next_position_to function, where you increment the position of the body part passed into the function. I think this should probably only add. The ‘RIGHT’ case also modifies both X and Y. position_t get_position_next_to(body_part_t *part) { position_t pos; switch(part->dir) { case UP: initialize_position(&pos, part->pos.x, part->pos.y + … Read more

[Solved] Make a list of achievements in a scroll view

[ad_1] You assign the elements (name, description, currency) to the same UITexts. It is like you try to store 20 numbers (0,1,2…19), but you only have one variable (int) to store them. Try to create the texts in the for loop as much as you need. Here is an example: public GameObject filePrefab; // to … Read more

[Solved] Resources for a 3D animation program [closed]

[ad_1] Math You should know enough linear algebra to know how the various linear transformations in 3D graphics work – translation, scaling, change of coordinate basis, view transformation etc. You should also know how to render curves and surfaces using splines, Bezier curves, Bezier patches, subdivision methods (e.g., Catmull-Clark) etc. Mathematics for 3D Game Programming … Read more

[Solved] Need Help,There’s no error but can’t go to another form for this multi user form code(c#) [closed]

[ad_1] The Error is because you haven’t open the connection before using it. First open the connection with the line “myCon.Open();” before using it in SqlDataAdapter and then use the ‘=’ operator in the select query of the where clause. you have missed that too in your query. Your code should be private void trydb() … Read more

[Solved] C++ return a list of values? [closed]

[ad_1] In your code, you declare to return type T, but the variable you return has type list<T>. I’d suggest to develop your code with concrete types (and without templates) first; you can exchange the concrete type with placeholders afterwards, but concrete types give a better idea what actually happens. Try the following code and … Read more

[Solved] C# delete some string

[ad_1] String imgTexts ; //String that contains the <img texts… String strToRemove ; for(int i=1; i<=12;i++) { //build the sctring that is going to be removed strToRemove = String.Format(” content=\”test_img image {0} – test_server\” des=\”test_img image {0} – test_server\” “, i) ; //replace the strToRemove with a empty string imgTexts = imgTexts.Replace(strToRemove, “”) ; } … Read more