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<stdio.h> | |
| #include<math.h> | |
| int main(){ | |
| double h = 1 / pow(2,16); | |
| double df = (2*sin(1+h) + 3*sin(1) - 6*sin(1-h) + sin(1 - 2*h) )/(6*h); | |
| printf("cos(1) = %.6f \nd/dx sin(1) = %.6f",cos(1),df); | |
| return 0; | |
| } |
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<stdio.h> | |
| #include<math.h> | |
| int main(){ | |
| double h = 1 / pow(2,16); | |
| double df = (sin(1+h) - sin(1)) / h; | |
| printf("cos(1) = %.6f \nd/dx sin(1) = %.6f",cos(1),df); | |
| return 0; | |
| } |
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
| function X = gaussian_elimination(A,B) | |
| N = length(A); | |
| R = [A B]; | |
| for i = 1:N | |
| [val,pos] = max(abs(R(i:N,i))); | |
| R([pos+i-1 i],:) = R([i pos+i-1],:); | |
| R(i,:) = R(i,:) / R(i,i); | |
| for j = i+1:N | |
| m = R(j,i)/R(i,i); | |
| R(j,:) = R(j,:) - (m*R(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
| function X = gaussian_elimination(A,B) | |
| N = length(A); | |
| R = [A B]; | |
| for i = 1:N | |
| [val,pos] = max(abs(R(i:N,i))); | |
| R([pos+i-1 i],:) = R([i pos+i-1],:); | |
| R(i,:) = R(i,:) / R(i,i); | |
| for j = i+1:N | |
| m = R(j,i)/R(i,i); | |
| R(j,:) = R(j,:) - (m*R(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
| <?xml version="1.0" encoding="utf-8"?> | |
| <RelativeLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:padding="16dp"> | |
| <TextView | |
| android:id="@+id/textView" | |
| android:layout_width="wrap_content" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:orientation="vertical" | |
| android:padding="16dp" | |
| tools:context="com.promlert.class17_09_2017.MainActivity"> |
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
| <template> | |
| <div> | |
| <main> | |
| <md-list > | |
| <md-list-item v-for="bot in bots" :key="bot.id" :href="'#/bot/'+bot.id"> | |
| {{bot.name}} | |
| </md-list-item> | |
| </md-list> | |
| <md-button class="md-fab md-fab-bottom-right" @click="add"> | |
| <md-icon>add</md-icon> |
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
| /** | |
| * @author Pakkapon Phongthawee (07580028) | |
| * @license GPLv3 | |
| */ | |
| public class TestMyList { | |
| public static void main(String[] args){ | |
| MyList<Integer> list = new MyList(); | |
| list.unshift(1).unshift(2).unshift(3); | |
| list.shift(); | |
| list.push(1).push(2).push(3); |
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
| /** | |
| * @author Pakkapon Phongthawee (07580028) | |
| * @license GPLv3 | |
| */ | |
| public class MyList<Type> { | |
| private class Node{ | |
| public Type data; | |
| public Node prev,next; | |
| Node(Type d){ | |
| data = d; |
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
| [ | |
| { | |
| "message": "Panties: แม่นางแอนแปลนิยายเหยอ", | |
| "created_time": "2017-08-04T01:39:11+0000", | |
| "id": "m_mid.$cAAUfK78X8bdj3Cq-4ldquV2mTLLL" | |
| }, | |
| { | |
| "message": "-> kipparian (AC2A600C.AD2B4F14.D3981A89.IP) เข้าห้อง", | |
| "created_time": "2017-08-04T01:53:11+0000", | |
| "id": "m_mid.$cAAUfK78X8bdj3DeRRFdqvJI8p0iG" |