Search Results

Search found 967 results on 39 pages for 'andy clarke'.

Page 9/39 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Without using a pre-built physics engine, how can I implement 3-D collision detection from scratch?

    - by Andy Harglesis
    I want to tackle some basic 3-D collision detection and was wondering how engines handle this and give you a pretty interface and make it so easy ... I want to do it all myself, however. 2-D collision detection is extremely simple and can be done multiple ways that even beginner programmers could think up: 1.When the pixels touch; 2.when a rectangle range is exceeded; 3.when a pixel object is detected near another one in a pixel-based rendering engine. But 3-D is different with one dimension, but complex in many more so ... what are the general, basic understanding/examples on how 3-D collision detection can be implemented? Think two shaded, OpenGL cubes that are moved next to each other with a simple OpenGL rendering context and keyboard events.

    Read the article

  • CI - How long is continous?

    - by Andy
    We currently are using CCNet as our continous integration server. Most projects check for changes every 30 seconds (the default) and if needed perform a build (unit tests, stylecop, fxcop, etc). We've gotten quite a few projects now, and the server spends most of its time near 100% cpu utilization. This has alarmed some of the development team, even though the server is responsive and builds are still about the same length of time they've always been. Its been suggested that we lower the check interval to about five minutes. To me that seems too long, and we risk people committing code and then going home for the weekend and now there's a broken build possibly holding up others. In response, the suggestion is that if someone needs to know the results they can force the build. But that seems to defeat the purpose of CI, as I thought it was supposed to be automated. My proposed solution is just to get another build server and split the builds amongst the servers. Am I thinking about this the wrong way, or is there a point where if integration isn't often enough you're not really doing CI anymore?

    Read the article

  • Checking a record is due based on the 'occuring' field

    - by andy
    I have records that have dates against them and an occurring field that contains none,yearly and monthly id status note date last_updated occurring 1 open --- 01/01/2011 01/02/2010 yearly 2 open --- 05/05/2011 03/05/2011 monthly 3 open --- 06/06/2011 05/06/2011 none Now I need to be able to check if a record is due (the date set has passed) which works perfect if occurring is set to none but I'm unsure of how to approach it when it's set to yearly or monthly (IE: This day in the year/month has passed) So with the above records, if I had a method on the record called due? providing the status is 'open' it needs to return true every year when it's passed that date if it's not been updated within the year yet. I apologise if this is confusing but it's melting my brain just trying to think of it, let alone put it into words.

    Read the article

  • Bluetooth connectivity on Ubuntu 11.04

    - by Andy Wiz
    I tried to connect to a device via Bluetooth from my laptop running Ubuntu 11.04, and I have some difficulty. I had to write a script to restart the Bluetooth dongle (it does not activate Bluetooth automatically). An icon appears in the top status bar on Ubuntu (good). Pairing of the devices happen easily enough (good). Trying to view files on the device from the laptop, the window that comes up does not show the paired devices. There is a window, but it's too small, and you dont know which device is selected (bad). If you choose the wrong device (I only knew it was the wrong device when my cell phone lit up), the icon on the status bar disappears, and doesn't come back, even though the devices are still paired (bad). Does anyone have that problem, and is there a fix? A.

    Read the article

  • Ideas for how to structure a developer class/course? [on hold]

    - by Andy
    Let's say I need to teach a 3-8 week course in programming/development at a technical school (no kids) (regardless of language or technology and the target audience is beginners). I need ideas to make it a awesome class where I : Maximize the students learning and experience Make sure they don't fall a sleep Engage the students Make it exciting! I can always do traditional lecture+exercises and repeat this pattern over and over, but I think this is to old-school. Things I have considered to add to the course are: - Require pair programming - Code-review together with the students I would like suggestions on how to make a modern training class state really awesome?

    Read the article

  • wpf binding by selected value - swap out bound object without disturbing binding

    - by Andy Clarke
    Hi, I've got combo box bound to a custom collection type - its basically an overridden ObservableCollection which I've added a facility to update the underlying collection (via Unity). I don't want to confuse the issue too much, but thats the background. My xaml looks like this <ComboBox ItemsSource="{Binding Manufacturers}" DisplayMemberPath="Name" SelectedValuePath="ID" SelectedValue="{Binding Vehicle.ManufacturerID}" /> And in my overridden collection i was doing this. index = IndexOf(oldItem); Insert(index, (T)newItem); RemoveAt(index + 1); I had hoped because it was bound by value, that inserting the new object(which had the same id) and then removing the old one would work. But it seems that although its bound by SelectedValue it still knows that its being swapped for a different one. The combo just looses its selection. Can anyone help please?

    Read the article

  • CSS background image being downloaded more than once

    - by Nick Clarke
    I noticed in my current project that Firefox (3.5.4) downloads the background image (set in CSS) for my divs more than once. I've checked with both firebug and wireshark and it really does appear that it does not wait for the first request to finish and then simply use the cached version. Wireshark also confirms that Chrome and IE8 do as expected and only request the image once. Any ideas what might be causing this? Here is a small test: Sample Page or <html> <head> <style> #one { height: 300px; width:100%; background: #FFF url('random.jpg'); } #two { height: 300px; width:100%; background: #FFF url('random.jpg'); } #three { height: 300px; width:100%; background: #FFF url('random.jpg'); } </style> </head> <body> <div id="one"></div> <div id="two"></div> <div id="three"></div> </body> EDIT I opened up a bug request as I could not find one already on bugzilla, but it turns out to be an old bug with 3.5. https://bugzilla.mozilla.org/show_bug.cgi?id=497665

    Read the article

  • Test Column exists, Add Column, and Update Column

    - by david.clarke
    I'm trying to write a SQL Server database update script. I want to test for the existence of a column in a table, then if it doesn't exist add the column with a default value, and finally update that column based on the current value of a different column in the same table. I want this script to be runnable multiple times, the first time updating the table and on subsequent runs the script should be ignored. My script currently looks like the following: IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'PurchaseOrder' AND COLUMN_NAME = 'IsDownloadable') BEGIN ALTER TABLE [dbo].[PurchaseOrder] ADD [IsDownloadable] bit NOT NULL DEFAULT 0 UPDATE [dbo].[PurchaseOrder] SET [IsDownloadable] = 1 WHERE [Ref] IS NOT NULL END SQL Server returns error "Invalid column name 'IsDownloadable'", i.e. I need to commit the DDL before I can update the column. I've tried various permutations but I'm getting nowhere fast.

    Read the article

  • Cannot format first column in WxPython's ListCtrl

    - by Matt Clarke
    If I set the format of the first column in a ListCtrl to align centre (or align right) nothing happens. It works for the other columns. This only happens on Windows - I have tested it on Linux and it works fine. Does anyone know if there is a work-round or other solution? Here is an example based on code found at http://zetcode.com/wxpython/ import wx import sys packages = [('jessica alba', 'pomona', '1981'), ('sigourney weaver', 'new york', '1949'), ('angelina jolie', 'los angeles', '1975'), ('natalie portman', 'jerusalem', '1981'), ('rachel weiss', 'london', '1971'), ('scarlett johansson', 'new york', '1984' )] class Actresses(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(380, 230)) hbox = wx.BoxSizer(wx.HORIZONTAL) panel = wx.Panel(self, -1) self.list = wx.ListCtrl(panel, -1, style=wx.LC_REPORT) self.list.InsertColumn(0, 'name', wx.LIST_FORMAT_CENTRE,width=140) self.list.InsertColumn(1, 'place', wx.LIST_FORMAT_CENTRE,width=130) self.list.InsertColumn(2, 'year', wx.LIST_FORMAT_CENTRE, 90) for i in packages: index = self.list.InsertStringItem(sys.maxint, i[0]) self.list.SetStringItem(index, 1, i[1]) self.list.SetStringItem(index, 2, i[2]) hbox.Add(self.list, 1, wx.EXPAND) panel.SetSizer(hbox) self.Centre() self.Show(True) app = wx.App() Actresses(None, -1, 'actresses') app.MainLoop()

    Read the article

  • How do I code a MVC3 Helper

    - by Mike Clarke
    I’ve just build my first Helper in MVC, it’s very basic and just displays a string where ever I use it. So it’s a .cshtml file in my App_Code folder, I think that is how it's supposed to be set up, with the following code in it, @helper DisplaySelect() { @:This text is coming from an helper class. } Now I am a wiz with helpers how do I make it do things. E.g.. say I want it to query the database and display something, I would normally do that work in my controller. How do I do that with helpers, do I create a helper controller and then treat the helper like a partial view??? Any help would be greatly appreciated. Cheers, Mike.

    Read the article

  • c# reflection - getting the first item out of a reflected collection without casting to specific col

    - by Andy Clarke
    Hi, I've got a Customer object with a Collection of CustomerContacts IEnumerable Contacts { get; set; } In some other code I'm using Reflection and have the PropertyInfo of Contacts property var contacts = propertyInfo.GetValue(customerObject, null); I know contacts has at least one object in it, but how do I get it out? I don't want to Cast it to IEnumerable because I want to keep my reflection method dynamic. I thought about calling FirstOrDefault() by reflection - but can't do that easily because its an extension method. Does anyone have any ideas? Thanks

    Read the article

  • How to extend the Eclipse Java Editor to add coloured overlays

    - by Gavin Clarke
    I have an idea for an Eclipse plugin which I've been toying with. I need to be able to extend the Eclipse Java Editor component and add coloured overlays to the code based on pluggable external metrics. Unfortunately there doesn't appear to be any kind of syntax highlighting extension point. Does anyone know how I might be able to extend the exisitng eclipse Java Editor to add custom highlighting rules? Bear in mind I'm new to Eclipse plugin programming so please give as much detail as possible.

    Read the article

  • wpf error template - red box still visible on collapse of an expander

    - by Andy Clarke
    Hi, I'm doing some validation on the DataSource of TextBox that's within an Expander and have found that once a validation error has been triggered, if I collapse the Expander, the red box stays where the TextBox would have been. <Expander Header="Blah Blah Blah"> <TextBox Name="TextBox" Validation.ErrorTemplate="{DynamicResource TextBoxErrorTemplate}" Text="{Binding Path=Blah, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" /> </Expander> I've tried to get round this by binding the visibility of the Error Template to the Expander, however I think there's something wrong with the binding. <local:NotVisibleConverter x:Key="NotVisibleConverter" /> <ControlTemplate x:Key="TextBoxErrorTemplate"> <DockPanel> <Border BorderBrush="Red" BorderThickness="2" Visibility="{Binding Path=IsExpanded, Converter={StaticResource NotVisibleConverter}, RelativeSource={RelativeSource AncestorType=Expander}}" > <AdornedElementPlaceholder Name="MyAdorner" /> </Border> </DockPanel> <ControlTemplate.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> I guess I've gone wrong with my binding, can someone put me back on track please? Alternatively does anyone know another solution to the ErrorTemplate still being visible on the collapse of an Expander?

    Read the article

  • How do I switch Ruby-on-Rails into en-UK

    - by Nick Clarke
    Hi, I'm trying to switch one of my websites into en-UK so that I get the correct date and currency formats etc... I have found this yaml file: http://github.com/mattetti/globalite/blob/master/lang/rails/en-UK.yml Any ideas if there is a better one to use? I also checked here but could not see it: http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale Thanks, Nick

    Read the article

  • Does a PHP library exist to work with PRC/.mobi files?

    - by Chris Clarke
    I'm writing a WordPress plugin to create an eBook from a selected category in most major eBook formats. I would like to support MobiPocket since that's the format used by the Kindle but I'm not sure how to go about it. From what I've read .mobi files are actually Palm Resource Databases (PRC) but I haven't been able to find a PHP class to work with these. I thought about using exec along with KindleGen but that would be undesirable as it would complicate initial setup. I've also thought about hosting a web service somewhere and using XML-RPC to accomplish this but that also complicates things. My question is: is there a PHP class/library (PHP-only preferred) that can work with PRC or even better, a class that specialises in creating MobiPocket ebooks? (needs to be open source since I'm releasing under the GPL) I've tried searching but haven't been able to find anything.

    Read the article

  • c# Reflection - Find the Generic Type of a Collection

    - by Andy Clarke
    Hi, I'm reflecting a property 'Blah' its Type is ICollection public ICollection<string> Blah { get; set; } private void button1_Click(object sender, RoutedEventArgs e) { var pi = GetType().GetProperty("Blah"); MessageBox.Show(pi.PropertyType.ToString()); } This gives me (as you'd expect!) ICollection<string> ... But really I want to get the collection type i.e. ICollection (rather than ICollection<string>) - does anyone know how i'd do this please?

    Read the article

  • What is the best practice when coding math class/functions ?

    - by Isaac Clarke
    Introductory note : I voluntarily chose a wide subject. You know that quote about learning a cat to fish, that's it. I don't need an answer to my question, I need an explanation and advice. I know you guys are good at this ;) Hi guys, I'm currently implementing some algorithms into an existing program. Long story short, I created a new class, "Adder". An Adder is a member of another class representing the physical object actually doing the calculus , which calls adder.calc() with its parameters (merely a list of objects to do the maths on). To do these maths, I need some parameters, which do not exist outside of the class (but can be set, see below). They're neither config parameters nor members of other classes. These parameters are D1 and D2, distances, and three arrays of fixed size : alpha, beta, delta. I know some of you are more comfortable reading code than reading text so here you go : class Adder { public: Adder(); virtual Adder::~Adder(); void set( float d1, float d2 ); void set( float d1, float d2, int alpha[N_MAX], int beta[N_MAX], int delta[N_MAX] ); // Snipped prototypes float calc( List& ... ); // ... inline float get_d1() { return d1_ ;}; inline float get_d2() { return d2_ ;}; private: float d1_; float d2_; int alpha_[N_MAX]; // A #define N_MAX is done elsewhere int beta_[N_MAX]; int delta_[N_MAX]; }; Since this object is used as a member of another class, it is declared in a *.h : private: Adder adder_; By doing that, I couldn't initialize the arrays (alpha/beta/delta) directly in the constructor ( int T[3] = { 1, 2, 3 }; ), without having to iterate throughout the three arrays. I thought of putting them in static const, but I don't think that's the proper way of solving such problems. My second guess was to use the constructor to initialize the arrays Adder::Adder() { int alpha[N_MAX] = { 0, -60, -120, 180, 120, 60 }; int beta[N_MAX] = { 0, 0, 0, 0, 0, 0 }; int delta[N_MAX] = { 0, 0, 180, 180, 180, 0 }; set( 2.5, 0, alpha, beta, delta ); } void Adder::set( float d1, float d2 ) { if (d1 > 0) d1_ = d1; if (d2 > 0) d2_ = d2; } void Adder::set( float d1, float d2, int alpha[N_MAX], int beta[N_MAX], int delta[N_MAX] ) { set( d1, d2 ); for (int i = 0; i < N_MAX; ++i) { alpha_[i] = alpha[i]; beta_[i] = beta[i]; delta_[i] = delta[i]; } } My question is : Would it be better to use another function - init() - which would initialize arrays ? Or is there a better way of doing that ? My bonus question is : Did you see some mistakes or bad practice along the way ?

    Read the article

  • What good practices, if any, has the agile movement lost?

    - by clarke ching
    I am a long time agile advocated but one of the things that bothers me about Agile is that a lot of agile practitioners, especially the younger ones, have thrown out or are missing a whole lot of good (non Scrum, non XP) practices. Alistair Cockburn's style of writing Use Cases springs to mind; orthogonal arrays (pairwise testing) is another. I hope this is an okay forum to ask this, but since I read mostly Agile related books and articles and work with mostly Agile folk ... is there anything I'm missing? Thanks for all your help. StackOverlow is a fantastic resource.

    Read the article

  • Including full LaTeX documents within others.

    - by Chris Clarke
    I'm currently finishing off my dissertation, and would like to be able to include some documents within my LaTeX document. The files I'd like to include are weekly reports done in LaTeX to my supervisor. Obviously all documents are page numbered seperately. I would like them to be included in the final document. I could concatenate all the final PDFs using GhostScript or some other tool, but I would like to have consistent numbering throughout the document. I have tried including the LaTeX from each document in the main document, but the preamble etc causes problems and the small title I have in each report takes a whole page... In summary, I'm looking for a way of including a number of 1 or 2 page self-complete LaTeX files in a large report, keeping their original layouts, but changing the page numbering.

    Read the article

  • SQL - sub count

    - by Andy Clarke
    Hi I've got some SQL ... SELECT AdviceNo, Registration FROM tblSalesDetail that produces something like ... ADV00001, ABC123 ADV00001, CDE564 ADV00002, FGE432 ADV00003, HUY789 ADV00003, MJS532 ADV00003, JFY428 Can anyone tell me how I'd adjust it to see the following please? ADV00001, ABC123, 1 ADV00001, CDE564, 2 ADV00002, FGE432, 1 ADV00003, HUY789, 1 ADV00003, MJS532, 2 ADV00003, JFY428, 3

    Read the article

  • How do you remove/clean-up code which is no longer used?

    - by clarke ching
    So, we have a project which had to be radically descoped in order to ship on time. It's got a lot of code left in it which is not actually used. I want to clean up the code, removing any dead-wood. I have the authority to do it and I can convince people that it's a commercially sensible thing to do. [I have a lot of automated unit tests, some automated acceptance tests and a team of testers who can manually regression test.] My problem: I'm a manager and I don't know technically how to go about it. Any help?

    Read the article

  • GWTAI applet integration in GWT problem

    - by andy
    Hi everybody. I'm working with gwtai to integrate a java applet into my gwt - project. Basic communication from my main application to the applet (such as invoking simple methods that return int or boolean values) works. But the main reason why I need to integrate this applet is, that I need it to connect to another server and receive a answer and pass it to my gwt-application. So there's one basic method in the applet: public String SendAndReceive(String host, int sendPort, int receivePort, String query) that connects to the server, receives an answer and returns this answer as a string. When I now try to invoke this method like this: applet.SendAndReceive("0.0.0.0", 9099, 2000, "show streams;"); I constantly run into following error (full error message at the end): com.google.gwt.core.client.JavaScriptException: (String): Error calling method on NPObject! [plugin exception: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)] I couldn't find a solution (for gwtai is a quite uncommon topic), what I found out (and what the Exception let's one assume) is, that there's a security problem - maybe because I'm connecting to another server. I also read something about browser's Single Origin Policy, what would point in the same direction...up to now I have never worked with java applets. So if someone has a solution or a hint I would be very thankful. If more code is helpful I can give. Thanks, Andy the full error message: 21:03:49.864 [ERROR] [follovizergwt] Unable to load module entry point class follovizer.gwt.client.FolloVizerGWT (see associated exception for details) com.google.gwt.core.client.JavaScriptException: (String): Error calling method on NPObject! [plugin exception: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)]. at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at follovizer.gwt.client.AnduINAppletImpl.SendAndReceive(AnduINAppletImpl.java) at follovizer.gwt.client.FolloVizerGWT.createLayout(FolloVizerGWT.java:92) at follovizer.gwt.client.FolloVizerGWT.onModuleLoad(FolloVizerGWT.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619)

    Read the article

  • How can I make these images download on a seperate thread?

    - by Andy Barlow
    Hello!! I have the following code running on my Android device. It works great and displays my list items wonderfully. It's also clever in the fact it only downloads the data when it's needed by the ArrayAdapter. However, whilst the download of the thumbnail is occurring, the entire list stalls and you cannot scroll until it's finished downloading. Is there any way of threading this so it'll still scroll happily, maybe show a place holder for the downloading image, finish the download, and then show? Any help with this would be really apreciated. Thank-you kindly. Andy Barlow private class CatalogAdapter extends ArrayAdapter { private ArrayList<SingleQueueResult> items; //Must research what this actually does! public CatalogAdapter(Context context, int textViewResourceId, ArrayList<SingleQueueResult> items) { super(context, textViewResourceId, items); this.items = items; } /** This overrides the getview of the ArrayAdapter. It should send back our new custom rows for the list */ @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.mylists_rows, null); } final SingleQueueResult result = items.get(position); // Sets the text inside the rows as they are scrolled by! if (result != null) { TextView title = (TextView)v.findViewById(R.id.mylist_title); TextView format = (TextView)v.findViewById(R.id.mylist_format); title.setText(result.getTitle()); format.setText(result.getThumbnail()); // Download Images ImageView myImageView = (ImageView)v.findViewById(R.id.mylist_thumbnail); downloadImage(result.getThumbnail(), myImageView); } return v; } } // This should run in a seperate thread public void downloadImage(String imageUrl, ImageView myImageView) { try { url = new URL(imageUrl); URLConnection conn = url.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); myImageView.setImageBitmap(bm); } catch (IOException e) { /* Reset to Default image on any error. */ //this.myImageView.setImageDrawable(getResources().getDrawable(R.drawable.default)); } }

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >