我试图在我的网站上使用git.该网站在我们的网络服务器上.
mkdir /home/website/public_html
cd /home/website/public_html
git --bare init
Run Code Online (Sandbox Code Playgroud)
然后我转到本地机器并切换到我的文件目录
git remote rm origin
git remote add origin git@server.com:/home/website/public_html
git push origin master
Enter passphrase for key '/c/Users/git/.ssh/id_rsa':
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 460 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
To git@server.com:/home/website/public_html
* [new branch] master -> master
Run Code Online (Sandbox Code Playgroud)
但现在当我回到我的服务器时:
ls /home/website/public_html
branches config description HEAD hooks info objects refs
Run Code Online (Sandbox Code Playgroud)
我推送到服务器的文件在哪里?我是以错误的方式来做这件事的吗?(我推出的本地文件夹中唯一的东西是自述文件)
如果我有一个全局.gitignore设置,并且项目在repo中有.gitignore,则repo中的那个覆盖全局或者它是否添加规则示例:
如果全球有:
*.exe
*.ini
Run Code Online (Sandbox Code Playgroud)
回购有:
*.ini
*.co
Run Code Online (Sandbox Code Playgroud)
*.exe会进入项目吗?
我想编写一个批处理文件,当我双击任何 apk 文件时帮助我安装 apk 文件
例如,当我单击 apk 文件 myBatchFile.bat 时执行
myBatchFile.bat 中应该包含什么
adb install what?
Run Code Online (Sandbox Code Playgroud)
谢谢
主类
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
Parent root = FXMLLoader.load(getClass().getResource("/application/Main.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
Run Code Online (Sandbox Code Playgroud)
MainController.class
public class MainController implements Initializable {
@FXML private MediaView mv;
private MediaPlayer mp;
private Media me;
@FXML Slider volumeSlider;
DoubleProperty width;
DoubleProperty height;
Stage stage;
@Override
public void initialize(URL location, ResourceBundle resources) {
// TODO Auto-generated …
Run Code Online (Sandbox Code Playgroud) 我试图确保 .ssh 目录的内容不会进入 Git 存储库:
执行S:~$ git diff --stat --cached origin/master
.gitignore | 7 ------
.ssh/.gitignore | 2 ++
.ssh/authorized_keys | 1 +
.ssh/id_rsa | 51 ++++++++++++++++++++++++++++++++++++++
.ssh/id_rsa.pub | 1 +
.ssh/known_hosts | 2 ++
.viminfo | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------
Run Code Online (Sandbox Code Playgroud)
然后我将它们取出如下:
executeS:~$ git rm --cached .ssh/authorized_keys
rm '.ssh/authorized_keys'
executeS:~$ git rm --cached .ssh/id_rsa
rm '.ssh/id_rsa'
executeS:~$ git rm --cached .ssh/id_rsa.pub
rm '.ssh/id_rsa.pub'
executeS:~$ git rm --cached .ssh/known_hosts
Run Code Online (Sandbox Code Playgroud)
我有以下 .gitignore 文件
executeS:~/.ssh$ pwd
/home/dockcclubdjango/.ssh
executeS:~/.ssh$ cat .gitignore
.*
!/.gitignore
Run Code Online (Sandbox Code Playgroud)
但如果我这样做,“git add . …
我正在SpringBoot中构建“ hello world”的基本程序
码
MyController.java
package controllers;
import org.springframework.stereotype.Controller;
@Controller
public class MyController {
public String hello() {
System.out.println("Hello World");
return "foo";
}
}
Run Code Online (Sandbox Code Playgroud)
DemoApplication.java
package di.prac;
import java.util.Arrays;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import controllers.MyController;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
ApplicationContext ctx=SpringApplication.run(DemoApplication.class, args);
MyController m = (MyController)ctx.getBean("myController");
m.hello();
System.out.println("*******"+Arrays.asList(ctx.getBeanDefinitionNames()));
}
}
Run Code Online (Sandbox Code Playgroud)
我正在使用eclipse,并从http://start.spring.io/创建了这个项目,没有任何依赖性。
我了解到Spring 使用名称myController创建了MyController类的bean ,但是Spring无法找到myController bean
错误
线程“主”中的异常org.springframework.beans.factory.NoSuchBeanDefinitionException:在org.springframework.beans的org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:686)上没有名为“ myController”的bean org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)的org.springframework.beans.factory.support.AbstractBeanFactory.getBean的.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1210) (AbstractBeanFactory.java:199),位于org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089),位于di.prac.DemoApplication.main(DemoApplication.java:16)
请在项目中找到并解释错误
在尝试设置环境变量以运行 Flutter 时遇到了一些重大挫折。在我的路径中,我尝试了很多建议来尝试设置我的路径路由,以便 Flutter 控制台(或 cmd)可以成功运行命令“flutter doctor”来下载所有包等。但问题是尽快当我运行这个命令时,它会立即关闭我的终端。什么都没发生,终端就关闭了。任何帮助将不胜感激,我附上了我的路径环境的屏幕截图,也许可以帮助更多。 环境
我使用某种电子货币,他们使用密码作为密码.基本上每个密码长度为12个英文单词.我如何计算这是多么安全?我对这些事情知之甚少,但是对于字典攻击来说,12个单词似乎相当可行(至少在我看来).
当然,我担心这是多么安全,而不仅仅是问它是不是,我想知道自己计算它的方法(当然,你可以破坏答案).
欢迎任何建议,链接,文献建议等!
PS:普通计算机需要多长时间才能获得一个有效的密码短语,并附上我上面提供的详细信息?我需要知道,如果真的不需要那么多努力,我是否必须定期开设新账户以转移资金.我也很感激有关如何计算的信息,但这不是主要问题.再次感谢!
在新的Angular 2中,我们引入了TypeScript,它主要提供可选的静态类型,类和接口。
用TypeScript编写后,我们需要将代码编译为JavaScript才能运行程序
问题是我应该将带有打字稿文件的已编译javascript推送到服务器,还是应该忽略javascript文件.gitignore
并直接npm start
在将要编译文件的服务器上运行?
我完成了一个项目,我得到了一个合并冲突,所以我愚蠢跑git reset HEAD^ --hard
,现在我的所有文件都消失了,除了我的节点模块文件夹(这是在的.gitignore)。反正我有可以恢复我的文件?
我使用VScode
git ×5
github ×2
java ×2
windows ×2
android ×1
angular ×1
apk ×1
batch-file ×1
flutter ×1
fullscreen ×1
git-push ×1
git-reset ×1
gitignore ×1
installation ×1
javafx ×1
math ×1
passwords ×1
spring ×1
spring-boot ×1
ssh ×1
typescript ×1