小编Aba*_*aco的帖子

成为一名专业的PHP程序员.怎么样?

我正在做我的第一个专业项目.事实是我不知道哪些是最好的工具来产生严肃的东西(我说的是通过PHP进行web开发):

  • 像Smarty这样的模板引擎是否必须?哪一个是"最好的"(最常用的,完整的,记录的)
  • 目前我正在开发Notepad ++(主要是因为我发现它有用且完整)是否有更好的开发工具?或者仅仅是个人品味的问题?
  • 目前我正在研究JQuery并加深我对CSS的了解,你可以建议我使用其他"强制性"主题吗?

这是我现在能想到的,你还有其他建议吗?谢谢.

编辑:有人让我注意到这个问题有点含糊不清.我知道基础知识(HTTP协议,Java脚本,CSS,HTML,OOP理论和实践等......).我在大学学习计算机科学(我所说的项目是我的论文).我需要建议"现实世界"如何运作(在我的地下室之外).

php

12
推荐指数
4
解决办法
9734
查看次数

$ digest渲染ng-repeat作为评论

我正在为一个指令编写测试,在执行测试时,模板(正确加载)的渲染就像 <!-- ng-repeat="foo in bar" -->

对于初学者来说,代码的相关部分:

测试

...

beforeEach(inject(function ($compile, $rootScope, $templateCache) {

    var scope = $rootScope;
    scope.prop = [ 'element0', 'element1', 'element2' ];

    // Template loading, in the real code this is done with html2js, in this example
    // I'm gonna load just a string (already checked the problem persists)
    var template = '<strong ng-repeat="foo in bar"> <p> {{ foo }} </p> </strong>';
    $templateCache.put('/path/to/template', [200, template, {}]);

    el = angular.element('<directive-name bar="prop"> </directive-name>');
    $compile(el)(scope);
    scope.$digest(); // <--- here is …
Run Code Online (Sandbox Code Playgroud)

javascript unit-testing angularjs angularjs-directive

6
推荐指数
1
解决办法
760
查看次数

动态显示数百个图像

我必须创建一个能够显示影院大厅(不知道确切的单词)架构的表单.基本上我必须显示大量(由另一个来源给出)独立的椅子状图像,这些图像可以在点击时改变颜色(状态).

我在网上搜索解决方案,但我真的不知道如何管理这个.有人能帮我吗?

c# gdi+ image winforms

2
推荐指数
1
解决办法
612
查看次数

索引搜索功能

我想为正在开发的软件添加研究功能。这个想法是添加某种“索引”研究,因此,当用户在另一个文本框中键入内容时,gui组件将显示过滤后的结果。例如:

User types: a
aaa
aba
aab

user types: aa
aa
aab
Run Code Online (Sandbox Code Playgroud)

等等。当然,这个东西有一个名字(因为它几乎在任何地方都被使用),但是我不知道,所以直到现在,我在网络上找不到任何有用的东西。我不需要确切的代码,只需链接到一些资源(教程等)。泰

编辑:我不是在寻找自动完成功能:如果我在文本框中键入,我想在文本框附近的(例如)列表框中看到所有过滤的结果。

.net c# search-engine

1
推荐指数
1
解决办法
994
查看次数

查询嵌套列表

我有两节课:

public GeneralClassName 
{
    public GeneralClassName ()
    {
        SpecificList = new List<OtherClass>();
    }
    public string StringValue;
    public string OtherStringValue;
    public List<OtherClass> SpecificList;
}
Run Code Online (Sandbox Code Playgroud)

public OtherClass
{
    public string Name;
    public string Number;
}
Run Code Online (Sandbox Code Playgroud)

一个反序列化JSON我得到一个不错后List<GeneralClassName>,结果我要的是Dictionary<string, int>它的值是variabiles的总和"数"内List<OtherClass>List<GeneralClassName>,而关键是variabile的名称.

换句话说,我想按名称对数字分组进行总结.

现在,我唯一想到的就是嵌套的foreach,类似的东西:

Dictionary<string, int> resultDictionary = new Dictionary<string, int>();
foreach(List<OtherClass> listOtherClass in bigListGeneralClass.Select(x => x.SpecificList))
{
    foreach(OtherClass otherClass in listOtherClass)
    {
        int value = 0;
        if(resultDictionary.ContainsKey(otherClass.Name))
        {
            resultDictionary[otherClass.Name] += otherClass.Number;
        }
        else
        {
            resultDictionary.Add(otherClass.Name, otherClass.Number);
        } …
Run Code Online (Sandbox Code Playgroud)

c# linq

1
推荐指数
1
解决办法
132
查看次数