由买买提看人间百态

topics

全部话题 - 话题: 0x0
1 2 下页 末页 (共2页)
O****C
发帖数: 368
1
来自主题: Software版 - Mac Air上的OneNote突然不能用了
完全不能打开。
我已经重装几次都不行。麻烦你们帮我看看error report。 谢谢。
Microsoft Error Reporting log version: 2.0
Error Signature:
Exception: EXC_BAD_ACCESS
Date/Time: 2014-09-10 22:55:06 +0000
Application Name: Microsoft OneNote
Application Bundle ID: com.microsoft.onenote.mac
Application Signature: ONMC
Application Version: 15.2.140713
Crashed Module Name: MicrosoftOffice
Crashed Module Version: 15.2.140713
Crashed Module Offset: 0x00071f94
Blame Module Name: MicrosoftOffice
Blame Module Version: 15.2.140713
Blame Modu... 阅读全帖
g******t
发帖数: 18158
2
来自主题: Military版 - 骂疮破的都是什么人?
https://www.vox.com/policy-and-politics/2018/10/19/17989664/deficit-tax-cuts
-donald-trump-disaster-relief
Republicans won’t admit it — but their tax cuts blew a big hole in the
deficit
Trump blamed disaster relief funding for the deficit. It’s mostly the tax
cuts.
By Tara Golshan Oct 19, 2018, 11:40am EDT
https://cdn.vox-cdn.com/thumbor/oCBj9gpTL-53OvaVwCbVspp5J50=/0x0:4860x3241/
920x613/filters:focal(2001x423:2777x1199):format(webp)/cdn.vox-cdn.com/
uploads/chorus_image/image/61835159/1055971... 阅读全帖
p*******n
发帖数: 4824
p*****i
发帖数: 1281
4
来自主题: Apple版 - 五国,包子求助
就那么几个包子,送完为止。。。
Tue Jan 11 16:22:12 2011
panic(cpu 0 caller 0x2aab55): Kernel trap at 0x0049a20e, type 14=page fault,
registers:
CR0: 0x8001003b, CR2: 0x5ef72bf0, CR3: 0x00100000, CR4: 0x00000660
EAX: 0x0f088b7c, EBX: 0x5ef72bbc, ECX: 0x021f0000, EDX: 0x0ee7fe80
CR2: 0x5ef72bf0, EBP: 0x83b2be78, ESI: 0x00000000, EDI: 0x12605b58
EFL: 0x00010202, EIP: 0x0049a20e, CS: 0x00000008, DS: 0x0d0f0010
Error code: 0x00000000
Backtrace (CPU 0), Frame : Return Address (4 potential args on stack)
0x83b2bc48... 阅读全帖
c******d
发帖数: 171
5
在我的Desktop上enable了LogonAudit。 发现很多的这样的纪录。其中的
SQLServerMachine是Remote的SQL Server。 它为什么要Logon我的机器呢?下面是从我
的机器的EventView看到的:
An account was successfully logged on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
New Logon:
Security ID: domainSQLServerMachine$
Account Name: SQLServerMachine$
Account Domain: domain
Logon ID: 0x1710dcecb
Logon GUID: ... 阅读全帖
c**y
发帖数: 172
6
来自主题: Programming版 - C 和 C++ 的区别
我的下面的程序,在gcc可以编译通过,但是g++抱怨multi-definition of x。哪个大
侠指点一下为什么g++报这个错。
====程序====
1.m.c
#include
#include "l1.h"
extern void incx();
int main() {
x = 10;
px();
incx();
return 0;
}
2.l1.h
int x;
void px();
3.l1.c
#include
#include "l1.h"
void px()
{
printf("x = %d\n",x);
}
4.l2.c
#include
#include "l1.h"
void incx()
{
x += 1;
px();
}
========
gcc编译命令
gcc m.c l1.c l2.c
g++编译命令及报错
-bash-2.05b$ g++ m.c l1.c l2.c
/tmp/cc4JpQXE.o(.bss+0x0): multiple d... 阅读全帖
k****e
发帖数: 126
7
来自主题: Programming版 - 问个超简单的C问题
If a[][] is declared as static storage duration then it will certainly go to
.data segment. If not, the compiler will probably use immediate value
instead.
If you compare the following, (gcc version 4.5.3 -O0)
(1) array a[] has "auto" storage duration.
#include
#include
int foo()
{
int a[] = {3, 4, 5};
return a[2];
}
int main(void)
{
int temp;
temp = foo();
printf("%d", temp);
return 0;
}
Sections:
Idx Name Size VMA LMA File ... 阅读全帖
i**p
发帖数: 902
8
来自主题: Programming版 - unsigned long long
哪位大牛能解释一下ullong 1, ullong 2, ullong 4, ullong 5 的输出吗?
此程序在 Android (GB) emulator 上运行。
//刚刚发现,程序中的反斜杠都被mitbbs过滤掉了。
printf("sizeof(unsigned int): %dn", sizeof(unsigned int));
printf("sizeof(unsigned long): %dn", sizeof(unsigned long));
printf("sizeof(unsigned long long): %dn", sizeof(unsigned long long));
unsigned int uint=0x01020304;
printf("uint: 0x%xn", uint);
unsigned long ulong=0x01020304;
printf("ulong 1: 0x%xn", ulong);
printf("ulong 2: 0x%lxn", ulong);
u... 阅读全帖
b***i
发帖数: 3043
9
新的信息
大神帮看看那里可以提高?
[ 0.128265] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.129791] tps65910 1-002d: JTAGREVNUM 0x1
[ 0.133728] print_constraints: VRTC:
[ 0.135223] print_constraints: VIO: at 1500 mV
[ 0.137603] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal
[ 0.139923] print_constraints: VDD2: at 1100 mV
[ 0.140960] print_constraints: VDD3: 5000 mV
[ 0.142425] print_constraints: VDIG1: at 1800 mV
[ 0.143890] print_constraints: VDIG2: at 1800 mV
[ ... 阅读全帖
v***e
发帖数: 2108
b**l
发帖数: 51
11
No Need JNI. try this:
===
/*
* @(#)WinRegistry.java 1.4 03/12/19
*
* Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
met:
*
* -Redistribution of source code must retain the above copyright notice,
this
* list of conditions and the following disclaimer.
*
* -Redistribution in binary form must reproduce the above copyright notice,
* th... 阅读全帖
g*********e
发帖数: 14401
12

我用perf 生成callgraph以后如同下面。好多只有地址没有函数名是不是inline造成的
。debug build没有这么问题
# Samples: 4K of event 'cycles'
# Event count (approx.): 3058353551
#
# Overhead Command Shared Object



# ........ ............... .................... .........................
................................................... 阅读全帖
f**m
发帖数: 246
13
来自主题: Security版 - 请问这种hack程序如何清除?
禁止C$、D$一类的缺省共享
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
AutoShareServer、REG_DWORD、0x0
禁止ADMIN$缺省共享
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
AutoShareWks、REG_DWORD、0x0
限制IPC$缺省共享
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
restrictanonymous REG_DWORD 0x0 缺省
0x1 匿名用户无法列举本机用户列表
0x2 匿名用户无法连接本机IPC$共享
说明:不建议使用2,否则可能会造成你的一些服务无法启动,如SQL Server
o*******n
发帖数: 407
14
google 地图自己看下:
正面:
https://maps.google.com.hk/maps?q=%E6%9D%BE%E6%B1%9F%E5%B8%82&hl=en&ie=UTF8
&ll=35.515951,133.192118&spn=0.003192,0.00582&sll=35.516435,133.196734&sspn=
0.003192,0.00582&t=h&brcurrent=3,0x0:0x0,0&hnear=Matsue,+Shimane,+Japan&
layer=c&cbll=35.515951,133.192118&panoid=3KulWos7P-P-O1bWORywIg&cbp=12,71.63
,,0,3.98&z=18
侧面:
http://tinyurl.com/leaes2j
o*******n
发帖数: 407
15
【 以下文字转载自 Military 讨论区 】
发信人: oldvirgin (老处女), 信区: Military
标 题: CCAV是小学没毕业啊?不懂摄影、不懂正弦,更不懂求证!
发信站: BBS 未名空间站 (Fri Feb 21 04:58:15 2014, 美东)
google 地图自己看下:
正面:
https://maps.google.com.hk/maps?q=%E6%9D%BE%E6%B1%9F%E5%B8%82&hl=en&ie=UTF8
&ll=35.515951,133.192118&spn=0.003192,0.00582&sll=35.516435,133.196734&sspn=
0.003192,0.00582&t=h&brcurrent=3,0x0:0x0,0&hnear=Matsue,+Shimane,+Japan&
layer=c&cbll=35.515951,133.192118&panoid=3KulWos7P-P-O1bWORywIg&cbp=12,71.63
,,0,3.98&z=18
侧面:
http://tinyurl.com/... 阅读全帖
K****n
发帖数: 2485
p*******n
发帖数: 4824
s****u
发帖数: 1811
18
来自主题: NewJersey版 - 请问在nj看ny的烟花好趴车吗?
我如果去lincoln tunnel附近呢?
比如这个地方:http://maps.google.com/maps/place?ftid=0x0:0x0&q=40.762219,-74.021695&gl=us&hl=en&cad=src:ppiwlink&ei=0hMOTpSyGar2ygT5sPWPDw&dtab=2
可行不?
看上去是个很大的停车场,nyc的车能停么?
因为网上推荐在lincoln tunnel福建看,谢谢!
s****u
发帖数: 1811
19
来自主题: NewJersey版 - 请问在nj看ny的烟花好趴车吗?
恩!有道理!
请问下面这个地方
http://maps.google.com/maps/place?ftid=0x0:0x0&q=40.762219,-74.
可不可以随便趴?
我打算6点左右就到。。。。应该够早吧?
l*********4
发帖数: 102
20
以下是链接。
https://ditu.google.com/maps?q=Pick-N-Pull,+Mowry+Avenue,+Newark,+CA,+United
+States&hl=en&ll=37.505334,-122.023602&spn=0.022606,0.049653&sll=37.516398,-
122.004204&sspn=0.090409,0.198612&oq=pick&brcurrent=3,0x0:0x0,0%3B5,0,0&hq=
Pick-N-Pull,&hnear=Mowry+Ave,+Newark,+California,+United+States&t=h&z=15
E********t
发帖数: 4091
21
来自主题: Football版 - Tyron Smith的蛮力
http://cdn0.vox-cdn.com/thumbor/pDyWMgaffZrLeTnkk667H42XqZs=/0x0:483x300/
920x0/filters:focal(0x0:483x300):no_upscale()/cdn0.vox-cdn.com/uploads/
chorus_asset/file/7627979/applesmash.0.gif
昨天比赛里看到这一幕就印象很深刻
一个6'1 200磅的cb被轻轻一推就飞了...
E********t
发帖数: 4091
f*1
发帖数: 837
23
来自主题: Pingpong版 - 这个是失踪的飞机吗?
看样子不远了?
http://news.163.com/14/0312/17/9N5F6IJ600014JB6.html
http://www.businessinsider.com/oil-rig-worker-thinks-he-saw-mal
在google maps输入:
105.63E,6.7N
https://www.google.com/maps/place/6%C2%B042'00.0%22N+105%C2%B037'48.0%22E/@5
.0231223,106.403087,6z/data=!4m2!3m1!1s0x0:0x0
108 42' 22.26"E, 08 22'30.23"N
https://www.google.com/maps/place/8%C2%B022'30.2%22N+108%C2%B042'22.3%22E/@8
.5217698,110.0822209,6z/data=!4m2!3m1!1s0x0:0x0
o*******n
发帖数: 407
24
【 以下文字转载自 Military 讨论区 】
发信人: oldvirgin (老处女), 信区: Military
标 题: CCAV是小学没毕业啊?不懂摄影、不懂正弦,更不懂求证!
发信站: BBS 未名空间站 (Fri Feb 21 04:58:15 2014, 美东)
google 地图自己看下:
正面:
https://maps.google.com.hk/maps?q=%E6%9D%BE%E6%B1%9F%E5%B8%82&hl=en&ie=UTF8
&ll=35.515951,133.192118&spn=0.003192,0.00582&sll=35.516435,133.196734&sspn=
0.003192,0.00582&t=h&brcurrent=3,0x0:0x0,0&hnear=Matsue,+Shimane,+Japan&
layer=c&cbll=35.515951,133.192118&panoid=3KulWos7P-P-O1bWORywIg&cbp=12,71.63
,,0,3.98&z=18
侧面:
http://tinyurl.com/... 阅读全帖
o*******n
发帖数: 407
25
【 以下文字转载自 Military 讨论区 】
发信人: oldvirgin (老处女), 信区: Military
标 题: CCAV是小学没毕业啊?不懂摄影、不懂正弦,更不懂求证!
发信站: BBS 未名空间站 (Fri Feb 21 04:58:15 2014, 美东)
google 地图自己看下:
正面:
https://maps.google.com.hk/maps?q=%E6%9D%BE%E6%B1%9F%E5%B8%82&hl=en&ie=UTF8
&ll=35.515951,133.192118&spn=0.003192,0.00582&sll=35.516435,133.196734&sspn=
0.003192,0.00582&t=h&brcurrent=3,0x0:0x0,0&hnear=Matsue,+Shimane,+Japan&
layer=c&cbll=35.515951,133.192118&panoid=3KulWos7P-P-O1bWORywIg&cbp=12,71.63
,,0,3.98&z=18
侧面:
http://tinyurl.com/... 阅读全帖
f*****e
发帖数: 5177
26
来自主题: Database版 - SQLServer Deadlock. Need help
Server: SQLServer 2000
Deadlock Log:
Deadlock encountered .... Printing deadlock information
2008-01-14 12:28:35.90 spid2
2008-01-14 12:28:35.90 spid2 Wait-for graph
2008-01-14 12:28:35.90 spid2
2008-01-14 12:28:35.90 spid2 Node:1
2008-01-14 12:28:35.90 spid2 KEY: 5:743673697:5 (9c04f775c7cf) CleanCnt:
1 Mode: X Flags: 0x0
2008-01-14 12:28:35.90 spid2 Grant List 0::
2008-01-14 12:28:35.90 spid2 Owner:0x474ebaa0 Mode: X Flg:0x0
Ref:0 Life:02000000 SPID:62 EC
a**4
发帖数: 1050
27
来自主题: Database版 - Pre-Built Developer VMs 安装问题
用VIRTUAL BOX 启动的时候freeze了,上面写着:
Memory for crash kernel (0X0 to 0X0) notwithin premissible range
上网搜了一下大家说这没影响 但是我的还是卡住了 请大家帮忙看看
B*****g
发帖数: 34098
28
来自主题: Database版 - Pre-Built Developer VMs 安装问题
google “virtualbox Memory for crash kernel (0X0 to 0X0) notwithin
permissible range”
看前几个结果
a**4
发帖数: 1050
29
来自主题: Database版 - Pre-Built Developer VMs 安装问题
今早在另外一台WIN7电脑上安装成功了。原来那电脑WIN8的。
同样也出现
virtualbox Memory for crash kernel (0X0 to 0X0) notwithin
permissible range
但后面出现 starting xxxx linux
就好使了。以前都是第一条出现就直接死屏。可能是WIN8的问题。谢谢两位
o********e
发帖数: 474
30
来自主题: Hardware版 - 帮忙解决下蓝牙驱动找不着问题
最近也不知道干了点啥,一开机总是出现提示蓝牙驱动找不着。
见图。自动网络寻找和本地都找不到驱动,况且我根本不知道这两个找不着驱动的设备
/服务是啥!disable或者是uninstall这两个,下次开机或者刷新下就又出来了!看着
很烦!
系统是windows 7 Ultimate 64 bit, thinkpad x201
网上找了一通类似问题,很多人提到要装个windows mobile device center.
于是就去MS网上下。
http://www.microsoft.com/en-us/download/details.aspx?id=3182
可是下不来!!!!
要想下载那个先要下个GeniuneCheck.exe检查正版,我是正版我不怕阿,可是他妈
这个GeniuneCheck.exe根本运行不了!!!说是"This version of the Windows
Genuine Advantage validation tool is no longer supported. Please download
the newest version and ensure... 阅读全帖
w*s
发帖数: 7227
31
this is an embedded board,
if i nfs boot from /home/user1/fs, it boots fine.
Then i "sudo cp -Ra /home/user1/fs /home/wds",
then try to nfs boot from /home/wds/fs, it says
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available
partitions:
1f00 128 mtdblock0 (driver?)
1f01 1664 mtdblock1 (driver?)
1f02 256 mtdblock2 (driver?)
1f03 3072 mtdblock3 (driver?)
1f04 3072 mtdblock4 ... 阅读全帖
w****w
发帖数: 521
32
来自主题: Linux版 - ubuntu 12.04 pptpd问题。
都成功了,突然来了个LCP TermReq.
sent [CHAP Challenge id=0x67 <0c16aa943c019c32bd069fb9e445ee87>, name = "
pptpd"]
rcvd [LCP Ident id=0xda magic=0x753249ac "MSRASV5.20"]
rcvd [LCP Ident id=0xdb magic=0x753249ac "MSRAS-0-T410WIN"]
rcvd [LCP Ident id=0xdc magic=0x753249ac "&Iw\37777777732Tw\37777777606D\
37777777656\001\035\37777777616`O\016\37777777776"]
rcvd [LCP EchoRep id=0x0 magic=0x753249ac]
rcvd [LCP EchoRep id=0x0 magic=0x753249ac]
rcvd [CHAP Response id=0x67 <
e5744c26cfb9b85f0b329feb6f0d28bd000000... 阅读全帖
r*****8
发帖数: 2560
33
“You need to create a unsigned char[2] array, and then copy the data from
struct to char array,”
这两句编译通不过:
unsigned char char_array[2];
strcpy(char_array, packed_data);
还有,不能strcpy,因为真实数据中间可能有0x0字符,strcpy 到了0x0字符就
不往下走了。
要读出每一个位置来,如果是指针,这也是不好办的。
发送我有经验,不是问题。

.
p**i
发帖数: 688
34
这个看起来好像codec没有问题, 因为capabilities里出现的都是combined - 0x4 (
ulaw)
你可以试一下turn off sip debug , 然后注意剩下的message. 把不含你个人信息的部
分贴上来

nat->nat->asterisk->pygooglevoice 拨出,goog411 也听不见我说话了。只有通过
google voice web page, 2-way voice 才没问题。。。变得更像是 NAT 问题了。。
以常常出现 pap2@asterisk_externip. log 里面其他替换了的有:
uri="sip:phone_called@asterisk_externip",algorithm=MD5,response="
5355c630d216f731cdcfcdf6a0f379e2"
g729|ilbc|h263p)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (
ulaw)
telephone-event), combined - 0x1 (
v**o
发帖数: 4956
35
来自主题: Military版 - 加州地震了?
https://www.google.com/maps/place/40%C2%B049'15.6%22N+125%C2%B007'39.7%22W/@
37.5335996,-125.9242079,5z/data=!4m2!3m1!1s0x0:0x0?hl=en
w***o
发帖数: 1806
36
来自主题: Military版 - Got it
12.428419, 92.834640
https://www.google.com/maps/place/12%C2%B025%2742.3%22N+92%C2%B050%2704.7%
22E/@12.428419,92.83464,16926m/data=!3m2!1e3!4b1!4m2!3m1!1s0x0:0x0
f***n
发帖数: 4682
37
来自主题: Military版 - 南纬25,东经101
https://www.google.com/maps/place/25%C2%B000'00.0%22S+101%C2%B000'00.0%22E/@
-25,101,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x0
I*3
发帖数: 7012
38
来自主题: Military版 - 有知识的毛轮存在吗?
要说最著名的有知识的死忠铁杆毛轮,
先给个新疆地图,
https://www.google.com/maps/place/42%C2%B039%2718.9%22N+94%C2%B010%2700.8%
22E/@42.655109,94.166951,785236m/data=!3m1!1e3!4m2!3m1!1s0x0:0x0?hl=en
眼神不好,看不清楚这六个大字的,自觉 ZOOM IN 10 下。
I*3
发帖数: 7012
39
来自主题: Military版 - 有知识的毛轮存在吗?
哥打脸不是白打,哥会把证据一项一项摆给你,让你一边捂着脸,一边大叫打得好。不
信的ID,可以去问问被嘿嘿哥打过脸的,哪个不是心服口服。
新疆这六个大字,是当年维吾尔族著名史学家翦伯赞提议刻的。
翦伯赞,1924年赴美国加大留学。完成了《中国史纲》和《中国史论集》等。曾任北京
大学历史学系教授兼系主任长达16年,北大副校长6年。筹建了中国历史学会。
说此人通晓中华上下五千年历史第一人,版上所有知识邓轮加起来都不及人一屌毛。服
不服?
腊肉在你鳖八届十二中全會上提到“对北京大学的翦伯赞要给出路”。此毛轮因此感恩
戴德,携妻自尽以报龙恩,死前留遗书一封,“毛主席万岁!毛主席万岁!毛主席万万
岁!”,呼应新疆六大字。
说此人是铁杆死忠毛轮,版上所有死硬邓轮加起来都不及人一屌毛忠诚。服不服?
有不服的邓轮举手。

要说最著名的有知识的死忠铁杆毛轮,
先给个新疆地图,
https://www.google.com/maps/place/42%C2%B039%2718.9%22N+94%C2%B010%2700.8%
22E/@42.655109,94.166951,785236m/data=!3m... 阅读全帖
b********n
发帖数: 38600
40
来自主题: Military版 - 床铺到底睡没睡 Karen McDougal ?
Karen McDougal is an American model and actress. She is known for her
appearances in Playboy magazine as Playmate of the Month for December 1997
and Playmate of the Year of 1998
https://www.google.com/imgres?imgurl=https://cdn.vox-cdn.com/thumbor/
fmJeqqDWfP77hjuiyV1DVDgel3Q%3D/0x0:1919x3000/1200x800/filters:focal(727x617:
1033x923)/cdn.vox-cdn.com/uploads/chorus_image/image/59440447/51493914.jpg.0
.jpg&imgrefurl=https://www.vox.com/2018/4/18/17254786/karen-mcdougal-trump-
affair-national-enquir... 阅读全帖
b********n
发帖数: 38600
41
【 以下文字转载自 Military 讨论区 】
发信人: beijingren (to thine own self be true), 信区: Military
标 题: 床铺到底睡没睡 Karen McDougal ?
发信站: BBS 未名空间站 (Fri Jul 20 18:29:48 2018, 美东)
Karen McDougal is an American model and actress. She is known for her
appearances in Playboy magazine as Playmate of the Month for December 1997
and Playmate of the Year of 1998
https://www.google.com/imgres?imgurl=https://cdn.vox-cdn.com/thumbor/
fmJeqqDWfP77hjuiyV1DVDgel3Q%3D/0x0:1919x3000/1200x800/filters:focal(727x617:
1033x923)/cdn.v... 阅读全帖
g******t
发帖数: 18158
42
来自主题: USANews版 - 川粉的精神领袖不蠢
https://compote.slate.com/images/1f09ad65-0065-43e3-9bd4-2ba7eaddc457.jpeg?
width=780&height=520&rect=3000x2000&offset=0x0
这孙子混的不错啊,混上给长公主拎包了,一次拎两个包,一个大包,一个小包
x****k
发帖数: 2932
43
来自主题: JobHunting版 - 面经兼求祝福
一家IB的Analytics developer的onsite,只记得部分题目,一些比较简单的题目就不
写了。括号后是我认为的答案或者提示。
1. write a iterative function to calculate fibonacci sequence
2. what is the difference of Delete table and truncat table.(about sql &
database)
3. what is ACID.(about sql or database)
4. write a find() for BST, How to decide the element could not be found.((
less than && No left child) || (large than && no right child))
5. how to reverse a link list using one point
(should I use recursive calling)
6. find the sizeof(int) wit... 阅读全帖
j***y
发帖数: 2074
44
来自主题: JobHunting版 - map numbers to strings
又看了一会儿,似乎有些明白,的确是巧妙的递推。但有些疑问:
1. char result[PHONE_NUMBER_LENGTH];应改为char result[PHONE_NUMBER_LENGTH+1]?
2. void printTelephoneWords( int phoneNum[] ){
char result[PHONE_NUMBER_LENGTH];
doPrintTelephoneWords( phoneNum, 0, result );
}似乎应该改为:
void printTelephoneWords( int phoneNum[] ){
char result[PHONE_NUMBER_LENGTH+1]; /* +1 for the string-ending 0x0
character */
for (int i = 0; i < 3; i++) {
doPrintTelephoneWords( phoneNum, 0, result );
}
}
否则出来的似乎只是da、db、dc而已。
我不太懂算法和... 阅读全帖
w*******r
发帖数: 2953
45
来自主题: JobHunting版 - 一道OO设计题
程序和运行结果如下,不考虑瘸子的情况。
#include
using namespace std;
class human
{
public:
human();
human(bool, bool);
~human(){};
bool getEyeState();
bool getMouthState();
char *getHealthDesc();
private:
bool isBlind;
bool isDeaf;
};
human::human()
{
isBlind = 0;
isDeaf = 0;
}
human::human(bool blind, bool deaf)
{
isBlind = blind;
isDeaf = deaf;
}
bool human::getEyeState()
{
return isBlind;
}
bool human::getMouthState()
{
return isDeaf;
}
char *hu... 阅读全帖
w*******r
发帖数: 2953
46
来自主题: JobHunting版 - 一道OO设计题
改完的程序在下面,这下疾病可以随便定义了,也可以治病了。
想给给个病安个计数器,记得好像有个什么关健词可以让所有的object改动的都是
同一个变量而不是各自的变量(counter),记不起来了,所以这个counter打印得
不对,有知道的告诉我一声。
#include
#include
#include
using namespace std;
class Disability
{
public:
Disability(){counter = 0; };
Disability(string, string);
~Disability(){};
string get_disease_name() const { return name; };
string get_disease_desc() const { return desc; };
void incr_sick_human_counter() {counter++; };
unsigned long get_hum... 阅读全帖
h*****f
发帖数: 248
47
来自主题: JobHunting版 - 如何判断char的赋值有没有溢出
Hmm...a char can hold 0x0-0xFF. 128=0x80...so no overflow..
I guess the question is to detect whether the input occupies more than 1
byte?
You probably could *if* it were foo(char*) or foo(char&).
1 2 下页 末页 (共2页)