This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const users = [ | |
{ name: 'Isaac', age: 29, country_id: 30 }, | |
{ name: 'Jessica', age: 23, country_id: 41 }, | |
{ name: 'Eva', age: 25, country_id: 38 } | |
] | |
const countries = [ | |
{ country_name: 'Uganda', country_id: 38 }, | |
{ country_name: 'Kenya', country_id: 41 }, | |
{ country_name: 'Rwanda', country_id: 30 } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { makeStyles } from '@bit/mui-org.material-ui.styles'; | |
import Table from '@bit/mui-org.material-ui.table'; | |
import TableBody from '@bit/mui-org.material-ui.table-body'; | |
import TableCell from '@bit/mui-org.material-ui.table-cell'; | |
import TableHead from '@bit/mui-org.material-ui.table-head'; | |
import TableRow from '@bit/mui-org.material-ui.table-row'; | |
import Paper from '@bit/mui-org.material-ui.paper'; | |
const useStyles = makeStyles(theme => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.manupilateOdds = (response) => { | |
const odds = []; | |
for (const index in response) { | |
response[index].fixture.index = parseInt(index) | |
response[index].bookmaker = response[index].bookmakers[0] | |
delete response[index].league | |
delete response[index].update | |
delete response[index].bookmakers | |
odds.push({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"get": "odds", | |
"parameters": { | |
"date": "2023-01-11", | |
"bookmaker": "6" | |
}, | |
"errors": [], | |
"results": 10, | |
"paging": { | |
"current": 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function batchData(data, diviser){ // data is the 1Dimension array with all the formatted data | |
const chunk = Math.floor(data.length / diviser); // determine the number elements for each nested array or chunk | |
const limit = Math.floor(data.length / chunk); // determine the number of time to look through the 2D array (final) to pick the new datasets | |
const reminder = data.length % diviser // check if there is any data that was missed out because of the division above, then determin the number of elements left | |
let final = [] // array to store the new chunk of arrays of daya | |
for(let batch = 0; batch < limit; batch++){ // loop through the data while pushing new nested array of data into the final array | |
if(batch === 0){ | |
final.push(data.slice(0, chunk)) | |
console.log(batch, final) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*A program to compute for total taxes and total cost of a car | |
*@ authors [Asiimwe Prisca, Isaac Ssemugenyi] | |
*/ | |
#include<stdio.h> | |
int main(){ | |
// Declare all required variables | |
float dutiable_value, import_duty, value_added_tax, import_commission; | |
float withholding_tax, environment_tax, total_cost, total_tax; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Currency converter source -> https://www.oanda.com/currency-converter | |
* 13th/April/2023 | |
* KES -> UGX 1 -> 27.5834 | |
* UGX -> KES 1 -> 0.03533 | |
* | |
* @author 1. Asiimwe Priscah elvin - 22/2/314/DJ/038 | |
* 2. Isaac Ssemugenyi - 22/2/306/WJ/164 | |
* | |
* @title KUUK Currency Converter | |
* @description KUUK - Kenya->Uganda, Uganda->Kenya Currency Converter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() { | |
int Bal, Interest; | |
Bal = 300; | |
Interest = (30 / 100) * Bal; | |
if(Bal == 100) | |
{ | |
Bal++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
// WWrite a C program to display the following output: 20 40 60 80 100 120 | |
int main () | |
{ | |
int integer = 20; | |
while(integer <= 120){ | |
printf("\t%d", integer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int numbers[10]; | |
int i; | |
printf("You will be promted to enter any 10 numbers of choice, and only even numbers will be added \n\n"); | |
for(i = 0; i < 10; i++) { |