Daily Archives

Articles indexed Thursday September 6 2012

Page 12/19 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to get Bus and Device relationship for a /dev/ttyUSB

    - by Ernesto Campohermoso
    I need to write an script for restart USB dongles. I have all tools but I can't link my /dev/ttyUSBx to physical BUS and DEVICE. An issue is that I have three dongles with the same id vendor and id product. If I do lsusb the output is: Bus 001 Device 004: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem Bus 001 Device 006: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem Bus 001 Device 007: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem Bus 001 Device 002: ID 80ee:0021 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub And I have attached it to: /dev/ttyUSB0 /dev/ttyUSB3 /dev/ttyUSB5 But I want to know which device is related with which Bus Device. By example I need to get the following: /dev/ttyUSB0 -> Bus 001 Device 006 /dev/ttyUSB3 -> Bus 001 Device 004 /dev/ttyUSB5 -> Bus 001 Device 007 I'm using Ubuntu Server 10.04 and I tested the tools: lsusb hal lsmod But I can't get the relationship.

    Read the article

  • Nautilus left pane does not expand

    - by dn.usenet
    I would prefer the left pane of Nautilus to behave like Windows file manager. It should have expandable/collapsible trees, and if I have /home/mydir-1, /home/mydir-2, I should be able to see them both in the left pane. When I click on one of them, the files in that dir should show in the right pane. If Nautilus can't do it, please suggest a better file-manager which does. I would rather not open 3 panes in Nautilus to do what two panes do just fine in Windows File Manager. Secondly how can I open two instances of Nautilus? And if it isn't possible with Nautilus, could it be done with some other file manager?

    Read the article

  • Change gui port(8080) utorrent

    - by user87073
    I'm fresh on Ubuntu, still learning how to use it. Recently I've been trying to install utorrent, which I already was able to do so, but I need the port 8080 free to use run tomcat/glassfish and on port 80 php. Briefly, how can I change utorrent port from 8080 to another one? I've been trying to find a solution for this issue for about 3 days now, I saw some solutions, such as create a utserver.config, but I have no clue in how to use it or config it by terminal or on properties, that is something hardly explained by anyone. Any help will be appreciated :D.

    Read the article

  • Is it possible to get a Proxy Authentication Dialog with Ubuntu Server?

    - by Johnny Bigoode
    I've got a VM Virtual Box with Ubuntu Server. I'set the http_proxy variable using export http_proxy="http://1234:linux@proxy:8080" The problem is that Ubuntu will constantly try to connect to the internet, even when I'm not logged in my company's account, so everyday I need to reset my password since Ubuntu will constantly try to access the internet. Also, it's always a problem when I need to authenticate the proxy with a different user/password. Can't I just set it to make a small prompt when it tries to connect to the proxy and fails? Like Firefox, Chrome and every app I have installed with Windows 7? I get this small dialog box that asks for a username and password when it can't access the internet. The Ubuntu Server doesn't need constant internet connection, specially since it's only online for tests over LAN.

    Read the article

  • How do I handle "Firmware file X not found" stopping bootup?

    - by John Baber
    I recently upgraded my desktop mac to Precise and now can't get past the Ubuntu 12.04 splash page. The splash freezes with [ 19.931097] b32-phy0 ERROR: Firmware file "b43/ucode16_mimo.fw" not found [ 19.9311126] b32-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website. written on it This is when I choose 3.2.0-generic from the grub menu. If I choose to load up older kernels, I still get the same thing. How can I make my computer finish booting again? I'm able to ssh into the machine and poke around, but the actual screen freezes at the splash.

    Read the article

  • Missing ODBCConfig for SQLite and LibreOffice Base

    - by MikeD
    I have used OpenOffice Base as a front end for SQlite databases, in 10.04 linked via ODBC. I am updating to 12.04, so I loaded LibreOffice Base, looks just like OObase. I have 12.04 on one drive and 10.04 on another. I loaded Sqliteman, sqlite3, unixodbc-bin, unixodbc, libsqliteodbc, sqlitebrowser. I copied my databases directory over. But in terminal ODBCConfig is not on the 12.04 system. So I copied odbc.ini from the home directory on 10.04 to 12.04 home directory, and now LibreOffice Base can access my database, and all is fine. Anyone know what is the problem with ODBCConfig, is it another victim of the change in QT? Of course I could edit odbc.ini with jedit, now I can see the format. In terminal I tried sudo find / -name ODBCConfig, but its not there.

    Read the article

  • No internet access when VPN connected

    - by user10669
    I have an OpenVPN config that I use on my Windows XP box and on my Ubuntu machine. When I use it with my Windows machine, I can connect to the VPN and access sites on the VPN, and the internet as normal. When I use it on my Ubuntu box, when connected to the VPN, I can only access internal sites - No internet access at all. I'm sure there is a way to configure OpenVPN on Ubuntu to allow internet connections, but I can't figure out how.

    Read the article

  • Installing e text editor

    - by kristian nissen
    I am trying to get e-text editor to run. I read http://www.e-texteditor.com/forum/viewtopic.php?p=14953#14953 and Compile e-text editor on Linux as well. But on my 10.04 Lucid it fails at the following step: ./build_externals_linux.sh debug with the following error messages: Building debug binaries Building 32-bit binaries Going to place output in /opt/etexteditor/external/out.debug ./build_externals_linux.sh: line 41: pushd: bakefile: No such file or directory ./build_externals_linux.sh: line 42: ./configure: No such file or directory Cannot compile bakefile ./build_externals_linux.sh: line 46: popd: directory stack empty ./build_externals_linux.sh: line 49: pushd: metakit: No such file or directory ./build_externals_linux.sh: line 50: cd: builds: No such file or directory Cannot compile MetaKit ./build_externals_linux.sh: line 56: popd: directory stack empty ./build_externals_linux.sh: line 59: pushd: pcre: No such file or directory ./build_externals_linux.sh: line 60: ./configure: No such file or directory Cannot compile pcre ./build_externals_linux.sh: line 66: popd: directory stack empty ./build_externals_linux.sh: line 69: pushd: tinyxml: No such file or directory make: *** No rule to make target `clean'. Stop. cannot compile TinyXML ./build_externals_linux.sh: line 77: popd: directory stack empty ./build_externals_linux.sh: line 80: pushd: libtommath: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTM ./build_externals_linux.sh: line 85: popd: directory stack empty ./build_externals_linux.sh: line 88: pushd: libtomcrypt: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTC ./build_externals_linux.sh: line 93: popd: directory stack empty ./build_externals_linux.sh: line 96: pushd: wxwidgets: No such file or directory ./build_externals_linux.sh: line 97: ./configure: No such file or directory Cannot compile wxWidgets ./build_externals_linux.sh: line 104: popd: directory stack empty ./build_externals_linux.sh: line 107: pushd: webkit: No such file or directory make: *** No rule to make target `clean'. Stop. ./build_externals_linux.sh: line 109: ./WebKitTools/Scripts/build-webkit: No such file or directory Cannot compile WebKit ./build_externals_linux.sh: line 113: popd: directory stack empty what am I missing?

    Read the article

  • Best way to cache apt downloads on a LAN?

    - by Ken Simon
    I have multiple Ubuntu machines at home and a pretty slow internet connection, and sometimes multiple machines need to be updated at once (especially during new Ubuntu releases.) Is there a way where only one of my machines needs to download the packages, and the other machines can use the first machine to get the debs? Does it involve setting up my own local mirror? Or a proxy server? Or can it be made simpler?

    Read the article

  • Open Source Bulletin Board with Facebook Group Integration

    - by Brian
    I'm working on a an open-source community-oriented project which needs a highly social component where users can post discussion topics and questions and interact with each other. It would be ideal to facilitate discussion seamlessly between a bulletin board and Facebook. Has anyone seen such an integration? I'm talking about something that goes beyond a simple FB OAuth and actually synchronizes both forum posts / topics / OAuth / comments. Pretty please if a moderator is going to delete this tell me which StackExchange forum is the appropriate place for posting such an inquiry. :)

    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

  • Cloud proxying service

    - by ChristopherJ
    I have an app that mashes up images from Bing image search, it's hosted on Heroku written in rails. The app is client side in javascript, so the mashup is done on an html5 canvas - this means though that if I fetch the images direct from the Bing server, the canvas gets dirty and I can't save it. As a quick work around, i have set up a route on my rails app that simply proxies the request to Bing and passes the result back through. Obviously this is a very poor performance solution and will eat up my dynos very quickly. Can anyone suggest a more suitable option? At the moment I'm thinking maybe Amazon EC2 with apache mod_rewrite rules would be better performing and more cost effective. Is there a cloud service (or an app I could deploy to a cloud service) that would be more appropriate for proxying requests for me so that my javascript can fetch the images without dirtying the canvas?

    Read the article

  • android shut-down errors / thread problems

    - by iQue
    Im starting to deal with some stuff in my game that I thought were "minor problems" and one of these are that I get an error every time I shut down my game that looks like this: 09-05 21:40:58.320: E/AndroidRuntime(30401): FATAL EXCEPTION: Thread-4898 09-05 21:40:58.320: E/AndroidRuntime(30401): java.lang.NullPointerException 09-05 21:40:58.320: E/AndroidRuntime(30401): at nielsen.happy.shooter.MainGamePanel.render(MainGamePanel.java:94) 09-05 21:40:58.320: E/AndroidRuntime(30401): at nielsen.happy.shooter.MainThread.run(MainThread.java:101) on these lines is my GameViews rendering-method and the line in my Thread that calls my GameViews rendering-method. Im guessing Something in my surfaceDestroyed(SurfaceHolder holder) is wrong, or maybe Im not ending the tread in the right place. My surfaceDestroyed-method: public void surfaceDestroyed(SurfaceHolder holder) { Log.d(TAG, "Surface is being destroyed"); boolean retry = true; ((MainThread)thread).setRunning(false); while (retry) { try { ((MainThread)thread).join(); retry = false; } catch (InterruptedException e) { } } Log.d(TAG, "Thread was shut down cleanly"); } Also, In my activity for this View my onPaus, onDestoy and onStop are empty, do I maybe need to add something there? The crash occurs when I press my home-button on the phone, or any other button that makes the game stop. But as I understand it the onPaus is called when you press the Home-button.. This is really new territory for me so Im sorry if im missing something obvious or something really big. adding my surfaceCreated method asweel since that is where I start this thread: public void surfaceCreated(SurfaceHolder holder) { controls = new GameControls(this); setOnTouchListener(controls); timer1.schedule(new Task(this), 0, delay1); thread.setRunning(true); thread.start(); } and aslong as this is running, my game is rendering and updating.

    Read the article

  • 3D Graphics with XNA Game Studio 4.0 bug in light map?

    - by Eibis
    i'm following the tutorials on 3D Graphics with XNA Game Studio 4.0 and I came up with an horrible effect when I tried to implement the Light Map http://i.stack.imgur.com/BUWvU.jpg this effect shows up when I look towards the center of the house (and it moves with me). it has this shape because I'm using a sphere to represent light; using other light shapes gives different results. I'm using a class PreLightingRenderer: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Dhpoware; using Microsoft.Xna.Framework.Content; namespace XNAFirstPersonCamera { public class PrelightingRenderer { // Normal, depth, and light map render targets RenderTarget2D depthTarg; RenderTarget2D normalTarg; RenderTarget2D lightTarg; // Depth/normal effect and light mapping effect Effect depthNormalEffect; Effect lightingEffect; // Point light (sphere) mesh Model lightMesh; // List of models, lights, and the camera public List<CModel> Models { get; set; } public List<PPPointLight> Lights { get; set; } public FirstPersonCamera Camera { get; set; } GraphicsDevice graphicsDevice; int viewWidth = 0, viewHeight = 0; public PrelightingRenderer(GraphicsDevice GraphicsDevice, ContentManager Content) { viewWidth = GraphicsDevice.Viewport.Width; viewHeight = GraphicsDevice.Viewport.Height; // Create the three render targets depthTarg = new RenderTarget2D(GraphicsDevice, viewWidth, viewHeight, false, SurfaceFormat.Single, DepthFormat.Depth24); normalTarg = new RenderTarget2D(GraphicsDevice, viewWidth, viewHeight, false, SurfaceFormat.Color, DepthFormat.Depth24); lightTarg = new RenderTarget2D(GraphicsDevice, viewWidth, viewHeight, false, SurfaceFormat.Color, DepthFormat.Depth24); // Load effects depthNormalEffect = Content.Load<Effect>(@"Effects\PPDepthNormal"); lightingEffect = Content.Load<Effect>(@"Effects\PPLight"); // Set effect parameters to light mapping effect lightingEffect.Parameters["viewportWidth"].SetValue(viewWidth); lightingEffect.Parameters["viewportHeight"].SetValue(viewHeight); // Load point light mesh and set light mapping effect to it lightMesh = Content.Load<Model>(@"Models\PPLightMesh"); lightMesh.Meshes[0].MeshParts[0].Effect = lightingEffect; this.graphicsDevice = GraphicsDevice; } public void Draw() { drawDepthNormalMap(); drawLightMap(); prepareMainPass(); } void drawDepthNormalMap() { // Set the render targets to 'slots' 1 and 2 graphicsDevice.SetRenderTargets(normalTarg, depthTarg); // Clear the render target to 1 (infinite depth) graphicsDevice.Clear(Color.White); // Draw each model with the PPDepthNormal effect foreach (CModel model in Models) { model.CacheEffects(); model.SetModelEffect(depthNormalEffect, false); model.Draw(Camera.ViewMatrix, Camera.ProjectionMatrix, Camera.Position); model.RestoreEffects(); } // Un-set the render targets graphicsDevice.SetRenderTargets(null); } void drawLightMap() { // Set the depth and normal map info to the effect lightingEffect.Parameters["DepthTexture"].SetValue(depthTarg); lightingEffect.Parameters["NormalTexture"].SetValue(normalTarg); // Calculate the view * projection matrix Matrix viewProjection = Camera.ViewMatrix * Camera.ProjectionMatrix; // Set the inverse of the view * projection matrix to the effect Matrix invViewProjection = Matrix.Invert(viewProjection); lightingEffect.Parameters["InvViewProjection"].SetValue(invViewProjection); // Set the render target to the graphics device graphicsDevice.SetRenderTarget(lightTarg); // Clear the render target to black (no light) graphicsDevice.Clear(Color.Black); // Set render states to additive (lights will add their influences) graphicsDevice.BlendState = BlendState.Additive; graphicsDevice.DepthStencilState = DepthStencilState.None; foreach (PPPointLight light in Lights) { // Set the light's parameters to the effect light.SetEffectParameters(lightingEffect); // Calculate the world * view * projection matrix and set it to // the effect Matrix wvp = (Matrix.CreateScale(light.Attenuation) * Matrix.CreateTranslation(light.Position)) * viewProjection; lightingEffect.Parameters["WorldViewProjection"].SetValue(wvp); // Determine the distance between the light and camera float dist = Vector3.Distance(Camera.Position, light.Position); // If the camera is inside the light-sphere, invert the cull mode // to draw the inside of the sphere instead of the outside if (dist < light.Attenuation) graphicsDevice.RasterizerState = RasterizerState.CullClockwise; // Draw the point-light-sphere lightMesh.Meshes[0].Draw(); // Revert the cull mode graphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise; } // Revert the blending and depth render states graphicsDevice.BlendState = BlendState.Opaque; graphicsDevice.DepthStencilState = DepthStencilState.Default; // Un-set the render target graphicsDevice.SetRenderTarget(null); } void prepareMainPass() { foreach (CModel model in Models) foreach (ModelMesh mesh in model.Model.Meshes) foreach (ModelMeshPart part in mesh.MeshParts) { // Set the light map and viewport parameters to each model's effect if (part.Effect.Parameters["LightTexture"] != null) part.Effect.Parameters["LightTexture"].SetValue(lightTarg); if (part.Effect.Parameters["viewportWidth"] != null) part.Effect.Parameters["viewportWidth"].SetValue(viewWidth); if (part.Effect.Parameters["viewportHeight"] != null) part.Effect.Parameters["viewportHeight"].SetValue(viewHeight); } } } } that uses three effect: PPDepthNormal.fx float4x4 World; float4x4 View; float4x4 Projection; struct VertexShaderInput { float4 Position : POSITION0; float3 Normal : NORMAL0; }; struct VertexShaderOutput { float4 Position : POSITION0; float2 Depth : TEXCOORD0; float3 Normal : TEXCOORD1; }; VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; float4x4 viewProjection = mul(View, Projection); float4x4 worldViewProjection = mul(World, viewProjection); output.Position = mul(input.Position, worldViewProjection); output.Normal = mul(input.Normal, World); // Position's z and w components correspond to the distance // from camera and distance of the far plane respectively output.Depth.xy = output.Position.zw; return output; } // We render to two targets simultaneously, so we can't // simply return a float4 from the pixel shader struct PixelShaderOutput { float4 Normal : COLOR0; float4 Depth : COLOR1; }; PixelShaderOutput PixelShaderFunction(VertexShaderOutput input) { PixelShaderOutput output; // Depth is stored as distance from camera / far plane distance // to get value between 0 and 1 output.Depth = input.Depth.x / input.Depth.y; // Normal map simply stores X, Y and Z components of normal // shifted from (-1 to 1) range to (0 to 1) range output.Normal.xyz = (normalize(input.Normal).xyz / 2) + .5; // Other components must be initialized to compile output.Depth.a = 1; output.Normal.a = 1; return output; } technique Technique1 { pass Pass1 { VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } PPLight.fx float4x4 WorldViewProjection; float4x4 InvViewProjection; texture2D DepthTexture; texture2D NormalTexture; sampler2D depthSampler = sampler_state { texture = ; minfilter = point; magfilter = point; mipfilter = point; }; sampler2D normalSampler = sampler_state { texture = ; minfilter = point; magfilter = point; mipfilter = point; }; float3 LightColor; float3 LightPosition; float LightAttenuation; // Include shared functions #include "PPShared.vsi" struct VertexShaderInput { float4 Position : POSITION0; }; struct VertexShaderOutput { float4 Position : POSITION0; float4 LightPosition : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; output.Position = mul(input.Position, WorldViewProjection); output.LightPosition = output.Position; return output; } float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { // Find the pixel coordinates of the input position in the depth // and normal textures float2 texCoord = postProjToScreen(input.LightPosition) + halfPixel(); // Extract the depth for this pixel from the depth map float4 depth = tex2D(depthSampler, texCoord); // Recreate the position with the UV coordinates and depth value float4 position; position.x = texCoord.x * 2 - 1; position.y = (1 - texCoord.y) * 2 - 1; position.z = depth.r; position.w = 1.0f; // Transform position from screen space to world space position = mul(position, InvViewProjection); position.xyz /= position.w; // Extract the normal from the normal map and move from // 0 to 1 range to -1 to 1 range float4 normal = (tex2D(normalSampler, texCoord) - .5) * 2; // Perform the lighting calculations for a point light float3 lightDirection = normalize(LightPosition - position); float lighting = clamp(dot(normal, lightDirection), 0, 1); // Attenuate the light to simulate a point light float d = distance(LightPosition, position); float att = 1 - pow(d / LightAttenuation, 6); return float4(LightColor * lighting * att, 1); } technique Technique1 { pass Pass1 { VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } PPShared.vsi has some common functions: float viewportWidth; float viewportHeight; // Calculate the 2D screen position of a 3D position float2 postProjToScreen(float4 position) { float2 screenPos = position.xy / position.w; return 0.5f * (float2(screenPos.x, -screenPos.y) + 1); } // Calculate the size of one half of a pixel, to convert // between texels and pixels float2 halfPixel() { return 0.5f / float2(viewportWidth, viewportHeight); } and finally from the Game class I set up in LoadContent with: effect = Content.Load(@"Effects\PPModel"); models[0] = new CModel(Content.Load(@"Models\teapot"), new Vector3(-50, 80, 0), new Vector3(0, 0, 0), 1f, Content.Load(@"Textures\prova_texture_autocad"), GraphicsDevice); house = new CModel(Content.Load(@"Models\house"), new Vector3(0, 0, 0), new Vector3((float)-Math.PI / 2, 0, 0), 35.0f, Content.Load(@"Textures\prova_texture_autocad"), GraphicsDevice); models[0].SetModelEffect(effect, true); house.SetModelEffect(effect, true); renderer = new PrelightingRenderer(GraphicsDevice, Content); renderer.Models = new List(); renderer.Models.Add(house); renderer.Models.Add(models[0]); renderer.Lights = new List() { new PPPointLight(new Vector3(0, 120, 0), Color.White * .85f, 2000) }; where PPModel.fx is: float4x4 World; float4x4 View; float4x4 Projection; texture2D BasicTexture; sampler2D basicTextureSampler = sampler_state { texture = ; addressU = wrap; addressV = wrap; minfilter = anisotropic; magfilter = anisotropic; mipfilter = linear; }; bool TextureEnabled = true; texture2D LightTexture; sampler2D lightSampler = sampler_state { texture = ; minfilter = point; magfilter = point; mipfilter = point; }; float3 AmbientColor = float3(0.15, 0.15, 0.15); float3 DiffuseColor; #include "PPShared.vsi" struct VertexShaderInput { float4 Position : POSITION0; float2 UV : TEXCOORD0; }; struct VertexShaderOutput { float4 Position : POSITION0; float2 UV : TEXCOORD0; float4 PositionCopy : TEXCOORD1; }; VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; float4x4 worldViewProjection = mul(World, mul(View, Projection)); output.Position = mul(input.Position, worldViewProjection); output.PositionCopy = output.Position; output.UV = input.UV; return output; } float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { // Sample model's texture float3 basicTexture = tex2D(basicTextureSampler, input.UV); if (!TextureEnabled) basicTexture = float4(1, 1, 1, 1); // Extract lighting value from light map float2 texCoord = postProjToScreen(input.PositionCopy) + halfPixel(); float3 light = tex2D(lightSampler, texCoord); light += AmbientColor; return float4(basicTexture * DiffuseColor * light, 1); } technique Technique1 { pass Pass1 { VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } I don't have any idea on what's wrong... googling the web I found that this tutorial may have some bug but I don't know if it's the LightModel fault (the sphere) or in a shader or in the class PrelightingRenderer. Any help is very appreciated, thank you for reading!

    Read the article

  • PokeMMO. How they do it?

    - by RufioLJ
    Well PokeMMO is a JAVA game project which basically is the original FireRed title for the GBA made online. They know this type of projects don't last long because of the copyrighted material used, but they somehow made their client extract resources from ROMS. So they don't offer any copyrighted material on their download. I wonder what technique they could be using for this? All I know is that they use LWJGL.

    Read the article

  • IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?

    - by WilHall
    Earlier, I posted a question asking how to swap fixtures on the fly in a 2D side-scroller using Farseer Physics Engine. The ultimate goal being that the player's physical body changes when the player is in different states (I.e. standing, walking, jumping, etc). After reading this answer, I changed my approach to the following: Create a physical body for each state when the player is loaded Save those bodies and their corresponding states in parallel lists Swap those physical bodies out when the player state changes (which causes an exception, see below) The following is my function to change states and swap physical bodies: new protected void SetState(object nState) { //If mBody == null, the player is being loaded for the first time if (mBody == null) { mBody = mBodies[mStates.IndexOf(nState)]; mBody.Enabled = true; } else { //Get the body for the given state Body nBody = mBodies[mStates.IndexOf(nState)]; //Enable the new body nBody.Enabled = true; //Disable the current body mBody.Enabled = false; //Copy the current body's attributes to the new one nBody.SetTransform(mBody.Position, mBody.Rotation); nBody.LinearVelocity = mBody.LinearVelocity; nBody.AngularVelocity = mBody.AngularVelocity; mBody = nBody; } base.SetState(nState); } Using the above method causes an IndexOutOfRangeException when calling World.Step: mWorld.Step(Math.Min((float)nGameTime.ElapsedGameTime.TotalSeconds, (1f / 30f))); I found that the problem is related to changing the .Enabled setting on a body. I tried the above function without setting .Enabled, and there was no error thrown. Turning on the debug views, I saw that the bodies were updating positions/rotations/etc properly when the state was changes, but since they were all enabled, they were just colliding wildly with each other. Does Enabling/Disabling a body remove it from the world's body list, which then causes the error because the list is shorter than expected? Update: For such a straightforward issue, I feel this question has not received enough attention. Has anyone else experienced this? Would anyone try a quick test case? I know this issue can be sidestepped - I.e. by not disabling a body during the simulation - but it seems strange that this issue would exist in the first place, especially when I see no mention of it in the documentation for farseer or box2d. I can't find any cases of the issue online where things are more or less kosher, like in my case. Any leads on this would be helpful.

    Read the article

  • cannot convert from 'cli::array<Type> ^' to 'cli::array<Type> ^[]'

    - by user1576628
    I'm pretty new to C++/CLI and I am trying to convert a System::String to a System::Char array. Here's what I have so far: private: System::Void modeToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { Mode frmMode; if(frmMode.ShowDialog() == System::Windows::Forms::DialogResult::OK){ array <Char>^ load [] = gcnew array<Char>(txtbxName->Text->ToCharArray()); } } txtbxName is a textbox inside a the form. Supposedly, this should work, but I get the compiler error: error C2440: cannot convert from 'cli::array<Type> ^' to 'cli::array<Type> ^[]' for the fourth line of the snippet.

    Read the article

  • JAVA setlayout(null)

    - by niv zatl
    I use setLayout (null) and I'm trying to place the buttons and textfield places I know by x, y The problem when I run the program no matter what software (Eclipse, bluej) I need to run on the panel with the mouse until I stand on the position of the button and I can see it. When I find the textfield, it is small and only when I start writing it became the size I set it Does anyone know how to solve it?

    Read the article

  • Inotifywait doesn't run command

    - by Marius Miliunas
    I have a basic inotifywait script called watch.sh and a few files ending in .styl in the same directory. Here's the script, that catches the changes, but doesn't execute the code within the do/done I init it like sh watch.sh and here's the script #!/bin/sh while inotifywait -m -o ./log.txt -e modify ./*.styl; do stylus -c %f done I tried having echo "hi" within the exec portion but nothing executes

    Read the article

  • FLV Player Skin Custom URL

    - by Chris
    I have a flash banner ad (AS3) which uses a FLV Player component for a remove video. The Skin exports it's own SWF file for user with the video controls as I'm sure anyone familiar with Flash knows. Is there anyway to specify where this file is remotely? I have to provide 1 file to my advertiser, and do not want to have to create custom video controls for this. Is it possible to upload this swf file to a remote location and tell Flash to pull it from there? Any help would be greatly appreciated.

    Read the article

  • Spring Data MongoDB Date between two Dates

    - by sics
    i'm using Spring Data for MongoDB and got the following classes class A { List<B> b; } class B { Date startDate; Date endDate; } when i save an object of A it gets persisted like { "_id" : "DQDVDE000VFP8E39", "b" : [ { "startDate" : ISODate("2009-10-05T22:00:00Z"), "endDate" : ISODate("2009-10-29T23:00:00Z") }, { "startDate" : ISODate("2009-11-01T23:00:00Z"), "endDate" : ISODate("2009-12-30T23:00:00Z") } ] } Now i want to query the db for documents matching entries in b where a given date is between startDate and endDate. Query query = new Query(Criteria.where("a").elemMatch( Criteria.where("startDate").gte(date) .and("endDate").lte(date) ); Which results in the following mongo query: { "margins": { "$elemMatch": { "startDate" : { "$gte" : { "$date" : "2009-11-03T23:00:00.000Z"}}, "endDate" : { "$lte" : { "$date" : "2009-11-03T23:00:00.000Z"}} } } } but returns no resulting documents. Does anybody know what i'm doing wrong? I don't get it... Thank you very much in advance!!

    Read the article

  • Problems with http://wall.plasm.it/examples/example-the-wall/ - Images

    - by wolfau
    It is probably piece of cake for You, but I'm in the black hole now and I don't know what is the problem with The Wall. I would like to do something as www.wall.plasm.it/examples/example-the-wall/. Please - look at: www.megainstal.pl/ there is not any images. Could You help with fix it? I will be really grateful for any help/information. Short story: 1) I download the files from github: https://github.com/plasm/the-wall 2) I changed only 3 files: 01-wall.css, index.html, 01-wall.js (case: basic) 3) in 01-wall.js I declared images: var a = new Element("img[src=../../img/middle/"+counterFluid+".jpg]"); 4) images that are: 1 to 76.jpg Could you point me to where I making a mistake? If You going to see source files - I zip that's all in the one file: files.zip S. from Poland Thank You in advance!

    Read the article

  • nth-of-type only working for 1 and 2

    - by Owen O'Neill
    I have a styling problem, I am using WordPress and want to do have the first two classes completely different to the others. My ideal situation is to have: .si-biplace:nth-of-type(3) { float:left; margin:20px 0px 0px 0px; } .si-image:nth-of-type(3) { float:left; margin:20px 0px 0px 0px; border:0px; } .si-title:nth-of-type(3) { width:100px; height:20px; margin:0px; font-size:7px; color:#FFFFFF; font-weight:bold; } They seem to work fine when it is: .si-biplace { float:left; margin:-10px 0px 0px 0px; } .si-biplace:nth-of-type(2) { float:left; margin:-10px 0px 0px 15px; } Is there a reason why it will not work with nth-of-type(3) but will with nth of type 2? I basically want different attributes for every next time the div is used but cannot have separate div classes as it runs through a php array.

    Read the article

  • jQuery is it possible to concatenate two selector variables?

    - by Kris Hollenbeck
    Lets say I have two variables defining separate selectors, for example... var parent = $('.parent'); var child = $('.child'); And I want to create a something like the following... $(parent + child).click(); Which should be equivalent to doing this (if it was correct syntax)... $('.parent .child').click(); This may not be best practice, however I am curious if it is possible. Thanks for your help in advance.

    Read the article

  • UnboundLocalError: local variable 'rows' referenced before assignment

    - by patrick
    i'm trying to make a database connection by an other script. But the script didn't work propperly. and if I do a 'print' on the rows then I get the value 'null' But if I use a 'select * from incidents' query then i get the result from the table incidents. import database rows = database.database("INSERT INTO incidents VALUES(3 ,'test_title1', 'test', TO_DATE('25-07-2012', 'DD-MM-YYYY'), CURRENT_TIMESTAMP, 'sector', 50, 60)") #print database.database() print rows database.py script: import psycopg2 import sys import logfile def database(query): logfile.log(20, 'database.py', 'Executing...') con = None try: con = psycopg2.connect(database='incidents', user='ipfit5', password='tester') cur = con.cursor() #print query cur.execute(query) rows = cur.fetchall() con.commit() #test row does work #cur.execute("INSERT INTO incidents VALUES(3 ,'test_titel1', 'test', TO_DATE('25-07-2012', 'DD-MM-YYYY'), CURRENT_TIMESTAMP, 'sector', 50, 60)") except: logfile.log(40, 'database.py', 'Er is iets mis gegaan') logfile.log(40, 'database.py', str(sys.exc_info())) finally: if con: con.close() return rows

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >