Search Results

Search found 339 results on 14 pages for 'bryan avery'.

Page 1/14 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Weird scp behavior

    - by bryan1967
    I am trying to scp a file but it returns immediately with the DATE and not file is copied: [cosmo] Downloads > scp V17530-01_1of2.zip bryan@elphaba:Downloads bryan@elphaba's password: Sat Apr 10 13:35:41 PDT 2010 I have never seen this before. I have confirmed that I have the sshd running on the target system and that the firewall is allowing 22/tcp. Any help on what is going on would be very much appreciated. Thanks, Bryan

    Read the article

  • Blocking Just the Parent Domain via robots.txt

    - by Bryan Hadaway
    Let's say you have a parent domain: parent.com and children subdomains under that parent domain: child1.com child2.com child3.com Is there a way to use just the following within parent.com: User-agent: * Disallow: / Considering each child has their own robots.txt stating: User-agent: * Allow: / Or is the parent robots.txt still going to have to make an exception for every single subdomain: User-agent: * Disallow: / Allow: /child1/ Allow: /child2/ Allow: /child3/ Obviously this is important and tricky territory SEO wise so I'm looking to learn the definitive and safe, best practice method here to sharpen my skills. Thanks, Bryan

    Read the article

  • Weird scp behavior

    - by bryan1967
    I am trying to scp a file but it returns immediately with the DATE and not file is copied: [cosmo] Downloads > scp V17530-01_1of2.zip bryan@elphaba:Downloads bryan@elphaba's password: Sat Apr 10 13:35:41 PDT 2010 I have never seen this before. I have confirmed that I have the sshd running on the target system and that the firewall is allowing 22/tcp. Any help on what is going on would be very much appreciated. Thanks, Bryan

    Read the article

  • Transfer DNS zones from master to slave (MS DNS to BIND9)

    - by Bryan
    Hello, I have a problem with DNS servers. My master dns server runs on Microsoft DNS server and now I want to start slave DNS server on Linux Bind9. The problems is that master MS DNS server can't validate slave DNS server (bind9) and can't resolve FQDN. Maybe, I missed something... firewall, dns configuration and network looks like ok. And the second question is: How I can make full transfer of dns zones to slave dns server? from MS DNS to BIND9 Thanks in advance. Regards, Bryan

    Read the article

  • DirectX9 / HLSL Shader Model 3 - Passing Doubles between Shaders

    - by P. Avery
    I need higher precision on a few values within my vertex and pixel shaders...I'm currently using floats, so I would like to use doubles...I've read that HLSL Model 4 has two functions to convert a double into two unsigned integers and back again( asuint() and asdouble() ). These functions are only supported on HLSL 4 and I am using DirectX 9 which will only compile HLSL Model 3 and below... How can I pass a double between shaders? here is implementation for HLSL 4: struct VS_INPUT { float2 v; }; struct PS_INPUT { uint a; uint b; uint c; uint d; }; PS_INPUT VertexShader( VS_INPUT Input ) { PS_INPUT Output = ( PS_INPUT )0; double2 vPos = mul( Input.v, mWorld ).xy; asuint( vPos.x, Output.a, Output.b ); asuint( vPos.y, Output.c, Output.d ); return Output; } float4 PixelShader( PS_INPUT Input ) { double2 vPos; vPos.x = asdouble( Input.a, Input.b ); vPos.y = asdouble( Input.c, Input.d ); ... return 1; }

    Read the article

  • How do I get vmbuilder to progress?

    - by Avery Chan
    I've used the following command to create my vm: vmbuilder kvm ubuntu --verbose --suite=precise --flavour=virtual --arch=amd64 -o --libvirt=qemu:///system --tmpfs=- --ip=192.168.2.1 --part=/home/shared/vm1/vmbuilder.partition --templates=/home/shared/vm1/templates --user=vadmin --name=VM-Administrator --pass=vpass --addpkg=vim-nox --addpkg=unattended-upgrades --addpkg=acpid --firstboot=/home/shared/vm1/boot.sh --mem=256 --hostname=chameleon --bridge=br0 I've been trying to follow the direction here. My system just outputs this and it hangs at the last line: 2012-06-26 18:08:29,225 INFO : Mounting tmpfs under /tmp/tmpJbf1dZtmpfs 2012-06-26 18:08:29,234 INFO : Calling hook: preflight_check 2012-06-26 18:08:29,243 INFO : Calling hook: set_defaults 2012-06-26 18:08:29,244 INFO : Calling hook: bootstrap How can I get vmbuilder to continue the process instead of dying right here? I'm running 12.04. EDIT: Adding some additional output details When I ^C to get out of the hang I see this: ^C2012-06-26 18:19:29,622 INFO : Unmounting tmpfs from /tmp/tmpJbf1dZtmpfs Traceback (most recent call last): File "/usr/bin/vmbuilder", line 24, in <module> cli.main() File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 216, in main distro.build_chroot() File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 83, in build_chroot self.call_hooks('bootstrap') File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks call_hooks(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 165, in call_hooks getattr(context, func, log_no_such_method)(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 136, in bootstrap self.suite.debootstrap() File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 269, in debootstrap run_cmd(*cmd, **kwargs) File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 113, in run_cmd fds = select.select([x.file for x in [mystdout, mystderr] if not x.closed], [], [])[0]

    Read the article

  • SlimDX and Parsing .X Files

    - by P. Avery
    I'm trying to parse a .x file using SlimDX. I can create the XFile object and register templates but I'm having problems with the enumeration object. The enumeration object has a child count of 0 for a file I know to have valid data. Here is code to create file, enumeration, and data objects: public void Parse(string filename, string templates, ref Frame aParam) { XFile xfile = null; XFileEnumerationObject enumObj = null; XFileData dataObj = null; // create file object xfile = new XFile(); // register templates if (xfile.RegisterTemplates(XFile.DefaultTemplates).IsFailure) { Console.WriteLine(Result.Last); xfile.Dispose(); return; } // create enumeration object enumObj = xfile.CreateEnumerationObject(filename, System.Runtime.InteropServices.CharSet.Auto); if (enumObj == null) { xfile.Dispose(); return; } // get child count( returns 0 here ) long ncElements = enumObj.ChildCount; for (int i = 0; i < ncElements; ++i) { // never reached... dataObj = enumObj.GetChild(i); if (dataObj.IsReference) continue; try { Parse(dataObj, ref aParam); } catch (Exception e) { e.Write(); } finally { dataObj.Dispose(); } } enumObj.Dispose(); xfile.Dispose(); } ...There are no exceptions thrown by this function...the child count is 0 so the conditional loop breaks right away, the file objects are disposed of and the function returns... Here is .x file...a simple cube: xof 0303txt 0032 Frame Root { FrameTransformMatrix { 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000;; } Frame Cube { FrameTransformMatrix { 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000;; } Mesh Cube{ //Cube Mesh 36; -1.000000; 1.000000; 1.000000;, -1.000000;-1.000000; 1.000000;, 0.999999;-1.000001; 1.000000;, -1.000000;-1.000000;-1.000000;, 1.000000;-1.000000;-1.000000;, 0.999999;-1.000001; 1.000000;, 1.000000; 0.999999; 1.000000;, -1.000000; 1.000000; 1.000000;, 0.999999;-1.000001; 1.000000;, -1.000000; 1.000000;-1.000000;, -1.000000;-1.000000;-1.000000;, -1.000000; 1.000000; 1.000000;, -1.000000; 1.000000; 1.000000;, 1.000000; 0.999999; 1.000000;, 1.000000; 1.000000;-1.000000;, 1.000000; 0.999999; 1.000000;, 0.999999;-1.000001; 1.000000;, 1.000000;-1.000000;-1.000000;, -1.000000;-1.000000;-1.000000;, -1.000000;-1.000000; 1.000000;, -1.000000; 1.000000; 1.000000;, 1.000000; 1.000000;-1.000000;, 1.000000;-1.000000;-1.000000;, -1.000000; 1.000000;-1.000000;, 1.000000; 1.000000;-1.000000;, 1.000000; 0.999999; 1.000000;, 1.000000;-1.000000;-1.000000;, -1.000000; 1.000000;-1.000000;, -1.000000; 1.000000; 1.000000;, 1.000000; 1.000000;-1.000000;, -1.000000;-1.000000; 1.000000;, -1.000000;-1.000000;-1.000000;, 0.999999;-1.000001; 1.000000;, 1.000000;-1.000000;-1.000000;, -1.000000;-1.000000;-1.000000;, -1.000000; 1.000000;-1.000000;; 12; 3;0;1;2;, 3;3;4;5;, 3;6;7;8;, 3;9;10;11;, 3;12;13;14;, 3;15;16;17;, 3;18;19;20;, 3;21;22;23;, 3;24;25;26;, 3;27;28;29;, 3;30;31;32;, 3;33;34;35;; MeshNormals { //Mesh Normals 36; 0.000000;-0.000000; 1.000000;, 0.000000;-0.000000; 1.000000;, 0.000000;-0.000000; 1.000000;, -0.000000;-1.000000;-0.000000;, -0.000000;-1.000000;-0.000000;, -0.000000;-1.000000;-0.000000;, -0.000000;-0.000000; 1.000000;, -0.000000;-0.000000; 1.000000;, -0.000000;-0.000000; 1.000000;, -1.000000; 0.000000;-0.000000;, -1.000000; 0.000000;-0.000000;, -1.000000; 0.000000;-0.000000;, 0.000000; 1.000000; 0.000000;, 0.000000; 1.000000; 0.000000;, 0.000000; 1.000000; 0.000000;, 1.000000;-0.000001; 0.000000;, 1.000000;-0.000001; 0.000000;, 1.000000;-0.000001; 0.000000;, -1.000000; 0.000000;-0.000000;, -1.000000; 0.000000;-0.000000;, -1.000000; 0.000000;-0.000000;, 0.000000; 0.000000;-1.000000;, 0.000000; 0.000000;-1.000000;, 0.000000; 0.000000;-1.000000;, 1.000000; 0.000000;-0.000000;, 1.000000; 0.000000;-0.000000;, 1.000000; 0.000000;-0.000000;, 0.000000; 1.000000; 0.000000;, 0.000000; 1.000000; 0.000000;, 0.000000; 1.000000; 0.000000;, -0.000000;-1.000000; 0.000000;, -0.000000;-1.000000; 0.000000;, -0.000000;-1.000000; 0.000000;, 0.000000;-0.000000;-1.000000;, 0.000000;-0.000000;-1.000000;, 0.000000;-0.000000;-1.000000;; 12; 3;0;1;2;, 3;3;4;5;, 3;6;7;8;, 3;9;10;11;, 3;12;13;14;, 3;15;16;17;, 3;18;19;20;, 3;21;22;23;, 3;24;25;26;, 3;27;28;29;, 3;30;31;32;, 3;33;34;35;; } //End of Mesh Normals MeshMaterialList { //Mesh Material List 1; 12; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;; Material Material { 0.640000; 0.640000; 0.640000; 1.000000;; 96.078431; 0.500000; 0.500000; 0.500000;; 0.000000; 0.000000; 0.000000;; TextureFilename {"Yellow.jpg";} } } //End of Mesh Material List MeshTextureCoords UVMap{ //Mesh UV Coordinates 36; 0.000000; 1.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 1.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 0.000000;, 0.000000; 1.000000;, 1.000000; 1.000000;, 1.000000; 0.000000;; } //End of Mesh UV Coordinates } //End of Mesh Mesh } //End of Cube } //End of Root Frame

    Read the article

  • Why doesn't apache2 respect my envvars file?

    - by Avery Chan
    My envvar files has these lines in it: export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data My apache2.conf has these lines in it: # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} But when I run apache2 -M I get this: apache2: bad user name ${APACHE_RUN_USER} A temporary fix is to hard-code www-data into it my apache2.conf file. There was some speculation here that this was because some configuration script didn't replace the env vars correctly in my apache2.conf file. Regardless how do I get apache2 to consult my envvars file? As another data point this site seems to indicate the envvars is generated at build, but read by apache2ctl at runtime, suggesting that this file isn't just poop leftover by the build process.

    Read the article

  • The View-Matrix and Alternative Calculations

    - by P. Avery
    I'm working on a radiosity processor in DirectX 9. The process requires that the camera be placed at the center of a mesh face and a 'screenshot' be taken facing 5 different directions...forward...up...down...left...right... ...The problem is that when the mesh face is facing up( look vector: 0, 1, 0 )...a view matrix cannot be determined using standard trigonometry functions: Matrix4 LookAt( Vector3 eye, Vector3 target, Vector3 up ) { // The "look-at" vector. Vector3 zaxis = normal(target - eye); // The "right" vector. Vector3 xaxis = normal(cross(up, zaxis)); // The "up" vector. Vector3 yaxis = cross(zaxis, xaxis); // Create a 4x4 orientation matrix from the right, up, and at vectors Matrix4 orientation = { xaxis.x, yaxis.x, zaxis.x, 0, xaxis.y, yaxis.y, zaxis.y, 0, xaxis.z, yaxis.z, zaxis.z, 0, 0, 0, 0, 1 }; // Create a 4x4 translation matrix by negating the eye position. Matrix4 translation = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -eye.x, -eye.y, -eye.z, 1 }; // Combine the orientation and translation to compute the view matrix return ( translation * orientation ); } The above function comes from http://3dgep.com/?p=1700... ...Is there a mathematical approach to this problem? Edit: A problem occurs when setting the view matrix to up or down directions, here is an example of the problem when facing down: D3DXVECTOR4 vPos( 3, 3, 3, 1 ), vEye( 1.5, 3, 3, 1 ), vLook( 0, -1, 0, 1 ), vRight( 1, 0, 0, 1 ), vUp( 0, 0, 1, 1 ); D3DXMATRIX mV, mP; D3DXMatrixPerspectiveFovLH( &mP, D3DX_PI / 2, 1, 0.5f, 2000.0f ); D3DXMatrixIdentity( &mV ); memcpy( ( void* )&mV._11, ( void* )&vRight, sizeof( D3DXVECTOR3 ) ); memcpy( ( void* )&mV._21, ( void* )&vUp, sizeof( D3DXVECTOR3 ) ); memcpy( ( void* )&mV._31, ( void* )&vLook, sizeof( D3DXVECTOR3 ) ); memcpy( ( void* )&mV._41, ( void* )&(-vEye), sizeof( D3DXVECTOR3 ) ); D3DXVec4Transform( &vPos, &vPos, &( mV * mP ) ); Results: vPos = D3DXVECTOR3( 1.5, -6, -0.5, 0 ) - this vertex is not properly processed by shader as the homogenous w value is 0 it cannot be normalized to a position within device space...

    Read the article

  • UV Atlas Generation and Seam Removal

    - by P. Avery
    I'm generating light maps for scene mesh objects using DirectX's UV Atlas Tool( D3DXUVAtlasCreate() ). I've succeeded in generating an atlas, however, when I try to render the mesh object using the atlas the seams are visible on the mesh. Below are images of a lightmap generated for a cube. Here is the code I use to generate a uv atlas for a cube: struct sVertexPosNormTex { D3DXVECTOR3 vPos, vNorm; D3DXVECTOR2 vUV; sVertexPosNormTex(){} sVertexPosNormTex( D3DXVECTOR3 v, D3DXVECTOR3 n, D3DXVECTOR2 uv ) { vPos = v; vNorm = n; vUV = uv; } ~sVertexPosNormTex() { } }; // create a light map texture to fill programatically hr = D3DXCreateTexture( pd3dDevice, 128, 128, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &pLightmap ); if( FAILED( hr ) ) { DebugStringDX( "Main", "Failed to D3DXCreateTexture( lightmap )", __LINE__, hr ); return hr; } // get the zero level surface from the texture IDirect3DSurface9 *pS = NULL; pLightmap->GetSurfaceLevel( 0, &pS ); // clear surface pd3dDevice->ColorFill( pS, NULL, D3DCOLOR_XRGB( 0, 0, 0 ) ); // load a sample mesh DWORD dwcMaterials = 0; LPD3DXBUFFER pMaterialBuffer = NULL; V_RETURN( D3DXLoadMeshFromX( L"cube3.x", D3DXMESH_MANAGED, pd3dDevice, &pAdjacency, &pMaterialBuffer, NULL, &dwcMaterials, &g_pMesh ) ); // generate adjacency DWORD *pdwAdjacency = new DWORD[ 3 * g_pMesh->GetNumFaces() ]; g_pMesh->GenerateAdjacency( 1e-6f, pdwAdjacency ); // create light map coordinates LPD3DXMESH pMesh = NULL; LPD3DXBUFFER pFacePartitioning = NULL, pVertexRemapArray = NULL; FLOAT resultStretch = 0; UINT numCharts = 0; hr = D3DXUVAtlasCreate( g_pMesh, 0, 0, 128, 128, 3.5f, 0, pdwAdjacency, NULL, NULL, NULL, NULL, NULL, 0, &pMesh, &pFacePartitioning, &pVertexRemapArray, &resultStretch, &numCharts ); if( SUCCEEDED( hr ) ) { // release and set mesh SAFE_RELEASE( g_pMesh ); g_pMesh = pMesh; // write mesh to file hr = D3DXSaveMeshToX( L"cube4.x", g_pMesh, 0, ( const D3DXMATERIAL* )pMaterialBuffer->GetBufferPointer(), NULL, dwcMaterials, D3DXF_FILEFORMAT_TEXT ); if( FAILED( hr ) ) { DebugStringDX( "Main", "Failed to D3DXSaveMeshToX() at OnD3D9CreateDevice()", __LINE__, hr ); } // fill the the light map hr = BuildLightmap( pS, g_pMesh ); if( FAILED( hr ) ) { DebugStringDX( "Main", "Failed to BuildLightmap()", __LINE__, hr ); } } else { DebugStringDX( "Main", "Failed to D3DXUVAtlasCreate() at OnD3D9CreateDevice()", __LINE__, hr ); } SAFE_RELEASE( pS ); SAFE_DELETE_ARRAY( pdwAdjacency ); SAFE_RELEASE( pFacePartitioning ); SAFE_RELEASE( pVertexRemapArray ); SAFE_RELEASE( pMaterialBuffer ); Here is code to fill lightmap texture: HRESULT BuildLightmap( IDirect3DSurface9 *pS, LPD3DXMESH pMesh ) { HRESULT hr = S_OK; // validate lightmap texture surface and mesh if( !pS || !pMesh ) return E_POINTER; // lock the mesh vertex buffer sVertexPosNormTex *pV = NULL; pMesh->LockVertexBuffer( D3DLOCK_READONLY, ( void** )&pV ); // lock the mesh index buffer WORD *pI = NULL; pMesh->LockIndexBuffer( D3DLOCK_READONLY, ( void** )&pI ); // get the lightmap texture surface description D3DSURFACE_DESC desc; pS->GetDesc( &desc ); // lock the surface rect to fill with color data D3DLOCKED_RECT rct; hr = pS->LockRect( &rct, NULL, 0 ); if( FAILED( hr ) ) { DebugStringDX( "main.cpp:", "Failed to IDirect3DTexture9::LockRect()", __LINE__, hr ); return hr; } // iterate the pixels of the lightmap texture // check each pixel to see if it lies between the uv coordinates of a cube face BYTE *pBuffer = ( BYTE* )rct.pBits; for( UINT y = 0; y < desc.Height; ++y ) { BYTE* pBufferRow = ( BYTE* )pBuffer; for( UINT x = 0; x < desc.Width * 4; x+=4 ) { // determine the pixel's uv coordinate D3DXVECTOR2 p( ( ( float )x / 4.0f ) / ( float )desc.Width + 0.5f / 128.0f, y / ( float )desc.Height + 0.5f / 128.0f ); // for each face of the mesh // check to see if the pixel lies within the face's uv coordinates for( UINT i = 0; i < 3 * pMesh->GetNumFaces(); i +=3 ) { sVertexPosNormTex v[ 3 ]; v[ 0 ] = pV[ pI[ i + 0 ] ]; v[ 1 ] = pV[ pI[ i + 1 ] ]; v[ 2 ] = pV[ pI[ i + 2 ] ]; if( TexcoordIsWithinBounds( v[ 0 ].vUV, v[ 1 ].vUV, v[ 2 ].vUV, p ) ) { // the pixel lies b/t the uv coordinates of a cube face // light contribution functions aren't needed yet //D3DXVECTOR3 vPos = TexcoordToPos( v[ 0 ].vPos, v[ 1 ].vPos, v[ 2 ].vPos, v[ 0 ].vUV, v[ 1 ].vUV, v[ 2 ].vUV, p ); //D3DXVECTOR3 vNormal = v[ 0 ].vNorm; // set the color of this pixel red( for demo ) BYTE ba[] = { 0, 0, 255, 255, }; //ComputeContribution( vPos, vNormal, g_sLight, ba ); // copy the byte array into the light map texture memcpy( ( void* )&pBufferRow[ x ], ( void* )ba, 4 * sizeof( BYTE ) ); } } } // go to next line of the texture pBuffer += rct.Pitch; } // unlock the surface rect pS->UnlockRect(); // unlock mesh vertex and index buffers pMesh->UnlockIndexBuffer(); pMesh->UnlockVertexBuffer(); // write the surface to file hr = D3DXSaveSurfaceToFile( L"LightMap.jpg", D3DXIFF_JPG, pS, NULL, NULL ); if( FAILED( hr ) ) DebugStringDX( "Main.cpp", "Failed to D3DXSaveSurfaceToFile()", __LINE__, hr ); return hr; } bool TexcoordIsWithinBounds( const D3DXVECTOR2 &t0, const D3DXVECTOR2 &t1, const D3DXVECTOR2 &t2, const D3DXVECTOR2 &p ) { // compute vectors D3DXVECTOR2 v0 = t1 - t0, v1 = t2 - t0, v2 = p - t0; float f00 = D3DXVec2Dot( &v0, &v0 ); float f01 = D3DXVec2Dot( &v0, &v1 ); float f02 = D3DXVec2Dot( &v0, &v2 ); float f11 = D3DXVec2Dot( &v1, &v1 ); float f12 = D3DXVec2Dot( &v1, &v2 ); // Compute barycentric coordinates float invDenom = 1 / ( f00 * f11 - f01 * f01 ); float fU = ( f11 * f02 - f01 * f12 ) * invDenom; float fV = ( f00 * f12 - f01 * f02 ) * invDenom; // Check if point is in triangle if( ( fU >= 0 ) && ( fV >= 0 ) && ( fU + fV < 1 ) ) return true; return false; } Screenshot Lightmap I believe the problem comes from the difference between the lightmap uv coordinates and the pixel center coordinates...for example, here are the lightmap uv coordinates( generated by D3DXUVAtlasCreate() ) for a specific face( tri ) within the mesh, keep in mind that I'm using the mesh uv coordinates to write the pixels for the texture: v[ 0 ].uv = D3DXVECTOR2( 0.003581, 0.295631 ); v[ 1 ].uv = D3DXVECTOR2( 0.003581, 0.003581 ); v[ 2 ].uv = D3DXVECTOR2( 0.295631, 0.003581 ); the lightmap texture size is 128 x 128 pixels. The upper-left pixel center coordinates are: float halfPixel = 0.5 / 128 = 0.00390625; D3DXVECTOR2 pixelCenter = D3DXVECTOR2( halfPixel, halfPixel ); will the mapping and sampling of the lightmap texture will require that an offset be taken into account or that the uv coordinates are snapped to the pixel centers..? ...Any ideas on the best way to approach this situation would be appreciated...What are the common practices?

    Read the article

  • How do I connect to my running VM via virsh?

    - by Avery Chan
    My VM has already been started via virsh start chameleon.ootbdev. When I do a virsh console chameleon.ootbdev I get the following output: Connected to domain chameleon.ootbdev Escape character is ^] error: internal error cannot find character device (null) Doing a google search on this led me to this "solution". Unfortunately, editing the domain via virsh edit chameleon.ootbdev doesn't seem to stick. I suspect the issue is that I'm inserting the XML incorrectly: the instructions from the link ask me to insert the following XML into the domain XML file. <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> I've posted my domain XML file to pastebin here. This is AFTER I've tried to insert the above XML. I inserted this XML after the </devices> block. My primary question is: How do I connect to the running VM? A secondary question would be: How do I edit the domain file with the above XML and get the changes to stick?

    Read the article

  • Radiosity using a hemisphere

    - by P. Avery
    I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the edges of certain triangles are not being rendered to the item buffer( render target )...so when I test certain edges( or pixels during pixel shader ) for visibility during a reconstruction pass, visible edges are not identified and as a result the pixel for that edge is discarded. One solution was to increase the resolution of the item buffer( up to 4096x4096 )...this helped and more edges were visible, however, this was not fullproof. How do I increase visibility? Here is a screenshot of a scene after radiosity is applied: the seams are edges along a triangle face that were not visible due to the resolution of the item buffer... fixed the problem by sampling the item buffer w/8 points:

    Read the article

  • Other people's files showing up in rhythmbox

    - by Avery Boyer
    I have my computer connected to a college network, and right now files that belong to other individuals on campus are showing up under Shared in rhythmbox. This is driving me up the wall, I absolutely despise the idea that files are being thrown around on the network and that other people's s*** is showing up on my computer, and that they may be able to see my files as well. This is a very, very serious problem as far as I am concerned and I want to know how I can ensure that I am sharing nothing with the network in the way of files on my computer and that no one else's files are showing up on my computer.

    Read the article

  • IDirect3DDevice9::GetRenderTargetData() returns no data

    - by P. Avery
    I've got a simple function to get the rendertarget data of an RT( w/default pool ). This particular RT has a resolution of 1x1( it's the 10'th and final mip of a texture ). Here is my code to get data for IDirect3DSurface9 *pTargetSurface: IDirect3DSurface9 *pSOS = NULL; pd3dDevice->CreateOffScreenPlainSurface( 1, 1, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &pSOS, NULL ); // get residual energy if( FAILED( hr = pd3dDevice->GetRenderTargetData( pTargetSurface, pSOS ) ) ) { DebugStringDX( ClassName, "Failed to IDirect3DDevice9::GetRenderTargetData() at DownsampleArea()", __LINE__, hr ); goto Exit; } // lock surface if( FAILED( hr = pSOS->LockRect( &rct, NULL, D3DLOCK_READONLY ) ) ) { DebugStringDX( ClassName, "Failed to IDirect3DSurface9::LockRect() at DownsampleArea()", __LINE__, hr ); goto Exit; } // get residual energy from downsampled texture pByte = ( BYTE* )rct.pBits; D3DXVECTOR4 vEnergy; vEnergy.z = ( float )pByte[ 0 ] / 255.0f; vEnergy.y = ( float )pByte[ 1 ] / 255.0f; vEnergy.x = ( float )pByte[ 2 ] / 255.0f; vEnergy.w = ( float )pByte[ 3 ] / 255.0f; V( pSOS->UnlockRect() ); All formatting and settings are correct, directx in debug mode shows no errors... The problem is that the 4 bytes above are 0...I know this to be incorrect by using PIX to debug...PIX shows that RGB bytes are 0.078 and Alpah is 1. These values are not less than that which can be represented by a single byte( 1 / 255 ). Any ideas? Am I copying rendertarget data correctly?

    Read the article

  • In Rails, how to speed up machinist tests?

    - by Bryan Shen
    I'm replacing test fixtures with Machinist. But using Machinist to set up test data is very slow, because whenever a test method is run some new data are made by Machinist and saved to database. Is there any way to cache the data in memory so that using Machinist isn't so slow? Thanks, Bryan

    Read the article

  • Disable mysql startup in Ubuntu 10.04

    - by Bryan
    Hi all, I want to prevent mysql from starting in ubuntu 10.04 I have used update-rc.d -f mysql remove and confirmed that there is no link to the /etc/inid.d/mysql script from any of the rc?.d directories. I also ran sysv-rc-conf and it shows me that mysql is being called as part of the rc.d scripts. It is still starting on boot. How do I disable it? Regards, Bryan

    Read the article

  • Javascript || or operator with a undefinded variable

    - by bryan sammon
    I have been doing some reading lately one article I read was from Opera. http://dev.opera.com/articles/view/javascript-best-practices/ In that article they write this: Another common situation in JavaScript is providing a preset value for a variable if it is not defined, like so: if(v){ var x = v; } else { var x = 10; } The shortcut notation for this is the double pipe character: var x = v || 10; For some reason I cant get this to work for me. Is it really possible to check to see if v is defined, if not x = 10? --Thanks. Bryan

    Read the article

  • typedef of a template with a template type as its parameter

    - by bryan sammon
    Im having a problem with a typedef below, I can seem to get it right: template <typename T> struct myclass1 { static const int member1 = T::GetSomeInt(); }; template <int I> struct myclass2 { typedef myclass1< myclass2<I> > anotherclass; static int GetSomeInt(); }; anotherclass MyObj1; // ERROR here not instantiating the class When I try and initialize a anotherclass object, it gives me an error. Any idea what I am doing wrong? There seems to be a problem with my typedef. Any help is appreciated, Thanks Bryan

    Read the article

  • Use DataSource in DataFormWebPart

    - by Bryan Shen
    I'm writing a custom web part that extends DataFormWebPart. public class MyCustomWebPart : DataFormWebPart{ // other methods public override void DataBind() { XmlDataSource source = new XmlDataSource() { Data = @" <Person> <name cap='true'>Bryan</name> <occupation>student</occupation> </Person> " }; DataSources.Add(source); base.DataBind(); } } The only noticeable thing I do is overriding the DataBind() method, where I use xml as the data source. After I deploy the web part, I set the following XSL to it: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xmp> <xsl:copy-of select="*"/> </xmp> </xsl:template> </xsl:stylesheet> This xsl will surround the input xml with a tag . So I expected the web part to display the original xml data as I wrote in C# code behind. But what shows up in the web part is this: <Person> <name cap="true" /> <occupation /> </Person> All the values within the inner-most tags disappear. What's going on? Can anybody help me? Thanks.

    Read the article

  • Detect Autocomplete

    - by Bryan Marble
    Hello, I have some forms that have inlined labels. I have some javascript (jQuery) that detects when focus has changed or when a user is entering text that changes the class so that the inlined label disappears and isn't blocking the user's view of their entered text. The problem I'm having occurs when the browser autocompletes the form. None of the conditions below are triggered so I can't clear out the inlined label. How can I detect the fact that text has been entered via autocomplete so that I can clear the labels? The js I'm using (from http://www.zurb.com/playground/inline-form-labels): $( document ).ready( function() { $( "label.inlined + .input-text" ).each( function( type ) { $( this ).focus( function() { $( this ).prev( "label.inlined" ).addClass( "focus" ); } ); $( this ).keypress( function() { $( this ).prev( "label.inlined" ).addClass( "has-text" ) .removeClass( "focus" ); } ); $( this ).blur( function() { if( $( this ).val() == "" ) { $( this ).prev( "label.inlined" ).removeClass( "has-text" ) .removeClass( "focus" ); } } ); } ); } ); Thanks! Bryan

    Read the article

  • How to Use DataSource Property in DataFormWebPart

    - by Bryan Shen
    I'm writing a custom web part that extends DataFormWebPart. public class MyCustomWebPart : DataFormWebPart{ // other methods public override void DataBind() { XmlDataSource source = new XmlDataSource() { Data = @" <Person> <name cap='true'>Bryan</name> <occupation>student</occupation> </Person> " }; DataSources.Add(source); base.DataBind(); } } The only noticeable thing I do is overriding the DataBind() method, where I use xml as the data source. After I deploy the web part, I set the following XSL to it: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xmp> <xsl:copy-of select="*"/> </xmp> </xsl:template> </xsl:stylesheet> This xsl will surround the input xml with a tag . So I expected the web part to display the original xml data as I wrote in C# code behind. But what shows up in the web part is this: <Person> <name cap="true" /> <occupation /> </Person> All the values within the inner-most tags disappear. What's going on? Can anybody help me? Thanks.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >