Skip to content

Instantly share code, notes, and snippets.

View luisfergromo's full-sized avatar
💭
👨🏻‍💻Programming

Luis Romo luisfergromo

💭
👨🏻‍💻Programming
View GitHub Profile
@khajavi
khajavi / floating_point_ieee.c
Created May 29, 2013 04:25
Converting floating-point number to IEEE754 representation by using union and struct in c.
#include <stdio.h>
/*
* See also : http://class.ece.iastate.edu/arun/CprE281_F05/ieee754/ie5.html
*/
union FloatingPointIEEE754 {
struct {
unsigned int mantissa : 23;
unsigned int exponent : 8;
unsigned int sign : 1;
@Yoloabdo
Yoloabdo / student struct
Last active March 14, 2017 20:25
student struct
struct student
{
int id;
string name;
string classNumber;
};
anonymous
anonymous / MainActivity.java
Created April 2, 2016 01:02
Activity Lifecycle exercise
package com.example.android.lifecycle;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@udacityandroid
udacityandroid / onCreate method in MainActivity.java
Created May 13, 2016 18:17
Use OnClickListeners for All Categories - onCreate method in MainActivity.java
// Find the View that shows the numbers category
TextView numbers = (TextView) findViewById(R.id.numbers);
// Set a click listener on that View
numbers.setOnClickListener(new View.OnClickListener() {
// The code in this method will be executed when the numbers View is clicked on.
@Override
public void onClick(View view) {
Intent numbersIntent = new Intent(MainActivity.this, NumbersActivity.class);
startActivity(numbersIntent);
@udacityandroid
udacityandroid / list_item.xml
Created May 13, 2016 21:08
Miwok App: Miwok app: List Item Views with pressed states
<?xml version="1.0" encoding="utf-8"?>
<!-- Layout for a single list item -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_height"
android:background="@color/tan_background"
android:orientation="horizontal">
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CANVAS API Call Template
// by Jake Standish [jacob.standish@cms.k12.nc.us]
// Written December, 2016
// You are free to copy and moodify this code at your own risk.
//
// INSTRUCTIONS
// 1. Copy this code.
// 2. Open a google apps script file from a Google Spreadsheet, Form, Document, or Google Apps Script (script.google.com).
// 3. Obtain your access token from Canvas and paste it's value in the parenthese after var accessToken =
@silmood
silmood / config.yml
Last active June 30, 2018 20:13
Simple CircleCI Android Configuration
# Versión de CircleCI
version: 2
# Pipeline de ejecución
jobs:
build:
working_directory: ~/code
# Imagen de Docker en donde se ejecutarán nuestras pruebas
docker:
- image: circleci/android:api-25-alpha
environment: