小编Run*_*ion的帖子

剃须刀计数项目

我该如何在剃刀中做到这一点:

  • 当只有一项时,我只希望显示该项目。(fotoGallerij中的项目)
  • 当有更多项目时,我想要所有这些项目(例如下面的代码,可以工作)

如果(我认为)剃刀(C#/ umbraco)中的结构,我该怎么做?

@inherits umbraco.MacroEngines.DynamicNodeContext

<ul class="image-gallery">
@foreach (var item in @Model.fotoGallerij)
{
<li>
<a class="gallery grouped" href="/ImageGen.ashx?height=500&amp;constrain=true&amp;crop=resize&amp;image=@item.Image.umbracoFile" title="">

<img src="/ImageGen.ashx?width=71&amp;height=73&amp;crop=resize&amp;image=@item.Image.umbracoFile" alt=""/></a>
 </li>
 }
</ul>
 <script>
    $("a.gallery").colorbox({rel:'grouped'});
</script>
Run Code Online (Sandbox Code Playgroud)

感谢您的帮助!

if-statement umbraco count razor

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

在win32学校应用程序上构建c ++错误

我没有用c ++编程很长时间,但需要为我的学校制作一个Win32应用程序.老师帮助了我很多信息,但经过几天的尝试,我仍然被卡住了.

错误:

error C2440: '=' : cannot convert from 'const char [11]' to 'LPCWSTR'
error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [11]' to 'LPCWSTR'
error C2664: 'TextOutW' : cannot convert parameter 4 from 'char *' to 'LPCWSTR'
IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR"
Run Code Online (Sandbox Code Playgroud)

不知道所有其他的后缀是否正确,但我现在只得到那4个错误

cpp文件:

    /* Hoofdstuk 10, User Interface */
#include "Callback_NYCM.h"

// UI
int WINAPI WinMain(HINSTANCE thisInstance,HINSTANCE prevInstance,LPSTR lpCmdLine,int nShowCmd) 
{ 
    PAINTSTRUCT ps;
    HDC hdc;
    MSG …
Run Code Online (Sandbox Code Playgroud)

c++ winapi char

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

标签 统计

c++ ×1

char ×1

count ×1

if-statement ×1

razor ×1

umbraco ×1

winapi ×1