问题列表 - 第43079页

指定Xaml中的开始和结束标记之间的属性

考虑以下Xaml

<Grid>
    <TextBox>Text</TextBox>
    <Button>Content</Button>
</Grid>
Run Code Online (Sandbox Code Playgroud)

它会设置

  • TextBox的文本属性(仅限WPF)
  • 按钮的内容属性
  • 网格的子属性

但这是如何规定的?如何指定Xaml中开始和结束标记之间的哪个属性?
这是由依赖属性中的某些元数据设置还是什么?

谢谢

c# silverlight wpf xaml windows-phone-7

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

复合数据类型和数据结构之间有什么区别?

我读到C中的字符数组是一个复合数据类型,因为它是一个字符序列,但是在Java中,String是一个类,而维基百科说一个类是数据结构,我很困惑.

arrays types data-structures

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

将16位PCM Wave数据转换为float的正确方法

我有一个16位PCM形式的波形文件.我有一个原始数据byte[]和一个提取样本的方法,我需要它们以浮点格式,即a float[]进行傅立叶变换.这是我的代码,这看起来不错吗?我正在使用Android等等javax.sound.sampled.

private static short getSample(byte[] buffer, int position) {
  return (short) (((buffer[position + 1] & 0xff) << 8) | (buffer[position] & 0xff));
}

...

float[] samples = new float[samplesLength];
  for (int i = 0;i<input.length/2;i+=2){
    samples[i/2] = (float)getSample(input,i) / (float)Short.MAX_VALUE;
  }
Run Code Online (Sandbox Code Playgroud)

java android pcm audio-processing

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

tkdiff如何忽略行尾

在unix平台上使用tkdiff,我尝试将首选项窗口中的空白选项修改为-w-b,这两个选项似乎都不会忽略回车符之间的差异(unix / pc)。

-w 从命令行使用diff。

任何想法将不胜感激。

tk-toolkit

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

如何根据用户角色更改default-target-url

我使用spring security进行用户身份验证.在security.xml中我有

<form-login login-page="/login" 
                default-target-url="/dashboard" 
                always-use-default-target="false"  
                authentication-failure-url="/login/error" 
                login-processing-url="/j_security_check"/>
Run Code Online (Sandbox Code Playgroud)

我希望能够为不同的用户角色配置不同的目标URL.我该怎么做呢?

谢谢!

spring-security

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

获取没有查询字符串的网址

我有这样的网址:

http://www.example.com/mypage.aspx?myvalue1=hello&myvalue2=goodbye

我想摆脱http://www.example.com/mypage.aspx它.

你能告诉我怎样才能得到它?

c# asp.net

182
推荐指数
9
解决办法
12万
查看次数

除了Delphi中的默认"Sender:TObject"之外,是否可以向OnClick事件添加其他参数?

我正在使用Delphi进行A2计算项目,并且在向事件过程添加其他参数时遇到了问题.

我正在创建一些标签(TLabel对象)并将它们存储在我的主窗体"form1"下的数组中.

这就是我目前所拥有的:

**传递标签数组的声明和相应的ClickEvent过程,并传递标准(Sender:TObject)参数.

 public
     InventoryLabel : array [0..23] of TLabel;
     procedure InventoryLabelClick(Sender: TObject);
Run Code Online (Sandbox Code Playgroud)

**这是与上面声明的ClickEvent匹配的过程.(程序的内容非常混乱,但与问题相关,是我目前使用的.)

Procedure TForm1.InventoryLabelClick(Sender: TObject);
begin
if sender = InventoryLabel[0] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[0]].cardpic);
if sender = InventoryLabel[1] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[1]].cardpic);
if sender = InventoryLabel[2] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[2]].cardpic);
if sender = InventoryLabel[3] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[3]].cardpic);
if sender = InventoryLabel[4] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[4]].cardpic);
if sender = InventoryLabel[5] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[5]].cardpic);
if sender = InventoryLabel[6] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[6]].cardpic);
if sender = InventoryLabel[7] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[7]].cardpic);
if sender = InventoryLabel[8] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[8]].cardpic);
if sender = InventoryLabel[9] then imgInvItem.Picture.LoadFromFile(redcarddeck[redcardpositionsofinventory[9]].cardpic);
if …
Run Code Online (Sandbox Code Playgroud)

delphi onclick parameter-passing

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

如何使用jQuery将CSS样式应用于Raphael.js对象?

有没有人对Raphael.js SVG库有任何经验?

我正在使用Raphael.js创建一个SVG地图(用于智能手机),但我无法打开Raphael通过jQuery创建外部交互和css样式的地图对象.

var R = Array();  
    R[1] = new Raphael("level1", 408, 286);  
    R[2] = new Raphael("level2", 408, 286);  
    R[3] = new Raphael("level3", 408, 286);  
    R[4] = new Raphael("level4", 408, 286);  
    R[5] = new Raphael("level5", 408, 286);  

var attr = {  
    fill: "#ccc",  
    stroke: "#000",  
    "stroke-width": 0.5,  
    "stroke-linecap": "square",  
    "stroke-linejoin": "miter"  
};  

// loop through a bunch of objects (not shown for brevity)
    // in the end, I end up with a couple hundred objects drawn by Raphael  

    var o …
Run Code Online (Sandbox Code Playgroud)

css jquery raphael

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

如何在C#中用单行编写布尔函数?

public bool IsNewUser(int id)
{
  var data= DataContext.Employee.Where(e=>e.id==id).FirstorDefault();
  if(data==null)
     return true;
  return false;
}
Run Code Online (Sandbox Code Playgroud)

如何使用??C#中的单行或其他内容编写上述函数逻辑 ?我相信一定是可能的,现在就想不起来......谢谢

c#

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

在git中最后一次提交后重置所有更改

如何撤消上次提交后对目录所做的每次更改,包括删除添加的文件,重置已修改的文件以及添加已删除的文件?

git git-revert git-reset git-commit

305
推荐指数
2
解决办法
14万
查看次数