Search Result

Collapse
29 results in 0.0029 seconds.
Keywords
Members
Tags
arrays
  •  

  • NunoMPG
    started a topic Detection of intersecting circles on python

    Detection of intersecting circles on python

    Hello all!

    I'm trying to build a python script to create circles, place them randomly within specific limits and the most important part is that the algorithm must be able to detect any intersecting circles and if any is found, move them to another position.

    This script is to be used with ABAQUS finite element simulation package to create a laminated composite plate with embedded random fibers.

    This first...
    See more | Go to post

  • luke noob
    started a topic how do i replace pixels colors with my own colors ?
    in PHP

    how do i replace pixels colors with my own colors ?

    Hi I am new to the GD library and am stuck on something and wondered if you could help me.

    I am using PHP and GD.

    I have an array with 40 predefined hexadecimal colors in it.

    I have an image that is 6 x 6 pixles, and I would like to loop through the pixles, swapping the colours in the image for my predefined colors.

    if say pixle 1 was already in my predefined colors i would like to leave...
    See more | Go to post

  • saliorkeo
    started a topic Issue parallelizing this c code with openmp
    in C

    Issue parallelizing this c code with openmp

    How can I parallelize this code with OpenMP?. The result I get is not correct.

    I try to use temporary variables p1aux, p2aux, and psumaux because the Reduction clause cannot be used with pointers or intrinsic functions. But as I said the result is incorrect.

    When I say "result is not correct", I would say: The calculations of array1 + array2 are stored in the matrix sumsse. The calculations are correct until...
    See more | Go to post

  • Two Hard-coded Arrays WITH DIFFERENT SIZES into One 2-Dimensional Vector

    I am using 2 ARRAYS OF DIFFERENT SIZES in One 2-Dimensional Vector, and my output is not correct. The arrays are size 4 and size 13.
    I want COLUMN 0 to have: 55, 66, 77, 88.
    I want COLUMNs 1-12 to have 1,2,3,4,5,6,7,8 ,9,10,10,10,11 in EACH ROW. It would seem that the 2nd loop for the size 13 array would need to loop 4 times in order to fill 4 rows, however, I'm not sure how to do that. Here is what I have so far in code and output:...
    See more | Go to post

  • codechick
    started a topic Two Hard-coded Arrays into One 2-Dimensional Vector
    in C

    Two Hard-coded Arrays into One 2-Dimensional Vector

    Two Hard-coded Arrays into One 2-Dimensional Vector
    Hello, I have been working on this issue for a long time, and I need your expertise.
    I have 2 arrays, each of them are hard-coded with integer values.
    I also have one 2-Dimensional vector and I want to put 1 array into the first column of the vector and the other array into the 2nd column of the vector. The reason is that I want to do math on the 2nd column of the vector only....
    See more | Go to post

  • Using ctypes in Python - arrays and derived types from Fortran 90

    Hello Folks!

    I try to call from Python several routines contained in a .so library generated from some Fortran 90 routines. All the objects in the library are resolved using the -fPIC flag when compiling the .so.

    I have a sample code which looks like

    Code:
    from numpy import *
    from ctypes import *
    
    lib_test = cdll.LoadLibrary("./lib_test.so")
    
    method = lib_test.__test_MOD_wrap_xbelem
    ...
    See more | Go to post

  • elizarod
    started a topic Javascript help: arrays and a matrix

    Javascript help: arrays and a matrix

    I'm in an introductory course, and my professor is not very good. I've been working on this problem, but as of now, I'm stuck. Essentially, we have to declare a matrix of grades and create a "Z" formation. Using the "Z" locations we have to average and print grades. Here are the parameters:

    Declare an 8 x 8 matrix and an array of length 22.
    (declare any other variable that you use in the algorithm)
    ...
    See more | Go to post

  • Friderik
    started a topic Some help with Do__Loop and Arrays

    Some help with Do__Loop and Arrays

    Hi everyone!
    I have a form with 6 checkboxes (getting their values from a table/query)
    When the form loads, I would like the buttons right of the checkboxes to "react" to the values in the chekcboxes.
    For example: If "Value1" is 0, then disable "EDIT" button and enable "ADD" button Else enable "Edit" button and disable "ADD" button.
    Here is a screenshot:
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 7 '11, 10:23 PM. Reason: Made screenshot visible within the post.

  • Would someone help me with Searching and Sorting Arrays?

    This is basically what I have to do. I think I have the methods correct in terms of sorting, but how do I switch it from largest to smallest?

    The selectionSort method should take an array of integers as a
    parameter and will sort the numbers into order from largest to smallest.
    Place a println statement in the sort so every time a new maximum is
    found, it is printed to the screen. Once all are sorted, the method...
    See more | Go to post

  • Chris Winton
    started a topic How do i use the random number function?
    in C

    How do i use the random number function?

    Hello I'm using the random number function to try to multiply the values in the array O by a random number but receive the error - invalid operands to binary error*. Thanks for any help.

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    double O[1][6] = {{1, 1, 1, 1, 1, 1}};
    
    /*********** random number generator *******************/
    double srandom()   
    {
    return 2*((rand()/(double)RAND_MAX)
    ...
    See more | Go to post

  • sitingduck
    started a topic How to use an array to auto fill a form?
    in PHP

    How to use an array to auto fill a form?

    I used this code to pull info from the database and into the array.
    Code:
    $stu_quary = "SELECT `uname` FROM `user` WHERE level = 'Normal' AND class = '".$_SESSION['class']."'"; 
    	$stu_names=mysql_query($stu_quary);
    	$stuArr=array();
    	while($get_stu_info =mysql_fetch_assoc($stu_names)) 
    	{ 
    	$n = 0;
        $stuArr[] = $get_stu_info['uname']; 
    	$_SESSION['selected_s'] = current($stuArr);
    ...
    See more | Go to post

  • Bernardo
    started a topic Finding smallest number from user input(array) ?
    in C

    Finding smallest number from user input(array) ?

    Okay, so I am making a program that accepts user input of integers. As you can see I am using an array and i need to get the greatest number, and smallest, range, mean, etc. But I successfully did this for the greatest and figured not much would need to be changed but everything I've tried has given me errors of like -8732113 as the smallest. If needed i can post the code with the greatest included, I took it out so i could just focus on this....
    See more | Go to post

  • Why are vectors and strings better than arrays?

    I've got many differences between vectors/strings and arrays but I need more details. I guess I don't really understand it enough to do this but this is what I've concluded so far;

    An array is a collection of data storage locations, holding the same type of data and can be individually referenced by adding an index to a unique identifier.

    They can be declared by writing the type, the array name and then the number of...
    See more | Go to post

  • luke noob
    started a topic How to shuffle an array?
    in PHP

    How to shuffle an array?

    Can anyone show me an example of how to shuffle an array?
    See more | Go to post
    Last edited by Niheel; Oct 19 '10, 06:18 PM. Reason: Not needed

  • Reading content of file into variable and splitting into an array

    hello,

    i'm trying to read the content of file into the variable at once. It has been successful. But how can i split each new line into array.

    Let us assume the file contains the following line
    192.114.82.90 - - [01/Nov/1998:00:32:54 +0200] www.actcom.co.il "GET /~choo/lupg/images/good_bar.gif HTTP/1.0" 404 -
    192.114.82.90 - - [01/Nov/1998:00:33:03 +0200] www.actcom.co.il "GET /~choo/lupg/images/good_bar.gif...
    See more | Go to post
Working...