This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2010-2010, Yusuke Yamamoto | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
public class MyFrame extends JFrame { | |
public static void main(String[] args) { | |
new MyFrame().setVisible(true); | |
} | |
JTextArea text = new JTextArea(); | |
MyFrame(){ | |
setSize(100,100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
public class MyFrame extends JFrame { | |
public static void main(String[] args) { | |
new MyFrame().setVisible(true); | |
} | |
JTextArea text = new JTextArea(); | |
MyThread thread = new MyThread(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2011 Yusuke Yamamoto | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package frame; | |
import javax.swing.*; | |
import java.awt.*; | |
/** | |
* Created by IntelliJ IDEA. | |
* User: white | |
* Date: 11/01/29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<?php | |
require "./tmhOAuth.php"; | |
$twitter = new tmhOAuth( | |
array("consumer_key" => "consumerkey", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<?php | |
// initialize tmhOAuth | |
require "./tmhOAuth.php"; | |
$twitter = new tmhOAuth(array()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GAETwitter extends AsyncTwitter{ | |
public void get(TwitterListener listener); | |
} | |
GAETwitter twitter = GAETwitterFacotry.getInstance(); | |
twitter.getPublicTimeline().get(new TwitterAdapter(){ | |
public void gotPublicTimeline(List<Status> statuses){ | |
// do something | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2007 Yusuke Yamamoto | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpClient client = HttpClientFactory.getInstance(ConfigurationContext.getInstance()); | |
HttpResponse res = client.request(new HttpRequest(RequestMethod.GET,"http://api.twitter.com/statuses/show/1000.json", null, null, null)); | |
System.out.println(res.asJSONObject()); | |
System.out.println("--------"); | |
System.out.println(res.asString()); | |
System.out.println("--------"); |
OlderNewer