fixed

C# Unsafe/Fixed Code

Can someone give an example of a good time to actually use "unsafe" and "fixed" in C# code? I've played with it before, but never actually found a good use for it. Consider this code... fixed (byte* pSrc = src, pDst = dst) { //Code that copies the bytes in a loop } compared to simply using... Array.Copy(source, target, source.L...

Making a fixed tooltip vanish by scrolling.

I'm trying to create a messagebox that is fixed to the bottom of a webpage, so when a user scrolls, it stays put (simple css). However, I'd like the messagebox to disappear when the user scrolls to a certain point in the webpage. For example, if you have a signup form on the bottom of your site, I'd like to create a messagebox that rea...

What is the difference between Fixed and Unsafe.

Why are there 2 different ways lock memory in place in .NET? What is the difference between them? ...

Import a fixed width text into Excel 2003 using VB

Hello. I have a fixed width text file and I want to automatically import certain spaces in each line into specific cells of an Excel 2003 sheet. Can you help me? I will re-phrase my question because the previous one wasn't very clear. I need to read specific characters (i.e. 12-17, 23-29) and place them inside a excel sheet. Is this po...

How to implement a fixed-step loop?

I am attempting to create a fixed step loop in my program, but for some reason I just can't seem to get it to work properly. Basically what I need is a loop that does: while(!over) { Update(elapsedtime); Draw(elapsedtime); } or something similar, with a . I've tried using Thread.Sleep but I'm not so sure it gave me a real fixe...

What are the implications of using unsafe code

Aside from the fact that the code itself can access memory directly. What are the other implications of using the "/unsafe" compiler flag and the "fixed" keyword? Are there any knock on effects related to code signing and deployment of my .exe (my app is desktop only)? (This isn't about whether or not I should be doing this, the why is ...

fixed positioning in MobileSafari

Is it possible to position an element fixed relative to the viewport in MobileSafari? As many have noted, position: fixed doesn't work, but Gmail just came out with a solution that almost is what I want see the floating menu bar on the message view. Getting real-time scroll events in JavaScript would also be a reasonable solution. ...

force breaking a string in a fixed width Gridview cell

I have a Gridview control on an ASP.Net page with fixed width cells. The data coming from the database occasionally comes over as a contiguous string of characters. When there are dashes in the string, it will break so as not to upset the width of the layout. If there are no dashes (specifically, I'm dealing with underscores), the string...

Unclear behaviour of a fixed pointer outside of the fixed statement

Can someone explain me why the below C# code doesn't crash? Why does Visual Studio actually allow to compile it? My understanding is that I am getting a fixed pointer, but it is fixed only within the 'fixed' statement. When the pointer is returned from the 'Foo' function, the array 'ar' may be collected. I then force GC to actually do th...

Fixing a swing component's height within a Box layout

Good morning, I am making a GUI thanks to javax.swing.Box class Inside the panel: JLabel JTable with fixed height JLabel JTable with automatic height I tried everything to fix the first JTable height but without any success. I dedicate a Box.createHorizontalBox() for each component of the above rows and then I add them to the Box.cr...

IE 6 vs. position:fixed

Hello. position:fixed that doesn't work for Internet explorer 6. I can't really understand the fixes found on google. I need it to work in IE6, IE7, IE8 & FireFox 3.0. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" l...

Fixed keyboard inside a UIView

Is there a way to include a keyboard inside of a view? I want it to be part of the view and not be dismissed as well. Birdfeedapp does this in it's 'add account' modal view. ...

WPF ListBox fixed width

I have a ListBox in a PopupControl. Problem is that while scrolling, Popup resizes to fit the actual widest element. How to avoid this resizing and adjust automatically to the widest element in the whole list? I tried to put it in a Grid but without succes. ...

How to convert fixed byte/char[100] to managed char[] in C#?

What's the best way to convert a fixed byte or char[100] to a managed char[] in C#? I ended up having to use pointer arithmetic and I'm wondering if there is an easier way -- something like a memcpy or another way? using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text;...

IE7 and fixed divs problem

Background I need to do a rather complex layout for a client, using fixed DIV. Everything is fine in IE8, FF3 and Chrome, but IE7 mangles all the thing Edit: The fixed DIVs are a must, only the content DIV must scroll (That is the spec, sorry) HTML and CSS code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3...

CSS or JQuery Fixed sidebar in website layout

My website is setup with the content structure like this <body> <div id="header></div> <div id="contentwrapper"> <div id="content> ... </div> <div id="sidebar"> ... </div> </div> <div id="footer"></div> </body> I'm trying to make my website behave where sidebar stays in t...

Fixed - Liquid - Fixed Layout

I'd like to have a [Fixed][Liquid][Fixed] cross-browser compatible layout. HTML: body div#col-1 div#col-2 div#col-3 CSS: #col-1 { width:150px; float:left; } #col-2 { width:100%; padding:0 150x; } #col-3 { positon:absolute: right:0; width:150px; } Would this work/better way ...

Spread out elements over a fixed width div?

Hi Is there way to spread out elements, (eg: <li>'s inside a <ul>), within a div? EG: I have 3 elements, so they all get 30% EG: I have 5 elements, so they get 20% What is the best way to do this? ...

Page Scroll under position: fixed content

I have a top navigation area with position: fixed I'd like the page content to scroll normally, but not disappear under the navigation. The main issue is when I do a search, (this is a full CMS with hundreds of results in different modules) what I'm searching for sometimes gets scrolled under the navigation. I'm ok with it because I kno...

Position Fixed in CSS within a bounding box?

I have a comment box like so... <div id="comments"> ... </div> Now, inside this comments div I have another div called box... <div id="comments"> <div id="box"> ... </div> </div> The box div is position: fixed and it works mostly fine, but... What I would like is, instead of the box div "floating" above all the con...