Daily Archives

Articles indexed Saturday December 8 2012

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Setting up ASP.NET structure for code

    - by user1175327
    I've always coded in C# MVC3 when developing web applications. But now i wanted to learn a bit more about developing web sites with just ASP.NET. But now i'm wondering what a good setup for my code would be. For me, an MVC like pattern seems to be a good way to go. But obviously ASP.NET doesn't have any router and controller classes. So i guess people have a different way of setting up their code when they do ASP.NET. So i'm looking for more information on how to get started with this. So not really the basics of ASP.NET, but something that focuses on a good code setup. Any good tutorials/information about this/?

    Read the article

  • Learning node.js

    - by john smith
    I am not sure if this is the right place to ask but, I thought this was the most suitable. I recently graduated from university. Learned the full php stack; basically all the LAMP stuff, obviously without counting all the other subjects. Not even got my degree and this whole node.js booming out of nowhere. You can imagine how one can feel about this, the story is always the same: you never end learning, and studying. So I recently got my hands on node.js; reading books, tutorials, and everything imaginable on the internet. The problem is one and simple: this is nowhere near to having a teacher standing near you helping you understanding and solving your problems, especially when all you can do is post your doubts on a website and patiently wait for replies. It's not that it isn't good, it's just much slower than what I just expressed above. So, in short words: is there a place where one can find someone willing to teach you about such contents? This would obviously done via remote means, like skype and such. Can anyone here point me into the right direction? Or just downvote me for being in the wrong website? Thanks in advance.

    Read the article

  • Desktop interface crashes after software updates

    - by N.C. Weber
    Recently, after installing Ubuntu software updates on the evening of December 7th, 2012, my desktop interface crashes regularly leaving me with a command line screen with a long string of automated commands showing (I assume what goes on behind the pretty desktop). At first, I thought it was only crashing whenever I played DirectX games in WINE, but now it crashes if I open the native Firefox browser or if it's doing nothing at all but sitting there. Apport attempts to report the bugs after restart, but often they crash as well. I've done a SMART check on the hard drive, and everything report OK. No read errors, no bad sectors. I am using an Acer Extensa 4620Z Memory: 2.0 GiB Processor: Intel Pentium Dual CPU T2370 @ 1.73GHz x 2 GraphicsL: Intel 965GM x86/MMX/SSE2 OS: Ubuntu 12.10 32-bit Disk: 116.0 GB with 33.4 GB Available

    Read the article

  • how to install g++ and openJDK from .deb package

    - by Saurav Shekhar
    I have recently started using ubuntu 12.04 for my dell inspiron 5500 15r. I want to install g++ and javac on my ubuntu.Since my USB modem doesn't support ubuntu i cannot connect my ubuntu to the internet.I have the .deb package of g++-4.4 GNU C++ compiler and openJDK Java 6 Runtime with me. Please explain to me in detail how to install them to my ubuntu. Thank You Saurav Shekhar ph-+91 895 344 1464

    Read the article

  • How do I fix a noisy input device (Internal Mic)? snd_hda_intel - debug included

    - by hazrpg
    As the title says, I'm having trouble with a very noisy audio input device - the internal mic or any plugged in mics. So far I've narrowed it down to an problem in ALSA since my debug info is showing a lot of "null" values. Can anyone help? Debug Info: http://www.alsa-project.org/db/?f=e0c6fb7e10624bf7691aa2b405cf0d3968e56c63 Exert from the debug: model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)

    Read the article

  • Setting up UPS monitoring

    - by Andrew Heath
    I have acquired a second hand Uninterrupted Power Supply (UPS) that I have refurbished (new battery) and hope to use with my Ubuntu 12.10 system. It's a SOLA 330 with serial out. I have installed NUT Metapackage and NUT Monitor from Software Centre, but am not sure how to go about setting it all up. A Google search brings up several ways of configuring Network UPS Tools (NUT) or HAL-Drivers, however, HAL-Drivers appears to be obsolete and many commands and config files mentioned to edit do not exist in 12.10 or the current version of NUT (most articles are a few years old). One tutorial seemed to work except the Error: no UPS definitions found in ups.conf even though ups.conf has values in it as laid out in the tutorial. How do I go about setting my system to monitor the UPS for a shut down signal? Also, is there a command to determine the UPS is communicating through the serial connection and on what port (to help with setup and configuring, eg. /dev/ttyS0 is mentioned in one of the tutorials I read).

    Read the article

  • Issue with running apt-get clean && apt-get autoclean

    - by nishanche
    root@T60ubuntuSVR:~# apt-get clean && apt-get autoclean Reading package lists... Done Building dependency tree Reading state information... Done root@T60ubuntuSVR:~# deborphan | xargs aptitude --purge remove The program 'deborphan' is currently not installed. You can install it by typing: apt-get install deborphan The following packages will be REMOVED: amarok-help-en{pu} dnsmasq-base{pu} kvpnc-data{pu} libnetfilter-conntrack3{pu} libutouch-evemu1{pu} libutouch-frame1{pu} libutouch-geis1{pu} libutouch-grail1{pu} linux-headers-3.2.0-24{pu} linux-headers-3.2.0-24-generic-pae{pu} linux-headers-3.2.0-25{pu} linux-headers-3.2.0-25-generic-pae{pu} linux-headers-3.2.0-26{pu} linux-headers-3.2.0-26-generic-pae{pu} linux-headers-3.2.0-27{pu} linux-headers-3.2.0-27-generic-pae{pu} linux-headers-3.2.0-29{pu} linux-headers-3.2.0-29-generic-pae{pu} linux-headers-3.2.0-31{pu} linux-headers-3.2.0-31-generic-pae{pu} linux-headers-3.2.0-32{pu} linux-headers-3.2.0-32-generic-pae{pu} linux-headers-3.2.0-33{pu} linux-headers-3.2.0-33-generic-pae{pu} modemmanager{pu} usb-modeswitch{pu} usb-modeswitch-data{pu} The following partially installed packages will be configured: linux-generic-pae linux-image-generic-pae{b} 0 packages upgraded, 0 newly installed, 27 to remove and 50 not upgraded. Need to get 0 B of archives. After unpacking 554 MB will be freed. The following packages have unmet dependencies: linux-image-generic-pae : Depends: linux-image-3.2.0-34-generic-pae but it is not going to be installed. The following actions will resolve these dependencies: Remove the following packages: 1) linux-generic-pae 2) linux-image-generic-pae Please tell me how to fix it.

    Read the article

  • Eclipse won't start on Ubuntu 12.10

    - by Rajat Saxena
    I've set up my Eclipse with all the plugins necessary for Android development on Ubuntu 12.04.Now I'm on Ubuntu 12.10 and Eclipse wont start.When I navigate to the Eclipse directory and issue ./eclipse in the command prompt,it says command not found.I've already chmodded +x the eclipse executable file.Just for the record,my eclipse directory is not in home folder,it's on another partition of my hdd.Any ideas?

    Read the article

  • Is there a shell-independent search tool like the Unity's Dash?

    - by Bucic
    The only thing I will miss after moving to LXDE from Unity will be the Unity Dash. Its functionality, not the piss-poor performance that is. So here's my question. I know there is synapse but AFAIK it only returns text, without multiple large-sized thumbnails of files etc. ** I'm looking for a tool with thumb ailing capability. Immediate presentation of recently used files and apps is also a must.** Please don't be afraid of the NO answer. Related question: Any search tool for LXDE menu?

    Read the article

  • "/etc/init.d/networking restart" with non-root user

    - by bonchen
    I have a thin client with 112mb RAM which boots ubuntu server 12.04.1 from a usb drive with openbox and it is to be used by students to communicate with cisco equipment. And because of this the students need to be able to reconfigure the network interface and then restart it without a reboot using the only user - cisco. This is what I have so far: adduser cisco usermod -a -G dialout cisco chown root:cisco /etc/network/interfaces chmod 664 /etc/network/interfaces chmod u+s /sbin/shutdown chmod u+s /sbin/reboot chmod u+s /sbin/poweroff chmod u+s /run/network/if* chmod u+s /sbin/ifdown chmod u+s /sbin/ifup And when I run /etc/init.d/networking restart as cisco I get: *Reconfiguring network interfaces... rm: cannot remove `eth0.dhclient': Permission denied Failed to send flush request: Operation not permitted RTNETLINK answers: Operation not permitted Any ideas on how to get this working? Thanks!

    Read the article

  • Google earth will not reinstall

    - by chad
    I was trying to perform the the fix found at this link http://www.omgubuntu.co.uk/2012/01/how-to-make-google-earth-look-native-in-ubuntu It requires you to delete certain files from the /opt/google/earth/free folder and then add some new ones that you download. I deleted the files but the links to download the new ones were unusable. I was using gksudo nautilus so trash was disabled meaning I could not restore the files I had deleted. I the tried to go to the Google Earth website and reinstall it. I downloaded the .deb but when I tried to install it it gav me an error message saying "cannot install ia32-libs" I tried installing this via terminal and it gave me an error message saying chad@chad-Lenovo-G570:~$ sudo apt-get install ia32-libs [sudo] password for chad: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages. How do I fix this? Now I am stuck without a functioning Google Earth. How can I fix this?

    Read the article

  • Is 301 redirect sufficient to solve WWW and HTTP/S duplication?

    - by Thomas Ojo
    I was reading about this article - SEO preference for WWW or HTTP:// protocol redirection? Do www websites rank better than NON-www? I have same problem but I needed a help on this further. What about https:// How will this be treated? Is the redirect 301 sufficient to solve the problem? I have a SEO company that says if possible, i should not have redirect but I don't think this is visible? Does permanent redirect in any way have effect on SEO services if properly done?

    Read the article

  • Difficulties with rotation of a sprite

    - by Johnny
    I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I want that it rotates like a real dolphin does. How can I improve the rotation? public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D image, water; float Gravity = 5.0F; float Acceleration = 20.0F; Vector2 Position = new Vector2(1200,720); Vector2 Velocity; float rotation = 0; SpriteEffects flip; Vector2 Speed = new Vector2(0, 0); public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferHeight = 720; } protected override void Initialize() { base.Initialize(); } protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); image = Content.Load<Texture2D>("cartoondolphin"); water = Content.Load<Texture2D>("background"); flip = SpriteEffects.None; } protected override void Update(GameTime gameTime) { float VelocityX = 0f; float VelocityY = 0f; float time = (float)gameTime.ElapsedGameTime.TotalSeconds; KeyboardState kbState = Keyboard.GetState(); if(kbState.IsKeyDown(Keys.Left)) { rotation = 0; flip = SpriteEffects.None; VelocityX += -5f; } if(kbState.IsKeyDown(Keys.Right)) { rotation = 0; flip = SpriteEffects.FlipHorizontally; VelocityX += 5f; } // jump if the dolphin is under water if(Position.Y >= 670) { if (kbState.IsKeyDown(Keys.A)) { if (flip == SpriteEffects.None) { rotation += 0.01f; VelocityY += 40f; } else { rotation -= 0.01f; VelocityY += 40f; } } } else { if (flip == SpriteEffects.None) { rotation -= 0.01f; VelocityY += -10f; } else { rotation += 0.01f; VelocityY += -10f; } } float deltaY = 0; float deltaX = 0; deltaY = Gravity * (float)gameTime.ElapsedGameTime.TotalSeconds; deltaX += VelocityX * (float)gameTime.ElapsedGameTime.TotalSeconds * Acceleration; deltaY += -VelocityY * (float)gameTime.ElapsedGameTime.TotalSeconds * Acceleration; Speed = new Vector2(Speed.X + deltaX, Speed.Y + deltaY); Position += Speed * (float)gameTime.ElapsedGameTime.TotalSeconds; Velocity.X = 0; if (Position.Y + image.Height/2 > graphics.PreferredBackBufferHeight) Position.Y = graphics.PreferredBackBufferHeight - image.Height/2; base.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); spriteBatch.Draw(water, new Rectangle(0, graphics.PreferredBackBufferHeight -100, graphics.PreferredBackBufferWidth, 100), Color.White); spriteBatch.Draw(image, Position, null, Color.White, rotation, new Vector2(image.Width / 2, image.Height / 2), 1, flip, 1); spriteBatch.End(); base.Draw(gameTime); } }

    Read the article

  • Setting a leader from a sprite array

    - by Craig
    I'm looking to set a leader from an array of sprites, I keep on getting a NullReferenceException was unhandled error from within my main game class when calling the UpdateMouse Method. What have I dont wrong here? class MouseSprite { Random random = new Random(); private MouseSprite leader; public void UpdateBoundaryBox() { mouseBounds.X = (int)mousePosition.X - mouseTexture.Width / 2; mouseBounds.Y = (int)mousePosition.Y - mouseTexture.Height / 2; } public void UpdateMouse(Vector2 position, MouseSprite [] mice, int numberMice, int index) { Vector2 catPosition = position; int enemies = numberMice; this.alive = true; mice[random.Next(0, mice.Length)] = leader;

    Read the article

  • How can I pass an array of floats to the fragment shader using textures?

    - by James
    I want to map out a 2D array of depth elements for the fragment shader to use to check depth against to create shadows. I want to be able to copy a float array into the GPU, but using large uniform arrays causes segfaults in openGL so that is not an option. I tried texturing but the best i got was to use GL_DEPTH_COMPONENT glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 512, 512, 0, GL_DEPTH_COMPONENT, GL_FLOAT, smap); Which doesn't work because that stores depth components (0.0 - 1.0) which I don't want because I have no idea how to calculate them using the depth value produced by the light sources MVP matrix multiplied by the coordinate of each vertex. Is there any way to store and access large 2D arrays of floats in openGL?

    Read the article

  • Touch Event Not Work With PinchZoom

    - by Siddharth
    I was implemented pinch zoom functionality for my tower of defense game. I manage different entity to display all the towers. From that entity game player select the tower and drag to the actual position where he want to plot the tower. I set the entity in HUD also, so user scroll and zoom the region, the tower become visible all the time. Basically I have created the different entity to show and hide towers only so I can manage it easily. My problem is when I have not perform the scroll and zoom the tower touch and the dragging easily done but when I zoom and scroll the scene at that time the tower touch event does not call so the player can not able to drag and drop it to actual position. So anybody please help me to come out of it.

    Read the article

  • Alchemy like game for the web, open source. Any ideas for element combinations?

    - by JohnDel
    I created a web game like the Android game Alchemy. It's open source and in the back-end you can create your own elements / your own game. I was wondering what elements - ideas would be good to implement as a prototype / demo? Some ideas are: Colors Programming languages Chemical Compounds Same as the original alchemy Evolution of biological organisms What do you think? Any specific combination ideas?

    Read the article

  • c# scripting execution with xna (actions take more than 1 frame)

    - by user658091
    I'm trying to figure out how to implement c# scripting into my game (XNA with C#). I will be using C# as the scripting language. My question is, how to call functions that take more than 1 frame to finish? For example: class UserScript : Script { public override void execute(Game game) { //script must wait for dialog to be closed game.openDialog("This is a dialog"); //script should'nt wait for this int goldToGive = 100; goldToGive += 100; game.addGold(goldToGive); // //script should wait for cinematic to end game.startCinematic("name_of_cinematic"); //doesn't wait game.addGold(100); } } I found that you can do that with yield, but I'm not sure if it's the correct way (It's from 2010, the article mentioned no longer exists). http://stackoverflow.com/questions/3540231/implementing-a-simple-xml-based-scripting-language-for-an-xna-game Is yield the answer? If so, can anyone point me any examples/tutorials/books? I haven't found any regarding my situation. If not, what approach should I take? or am I better off with multi-threading?

    Read the article

  • Character jump animation is not working when i hit the space bar

    - by muzzy
    i am having an issue with my game in XNA. My jump sprite sheet for my character does not trigger when i hit the space bar. I cant seem to find the problem. Please help me. I am also put the code below to make things easier. namespace WindowsGame4 { public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; // start of new code Texture2D playerWalk; // sprite sheet of walk cycle (14 frames) Texture2D idle; // idle animation Texture2D jump; // jump animation Vector2 playerPos; // to hold x and y position info for the player Point frameDimensions; // to hold width and height values for the frames int presentFrame; // to record which frame we are on at any given time int noOfFrames; // to hold the total number of frames in the spritesheet int elapsedTime; // to know how long each frame has been shown int frameDuration; // to hold info about how long each frame should be shown SpriteEffects flipDirection; // SpriteEffects object int speed; //rate of movement int upMovement; int downMovement; int rightMovement; int leftMovement; int jumpApex; string state; //this is going to be "idle","walking" or "jumping". KeyboardState previousKeyboardState; Vector2 originalPlayerPos; Vector2 movementDirection; Vector2 movementSpeed; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } protected override void Initialize() { // textures will be defined in the LoadContent() method playerPos = new Vector2(0, 200); // starting position for the player is at the left of the screen, and a Y position of 200 frameDimensions = new Point(55, 65); // each frame in the idle sprite sheet is 55 wide by 65 high presentFrame = 0; // start at frame 0 noOfFrames = 5; // there are 5 frames in the idle cycle elapsedTime = 0; // set elapsed time to start at 0 frameDuration = 80; // 80 milliseconds is how long each frame will show for (the higher the number, the slower the animation) flipDirection = SpriteEffects.None; // set the value of flipDirection to none speed = 200; upMovement = -2; downMovement = 2; rightMovement = 1; leftMovement = -1; jumpApex = 100; state = "idle"; previousKeyboardState = Keyboard.GetState(); originalPlayerPos = Vector2.Zero; movementDirection = Vector2.Zero; movementSpeed = Vector2.Zero; base.Initialize(); } protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); playerWalk = Content.Load<Texture2D>("sprites/walkSmall"); // load the walk cycle spritesheet idle = Content.Load<Texture2D>("sprites/idleCycle"); // load the idle cycle sprite sheet jump = Content.Load<Texture2D>("sprites/jump"); // load the jump cycle sprite sheet } protected override void UnloadContent() // we're not using this method at the moment { } protected override void Update(GameTime gameTime) // Update method - used it to call a number of other methods { if (Keyboard.GetState().IsKeyDown(Keys.Escape)) { this.Exit(); // Exit the game if the Escape key is pressed } KeyboardState presentKeyboardState = Keyboard.GetState(); UpdateMovement(presentKeyboardState, gameTime); UpdateIdle(presentKeyboardState, gameTime); UpdateJump(presentKeyboardState); UpdateAnimation(gameTime); playerPos += movementDirection * movementSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds; previousKeyboardState = presentKeyboardState; base.Update(gameTime); } private void UpdateAnimation(GameTime gameTime) { elapsedTime += gameTime.ElapsedGameTime.Milliseconds; if (elapsedTime > frameDuration) { elapsedTime -= frameDuration; elapsedTime = elapsedTime - frameDuration; presentFrame++; if (presentFrame > noOfFrames) if (state != "jumping") { presentFrame = 0; } else { presentFrame = 8; } } } protected void UpdateMovement(KeyboardState presentKeyboardState, GameTime gameTime) { if (state == "idle") { movementSpeed = Vector2.Zero; movementDirection = Vector2.Zero; if (presentKeyboardState.IsKeyDown(Keys.Left)) { state = "walking"; movementSpeed.X = speed; movementDirection.X = leftMovement; flipDirection = SpriteEffects.FlipHorizontally; } if (presentKeyboardState.IsKeyDown(Keys.Right)) { state = "walking"; movementSpeed.X = speed; movementDirection.X = rightMovement; flipDirection = SpriteEffects.None; } } } private void UpdateIdle(KeyboardState presentKeyboardState, GameTime gameTime) { if ((presentKeyboardState.IsKeyUp(Keys.Left) && previousKeyboardState.IsKeyDown(Keys.Left) || presentKeyboardState.IsKeyUp(Keys.Right) && previousKeyboardState.IsKeyDown(Keys.Right) && state != "jumping")) { state = "idle"; } } private void UpdateJump(KeyboardState presentKeyboardState) { if (state == "walking" || state == "idle") { if (presentKeyboardState.IsKeyDown(Keys.Space) && !presentKeyboardState.IsKeyDown(Keys.Space)) { presentFrame = 1; DoJump(); } } if (state == "jumping") { if (originalPlayerPos.Y - playerPos.Y > jumpApex) { movementDirection.Y = downMovement; } if (playerPos.Y > originalPlayerPos.Y) { playerPos.Y = originalPlayerPos.Y; state = "idle"; movementDirection = Vector2.Zero; } } } private void DoJump() { if (state != "jumping") { state = "jumping"; originalPlayerPos = playerPos; movementDirection.Y = upMovement; movementSpeed = new Vector2(speed, speed); } } protected override void Draw(GameTime gameTime) // Draw method { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); // begin the spritebatch if (state == "walking") { noOfFrames = 14; frameDimensions = new Point(55, 65); Vector2 playerWalkPos = new Vector2(playerPos.X, playerPos.Y - 28); spriteBatch.Draw(playerWalk, playerWalkPos, new Rectangle((presentFrame * frameDimensions.X), 0, frameDimensions.X, frameDimensions.Y), Color.White, 0, Vector2.Zero, 1, flipDirection, 0); } if (state == "idle") { noOfFrames = 5; frameDimensions = new Point(55, 65); Vector2 idlePos = new Vector2(playerPos.X, playerPos.Y - 28); spriteBatch.Draw(idle, idlePos, new Rectangle((presentFrame * frameDimensions.X), 0, frameDimensions.X, frameDimensions.Y), Color.White, 0, Vector2.Zero, 1, flipDirection, 0); } if (state == "jumping") { noOfFrames = 9; frameDimensions = new Point(55, 92); Vector2 jumpPos = new Vector2(playerPos.X, playerPos.Y - 28); spriteBatch.Draw(jump, jumpPos, new Rectangle((presentFrame * frameDimensions.X), 0, frameDimensions.X, frameDimensions.Y), Color.White, 0, Vector2.Zero, 1, flipDirection, 0); } spriteBatch.End(); // end the spritebatch commands base.Draw(gameTime); } } }

    Read the article

  • How should I organise classes for a space simulator?

    - by Peteyslatts
    I have pretty much taught myself everything I know about programming, so while I know how to teach myself (books, internet and reading API's), I'm finding that there hasn't been a whole lot in the way of good programming. I am finishing up learning the basics of XNA and I want to create a space simulator to test my knowledge. This isn't a full scale simulator, but just something that covers everything I learned. It's also going to be modular so I can build on it, after I get the basics down. One of the early features I want to implement is AI. And I want to take this into account as I'm designing my classes so I can minimize rewriting code. So my question: How should I design ship classes so that both the player and AI can use them? The only idea I have so far is: Create a ship class that contains stats, models, textures, collision data etc. The player and AI would then have the data for position, rotation, health, etc and would base their status off of the ship stats.

    Read the article

  • Square game map rendered as sphere

    - by Roflha
    For a hobby project of mine I have created a finite voxel world (similar to Minecraft), but as I said, mine is finite. When you reach the edge of it, you are sent to the other side. That is all working fine along with rendering the far side of the map, but I want to be able to render this grid as a sphere. Looking down from above, the world is a square. I basically want to be able to represent a portion of that square as a sphere, as if you were looking at a planet. Right now I am experimenting with taking a circular section of the map, and rendering that, but it look to flat (no curvature around the edges). My question then, is what would be the best way to add some curvature to the edges of a 2d circle to make it look like a hemisphere. However, I am not overly attached to this implementation so if somebody has some other idea for representing the square as a planet, I am all ears.

    Read the article

  • Rendering performance in FlasCC + UDK when compared to Stage3d and UDK on Windows?

    - by Arthur Wulf White
    Adobe recently released the Flash C++ Compiler, which UDK uses to target Flash Player. Developers can now access UDK for browser applications. Does this mean greater performance than using a Stage3D engine (Away3D 4) and how much of a noticeable difference in performance would it make in rendering speeds? Is there any benchmark you could propose that would allow to compare them fairly? I am asking this to help myself understand the consequences in performance for deciding to use UDK in a browser based game. I would also like to know how it compares with UDK running natively in Windows? I am not asking which technology to use or which is better. Only interested in optimizing rendering speed in a 3d browser game with flash.

    Read the article

  • Why is my socket closing?

    - by Tommy3244
    Ok, so I am making a multiplayer game. I am working out the kinks in the server/client connectivity system. I can't seam to work out this error. Mainly, my server code does the following: Accepts Client Using SocketServer Module CLIENT -- SERVER sends Login byte (1 byte) + login username and password (200 bytes) SERVER request for 1 byte by struct.calcsize('b') CLIENT has exception on read SERVER recieves byte from CLIENT and sends CLIENT a struct packed byte with the value of 4 SERVER has exception on send So, it is the client excepting. The client exception is: socket.error: (10054, 'Connection reset by peer') And the server error is this: error: (9, 'Bad file descriptor')

    Read the article

  • Update graph in real time from server

    - by user1869421
    I'm trying to update a graph with received data, so that the height of the bars increase as more data is received from the server via a websocket. But my code doesn't render a graph in the browser and plot the data points. I cannot see anything wrong with the code. I really need some help here please. ws = new WebSocket("ws://localhost:8888/dh"); var useData = [] //var chart; var chart = d3.select("body") .append("svg:svg") .attr("class", "chart") .attr("width", 420) .attr("height", 200); ws.onmessage = function(evt) { var distances = JSON.parse(evt.data); data = distances.miles; console.log(data); if(useData.length <= 10){ useData.push(data) } else { var draw = function(data){ // Set the width relative to max data value var x = d3.scale.linear() .domain([0, d3.max(useData)]) .range([0, 420]); var y = d3.scale.ordinal() .domain(useData) .rangeBands([0, 120]); var rect = chart.selectAll("rect") .data(useData) // enter rect rect.enter().append("svg:rect") .attr("y", y) .attr("width", x) .attr("height", y.rangeBand()); // update rect rect .attr("y", y) .attr("width", x) .attr("height", y.rangeBand()); var text = chart.selectAll("text") .data(useData) // enter text text.enter().append("svg:text") .attr("x", x) .attr("y", function (d) { return y(d) + y.rangeBand() / 2; }) .attr("dx", -3) // padding-right .attr("dy", ".35em") // vertical-align: middle .attr("text-anchor", "end") // text-align: right .text(String); // update text text .data(useData) .attr("x", x) .text(String); } useData.length = 0; } } Thanks

    Read the article

  • How to add a sequence column to an existing table with records

    - by user1888543
    I had created a new table named USERLOG with two fields from a previous VIEW. The table already consist of about 9000 records. The two fields taken from the VIEW, i.e. weblog_views consist of IP (consists of IP address), and WEB_LINK (consists of URL). This is the code I used, CREATE TABLE USERLOG AS SELECT C_IP, WEB_LINK FROM weblog_views; I want to add another column to this table called the USER_ID, which would consists of a sequence starting with 1 to 9000 records to create a unique id for each existing rows. I need help with this part. I'm using Oracle SQL Developer: ODMiner version 3.0.04. I tried using the AUTO-INCREMENT option, ALTER TABLE USERLOG ADD USER_ID INT UNSIGNED NOT NULL AUTO_INCREMENT; But I get an error with this, Error report: SQL Error: ORA-01735: invalid ALTER TABLE option 01735. 00000 - "invalid ALTER TABLE option" So, I would really appreciate any help that I can get!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >