Search Results

Search found 3339 results on 134 pages for 'pure win32'.

Page 15/134 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • SwapBuffers calls itself

    - by user146780
    I'm making a Win32 application with OpenGL in the main window (not using GLUT). I have my drawing code in WM_PAINT right now when I call swapBuffers it must be invalidating itself because it is constantly rerendering and using lots of cpu resources. How can I make it only render when it honestly receives WM_PAINT like when using GDI? Thanks

    Read the article

  • Pure HTML + JavaScript client side templating

    - by Dev er dev
    I want to have achieve something similar to Java Tiles framework using only client side technologies (no server side includes). I would like to have one page, eg layout.html which will contain layout definition. Content placeholder in that page would be empty #content div tag. I would like to have different content injected on that page based on url. Something like layout.html?content=main or layout.html?content=edit will display page with content replaced with main.html or edit.html. The goal is to avoid duplicating code, even for layout, and to compose pages without server-side templating. What approach would you suggest? EDIT: I don't need a full templating library, just a way to compose a pages, similar for what tiles do.

    Read the article

  • Resource.h in Windows API simple app

    - by nXqd
    there'are these lines in the sample Win32 app created default by VS. Can you explain why they're just numbers, and it's meaning :) //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Testing Project.rc // #define IDS_APP_TITLE 103 #define IDR_MAINFRAME 128 #define IDD_TESTINGPROJECT_DIALOG 102 #define IDD_ABOUTBOX 103 #define IDM_ABOUT 104 #define IDM_EXIT 105 #define IDI_TESTINGPROJECT 107 #define IDI_SMALL 108 #define IDC_TESTINGPROJECT 109 #define IDC_MYICON 2 #ifndef IDC_STATIC #define IDC_STATIC -1 #endif // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 130 #define _APS_NEXT_RESOURCE_VALUE 129 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 110 #endif #endif

    Read the article

  • Fetching Strategy example in repository pattern with pure POCO Entity framework

    - by Shawn Mclean
    I'm trying to roll out a strategy pattern with entity framework and the repository pattern using a simple example such as User and Post in which a user has many posts. From this answer here, I have the following domain: public interface IUser { public Guid UserId { get; set; } public string UserName { get; set; } public IEnumerable<Post> Posts { get; set; } } Add interfaces to support the roles in which you will use the user. public interface IAddPostsToUser : IUser { public void AddPost(Post post); } Now my repository looks like this: public interface IUserRepository { User Get<TRole>(Guid userId) where TRole : IUser; } Strategy (Where I'm stuck). What do I do with this code? Can I have an example of how to implement this, where do I put this? public interface IFetchingStrategy<TRole> { TRole Fetch(Guid id, IRepository<TRole> role) } My basic problem was what was asked in this question. I'd like to be able to get Users without posts and users with posts using the strategy pattern.

    Read the article

  • Rewriting a for loop in pure NumPy to decrease execution time

    - by Statto
    I recently asked about trying to optimise a Python loop for a scientific application, and received an excellent, smart way of recoding it within NumPy which reduced execution time by a factor of around 100 for me! However, calculation of the B value is actually nested within a few other loops, because it is evaluated at a regular grid of positions. Is there a similarly smart NumPy rewrite to shave time off this procedure? I suspect the performance gain for this part would be less marked, and the disadvantages would presumably be that it would not be possible to report back to the user on the progress of the calculation, that the results could not be written to the output file until the end of the calculation, and possibly that doing this in one enormous step would have memory implications? Is it possible to circumvent any of these? import numpy as np import time def reshape_vector(v): b = np.empty((3,1)) for i in range(3): b[i][0] = v[i] return b def unit_vectors(r): return r / np.sqrt((r*r).sum(0)) def calculate_dipole(mu, r_i, mom_i): relative = mu - r_i r_unit = unit_vectors(relative) A = 1e-7 num = A*(3*np.sum(mom_i*r_unit, 0)*r_unit - mom_i) den = np.sqrt(np.sum(relative*relative, 0))**3 B = np.sum(num/den, 1) return B N = 20000 # number of dipoles r_i = np.random.random((3,N)) # positions of dipoles mom_i = np.random.random((3,N)) # moments of dipoles a = np.random.random((3,3)) # three basis vectors for this crystal n = [10,10,10] # points at which to evaluate sum gamma_mu = 135.5 # a constant t_start = time.clock() for i in range(n[0]): r_frac_x = np.float(i)/np.float(n[0]) r_test_x = r_frac_x * a[0] for j in range(n[1]): r_frac_y = np.float(j)/np.float(n[1]) r_test_y = r_frac_y * a[1] for k in range(n[2]): r_frac_z = np.float(k)/np.float(n[2]) r_test = r_test_x +r_test_y + r_frac_z * a[2] r_test_fast = reshape_vector(r_test) B = calculate_dipole(r_test_fast, r_i, mom_i) omega = gamma_mu*np.sqrt(np.dot(B,B)) # write r_test, B and omega to a file frac_done = np.float(i+1)/(n[0]+1) t_elapsed = (time.clock()-t_start) t_remain = (1-frac_done)*t_elapsed/frac_done print frac_done*100,'% done in',t_elapsed/60.,'minutes...approximately',t_remain/60.,'minutes remaining'

    Read the article

  • Ocamlrun.lib Not Found For Linking

    - by Onorio Catenacci
    Hi all, Trying to build the OCaml Win32 API binaries for OCaml 3.11.0 on Win 7 and I consistently get a message when I try nmake dynamic: 'cannot open input file "ocamlrun.lib"'. My google skills seem to be failing me--is there something I need to do to get this .lib file? It doesn't seem to be part of the libraries which are included in the OCaml binary distribution for Windows. Can anyone give me a pointer in the right direction?

    Read the article

  • get pure text form odt file in console

    - by naugtur
    I am looking for a small linux tool that would be able to extract text from odt file. It just needs to be human-readable and it can have problems with complicated objects etc. It's almost a duplicate of this question but I need it to be small and have no dependencies on OpenOffice or X server I remember having a 1MB MS-DOS program that could render .doc files quite readibly (with some weird markup getting through from time to time), so i expect it to be possible in the linux world too ;)

    Read the article

  • Pure functional bottom up tree algorithm

    - by Axel Gneiting
    Say I wanted to write an algorithm working on an immutable tree data structure that has a list of leaves as its input. It needs to return a new tree with changes made to the old tree going upwards from those leaves. My problem is that there seems to be no way to do this purely functional without reconstructing the entire tree checking at leaves if they are in the list, because you always need to return a complete new tree as the result of an operation and you can't mutate the existing tree. Is this a basic problem in functional programming that only can be avoided by using a better suited algorithm or am I missing something?

    Read the article

  • Convert Google results object (pure js) to Python object

    - by colwilson
    So I'm trying to use Google Map suggest API to request place name suggestions. Unfortunately I can't find the docs for this bit. Here is an example URI: http://maps.google.com/maps/suggest?q=lon&cp=3&ll=55.0,-3.5&spn=11.9,1.2&hl=en&gl=uk&v=2 which returns: {suggestion:[{query:"London",... I want to use this in python (2.5). Now in proper JSON there would have been quotations around the keys like so: {"suggestion":[{"query":"London",... and I could have used simplejson or something, but as it is I'm a bit stuck. There are two possible solutions here; either I can get to the API code and find an option to return proper JSON, or I do that in python. Any ideas please.

    Read the article

  • Update successful notice with pure css and a close button

    - by Crays
    Hi guys, i've seen websites that allow you to say update your profile and when the stuff is done, they'll stay in the same page or redirect you to another and with a fancy notice that says "Update successful. click here to close" with a lowered opacity black background and a box in the middle with the text within. I've got most of the stuff, the lowred opacity black background, the middle box with the text and even the click here to close function. But how i did the "Click here to close" function is by using a link. Let's say after updating the profile, my script redirect me to index.php?update=successful then i use $update = $_GET['update']; if ($update == "successful") { echo '<div id="BlackScreen"><p id="MiddleBox">You\'ve successfully update your status!<br><span class="close"><a class="menu" href="index.php">Click to close. </a></span></div></div>'; } so that the lowered opacity background div will be gone, but is there another way to do this? Any tips please?

    Read the article

  • Looking for downloadable demo of a .Net service accessed through a pure JavaScript client, without r

    - by blueberryfields
    I am told that the configuration below is possible, but have had significant difficulty in finding instructions on how to set it up. While I'm trying to muddle my way through this on my own, maybe stack-overflow knows of better sources for documentation: I am looking for a walkthrough, including a downloadable, working example, for setting up the following configuration: Server-side .net application (For .net 2.0 or higher), installed/deployed as a windows' service (that is, not served through IIS), and accessed by a client tool that is completely implemented in JavaScript.

    Read the article

  • web site in pure php with clean url

    - by Testadmin
    Hi I have enabled mod_rewrite in my Xampp apache. When I run my php info page, I saw mod_rewrite under Loaded Modules. So I think it's enabled. Then I create a folder clean-url under htdocs. Inside clean-url folder I have 3 files 1) index.php here I put Welcome 2) Test. php 3) .htaccess Here I put RewriteEngine On RewriteRule ^([a-z]+)/([a-z-]+)$ /$1/$2.php [L] I want to run the index page, and by clicking on that hyper link I want to display the test.php page with URL mydomain/clean-url/test I know I am in a wrong path. Does any one help me? Or correct me? ALso i don't know any idea about url rewriting and .htaccess. Please help me.

    Read the article

  • Pure CSS3 show/hide full height div with transition

    - by user1898838
    Dear Stackoverflow readers, I've been breaking my head over something I've seen at Tympanus, and I can't figure out how to properly do such a thing. In this link: http://tympanus.net/Tutorials/FullscreenBookBlock/ you can see that the menu is completely hidden, and only visible when you click on an icon. It has a lovely transition, and it basically roughly sums up what I'm trying to accomplish. The only difference with the above example is that I don't want to completely hide this full-height element, and I'd like to accomplish the above effect with a hover instead of having to click a button. So in an ideal world you'd see a vertical bar, and when you hover over that bar (or click on it with your finger if you're on a tablet), it "opens up" and shows you the full content inside the opened div. Now, I can make a decent bit in html5 and css3, but the above explained effect that I'm trying to accomplish has given me serious headaches, hehe. Does anyone happen to know a tutorial I might have missed that does this exact thing? p.s.: I have tried to take apart Tympanus' html/css, but with the page-fold effect that's also implemented in it I can't seem to figure it out, hence my hope for someone here to help me on my way :)

    Read the article

  • Deriving a class from an abstract class (C++)

    - by cemregoksu
    I have an abstract class with a pure virtual function f() and i want to create a class inherited from that class, and also override function f(). I seperated the header file and the cpp file. I declared the function f(int) in the header file and the definition is in the cpp file. However, the compiler says the derived class is still abstract. How can i fix it?

    Read the article

  • Is there a pure HTML5 emacs mode?

    - by Marcelo Santos
    Question http://stackoverflow.com/questions/1082474/authoring-html5-in-emacs talks about nxml-mode but, from what I read, that can only be used for XHTML5, I want to use emacs with HTML5 (no XML syntax). Is there any mode with auto-indentation, tag/attribute completion, etc.?

    Read the article

  • How to insert <li> element on <ul> using pure javascript

    - by Damiii
    I am having an issue with javascript and i don't know how to solve it ... Actually my code is working good with jsfiddle, but when i try to insert on my HTML page ,it simply doesnt work anymore ... What i want to, is to add the < li on < ul each time i tried to hit the button named "Add" ! HTML code: .... <td width="50%" valign="top"> <b> SUPER: </b> <ul id="ul"> </ul> </td> .... <input type="submit" value="Add" onclick="add()"/> .... JavaScript code: <script type="text/javascript"> function add(){ var ul = document.getElementById("ul"); var li = document.createElement("li"); li.innerHTML = "LoL"; ul.appendChild(li); } </script> The result with that code : it doesn't add anything on my HTML page when i try to hit the button... Thankfully,

    Read the article

  • How to replicate data with memcache

    - by Industrial
    Hi everyone, I am trying to find good resources on best practices to data replication across memcache servers. What I want to accomplish is that if one of my servers in my pool goes down, the next server in line already has the info set. I have found "repcached" but since I run a WIN32 test environment, I have been unable to install it. So what's our alternatives on how to replicate data between servers? Thanks,

    Read the article

  • How to create combobox with bitmaps

    - by Morpheus
    Hi ! I wanted to create a custom combo box like this (as in MS Word), Are there any Win32 API calls to get this job done, (like ChooseColor() or ChooseFont()? If there aren't any, can anyone please tell me how to do this? Thanks you. Regards,

    Read the article

  • How to get the i get the volume GUID

    - by new
    Dear all, I am using win32 api with C++. I would like to know how I can get the volume GUID using a "device path". My device looks like this: \\?\usb#vid_04f2&pid_0111#5&39fe81e&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Thanks.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >