Showing posts with label Website SSL. Show all posts
Showing posts with label Website SSL. Show all posts
0
[postlink]https://iamdaowner.blogspot.com/2012/06/how-to-view-webpage-inside-your-android.html[/postlink]Hi there! Today I'm gonna share how to view a website or webpage to your Android apllication. You'll be able to view webpages from the internet or from the storage of your Adroid device such as your sdcard. This is useful if you want your app not to open a webbrowser for web links. It is like, the browser is inside or embedded your Android application.

How To View a Webpage Inside Your Android App
Android WebView


The following code will enable you to view this blog on your Android Application. This code uses the Android WebView class which is also an extension of Android's View class.
package com.example.yourproject;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

public class YourProject extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);

// Let's display the progress in the activity title bar, like the
// browser app does.
getWindow().requestFeature(Window.FEATURE_PROGRESS);

WebView webview = new WebView(this);
setContentView(webview);

webview.getSettings().setJavaScriptEnabled(true);

final Activity activity = this;
webview.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
// Activities and WebViews measure progress with different scales.
// The progress meter will automatically disappear when we reach 100%
activity.setProgress(progress * 1000);
}
});

webview.setWebViewClient(new WebViewClient() {

public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
//Users will be notified in case there's an error (i.e. no internet connection)
Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
}
});
//This will load the webpage that we want to see
webview.loadUrl("http://codeofaninja.blogspot.com/");

}
}

If you want to view an html page from your sdcard, you can change the url for example "file:///sdcard/YourProject/index.html". Well that's it. Thanks for reading. :)

How To View a Webpage Inside Your Android App

0
[postlink]https://iamdaowner.blogspot.com/2012/06/fixed-r-cannot-be-resolved-to-variable.html[/postlink]I encountered this problem when I was making a new project on my eclipse workspace. I got a red underline on "R" in this part of my code
setContentView(R.layout.main);

So here's what I did to fix this issue. Go to Project Properties > Java Build Path > TickAndroid Version Checkbox


Click to enlarge.


Then if your workspace does not build automatically…

Properties again > Build Project


After that, all went back to normal. :)

Fixed: R cannot be resolved to a variable

0
[postlink]https://iamdaowner.blogspot.com/2012/06/display-facebook-photos-to-your-website.html[/postlink]Hi there! Today we're going to do a code that:

1. Gets photo albums and photos of a facebook fan page (using Facebook PHP SDK andFQL).
2. Display these photos to a webpage (assuming it is your website.).
3. Use jQuery Lightbox to make awesome images presentation.

Display Facebook Photos To Your Website with FQL and jQuery Lightbox
Show your facebook photos to your website


This one is useful if you want your facebook pictures to be shown in your website in a synchronized way. Once you uploaded an image in your fan page, it will be seen automatically in your website too.

This technique has the following Advantages:

1. You save your server disk space.
2. You got instant photo manager (facebook photos)
3. You save bandwidth since the photos shown in your website are loaded from facebook's repository.
4. Please add your comment if you know other advantages.

Risks:

1. When facebook is down (Well, I never encounter facebook was down)
2. Facebook is not responsible if you lost your data. (Read section 15 of their terms)
3. Please add your comment if you know other disadvantages or risks.

   

1. Create an App. This will enable you to get your App ID and App Secret. They are needed to access facebook data.

2. Our index.php well have the following code.
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>The Code Of A Ninja Dummy Page Images</title>
    </head>
<body>
<div style='font-size: 16px; font-weight: bold; margin: 0 0 10px 0;'>
    This album is synchronized with this
    <a href='https://www.facebook.com/pages/COAN-Dummy-Page/221167777906963?sk=photos'>
        Dummy Page Album
    </a>
</div>
<?php
    //include the facebook PHP SDK
    require 'fb-sdk/src/facebook.php';

    $facebook = new Facebook(array(
      'appId'  => 'change_this_to_your_app_id',
      'secret' => 'change_this_to_your_app_secret',
      'cookie' => true// enable optional cookie support
    ));
   
    //defining action index
    isset( $_REQUEST['action'] ) ? $action = $_REQUEST['action'] : $action = "";
   
//if there's no action requested
if( $action == ''){
    echo "<p>COAN Dummy Page Albums</p>";
   
    //Do the FQL to select the albums of my Dummy page
    //The ID of my Dummy page is 221167777906963
    //which also specifies the owner of the album
    //To get the ID of the owner, just look at the URL
    //I got https://www.facebook.com/pages/COAN-Dummy-Page/221167777906963
    //In case you don't see it, browse one of its albums and 
    //get the number after the last dot
    //I got https://www.facebook.com/media/set/?set=a.221168737906867.68636.221167777906963

    $fql    =   "SELECT aid, cover_pid, name FROM album WHERE owner=221167777906963";
    $param  =   array(
     'method'    => 'fql.query',
     'query'     => $fql,
     'callback'  => ''
    );
    $fqlResult   =   $facebook->api($param);
    foreach( $fqlResult as $keys => $values ){

   
   //we will do another query
   //to get album cover
        $fql2    =   "select src from photo where pid = '" . $values['cover_pid'] . "'";
        $param2  =   array(
         'method'    => 'fql.query',
         'query'     => $fql2,
         'callback'  => ''
        );
        $fqlResult2   =   $facebook->api($param2);
        foreach( $fqlResult2 as $keys2 => $values2){
            $album_cover = $values2['src'];
        }
        echo "<div style='padding: 10px; width: 150px; height: 170px; float: left;'>";
        echo "<a href='index.php?action=list_pics&aid=" . $values['aid'] . "&name=" . $values['name'] . "'>";
            echo "<img src='$album_cover' border='1'>";
        echo "</a><br />";
        echo $values['name'];
        echo "</div>";
       
       
    }
}

//when the user clicked an album
//it will show or list all the pictures 
//on that album
if( $action == 'list_pics'){
    isset( $_GET['name'] ) ? $album_name = $_GET['name'] : $album_name = "";
   
    echo "<div><a href='index.php'>Back To Albums</a> | Album Name: <b>" . $album_name . "</b></div>";
    $fql    =   "SELECT pid, src, src_small, src_big, caption FROM photo WHERE aid = '" . $_REQUEST['aid'] ."'  ORDER BY created DESC";
    $param  =   array(
     'method'    => 'fql.query',
     'query'     => $fql,
     'callback'  => ''
    );
    $fqlResult   =   $facebook->api($param);
   
   //so that jQuery lightbox will pop up
   //once the image was clicked
    echo "<div id='gallery'>";
   
    foreach( $fqlResult as $keys => $values ){
       
        if( $values['caption'] == '' ){
            $caption = "";
        }else{
            $caption = $values['caption'];
        }  
       
        echo "<div style='padding: 10px; width: 150px; height: 170px; float: left;'>";
            echo "<a href=\"" . $values['src_big'] . "\" title=\"" . $caption . "\">";
            echo "<img src='" . $values['src'] . "' style='border: medium solid #ffffff;' />";
            echo "</a>";
        echo "</div>";
    }
   
    echo "</div>";
}
?>
   
   
    <!-- jQuery lightbox include script -->
   
        <script type="text/javascript" src="jQuery-lightbox/js/jquery.js"></script>
        <script type="text/javascript" src="jQuery-lightbox/js/jquery.lightbox-0.5.js"></script>
        <link rel="stylesheet" type="text/css" href="jQuery-lightbox/css/jquery.lightbox-0.5.css" media="screen" />
       
        <script type="text/javascript">
        $(function() {
            $('#gallery a').lightBox();
        });
        </script>
   
    <!-- END JLIGHTBOX -->
  </body>
</html>

There are lots of other album information that you can retrieve. Not only album information, but also other information visible on facebook. Just check the availabe tables that you can query on facebook. Facebook Query Language (FQL) is of great help too since we are already familiar with SQL. We don't have much to study. :)

That's it! :)

Display Facebook Photos To Your Website with FQL and jQuery Lightbox

0
[postlink]https://iamdaowner.blogspot.com/2012/06/25-sites-to-download-royalty-free-stock.html[/postlink]
Royalty-free stock photos and Textures are very useful in every graphic project for web or print, especially if they are free. There are many websites where you can find royalty-free stock photos and textures, but the problem is most free stock photos are of poor quality and low resolution.
Where can you find royalty-free stock photos and textures?
Here is a list of 25 of the best sites to download royalty-free stock photos and textures .

