Skip to content

Instantly share code, notes, and snippets.

View FawadHa1der's full-sized avatar

Fawad Haider FawadHa1der

View GitHub Profile
@FawadHa1der
FawadHa1der / gist:6a230bcfb3bf0e49764a9547ba254d79
Created November 19, 2024 17:20
Create a Binius tower mul XAG(XOR AND GRAPH) circuit unrolled using MockTurtle
// Build and simulate XAG network for binary multiplication
std::vector<xag_network::signal> binius_mul_xag(xag_network& xag, const std::vector<xag_network::signal>& v1, const std::vector<xag_network::signal>& v2, uint32_t length, bool is_constant)
{
assert(v1.size() == length && v2.size() == length); // Ensure input vectors match the bit length
// Base case: AND the single bits
if (length == 1) {
AND_count++;
return {xag.create_and(v1[0], v2[0])};
}
@FawadHa1der
FawadHa1der / CommentUI.m
Created September 8, 2011 21:20
SocializeSDK iOS Code Snippets part 2
// Allocate memory for the instance
SocializeCommentsTableViewController* commentsController = [[[SocializeCommentsTableViewController alloc] initWithNibName:@"SocializeCommentsTableViewController" bundle:nil entryUrlString:entityUrlString] autorelease];
[self.navigationController pushViewController:commentsController animated:YES];
@FawadHa1der
FawadHa1der / Authentication.m
Created September 8, 2011 19:53
SocializeSDK iOS Code Snippets
// invoke the call
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"];
#pragma mark SocializeServiceDelegate implementation
// implement the delegate
-(void)didAuthenticate{
NSLog(@"Authenticated");
}
// if the authentication fails the following method is called