Daily Archives

Articles indexed Tuesday April 27 2010

Page 9/121 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "public: bool

    - by numerical25
    Having trouble creating my swap chain. I receive the following error. DX3dApp.obj : error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "public: bool __thiscall DX3dApp::InitDirect3D(void)" (?InitDirect3D@DX3dApp@@QAE_NXZ) Below is the code ive done so far. #include "DX3dApp.h" bool DX3dApp::Init(HINSTANCE hInstance, int width, int height) { mhInst = hInstance; mWidth = width; mHeight = height; if(!WindowsInit()) { return false; } if(!InitDirect3D()) { return false; } } int DX3dApp::Run() { MSG msg = {0}; while (WM_QUIT != msg.message) { while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) == TRUE) { TranslateMessage(&msg); DispatchMessage(&msg); } Render(); } return (int) msg.wParam; } bool DX3dApp::WindowsInit() { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = mhInst; wcex.hIcon = 0; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = NULL; wcex.lpszClassName = TEXT("DirectXExample"); wcex.hIconSm = 0; RegisterClassEx(&wcex); // Resize the window RECT rect = { 0, 0, mWidth, mHeight }; AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); // create the window from the class above mMainhWnd = CreateWindow(TEXT("DirectXExample"), TEXT("DirectXExample"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, mhInst, NULL); if (!mMainhWnd) { return false; } ShowWindow(mMainhWnd, SW_SHOW); UpdateWindow(mMainhWnd); return true; } bool DX3dApp::InitDirect3D() { DXGI_SWAP_CHAIN_DESC scd; ZeroMemory(&scd, sizeof(scd)); scd.BufferCount = 1; scd.BufferDesc.Width = mWidth; scd.BufferDesc.Height = mHeight; scd.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; scd.BufferDesc.RefreshRate.Numerator = 60; scd.BufferDesc.RefreshRate.Denominator = 1; scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; scd.OutputWindow = mMainhWnd; scd.SampleDesc.Count = 1; scd.SampleDesc.Quality = 0; scd.Windowed = TRUE; HRESULT hr = D3D10CreateDeviceAndSwapChain(NULL,D3D10_DRIVER_TYPE_REFERENCE, NULL, 0, D3D10_SDK_VERSION, &scd, &mpSwapChain, &mpD3DDevice); if(!hr != S_OK) { return FALSE; } ID3D10Texture2D *pBackBuffer; return TRUE; } void DX3dApp::Render() { } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { // Allow the user to press the escape key to end the application case WM_KEYDOWN: switch(wParam) { // Check if the user hit the escape key case VK_ESCAPE: PostQuitMessage(0); break; } break; // The user hit the close button, close the application case WM_DESTROY: PostQuitMessage(0); break; } return DefWindowProc(hWnd, message, wParam, lParam); }

    Read the article

  • Is Mysql IF EXIST what should be used for this query?

    - by acctman
    select social_members.* , social_mcouple.* WHERE m_id='".$_SESSION['userid']."' AND c_id='".$_SESSION['userid']."' Select all fields from social_members.* and if social_mcouple.c_id = $_SESSION['userid'] then Select all fields from social_mcouple.* as well. Can this be done with IF EXIST and if so how. Thanks

    Read the article

  • MPIexec.exe Access denide

    - by shake
    I have installed microsoft compute cluster and MPI.net, now i have trouble to run program using mpiexec.exe on cluster. When i try to run it on console i get message: "Access Denied", and pop up: "mpiexec.exe is not valid win32 application". I tried google it, but found nothing. Pls help. :)

    Read the article

  • Definition of SNMP Gauge32 vs Counter32

    - by DougN
    Can someone point me to a good definition of Gauge32 vs Counter32? I understand that Counter32 can wrap, but Gauge32 can't. I'm trying to understand their semantics. For example, I've heard you should take the difference between two Counter32 readings to get a value/second. Is there something like that for a Gauge32 value? Thanks for any insight.

    Read the article

  • Defining Makefiles variables from a script

    - by Freddy
    I am creating a Makefile which I want it to be a single file for different architectures, OSes, libraries, etc. To do this I have a build specific XML file which defines the different configuration options for each architecture. The config file is read by Perl (it could be any language) and the Perl output returns something like: var1 := var1_value var2 := var2_value var3 := var3_value What I am trying to do is define this variables in my Makefile. From the makefile I am calling my readconfig script and it is giving the correct output, but I have not been able to get this variables as part of my Makefile. I have tried the use of eval and value, but none of them have work (although it could be an issue of me not knowing how to use them. In overall what I am trying to do is something like: read_config: $(eval (perl '-require "readConfig.pl"')) @echo $(var1) It could be assumed I am using only GNU Make behavior. Things I could not change: Config file is on XML Using Perl as a XML parser

    Read the article

  • Flex Validator -- Show Red Error Border on DataGrid Cell

    - by gmoniey
    I can successfully add a validator on an item in my datagrid, by passing in the particular element in the dataProvider to the validator, but I can't get the red border to show up around the cell if the validation fails. I have stepped through the validator, and confirmed that it is passing back a failure, but I can't figure out why the red error border doesn't show up. I have a feeling its because I am passing the item in my dataProvider as the validator source, rather than the 'cell' item, but I can't find a way to access the cell. Thanks.

    Read the article

  • "git pull" broken

    - by Ovid
    I recently upgraded my MacBook Pro to Snow Leopard and "git pull" returns: rakudo $ git pull git: 'pull' is not a git-command. See 'git --help' Did you mean this? shell rakudo $ git-pull -bash: git-pull: command not found I've tried reinstalling via macports, but to no avail. Then I saw this rakudo $ git --exec-path /Users/ovid/libexec/git-core That surprised me as that directory does not exist, nor has it ever existed. Google is not helping here. Hopefully you can :)

    Read the article

  • Perl: remove relative path components but leave symlinks alone?

    - by jnylen
    I need to get Perl to remove relative path components from a Linux path. I've found a couple of functions that almost do what I want, but: File::Spec->rel2abs does too little. It does not resolve ".." into a directory properly. Cwd::realpath does too much. It resolves all symbolic links in the path, which I do not want. Perhaps the best way to illustrate how I want this function to behave is to post a bash log where FixPath is a hypothetical command that gives the desired output: '/tmp/test'$ mkdir -p a/b/c1 a/b/c2 '/tmp/test'$ cd a '/tmp/test/a'$ ln -s b link '/tmp/test/a'$ ls b link '/tmp/test/a'$ cd b '/tmp/test/a/b'$ ls c1 c2 '/tmp/test/a/b'$ FixPath . # rel2abs works here ===> /tmp/test/a/b '/tmp/test/a/b'$ FixPath .. # realpath works here ===> /tmp/test/a '/tmp/test/a/b'$ FixPath c1 # rel2abs works here ===> /tmp/test/a/b/c1 '/tmp/test/a/b'$ FixPath ../b # realpath works here ===> /tmp/test/a/b '/tmp/test/a/b'$ FixPath ../link/c1 # neither one works here ===> /tmp/test/a/link/c1 '/tmp/test/a/b'$ FixPath missing # should work for nonexistent files ===> /tmp/test/a/b/missing

    Read the article

  • How to generate a key for a group entity?

    - by user246114
    Hi, I'm trying to make a group entity. Something like: class User { } class UserColor { } ... Key key = new KeyFactory.Builder( User.class.getSimpleName(), username). .addChild(UserColor.class.getSimpleName(), ???).getKey(); I know the unique username up-front to use for the key of the User object. But I just want app engine to generate a random unique value for the key value of the UserColor instance. I think this is described here, but I don't understand their wording: http://code.google.com/appengine/docs/java/datastore/transactions.html To create an object with a system-generated numeric ID and an entity group parent, you must use an entity group parent key field (such as customerKey, above). Assign the key of the parent to the parent key field, then leave the object's key field set to null. When the object is saved, the datastore populates the key field with the complete key, including the entity group parent. and this is their example: @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key customerKey; but I don't understand - should UserColor look like this then?: class UserColor { @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key mKeyParent; @Primary private Key mKey; // leave null } ... Key keyParent = new KeyFactory.Builder( User.class.getSimpleName(), username); UserColor uc = new UserColor(); uc.setKeyParent(keyParent); pm.makePersistent(uc); // now generated for me automatically? is that correct? Using this method, I should be able to use a User and a UserColor object in a transaction together, right? Thanks

    Read the article

  • MATLAB is changing variables when I do not want it to.

    - by WVUstudent
    Here is my problem in a small bit of code used as an example, trial(0) function [] = trial(test) disp(test) if(test == 1) disp('test is one') test = 0; end disp(test) Matlab prints out this: 0 'test is one' 0 This is not my real code, there are over 500 lines of it, but this is a section of my code where the problem has risen. I have used the search function to see if I have been incrementing any variables anywhere, and have put in over 2 hours trying to see why MATLAB is changing my variables when I don't want it to.

    Read the article

  • Variable declarations in header files - static or not?

    - by Rob
    When refactoring away some #defines I came across declarations similar to the following in a C++ header file: static const unsigned int VAL = 42; const unsigned int ANOTHER_VAL = 37; The question is, what difference, if any, will the static make? Note that multiple inclusion of the headers isn't possible due to the classic #ifndef HEADER #define HEADER #endif trick (if that matters). Does the static mean only one copy of VAL is created, in case the header is included by more than one source file?

    Read the article

  • Capistrano fails for multiple host deployments

    - by morris082
    I be at a loss here, and after scouring the seas (read: internet) for solutions I am left with none other than to hit up the stack. any help appreciated. I have capistrano running locally for deployments onto several different environments. (I'm on windows 7, fwiw). All was well until I needed to deploy to multiple :app servers during a single deployment. Usually I'm prompted for my ssh passphrase once when I call 'cap deploy'. I have ssh-agent running (git never pesters for my pass) but despite this Capistrano has always bugged me once each deployment. Regardless, it always worked when deploying to ONE host. Now, when I attempt to deploy to multiple servers at once, it asks for my passphrase what appears to be multiple times: (ips removed by ME) servers: ["redacted", "redacted"]<br /> Enter passphrase for ~/.ssh/id_rsa: Enter passphrase for ~/.ssh/id_rsa: So with the above I enter my passphrase but this doesn't work. It waits as little while, then spits out this error: connection failed for: <one of the server ips> (NoMethodError: undefined method `overwrite' for nil:NilClass) And that's the end of that. I can "passwordless" ssh into the servers I'm deploying on just fine. I'm pretty certain the ssh-agent is running since I can hit Git w/out entering my passphrase every time Using 'forward_agent' setting in cap deploy did not work. This is my role: role :app, "ip 1 removed", "ip 2 removed" If i set default_run_options[:max_hosts] = 1, it works OK but it asks for my passphrase for every single connection to each host I'm deploying to.. which ends up being a lot. Essentially I'm looking for any of the below (but not limited to): - "You're never going to fix that on windows" - "This is how you get REAL passwordless deployment in capistrano" - "Have you overlooked this setting/feature?" - "I have a rock that can fix anything, you may borrow it" Thanks!

    Read the article

  • How to detect textarea or input type="text" editing?

    - by kavoir.com
    I use this snippet to prevent the user from accidentally navigating away from the editing page: var warning = false; window.onbeforeunload = function() { if (warning) { return ''; } } Now I want to set the variable warning to be true if any of the textarea or input type="text" has been modified, I want to use the onkeyup event such as in: document.getElementById('textarea_id').onkeyup = function() { warning = true; } But it's not working. Don't quite want to use jQuery on this. Any insights?

    Read the article

  • Select count() max() Date

    - by DAVID
    I have a table with shifts history along with emp ids. I'm using this query to retrieve a list of employees and their total shifts by specifying the range to count from: SELECT ope_id, count(ope_id) FROM operator_shift WHERE ope_shift_date >=to_date( '01-MAR-10','dd-mon-yy') and ope_shift_date <= to_date('31-MAR-10','dd-mon-yy') GROUP BY OPE_ID which gives OPE_ID COUNT(OPE_ID) 1 14 2 7 3 6 4 6 5 2 6 5 7 2 8 1 9 2 10 4 10 rows selected. How do I choose the employee with the highest number of shifts under the specified range date?

    Read the article

  • None of my bash commands work

    - by Kevin
    I have an Ubuntu 9.10 netbook. I has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account one this machine), all the commands in ~/bin stopped working. If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root(which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?

    Read the article

  • Passive cooling a Pentium III

    - by gravyface
    Looking at running pfSense on an old P3 866Mhz. It's noisy, I'd like to passively-cool it, downclocking is ok as this is more than enough horsepower for my needs at home. Obviously I'm cheaping out here: wonder if I bigger heatsink will do and how much case flow I need (it's in a standard mid-tower ATX case).

    Read the article

  • Implementing full text search on iPhone?

    - by Nimrod
    I'm looking for suggestions on the best way to implement a full-text search on some static data on the iPhone. Basically I have an app that contains the offline version of a web site, about 50MB of text, and I'd like for users to be able to search for terms. I figure that I should somehow build an table of ("word", reference_to_file_containing_word) or something, put that into either Core Data or just sqlite, index the "word" column, then have the search facility search the table for search terms and take the intersection of the sets of results for the terms or something. That wouldn't allow people to search for phrases but it would be pretty easy and probably not too slow. I'd like to just use existing SDK features for this. Should I use Core Data or sqlite? Does anyone have any other ideas on how this could be done?

    Read the article

  • How to list all (groovy) classes in JVM in groovy

    - by Dan
    I am writing a DelegatingMetaClass that I would like to apply to all groovy classes in my project, but I do not how to get hold of all classes in the project? Here is the code: /* This will work ok, since I know Foo beforehand, but what about classes that do not exist yet? */ def myMetaClass = new DelegatingMetaClass(Foo.class) InvokerHelper.metaRegistry.setMetaClass(Foo.class, myMetaClass) /* how to do this? allGroovyClasses.each{ def myMetaClass = new DelegatingMetaClass(it) InvokerHelper.metaRegistry.setMetaClass(it, myMetaClass) } */ class SimpleInterceptor extends DelegatingMetaClass{ public SimpleInterceptor(final Class aclass) { super(aclass); initialize(); } public Object getProperty(Object object, String prop) { println ("I am in a property interceptor!!!") return super.getProperty(object, prop) } public Object invokeMethod(Object a_object, String a_methodName, Object[] a_arguments) { println ("I am in a method interceptor!!!") return super.invokeMethod(a_object, a_methodName, a_arguments) }

    Read the article

  • How to convert a string into a Point in C#

    - by NateD
    I have a list of strings of the format "x,y". I would like to make them all into Points. The best Point constructor I can find takes two ints. What is the best way in C# to turn "14,42" into new Point(14,42);? I know the Regex for doing that is /(\d+),(\d+)/, but I'm having a hard time turning those two match groups into ints in C#. any help you could offer would be appreciated.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >