程序设计

专业和发烧友程序员的问答

15
git pull error:error:远程引用在但预期
完整讯息: error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec From github.com:{github project url} ! a21359c..6273ffc user -> origin/user (unable to update local ref)
227 git  pull  git-pull 


2
从Gulp任务中排除文件/目录
我有一个gulp rjs任务,它将我的所有自定义.JS文件(所有非供应商库)串联并丑化。 我想做的是从此任务中排除一些文件/目录(控制器和指令)。 这是我的树: - application - resources - js main.js - vendor - jquery - modernzr - angular - controllers - controller1 - controller2 - controller3 - directives - directives1 - directives2 - directives3 - widgets - widget1 - widget2 - widget3 - widget4 - modules - modules1 - …

11
可访问性不一致:参数类型比方法更难访问
我正在尝试在两种形式之间传递一个对象(基本上是对当前登录用户的引用)。目前,我在登录表单中有以下几行内容: private ACTInterface oActInterface; public void button1_Click(object sender, EventArgs e) { oActInterface = new ACTInterface(@"\\actserver\Database\Premier.pad",this.textUser.Text,this.textPass.Text); if (oActInterface.checkLoggedIn()) { //user has authed against ACT, so we can carry on clients oClientForm = new clients(oActInterface); this.Hide(); oClientForm.Show(); } else... 在下一张表格(客户)上,我有: public partial class clients : Form { private ACTInterface oActInt {get; set;} …
227 c#  object 

2
关于使用doctrine2删除级联
我试图做一个简单的例子,以学习如何从父表中删除一行并使用Doctrine2自动删除子表中的匹配行。 这是我正在使用的两个实体: Child.php: <?php namespace Acme\CascadeBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="child") */ class Child { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\ManyToOne(targetEntity="Father", cascade={"remove"}) * * @ORM\JoinColumns({ * @ORM\JoinColumn(name="father_id", referencedColumnName="id") * }) * * @var father */ private $father; } 父亲.php …


7
如何在Django ModelForm中过滤ForeignKey选择?
说我的内容如下models.py: class Company(models.Model): name = ... class Rate(models.Model): company = models.ForeignKey(Company) name = ... class Client(models.Model): name = ... company = models.ForeignKey(Company) base_rate = models.ForeignKey(Rate) 即有多个Companies,每个都有一个Rates和的范围Clients。每个数据库Client都应有一个Rate从其父数据库中选择的碱基,而Company's Rates不是另一个Company's Rates。 创建用于添加的表单时Client,我想删除Company选择(因为已经通过Company页面上的“添加客户端”按钮Rate选择了该选项),并且也将选择限制在此范围内Company。 我该如何在Django 1.0中做到这一点? 目前,我当前的forms.py文件只是样板: from models import * from django.forms import ModelForm class ClientForm(ModelForm): class Meta: model = Client 而且views.py也是基本的: from django.shortcuts …

8
为什么无法在Java中扩展注释?
我不明白为什么Java注释就像Java类一样没有继承。我认为这将非常有用。 例如:我想知道给定的注释是否为验证者。通过继承,我可以自反地浏览超类,以了解此注释是否扩展了ValidatorAnnotation。否则,我该如何实现? 那么,谁能给我这个设计决定的理由?



10
Angular将回调函数作为@Input传递给子组件,类似于AngularJS的方式
AngularJS具有&参数,您可以在其中将回调传递给指令(例如AngularJS的回调方式。是否可以将回调作为@InputAngular Component的传递(如下所示)? AngularJS呢? @Component({ selector: 'suggestion-menu', providers: [SuggestService], template: ` <div (mousedown)="suggestionWasClicked(suggestion)"> </div>`, changeDetection: ChangeDetectionStrategy.Default }) export class SuggestionMenuComponent { @Input() callback: Function; suggestionWasClicked(clickedEntry: SomeModel): void { this.callback(clickedEntry, this.query); } } <suggestion-menu callback="insertSuggestion"> </suggestion-menu>


13
无法通过终端访问OS X中的adb,“找不到命令”
我已经在Mac系统上安装了Android SDK和Eclipse。我能够使用Eclipse进行编程,并且创建了一些示例应用程序。但是我仍然无法adb通过终端窗口访问。我在终端中尝试了以下命令: $ pwd /Users/espireinfolabs/Desktop/soft/android-sdk-mac_x86/platform-tools $ ls NOTICE.txt dexdump llvm-rs-cc-2 aapt dx llvm-rs-cc.txt adb lib source.properties aidl llvm-rs-cc $ adb --help -bash: adb: command not found 我还添加了ls输出,以便您知道我在哪个窗口中。
227 android  macos  adb 

8
上游从上游读取响应头时发送了太大的头
我收到这些错误: 2014/05/24 11:49:06 [错误] 8376#0:* 54031上游发送太大的标头,同时从上游读取响应标头,客户端:107.21.193.210,服务器:aamjanata.com,请求:“ GET / the- gujarat-government /赞助的洗脑历程/%20https:/aamjanata.com/the-brainwash-chronicles-gujarat-government/赞助护脑,%20https:/aamjanata.com/the-brainwash-chronicles-由Gujarat-government赞助,%20https://aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government/,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by- gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government/ ,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/ aamjanata。com / the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the- gujarat-government /赞助的洗脑历程/%20https:/aamjanata.com/the-brainwash-chronicles-gujarat-government/赞助护脑,%20https:/aamjanata.com/the-brainwash-chronicles-由Gujarat-government赞助,%20https://aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government/,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by- gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government/,%20https://aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored by-gujarat-government /,%20https:/ aamjanata。com / the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the-brainwash-chronicles-sponsored-by-gujarat-government /,%20https:/aamjanata.com/the- gujarat-government /赞助的洗脑纪事/%20https://aamjanata.com/the-brainwash-chronicles-gujarat-government/赞助的百灵鸟https:/aamjanata.com/the-brainwash-chronicles-由古吉拉特邦政府赞助,%20ht 总是一样。网址重复并以逗号分隔。无法弄清楚是什么原因造成的。有人有主意吗? 更新:另一个错误: http request count is zero while sending response to client 这是配置。还有其他不相关的内容,但是此部分已添加/编辑 fastcgi_cache_path /var/nginx-cache …
227 nginx  php 


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.