Search Results

Search found 1032 results on 42 pages for 'jon ramvi'.

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

  • In Python, how to use a C++ function which returns an allocated array of structs via a ** parameter?

    - by Jon-Eric
    I'd like to use some existing C++ code, NvTriStrip, in a Python tool. SWIG easily handles the functions with simple parameters, but the main function, GenerateStrips, is much more complicated. What do I need to put in the SWIG interface file to indicate that primGroups is really an output parameter and that it must be cleaned up with delete[]? /////////////////////////////////////////////////////////////////////////// // GenerateStrips() // // in_indices: input index list, the indices you would use to render // in_numIndices: number of entries in in_indices // primGroups: array of optimized/stripified PrimitiveGroups // numGroups: number of groups returned // // Be sure to call delete[] on the returned primGroups to avoid leaking mem // bool GenerateStrips( const unsigned short* in_indices, const unsigned int in_numIndices, PrimitiveGroup** primGroups, unsigned short* numGroups, bool validateEnabled = false ); FYI, here is the PrimitiveGroup declaration: enum PrimType { PT_LIST, PT_STRIP, PT_FAN }; struct PrimitiveGroup { PrimType type; unsigned int numIndices; unsigned short* indices; PrimitiveGroup() : type(PT_STRIP), numIndices(0), indices(NULL) {} ~PrimitiveGroup() { if(indices) delete[] indices; indices = NULL; } };

    Read the article

  • Has anyone used an object database with a large amount of data?

    - by Jon Kruger
    Object databases like MongoDB and db4o are getting lots of pub lately. Everyone that plays with them seems to love it. I'm guessing that they are dealing with about 640K of data in their sample apps. Has anyone tried to use an object database with a large amount of data (say, 50GB or more)? Are you able to still execute complex queries against it (like from a search screen)? How does it compare to your usual relational database of choice? I'm just curious. I want to take the object database plunge, but I need to know if it'll work on something more than a sample app.

    Read the article

  • AspectJ join point with simple types

    - by Jon
    Hi! Are there defined join points in arithmetics that I can catch? Something like: int a = 4; int b = 2; int c = a + b; Can I make a pointcut that catches any one of those lines? And what context will I be able to get? I would like to add a before() to all int/float/double manipulation done in a particular method on a class, is that possible. I see in the AspectJ docs that there are defined join points for object initialization and method calls. Is declaring an int an object initialization and does the + operator count as a method call? Thanks!

    Read the article

  • Eliminating cyclic flows from a graph

    - by Jon Harrop
    I have a directed graph with flow volumes along edges and I would like to simplify it by removing all cyclic flows. This can be done by finding the minimum of the flow volumes along each edge in any given cycle and reducing the flows of every edge in the cycle by that minimum volume, deleting edges with zero flow. When all cyclic flows have been removed the graph will be acyclic. For example, if I have a graph with vertices A, B and C with flows of 1 from A?B, 2 from B?C and 3 from C?A then I can rewrite this with no flow from A?B, 1 from B?C and 2 from C?A. The number of edges in the graph has reduced from 3 to 2 and the resulting graph is acyclic. Which algorithm(s), if any, solve this problem?

    Read the article

  • How to use Spanish characters in Handlebars templates

    - by Jon Rose
    I am wondering what the idiomatic way to render special language characters is using Handlebars.js templates. When I render the normal html I can use something like the Spanish lowercase e, &#233, and it renders as expected. When I pass the same text as a string to my Handlebars template I just see the characters &#233. I have tried creating a Handlebars helper that used jquery to render the text using .html() then returning the .html() of the tmp element and I get the same results.

    Read the article

  • Is there a way to load an icon from a memory file handler?

    - by Jon Trauntvein
    I am writing wxWidgets application where I am importing the .ICO file as a header. I am attempting to use a wxMemoryFSHandler to make this icon (and others as well) accessible as files. I am using the following code to do this: wxFileSystem::AddHandler(new wxMemoryFSHandler); wxMemoryFSHandler::AddFileWithMimeType( "app_inactive.ico", CsiWebAdmin_ico, sizeof(CsiWebAdmin_ico), "image/vnd.microsoft.icon"); Unfortunately, if I try to load an icon from this "file" as shown below, it does not work. As I stepped through the MSW source (wx 2.8.10), I can see that the loader never attempted to resolve the virtual file name. wxIcon icon("memory:app_inactive.ico"); I have also tried the following: wxIcon icon(wxIconLocation("memory:app_inactive.ico")); and have encountered the same results. I realise that I can use resources to load these files but I would still face the same dilemma when the time came to port my application to GTK. Is there something obvious that I am missing?

    Read the article

  • Recursively created linked lists with a class, C++

    - by Jon Brant
    I'm using C++ to recursively make a hexagonal grid (using a multiply linked list style). I've got it set up to create neighboring tiles easily, but because I'm doing it recursively, I can only really create all 6 neighbors for a given tile. Obviously, this is causing duplicate tiles to be created and I'm trying to get rid of them in some way. Because I'm using a class, checking for null pointers doesn't seem to work. It's either failing to convert from my Tile class to and int, or somehow converting it but not doing it properly. I'm explicitly setting all pointers to NULL upon creation, and when I check to see if it still is, it says it's not even though I never touched it since initialization. Is there a specific way I'm supposed to do this? I can't even traverse the grid without NULLs of some kind Here's some of my relevant code. Yes, I know it's embarassing. Tile class header: class Tile { public: Tile(void); Tile(char *Filename); ~Tile(void); void show(void); bool LoadGLTextures(); void makeDisplayList(); void BindTexture(); void setFilename(char *newName); char Filename[100]; GLuint texture[2]; GLuint displayList; Tile *neighbor[6]; float xPos, yPos,zPos; };` Tile Initialization: Tile::Tile(void) { xPos=0.0f; yPos=0.0f; zPos=0.0f; glEnable(GL_DEPTH_TEST); strcpy(Filename, strcpy(Filename, "Data/BlueTile.bmp")); if(!BuildTexture(Filename, texture[0]))MessageBox(NULL,"Texture failed to load!","Crap!",MB_OK|MB_ICONASTERISK); for(int x=0;x<6;x++) { neighbor[x]=NULL; } } Creation of neighboring tiles: void MakeNeighbors(Tile *InputTile, int stacks) { for(int x=0;x<6;x++) { InputTile->neighbor[x]=new Tile();InputTile->neighbor[x]->xPos=0.0f;InputTile->neighbor[x]->yPos=0.0f;InputTile->zPos=float(stacks); } if(stacks) { for(int x=0;x<6;x++)MakeNeighbors(InputTile->neighbor[x],stacks-1); } } And finally, traversing the grid: void TraverseGrid(Tile *inputTile) { Tile *temp; for(int x=0;x<6;x++) if(inputTile->neighbor[x]) { temp=inputTile->neighbor[x]; temp->xPos=0.0f; TraverseGrid(temp); //MessageBox(NULL,"Not Null!","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION); } } The key line is "if(inputTile-neighbor[x])" and whether I make it "if(inputTile-neighbor[x]==NULL)" or whatever I do, it just isn't handling it properly. Oh and I'm also aware that I haven't set up the list fully. It's only one direction now.

    Read the article

  • Can someone confirm how Microsoft Excel 2007 internally represents numbers?

    - by Jon
    I know the IEEE 754 floating point standard by heart as I had to learn it for an exam. I know exactly how floating point numbers are used and the problems that they can have. I can manually do any operation on the binary representation of floating point numbers. However, I have not found a single source which unambiguously states that excel uses 64 bit floating point numbers to internally represent every single cell "type" in excel except for text. I have no idea whether some of the types use signed or unsigned integers and some use 64 bit floating point. I have found literally trillions of articles which 1) describe floating point numbers and then 2) talk about being careful with excel because of floating point numbers. I have not found a single statement saying "all types are 64 bit floating point numbers except text". I have not found a single statement which says "changing the type of a cell only changes its visual representation and not its internal representation, unless you change the type from text to some other type which is not text or you change some other type which is not text to text". This is literally all I want to know, and it's so simple and axiomatic that I am amazed that I can find trillions of articles and pages which talk around these statements but do not state them directly.

    Read the article

  • What does the following FORTRAN code do?

    - by Jon Skeet
    C AREA OF A TRIANGLE WITH A STANDARD SQUARE ROOT FUNCTION C INPUT - CARD READER UNIT 5, INTEGER INPUT C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT C INPUT ERROR DISPLAY ERROR OUTPUT CODE 1 IN JOB CONTROL LISTING READ (5, 501) IA, IB, IC 501 FORMAT (3I5) C IA, IB, AND IC MAY NOT BE NEGATIVE C FURTHERMORE, THE SUM OF TWO SIDES OF A TRIANGLE C IS GREATER THAN THE THIRD SIDE, SO WE CHECK FOR THAT, TOO IF (IA) 777, 777, 701 701 IF (IB) 777, 777, 702 702 IF (IC) 777, 777, 703 703 IF (IA+IB-IC) 777,777,704 704 IF (IA+IC-IB) 777,777,705 705 IF (IB+IC-IA) 777,777,799 777 STOP 1 C USING HERON'S FORMULA WE CALCULATE THE C AREA OF THE TRIANGLE 799 S = FLOATF (IA + IB + IC) / 2.0 AREA = SQRT( S * (S - FLOATF(IA)) * (S - FLOATF(IB)) * + (S - FLOATF(IC))) WRITE (6, 601) IA, IB, IC, AREA 601 FORMAT (4H A= ,I5,5H B= ,I5,5H C= ,I5,8H AREA= ,F10.2, + 13H SQUARE UNITS) STOP END plz i need to know soon!!!!!

    Read the article

  • HTML Link and Jquery Live Only Works on First Try with one click

    - by Jon
    Hi Everyone, I'm running into a problem with jquery live event binding on a link. When the link is added to the page it works fine, however when another link is added to the unordered list it requires two clicks for the click event to fire on either link. Any ideas? $("div#website-messages ul li a").live("click", function() { var link = $(this); changeTab(link.attr("href")); $(link.attr("title")).focus(); return false; });

    Read the article

  • flex grid scrollbar pushing all columns to the left

    - by jon
    I have a flex grid where I have the verticalScrollPolicy="auto".But every time when the scrollbar appears all the columns get pushed to the left, making the columns not align as they should. I tried setting minWidth on all the columns to prevent this, but that doesn't seem to work. Any ideas?

    Read the article

  • First Year Computer Science Programming Languages

    - by Jon
    I was reading this article earlier regarding C/C#/PHP being dropped as first languages in Advanced Level (pre-university) Computer Science courses: http://www.theregister.co.uk/2010/05/12/aqa_c_php/ It also goes on to say: Teachers planning to use Java are warned that many universities are considering dropping it from their first year computer science programmes, "as has happened n the US". Does anybody know, what the language predominantly used in US first year Comp Science programs is currently?

    Read the article

  • Selecting date NOT NULL records between a specific range with Propel

    - by Jon Winstanley
    Using Propel I would like to find records which have a date field which is not null and also between a specific range. However, Propel seems to overwrite the criteria with the NOTNULL criteria. Is it possible to do this? //create the date ranges $start_date = mktime(0, 0, 0, date("m") , date("d")+$start, date("Y")); $end_date = mktime(0, 0, 0, date("m") , date("d")+$end, date("Y")); //add the start of the range $c1 = $c->getNewCriterion(TaskPeer::DUE_DATE, null); $c1->addAnd($c->getNewCriterion(TaskPeer::DUE_DATE, $end_date, Criteria::LESS_EQUAL)); $c->add($c1); //add the end of the range $c2 = $c->getNewCriterion(TaskPeer::DUE_DATE, null); $c2->addAnd($c->getNewCriterion(TaskPeer::DUE_DATE, $start_date, Criteria::GREATER_EQUAL)); $c->add($c2); //remove the null entries $c3 = $c->getNewCriterion(TaskPeer::DUE_DATE, null); $c3->addAnd($c->getNewCriterion(TaskPeer::DUE_DATE, null, Criteria::ISNULL)); $c->add($c3);

    Read the article

  • Show Hide Subnav

    - by Jon
    How can I toggle the subnav for each item, and if one is open, hide the open one to show the current one? If there are none shown, just toggle. If you click one and show subnav then and click another hide previous and show current. Here is my html - <header> <div class="content-wrapper"> <div class="user-menu-wrapper"> <div class="hsn-logo"></div> <div class="user-greeting-wrapper"> <div class="user-greeting">Hi, Abraham</div> </div> <div class="user-menu"> <ul class="user-menu-items"> <li>@Html.ActionLink(" ", "Index", "Home", new { @class = "my-account" })</li> <li>@Html.ActionLink(" ", "Index", "Home", new { @class = "my-favorites" })</li> <li>@Html.ActionLink(" ", "Index", "Home", new { @class = "my-bag" })</li> </ul> </div> </div> <div class="hsn-nav-wrapper"> <div class="hsn-nav"> <ul class="hsn-nav-items"> <li style="width: 25%"> <a class="shop" href="#"> <span class="hsn-nav-item-wrap"> <span>SHOP</span><span class="drop-down-arrow"></span> </span> </a> </li> <li style="width: 25%"> <a class="watch" href="#"> <span class="hsn-nav-item-wrap"> <span>WATCH</span><span class="drop-down-arrow"></span> </span> </a> </li> <li style="width: 25%"> <a class="play" href="#"> <span class="hsn-nav-item-wrap"> <span>PLAY</span><span class="drop-down-arrow"></span> </span> </a> </li> <li style="width: 15%"> <a href=""><span class="hsn-search-icon"></span> </a> </li> </ul> </div> <br class="clear" /> </div> </div> </header> <subnav id="shop" class="shop-subnav"> <div class="hsn-subnav-wrapper"> <div class="hsn-subnav"> <div class="hsn-subnav-left"> <ul> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li><span class="hsn-subnav-callout">Deals</span></li> </ul> </div> <div class="hsn-subnav-right"> <ul> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li>SubnavItem</li> <li><span class="hsn-subnav-callout">Clearance</span></li> </ul> </div> </div> </div> </subnav> <subnav id="watch" class="watch-subnav"> <div class="hsn-subnav-wrapper"> <div class="hsn-subnav"> <div class="hsn-subnav-left"> <ul> <li>SubnavItem2</li> <li>SubnavItem2</li> <li>SubnavItem2</li> <li>SubnavItem2</li> </ul> </div> <div class="hsn-subnav-right"> <ul> <li>SubnavItem2</li> <li>SubnavItem2</li> <li>SubnavItem2</li> <li>SubnavItem2</li> </ul> </div> </div> </div> </subnav> Here is my Jquery / JS - $(document).ready(function () { $('ul.hsn-nav-items li a').click(function () { var navitem = $(this).attr('id') , id = $(this).attr('class') , subnav = $('subnav.' + id + '-subnav'); $('a.selected').not(this).removeClass('selected'); $(this).toggleClass('selected'); $('#'+id).toggle(); }); });

    Read the article

  • How can I make sure a ListView item always resizes to show all rows?

    - by Jon Cage
    I have a panel which contains a TableLayoutPanel which itself contains a number of ListViews and Labels. What I'd like is for each list view to resize to fit all of it's contents in vertically (i.e. so that every row is visible). The TableLayoutPanel should handle any vertical scrolling but I can't work out how to get the ListView to resize itself depending on the number of rows. Do I need to handle OnResize and manually resize or is there already something to handle this?

    Read the article

  • Can LGPL licenses be used in our proprietary systems?

    - by jon
    We want to use either the FCK/CKeditor or the TinyMCE editor in our CRM application. We charge the customer use of the CRM system which is bespoke to use and them. I noticed both the editors have GPL and LGPL licenses. However CKEditor has a Closed License too in addition to the LGPL. My questions are: 1) Although we don't sell our code or binaries, we provide software as a hosted service, can we use LGPL licenses? 2) Why does CKEditor provide LGPL and Closed licenses if the LGPL should make it easy for any proprietary software to use it? Is it only for systems which are sold as a binary where the product is for example physically installed as an .exe?

    Read the article

  • Lua for Wireshark: Tvp.new_real() doesn't exist?

    - by Jon Watte
    The documentation for Lua for Wireshark claims that the Tvp class has a new_real() method. However, this method seems to not exist when I try to use it in my Lua script. I'm using Wireshark 1.3.5 (latest dev version) for Windows x64. Did the method get renamed? If so, to what? Is there a better support forum for this particular question?

    Read the article

  • Are Java developers really paid more than .Net developers? Also, should I just try and work with C?(

    - by Jon
    Ok, so I graduated about a year and a half ago. In college days I used to be really good (and keen) on C/C++. I've even done some multithreading and socket programming in C. Created networked GUI apps for linux using GTK etc.Now,I've been working since I graduated and well, let's say, I've been stereotyped with .net. That's all I have experience with in these years (Vb.net,asp.net,javascript). I'm pretty comfortable with all of the above and also SQL server.a)Cutting to the chase, I've begun to notice how .net jobs don't seem to pay all that well as Java. Jobs seeking similar number of yrs of experience offer almost twice for java developers. Does it mean I should consider switching?b)My heart still goes out for C. As a surrogate I've tried working with VC++ 6.0 (I know they aren't the same!). I've tried my hand with DDK,SDK,COM etc. Should I try finding jobs there or am I too inexperienced. Somehow, I can't find any openings for C. Where are they? Sometimes I get frustrated and feel that maybe I should just go for MS or something. Possibly that'll help me in landing with 'fatter paying jobs' in the field that I wish to work.

    Read the article

  • In JSF, how to handle repeating over a list that mutates

    - by Jon
    Hello, In a JSF page, I am iterating over a list of items provided by a session-scoped backing bean. The list needs to be kept up-to-date, so it is replaced with a fresh list every X minutes by a thread (in a thread-safe way). On my page, for each item I provide some text inputs and an "Update" button. If the list is refreshed before I hit "Update", the update does not happen (which is my problem). I happen to be using a4j:repeat, but I think this could also apply to other methods of iteration, including using dataTables. Any thoughts on how I can do this in a non-hackish way? Thanks!

    Read the article

  • C# image drawing colours are incorrect

    - by Jon Tackabury
    I have a source bitmap that is 1x1 and I am trying to take that image and draw it to a new bitmap. The source bitmap is all red, but for some reason the new bitmap ends up with a gradient (see image). Using the code below, shouldn't the new bitmap be completely red? Where is it getting the white/alpha from? private void DrawImage() { Bitmap bmpSOURCE = new Bitmap(1, 1, PixelFormat.Format32bppArgb); using (Graphics g = Graphics.FromImage(bmpSOURCE)) { g.Clear(Color.Red); } Bitmap bmpTest = new Bitmap(300, 100, PixelFormat.Format32bppArgb); using (Graphics g = Graphics.FromImage(bmpTest)) { g.CompositingMode = CompositingMode.SourceCopy; g.CompositingQuality = CompositingQuality.AssumeLinear; g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.PageUnit = GraphicsUnit.Pixel; g.PixelOffsetMode = PixelOffsetMode.None; g.SmoothingMode = SmoothingMode.None; Rectangle rectDest = new Rectangle(0, 0, bmpTest.Width, bmpTest.Height); Rectangle rectSource = new Rectangle(0, 0, 1, 1); g.DrawImage(bmpSOURCE, rectDest, rectSource, GraphicsUnit.Pixel); } pictureBox1.Image = bmpTest; }

    Read the article

  • What is the difference between these 2 XML LINQ Queries?

    - by Jon
    I have the 2 following LINQ queries and I haven't quite got my head around LINQ so what is the difference between the 2 approaches below? Is there a circumstance where one approach is better than another? ChequeDocument.Descendants("ERRORS").Where(x=>(string)x.Attribute("D") == "").Count(); (from x in ChequeDocument.Descendants("ERRORS") where (string)x.Attribute("D") == "" select x).Count())

    Read the article

  • Execute VBA Macro via C# Interop?

    - by Jon Artus
    Hi all, just wondering if anyone could suggest why I might be getting an error? I'm currently trying to execute a macro in a workbook by calling the Application.Run method that the interop exposes. It's currently throwing the following COM Exception: {System.Runtime.InteropServices.COMException (0x800A03EC): Cannot run the macro Macro1'. The macro may not be available in this workbook or all macros may be disabled. I've put the containing workbook in a trusted location, set all of the security settings to their minimum values, and trusted programmatic access to my object model. I'm entirely out of ideas and Google's failed me so far! Has anyone done this, or can you suggest anything which I could try? Many thanks!

    Read the article

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