The Easiest Way to Add an Add Banner onto iOS App

  • Thursday, May 2, 2013
  • Posted by filial23
  • Labels:


  1. Add iAd.framework into your target.
  2. Move on to the storyboard and place an Ad BannerView object on an arbitrary view. Set its alpha value 0.0 to avoid displaying the white ad area before it's loaded.


  3. Make a connection to the field by pressing the control button and dragging a connection line to the .h file at the same time.

  4. After releasing the mouse button on the .h file, the popup appears to enter the connection's name.

  5. After entering the connection's name, move on to the .m file corresponding to the .h file.
  6. Implement two AdBannerViewDelegate protocols as following. When the ad is loaded, the ad banner appears gradually. When the ad is not loaded, the ad banner disappears gradually. Your can trust the below code because the app including the following code has been approved by Apple.

Shifting to Collaborative Consumption

  • Saturday, January 29, 2011
  • Posted by filial23
  • Labels:

Many Japanese are embarrassed to be exposed and abused their name by other people. That is why more than 90% Japanese don't show their own name on the Web. I don't use my own name on my blog as well. Even so it's valuable to say Hello! each other by showing real name when it comes to interactive social networking represented by Twitter and Facebook and so on. We never wear masks when meeting with someone first don't we? Meeting in the Internet has been getting close to meeting in person in these days. Of course there is a immeasurable distance in the Internet, but that distance is shortened by the social network. For example someone could hold a class union after a long time by finding his or her friends on Facebook. In this way the border between online and offline has been disappearing and we are starting to leave the Internet after staying in the Internet. It would not be too much to say that we are bringing back offline communities as our grandparents used to be. And we are going to be connected pear-to-pear and lend and borrow by sharing what we own. This movement that we abandon ownership is called collaborative consumption proposed by Rachel Botsman who is the author of 'What's Mine is Yours' .


About Japan's 2010 GDP

  • Sunday, January 23, 2011
  • Posted by filial23
  • Labels: ,

Japan's 2010 GDP was surpassed by China's. It's only a matter of time that Japan will be surpassed by India. It is by this, and other invisible pressures, that have many Japanese worried about the declining in the future. But I have a question. Is it true that Japan's growth has ended? Let's see the chart below. The blue line represents the population of productive age. Though the amount of the population of productive age is not shown in this chart, it's been declining 5 million since 1995. In spite of the declining population, Japan's GDP, as represented by the red line, has been increasing. When we focus on the GDP per capita, as represented by the orange fills, we see that Japanese individuals earnings are increasing year by year.

GDP per capita

What I want to say is that Japan doesn't have to compete with developing countries and doesn't stop growing. It will be possible to continue being prosperous if Japanese individuals earnings continue to increase or maintain.

HTML5 Geolocation Demo

  • Monday, January 17, 2011
  • Posted by filial23
  • Labels: ,

This is a demonstration of HTML5 Geolocation. Your location will be shown on Google Maps after your permission.






First I thought standard Geolocation APIs would work with all browsers including Safari and Firefox and Chrome, however it's impossible to get correct positional data from Chrome for Windows. I solved this problem by using Google Gears which requires to switch the code based on browser type as below.

var userAgent = window.navigator.userAgent.toLowerCase();
var chrome = (userAgent.indexOf("chrome") != -1) ? true : false;

Then get positional data correctly both Chrome and Firefox as below. If you are not familiar with the getCurrentPosition() method, please check the specification on W3C.org.

var geolocation = (chrome) ?
google.gears.factory.create('beta.geolocation') :
navigator.geolocation;

geolocation.getCurrentPosition(
successCallback,
errorCallback);

Finally get latitude and longitude according to what the browser type is, because these are not affordable via the coords object with Chrome, plot the client's position on Google Maps: I implemented PositionCallback and PositionErrorCallback as below.