Adigitaldreamer

free-stock-1

sxc

free-stock-3

MorgueFile

free-stock-2

Pixelio

free-stock-4

Photogen

free-stock-5

Freephotosbank

free-stock-6

Stockvault

free-stock-7

Freerangestock

free-stock-8

Nationsillustrated

free-stock-9

Pixelgalerie

free-stock-10

Photocase

free-stock-11

Freefoto

free-stock-12

Vintagepixels

free-stock-13

Turbophoto

free-stock-14

Freedigitalphotos

free-stock-15

Grungetextures

free-textures-1

Urbandirty

free-textures-2

Textureking

free-textures-3

Texturez

free-textures-4

Amazingtextures

free-textures-5

Texturewarehouse

free-textures-6

Free3dstextures

free-textures-7

2textured

free-textures-8

Textures.z7server

free-textures-9

Freemediagoo

free-textures-10

Not Enough?

Here’s Some Other Resources for Royalty Free Stock Photo and Textures.

25 Sites to Download Royalty-Free Stock Photos and Textures

0
[postlink]https://iamdaowner.blogspot.com/2012/06/how-to-view-website-source-codes-on.html[/postlink]
You’re using your iPad to browse the Web and you’re curious to view the source of a webpage but don’t have the options to do so. The next thing you know, you’re swapping back to your Mac or PC to open up the same website to check the Page Source. Now if that isn’t called a hassle, I don’t know what is.
view source hongkiat How to View Website Source Codes on iPad / iPhone [Quicktip]
To make things easier for all iPad and iPhone users out there, here’s a trick to allow you to view the source of a webpage straight from your mobile device. Take note that the code you will be using will redirect you to the creator’s website, where the source is presented in highlighted syntax and clickable URL for easier reading.

Set Up ‘View Source’ Bookmark

  1. To get started, open your mobile Safari on your Apple device and bookmark the page you are reading by clicking on the bookmark button. Instead of the page name, name it ‘View Source’ and then click ‘Save’.
    view source add bookmark How to View Website Source Codes on iPad / iPhone [Quicktip]
  2. Open this bookmarklet javascript, select all and copy the script.
    view source copy code How to View Website Source Codes on iPad / iPhone [Quicktip]
  3. Tap on the bookmark icon at the top left part of your mobile Safari browser, and tap on ‘Edit’
    view source edit bookmark How to View Website Source Codes on iPad / iPhone [Quicktip]
  4. Tap on the ‘View Source’ bookmark you created in step 1.
    view source bookmark How to View Website Source Codes on iPad / iPhone [Quicktip]
  5. Now paste the bookmarklet javascript you copied in step 2 into the URL bar and tap ‘Done’.
    view source paste script How to View Website Source Codes on iPad / iPhone [Quicktip]

View Source On Safari On IPad And IPhone

Now that you have created a new bookmark called ‘View Source’, to view source of any webpage, open any site from your Safari browser, tap on the bookmark icon and then tap on the ‘View Source’ bookmark.
view source shortcutt How to View Website Source Codes on iPad / iPhone [Quicktip]
This bookmark shortcut will send a request to the creator’s server for processing and then open a new browser tab for you to view the source in highlighted syntax.
view source result How to View Website Source Codes on iPad / iPhone [Quicktip]

Conclusion

This method to ‘view source’ is not similar to web developer tools where you have it as an extension to your browser, but creating this bookmark is to save a shortcut to the creator’s websitewhere you can view any website’s source with highlighted syntax.

How To View Website Source Codes On IPad / IPhone [Quicktip]

0
[postlink]https://iamdaowner.blogspot.com/2012/06/bloggers-5-vital-things-before-hitting.html[/postlink]
The most crucial final step to publishing a blog post is to proofread the piece. This is the best time to polish up the grammar, spelling, sentence structure, etc. in the article before its release. On top of that, we should also ensure that the flow of our content is smooth and comprehensiblefor our loyal readers.
clicking publish button Bloggers: 5 Vital Things Before Hitting That Publish Button
How should we do it then? In a way, the methods of proofreading are pretty much subjective to the preference of the individual blogger. In fact, for most of us, we don’t actually follow a certain procedure; we simply read through and use our best judgment on where amendments should be made.
In view of such a vague practice, I thought it would be good idea to offer a few general tips when we proofread our latest blog entries:

