Search Results

Search found 1075 results on 43 pages for 'thomas matthews'.

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

  • Extracting an interface from .NEt System classes

    - by Thomas
    When using Visual Studio it is easy to extract an interface from a class that I have written myself. I right click on the class and select 'Refactor' then select 'Extract Interface'. Let's assume for a second that I wanted to create a ConfigurationManager wrapper and write some tests around it. A quick way to do that would be to extract an interface from ConfigurationManager by right clicking it, then 'Go To Definition' and then from inside the class select 'Refactor' then select 'Extract Interface'. Then I would simply create my wrapper class, inherit from my newly created interface, and then implement it and I have a great starting point for my wrapper class. However, extracting an interface from any .NET system classes is not possible, probably because it's just meta data about the classes and not the classes themselves (or I am doing it wrong). Is there an easy way to do what I am trying to accomplish? I want to ensure I am not wasting time typing what I don't need to be typing. Thanks

    Read the article

  • Get ViewData IList back on postback in ASP.NET MVC

    - by Thomas
    I have the following in my view: <%using (Html.BeginForm()) {%> <% foreach (var item in Model.Cart) { %> <div> <%= Html.TextBox("Cart.Quantity", item.Quantity, new { maxlength = "2" })%> <%= Html.Hidden("Cart.ItemID", item.ItemID)%> </div> <% } %> <input name="update" type="image" src="image.gif" /> <% } % I then have this code in my controller: public ActionResult Index() { CartViewData cartViewData = new CartViewData(); IList<Item> items = ItemManager.GetItems(); cartViewData.Cart = items; return View("Index", cartViewData); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(CartViewData cartViewData) { // cartviewData is null } Is there a way to grab the List on the postback to see if the values in the textboxes have changed? Thanks Below is a simplified example since it was requested: <% for (int i = 0; i < Model.Cart.Count; i++ ) { %> <a href="javascript:void(0);" onclick="removeItem(<%= Model.Cart[i].ShoppingCartItemID %>);">Remove</a> <% } %> Hope this helps.

    Read the article

  • Apply a specific class to the first item in a series with PHP

    - by Thomas
    I have a php script that echoes a series of uploaded images and I need to apply a class to the first image echoed in the series. Is this possible? For example, if I want to display 10 images and apply a class to only the first image, how would I go about it? Here is the code, I am working with: <div id="gallery"> <?php query_posts('cat=7'); while(have_posts()) { the_post(); $image_tag = wp_get_post_image('return_html=true'); $resized_img = getphpthumburl($image_tag,'h=387&w=587&zc=1'); $url = get_permalink(); $Price ='Price'; $Location = 'Location'; $title = $post->post_title; echo "<a href='$url'><img src='$resized_img' width='587' height='387' "; echo "rel=\"<div class='gallery_title'><h2>"; echo $title; echo "</h2></div>"; echo "<div class='pre_box'>Rate:</div><div class='entry'>\$"; echo get_post_meta($post->ID, $Price, true); echo "</div><div class='pre_box'>Location:</div><div class='entry'>"; echo get_post_meta($post->ID, $Location, true); echo "</div>\""; echo "'/></a>"; echo ""; } ?> On line 13, the code looks like this: echo "<a href='$url'><img src='$resized_img' width='587' height='387' "; For the first item only, I need it to look like this: echo "<a href='$url' class='show'><img src='$resized_img' width='587' height='387' ";

    Read the article

  • Silverlight Isolated Storage and loading big files

    - by Thomas Joulin
    In a Windows Phone 7 application, I would like to query a big XML file (list of cities) stored using Isolated Storage. If I do that this way, will the file be loaded to memory ( 5 mo) ? If so, what other solution do I have? Edit: More details. I want to use AutoCompleteBox (http://www.jeff.wilcox.name/2008/10/introducing-autocompletebox/), but instead of using a web service (this is fixed data, no need to be online), I want to query a file/database/isolated storage... I have a fixed list of cities. I said in the comments it's 40k, but it finally seems closer to 1k rows.

    Read the article

  • How can my facebook application post message to a wall?

    - by Thomas Dekiere
    i already found out how to post something to a wall with the graph api on behalf of the facebook user. But now i want to post something in the name of my application. Here is how i'm trying to do this: protected void btn_submit_Click(object sender, EventArgs e) { Dictionary<string, string> data = new Dictionary<string, string>(); data.Add("message", "Testing"); // i'll add more data later here (picture, link, ...) data.Add("access_token", FbGraphApi.getAppToken()); FbGraphApi.postOnWall(ConfigSettings.getFbPageId(), data); } FbGraphApi.getAppToken() // ... private static string graphUrl = "https://graph.facebook.com"; //... public static string getAppToken() { MyWebRequest req = new MyWebRequest(graphUrl + "/" + "oauth/access_token?type=client_cred&client_id=" + ConfigSettings.getAppID() + "&client_secret=" + ConfigSettings.getAppSecret(), "GET"); return req.GetResponse().Split('=')[1]; } FbGraphApi.postOnWall() public static void postOnWall(string id, Dictionary<string,string> args) { call(id, "feed", args); } FbGraphApi.call() private static void call(string id, string method, Dictionary<string,string> args ) { string data = ""; foreach (KeyValuePair<string, string> arg in args) { data += arg.Key + "=" + arg.Value + "&"; } MyWebRequest req = new MyWebRequest(graphUrl +"/" + id + "/" + method, "POST", data.Substring(0, data.Length - 1)); req.GetResponse(); // here i get: "The remote server returned an error: (403) Forbidden." } Does anyone see where this i going wrong? I'm really stuck on this. Thanks!

    Read the article

  • How can I preview the contents of books sold on Amazon in Internet Explorer 10?

    - by Aceman
    I run 64-bit Windows 7 and have both Internet Explorer 10 and a newly-downloaded copy of Google Chrome. I downloaded the latter when I found that I could not look (preview) the contents of books sold on Amazon (using it "Look Inside" feature) and wanted to try to get a handle on how extensive the problem was (i.e., whether it occurred on other browsers, too). It turns out that this isn't a problem with Chrome. However, I have grown accustomed over the years to IE and would prefer to resolve this problem instead. Here's an example of my attempt to 'Search Inside' a book on sale at Amazon: http://www.amazon.com/Intellectuals-Race-Thomas-Sowell/dp/0465058728/ref=sr_1_1?s=books&ie=UTF8&qid=1382301764&sr=1-1&keywords=thomas+sowell#reader_0465058728 I understand that I can't (as is the case in some technical support websites) add a screen shot (ie. JPG to this), but if I were to describe what this looks like in IE, the area where the text would appear appears as a blank white page with horizontal lines where the text would ordinarily be. I have just examined this posting of mine via Chrome and the contents of the selected page are clearly visible.

    Read the article

  • How to prevent autoplay and run my own app when inserting an USB-Flash drive

    - by Thomas
    when inserting an USB-Flash drive, Windows normally opens the Autoplay dialog that offers to browse the drive or if there are multimedia files it offers to choose an app to open them. We developed a media player that is connected to the USB-Drive and registers itself as Mass Storage Device. What I need is, that when inserting the Player that this Dialog is not shown, but instead my own application is launched. Ideally the application would be on the Flash Drive itself, but as I understood is that Autorun is disabled for USB-Drives. It would be enough if a preinstalled application is launched. I already tried to catch the WM_DRIVE_CHANGE message, but this only works if my application is the top most window, otherwise the Autoplay Dialog is displayed. Best Tom

    Read the article

  • Weird Behavior with Jquery image slideshow... Help!

    - by Thomas
    I built a jquery slideshow based on the tutorial found here: http://www.queness.com/post/152/simple-jquery-image-slide-show-with-semi-transparent-caption It seems to be working perfectly fine, except that it behaves strangley right at the beginning when it displays the first image. The first image appears like normal and then flashes, fades to white and disappears completely. After that, the first slide reappears and behaves normally, transitioning to the next image. The slideshow in question is center page on the right: http://www.loftist.com/ I am not a JS developer, so I am not sure how to troubleshoot this problem. Any help would be greatly appreciated, thanks!

    Read the article

  • Validation problem with a 'JotForm' template

    - by Thomas
    A client sent me a form template they had created using jotform.com to implement on their wordpress site. The form template is supposed to hide part of the form until the user clicks the 'next' button. At which point a script is supposed to validate all of the input fields the user has presumably filled out and then display the rest of the form. While I have successfully managed to get the form to display the next part of the form when the user clicks 'next', it fails to validate the input fields. Its kind of difficult to explain without a huge block of text so it is probably easier to show you: The original working template that the customer sent me: http://www.loftist.com/jotform/List_Your_Loft.html The problem child: http://www.loftist.com/?page_id=78 If you just click on one of the input fields and then click elsewhere on the page, the input fields successfully return a validation error message and prevent the user from clicking on the 'next' button. However, if you simply click on the next button than the next set of fields get displayed. Any thoughts? What am I doing wrong here? Im convinced this must be a really simple problem but Im not sure what it could be....

    Read the article

  • displaying values from join query array

    - by THOmas
    I have used a join query for retrieving value from two tables one is blogquestion and userdetails I wrote this query $this->questions = Doctrine_Query::create() ->select('b.question_id,b.user_id,b.question_title,b.question_tags,b.created_at,u.id,u.name') ->from('BlogQuestion b') ->leftJoin('b.UserDetails u') ->execute(); In the template iam displaying the result using a foreach <?php foreach($questions as $quest):?> echo $quest->getQuestionTitle() echo $quest->getQuestionTags() echo $quest->getName() <?php endforeach?> title is getting from the blogquestion table and name is in usredetails table iam getting the eerror Unknown record property / related component "name" on "BlogQuestion"

    Read the article

  • Change storyboard UIImageView to own class with backgroundcolor

    - by Thomas
    I want to draw the background image on my own, so I decided to implement a UIImageView class and connect it in the Storyboard. As first task I just want to set the backgroundcolor of the image on my own, but it's never shown. Image just stays blank. That's the class: class FirstBackgroundImage : UIImageView { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.backgroundColor = UIColor.redColor() } override init() { super.init() self.backgroundColor = UIColor.redColor() } override required init(image: UIImage!) { super.init(image: image) self.backgroundColor = UIColor.redColor() } } That's how i connected it:

    Read the article

  • JS Display Content based on Dropdown User input

    - by Thomas
    I am working on a search box that displays different options based on a users selection via dropdown box. Basically I need a really clean, light-weight method for switching out different divs without reloading the page. Im new to JS, but I know enough that there should be some really simple way of setting the display property using JS - Im just not totally sure how to go about it. Any help would be really appreciated, thanks.

    Read the article

  • How to diff two regions of the same file in Eclipse

    - by Thomas Nilsson
    I'm a TDDer and often have a need to refactor out common or similar code. If it is exactly the same there is no big problem, Eclipse can almost always do that by itself. But to get there I'm finding myself often looking at similar, but not identical, code fragments in the same, or even different, files. It would be very handy if there was a possibility to mark two regions and get Eclipse (or some other tool) to mark the differences. With this information it would be much simpler to iteratively move the regions closer until they are the same and then activate the Extract Method refactoring. It can be done in Emacs of course, but I'd like to have this readily available from Eclipse. Any pointers?

    Read the article

  • Container div ignores height of floated elements

    - by Thomas
    Ok, so this seems like a really silly problem but I can't get my container div to inherit the height of the floated elements inside of it. Since I need to center the container div, I can't use float to fix this problem. Here is my css: #container { margin: 0 auto; width: 1000px; border-left: 1px solid #f1f1f1; border-right: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; } #focus { padding-left: 23px; width: 977px; padding-top: 20px; padding-bottom: 23px; border-bottom: 1px solid #f1f1f1; float: left; } .rslider { float: left; width: 600px; margin-left: 15px; } .welcome { float: left; width: 300px; } Html: <div id="container"> <div id="logo_block"> <a href="#"><img src="img/logo.jpg" alt="" /></a> </div> <div id="focus"> <div class="welcome"> <h1>All About This Page</h1> <p>Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, liquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p> </div> <div class="rslider"> <img src="img/slider_image.jpg"> </div> </div> </div> Any ideas?

    Read the article

  • Passing values from action class to model class in symfony

    - by THOmas
    I have a action class for saving some data to a database.In action class iam getting a id through url.I have to save the id in table. I am getting the id by $request-getParameter('id') I used this code for saving $this-form-bind($request-getParameter('question_answers')); if ($this-form-isValid()) { $this-form-save(); $this-redirect('@homepage'); } in model class i used a override save method to save extra field public function save(Doctrine_Connection $conn = null) { if ($this-isNew()) { $now=date('Y-m-d H:i:s', time()); $this->setPostedAt($now); } return parent::save($conn); so i want to get the id value here . So how can i pass id value from action class to model class is any-other way to save the id in action class itself Thanks in advance

    Read the article

  • Cannot set focus on input field in infoWindow

    - by thomas
    Hi Why is focus not set to noteTitle? I am using google maps API V3. The getNoteForm() returns a input field "noteTitle". The $("#noteTitle").focus() works fine when executed in firebug. I call this function when clicking on the map: function setNewNoteInfowindow(latlng) { if (geocoder) { geocoder.geocode({'latLng': latlng}, function(results, status) { var address = ""; if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { address = results[1].formatted_address; } } newNoteInfowindow = new google.maps.InfoWindow({ content: getNoteForm(latlng, address), size: new google.maps.Size(40,50) }); newNoteInfowindow.open(map, newNoteMarker); google.maps.event.addListener(newNoteInfowindow, 'domready', function() { $("#noteTitle").focus(); }); google.maps.event.addListener(newNoteInfowindow, 'closeclick', function() { newNoteMarker.setVisible(false); }); }); } }

    Read the article

  • Tkinter Gui to read in csv file and generate buttons based on the entries in the first row

    - by Thomas Jensen
    I need to write a gui in Tkinter that can choose a csv file, read it in and generate a sequence of buttons based on the names in the first row of the csv file (later the data in the csv file should be used to run a number of simulations). So far I have managed to write a Tkinter gui that will read the csv file, but I am stomped as to how I should proceed: from Tkinter import * import tkFileDialog import csv class Application(Frame): def __init__(self, master = None): Frame.__init__(self,master) self.grid() self.createWidgets() def createWidgets(self): top = self.winfo_toplevel() self.menuBar = Menu(top) top["menu"] = self.menuBar self.subMenu = Menu(self.menuBar) self.menuBar.add_cascade(label = "File", menu = self.subMenu) self.subMenu.add_command( label = "Read Data",command = self.readCSV) def readCSV(self): self.filename = tkFileDialog.askopenfilename() f = open(self.filename,"rb") read = csv.reader(f, delimiter = ",") app = Application() app.master.title("test") app.mainloop() Any help is greatly appreciated!

    Read the article

  • Setting the content-type of a response in Struts2

    - by Thomas
    So, I'm using freemarker templates with Struts2 to formulate my responses. However, since I'm trying to use taconite as well, I need the response to be sent with the content type of "text/xml". I can't seem to find a way to use freemarker directives to set the content type, and I am not well versed enough in struts to know if there is a way to do it through that. So, how should I go about this?

    Read the article

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