Search Results

Search found 2018 results on 81 pages for 'jason bunting'.

Page 59/81 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • Extensionless URLs in IIS 6

    - by Jason Marsell
    My client has asked me to build a personalized URL system so that they can send out really short URLs in postcards to customers like this: www.client.com/JasonSmith03 www.client.com/TonyAdams With these URLs, I need IIS 6 to trap the incoming request and pass that “JasonSmith03” token to my database to determine which landing page to redirect them to. I’d love to use an HttpHandler or HttpModule but they both look like they require an file extension (.aspx) in the URL. Wildcard mapping will chew up every incoming request and that’s ridiculous. ISAPI filters are just text routing files, so I can’t employ logic to call the database. According to Scott Guthrie, this would be cake if I had IIS 7, but I don’t. Can this be done using MVC? I’ve been working with MVP for the last few years, so I haven’t done any MVC and routing. I thought I remembered that MVC has the ability to use REST-style extensionless URLs. I’d be more than happy to have these personalized URLs land on a site that’s built in MVC, if it will work. Thank you!

    Read the article

  • How to set RAILS_ENV variable when running Rails tests?

    - by Jason
    In both my environment.rb and test_helper.rb files I have: ENV["RAILS_ENV"] = "development" I have one functional test written, however when I run it, the script tries to connect to my database using the "test" configuration settings which are in the database.ymal file & won't connect the the database. How can I run my tests using the "development" environment settings?

    Read the article

  • python: help defining/installing simple script to setup machine-specific information

    - by Jason S
    (This is related to scons but I think most of the following should be fairly general to python) I would like to define a python file/library that I put in a Well-Known Place somewhere on my computer that I can use to define machine-specific paths, and was looking for help on how to do this well, since I'm a beginner to Python & really only use it for my scons work. scons uses a SConstruct file which can execute python code. What I would like to do is something like this: My SConstruct file would contain this at the beginning: defaultEnv = JJJJJ.getMachineSpecificPaths() or (do both of these syntaxes work?) import JJJJJ defaultEnv = getMachineSpecificPaths() I define a JJJJJ.py file somewhere installed in the python dir which contains the following def getMachineSpecificPaths(): ... does something here, I don't know what ... that reads a file machine-specific-paths.txt (maybe it has the code Ross Rogers mentioned in my other question) located in the same directory as JJJJJ.py containing the following: machine-specific-paths.txt TI_C28_ROOT C:/appl/ti/ccs/?4.1.1/ccsv4/tools/co?mpiler/c2000 JSDB c:/bin/jsdb/jsdb.exe PYTHON_PATH c:/appl/python/2.6.4 The thing is, I don't really know much about the conventions in Python about where you put system-wide libraries and files. This is probably really simple to get right but I don't know how.

    Read the article

  • DataGrid Column names don't seem to be binding

    - by Jason
    Sort of a Flex newbie here so bear with me. I've got a DataGrid defined as follows: <mx:Script> ... private function getColumns(names:ArrayCollection):Array { var ret:Array = new Array(); for each (var name:String in names) { var column:DataGridColumn = new DataGridColumn(name); ret.push(column); } return ret; } </mx:Script> <mx:DataGrid id="grid" width="100%" height="100%" paddingTop="0" columns="{getColumns(_dataSetLoader.columnNames)}" horizontalScrollPolicy="auto" labelFunction="labelFunction" dataProvider="{_dataSetLoader.data}" /> ...where _dataSetLoader is an instance of an object that looks like: [Bindable] public class DataSetLoader extends EventDispatcher { ... private var _data:ArrayCollection = new ArrayCollection(); private var _columnNames:ArrayCollection = new ArrayCollection(); ... public function reset():void { _status = NOTLOADED; _data.removeAll(); _columnNames.removeAll(); } ... When reset() is called on the dataSetLoader instance, the DataGrid empties the data in the cells, as expected, but leaves the column names, even though reset() calls _columnNames.removeAll(). Shouldn't the change in the collection trigger a change in the DataGrid?

    Read the article

  • Specify which xml file to load when link is clicked

    - by Jason
    Good morning, I would like it so when a link is clicked on the homepage it would load a particular xml file into the next page (the page is called category-list.apsx). This category list page uses the Repeater Control method to display the xml details on the page. I used the example shown here: http://www.w3schools.com/aspnet/aspnet_repeater.asp So at the moment the repeater script looks like: <script runat="server"> sub Page_Load if Not Page.IsPostBack then dim mycategories=New DataSet mycategories.ReadXml(MapPath("categories.xml")) categories.DataSource=mycategories categories.DataBind() end if end sub </script> After doing some research I did find someone with the same problem and the solution was to insert #tags as part of the link on the homepage (i.e. category-list.apsx#company1results) and then some script on the list page to pick up the correct xml file: <script type="text/javascript"> var old_onload = window.onload; // Play it safe by respecting onload handlers set by other scripts. window.onload=function() { var categories = document.location.href.substring(document.location.href.indexOf("#")+1); loadXMLDoc('XML/'+categories+'.xml'); old_onload(); } </script> This was from the following link: http://www.hotscripts.com/forums/javascript/45641-solved-specify-xml-file-load-when-click-link.html How can I get these two scripts to connect with each other? Thank you for your time

    Read the article

  • Why is RAISERROR misspelled? Or is it not?

    - by Jason
    Why isn't RAISERROR spelled RAISEERROR? Where is the second E? I could understand if it were some ancient keyword length constraint, but I wouldn't expect it to be a nine-character limit. Is RAIS or RROR a technical word such that "raise-error" is just a mis-reading? Are its (immediate) origins in a different language? I've searched Google but not finding much on the subject.

    Read the article

  • Thoughts on GoGrid vs EC2

    - by Jason
    I am currently hosting my SaaS application at GoGrid (Microsoft stack). Here's what I have: Database Server - physical box, 12 GB RAM, 2 X Quad Core CPU (2.13 GHz Xeon E5506) 2 Web / App servers - cloud servers, 2 GB RAM, 2 VCPUs 300 GB monthly bandwidth I am paying around $900 / month for this. My web / app servers are busting at the seams and need to be upgraded to 4 GB of RAM. I also need a firewall, and GoGrid just added this service for an additional $200. After the upgrade, I will be paying around $1,400. I started looking at Amazon EC2, specifically this config: Database server - "High Memory Double Extra Large Instance" - 34 GB RAM, 13 EC2 compute units 2 Web / App servers - "Large Instance" - 7.5 GB RAM, 4 EC2 compute units If I go with 1 year reserved instances, my upfront cost would be $4,500 and my monthly would be $700. This comes to $1,075 / month when amortized. Amazon also includes a firewall for free. Here are my questions: Do any of you have experience running a database (especially SQL Server) on an EC2 instance? How did it perform compared to a dedicated machine? One of my major concerns is with disk I/O. Amazon's description of a compute unit is fairly vague. Any ideas on how the CPU performance on the database servers would compare? I am hoping that the Amazon solution will provide significantly better performance than my current or even improved GoGrid setup. Having a virtual database server would also be nice in terms of availability. Right now I would be in serious trouble if I had any hardware issues. Thanks for any insight...

    Read the article

  • Unfailing Javascript Image Preview

    - by Jason
    I have the following code that presents the user with a preview of the image they're trying to upload and works really well in FF: var img = document.createElement('img'); img.src = $('#imageUploader').get(0).files[0].getAsDataURL(); The problem is, getAsDataURL() only works in FF. Is there something similar/a workaround for this kind of functionality in Chrome (specifically)?

    Read the article

  • Type or namespace could not be found

    - by Jason Shultz
    I'm using LINQ to SQL to connect my database to my home page. I created my datacontext (named businessModel.dbml) In it I have two tables named Category and Business. In home controller I reference the model and attempt to return to the view the table: var dataContext = new businessModelDataContext(); var business = from b in dataContext.Businesses select b; ViewData["WelcomeMessage"] = "Welcome to Jerome, Arizona!"; ViewData["MottoMessage"] = "Largest Ghost Town in America!"; return View(business); and in the view I have this: <%@ Import Namespace="WelcomeToJerome.Models" %> and <% foreach (business b in (IEnumerable)ViewData.Model) { %> <li><%= b.Title %></li> <% } %> Yet, in the view business is cursed with the red underline and say's that The type or namespace name 'business' could not be found (are you missing a using directive or an assembly reference?) What am I doing wrong? This has had me stumped all afternoon. link to all the code in pastebin: http://pastebin.com/es4RnS2q

    Read the article

  • Java/swing: console component?

    - by Jason S
    I am looking for a component I can use in Swing that acts as a GUI console which has a text area with scrollbars that can be set to a particular font has an InputStream and an OutputStream that a host application can obtain accepts keyboard input, prints it onto the end of the console text, and sends that input to the InputStream prints the OutputStream text to the end of the console has some kind of FIFO-ish property whereby the amount of text displayed in the console can be limited by automatically discarding the oldest text, when appropriate allows copy (but not cut or paste or any other editing) of the console text to the system clipboard This is kind of like the Console tab in Eclipse. Are there any good libraries that provide this?

    Read the article

  • Can NP-Intermediate exist if P = NP?

    - by Jason Baker
    My understanding is that Ladner's theorem is basically this: P != NP implies that there exists a set NPI where NPI is not in P and NPI is not NP-complete What happens to this theorem if we assume that P = NP rather than P != NP? We know that if NP Intermediate doesn't exist, then P = NP. But can NP Intermediate exist if P = NP?

    Read the article

  • Bidirectional/Loopback UDP in .net

    - by Jason Williams
    I've got an app that needs to transmit and receive on the same port. This can happen in two cases: Where the PC is talking to a piece of remote hardware. It "replies to sender", so the datagrams come back in to my PC via the sending port. Where the PC is talking to itself (loopback mode) for testing and demoing (a test app feeds fake data into our main app via UDP). This only seems to fail when trying to achieve loopback. The only way I can get it working is to ensure that the receiver is set up first - something I cannot guarantee. Can anyone help narrow down my search by suggesting a "correct" way to implement the UdpClient(s) to handle the above situations reliably? (The only solution that I've found to work reliably with the remote hardware is to use a single UdpClient in a bidirectional manner, although I'm working with legacy code that may be influencing that finding. I've tried using two UdpClients, but they step on each others toes - In some cases, once one client is started up, the other client cannot connect. With ExclusiveAddressUse/ReuseAddress set up to allow port sharing, I can almost get it to work, apart from the receiver having to start first)

    Read the article

  • Two-way databinding of a custom templated control. Eval works, but not Bind.

    - by Jason
    I hate long code snippets and I'm sorry about this one, but it turns out that this asp.net stuff can't get much shorter and it's so specific that I haven't been able to generalize it without a full code listing. I just want simple two-way, declarative databinding to a single instance of an object. Not a list of objects of a type with a bunch of NotImplementedExceptions for Add, Delete, and Select, but just a single view-state persisted object. This is certainly something that can be done but I've struggled with an implementation for years. This newest, closest implementation was inspired by this article from 4-Guys-From-Rolla, http://msdn.microsoft.com/en-us/library/aa478964.aspx. Unfortunately, after implementing, I'm getting the following error and I don't know what I'm missing: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. If I don't use Bind(), and only use Eval() functionality, it works. In that way, the error is especially confusing. Here's the simplified codeset that still produces the error: using System.ComponentModel; namespace System.Web.UI.WebControls.Special { public class SampleFormData { public string SampleString = "Sample String Data"; public int SampleInt = -1; } [ToolboxItem(false)] public class SampleSpecificFormDataContainer : WebControl, INamingContainer { SampleSpecificEntryForm entryForm; internal SampleSpecificEntryForm EntryForm { get { return entryForm; } } [Bindable(true), Category("Data")] public string SampleString { get { return entryForm.FormData.SampleString; } set { entryForm.FormData.SampleString = value; } } [Bindable(true), Category("Data")] public int SampleInt { get { return entryForm.FormData.SampleInt; } set { entryForm.FormData.SampleInt = value; } } internal SampleSpecificFormDataContainer(SampleSpecificEntryForm entryForm) { this.entryForm = entryForm; } } public class SampleSpecificEntryForm : WebControl, INamingContainer { #region Template private IBindableTemplate formTemplate = null; [Browsable(false), DefaultValue(null), TemplateContainer(typeof(SampleSpecificFormDataContainer), ComponentModel.BindingDirection.TwoWay), PersistenceMode(PersistenceMode.InnerProperty)] public virtual IBindableTemplate FormTemplate { get { return formTemplate; } set { formTemplate = value; } } #endregion #region Viewstate SampleFormData FormDataVS { get { return (ViewState["FormData"] as SampleFormData) ?? new SampleFormData(); } set { ViewState["FormData"] = value; SaveViewState(); } } #endregion public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } private SampleSpecificFormDataContainer formDataContainer = null; [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public SampleSpecificFormDataContainer FormDataContainer { get { EnsureChildControls(); return formDataContainer; } } [Bindable(true), Browsable(false)] public SampleFormData FormData { get { return FormDataVS; } set { FormDataVS = value; } } protected override void CreateChildControls() { if (!this.ChildControlsCreated) { Controls.Clear(); formDataContainer = new SampleSpecificFormDataContainer(this); Controls.Add(formDataContainer); FormTemplate.InstantiateIn(formDataContainer); this.ChildControlsCreated = true; } } public override void DataBind() { CreateChildControls(); base.DataBind(); } } } With an ASP.NET page the following: <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="EntryFormTest._Default2" EnableEventValidation="false" %> <%@ Register Assembly="EntryForm" Namespace="System.Web.UI.WebControls.Special" TagPrefix="cc1" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to ASP.NET! </h2> <cc1:SampleSpecificEntryForm ID="EntryForm1" runat="server"> <FormTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SampleString") %>'></asp:TextBox><br /> <h3>(<%# Container.SampleString %>)</h3><br /> <asp:Button ID="Button1" runat="server" Text="Button" /> </FormTemplate> </cc1:SampleSpecificEntryForm> </asp:Content> Default2.aspx.cs using System; namespace EntryFormTest { public partial class _Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { EntryForm1.DataBind(); } } } Thanks for any help!

    Read the article

  • How to rewrite url to include subdirectory?

    - by Jason Roberts
    The following set of rewrite rules rewrite any urls formatted as foo.mydomain.com/bar to mydomain.com/mysubs/foo/bar.php. This all works fine except if I have a subdirectory named 'blah' in the original url such as foo.mydomain.com/blah/bar, then it will rewrite it as mydomain.com/mysubs/foo/bar (without the blah subdirectory) when what I need is the url to be rewritten as mydomain.com/mysubs/foo/blah/bar. So, what do I need to change to make this work correctly? Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !www.mydomain.com$ [NC] RewriteCond %{HTTP_HOST} ^([^./]+)\.mydomain\.com$ RewriteRule !^mysubs/ mysubs/%1%{REQUEST_URI} [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php

    Read the article

  • Eclipse-plugin: Can't see my results in AbstractTextSearchViewPage

    - by Jason Kealey
    I've implemented a ISearchQuery and ISearchResult. They get loaded into my class that extends AbstractTextSearchViewPage. I'm using some code taken from the FileSearchPage to show the results in both a TreeViewer and a TableViewer. protected void configureTableViewer(TableViewer viewer) { viewer.setUseHashlookup(true); FileLabelProvider innerLabelProvider = new FileLabelProvider(this, FileLabelProvider.SHOW_LABEL_PATH); viewer.setLabelProvider(new DecoratingLabelProvider(innerLabelProvider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); viewer.setContentProvider(new UrnTableContentProvider(this)); viewer.setComparator(new DecoratorIgnoringViewerSorter(innerLabelProvider)); fContentProvider = (IFileSearchContentProvider) viewer.getContentProvider(); } protected void configureTreeViewer(TreeViewer viewer) { viewer.setUseHashlookup(true); FileLabelProvider innerLabelProvider = new FileLabelProvider(this, FileLabelProvider.SHOW_LABEL_PATH); viewer.setLabelProvider(new DecoratingLabelProvider(innerLabelProvider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); viewer.setContentProvider(new UrnTreeContentProvider(this, viewer)); viewer.setComparator(new DecoratorIgnoringViewerSorter(innerLabelProvider)); fContentProvider = (IFileSearchContentProvider) viewer.getContentProvider(); } When searching using the regular file search, each individual result is visible under the file and the label says "(X matches)". In my own editor, however, I only see the file with X matches found inside that file, but I don't see the details in either the TreeViewer or the TableViewer. Any tips?

    Read the article

  • Will there be IQueryable-like additions to IObservable? (.NET Rx)

    - by Jason
    The new IObservable/IObserver frameworks in the System.Reactive library coming in .NET 4.0 are very exciting (see this and this link). It may be too early to speculate, but will there also be a (for lack of a better term) IQueryable-like framework built for these new interfaces as well? One particular use case would be to assist in pre-processing events at the source, rather than in the chain of the receiving calls. For example, if you have a very 'chatty' event interface, using the Subscribe().Where(...) will receive all events through the pipeline and the client does the filtering. What I am wondering is if there will be something akin to IQueryableObservable, whereby these LINQ methods will be 'compiled' into some 'smart' Subscribe implementation in a source. I can imagine certain network server architectures that could use such a framework. Or how about an add-on to SQL Server (or any RDBMS for that matter) that would allow .NET code to receive new data notifications (triggers in code) and would need those notifications filtered server-side.

    Read the article

  • Magento Product Details Image Size

    - by Jason
    Magento 1.4 Default Product Details image size is 265x265. All of our product images will be probably 2x taller than wide, and even if we pad them to make them square 265 will be too small to see detail in the image, so we'd like to make the image taller. I found the media.phtml file How would we go about modifying this file/Magento so that the product details page image is 265W x 530H. This looks like the code that displays the image. <p class="product-image"> <?php $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />'; echo $_helper->productAttribute($_product, $_img, 'image'); ?> </p> Thanks

    Read the article

  • MVC3/Razor Client Validation Not firing

    - by Jason Gerstorff
    I am trying to get client validation working in MVC3 using data annotations. I have looked at similar posts including this MVC3 Client side validation not working for the answer. I'm using an EF data model. I created a partial class like this for my validations. [MetadataType(typeof(Post_Validation))] public partial class Post { } public class Post_Validation { [Required(ErrorMessage = "Title is required")] [StringLength(5, ErrorMessage = "Title may not be longer than 5 characters")] public string Title { get; set; } [Required(ErrorMessage = "Text is required")] [DataType(DataType.MultilineText)] public string Text { get; set; } [Required(ErrorMessage = "Publish Date is required")] [DataType(DataType.DateTime)] public DateTime PublishDate { get; set; } } My cshtml page includes the following. <h2>Create</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm()) { @Html.ValidationSummary(true) Post <div class="editor-label"> @Html.LabelFor(model => model.Title) </div> <div class="editor-field"> @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) </div> <div class="editor-label"> @Html.LabelFor(model => model.Text) </div> <div class="editor-field"> @Html.EditorFor(model => model.Text) @Html.ValidationMessageFor(model => model.Text) Web Config: <appSettings> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> Layout: <head> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script> So, the Multiline Text annotation works and creates a text area. But none of the validations work client side. I don't know what i might be missing. Any ideas?? i can post more information if needed. Thanks!

    Read the article

  • How do I politely tell a colleague to RTFM?

    - by Jason Baker
    I think by now, I've transitioned from a junior developer to an "intermediate" developer. Previously, whenever someone would ask me a question, I'd gleefully answer them simply because I was happy to be of use to someone and wanted to prove my worth as a developer. Now it's gotten to the point where I can't get work done because I'm constantly answering questions that can be answered just by spending a few seconds looking at documentation or searching google (sometimes from developers more senior than I). On one hand, I genuinely want to help them out and enjoy teaching other people. However, I just don't have enough bandwidth to keep answering these kinds of questions. How do I handle this kind of thing politely?

    Read the article

  • Why does DataInputStream not support integers?

    - by Jason
    I need to read in a list of numbers from a file, none of which are larger than 32767. Originally I was going to use the Scanner class to pull in the data, then I read about DataInputStream. This would work well for me, except that according to the API, it supports all primitive variables EXCEPT ints! Listed are longs, shorts, bytes, chars, booleans, ect, but no ints. I have no need for double precision from the incoming data. Is this a deliberate or unintentional oversight?

    Read the article

  • WiX Installing Server Control to Toolbox

    - by Jason
    I've got a server control in a dll deployed as part of a wix msi installation. I have gotten the installer to make the control available in the toolbox's ADD ITEMS window, but the contol isn't added to the the toolbox by default. How can I configure wix the installer to automatically add the toolbox item to, say, toolboxes to be shown for asp.net websites and web application projects under a new Category.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >