This file contains hidden or 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
exports.helloWorld = function helloWorld(req, res) { | |
var FeedParser = require('feedparser'); | |
var request = require('request'); | |
var feed = '====RSS_URL==='; | |
var req2 = request(feed); | |
var feedparser = new FeedParser({}); | |
var items = []; | |
var titles = ''; |
This file contains hidden or 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
public static Node insert(Node head,int data) { | |
//Complete this method | |
if(head==null) { | |
return new Node(data); | |
} | |
head.next = insert(head.next, data); | |
return head; | |
} |
This file contains hidden or 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
// Add your code here | |
Difference(int[] elements) { | |
this.elements = elements; | |
} | |
public void computeDifference() { | |
for(int i =0; i< elements.length; i++) { | |
for(int j=0; j < elements.length; j++) { | |
int difference = Math.abs(elements[i] - elements[j]); | |
if(difference > maximumDifference) { |
This file contains hidden or 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
class Student extends Person{ | |
private int[] testScores; | |
Student(String firstName, String lastName, int id, int[] testScores) { | |
super(firstName, lastName,id); | |
this.testScores = testScores; | |
} | |
public String calculate() { | |
double avarage = java.util.stream.IntStream.of(testScores) |
This file contains hidden or 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 java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); |
This file contains hidden or 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 java.io.*; | |
import java.util.*; | |
import java.util.stream.Stream; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int n = in.nextInt(); | |
in.close(); |
This file contains hidden or 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
IntStream.of(arr) | |
.boxed() | |
.collect(Collectors.toCollection(LinkedList::new)) | |
.descendingIterator() | |
.forEachRemaining(i -> System.out.print(i + " ")); |
This file contains hidden or 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
#include <Arduino.h> | |
#include <Hash.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266HTTPClient.h> | |
#include <WebSocketsClient.h> | |
#include <ArduinoJson.h> | |
extern "C" { | |
#include "user_interface.h" |
This file contains hidden or 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
// https://github.com/urish/arduino-slack-bot | |
#include <Arduino.h> | |
#include <Hash.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <ESP8266HTTPClient.h> | |
#include <WebSocketsClient.h> | |
#include <ArduinoJson.h> | |
#define WIFI_SSID "接続したいSSID" |
This file contains hidden or 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
String findPublicIP() { | |
WiFiClient client; | |
if (client.connect("api.ipify.org", 80)) { | |
//Serial.println("connected"); | |
client.println("GET /?format=txt HTTP/1.0"); | |
client.println("Host: api.ipify.org"); | |
client.println(); | |
} else { | |
Serial.println("connection failed"); | |
} |
NewerOlder