Skip to content

Yelpshop's SEO Way – Earn Money

Jessica SEO Learning and Trying to Earn Money

Archive

Category: Article

Reporting Your Results

This is arguably the most important part of your SEO campaign! Keep an eye on your website’s organic traffic and mark any upward trends. Can this be attributed back to your link building campaign? If so, this is no time to be shy.

Best of luck!

The Budget is Set

So let’s imagine your client or boss (if you’re in-house) has promised to commit some time and money into a link building campaign. Huzzah! Finding yourself in a position to invest in SEO both financially and resourcefully is a great place to be, and these opportunities don’t grow on trees. So it’s tremendously important that this sum of money (and time) is invested wisely and provides a return, or else that “crazy SEO wizardry” might never make its way into the company budget again.

So how best to go about spending this money? That, of course, depends on a lot. There are different kinds of link building strategies for different kinds of businesses in different stages of their SEO development. Answering some of the following questions may help with the “Who am I?” questions your website is surely asking itself (your-site.com/existential-crisis).

  1. Have we done any link building in the past? In other words, how low are the “low hanging fruit”?
  2. What is a reasonable goal here? Increasing overall domain authority and maybe increasing long tail traffic? Or boosting a specific page in the SERPs?
  3. How does the competition stack up? How much work needs to be done to overtake the competition?

Directory Submissions

We COULD invest $2,000 pretty easily with directory submissions and it wouldn’t have to take anymore than 5 hours. The better strategy would be to invest a bit more time into the research phase before throwing $2,000 into a bunch of spammy directories.

Some of the big paid directories are a given; Yahoo!, Best of the Web, Business.com and JoeAnt have established themselves as strong, link juice-passing options. Assuming our web site is not found in any of these directories we’re looking at almost $800 already, and that isn’t considering the annual renewal cost of most of these top-tier directories. This leaves us with around $1000 for submissions to niche and local directories that are deemed worthwhile; Rand discussed the litmus test for identifying these worthwhile directories in a recent Whiteboard Friday.

Who should do it?

In most cases, anyone that is not currently listed in the top-tier directories should make the investment. You do NOT want to be submitting to directories if your site is of low quality, as your site could be declined and you won’t get that money back.

Investing in directories is a good idea early, but I wouldn’t suggest shelling out $2,000 in directories and declaring “mission accomplished”. The better plan would to be to submit to paid directories slowly over the course of a few months, supplementing directory submissions with some more creative link building strategies. Also, don’t forget that a sudden spike in backlinks followed by a lull of no new links is sure to set off a red flag or two.

Outreach (PR for links)

Outreach can be an inexpensive undertaking in terms of cash spent, but the real cost is in the time it takes to do it right. Commissioning under-worked call center staff or interns to call or email relevant site owners can be a great use of “found” time to generate links, but they’ll still need some guidance. I find its a great idea to craft a quick “SEO 101″ document, including bits about how search engines value links, anchor text, and other best practices. You might do well to give a primer on how to quickly evaluate a potential linking partner (say, only target sites with a domain authority over 55?), so your minions don’t go wasting their time on spammy worthless links.

Where outreach can get costly is in offering products, discounts, or other financial incentives to acquire links. Of course, we’re getting a bit close to grey-hat SEO here, but is there really anything wrong with offering free product samples to generate interest? I suppose the white-hat method of product samples/discounts/etc. is to not require a link back, but if you ask me this is where the whole distinction gets kind of silly.

Your odds of acquiring links through outreach get a lot better when samples or other incentives are involved. B2B? No problem. Incentives could include a free trial, a demo or white paper. If you do your homework, you’ll know who to approach to make sure your not just giving away hundreds of dollars of product without any hope of acquiring new customers.

Your overall outreach costs could get a bit fuzzy, and measuring a return will require some serious tracking in most cases. Some tracking ideas include:

  • Utilizing separate coupon codes for every outreach target
  • Sending visitors to a mini-site, landing page, or tracking URL
  • Making use of custom variables in Google Analytics to track the long term value of the campaign

Who should do it?

There’s not much of a disadvantage in spreading the good word of your company around via public relations, so really every business should do it. Your SEO mileage may vary, however, if your business’s website is not finished, a complete mess, or an otherwise unattractive linking partner. No matter how attractive your pitch, no one will want to link to a one-page or “coming soon” site.

No matter what, you’ll want to make sure you’ve got all your tracking ducks in a row, so that you can report good things to the big boss (wo)man.

Buying Links

Buying links is sort of like the elephant in the room. In one hand, we have 2,000 dollars, in the other, we have a mouse that can easily point its way off to a link broker network. We can spend 10 hours max and lock down $2,000 worth of links and have them all live by COB. Do those links lead to better rankings? They might. BUT! The likelihood of these links ceasing to pass value in the near future is extremely high.

Who should do it?

Almost no one. Investing $2,000 into paid links, especially from a link broker, is not liable to provide a long-term return on that investment. While I agree with Rand in his post about the somewhat discouraging amount of webspam making its way into the index, the optimist in me is hoping Google’s just working on some super spam detector and soon all the white-hats will be rewarded.

Linkbait/viral marketing

Call it what you will, but the name of the game here is content. Whether its a blog post, an infographic, a widget, a video, a funny 404 page, a comic, and so on, if its done well, there’s no greater way to invest in link building.

There are tons of great examples of linkbait that have cost less than $2,000, but the most recent campaign that went hot was the whiteboard HOPA girl. After conceptualizing the project, theChive put out a job listing for a “girl next door” model at a rate of $400 per day. Even if the shoot took 2 days, theChive probably paid no more than $1,000 to make it happen.

Who should do it?

Most anyone. With a great idea, $2,000 is plenty of money to build some great links via content marketing. Of course, the important part is the great idea. This is where your 60 hour allotment of time may come in handy for brainstorming. If the idea can’t be executed in-house, tap your network for a good resource to help, or use services like oDesk, guru, and eLance to find a freelancer.

One caveat here is that your link building campaign can only go as far as your (social) network will take it. Before hitting “publish”, make sure you’ve got a good seed of retweeters, rebloggers, and likers standing by.

Post to Twitter

CSS is a remarkable technology, capable of doing things that I wouldn’t have even dreamed of when I was first introduced to it. And, with added support for rounded corners, box shadows, text shadows, rotation and a wide range of other possibilities, web designers and developers can accomplish all sorts of amazing things when it comes to applying a design to a website.

But are we starting to take things too far?

The design community is awash with all kinds of different “CSS experiments” where people attempt to do some pretty incredible stuff (and quite often succeed). In an article I wrote for Six Revisions a couple months ago, I listed five of the experiments that I found really interesting:

Each of these experiments takes a different approach. Some, like the line graph, have some practical applications in the real world, while others like the CSS fail whale are completely and entirely impractical. It’s certainly interesting to know that it can be done, but that doesn’t necessarily mean that it should be done.

Let’s Be Practical

I’ve been thinking this way for a while, but it was really cemented in my mind when I recently read Faruk Ateş recent article “Pure CSS Icons: Make The Madness Stop,” which I picked up on from a short post over on Think Vitamin. In his article, Ateş notes that “some people have started experimenting with CSS as a ‘design tool’ and it suddenly hit upon a large audience.” He also writes:

how usable are these snippets of CSS and markup, really? Is it easy to plug them into your website as you’re designing it? No. Is it easy to plug them into your website as you’re developing it? No. Is it easy to adjust them once they have been integrated into your website? No, no, no!

I have to agree wholeheartedly with this. Before this week, I’d looked at a bunch of the CSS experiments out there, and occasionally appreciated some of what they manage to do, but i had never really taken the time to examine the actual styles themselves. So, I took a gander at the code for these CSS social networking buttons:

Social media icons created entirely with CSS Social media icons created entirely with CSS 

Just as I expected, there are lines and lines of different styles, all just to create one icon. Is it impressive? Yes. Creative? Certainly. But it’s just not practical. This is also not an easy way to create icons. It probably takes long hours of careful consideration and experimentation to create these kind of graphics. I could create similar icons in Photoshop in less than an hour, and they would probably look better too (smoother, better anti-aliasing).

Finally, as Ateş clearly notes, the whole concept of maintenance becomes problematic. Adjusting an icon should be about moving pixels, not about changing CSS rules. It just screams at me as being the epitome of impracticality.

Of course, it should be noted that Nicolas Gallagher, the creator of the above cited icons does make note that “CSS is not necessarily the most appropriate tool for this kind of thing” (again, cited by Ateş).

HTTP Requests?

While Gallagher’s icons are presented and framed mostly as an experiment, there is another set called “Peculiar” which is actually available for sale. Yes, that’s right, they are now selling CSS icons – and at $25 for just 45 icons, the price seems a little steep too. Here is the preview of the icon pack:

These icons are created entirely using CSS These icons are created entirely using CSS 

Honestly, I like the look of these icons. They are small, elegant and beautifully wroght, and so from a craftsman’s perspective, I tip my hat to Lucian Marin for his fine design work.

However, in the preamble to the Peculiar site, he writes “It was created for sites and web applications that depend on fewer HTTP requests as possible or don’t need to use any image at all.” Now, I understand the need to cut down on HTTP requests to improve the overall responsiveness of and load times of our sites. Really, I get it.

But, before everyone starts running out and buying up CSS icons left, right and center, I just have to ask: is one more request really going to make that much of a difference? Because all you need is one. A single, well crafted CSS sprite can contain all of these icons, in multiple hover states if you need them too. Then, all your styling is just a matter of background positioning.

Also, I have to wonder how much bandwidth difference there would be. I’m not about to fork out $25 to download icons that I’ll never use, so I’m not sure how much styling there is involved with these little beauties. Based on what I saw from the Gallagher example though, I would imagine it would be a fair bit. Even minified, it’s probably still going to be a significant amount of data, and with the really minimal amount of colour data that would be involved with creating a CSS sprite of these icons, I just don’t feel that one extra HTTP request and a few extra bytes of information is really worth the hassle.

In the Spirit of Semantics

I’ll admit that I’m occasionally as guilty as the next guy for occasionally adding in an extra
<div> or <span> to be able to achieve something visually on a site that I can’t seem to figure out how to do otherwise (or at least can’t figure out how to do efficiently). I try to avoid it, though, and the last thing I want to do is to start filling up my code with all sorts of extra tags to help build CSS icons.

That’s just not semantic coding.

Now, looking at the Gallagher example, he does an excellent job of keeping his markup beautifully clean, relying heavily on the :before and :after psuedo-classes for apply his styling. So, from an HTML perspective, I would have to say this is semantic (though I’m sure that many other examples utilize some excessive HTML elements, just for the purposes of providing “hooks” for their styles).

That being said, semantics is a discipline all about of meaning, and semantic HTML is about writing code that supports the meaning of a document, while using CSS to dictate the visual rules by which that content is displayed. CSS is about taking the form and structure of the document and representing it in the browser. Or, to put it another way, it’s about facilitating the graphical presentation of content.

It’s not about creating the graphics themselves.

That’s the realm of vector-based and/or pixel crunching software like Photoshop, Fireworks, Illustrator and so on. And so, it seems to me that using CSS to create graphical elements like icons goes against the very purpose for which the technology was ultimately created. By doing so, it deviates from its own core meaning, and therefore strikes me as unsemantic, at the very least in spirit if not in a strictly literal sense.

Tables Again?

Though it doesn’t form a perfect parallel, in some ways this issue of CSS icons (or other graphics) can be compared to using tables for layout. There are a few key reasons why tables for layout is a bad idea:

  1. Bloat – All the necessary table tags fill up your HTML, making it big and ugly and an absolute nightmare to manage. I used to use tables back in the day, and I hated it for this very reason
  2. Inflexible – Tables are rigid, unmoving things, and getting them to do anything even remotely complex was a huge pain. Empty cells and complex ROWSPAN and COLSPAN properties can only take you so far without becoming entirely unmanageble.
  3. Purpose – Most of all, we have to recognize that it just wasn’t what tables were designed to do. Tables exist in HTML for the purpose of presenting tabular data, not for creating layouts. Yes, you can, create layouts with them. Yes, with a bit (or a lot) of effort, you can bend them to your will, but it’s just not what they were created to do.

If you’ve been around the web design and devlopment industry for very long, you probably already know how much of a faux pas table-based design is considered. Well, when it comes to CSS icons, consider these thoughts:

  1. Bloat – All the necessary CSS declarations will really bloat up your style sheets, making them an absolute nightmare to manage. Wait, didn’t I just write those same words? Also, depending on how the icons are achieved, you might find your HTML bloating up with extra elements too.
  2. Inflexible – Again I admit that people have done some really incredible things with CSS, but compared with a real graphics program, CSS generated graphics are incredibly limited in what they can do.
  3. Purpose – As we’ve already discussed at some length, CSS wasn’t designed as a tool for creating graphics, despite the fact that people are able to do some pretty amazing things with them, like the Peculiar and social media icons we’ve already looked at. Impressive? Yes. The right tool? No.

Obviously, there are some key differences between CSS icons and using tables as a layout tool, but the similarities in these three areas are somewhat startling. I also think it works as a really excellent illustration of something that I pointed out back at the beginning of this article: that just because something can be done doesn’t mean that it should be done.

Conclusion

Of course all of this is my personal opinion, and I leave the final decesion up to you. If you think that CSS icons make sense for you to use in your own work, then feel free to take advantage of them. I’m also not trying to talk Marin out of making any money from his Peculiar icon set. If he can manage it, then more power to him.

This article was simply the presentation of my own thoughts on why I don’t thinks that CSS icons (or any other, similar graphic) are really a viable solution for displaying graphics on the web. I hope my points were clear enough, and that they provided some food for thought on this particular subject.

What about you? How do you feel about the idea if CSS icons? Do you think they are viable?

CSS 是了不起的技术,我第一次用到的时候,觉得这是我做梦都想不到的东西,随着 CSS3 的引入,圆角,阴影,旋转等等技术更将 CSS 带到前所未有的高度。然而,关于 CSS,我们是不是已经走得太远,本文以一个 Web 设计师的角度对 CSS 的一些实验性应用做了另一种思考。

那些有关 CSS 的前卫实验

几个月前,作者在 Six Revisions 发表了一篇文章,介绍了 5 个有趣的 CSS 实验:

每个实验都是用了不同的方法,其中一些,如 CSS 线图,在现实中可以找到实际的应用,其它的,如

让我们实际一点

上图是用纯 CSS 实现的社会媒体网络标志,很神奇不是?

我最近读了 Faruk Ateş 的文章,Pure CSS Icons: Make The Madness Stop,文中对这一做法提出了质疑,作者表示,一些人开始尝试将 CSS 当作设计工具并迅速引发大量效仿,然而,这种做法有多少易用性可言?它并不容易集成到你的设计与开发当中,也不容易调整。

就像上面的完全基于 CSS 的社会网络标志,无非是一堆各式各样的线条的组合,固然令人印象深刻,也算有创意,但并不实用,因为创作这样一个标志可能需要几个小时的艰辛劳动,在 Photoshop 中画一个同样的图根本不费任何力气,而且效果更好(更细腻)。

Ateş 认为,这种方式生成的图标的可维护性也很成问题,调整一个图标原本只需要调整像素,现在却需要修改 CSS 定义,同时,上述 CSS 标志的设计者 Nicolas Gallagher 也表示,做这类事情,CSS 并非最适合。
降低 HTTP 请求?

上面这幅图中的图标全部用 CSS 生成,而且作者将它们拿出来卖,40个图标卖25美金。不得不承认,这些图标设计得非常漂亮,作者设计这些 CSS 的初衷是为那些使用的网站降低 HTTP 请求数,因为这些图标不需要额外的图片文件请求。然而,一个小小的图标文件带来的 HTTP 请求真的很值得一提吗,何况,使用 CSS Sprite 技术,这些图标完全可以放在同一个图片中,靠 CSS 定位显示,这样,只需要一个 HTTP 请求就够了。而且,我实在怀疑,这些 CSS 版的图标到底能减少多少带宽。

本着语义化的精神
必须承认,我有时候会为了实现某种视觉上的需要,而额外使用 DIV 或 SPAN 等标签,这很不语义。然而 CSS 绘图是更不语义的事,CSS 的真实使命是对网页中的内容进行修饰,而不是创建内容本身。网页中的图形本身属于内容的范畴,不应该由 CSS 创建。

Post to Twitter

Copy 一向是中国人的强项。腾讯的成功向我们证明了,Copy不是注定失败,小公司的Copy也许也能成就一帆大事业。

Google的成功让很多人都眼红,做为80年代的中国学生,大多数都习惯用Google(至少我本人就是)。

Baidu的中国暂时还是占据着大部分的人群。让我们看看Baidu统计与CNZZ统计横向评测。

流量统计作为互联网站点最基础的数据分析工具,几乎与每个站长、互联网从业者相关。在互联网这个没有硝烟的战场上,流量统计工具就像打仗用的武器。能否选好适合自己的武器、用好武器,很大程度上决定了我们的胜败。

  今天我们就来说说百度在今年新推出的免费流量统计工具:百度统计,与之对比的是统计工具:CNZZ(含全景统计和广告统计)。今天我们来横向测评下这两款武器。

  一、基本的统计数据指标

  数据指标是一切数据的基础,反映了流量分析的广度:

  CNZZ各个报告的指标,如下:

  1.时段分析:PV,独立访客,IP,人均浏览次数、新独立访客、人均浏览次数

  2.搜索引擎、搜索词:搜索次数、关键词个数、独立访客、IP、人均搜索次数

  3.来路页面、域名:来访次数、独立访客、IP、新独立访客、新访客浏览次数、站内总浏览次数

  4.受访域名、页面:浏览次数、独立访客、IP、人均浏览次数、平均停留时间、跳出率、进入次数、离开次数

  5.地域、浏览器等:浏览次数、独立访客、IP、人均浏览次数、平均停留时间

  百度统计各个报告的指标,如下:

  1.趋势分析(时段分析)、来源类型、搜索引擎、搜索词、推介网站、地域、浏览器等系统环境报告:浏览量、访问次数、访客数、新访客数、IP数、跳出率、平均访问时长、平均访问页数、转化次数、转化率

  2.最常访问、入口页面、退出页面报告:浏览量、入口页次数、退出页次数、平均停留时长、退出率

  3.还有一类专门针对百度推广的,指标除了1)所列的指标以外,还包括:点击、消费、平均点击价格、平均转化成本、收益、利润、投资回报率

  点评:

  1、CNZZ各个不同的报告提供的指标有一定差异,有针对性,不过比较混乱,体系不够清晰。

  2、百度统计各个报告的指标设立的较有章法,各个最细的报告上都提供了完整的网站流量和质量评价指标,但有点过于严谨,不过数据也算完整齐全。

  3、在PV,UV,IP这些基本的统计指标上,百度统计和CNZZ没什么明显差异,而在流量质量评价方面,百度统计采用了基于Session的统计方法,这点是比较科学的。

  二、数据统计的维度

  有指标,还不行,还要看可以从哪些角度来拆分数据。这决定了数据的深度:

  CNZZ的统计维度基本上都是一维的,有少许两维交叉:

  1、一维:时间(按天、按小时)、搜索引擎、关键词、来路域名、来路页面、来路分类、受访域名、受访页面、、浏览器、分辨率、操作系统、语言、终端类型、插件安装、回头率、访问深度

  2、二维:搜索引擎×搜索词、地区×网络接入商

  百度统计除了各种一维统计以外,还提供了一些多维交叉分析:

  1、一维:时间(按天、按小时)、搜索引擎、搜索词、推介网站、推介网页、来源类型、地域、、页面分析、地域、浏览器、操作系统、屏幕分辨率、屏幕颜色、flash版本、是否支持java、语言、是否支持cookie、网络服务提供商

  2、二维及多维:搜索引擎×搜索词、时间(按小时)×(来源类型、搜索引擎×搜索词、推介网站)×地域

  点评:

  1、CNZZ数据维度简单,提供的地区×网络接入商比较实用,但比较难做深入的分析。

  2、百度统计提供的数据维度非常丰富,特别是时间×来源×地域的组合,可以定位到某一个外链分小时的流量变化,帮助很大,当然,系统上手难一点。

  三、实时网站流量统计

  不少草根站长都有盯着数据的习惯。看看这方面分别满足的如何:

  CNZZ:

  1、最近15分钟每分钟的PV和IP数、总的PV,总的IP数

  2、最近15分钟的访客访问记录

  百度统计:

  1、最近30分钟每分钟的PV和独立访客数

  2、最近500条的访客访问记录

  点评:

  1、百度统计的访客访问记录,帮我把用户的访问过程都排列好了,而不像CNZZ是按照IP找,大家都知道一个网吧里出来的都是一个IP,查出来的访问记录那叫一个乱;

  2、百度统计没有cnzz那个最近15分钟的数据, 不过它的最近30分钟的Flash会自动刷新,这点还算方便

  四、易用性和可用性

  1、易用性方面:

  CNZZ:界面上广告比较多,但是大家都习惯了,操作起来比较简单。

  百度统计:界面简洁,非常清新,没有广告,报告中的折线图、饼图Flash漂亮,尤其是概况页那个分小时的对比图。

  2、可用性方面:

  CNZZ:中午的时候数据比较难查出来,偶尔还出点小问题。

  百度统计:查询速度挺快的,也较稳定,数据的存储量还挺大的

  点评:

  1、CNZZ要挣钱,肯定得有广告,不过这都还好,关键是偶尔出点问题这一点还是挺让人抓狂的。

  2、百度毕竟有很多服务器,带宽也大,所以易用性和可用性方面,百度统计胜出。

  五、高级分析和增值功能

  这方面,内容很多,一般小站点用不到,可以说日IP小于100的不用往下看了,简单做了列举,有兴趣的朋友可以自己比较:

  CNZZ:

  升降榜:用于追查流量变化原因的功能,提供了关键词、来路、受访页面三个维度的分析

  站内搜索:就是使用之后,在你的网站上增加一个浮出层,提示用户还搜索过什么词来到你的网站,吸引用户点击,但是看起来用的人并不多,可能是对大多数网站用户来说是一个干扰。

  短信报警:可以设置流量超过或低于一定值,就发短信预警

  广告统计功能(广告统计):可以设定某个特定来源点击过来的URL,统计特定来源流量,或者设定页面上广告位点走之后的链接,统计页面链接被点击的次数

  转化分析(全景统计):这个是收费的,可以设置一个用户浏览过程,看用户在每一个步骤上的流失率

  点击链接图(全景统计):可以分析页面上各个链接的点击次数

  页面访问轨迹(全景统计):可以分析带来流量的页面和带去流量的页面

  行业分析:链向CNZZ的行业分析站点

  站长工具:链向CNZZ的站长工具页

  百度统计:

  升降榜:同样用户分析流量变化的原因,提供了搜索引擎、搜索词、推介网站、推介网页、来源类型等多个维度的变化分析

  子目录:可以设定对部分页面做单独的分析,而且针对设定的页面集合做全套的数据分析。

  指定广告跟踪:可以设定在页面URL中设定多个参数,分析制定来源的流量,用户广告分析

  百度推广流量分析:与百度推广密切结合,能够准确分析百度推广的流量情况

  事件分析:在后台设置,不需要修改前台代码,即可统计页面上的各种控件被点击的次数

  转化分析:可以设定一个目标和步骤,能够分析各个来源的用户到达目标的次数,以及在实现目标各个步骤上的流失情况。

  页面上下游:可以对设定的页面,分析其上游、下游页面的关系;

  整合百度指数:在搜索词报告里,可以直接点击查看这个词的百度指数;

  整合相关搜索词:在搜索词报告里,可以直接点击查看与这个词相关的10个热门搜索词;

  搜索来路URL:在搜索此报告里了,可以查看每个搜索词对应的搜索URL;

  百度风云榜:链接到百度风云榜

  百度收录量查询:传闻要出,提供最准确、最权威的百度收录量数据,

  热力图(开发中):提供鼠标在页面上点击的位置和链接。

  点评:

  1、百度是站长无法忽视的重要流量入口,百度统计一旦利用起这一点优势,将非常可怕;

  2、百度统计的收录量查询、热力图都是非常值得期待的功能;

  3、广告分析方面,百度统计把来路广告和去向广告都整合了在一起,而CNZZ则分布在好几个系统中,所以百度统计这方面的用户体验较好;

  4、百度统计子目录的分析非常灵活,CNZZ没有类似功能,这一点我的朋友们反映挺多的;

  5、CNZZ有短信预警这种功能,这个挺不错的,百度的系统稳定速度快却没有这个功能,还是要好好改进下的。

  总结:

  1、往深了看,从百度统计的整个分析指标和分析维度架构(基于Session而不是基于PV,从一开始就以流量质量评估为切入点)就可以看出来,它的志向是蛮高远的,不是想做一个简单的流量统计工具,而是一个流量分析和优化工具。事实上,国外的流量分析早就进入了网站分析的时代,用户吸引和用户保持并重早已是共识,而国内还相对落后很多。近年来,随着越来越多的大企业开始重视网站分析,WAW活动的开展,一批独立博客的兴起,越来越多的人也接触和认识了网站分析。所以说百度还是比较高明的,瞄准了这个市场,同时催熟这个市场。

  2、CNZZ目前还没有什么清晰的盈利模式,而且CNZZ的整个分析结构决定了,它是第一代以PV为统计单元的流量统计工具。目前有很强大的用户习惯和用户基础,不过技术和需求的潮流是不可逆转的,关键是看谁可以尽快找到市场的爆破点。

  3、从武器角度打个比方来说明现在的形势,CNZZ就好比是一个刀,已经被磨得很锋利了,而百度统计则颇有一些枪的意味,并且正在被不断升级,如果配上百度输送的子弹,估计也小觑不得。

  来源:朱韫晖投稿,作者电子邮箱:pkuzyh(at)pku.edu.cn

Post to Twitter

周二,7月27日,做地铁看报时,读到关于计算机世界评论腾讯的问题。我没有读过计算机世界写的原文。但大致的内容报上还是略有写到。

当时我就和朋友说,这是个说不清的问题。看事的角度不一样,结果就不一样。

当时有一句话很有道理:大公司创造新的东西,其他人模仿,互联网本身就是这样。

其他人模仿成功,不代表他就是不好,他的成功一定有他的原因,以及一小部分的创新等。

最新一期计算机世界的封面报道是《“狗日的”腾讯》,看上去很生猛。用Keso的话说,就是起了个极具轰动效应的名字,但“实际上这篇报道也没写出什么新东西,不过是把互联网行业流传已久的‘全民公敌’的说法,给具体化了一下,迎合了一把所谓的‘民意’,属于比较讨巧的报道。”

不过关注点不在报道是否讨巧,而在于腾讯的创新问题,这让我想起了智猪博弈。智猪博弈是一个著名的纳什均衡例子:猪圈有大猪小猪,任一猪可选耗2份 体力踩食槽踏板,放出10份饲料。小猪踩,可食1份,大猪得食9份。大猪踩,可食7份,小猪得食3份。问大猪小猪各应采取何策略?

答案是:小猪选择等待,让大猪去按控制按钮,而自己选择“坐船”(或称为搭便车)。因为——

  • 当小猪踩动踏板时,大猪会在小猪跑到食槽之前会吃光绝大部分食物,除减去劳动耗费,小猪净亏损1个单位,大猪净得9个单位;
  • 若是大猪踩动了踏板,则有机会在小猪吃完落下的食物之前跑到食槽,争吃到半数以上的残羹,小猪净得3个单位,大猪净得5个单位。

于是我们看到一个现象:大猪忙不迭地踩了踏板后,赶忙跑回抢食物,而小猪则静候在食槽边“坐船”、“捡漏儿”。如此往复。

“小猪躺着大猪跑”的现象是由于故事中的游戏规则所导致的。规则的核心指标是:每次落下的食物数量和踏板与投食口之间的距离。

  • 方案一:减量方案。投食仅原来的一半分量。结果是小猪大猪都不去踩踏板了。谁踩谁吃不到。
  • 方案二:增量方案。投食为原来的一倍分量。结果是小猪、大猪都会去踩踏板。谁想吃,谁就会去踩踏板。谁踩都有足够的吃。
  • 方案三:减量加移位方案。投食仅原来的一半分量,但同时将投食口移到踏板附近。结果呢,小猪和大猪都在拼命地抢着踩踏板。等待者不得食,而多劳者多得。每次的收获刚好消费完。

微软中国的刘润对智猪博弈增加了一个注解: 小公司如小猪。的确,在游戏的最开始,一定会有敏感的小猪发现会带来食物的踏板机关,于是第一轮是小猪去踩踏板,或者大猪小猪一起踩。等到聪明的小猪发现 原来博弈的结果注定亏损,于是进入第二轮——“小猪躺着大猪跑”。等到游戏规则改变,不思进取的小猪突然发现“等待者不得食”,这时的破口大骂多半因为失 去第三轮资格的愤怒。

其实创新问题,说到底是创新的成本问题,无关是疼讯还是痒讯。创新也犹如踩踏板,无论腾讯还是其他大小公司都在计算成本。踩了踏板却没抢到多少食物的小猪,如果大骂大猪抢食,明显是智慧不足导致的恼羞成怒。大连做电子商务的Leon liu说了一句话很实在:“你知道腾讯的核心优势是什么吗?有人说是模仿,有人说是创新,腾讯人自己的回答是:耐心。”腾讯最核心的竞争力是耐心,懂得在合适的时间推出合适的产品。

我们总在崇拜国外的互联网生态环境比较好,那是因为他们的游戏规则已经更接近方案二或方案三了。事实上,《“狗日的”腾讯》并非谩骂,尾声的一句话说到了关键:“腾讯庞大的身躯,依然潜伏着诸多暗流”。腾讯本身被很多东西裹挟,鸭梨很大,而且也意识到自己的危机。是啊,有智慧的猪都知道:当踏板与投食口间距较远,小猪策略的收益比最高。

可是,但凡是有别的办法,谁又愿意做大猪呢?(作者:Lorna)

以上文章引自:http://lazylorna.com/archives/1658

本人相当的欣赏大猪小猪的例子。发人深思~!

Post to Twitter

This Article is from Danny at Whiteboard Friday. I don’t know if there is many people like me, want to do a job what I am interested in and what I am doing now. It’s not so easy to get the samoue kind job as you thoughts. So when I saw this article, I hope others experience will help more people to get SEO Job as they want.

If you have  yany good idea or any advice or just want to complain your life, WELCOME to leave your comments.

It is about how to get an SEO job. In it, he divulge the secret of how I suckered his way into how I earned this job. He also do the worst impression of his life and finish with a shocking twist that he guarantee you won’t see coming.

Apply for an Internship

* Leverage Start-ups – Start-ups are particularly well suited for interns because most of them can’t afford to pay people :-)
* Use the “Godfather Approach” – Make the company an offer they can’t refuse. (Try working for free and provide your own laptop in exchange for an internship,)

Dive Right In

* Build Test Sites – After reading the Beginner’s Guide to SEO, try building simple sites to target long tail terms.
* Offer to Help Charities – Like start-ups, charities tend to not have a lot of extra resources. Take advantage of this by volunteering.

Create a New Niche

* Leverage What You Already Know – Combine your current knowledge with what you want to learn to become the best in a given niche.
* Educate Others For Free – Earn links and share the love by teaching others about what you learn.

Join the Community

* Participate in Blogs/Social Media/Conferences – Get your name out and build your network by participating online.
* Take Advantage of Osmosis – Get into an environment where you learn simply by being in the right place.

Again, If you have  yany good idea or any advice or just want to complain your life, WELCOME to leave your comments. Yelpshop isn’t a borning blog who just focus on one thing. What I want is to make more friend and share more good with thing and help more people who is in trouble.

Thanks for your coming….

Post to Twitter

I want to know Perl for a long time. As I know, it’s the earlier and powerful language. I don’t want to master it, just you know, know some thing about it to open my eyes to more web design language. So this article is good for me, basic knowledge.

Abstract

Learning how to program can be difficult and is, perhaps, best done by reading well-written programs. Perl is a powerful programming language that is well known in its community for the development of security tools. A programming language is normally compiled, but Perl, the Practical Extraction and Report Language, is interpreted by using the Perl interpreter. Perl has many unique characteristics: anyone who has ever been involved with programming languages has dealt with variables. Variables, a data-type that are normally declared prior to being initialized (or assigned a value), do not have to be declared in Perl. Perl is an object-oriented, high-level programming language, meaning that its classes are the abstraction. The object members, whose name reflects a type that names the class, are concretely defined. A class is instantiated, meaning that the use of a library-defined class is used for an instance of its use. In Perl these are called Modules. The object members comprise the class and define the methods and the data members worked on by those methods. Perl is unique in that rather than declaring exactly what type of data we use (an integer, a character, a string of a characters, a type of arithmetical and or logical unit of measurement), we just define the data as a scalar, an array, or an associative array (a hash). Perl has many built-in functions and mechanisms that empower it, and to use any of those (such as the built-in cryptography), you must first understand how these data types work. So we will go by example, and see how far of an understanding we can get. There are a plethora of downloadable Perl scripts at the script repository at technet.microsoft.com.

So How Do I Start?

The Perl interpreter can be downloaded at www.perl.org or http://www.activestate, amongst others. When installed, you can set the environmental variables for its path by using this command (we assume a Win32, or Microsoft Windows, command prompt):

C:\Scripts\> set PATH=%PATH%;.;C:\Perl\bin

When we set the path, the command “perl”, which is used to interpret a perl script, can be used anywhere in the command line. Before beginning, however, we should define a few terms. Perl can be written using 7-bit ASCII. One keyboard character is considered 8 bits, or one byte. When there is data compression, however, the printed character is actually 7 bits. But Perl can also be written using Unicode, in which the characters are two bytes. But what does that actually mean? Well, the Java language was developed to use two byte characters during a time in the world’s computing industry when global translations were necessary. Different characters, particularly those of the Arabic and Far Eastern nations, did not translate into a simple byte character. Making the characters into Unicode, or UTF-8 (any variation of the two byte encoding scheme), enabled those translations, and in most cases, the conversion is automatic.

