directory

Python Module Importing Issues

只谈情不闲聊 提交于 2020-01-13 16:55:11
问题 I run Windows 7, and I can import built-in modules, but when I save my own script and try to import it in IDLE, I get an error saying that the module doesn't exist. I use the Python text editor found by clicking "File" and "New Window" from the Python Shell. I save it as a .py file within a Module folder I created within the Python directory. However, whenever i type import module_name in IDLE, it says that the module doesn't exist. What am I doing wrong, or not doing? I've tried import

MATLAB : import package for base class

梦想与她 提交于 2020-01-13 11:03:48
问题 i have a base class A and a derived class B which are stored in the following folder structures. +myPackage (package Path) @A ( folder of class A ) A.m ( filename of class ) @B B.m Now i want to use class B which has the following head classdef B < A unfortunately this does not work because they are in different folders and i cannot import like this: import myPackage.* classdef B < A Is it possible to solve this without loosing the folder organisation? 回答1: I think if you write classdef B <

MATLAB : import package for base class

喜你入骨 提交于 2020-01-13 11:03:37
问题 i have a base class A and a derived class B which are stored in the following folder structures. +myPackage (package Path) @A ( folder of class A ) A.m ( filename of class ) @B B.m Now i want to use class B which has the following head classdef B < A unfortunately this does not work because they are in different folders and i cannot import like this: import myPackage.* classdef B < A Is it possible to solve this without loosing the folder organisation? 回答1: I think if you write classdef B <

How do I reinstall a directory in /usr/bin/python [closed]

坚强是说给别人听的谎言 提交于 2020-01-13 09:40:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have researched this for hours to no avail. I think I deleted my directory at /usr/bin/python when I installed python 3 because I get this error: -bash: /usr/bin/python: No such file or directory. I've tried sudo ln -s /usr/bin/python2.7 /usr/bin/python , and that gives me ln: /usr/bin/python: File exists

emacs ff-find-other-file and ff-search-directories isn't recursive

匆匆过客 提交于 2020-01-13 04:40:06
问题 Can we make ff-find-other-file to search recursively in directories which are listed in ff-search-directories. Instead of searching only in /usr/include, it would also search in /usr/include/llvm. Or likewise. 回答1: I've added this function to my .emacs file: (defun get-all-subdirectories(dir-list) "Returns a list of all recursive subdirectories of dir-list, ignoring directories with names that start with . (dot)" (split-string (shell-command-to-string (concat "find " (mapconcat 'identity dir

DataBase (datamodel) to build a folder structure

那年仲夏 提交于 2020-01-13 03:07:14
问题 Planning on building a Folder based structure in Java. I will be using a jquery plugin for the GUI, so I don't need need information on how to display the folder structure. I am looking for the backend logic on how folder information is stored, such that it can be retrieved in a quick and efficient manner. Each folder will have multiple subfolders. From a leaf folder, we should be able access the root quickly and efficiently Example: +Folder1 |__SubFolder1_1 |__SubFolder1_2 |_SubSubFolder1_2

C# 文件操作

半城伤御伤魂 提交于 2020-01-12 20:33:17
文件操作: 检查 创建 读取 写入 修改 删除 目录操作: 检查 创建 读取 写入 修改 删除 -------------------------------------------------------------------------------- 文件操作 若要执行此操作... 请参阅本主题中的示例... 创建文本文件 向文件写入文本 写入文本文件 向文件写入文本 读取文本文件 从文件读取文本 向文件中追加文本 File.AppendText FileInfo.AppendText 重命名或移动文件 File.Move FileInfo.MoveTo 删除文件 File.Delete FileInfo.Delete 复制文件 File.Copy FileInfo.CopyTo 获取文件大小 FileInfo.Length 获取文件属性 File.GetAttributes 设置文件属性 File.SetAttributes 确定文件是否存在 File.Exists 读取二进制文件 对刚创建的数据文件进行读取和写入 写入二进制文件 对刚创建的数据文件进行读取和写入 检索文件扩展名 Path.GetExtension 检索文件的完全限定路径 Path.GetFullPath 检索路径中的文件名和扩展名 Path.GetFileName 更改文件扩展名 Path

使用gcc编译C程序

℡╲_俬逩灬. 提交于 2020-01-12 20:14:16
GCC 全称"GNU C Compiler",不过自从面世后,增加了多种语言的支持,不过用的最多的是还是编译C或C++程序(另外有个工具叫做G++)。GCC是一种多目标编译器,通过可交互的后端处理器,为多种计算机架构生成可执行程序。 话说回来,什么是编译器呢? 编译器并不是一个单一的程序,它们通常由六七个稍小的程序组成,这些程序由一个叫做“编译器驱动器(Compiler driver)"的控制程序调用。 编译器一般由以下几部分组成: 预处理器(preprocessor) 语法和语义检查器(syntactic and semantic checker) 代码生成器(code generator) 汇编程序(assembler) 优化器(optimizer) 链接器(linker) 链接器确认main函数的初始进入点(程序开始执行的地方),把符号引用(symbolic reference)绑定到内存地址,把所有的目标文件集中到一起,再加上库文件,从而产生可执行文件。 本文主要介绍使用GCC编译C程序,不过GCC不支持C语言的许多“方言”,目前一般使用命令行参数 -std=c99 指定编译器支持C99标准。GCC对C11的标准支持是不完整的,尤其是涉及定义在头文件<threads.h>中的多线程函数。这是因为GCC的C链接库长期以来支持POSIX标准的多线程功能

Hive的基本用法

巧了我就是萌 提交于 2020-01-12 16:57:06
一、创建表 hive建表的时候默认的分割符是'\001',若在建表的时候没有指明分隔符,load文件的时候文件的分隔符需要是'\001'; 若文件分隔符不是'001',程序不会报错,但表查询的结果会全部为'null'; 1、建表的时候指定分隔符: create table pokes(foo int,bar string) row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile; load data local inpath '/root/pokes.txt' into table pokes; 2、替换分隔符 待导入的文件的分隔符与表的分隔符不一致,或者hive导出文件的分隔符需要替换: hive建表的时候虽然可以指定分隔符,不过用insert overwrite local directory这种方式导出文件时,字段的分隔符会被默认 设置为\001,一般都需要将字段分隔符转换为其它字符,可以使用如下命令 sed -e 's/\x01/\t/g' file 二、DDL操作 创建表 hive> CREATE TABLE pokes (foo INT, bar STRING); 创建表并创建索引字段ds hive> CREATE TABLE invites

How to create a directory in Lua?

雨燕双飞 提交于 2020-01-12 13:56:28
问题 Is it possible to create a directory in lua ? If so, how ? 回答1: There's a "system" call (or something like that, this is from memory) which you should be able to use to run an arbitrary program, which could include the mkdir command. EDIT: I found my Programming in Lua book. On page 203, it mentions how you could use an os.execute("mkdir " .. dirname) to "fake" a directory creation command. EDIT 2: Take note of Jonas Thiem's warning that this command can be abused if the directory name comes