是否可以使用uploadify允许任何用户从文件对话框中选择文件并将其插入到表单的文件输入元素中?我只需要使用uploadify作为将"上传按钮"设置为图像的方式.
我还可以使用/做什么来将文件输入元素作为图像?
我希望我的文件输入按钮在所有浏览器中看起来都一致.
我花了整整一夜来解决这个问题,但我还是很生气
这里有关于我的代码的图片:http: //i284.photobucket.com/albums/ll15/hisinhvien/Screenshot2011-03-03at112716PM.png (抱歉b/s新用户无法发布图片)
首先,我覆盖了我的"@interface组件:UIView"的"drawRect"然后我把一些代码放入其中来测试推送和弹出图形上下文但它没有按照图片工作:第一次我选择了绿色然后我推动了上下文并选择了蓝色然后绘制了一个矩形,然后我将上下文弹出,但最后一个矩形仍然是蓝色......?
这是我的源代码:http://www.mediafire.com/ ?aakgqw92flc808o这很简单但出错... @@
对于我正在制作的应用,我需要将我的列类型从日期更改为日期时间.我不关心数据,因为它仍在开发中.
我怎样才能做到这一点?
我为我的网站设置了_setCustomVar,如下所示:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX']);
_gaq.push(['_setDomainName', '.blog4ever.com']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setCustomVar', 1, 'B4E_Type_Pub', 'Silver_ou_Gold', 3]);
_gaq.push(['_setCustomVar', 2, 'B4E_Etat_Blog', 'normal', 3]);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Run Code Online (Sandbox Code Playgroud)
在我的仪表板中,当我进入时:访客 - >自定义变量,我看到我的2个变量,但数字真的很奇怪(如40页视图,尽管我有数千页的视图).
我已经安装了2天了.
有人面临同样的问题吗?
有人可以向我解释为什么下面显示的代码在C#中有效并执行调用Console.WriteLine?
using (null)
{
Console.WriteLine ("something is here")
}
Run Code Online (Sandbox Code Playgroud)
它编译成(最后显示块).如您所见,编译器决定不执行该Dispose()方法并跳转到该endfinally指令.
IL_0013: ldnull
IL_0014: ceq
IL_0016: stloc.1
IL_0017: ldloc.1
IL_0018: brtrue.s IL_0021 // branches here and decide not to execute Dispose()
IL_001a: ldnull
IL_001b: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0020: nop
IL_0021: endfinally
Run Code Online (Sandbox Code Playgroud)
但是,如果我运行以下代码,它将失败a NullReferenceException(预期):
((IDisposable)null).Dispose();
IL_0023: ldnull
IL_0024: callvirt instance void [mscorlib]System.IDisposable::Dispose()
Run Code Online (Sandbox Code Playgroud)
为什么第一个版本编译?为什么编译器决定不执行Dispose()?是否有任何其他情况下,当编译器可以决定不叫Dispose()的using块?
我有一个具有不同rownames的大型数据框(名为test).
> rownames(test)
[1] "U2OS.EV.2.7.9" "U2OS.PIM.2.7.9" "U2OS.WDR.2.7.9" "U2OS.MYC.2.7.9"
[5] "U2OS.OBX.2.7.9" "U2OS.EV.18.6.9" "U2O2.PIM.18.6.9" "U2OS.WDR.18.6.9"
[9] "U2OS.MYC.18.6.9" "U2OS.OBX.18.6.9" "X1.U2OS...OBX" "X2.U2OS...MYC"
[13] "X3.U2OS...WDR82" "X4.U2OS...PIM" "X5.U2OS...EV" "exp1.U2OS.EV"
[17] "exp1.U2OS.MYC" "EXP1.U20S..PIM1" "EXP1.U2OS.WDR82" "EXP1.U20S.OBX"
[21] "EXP2.U2OS.EV" "EXP2.U2OS.MYC" "EXP2.U2OS.PIM1" "EXP2.U2OS.WDR82"
[25] "EXP2.U2OS.OBX"
Run Code Online (Sandbox Code Playgroud)
如您所见,部分行名称具有相同的部分名称.例如,每个具有部分名称的行MYC我想将整个rowname更改为"MYC".总的来说,行名称包含5个因素:MYC,EV,PIM,WDR和OBX.
目前,我将makefile设置为编译并制作一个相当大的项目.我编写了第二个带有main函数的cpp文件来运行测试.我希望这些单独运行,但是一起构建并且它们使用相同的文件.这是如何完成的?
编辑:作为参考,这是我当前的makefile.我不确定如何调整它.
CC=g++
CFLAGS=-c -Wall -DDEBUG -g
LDFLAGS=
SOURCES=main.cpp Foo.cpp Bar.cpp Test.cpp A.cpp B.cpp C.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=myprogram
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
Run Code Online (Sandbox Code Playgroud) 我发送文件作为附件:
// Create the file attachment for this e-mail message.
Attachment data = new Attachment(filePath, MediaTypeNames.Application.Octet);
// Add time stamp information for the file.
ContentDisposition disposition = data.ContentDisposition;
disposition.CreationDate = System.IO.File.GetCreationTime(filePath);
disposition.ModificationDate = System.IO.File.GetLastWriteTime(filePath);
disposition.ReadDate = System.IO.File.GetLastAccessTime(filePath);
// Add the file attachment to this e-mail message.
message.Attachments.Add(data);
Run Code Online (Sandbox Code Playgroud)
然后我想将文件移动到另一个文件夹,但是当我尝试这样做时
try
{
//File.Open(oldFullPath, FileMode.Open, FileAccess.ReadWrite,FileShare.ReadWrite);
File.Move(oldFullPath, newFullPath);
}
catch (Exception ex)
{
}
Run Code Online (Sandbox Code Playgroud)
它抛出了一个异常,即该文件已在另一个进程中使用.如何解锁此文件以便将其移动到此位置?
我必须在图像视图上放置一个双击事件.每当我双击图像时,它应该是Zoom.But我发现在Image Veiw中没有像双击那样的事件.谁能告诉我怎么做?提前致谢..
我有一个Windows服务,并希望更改它的名称(因为它显示在服务应用程序中).但我不确定这样做的正确方法.它似乎是ServiceName属性,并通过我的解决方案搜索我发现:
namespace SI.AService.AService
{
partial class AService
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents …Run Code Online (Sandbox Code Playgroud)