Perl has commands, such as perldoc, pod2html, etc which are used to read the generated site information and pod documents. For instance:

C:\> perldoc  Perl.pm
will open the document with the .pm file extension.
Pod2html will take a .pod document and convert into an HTML web page.

A Perl Script Walkthrough

Here is an example of a Perl script. It will appear strange, because the techniques we are going to learn are not defined, but they will come into sharper focus:

print "What is your name? ";
chomp($name = ); # Program waits for user input from keyboard
print "Hello, $name, do you want to learn Perl right now? ";
chomp($response = );
$response=lc($response); # response is converted to lowercase
if($response eq "yes" or $response eq "y"){
print "Good Decision! We'll start with this example.\n";
}
else{
print "O.K. Try again later.\n";
}
$now = localtime; # Use a Perl function to get the date and time
print "$name, you ran this script on $now.\n";

We’ll name this script Script1.pl. First, notice the .pl file extension. Now we run the script on the command line. We first notice that the script is asking for user input (making the script “interactive”):

c:\Scripts>perl Script1.pl
What is your name? Joe
Hello, Joe, do you want to learn Perl right now? yes
Good Decision! We'll start with this example.
Joe, you ran this script on Mon Jul  5 19:44:09 2010.

Perl statements are always terminated with a semi-colon. The hash mark # indicates the writer’s comment, and is overlooked by the interpreter. We use the “print” function, but notice that there is no newline escape sequence. A computer’s screen on a command line has a cursor blinking to indicate where the next sentence is going to occur. If the cursor has reached the edge of the screen, or if the user has hit the Enter (return) key, then the cursor drops down one line and goes to the far left. This is called Carriage Return-Line Feed. In programming languages like C however, an escape sequence like “\n” are used:

Perl statements are always terminated with a semi-colon. The hash mark # indicates the writer’s comment, and is overlooked by the interpreter. We use the “print” function, but notice that there is no newline escape sequence. A computer’s screen on a command line has a cursor blinking to indicate where the next sentence is going to occur. If the cursor has reached the edge of the screen, or if the user has hit the Enter (return) key, then the cursor drops down one line and goes to the far left. This is called Carriage Return-Line Feed. In programming languages like C however, an escape sequence like “\n” are used:

“Hello, what is your name?\n” # this prints “Hello, what is your name?” on the screen. We do not need to use this escape sequence, here because many times in Perl you can manipulate strings by using functions like chop() and/or chomp().

Note:

Most computer programming languages will contain three file handles. They are called Standard Input, Standard Output, and Standard Error. A file handle is merely a reference to a file in order to open that file. Standard input (STDIN) means any user input mechanism: the keyboard, the mouse, etc. Standard output means how the computer’s information is outputted to the user: the console screen, a printer, sent to a database, etc. Standard error is not in the scope of this topic.

Now consider this brief snippet:

C:\> print “Enter your name:”  ;
        $name = <> ;
        print “Enter your age: “  ;
        $age = <>;
        print “$name”;
        print “$age”;

The output will be:

Enter your name:  Joe
Enter your age: 44
Joe
44

Now it is time to introduce scalars, one of the three data-types used in Perl.

Scalars

The snippet print “Hello, World\n” will print Hello, World to the screen, or standard output. The word print calls the print function, which takes the text from within the quotes and displays it on the screen. As we have seen, the \n symbolizes a new line or the carriage return. Now we introduce a scalar:

$myscalar = ‘Hello, World\n’
print  “$myscalar” ;  # prints the value of $myscalar

Scalars are declared by using the $ symbol followed by the variable name. The first line feeds the text within the quotes into the scalar, whose name is $myscalar. So why did I use single quotes in the first line and double quotes in the second line? Because Perl performs variable interpolation within double quotes—this means that it replaces the variable name with the value of the variable. This will become clear in the following examples:

$myscalar = ‘Hello\n’ ;
# variable $myscalar has the value Hello\n
print  ‘$myscalar’  ;
#because I used single quotes there is no variable interpolation.

The output will be:

$myscalar

The following is an example of variable interpolation:

$myscalar = ‘Hello’ ;
print  “$myscalar”

The output will be:

Hello

This is the difference between single and double quotes. Getting user input is performed by using the diamond operator, <>. It basically grabs input from the user (standard input) to make a program more interactive. Consider the following example:

print ‘Enter your name:’ ;
$username = <> ;  # the user will enter a text which will be fed into the scalar
print “Hi, $username” ;
The output will be:
Enter your name:  Dave
Hi Dave

The program will print the text “Enter your name:” on the screen and will wait for user input. The text entered by the user will be fed into the scalar $username. Then the program will print Hi, followed by the text entered by the user. Now consider the following code:

print  “Enter your name:” ;
$name = <>;
Print “Enter your age:” ;
$age = <>;
print “$name”  ;
print “$age”;
The output will be:
Enter your name:  Joe
Enter your age: 44
Joe
44

But why did Perl print Joe and 44 on separate lines? There was no newline in the program (\n) character in the program. What happened is that when the user was given an input prompt, he needs to enter some input. Perl keeps on accepting input from the user until the cursor drops down and goes to the far left (the user provides the ending operator – a carriage return or Enter). When the user an ending operator, Perl stops taking user input and assigns the entered data input by the user to the variable specified, including the carriage return. This means that the value of the scalar $name is Joe, followed by the carriage-return, or \n. When we print the scalar $name, the value of $name is printed, followed by a carriage return, or \n. to avoid this problem, we use chop() or chomp(). The difference between these two functions will become clearer with the following example:

$variable = “Dave”;
chop($variable);
print $variable
The output will be:
Dav

In this example:

$variable = “Dave”
chomp($variable);
print $variable ;
The output will be:
Dave

The difference between chop() and chomp() is that chop() will remove the last character of the string irrespective of what it is, whereas chomp() will remove the last character only if it is a newline character (\n). So if we put these facts together, we can write a Perl script that is a little more complicated:

 print "Hello there, and what is your name? ";
 $name = ;
 print "$name is a very high class name.\n";
 chop($name); # Removes the last character no matter what it is.
 print "$name is a very high class name.\n\n";
 chop($name);
 print "$name has been chopped a little too much.\n";
 print "What is your age? ";
 chomp($age=); # Removes the last character if
# it is the newline.
 chomp($age); # The last character is not removed
# unless a newline.
 print "For $age, you look so young!\n";

So far we can see that Perl is a free form language, meaning you can place statements anywhere on the line of even cross lines. Whitespace refers to tabs, spaces, and newlines. So we know that the newline is represented as “\n” and must be enclosed in quotes. Whitespace is used to delimit words. Any number of blank spaces is allowed between symbols and words. Whitespace enclosed in single or double quotes is preserved; otherwise, it is ignored. The following expressions are the same:

5+4*2 is the same as 5 + 4 * 2;

And both of the following statements are correct even though the output will show that the whitespace is preserved when quoted:

print "This is a Perl statement.";
print "This
is
also
a Perl
statement.";

The output will be:

This is a Perl statement. This
is
also
a Perl
statement.

Keep in mind that unlike a UNIX shell, a Win32 DOS prompt shell has its own way of parsing the command line. Since most of your programming will be done in script files, you will seldom need to worry about the shell’s interaction, but when a script interfaces with the operating system, problems will occur unless you are aware of what commands you have and how executes them on your behalf. For instance, assume we understand how to use perl modules–the downloadable modules and the built-in modules that come with a solid perl interpreter download. Consider this next script:

 use File::Find;
 use Win32::File;
# Works on both FAT and NTFS file systems.
 &File::Find::find(\&wanted,"C:\\program files", "C:\\windows");
 sub wanted{
 (Win32::File::GetAttributes($_,$attr)) &&
($attr & DIRECTORY) &&
print "$File::Find::name\n";
}

So how do we use the Win32 command line? This script will interface with the file system and output the contents of a directory in hierarchal form. We simply use notepad or type C:\> type con > ThisScript.pl

Here is where there is no cursor, just a blank screen, so copy and paste the script onto screen, press Control-Z, and you’ll be back at the command prompt. The output will be:

C:\program files
C:\program files/Adobe
C:\program files/Adobe/Acrobat_com
C:\program files/Adobe/Acrobat_com/locale
C:\program files/Adobe/Acrobat_com/locale/de_DE
C:\program files/Adobe/Acrobat_com/locale/de_DE/landingPages
C:\program files/Adobe/Acrobat_com/locale/de_DE/landingPages/images
C:\program files/Adobe/Acrobat_com/locale/en_GB
C:\program files/Adobe/Acrobat_com/locale/en_US
C:\program files/Adobe/Acrobat_com/META-INF
   and  so on ….
C:\windows/winsxs/x86_wwf-system.workflow.componentmodel_31bf3856ad364e35_6.0.6002.18005_none_8dcf92850b377416
C:\windows/winsxs/x86_wwf-system.workflow.runtime_31bf3856ad364e35_6.0.6002.18005_none_670656a59d28c52a
C:\windows/winsxs/x86_xcbda.inf.resources_31bf3856ad364e35_6.0.6001.18000_en-us_f5090c76a778b031
C:\windows/winsxs/x86_xnacc.inf.resources_31bf3856ad364e35_6.0.6001.18000_en-us_8f20a3842ebca522C:\windows\..etc

What happened here? The File::Find module is loaded from the standard Perl library. The first argument to find() is a reference to a subroutine called wanted followed by two directories to be found. The wanted function will check that each name is a directory and list the full pathname of all subdirectories found. $_ is assigned the name of the current directory in the search.

End Note: Conditional Statements

Like the C language, Perl will perform an action if some condition is true. IF some condition is true, THEN do this. If it is not, then do that. Also, take care to note that the operators that are used on numbers work differently than on strings. Consider the following example:

print "Enter your Name:";
$name = <>;
chomp $name ;
if ( $name eq 'Harry') {
print "Hi Harry";
}
else {
print "You do not have permission to use this computer";
}
Enter your Name: John
You  do not have permission to use this computer

The while loop not only can be used to repeat a code snippet, but it also allows us to validate the user input and perform a predefined task according to the result of the validation. In this manner, the while loop repeats a block of code as long as the condition is true. The first example will show its basic use, and the second will exemplify an infinite loop (a continuing execution because the condition is true):

while ($count < 10) {
$count += 2;
print "count is now $count\n"; # Gives values 2 4 6 8 10
}

And the output is:

count is now 2
count is now 4
count is now 6
count is now 8
count is now 10

The next example is used to validate user input, but creates an infinite loop. Just press Control-C to get out of the loop:

print 'Username:' ;
$user = <>;
chomp $user;
while ( $user eq "admin" ) {
print "System info goes here:";
}

And the output is:

ere:System info goes here:System info goes here:System info goes here:System inf
o goes here:System info goes here:System info goes here:System info goes here:Sy
stem info goes here:System info goes here:System info goes here:System info goes
 here:System info goes here:System info goes here:System info goes here:System i
nfo goes here:System info goes here:System info goes here:System info goes here:
System info goes here:System info goes here:System info goes here:System info go
es here:System info goes here:System info goes here:System info goes here:System
 info goes here:System info goes here:System info goes here:System info goes her
e:System info goes here:System info goes here:System info goes here:System info
goes here:System info goes here:System info goes here:System info goes here:Syst
em info goes here:System info goes here:System info goes here:System info goes h
ere:System info goes here:System info goes here:System info goes here:System inf
o goes here:System info goes here:System info goes here:System info goes here:Sy
stem info goes here:System info goes here:System info goes here:System info goes
here:System info goes here:System info goes here:System info goes here:System i
nfo goes here:System info goes here:System info goes here:System info goes here:

Arrays

This next program introduces arrays. The opendir function opens the directory structure and assigns it to DIR, the directory file handle. The ..(parent) directory is opened for reading. The readdir function assigns all the rest of the entries in the directory to the array @parentfiles. The closedir function closes the directory. The files are printed (or inside to system, written to the screen) in the order they are stored in the directory structure. This may not be same as using the dir command in DOS:

 opendir(DIR, "C:\\Windows") || die "Can't open: $!\n";
 # Open parent directory
 @parentfiles=readdir(DIR);
 # Gets a list of the directory contents
 closedir(DIR); # Closes the filehandle
 foreach $file ( @parentfiles )
 # Prints each element of the array
 {
 print "$file\n"; }

The output is as expected:

.
..
AppPatch
assembly
bfsvc.exe
Boot
bootstat.dat
Branding
Cursors
Debug
DigitalLocker
Downloaded Program Files
DPINST.LOG
DtcInstall.log
en-US
explorer.exe
Fonts
fveupdate.exe
Globalization
Help
HelpPane.exe
hh.exe
ie8_main.log
iis7.log
IME
inf
Installer
L2Schemas
LiveKernelReports
Logs
Media
mib.bin
Microsoft.NET
and  so on ..
SHELLNEW
SoftwareDistribution
Speech
SysMsiCache
system
system.ini
System32
tapi
Tasks
Temp
tracing
TSSysprep.log
Users
etc . . .

Why did we use the @ mark? Because we used the second type of data type. If scalars are singular, then lists and arrays are plural. A list is an ordered collection of scalars. An array is a variable that contains the list. In Perl, sometimes these two terms are used interchangeably. However, the list is the data, and the array is the variable. You can a list value that isn’t an array, but every array holds a list. Note the figure below. Each element of an array or list is a separate scalar variable with an independent scalar value. These values are ordered—that is, they have a particular sequence from the first to the last element. The elements of an array or list are indexed by small integers starting at zero and counting by ones, so the first element of any array or list is always element zero.

When you have a collection of similar data elements, it is easier to use an array than to create a separate variable for each of the elements. The array name allows you to associate a single variable name with a list of data elements. Each of the elements in the list is referenced by its name and a subscript (also called an index). Perl, unlike C-like languages and managed code, doesn’t check whether the elements of an array are of the same data type. They can be a mix of numbers and strings. To Perl, an array is a named list containing an ordered set of scalars. The name of the array starts with a @ sign. The subscript follows the array name and is enclosed in square brackets ([]). Subscripts are simply integers and start at zero. So let’s examine this script:

@grades = (90,89,78,100,87);
print "The original array is: @grades\n";
print "The number of the last index is $#grades\n";
print "The array is truncated to 4 elements: @grades\n";
@grades=();
print "The array is completely truncated: @grades\n";

The output will be:

The original array is: 90 89 78 100 87
The number of the last index is 4
The array is truncated to 4 elements: 90 89 78 100 87
The array is completely truncated:

The array @grades is assigned a list of five numbers. We get the subscript (index) value of the last element in the array. The last subscript in the array has been shorted to 3 (recall an array is usually denoted by brackets [] and, again, is initialized to zero: [4] is 0 1 2 3). Using an empty list causes the array to be truncated to an empty list. Since an array starts counting with zero, the first element is referred to zero. This example should make this clearer. It is meant to output clearly, so it uses the newline:

@array1 = ('I am first', 'I am second', 'I am third', 'I am fourth');
$var1=$array1[0];
$var2=$array1[1];
$var3=$array1[2];
$var4=$array1[3];
print "$var1\n";
print "$var2\n";
print "$var3\n";
print "$var4\n";

And the output will be:

I am first
I am second
I am third
I am fourth

Let’s look at another example. Here the @names array is initialized with three strings: John, Joe, and Jake. The entire array is printed to standard output (STDOUT). The space between the elements is not printed. Each element of the array is printed, starting with an index number zero. The scalar variable $number is assigned the array @names. The value assigned is the number of elements in the array @names. The number of elements in the array @names is printed:

# Populating an array and printing its values
 @names=('John', 'Joe', 'Jake'); # @names=qw/John Joe Jake/;
 print @names, "\n"; # prints without the separator
 print "Hi $names[0], $names[1], and $names[2]!\n";
 $number=@names; # The scalar is assigned the number
 # of elements in the array
 print "There are $number elements in the \@names array.\n";
 print "The last element of the array is $names[$number - 1].\n";
 print "The last element of the array is $names[$#names].\n";
# Remember, the array index starts at zero!!
 @fruit = qw(apples pears peaches plums);
 print "The first element of the \@fruit array is $fruit[0];
the second element is $fruit[1].\n";
print "Starting at the end of the array; @fruit[-1, -3]\n";

The output will be:

JohnJoeJake
Hi John, Joe, and Jake!
There are 3 elements in the @names array.
The last element of the array is Jake.
The last element of the array is Jake.
The first element of the @fruit array is apples;
the second element is pears.
Starting at the end of the array; plums pears

A Brief Look at WMI

Window Management Instrumentation is hierarchy of namespaces and is used mainly as a tool to empower VBScripts. Information about the state of a system, its page file size, it memory utilization (both virtual and physical), cpu usage, IP settings, etc. The perl script below returns the name and product code of binary information (such as bitmaps, icons, executable files, and so on) used by a Windows Installer application. It was fetched from TechNet and is available at Activestate. Notice that the scalar is set to a method that has the \root\cimv2\ namespace. This variable is made to form a collection of (items) objects, as is standard for any Windows programming. To run this program using an ActiveState interpreter, you must first install the Win32:OLE module:

 c:\Perl\> ppm install Win32::OLE

Now the module will execute its routines within the program:

use Win32::OLE('in');
use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;

$computer = ".";
$objWMIService = Win32::OLE->GetObject
    ("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
$colItems = $objWMIService->ExecQuery
    ("SELECT * FROM Win32_Binary","WQL",wbemFlagReturnImmediately | wbemFlagForwardOnly);

foreach my $objItem (in $colItems)
{
      print "Caption: $objItem->{Caption}\n";
      print "Data: $objItem->{Data}\n";
      print "Description: $objItem->{Description}\n";
      print "Name: $objItem->{Name}\n";
      print "Product Code: $objItem->{ProductCode}\n";
      print "Setting ID: $objItem->{SettingID}\n";
      print "\n";
}

And the output is:

Caption: AbortMsiCA.dll
Data:
Description: AbortMsiCA.dll
Name: AbortMsiCA.dll
Product Code: {90120000-00A1-0409-0000-0000000FF1CE}
Setting ID: 

Caption: BIN_File_46001
Data:
Description: BIN_File_46001
Name: BIN_File_46001
Product Code: {90120000-00A1-0409-0000-0000000FF1CE}
Setting ID: 

Caption: BIN_File_107602
Data:
Description: BIN_File_107602
Name: BIN_File_107602
Product Code: {90120000-00A1-0409-0000-0000000FF1CE}
Setting ID: 

Caption: BIN_File_46002
Data:
Description: BIN_File_46002
Name: BIN_File_46002
Product Code: {90120000-00A1-0409-0000-0000000FF1CE}
Setting ID: 

Caption: OCFXCA
Data:
Description: OCFXCA
Name: OCFXCA
Product Code: {90120000-00A1-0409-0000-0000000FF1CE}
Setting ID:
and so on . . .

Arrays Continued

Multidimensional arrays are sometimes called tables, or matrices. They consist of rows and columns and can be represented with multiple subscripts. In a two-dimensional array, the first subscript represents the row, and the second subscript represents the column. In Perl, each row in a two-dimensional array is enclosed in square brackets. The row is an unnamed list. An unnamed list is called an anonymous array and contains its own elements. The arrow operator, also called an infix operator, can be used to get the individual elements of an array. There is an implied –> between adjacent brackets. Consider the following example. The array @matrix is assigned four unnamed, or anonymous, arrays. Each of the arrays has three values. The addresses of the four anonymous arrays are printed. To access the individual elements of an anonymous array, double subscripts or the arrow operator must be used. The first element of the first anonymous array in the @matrix array is printed. The –> is called the arrow, or infix, operator. It is used to dereference array and hash references. $matrix[0][0] or $matrix[0]–>[0] is the first element of the first row, where subscripts start at zero. The second row, first element of the @matrix, is printed. $matrix[1]–>[0] is another way to say $matrix[1][0]. The outer for loop will iterate through each of the rows, starting at row zero. After the first iteration of the loop, the second for loop is entered. The inner for loop iterates faster than the outer loop. Each element of a row is printed, and then control returns to the outer for loop. Next, print each element in the matrix. The first index represents the row, and the second index represents the column.

@matrix=( [ 3 , 4, 10 ], # Each row is an unnamed list
[ 2, 7, 12 ],
[ 0, 3, 4 ],
[ 6, 5, 9 ],
) ;
 print "@matrix\n";
 print "Row 0, column 0 is $matrix[0][0].\n";
# can also be written - $matrix[0]->[0]
 print "Row 1, column 0 is $matrix[1][0].\n";
# can also be written - $matrix[1]->[0]
 for($i=0; $i < 4; $i++){
 for($x=0; $x < 3; $x++){
print "$matrix[$i][$x] ";
}
print "\n";
}

The output will be:

ARRAY(0x1b6f5c) ARRAY(0x1b6e3c) ARRAY(0x23b064c) ARRAY(0x23b07fc)
Row 0, column 0 is 3.
Row 1, column 0 is 2.
3 4 10
2 7 12
0 3 4
6 5 9

Hashes

An associative array, more commonly called a hash, consists of one or more pairs of scalars—strings, numbers, or Booleans. The first set of scalars is associated with the second set of scalars. The first string in the pair of strings is called the key, and the second string is called the value. Whereas arrays are ordered lists with numeric indices starting at 0, hashes are unordered lists with string indices randomly distributed. The output to console will not usually appear as you have typed it. Hashes, then, are defined as an unordered list of key/value pairs, similar to a table where the keys are on the left-hand side and the values associated with those keys are on the right-hand side. The name of the hash is preceded by the %. Notice that this hash uses parenthesis:

% pet = ( "Name" => "Sneaky",
"Type" => "Cat",
"Owner" => "Carol",
"Color" => "yellow",);

Accessing the elements of a hash requires understanding accessing the elements of an array. This means that we must understand the functions used when working with arrays. Examine the following code. A hash slice is a list of hash keys whose corresponding values are assigned to another list of keys. The list consists of the hash name preceded by the @ symbol. The list of hash keys is enclosed in curly braces:

# Hash slices
 %officer= ("NAME"=> "John Doe",
"SSN" => "510-22-3456",
"DOB" => "05/19/66"
);
 @info=qw(Marine Captain 50000);
@officer{'BRANCH', 'TITLE', 'SALARY'}=@info;
# This is a hash slice
 @sliceinfo=@officer{'NAME','BRANCH','TITLE'};
# This is also a hash slice
 print "The new values from the hash slice are: @sliceinfo\n\n";
print "The hash now looks like this:\n";
 foreach $key ('NAME', 'SSN', 'DOB', 'BRANCH', 'TITLE', 'SALARY'){
 printf "Key: %-10sValue: %-15s\n", $key, $officer{$key};
}

And the output is:

Key: NAME      Value: John Doe
Key: SSN       Value: 510-22-3456
Key: DOB       Value: 05/19/66
Key: BRANCH    Value: Marine
Key: TITLE     Value: Captain
Key: SALARY    Value: 50000

In conclusion, know that there are tools you can download on the internet in order to turn Perl scripts into Windows executables. Perl is also powerful in graphics and developing desktop applications. This article is solely meant to be a reference for one who wants to know a little of the Perl basics, programming experience or not, and has been referenced from Ankit Farad’s book “The Unofficial Guide to Ethical Hacking”, and “Programming Perl”, by Larry Wall, Tom Christiansen & Jon Orwant.
It’s the article from code from codeproject.com. hope you enjoy it.

Post to Twitter

JQuery is one of the most popular language in Web design. In my experient, I use JQuery to solve some data update without changing url (jump). It just use as JavaScript.

This article is how to enhance form input fields with JQuery. I think it’s helpful and easy. Try it by yourself.

jQuery makes it easy to spice up our search bars and form input fields with simple touches that really enhances the user’s experience. Let’s look at how jQuery can be used to show/hide a default value inside a field and provide visual user feedback when the field is selected.

View the demo

View the demo

The example we’ll be creating features a simple search bar and icon which appears grey as standard but turns to a cool blue when focused. By default the input displays the words I’m looking for…, which disappears when the field is selected.

Why not CSS?

Similar effects could be created purely with CSS. There’s the pseudo :focus selector which allows us to add special styling to elements when they have the user’s attention. Plus, the default input value could be added as a background image, which is then removed also using the :focus selector. But there’s two small problems; firstly the :focus selector isn’t supported by Internet Explorer, and secondly there’s no way of ensuring the default value doesn’t reappear once the user has entered their own information within the input field. This is where jQuery takes over to provide a complete solution that’s compatible with all browsers.

Creating the search form

Let’s create our sample form design. We’ll concentrate more on the front-end design of HTML, CSS and Javascript rather than make the form fully functioning, so to start we need a basic HTML structure:

<form action="" method="get">
	<fieldset>
		<input type="text" id="searchbar" />
		<input type="submit" value="Search" id="searchbtn" />
	</fieldset>
</form>

Just like all forms on the web, our simple search bar is created using a <form> element. Inside this is a <fieldset> to contain our two input fields. The first is a text input with an ID of searchbar, which will be the field the user enters their query into. The second is a submit input element with an ID of searchbtn, which has a value attribute of “Search” to give a descriptive purpose to the button. Our final design will render this input as a magnifying glass icon which replaces the text for a more visual clue.

#searchbar {
	width: 425px;
	float: left; padding: 20px 150px 20px 40px;
	background: #ededed url(bar-bg.png) repeat-x;
	border: 3px solid #c7c7c7;
	border-radius: 100px; -moz-border-radius: 100px; -webkit-border-radius: 100px;
	font: italic 54px Georgia; color: #898989;
	outline: none; /*Remove Chrome and Safari glows on focus*/
}

