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
// Change to true to see a preview of your widget. | |
const testMode = true | |
// Optionally specify the size of your widget preview. | |
const widgetPreview = "large" | |
/* -- GREETING AND DATE -- */ | |
// Optionally show a greeting based on the time of day. | |
const showGreeting = true |
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
#include <iostream> | |
using namespace std; | |
int main() { | |
srand((unsigned)time(NULL)); | |
int p[4]; | |
p[0]=(rand()%9)+1; | |
p[1]=(rand()%9)+1; | |
while(p[1] == p[0]){ | |
p[1]=(rand()%9)+1; |
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
func romanToInt(input string) int { | |
currentPoint := len(input) - 1 | |
result := 0 | |
for currentPoint > 0 { | |
right := mapInt(getChar(currentPoint, input)) | |
left := mapInt(getChar(currentPoint-1, input)) | |
if right == left { | |
if result == 0 { |
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
@Path("/") | |
@Produces(MediaType.APPLICATION_JSON) | |
public class ExampleAPI { | |
/* | |
@PATH, @GET, @POST, @PUT, @DELETE 這些就不解釋了,夠直覺了。 | |
*/ | |
@GET | |
@Path("getExamplePath") | |
public String getExample(){ | |
... |
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
FROM tomcat:8.5.47-jdk8-openjdk | |
MAINTAINER [email protected] | |
EXPOSE 8080 | |
WORKDIR /myapp | |
COPY application.jar /myapp/application |
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 com.nutn.mcnmqtt; | |
import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.integration.annotation.IntegrationComponentScan; | |
import org.springframework.integration.annotation.ServiceActivator; | |
import org.springframework.integration.channel.DirectChannel; | |
import org.springframework.integration.core.MessageProducer; |
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 com.shawn.shawnwu4mac.dronebaseonmapbox | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.support.design.widget.FloatingActionButton | |
import android.util.Log | |
import com.mapbox.mapboxsdk.Mapbox | |
import com.mapbox.mapboxsdk.annotations.* | |
import com.mapbox.mapboxsdk.geometry.LatLng | |
import com.mapbox.mapboxsdk.maps.MapView |
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 java.util.*; | |
public class Main { | |
static double minAvg; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("輸入機率 用,相隔。"); | |
String input = sc.nextLine(); | |
String[] inputArray = input.split(","); |
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 java.util.*; | |
public class Main { | |
static double minAvg; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("輸入機率 用,相隔。"); | |
String input = sc.nextLine(); | |
String[] inputArray = input.split(","); |
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 java.util.*; | |
public class Main { | |
static double minAvg; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("type in frequency from the keyboard, use , to split.。"); | |
String input = sc.nextLine(); | |
String[] inputArray = input.split(","); |
NewerOlder