function successCallback(p) {
var lat = (chrome) ? p.latitude : p.coords.latitude;
var lng = (chrome) ? p.longitude : p.coords.longitude;
var pos = new google.maps.LatLng(lat, lng);

var map = new google.maps.Map(document.getElementById("gmap"), {
zoom : 16,
center : pos,
mapTypeId : google.maps.MapTypeId.ROADMAP
});

var marker = new google.maps.Marker({
position : pos,
map : map
});
}

function errorCallback(err) {
document.getElementById("msg").innerHTML =
"Error using Geolocation API: " + error.message;
}


I've check if this program works with the latest version of Safari for Mac and Firefox and Chrome for Windows.
  • Safari - Sometimes it works unstably and often fails to get positional data on Mac. This problem can be solved by quitting Safari once. Probably there might be a few glitches in the code.
  • Firefox - It works with both Windows and Mac well.
  • Chrome - Google Gears For Mac is unavailable in this moment so that it doesn't work with Chrome for Mac.
WinMac
Safari×
Firefox
Chrome×
IE××


HTML5 Powered

27th lesson at One's Word

  • Sunday, January 16, 2011
  • Posted by Taka
  • Labels:

I've taken the 27th lesson at One's Word. It was also the 9th lesson by Joy.
I learned these new words in the warm up.

  • genitals - I want to have a boy next time and I started to talk about gender selection. The book I bought for gender selection says wearing trunks is better than wearing briefs to have a boy because getting warm genitals leads to have a girl.
  • superstition - There is a rumor about gender selection which depends on the month of birth. It would be just superstition although there are statistical data which month we could have a boy or a girl. 
  • gastric juice - My wife has been having morning sickness. She sometimes vomits only gastric juice because there is nothing in her stomach.

This is the material we used. We talked about Starbucks logo. There are several expressions I should speak with natural expression. For example, it is better to say 'I am familiar with the third logo.' than 'I know the third logo.' and 'I can recognize what company' instead of 'I can recognize which company's logo'.

  • commemorate - celebrate, elegance
  • poised - a person is more like balance. come from the word poise which means grace, elegance.
  • refurbished - renovate, repair to make it look new.
  • bonehead - a stupid person led to talk about boring. We enjoyed to talk about the difference of the talking style when having a date between Japan and Philippines. During my time boys and girls were apt to be silent, teacher Joy was surprised with this.
  • compelling - I asked if compelling can be used either as positive or negative. It is used both situations.
  • shackles - I asked if shackles can be used both in the situation and for the physical things. Both are O.K.
  • reminiscent - reminding of something
Starbucks can get attention to themselves by changing their logo. But I don't know they can increase the number of new customers and prevent to decrease old customers by changing the logo.

I recognized that there was a essence of marketing strategy in our discussion. What was the great in the class was her lead to consider such theme.

HTML5 Canvas Demo

  • Tuesday, January 11, 2011
  • Posted by Taka
  • Labels: ,

This is a sample of HTML5 Canvas. If the message 'HTML5 Canvas is not available on your browser.' doesn't appear, you can draw on the canvas below. You can change a color by clicking a color rectangle on the left hand. You can use a eraser by choosing white color.

Let's draw!




HTML5 Canvas is not available on your browser.


More than one person would be able to draw simultaneously and collaboratively from a distance as we can do on dabbleboard.com, if the browser transfers drawing data and scrolling data to the Websocket Server then the server pushes these data to other clients. But there is no Websocket Server available to connect from here and Websocket Client is not implemented on this page.

Key Word of 2011, Collaborative

We were separated through the competitive activities which was forced us to do during our childhood. But it is said that we are going to go back to live collaboratively as our grandparents used to do by participating in the social network. And the generation what we would call Millennial is thought to have the collaborative mindset naturally because the social network already existed when they were born.

Do you think now is the time we live collaboratively as our ancestor had done to go beyond the struggles suffer us in these days? I don't say we should be smarter than ever but say we should change what we look form me to everyone.