最後に今回のサンプルコードをGitHubにあげております。 (あまり綺麗なコードじゃないかもしれないですが、参考程度にしてもらえればと思います) なぜWebViewを使わずに、UITableViewにマッピングするのか 理由はデザインを統一させたいというのが一番です。 あとはOnoの作者であるMatttさんが復活したということで、 今回Onoについてご紹介したかったのが大きいです(-∀-) この記事は、マッピング方法を記載しておりますが、 HTMLの構文解析だけを行いたい場合でも、参考になると思います。 実装方法 ライブラリ導入 https://github.com/mattt/Ono#podfile Onoをプロジェクトに導入します。 動作確認 以下のようにOnoをImportして、利用することが出来れば問題なく導入できている思います。 import Ono <省略> let docum
How can you improve the performance of web pages? Most developers look to JavaScript and image optimisation, server configuration, file minification and concatenation – even CSS tweaks. Poor old HTML gets neglected, despite being the core language of the web. HTML payloads are big and getting bigger. Pages on most top-100 sites require around 40k of HTML per page. Sites such as Amazon and Yahoo us
ai2html is an open-source script for Adobe Illustrator that converts your Illustrator documents into html and css. Here are examples of how we’ve used the script at The New York Times and examples of how others have used it. Share your ai2html projects on Twitter, Delicious, etc. using #ai2html. Table of contents How to install ai2html How to use ai2html Frequently asked questions Settings Point t
不特定のユーザーが入力したMarkdownをブラウザ上でJavaScriptを使ってHTMLに変換するという場面においては、JavaScriptで変換してHTMLを生成するという処理の都合上どうしてもDOM-based XSSの発生を考えないわけにはいかない。かといって、MarkdownをパースしHTMLを生成するという処理すべてをXSSが存在しないように注意しながら自分で書くのも大変だし、markedやmarkdown-jsなどの既存の変換用のJSを持ってきてもそれらがXSSしないかを確認するのは結構大変だったりする。 そういった場合には、Markdownから生成されたHTMLをRickDOMを通すことで、万が一HTML内にJavaScriptが含まれていたとしてもそれらを除外し、許可された要素、許可された属性だけで構築された安全なHTMLに再構築することができる。さらに、そうやって生成
GENERAL INFO: ============= Modern websites present content in various ways. Most websites nowadays use a form of content management system to publish new content and link to other articles and websites not only in a separated link section. Content is therefore embedded in a specific design which is often in the middle of the screen surrounded by link-, related articles and comment-sections. Thoug
var app, base, concat, directory, gulp, gutil, hostname, path, refresh, sass, uglify, del, connect, autoprefixer, babel; var autoPrefixBrowserList = ['last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4']; gulp = require('gulp'); gutil = require('gulp-util'); concat = require('gulp-concat'); uglify = require('gulp-uglify'); sass = require('gulp-sass'); connect = require(
You’ve finally got your hands on the diverse collection of HTML documents you needed. But the content you’re interested in is hidden amidst adverts, layout tables or formatting markup, and other various links. Even worse, there’s visible text in the menus, headers and footers that you want to filter out. If you don’t want to write a complex scraping program for each type of HTML file, there is a s
SIGIR 2011のDOM Based Content Extraction via Text Densityが、シンプルなアルゴリズムながら良さそうな結果を示していたので、著者のコードを改変してSWIGでPerlとPythonのbindingを作った。 下手な英文メールにも関わらず、コードの利用を快く認めて下さったFei Sunさん、ありがとうございます! cpp-ContentExtractionViaTextDensity - GitHub これは何をするものかというと、タイトルどおり、DOMツリー上でText Densityという指標を用いてウェブページの本文抽出を行うもの。機械学習とかではなく、単純に決められた方法で計算されたText Densityを用いるだけのシンプルなアルゴリズムである。 Text DensityはDOMノードごとに計算され、シンプルにテキストの文字数をタ
「最近Qiitaを検索結果でよく見るようになったなぁ」と感じる人はいませんか? SEOを頑張ってるWebサービスは数多存在しますが、Qiitaもその中の1つです。 SEOっていうとやれキーワードがどうだこうだ、サイト内リンクがどうだこうだ、という話になってしまいがちですが(そういうのが不要と言っているわけではないですよ)、今回はQiitaがSEOの一環として行なっている数多の取り組みの中で、比較的Web上での言及数の少ない印象のある、HTMLのマークアップについて、外に出せる範囲で、前編と後編に分けて解説したいと思います。 後編はこちら 免責事項的な SEOというのは完全に結果論でしか語ることのできないものです。また時と共に効果的とされるテクニックは変わっていきます。この記事はQiitaの中の人が「効果あるんちゃうか」と試行錯誤しながらあれこれ行なっていることの一部を紹介するものであって、
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く