Search Results

Search found 3484 results on 140 pages for 'chris dubois'.

Page 97/140 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • Putting a dollar value on code quality

    - by Chris Nelson
    As noted in another thread, "In most businesses, code quality is defined in dollars." So my company has an opportunity to acquire a large-ish C code base. Obviously, if the code quality is good, the code base is worth more than if it's poor. That is, if we can readily read, understand, and update the code, it's worth more to us than if it's a spaghetti-coded mess. Without being able to see the code ahead of time, we'd like to set some objective measure as an acceptance criteria like "If the XXX measure is below the price will be discounted YY%." What criteria can we or should we measure and what tool can we use to measure it?

    Read the article

  • How to get an id from the results in two tables

    - by Chris Lively
    Consider an order. An order will have one or more line items. Each line item is for a particular product. Given a filter table with a couple of products, how would I get the order id's that had at least all of the products listed in the second table? table Orders( OrderId int ) table LineItems ( OrderId int, LineItemId int, ProductId int ) table Filter ( ProductId int ) data Orders OrderId -------- 1 2 3 LineItems OrderId LineItemId ProductId ------- ---------- --------- 1 1 401 1 2 502 2 3 401 3 4 401 3 5 603 3 6 714 Filter ProductId --------- 401 603 Desired result of the query: OrderId: 3

    Read the article

  • Posting Documentation onto a Joomla Site

    - by Chris Spicer
    I would like to create some documentation and post it onto my Joomla website. This documentation would be something along the lines of the MSDN documentation: i.e. each page would follow a basic template. Intuitively I feel I have two ways of achieving this: 1) Creating each page of documentation as a separate article, and then linking them up. 2) Creating some kind of template and filling the information from a database. The second option being preferable in the long run. Unforunately I have no idea how to achieve what I'm looking for. I hoped that there would be a component out there that woud help me, but Googling for 'Joomla Documentation' just brings up the documentation for Joomla itself. Has anyone out there put documentation on their site, and how did they achieve it?

    Read the article

  • Obtaining the server IP address in WCF?

    - by chris
    How can I obtain the server IP address that was used to connect to a service? The server has multiple IP addresses and I need to know which one the client is connected to. So far I only found that OperationContext.Current.EndpointDispatcher.EndpointAddress and OperationContext.Current.Channel.LocalAddress contain the address from .config (e.g. localhost) OperationContext.Current.IncomingMessageProperties.Via contains the Url that the client used to connect to the server (but this might just be a name from the clients hosts file). EDIT - Sorry, I wasn't being clear enough: The server needs to know which of its IP addresses were used by the client. E.g. the server has the addresses 10.0.0.1 and 10.0.0.2. when processing the request the server service needs to know if 10.0.0.1 or 10.0.0.2 was used by the client to connect to it.

    Read the article

  • Advanced search functionality

    - by Chris
    I have a website with a jQuery based autocomplete search functionality which works great. Currently though I have just one search box for all categories, what I want is for someone to be able to type in, say for example, dorian gray dvd (in any order) which will search for dorian gray within the dvd category. What this will require then is a bit of magic on the server side to figure out if any of the words are category keywords, and then limit the search by that. What is the best (and quickest) way to do this in PHP / MySQL? I currently have a few trains of thought Search the category table for matches and perhaps order the results by that. Or split up the search terms into an array and separately search the categories for that for a match. Another thought I just had is to concat the category title to the dvd title in the database and match against that, or something similar... but this sounds computationally expensive? Any advice?

    Read the article

  • Hibernate cascade debug options

    - by Chris
    I have run into various StackOverflowErrors which occur during cascading. These have been extremely time consuming in debugging because I don't know which properties are being cascaded to cause this recursive behavior. Does anyone know of a log setting or some other form of debugging which could tell me specifically what properties are being cascaded?

    Read the article

  • C standard addressing simplification inconsistency

    - by Chris Lutz
    Section §6.5.3.2 "Address and indirection operators" ¶3 says (relevant section only): The unary & operator returns the address of its operand. ... If the operand is the result of a unary * operator, neither that operator nor the & operator is evaluated and the result is as if both were omitted, except that the constraints on the operators still apply and the result is not an lvalue. Similarly, if the operand is the result of a [] operator, neither the & operator nor the unary * that is implied by the [] is evaluated and the result is as if the & operator were removed and the [] operator were changed to a + operator. ... This means that this: int *i = NULL; printf("%p", (void *) (&*i) ); printf("%p", (void *) (&i[10]) ); Should be perfectly legal, printing the null pointer (probably 0) and the null pointer plus 10 (probably 10). The standard seems very clear that both of those cases are required to be optimized. However, it doesn't seem to require the following to be optimized: struct { int a; short b; } *s = 0; printf("%p", (void *) (&s->b) ); This seems awfully inconsistent. I can see no reason that the above code shouldn't print the null pointer plus sizeof(int) (possibly 4). Simplifying a &-> expression is going to be the same conceptually (IMHO) as &[], a simple address-plus-offset. It's even an offset that's going to be determinable at compile time, rather than potentially runtime with the [] operator. Is there anything in the rationale about why this is so seemingly inconsistent?

    Read the article

  • Date format broken in .net 4.0 for uk format

    - by Chris Foot
    I'm in the process of converting a couple of sites up to .net 4.0 and I seem to have a problem with regionalisaion of dates. This code: Date.Today.AddDays((Date.Today.DayOfWeek - 1) * -1).ToString() In .net 3.5 produces: '19/04/2010 00:00:00' but as soon as I change the app pool to 4.0 it produces: '4/19/2010 12:00:00 AM' Where can I change the setting that governs this?

    Read the article

  • Can you open an SPSite object while being within a different site collection?

    - by Chris Stewart
    I'm working on creating a common navigation experience across two site collections in MOSS 2007. I've looked around for various solutions and haven't found anything that fits. Our navigation is dynamic and driven by a number of factors, including audience targeting. Most of what I've found relates to having static XML and that just won't work for our requirements. What I'm down to at the moment is just getting a navigation item from site collection A while in the context of site collection B. Are there reasons I shouldn't be able to just open a navigation item from site collection A and gets its audience? Certainly there could be permissions problems on my end, or code related issues, or things that are in my control. What I'm wondering is if there's something inherent to SharePoint that would not allow this. Something I don't have control over which would force me to travel a different path.

    Read the article

  • Handling Types Defined in Plug-ins That Are No Longer Available

    - by Chris
    I am developing a .NET framework application that allows users to maintain and save "projects". A project can consist of components whose types are defined in the assemblies of the framework itself and/or in third-party assemblies that will be made available to the framework via a yet-to-be-built plug-in architecture. When a project is saved, it is simply binary-serialised to file. Projects are portable, so multiple users can load the same project into their own instances of the framework (just as different users may open the same MSWord document in their own local copies of MSWord). What's more, the plug-ins available to one user's framework might not be available to that of another. I need some way of ensuring that when a user attempts to open (i.e. deserialise) a project that includes a type whose defining assembly cannot be found (either because of a framework version incompatibility or the absence of a plug-in), the project still opens but the offending type is somehow substituted or omitted. Trouble is, the research I've done to date does not even hint at a suitable approach. Any ideas would be much appreciated, thanks.

    Read the article

  • JQuery validation not working for checkbox group

    - by Chris Halcrow
    I'm having trouble getting JQuery validation to work with a set of checkboxes. I'm generating the checkboxes using an ASP.NET checkboxlist, and I've used JQuery to set the 'name' attribute to the same thing for each checkbox in the list. Here's the code that gets written to the browser. I'm setting the 'validate' attribute on the 1st checkbox to set the rule that at least one checkbox must be selected. The JQuery validation works for all other elements on the form, but not for the checkbox list. I'm also using a JQuery form wizard on the page which triggers validation for each 'page' of the form, so I don't have control over how the validation is called. <input id="ContentPlaceHolder1_MainContent_AreaOfInterest_0" class="ui-wizard-content ui-helper-reset ui-state-default" type="checkbox" value="Famine" name="hello[]" validate="required:true, minlength:1"> <label for="ContentPlaceHolder1_MainContent_AreaOfInterest_0">Famine</label> <br> <input id="ContentPlaceHolder1_MainContent_AreaOfInterest_1" class="ui-wizard-content ui-helper-reset ui-state-default" type="checkbox" value="Events Volunteer" name="hello[]"> <label for="ContentPlaceHolder1_MainContent_AreaOfInterest_1">Events Volunteer</label> Any ideas on what's going wrong? There are lots of examples of JQuery scripts that will do the validation, however I'm trying to avoid this as I'm generating the checkboxlist server side by a custom control so that it can be re-used across different pages that may or may not have JQuery enabled. I'm trying to enable the JQuery validation whilst being as unobtrusive as possible, so that pages will still work even if JQuery is disabled. Here are the relevant JQuery inclusions and JQuery initialisation script for the form wizard. I'm not using any initialisation code for JQuery validation: <script type="text/javascript" src="../js/formwizard/js/bbq.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.form.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.form.wizard.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.validate.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#form1").formwizard({ validationEnabled: true, focusFirstInput: true }); }); </script>

    Read the article

  • How to use associated Model as datasource for DataView

    - by Chris Gilbert
    I have a Model structure as shown below and I want to know how to use the Bookings array as the datasource of my DataView. Model Structure: Client ClientId Name Bookings (HasManyAssociation) Contacts (HasManyAssociation) AjaxProxy JsonReader (ImplicitIncludes is set to true so child models are created with one call) Booking BookingNodeId BookingDetails Contact ContactNodeId ContactDetails The above gives me a data structure as follows: Client Bookings[ Booking Booking ] Contacts[ Contact Contact ] What I want to be able to do is either, create a Store from my Bookings array and then use that store as the datasource for my DataView OR directly use the Bookings array as the datasource (I don't really care how I do it to be honest). If I setup the AjaxProxy on my Booking model it works fine but then obviously I cannot automatically create my Client and Contacts when I load my JSON. It seems to me to make sense that the Client model, being the top level model hierarchically, is the one to load the data. EDIT: I figured it out as follows (with special thanks to handet87 below for his dataview.setStore() pointer). The key in this case is to know that creating the relationship actually sets up another store called, in this case BookingsStore and ContactsStore. All I needed to do was dataview.setStore("BookingsStore")

    Read the article

  • Iterate over a dict or list in Python

    - by Chris Dutrow
    Just wrote some nasty code that iterates over a dict or a list in Python. I have a feeling this was not the best way to go about it. The problem is that in order to iterate over a dict, this is the convention: for key in dict_object: dict_object[key] = 1 But modifying the object properties by key does not work if the same thing is done on a list: # Throws an error because the value of key is the property value, not # the list index: for key in list_object: list_object[key] = 1 The way I solved this problem was to write this nasty code: if isinstance(obj, dict): for key in obj: do_loop_contents(obj, key) elif isinstance(obj, list): for i in xrange(0, len(obj)): do_loop_contents(obj, i) def do_loop_contents(obj, key): obj[key] = 1 Is there a better way to do this? Thanks!

    Read the article

  • LINQ to Entities and Business / Validation Rules

    - by Chris
    We have a requirement where we need to allow users to dynamically create custom reports that will run against our database and return sets of data. It would be something similar to this: http://www.marcuswhitworth.com/2009/12/dynamic-linq-with-expression-trees/ but would ultimately contain the ability to create more complicated logic. I believe LINQ to Entities might possibly allow us to do something like we're attempting to achieve. I should note that these reports are going to need to run against multiple tables. Can anyone point me in the right direction for something like this? Has anyone done anything similar with LINQ to Entities?

    Read the article

  • Browser Not Reading Entire XML File

    - by Chris
    I have an XML file that is written by a PHP script. The data for the XML file is gathered from several different RSS feeds. The PHP script is invoked every 5 minutes by a Cron Job. The PHP Script takes maybe 5-10 seconds to write the XML File. Here's the problem: After the XML file is written, I can open it through DreamWeaver and read everything just fine - but when I enter the XML File's URL into my Web Browser (IE or Firefox), I get a "XML Parsing Error: not well-formed" Error in the Browser. When I do View Source in the Browser, the XML file appears incomplete - but when I open the file directly off the server, it is complete. Anyone know what's going on here?

    Read the article

  • Using UNC path as collections location in Mecurial IIS6 Server2003

    - by Chris M
    I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI method to attach the site to the Mecurial hgwebdir_wsgi [paths] \ = \\COMP3254\TestRepo\* [web] baseurl = / allow_push = * push_ssl = false style = monoblue The setup works perfectly if I reference the local drive E:\repo* but doesnt work if I specify the network as above; I've given the server (MERCDEV01$) full permissions on the shared folder on COMP3254, I can't think of any other reason it wouldn't work. Any ideas?

    Read the article

  • Assigning ID to a Row in an Android ListView

    - by Chris
    I have a ListView. When an item on the ListView is tapped, it loads a SubView. I want to assign an ID to each row of the ListView, so I can pass that ID along to the SubView. How do I assign a specific ID to each row in the ListView? Here is how I am currently loading the ListView: setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, mArrayList));

    Read the article

  • JSON editor/formatter?

    - by Chris
    I've got some JSON data, but it's all on one line. Does anyone know of a web or Windows editor that will format (e.g. indent and insert new lines) this data for me, so I can read it better? Preferably one that uses a GUI to display the JSON—instead of a command-line tool that outputs a reformatted document, for example.

    Read the article

  • SQL: Recursive Path

    - by Chris
    Is it possible to create a "tree resolver" in SQL? I have a table: ID Name Parent 1 a 2 b 1 3 c 1 4 d 3 Now I want a SQL query that returns: ID PATH 1 /a 2 /a/b 3 /a/c 4 /a/c/d Is this possible with SQL? It would make many things easier for me. Any help would really be appreciated!

    Read the article

  • What is happening in Crockford's object creation technique?

    - by Chris Noe
    There are only 3 lines of code, and yet I'm having trouble fully grasping this: Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; newObject = Object.create(oldObject); (from Prototypal Inheritance) 1) Object.create() starts out by creating an empty function called F. I'm thinking that a function is a kind of object. Where is this F object being stored? Globally I guess. 2) Next our oldObject, passed in as o, becomes the prototype of function F. Function (i.e., object) F now "inherits" from our oldObject, in the sense that name resolution will route through it. Good, but I'm curious what the default prototype is for an object, Object? Is that also true for a function-object? 3) Finally, F is instantiated and returned, becoming our newObject. Is the "new" operation strictly necessary here? Doesn't F already provide what we need, or is there a critical difference between function-objects and non-function-objects? Clearly it won't be possible to have a constructor function using this technique. What happens the next time Object.create() is called? Is global function F overwritten? Surely it is not reused, because that would alter previously configured objects. And what happens if multiple threads call Object.create(), is there any sort of synchronization to prevent race conditions on F?

    Read the article

  • png image blurry when loaded onto texture

    - by Chris
    I have created a png image in photoshop with transparencies that I have loaded into and OpenGL program. I have binded it to a texture and in the program the picture looks blurry and I'm not sure why. Loading Code // Texture loading object nv::Image title; // Return true on success if(title.loadImageFromFile("test.png")) { glGenTextures(1, &titleTex); glBindTexture(GL_TEXTURE_2D, titleTex); glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); glTexImage2D(GL_TEXTURE_2D, 0, title.getInternalFormat(), title.getWidth(), title.getHeight(), 0, title.getFormat(), title.getType(), title.getLevel(0)); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 16.0f); } else MessageBox(NULL, "Failed to load texture", "End of the world", MB_OK | MB_ICONINFORMATION); Display Code glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBindTexture(GL_TEXTURE_2D, titleTex); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTranslatef(-800, 0, 0.0); glColor3f(1,1,1); glBegin(GL_QUADS); glTexCoord2f(0.0, 0.0); glVertex2f(0,0); glTexCoord2f(0.0, 1.0); glVertex2f(0,600); glTexCoord2f(1.0, 1.0); glVertex2f(1600,600); glTexCoord2f(1.0, 0.0); glVertex2f(1600,0); glEnd(); glDisable(GL_BLEND); glDisable(GL_TEXTURE_2D);

    Read the article

  • How can I get my setup.py to use a relative path to my files?

    - by Chris B.
    I'm trying to build a Python distribution with distutils. Unfortunately, my directory structure looks like this: /code /mypackage __init__.py file1.py file2.py /subpackage __init__.py /build setup.py Here's my setup.py file: from distutils.core import setup setup( name = 'MyPackage', description = 'This is my package', packages = ['mypackage', 'mypackage.subpackage'], package_dir = { 'mypackage' : '../mypackage' }, version = '1', url = 'http://www.mypackage.org/', author = 'Me', author_email = '[email protected]', ) When I run python setup.py sdist it correctly generates the manifest file, but doesn't include my source files in the distribution. Apparently, it creates a directory to contain the source files (i.e. mypackage1) then copies each of the source files to mypackage1/../mypackage which puts them outside of the distribution. How can I correct this, without forcing my directory structure to conform to what distutils expects?

    Read the article

  • Horizontally-centering an absolute position to match a relative position

    - by Chris Vandevelde
    I'm trying to make a div box, containing various elements, fixed at the top of the page once the page has been scrolled so that the box would normally be out of view, but scroll normally until that point (like the behaviour at http://perldoc.perl.org/perl.html). The conditionally-fixed part is pretty simple to implement (set the position to "fixed" once the user has scrolled past a certain point, and "static" once it's scrolled back up), but I'm having trouble with the positioning and dimensions; it screws up if I'm not specifying an absolute position (if I'm using % or "auto", rather than px, em, cm, etc.) or it, confusingly, left-aligns if the box is less than the width of the page. I can understand why, more or less, I'm just trying to fix it. My strategy right now is to have an invisible DIV hold the place of the box and use Prototype's clonePosition() function to hold its position, but it doesn't seem to work for some reason. Neither does copying the margin from one element to the other. Any ideas? Bonus points and eternal gratitude if you can come up with an idea that will adjust itself with the browser window (like auto margins) without setting an onresize event.

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >