overflow

Stack Overflow works best with JavaScript enabled banner

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to mimic this site's Javascipt required banner, and have the below divs which are being hidden if javascript is allowed/enabled, but I am getting a flash/glimps of it on page load. <div id="Main_noJS">Craftystuff.com works best with JavaScript enabled</div> <div id="PartOfMain_noJS"><br /></div> CSS: #Main_noJS { width: 100%; height: 23px; font-family: Arial; font-size: 111%; color: White; font-weight: bold; background: #AE0000; text-align: center; padding-top: 4px; position: fixed; z-index: 100; } JavaScript: // hide the

Deal with overflow in exp using numpy

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Using numpy, I have this definition of a function: def powellBadlyScaled(X): f1 = 10**4 * X[0] * X[1] - 1 f2 = numpy.exp(-numpy.float(X[0])) + numpy.exp(-numpy.float(X[1])) - 1.0001 return f1 + f2 This function is evaluated a huge number of times on an optimization routine. It often raises exception: RuntimeWarning: overflow encountered in exp I understand that operand cannot be stored in allocated space for a float. But how can I overcome the problem? 回答1: You can use the bigfloat package. It supports arbitrary precision floating point

DIV background-image overflow

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a DIV element with a background-image, and I want it to overflow outside the dimensions of the DIV (it now cuts off the image because the image is bigger than the DIV). Is this possible? overflow:visible doesn't work! 回答1: You can do it in alternative way: #box { margin:-50px 0 0; padding:50px 0 0 0; background:url(/images/image.png) no-repeat; } 回答2: Put the background on a larger <div> that contains your <div> . 回答3: It is very possible with CSS3. I stumbled on this post while attempting this myself and discovered I could do it.

IE8 overflow:auto with max-height

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have an element which may contain very big amounts of data, but I don't want it to ruin the page layout, so I set max-height: 100px and overflow:auto , hoping for scrollbars to appear when the content does not fit. It all works fine in Firefox and IE7, but IE8 behaves as if overflow:hidden was present instead of overflow:auto . I tried overflow:scroll , still does not help, IE8 simply truncates the content without showing scrollbars. Changing max-height declaration to height makes overflow work OK, it's the combination of max

stringstream overflow at 4GB

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm having trouble getting beyond 4GB limitation for stringstream, even though it is running on a 64bit linux box with enough memory. The test code below (revised after reading your comments) core dump after 4GB. From the gdb trace, stringstream uses the default std::char_traits where int_type is set to 32bit int, rather than 64bit size_t. Any suggestion to work around? #include <stdint.h> #include <iostream> #include <sstream> #include <math.h> using namespace std ; int main ( int narg , char ** argv ) { string str ; stringstream

Is it possible to overflow an Oracle NUMBER type?

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm working with process scheduling software called Appworx. In it, each process and subprocess can have an arbitrary number of "conditions", which if true, some conditional action is taken. One of the possible conditional actions is a goto statement, where a plain integer is the label (each condition being numbered starting at 1). I'd like to use this feature to evaluate and run a few tasks in a loop, but you can only goto higher-numbered conditions (Don't ask me why... this seems to ruin most of the utility). I have reason to

Python RuntimeWarning: overflow encountered in long scalars

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to programming. In my latest Python 2.7 project I encountered the following: RuntimeWarning: overflow encountered in long_scalars Could someone please elaborate what this means and what I could do to fix that? The code runs through, but I'm not sure if it is a good idea to just ignore the warning. It happens during an append process like: SomeList.append(VeryLongFormula) 回答1: Here's an example which issues the same warning: import numpy as np np.seterr(all='warn') A = np.array([10]) a=A[-1] a**a yields RuntimeWarning: overflow

Keeping overflow:hidden really hidden

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: If I have a div with the style overflow: hidden; I found that there are times when keyboard actions can cause the div to scroll anyway. And since there are no scrollbars, there is really no way to make the div go back to its original state. Is anything I should do in addition to specifying the style to prevent this? For example when you select the L with the mouse (in the fiddle) and after that you press the down arrow key while holding down shift (i.e. expanding the selection). http://jsfiddle.net/PeeHaa/H34mM/ Or another scenario

android soundpool heapsize overflow

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get this error hundreds of times when I run in Debug, it doesn't seem to affect the program, but how do I get rid of it? I know it can be traced back to the SoundPool based on other posts 09-15 09:03:09.190: ERROR/AudioCache(34): Heap size overflow! req size: 1052672, max size: 1048576 回答1: SoundPool is hard code the buffer size as 1M for all loaded file. So you probably will get 'heap size overflow' error when you load too much files into SoundPool. I also have this issue on a game project that will load game sound FX into SoundPool and

IE 8 absolute positioned element outside its parent clipping problem

て烟熏妆下的殇ゞ 提交于 2019-12-03 08:53:50
问题 I have an absolute positioned div inside another absolute positioned div. The child div content is much bigger than the parent can contain. This is by design. I need the child div to spill out of its parent. It does so in every other browser except IE 8 (IE 7 looks OK, not sure) In IE8 the part of the child that is out of parent is clipped. It is there, but just not visible as can be verified by IE developer tools. I tried z-index, tried explicitly setting overflow:visible, no luck at all.