Search Results

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

Page 105/140 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • CDN for Images in ASP.NET

    - by Chris
    I am in the process of moving all of the images in my web application over to a CDN but I want to easily be able to switch the CDN on or off without having to hard code the path to the images. My first thought was to add an HttpHandler for image extensions that depending whether a variable in the web.config (something like ) will serve the image from the server or from the CDN. But after giving this a little though I think I've essentially ruled this out as it will cause ASP.NET to handle the request for every single image, thus adding overhead, and it might actually completely mitigate the benefits of using a CDN. An alternative approach is, since all of my pages inherit from a base page class, I could create a function in the base class that determines what path to serve the files from based off the web.config variable. I would then do something like this in the markup: <img src='<%= GetImagePath()/image.png' /> I think this is probably what I'll have to end up doing, but it seems a little clunky to me. I also envision problems with the old .NET error of not being able to modify the control collection because of the "<%=" though the "<%#" solution will probably work. Any thoughts or ideas on how to implement this?

    Read the article

  • Disabling security warning caused by BaseIntermediateOutputPath?

    - by Chris R. Donnelly
    Hi all, Our team overrides BaseIntermediateOutputPath (and other related properties) in our Visual Studio projects in order to have build artifacts go outside the main tree. However, this causes an annoying warning dialog to appear when you open a project for the first time in a new location (which happens on new machines, when you check out a branch to a new location, have to delete corrupted .suo/.user files, etc.). Is there any way to disable the warning? FYI, we are using Visual Studio 2008, and we have encountered this warning on Windows XP as well as Windows 7, so it is not UAC-related.

    Read the article

  • Create dropdown from multi array + PHP class

    - by chris
    Hi there, Well, I am writing class that creates a DOB selection dropdown. I am having figure out the dropdown(), it seems working but not exactly. Code just creates one drop down, and under this dropdown all day, month and year data are in one selection. like: <label> <sup>*</sup>DOB</label> <select name="form_bod_year"> <option value=""/> <option selected="" value="0">1</option> <option value="1">2</option> <option value="2">3</option> <option value="3">4</option> <option value="4">5</option> <option value="5">6</option> .. <option value="29">30</option> <option value="30">31</option> <option value="1">January</option> <option value="2">February</option> .. <option value="11">November</option> <option value="12">December</option> <option selected="" value="0">1910</option> <option value="1">1911</option> .. <option value="98">2008</option> <option value="99">2009</option> <option value="100">2010</option> </select> Here is my code, I wonder that why all datas are in one selection. It has to be tree selction - Day:Month:Year. //dropdown connector class DropDownConnector { var $dropDownsDatas; var $field_label; var $field_name; var $locale; function __construct($dropDownsDatas, $field_label, $field_name, $locale) { $this-dropDownsDatas = $dropDownsDatas; $this-field_label = $field_label; $this-field_name = $field_name; $this-locale = $locale; } function getValue(){ return $_POST[$this-field_name]; } function dropdown(){ $selectedVal = $this-getValue($this-field_name); foreach($this-dropDownsDatas as $keys=$values){ foreach ($values as $key=$value){ $selected = ($key == $selectedVal ? "selected" : "" ); $options .= sprintf('%s',$key,$value); }; }; return $select_start = "$this-field_desc".$options.""; } function getLabel(){ $non_req = $this-getNotRequiredData(); $req = in_array($this-field_name, $non_req) ? '' : '*'; return $this-field_label ? $req . $this-field_label : ''; } function __toString() { $id = $this-field_name; $label = $this-getLabel(); $field = $this-dropdown(); return 'field_name.'"'.$label.''.$field.''; } } function generateForm ($lang,$country_list,$states_list,$days_of_month,$month_list,$years){ $xx = array( 'form_bod_day' = $days_of_month, 'form_bod_month' = $month_list, 'form_bod_year' = $years); echo $dropDownConnector = new DropDownConnector($xx,'DOB','bod','en-US'); } // Call php class to use class on external functionss. $avInq = new formGenerator; $lang='en-US'; echo generateForm ($lang,$country_list,$states_list,$days_of_month,$month_list,$years);

    Read the article

  • jQuery - Animation flicker using hover()

    - by Chris
    I have a setup as described in this question which works perfectly. Essentially a drop down menu grows when you move your mouse over it to expose more options. There is, however, a small issue. If you move the mouse outside of the #dropdown div and then back in again quickly it constantly fires the mouseenter and mouseleave events causing a never ending cycle of flickering. How can I get around it? Here is my current jQuery code $("#dropdown").hover(function() { $(this).stop(true,true).fadeTo('fast',1); $("#options").stop(true,true).slideDown(); }, function() { $(this).stop(true,true).fadeTo('fast',0.1); $("#options").stop(true,true).slideUp(); } );

    Read the article

  • WPF4 DatePicker - adding time

    - by Chris
    Now that there is an official MS DatePicker in WPF4, I was wondering if there was a way to let it edit the Time part of a DateTime as well. I can't see anything, but it seems rather obvious to have missed out?

    Read the article

  • How can I configure different worker pools using celery?

    - by Chris R
    I need to deploy a queued execution service with (generally) the following three classes of worker: A periodic, low-priority job class that takes a long time and can be processed serially; these jobs should only use 0..2 workers in the system at most. A periodic, deadline-sensitive job class that take a short to medium amount of time (say, topping out at 5 minutes) An ad-hoc job class, that is higher priority than #1, but can interleave with #2. Any workers from class #2 that are inactive when this type of job comes in should handle it, without ever starving the pool of workers for #2 All three job classes are the same task, the only difference between them is how they're requested; they'll take the same input and generate the same output, but each one has different performance guarantees. How can I implement this using celery?

    Read the article

  • VBScript Permission Denied on CopyFile

    - by Chris
    I'm running a VBScript in SQL Agent but I get a 'Permission Denied' on line 34 (the first copy attempt). I've run this script outside SQL Agent with no problems Function Main() Const SourceDrive As String = "X:\" Dim fso Dim Today Dim FileName Dim FromFile Dim FromDrive Dim ArchivePath Set fso = CreateObject("Scripting.FileSystemObject") Today = Format(Now, "yyyyMMdd") 'To add more sources just add them to the array list Dim Sources() As Variant Sources() = Array("Item1", _ "Item2") 'To add more targets just add them to the array list Dim Targets() As Variant Targets() = Array("C:\Users\myalias\Desktop\MyToFolder", _ "C:\Users\myalias\Desktop\MyToFolder2") For i = 0 To UBound(Sources) FileName = "WebSurveyAlertCallbacks_" & Sources(i) & "_" & Today & ".xls" FromDrive = fso.BuildPath(SourceDrive, Sources(i)) FromFile = fso.BuildPath(FromDrive, FileName) ArchivePath = fso.BuildPath(FromDrive, "Archive") If fso.FileExists(FromFile) Then For t = 0 To UBound(Targets) fso.CopyFile FromFile, fso.BuildPath(Targets(t), FileName), True Next fso.CopyFile FromFile, fso.BuildPath(ArchivePath, FileName), True fso.DeleteFile FromFile End If Next Set fso = Nothing Main = DTSTaskExecResult_Success End Function

    Read the article

  • Best way to implement symfony admin components

    - by Chris T
    I am coding a backend in symfony using the sfThemePlugin (part of sympal). The dashboard should allow for new "admin plugins" to be added fairly easily. What I'd like is to have a config.yml config like this: sf_easy_admin_plugin: enabled_admin_dashboard_plugins: [Twitter, QuickBlogPost, QuickConfig] and when these are set it includes the correct components into the template. I'd like to have each one be in it's own plugin (sfTwitterEasyAdminModule, sfQuickBlogPostEasyAdminModule) or have them all bundled in one (sfEasyAdminModules). Is there anyway to accomplish this? As far I know symfonys include_component() only let's you include components from the current module and not from other plugins. Each "component" or admin plugin should render an icon for the dashboard and a html form that will be hidden until the user clicks the icon.

    Read the article

  • Display and Use Advanced Find for Product Subscriptions by Account in Microsoft CRM 4.0

    - by Chris
    By default when viewing an account in edit mode you have access to Opportunities, Invoices, and Quotes which contain the products being shopped by the account and/or the sales department. I'm trying to determine where to store, display, and use the products that an account has a subscription too. I may not understand the implementation but it seems that there should be "Products" option directly off the root Account management window that will show the user all the products the account has purchased. We are trying to integrate this with our production tracking system where product sales can originate from other channels that will not flow through CRM first. This product subscription does not fit into the Opportunity, Quote, or Invoice model because they are confirmed recurring sales that were automatically purchased via tools like a Public Website, Portal, etc. By enabling this tracking in CRM we can use the advanced find feature to facilitate follow up sales and marketing efforts. Example: Find everyone who is subscribed to model A, so we can notify them of a new holiday campaign where they can get 10% off on all add-ons. It's my assumption that this is a common scenario, however I'd like to better understand how to approach this within the world of Microsoft CRM. Thank you in advance.

    Read the article

  • CSS - How to create a table cell with a two-colour background?

    - by Chris
    Hi, I'm trying to create an HTML table cell with a two-tone background; so I have normal text on a background which is yellow on the left, and green on the right. The closest I've got so far is as follows. The background is correctly half-and-half, but the content text is displaced below it. <html> <head> <style type='text/css'> td.green { background-color: green; padding: 0px; margin: 0px; height:100%; text-align:center } div.yellow { position:relative; width: 50%; height: 100%; background-color:yellow } </style> </head> <body style="width: 100%"> <table style="width: 25%"> <tr style="padding: 0px; margin: 0px"> <td class="green"> <div class="yellow"></div> <div class="content">Hello</div> </td> </tr> </table> </body> </html> How can I fix this up?

    Read the article

  • How do I write object classes effectively when dealing with table joins?

    - by Chris
    I should start by saying I'm not now, nor do I have any delusions I'll ever be a professional programmer so most of my skills have been learned from experience very much as a hobby. I learned PHP as it seemed a good simple introduction in certain areas and it allowed me to design simple web applications. When I learned about objects, classes etc the tutor's basic examnples covered the idea that as a rule of thumb each database table should have its own class. While that worked well for the photo gallery project we wrote, as it had very simple mysql queries, it's not working so well now my projects are getting more complex. If I require data from two separate tables which require a table join I've instead been ignoring the class altogether and handling it on a case by case basis, OR, even worse been combining some of the data into the class and the rest as a separate entity and doing two queries, which to me seems inefficient. As an example, when viewing content on a forum I wrote, if you view a thread, I retrieve data from the threads table, the posts table and the user table. The queries from the user and posts table are retrieved via a join and not instantiated as an object, whereas the thread data is called using my Threads class. So how do I get from my current state of affairs to something a little less 'stupid', for want of a better word. Right now I have a DB class that deals with connection and escaping values etc, a parent db query class that deals with the common queries and methods, and all of the other classes (Thread, Upload, Session, Photo and ones thats aren't used Post, User etc ) are children of that. Do I make a big posts class that has the relevant extra attributes that I retrieve from the users (and potentially threads) table? Do I have separate classes that populate each of their relevant attributes with a single query? If so how do I do that? Because of the way my classes are written, based on what I was taught, my db update row method, or insert method both just take the attributes as an array and update all of that, if I have extra attributes from other db tables in each class then how do I rewrite those methods as obbiously updating automatically like that would result in errors? In short I think my understanding is limited right now and I'd like some pointers when it comes to the fundamentals of how to write more complex classes.

    Read the article

  • Variable not accessible within an if statment

    - by Chris
    I have a variable which holds a score for a game. My variable is accessible and correct outside of an if statement but not inside as shown below score is declared at the top of the main.cpp and calculated in the display function which also contains the code below cout << score << endl; //works if(!justFinished){ cout << score << endl; // doesn't work prints a large negative number endTime = time(NULL); ifstream highscoreFile; highscoreFile.open("highscores.txt"); if(highscoreFile.good()){ highscoreFile.close(); }else{ std::ofstream outfile ("highscores.txt"); cout << score << endl; outfile << score << std::endl; outfile.close(); } justFinished = true; } cout << score << endl;//works

    Read the article

  • jQuery version of YAHOO.lang (isUndefined, isNull, isString etc.)

    - by Chris S
    Does anyone know of a jQuery plugin that has 'helpers' or extensions like those found in the YAHOO.lang namespace? I have in mind functions such as: isNull isDefined isString isFunction I would also appreciate the same kind of thing for strings and arrays, such as Contains, StartsWith (I know these are easy to write, I'm just looking for a plugin that encompasses them all). It's not in the YAHOO.lang namespace but also form related extensions- determining a radiobox's value (from the one checked), a form element's type in a friendly name. Specifically a plugin with fluent API rather than selector based such as $("input[@type=radio][@checked]") Again I'm aware they're easy to implement but I don't want to reinvent the wheel.

    Read the article

  • Problem with mod rewrite for multi-lingual site

    - by Chris
    Hi everyone Currently developing a multi-lingual website, Users can access the front page using url with format below: http://mydomain.com/en/ http://mydomain.com/fr/ Problem is here. URL without last "/" (http://mydomain.com/fr) caused page not found problem Here is the rule RewriteRule ^/?([^./]+)/(.*)$ $2?lang=$1 [L,QSA] Can anybody help ? Thanks in advance

    Read the article

  • How do you compare music data

    - by Chris
    i want to write an app to rename sort and organize my music library (mp3's, wav's, flac's). I wanted to take a portion of the song, say the first minutes, and compare that to a database and then retrieve the song name and tag information. I have heard that you can do this with last.fm but a look through their api info didn't help. My question is, what is this called so i can google it better? nothing i am trying is helping much. This would be similar to the shazam android app. My prefered language would be java, so i can run it on a few operating systems easier, but that might be subject to change depending on how i can do it. Thanks

    Read the article

  • Save list of CGPoints using NSUserDefaults

    - by Chris Daviduik
    I have a bunch of CGPoints from a CCTMXLayer I want to save to NSUserDefaults but cannot seem to figure out an elegant way of doing so. Originally I was hoping to save an NSDictionary with an NSMutableSet for a value containing several NSValues (valueWithCGPoint). From what I can tell neither NSMutableSet or NSValue is supported by NSUserDefaults. At this point I am considering saving the x&y values of the CGPoint as a string and just converting it back and forth as needed.

    Read the article

  • .NET Framework Version Dependency Bootstrapper

    - by Chris
    About 30 minutes of troubleshooting and it turns out the person who's trying to use my application doesn't have the newest version of the .NET Framework. Is there a way or some KB article which describes a best practice for informing users who are not updated or do not have the framework, etc. Thanks!

    Read the article

  • How does Access 2007's moveNext/moveFirst/, etc., feature work?

    - by Chris M
    I'm not an Access expert, but am an SQL expert. I inherited an Access front-end referencing a SQL 2005 database that worked OK for about 5000 records, but is failing miserably for 800k records... Behind the scenes in the SQL profiler & activity manager I see some kind of Access query like: SELECT "MS1"."id" FROM "dbo"."customer" "MS1" ORDER BY "MS1"."id" The MS prefix doesn't appear in any Access code I can see. I'm suspicious of the built-in Access navigation code: DoCmd.GoToRecord , , acNext The GoToRecord has AcRecord constant, which includes things like acFirst, acLast, acNext, acPrevious and acGoTo. What does it mean in a database context to move to the "next" record? This particular table uses an identity column as the PK, so is it internally grabbing all the IDs and then moving to the one that is the next highest??? If so, how would it work if a table was comprised of three different fields for the PK? Or am I on the wrong track, and something else in Access is calling that statement? Unfortunately I see a ton of prepared statements in the profiler. THanks!

    Read the article

  • Gridview with row being edited causing error when form submitted

    - by Chris Phelps
    Using ASP.NET VB, I have a form with some text boxes and a Gridview. If a user clicks the Edit button on a row in the gridview, and then tries to submit the form with a row still in edit mode on the Gridview, this error is generated - "Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" % in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. " Any idea how to prevent this error??

    Read the article

  • Use JQuery to target unwrapped text inside a div

    - by Chris
    I'm trying to find a way to wrap just the inner text of an element, I don't want to target any other inner dom elements. For example. <ul> <li class="this-one"> this is my item <ul> <li> this is a sub element </li> </ul> </li> </ul> I want to use jQuery to do this. <ul> <li class="this-one"> <div class="tree-item-text">this is my item</div> <ul> <li> <div class="tree-item-text">this is a sub element</div> </li> </ul> </li> </ul> A little background is I need to make an in-house tree structure ui element, So I'm using the UL structure to represent this. But I don't want developers to have to do any special formatting to use the widget. update: I just wanted to add the purpose of this is I want to add a click listener to be able to expand the elements under the li, However, since those elements are within the li the click listener will activate even when clicking on the children, So I want to attach it to the text instead, to do this the text needs to be targetable, which is why I want to wrap it in a div of it's own. So far I've come up with wrapping all the inner elements of the li in a div and then moving all inner dom elements back to the original parent. But this code is pretty heavy for something that might be much simpler and not require so much DOM manipulation. EDIT: Want to share the first pseudo alternative I came up with but I think it is very tasking for what I want to accomplish. var innerTextThing = $("ul.tree ul").parents("li").wrapInner("<div class='tree-node-text'>"); $(innerTextThing.find(".tree-node-text")).each(function(){ $(this).after($(this).children("ul")); }); Answered: I ended up doing the following, FYI i only have to worry about FF and IE compatibility so it's untested in other browsers. //this will wrap all li textNodes in a div so we can target them. $(that).find("li").contents() .filter(function () { return this.nodeType == 3; }).each(function () { if ( //these are for IE and FF compatibility (this.textContent != undefined && this.textContent.trim() != "") || (this.innerText != undefined && this.innerText.trim() != "") ) { $(this).wrap("<div class='tree-node-text'>"); } });

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >