由买买提看人间百态

topics

全部话题 - 话题: swapping
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
b***d
发帖数: 186
1
这儿人气旺些,借此地一问。
下面的是solaris 10
【 以下文字转载自 Unix 讨论区 】
发信人: beerd (beerd), 信区: Unix
标 题: 奇怪的swap,一部分不见了
发信站: BBS 未名空间站 (Wed Jan 5 13:24:03 2011, 美东)
bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 181,1 8 1048568 1048568
bash-3.00# swap -s
total: 358208k bytes allocated + 159532k reserved = 517740k used, 368716k
available
swap -l 显示free有1048568 blocks,就是524284k,而
swap -s 显示free就只有368716k了。帮助里说swap -s包含了swap in disk device
and physical memory。也就是说avai... 阅读全帖
b***d
发帖数: 186
2
来自主题: Unix版 - 奇怪的swap,一部分不见了
bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 181,1 8 1048568 1048568
bash-3.00# swap -s
total: 358208k bytes allocated + 159532k reserved = 517740k used, 368716k
available
swap -l 显示free有1048568 blocks,就是524284k,而
swap -s 显示free就只有368716k了。帮助里说swap -s包含了swap in disk device
and physical memory。也就是说available的应该是free swap space in disk device
+ free swap space in physical memory。但是这里怎么还比disk上的free的都少?
我在另外一台系统里也发现这个问题:
bash-3.00# swap -l
swapfile ... 阅读全帖
G*******1
发帖数: 6411
3
来自主题: Stock版 - 95% creditors agreed to swap
Nearly 95% of Greek Creditors Agree to Bond-Swap Deal
Published: Thursday, 8 Mar 2012 | 4:34 PM ET
Text Size
By: Reuters
Greece's race to slice 107 billion euro ($140 billion) off its debt entered
the home stretch Thursday, with participation in a bond swap deal nearly 95
percent, a Greek government official close to the process said on Thursday.
"About an hour before the deadline expired, the participation rate was
nearing 95 percent and responses were still coming in," a Greek government
offic... 阅读全帖
g********r
发帖数: 58
4
来自主题: JobHunting版 - 再论 mini # of swaps to sort array.
An operation "swap" means removing an element from the array and appending
it at the back of the same array. Find the minimum number of "swaps" needed
to sort that array.
Eg :- 3124
Output: 2 (3124->1243->1234)
看到版上有人讨论这道题, 总觉得应该有更优解。 而且假设 数字是从 1-n 有些牵强
。昨天想到了一个解法,今天又稍稍更新了一下。个人的理解 大家看看有没有错。谢
谢!
1. 如果数组长度是n,最多就需要swap n-1次,就是每个元素 最多只需要swap一次。
我们并不需要关心哪个先哪个后swap。 那么 我们就一个一个元素的判断那些需要swap。
2. 首先 如果 给定元素的右边 有更小的值,这个元素就需要swap, 比如上例中的3
3. 然后,再看 剩下的没有swap的元素,如果值比 “在第二步中需要swap的所有元素
的最小值” 大, 那这个元素 就需要 sw... 阅读全帖
C**0
发帖数: 123
5
大约是两个月前的事情了,总结一下。
基本情况:
手里有两个R+ Plan:Hip Hop 1 (3250/3250/3250) 和 (Momentum 3000/3000/3000)
手机都是LG Tribute 2 (LG LS665, rooted)
主要用他家的数据,平时导航,听蜻蜓/喜马拉雅,没wifi时看看youtube基本够用了。
SWAP:
不小心cei了其中一个Tribute 2的屏幕...就买了个Moto X Pure,打算swap。
IMEI检测可用,于是
用Moto X + Sprint新给的sim, 网上自己Swap,不成功;
输入IMEI 和SIM的ICC ID
If this new device is currently active on any carrier, it must be
deactivated before swapping into your account.
If you entered an ICCID, please try without the ICCID.
只输入IMEI
If this new device is curr... 阅读全帖
d*******n
发帖数: 524
6
来自主题: Quant版 - 关于forward swap的一个问题?
看到关于forward swap的定义:
A swap agreement created through the synthesis of two swaps differing in
duration for the purpose of fulfilling the specific time-frame needs of an
investor. Also referred to as a "forward start swap," "delayed start swap,"
and a "deferred start swap."
For example, if an investor wants to hedge for a five-year duration
beginning one year from today, this investor can enter into both a one-year
and six-year swap, creating the forward swap that meets the needs of his or
her po
c*******t
发帖数: 123
7
我也是小白。我今天才看了john hull interest swap这一章。 说一点我的看法:
interest rate swap can be recognized as a linear combination of two bonds,
one is long, and another is short.
so the total duration of the bond portfolio and the interest rate swap is
nothing more than the linear combination of three bonds.
When you caculate the weight factor of bond duration you use the present
value of the bond, i.e the market price,
so it make sense to use the market price of the interest swap as the weight
factor, which is jus... 阅读全帖
s*****h
发帖数: 44903
8
☆─────────────────────────────────────☆
ThetaWave (Theta) 于 (Mon Jan 18 15:56:02 2016, 美东) 提到:
NFL的变迁: Steelers-Eagles Big Swap。
Eagles和Steelers建队于同一年,1933年,他们的funding owners同时也是多年的朋友
。在NFl-AFL合并之前,两队之间打了65次比赛。在1943年,Eagles和Steelers还短暂
的合为一队,名为Steagles。两队之间还流淌着彼此的血液,如今的Eagles曾经是久远
之前的Steelers。如今的Steelers也曾经是多年前的Eagles。
钢人是NFL的豪门,至今拿到6次巨碗,是NFL巨碗时代最强的NFL球队。钢人由Rooney家
族建立. 1933年,Art Rooney创建了Steelers。Steelers开始的名字是Pirates。In
1940, Art changed the team name to Steelers. In 2008, Rooney families... 阅读全帖
P**C
发帖数: 45
9
来自主题: Linux版 - 请问这个系统怎么两个swap
fstab中显示有两个swap,怎么回事?
还有就是\是挂载在md0上,可是fdisk现实Disk /dev/md0 doesn't contain a valid
partition table,奇怪?
难道系统所有文件都在md0,sda和sdb其他几个分区都没有怎么用?
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc ... 阅读全帖
c*********i
发帖数: 2749
10
重要补充,
atuma (atuma):
swap时当前机子和要swap的机子最好都关机或起码在airplane mode下操作。
有版友swap不成功,关机后再操作就搞定。
先复制保存自己的MEID 和ICCID ,再swap 到另外设备(可以是虚拟MEID,需要先用
MEID官网检测确认可用),等二十分钟,再swap 回去即可。
目前swap 仍然免费。虚拟MEID 0630177+四位数字
由于号码从AD 系列转入Mad 系列,涉及号码依托系统的转换,所以出现账户无法呼出
电话。swap大法就是手动触发系统信息重置动作,恢复正常呼叫功能。
u********e
发帖数: 4950
11
来自主题: Stock版 - Greek Debt Swap process 简短翻译
【 以下文字转载自 Chinook 俱乐部 】
发信人: updownlife (渔夫), 信区: Chinook
标 题: 简短翻译了一下Greek Debt Swap process
发信站: BBS 未名空间站 (Thu Mar 8 14:01:15 2012, 美东)
市场的预期: ( 2月底的预期)
(1) * 总5% 概率:
有95%以上的private bond holder 参与 Deb swap,  Deb swap顺利进行, 剩余5%
不参与的bond holder将得到票面值
(2) * 总85% 概率:(总的市场预期)
有67% 到 95%的private bond holder 参与 Deb swap, Deb swap可能分三种方式进
行:
(a) EFSF 出钱, 给剩余 (15% to 33%) 不参与的bond holder返回票面值  (2%
可能性)
(b) Greek 政府出面, 启动CAC 法律并惩罚(或不惩罚)剩余 (15% to 33%) 不参与的
bond holder: 不参与者将被强迫参与或者分文不得, 这些人需要去和保险公... 阅读全帖
m****s
发帖数: 7397
12
来自主题: NewJersey版 - car swap (转载)
【 以下文字转载自 Automobile 讨论区 】
发信人: mitaas (芸芸众生), 信区: Automobile
标 题: car swap
关键字: SWAP your car with mine
发信站: BBS 未名空间站 (Tue Sep 13 11:42:28 2011, 美东)
If you have a 4WD or AWD car (wagon prefered)
Must be in excellent running condition.
would you be interested in swapping with a silver 2004 BMW 530i.
Both swap for usage, or ownership can be considered.
I am in NJ/NY/CT/PA area. Local swaps prefered, but i understand it's less
likely.
Southern swaps encouraged!
Flexible, negotiable.
Orion.Sandie... 阅读全帖
a***r
发帖数: 594
13
a lot of OTC derivatives are in form of SWAPs. you pay me one cash flow, I
pay you another. not money exchange up front.
examples are: interest rate swaps, credit default swaps ... CDO is a kind of
swaps. International Swap Dealer Association covers almost every corner of
OTC derivatives.
one broad interpretation of some of the terms in the bill is that banks can
not operate any swap trading any more. those operations need to be spun off into some new company, no longer backed by the full faith
T*******e
发帖数: 4110
14
来自主题: Football版 - NFL的变迁: Steelers-Eagles Big Swap.
NFL的变迁: Steelers-Eagles Big Swap。
Eagles和Steelers建队于同一年,1933年,他们的funding owners同时也是多年的朋友
。在NFl-AFL合并之前,两队之间打了65次比赛。在1943年,Eagles和Steelers还短暂
的合为一队,名为Steagles。两队之间还流淌着彼此的血液,如今的Eagles曾经是久远
之前的Steelers。如今的Steelers也曾经是多年前的Eagles。
钢人是NFL的豪门,至今拿到6次巨碗,是NFL巨碗时代最强的NFL球队。钢人由Rooney家
族建立. 1933年,Art Rooney创建了Steelers。Steelers开始的名字是Pirates。In
1940, Art changed the team name to Steelers. In 2008, Rooney families
diluted their shares in Steelers but they still maintain the majority
control of the organization. ... 阅读全帖
S*A
发帖数: 7142
15
来自主题: Linux版 - linux下的swap设计得不科学吧
Linux 可以 swap 到 文件系统的文件里面。但是不如
有专门的 swap partition 好。你如果用 LVM 的分区
的话也可以动态调整 swap partition。
在文件系统里面做 swap file 有很多不方便和复杂的
地方,所以不推荐。(文件系统本身也用 memory,写
swapfile 的时候有多一层的处理)。
Windows 里面的 swap file 也是不能随便移动的。
我如果用 LVM 的话我不觉得是什么大问题。
K*******a
发帖数: 100
16
来自主题: CellularPlan版 - 问: ringplus swap device为什么总是出错?
我在今年一月份买的sprint moto e2上面用了几个月的r+(专门作android auto的手机
用), 现在觉得机子太卡, 于是在swappa上买了个二手nexus 5 (D820), 结果swap
device每次都出错:
"If this new device is currently active on any carrier, it must be
deactivated before swapping into your account.
If you entered an ICCID, please try without the ICCID."
swap的时候用的是n5的MEID/ESN和e2里面那张旧SIM卡的ICCID. 据n5机主说他原来也是
用ringplus的, 不过我之前在r+的BYOD页面上查了这台n5的MEID/ESN, 显示的是可以加
入ringplus, 应该没有问题. n5机主又说可能是SIM卡的问题, n5只能用SIMGLW206R.
我看了下, e2用的是SIMGLW236C的SIM卡.
1. 如果确实是SIM卡兼容性的问题, n5要用... 阅读全帖
c*****9
发帖数: 2739
17
来自主题: CellularPlan版 - SWAP 大法, 回不来了。。。
SWAP 大法, 回不来了。。。
SWAP到了一个虚拟MEID,再想SWAP 回来, 总出错:
There was a problem swapping your device.
If this new device is currently active on any carrier, it must be
deactivated before swapping into your account.
L******d
发帖数: 2461
18
昨天刚swap过,用了一个临时IMEI把几个plan互相之间一顿swap, 似乎没有限制,刚
swap出来的,可以马上swap进去。其中有几次swap有出错提示,重试了几次就过了。
m****s
发帖数: 7397
19
来自主题: Automobile版 - car swap
If you have a 4WD or AWD car (wagon prefered)
Must be in excellent running condition.
would you be interested in swapping with a silver 2004 BMW 530i.
Both swap for usage, or ownership can be considered.
I am in NJ/NY/CT/PA area. Local swaps prefered, but i understand it's less
likely.
Southern swaps encouraged!
Flexible, negotiable.
O************[email protected]
k*z
发帖数: 4704
20
Sprint是完全解锁的,即使升级来的,测试手机为sprint 32g,升级拿来,又swap号码到旧的手机上。
Sprint Black 32g MD379LL/A,激活过,已经swap到了旧的blackberry,reset,放入联
通卡,完美激活。
verizon的又开了3个,全测试一下,只要是全款apple store无合同,无号码关联买的就能激活。
有待解决的问题:
Sprint升级来的,没有swap走,能不能用。
Verizon如果合法的swap走能不能激活。
n*****g
发帖数: 178
21
recursive的题我基本没怎么练过,基本只会BST中简单的查找之类的。我做得是网络方
面,感觉面试时候不太需要用到recursive。不过今天看到一面试题还是想弄明白其中
的recursive。想请教各位怎么理解?题目和解决方案如下:
Given a singly linked list, swap every two elements (e.g. a->b->c->d->e->f->
null should become b->a->d->c->f->e->null). Code it such that memory
position is swapped and not the node value.
linknode* swap (linknode* root)
{
if (root==NULL || root->next==NULL)
return root;
linknode* first, *second;
first = root;
if(first && first->next)
{
seco... 阅读全帖
p*****p
发帖数: 379
22
swap退栈的时候返回一组两个中的第二个,例如
1-2-3-4
1-2一组,3-4一组
a. swap(1)的时候执行到那行把2的next指向下个swap返回上来的node
b. 然后swap(3)被调用,返回node4,退栈
c. 4返回的时候又到a那步,2的next就拿到了4
然后继续走下去so on so forth
i***d
发帖数: 878
23
明天周六9点色迷迷ski swap滑雪设备交换市场
Presenting SAMMAMISH KIWANIS - Ski and Sport Swap Saturday, October 23rd
from 9:00 AM to 2:00 PM at Pine Lake Covenant Church's Gym at 1715 - 228th
Ave. S.E., Sammamish, WA 98075 (between Discovery Elementary & Skyline High
School in Sammamish). Pick up and cash out by 4:00 PM same day. There will
be two participating merchants as well – Pacific Bicycle Co & Gerk's Alpine
Hut.
For best results bring items in to sell or donate on Friday night, October
22nd from 5:30 PM –... 阅读全帖
b*****l
发帖数: 9499
24
来自主题: Linux版 - how big is your swap?
取决于你干啥吧。我的是 4G 的内存,64G 的 swap,做 swap。但是用的是 swap file
。原因是有一个 optimization 恰好需要比较大的 swap,但我们不常用到。
d****n
发帖数: 1637
25
Sorry being a noobie.
this should be what I was talking about.
the 1st version was wrong.
#######################################
#include
void swap(void **firstPtr, void **secondPtr)
{
void *temp = *firstPtr;
*firstPtr = *secondPtr;
*secondPtr = temp;
return;
}
int main()
{
int a = 10;
int b = 20;
int *aPtr = &a;
int *bPtr = &b;
printf("Before Swapping, Address : %x %x, Value : %d %d\n", aPtr, bPtr,
*
aPtr, *bPtr);
swap(&aPtr, &bPtr);
printf("After Swapping, Address : %x %x, Value : %... 阅读全帖
m*********a
发帖数: 3299
26
在MyClass & operator=(const MyClass & other)中
swap(other);//copy other
return *this;
在MyClass 做swap other
class MyClass{
void swap(MyClass &other){
std::swap(this->value,other.value);
}
}
b***k
发帖数: 2673
27
☆─────────────────────────────────────☆
xvgsfx (pains) 于 (Sun Jun 1 08:22:04 2008) 提到:
可能这个问题问的不好,我详细解释下啊
可以是很复杂的swap,比如range accrual swap,snoball swap
但是这里就说最简单的swap,比如IRS
问?
银行做了一笔IRS(付出固定),如何计算风险资产是增加了还是减少了?数量?
风险资产是根据Basell 2的说法,比如贷款是风险资产
非常感谢啊
☆─────────────────────────────────────☆
ryou (zzz) 于 (Sun Jun 1 12:23:07 2008) 提到:
for IRS, if you are ok with counter party, just treat it as long/short of
aaa rated fixed/floating debts.

☆─────────────────────────────────────☆
xvgsfx
b*****l
发帖数: 85
28
请问如果一个 fixed income 的 portfolio 含有一个一般的 bond的portfolio 和 一
个interest swap的portfolio。 已知 bond portfolio 的 market value and
duration, interest swap portfolio 的 market value,notional value和duration
也已知,这种情况怎么算 weighted average of total portfolio 的 duration? 对
于interest swap,如果也用market value 好像underestimate interest swap的
exposure。有人说用market value+notional value,直觉上觉得说不通,这样不就
double count 了吗?但那个说的人很firm,好像是industry standard一样。有人能给
讲讲吗? 先谢谢了!
w*******y
发帖数: 60932
29
There is already a post on the contest aspect of this deal in the Contest
section of SD, but in all honesty, the contest is the part of the deal that
most s aren't going to care about. So, ignore the contest part. Pretend it
doesn't exist.
Instead, focus on the fact that you can take any cheap, crappy smartphone
you can get your hands on and swap it for your choice of almost any new
Windows Phone (sole exception being the Nokia Lumia 800) at no cost.
NO CONTRACT IS REQUIRED.
How to get the deal:... 阅读全帖
w*******y
发帖数: 60932
30
On Wednesday, March 28, Fresh & Easy Neighborhood Market is holding a "Pink
Slime Swap Meat" at all its stores. Consumers can bring up two two pounds of
fresh or frozen ground beef from another retailer to any Fresh & Easy store
and exchange it for a package of fresh&easy (80/20) ground beef at no cost.
From the Fresh & Easy blog:
http://blog.freshandeasy.com/2012/03/pink-slime-swapmeat.html#!
#!/2012/03/pink-slime-swapmeat.html" rel="nofollow" target="_blank" onclick=
"_gaq.push(['_trackEvent',... 阅读全帖
l********y
发帖数: 1327
31
来自主题: JobHunting版 - 为啥这个swap不可以?
每次执行到*c1 = *c2的时候就出错,如果仅仅是swap两个char没问题,但是用C的char
数组时就不行,这里也没有牵涉到'\0'啊,不明白?
char * c = "abcde";
char * c1 = &c[0];
char * c2 = &c[4];
swap(c1,c2);
void swap(char * c1, char * c2){
char temp = *c1;
*c1 = *c2;
*c2 = temp;
}
c***2
发帖数: 838
32
来自主题: JobHunting版 - fancy swap?
In C, we can swap two items like this:
void swap(int *a,int *b)
{
int t = *a ;
*a = *b;
*b = t;
}
Sometimes in interviews, people may want a fancy swap like this:
void swap2(int *a,int *b)
{
*a=*a+*b;
*b=*a-*b;
*a=*a-*b;
}
Can anybody figure out what's wrong with swap2()?
z****p
发帖数: 18
33
I think backtou has already given the answer. Let me elaborate it:
-Naive approach: find the smallest element in the array, "swap" it to the
tail; then find the 2nd smallest element, "swap" it to the tail; ...
-Improvement, if the first K elements are already in an increasing order in
the original array, then in the naive approach, we can simply start with the
K+1-th smallest element
-So the minimal number of "swaps" is N-K, where K is the longest prefix of
the sorted array that are already in t... 阅读全帖
H**********5
发帖数: 2012
34
后天一个on site,
刷了3天的C语言,
遇到这个题,感觉很有趣,
写一个统一适用的swap:# define swap(x,y) /
{ void *_tmp=malloc(sizeof(x)); /
void *_x=&x; void *_y=&y; /
memcpy(tmp,_x,sizeof(x));/
memcpy(_x,_y,sizeof(y));/
memcpy(_y,_tmp,sizeof(x));}
这个表面上看上合理,
但一遇到含有指针元素的结构体,感觉就挂了吧,
请问有没有办法实现这种任何任意种类元素的swap,用C实现。
Y******u
发帖数: 1090
35
来自主题: Stock版 - The currency swap line starts working
Recent usage of the currency swap line (see attachment). Current usage is
about 2 Billion, an insignificant amount. But the trend is going up.
Libor-OIS spread seems is reaching 0.5%, which is current penalty rate.(
attachment 2)
"These central banks have agreed to lower the pricing on the existing
temporary U.S. dollar liquidity swap arrangements by 50 basis points so that
the new rate will be the U.S. dollar overnight index swap (OIS) rate plus
50 basis points."
Y****6
发帖数: 1235
36
来自主题: Utah版 - black diamond store sale, gear swap
Fall Gear Sale and Swap
The Black Diamond Store is located at 2092 East 3900 South in Salt Lake City
Sale: Friday through Sunday, October 17-19
Weekend Specials
*
All Alpine Touring and Telemark gear on sale
*
All Rock and Ice climbing gear on sale
*
All Outerwear and apparel on sale
Swap: Saturday, October 18, 8:00 am to noon
*
Sell off your old toys in the parking lot, then come inside for great
deals on new gear!
*
Swap begins at 8:00 am and e
a****t
发帖数: 720
37
来自主题: Linux版 - swap疑问
free -m的结果
total used free shared buffers cached
Mem: 3949 584 3364 0 168 219
-/+ buffers/cache: 197 3752
Swap: 0 0 0
很奇怪,为什么swap是0,明明放了1.5G做swap。
kernel是pae的亚,应该不会有限制了亚。
thanks
n******7
发帖数: 12463
38
【 以下文字转载自 Hardware 讨论区 】
发信人: nowhere7 (折腾), 信区: Hardware
标 题: SSD 上跑VM,虚拟硬盘和SWAP分区的问题
发信站: BBS 未名空间站 (Mon Jan 5 19:01:10 2015, 美东)
准备在windows下用vm跑linux
现在有两个问题网上看了半天也没搞明白
1. 我创建virtualBox虚拟硬盘的时候,是应该选择动态大小还是固定的?
动态大小可以节省空间,但是我担心会不会导致老是对一小块SSD读写?
2. SWAP分区要多大合适?我内存8G,linux不用起Xserver
感觉SWAP没有windows的page file方便,可以随时改大小,而且也不用在固定的磁盘区
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)