├── .DS_Store
├── IntegracaoTwitter
├── .classpath
├── .gitignore
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── lib
│ ├── twitter4j-async-4.0.4.jar
│ ├── twitter4j-core-4.0.4.jar
│ ├── twitter4j-media-support-4.0.4.jar
│ └── twitter4j-stream-4.0.4.jar
└── src
│ └── Main.java
├── IntroducaoSelenium
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── bin
│ ├── .gitignore
│ ├── firefox
│ │ └── Main.class
│ └── ie
│ │ └── Main.class
├── drivers
│ └── IEDriverServer.exe
├── lib
│ ├── apache-mime4j-0.6.jar
│ ├── bsh-2.0b4.jar
│ ├── cglib-nodep-2.1_3.jar
│ ├── commons-codec-1.10.jar
│ ├── commons-collections-3.2.2.jar
│ ├── commons-el-1.0.jar
│ ├── commons-exec-1.3.jar
│ ├── commons-io-2.4.jar
│ ├── commons-lang3-3.4.jar
│ ├── commons-logging-1.2.jar
│ ├── cssparser-0.9.16.jar
│ ├── gson-2.3.1.jar
│ ├── guava-19.0.jar
│ ├── hamcrest-core-1.3.jar
│ ├── hamcrest-library-1.3.jar
│ ├── htmlunit-2.18.jar
│ ├── htmlunit-core-js-2.17.jar
│ ├── httpclient-4.5.1.jar
│ ├── httpcore-4.4.3.jar
│ ├── httpmime-4.5.jar
│ ├── jasper-compiler-5.5.15.jar
│ ├── jasper-compiler-jdt-5.5.15.jar
│ ├── jasper-runtime-5.5.15.jar
│ ├── javax.servlet-api-3.1.0.jar
│ ├── jcommander-1.48.jar
│ ├── jetty-continuation-9.2.13.v20150730.jar
│ ├── jetty-http-9.2.13.v20150730.jar
│ ├── jetty-io-9.2.13.v20150730.jar
│ ├── jetty-jmx-9.2.13.v20150730.jar
│ ├── jetty-security-9.2.13.v20150730.jar
│ ├── jetty-server-9.2.13.v20150730.jar
│ ├── jetty-servlet-9.2.13.v20150730.jar
│ ├── jetty-servlets-9.2.13.v20150730.jar
│ ├── jetty-util-9.2.13.v20150730.jar
│ ├── jna-4.1.0.jar
│ ├── jna-platform-4.1.0.jar
│ ├── jsp-api-2.0.jar
│ ├── junit-4.12.jar
│ ├── nekohtml-1.9.22.jar
│ ├── netty-3.5.7.Final.jar
│ ├── phantomjsdriver-1.2.1.jar
│ ├── sac-1.3.jar
│ ├── selenium-java-2.52.0.jar
│ ├── serializer-2.7.2.jar
│ ├── testng-6.9.9.jar
│ ├── websocket-api-9.2.13.v20150730.jar
│ ├── websocket-client-9.2.13.v20150730.jar
│ ├── websocket-common-9.2.13.v20150730.jar
│ ├── xalan-2.7.2.jar
│ ├── xercesImpl-2.11.0.jar
│ └── xml-apis-1.4.01.jar
└── src
│ ├── firefox
│ └── Main.java
│ └── ie
│ └── Main.java
├── JavaBlog Telegram Bot
├── .classpath
├── .gitignore
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── lib
│ ├── gson-2.7.jar
│ ├── java-telegram-bot-api-2.1.2.jar
│ ├── okhttp-3.4.1.jar
│ └── okio-1.10.0.jar
└── src
│ └── Main.java
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/.DS_Store
--------------------------------------------------------------------------------
/IntegracaoTwitter/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/IntegracaoTwitter/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 |
--------------------------------------------------------------------------------
/IntegracaoTwitter/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | IntegracaoTwitter
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/IntegracaoTwitter/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.8
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.8
12 |
--------------------------------------------------------------------------------
/IntegracaoTwitter/lib/twitter4j-async-4.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntegracaoTwitter/lib/twitter4j-async-4.0.4.jar
--------------------------------------------------------------------------------
/IntegracaoTwitter/lib/twitter4j-core-4.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntegracaoTwitter/lib/twitter4j-core-4.0.4.jar
--------------------------------------------------------------------------------
/IntegracaoTwitter/lib/twitter4j-media-support-4.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntegracaoTwitter/lib/twitter4j-media-support-4.0.4.jar
--------------------------------------------------------------------------------
/IntegracaoTwitter/lib/twitter4j-stream-4.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntegracaoTwitter/lib/twitter4j-stream-4.0.4.jar
--------------------------------------------------------------------------------
/IntegracaoTwitter/src/Main.java:
--------------------------------------------------------------------------------
1 | import twitter4j.Status;
2 | import twitter4j.Twitter;
3 | import twitter4j.TwitterFactory;
4 | import twitter4j.auth.AccessToken;
5 | import twitter4j.conf.Configuration;
6 | import twitter4j.conf.ConfigurationBuilder;
7 |
8 | public class Main {
9 |
10 | /**
11 | * @param args
12 | */
13 |
14 | public static void main(String[] args) {
15 |
16 | try {
17 | ConfigurationBuilder builder = new ConfigurationBuilder();
18 |
19 | builder.setOAuthConsumerKey("7LbK2SDxOvOI4pGVu4YHHxvIc");
20 | builder.setOAuthConsumerSecret( "hrNLlc61ZUtYs2mLIrHYD5D1ioAlPnnzeCZu3oIlP8cGF6JaTN");
21 |
22 | Configuration configuration = builder.build();
23 |
24 | TwitterFactory factory = new TwitterFactory(configuration);
25 | Twitter twitter = factory.getInstance();
26 |
27 | AccessToken accessToken = loadAccessToken();
28 |
29 | twitter.setOAuthAccessToken(accessToken);
30 |
31 | Status status = twitter.updateStatus("Olá Twitter!");
32 | System.out.println("Tweet postado com sucesso! [" + status.getText() + "].");
33 |
34 | } catch (Exception e) {
35 | e.printStackTrace();
36 | }
37 |
38 | }
39 |
40 | private static AccessToken loadAccessToken(){
41 | String token = "26794379-wpBS4awpeMXRshfuLKqpBynLrlUcGQ3H5xYbVwbHa";
42 | String tokenSecret = "c9cnRdDyasC8fclOEva35u1JZAVxlEpwZdwZlaL6Kl0EV";
43 | return new AccessToken(token, tokenSecret);
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/IntroducaoSelenium/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/IntroducaoSelenium/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | IntroducaoSelenium
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/IntroducaoSelenium/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.7
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.7
12 |
--------------------------------------------------------------------------------
/IntroducaoSelenium/bin/.gitignore:
--------------------------------------------------------------------------------
1 | /firefox/
2 | /ie/
3 |
--------------------------------------------------------------------------------
/IntroducaoSelenium/bin/firefox/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/bin/firefox/Main.class
--------------------------------------------------------------------------------
/IntroducaoSelenium/bin/ie/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/bin/ie/Main.class
--------------------------------------------------------------------------------
/IntroducaoSelenium/drivers/IEDriverServer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/drivers/IEDriverServer.exe
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/apache-mime4j-0.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/apache-mime4j-0.6.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/bsh-2.0b4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/bsh-2.0b4.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/cglib-nodep-2.1_3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/cglib-nodep-2.1_3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-codec-1.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-codec-1.10.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-collections-3.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-collections-3.2.2.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-el-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-el-1.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-exec-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-exec-1.3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-io-2.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-io-2.4.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-lang3-3.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-lang3-3.4.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/commons-logging-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/commons-logging-1.2.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/cssparser-0.9.16.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/cssparser-0.9.16.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/gson-2.3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/gson-2.3.1.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/guava-19.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/guava-19.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/hamcrest-core-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/hamcrest-core-1.3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/hamcrest-library-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/hamcrest-library-1.3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/htmlunit-2.18.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/htmlunit-2.18.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/htmlunit-core-js-2.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/htmlunit-core-js-2.17.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/httpclient-4.5.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/httpclient-4.5.1.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/httpcore-4.4.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/httpcore-4.4.3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/httpmime-4.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/httpmime-4.5.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jasper-compiler-5.5.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jasper-compiler-5.5.15.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jasper-compiler-jdt-5.5.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jasper-compiler-jdt-5.5.15.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jasper-runtime-5.5.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jasper-runtime-5.5.15.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/javax.servlet-api-3.1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/javax.servlet-api-3.1.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jcommander-1.48.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jcommander-1.48.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-continuation-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-continuation-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-http-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-http-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-io-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-io-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-jmx-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-jmx-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-security-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-security-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-server-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-server-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-servlet-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-servlet-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-servlets-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-servlets-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jetty-util-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jetty-util-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jna-4.1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jna-4.1.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jna-platform-4.1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jna-platform-4.1.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/jsp-api-2.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/jsp-api-2.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/junit-4.12.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/junit-4.12.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/nekohtml-1.9.22.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/nekohtml-1.9.22.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/netty-3.5.7.Final.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/netty-3.5.7.Final.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/phantomjsdriver-1.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/phantomjsdriver-1.2.1.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/sac-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/sac-1.3.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/selenium-java-2.52.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/selenium-java-2.52.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/serializer-2.7.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/serializer-2.7.2.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/testng-6.9.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/testng-6.9.9.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/websocket-api-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/websocket-api-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/websocket-client-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/websocket-client-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/websocket-common-9.2.13.v20150730.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/websocket-common-9.2.13.v20150730.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/xalan-2.7.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/xalan-2.7.2.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/xercesImpl-2.11.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/xercesImpl-2.11.0.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/lib/xml-apis-1.4.01.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/lib/xml-apis-1.4.01.jar
--------------------------------------------------------------------------------
/IntroducaoSelenium/src/firefox/Main.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/IntroducaoSelenium/src/firefox/Main.java
--------------------------------------------------------------------------------
/IntroducaoSelenium/src/ie/Main.java:
--------------------------------------------------------------------------------
1 | package ie;
2 | import java.io.File;
3 |
4 | import org.openqa.selenium.By;
5 | import org.openqa.selenium.WebDriver;
6 | import org.openqa.selenium.ie.InternetExplorerDriver;
7 |
8 | public class Main {
9 |
10 | public static void main(String[] args) {
11 |
12 |
13 | File file = new File("drivers/IEDriverServer.exe");
14 | System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
15 | WebDriver driver = new InternetExplorerDriver();
16 |
17 | driver.get("http://michelpf.com/exemplo-de-calculadora-em-javascript/");
18 |
19 | driver.findElement(By.xpath("//input[@id='1']")).click();
20 | driver.findElement(By.xpath("//input[@id='plus']")).click();
21 | driver.findElement(By.xpath("//input[@id='6']")).click();
22 | driver.findElement(By.xpath("//input[@id='equals']")).click();
23 | String result = driver.findElement(By.xpath("//input[@id='Resultbox']")).getAttribute("value");
24 | System.out.println("Resultado 1+6 = " + result);
25 | driver.close();
26 |
27 |
28 |
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 |
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | JavaBlog Telegram Bot
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.8
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.8
12 |
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/lib/gson-2.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/JavaBlog Telegram Bot/lib/gson-2.7.jar
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/lib/java-telegram-bot-api-2.1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/JavaBlog Telegram Bot/lib/java-telegram-bot-api-2.1.2.jar
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/lib/okhttp-3.4.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/JavaBlog Telegram Bot/lib/okhttp-3.4.1.jar
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/lib/okio-1.10.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/michelpf/blog-samples/da12e884e245817260e9bb6bf4c232599a38fc09/JavaBlog Telegram Bot/lib/okio-1.10.0.jar
--------------------------------------------------------------------------------
/JavaBlog Telegram Bot/src/Main.java:
--------------------------------------------------------------------------------
1 | import java.util.List;
2 |
3 | import com.pengrad.telegrambot.TelegramBot;
4 | import com.pengrad.telegrambot.TelegramBotAdapter;
5 | import com.pengrad.telegrambot.model.Update;
6 | import com.pengrad.telegrambot.model.request.ChatAction;
7 | import com.pengrad.telegrambot.request.GetUpdates;
8 | import com.pengrad.telegrambot.request.SendChatAction;
9 | import com.pengrad.telegrambot.request.SendMessage;
10 | import com.pengrad.telegrambot.response.BaseResponse;
11 | import com.pengrad.telegrambot.response.GetUpdatesResponse;
12 | import com.pengrad.telegrambot.response.SendResponse;
13 |
14 | public class Main {
15 |
16 | public static void main(String[] args) {
17 |
18 | //Criação do objeto bot com as informações de acesso
19 | TelegramBot bot = TelegramBotAdapter.build("SEU_TOKEN_ACESSO");
20 |
21 | //objeto responsável por receber as mensagens
22 | GetUpdatesResponse updatesResponse;
23 | //objeto responsável por gerenciar o envio de respostas
24 | SendResponse sendResponse;
25 | //objeto responsável por gerenciar o envio de ações do chat
26 | BaseResponse baseResponse;
27 |
28 | //controle de off-set, isto é, a partir deste ID será lido as mensagens pendentes na fila
29 | int m=0;
30 |
31 | //loop infinito pode ser alterado por algum timer de intervalo curto
32 | while (true){
33 |
34 | //executa comando no Telegram para obter as mensagens pendentes a partir de um off-set (limite inicial)
35 | updatesResponse = bot.execute(new GetUpdates().limit(100).offset(m));
36 |
37 | //lista de mensagens
38 | List updates = updatesResponse.updates();
39 |
40 | //análise de cada ação da mensagem
41 | for (Update update : updates) {
42 |
43 | //atualização do off-set
44 | m = update.updateId()+1;
45 |
46 | System.out.println("Recebendo mensagem:"+ update.message().text());
47 |
48 | //envio de "Escrevendo" antes de enviar a resposta
49 | baseResponse = bot.execute(new SendChatAction(update.message().chat().id(), ChatAction.typing.name()));
50 | //verificação de ação de chat foi enviada com sucesso
51 | System.out.println("Resposta de Chat Action Enviada?" + baseResponse.isOk());
52 |
53 | //envio da mensagem de resposta
54 | sendResponse = bot.execute(new SendMessage(update.message().chat().id(),"Não entendi..."));
55 | //verificação de mensagem enviada com sucesso
56 | System.out.println("Mensagem Enviada?" +sendResponse.isOk());
57 |
58 | }
59 |
60 | }
61 |
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Blog
2 | Aplicativos e tutoriais utilizados no Blog
3 |
--------------------------------------------------------------------------------