1. Reading Aloud

You may want to use as many of your five senses as possible when you proofread your piece so that you can detect where things seem wrong, or sound wrong, as it were. Compared to simply scanning the text through a pair of eyes, reading out the words, sentences and paragraphs lets youhear how your post would sound like as well. That way, you have two layers of proofreading.
Reading out loud is also important because blog posts are usually written in a conversationalmanner. This means that you need to check if readers will be able to feel that your writings arespeaking to them. Try to imagine yourself as a reader, as you read out aloud. Does the tone sound natural? If it doesn’t, fine-tune it accordingly.

2. Have Someone Else Proofread

Sometimes when you read your entry over and over again, your mind starts to get complacent and will start missing out even the most obvious errors. Either that or you may not be aware that those are spelling mistakes, grammatically incorrect, etc. This is where someone else comes in handy to detect those errors which you fail to detect.
Another thing is that your perspective can get a little rigid if you’ve been working on your blog entry for hours or even a full day. This is a good time to get someone with a fresh outlook to see if what you’ve written flows well. Apart from that, that person can also provide some points you would’ve otherwise missed out because you may be so absorbed in the task of completing on time. If you can afford the time, discuss the content with him or her. You might be surprised at hownew ideas can arise from such an exchange.

3. Keep Your Target Audience In Mind

When you’re too familiar with a particular subject, you tend to write in a manner that only you yourself can comprehend. This is because you are aware of all the jargon and technicalities of your topic, and automatically assume that others would too. The end result is that you might be ignoring or excluding certain portions of your target readers who would otherwise enjoy reading your work.
To avoid such issues from arising, you have to constantly check if most of your intended readers will be able to understand your word choices. Check out the terms that you use in your text and see if the general public would be able to understand them without having to run them through an online dictionary.
The rule of thumb is to spell out abbreviated words and acronyms (with the shorter versions in accompanying brackets) when you’re mentioning it for the first time in your entry. Remember also to define your specialized terminologies as and when you think it’s necessary, so that your readers can continue following your post.

4. Check Your Facts And Figures

Even if your entry is perfect in terms of spelling, grammar and sentence structure, you will still stand to lose all credibility if you don’t get your facts and figures right. Especially when statistics are involved, make sure that the numbers tally and that you got it from a reliable source. A better practice is to include in the references so that your readers can be assured that you didn’t just make up your own assumptions. If in doubt, they can always check out the sources to get the full details.
As for facts, refrain from making any bizarre remarks (and inferring it is a fact) until you’re sure they’re backed by sufficient evidence. Such extreme assertions get more attention from the readers, simply due to their peculiarity. As a result, they get questioned and scrutinized more thoroughly. If your remark happens to be fictitious, it will be hard for your readers to trust what you write in future.

5. Trim, Trim And Trim

As I’ve emphasized over and over again in my previous posts, brevity is key. This is especially so in the context of the Internet, where users expect fast results fast and prompt information. The more words there are, the longer it takes for your readers to comprehend the entire piece of your writing. What happens is that some of your more readers who don’t have time for dilly dally may switch to other blogs instead.
trim blog post Bloggers: 5 Vital Things Before Hitting That Publish Button
(Image source: Fotolia)
You may wonder if shortening the post would take the joy out of reading your blog entries especially when readers find what you have to say entertaining. To that, I would say it depends on the nature of your blog. If the key thing you’re providing is information per se, then your target audience would expect you to do that efficiently. On the other extreme, if your blog is primarily providingentertainment value to your loyal readers, then the quality of your content has a huge bearing on your blog’s success. Length would then matter less so long as you keep charming your crowd.
Still, most blogs lie in the middle of the two extremes, so you will need to balance between keeping your entries brief, informative and entertaining.

Bloggers: 5 Vital Things Before Hitting That Publish Button

Grab the widget  IWeb Gator
Powered by Blogger.

Click the Like Button Below To Receive all updates via Facebook

Powered By Blogger Tricks |

Popular Posts