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 <unistd.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| using namespace std; | |
| int main() | |
| { | |
| pid_t childpid,childpid2; | |
| int status; |
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 threading | |
| import random | |
| import time | |
| total_tickets = 5 | |
| lock = threading.Lock() | |
| def sellOut(sellerId, paymentWait): | |
| global total_tickets |
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
| # -*- coding: utf-8 -*- | |
| import wx | |
| import sqlite3 | |
| class LoginFrame(wx.Frame): | |
| def __init__(self, parent): | |
| wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString, pos=wx.DefaultPosition, | |
| size=wx.Size(350, 200), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL) |
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 sqlite3 | |
| ''' | |
| student(sno,sname,sage) | |
| course(cno,cname) | |
| sc(sno,cno,grade) | |
| 1.创建三个表 | |
| 2.分别向三个表插入数据: | |
| (1,mike,19),(2,john,18),(3,mary,18) |
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://www.cnblogs.com/wwjldm/p/6932083.html | |
| @Override | |
| public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | |
| if (requestCode == 1) { | |
| if (grantResults[0] == PackageManager.PERMISSION_GRANTED) | |
| Toast.makeText(this, "已授权", Toast.LENGTH_SHORT).show(); | |
| else | |
| Toast.makeText(this, "未授权", Toast.LENGTH_SHORT).show(); | |
| return; |
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
| package com.github; | |
| import java.util.Random; | |
| class Students { | |
| private final int sid; | |
| Students(int sid) { | |
| this.sid = sid; | |
| } |
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
| interface hello { | |
| void say(); | |
| } | |
| class sayHallo { | |
| sayHallo(hello hallo) { | |
| hallo.say(); | |
| } | |
| } |
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
| #!/bin/bash | |
| Tmp_file=${1}".tmp" | |
| Output=${1}".fbr" | |
| dd ibs=1122304 skip=1 if="$1" of="$Tmp_file" | |
| head -c -161 "$Tmp_file" > "$Output" | |
| rm "$Tmp_file" |
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 <SDL.h> | |
| #include <cstdio> | |
| using namespace std; | |
| //窗口宽 | |
| const int SCREEN_WIDTH = 1024; | |
| //窗口高 | |
| const int SCREEN_HEIGHT = 768; |
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 <SDL.h> | |
| #include <cstdio> | |
| #include <iostream> | |
| using namespace std; | |
| //窗口宽 | |
| const int SCREEN_WIDTH = 1024; | |
| //窗口高 | |
| const int SCREEN_HEIGHT = 768; |
OlderNewer