Search Results

Search found 437 results on 18 pages for 'luke sheppard'.

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

  • How to repeat a POST request using Chrome's developer tools?

    - by Luke The Obscure
    Not sure if this is the right stack exchange to ask this, but here goes... I'm trying to wean myself off of Firebug, which has served me very well for a lot of years. One feature that seems to be missing in Chrome's dev tools is the ability to repeat an AJAX POST. In firebug I can right click on the request in the console and hit "Open in new tab" and the request is repeated exactly as it was originally sent. In Chrome, the same action just does a normal GET on the link, without any of the post data. Is there any way to repeat an AJAX POST in Chrome's dev tools?

    Read the article

  • The idea of functionN in Scala / Functionaljava

    - by Luke Murphy
    From brain driven development It turns out, that every Function you’ll ever define in Scala, will become an instance of an Implementation which will feature a certain Function Trait. There is a whole bunch of that Function Traits, ranging from Function1 up to Function22. Since Functions are Objects in Scala and Scala is a statically typed language, it has to provide an appropriate type for every Function which comes with a different number of arguments. If you define a Function with two arguments, the compiler picks Function2 as the underlying type. Also, from Michael Froh's blog You need to make FunctionN classes for each number of parameters that you want? Yes, but you define the classes once and then you use them forever, or ideally they're already defined in a library (e.g. Functional Java defines classes F, F2, ..., F8, and the Scala standard library defines classes Function1, ..., Function22) So we have a list of function traits (Scala), and a list of interfaces (Functional-java) to enable us to have first class funtions. I am trying to understand exactly why this is the case. I know, in Java for example, when I write a method say, public int add(int a, int b){ return a + b; } That I cannot go ahead and write add(3,4,5); ( error would be something like : method add cannot be applied to give types ) We simply have to define an interface/trait for functions with different parameters, because of static typing?

    Read the article

  • Black screen white cursor and can't boot from live disc that I installed from just yesterday (Ubuntu 12.04)

    - by Luke
    So, I've decided to change to Ubuntu from Windows 7 after reformatting. Install goes smoothly, I've set everything up, and it works for a day. It crashed when I had a full screen video, froze, so I rebooted, and now I can't get past the black screen with flashing white underscore cursor. If I wait a while, I get "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press any key" I've tried that, removed any boot options but the DVD drive, even tried my Windows 7 boot CD as well. Nothing boots, so I can't do anything. This is on an Asus A52N laptop, and all I can access now is the BIOS (version K52N 217), as far as I can tell.

    Read the article

  • Structure of a Git repository

    - by Luke Puplett
    Sorry if this is a duplicate, I looked. We're moving to Git. In Subversion, I'm used to having \trunk, \branches and \tags folders. With Git, switching between branches will replace the contents of the working directory, so am I right to assume that the way we used to work just doesn't apply with Git? My guess is that I'd have a repo folder with maybe a gitignore and readme.txt, then the folders for the projects that make up the repo, and that's it.

    Read the article

  • Game engine lib and editor

    - by luke
    I would like to know the best way/best practice to handle the following situation. Suppose the project you are working on is split in two sub-projects: game engine lib editor gui. Now, you have a method bool Method( const MethodParams &params ) that will be called during game-level initialization. So it is a method belonging to the game engine lib. Now, the parameters of this method, passed as a reference the structure MethodParams can be decided via the editor, in the level design phase. Suppose the structure is the following: enum Enum1 { E1_VAL1, E1_VAL2, }; enum Enum2 { E2_VAL1, E2_VAL2, E2_VAL3, }; struct MethodParams { float value; Enum1 e1; Enum2 e2; // some other member } The editor should present a dialog that will let the user set the MethodParams struct. A text control for the field value. Furthermore, the editor needs to let the user set the fields e1 and e2 using, for example, two combo boxes (a combo box is a window control that has a list of choices). Obviously, every enum should be mapped to a string, so the user can make an informed selection (i have used E1_VAL1 etc.., but normally the enum would be more meaningful). One could even want to map every enum to a string more informative (E1_VAL1 to "Image union algorithm", E1_VAL2 to "Image intersection algorithm" and so on...). The editor will include all the relevant game egine lib files (.h etc...), but this mapping is not automatic and i am confused on how to handle it in a way that, if in future i add E1_VAL3 and E1_VAL4, the code change will be minimal.

    Read the article

  • Mouse click firing twice

    - by Luke
    I have recently switched to XUbuntu (14.04) and I have noticed that sometimes a mouse click is fired twice. E.g. I CTRL click a link and two tabs with the same content are opened in my browser. It's not behaviour I can reproduce consistently and seems to be random (to me). I also don't know of a good way to inspect the behaviour properly for debugging purposes. I have checked the double click time setting but this doesn't seem to have any impact on this. I also run XUbuntu (13.10) in a VM on my MacBook Air and this behaviour seems to absent there. At this point in time I can't really tell if this is related to the distribution or the fact that it runs in a VM. Any insights greatly appreciated.

    Read the article

  • Starting application in same window with XFCE4 Terminal and i3

    - by Luke
    Since recently I'm enjoying the i3 tiled window manager. I did install the XFCE4 Terminal since it gives greater control over my terminal look and feel however but I have noticed an issue with starting GUI based applications. When I execute a GUI based application I want it take over the current terminal window. To do this I use exec, as in: exec eclipse This will open a new window and leave the terminal I started the application in open as well. In normal circumstances this is not much of a problem since I can easily do an Alt-W on the GUI app's window. However, for some applications, like a file manager, it is necessary to open in the same window. How can I make GUI application open in the same window rather than opening a new one?

    Read the article

  • Implementing Camera Zoom in a 2D Engine

    - by Luke
    I'm currently trying to implement camera scaling/zoom in my 2D Engine. Normally I calculate the Sprite's drawing size and position similar to this pseudo code: render() { var x = sprite.x; var y = sprite.y; var sizeX = sprite.width * sprite.scaleX; // width of the sprite on the screen var sizeY = sprite.height * sprite.scaleY; // height of the sprite on the screen } To implement the scaling i changed the code to this: class Camera { var scaleX; var scaleY; var zoom; var finalScaleX; // = scaleX * zoom var finalScaleY; // = scaleY * zoom } render() { var x = sprite.x * Camera.finalScaleX; var y = sprite.y * Camera.finalScaleY; var sizeX = sprite.width * sprite.scaleX * Camera.finalScaleX; var sizeY = sprite.height * sprite.scaleY * Camera.finalScaleY; } The problem is that when the zoom is smaller than 1.0 all sprites are moved toward the top-left corner of the screen. This is expected when looking at the code but i want the camera to zoom on the center of the screen. Any tips on how to do that are welcome. :)

    Read the article

  • Using foldr to append two lists together (Haskell)

    - by Luke Murphy
    I have been given the following question as part of a college assignment. Due to the module being very short, we are using only a subset of Haskell, without any of the syntactic sugar or idiomatic shortcuts....I must write: append xs ys : The list formed by joining the lists xs and ys, in that order append (5:8:3:[]) (4:7:[]) => 5:8:3:4:7:[] I understand the concept of how foldr works, but I am only starting off in Functional programming. I managed to write the following working solution (hidden for the benefit of others in my class...) : However, I just can't for the life of me, explain what the hell is going on!? I wrote it by just fiddling around in the interpreter, for example, the following line : foldr (\x -> \y -> x:y) [] (2:3:4:[]) which returned [2:3:4] , which led me to try, foldr (\x -> \y -> x:y) (2:3:4:[]) (5:6:7:[]) which returned [5,6,7,2,3,4] so I worked it out from there. I came to the correct solution through guess work and a bit of luck... I am working from the following definition of foldr: foldr = \f -> \s -> \xs -> if null xs then s else f (head xs) (foldr f s (tail xs) ) Can someone baby step me through my correct solution? I can't seem to get it....I already have scoured the web, and also read a bunch of SE threads, such as How foldr works

    Read the article

  • Protecting a webpage with an authentication form

    - by Luke
    I have created an employee webpage with a lot of company info, links, etc., but I want to protect the page because it contains some confidential company information. I am running IIS7.5 on Windows Server 2008 R2, and I already have the site setup as a normal, non-protected site. I want all active directory users to have access to the site. This is not an intranet site, it is exposed to the internet. I tried setting it up using Windows Authentication, but I had problems with multiple login prompts, etc. I just want a simple form for users to enter their credentials and have access to the site, and I need it to query the AD for login. I've searched the web for a guide on this, but I can't seem to find one that fits my situation. This is not a Web App. It is just a simple html site. Does anyone have any suggestions or a link to a guide on this? Thanks so much! -LB

    Read the article

  • What techniques can I use to render very large numbers of objects more efficiently in OpenGL?

    - by Luke
    You can think of my application as drawing a very large ball-and-stick diagram (or graph). At times, this graph can get very large, where the number of elements even outnumbers the pixels on the screen. Currently I am simply passing all of my textures (as GL_POINTS) and lines to the graphics card using VBO's. When the number of elements outnumbers the number of pixels, is this the most efficient way to do this? Or should I do some calculations on the CPU side before handing everything over to the GPU? If it matters, I do use GL_DEPTH_TEST and GL_ALPHA_TEST. I do some alpha blending, but probably not enough to make a huge performance difference. My scene can be static at times, but the user has control over a typical arc-ball camera and can pan, rotate, or zoom. It is during these operations that performance degradation is noticeable.

    Read the article

  • java.lang.NoSuchMethodError: main when starting HelloWorld with Eclipse Scala plugin

    - by Matt Sheppard
    I've just been playing with Scala, and installed the Eclipse plugin as described at http://www.scala-lang.org/node/94, but after entering the "Hello World" test example and setting up the run configuration as described, I get the following error Exception in thread "main" java.lang.NoSuchMethodError: main For reference the code is package hello object HelloWorld extends Application { println("Hello World!") } I've tinkered a bit with the obvious solutions (adding a main method, adding a singleton object with a main method) but I'm clearly doing something wrong. Can anyone get their test example to work, or point out what I am doing wrong?

    Read the article

  • C# Training Quizzes

    - by John Sheppard
    Hello there, I have been programming 10 years, mostly in vba and vb.net but I know c# well enough to program what I normally do. I yesterday was applying for a Senior c# position and I did so poorly on the induction test its not funny :) I have always found that for me the best way to learn and recall is via question's and answers (multichoice and short answer). That is, a question is posed and after I answer instant feedback is given as to whether I choose right or wrong and the reasons why. As such I was wondering if anyone knew of or could recommend a C# quiz website. Something like a daily c# quiz to keep my brain up to date and fresh if I'm not always programming in it. Not something wimpy either. Something that does everything. Paying is not an obstacle, id prefer to pay for a good resource than muck around. Thank you

    Read the article

  • Avoiding display of Visual Studio Debugger when starting a new process from within java.exe

    - by Matt Sheppard
    How can I, from within a java program on windows, prevent a debugger window being displayed if a program I invoke crashes, and how can I detect the fact that it has crashed? Background I have a problem with a java application running on Windows which is launching an unreliable third party program by way of ProcessBuilder.start(). Specifically, if the external program crashes, the 'Visual Studio Just-In-time Debugger' window pops up asking if the user wants to debug the program. From the java application side, I'm happy to deal with the fact that under some circumstances, the third party program will crash, but I'd like to be able to detect and silently handle that situation from within the Java code without requiring any user interaction.

    Read the article

  • Escape apostrophes inside double quoted strings (Javascript)

    - by George Sheppard
    Say i have a string that i need to evaluate in javascript such as : window.some_class.update( 'Runner', 'update_runner', '{"runner":{"id":"1","name":"Nin's Lad" } }'); In order for eval() to evaluate it, i need to escape the apostrophe in runner_name (Nin's Lad). Is this possable with regex? I dont want to escape the single quotes around Runner and update_runner. I'd just like to escape any single quotes inside double quotes. Thanks,

    Read the article

  • Reading Windows ACLs from Java

    - by Matt Sheppard
    From within a Java program, I want to be able to list out the Windows users and groups who have permission to read a given file. Obviously Java has no built-in ability to read the Windows ACL information out, so I'm looking for other solutions. Are there any third party libraries available which can provide direct access to the ACL information for a Windows file? Failing that, maybe running cacls and capturing and then processing the output would be a reasonable temporary solution - Is the output format of cacls thoroughly documented anywhere, and is it likely to change between versions of Windows?

    Read the article

  • Avoiding string copying in Lua

    - by Matt Sheppard
    Say I have a C program which wants to call a very simple Lua function with two strings (let's say two comma separated lists, returning true if the lists intersect at all, false if not). The obvious way to do this is to push them onto the stack with lua_pushstring, which works fine, however, from the doc it looks like lua_pushstring but makes a copy of the string for Lua to work with. That means that to cross over to the Lua function is going to require two string copies which I could avoid by rewriting the Lua function in C. Is there any way to arrange things so that the existing C strings could be reused on the Lua side for the sake of performance (or would the strcpy cost pale into insignificance anyway)? From my investigation so far (my first couple of hours looking seriously at Lua), lite userdata seems like the sort of thing I want, but in the form of a string.

    Read the article

  • Intermittent NoClassDefFoundError error running Selenium JUnit tests

    - by Matt Sheppard
    For some time, I've been running a substantial set of JUnit / Selenium tests against a number of platforms on a nightly basis. Intermittently (about once in every 40 runs), all the tests for a given platform fail with a NoClassDefFoundError on the common superclass of all my tests as follows. java.lang.NoClassDefFoundError: [common super class of all my selenium tests] at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) Re-invoking the tests will generally get the tests running normally, so it's clearly something dependent on some condition I am not considering. What might be causing this error to occur seemingly randomly?

    Read the article

  • Dump Microsoft SQL Server database to an SQL script

    - by Matt Sheppard
    Is there any way to export a Microsoft SQL Server database to an sql script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script which will recreate all the tables, stored procedures, reinsert all the data etc. I've seen http://vyaskn.tripod.com/code.htm#inserts, but I ideally want something to recreate everything (not just the data) which works in a single step to produce the final script.

    Read the article

  • Safely turning a JSON string into an object

    - by Matt Sheppard
    Given a string of JSON data, how can you safely turn that string into a JavaScript object? Obviously you can do this unsafely with something like... var obj = eval("(" + json + ')'); ...but that leaves us vulnerable to the json string containing other code, which it seems very dangerous to simply eval.

    Read the article

  • Best programming based games

    - by Matt Sheppard
    Back when I was at school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but I remember it quite fondly, even if I can't remember the name. Are there any good modern day equivalents?

    Read the article

  • Download and Share Visual Studio Color Schemes

    - by ScottGu
    As developers we often spend a large part of our day staring at code within Visual Studio.  If you are like me, after awhile the default VS text color scheme starts to get a little boring. The good news is that Visual Studio allows you to completely customize the editor background and text colors to whatever you want – allowing you to tweak them to create the experience that is “just right” for your eyes and personality.  You can then optionally export/import your color scheme preferences to an XML file via the Tools->Import and Export Settings menu command. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] New website that makes it easy to download and share VS color schemes Luke Sampson launched the http://studiostyles.info/ site a week ago (built using ASP.NET MVC 2, ASP.NET 4 and VS 2010). Studiostyles.info enables you to easily browse and download Visual Studio color schemes that others have already created.  The color schemes work for both VS 2008 and VS 2010 (all versions – including the free VS express editions): Color schemes are sorted by popularity and voting (you can vote on whether you find each “hot or not”).  You can click any of the schemes to see screen-shots of it in use for common coding scenarios.  You can then download the color settings for either VS 2010 or VS 2008: You can also optionally upload color schemes of your own if you have a good one you want to share with others.  If you haven’t visited it yet – check it out: http://studiostyles.info/  And thank you Luke Sampson for building it! Hope this helps, Scott

    Read the article

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