Tuesday, 17 December 2013

Schema.org + Notepad++ = 💘

notepad-best-code-editor
I love Notepad++. Since i use Windows this is my code editor of choice (there are 4 years, befor i was a Mac-fanboy using TextWrangler). It is free, stable, customisable (visually with themas, and with user defined languages), extendable with rich plugin repository, has active development team, so it gets offen updates. One day i thought, there could be something better beside of Notepad++ and searched. What i found, was an article about 15 most popular code editors and a poll - look at the poll results, you know, what was my decision;)

Since 2011 i love Schema.org too. I extensively use microdata on each site i get in my hands - my own record is 125 microdata classes and properties in a single web document (detail page of a books online shop), and no single one is spam, all of them are existing and useful product informations.

Getting married

It was just obvious i decided to optimize my handwork and make Notepad++ and Schema.org vocabulary working together (and, last but not least, to create a free additional value for all, who have similar needs).
Read full article »

android button example

In this post we are going to see how to create a simple android application that contains two buttons and how to create the response for the button clicks.
Create a new android project named ButtonDemo in eclipse.
In  the activity_main.xml add two buttons as shown bellow.
 <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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="clickMeMethod"
android:text="@string/first_button" />
<Button
android:id="@+id/bn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_centerHorizontal="true"
android:layout_marginTop="39dp"
android:text="Click me too" />
</RelativeLayout>

Now made the following changes in the MainActivity.java file which is on the package coming under the Src folder.
 package com.buttondemo;  
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends Activity {
Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button)findViewById(R.id.bn);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Toast.makeText(getBaseContext(), "You click the CLICK ME TOO button", Toast.LENGTH_LONG).show();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void clickMeMethod(View v)
{
Toast.makeText(getBaseContext(), "You just click CLICK ME button", Toast.LENGTH_LONG).show();
}
}

Save the project and run.
android create buttonandroid button tutorial




Ads by Google




Monday, 16 December 2013

create your first android app

In this post i explain how to create your first android application. I use the eclipse ide for the development purpose.
See this article for the installation and configuration of eclipse for android.

Create a new android application project with name HelloWorld. (Click the image to enlarge.)
hello-world-android-app

Now on the activity_main.xml file add a new TextView as shown bellow.
 <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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/greeting_message"
/>
</RelativeLayout>

There is no need to make any other changes on the project. Right click the project and select run as android application to run the application.
create-android-app



Ads by Google



How To Add Snow In The Background of Your Blog Using CSS

Today we’re going to go over a super simple CSS technique that you can use to make it snow on your Blogger blog. It seems particularly attractive since it doesn't require scripts, only CSS and three small images.

An advantage of this method is that by not using scripts doesn't overload the blog, the disadvantage being that users with not so modern browsers, will not be able to see it (in Internet Explorer works for version 10 and up).

The snow will fall in the background of the blog, which, in addition, prevent interfering with links or content (because the flakes are images), also prevent blocking the visibility of the content of the blog.

falling snow, snow, winter background, blogger



How To Add Falling Snow To Blogger Blogspot

Step 1. Go to "Template" and click on the "Edit HTML" button:


Step 2. Click the small arrow on the left of <b:skin>...</b:skin> to expand the style (screenshot 1) and click anywhere inside the code area to search by using the CTRL + F keys for the ]]></b:skin> tag (screenshot 2)

Step 3. Add the following code just above it:
/* Snow falling for Blogger
----------------------------------------------- */
@keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}

@-moz-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}

@-webkit-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}

@-ms-keyframes snow {
0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}
}

#falling-snow {
background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA-RrzlnTpZag23K48OXBICMLZtrvFRNuE1pRt3mJUuurWURyw9fQV4eP2PZXMQAUBWnC60ISiR-fH2TqiaiAaR2lJereBOrN2G06VX-cY9BbUkKbJV7_qt2-bw4jpOztuuSiYnB9l7OLV/s1600/snow.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUKYAcOpJ6T970_twppXSmrdUS6BkKWf5vvD7p2wg-PThr7N5Monrf3BzzbJYDqQwRRIk3YnGKZhhhthiEiq4vBC5W7oUtqQGaMiKPCE64lgFL_9LMZHqcNxY-qa619ScGTXA4Abbxz3G4/s1600/snow3.png), url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCc6yXIqH8pbKDX7yuSVR63IbzS9fy6ZxeDJ37DaId9ChaZu25y8r94O7MMDEAo_Gg7IrtZYLNI8XPH5tac7Dq06NzoJ4BLEGrbXQ55L7zSgcL1fVsYP7k10PwIipl0WSWedx33nZHxmDb/s1600/snow2.png);
-webkit-animation: snow 20s linear infinite;
-moz-animation: snow 20s linear infinite;
-ms-animation: snow 20s linear infinite;
animation: snow 20s linear infinite;
}
Screenshot 1:


Screenshot 2:


Step 3. Now, search (CTRL + F) the <body> tag or if you can't find it, search this line below:
<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
Step 4. Just below the tag, add this:
<div id='falling-snow'>
Step 5. Finally, find the closing </body> tag and add this tag just above it:
</div>
Step 6. Save the changes and that's it. Enjoy! :)

As you can see this tricks is very simple and easy to install, does not block the visibility of blog's content and most important, it has no scripts, only CSS and nothing else.

Saturday, 14 December 2013

Tales of Maj'Eyal (ToME) version 1.1.0 and Steam edition

The great roguelike RPG Tales of Maj'Eyal (ToME) is available as a new version (1.1.0) nicknamed "Full Steam Ahead". Here is a slightly older trailer for version 1.0.5.:



Release highlights:

  • New necromancer tree: Animus
  • All achievements now feature beautiful 128x128 images
  • Improved Alchemist interaction with its golem
  • Tons of fixes and balance adjustements
  • Many improvements for addon creators, including a way to enable debug mode and a tool (inthe debug menu) to register and upload addons to te4.org directly from the game.
  • Includes a Fez. Fezzes are cool!
Interestingly it has also been "greenlit" on the popular game distribution channel Steam, so if you want to donate to the developers you can also do it by buying ToME through this channel. The currently discounted version includes a DLC with an updated UI (and the hint for a Steampunk themed extension) which seems to me like a planned way of funding the development of the game in the future.