Vote count: 0 I'm trying to duplicate the value of a strtok() token. I'm ruing strtok() on a string with volatile value. char buffer[100]; char temp[100]; for(int i = 0; i < 100; i++){ fgets(buffer, 100, my_file); fscanf(my_file, "%s", temp) } An example value for temp in this case might be "100,200,300" char my_array[3][3]; char* token; token = strtok(temp,","); while(token != NULL){ switch (token[0]) case 1 : strcpy(my_array[0], token); break; case 2 : strcpy(my_array[1], token); break; case 3 : strcpy(my_array[2], token); break; } What i'm attempting to do with strcpy() is to duplicate the value of the token, and store the duplicate value in an array. asked 2 mins agoKastoli Let's block a...
ادامه مطلبVote count: 0 What I am trying to do: I want to output all of the books in the book node on my home page. What I need is an array of objects that contain all of the books in the book node so that I can loop through them using the ng-repeat directive in AngularJs. In the code below, when I console log the data, I get an object of objects, which caot be used with ng-repeat. Another issue that I am having is when I try to output the $scope.allBooks variable on to the page, nothing appears. Can anyone help me with this? // Main Controller firebase.database().ref('books').on('value', function(snapshot) { var data = snapshot.val(); $scope.allBooks = data; console.log(data); }); // Book Node in Fir...
ادامه مطلبVote count: 0 class ViewController: UIViewController { let manImage = UIImage(named: "man.png") let buttons = (0.....
ادامه مطلبVote count: 0 Having a file with just one column of data like for example: 10 2 34 4.5 16 I'd like to plot a stack of horizontal lines as plotting a horizontal line from let's say -3 to 3 (x range) for a y value equal to the first row (10 in the example), then replot a another horizontal line ranging form x=[-3:3] with a y value equal to the second row (2 in the example), and so on. How can I do it? asked 26 secs agoGilberto Zapata Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to search bitbucket for files that contain the string "MyStr", but only search repos who's name contains "cookbook"- is this possible? Could not see how to do this with quick file search: https://blog.bitbucket.org/2013/02/07/introducing-quick-file-search/ asked 20 secs agored888 Let's block ads! بخوانید...
ادامه مطلب