很多人真的对dll发送给他们感兴趣,并且它们不是那种应该免费赠送的类型......
我只是想知道,如果我要出售我的组件,用户控件等,我将如何保护它们,在所有权/加密代码(如果可能)等方面.你采取了哪些措施来帮助阻止人们使用你的没有付钱给他们?
我需要与 RS232 设备通信,我没有可用的规格或信息。
我发送一个 16 字节的命令并返回一个 16 字节的结果。最后一个字节看起来像某种 crc 或校验和,我试过使用这个http://miscel.dk/MiscEl/miscelCRCandChecksum.html没有运气。
任何人都可以对 crc/校验和算法进行逆向工程?以下是使用 RS-232 监控程序捕获的一些数据:
01 80 42 00 00 00 00 00 00 00 00 00 00 00 01 B3
01 80 42 00 00 00 00 00 00 00 00 00 00 00 02 51
01 80 42 00 00 00 00 00 00 00 00 00 00 00 03 0F
01 80 42 00 00 00 00 00 00 00 00 00 00 00 04 8C …Run Code Online (Sandbox Code Playgroud) 我正在努力处理两种不同WebException的问题.
基本上他们在打电话后处理 WebClient.DownloadFile(string address, string fileName)
AFAIK,到目前为止我必须处理两个,两个WebException:
可能会有更多,但这是我迄今为止发现最重要的内容.
那么我应该如何处理这个问题,因为它们都是,WebException但我想以不同的方式处理每个案例.
这是我到目前为止:
try
{
using (var client = new WebClient())
{
client.DownloadFile("...");
}
}
catch(InvalidOperationException ioEx)
{
if (ioEx is WebException)
{
if (ioEx.Message.Contains("404")
{
//handle 404
}
if (ioEx.Message.Contains("remote name could not")
{
//handle file doesn't exist
}
}
}
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,我正在检查消息以查看它是什么类型的WebException.我会假设有更好或更精确的方法来做到这一点?
谢谢
我在Ryan Bates的railscast网站上找到了这个,但不知道它是如何工作的.
#models/comment.rb
def req=(request)
self.user_ip = request.remote_ip
self.user_agent = request.env['HTTP_USER_AGENT']
self.referrer = request.env['HTTP_REFERER']
end
#blogs_controller.rb
def create
@blog = Blog.new(params[:blog])
@blog.req = request
if @blog.save
...
Run Code Online (Sandbox Code Playgroud)
我看到他正在保存用户ip,用户代理和推荐人,但我对该req=(request)行感到困惑.
在WCF中,有几种不同类型的基于HTTP的绑定:
这3个有什么不同?
特别是在功能/性能和兼容性方面有何不同?
我正在为一个类编写C代码.这个类要求我们的代码在学校服务器上编译和运行,这是一个sparc solaris机器.我正在运行Linux x64.
我有这条线要解析(这不是实际的代码,但输入我的程序):
while ( cond1 ){
Run Code Online (Sandbox Code Playgroud)
我需要将"while"和"cond1"捕获到单独的字符串中.我一直在用strtok()这个.在Linux中,以下行:
char *cond = NULL;
cond = (char *)malloc(sizeof(char));
memset(cond, 0, sizeof(char));
strcpy(cond, strtok(NULL, ": \t\(){")); //already got the "while" out of the line
Run Code Online (Sandbox Code Playgroud)
将正确捕获字符串"cond1".然而,在solaris机器上运行它,给我字符串"cone1".
请注意,在我的程序中的许多其他情况下,字符串正在被正确复制.(例如,"while")被正确捕获.
有谁知道这里发生了什么?
我有2个锚标签
<li><a id="tab1" href="#tabs-1">Issue</a></li>
<li><a id="tab2" href="#tabs-2">Change Request</a></li>
Run Code Online (Sandbox Code Playgroud)
我有以下jquery:
$('a').click(function(event) {
alert($('a').attr("id"));
});
Run Code Online (Sandbox Code Playgroud)
会发生什么:我总是在弹出窗口中显示"tab1"
我需要的是:当用户点击锚标签时,需要在弹出窗口中显示其ID
我对C和C++中程序员编码方式的基本方式有点模糊.特别一件事是在C++中使用字符串而不是字符数组,反之亦然.那么,我应该使用字符串或字符数组,一般来说,为什么?
我需要显示我从解析器中获取的名称列表.我正在获取列表的NSMutable列表,然后我需要按字母顺序显示它们.
我尝试做的是:
NSArray *myArtistArray=[[NSArray alloc]init];
myArtistArray=[artistsList sortUsingSelector:@selector(compare:) ];
// error void value not ignored as it outght to be
[myArtistArray sortedArrayUsingSelector:@selector(compare:)];
Run Code Online (Sandbox Code Playgroud) 我收到链接时间错误:
WARNING: /home/gulevich/development/camac-fedorov/camac/linux/k0607-lsi6/camac-k0607-lsi6.o (.ctors): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
Run Code Online (Sandbox Code Playgroud)
导致错误的代码(在C源代码中汇编):
# if defined(__ELF__)
# define __SECTION_FLAGS ", \"aw\" , @progbits"
/* writable flag needed for ld ".[cd]tors" sections bug workaround) */
# elif defined(__COFF__)
# define __SECTION_FLAGS ", \"dr\""
/* untested, may be writable flag needed */
# endif
asm
(
".section .ctors" __SECTION_FLAGS "\n"
".globl __ctors_begin__\n"
"__ctors_begin__:\n"
".previous\n" …Run Code Online (Sandbox Code Playgroud) c ×2
c# ×2
c++ ×2
.net ×1
assembly ×1
char ×1
checksum ×1
crc ×1
dll ×1
downloadfile ×1
gnu ×1
jquery ×1
linker ×1
objective-c ×1
protection ×1
railscasts ×1
serial-port ×1
solaris ×1
sorting ×1
sparc ×1
strcpy ×1
string ×1
wcf-binding ×1
webclient ×1
webexception ×1