Skip to content

Instantly share code, notes, and snippets.

@HaifaCarina
HaifaCarina / bills.py
Created October 10, 2022 00:10
Code Your Future - Bills
#variables
LOWER_INCOME_MAX = 24164
UPPER_INCOME_MIN = 144984
total_bill = 0
food_percentage = 0
water_percentage = 0
electricity_percentage = 0
transportation_percentage = 0
savings = 0
income_class = ""
@HaifaCarina
HaifaCarina / LocalHTMLApp.m
Created December 1, 2012 19:04
UIWebView implementation that loads content from from a local html file in the Xcode project.
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
webView.autoresizesSubviews = YES;
webView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
webView.dataDetectorTypes = UIDataDetectorTypeLink;
webView.backgroundColor = [UIColor redColor];
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"www"]];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
[self.view addSubview:webView];