Search Results

Search found 1784 results on 72 pages for 'depth'.

Page 45/72 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • opengl invert framebuffer pixels

    - by ToxIk
    I was wondering was the best way to invert the color pixels in the frame buffer is. I know it's possible to do with glReadPixels() and glDrawPixels() but the performance hit of those calls is pretty big. Basically, what I'm trying to do is have an inverted color cross-hair which is always visible no matter what's behind it. For instance, I'd have an arbitrary alpha mask bitmap or texture, have it render without depth test after the scene is drawn, and all the frame buffer pixels under the masked (full alpha) pixels of the texture would be inverted. I've been trying to do this with a texture, but I'm getting some strange results, also all the blending options I still find confusing.

    Read the article

  • .NET : Targeting the runtime

    - by contactmatt
    I'm starting to read in-depth on the .NET framework, and its Common Language Runtime. I'm reading a .NET overview by Microsoft and I'm not sure what is meant by this statement. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. How do you target the Common Language Runtime? I know its defaulted when developing in Visual Studio, but how would you specifically target the CLR? What code when developing a .NET application wouldn't target the CLR, and thereby be called unmanaged code?

    Read the article

  • Algorithm - Numbering for TOC (Table of Contents)

    - by belisarius
    I want to implement a VBA function to number Excel rows based upon the grouping depth of the row. But I think a general algorithm for generating TOCs is more interesting. The problem is: Given a list of "indented" lines such as One Two Three Four Five Six (the "indentation level" may be assumed to be known and part of the input data) To generate the following output: 1. One 1.1 Two 1.1.1 Three 1.1.1.1 Four 1.2 Five 2. Six Of course my code is up and running ... and also hidden under THWoS (The Heavy Weight of Shame)

    Read the article

  • #if 0 as a define

    - by valerio
    I need a way to define a FLAGS_IF macro (or equivalent) such that FLAGS_IF(expression) <block_of_code> FLAGS_ENDIF when compiling in debug (e.g. with a specific compiler switch) compiles to if (MyFunction(expression)) { <block_of_code> } whereas in release does not result in any instruction, just as it was like this #if 0 <block_of_code> #endif In my ignorance on the matter of c/c++ preprocessors i can't think of any naive way (since #define FLAGS_IF(x) #if 0 does not even compile) of doing this, can you help? I need a solution that: Does not get messed up if */ is present inside <block_of_code> Is sure to generate 0 instructions in release even inside inline functions at any depth (i guess this excludes if (false){<block_of_code>} right?) Is standard compliant if possible Thank you

    Read the article

  • Continuing education with Visual Basic 9

    - by TSSH
    I am completely new to programming and starting my education with visual basic 9 and SQL. I have read Visual Basic, in easy steps, 2nd edition by Mike Mcgrath. Although it was very easy to understand, it only gave me an introduction to learning VB. I'm looking for something more in depth, albeit for a beginner. I've read through the questions with a VB and book tag. Unfortunately, most of what I've found here references VB 6 and VB 8. Any recommendations? I cannot afford to create a library or college at the moment. So, I need to make sure that what I do buy counts. Thanks for any suggestions!

    Read the article

  • Visual Studio's CSS Intellisense - Absolute paths & MasterPage files

    - by Overflew
    Hi there. I've noticed that to get CSS-Intellisense working in VS, the paths have to be relative - Is this the case? However, it seems <link href="/resources/test.css" [...] /> is far more practical than <link href="resources/test.css" [...] /> I'm including the CSS in the master page, and don't see much good in including it as a content block, just to get the relative paths correct for each directory depth. I've had a quick try with inline code resolving the path, but no dice there either (for Intellisense). I feel I'm missing something fairly simple - What's the correct approach here to have CSS Intellisense work across the pages in the app during dev, and render fine in any deployed state? Cheers. (Note - I'm aware that a <% if (false) { % type hack is required for user controls)

    Read the article

  • Cannot Extend Django 1.2.1 Admin Template

    - by jcady
    I am attempting to override/extend the header for the Django admin in version 1.2.1. However when I try to extend the admin template and simply change what I need documented here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs-replacing-an-admin-template), I run into a recursion problem. I have an index.html file in my project's templates/admin/ directory that starts with {% extends "admin/index.html" %} But it seems that this is referencing the local index file (a.k.a. itself) rather than the default Django copy. I want to extend the default Django template and simply change a few blocks. When I try this file, I get a recursion depth error. How can I extend parts of the admin? Thanks.

    Read the article

  • Software-related but not programming-specific questions

    - by jayrdub
    I have often fought the urge to ask questions that I know aren't appropriate on SO, because I personally haven't come across another online group who's opinions I would trust as much. What sites do you frequent that you have found good participation from a smart group of people where you can ask questions that are related to software, but not programming problems? This community also has a vast depth of knowledge about things related to software like marketing, graphics/UI, running a small business, working in bad jobs, etc. that would greatly benefit everyone else. Where do we go to tap all that knowledge? On stackoverflow.uservoice.com there is a popular suggested feature to sanction, or add to SO, a place to hold discussions that aren't about specific programming questions. It seems that the suggestion has been denied in the past though.

    Read the article

  • OpenCV in Python can't scan through pixels

    - by Marco L.
    Hi everyone, I'm stuck with a problem of the python wrapper for OpenCv. I have this function that returns 1 if the number of black pixels is greater than treshold def checkBlackPixels( img, threshold ): width = img.width height = img.height nchannels = img.nChannels step = img.widthStep dimtot = width * height data = img.imageData black = 0 for i in range( 0, height ): for j in range( 0, width ): r = data[i*step + j*nchannels + 0] g = data[i*step + j*nchannels + 1] b = data[i*step + j*nchannels + 2] if r == 0 and g == 0 and b == 0: black = black + 1 if black >= threshold * dimtot: return 1 else: return 0 The loop (scan each pixel of a given image) works good when the input is an RGB image...but if the input is a single channel image I get this error: for j in range( width ): TypeError: Nested sequences should have 2 or 3 dimensions The input single channel image (called 'rg' in the next example) is taken from an RGB image called 'src' processed with cvSplit and then cvAbsDiff cvSplit( src, r, g, b, 'NULL' ) rg = cvCreateImage( cvGetSize(src), src.depth, 1 ) # R - G cvAbsDiff( r, g, rg ) I've also already noticed that the problem comes from the difference image got from cvSplit... Anyone can help me? Thank you

    Read the article

  • XSD NewDataSet Namespace?

    - by Ian
    I'm running XSD on an XML file and getting something strange. Depending on the depth of elements it produces a 'NewDataSet' element which will then is prefixed in Visual Studio to my auto-generated classes which is something I don't want. I've got quite a complex structure and am just trying to add a simple version element or attribute which is causing the problem. The simplest demo I could come up with is this. <A> <B>Text</B> </A> Running this through XSD says there is an element called 'NewDataSet' which may or may not appear and will prefix namespaces. <A> <B> <C>Text</C> </B> </A> This example works as expected and there is no magic 'NewDataSet' element in the generated XSD file.

    Read the article

  • Storing website hierarchy in Sql Server 2008

    - by Mika Kolari
    I want to store website page hierarchy in a table. What I would like to achieve is efficiently 1) resolve (last valid) item by path (e.g. "/blogs/programming/tags/asp.net,sql-server", "/blogs/programming/hello-world" ) 2) get ancestor items for breadcrump 3) edit an item without updating the whole tree of children, grand children etc. Because of the 3rd point I thought the table could be like ITEM id type slug title parentId 1 area blogs Blogs 2 blog programming Programming blog 1 3 tagsearch tags 2 4 post hello-world Hello World! 2 Could I use Sql Server's hierarchyid type somehow (especially point 1, "/blogs/programming/tags" is the last valid item)? Tree depth would usually be around 3-4. What would be the best way to achieve all this?

    Read the article

  • Convert PDF to PNG using ImageMagick

    - by StackOverflowNewbie
    using ImageMagick, what command should i use to convert a PDF to PNG? I need highest quality, smallest file size. this is what I have so far (very slow by the way): convert -density 300 -depth 8 -quality 85 a.pdf a.png Looking at what Gmail does when a user "view" a PDF, the quality is awesome and the file size very minimal. The DPI is just 96 (I have to set a density of 300 to get anything decent). Anyone know how GMail does it? Thanks.

    Read the article

  • Problem building a complete binary tree of height 'h' in Python

    - by Jack
    Here is my code. The complete binary tree has 2^k nodes at depth k. class Node: def __init__(self, data): # initializes the data members self.left = None self.right = None self.data = data root = Node(data_root) def create_complete_tree(): row = [root] for i in range(h): newrow = [] for node in row: left = Node(data1) right = Node(data2) node.left = left node.right = right newrow.append(left) newrow.append(right) row = copy.deepcopy(newrow) def traverse_tree(node): if node == None: return else: traverse_tree(node.left) print node.data traverse_tree(node.right) create_complete_tree() print 'Node traversal' traverse_tree(root) The tree traversal only gives the data of root and its children. What am I doing wrong?

    Read the article

  • Good Perlin noise resources/implementation?

    - by Chumpy
    Are there any good resources out there detailing Perlin noise generation? I understand that most languages have noise generating libraries available, but I'm interested in creating my own for fun/experience. I've already looked at this, which seems pretty popular, but it only gives an in-depth explanation of one dimensional noise. Google searches have been relatively unhelpful so far, as most of them focus on applications instead of how to create a generator. Books and/or websites are welcome, even if their focus is not the generation itself so long as it gives a thorough explanation of an implementation, or at least the concepts involved so I can "discover" my own.

    Read the article

  • What's the best general programming book to review basic development concepts?

    - by Charles S.
    I'm looking for for a programming book that reviews basic concepts like implementing linked lists, stacks, queues, hash tables, tree traversals, search algorithms, etc. etc. Basically, I'm looking for a review of everything I learned in college but have forgotten. I prefer something written in the last few years that includes at least a decent amount of code in object-oriented languages. This is to study for job interview questions but I already have the "solving interview questions" books. I'm looking for something with a little more depth and explanation. Any good recommendations?

    Read the article

  • 3d user experience with HTML5 and Javascript

    - by chako
    I've to build a 3D user experience with HTML5 and any required JS library which provides such functionality. 3D scene consists of a cylindrical pipe and surface. It has 360 degree rotation and can zoom in and out. As user selects a parameter, specific value of that parameter at various depth of pipe in surface should display. I've searched for HTML5 3d and JS libraries and found three.js could help for this.Also found this useful presentation on HTML 3d engine: http://projects.mariusgundersen.net/OnGameStart/#1 .But as this is my first time with HTML5 3d modeling, how should I initiate to build ? What parameters should be considered ? Which tools and libraries would best fit for such requirements ? I would like to create a 3d model using HTML5 and JS 3d engine as shown in the 1st image.

    Read the article

  • How to browse a Matrix returned by the OpenCV2.0 Canny() function ?

    - by user290613
    Hi all, I've been browsing the web to get an answer but no way to put my hand on it. I call the Canny function that fills me a matrix Canny(src, dst, 220, 299, 3 ); the dst variable is now a Matrix that is according to me of type CV_8UC1, 8bit, 1channel. Now I would like to browse this matrix according to rows and columns, so there was a trick that I've seen on stackoverflow dst.at<uchar*>(3, 5) In my case it crashes. (Assertion Failed, unknown function, cxmat.hpp line 450) My matrix information are myMatrix.width() = 181 myMatrix.height() = 65 One more thing, when I do std::cout << dst.depth() << std::endl; It always retrieves me 0 and not 8 (which I guess Im suppose to get) Thank you very much for all who will reply,

    Read the article

  • Lightweight PHP library alternative to common frameworks

    - by artarad
    Hi hi, I'm looking for a easy to learn php library to use for my coming web app project. I've recently finished a web app with fully handwritten raw php code and it's absolutely hard to be done again for another project. even though I have the recent project code snippets to be used again, but due to their non-structural arrangement (not object oriented), i have no passion to use 'em again. I have no experience with common frameworks like ZF, CakePhp, CodeIgniter, so I think to get my hands on a multipurpose OO library for my web app and the framework learning will be the next step! any suggestion? UPDATE: Many thanks guys, I have not enough time to get through the depth of every lib or framework you have kindly introduced. Since I'm going one step further I'm going to use ZF as famous framework which could provide me more job opportunities perhaps. thankssss :)

    Read the article

  • What are the rules for Javascript's automatic semicolon insertion?

    - by T.R.
    Well, first I should probably ask if this is browser dependent. I've read that if an invalid token is found, but the section of code is valid until that invalid token, a semicolon is inserted before the token if it is preceded by a line break. However, the common example cited for bugs caused by semicolon insertion is: return _a+b; which doesn't seem to follow this rule, since _a would be a valid token. On the other hand, breaking up call chains works as expected: $('#myButton') .click(function(){alert("Hello!")}); Does anyone have a more in-depth description of the rules?

    Read the article

  • Good articles to read on SSL and HTTPS?

    - by Igor Romanov
    I had a problem with accepting invalid SSL certificate in my iPhone program. That problem is solved now, however I came to understanding that I have very abstract idea on how exactly the whole thing is working: how web browser is verifying that received certificate is really for host it communicates to and not faked by same party in the middle? if browser talks to some 3rd party (CA?) to do certificate check? and many other questions... Would someone please recommend good source of information with in-depth enough description of how all parts click together?

    Read the article

  • Using GLOrtho to view Side, Front, Top perspectives of a 3D scene

    - by talldan
    Dear all, I'm building a game level editing app as part of a university project. In my application I have multiple viewports, a Perspective viewport and three orthographic views all setup to view the same scene. I've successfuly setup the orthographic views and can translate and scale them to mimic scrolling and zooming. Unfortunately, I'm having one problem - my scene still contains 3 dimensions, so objects viewed in orthographic mode of certain depths are clipped when they fall outside of my clipping volume. Most 3D authoring tools or level editors allow you to view all objects in orthographic mode regardless of depth. I guess what I need to do is scale my scene in the appropriate dimension so that all values lie between 1 and -1, is there a straightforward way of going about this? Or is there a different better approach. Thanks very much for your help, Dan

    Read the article

  • C/C++ Allegro program causes Windows 7 to switch to Aero Basic

    - by Matt H
    Hi SO, I'm just trying out the allegro library, and here is the code which I've got so far: #include <allegro.h> int main(int argc, char *argv[]) { allegro_init(); // initialize the allegro libraries install_keyboard(); // initialize keyboard functions set_color_depth(16); // set the color depth set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); // set up 640*480px window BITMAP *pic = NULL; pic = load_bitmap("C:/picture.bmp", NULL); // load the picture blit(pic, screen, 0, 0, 0, 0, 1000, 1000); readkey(); destroy_bitmap(pic); return 0; } END_OF_MAIN() It works fine, but when I run it, while the program's window is open, Windows 7 changes the theme from Aero to Aero basic. If you aren't sure what I mean, this pops up (I got this from Google, which is why it says Vista rather than Windows 7): 1) Why? 2) How can I ensure that this doesn't happen?

    Read the article

  • Which C# 4.0 Book would you purchase, and why?

    - by Jeremy
    I'm currently looking at purchasing a few C# 4.0 books, namely: Essential C# 4.0 by Mark Michaelis or C# 4.0 Unleashed by Bart De Smet. I am aware that both books are yet to be released, but would you consider purchasing either of these books, or would you recommend another? Thanks for your time. Clarification: I'm not a .net Ninja, but I do have 8+ years experience with the framework & related languages. So I'm generally looking for in-depth books. I also train/instruct the rest of my organisation generally 6 - 12 months after each .net release. Each of the developers I train has the same or more .net experience then myself. Once again thank you all for your time. Update: Thank you everyone for your responses. I've decided to purchase both books along with Visual C# 2010 Recipes: A Problem-Solution Approach, as suggested by Waleed Al Balooshi.

    Read the article

  • Show only Parent Forums on bbPress front page

    - by Cameron
    I want to show only the very top level forums on my front page. I have tried: <?php if ( bb_forums("depth=1") ) : ?> But that didn't work and all the forums still show up. I only want to show the very top level, so for example if I have the following forums: Main - Sub Forum 1 - Sub Forum 2 --- Sub Forum 2.1 --- Sub Forum 2.1 - Sub Forum 3 Community - Sub Forum 1 - Sub Forum 2 --- Sub Forum 2.1 --- Sub Forum 2.1 - Sub Forum 3 Only Main and Community would appear on the home page. I would seem I need to create a custom loop on the front page that will only show the very top level forums, but I need some help. Thanks.

    Read the article

  • RecursiveIterator: used to explode tree structure, or only flatten?

    - by Stephen J. Fuhry
    There are tons of examples of using the RecursiveIterator to flatten a tree structure.. but what about using it to explode a tree structure? Is there an elegant way to use this, or some other SPL library to recursively build a tree (read: turn a flat array into array of arbitrary depth) given a table like this: SELECT id, parent_id, name FROM my_tree EDIT: You know how you can do this with Directories? $it = new RecursiveDirectoryIterator("/var/www/images"); foreach(new RecursiveIteratorIterator($it) as $file) { echo $file . PHP_EOL; } .. What if you could do something like this: $it = new RecursiveParentChildIterator($result_array); foreach(new RecursiveIteratorIterator($it) as $group) { echo $group->name . PHP_EOL; echo implode(PHP_EOL, $group->getChildren()) . PHP_EOL . PHP_EOL; } :END EDIT

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >