Search Results

Search found 697 results on 28 pages for 'matthew guay'.

Page 22/28 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • .htaccess, two consecutive rewrites?

    - by Matthew Haworth
    I need to take a url, "/ServiceSearch/r.php?n=blahblah", and have it go to "/search/blahblah/" so that it appears in the browser as "/search/blahblah", but I actually want it to REALLY be going to "r.php?n=ServiceSearch&n=blahblah".. So I was thinking I'll need to rewrite the first URL to "/ServiceSearch/r.php?n=blahblah" and then the second url, "/search/blahblah/", to the third, "r.php?n=ServiceSearch&n=blahblah". Well, I know this is wrong, but it's my best guess. I'm really struggling with it.

    Read the article

  • Reorganizing development environment for single developer/small shop

    - by Matthew
    I have been developing for my company for approximately three years. We serve up a web portal using Microsoft .NET and MS SQL Server on DotNetNuke. I am going to leave my job full time at the end of April. I am leaving on good terms, and I really care about this company and the state of the web project. Because I haven't worked in a team environment in a long time, I have probably lost touch with what 'real' setups look like. When I leave, I predict the company will either find another developer to take over, or at least have developers work on a contractual basis. Because I have not worked with other developers, I am very concerned with leaving the company (and the developer they hire) with a jumbled mess. I'd like to believe I am a good developer and everything makes sense, but I have no way to tell. My question, is how do I set up the development environment, so the company and the next developer will have little trouble getting started? What would you as a developer like in place before working on a project you've never worked on? Here's some relevant information: There is a development server onsite and a production server offsite in a data center . There is a server where backups and source code (Sourcegear Vault) are stored. There is no formal documentation but there are comments in the code. The company budget is tight so free suggestions will help the best. I will be around after the end of April on a consulting basis so I can ask simple questions but I will not be available full time to train someone

    Read the article

  • Nginx logic (if cookie set, redirect here...) Is it possible?

    - by Matthew Steiner
    So, I have a pretty basic need, but I can't figure out if it's even possible, much less how to do it. I have a main page that anyone can see. Most of the rest of the application can be seen only if logged in (hence, a "set cookie"). So I was thinking, as long as they don't have a cookie set, they can just see a cached version of nginx. I can get it caching with this: proxy_cache STATIC; proxy_cache_valid 200 1d; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; And it helps a ton. (instead of 15 requests per second it gets over 1000). Now I just need some sort of "server logic" to say only serve the cached page if they have no cookie, otherwise, load the dynamic page (which will automatically redirect them into the app). Any ideas?

    Read the article

  • What data type should I use for my texture coordinates in OpenGL ES?

    - by Matthew Chen
    I notice that the default data type for texture coordinates in the OpenGL docs is GLfloat, but much of the sample code I see written by experienced iphone developers uses GLshort or GLbyte. Is this an optimization? GLfloat vertices[] = { // Upper left x1, y2, // Lower left x1, y1, // Lower right x2, y1, // Upper right x2, y2, }; glTexCoordPointer(2, GL_FLOAT, 0, iconSTs); vs. GLbyte vertices[] = { // Upper left x1, y2, // Lower left x1, y1, // Lower right x2, y1, // Upper right x2, y2, }; glTexCoordPointer(2, GL_BYTE, 0, iconSTs);

    Read the article

  • Adding an unknown number of JComponents to a JPanel

    - by Matthew
    Good day, I am building an Applet (JApplet to be exact) and I sub divided that into two panels. The top panel is called DisplayPanel which is a custom class that extends JPanel. The bottom panel is called InputPanel which also extends JPanel. As mentioned above, I can add those two Panel's to the applet and they display fine. The next thing that I would like to do is have the InputPanel be able to hold a random number of JComponent Objects all listed veritcally. This means that the InputPanel should be able to have JButtons, JLabels, JTextFields etc thrown at it. I then want the InputPanel to display some sort of scrolling capability. The catch is that since these two panels are already inside my applet, I need the InputPanel to stay the same size as it was given when added to the Applet. So for example, if my applet (from the web-browser html code) was given the size 700,700, and then the DisplayPanel was 700 by 350, and the InputPanel was below it with the same dimensions, I want to then be able to add lots of JComponents like buttons, to the InputPanel and the panel would stay 700 x 350 in the same position that it is at, only the panel would have scroll bars if needed. I've played with many different combinations of JScrollPane, but just cannot get it. Thank you.

    Read the article

  • Is there a more efficent way to randomise a set of linq results?

    - by Matthew De'Loughry
    Hi just wondering if you could help I've produced a function to get back a random set of submission depnding on the amount passed to it, but I worry that even though it works now with a small amount of data when the a large amount is passed through it would become efficent and cause problems. Just wondering if you could suggest a more efficent way of doing the following: public List<Submission> GetRandomWinners(int id) { List<Submission> submissions = new List<Submission>(); int amount = (DbContext().Competitions .Where(s => s.CompetitionId == id).FirstOrDefault()).NumberWinners; for(int i = 1 ; i <= amount; i++) { bool added = false; while (!added) { bool found = false; var randSubmissions = DbContext().Submissions .Where(s => s.CompetitionId == id && s.CorrectAnswer).ToList(); int count = randSubmissions.Count(); int index = new Random().Next(count); foreach (var sub in submissions ) { if (sub == randSubmissions.Skip(index).FirstOrDefault()) found = true; } if (!found) { submissions.Add(randSubmissions.Skip(index).FirstOrDefault()); added = true; } } } return submissions; } As I say I have this fully working and bringing back the wanted result just I'm not liking the foreach and while checks in there and my head has just turned to mush now try to come up with the above soloution. Thanks Matt

    Read the article

  • Schema for element with Attributes and Child nodes

    - by Matthew
    I am trying to write xsd type schema for an element that has a custom type to include addition attributes to extend a base type. I am running into trouble getting the syntax right. <xs:element name="graphs"> <xs:complexType> <xs:sequence> <xs:element name="graph" minOccurs="1" maxOccurs="unbounded" type="graphType"> <!-- child elements --> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="graphType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="title" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> </xs:extension> </xs:simpleContent> </xs:complexType> I thought this would be something very common, but having read many tuts and forums, I cant seem to find an answer that works for me.

    Read the article

  • Why can't I put a jquery-ui progressbar inside a div with fixed position?

    - by Matthew
    I started the source from this progressbar example, and it works fine. My only change was to set the width of the progressbar to "20%". <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="progressbar"></div> </body> </html> I then put the progressbar inside another div, and used css to fix that div in the upper-right-hand corner. <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <style type="text/css"> #testContainer { position : fixed; top : 6; right : 6; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function() { $("#progressbar").progressbar({ value: 37 }).css({ width : "20%"}); }); </script> </head> <body style="font-size:62.5%;"> <div id="testContainer"> <div id="progressbar"></div> </div> </body> </html> The progressbar becomes a slim vertical line on the left side of the screen. What am I doing wrong? I'm new to web development in general, and jquery in particular, so please forgive me if this is a stupid question.

    Read the article

  • In MongoDB, how can I replicate this simple query using map/reduce in ruby?

    - by Matthew Rathbone
    Hi, So using the regular MongoDB library in Ruby I have the following query to find average filesize across a set of 5001 documents: avg = 0 total = collection.count() Rails.logger.info "#{total} asset creation stats in the system" collection.find().each {|row| avg += (row["filesize"] * (1/total.to_f)) if row["filesize"]} Its pretty simple, so I'm trying to do the same using map/reduce as a learning exercise. This is what I came up with: map = 'function(){emit("filesizes", {size: this.filesize, num: 1});}' reduce = 'function(k, vals){ var result = {size: 0, num: 0}; for(var x in vals) { var new_total = result.num + vals[x].num; result.num = new_total result.size = result.size + (vals[x].size * (vals[x].num / new_total)); } return result; }' @results = collection.map_reduce(map, reduce) However the two queries come back with two different results! What am I doing wrong?

    Read the article

  • What different terms mean the same thing (or don't, but people think they do)?

    - by Matthew Jones
    One of the pitfalls I run into on a daily basis is customers saying one thing while meaning another. Usually, this is just due to a miscommunication somewhere, but occasionally they are, in fact, saying the same thing I am just using a different term. For example, one of my customers the other day mentioned a feature he called, "find as you type." Being a little confused, I asked him what he meant, and he described the feature in Google where, once you start typing a search query, Google suggests other, popular queries that match the letters you have typed. Click! He meant AutoComplete! He was not wrong, it is just that I had never heard that term before. In the spirit of reducing confusion, what terms can you think of that are different but mean, essentially, the same thing? Also, what terms do people think mean the same thing, but don't. Please differentiate between the two. Please only one set of terms per answer, so we can vote on the best ones.

    Read the article

  • The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

    - by Matthew Chambers
    Hello I am getting the below message on a table i am trying to create The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs Anyone know the answer to this please -- Table warrington_central.job -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS warrington_central.job ( id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT , alias_title VARCHAR(255) NOT NULL , reference_number VARCHAR(100) NOT NULL , title VARCHAR(255) NOT NULL , primary_category SMALLINT(5) UNSIGNED NOT NULL , secondary_category SMALLINT(5) UNSIGNED NOT NULL , tertiary_category SMALLINT(5) UNSIGNED NULL , address_id BIGINT(20) UNSIGNED NOT NULL , geolocation_id BIGINT(20) UNSIGNED NULL , company VARCHAR(255) NOT NULL , description VARCHAR(10000) NOT NULL , skills_required VARCHAR(10000) NOT NULL , job_type TINYINT(2) UNSIGNED NOT NULL , experience_months_required TINYINT(2) UNSIGNED NOT NULL , experience_years_required TINYINT(2) UNSIGNED NOT NULL , salary_range VARCHAR(30) NOT NULL , extra_benefits_above_salary VARCHAR(500) NOT NULL , available_from DATE NULL , available_to DATE NULL , extra_location_details VARCHAR(1000) NOT NULL , contact_email VARCHAR(100) NOT NULL , contact_phone_number VARCHAR(20) NOT NULL , contact_mobile_number VARCHAR(20) NOT NULL , terms_conditions_application VARCHAR(5000) NOT NULL , link_to_profile ENUM('0','1') NOT NULL , created_on DATETIME NOT NULL , updated_on DATETIME NOT NULL , updated_by BIGINT(20) UNSIGNED NOT NULL , add_contact_form ENUM('0','1') NOT NULL , admin_package_id TINYINT(1) UNSIGNED NOT NULL , package_start_date DATETIME NOT NULL , package_end_date DATETIME NULL , package_comment VARCHAR(500) NOT NULL , viewable_to_members_only ENUM('0','1') NOT NULL , advertise_to DATETIME NULL , show_comment ENUM('0','1') NOT NULL , hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 , visible ENUM('0','1') NOT NULL DEFAULT '0' , approved ENUM('I/* large SQL query (3.9 KB), snipped at 2,000 characters / / SQL Error (1118): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs */ SHOW WARNINGS;

    Read the article

  • ASP.NET UpdatePanel PostBacks

    - by Matthew
    I created a marker interface: public interface ISupportAJAXPostsBacks{} I added it to my Page.. public partial class MyWebForm : PageBase, ISupportAJAXPostsBacks I have this check in my PageBase class... if(this is ISupportAJAXPostsBacks) { ... do some stuff ... } If I step through via the debugger, "this is ISupportAJAXPostsBacks" evaluates to true for the initial page load, but evaluates to false when an UpdatePanel posts back on that same page. (scratches head) What is happening under the covers to cause this and what can I do about it?

    Read the article

  • Asp.net Date Binding Issue with Nulls

    - by Matthew Kruskamp
    I have a nullable date in my database. I am connecting to it with a LinqDataSource, and binding with a FormView. It allows you to place dates fine, but if you remove the date I need it to insert the null value to the db. It is instead throwing an exception. <asp:TextBox ID="TxtStartDate" runat="server" Text='<%# Bind("StartDate", "{0:MM/dd/yyyy}") %>' /> Works fine if you place a date in it, but if you delete the date out of it and save, you get System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. How do I make it send null?

    Read the article

  • How can I set the Root Namespace property correctly in a C++/CLI application?

    - by Matthew Bowen
    I have a C++/CLI application in Visual Studio 2008 whose namespace follows the .NET guideline of CompanyName.TechnologyName[.Feature][.Design]. The problem is that there seems to be no way to set a multi-level namespace in the project's Root Namespace property. I have tried both CompanyName.TechnologyName and CompanyName::TechnologyName. It seems that I cannot have a Form control inside a namespace that is not the root namespace as this causes the resources it uses to not be found, thus to me it seems impossible to follow their guideline and be consistent with my C# applications. Is there a way to set this property to use multi-leveled namespaces or am I forced to use a root namespace that is simply one-level? Or is there a solution that I am overlooking? Any help would be appreciated. Thanks

    Read the article

  • embed a jquery script after jquery is loaded by widget

    - by matthew k
    http://stackoverflow.com/a/6065421 was helpful to see how to confirm jquery has been loaded. my widget will need a class that was written using jquery. may i have some assistance on embedding this other class built using jquery? thank you, below is the snippet from the above link with my code added in the final portion as noted in the code comments: (function(window, document, version, callback) { var j, d; var loaded = false; if (!(j = window.jQuery) || version > j.fn.jquery || callback(j, loaded)) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "/media/jquery.js"; script.onload = script.onreadystatechange = function() { if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) { callback((j = window.jQuery).noConflict(1), loaded = true); j(script).remove(); } }; document.documentElement.childNodes[0].appendChild(script) } })(window, document, "1.3", function($, jquery_loaded) { //my code added below var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://mysite.com/widget/slides.jquery.js"); (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); $('#slides').slides({}); //this line gives an error. }); right now, i am trying the following based on the response(s) provided to this question (line that throws error is noted with a comment): //this function is called after jquery being embedded has been confirmed. {mysite} placeholder is nonexistent in actual code. function main() { jQuery(document).ready(function($) { var css_link = $("<link>", { rel: "stylesheet", type: "text/css", href: "http://mysite/widget/widget.css" }); css_link.appendTo('head'); $('#crf_widget').after('<div id="crf_widget_container"></div>'); /******* Load HTML *******/ var jsonp_url = "http://mysite/widget.php?callback=?"; $.getJSON(jsonp_url, function(data) { $('#crf_widget_container').html(data); $('#category_sel').change(function(){ alert(this.value); }); $.getScript("http://mysite/widget/slides.jquery.js", function(data, textStatus, jqxhr) { alert(1); //fires ok $('#slides').slides({}); //errors }); }); }); }

    Read the article

  • Prevent PHP sesison hijack, are these good ideas?

    - by matthew Rhodes
    I'm doing a simple shopping cart for a small site. I plan to store cart items as well as logged in user_id in session variables. to make things a little more secure, I thought I'd do this: sha1() the user_id before storing it in the session. Also sha1() and store the http_user_agent var with some salt, and check this along with the user_id. I know there is more one can do, but I thought this at least helps quite a bit right? and is easy for me to implement.

    Read the article

  • execute a string of PHP code on the command line

    - by Matthew J Morrison
    I'd like to be able to run a line of PHP code on the command line similar to how the following options work: :~> perl -e "print 'hi';" :~> python -c "print 'hi'" :~> ruby -e "puts 'hi'" I'd like to be able to do: :~> php "echo 'hi';" I've read that there is a -r option that can do what I need for php, however it doesn't appear to be available when I try to use it. I've tried using PHP 5.2.13 and PHP 4.4.9 and neither have an -r option available. I wrote this script (that I called run_php.php) - which works, but I'm not a huge fan of it just because I feel like there should be a more "correct" way to do it. #!/usr/bin/php5 -q <?php echo eval($argv[1]); ?> My question is: is there a -r option? If so, why is it not available when I run --help? If there is no -r option, what is the best way to do this (without writing an intermediary script if possible)? Thanks!

    Read the article

  • Cannot install windows service

    - by Matthew Dalton
    I have created a very simple window service using visual studio 2010 and .Net 4.0. This service has no functionality added from the default windows service project, other than an installer has been added. If i run installutil.exe appName.exe on my dev box or other windows 2008 R2 machines in our domain the windows service installs without issue. When i try to do this same thing on our customer site, it fails to install with the following error. Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Exception occurred while initializing the installation: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\TestService\WindowsService1.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515). This solution has only 1 project and no dependencies added. I have tried it on multiple machines in our environment and two in our customers. The machines are all windows 2008 R2, both fresh installs. One machine has just .net 2.0 and .net 4.0. The other .net 2, 3, 3.5 and 4. I am a local admin on each of the machines. I have also tried the 64bit installer but get the following error, so i think the 32 bit one is the one to use. System.BadImageFormatException Any guidance would be appreciated. Thanks.

    Read the article

  • System.Linq.Dynamic and DateTime

    - by Matthew Hood
    I am using System.Linq.Dynamic to do custom where clauses from an ajax call in .Net MVC 1.0. It works fine for strings, int etc but not for DateTime, I get the exception cannot compare String to DateTime. The very simple test code is items = items.Where(string.Format(@" {0} {1}{2}{1} ", searchField, delimiter, searchString)); Where searchField will be for example start_date and the data type is DateTime, delimiter is " (tried with nothing as well) and searchString will be 01-Jan-2009 (tried with 01/01/2009 as well) and items is an IQueryable from LinqToSql. Is there a way of specifying the data type in a dynamic where, or is there a better approach. It is currently already using some reflection to work out what type of delimiter is required.

    Read the article

  • VIsual Studio : ASP.NET Extra Page Files

    - by Matthew
    Is there any way to write a VS Add-In or something else that would allow me to be able to link files to an ASPX page in ASP.NET. My goal is to be able to have this extra file created with every ASPX page, and then use a custom MS Build Task to analyze those files and do some stuff. So for example, when I created "MyPage.aspx", I'd actually see these files on disk... MyPage.aspx MyPage.aspx.cs MyPage.aspx.designer.cs MyPage.aspx.MyExtension I want to be able to see the file when I expand a page and be able to edit the file. Possible?

    Read the article

  • When I change templates in Netbeans, why doesn't anything happen?

    - by Matthew
    I want to modify the "Java class" template, so that the class javadoc comment includes more than just the author. In Netbeans 6.8., I go to Tools Templates Java Java Class, and modify the template. However, nothing seems to change. I tried restarting Netbeans, just in case, but the old template is still used. How do I get Netbeans to recognize changes to the template for Java Classes?

    Read the article

  • Testing + production server and syncing MySQL data

    - by Matthew
    I have a web application running on LAMP with a testing server and a production server. Is there a standard practice for keeping the data on the testing server in sync with the production server? The data on the testing server gets out of date pretty quick and I feel like there must be an easier way than just dumping the production server and copying it onto the testing server every so often. It's not important that the data is in total sync, just that the testing server represents the production enviornment as accurately as possible.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28  | Next Page >