Search Results

Search found 1007 results on 41 pages for 'kevin'.

Page 27/41 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • I want to use the fleximage gem and s3 for storage, but don't want dev/qa/test env's to use s3

    - by Kevin Bedell
    I have a rails app that I'm going to host on engineyard and want to store image files on s3. But I don't know if I want all developer machines to beusing s3 for storage of all our test and dev images. Maybe it's not an issue -- but it seems like a waste to have everyone storing all our images in s3. I've heard of some ppl who store images on s3 'hacking' dev environments to store images locally on the file system -- and then using s3 in prod only. What are other people doing?

    Read the article

  • How to wire a verifier to a 2.0m5 Restlet using the spring extension and an xml config?

    - by Kevin Pauli
    I can't seem to find any example of how to do this. Imperatively in java it would be a piece of cake of course, but I can't seem to figure out how to inject my JaasVerifier into my SpringComponent declaratively from within the xml. It appears from the method signatures that Verifier is designed to be attached to Context, but the instance of Context itself is created as a side effect of the SpringComponent creation so I can't get a hold of it in Spring. There must be something I am missing.

    Read the article

  • IDE framework for a dynamic language?

    - by Kevin Reid
    Let's say I have a super-wonderful new programming language, and I want there to be an IDE for it. What IDE platform/framework could I use to get this done efficiently? I mean things like: Collection of files in a project, searching them, tabbed/split editors etc. — the basics. Syntax highlighting and auto-indent/reformatting. Providing the user interface for code completion — hit tab, get a list (I'll have to implement the necessary partial evaluation myself (it's a dynamic language)). This is the feature I'm most wishing for. Built-in parser framework which is good at recovering from the sort of syntax errors occurring in code that is in the middle of being edited would be helpful. In-editor annotation of syntax/runtime error locations fed back from the language runtime. REPL (interactive evaluator) interaction with the same completion as in the editor. This system should be Linux/Mac/Windows cross-platform (in that priority order). Being implemented in Java (or rather, accepting language plugins written in Java) is possibly useful, but anything else is worth a try too.

    Read the article

  • CI PHP if statement w/ sql syntax

    - by Kevin Brown
    This is a quick syntax question... I need to block out an HTML element if two SQL statements are true w/ php. If the status = 'closed', and if the current user is logged in. I can figure out the calls, I just need to see an example of the syntax. :) So, If SQL status=closed, and if current_user=is_logged_in()...something like that.

    Read the article

  • Filemaker XSL Select Column By Name

    - by Kevin Sylvestre
    I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <people> <xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW"> <person> <name> <xsl:value-of select="fm:COL[01]/fm:DATA"/> </name> <location> <xsl:value-of select="fm:COL[02]/fm:DATA"/> </location> </person> </xsl:for-each> </people> </xsl:template> </xsl:stylesheet> Any ideas? Thanks.

    Read the article

  • Simulate Offline Mode for HTML5 Cache Testing

    - by Kevin Sylvestre
    I have an HTML5 application that requires offline support. I am using a local Apache server for the application, and am trying to figure out what the best way is to simulate offline mode (currently, in Firefox I disable my Air-Port to simulate offline mode, but this is a pain). Any suggestions? I am open to using other browsers if a method exists that doesn't require turning off my Internet.

    Read the article

  • gluLookAt vectors and FPS-style camera

    - by Kevin Pamplona
    I am attempting to implemented an FPS-style camera by updating three vectors: EYE, DIR, UP. These vectors are the same that are used by gluLookAt (since gluLookAt is specified by the position of the camera, the direction it is looking at, and an up vector). I have already implemented the left-right and up-down strafing movements, but I'm having a lot of trouble understanding the math behind making the camera look-around while remaining stationary. In this case, the EYE vector remains the same, while I must update DIR and UP. Below is the code I tried, but it doesn't seem to work properly. Any suggestions? Thanks. void Transform::left(float degrees, vec3& dir, vec3& up) { vec3 axis; axis = glm::normalize(up); mat3 R = rotate(-degrees, axis); dir = R*dir; dir = R*up; }; void Transform::up(float degrees, vec3& dir, vec3& up) { vec3 axis; axis=glm::normalize(glm::cross(dir,up)); mat3 R = rotate(-degrees, axis); dir = R*dir-; up = R*up; };

    Read the article

  • JXTreeTable and BorderHighlighter Drawing Border on All Rows

    - by Kevin Rubin
    I'm using a BorderHighlighter on my JXTreeTable to put a border above each of the table cells on non-leaf rows to give a more clear visual separator for users. The problem is that when I expand the hierarchical column, all cells in the hierarchical column, for all rows, include the Border from the Highlighter. The other columns are displaying just fine. My BorderHighlighter is defined like this: Highlighter topHighlighter = new BorderHighlighter(new HighlightPredicate() { @Override public boolean isHighlighted(Component component, ComponentAdapter adapter) { TreePath path = treeTable.getPathForRow(adapter.row); TreeTableModel model = treeTable.getTreeTableModel(); Boolean isParent = !model.isLeaf(path.getLastPathComponent()); return isParent; } }, BorderFactory.createMatteBorder(2, 0, 0, 0, Color.RED)); I'm using SwingX 1.6.5.

    Read the article

  • C# - Advantages/Disadvantages of different implementations for Comparing Objects

    - by Kevin Crowell
    This questions involves 2 different implementations of essentially the same code. First, using delegate to create a Comparison method that can be used as a parameter when sorting a collection of objects: class Foo { public static Comparison<Foo> BarComparison = delegate(Foo foo1, Foo foo2) { return foo1.Bar.CompareTo(foo2.Bar); }; } I use the above when I want to have a way of sorting a collection of Foo objects in a different way than my CompareTo function offers. For example: List<Foo> fooList = new List<Foo>(); fooList.Sort(BarComparison); Second, using IComparer: public class BarComparer : IComparer<Foo> { public int Compare(Foo foo1, Foo foo2) { return foo1.Bar.CompareTo(foo2.Bar); } } I use the above when I want to do a binary search for a Foo object in a collection of Foo objects. For example: BarComparer comparer = new BarComparer(); List<Foo> fooList = new List<Foo>(); Foo foo = new Foo(); int index = fooList.BinarySearch(foo, comparer); My questions are: What are the advantages and disadvantages of each of these implementations? What are some more ways to take advantage of each of these implementations? Is there a way to combine these implementations in such a way that I do not need to duplicate the code? Can I achieve both a binary search and an alternative collection sort using only 1 of these methods?

    Read the article

  • Android OS 2.2 Permissions: I have absolutely no idea why this simple piece of code doesn't work. Wh

    - by Kevin
    I'm just playing around with some code. I create an Activity and simply do something like this: long lo = currentTimeMillis(); System.out.println(lo); lo *= 3; System.out.println(lo); SystemClock.setCurrentTimeMillis(lo); System.out.println( currentTimeMillis() ); Yes, in my AndroidManifest.xml, I've added: <uses-permission android:name="android.permission.SET_TIME"></uses-permission> <uses-permission android:name="android.permission.SET_TIME_ZONE"></uses-permission> Nothing changes. The SystemClock is never reset...it just keeps on ticking. The error that I'm getting just says that the permission "SET_TIME" was not granted to the program. Protection level 3. The permissions are there...and in the API for 2.2 it says that this feature is supported now. I have no idea what I'm doing wrong. If android.content.Intent; comes into play, please explain. I don't really understand what the idea behind intents! Thanks for any help!

    Read the article

  • Boost link error when using "--layout=system" on VS2005

    - by Kevin
    I'm new to boost, and thought I'd try it out with some realistic deployment scenarios for the .dlls, so I used the following command to compile/install the libraries: .\bjam install --layout=system variant=debug runtime-link=shared link=shared --with-date_time --with-thread --with-regex --with-filesystem --includedir=<my include directory> --libdir=<my bin directory> > installlog.txt That seemed to work, but my simple program (taken right from the "Getting Started" page) fails: #include <boost/regex.hpp> #include <iostream> #include <string> // Place your functions after this line int main() { std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); while (std::cin) { std::getline(std::cin, line); boost::smatch matches; if (boost::regex_match(line, matches, pat)) std::cout << matches[2] << std::endl; } } This fails with the following linker error: fatal error LNK1104: cannot open file 'libboost_regex-vc80-mt-1_42.lib' I'm sure that both the .lib and the .dlls are in that directory, and named how I want them to be (ie: boost_regex.lib, etc, all unversioned, as the --layout=system says). So why is it looking for the versioned type of it? And how do I get it to look for the unversioned type of the library? I've tried this with more "normal" options, such as below: .\bjam stage --build-type=complete --with-date_time --with-thread --with-filesystem --with-regex > mybuildlog.txt And that works fine. I made sure my compiler saw the "stage\lib" directory, and it compiled and ran fine with nothing beyond having the environment looking into the right lib directory. But when I took those "testing" directories away, and wanted to use these others (unversioned), then it failed. I'm under VS2005 here on XP. Any ideas?

    Read the article

  • I've created a database table using Visual Studio for my C# program. Now what?

    - by Kevin
    Hi! I'm very new to C#, so please forgive me if I've overlooked something here. I've created a database using Visual Studio (add new item service-based database) called LoadForecast.mdf. I then created a table called ForecastsDB and added some fields. My main question is this: I've created a console application with the intention of writing some data to the newly created database. I've added LoadForecast.mdf as a data source for my program, but is there anything else I should do? I saw an example where the next step was adding a "data diagram", but this was for a visual application, not a console application. Do I still need to diagram the database for my console app? I just want to be able to write new records out to my database table and wasn't sure if there were any other things I needed to do for the VS environment to be "aware" of my database. Thanks for any advise!

    Read the article

  • Best way to solve programming problem without a computer?

    - by Kevin
    What is the best way to solve programming questions when you are givien a question to write a program, in an exam for example where you have no computer to test it. Is there a certain technique that people use to help them solve these type of written problems? Or is it all down to knowlegde of the language?

    Read the article

  • jquery function

    - by kevin
    Hello id like to get the current element firing this event inside the event, Ideally I need the id, selected value and class, Thanks in advance $(document).ready(function () { $("#positions select").live("change", function () { var id = $("#category_id").val(); //var id = this.val(); alert(id); $.getJSON("/Category/GetSubCategories/" + id, function (data) { if (data.length > 0) { alert(data.length); var position = document.getElementById('positions'); var tr = position.insertRow(7); var td1 = tr.insertCell(-1); var td = tr.insertCell(-1); var sel = document.createElement("select"); sel.name = 'sel'; sel.id = 'sel'; sel.setAttribute('class', 'category'); // $("positions select").live("change", function () { //}); td.appendChild(sel); $.each(data, function (GetSubCatergories, category) { $('#sel').append($("<option></option>"). attr("value", category.category_id). text(category.name)); }); } }); }); });

    Read the article

  • Question about mysql indexes on low to medium cardinality columns

    - by Kevin J
    I have a general question about the way that database indexing works, particularly in mysql. Let's say I have a table with a million rows with a column "ClientID" that is distributed relatively equally among 30 values. Thus, this column is very low cardinality (30) relative to the primary key (1 million). Now, I understand that you shouldn't create indexes on low cardinality fields. However, in this case, queries are only ever done with one of the 30 clientIDs. Thus, wouldn't creating an index on ClientID be helpful, as the search space is automatically reduced to 1/30th what it normally would be? Or is my understanding of how the index works flawed? Thanks

    Read the article

  • How to verify StructureMap is disposing of objects properly

    - by Kevin Pang
    I'm currently using StructureMap to inject instances of NHibernate ISessions using the following code: ObjectFactory.Initialize(x => { x.ForRequestedType<ISession>() .CacheBy(InstanceScope.PerRequest) .TheDefault.Is.ConstructedBy(y => NHibernateSessionManager.Instance.GetSession()); }); I'm assuming that the CacheBy(InstanceScope.PerRequest) will properly dispose of the ISession it creates, but I'd like to make sure. What's the easiest way to test this?

    Read the article

  • Performance of DirectX and Recent Windows Mobile Version

    - by Kevin
    I'm seeing very poor performance while using the managed DirectDraw wrappers for WindowsMobile. Microsoft.WindowsMobile.DirectX.Direct3D I would appear the biggest bottle neck is calling Device.Present() after building up the scene. When using the System.Diagnostics.Stopwatch and running this very trivial exmaple Using Sprites on MSDN I'm seeing it's taking approximately 150ms to call the Device.Present() method. I'm seeing this on my AT&T Tilt and on the emulator. In larger applications such as the UltimateGMan sample it's taking over a second to call this method. Does anyone have any experience with using DirectX on mobile devices? What am I missing? I would prefer to stay in the managed world but if I drop back into C++ would I see better performance?

    Read the article

  • Read Text File in Document Folder - Iphone SDK

    - by Kevin
    Hello everyone I have this code below: NSString *fileName = [[NSUserDefaults standardUserDefaults] objectForKey:@"recentDownload"]; NSString *fullPath = [NSBundle pathForResource:fileName ofType:@"txt" inDirectory:[NSHomeDirectory() stringByAppendingString:@"/Documents/"]]; NSError *error = nil; [textViewerDownload setText:[NSString stringWithContentsOfFile:fullPath encoding: NSUTF8StringEncoding error:&error]]; textviewerdownload is the textview displaying the text from the file. The actual file name is stored in an NSUserDefault called recentDownload. When I build this, I click the button which this is under, and my application crashes. Is there anything wrong with the syntax or just simple error?

    Read the article

  • How can you prevent both jumpiness, and interrupting tweens with animated Flash buttons?

    - by Kevin Suttle
    This is something I've never been able to figure out. You've got a button offscreen you want to animate in. We'll call it 'btn.' You've got a hit area that serves as the proximity sensor to trigger btn's animation. We'll call it 'hitZone' (as to not cause confusion with the hitArea property of display objects). Both btn and hitZone are MovieClips. The listeners go something like this. import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var endPoint:Number = 31; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); hitZone.addEventListener(MouseEvent.CLICK, onHitZoneClick); btn.addEventListener(MouseEvent.ROLL_OVER, onBtnOver); btn.addEventListener(MouseEvent.ROLL_OUT, onBtnOut); btn.addEventListener(MouseEvent.CLICK, onBtnClick); btn.mouseChildren = false; function onHitZoneOver(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:endPoint, ease:Expo.easeOut}); trace("over hitZone"); } function onHitZoneOut(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:-1, ease:Expo.easeOut}); trace("out hitZone"); } function onBtnOver(e:MouseEvent):void { hitZone.mouseEnabled = false; hitZone.removeEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.removeEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("over BTN"); // This line is the only thing keeping the btn animation from being fired continuously // causing jumpiness. However, calling this allows the animation to be interrupted // at any point. TweenLite.killTweensOf(btn); } function onBtnOut(e:MouseEvent):void { hitZone.mouseEnabled = true; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("out BTN"); } function onBtnClick(e:MouseEvent):void { trace("click BTN"); } function onHitZoneClick(e:MouseEvent):void { trace("click hitZone"); } The issue is when your mouse is over both the hitZone and btn. The button continuously jumps unless you call TweenLite.killAllTweensOf(). This fixes the jumpiness, but it introduces a new problem. Now, it's very easy to interrupt the animation of the btn at any point, stopping it before it's totally visible on the stage. I've seen similar posts, but even they suffer from the same issue. Perhaps it's a problem with how Flash detects edges, because I've never once seen a workaround for this.

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >