6 Topics

Member Avatar for
Member Avatar for gabrielcastillo

So I am trying to remove line feed within an array but not cariage returns. Having trouble using array walk, the ltrim function is not working. I need to remove ONLY the line feed("\n") not the cariage return("\r") so using trim will not work. I tried setting the chr(10) and …

Member Avatar for gabrielcastillo
0
325
Member Avatar for BenWard

Hi, I've got a class in PHP with an array of objects in it. I need to loop through these objects and call 2 methods on them but I'm not sure of the best approach. When dealing with arrays, if you use foreach, you can't seem to update the actual …

Member Avatar for BenWard
0
232
Member Avatar for LinDoc

Hi! I am learning C, and am at very introductory level, using this book called C Programming: A Modern Approach. I have just studied about arrays, and while tackling the programming exercises,i got stuck in Que 9 in Chapter 8. This is what the question says [INDENT]Write a program that …

Member Avatar for pizFunk
0
2K
Member Avatar for kungfubambi

Hi, I'm pretty new to Python. Working in 2.4 due to company restraints. I'm trying to use os.path.walk to work through a tree directory, and perform different actions on the files based on the name of the file. I thought if I used "startwith" it would indicate that files only …

Member Avatar for kungfubambi
0
239
Member Avatar for Gribouillis

This snippet defines a function walk() which generically performs a depth-first traversal of a tree, using preorder, inorder or postorder rules. Here, genericity means here that there are no hypotheses on what the tree nodes are or the implementation of the tree. Walk() only needs an arbitrary object used as …

Member Avatar for Gribouillis
2
1K
Member Avatar for skiabox

I am trying to produce a random walk solution but I get some strange results. Here's the code : [CODE] #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <time.h> int main (int argc, const char * argv[]) { // insert code here... char myArray[10][10]; char letters[26] = {'A', 'B', 'C', 'D', …

Member Avatar for WaltP
0
144

The End.