Skip to content

Instantly share code, notes, and snippets.

View GSala's full-sized avatar

Gerard Sala GSala

View GitHub Profile
@GSala
GSala / test.java
Last active September 5, 2017 09:37
for (int i = 0; i < 100; i++){
// print whatever
}
@GSala
GSala / test.java
Last active November 26, 2015 17:13
private static final Client client = ClientBuilder.newClient();
private static final WebTarget r = client.target("http://localhost:8080/tg/api/itineraries");
@Test
public void testAddHotel(){
HotelType hotel = new HotelType();
hotel.setName("Palacio");
HotelType response = r.path("1/hotels")
.request()
.accept(MediaType.APPLICATION_XML)
<!-- Material Colors - 500 range-->
<color name="red">#F44336</color>
<color name="pink">#E91E63</color>
<color name="purple">#9C27B0</color>
<color name="deeppurple">#673AB7</color>
<color name="indigo">#3F51B5</color>
<color name="blue">#2196F3</color>
<color name="lightblue">#03A9F4</color>
<color name="cyan">#00BCD4</color>
<color name="teal">#009688</color>
@GSala
GSala / splash_screen
Last active August 29, 2015 14:25
Making a Splash Screen (25/7/2015)
Assuming you have a theme called AppTheme, your launcher theme would be:
<style name="AppTheme.Launcher">
<item name="android:windowBackground">@drawable/launch_screen</item>
<item name="colorPrimaryDark"></item>
</style>
But drawable/launch_screen can’t be just a simple image, unfortunately - it’ll end up stretched to fill the entire screen.
Instead, you can use an XML file such as:
When the AMS course ends, a project report must be delivered.
This report will be used as the basic for the IT-AMS oral examination.
The main purpose of the report is to document the actual project work and has to be worked out in this way:
The report should not exceed 15 pages (figures and tables not included).
It shall be expressed in exact terms, have a good readability, and have the following as minimum contents:
Project overview (system description).
System description (block diagrams and figures are desirable).
@GSala
GSala / Lab2
Created January 26, 2015 13:05
#include <avr/io.h>
#define F_CPU 3686400
#include <avr/delay.h>
int main(void)
{
unsigned char i = 0;
DDRA = 0;
DDRB = 0xFF;
@Override
protected void onStop() {
/*// Stop bluetooth service
Intent intent = new Intent(this, BluetoothService.class);
stopService(intent);*/
if(!isChangingConfigurations()){
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), BluetoothService.class);