小编Mic*_*tta的帖子

C中的char数组问题

char label[8] = "abcdefgh";
char arr[7] = "abcdefg";

printf("%s\n",label);
printf("%s",arr);
Run Code Online (Sandbox Code Playgroud)

====输出==========

ABCDEFGH

abcdefgÅ

为什么Å附加在字符串arr的末尾?我在Turbo C++中运行C代码.

c

1
推荐指数
2
解决办法
1341
查看次数

为什么输出这个?(JAVA)

这是一个Rectangle类的实例方法,我们修改矩形的x和y坐标及其宽度和高度

public void modify(int newX, int y, int width, int h) {
    int x = newX;
    this.y = y;
    width = width;
    this.height = height;
}

Rectangle r3 = new Rectangle(0, 0, 10, 10);
r3.modify(5, 5, 50, 50);
System.out.print(r3.getX() + " " + r3.getY() + " ");
System.out.println(r3.getWidth() + " " + r3.getHeight());
Run Code Online (Sandbox Code Playgroud)

我有这个代码,我知道输出是0 5 10 10,但我不完全确定原因.有谁能解释为什么?

java object

1
推荐指数
1
解决办法
200
查看次数

如何阻止Github更改我的项目名称?

我正在尝试在Github中创建一个新的存储库,我在使用它的名字时遇到了麻烦.这是一个C++项目,所以我想称之为:

上层项目++

但是Github给我创建了一个repo,其中包含以下网址:

混帐://github.com/alanw/superproject--.git

看起来很糟糕.

这是Github或git本身的约束吗?


我玩了几个替代品,但我不想热衷于:

  • superprojectcpp
  • superprojectpp
  • superproject_cpp
  • superprojectplusplus

有任何想法吗?

git github

1
推荐指数
1
解决办法
530
查看次数

关于 UNIX 作为虚拟机和 C 作为脚本语言的引用来源

我记得有一句话是这样的:

Unix 是通用虚拟机,C 是它的脚本语言。

我正在寻找这句话的来源和确切的语言。我依稀记得 Eric Raymond 是最接近的消息来源,但我在他的文章中找不到。

c unix

1
推荐指数
1
解决办法
137
查看次数

我应该在哪里上传我的代码供其他人参与?

我已经制作了自己的php MVC框架,并且还编写了自己的文档.它完成了大约80%.现在基本上我正在寻找一种方式让其他开发者应该能够分析我的代码,并可能携起手来,进一步发展和完善,也是他们应该能够通过文档(HTML文件)进行浏览.

我知道谷歌应用程序引擎,但它目前主要用于python.那么我应该在哪里上传我应该可以运行的php代码和文档(html文件)可浏览?

php web

1
推荐指数
1
解决办法
1469
查看次数

为什么我的应用程序在复制大文件时会冻结?

我有一个MFC应用程序.基本上只是将文件从一个驱动器复制到另一个驱动器.当我复制大文件(超过1 Gb)并单击我的窗口时,我的应用程序冻结,但复制在后台进行.有人告诉我,我必须使用工作线程.我用它,但它仍然冻结.当我复制小文件时,就可以了.我无法弄清楚可能是什么问题.请有人帮忙!

这是我的代码:

void CGetFileListDlg::OnBnClickedButtonGetFileList()  
{
 //here i'm doing file list comparing
 AfxBeginThread( CopyThread, &Tstruct ); //here i call my thread and give a struct to it as a paramter, which contains, which file i have to copy
}   

UINT CopyThread( LPVOID pParam )
{
UINT uiMaxPass = 3;
UINT uiPAssCount = 0;
int i = 0;

threadstruct *Test = (threadstruct*)(pParam);
CGetFileListDlg* ptr = (CGetFileListDlg*)Test->ez ;

struct address
{
    char *from;
    char *to;
    int current;
};

struct address Address;


for …
Run Code Online (Sandbox Code Playgroud)

c windows mfc multithreading

1
推荐指数
1
解决办法
274
查看次数

Searching for specific HTML string using Python

What modules would be the best to write a python program that searches through hundreds of html documents and deletes a certain string of html that is given. For instance, if I have an html doc that has <a href="test.html">Test</a> and I want to delete this out of every html page that has it.

Any help is much appreciated, and I don't need someone to write the program for me, just a helpful point in the right direction.

html python

1
推荐指数
1
解决办法
1300
查看次数

拆分逗号分隔的字符串以计算重复项

我的数据库中有以下数据(以逗号分隔的字符串):

"word,test,hello"
"test,lorem,word"
"test"
......
等等

如何将此数据转换为字典,其中每个字符串被分成每个不同的单词以及它出现的次数,即

{"test", 3},  {"word", 2}, {"hello", 1}, {"lorem", 1}
Run Code Online (Sandbox Code Playgroud)

我会有大约3000行数据,以防这对所提供的任何解决方案产生影响.我也使用.NET 3.5(并有兴趣看到使用linq的任何解决方案)

c#

1
推荐指数
1
解决办法
1893
查看次数

模拟器运行Symbian应用程序

有没有运行symbian应用程序的模拟器?

symbian

1
推荐指数
1
解决办法
2437
查看次数

从PLSQL游标中获取两条记录

我的问题很简短.我创建了一个游标来从我的表中获取一些值.我想获取光标的当前记录(获取的记录)和光标中的下一条记录而不提取它,因为我想对当前记录和下一条记录进行计算.在传统的编程中,它是一个简单的操作; 你可以通过将它增加1来使用for index来实现.

你有什么建议吗?

plsql

1
推荐指数
1
解决办法
3772
查看次数

标签 统计

c ×3

c# ×1

git ×1

github ×1

html ×1

java ×1

mfc ×1

multithreading ×1

object ×1

php ×1

plsql ×1

python ×1

symbian ×1

unix ×1

web ×1

windows ×1