Search Results

Search found 977 results on 40 pages for 'josh pollard'.

Page 29/40 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • asp.net mvc radio button state

    - by Josh Bush
    I'm trying out asp.net mvc for a new project, and I ran across something odd. When I use the MVC UI helpers for textboxes, the values get persisted between calls. But, when I use a series of radio buttons, the checked state doesn't get persisted. Here's an example from my view. <li> <%=Html.RadioButton("providerType","1")%><label>Hospital</label> <%=Html.RadioButton("providerType","2")%><label>Facility</label> <%=Html.RadioButton("providerType","3")%><label>Physician</label> </li> When the form gets posted back, I build up an object with "ProviderType" as one of it's properties. The value on the object is getting set, and then I RedirectToAction with the provider as a argument. All is well, and I end up at a URL like "http://localhost/Provider/List?ProviderType=1" with ProviderType showing. The value gets persisted to the URL, but the UI helper isn't picking up the checked state. I'm having this problem with listbox, dropdownlist, and radiobutton. Textboxes pick up the values just fine. Do you see something I'm doing wrong? I'm assuming that the helpers will do this for me, but maybe I'll just have to take care of this on my own. I'm just feeling my way through this, so your input is appreciated. Edit: I just found the override for the SelectList constructor that takes a selected value. That took care of my dropdown issue I mentioned above. Edit #2: I found something that works, but it pains me to do it this way. I feel like this should be inferred. <li> <%=Html.RadioButton("ProviderType","1",Request["ProviderType"]=="1")%><label>Hospital</label> <%=Html.RadioButton("ProviderType", "2", Request["ProviderType"] == "2")%><label>Facility</label> <%=Html.RadioButton("ProviderType", "3", Request["ProviderType"] == "3")%><label>Physician</label> </li> Hopefully someone will come up with another way.

    Read the article

  • How should images be stored when multiple sizes are needed?

    - by Josh Curren
    What is the best way to store images? Currently when an image is uploaded I resize it to 3 different sizes (a thumbnail, a normal size, and a large size). I save in a database a description of the image, the format, and use the id number from the database as the image name. Each size image has its own directory. Should I be storing the images in the database? Should I only be storing the larger size and generate the thumbnail as needed? Or any other ideas you have?

    Read the article

  • Replacing deprecated <:< Manifest type witness in Scala 2.10

    - by Josh
    Can someone point me at what I should be doing under scala 2.10 in place of this deprecated type witness on Manifest? reflect.ClassManifest.singleType(foo) <:< barManifest Honestly, my goal here is just to replace it with something that doesn't raise a deprecation warning. I'm happy to use the new reflection API. Here's the code in question in context, if that's important: https://github.com/azavea/geotrellis/blob/master/src/main/scala/geotrellis/feature/op/geometry/geometry.scala#L45

    Read the article

  • Google App Engine - Document Editor Creation/Tap Into Google Docs?

    - by Josh Patton
    What is the best way to create a custom document editor in GAE? I'm making a website meant for a School Robotics Club (With support for any other organization - DRY). We currently use Google services for online collaboration, I'm wondering if there is a way to tap into Google Docs and allow users to edit a Google Document without using Google Accounts or the Google Doc interface. If that is not possible (I've researched and I don't think it is), what is the best way to make a document editor? I want it completely on the website I'm creating, so I'm assuming just some javascript editor like TinyMCE + Ajax + Datastore. Is their anything that replicates Google Doc's/Microsoft Offices's/OpenOffice.org's feature set as far as fonts, spacing, alignment, justification, etc.?

    Read the article

  • HTML IFrame Help

    - by Josh K
    Hey Few Questions 1.Is it legal to have an IFrame on a website which inside has an external website? 2.In an IFrame is it possible to only show a section of the src that isnt the top left of the site (for instance if there was a chart in the middle of a website, could u have just the chart in your Iframe, or atleast start it centred there) 3.Any way to stop my IFrame from auto redirecting me to the external site for 3: ie <iframe src="http://fifa.com"></iframe> Just sends me to fifa instead of actually showing that site in a frame.

    Read the article

  • Global Import Aliasing in .NET

    - by Josh Stodola
    Using import aliasing in a single class, we can reference class library namespaces by assigning our own custom alias like this: Imports Db = Company.Lib.Data.Objects And then we are able to reference the classes inside of Company.Lib.Data.Objects by using the Db alias that we assigned. Is it possible to do this at the global level so that the alias is applied to the entire solution instead of the given file? Currently, we are working with web applications, so I was hoping we could add something to web.config, but I am also interested in whether or not this is possible with windows forms, console apps, and/or class libraries.

    Read the article

  • Where is the VB.Net debugger "Make Object ID" function?

    - by Josh
    When using the visual studio 2008 debugger with c# i can right-click on a variable and choose "Make Object ID" which allows me to watch that object (via it's ID) regardless of whether it is in the current stack frame or not. When the debugger is in VB code, (doesnt matter if it's run from a c# unit test or a vb unit test) That option isn't there. Where did VB put this feature? Or does it simply not support it like so many other helpful c# features?

    Read the article

  • Regex Question..

    - by Josh
    Hello everyone- In my C# Console App I'm trying to use Regex to search a string to determine if there is a match or not. Below is my code but it is not quite working right so I will explain further. sSearchString is set to "_One-Call_Pipeline_Locations" and pDS.Name is a filename it is searching against. Using the code below it is set to true for Nevada_One-Call_Pipeline_Locations and Nevada_One-Call_Pipeline_LocationsMAXIMUM. There should be a match for Nevada_One-Call_Pipeline_Locations But Not for Nevada_One-Call_Pipeline_LocationsMAXIMUM. How can I change my code to do this properly? Thanks in advance if (Regex.IsMatch(pDS.Name, sSearchString))

    Read the article

  • Django complex queries

    - by Josh K
    I need to craft a filter for an object that checks date ranges. Right now I'm performing a very inefficient loop which checks all the objects. I would like to simplify this to a database call. The logic is you have a start and an end date objects. I need to check if the start OR the end is within the range of an appointment. if (start >= appointment.start && start < appointment.end) || (end > appointment.start && end <= appointment.end) I could do this in SQL, but I'm not as familiar with the Django model structure for more complex queries.

    Read the article

  • Pop-Up Window at inital start up, of android application

    - by Josh Fairbank
    I am trying to find a code that will do a popup at the initial start up on an installed app. Much like a changelog that is starting to appear in more and more apps. I have found some similar codes, but being a beginner I haven't been able to figure out where to exactly put the code in and I always have tons of errors that still do not work once I try and fix them. I am working in Eclipse with an android project, and I'm using a webview to show a website. XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_height="fill_parent" android:layout_width="fill_parent" android:scrollbarAlwaysDrawVerticalTrack="false"/> </LinearLayout> Java File: package com.A2Ddesigners.WhatThe; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; import android.view.KeyEvent; public class Whatthe extends Activity { WebView webview; /** Called when the activity is first created. */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) { webview.goBack(); return true; } return super.onKeyDown(keyCode, event); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview = (WebView) findViewById(R.id.webview); webview.setWebViewClient(new HelloWebViewClient()); webview.getSettings().setJavaScriptEnabled(true); webview.setInitialScale(50); webview.getSettings().setUseWideViewPort(true); webview.loadUrl("http://mdsitest2.com/"); } private class HelloWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } }

    Read the article

  • What are the advantages/disadvantages of Seam over Spring?

    - by Josh
    What are the advantages/disadvantages of Seam over Spring? Why would I use Seam in lieu of Spring? Is there anything that can be done in Seam that can't be done in Spring? Anything in Spring that can't be done in Seam? What about stateful/stateless architecture? I am a Spring user, so I am biased, naturally.

    Read the article

  • tuProlog unknow behavior

    - by Josh Guzman
    I'm using tuProlog to integrate Prolog with Java, to do so I'v been defined a .pl file wich contains this code: go:-write('hello world!'),nl. In my Java File at NetBeans i Have a Main Class that invokes this: Prolog engine = new Prolog(); Theory theory = new Theory(new FileInputStream("facultad.pl")); try { engine.setTheory(theory); } catch (InvalidTheoryException ex) { } SolveInfo solution = engine.solve("go."); if (solution.isSuccess()) { System.out.println(solution.getSolution()); } This Code must returns 'hello world', but instead of that it answer 'go', any ideas about this erratic behavior ??

    Read the article

  • Eval IronPython Scripts during ASP.NET Web Request; Static Engine or Not

    - by Josh Pearce
    I would like to create an ASP.NET MVC web application which has extensible logic that does not require a re-build. I was thinking of creating a filter which had an instance of the IronPython engine. What I would like to know is: how much overhead is there in creating a new engine during each web request, and would it be a better idea to keep a static engine around? However, if I were to keep a single static engine around, what are the issues I might run into as far as locking and script scope? Is it possible to have multiple scopes in the same IropPython engine so I don't get variable collision and security issues between web requests?

    Read the article

  • C++ - Opening a file inside a function using fopen

    - by Josh
    I am using Visual Studio 2005 (C++). I am passing a string into a function as a char array. I want to open the file passed in as a parameter and use it. I know my code works to an extent, because if I hardcode the filename as the first parameter it works perfectly. I do notice if I look at the value as a watch, the value includes the address aside the string literal. I have tried passing in the filename as a pointer, but it then complains about type conversion with __w64. As I said before it works fine with "filename.txt" in place of fileName. I am stumped. void read(char fileName[50],int destArray[MAX_R][MAX_C],int demSize[2]) { int rows=0; int cols=0; int row=0; int col=0; FILE * f = fopen(fileName,"r"); ...

    Read the article

  • Suggested C++ books?

    - by Josh Bradley
    Ok, I've had one semester of C++ and will be taking a second semester in it after I have taken a Data Structure class this fall. In the first class, we dealt mainly with C++ syntax and the textbook we used was ok, but now I'm wanting to go ahead and purchase a great C++ book that encompasses a lot of the programming concepts used today. I'm learning Objective-C on my own and was able to get through the whole object-oriented stuff pretty easily, along with other things like pointers, inheritance, delegation, etc. It doesn't have to exactly have EVERYTHING in it, but I do want to buy the book with the most information in it. Money is no problem. So my question is what book did you use or still use for C++? Is it a book that you can reference back to if you ever forget how to do something small, or would you have to go online and find the answer.

    Read the article

  • Stage shifts when using addChild?

    - by josh
    I'm having a very odd bug with ActionScript 3 in Flash CS4. I am adding movie clips to a stage in a for loop and then moving them out of view so that I can pull them in and remove them when I need them. I've narrowed down the issue to a point that I know that every time one of the movie clips are added to the stage using addChild(), the stage shifts to the right by one pixel. I know that sounds odd, but it's literally true... the 0 line on the y axis is shifted to the right one pixel every time the movie clip is added. I have no idea how this could be happening. Here's the code that is doing the work: private function setupSlides():void { for(x = 0; x < TOTAL_SLIDES; x++) { var ClassReference:Class = getDefinitionByName("Slide" + (x+1)) as Class; var s:MovieClip = new ClassReference() as MovieClip; s.x = 9999; s.y = 9999; addChild(s); slides[x] = s; } } Any thoughts?

    Read the article

  • jQuery selectable() elements update values

    - by Josh
    Basically what I'm trying to do is update the value attribute of a hidden input field contained within the selected element when the selectable() UI stops running. If the element is selected, then the input's value should be the name attribute of that particular LI, whereas if the element is not selected, the value should be updated as empty. HTML Sample: <ul id="selector"> <li class="networkicon shr-digg" name="shr-digg"> <div></div> <label>Digg</label> <input type="hidden" value="" name="bookmark[]" /> </li> <li class="networkicon shr-reddit" name="shr-reddit"> <div></div> <label>Reddit</label> <input type="hidden" value="" name="bookmark[]" /> </li> <li class="networkicon shr-newsvine" name="shr-newsvine"> <div></div> <label>Newsvine</label> <input type="hidden" value="" name="bookmark[]" /> </li> </ul> Script Sample: $(function() { $("#selector").selectable({ filter: 'li', selected: function(event, ui) { $(".ui-selected").each(obj, function() { $(this).children('input').val($(this).attr('name')); }); }, unselected: function(event, ui) { $(".ui-selected").each(obj, function() { $(this).children('input').val(''); }); } }); });

    Read the article

  • Easy Python input question

    - by Josh K
    I'd like to have something similar to the following pseudo code: while input is not None and timer < 5: input = getChar() timer = time.time() - start if timer >= 5: print "took too long" else: print input Anyway to do this without threading? I would like an input method that returns whatever has been entered since the last time it was called, or None (null) if nothing was entered.

    Read the article

  • Rails: Can't set or update tag_list using a text field with acts_as_taggable_on

    - by Josh
    Hey everyone, I'm trying to add tagging to a rails photo gallery system I'm working on. It works from the back-end, but if I try to set or change it in the form view, it doesn't work. I added acts_as_taggable to the photo model and did the migrations. My gallery builder is programmed to add one tag automatically to each photo it creates. This works fine, just as if it were setting it for the console. However, I can't seem to set tags using a text_field in the photo form. Here's the code I added to my photo form: <p> <%= f.label :tag_list %><br /> <%= f.text_field :tag_list %> </p> Now, that's pretty trivial, and since :tag_list supports single-string comma-separated assignment (e.g. tag_list = "this, that, the other" #= ['this', 'that', 'the other']), I don't see why using a text field doesn't work. And to make even less sense, if a tag list has already been populated, the list will still show up in the text field when editing the photo. I just can't seem to commit any changes to the list. The documentation on their github page doesn't appear to give any information on how to set these values from the view. Any ideas? Oh, and I'm using the Rails 3 gem version.

    Read the article

  • Why can't I handle a KeyboardInterrupt in python?

    - by Josh
    I'm writing python 2.6.6 code on windows that looks like this: try: dostuff() except KeyboardInterrupt: print "Interrupted!" except: print "Some other exception?" finally: print "cleaning up...." print "done." dostuff() is a function that loops forever, reading a line at a time from an input stream and acting on it. I want to be able to stop it and clean up when I hit ctrl-c. What's happening instead is that the code under except KeyboardInterrupt: isn't running at all. The only thing that gets printed is "cleaning up...", and then a traceback is printed that looks like this: Traceback (most recent call last): File "filename.py", line 119, in <module> print 'cleaning up...' KeyboardInterrupt So, exception handling code is NOT running, and the traceback claims that a KeyboardInterrupt occurred during the finally clause, which doesn't make sense because hitting ctrl-c is what caused that part to run in the first place! Even the generic except: clause isn't running. EDIT: Based on the comments, I replaced the contents of the try: block with sys.stdin.read(). The problem still occurs exactly as described, with the first line of the finally: block running and then printing the same traceback.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >