我想忽略分支中的某些文件,而不必依赖在.gitignore与其他分支合并期间将被覆盖的跟踪文件.
我一直密切关注Stack Overflow的回答以及链接的博客帖子,但我的回购似乎并没有认识到excludesfile我的指定.git/config.Git文档(git-config,gitignore)似乎没有显示如何指定和寻址特定分支的排除文件.
我.git/config看起来像这样:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
excludesfile = +/info/exclude
[branch "myspecialbranch"]
excludesfile = +/info/exclude_specialbranch
Run Code Online (Sandbox Code Playgroud)
我的.git/info/exclude文件看起来像这样(默认情况下,我没有触摸它):
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude …Run Code Online (Sandbox Code Playgroud) 背景
尝试在
运行 Apache 2.4.18、Php 7.0.14 和自制软件的 Mac OSX 本地服务器上的 Laravel 5.3 中使用PhpRedis
...无需额外(非官方)作曲家库
Redis是通过安装homebrew install redis和工作
测试的,redis-cli ping它给出PONG
PhpRedis通过它安装homebrew install php70-redis并
经过测试,php -r "if (new Redis() == true){ echo \"\r\n OK \r\n\"; }"它给出OK
设置
随着文档,这SO Laravel 4溶液我做到以下几点:
aliasapp/config/app.php 中的定义从更改(或评论和添加)'Redis' => 'Illuminate\Support\Facades\Redis''LRedis' => 'Illuminate\Support\Facades\Redis'redisconfig/database.php 中的数据库定义'client' => 'phpredis',composer dump-autoload …试图base href为angularjs html5网络应用程序设置正确的值在cordova中工作
最初$locationProvider.html5Mode(true)用于 <base href="/">:
在SO和ui-router 常见问题解答中尝试了一些替代方案:
<base href=".">使用html5模式根据这个答案:
Error: Failed to execute 'pushState' on 'History': A history state object with URL 'https://page/' cannot be created in a document with origin https://example.com<base href="./"> 使用html5模式:
Error: 10 $digest() iterations reached. Aborting!消息尝试使用这里提到的frankwallis解决方案,但没有帮助(相同的错误)没有base href用$locationProvider.html5Mode({enabled: true, requireBase: false});
我的app配置定义如下:
myApp.config(['$locationProvider', '$urlRouterProvider', '$stateProvider', …Run Code Online (Sandbox Code Playgroud) html5 angularjs cordova angular-ui-router angular-ui-router-extras
尝试使用得到应用的角度,谷歌,地图:与
通过多个标记- markers指令
通过一个单一的信息窗口- window指令
我已经通过API和git-hub网站上的多个已关闭的问题/问题,但是无法让它工作......: - /
为简单起见,我手动声明标记(并且它们正确显示):
$scope.markers = [
{
id: 0,
coords: {
latitude: 37.7749295,
longitude: -122.4194155
},
data: 'restaurant'
},
{
id: 1,
coords: {
latitude: 37.79,
longitude: -122.42
},
data: 'house'
},
{
id: 2,
coords: {
latitude: 37.77,
longitude: -122.41
},
data: 'hotel'
}
];
Run Code Online (Sandbox Code Playgroud)
html看起来像:
<body ng-app="app">
<div class="angular-google-map-container" ng-controller="MainCtrl">
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="map.options" events="map.events" control="googlemap">
<ui-gmap-window coords="markers.coords" show="windowOptions.show" closeClick="closeClick()">
<div>Hello</div>
</ui-gmap-window>
<ui-gmap-markers models="markers" idkey="markers.id" coords="'coords'" …Run Code Online (Sandbox Code Playgroud) 使用angular-google-maps将谷歌地图合并到一个应用程序中
我需要一个命令,它将在初始地图加载完成后运行一个函数ONCE
- 但仅限于初始加载,而不是在每个地图操作之后
我不能使用idle或tilesloaded因为这些都是在每次运动后被解雇的......
我想要运行的函数需要获取映射边界以在初始页面加载时从服务器中提取数据 - 我希望在初始加载时发生ONCE,然后是使用刷新的手动函数map-control
- 如果我使用idle或tilesloaded触发它将会每次用户移动地图时拉取服务器数据.
有没有人知道如何在初始地图加载后触发一次性命令来获取地图详细信息(边界等)?
我已经尝试过maps.getBounds()第二个承诺函数,但它不起作用.
请注意,我有一个小提琴在这里工作 - $scope.map在定义控件/选项等之后我无法链接任何更多的承诺,因为它们没有返回一个承诺:
在文档中的代码示例不显示如何串连承诺后的$scope.map定义.
HTML
<div class="angular-google-map-container" ng-controller="MainCtrl">
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="map.options" events="map.events" control="googlemap">
</ui-gmap-google-map>
</div>
Run Code Online (Sandbox Code Playgroud)
调节器
myApp.controller('MainCtrl', function($scope, uiGmapGoogleMapApi) {
uiGmapGoogleMapApi
.then(function(maps){
$scope.map = {
center: {
latitude: 37.7749295,
longitude: -122.4194155
},
zoom: 12
events: {
tilesloaded: function (maps, eventName, args) {
myServiceFuntion(maps) // …Run Code Online (Sandbox Code Playgroud) 我们已经编写了一个angularjs网站/应用程序 - 针对移动设备进行了优化,
并使用cordova制作基于html5的移动应用程序.
代码(html,css,js)对于web应用程序和cordova应用程序都是相同的,
但会有一些不同的文件.
我们如何设置我们的git repo以共享(仅)web-app repos和cordova-app repos之间的公共文件?
显然,任何.gitignore文件都被跟踪,并且对所有回购都是通用的.我们可以在cordova repo中添加我们不想要的所有文件,.gitignore但这会降低3个web应用程序回购对于一个cordova回购的可用性.
我们尝试过:
问题:
我有一个 Laravel 5.4 artisan 任务,我需要通过 cron 运行它 - 尽管命令和调度程序(显然)设置正确,但它并没有完成。
这是 Laravel、php、apache、linux 或 crontab 的问题吗?最好的诊断方法是什么?
背景
在默认(亚马逊 AMI)EC2 实例上,artisan 命令被正确定义,并/var/www/html/myproject/在通过以下方式调用时从项目目录(即)完美运行:
php artisan mycommand:option1
Run Code Online (Sandbox Code Playgroud)
我已将此添加到如下所示的时间表中app/Console/Kernel.php:
protected function schedule(Schedule $schedule)
{
Log::info('schedule:run');
$schedule ->command('mycommand:option1')
->dailyAt('07:00')
->emailOutputTo('email@email.com');
$schedule ->command('mycommand:option2')
->dailyAt('07:15')
->emailOutputTo('email@email.com');
}
Run Code Online (Sandbox Code Playgroud)
为apachevia添加了以下 cron 命令sudo crontab -u apache -e:
* * * * * php /var/www/html/myproject/artisan schedule:run >> /dev/null 2>&1
Run Code Online (Sandbox Code Playgroud)
为了确保这不是权限问题,我还为以下用户添加了相同的命令:
ec2-user 通过 crontab -eroot 通过 sudo crontab -e系统输出
来自sudo tail -f …
努力让promise在promjs服务提供商中正常工作我已经阅读了文档以及大量的例子(这里,这里和这里),我想我的语法很好(虽然显然有些不对劲)
app模块和控制器看起来像
var myApp = angular.module('myApp', []);
myApp.controller('Controller_1', ['$scope', 'Service_1', function($scope, Service_1) {
var myName = "Ben";
Service_1.slowService(myName)
.then(Service_1.fastService(name));
$scope.myName = myName;
}]);
Run Code Online (Sandbox Code Playgroud)
服务(具有慢速功能)看起来像这样:
myApp.service('Service_1', function($q) {
this.slowService = function (name) {
var deferred = $q.defer();
console.log('Start of slowService:', name, Date.now());
setTimeout(function() {
console.log('setTimeout name:', name, Date.now());
if(name){
name = 'Hello, ' + name + " is learning Angularjs";
alert(name);
console.log('name:', name);
deferred.resolve(name);
} else {
deferred.reject('No name supplied !'); …Run Code Online (Sandbox Code Playgroud) angularjs ×5
cordova ×2
git ×2
javascript ×2
laravel ×2
laravel-5 ×2
cron ×1
deferred ×1
git-config ×1
github ×1
gitignore ×1
google-maps ×1
html5 ×1
infowindow ×1
laravel-5.3 ×1
marker ×1
php ×1
phpredis ×1
promise ×1
redis ×1