Great Android tidbits that developers should know to be more productive. Included are simple useful classes and methods that may not be well known.
http://blog.danlew.net/2014/03/30/android-tips-round-up-part-1/
~ Danial Goodwin ~
Showing posts with label simple. Show all posts
Showing posts with label simple. Show all posts
2014-06-16
2014-03-03
Level Up - Business: How To File the Annual Report (Florida)
When you run a business in Florida, you must submit an Annual Report every year between January 1st and May 1st. It will cost $138.75 to file. And, if not filed in time, then there is a $400 penalty fee and possibility that the company is "administratively dissolved". But, the good news is that the report is easy to fill out and submit, and it's all done online.
When you complete the form online, you'll be able to edit your business address and member(s) address(es). Then you don't need to file a separate form for changing the addresses with the state (an extra $25).
First thing is, you don't need to spend any extra money for a third-party to complete this state requirement for you. They may charge upwards of $35 to complete the form that is easily completed within five minutes.
To complete your Annual Report:
1. You will need, your business's document number, Federal Employer Identification (FEI/FEIN) or Employer Identification Number (EIN), an email address to keep on file, and about five minutes.
2. Go to https://services.sunbiz.org/Filings/AnnualReport/FilingStart
3. Start the form by imputing your document number, then read the directions on the page. It is all straight-forward.
4. Pay the filing fee and submit. Now, you are done.
Disclaimer: This is not legal advice. This post is mainly a pointer to help others who also need to Annual Report for Florida. I'm sure other states in the US also have a page similar to the one linked here.
~ Danial Goodwin ~
When you complete the form online, you'll be able to edit your business address and member(s) address(es). Then you don't need to file a separate form for changing the addresses with the state (an extra $25).
First thing is, you don't need to spend any extra money for a third-party to complete this state requirement for you. They may charge upwards of $35 to complete the form that is easily completed within five minutes.
To complete your Annual Report:
1. You will need, your business's document number, Federal Employer Identification (FEI/FEIN) or Employer Identification Number (EIN), an email address to keep on file, and about five minutes.
2. Go to https://services.sunbiz.org/Filings/AnnualReport/FilingStart
3. Start the form by imputing your document number, then read the directions on the page. It is all straight-forward.
4. Pay the filing fee and submit. Now, you are done.
Disclaimer: This is not legal advice. This post is mainly a pointer to help others who also need to Annual Report for Florida. I'm sure other states in the US also have a page similar to the one linked here.
~ Danial Goodwin ~
2014-02-25
Level Up - Webmaster: How To Get Started With MediaWiki
Want to create your own wiki pages like Wikipedia? You can organize all your thoughts, add notes for your new book you want to write, and more. The wiki can be either public, private, or half and half. You decide.
Going through this process will allow you to edit any and all features that are provided with MediaWiki, the wiki engine for Wikipedia and many other wiki sites.
Step 1. Download MediaWiki, it might be as a .tar.gz file, which in that use 7-Zip to unzip the compressed file, you may have to use 7-Zip twice to fully open it and see the source files.
Step 2. Copy all the files to a directly on your domain.com/mediawiki/w/ directory. One of the easiest ways is using FileZilla, navigating to the public directory using the GUI, then click+drag all the files into the directory. Note: The reason I said that particular directory is because it will allow you to do a lot more later on, like setup the domain.com/wiki site to serve the pages in your wiki. As you wait for all your files to upload to your server,
Step 3. Create a new database and user for that database. This is the method that the MediaWiki instance will be using to save and retrieve all the information for your wiki.
Step 4. Wait until all the files have finished uploading to your domain.com/mediawiki/w/ directory, then navigate to that page in a browser. It'll say LocalSettings.php file not found, so this is where you will use a wizard to setup all the properties of your site, like public/private and more. Each of these properties can always be changed later. I recommend reading through all of them to understand better what is available to you.
Step 5. After going through the entire wiki, the wizard will prompt you to download the LocalSettings.php file which you can then add to the same folder that you previously installed all the files in.
Step 6. In a browser, navigate to your domain.com/mediawiki/w/ and see that you have your main default page show. Congrats, you now have an instance of MediaWiki running on your own server.
If you run into any problems during this process, you can click on the little question marks in the wizard to pop up more information of a section or input area. Another great source of information is on the official install page.
~ Danial Goodwin ~
Going through this process will allow you to edit any and all features that are provided with MediaWiki, the wiki engine for Wikipedia and many other wiki sites.
Step 1. Download MediaWiki, it might be as a .tar.gz file, which in that use 7-Zip to unzip the compressed file, you may have to use 7-Zip twice to fully open it and see the source files.
Step 2. Copy all the files to a directly on your domain.com/mediawiki/w/ directory. One of the easiest ways is using FileZilla, navigating to the public directory using the GUI, then click+drag all the files into the directory. Note: The reason I said that particular directory is because it will allow you to do a lot more later on, like setup the domain.com/wiki site to serve the pages in your wiki. As you wait for all your files to upload to your server,
Step 3. Create a new database and user for that database. This is the method that the MediaWiki instance will be using to save and retrieve all the information for your wiki.
Step 4. Wait until all the files have finished uploading to your domain.com/mediawiki/w/ directory, then navigate to that page in a browser. It'll say LocalSettings.php file not found, so this is where you will use a wizard to setup all the properties of your site, like public/private and more. Each of these properties can always be changed later. I recommend reading through all of them to understand better what is available to you.
Step 5. After going through the entire wiki, the wizard will prompt you to download the LocalSettings.php file which you can then add to the same folder that you previously installed all the files in.
Step 6. In a browser, navigate to your domain.com/mediawiki/w/ and see that you have your main default page show. Congrats, you now have an instance of MediaWiki running on your own server.
If you run into any problems during this process, you can click on the little question marks in the wizard to pop up more information of a section or input area. Another great source of information is on the official install page.
~ Danial Goodwin ~
2014-02-19
Level Up - Webmaster: How To Randomly Redirect Visitors To Different Websites
There is a very simple method using PHP to have visitors automatically redirected to another site.
Why this is useful:
- User clicks "Take me to a random" page. You can finely-tune the random outcome.
- You are doing some A/B testing and want to sent users to different locations to test.
- Or, like me, you want to share your various websites/games, from a single button.
Try clicking
Ex: http://apps.simplyadvanced.net/windows8/redirect
Step 1: Here's all the PHP code that you need:
Step 2: Done
Or, if you want to redirect the visitor after they visit a certain URL on your domain, then simply create an "index.php" file in the public directory that you want users to be redirected from, then the above code is all that you need to put in it.
Try it: Random Windows 8 Games created by me.
Try it: Random Windows Phone Games created by me.
~ Danial Goodwin ~
Why this is useful:
- User clicks "Take me to a random" page. You can finely-tune the random outcome.
- You are doing some A/B testing and want to sent users to different locations to test.
- Or, like me, you want to share your various websites/games, from a single button.
Try clicking
Ex: http://apps.simplyadvanced.net/windows8/redirect
Step 1: Here's all the PHP code that you need:
$urls = array("siteA.com",
"siteB.com",
"www.example.com"); $url = $urls[array_rand($urls)]; header("Location: http://$url"); ?>
Step 2: Done
Or, if you want to redirect the visitor after they visit a certain URL on your domain, then simply create an "index.php" file in the public directory that you want users to be redirected from, then the above code is all that you need to put in it.
Try it: Random Windows 8 Games created by me.
Try it: Random Windows Phone Games created by me.
~ Danial Goodwin ~
2014-02-17
Level Up - Programmer: How To Quickly Setup And Use Git And GitHub
A long time ago, the first time I started trying to learn Git and GitHub, I thought it was an unnecessarily complex process. All I wanted was simple version control and easy collaboration. So, instead of learning Git, I just made everything really modular. For one of my teams, we even just worked in completely different files, and it worked out okay.
But, now, I want to explain the absolute basics on how to start, in order to drastically reduce the learning curve. You can always find more detailed information later. And, you can get started right now!
Assumptions:
- You already know what Git is.
- You are running Windows OS.
- You already have folder/file(s) in mind for added a version control system to or want to do easy collaboration on code projects.
- You want to get started with GitHub.
- You are okay with basic instructions meant for the easiest use of Git/GitHub.
Git
Step 1: Download Git.
- Make sure you have "Git Bash" to be installed also, and you can add it to your [right-click] contextual menu also during the install process. (And/or you can add Git to your Path.)
Step 2: Configure Git.
- Open Git Bash (either right-click in file explorer or find it through search)
- Type the following two lines into the console, and change the red parts to your own information:
Step 3: Setup project to work with Git.
- Navigate (using cd) the console to the directory where you want to enable Git.
- Run the following lines to setup the folder to work with Git and "save" all the files in the directory.
And, now you have version control. Just do those last two lines again whenever you want to save a new version. Change the red part to something descriptive of the change.
GitHub
Step 4: Create a GitHub account.
- If this is your first time using GitHub, you will need to create an SSH key. After entering the following, hit enter again to save to default location (your user folder/.ssh).
- Check for success by running:
Step 5: Create a new repository (sometimes called a "repo")
- Click the big green button somewhere on GitHub that says "New repository"
- Name the repo and create it.
- On the page you are navigated to, find/copy the "SSH clone URL". This will be used in the next step and looks something like, "git@github.com:danialgoodwin/MyFirstRepoNameHere.git"
Step 6: Pull From GitHub, then Push To GitHub.
- Setup the location that you will push to and pull from. The part in red should be substituted with your info from step 5. (The following should all be on one line.)
For more great information and details, please visit:
- Easy Version Control with Git
- Official GitHub site, there should be large buttons wanting to help you further.
~ Danial Goodwin ~
But, now, I want to explain the absolute basics on how to start, in order to drastically reduce the learning curve. You can always find more detailed information later. And, you can get started right now!
Assumptions:
- You already know what Git is.
- You are running Windows OS.
- You already have folder/file(s) in mind for added a version control system to or want to do easy collaboration on code projects.
- You want to get started with GitHub.
- You are okay with basic instructions meant for the easiest use of Git/GitHub.
Git
Step 1: Download Git.
- Make sure you have "Git Bash" to be installed also, and you can add it to your [right-click] contextual menu also during the install process. (And/or you can add Git to your Path.)
Step 2: Configure Git.
- Open Git Bash (either right-click in file explorer or find it through search)
- Type the following two lines into the console, and change the red parts to your own information:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
Step 3: Setup project to work with Git.
- Navigate (using cd) the console to the directory where you want to enable Git.
- Run the following lines to setup the folder to work with Git and "save" all the files in the directory.
git initgit add .
git commit -m "Initial commit"
And, now you have version control. Just do those last two lines again whenever you want to save a new version. Change the red part to something descriptive of the change.
GitHub
Step 4: Create a GitHub account.
- If this is your first time using GitHub, you will need to create an SSH key. After entering the following, hit enter again to save to default location (your user folder/.ssh).
ssh-keygen -t rsa -C "your@email.com"- The console tells you where the public key has been saved. Open that file in Notepad++ and save the contents to GitHub.com->Profile->Edit Profile->SSH Keys->Add SSH Key. (Each arrow -> is basically another click.)
- Check for success by running:
ssh git@github.com
Step 5: Create a new repository (sometimes called a "repo")
- Click the big green button somewhere on GitHub that says "New repository"
- Name the repo and create it.
- On the page you are navigated to, find/copy the "SSH clone URL". This will be used in the next step and looks something like, "git@github.com:danialgoodwin/MyFirstRepoNameHere.git"
Step 6: Pull From GitHub, then Push To GitHub.
- Setup the location that you will push to and pull from. The part in red should be substituted with your info from step 5. (The following should all be on one line.)
git remote add origin git@github.com:andrew8088/Shazam.git- You always want to "pull" from GitHub before you begin your work because others may have updated the code:
git pull origin master- Now, you can finally update your code to GitHub!
git push origin master
For more great information and details, please visit:
- Easy Version Control with Git
- Official GitHub site, there should be large buttons wanting to help you further.
~ Danial Goodwin ~
2014-02-15
Level Up - Webmaster: How To Shorten Default MediaWiki URL to Short (Canonical) URL Form
This was my first time shortening the URL for MediaWiki to canonical form and it literally took me less than five minutes to fully complete and test. I bet you can do it in two minutes.
Quick and easy directions:
1. Go to MediaWiki ShortURL Builder (Your wiki will have to be temporarily public)
2. Type in your current URL, for me it was " http://danialgoodwin.com/mediawiki/w/"
3. When you click "Go", make sure the article path says "/wiki/$1" or wherever you would like your MediaWiki to appear to users.
4. You now have all the code at your fingertips to place on your server. I used a GUI FTP client (like FileZilla) to transfer the new data because that was the quickest for me.
The Code:
If your configuration is the exact same as mine, then you can use these following sections of code to enable the shortcodes.
At the root of your domain, in the .htaccess file (make it if you don't have it), include (I added the "REGION" comments just for readability and future maintenance):
In your MediaWiki's LocalSettings.php file, insert the following lines (preferably right under "$wgScriptPath" and "$wgScriptExtension" just to keep things organized):
Note: With this method, you don't even need a /wiki/ directory to make it appear that all the files are there. You should use this method so that when you make changes to the backend, the frontend will still be the same for users, search engines, and SEO. It also makes URLs easier to remember and more.
More detailed information: Manual:Short_URL
~ Danial Goodwin ~
Quick and easy directions:
1. Go to MediaWiki ShortURL Builder (Your wiki will have to be temporarily public)
2. Type in your current URL, for me it was " http://danialgoodwin.com/mediawiki/w/"
3. When you click "Go", make sure the article path says "/wiki/$1" or wherever you would like your MediaWiki to appear to users.
4. You now have all the code at your fingertips to place on your server. I used a GUI FTP client (like FileZilla) to transfer the new data because that was the quickest for me.
The Code:
If your configuration is the exact same as mine, then you can use these following sections of code to enable the shortcodes.
At the root of your domain, in the .htaccess file (make it if you don't have it), include (I added the "REGION" comments just for readability and future maintenance):
# REGION Redirects for MediaWiki Short Canonical URLs
RewriteEngine OnRewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/w/index.php [L]RewriteRule ^/?$ %{DOCUMENT_ROOT}/mediawiki/w/index.php [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-fRewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-dRewriteRule ^/?mediawiki/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/mediawiki/w/thumb.php?f=$1&width=$2 [L,QSA,B]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-fRewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-dRewriteRule ^/?mediawiki/w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/mediawiki/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
# ENDREGION Redirects for MediaWiki Short Canonical URLs
In your MediaWiki's LocalSettings.php file, insert the following lines (preferably right under "$wgScriptPath" and "$wgScriptExtension" just to keep things organized):
## Added for short URLs.$wgArticlePath = "/wiki/$1";$wgUsePathInfo = true;
## Added for short URLs because .htaccess on root includes 404 thumbnail handler config.$wgGenerateThumbnailOnParse = false;
Note: With this method, you don't even need a /wiki/ directory to make it appear that all the files are there. You should use this method so that when you make changes to the backend, the frontend will still be the same for users, search engines, and SEO. It also makes URLs easier to remember and more.
More detailed information: Manual:Short_URL
~ Danial Goodwin ~
2013-11-08
Working Title, "Basically, Android Expained"
I am an Android developer. I have been one for a few years now. In that time, I've had the pleasure of helping many people with technical questions. I believe one of my specialties is being able to explain complicated concepts in simple, laymans terms.
Over the years, I was bound to give repeat answers eventually. So, in order to keep myself more efficient, I will start adding all of my layman explanations to a wiki, which I will eventually probably turn into some sort of ebook.
The book will be titled, "Basically, Android Explained". I still have a few working ideas for a tagline.
I chose to title the book this way because almost all my explanations start off with "Basically, ...". This single word is very important to my explanations because it signifies that what follows is NOT everything explained. It is just the easiest explanation for a non-developer or a new developer.
I'm not sure of the entire structure that I want to use for my definitions, but one way is to have the first sentence be "Basically, ...", then the following sentence would be a more technical definition, then after that will be the reasons for using it.
For good measure, here's an except:
~ Danial Goodwin ~
Title: Basically, Android Explained
Description: Where advanced technical concepts are abbreviated to quick/light readings.
Over the years, I was bound to give repeat answers eventually. So, in order to keep myself more efficient, I will start adding all of my layman explanations to a wiki, which I will eventually probably turn into some sort of ebook.
The book will be titled, "Basically, Android Explained". I still have a few working ideas for a tagline.
I chose to title the book this way because almost all my explanations start off with "Basically, ...". This single word is very important to my explanations because it signifies that what follows is NOT everything explained. It is just the easiest explanation for a non-developer or a new developer.
I'm not sure of the entire structure that I want to use for my definitions, but one way is to have the first sentence be "Basically, ...", then the following sentence would be a more technical definition, then after that will be the reasons for using it.
For good measure, here's an except:
KeyStore: (also referred to as a Java keystore or keystore file) A security certificate used for authorization. Basically, an app's signature. It proves that the app was made by a certain developer. This is a precautionary security measure that prevents malicious apps from replacing another app."
That was just a quick rough draft, I have a few more ways to explain this concept. Feedback always welcomed.
That was just a quick rough draft, I have a few more ways to explain this concept. Feedback always welcomed.
Title: Basically, Android Explained
Description: Where advanced technical concepts are abbreviated to quick/light readings.
2013-07-06
Subscribe to:
Posts (Atom)