Every single one of my apps need something like this. It's boring to explain in more details what's traditionally needed to make sure an AlertDialog is only shown once. Now, with this OneTimeAlertDialog.java, it's much easier to create new AlertDialogs that are only shown once.
/** Prompt that is only shown once to user. */
OneTimeAlertDialog.Builder(this, "my_dialog_key")
.setTitle("My Title")
.setMessage("My Message")
.show();
For something I use so often, I was surprised to not find a similar project on GitHub. So, I've added it: Android OneTimeAlertDialog
~ Danial Goodwin ~
Showing posts with label show. Show all posts
Showing posts with label show. Show all posts
2015-02-13
2014-02-09
Level Up - Webmaster: Setting Up Your First Laravel Website Or App
(For webmasters, a continuation on my last post Level Up - Webmaster: Installing Laravel and Composer on Bluehost.)
This walkthrough contains all the instructions I would have needed on one page, rather than looking through twenty different pages. This is a blunt how-to for connecting to a database with Laravel and displaying information. At the end are links for more specific and advanced info.
The following has explicit instructions and commands for a shared hosting provider like Bluehost, but the instructions should be the roughly the same for other providers and setups. I suggest to follow the steps explicitly the first time through, then run through it a second time with your specific project's names.
0. This simple "tutorial" assumes that you already know a little bit about Laravel and have possibly read my first install and setup walkthrough.
Setup the database:
1. Create a database on your server with a user and password.
2. From your root project folder, edit app/config/database.php to match your new database credentials.
3. In your root project directory, run php-cli artisan migrate:make create_users_table
8. Create two new views in app/views. Call the first one layout.blade.php and add this code:
@yield('content')
Create the second view, called users.blade.php:
@extends('layout')
@section('content')
@foreach($users as $user)
{{ $user->name }}
@endforeach
@stop
9. Go to your doman.com/users and you should have all the user names from the database displayed on the page.
This walkthrough contains all the instructions I would have needed on one page, rather than looking through twenty different pages. This is a blunt how-to for connecting to a database with Laravel and displaying information. At the end are links for more specific and advanced info.
The following has explicit instructions and commands for a shared hosting provider like Bluehost, but the instructions should be the roughly the same for other providers and setups. I suggest to follow the steps explicitly the first time through, then run through it a second time with your specific project's names.
0. This simple "tutorial" assumes that you already know a little bit about Laravel and have possibly read my first install and setup walkthrough.
Setup the database:
1. Create a database on your server with a user and password.
2. From your root project folder, edit app/config/database.php to match your new database credentials.
3. In your root project directory, run php-cli artisan migrate:make create_users_table
4. You should now have the file that looks something like: app/database/migrations/2014_02_09_195357_create_users_table.php. Edit the up() and down() function to look like:
public function up()
{
Schema::create('users', function($table)
{
$table->increments('id');
$table->string('email')->unique();
$table->string('name');
$table->timestamps();
});
}
public function down()
{
Schema::drop('users');
}
5. Now, back in the project root dir, run: php-cli artisan migrate
6. At this time, your tables in the database will be automatically created. Add some data manually so that we can test that retrieving data works.
Create a view:
7. Create a route (subdirectory pointer) in app/routes.php by adding the following code:
Route::get('users', function()
{
$users = User::all();
return View::make('users')->with('users', $users);
});
Laravel Quickstart
@yield('content')
Create the second view, called users.blade.php:
@extends('layout')
@section('content')
@foreach($users as $user)
{{ $user->name }}
@endforeach
@stop
9. Go to your doman.com/users and you should have all the user names from the database displayed on the page.
Note:
- If the php-cli command doesn't work for you, then try just php
More info:
More info:
2013-05-16
The Outer Limits (Television Show) New Jesus
There are many great episodes that come to mind specifically when I think about The Twilight Zone or The Other Limits. Each one of them expand your thinking to new dimensions or allows you to see something in a new light.
It took quite a searches to find one episode in particular regarding religion. I tried to search queries such as, "the twilight zone new jesus", "the outer limits (tv show) religion", and many more searches that progressively got longer until something like "(tv show OR movie OR video) guy preaches, bible in his hand gets shot, he dies and he replaces jesus". Those long queries didn't even help so I had to start looking through each of The Twilight Zone and The Outer Limit shows' summaries one by one until I found the show that I was looking for.
The main episode I was interested shows a sample of what blind religion is and could be: The Outer Limit's "Revival" episode.
Whilst looking for that episode I found another interesting one that I kept running into when looking for the above show. It's about finding the DNA of Jesus and using in vitro fertilization to bring about the second coming of Jesus: The Outer Limit's "The Shroud" episode.
I could explain the full videos in just a few paragraphs in order for the reader to save more time, but I wouldn't want to take away from how awesome the series of The Outer Limits and The Twilight Zone are. Even though I talk about and link to two of The Outer Limits shows, in my opinion The Twilight Zone is better overall. The later expands one thinking in even more directions.
~ Simply Advanced ~
It took quite a searches to find one episode in particular regarding religion. I tried to search queries such as, "the twilight zone new jesus", "the outer limits (tv show) religion", and many more searches that progressively got longer until something like "(tv show OR movie OR video) guy preaches, bible in his hand gets shot, he dies and he replaces jesus". Those long queries didn't even help so I had to start looking through each of The Twilight Zone and The Outer Limit shows' summaries one by one until I found the show that I was looking for.
The main episode I was interested shows a sample of what blind religion is and could be: The Outer Limit's "Revival" episode.
Whilst looking for that episode I found another interesting one that I kept running into when looking for the above show. It's about finding the DNA of Jesus and using in vitro fertilization to bring about the second coming of Jesus: The Outer Limit's "The Shroud" episode.
I could explain the full videos in just a few paragraphs in order for the reader to save more time, but I wouldn't want to take away from how awesome the series of The Outer Limits and The Twilight Zone are. Even though I talk about and link to two of The Outer Limits shows, in my opinion The Twilight Zone is better overall. The later expands one thinking in even more directions.
~ Simply Advanced ~
2012-08-25
The Real Non-Fake Sky
Sometimes I think about how fake the sky looks, kinda like a great painting on canvas, but I always come to the realization that it is awesome that the sky is real and never ending; I'm not going to run into the sky like in The Truman Show.
~ Simply Advanced ~
~ Simply Advanced ~
Subscribe to:
Posts (Atom)