- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在制作一款 Connect 4 游戏。一切正常,当您在启动时使用
加载游戏时“./a.out -l”
如果下面的这段代码位于检查该标志的条件中
int r, c, i;
// this loads the game settings into game
FILE *fp = fopen("gameSave.txt", "r");
fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
fscanf(fp, "\n\n");
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fscanf(fp, " %c", &aPtr[r][c]);
printf("%c ", aPtr[r][c]);
}
fscanf(fp, "\n");
printf("\n");
}
printf("Game Loaded\n");
fclose(fp);
它工作得很好,在这个条件之后我调用函数 printBoard() 并得到以下输出
Starting Game
0 1 0 9 9 9 9
0 1 9 9 9 9 9
0 1 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
Game Loaded
*********************
Starting Board
*********************
------ Connect *Four ------
Connect X Command Line Game
&&===========================&&
|| | | | | | | ||
|| | | | | | | ||
|| | | | | | | ||
|| | | | | | | ||
|| X | O | | | | | ||
|| X | O | | | | | ||
|| X | O | X | | | | ||
&&===========================&&
1 2 3 4 5 6 7
Player: 2s Turn
Enter Column # To Place Token
然后我就可以按预期玩游戏并且一切正常。但是,如果我将相同的代码块放入如下函数中
void loadGame(int num_rows, int num_columns, int length_to_win, char player, char **aPtr){
int r, c, i;
// this loads the game settings into game
FILE *fp = fopen("gameSave.txt", "r");
fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
fscanf(fp, "\n\n");
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fscanf(fp, " %c", &aPtr[r][c]);
printf("%c ", aPtr[r][c]);
}
fscanf(fp, "\n");
printf("\n");
}
printf("Game Loaded\n");
printBoard(num_rows, num_columns, aPtr);
fclose(fp);
}
然后在条件中注释掉相同的代码,只留下以下内容
load = true;
loadGame(num_rows, num_columns, length_to_win, player, aPtr);
它给了我这个输出
Starting Game
0 1 0 9 9 9 9
0 1 9 9 9 9 9
0 1 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
9 9 9 9 9 9 9
Game Loaded
*********************
Starting Board
*********************
------ Connect *Four ------
Connect X Command Line Game
&&===========================&&
|| | | | | | | ||
|Segmentation fault: 11
而且我不太确定为什么...这意味着在创建板可视化的 for 循环中存在某种问题...可能是范围问题(可能与数字有关)行或列)?创建板的函数如下所示
void printBoard(int num_rows, int num_columns, char **aPtr) {
int row, col;
int r, c;
printf("\n");
puts("------ Connect *Four ------");
puts("Connect X Command Line Game");
// for fancy top of board frame
printf("&&");
for(col = 1; col < num_columns; col++) {
printf("====");
}
printf("===");
printf("&&\n");
// for the rows/columns of the board
for(row = num_rows - 1; row >= 0; row--){
printf("|");
for(col = 0; col < num_columns; col++){
if(aPtr[row][col] == '0') {
printf("| X ");
}
else if(aPtr[row][col] == '1') {
printf("| O ");
}
else {
printf("| ");
}
}
puts("||");
}
// for fancy bottom of board frame
printf("&&");
for(col = 1; col < num_columns; col++) {
printf("====");
}
printf("===");
printf("&&\n");
printf(" ");
// if the board is less than 100 columns,
// print the column number (for readability)
if (col < 100){
for(col = 0; col < num_columns; col++) {
if (col < 10) {
printf(" %d ", col + 1);
}
else {
printf("%d ", col + 1);
}
}
puts("\n");
}
}
任何关于为什么会发生这种情况的建议将不胜感激,如果您想自己运行代码,所有代码都在下面
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <stdbool.h>
// This is where the default board gets created
// The reasoning behind setting all values = '9'
// is that when a player places their piece on the board
// the location of that piece will then become their
// player number, which is used accordingly when
// saving and loading the game
void initialize(int num_rows, int num_cols, char **aPtr) {
int r, c;
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_cols; c++) {
aPtr[r][c] = '9';
}
}
}
// end of initialize
// this is where the board gets printed according to its
// state (whether default-starting, game in progress, or
// loaded game). It looks at the values of the 2D array
// and depending on whether or not they are default 9's or
// player numbers, prints out the appropriate illustration
void printBoard(int num_rows, int num_columns, char **aPtr) {
int row, col;
printf("\n");
puts("------ Connect *Four ------");
puts("Connect X Command Line Game");
// for fancy top of board frame
printf("&&");
for(col = 1; col < num_columns; col++) {
printf("====");
}
printf("===");
printf("&&\n");
// for the rows/columns of the board
for(row = num_rows - 1; row >= 0; row--){
printf("|");
for(col = 0; col < num_columns; col++){
if(aPtr[row][col] == '0') {
printf("| X ");
}
else if(aPtr[row][col] == '1') {
printf("| O ");
}
else {
printf("| ");
}
}
puts("||");
}
// for fancy bottom of board frame
printf("&&");
for(col = 1; col < num_columns; col++) {
printf("====");
}
printf("===");
printf("&&\n");
printf(" ");
// if the board is less than 100 columns,
// print the column number (for readability)
if (col < 100){
for(col = 0; col < num_columns; col++) {
if (col < 10) {
printf(" %d ", col + 1);
}
else {
printf("%d ", col + 1);
}
}
puts("\n");
}
}
// end of printBoard
// This is a global variable used to signify the state of
// whether or not there is a winner
char winnerVal = '0';
// this checks if the board is full or not to check for a win or tie
int checkFullBoard(int num_rows, int num_columns, char **aPtr) {
for (int i = 0; i < num_columns; i++) {
if (aPtr[num_rows - 1][i] == '9') {
return 0;
}
}
return 1;
}
// this checks for the first available location within a column for players
// to place their pieces, if there is no available space in a column, it returns
// -1 which signals the player that they must adjust their placement
int checkForColHeight(int num_rows, int num_columns, int column, char **aPtr) {
for (int i = 0; i < num_rows; i++) {
if (aPtr[i][column] == '9') {
return i;
}
}
return -1;
}
// this is where a token is placed at an appropriate position if it is within the
// allowances of the game
int place_token(char player, int column, int num_rows, int num_columns, char **aPtr) {
/*Check for invalid Parameters*/
if(column > (num_columns - 1) || column < 0 || (player != '1' && player != '0')
|| num_columns <= 0 || num_rows <= 0) {;
return -1;
}
int firstOpenRow = checkForColHeight(num_rows, num_columns, column, aPtr);
if (firstOpenRow == -1) {
return -1;
}
else {
aPtr[firstOpenRow][column] = player;
return 1;
}
}
// this is where a check for a win occurs. Essentially until it finds a line long enough to win it'll return negative
char checkForSeries(int direction, int num_rows, int num_columns, int length_to_win, int r, int c, char **aPtr) {
switch (direction) {
/*Horizontal*/
case 0:
for (int i = 1; i < length_to_win; i++) {
if (aPtr[r][c] == '9' ) {
return '2';
}
else if (aPtr[r][c] != aPtr[r][c + i] ) {
return '2';
}
}
return aPtr[r][c];
break;
/*Vertical*/
case 1:
for (int i = 1; i < length_to_win; i++) {
if (aPtr[r][c] == '9' ) {
return '2';
}
else if (aPtr[r][c] != aPtr[r + i][c] ) {
return '2';
}
}
return aPtr[r][c];
break;
/*Left Diag*/
case 2:
for (int i = 1; i < length_to_win; i++) {
if (aPtr[r][c] == '9' ) {
return '2';
}
else if (aPtr[r][c] != aPtr[r + i][c - i] ) {
return '2';
}
}
return aPtr[r][c];
break;
/*Right Diag*/
case 3:
for (int i = 1; i < length_to_win; i++) {
if (aPtr[r][c] == '9' ) {
return '2';
}
else if (aPtr[r][c] != aPtr[r + i][c + i] ) {
return '2';
}
}
return aPtr[r][c];
break;
return '2';
}
return '0';
}
// end of checkForSeries
// checks for any horizontal wins
int checkHorizontal(int num_rows, int num_columns, int length_to_win, char **aPtr){
int r, c;
for (r = 0; r < num_rows; r++) {
for(c = 0; c < num_columns - (length_to_win - 1); c++) {
char winner = checkForSeries(0, num_rows, num_columns, length_to_win, r, c, aPtr);
if(winner != '2') {
winnerVal = winner;
return 1;
}
}
}
return 0;
}
// checks for any vertical wins
int checkVertical(int num_rows, int num_columns, int length_to_win, char **aPtr){
int r, c;
for (c = 0; c < num_columns; c++) {
for(r = 0; r < num_rows - (length_to_win - 1); r++) {
char winner = checkForSeries(1, num_rows, num_columns, length_to_win, r, c, aPtr);
if(winner != '2') {
winnerVal = winner;
return 1;
}
}
}
return 0;
}
// checks for any left-diagonal wins
int checkDiagLeft(int num_rows, int num_columns, int length_to_win, char **aPtr){
int r, c;
for (r = 0; r < num_rows - (length_to_win - 1); r++) {
for(c = num_columns - 1; c > (length_to_win - 2); c--) {
char winner = checkForSeries(2, num_rows, num_columns, length_to_win, r, c, aPtr);
if(winner != '2') {
winnerVal = winner;
return 1;
}
}
}
return 0;
}
// checks for any right-diagonal wins
int checkDiagRight(int num_rows, int num_columns, int length_to_win, char **aPtr){
int r, c;
for (r = 0; r < num_rows - (length_to_win - 1); r++) {
for(c = 0; c < num_columns - (length_to_win - 1); c++) {
char winner = checkForSeries(3, num_rows, num_columns, length_to_win, r, c, aPtr);
if(winner != '2') {
winnerVal = winner;
return 1;
}
}
}
return 0;
}
/*Return the integer representation of the winning player, -1 if a tie or error*/
char winner(int num_rows, int num_columns, int length_to_win, char **aPtr) {
if (length_to_win <= 0 || length_to_win > num_columns || num_columns <= 0 || num_rows <= 0) {
return '2';
}
if (checkHorizontal(num_rows, num_columns, length_to_win, aPtr)
|| checkVertical(num_rows, num_columns, length_to_win, aPtr)
|| checkDiagLeft(num_rows, num_columns, length_to_win, aPtr)
|| checkDiagRight(num_rows, num_columns, length_to_win, aPtr)) {
return winnerVal;
}
if(checkFullBoard(num_rows, num_columns, aPtr)) {
return '2';
}
return '2';
}
char **loadGame(int num_rows, int num_columns, int length_to_win, char player, char **aPtr){
int r, c, i;
// this loads the game settings into game
FILE *fp = fopen("gameSave.txt", "r");
fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
fscanf(fp, "\n\n");
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fscanf(fp, " %c", aPtr[r][c]);
printf("%c ", aPtr[r][c]);
}
fscanf(fp, "\n");
printf("\n");
}
return aPtr;
printf("Game Loaded\n");
fclose(fp);
}
// END OF FUNCTIONS
// *******************************************************************************************************
// *******************************************************************************************************
// START OF MAIN METHOD
int main (int argc, char *argv[]) {
setvbuf(stdout, NULL, _IONBF, 0);
int num_rows = 7;
int num_columns = 7;
int length_to_win = 4;
int i, index, attmpt;
char **aPtr;
char player = '0';
bool load = false;
printf("Starting Game\n");
// this loop checks for command line arguments and sets game variables accordingly.
for(index = 0; index < argc; ++index) {
if ( strncmp( argv[index], "-h", 5) == 0 ) {
num_rows =atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-height", 5) == 0 ) {
num_rows =atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-w", 5) == 0 ) {
num_columns = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-width", 5) == 0 ) {
num_columns = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-s", 5) == 0 ) {
num_rows = atoi(argv[index + 1]);
num_columns = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-square", 5) == 0 ) {
num_rows = atoi(argv[index + 1]);
num_columns = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-c", 5) == 0 ) {
length_to_win = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-connect", 5) == 0 ) {
length_to_win = atoi(argv[index + 1]);
}
if ( strncmp( argv[index], "-l", 5) == 0 ) {
load = true;
aPtr = loadGame(num_rows, num_columns, length_to_win, player, aPtr);
// int r, c;
// this loads the game settings into game
// FILE *fp = fopen("gameSave.txt", "r");
// fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
// fscanf(fp, "\n\n");
// aPtr = malloc(num_rows * sizeof(char*));
// for (i = 0; i < num_rows; i++){
// aPtr[i] = malloc(num_columns * sizeof (char));
// }
// for (r = 0; r < num_rows; r++) {
// for (c = 0; c < num_columns; c++) {
// fscanf(fp, " %c", &aPtr[r][c]);
// printf("%c ", aPtr[r][c]);
// }
// fscanf(fp, "\n");
// printf("\n");
// }
// printf("Game Loaded\n");
// fclose(fp);
}
}
// these conditionals check for valid board size
if (num_rows <= 2 || num_columns <= 2 ){
printf("%s\n","You entered a width or length that was invalid." );
}
if (length_to_win <= 2 || length_to_win > (num_rows - 1)) {
printf("%s\n","You entered a winning length that was invalid." );
}
// if the game isn't loaded upon execution, the load it normally
if (load == false) {
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
initialize(num_rows, num_columns, aPtr);
}
printf("%s\n", "*********************");
printf("%s\n", " Starting Board ");
printf("%s\n", "*********************");
puts("\n");
printBoard(num_rows, num_columns, aPtr);
printf("Player: %cs Turn\n", player + 1);
puts("\n");
// this is the loop that runs while the game is in progress
// it continually checks for winners, full boards, valid moves, etc.
while(1) {
// prompts the user to select which column they want their piece to be placed
// -1 on the temp because the first column is technically 0 so if a player
// wants to place their piece in column "1", it'll be placed at index[0] accordingly
printf("%s\n", "Enter Column # To Place Token");
int column;
char temp[20];
char temp2[20];
scanf("%s", temp);
if (strncmp (temp, "save", 5) == 0){
int r, c;
// this writes the game settings to a file called "gameSave.txt"
// if the file doesn't exist it just creates it
int *rows = &num_rows;
int *cols = &num_columns;
int *len = &length_to_win;
char *play = &player;
FILE *fp = fopen("gameSave.txt", "w+");
fprintf(fp, "%d ", *rows);
fprintf(fp, "%d ", *cols);
fprintf(fp, "%d ", *len);
fprintf(fp, "%c ", *play);
fprintf(fp, "\n\n");
// this loop saves the actual board state to the file
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fprintf(fp, "%c ", aPtr[r][c]);
}
fprintf(fp, "\n");
}
printf("Game Saved\n");
fclose(fp);
}
if (strncmp (temp, "load", 5) == 0){
int r, c;
// this loads the game settings into game
FILE *fp = fopen("gameSave.txt", "r");
fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
fscanf(fp, "\n\n");
// this creates space for the loaded game
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
// this fills the board with the saved game-data
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fscanf(fp, " %c", &aPtr[r][c]);
}
fscanf(fp, "\n");
}
printf("Game Loaded\n");
fclose(fp);
}
column = atoi(temp) - 1;
attmpt = place_token(player, column, num_rows, num_columns, aPtr);
if ((column < 0 || column > (num_columns - 1)) && (strncmp (temp, "save", 5) != 0) && (strncmp (temp, "load", 5) != 0)) {
printf("%s\n","You entered a column that was invalid. Please try again." );
continue;
}
if (attmpt != 1 && (strncmp (temp, "save", 5) != 0) && (strncmp (temp, "load", 5) != 0)) {
printf("%s\n","This row is already full. Please try again." );
continue;
}
printf("%s\n", "************************");
printf("%s\n", " Board Updated ");
printf("%s\n", "************************");
puts("\n");
printBoard(num_rows, num_columns, aPtr);
puts("\n");
if ((strncmp (temp, "save", 5) != 0) && (strncmp (temp, "load", 5) != 0)) {
if (checkFullBoard(num_rows, num_columns, aPtr)) {
printf("%s\n","This game is a tie. Thanks for Playing.\n");
return 0;
}
}
// this if-statement will constantly be run while the game progresses,
// meaning that winner will be called at every turn and
// all of the win conditions will be checked until a winner is found
char isWin = winner(num_rows, num_columns, length_to_win, aPtr);
if(isWin != '2') {
printf("Player: %c is the winner! Thanks for Playing.\n", isWin + 1);
printf("Play again? (enter 'y' to continue)\n");
printf("Or load a previously saved game with 'load'\n");
scanf("%s", temp2);
// if the player wants to play again, clear the board for a new game
// and start over
if (strncmp (temp2, "y", 5) == 0){
initialize(num_rows, num_columns, aPtr);
printBoard(num_rows, num_columns, aPtr);
puts("\n");
}
if (strncmp (temp2, "load", 5) == 0) {
int r, c;
// this loads the game settings into game
FILE *fp = fopen("gameSave.txt", "r");
fscanf(fp, "%d %d %d %c", &num_rows, &num_columns, &length_to_win, &player);
fscanf(fp, "\n\n");
aPtr = malloc(num_rows * sizeof(char*));
for (i = 0; i < num_rows; i++){
aPtr[i] = malloc(num_columns * sizeof (char));
}
for (r = 0; r < num_rows; r++) {
for (c = 0; c < num_columns; c++) {
fscanf(fp, " %c", &aPtr[r][c]);
printf("%c ", aPtr[r][c]);
}
fscanf(fp, "\n");
printf("\n");
}
printf("Game Loaded\n");
puts("\n");
printBoard(num_rows, num_columns, aPtr);
fclose(fp);
}
else {
printf("Game over, goodbye!\n");
return 0;
}
}
// if a winner is not found then this if/else will continue to switch
// between players at the end of each turn
if ((strncmp (temp, "save", 5) != 0) && (strncmp (temp, "load", 5) != 0) && (strncmp (temp2, "y", 5) != 0)) {
if (player == '1') {
player = '0';
}
else {
player = '1';
}
}
memset(temp, 0, sizeof temp);
memset(temp2, 0, sizeof temp2);
printf("Player: %cs Turn\n", player +1);
} // end of while loop
return 0;
}
最佳答案
首先,你的问题有点笨拙,请查看评论中@Michael提供的指南。
现在,根据我的理解,问题在于您在调用函数 loadGame(...) 时传递变量的值,而不是对它们的引用。该函数不会修改变量 num_rows、num_columns、length_to_win 和其他变量。
看看这个例子:
void wrong (int a, int b, int c) {
a = 1;
b = 2;
c = 3;
}
void correct (int *a, int *b, int *c) {
*a = 1;
*b = 2;
*c = 3;
}
int main(int argc, const char * argv[]) {
int a, b, c;
a = b = c = -1;
/*
Not modified after function call.
*/
wrong(a, b, c);
printf("wrong a: %i b: %i c: %i\n", a, b, c);
/*
Modified after function call.
*/
correct(&a, &b, &c);
printf("correct a: %i b: %i c: %i\n", a, b, c);
return 0;
}
关于c - 独立代码块可以工作,但带有/相同代码的函数调用不行(C 程序),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42628255/
我想使用 li 和 ul 制作一个多级下拉列表,以便显示我博客中按年和月排序的所有文章。我希望我的下拉菜单看起来像 Google Blogspot 下拉菜单: 这是我的 CSS 和 HTML 代码 u
我在 Win 7 64 机器上将 CodeBlocks 与 gcc 4.7.2 和 gmp 5.0.5 结合使用。开始使用 gmpxx 后,我看到一个奇怪的段错误,它不会出现在 +、- 等运算符中,但
我正在使用 tern 为使用 CodeMirror 运行的窗口提供一些增强的智能感知,它工作正常,但我遇到了一个问题,我想添加一些自定义“types”,可以这么说,这样下拉列表中它们旁边就有图标了。我
我正在尝试让我的 PC 成为 Android 2.3.4 设备的 USB 主机,以便能够在不需要实际“附件”的情况下开发 API。为此,我需要将 PC 设置为 USB 主机和“设备”(在我的例子中是运
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
我在设置服务器方面几乎是个新手,但遇到了一个问题。我有一个 Ubuntu 16.04 VPS 并安装了 Apache2 和 Tomcat7。我正在为 SSL 使用 LetsEncrypt 和 Cert
我在一个基于谷歌地图的项目上工作了超过 6 个月。我使用的是 Google Maps API V1 及其开发人员 API key 。当我尝试发布应用程序时,我了解到 Google API V1 已被弃
我是 Python 的新手,所以如果我对一些简单的事情感到困惑,请原谅。 我有一个这样的对象: class myObject(object): def __init__(self):
这个问题已经有答案了: How can I access object properties containing special characters? (2 个回答) 已关闭 9 年前。 我正在尝
我有下面的 CSS。我想要的是一种流体/液体(因为缺乏正确的术语)css。我正在为移动设备开发,当我改变模式时 从纵向 View 到陆地 View ,我希望它流畅。现在的图像 在陆地 View 中效
我正在尝试使用可以接受参数的缓存属性装饰器。 我查看了这个实现:http://www.daniweb.com/software-development/python/code/217241/a-cac
这个问题在这里已经有了答案: Understanding slicing (36 个答案) 关闭 6 年前。 以a = [1,2,3,4,5]为例。根据我的直觉,我认为 a[::-1] 与 a[0:
mysqldump -t -u root -p mytestdb mytable --where=datetime LIKE '2014-09%' 这就是我正在做的事情,它会返回: mysqldum
我正在制作销售税计算器,除了总支付金额部分外,其他一切都正常。在我的程序中,我希望能够输入一个数字并获得该项目的税额我还希望能够获得支付的总金额,包括交易中的税金。到目前为止,我编写的代码完成了所有这
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
我是否必须进行任何额外的设置才能让 apache-airflow 在任务失败时向我发送电子邮件。我的配置文件中有以下内容(与默认值保持不变): [email] email_backend = airf
这个问题在这里已经有了答案: What does the $ symbol do in VBA? (5 个回答) 3年前关闭。 使用返回字符串(如 Left)的内置函数有什么区别吗?或使用与 $ 相同
我有一个用VB6编写的应用程序,我需要使用一个用.NET编写的库。有什么方法可以在我的应用程序上使用该库吗? 谢谢 最佳答案 这取决于。您可以控制.NET库吗? 如果是这样,则可以修改您的库,以便可以
当我创建一个以 ^ 开头的类方法时,我尝试调用它,它给了我一个错误。 class C { method ^test () { "Hi" } } dd C.new.test; Too m
我已经使用 bower 安装了 angularjs 和 materialjs。 凉亭安装 Angular Material 并将“ngMaterial”注入(inject)我的应用程序,但出现此错误。
我是一名优秀的程序员,十分优秀!