Skip to content

Instantly share code, notes, and snippets.

Avatar

Amin Benarieb aminbenarieb

  • Moscow
View GitHub Profile
View main.c
//
// main.c
// Lab1
//
// Created by Amin Benarieb on 08/09/15.
// Copyright (c) 2015 Amin Benarieb. All rights reserved.
//
/*
Требования:
• Написать программу, которая считывает из текстового файла целые числа в массив и выполняет обработку этого массива
View module.c
//
// module.c
//
//
// Created by Amin Benarieb on 13/09/15.
//
//
#include "module.h"
View testmain.c
//
// testmain.c
// Lab1Test
//
// Created by Amin Benarieb on 13/09/15.
// Copyright © 2015 Amin Benarieb. All rights reserved.
//
// Модульные тесты
#include <stdio.h>
View SLExpandableTableView Example
//
// SLExpandableTableViewController.m
// SLExpandableTableViewTests
//
// Created by Oliver Letterer on 19.02.14.
// Copyright 2014 Sparrow-Labs. All rights reserved.
//
#import "SLExpandableTableViewController.h"
#import "SLExpandableTableViewControllerHeader.h"
View Get cell from gesture recognizer
func handleTap(sender: UITapGestureRecognizer? = nil) {
var indexPath: NSIndexPath!
if let label = sender?.view as? UILabel
{
if let superview = label.superview {
if let cell = superview.superview as? UICollectionViewCell {
indexPath = wordBuilder.indexPathForCell(cell)
}
View Name field validation
([a-zA-zа-яА-Я]{2,})+([ '-]([a-zA-Zа-яА-Я]{2,})+)*$
View UIAlertController Snippet
UIAlertController* <#alert#> = [UIAlertController alertControllerWithTitle:<#name#>
message:<#message#>
preferredStyle:<#UIAlertControllerStyleAlert#>];
void (^<#handler#>)(UIAlertAction * action) = ^(UIAlertAction * action){
};
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:<#@"OK"#> style:<#UIAlertActionStyleDefault#>
handler:<#handler#>];
View gist:31da4d5e80f8e2c1c6a21e1fb4ad5c01
#include <LPC23xx.H>
#include <string.h>
#include <stdlib.H>
int interrupts_count = -2;
int i = 0;
static unsigned const kStrSize = 15;
char star_group = 'u';
View two max number multiplication
import random
MIN_ARRAY_LENGTH = 1
MAX_ARRAY_LENGTH = 50
MIN_NUM = 0
MAX_NUM = 100
# Uses python3
def max_mult(a,n):
if n < 1:
View gist:baf1d35c3a98e1800fd912a2333c5301
#!/usr/bin/env python3
import os
match_keyword ="<some stuff here to find>"
import_line = "<some stuff needed to be imported>"
def find_first_line_match_idx(lines, match_str):
lastmatchIdx = None
idx = 0
You can’t perform that action at this time.