Skip to content

Instantly share code, notes, and snippets.

View lukicmarko's full-sized avatar
👽

Marko Lukic lukicmarko

👽
View GitHub Profile
@lukicmarko
lukicmarko / ZoomLayout.java
Created March 22, 2016 15:32 — forked from anorth/ZoomLayout.java
Pinch-zoomable Android frame layout
package au.id.alexn;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.FrameLayout;
@lukicmarko
lukicmarko / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
@lukicmarko
lukicmarko / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../topeka-elements/category-icons.html">
- (void)resizeToFitSubviews:(UIView *)view
{
float w, h;
for (UIView *v in view.subviews) {
float fw = v.frame.origin.x + v.frame.size.width;
float fh = v.frame.origin.y + v.frame.size.height;
w = MAX(fw, w);
h = MAX(fh, h);
}
/* Merge sort in C */
#include<stdio.h>
#include<stdlib.h>
// Function to Merge Arrays L and R into A.
// lefCount = number of elements in L
// rightCount = number of elements in R.
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;