Search Results

Search found 1261 results on 51 pages for 'mask'.

Page 28/51 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • iPhone cocos2d CCTMXTiledMap tile transitions

    - by Jeff Johnson
    I am using cocos2d on the iPhone and am wondering if it is possible to use a texture mask in order to create tile transitions / fringe layer. For example, a grass tile and a dirt tile, I would want a tile that had both grass and dirt in it... Has anyone done this, or is the only way to create one tile for every possible transition?

    Read the article

  • UIImage change raw pixels from white to clear?

    - by christo16
    I've tried some code from each of these questions: How to make one color transparent on a UIImage? How to mask a UIImage so that white becomes transparent on iphone? but have come up unsuccessful, unfortunately working with Core Graphics and images is not my strong suit. How would I go about accessing a UIImage's raw data and changing the white pixels to clear? Thanks!

    Read the article

  • Masking Domain URL with Sub domain URL

    - by Vijay Kumar
    Hai i'm having a subdomain (abc.example.in) but this is referred to mydomain/folder . the thing is i want the mask URL links and the masked url should be displayed following with sub domain can any one help me out . mydomain/folder/path to abc.example.in/path

    Read the article

  • HTML5 Video Stop onClose

    - by Rob
    I'm using jQuery tools for an overlay. Inside the overlay I have an HTML5 video. However, when I close the overlay, the video keeps playing. Any idea how I might get the video to stop when I close the overlay? Here's the code I have: $("img[rel]").overlay({ onClose: function() { //stop the video somehow }, mask: { color: '#000', opacity: 0.7 }}); I tried using $('video').pause(); But this paused the overlay as well.

    Read the article

  • MVC2 Routing + Ajax == ???

    - by Gnostus
    Im touching up an mvc2 application thats nearly complete, I have some ajax requests that end up looking alot like www.host.com/site/controller/action?UserName=asdf&UserPassword=asdfasdf&Email=asd%40df.com&PhoneNumber=541-345-5433&CompanyName="sdf" So my question is how (if possible) can I mask the ajax url on the redirect to simply be.. /controller/action, Im getting the feeling I broke pattern with my ajax and am stuck with nasty URLS. any mvc2 gurus out there willing to clarify?

    Read the article

  • Helicon ISAPI_REWRITE for masking folder

    - by Brian
    Hello, I would like to use the Helicon ISAPI_REWRITE module to rewrite a url: 123.45.67.89/folder to www.site.com I need to mask the IP/folder due to an IIS structure change. The reason why I don't want to get into, but it's valid based on the setup. Any help would be appreciated. Thanks.

    Read the article

  • What is difference between Thread Affinity and Process affinity ?

    - by DotNetBeginner
    What is difference between Thread Affinity and Process affinity ? If I have two Threads and I have duel core machine then is it possible to run these two threads parallely on the two cores ? If I use processor affinity Mask then I can control execution of a process on the cores but when I have to run threads on a particular core how can I make these threads core specific ? A very simple example will be appreciated.

    Read the article

  • UITableView less than full screen from code?

    - by Gerry
    I have a number of views that use UITableView. (I use UIViewController and implement UITableViewDelegate and UITableViewDataSource interfaces.) I'm having trouble creating a tableview that leaves room at the top for a toolbar. How to I size and layout the Tableview so that it is less than full screen? Is this an AutoResizing mask problem? Thanks, Gerry

    Read the article

  • Cocoa XML reader app

    - by Miskia
    Hello, I'm a newbie to Cocoa, just develop some little apps with C/C++ on Windows. I want to make a "simple" app on Cocoa. When the user specific XML file, the file nodes are represented "enduser viewable". I made an interface with some NSTextField. I made a subclass of NSDocument called "XMLFile" so i got "XMLFile.h" and "XMLFile.m" in my Xcode project. In the plist of my app i setup a new "Document Types": XML File - extensions: xml - role: view - class: XMLFile - store type: XML Here is my "XMLFile.h": #import <Cocoa/Cocoa.h> @interface FichierXML : NSDocument { } IBOutlet NSTextField *dateField; IBOutlet NSTextField *titleField; IBOutlet NSTextField *descField; IBOutlet NSTextField *vidfileField; IBOutlet NSTextField *imgfileField; IBOutlet NSObjectController *object; NSUInteger *mask; @end And here is my "XMLFile.m": #import "XMLFile.h" @implementation XMLFile - (BOOL)readFromData:(NSData *)datafile ofType:(NSString *)typeName error:(NSError **)outerror { NSMutableArray* ReportCreationDate = [[NSMutableArray alloc] initWithCapacity:10]; NSMutableArray* ReportTitle = [[NSMutableArray alloc] initWithCapacity:10]; NSMutableArray* ReportDescription = [[NSMutableArray alloc] initWithCapacity:10]; NSMutableArray* VideoPath = [[NSMutableArray alloc] initWithCapacity:10]; NSMutableArray* VideoThumbnailImageName = [[NSMutableArray alloc] initWithCapacity:10]; NSXMLDocument* doc = [[NSXMLDocument alloc] initWithData:datafile options:mask error:outerror]; NSXMLElement* root = [doc rootElement]; NSArray* dateElement = [root nodesForXPath:@"//Report/ReportCreationDate" error:nil]; for(NSXMLElement* xmlElement in dateElement) [dateElement setStringValue:[xmlElement stringValue]]; NSArray* titleElement = [root nodesForXPath:@"//Report/ReportTitle" error:nil]; for(NSXMLElement* xmlElement in titleElement) [titleField setStringValue:[xmlElement stringValue]]; NSArray* descElement = [root nodesForXPath:@"//Report/ReportDescription" error:nil]; for(NSXMLElement* xmlElement in descElement) [descField setStringValue:[xmlElement stringValue]]; NSArray* vidfileElement = [root nodesForXPath:@"//Report/Videos/Video/VideoPath" error:nil]; for(NSXMLElement* xmlElement in vidfileElement) [vidfileField setStringValue:[xmlElement stringValue]]; NSArray* imgfileElement = [root nodesForXPath:@"//Report/Videos/Video/VideoThumbnailImageName" error:nil]; for(NSXMLElement* xmlElement in imgfileElement) [imgfileField setStringValue:[xmlElement stringValue]]; [doc release]; [ReportCreationDate release]; [ReportTitle release]; [ReportDescription release]; [VideoPath release]; [VideoThumbnailImageName release]; return YES; } @end So. The user open the XMLFile, and XMLDocument analyse the file to extract nodes' data and send it to the differents NSTextField... But it doesn't work :( If someone can help me... I'm a newbie so don't be too rude if I made big mistakes :) Miskia.

    Read the article

  • C# - calling ext. DLL function containing Delphi "variant record" parameter

    - by CaldonCZE
    Hello, In external (Delphi-created) DLL I've got the following function that I need to call from C# application. function ReadMsg(handle: longword; var Msg: TRxMsg): longword; stdcall; external 'MyDll.dll' name 'ReadMsg'; The "TRxMsg" type is variant record, defined as follows: TRxMsg = record case TypeMsg: byte of 1: (accept, mask: longword); 2: (SN: string[6]); 3: (rx_rate, tx_rate: word); 4: (rx_status, tx_status, ctl0, ctl1, rflg: byte); end; In order to call the function from C#, I declared auxiliary structure "my9Bytes" containing array of bytes and defined that it should be marshalled as 9 bytes long array (which is exactly the size of the Delphi record). private struct my9Bytes { [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 9)] public byte[] data; } Then I declared the imported "ReadMsg" function, using the "my9bytes" struct. [DllImport("MyDll.dll")] private static extern uint ReadMsg(uint handle, ref my9Bytes myMsg); I can call the function with no problem... Then I need to create structure corresponding to the original "TRxMsg" variant record and convert my auxiliary "myMsg" array into this structure. I don't know any C# equivalent of Delphi variant array, so I used inheritance and created the following classes. public abstract class TRxMsg { public byte typeMsg; } public class TRxMsgAcceptMask:TRxMsg { public uint accept, mask; //... } public class TRxMsgSN:TRxMsg { public string SN; //... } public class TRxMsgMRate:TRxMsg { public ushort rx_rate, tx_rate; //... } public class TRxMsgStatus:TRxMsg { public byte rx_status, tx_status, ctl0, ctl1, rflg; //... } Finally I create the appropriate object and initialize it with values manually converted from "myMsg" array (I used BitConverter for this). This does work fine, this solution seems to me a little too complicated, and that it should be possible to do this somehow more directly, without the auxiliary "my9bytes" structures or the inheritance and manual converting of individual values. So I'd like to ask you for a suggestions for the best way to do this. Thanks a lot!

    Read the article

  • Help me understand this C code

    - by Benjamin
    INT GetTree (HWND hWnd, HTREEITEM hItem, HKEY *pRoot, TCHAR *pszKey, INT nMax) { TV_ITEM tvi; TCHAR szName[256]; HTREEITEM hParent; HWND hwndTV = GetDlgItem (hWnd, ID_TREEV); memset (&tvi, 0, sizeof (tvi)); hParent = TreeView_GetParent (hwndTV, hItem); if (hParent) { // Get the parent of the parent of the... GetTree (hWnd, hParent, pRoot, pszKey, nMax); // Get the name of the item. tvi.mask = TVIF_TEXT; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); TreeView_GetItem (hwndTV, &tvi); //send the TVM_GETITEM message? lstrcat (pszKey, TEXT ("\\")); lstrcat (pszKey, szName); } else { *pszKey = TEXT ('\0'); szName[0] = TEXT ('\0'); // Get the name of the item. tvi.mask = TVIF_TEXT | TVIF_PARAM; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); if (TreeView_GetItem (hwndTV, &tvi)) //*pRoot = (HTREEITEM)tvi.lParam; //original hItem = (HTREEITEM)tvi.lParam; else { INT rc = GetLastError(); } } return 0; } The block of code that begins with the comment "Get the name of the item" does not make sense to me. If you are getting the listview item why does the code set the parameters of the item being retrieved? If you already had the values there would be no need to retrieve them. Secondly near the comment "original" is the original line of code which will compile with a warning under embedded visual c++ 4.0, but if you copy the exact same code into visual studio 2008 it will not compile. Since I did not write any of this code, and am trying to learn, is it possible the original author made a mistake on this line? The *pRoot should point to HKEY type yet he is casting to an HTREEITEM type which should never work since the data types don't match?

    Read the article

  • Why do I get rows of zeros in my 2D fft?

    - by Nicholas Pringle
    I am trying to replicate the results from a paper. "Two-dimensional Fourier Transform (2D-FT) in space and time along sections of constant latitude (east-west) and longitude (north-south) were used to characterize the spectrum of the simulated flux variability south of 40degS." - Lenton et al(2006) The figures published show "the log of the variance of the 2D-FT". I have tried to create an array consisting of the seasonal cycle of similar data as well as the noise. I have defined the noise as the original array minus the signal array. Here is the code that I used to plot the 2D-FT of the signal array averaged in latitude: import numpy as np from numpy import ma from matplotlib import pyplot as plt from Scientific.IO.NetCDF import NetCDFFile ### input directory indir = '/home/nicholas/data/' ### get the flux data which is in ### [time(5day ave for 10 years),latitude,longitude] nc = NetCDFFile(indir + 'CFLX_2000_2009.nc','r') cflux_southern_ocean = nc.variables['Cflx'][:,10:50,:] cflux_southern_ocean = ma.masked_values(cflux_southern_ocean,1e+20) # mask land nc.close() cflux = cflux_southern_ocean*1e08 # change units of data from mmol/m^2/s ### create an array that consists of the seasonal signal fro each pixel year_stack = np.split(cflux, 10, axis=0) year_stack = np.array(year_stack) signal_array = np.tile(np.mean(year_stack, axis=0), (10, 1, 1)) signal_array = ma.masked_where(signal_array > 1e20, signal_array) # need to mask ### average the array over latitude(or longitude) signal_time_lon = ma.mean(signal_array, axis=1) ### do a 2D Fourier Transform of the time/space image ft = np.fft.fft2(signal_time_lon) mgft = np.abs(ft) ps = mgft**2 log_ps = np.log(mgft) log_mgft= np.log(mgft) Every second row of the ft consists completely of zeros. Why is this? Would it be acceptable to add a randomly small number to the signal to avoid this. signal_time_lon = signal_time_lon + np.random.randint(0,9,size=(730, 182))*1e-05 EDIT: Adding images and clarify meaning The output of rfft2 still appears to be a complex array. Using fftshift shifts the edges of the image to the centre; I still have a power spectrum regardless. I expect that the reason that I get rows of zeros is that I have re-created the timeseries for each pixel. The ft[0, 0] pixel contains the mean of the signal. So the ft[1, 0] corresponds to a sinusoid with one cycle over the entire signal in the rows of the starting image. Here are is the starting image using following code: plt.pcolormesh(signal_time_lon); plt.colorbar(); plt.axis('tight') Here is result using following code: ft = np.fft.rfft2(signal_time_lon) mgft = np.abs(ft) ps = mgft**2 log_ps = np.log1p(mgft) plt.pcolormesh(log_ps); plt.colorbar(); plt.axis('tight') It may not be clear in the image but it is only every second row that contains completely zeros. Every tenth pixel (log_ps[10, 0]) is a high value. The other pixels (log_ps[2, 0], log_ps[4, 0] etc) have very low values.

    Read the article

  • Calculate broadcast address given IP address and subnet in PowerShell

    - by halr9000
    My goal is to calculate the broadcast address when given the IP and subnet mask of a host node. I know, sounds like homework. Once I reasoned through my task and boiled it down to this, I was amused with myself. Anyway, the solution will look something like the one in this question I suppose, but I'm not a math major and my C sucks. I could do with a PowerShell (preferred) or C# example to get me going. thanks!

    Read the article

  • XML - how to use namespace prefixes

    - by Asbie
    I have this XML at http://localhost/file.xml: <?xml version="1.0" encoding="utf-8"?> <val:Root xmlns:val="http://www.hw-group.com/XMLSchema/ste/values.xsd"> <Agent> <Version>2.0.3</Version> <XmlVer>1.01</XmlVer> <DeviceName>HWg-STE</DeviceName> <Model>33</Model> <vendor_id>0</vendor_id> <MAC>00:0A:DA:01:DA:DA</MAC> <IP>192.168.1.1</IP> <MASK>255.255.255.0</MASK> <sys_name>HWg-STE</sys_name> <sys_location/> <sys_contact> HWg-STE:For more information try http://www.hw-group.com </sys_contact> </Agent> <SenSet> <Entry> <ID>215</ID> <Name>Home</Name> <Units>C</Units> <Value>27.7</Value> <Min>10.0</Min> <Max>40.0</Max> <Hyst>0.0</Hyst> <EmailSMS>1</EmailSMS> <State>1</State> </Entry> </SenSet> </val:Root> I am trying to read this from my c# code: static void Main(string[] args) { var xmlDoc = new XmlDocument(); xmlDoc.Load("http://localhost/file.xml"); XmlElement root = xmlDoc.DocumentElement; // Create an XmlNamespaceManager to resolve the default namespace. XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable); nsmgr.AddNamespace("val", "http://www.hw-group.com/XMLSchema/ste/values.xsd"); XmlNodeList nodes = root.SelectNodes("/val:SenSet/val:Entry"); foreach (XmlNode node in nodes) { string name = node["Name"].InnerText; string value = node["Value"].InnerText; Console.Write("name\t{0}\value\t{1}", name, value); } Console.ReadKey(); } } Problem is that the node is empty. I understand this is a common newbie problem when reading XML, still not able to solve what I am doing wrong, probably something with the Namespace "val" ?

    Read the article

  • Getting a borderless window to receive mouseMoved events (Cocoa OSX)

    - by Michael Minerva
    I have a little popup window used for selecting images sorted by groups, and I would like to add a selection box around whatever image is being hovered over. I am trying to this by overriding the mouseMoved event for the window but it seems that a window that has a border-less style mask receives no mouseMoved events even if you have set setAcceptsMouseMoved events to YES. Is there anyway to make a borderless window receive this events?

    Read the article

  • How to recreate the UITabBarItem image filter?

    - by boliva
    Hi, I'm writing a custom UITabBar replacement, and I would like to know how to recreate the filter that the built-in implementation does with the UITabBarItem image - that blue shining on selected tabs and gray gradient on unselected ones. I guess it's a matter of using the source image alpha value as a mask and overlay it with a pre-made blue (or whatever color) shining image and another one grayed out, but I would like to know what is the best approach from a code point of view. Best,

    Read the article

  • How to paints a transparent circle like using CGContextClearRect to draw a transparent rectangle

    - by user177946
    Hello All, Do anyone know how I can draw a transparent circle on a CALayer just like using CGContextClearRect to draw a transparent rectangle? My requirements is that I need to draw a mask on a picture, in some cases, I need to erase it, but CGContextClearRect only allow to draw a rectangle, I wonder if there is another way to do the same thing and draw a tranparent circle. Regards, Anto

    Read the article

  • Round bottom corners on Android Bitmap?

    - by alex
    Hey all, what would be best practice for clipping the bottom borders of a Bitmap? Just manipulate the Bitmap itself or overlay an alpha mask drawable or ...? The whole story: I've a Listview which looks like the iPhone's grouped UITableView style. I would like to display a Bitmap in the last row, but for now the Bitmap overlaps my custom background drawable of the Listview cell. Thx in advance!

    Read the article

  • 7zip compressing the same file slightly different results

    - by MicMit
    I am using 7za command line File dfat_clist.xls in directory 2010_05_07 The same dfat_clist.xls in directory 2010_05_08 Zips are created in the same directory where the xls files resides string pars = "a -tzip \"" + Path.Combine( SourceDir,ZipName) + "\" \"" + Path.Combine( SourceDir, Mask ) + "\"" ; Parameters given to 7za are full paths for zip and xls. For some reason a couple of bytes are different A7 and A8 values for directories 2010_05_07 and 2010_05_8 respectively. How to achieve identical results and out of curiosity what causes this problem.

    Read the article

  • masked the pasword input to UITexfield

    - by user262325
    Hello everyone I hope to mask the text input to UITextFiled as: "ABCDE" to "*****" below are my codes without function - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { int l=[textField.text length]; range=NSMakeRange(1, l ); string=[[[NSString alloc]initWithString:@"*"] autorelease]; return YES; } Welcome any comment Thanks interdev

    Read the article

  • Get a random subset from a set in F#

    - by Cay
    I am trying to think of an elegant way of getting a random subset from a set in F# Any thoughts on this? Perhaps this would work: say we have a set of 2x elements and we need to pick a subset of y elements. Then if we could generate an x sized bit random number that contains exactly y 2n powers we effectively have a random mask with y holes in it. We could keep generating new random numbers until we get the first one satisfying this constraint but is there a better way?

    Read the article

  • How can I set opacity of the reflection when using -webkit-box-reflect?

    - by Mike Palmer
    I've been playing with the -webkit-box-reflect property in Chrome and can achieve a reflection that fades with the following code (it's example code from the Webkit blog): -webkit-box-reflect: below 5px -webkit-gradient( linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white) ); Problem is, I want to set the opacity for the mask to a more subtle setting, but it seems to be choking on rgba(). Has anybody been able to successfully get different levels of opacity? Any help is appreciated, thanks!

    Read the article

  • Any thoughts on how to create a true 'punch-out' area in a Sprite?

    - by rhtx
    I've been working on this for awhile, now. You might also call it a 'reverse mask', or an 'inverse mask'. Basically, I'm creating a view window within a display object. I need to allow objects on the stage that are under the window to be able to interact with the mouse. This is similar to a WPF question: http://stackoverflow.com/questions/740994/use-wpf-object-to-punch-hole-in-another, which has a much shorter write-up. I've got a Class called PunchOutShield, which creates a Sprite that covers the stage (or over some desired area). The Sprite's Graphics object is filled using the color and transparency of Flex's modal screen. The result is a screen that looks like the screen which appears behind a modal PopUp. PunchOutShield has a method called punch, which takes two arguments - the first is a Shape object, which defines the shape of the punch-through area; the second is a Point object, which indicates where to position the punch-through area. It took some experimenting, but I found that I can successfully create a punch-out area (i.e. - the modal screen does not display within the bounds of the given Shape). To do this, I set cacheAsBitmap to true on the Sprite that is used to create the modal screen, and also on the Shape object, which is added to the modal screen Sprite's displayList. If I set the blend mode of the Shape to ERASE, a completely transparent area is created in the modal screen. So far, great. The problem is that Shape does not subclass InteractiveObject, so there is no way to set mouseEnabled = false on it. And so, it prevents interaction between the mouse and any objects that are visible through the punch-out area. On top of that, InteractiveObject isn't available to look at, so I can't see if there is a way to borrow what it's doing to provide the mouseEnabled functionality and apply it to a subclass of Shape. I've tried using another Sprite object, rather than a Shape object, but the blending doesn't work out correctly. I'm not sure why there is a difference, but the Shape object seems to somehow combine with the parenting Sprite, allowing the ERASE blendMode to effect the desired punch-out visual appearance. It wouldn't be the end of the world if I had to draw up the screen with a series of rectangles so that the punch-out area was just simply not drawn, but that approach won't work if the punch-out area is complex. Or round. Any thoughts on this approach, or on an alternative approach?

    Read the article

  • Can someone who understands C code help me understand this code?

    - by Benjamin
    INT GetTree (HWND hWnd, HTREEITEM hItem, HKEY *pRoot, TCHAR *pszKey, INT nMax) { TV_ITEM tvi; TCHAR szName[256]; HTREEITEM hParent; HWND hwndTV = GetDlgItem (hWnd, ID_TREEV); memset (&tvi, 0, sizeof (tvi)); hParent = TreeView_GetParent (hwndTV, hItem); if (hParent) { // Get the parent of the parent of the... GetTree (hWnd, hParent, pRoot, pszKey, nMax); // Get the name of the item. tvi.mask = TVIF_TEXT; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); TreeView_GetItem (hwndTV, &tvi); //send the TVM_GETITEM message? lstrcat (pszKey, TEXT ("\\")); lstrcat (pszKey, szName); } else { *pszKey = TEXT ('\0'); szName[0] = TEXT ('\0'); // Get the name of the item. tvi.mask = TVIF_TEXT | TVIF_PARAM; tvi.hItem = hItem; tvi.pszText = szName; tvi.cchTextMax = dim(szName); if (TreeView_GetItem (hwndTV, &tvi)) //*pRoot = (HTREEITEM)tvi.lParam; //original hItem = (HTREEITEM)tvi.lParam; else { INT rc = GetLastError(); } } return 0; } The block of code that begins with the comment "Get the name of the item" does not make sense to me. If you are getting the listview item why does the code set the parameters of the item being retrieved, because if you already had the values there would be no need to retrieve them. Secondly near the comment "original" is the original line of code which will compile with a varning under embedded visual c++, but if you copy the exact same code into visual studio 2008 it will not compile. Since I did not write any of this code and am trying to learn is it possible the original author made a mistake on this line, since the *pRoot should point to and HKEY type yet he is casting to an HTREEITEM type which should never work since the data types don't match? (Side note someone with a better reputation should add a windows ce tag to SO since windows mobile is not the same as windows ce.)

    Read the article

  • Are there any platforms where using structure copy on an fd_set (for select() or pselect()) causes p

    - by Jonathan Leffler
    The select() and pselect() system calls modify their arguments (the 'struct fd_set *' arguments), so the input value tells the system which file descriptors to check and the return values tell the programmer which file descriptors are currently usable. If you are going to call them repeatedly for the same set of file descriptors, you need to ensure that you have a fresh copy of the descriptors for each call. The obvious way to do that is to use a structure copy: struct fd_set ref_set_rd; struct fd_set ref_set_wr; struct fd_set ref_set_er; ... ...code to set the reference fd_set_xx values... ... while (!done) { struct fd_set act_set_rd = ref_set_rd; struct fd_set act_set_wr = ref_set_wr; struct fd_set act_set_er = ref_set_er; int bits_set = select(max_fd, &act_set_rd, &act_set_wr, &act_set_er, &timeout); if (bits_set > 0) { ...process the output values of act_set_xx... } } My question: Are there any platforms where it is not safe to do a structure copy of the struct fd_set values as shown? I'm concerned lest there be hidden memory allocation or anything unexpected like that. (There are macros/functions FD_SET(), FD_CLR(), FD_ZERO() and FD_ISSET() to mask the internals from the application.) I can see that MacOS X (Darwin) is safe; other BSD-based systems are likely to be safe, therefore. You can help by documenting other systems that you know are safe in your answers. (I do have minor concerns about how well the struct fd_set would work with more than 8192 open file descriptors - the default maximum number of open files is only 256, but the maximum number is 'unlimited'. Also, since the structures are 1 KB, the copying code is not dreadfully efficient, but then running through a list of file descriptors to recreate the input mask on each cycle is not necessarily efficient either. Maybe you can't do select() when you have that many file descriptors open, though that is when you are most likely to need the functionality.) There's a related SO question - asking about 'poll() vs select()' which addresses a different set of issues from this question.

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >