I have a website with articles and I want to share the adsense revenue of the articles with the article writers (in percentage of 90%). Iwe created a PHP code that rotates the ads, but I have a problem. Iwe discovered that It`s not enough the account ID, i need a the ad slot number, too.
It would be much better if the user should send me only his account id, because else each user would need to create the ad in it`s own adsense account and send me the whole code and than I would need to check if the ad is the size I need.
Any suggestions ? Is it possible to rotate the ads only by the user id ?
You can use the old (but well working) AdSense code. It looks like this:
<script>
google_ad_client="YOUR-PUB-ID";
google_ad_width=300;
google_ad_height=250;
google_ad_format="300x250_as";
google_ad_type="image";
google_color_border="f3f3f3";
google_color_bg="f3f3f3";
google_color_link="313135";
google_color_text="626262";
google_color_url="2c89bc";
google_ui_features="rc:0";
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Available google_ad_type:
'text_image',
'text',
'image',
for link units: omit this param.
Ad formats are:
728x90_as (Leaderboard),
468x60_as (Banner),
234x60_as (Half Banner),
125x125_as (Button),
120x600_as (Skyscraper),
160x600_as (Wide Skyscraper),
180x150_as (Small Rectangle),
120x240_as (Vertical Banner),
200x200_as (Small Square),
250x250_as (Square),
300x250_as (Rectangle),
336x280_as (Large Rectangle)
Link unit formats:
120x90_0ads_al (4 links),
120x90_0ads_al_s (5 links),
160x90_0ads_al (4 links),
160x90_0ads_al_s (5 links),
180x90_0ads_al (4 links),
180x90_0ads_al_s (5 links),
200x90_0ads_al (4 links),
200x90_0ads_al_s (5 links),
468x15_0ads_al (4 links),
468x15_0ads_al_s (5 links),
728x15_0ads_al (4 links),
728x15_0ads_al_s (5 links)
Just play around. The other values are self explanatory ... Width/height must match the selected ad format's width and height. That's how we do it on Pagewizz.com and Wizzley.com with some ten thousands of users.
Related
I want to extract the total bill from image receipts. I could extract the entire data present in the image but now I am struck with the problem of extracting only the information that I need.
This is the image that I have.
I am pasting the extracted information from the image
m cm lnnk 3mm: :33; no 1 z m
x Visut all! ms“; (or nulnunn mfn an an: nan.
Sub Iota] 19.56
TOTAL 19.56
VISA 1956
Fun 19.56
D!!! You Know 0
For ureat-tastlru dessens under 200
cahries, try our Triple Berry Frozen
Yogurt Sunda: a dish of Frozen Yogurt.
or a Vanma rozen Vugurt Done.
From this data I just want to extract the total bill. To get this I found out that I could use Ad Hoc Normalization (Adhoc retrieval). Can someone provide any insights on Adhoc retrieval. If there are any other option to extract the data from the image please let me do so. I am using tesseract to extract this information. Sometimes it is no giving the proper output. I could use some help in improvising the output given by the tesseract.
Why do you need ad hoc retrieval in this case? Since you are getting the OCR result from the receipt, you can simply perform a regular text search for the item appearing next to "TOTAL".
There are algorithms for image text search, but this seems like overkill for such a straightforward application unless there is a good reason to do so.
i'm trying to use iab.taxonome.org service to classify texts, and get error response -5 (text too short)
Here is what i'm sending to the service:
https://rest.taxonome.org/v1/taxono?me=A college basketball game at Allen Fieldhouse, in Lawrence, Kansas, the home of the Kansas Jayhawks
The history of basketball is traced back to a YMCA International Training School, known today as Springfield College, located in Springfield, Massachusetts&token=[...MyKey...]&ver=1
Indeed I had the same issue. After clearing this with taxonome support team I figure out there is a requirement for at least 500 words per classification.
I have asked to add it to the API reference page.
Double checking and editing my answer: It is depends which framework is being used to send this data. In case you are implementing the client and not encoding the URL string it won't work for you (e.g. space = %20).
Check the API example here:
https://iab.taxonome.org/api
Note: This question is not asking how to extract post_id's from the permalink. I'm asking what does the suffix of the permalink
actually means/stands for.
I'm working on an app that pulls facebook photos/statuses.
I use a regex to pull the post_id out of a facebook permalink, which normally looks like this:
https://www.facebook.com/username/posts/post_id
However, from time to time, I notice some permalinks that looks like this:
https://www.facebook.com/username/posts/post_id:0
Question:
What is ":0"? When/why does it occur?
Edit:
Example of facebook posts:
https://www.facebook.com/hehui.lim/posts/10202967332729156
And..
https://www.facebook.com/lengyein/posts/10152174297949341:0
I also noticed that it is possible to have :1, :2, :3.
Finally, after looking for such a pattern in some of the posts on my News Feed, I found something worth sharing.
One of my friend uploaded 4 different pictures (from the BlackBerry Smartphone App) almost at the same time. All four pictures had a separate Permalink and the message with each post was '{friend's name} added a new photos'. That is:
https://www.facebook.com/{friend's username}/posts/p_id:0 //Picture 1
https://www.facebook.com/{friend's username}/posts/p_id:1 //Picture 2
https://www.facebook.com/{friend's username}/posts/p_id:2 //Picture 3
https://www.facebook.com/{friend's username}/posts/p_id:3 //Picture 4
And, Facebook also generated the link:
https://www.facebook.com/{friend's username}/posts/p_id
which was showing all the 4 pictures grouped together and with a message '{friend's name} added 4 new photos.' That is, showing all 4 photos in a single post.
So, I guess Facebook uses it to group together the individual photos added by a user, one by one, within a certain period of time difference.
NOTE: This is not the same if all the four photos are added together at the same time (I've already tried it).
I think I know the answer.
Credits to Rahil Arora who noticed the sequence.
The scenario is as such:
A photo is being pushed from a third party application (Fb, Instagram, iPhone Gallery, etc) onto your Facebook wall by person A.
Person B is connected to person A.
Person B see's this update on his/her news feed. If B clicks hovers/clicks the timestamp, the relative link will be as the scenario in the question, and everything else is as described in Rahil's answer.
I use explode for a similar purpose.
refer to: http://www.php.net/explode
$str = 'https://www.facebook.com/hehui.lim/posts/10202967332729156:0';
$strEx = explode('/', $str, 6);
$strExId = explode(':', $strEx[5], 2);
echo $strExId[0]; // produces 10202967332729156
Array
(
[0] => https:
[1] =>
[2] => www.facebook.com
[3] => hehui.lim
[4] => posts
[5] => 10202967332729156:0
)
Array
(
[0] => 10202967332729156
[1] => 0
)
I want to store long description in sqlite database manager in iphone like this data.
"The Golden Temple: The Golden Temple, popular as Sri Harmandir Sahib or Sri Darbar Sahib, is the sacred seat of Sikhism. Bathed in a quintessential golden hue that dazzles in the serene waters of the Amrit Sarovar that lace around it, the swarn mandir (Golden temple) is one that internalizes in the mindscape of its visitors, no matter what religion or creed, as one of the most magnificent House of Worship. On a jewel-studded platform is the Adi Grantha or the sacred scripture of Sikhs wherein are enshrined holy inscriptions by the ten Sikh gurus and various Hindu and Moslem saints. While visiting the Golden Temple you need to cover your head. Street sellers sell bandanas outside the temple at cheap prices."
I am trying to take as description (VARCHAR(5000)) but when i execute query it is showing half text with dotted (....) like that http://i.stack.imgur.com/gyMqi.png
Thanks
The ... surely indicate that the full text is present in the database. It also indicates that "Sqlite database browser" truncates past a certain length:
m_textWidthMarkSize = s.value("prefs/sqleditor/textWidthMarkSpinBox", 60).toInt();
Is there a way to change the settings?
Edit
You can verify that the text is fully saved with the following query (replace theTable with the correct table name):
select length(description) from theTable;
What do you think? What's the best way how to get from administratior the short version of an article (in CMS)?
I have 3 possibilies in my mind:
1) Create two textareas (WYSIWYG) fro the short and for the full version of article
2) The short version will be (for example) the first 100 words of article
3) To have one sepparator (like <hr>) and the short version will be the text from the beggining up to the sepparator (full version will be up to the end)
A possibility would be to mix your first two ideas (I don't quite like the third one, where the content cannot live without the excerpt) :
Use an aditionnal textarea for the exceprt,
And if the user doesn't input anything in it, just use the first X words / sentences of the content.