This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prettyround(number) | |
return string.format('%.2f', number) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local user_script = loadstring('print("hello")') | |
local env = {print=print} | |
setfenv(user_script, env) | |
pcall(user_script) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- By Saml1er, for research :P | |
Testaz = { } | |
function Testaz:new (o,a,b) | |
setmetatable(o, self) | |
self.__index = self | |
self.str = tostring (a + b) | |
return o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- check "http://lua-users.org/wiki/SimpleLuaClasses" for this file | |
-- class.lua | |
-- Compatible with Lua 5.1 (not 5.0). | |
function class(base, init) | |
local c = {} -- a new class instance | |
if not init and type(base) == 'function' then | |
init = base | |
base = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.pablophg.handlers; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.util.Log; | |
public class ModoAvion extends BroadcastReceiver { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.pablophg.notifications; | |
import android.app.Notification; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.support.v7.app.ActionBarActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.pablophg.notifications; | |
import android.app.Notification; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.support.v7.app.ActionBarActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity" | |
android:id="@+id/mainrellay"> | |
<TextView android:text="Pulsa un botón" android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources xmlns:tools="http://schemas.android.com/tools"> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:actionBarStyle">@style/MyActionBar</item> | |
</style> | |
<!-- ActionBar styles --> | |
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse"> |
OlderNewer