The whole form can then be styled up with some simple CSS. The search bar is given a specific width of 425px, along with some padding around the edges. This padding adds 20px to the top and bottom, 40px to the left and a large 150px on the right (to accommodate the button). A thin repeating gradient graphic is added to as a background-image and a grey border added to the outside. border-radius is used to round off the edges of the search bar for supporting browsers, otherwise it will appear rectangular. The text inside the field is then set up as 54px Georgia in Italic, with a grey colouring. The final line of outline: none; simply removes the default glow that appears on focus in Safari and Chrome.

#searchbar.active {
	background: #ebf3fc url(bar-bg-active.png) repeat-x;
	border: 3px solid #abd2ff;
}

The search bar is then given some styling for when the class of active is used. This will be added by jQuery later, which leaves it to the CSS to change the background-image to a blue gradient and a light blue border.

#searchbtn {
	width: 67px; height: 70px; float: left; margin: 18px 0 0 -115px;
	background: url(search.png); text-indent: -9999px;
	padding: 0 0 0 67px; /*IE fix*/
	cursor: pointer;
}
	#searchbtn:hover {
		background-position: 0 -70px;
	}

The button appears as an image based icon, so a specific width and height is added. The button is floated alongside the bar, then margin is used to move it into place 18px from the top to align it vertically, and -115px from the left to pull it back to sit inside the search bar. The icon is added as a background-image and text-indent used to shift the default value text off-screen. Internet Explorer doesn’t like this technique, so padding can be used as well. To ensure the user’s mouse displays the appropriate cursor as feedback that the element can be clicked, cursor:pointer; displays the typical hand icon. As an extra visual clue the search icon changes colour by altering the background-position of the sprite graphic when the user hovers over it.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>

The search form looks and works fine so far, but without the fancy jQuery effects. The library is linked from inside the HTML document, then the document is prepared for our own bit of Javascript. Every jQuery command is contained within the same syntax, which basically says “When the document is ready, run this function.”

$(document).ready(function() {
	$("#searchbar").attr("value", "I'm looking for...");

	var text = "I'm looking for...";

	$("#searchbar").focus(function() {
		$(this).addClass("active");
		if($(this).attr("value") == text) $(this).attr("value", "");
	});

	$("#searchbar").blur(function() {
		$(this).removeClass("active");
		if($(this).attr("value") == "") $(this).attr("value", text);
	});
});

The first line of our jQuery takes the #searchbar and adds the words “I’m looking for…” inside the value attribute using the .attr() method. Next, a variable named text is set, which is used along with the code that adjusts the input text of focus. Two functions are then added to the search bar; .focus() for when the input is selected, and .blur() when it is deselected. The class of active we set up in the CSS is added or removed on focus and blur, then jQuery checks the status of the value text. If the searchbar’s value is the same as the variable of ‘text’, then the value should be changed to nothing (“ ”). When the input is deselected, if the value is blank, the value should revert back to the ‘text’ variable, otherwise the value that the user has manually entered will remain. This prevents the value from clearing out the user’s query and switching back to “I’m looking for…” when the input is deselected.

View the demo

These techniques don’t have to be reserved for search bars, the same effect can be used on any input field to create super cool sign up or contact forms.

This article is from Line25. hope it’s useful for you.

Post to Twitter

Are you trying to learn and get well know about SEO.

This article is for SEOer, what’s next step.

I am still on my way of SEO Road, If you have your own way of SEO, welcome to comment later to share them with public. Now you can read more about how to develop yourself to being a SEOer.

One of the points that will be high on the agenda at this year’s Online Marketing Show will be that the web has finally graduated from our PC monitors and now exists firmly in the air around us, waiting to be accessed at any given moment. Internet usage on mobile devices is now growing at the rate that was predicted some three or four years ago, making this year definitely, officially, the year of mobile… hooray!

It’s not all about mobile. Any number of devices during the next decade and beyond will be able to access the wonders of the Internet, and all of them will need to be able to search and quickly retrieve the information or websites that people are looking for. This is where search engines need to think about how their interfaces and results will work on any number of new devices.

Even on the biggest, prettiest smartphones, Google’s search results don’t fit on the screen, removing the majority of paid search listings that make up so much of Google’s revenue. If everyone were to use mobiles only to search for info, Google might even go bankrupt!

Google has a separate index for mobile devices, so it’s not as though they haven’t thought about this. But as the web becomes ever more accessible, two questions remain:

  1. How will search engines really help users find what they’re looking for, especially on the smaller devices?
  2. How will they continue to know what are the most important results for natural search?

The second question is particularly important for SEO. So much of what we do boils down to ensuring that the myriad of connections on the internet make it clear that our sites, or our clients’ sites, are viewed by the search engines as important. Not only important, but important for specific themes and keywords, and we manage this using techniques on and off the website itself.

So how does that change when people are using the Internet in different ways via different devices and potentially being given different results depending on what device they use? How will search engines know what is important, or whether something is more important for a mobile user than a tablet or laptop user?

There are still a lot of “ifs” involved here. Ultimately, the search engines might feel that what exists now is good enough to tell them which are the most important sites.

In SEO we’ve become accustomed in more recent times to viewing off-site optimization techniques as having the biggest impact on rankings. But perhaps there is an argument that for each device you will need a site specifically optimized for each different version of Google. Google for mobile, Google for smartphone, Google for tablets — each version might prefer different types of web property to display higher in the listings.

Ultimately, there isn’t a definitive answer right now. However, in the near future it’s likely that SEO will not only encompass social media (that’s if you believe it doesn’t already), but SEO teams may well need to ensure their skill-sets include a large degree of developer knowledge specifically for ensuring websites are compatible with multiple devices.

This article post By Gareth Owen at searchenginewatch.com

Post to Twitter

I am bloging now, but I really don’t know how exactly to run and build a perfect blog for me and other readers.
But I know I would love to do my best to improve my blog to meet readers needs. I know I would love to do everything to try to improve my blog’s quality. I know I would love to try and try again to run and build a good blog by myself.
I am working hard for it.
Now the first thing I think I need to do is read more more good blog to see how do they build their blog.

You can see these codes in the foot:
<script type=”text/javascript”>// <![CDATA[
try {
var pageTracker = _gat._getTracker("
Code-Site");
pageTracker._trackPageview();
} catch(err) {}
swfobject.registerObject("FlashID");
// ]]></script>

Today when I was reading others’ blog I try to see theirs code then I found there are many blog use Google Analytics for WordPress. This plugin adds pageTracker undefined for admin. Only one problem the webpage doesn’t load the ga.js but the filter which adds javascript:pageTracker around the outbound links still applies, thus cause the problem.
This is what I found these days and share it with you.
Maybe you know it eariler or later, no matter what, you can try to run and build your blog better now with Google Aanlytics for wordpress.

Could you tell me what this code used for?

<script type=”text/javascript”>// <![CDATA[
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
// ]]></script>

Post to Twitter

I checked some sites in this article about study css3 tips and tutorials from 10 top sites.
About the first one it’s a wordpress. I love the theme I am sure you can figure why it’s PR5. Study the tutorials from it and improve your wordpress blog. I will make my own WordPress Theme later.(of course I will show you.)

Hello and welcome. We know we can do amazing things using CSS3. Helps create some design elements or whole page style. So there you have top 10 sites where you can find css3 tips , tricks and tutorials.

this article collected different articles from different places to show you tips of css3.

You still can learn some other things from these web, dig them!

#1 http://www.w3avenue.com/

top 10 sites for css3 tips, tricks and  tutorials

#2 http://www.design-dc.co.uk/

top 10 sites for css3 tips, tricks and  tutorials

#3 http://www.smashingmagazine.com/

top 10 sites for css3 tips, tricks and  tutorials

#4 http://css3please.com/

top 10 sites for css3 tips, tricks and  tutorials

#5 http://www.css3.info/

top 10 sites for css3 tips, tricks and  tutorials

#6 http://css-tricks.com/

top 10 sites for css3 tips, tricks and  tutorials

#7 http://wordcastnet.com/

top 10 sites for css3 tips, tricks and  tutorials

#8 http://psdcollector.blogspot.com/

top 10 sites for css3 tips, tricks and  tutorials

#9 http://www.ectomachine.com/

top 10 sites for css3 tips, tricks and  tutorials

#10 http://sixrevisions.com/

top 10 sites for css3 tips, tricks and  tutorials

reference :http://www.clickonpost.com/top-10-sites-for-css3-tips-tricks-and-tutorials/

Post to Twitter

Share this blog

Bookmark and Share