Search Results

Search found 954 results on 39 pages for 'george clingerman'.

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

  • JScript JSON Object Check

    - by George
    I'm trying to check if json[0]['DATA']['name'][0]['DATA']['first_0'] exists or not when in some instances json[0]['DATA']['name'] contains nothing. I can check json[0]['DATA']['name'] using if (json[0]['DATA']['name'] == '') { // DOES NOT EXIST } however if (json[0]['DATA']['name'][0]['DATA']['first_0'] == '' || json[0]['DATA']['name'][0]['DATA']['first_0'] == 'undefined') { // DOES NOT EXIST } returns json[0]['DATA']['name'][0]['DATA'] is null or not an object. I understand this is because the array 'name' doesn't contain anything in this case, but in other cases first_0 does exist and json[0]['DATA']['name'] does return a value. Is there a way that I can check json[0]['DATA']['name'][0]['DATA']['first_0'] directly without having to do the following? if (json[0]['DATA']['name'] == '') { if (json[0]['DATA']['name'][0]['DATA']['first_0'] != 'undefined') { // OBJECT EXISTS } }

    Read the article

  • Creating a generic NotFound View in ASP.MVC

    - by George
    Hello guys, I'm having a problem to create a generic View to represent NotFound pages. The view is created and it's fine. I need to know how i can direct the user to the NotFound view in my Controllers and how to render a specific "Return to Index" in each controller. Here is some code: public class NotFoundModel { private string _contentName; private string _notFoundTitle; private string _apologiesMessage; public string ContentName { get; private set; } public string NotFoundTitle { get; private set; } public string ApologiesMessage { get; private set; } public NotFoundModel(string contentName, string notFoundTitle, string apologiesMessage) { this._contentName = contentName; this._notFoundTitle = notFoundTitle; this._apologiesMessage = apologiesMessage; } } // NotFound View <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Geographika.Models.NotFoundModel>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> <%= Html.Encode(Model.ContentName) %> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2><%= Html.Encode(Model.NotFoundTitle) %></h2> <p><%= Html.Encode(Model.ApologiesMessage) %></p> <!-- How can i render here a specific "BackToIndexView", but that it's not bound to my NotFoundModel? --> </asp:Content> // Controller piece of code // // GET: /Term/Details/2 public ActionResult Details(int id) { Term term = termRepository.SingleOrDefault(t => t.TermId == id); if (term == null) return View("NotFound"); // how can i return the specific view that its not bound to Term Model? // the idea here would be something like: // return View("NotFound",new NotFoundModel("a","b","c")); else return View("Details", term); } I'm not sure how to redirect to a whole different page. Can anyone give me any pointers? Thanks

    Read the article

  • Extremely strange glitch in Chrome - parses contents of string!

    - by George Edison
    Okay - this is the dumbest glitch I have seen in a while: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type='text/javascript'> var data = "</script>"; </script> </head> <body> This should break! </body> </html> This causes syntax errors because the JavaScript parser is actually reading the contents of the string. How stupid! How can I put </script> in my code. Is there any way? Is there a valid reason for this behavior?

    Read the article

  • How do I draw a filled circle onto a graphics object in a hexadecimal colour?

    - by George Powell
    I need to draw a circle onto a bitmap in a specific colour given in Hex. The "Brushes" class only gives specific colours with names. Bitmap bitmap = new Bitmap(20, 20); Graphics g = Graphics.FromImage(bitmap); g.FillEllipse(Brushes.AliceBlue, 0, 0, 19, 19); //The input parameter is not a Hex //g.FillEllipse(new Brush("#ff00ffff"), 0, 0, 19, 19); <<This is the kind of think I need. Is there a way of doing this? The exact problem: I am generating KML (for Google earth) and I am generating lots of lines with different Hex colours. The colours are generated mathematically and I need to keep it that way so I can make as many colours as I want. I need to generate a PNG icon for each of the lines that is the same colour exactly.

    Read the article

  • Can't see *all* databases in a remote SQL Server instance

    - by George
    Yesterday I posted a related question on StackOverflow. This problem involved not being able to see a SQL Server 2008 instance on another PC. I am not sure why adding the port number enabled me to see a SQL Server that I could not otherwise see, since the port number that I specified was, after all, the default port. Now I notice that I have another problem. While I can connect to the remote SQL 2008 Server instance, I cannot see all the databases in the instance. I am trying to connect to the 2008 instance from another PC using SQL Server 2008 Mgt Studio. I am connecting from a Windows 7 Ultimate PC to a Windows XP Pro PC. I suspect that my problem has something to do with not all database in the remote instance having the same version. For example, I "upgraded" a a SL 2005 database to 2008 by doing a backup frm 2005 and importing it into 2008. When I realized that this was not one of the database that I could see from my other PC, I noticed that the compatability level of the imported was still 2005, so I changed it to 2008. Still I could not see the database. I am sure that this is relevant: I just noticed that on my remote server, the sql node instance node, named "sql2008" says "version 10" when I am on the remote serfver, but when I connect to the sql2008 remote instance fron my local PC, the connection is shown locally as being a "SQL Servr version 8.0" instance. I suspect that locally, I am only being shown databases that are somehow in the remote 2008 instance but have not been upgraded. I guess I don't know what constitutes an upgraded database and I don not know who to connect to see all the databases, even if this requires multiple connections from the source PC.

    Read the article

  • using ruby test and selenium grid how can I keep the same browser window for multiple tests?

    - by George Horlacher
    Each of my tests start a new selenium client browser and tear it down so they can run stand alone with this code: def setup if $selenium @selenium = $selenium else @selenium = Selenium::SeleniumDriver.new("#$sell_server", 4444, "#$browser", "http://#$network.#$host:2086", 10000); @selenium.start end @selenium.set_context("test_login") end def teardown @selenium.stop unless $selenium assert_equal [], @verification_errors end What I'd like is to run a suite of tests that all use the same browser and don't keep opening and closing new browsers for every test. I've tried using $selenium as a global object / browser but each test still opens up a new browser and closes it. How should this be done?

    Read the article

  • Where can I find a jQuery color animation plugin?

    - by George Edison
    I need an up-to-date jQuery color animation plugin that works in IE 8. I tried using the one at http://plugins.jquery.com/project/color but it causes errors like "Invalid property value." in the following line of code from color.js: fx.elem.style[attr] = "rgb(" + [ Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0), Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0), Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) ].join(",") + ")"; Where can I get something that works? By the way, I really hate IE, if that helps.

    Read the article

  • Why is this <p> expanding the whole page?

    - by George Edison
    If you visit this page and shrink your browser window, you will see my problem. [If you want to open the page in a new window, just hold down shift when you click the link.] The answers to the question extend beyond the page margin instead of wrapping. I have spent the last half hour working with Chrome's Inspector and Firefox's DOM inspector - all to no avail. I just cannot figure out why it's doing this.

    Read the article

  • Nhibernate beginner - asking for directions

    - by George
    Hello guys. I'm starting off with NHibernate now and I still don't have a testable environment. I would like to know from you, experienced fellows if there is a problem to map IList to an Set in .hbm file. Like this: //c# IList<TrechoItem> trechos_item; <!-- xml .hbm --> <set name="TrechosItem" table="trecho_item" lazy="true" inverse="true" fetch="select"> <key column="id_item"/> <one-to-many class="TrechoItem"/> </set> Or, in this: IList<Autor> Autores; <set name="Autores" lazy="true" table="item_possui_autor"> <key column="id_item"/> <many-to-many class="Autor" column="id_autor"/> </set> Is this possible? Or am I doing the wrong thing? I tried using and but these did not gave me all the options in . Thanks in advanced

    Read the article

  • Choosing a W3C valid DOCTYPE and charset combination?

    - by George Carter
    I have a homepage with the following: <DOCTYPE html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> My choice of the DOCTYPE "html" is based on a recommendation for html pages using jQuery. My choice of charset=utf=8 is based on a recommendation to make my pages readable on most browsers. But these choices may be wrong. When I run this page thru the W3C HTML validator, I get messages you see below. Any way I can eliminate the 2 errors? ! Using experimental feature: HTML5 Conformance Checker. The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issue with this feature, please report them. Thank you. Validation Output: 2 Errors 1. Error Line 18, Column 70: Changing character encoding utf-8 and reparsing. …ntent-Type" content="text/html; charset=utf-8"> 2. Error Line 18, Column 70: Changing encoding at this point would need non-streamable behavior. …ntent-Type" content="text/html; charset=utf-8">

    Read the article

  • What port is my SQL2008 instance running on?

    - by George
    Check out this pic of my SQL 2008 Management Configuration screen for TCP: I need to know what port I am running on. Base on this previous post, I don't believe that it is 1433, which I guess is the default. When I check my port number in SQL Config Mgr., it is blank. Does this suggest a default port? Note that I have multiple SQL Server instance on the db server. 1 2000 instance and two 2008 instances. I want to know the port of the 2008b instance. Can you help?

    Read the article

  • Exceptions in ASP.MVC

    - by George
    Hello guys, I'm here again with another question about MVC. Here is the deal. I have a simple table/class with an Id and a Name. Names suppossed to be unique, and are modeled like that in the DB. I created my controller and everything just works fine. But if I try to insert a name that already exists, an exception should be thrown. I'm just not finding what is the correct kind of exception and it's namespace. The error must be coming from the DB, so... Any ideas? Thanks

    Read the article

  • Svn: revert file content changes without reverting any related mergeinfo?

    - by George Hawkins
    If you've done a merge you may find, before committing the changes, that actually you don't want to accept any of the changes merged into one of the affected files. So you do e.g.: $ svn revert foo.c However this also seems to revert the mergeinfo related to this file. So when you do a subsequent merge it will merge in exactly the same changes again. Rather than revert one could do: $ svn cat foo.c foo.c But this doesn't seem like the right way to do things? Is there something that more clearly indicates what I'm trying to achieve, i.e. to say "consider the merge done for this file but don't change its contents"?

    Read the article

  • plot 3D and combine in matlab

    - by George
    Hello ,i have this matrix "experiment=2*rand(npoints,3)-1". I want to plot in in 3D,so i use "mesh(experiment)". How can i take red points in my plot? Also,i want to implement in the above plot , a sphere with radius 1 at 0,0,0. I did : mesh(experiment) hold on [x,y,z]=sphere; r=1; mesh(r*x,r*y,r*z) hold off but 1) i am not taking radius 1 2) the figures just showing in the same graph but don't combine Thanks

    Read the article

  • Poll: Require Semicolons and Forbid Tables?

    - by George Bailey
    There are a few very serious but opinionated and subjective arguments that I know of. Two of them are Whether or not to use semicolons in the event they are optional. There is a vote as here that also includes reasons Whether or not to use tables for non tabular data. There more information here Since the semicolon question arises often in JavaScript and the tables thing in HTML then there are probably many who run into both. I sort of expect a person who is strict with semicolons also to be strict about avoiding tables. I will post four CW answers here to vote on. Please vote what you think is right. If you want to talk about the reasons then please use Semicolons: Do you recommend using semicolons after every statement in JavaScript? Tables: Start your own question under the polls tag and follow the design of the semicolons question.

    Read the article

  • No transperancy in Bitmap loading from MemoryStream

    - by Jogi Joseph George
    Please see the C# code. When i am writing a Bitmap to a file and read from the file, i am getting the transperancy correctly. using (Bitmap bmp = new Bitmap(2, 2)) { Color col = Color.FromArgb(1, 2, 3, 4); bmp.SetPixel(0, 0, col); bmp.Save("J.bmp"); } using (Bitmap bmp = new Bitmap("J.bmp")) { Color col = bmp.GetPixel(0, 0); // ------------------------------ // Here col.A is 1. This is right. // ------------------------------ } But if I write the Bitmap to a MemoryStream and read from that MemoryStream, the transperancy has been removed. All Alpha values become 255. MemoryStream ms = new MemoryStream(); using (Bitmap bmp = new Bitmap(2, 2)) { Color col = Color.FromArgb(1, 2, 3, 4); bmp.SetPixel(0, 0, col); bmp.Save(ms, ImageFormat.Bmp); } using (Bitmap bmp = new Bitmap(ms)) { Color col = bmp.GetPixel(0, 0); // ------------------------------ // But here col.A is 255. Why? i am expecting 1 here. // ------------------------------ } I wish to save the Bitmap to a MemoryStream and read it back with transperancy. Could you please help me?

    Read the article

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