SDKをインストールができたら、以下をvimrcに張っておくぐらいで十分:
map*Mac上のCorona Terminalのデファルトパスの場合です:!/Applications/CoronaSDK/Corona\ Terminal -project %:p -skin iPhone<CR>
main.luaがvimで開いた時、
map*Mac上のCorona Terminalのデファルトパスの場合です:!/Applications/CoronaSDK/Corona\ Terminal -project %:p -skin iPhone<CR>
Client side SNI not supported for this openssl
Support for SNI on the client side was added somewhere in the OpenSSL 0.9.8 series, but only with 1.0 a bug was fixed when the server could not decide about its hostname. Therefore client side SNI is only supported with OpenSSL 1.0 or higher in IO::Socket::SSL.
rpm -ivh --nosignature http://rpm.axivo.com/redhat/axivo-release-5-1.noarch.rpmそれができたら、インストールするのにopenssl.x86_64が必要なので、それが入ってること確認できたら、以下のコマンドで更新:
yum remove openssl.i686 yum --enablerepo=axivo update openssl詳しくはこちら
| 和製英語 | 英語 |
|---|---|
| ジャストカット | perfect haircut |
| ジャストフィット | close fitting / snug |
| ジャストタイミング | perfect timing |
| 9時ジャスト | exactly 9 o'clock |
<entry>
<title>タイトル</title>
<id>URL</id>
<summary>要約</summary>
<updated>更新時間</updated>
</entry>
public class Entry implements Serializable { //後でIntentのBundleに入れるようにSerializableを実装
private String title;
private String link;
private String summary;
private String updated;
public void setTitle(String title) {
this.title = title;
}
public String getTitle() {
return this.title;
}
//...長いので、linkとsummaryのゲッターとセッターを略します
public void setUpdated(String updated) {
String dateOnly = updated.substring(0, 10);
this.updated = dateOnly;
}
public String getUpdated() {
return this.updated;
}
}
builder.setLength(0); builder.append(ch, start, length);
public class RSSHandler extends DefaultHandler {
private ArrayList entries;
private Entry currentEntry;
private StringBuilder builder;
boolean inTitle;
boolean inLink;
boolean inSummary;
boolean inUpdated;
boolean inEntry;
public ArrayList getEntries() {
return this.entries;
}
@Override
public void startDocument() throws SAXException {
super.startDocument();
entries = new ArrayList();
builder = new StringBuilder();
}
@Override
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
super.startElement(uri, localName, name, attributes);
if (localName.equalsIgnoreCase(ENTRY)) {
this.currentEntry = new Entry();
inEntry = true;
}
if (localName.equalsIgnoreCase(TITLE)) {
inTitle = true;
}
if (localName.equalsIgnoreCase(LINK)) {
inLink = true;
}
if (localName.equalsIgnoreCase(SUMMARY)) {
inSummary = true;
}
if (localName.equalsIgnoreCase(UPDATED)) {
inUpdated = true;
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
super.characters(ch, start, length);
if (inEntry) {
if (inTitle) {
builder.setLength(0);
builder.append(ch, start, length);
}
if (inLink) {
builder.setLength(0);
builder.append(ch, start, length);
}
if (inSummary) {
builder.append(ch, start, length);
}
if (inUpdated) {
builder.setLength(0);
builder.append(ch, start, length);
}
}
}
@Override
public void endElement(String uri, String localName, String name) throws SAXException {
super.endElement(uri, localName, name);
if (this.currentEntry != null) {
if (localName.equalsIgnoreCase(TITLE)) {
currentEntry.setTitle(builder.toString());
inTitle = false;
} else if (localName.equalsIgnoreCase(LINK)) {
currentEntry.setLink(builder.toString());
inLink = false;
} else if (localName.equalsIgnoreCase(SUMMARY)) {
currentEntry.setSummary(builder.toString());
inSummary = false;
} else if (localName.equalsIgnoreCase(UPDATED)) {
currentEntry.setUpdated(builder.toString());
inUpdated = false;
}
if (localName.equalsIgnoreCase(ENTRY)) {
entries.add(currentEntry);
inEntry = false;
}
}
}
}
@Override protected ArrayListdoInBackground(Void... params) { try { URL url = new URL(xmlLocation); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); RSSHandler handler = new RSSHandler(); xr.setContentHandler(handler); //ハンドラークラスを設定 xr.parse(new InputSource(url.openStream())); entries = handler.getEntries(); } catch (MalformedURLException e) { Log.e("LoadFeedData", "MalformedUrlException: ", e); } catch (Exception e) { Log.e("LoadFeedData", "Parsing exception", e); } return entries; }