小编Wil*_*ens的帖子

将文件移至 GitHub 中的文件夹(在其网站上)

我想将文件和(如果可能)文件夹移动到 Git 存储库中的另一个文件夹(通过 GitHub 网站- 因此不使用终端)。

这可能吗?如果是这样,怎么办?

directory github

12
推荐指数
1
解决办法
3万
查看次数

有没有办法将符文打印为单个字符?

程序目的:符文密码

最终编辑:

我现在(感谢极端惊人的人提供的非常有用的答案)完成了我一直在做的项目;并且 - 对于未来的读者,我还提供了完整的代码。

再一次,如果没有我从下面的人那里得到的所有帮助,这是不可能的,感谢他们 -再一次

GitHub 上的原始代码

代码

(缩短了一点)

#include <stdio.h>
#include <locale.h>
#include <wchar.h>
#define UNICODE_BLOCK_START 0x16A0
#define UUICODE_BLOCK_END   0x16F1

int main(){
  setlocale(LC_ALL, "");
  wchar_t SUBALPHA[]=L"??????????????????????????";
  wchar_t DATA[]=L"hello";
  
    int lenofData=0;
    int i=0;

    while(DATA[i]!='\0'){
          lenofData++;  i++;
          }

  for(int i=0; i<lenofData; i++) {
      printf("DATA[%d]=%lc",i,DATA[i]);
      DATA[i]=SUBALPHA[i];
      printf(" is now Replaced by %lc\n",DATA[i]); 
      }        printf("%ls",DATA);

return 0;
}
Run Code Online (Sandbox Code Playgroud)

输出:

DATA[0]=h is now Replaced by ?
DATA[1]=e is now Replaced by …
Run Code Online (Sandbox Code Playgroud)

c arrays string char

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

阿诺德/书密码与Python

我正在尝试写一本密码解码器,以下是我到目前为止所得到的。

code = open("code.txt", "r").read() 
my_book = open("book.txt", "r").read() 
book = my_book.txt 
code_line = 0 
while code_line < 6 :
      sl = code.split('\n')[code_line]+'\n'
      paragraph_num = sl.split(' ')[0]
      line_num =  sl.split(' ')[1]
      word_num = sl.split(' ')[2]
      x = x+1
Run Code Online (Sandbox Code Playgroud)

循环更改以下变量:

  • 段落
  • 线
  • 单词

一切都运转良好。

但我现在需要的是如何指定段落,然后指定行,然后在 while 循环中指定 for 循环这个词将完美地工作。

所以我想从段落号“paragraph_num”和行号“line_num”中获取字号“word_num”

这是我的代码文件,我正在尝试将其转换为单词

“段落号”、“行号”、“字数”

70 1 3
50 2 2
21 2 9
28 1 6
71 2 2
27 1 4
Run Code Online (Sandbox Code Playgroud)

然后我希望我的输出看起来像这样

word1
word2  
word3
word4 
word5 
word6
Run Code Online (Sandbox Code Playgroud)

顺便说一下,我的书“我需要从中获取文字的文件”看起来像这样

单词1 单词2 单词3 …

python encryption decode cpu-word paragraph

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

标签 统计

arrays ×1

c ×1

char ×1

cpu-word ×1

decode ×1

directory ×1

encryption ×1

github ×1

paragraph ×1

python ×1

string ×1