Daily Archives

Articles indexed Wednesday October 17 2012

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

  • Need help to install persistent Ubuntu on USB drive

    - by Junior
    I am a new user of Ubuntu. I would like to install a persistent Ubuntu 11.04 to my USB stick, and it should be able to work as a guest OS running on Windows so that I can boot it on other computers other than the one which I used for the installation. I have used several creators such as unetbootin, however from my understanding it can only create Live Linux which I am unable to save my configurations and files. If it's possible I would like to bypass the BIOS, that is to say that I can just load from the virtual machine without having to restart the computer. Thanks in advance!

    Read the article

  • Reinstalling GRUB2 on Ubuntu 12.04 | Windows 7 dual boot after Windows reinstallation

    - by Shasteriskt
    So I had the perfect Ubuntu 12 / Windows 7 dual boot set-up -- until I had to re-install Windows 7. After the deed, GRUB2 was of course wiped out, thus my Ubuntu installation is rendered inaccessible. I have tried these steps: mount /dev/sda5 /mnt #This is where my Ubuntu installation resides. mount /dev/sda1 /mnt/boot #Indicated by the `*` under `Boot` when doing `fdisk -l` mount --bind /mnt/proc /proc mount --bind /mnt/sys /sys mount --bind /mnt/dev /dev sudo chroot mnt sudo grub-install /dev/sda sudo update-grub #Then unmounted everything... Unfortunately, only my Windows 7 has been detected and the Ubuntu entries never appeared in the prompt. Only my Windows 7 installation (/dev/sda1) is available in the GRUB2 menu. How can I rectify this?

    Read the article

  • Netbeans 7.2 Missing Modules Warning

    - by el10780
    Everytime I start Netbeans and the splash screen shows up when it gets to the part to load the modules I receive the following error message : Warning - could not install some modules: Editor Library 2 - None of the modules providing the capability org.netbeans.modules.editor.actions could be installed. Tags Based Editors Library - The module named org.netbeans.modules.editor.deprecated.pre65formatting/0-1 was needed and not found. Java Editor Library - The module named org.netbeans.modules.editor.deprecated.pre65formatting/0-1 was needed and not found. Preprocessor Bridge - None of the modules providing the capability org.netbeans.modules.java.preprocessorbridge.spi.JavaSourceUtilImpl could be installed. Freeform Ant Projects - The module named org.netbeans.modules.editor.indent.project/0-1 was needed and not found. Editor Code Templates - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Static Analysis Core - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Source - The module named org.netbeans.modules.editor.indent.project/0-1 was needed and not found. Eclipse Project Importer - The module named org.netbeans.modules.java.api.common/0-1 was needed and not found. Java Hints SPI - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Refactoring - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Editor - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. Java Editor - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Editor - The module named org.netbeans.modules.editor.deprecated.pre65formatting/0-1 was needed and not found. Java Hints UI - The module named org.netbeans.modules.code.analysis/0-1 was needed and not found. Java Hints UI - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Legacy Java Hints SPI - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Hints - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Java Declarative Hints - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Javadoc - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. Javadoc - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Common Scripting Language API (new) - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. XML Text Editor - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. XML Text Editor - The module named org.netbeans.modules.editor.deprecated.pre65formatting/0-1 was needed and not found. CSS Editor - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. HTML Editor - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. JavaScript Editing - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. JavaScript Hints - The module named org.netbeans.spi.editor.hints/0-1 was needed and not found. Editing Files - The module named org.netbeans.modules.editor.bracesmatching/0-1 was needed and not found. IDE Platform - The module named org.netbeans.modules.editor.macros/0-1 was needed and not found. Java SE Projects - The module named org.netbeans.modules.java.api.common/0-1 was needed and not found. 86 further modules could not be installed due to the above problems. Whatever I press either Exit or Disable Modules and Continue or even I close from the "X" Button the Warning window closes and then Netbeans never starts. I have looked it up on the Internet,but I couldn't find a solution.

    Read the article

  • VLC Ati Radeon 6870 Ubuntu 12.04 image skewed flicker

    - by Aaron
    I'm running Ubuntu 12.04 with ATI Radeon 6870 connected to my 40' Sharp TV. The video image is slightly jigged, like breaking a bit and slightly delayed. It just isn't smooth. The computer is very fast, like i7 with 12gb ram. I tried to run the same video with my mac laptop and on the tv with the same connection cable and it was running smoothly. i tried changing the video output in VLC to x11, increase caching, h264 skip loop filter to all, increase monitor refresh rate although it's already at 60 and it's an LCD tv. this is my xorg.conf : Section "ServerLayout" Identifier "amdcccle Layout" Screen 0 "amdcccle-Screen[3]-0" 0 0 EndSection Section "Module" Load "glx" EndSection Section "Monitor" Identifier "0-DFP9" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" Option "TargetRefresh" "60" Option "Position" "0 0" Option "Rotate" "normal" Option "Disable" "false" Option "PreferredMode" "1920x1080" EndSection Section "Monitor" Identifier "0-DFP10" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" Option "PreferredMode" "1280x1024" Option "TargetRefresh" "60" Option "Position" "0 0" Option "Rotate" "normal" Option "Disable" "false" EndSection Section "Device" Identifier "amdcccle-Device[3]-0" Driver "fglrx" Option "Monitor-DFP9" "0-DFP9" BusID "PCI:3:0:0" EndSection Section "Screen" Identifier "Default Screen" DefaultDepth 24 EndSection Section "Screen" Identifier "amdcccle-Screen[3]-0" Device "amdcccle-Device[3]-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection

    Read the article

  • Can't adjust brightness on a Sony Vaio T13 ultrabook

    - by Alex Barreira
    I recently installed Ubuntu 12.04 alongside Windows 7 in a Vaio T13 ultrabook. I cannot use the the Fn+F4 or Fn+F5 to change the brightness. The bubble appears indicating that brightness is being changed but with no visual impact on the screen. I've tried many solutions involving the manipulation of the /etc/default/grub file but none of them worked. Whenever I tried this manipulation the screen still didn't change, however the bubble stopped functioning properly. This is not a problem of the Fn shortcut. Even when I try to change it in the Brightness and Lock on System Settings, the bar does scroll but the screen remains unchanged. Does any one has a way around this mystery?

    Read the article

  • After update, flash plugin playing video too fast or too slow

    - by John H
    Last night I did an update and reboot. After that, I couldn't reliably play any flash videos. They would either go too fast or stutter (as if they were buffering every 2 seconds). This occurs in both Firefox and Chrome, however I'll troubleshoot in Chrome because it's easier to enable/disable plugins at will. With PPAPI enabled (and npapi disabled), flash videos play at 1.5x speeds and audio is scrambled. With NPAPI enabled (and ppapi disabled), flash videos stutter and skip, despite showing a decent buffer. From one old thread, I went into pavucontrol and tried disabling the high def audio controller. I also tried disabling Totem plugin to no affect. Version other details: Linux freshdesk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS" Shockwave Flash 11.3 r31 /opt/google/chrome/PepperFlash/libpepflashplayer.so 11.3.31.331 PPAPI (out-of-process) Shockwave Flash Version: 11.2 r202 Location: /usr/lib/adobe-flashplugin/libflashplayer.so Type: NPAP 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 8400 GS] (rev a2) 01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)

    Read the article

  • D-Link DWA-125 Wireless network card not working after upgrade from 10.04 to 12.04

    - by dava2788
    I upgraded to Ubuntu 12.04 and now the wireless network card D-Link DWA-125 doesn't work. I have the drivers from the official website, But neither recognized during installation. iwconfig: lo no wireless extensions. vmnet8 no wireless extensions. ra0 Ralink STA Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 invalid crypt:0 invalid misc:0 eth0 no wireless extensions. vmnet1 no wireless extensions. dava@Dava-Ubuntu:~$ lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 006: ID 07d1:3c0d D-Link System DWA-125 Wireless N 150 Adapter(rev.A1) [Ralink RT3070] And the chipset: ralink 2870/3070 (rt3070)

    Read the article

  • RunninG GareNa On Ubuntu 11.10

    - by DarKoza
    Maybe I am boring,it's third question already.. How to run GareNa on Ubuntu 11.10? I started it via Wine,configured it,and in the bottom of the monitor,when it's starting,it's written,GARENA IS STARTING,and then nothing happens.... it's so pity,cause i am a professional dota player,i switched to linux yesterday at night. i am very pleased with the interface speed and such things but i can't get started my favourite programms Here.. Can any1 Help Me. thanks anyway again -_-

    Read the article

  • Will URL encoding the image names

    - by TheGateKeeper
    Just wondering if it makes any difference to Google whether or not I URL encode the image names when linking to them. For example if I have an image named "test-1234-!.jpg", does it make a difference if I name it refer to it as "test-1234-%21.jpg"? The reason I am asking is because I am doing a major shift in the way my website works and while all new image names will not be URL encoded, all of the past ones are. I want to see if it is worth it renaming all of them or if I should just leave it like that.

    Read the article

  • How do I add shadow mapping?

    - by Jasper Creyf
    How do I add shadow mapping? I don't care if it uses GLSL it just has to work. I have been searching on stencil shadows and shadow mapping, all the examples given did nothing, if you don't understand that it means not even a single shadow is even being rendered. If you know how to add stencil shadows or shadow mapping, then please show some java code and if you're using GLSL then please show the code for them too.

    Read the article

  • How can I make an MMORPG appeal to casual players?

    - by Philipp
    I believe that there is a significant market of players who would enjoy the exploration and interaction aspects of MMORPGs, but simply don't have the time for the endless grinding marathons which are part of the average MMORPG. MMORPGs are all about interaction between players. But when different players have different amounts of time to invest into a game, those with less time to spend will soon lack behind their power-leveling friends and won't be able to interact with them anymore. One way to solve this would be to limit the progress a player can achieve per day, so that it simply doesn't make sense to play more than one or two hours a day. But even the busiest casual players sometimes like to spend a whole sunday afternoon playing a video game. Just stopping them after two hours would be really frustrating. It also creates a pressure to use the daily progress limit every day, because otherwise the player would feel like wasting something. This pressure would be detrimental for casual gamers. What else could be done to level the playing field between those players who play 40+ hours a week and those who can't play more than 10?

    Read the article

  • Coding Dynamic Events?

    - by Joey Green
    I have no idea what the title of this question should be so bare with me. My game has turns. On a turn a player does something and this can result in a random number of explosions that occur at different times. I know when the explosions are done. I need to know when ALL are done and then do some other action. Also, each explosion is the same amount of time, say 3 seconds.. Right now I'm thinking of using a counter to hold how many explosions are happening. Then once the explosion is finished decrement this counter. Once the counter is zero, do my action. This idea is inspired by objective-c memory management btw. Anyways, does this sound like a good approach or would there be another way. An alternative might be to figure out the explosion who happened last and let it be responsible for calling this subsequent action. I'm asking mostly, because I haven't done this before and am trying to figure out if there are bugs that may occur that I'm not foreseeing.

    Read the article

  • How to label a cuboid?

    - by usha
    Hi this is how my 3dcuboid looks, I have attached the complete code. I want to label this cuboid using different names across sides, how is this possible using opengl on android? public class MyGLRenderer implements Renderer { Context context; Cuboid rect; private float mCubeRotation; // private static float angleCube = 0; // Rotational angle in degree for cube (NEW) // private static float speedCube = -1.5f; // Rotational speed for cube (NEW) public MyGLRenderer(Context context) { rect = new Cuboid(); this.context = context; } public void onDrawFrame(GL10 gl) { // TODO Auto-generated method stub gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); // Reset the model-view matrix gl.glTranslatef(0.2f, 0.0f, -8.0f); // Translate right and into the screen gl.glScalef(0.8f, 0.8f, 0.8f); // Scale down (NEW) gl.glRotatef(mCubeRotation, 1.0f, 1.0f, 1.0f); // gl.glRotatef(angleCube, 1.0f, 1.0f, 1.0f); // rotate about the axis (1,1,1) (NEW) rect.draw(gl); mCubeRotation -= 0.15f; //angleCube += speedCube; } public void onSurfaceChanged(GL10 gl, int width, int height) { // TODO Auto-generated method stub if (height == 0) height = 1; // To prevent divide by zero float aspect = (float)width / height; // Set the viewport (display area) to cover the entire window gl.glViewport(0, 0, width, height); // Setup perspective projection, with aspect ratio matches viewport gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix gl.glLoadIdentity(); // Reset projection matrix // Use perspective projection GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f); gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix gl.glLoadIdentity(); // Reset } public void onSurfaceCreated(GL10 gl, EGLConfig config) { // TODO Auto-generated method stub gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to black gl.glClearDepthf(1.0f); // Set depth's clear-value to farthest gl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden surface removal gl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice perspective view gl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color gl.glDisable(GL10.GL_DITHER); // Disable dithering for better performance }} public class Cuboid{ private FloatBuffer mVertexBuffer; private FloatBuffer mColorBuffer; private ByteBuffer mIndexBuffer; private float vertices[] = { //width,height,depth -2.5f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, -2.5f, 1.0f, -1.0f, -2.5f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -2.5f, 1.0f, 1.0f }; private float colors[] = { // R,G,B,A COLOR 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f, 0.0f, 1.0f, 1.0f, 0.5f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f }; private byte indices[] = { // VERTEX 0,1,2,3,4,5,6,7 REPRESENTATION FOR FACES 0, 4, 5, 0, 5, 1, 1, 5, 6, 1, 6, 2, 2, 6, 7, 2, 7, 3, 3, 7, 4, 3, 4, 0, 4, 7, 6, 4, 6, 5, 3, 0, 1, 3, 1, 2 }; public Cuboid() { ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length * 4); byteBuf.order(ByteOrder.nativeOrder()); mVertexBuffer = byteBuf.asFloatBuffer(); mVertexBuffer.put(vertices); mVertexBuffer.position(0); byteBuf = ByteBuffer.allocateDirect(colors.length * 4); byteBuf.order(ByteOrder.nativeOrder()); mColorBuffer = byteBuf.asFloatBuffer(); mColorBuffer.put(colors); mColorBuffer.position(0); mIndexBuffer = ByteBuffer.allocateDirect(indices.length); mIndexBuffer.put(indices); mIndexBuffer.position(0); } public void draw(GL10 gl) { gl.glFrontFace(GL10.GL_CW); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer); gl.glColorPointer(4, GL10.GL_FLOAT, 0, mColorBuffer); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_COLOR_ARRAY); gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, mIndexBuffer); gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); gl.glDisableClientState(GL10.GL_COLOR_ARRAY); } } public class Draw3drect extends Activity { private GLSurfaceView glView; // Use GLSurfaceView // Call back when the activity is started, to initialize the view @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); glView = new GLSurfaceView(this); // Allocate a GLSurfaceView glView.setRenderer(new MyGLRenderer(this)); // Use a custom renderer this.setContentView(glView); // This activity sets to GLSurfaceView } // Call back when the activity is going into the background @Override protected void onPause() { super.onPause(); glView.onPause(); } // Call back after onPause() @Override protected void onResume() { super.onResume(); glView.onResume(); } }

    Read the article

  • Lifting vehicles (and spawners) using InterActors, strange collisions causing flying vehicles

    - by Gareth Jones
    Making a VCTF map with the Unreal Tournament 3 Editor, and thus have vehicles in it. Currently I have 2 walkways next to each other (Big enough for a vehicle). One of them (A InterActor) drops down, and a grate covers the hole until the vehicle respawns. Once its respawned the InterActor Walkway lifts the vehicle up (and the grate pulls back). However what I'm finding is that the vehicle seems to collide with something when it gets near the top. (Looks something like this: ----_ where _ is the moving InterActor and - is a walkway) I created a new map to test this, and found it seems the front of the scorpion collides with the walkway in front of it, however I don't know why, it physically (in terms of how it looks in game) does not touch the walkway in front of it, but its actions look like it has. Im using InterActors, and a vehicle spawner, looking like so How do I stop this from happening? Right now everything is perfect, except the vehicle keeps flying away every time its lifted up, likes it been forced in between the "lift" and another object!

    Read the article

  • Which are the cons of using only non-member functions and POD?

    - by Miro
    I'm creating my own game engine. I've read these articles and this question about DOD and it was written to not use member functions and classes. I also heard some criticism to this idea. I can write it using member functions or non-member functions it would be similar. So what are the benefits/cons of that approach or when the project grows, does any of these approaches give clearer and better manageable code? With POD & non-member functions I don't have to make struct members public I can still use object id outside of engine like OpenGL does with all it's stuff, so It's not about encapsulation. POD - plain old data DOD - data oriented design

    Read the article

  • Where should I place my reaction code in Per-Pixel Collision Detection?

    - by CJ Cohorst
    I have this collision detection code: public bool PerPixelCollision(Player player, Game1 dog) { Matrix atob = player.Transform * Matrix.Invert(dog.Transform); Vector2 stepX = Vector2.TransformNormal(Vector2.UnitX, atob); Vector2 stepY = Vector2.TransformNormal(Vector2.UnitY, atob); Vector2 iBPos = Vector2.Transform(Vector2.Zero, atob); for(int deltax = 0; deltax < player.playerTexture.Width; deltax++) { Vector2 bpos = iBPos; for (int deltay = 0; deltay < player.playerTexture.Height; deltay++) { int bx = (int)bpos.X; int by = (int)bpos.Y; if (bx >= 0 && bx < dog.dogTexture.Width && by >= 0 && by < dog.dogTexture.Height) { if (player.TextureData[deltax + deltay * player.playerTexture.Width].A > 150 && dog.TextureData[bx + by * dog.Texture.Width].A > 150) { return true; } } bpos += stepY; } iBPos += stepX; } return false; } What I want to know is where to put in the code where something happens. For example, I want to put in player.playerPosition.X -= 200 just as a test, but I don't know where to put it. I tried putting it under the return true and above it, but under it, it said unreachable code, and above it nothing happened. I also tried putting it by bpos += stepY; but that didn't work either. Where do I put the code?

    Read the article

  • Passing functor and function pointers interchangeably using a templated method in C++

    - by metroxylon
    I currently have a templated class, with a templated method. Works great with functors, but having trouble compiling for functions. Foo.h template <typename T> class Foo { public: // Constructor, destructor, etc... template <typename Func> void bar(T x, Func f); }; template <typename T> template <typename Func> Foo::bar(T x, Func f) { /* some code here */ } Main.cpp #include "Foo.h" template <typename T> class Functor { public: Functor() {} void operator()(T x) { /* ... */ } private: /* some attributes here */ }; void Function(T x) { /* ... */ } int main() { Foo<int> foo; foo.bar(2, Functor); // No problem foo.bar(2, Function); // <unresolved overloaded function type> return 0; }

    Read the article

  • Returning mySQL error with jQuery & AJAX

    - by kel
    I've got a form inserting data into mySQL. It works but I'm trying to add error handling in case something happens. If I break the Insert statements mySQL dies but I'm still getting a success message on the front end. What am I doing wrong? AJAX function postData(){ var employeeName = jQuery('#employeeName').val(); var hireDate = jQuery('#hireDate').val(); var position = jQuery('#position').val(); var location = jQuery('#location').val(); var interveiwer = jQuery('#interviewersID').val(); var q01 = jQuery('#q01').val(); var q02 = jQuery('#q02').val(); var q03 = jQuery('#q03').val(); var q04 = jQuery('#q04').val(); var q05 = jQuery('#q05').val(); var summary = jQuery('#summary').val(); jQuery.ajax({ type: 'POST', url: 'queryDay.php', data: 'employeeName='+ employeeName +'&hireDate='+ hireDate +'&position='+ position +'&location='+ location +'&interveiwer='+ interveiwer +'&q01='+ q01 +'&q02='+ q02 +'&q03='+ q03 +'&q04='+ q04 +'&q05='+ q05 +'&summary='+ summary, success: function(){ jQuery('#formSubmitted').show(); }, error: function(jqXHR, textStatus, errorThrown){ jQuery('#returnError').html(errorThrown); jQuery('#formError').show(); } }); }; PHP require_once 'config.php'; $employeeName = $_POST['employeeName']; $hireDate = $_POST['hireDate']; $position = $_POST['position']; $location = $_POST['location']; $interviewerID = $_POST['interveiwer']; $q01 = $_POST['q01']; $q02 = $_POST['q02']; $q03 = $_POST['q03']; $q04 = $_POST['q04']; $q05 = $_POST['q05']; $summary = $_POST['summary']; mysql_query("INSERT INTO employee (name, hiredate, position, location) VALUES ('$employeeName', '$hireDate', '$position', '$location')") or die (mysql_error()); $employeeID = mysql_insert_id(); mysql_query("INSERT INTO day (employee, interviewer, datetaken, q01, q02, q03, q04, q05, summary) VALUES ('$employeeID', '$interviewerID', NOW(), '$q01', '$q02', '$q03', '$q04', '$q05', '$summary')") or die (mysql_error());

    Read the article

  • Which is faster when animating the UI: a Control or a Picture?

    - by Christopher Walker
    /I'm working with and testing on a computer that is built with the following: {1 GB RAM (now 1.5 GB), 1.7 GHz Intel Pentium Processor, ATI Mobility Radeon X600 GFX} I need scale / transform controls and make it flow smoothly. Currently I'm manipulating the size and location of a control every 24-33ms (30fps), ±3px. When I add a 'fade' effect to an image, it fades in and out smoothly, but it is only 25x25 px in size. The control is 450x75 px to 450x250 px in size. In 2D games such as Bejeweled 3, the sprites animate with no choppy animation. So as the title would suggest: which is easier/faster on the processor: animating a bitmap (rendering it to the parent control during animation) or animating the control it's self?

    Read the article

  • JSONP parsing error from WCF

    - by user1754730
    Answered my own question I had a problem with a jquery (jsonp) call to a WCF service that was throwing a json parsing error. Using ASP.NET 4.0 on the WCF side and jquery 1.7 on the client side. Turned out there was an old set of script tags on the page using language = VBSCRIPT. The browser was interpreting the returned json packet of script as "VBscript" instead of javascript. I placed a set of empty javascript tags at the top of the page and the browser is now interpreting the json as the proper javascript function. Hope this helps someone else. Tom

    Read the article

  • Mysqli prepared insert statements always returning false

    - by user1754679
    I'm writing prepared statements that are supposed to insert data into a table, on a database that's been pre-selected in the variable $GLOBALS['mysqli']. The connection has been tested, and that's not the problem I'm having. I'm only running into trouble whenever my prepared statement involves INSERT INTO. I know the tablename, and field names are correct, but $stmt is ALWAYS false. What gives? $stmt = $GLOBALS['mysqli']->prepare("INSERT INTO audit_RefreshCount (user, count, lastrefresh) values (?,?,?)"); if ($stmt == TRUE) { $stmt->bindParam('ssi', $_SESSION['username'], '0', time()); //$stmt->bind_Param('ssi', $_SESSION['username'], '0', time()); // Also doesn't work. $stmt->execute(); }

    Read the article

  • Difference between two PHP times as years, months and days for PHP version 5.2

    - by Dominor Novus
    Forward: I've scanned through the existing questions/answers on this matter. This is not a duplicitous question; I cannot find a working solution from the accepted answers. The main questions/answers I've reviewed can be found here: How to calculate the difference between two dates using PHP? What I need: A calucalation of the difference between two dates expressed as years, months and days that works with PHP version: 5.2. <?php $current_date = date('d-M-Y'); $future_date = '2012-11-01'; ?> What I've tried: Most answers I find online don't seem to exact in that they don't factor in leap years. This highly rated answer won't work because DateTime-diff() is php 5.3+. This accepted answer results in (i.e. the second block of code aimed at PHP 5.2) results in the following being parsed: Array ( [y] = 25 [m] = 11 [d] = 7 [h] = 3 [i] = 15 [s] = 19 [invert] = 0 [days] = 9473 ) Array ( [y] = 25 [m] = 11 [d] = 7 [h] = 3 [i] = 15 [s] = 19 [invert] = 1 [days] = 9473 ) I can't tell if I've incorrectly applied the code or it's simply a case of me not knowing how to manipulate the array.

    Read the article

  • Fancybox close button not showing when using different template

    - by VeraG
    I have a page where I need to use 2 different FancyBox styles for different elements on the page. To achieve that, I added tpl option and modified stylesheet accordingly. Here is what I have: $(document).ready(function() { $(".login").fancybox({ closeClick : false, closeBtn : true, tpl: { wrap : '<div class="fancybox-wrap1" tabIndex="-1"><div class="fancybox-skin1"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>' } }); }); In my CSS, I added new styles for .fancybox-wrap1 and .fancybox-skin1. Styles work great BUT on the FancyBox with modified template "close" button completly disappears! I tried both adding and deleting closeBtn from tpl but it doesn't seem to make any difference. I also have a demo here (eventually I will need different background-images for FancyBox, not just background-color, that's why I'm doing it). What am I doing wrong? Any help will be greatly appreciated!

    Read the article

  • php Undefined index but i can access that key anyways

    - by Linas
    I just don't get it, i know what the error means i know how to fix it but it seems to be more of a php bug, i have an array returned from some function which looks like this when i use var_dump: array(1) { ["89512480-1884-11e2-aee6-618bca23e5b1"]=> array(5) { ["created"]=> string(10) "1350514509" ["expires"]=> string(10) "1351724109" ["token"]=> string(40) "81fa1895a6d5d4cb11efae8e71adf98fbdbfb5ca" ["user_agent"]=> string(40) "6ab18a2ea1d4b17d67713e416b07d46bf2f4d03b" ["username"]=> string(4) "test" } } array(0) { } but if i try for example: echo $token['89512480-1884-11e2-aee6-618bca23e5b1']['user_agent']; it shows me the value, but at the same time i get that annoying error, what the hell?

    Read the article

  • Working with QWords

    - by Glenn1234
    I'm learning and in the course of that working on an assembler conversion which uses QWORDs a lot (x86-32bit). Now my reference material doesn't have anything on working with such values beyond the obvious of splitting them up into the 32-bit registers. I guess they're on the old side. The newer processors have mmx and sse instructions and the like. Would I be served well to look into those instructions for solving this? What is the best way to handle doing work on QWORD values?

    Read the article

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