topics

全部话题 - 话题: 0x00
1 (共1页)
c******o
发帖数: 26
1
i have a web service returning a big xml, it works fine with the default test
page on .asmx page. but when i built a client using the proxy class,and used
it to retrieve the XML and tried to print it out in a text box, got error:
hexadecimal value 0x00, is an invalid character. Line 1, position 12345.
any idea what is wrong? i googled and didn't find much helpful information
including the one below
http://www.dotnet247.com/247reference/msgs/43/217663.aspx
thanks a bunch
c******o
发帖数: 26
2
it seems that the xml string have a 0x00 character at the end which needs to
be got rid of ....
like this:
thisString.Trim(Convert.ToChar(0));

test
m*d
发帖数: 7658
3
先安装archlinux
instruction在这里
http://archlinuxarm.org/platforms/armv6/pogoplug-provideov3
如果不想写用arch的uImage覆盖nand
可以这样
Following steps 7 and 8 above, partition and format the drive (using the
correct /dev device, highly likely NOT sda). Download and extract the root
filesystem tarball onto the new ext3 partition as the root user, not just
sudo. Create a file at /usr/local/mac_addr and place in it your Pro's MAC
address (its on the bottom of the unit) in the format XX:XX:XX:XX:XX:XX.
Safely umount ... 阅读全帖
m*d
发帖数: 7658
4
先安装archlinux
instruction在这里
http://archlinuxarm.org/platforms/armv6/pogoplug-provideov3
如果不想写用arch的uImage覆盖nand
可以这样
Following steps 7 and 8 above, partition and format the drive (using the
correct /dev device, highly likely NOT sda). Download and extract the root
filesystem tarball onto the new ext3 partition as the root user, not just
sudo. Create a file at /usr/local/mac_addr and place in it your Pro's MAC
address (its on the bottom of the unit) in the format XX:XX:XX:XX:XX:XX.
Safely umount ... 阅读全帖
k***e
发帖数: 7933
5
来自主题: Hardware版 - 路由器的日志怎么解读?
比如如下的日志什么意思? 哪里可以找到日志格式的解释?
<12>Oct 25 21:47:08 kernel: ACCEPT IN=br0 OUT=vlan2 SRC=192.168.2.xxx DST=xx
x.xxx.xxx.xxx LEN=52 TOS=0x00 PREC=0x00 TTL=127 ID=24652 DF PROTO=TCP SPT=60
695 DPT=443 SEQ=1382658461 ACK=0 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (020405
B40103030801010402)
<12>Oct 26 15:17:37 kernel: ACCEPT IN=vlan2 OUT= MACSRC=00:01:5c:6f:50:46 MA
CDST=ff:ff:ff:ff:ff:ff MACPROTO=0800 SRC=96.120.25.253 DST=255.255.255.255 L
EN=328 TOS=0x00 PREC=0x00 TTL=64 ID=20557 PROTO=UDP SPT=67 DPT=68 L... 阅读全帖
l*****8
发帖数: 16949
6
下面这个hello world的20天能学会吗?
[
uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
]
library LHello
{
// bring in the master library
importlib("actimp.tlb");
importlib("actexp.tlb");
// bring in my interfaces
#include "pshlo.idl"
[
uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
]
cotype THello
{
interface IHello;
interface IPersistFile;
};
};
[
exe,
uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
]
module CHelloLib
{
// some code related header files
importheader();
importheader();
importheader(阅读全帖
D*****r
发帖数: 6791
7
来自主题: Joke版 - Evolution of a programmer
http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html
High School/Jr.High
10 PRINT "HELLO WORLD"
20 END
First year in College
program Hello(input, output)
begin
writeln('Hello World')
end.
Senior year in College
(defun hello
(print
(cons 'Hello (list 'World))))
New professional
#include
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}
... 阅读全帖
n****5
发帖数: 81
8
%s 是当作字符串打印。应该输出a,因为在memory中的pattern是0x61 0x00 0x00 0x00
… = 'a
n****5
发帖数: 81
9
%s 是当作字符串打印。应该输出a,因为在memory中的pattern是0x61 0x00 0x00 0x00
… = 'a
a9
发帖数: 21638
10
比如你的node拿到数据是 ccccc 你可以发0x00 0x00 0x00 0x05 0x63 0x63 0x63 0x63
0x63
服务器端先读4个字节,读到是5,然后再读5个字节,就是ccccc

痛的
server
m*d
发帖数: 7658
11
这是看来的
The simplest method (that works at this time) is to use the NAND environment
s' /usr/local/cloudengines/bin/blparam to setup to boot from tftp, and point
it as the sata, or usb (it generally starts enumeration of usb from etherne
t up, and around to the front, at boot.
Here is mine, booting to sata.
load_tftp=tftp 60500000 uImage
boot_tftp=run load_tftp boot
bootargs=root=/dev/sda1 ubi.mtd=2,512 rootfstype=ext3 console=ttyS0,115200 e
levator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=12... 阅读全帖
x*********g
发帖数: 69
12
来自主题: JobHunting版 - c/c++ question
运行了一下
3个hello world
input[3]=0x00 bad pointer。
问一下,
是不是char *input[]赋值,i位错误时,input[i]默认为0x00
b*****e
发帖数: 474
13
真的,我的也改了。
但是喵了一眼 dmesg,发现了不少这样的 error:
[8820196.720000] sd 0:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x00
[8820196.720000] end_request: I/O error, dev sda, sector 6297655
这是硬盘要死的节奏否?
b*****e
发帖数: 474
14
真的,我的也改了。
但是喵了一眼 dmesg,发现了不少这样的 error:
[8820196.720000] sd 0:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x00
[8820196.720000] end_request: I/O error, dev sda, sector 6297655
这是硬盘要死的节奏否?
g*****z
发帖数: 333
15
来自主题: Programming版 - 谁帮我解释一下这个代码
union所有的变量都存在一个地址
y={100}就是int x = 100,char b[0] = 100, float c 的 LSB = 100
所以打印出来x = 100,b = "d\0", c = 1.0 * 2^(100-127) = 0.
000000007450580596923828125。如果你打印精度够的话就可以看到真正的c
同理x的最后赋值才是真正的值,x.c = 21.50,实际的存储是LSB-MSB:0x83,0x58,
0x00,0x00,由于存储的时候MSB在前(由你系统的Endianness决定),所以字符串显
示为空。
w*s
发帖数: 7227
16
hi, i'm new to this, many thanks for help !
trying to send a query packet out,
size 1454 bytes, 1st word 0xfffffffb, 2nd 0xffffffff, 3rd 0x392
the correct packet sent from c code is captured in wireshark in the picture,
but got this,
socket.error: [Errno 10051] A socket operation was attempted to an
unreachable network
The code is like this,
def send_pnp_query():
print "... send query ..."
msg = bytearray(1454)
#ptr = PNP(msg)
msg[0] = 0xfb
msg[1] = 0xff
msg[2] = 0xff
... 阅读全帖
a****g
发帖数: 3027
17
来自主题: Military版 - LC 387 怎么优化
大思路是要记住合适的东西?
a. 扫一遍,转成26个字母的信息
b. 然后在26个字母的数组内部,比较一下
只懂C,什妈数据结构也不懂,差不多这样?
int i;
int cnt[26];
int charFirstIndex[26];
for (i=0; i<26; i++) {
cnt[i] = 0;
charFirstIndex[i] = -1;
}
// scan through the string
for (i=0; *(str+i) != 0x00; i++) {
// this char is converted to a number
int j = str[i] - 'a';
// for any letter '', remember the number of occurences
cnt[j]++;
// for this letter, always remember its first occurrence index in string,
and forget about all later occurrences, if a... 阅读全帖
l******o
发帖数: 144
18

int numberofones(unsigned int number)
{
if(number == 0)
return 0;
number = ((0xaaaaaaaa&number)>>1) + (0x55555555&number);
number = ((0xcccccccc&number)>>2) + (0x03333333&number);
~~~~~~~
0x33333333吧
number = ((0xf0f0f0f0&number)>>4) + (0x0f0f0f0f&number);
number = ((0xff00ff00&number)>>8) + (0x00ff00ff&number);
number = (number>>16) + (0x00
c***2
发帖数: 838
19
#1: In C, please write code to determine the longest consecutive bit string
(1 or 0) in an array of bytes.
For example,
char string[] = { 0xff, 0xa0, 0x00, 0x01, 0xff, 0xff, 0xaa };
(longest 1's)=18 (longest 0's)=20
So longest consecutive bit string=20
s********k
发帖数: 6180
20
来自主题: JobHunting版 - 请问一个little endian 系统的问题
系统是little endian, 定义一个Usigned int 32, 然后bit shift >>1.这个操作还
是除法(/2)吧,而不是把LSB往MSB移,从而导致变成(*2)?
同样 如果做强制类型转换,比如定义一个Usigned int32 a = 0x00ff
那么(uint16) a = 0xff?而不是0x00吧
有点糊涂,大侠指教下
f*******t
发帖数: 7549
21
来自主题: JobHunting版 - 两道F电面题
'\0'就是0x00
NULL也是0
f*******t
发帖数: 7549
22
来自主题: JobHunting版 - 两道F电面题
'\0'就是0x00
NULL也是0
s*******e
发帖数: 1630
23
最好是啥也不写,注意不是空格,是什么都没 0x00是最小的了吧?
y*****1
发帖数: 53
24
来自主题: JobHunting版 - 两道题,求解,谢谢
第一题感觉都是0。读取的byte是0x00,不管是lb还是lbu应该都是用0来填充剩余的
bits。
剩下两题就是把所有位都反转一次,0变1,1变0再加1,应该是
错了的话求勿喷
d**********o
发帖数: 1321
25
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
RTOS作业:2514
The purpose of this assignment is to give you more experience using the AVR
ports, and to add some I/O devices that might become useful later for our
RTOS.
You are to use one of the provided keypads to implement a “digital lock.”
Your program should allow the user to enter a four digit code from the
keypad, and if the code that is input matches the one included in your
program, the “lock” should open. In this case, the lock opening will be
represented by the lighting of an LED.
As th... 阅读全帖
d**********o
发帖数: 1321
26
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
RTOS作业:2514
The purpose of this assignment is to give you more experience using the AVR
ports, and to add some I/O devices that might become useful later for our
RTOS.
You are to use one of the provided keypads to implement a “digital lock.”
Your program should allow the user to enter a four digit code from the
keypad, and if the code that is input matches the one included in your
program, the “lock” should open. In this case, the lock opening will be
represented by the lighting of an LED.
As th... 阅读全帖
H********g
发帖数: 43926
27
来自主题: Joke版 - 如何复制MP3 ?
往上看,我实验过了。
我又做了个实验,把mp3 文件开头大概7.3kB全填了0x00,直到存第一个数据包的地方
,结果还是能放。看起来mp3的文件头对播放的确没什么影响。
a*****a
发帖数: 438
28
ok, that makes sense.
so i guess they store this read/unread information like this:
0xff, 0x00, 0xff, 0x1 (ie. 255 read, 255 unread)
e****e
发帖数: 1775
29
isn't that a null value and thus different from null string, so u have to treat
it separately and specially?
c*****t
发帖数: 1879
30
来自主题: Java版 - stringtemplate question
I am trying to render int[] in a hex format, but couldn't find a way.
I'd like output { 0,16,2,15 } to the following output
0x00, 0x10, 0x02, 0x0f
I just couldn't seem to find a way from the documentation. Any one
knows?
f********f
发帖数: 475
31
来自主题: Programming版 - 怎样将array^转换成string?
我的unsigned char Data不是ASCII code, 比如说:
{0x01, 0x11,0x02, 0x00, 0x12, 0x34, 0x56 ....}
我想将其中的0x12, 0x34, 0x56 显示成123456在GUI上.
1 (共1页)