草庐IT

displays-affect-your-workflow

全部标签

Your branch is ahead of ‘origin/master‘ by 2 commits. (use “git push“ to publish your local commit

遇到问题:Yourbranchisaheadof'origin/master'by2commits. (use"gitpush"topublishyourlocalcommits)首先一定要自己手动备份一份代码防止意外这个消息表示你的本地分支比远程仓库的master分支超前了2个提交。这通常发生在你在本地进行了一些提交,但还没有将这些提交推送到远程仓库。我选择撤回之前的两次提交(具体次数根据实际情况)首先在gitbash中使用gitlog命令查看最近的提交情况 我想要恢复到5-7这个版本所以我使用gitreset--hardHEAD~2回溯到两次提交之前  此时如图再次查看log,发现已经恢复

android - "Your content must have a ListView whose id attribute is ' android.R.id.list '"当从ListActivity变为 View 时

我想编写一个应用程序:a:用sdcard中的图片文件填充ListView,b:从列表中选择一个选项时显示图像。但是,它挂起并出现上述异常。我不明白为什么...?请帮忙!主要Activity:publicclassProjektJimmuActivityextendsListActivity{@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);navigateTo("/sdcard/");}publicvoidnavigateTo(Stringdir){setLi

安卓 fragment : Lifecycle method *always* called when fragment is displayed?

每当向用户显示fragment时,我都需要执行一些代码。通过API查看我能看到的最接近的钩子(Hook)方法是onResume。但是,从我的代码调试来看,当用户选择后退按钮返回到先前显示的fragment时,似乎不会调用onResume。只是为了澄清我所看到的行为:我有一个“父”Activity,它在ActionBar中配置选项卡...和​​2个fragmentF1和F2。用户选择一个选项卡,F1被加载到Activity中。按下按钮后,用户可以导航至F2。这不是一个单独的选项卡...F2已交换到布局中。添加日志语句,我可以看到当用户选择F2上的后退按钮时,会发生以下情况......1)

android - 错误 : IllegalArgumentException: The style on this component requires your app theme to be Theme. Material 组件

下面是我的依赖implementation'com.google.android.material:material:1.0.0'implementation'androidx.appcompat:appcompat:1.0.2'implementation'androidx.constraintlayout:constraintlayout:1.1.3'我的layout.xml上面的代码对我来说工作正常但是当我更新materialdesign的dependenciesimplementation'com.google.android.material:material:1.1.0-a

配置局域网IP之No alive nodes found in your cluster

问题描述自己在本地搭建了Windows版本的elasticsearch-5.5.2和kibana-5.5.2。未曾修改config/elasticsearch.yml配置文件,启动elasticsearch和kibana之后,一切正常。也就是说,http://127.0.0.1:9200/和http://127.0.0.1:5601/都能正常访问。创建索引、文档也没问题。但是,在PHP开发的项目中使用“elasticsearch/elasticsearch”:“6.7.2”包操作本地的elasticsearch时,报以下错误:NoNodesAvailableExceptioninStaticN

安卓 : Display images in Webview

处理文件后,我得到一个HTML字符串,其中图像设置为不应修改图像的路径,因为我必须从列表中选择文件项。图像与文件位于同一目录中。我使用loadData/loadDataWithBaseURL加载HTML字符串,但未显示图像。我只看到它的框架。我该如何解决这个问题?如果我有许多索引为.001.jpg、.002.png等的图像(都在一个目录中),我可以应用该解决方案吗?更新:谢谢,无论我如何命名图像,它都适用于loadUrl()语句。事实上,我必须在将内容加载到WebView之前阅读和处理内容。这就是我使用loadDataWithBaseUrl()语句并遇到上述问题的原因。这是我在测试项目

父容器display:flex后,子元素的内部元素height:100%无效的解决方法

    父容器display:flex后,子元素的内部元素height:100%无效解决方法做项目时遇到这个问题,浅浅的记录一下趴~在网上看了很多种方法,感觉这个是最有效的解救办法:父类容器设置position:relative;子元素:position:absolute;height:100%; 效果图:代码: 

git pull Your configuration specifies to merge with the ref ‘refs/heads/xxxx‘ from the remote, but n

$gitpullYourconfigurationspecifiestomergewiththeref'refs/heads/xxxx'fromtheremote,butnosuchrefwasfetched.1.问题原因分析2.问题解决Yourconfigurationspecifiestomergewiththeref‘refs/heads/xxxx’fromtheremote,butnosuchrefwasfetched.)1.问题原因分析1.主要是因为网页上仓库fork别人的,更新了就没了分支,但是本地还有2.需要切换到丢失的分支下,需要先解锁:gitbranch--unset-ups

android - Cordova 平台添加 android 给出错误 : Your android platform does not have Api. js

我已经在windows8.1中将cordova更新到7.0.1当我使用此命令添加平台时创建项目后cordovaplatformaddandroid它给了我以下错误UsingthisversionofCordovawitholderversionofcordova-androidisdeprecated.Upgradetocordova-android@5.0.0ornewer.Error:YourandroidplatformdoesnothaveApi.js我试图在论坛上搜索它,但没有得到解决。 最佳答案 我认为您的cordova

android - 无法启动快捷方式 : Application is not installed on your phone

我正在尝试为我的AndroidActivity之一创建桌面快捷方式。我使用的代码适用于我读过的每个tuto示例:finalIntentshortcutIntent=newIntent(Intent.ACTION_MAIN);ComponentNamename=newComponentName(getPackageName(),".MyActivity");shortcutIntent.setComponent(name);shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);shortcutIntent.addFlags(Inte