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
private Point get_display_info() { | |
int screenWidth; | |
int screenHeight; | |
DisplayMetrics dm = new DisplayMetrics(); | |
dm = getResources().getDisplayMetrics(); | |
screenWidth = dm.widthPixels; | |
screenHeight = dm.heightPixels; |
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
Sub randomTitle() | |
'初始化亂數種子,這樣每次做Rnd才會不一樣 | |
Randomize() | |
'產生1~14的數字 | |
Dim value As Integer = CInt(Int((14 * Rnd()) + 1)) | |
'修改標題 | |
me.Caption = value | |
End Function |
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> | |
int main() | |
{ | |
printf("hello"); | |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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
RelativeLayout contentView = (RelativeLayout) findViewById(R.id.advanceViewRelativeLayout); | |
Drawable drawable = MainActivity.view_image_drawable;// getResources().getDrawable(R.drawable.sample); | |
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( | |
RelativeLayout.LayoutParams.WRAP_CONTENT, | |
RelativeLayout.LayoutParams.WRAP_CONTENT); | |
params.addRule(RelativeLayout.BELOW, R.id.headerLine); | |
params.addRule(RelativeLayout.ABOVE, R.id.footerLine); | |
params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); | |
params.setMargins(10, 10, 10, 10); |
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
google.maps.event.addListener(map, 'click', function(event) { | |
marker.setPosition(event.latLng); | |
}); |
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
void f(int a, int *b, int **c, int *d, int e){ | |
a = *b+(**c); b=&a; (**c)+=e++; | |
*b = a+(*(d+1)); | |
e=*b+(**c)+*d; | |
printf("%d %d\n", e, *b); | |
} | |
int main(){ | |
int i=1,j=2; | |
int k[] = {3,2,1,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 <stdlib.h> | |
#include <string.h> | |
void input(char *str); | |
void reversedString(char *str, char* output); | |
void reversedSentence(char *sentenceProblem,char *solvedSentenceProblem); | |
int sentenceLength(char *sentence); | |
char* getSecondWordPointer(char *sentence); | |
void getFirstWord(char *sentenceProblem, char *firstWord); |
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
void function(){ | |
int a = 1; | |
int b = 2; | |
int c = 3; | |
int* pt = &b; | |
printf("pt[-1] = %d", pt[-1]); | |
printf("pt[0] = %d", pt[0]); | |
printf("pt[1] = %d", pt[1]); | |
} |
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 <stdlib.h> | |
#include <string.h> | |
void input(char* string1, char* string2, char* string3); | |
void englishExample(char* string1, char* string2, char* string3); | |
int isMain(char* string); | |
int isVerb(char* string); | |
int isHaveToAddS(char* main); |