NextBus API
http://www.nextbus.com/xmlFeedDocs/NextBusXMLFeed.pdf
Agency list
http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList
Obtain a list of available transit agencies.
[ | |
{ | |
"admin_name" : "Tōkyō", | |
"capital" : "primary", | |
"city" : "Tokyo", | |
"city_ascii" : "Tokyo", | |
"country" : "Japan", | |
"id" : "1392685764", | |
"iso2" : "JP", | |
"iso3" : "JPN", |
http://www.nextbus.com/xmlFeedDocs/NextBusXMLFeed.pdf
http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList
Obtain a list of available transit agencies.
1: Import the Standard Input Output library | |
3,4,5,6: Define four macros: | |
a. MAX_JUDGES | |
b. MAX_STRING | |
c. MAX_CONTESTANTS | |
d. WINNER_CUTOFF | |
8. Declare a struct called "Score" with the following datatypes: | |
a. "judgeScore": an array of doubles with a maximum capacity of 3 | |
13. Declare a struct called "Contestant" with the following datatypes: | |
a. "name": an array of characters with a maximum capacity of 25 |
----------------------------------------------BUGS---------------------------------------------- | |
======== BUG 1 ======== | |
Original Line: 13, 16 | |
Issue: Case-sensitive comparision of characters | |
What was done: Used the "tolower" function from the ctype library to convert both the characters being compared to lowercase | |
Original Code: |
1. Import the standard input and output library | |
2. Import the String helper library | |
3. Define a macro called SZ and set it to 31 | |
4. declare a character array of size "SZ" (31) called "str1" and set it to "Charlotte's" | |
5. declare a character array of size "SZ" (31) called "str2" and set it to "Spider's web" | |
6. declare a character array of size "SZ" (31) called "str3" and initialize it with one item: 0 | |
7. Concatenate the value of str1 and the address of the value at index 9 in the str2 array using the strcat method provided by the string helper library | |
8. Compare the value of str1 with "Charlotte's web" using the strcmp method. | |
9. If the result from step 8 is false, execute the contents in the if block (since the condition is prepend with the not (!) operator ): copy the string "is the" to the value of str3 | |
10. If the result from step 8 is true, execute the contents in the else block (since the condition is prepend with the not (!) operator ): copy the string "is not the" to the value of str3 |
#include <stdio.h> | |
struct employee { | |
int empId; | |
float salary; | |
}; | |
int main(void) { | |
int i; | |
float total_salary = 0.0; |
START | |
SET "state" = "green" | |
SET "isAdvanceActive" = "true" | |
SET "timer" = 40 and begin auto-decrement | |
## Get current time | |
GET "timer" value | |
## Check if 4-light/5-states system is active |
/* | |
* AUTHOR <your name> | |
* EMAIL <your seneca email id> | |
* SENECA ID <your seneca id> | |
* DESCRIPTION <description> | |
*/ | |
#include<stdio.h> | |
#include<math.h> |
/* | |
* AUTHOR <your name> | |
* EMAIL <your seneca email id> | |
* SENECA ID <your seneca id> | |
* DESCRIPTION Print message to the screen | |
*/ | |
#include<stdio.h> | |
#include<math.h> |
/* | |
* AUTHOR <your name> | |
* EMAIL <your seneca email id> | |
* SENECA ID <your seneca id> | |
* DESCRIPTION Print message to the screen | |
*/ | |
#include<stdio.h> | |
#include<math.h> |