Search Results

Search found 1234 results on 50 pages for 'giles smith'.

Page 18/50 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • how to make a function recursive

    - by tom smith
    i have this huge function and i am wondering how to make it recursive. i have the base case which should never come true, so it should always go to else and keep calling itself with the variable t increases. any help would be great thanks def draw(x, y, t, planets): if 'Satellites' in planets["Moon"]: print ("fillcircle", x, y, planets["Moon"]['Radius']*scale) else: while True: print("refresh") print("colour 0 0 0") print("clear") print("colour 255 255 255") print("fillcircle",x,y,planets['Sun']['Radius']*scale) print("text ", "\"Sun\"",x+planets['Sun']['Radius']*scale,y) if "Mercury" in planets: r_Mercury=planets['Mercury']['Orbital Radius']*scale; print("circle",x,y,r_Mercury) r_Xmer=x+math.sin(t*2*math.pi/planets['Mercury']['Period'])*r_Mercury r_Ymer=y+math.cos(t*2*math.pi/planets['Mercury']['Period'])*r_Mercury print("fillcircle",r_Xmer,r_Ymer,3) print("text ", "\"Mercury\"",r_Xmer+planets['Mercury']['Radius']*scale,r_Ymer) if "Venus" in planets: r_Venus=planets['Venus']['Orbital Radius']*scale; print("circle",x,y,r_Venus) r_Xven=x+math.sin(t*2*math.pi/planets['Venus']['Period'])*r_Venus r_Yven=y+math.cos(t*2*math.pi/planets['Venus']['Period'])*r_Venus print("fillcircle",r_Xven,r_Yven,3) print("text ", "\"Venus\"",r_Xven+planets['Venus']['Radius']*scale,r_Yven) if "Earth" in planets: r_Earth=planets['Earth']['Orbital Radius']*scale; print("circle",x,y,r_Earth) r_Xe=x+math.sin(t*2*math.pi/planets['Earth']['Period'])*r_Earth r_Ye=y+math.cos(t*2*math.pi/planets['Earth']['Period'])*r_Earth print("fillcircle",r_Xe,r_Ye,3) print("text ", "\"Earth\"",r_Xe+planets['Earth']['Radius']*scale,r_Ye) if "Moon" in planets: r_Moon=planets['Moon']['Orbital Radius']*scale; print("circle",r_Xe,r_Ye,r_Moon) r_Xm=r_Xe+math.sin(t*2*math.pi/planets['Moon']['Period'])*r_Moon r_Ym=r_Ye+math.cos(t*2*math.pi/planets['Moon']['Period'])*r_Moon print("fillcircle",r_Xm,r_Ym,3) print("text ", "\"Moon\"",r_Xm+planets['Moon']['Radius']*scale,r_Ym) if "Mars" in planets: r_Mars=planets['Mars']['Orbital Radius']*scale; print("circle",x,y,r_Mars) r_Xmar=x+math.sin(t*2*math.pi/planets['Mars']['Period'])*r_Mars r_Ymar=y+math.cos(t*2*math.pi/planets['Mars']['Period'])*r_Mars print("fillcircle",r_Xmar,r_Ymar,3) print("text ", "\"Mars\"",r_Xmar+planets['Mars']['Radius']*scale,r_Ymar) if "Phobos" in planets: r_Phobos=planets['Phobos']['Orbital Radius']*scale; print("circle",r_Xmar,r_Ymar,r_Phobos) r_Xpho=r_Xmar+math.sin(t*2*math.pi/planets['Phobos']['Period'])*r_Phobos r_Ypho=r_Ymar+math.cos(t*2*math.pi/planets['Phobos']['Period'])*r_Phobos print("fillcircle",r_Xpho,r_Ypho,3) print("text ", "\"Phobos\"",r_Xpho+planets['Phobos']['Radius']*scale,r_Ypho) if "Deimos" in planets: r_Deimos=planets['Deimos']['Orbital Radius']*scale; print("circle",r_Xmar,r_Ymar,r_Deimos) r_Xdei=r_Xmar+math.sin(t*2*math.pi/planets['Deimos']['Period'])*r_Deimos r_Ydei=r_Ymar+math.cos(t*2*math.pi/planets['Deimos']['Period'])*r_Deimos print("fillcircle",r_Xdei,r_Ydei,3) print("text ", "\"Deimos\"",r_Xpho+planets['Deimos']['Radius']*scale,r_Ydei) if "Ceres" in planets: r_Ceres=planets['Ceres']['Orbital Radius']*scale; print("circle",x,y,r_Ceres) r_Xcer=x+math.sin(t*2*math.pi/planets['Ceres']['Period'])*r_Ceres r_Ycer=y+math.cos(t*2*math.pi/planets['Ceres']['Period'])*r_Ceres print("fillcircle",r_Xcer,r_Ycer,3) print("text ", "\"Ceres\"",r_Xcer+planets['Ceres']['Radius']*scale,r_Ycer) if "Jupiter" in planets: r_Jupiter=planets['Jupiter']['Orbital Radius']*scale; print("circle",x,y,r_Jupiter) r_Xjup=x+math.sin(t*2*math.pi/planets['Jupiter']['Period'])*r_Jupiter r_Yjup=y+math.cos(t*2*math.pi/planets['Jupiter']['Period'])*r_Jupiter print("fillcircle",r_Xjup,r_Yjup,3) print("text ", "\"Jupiter\"",r_Xjup+planets['Jupiter']['Radius']*scale,r_Yjup) if "Io" in planets: r_Io=planets['Io']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Io) r_Xio=r_Xjup+math.sin(t*2*math.pi/planets['Io']['Period'])*r_Io r_Yio=r_Yjup+math.cos(t*2*math.pi/planets['Io']['Period'])*r_Io print("fillcircle",r_Xio,r_Yio,3) print("text ", "\"Io\"",r_Xio+planets['Io']['Radius']*scale,r_Yio) if "Europa" in planets: r_Europa=planets['Europa']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Europa) r_Xeur=r_Xjup+math.sin(t*2*math.pi/planets['Europa']['Period'])*r_Europa r_Yeur=r_Yjup+math.cos(t*2*math.pi/planets['Europa']['Period'])*r_Europa print("fillcircle",r_Xeur,r_Yeur,3) print("text ", "\"Europa\"",r_Xeur+planets['Europa']['Radius']*scale,r_Yeur) if "Ganymede" in planets: r_Ganymede=planets['Ganymede']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Ganymede) r_Xgan=r_Xjup+math.sin(t*2*math.pi/planets['Ganymede']['Period'])*r_Ganymede r_Ygan=r_Yjup+math.cos(t*2*math.pi/planets['Ganymede']['Period'])*r_Ganymede print("fillcircle",r_Xgan,r_Ygan,3) print("text ", "\"Ganymede\"",r_Xgan+planets['Ganymede']['Radius']*scale,r_Ygan) if "Callisto" in planets: r_Callisto=planets['Callisto']['Orbital Radius']*scale; print("circle",r_Xjup,r_Yjup,r_Callisto) r_Xcal=r_Xjup+math.sin(t*2*math.pi/planets['Callisto']['Period'])*r_Callisto r_Ycal=r_Yjup+math.cos(t*2*math.pi/planets['Callisto']['Period'])*r_Callisto print("fillcircle",r_Xcal,r_Ycal,3) print("text ", "\"Callisto\"",r_Xcal+planets['Callisto']['Radius']*scale,r_Ycal) if "Saturn" in planets: r_Saturn=planets['Saturn']['Orbital Radius']*scale; print("circle",x,y,r_Saturn) r_Xsat=x+math.sin(t*2*math.pi/planets['Saturn']['Period'])*r_Saturn r_Ysat=y+math.cos(t*2*math.pi/planets['Saturn']['Period'])*r_Saturn print("fillcircle",r_Xsat,r_Ysat,3) print("text ", "\"Saturn\"",r_Xsat+planets['Saturn']['Radius']*scale,r_Ysat) if "Mimas" in planets: r_Mimas=planets['Mimas']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Mimas) r_Xmim=r_Xsat+math.sin(t*2*math.pi/planets['Mimas']['Period'])*r_Mimas r_Ymim=r_Ysat+math.cos(t*2*math.pi/planets['Mimas']['Period'])*r_Mimas print("fillcircle",r_Xmim,r_Ymim,3) print("text ", "\"Mimas\"",r_Xmim+planets['Mimas']['Radius']*scale,r_Ymim) if "Enceladus" in planets: r_Enceladus=planets['Enceladus']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Enceladus) r_Xenc=r_Xsat+math.sin(t*2*math.pi/planets['Enceladus']['Period'])*r_Enceladus r_Yenc=r_Ysat+math.cos(t*2*math.pi/planets['Enceladus']['Period'])*r_Enceladus print("fillcircle",r_Xenc,r_Yenc,3) print("text ", "\"Enceladus\"",r_Xenc+planets['Enceladus']['Radius']*scale,r_Yenc) if "Tethys" in planets: r_Tethys=planets['Tethys']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Tethys) r_Xtet=r_Xsat+math.sin(t*2*math.pi/planets['Tethys']['Period'])*r_Tethys r_Ytet=r_Ysat+math.cos(t*2*math.pi/planets['Tethys']['Period'])*r_Tethys print("fillcircle",r_Xtet,r_Ytet,3) print("text ", "\"Tethys\"",r_Xtet+planets['Tethys']['Radius']*scale,r_Ytet) if "Dione" in planets: r_Dione=planets['Dione']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Dione) r_Xdio=r_Xsat+math.sin(t*2*math.pi/planets['Dione']['Period'])*r_Dione r_Ydio=r_Ysat+math.cos(t*2*math.pi/planets['Dione']['Period'])*r_Dione print("fillcircle",r_Xdio,r_Ydio,3) print("text ", "\"Dione\"",r_Xdio+planets['Dione']['Radius']*scale,r_Ydio) if "Rhea" in planets: r_Rhea=planets['Rhea']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Rhea) r_Xrhe=r_Xsat+math.sin(t*2*math.pi/planets['Rhea']['Period'])*r_Rhea r_Yrhe=r_Ysat+math.cos(t*2*math.pi/planets['Rhea']['Period'])*r_Rhea print("fillcircle",r_Xrhe,r_Yrhe,3) print("text ", "\"Rhea\"",r_Xrhe+planets['Rhea']['Radius']*scale,r_Yrhe) if "Titan" in planets: r_Titan=planets['Titan']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Titan) r_Xtit=r_Xsat+math.sin(t*2*math.pi/planets['Titan']['Period'])*r_Titan r_Ytit=r_Ysat+math.cos(t*2*math.pi/planets['Titan']['Period'])*r_Titan print("fillcircle",r_Xtit,r_Ytit,3) print("text ", "\"Titan\"",r_Xtit+planets['Titan']['Radius']*scale,r_Ytit) if "Iapetus" in planets: r_Iapetus=planets['Iapetus']['Orbital Radius']*scale; print("circle",r_Xsat,r_Ysat,r_Iapetus) r_Xiap=r_Xsat+math.sin(t*2*math.pi/planets['Iapetus']['Period'])*r_Iapetus r_Yiap=r_Ysat+math.cos(t*2*math.pi/planets['Iapetus']['Period'])*r_Iapetus print("fillcircle",r_Xiap,r_Yiap,3) print("text ", "\"Iapetus\"",r_Xiap+planets['Iapetus']['Radius']*scale,r_Yiap) if "Uranus" in planets: r_Uranus=planets['Uranus']['Orbital Radius']*scale; print("circle",x,y,r_Uranus) r_Xura=x+math.sin(t*2*math.pi/planets['Uranus']['Period'])*r_Uranus r_Yura=y+math.cos(t*2*math.pi/planets['Uranus']['Period'])*r_Uranus print("fillcircle",r_Xura,r_Yura,3) print("text ", "\"Uranus\"",r_Xura+planets['Uranus']['Radius']*scale,r_Yura) if "Puck" in planets: r_Puck=planets['Puck']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Puck) r_Xpuc=r_Xura+math.sin(t*2*math.pi/planets['Puck']['Period'])*r_Puck r_Ypuc=r_Yura+math.cos(t*2*math.pi/planets['Puck']['Period'])*r_Puck print("fillcircle",r_Xpuc,r_Ypuc,3) print("text ", "\"Puck\"",r_Xpuc+planets['Puck']['Radius']*scale,r_Ypuc) if "Miranda" in planets: r_Miranda=planets['Miranda']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Miranda) r_Xmira=r_Xura+math.sin(t*2*math.pi/planets['Miranda']['Period'])*r_Miranda r_Ymira=r_Yura+math.cos(t*2*math.pi/planets['Miranda']['Period'])*r_Miranda print("fillcircle",r_Xmira,r_Ymira,3) print("text ", "\"Miranda\"",r_Xmira+planets['Miranda']['Radius']*scale,r_Ymira) if "Ariel" in planets: r_Ariel=planets['Ariel']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Ariel) r_Xari=r_Xura+math.sin(t*2*math.pi/planets['Ariel']['Period'])*r_Ariel r_Yari=r_Yura+math.cos(t*2*math.pi/planets['Ariel']['Period'])*r_Ariel print("fillcircle",r_Xari,r_Yari,3) print("text ", "\"Ariel\"",r_Xari+planets['Ariel']['Radius']*scale,r_Yari) if "Umbriel" in planets: r_Umbriel=planets['Umbriel']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Umbriel) r_Xumb=r_Xura+math.sin(t*2*math.pi/planets['Umbriel']['Period'])*r_Umbriel r_Yumb=r_Yura+math.cos(t*2*math.pi/planets['Umbriel']['Period'])*r_Umbriel print("fillcircle",r_Xumb,r_Yumb,3) print("text ", "\"Umbriel\"",r_Xumb+planets['Umbriel']['Radius']*scale,r_Yumb) if "Titania" in planets: r_Titania=planets['Titania']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Titania) r_Xtita=r_Xura+math.sin(t*2*math.pi/planets['Titania']['Period'])*r_Titania r_Ytita=r_Yura+math.cos(t*2*math.pi/planets['Titania']['Period'])*r_Titania print("fillcircle",r_Xtita,r_Ytita,3) print("text ", "\"Titania\"",r_Xtita+planets['Titania']['Radius']*scale,r_Ytita) if "Oberon" in planets: r_Oberon=planets['Oberon']['Orbital Radius']*scale; print("circle",r_Xura,r_Yura,r_Oberon) r_Xober=r_Xura+math.sin(t*2*math.pi/planets['Oberon']['Period'])*r_Oberon r_Yober=r_Yura+math.cos(t*2*math.pi/planets['Oberon']['Period'])*r_Oberon print("fillcircle",r_Xober,r_Yober,3) print("text ", "\"Oberon\"",r_Xober+planets['Oberon']['Radius']*scale,r_Yober) if "Neptune" in planets: r_Neptune=planets['Neptune']['Orbital Radius']*scale; print("circle",x,y,r_Neptune) r_Xnep=x+math.sin(t*2*math.pi/planets['Neptune']['Period'])*r_Neptune r_Ynep=y+math.cos(t*2*math.pi/planets['Neptune']['Period'])*r_Neptune print("fillcircle",r_Xnep,r_Ynep,3) print("text ", "\"Neptune\"",r_Xnep+planets['Neptune']['Radius']*scale,r_Ynep) if "Titan" in planets: r_Titan=planets['Titan']['Orbital Radius']*scale; print("circle",r_Xnep,r_Ynep,r_Titan) r_Xtita=r_Xnep+math.sin(t*2*math.pi/planets['Titan']['Period'])*r_Titan r_Ytita=r_Ynep+math.cos(t*2*math.pi/planets['Titan']['Period'])*r_Titan print("fillcircle",r_Xtita,r_Ytita,3) print("text ", "\"Titan\"",r_Xtita+planets['Titan']['Radius']*scale,r_Ytita) t += 0.003 print(draw(x, y, t, planets))

    Read the article

  • Supplementary Developer Laptop

    - by David Silva Smith
    I'm looking to buy a laptop with the following specs for a developer. The goal will be to have a development machine supplementing the devs desktop. During work hours the dev will be on a beefy desktop. For working while on the go: trains, client sites, code camps, it would be nice to have a machine which can run Visual Studio 2008 without needing to remote desktop into their primary machine. What do you think is the lowest cost laptop meeting this need? Here are the specs I have in mind: SSD drive 64GB-doesn't need to be huge, most data is stored on servers. Will need to fit Windows 7, IIS, SQL Server, and Visual Studio 2010. RAM-3GB processor =Pentium Core 2 duo Screen size = 14 inches. OS doesn't matter. It will be paved with Windows 7 Ultimate optical drive omitted would be a plus. weight and battery life aren't so important because the machine will be plugged in almost all the time.

    Read the article

  • Cascading dropdownlist jQuery does not retain value on post back.

    - by John Smith
    I have two html select server control on an add data form page. the user selects a value in the first html select server control and then values are populated into the second html select server control with jquery. The problem is when a a user clicks the save button and the page posts back, the values are no longer in the drop down list populated by jQuery. The drop downlist is a html server control, shouldn't it retain the values on post-back? How can I retain the values and save the selected value to the database? $(document).ready(function() { $("#<%=ddlCourseWare.ClientID %>").change(function() { var courseWareId = this.value; try { $.ajax({ type: "POST", url: "Left_SubCategory.aspx/GetTabData", data: "{courseWareId:" + courseWareId + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { var result = json_parse(data.d); $("#<%=ddlTabType.ClientID %>")[0].innerHTML = ''; if (result.length > 0) { $.each(result, function(key, item) { $("#<%=ddlTabType.ClientID %>").append($("<option></option>").val(item.id).html(item.TabName)); }); } else { $("#<%=ddlTabType.ClientID %>").append($("<option></option>").val('0').html('--Select--')); } }, error: function(request, status, error) { alert(request.responseText); } }); } catch (ex) { alert(ex); } }); }); HTML <select id="ddlCourseWare" name="ddlCourseWare" runat="server" Width="230px" class="TextBox" Height="18px" > <select id="ddlTabType" name="ddlTabType" runat="server" Width="230px" class="TextBox" Height="18px" onchange="BindMainCat();"> <option>--Select--</option> </select> C# private void BindCourseWare() { ddlCourseWare.DataSource = courseWare.GetCourseWare(); ddlCourseWare.DataTextField = "CourseWareType"; ddlCourseWare.DataValueField = "id"; ddlCourseWare.DataBind(); ddlCourseWare.Items.Insert(0, "----Select Course Ware----"); } [WebMethod] public static string GetTabData(int courseWareId) { var result = new CourseWare().GetCourseTabByCoursewareId(courseWareId); JavaScriptSerializer json_tabs = new JavaScriptSerializer(); string jsonArray_tabs = json_tabs.Serialize(result); return jsonArray_tabs; } protected void btnSave_Click(object sender, EventArgs e) { int mainCategoryID1 = int.Parse(ddlTabType.Value); // not working int mainCategoryID2 = int.Parse(Request["ctl00$ContentPlaceHolder1$ddlTabType"]); // working but always return same value means the upper value (selected index 1) }

    Read the article

  • Properties of bad fibonacci algorithm

    - by John Smith
    I was looking at the canonical bad fibonacci algorithm the other day: public static int fib(int n) { // Base Case if (n < 2) return 1; else return fib(n-1) + fib(n-2); } I made the interesting observation. When you call fib(n), then for k between 1 and n fib(k) is called precisely fib(n-k+1) times (or fib(n-k) depending on your definition of fib(0) ). Also, fib(0) is called fib(n-k-1) times. This then allows me to find that in fib(100) there are exactly 708449696358523830149 calls to the fib function. Are there other interesting observations on this function you know of?

    Read the article

  • Querying for names

    - by Sai
    I have a table (say "Demographics") on SQL Server. In this table are the following columns "LastName", "FirstName", "MiddleName", "Prefix" , "Suffix". I have one textbox to search for them on a webpage. My question: Whats a good design strategy for queries where the user could be searching for various combinations of names including last names that have spaces e.g. "Smith James Jr." . Our customers store Jr. sometimes in suffix and sometimes just tack it to lastname. Sometimes Smith James Jr could be the entire last name.

    Read the article

  • One to many too much data returned - MySQL

    - by Evan McPeters
    I have 2 related MySQL tables in a one to many relationship. Customers: cust_id, cust_name, cust_notes Orders: order_id, cust_id, order_comments So, if I do a standard join to get all customers and their orders via PHP, I return something like: Jack Black, jack's notes, comments about jack's 1st order Jack Black, jack's notes, comments about jack's 2nd order Simon Smith, simon's notes, comments about simon's 1st order Simon Smith, simon's notes, comments about simon's 2nd order The problem is that *cust_notes* is a text field and can be quite large (a couple of thousand words). So, it seems like returning that field for every order is inneficient. I could use *GROUP_CONCAT* and JOINS to return all *order_comments* on a single row BUT order_comments is a large text field too, so it seems like that could create a problem. Should I just use two separate queries, one for the customers table and one for the orders table? Is there a better way?

    Read the article

  • Building a Drupal Newsletter Module for handling Newsletter Articles

    - by Michael T. Smith
    We're building a module for generating HTML for email newsletters. We've looked into using a few other modules (SimpleNews, MailChimp, among others), but due to various requirements, it'll be easier and better for us to build a custom solution. Being a new Drupal developer, I'm a bit worried about handling this in a "non-Drupal" way. That being said, my plan is to setup a vocabulary with Newsletters as a term and the actual Newsletters as sub-terms, like so: Newsletters (term) - Newsletter A (sub-term) - Newsletter B (sub-term) This has the added benefit of being able to organize where articles were published (besides just on the site.) The question, though, is how to handle the different Newsletter issues. I could go another level deeper in the vocabulary, like so: Newsletters (term) - Newsletter A (sub-term) - Issue - 2010-03-01 - Issue - 2010-03-02 - Newsletter B (sub-term) - Issue - 2010-03-01 - Issue - 2010-03-08 But I'm wondering if this is adding a bit too much complexity. Once I have this taxonomy setup, when the user went to add new newsletters it would also create a node (content type: newsletter), and when he/she went to add new issues, it would also create a node (content type: issue.) Those would then be the landing pages for that content. So, the question is is there a better way for handling this structure? Is this a Drupal-like solution?

    Read the article

  • CSS: Aligning problem with rounded corners in IE 6/7 but ok in IE8/ Firefox etc

    - by mark smith
    Hi there, can anyone help? I have a problem aligning rounded corners in IE6/7. Basically everything seems to work in Firefox / IE8 but in IE6/7 the left / center / and right divs get misaligned. This basically shows exactly what i am refering to. here is the example in IE8 and everything works ok http://es.drop.io/ern0fye/asset/ie8-jpg And here is the problem (this example is running in IE8 with compat mode set to IE7) http://es.drop.io/ern0fye/asset/ie7-jpg I seem to remember there being a bug in IE6/7 with lineheight or similar but i don't recall exactly. I will paste the CSS and HTML below it is very very simple. Basically there is a left div that holds the left corner image and center div which has a background of RED which is the same as the corner images and finally a right div which holds the right corner image. I would appreciate any input anyone has. Thanks in advance. Here is the CSS .vl-top-left { float:left; width:12px; height:12px; } .vl-top-center { float:left; width: 485px; background-color: #F04A23; height:12px; } .vl-top-right { float:left; height:12px; width:12px; } and the HTML is :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <link href="Stylesheet1.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="vl-top-left"> <img src="content/images/esquina_sup_izq.gif" width="12" height="12"> </div> <div class="vl-top-center"> &nbsp; </div> <div class="vl-top-right"> <img src="content/images/esquina_sup_der.gif" width="12" height="12"> </div> </body> </html> EDIT Applied also margin:0 and padding:0 on the body and on each DIV but still the left and right div drops down as per the screenshot

    Read the article

  • OnExit is not entering via PostSharp in asp.net project.

    - by mark smith
    Hi there, I have setup PostSharp and it appears to be working but i don't get it entering OnExit (i have logged setup to ensure it is working) ... Its a bit tricky to configure with asp.net - or is it just me ... I am using the 1.5 new version I basically have the following in my web.config and i had to add the SearchPath otherwise it can't find my assemblies <postsharp directory="C:\Program Files\PostSharp 1.5" trace="true"> <parameters> <!--<add name="parameter-name" value="parameter-value"/>--> </parameters> <searchPath> <!-- Always add the binary folder to the search path. --> <add name="bin" value="~\bin"/> </searchPath> </postsharp> I have set tracing on but what is strange to me is that it appears to build to the temp directory, maybe this is my issue, i am unsure .. hence i do F5 ... Is it possible to name the Output directory and output file?? As you can see it is editing a DLL in the temp dir so IIS is no longer in control so it doesn't execute it ??? Confused! :-) C:\Program Files\PostSharp 1.5\postsharp.exe "/P:Output=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.dll" "/P:IntermediateDirectory=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp " /P:CleanIntermediate=False /P:ReferenceDirectory=. /P:SignAssembly=False /P:PrivateKeyLocation= /P:ResolvedReferences= "/P:SearchPath=C:\Source Code\Visual Studio 2008\Projects\mysitemvc\mysitemvc\bin," /V /SkipAutoUpdate "C:\Program Files\PostSharp 1.5\Default.psproj" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\before-postsharp\App_Web_04ae3ewy.dll" PostSharp 1.5 [1.5.6.627] - Copyright (c) Gael Fraiteur, 2005-2009. info PS0035: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.il" /QUIET /DLL /PDB "/RESOURCE=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.res" "/OUTPUT=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.dll" /SUBSYSTEM=3 /FLAGS=1 /BASE=18481152 /STACK=1048576 /ALIGNMENT=512 /MDV=v2.0.50727

    Read the article

  • asp.net postback with jquery?

    - by mark smith
    Hi there, Can anyone help, I have a asp.net button but recently replaced it with a standard html button ... What i need to do is postback to an asp.net page and ensure a method is called the button before was an asp.net button so i had this event Protected Sub btnCancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) UtilTMP.DisposeObjects() Server.Transfer("~\Forms\test.aspx", True) End But i was using a button with javascript ALERT and recently changed to Jquery UI Model dialog but it doesn't wait for me to answer the question.. the postback happenes immediatly ... so i decided to change to a standard HTML button ... but i need to postback to the asp.net page and call a method like. If i just postback it won't call the cleanup Protected Sub Cleanup() UtilTMP.DisposeObjects() Server.Transfer("~\Forms\test.aspx", True) End

    Read the article

  • XCode GCC-4.0 vs 4.2

    - by John Smith
    I have just changed a compiler option from 4.0 to 4.2. Now I get an error: jump to case label crosses initialization of 'const char* selectorName' It works fine in 4.0 Any ideas?

    Read the article

  • scrapy - python question

    - by tom smith
    Hi.. Maybe not the correct place to post. But, I'm going to try anyway! I've got a couple of test python parsing scripts that I created. They work enough for me to test what I'm working on. However, I recently came across the python framework, Scrapy, which is used for web scraping. My app runs in a distributed process, across a testbed of multiple servers. I'm trying to understand scrapy, to see if it provides benefits over what I'm doing. So, if possible, I'd really like to talk with a few people who are grounded in/or who use scrapy. Thanks -tom [email protected]

    Read the article

  • Updating Xml attributes with new values in a SQL Server 2008 table

    - by SMD
    I have a table in SQL Server 2008 that it has some columns. One of these columns is in Xml format and I want to update some attributes. For example my Xml column's name is XmlText and it's value in 5 first rows is such as: <Identification Name="John" Family="Brown" Age="30" /> <Identification Name="Smith" Family="Johnson" Age="35" /> <Identification Name="Jessy" Family="Albert" Age="60" /> <Identification Name="Mike" Family="Brown" Age="23" /> <Identification Name="Sarah" Family="Johnson" Age="30" /> and I want to change all Age attributes that are 30 to 40 such as below: <Identification Name="John" Family="Brown" Age="40" /> <Identification Name="Smith" Family="Johnson" Age="35" /> <Identification Name="Jessy" Family="Albert" Age="60" /> <Identification Name="Mike" Family="Brown" Age="23" /> <Identification Name="Sarah" Family="Johnson" Age="40" />

    Read the article

  • How do I specify a crossdomain policy file to allow Flash to grab a bitmap from an RTMP (Wowza) vide

    - by Ken Smith
    I'm trying to get a bitmap/snapshot of a Wowza video stream playing on my client, like so: var bitmapData:BitmapData = new BitmapData(view.videoPlayerComponent.width, view.videoPlayerComponent.height); bitmapData.draw(view.videoPlayerComponent); When I do this, I get this error message: SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://localhost:51150/Resources/WRemoteWebCam.swf cannot access rtmp://localhost/videochat/smithkl42._default/. No policy files granted access. I presume the error comes from not being able to locate the appropriate crossdomain.xml file. I'm not quite sure where it's looking for it, and a wireshark sniff was inconclusive, so I've tried placing one in each of the following places: http://localhost/crossdomain.xml http://localhost:1935/crossdomain.xml http://localhost:51150/crossdomain.xml I can retrieve the file successfully from each of those three locations. (I'm pretty sure that the last one wouldn't have any effect, since it's just the location of the web site which hosts the page that hosts the .swf file, but on the off chance...) These are the contents of the file that it's grabbing in each instance: <cross-domain-policy> <allow-access-from domain="*" to-ports="*" /> </cross-domain-policy> And it's still throwing that same error message. I've also followed the instructions on the Wowza forums, to turn on StreamVideoSampleAccess in the [install]\conf[appname]\Application.xml, with no joy: <Client> <IdleFrequency>-1</IdleFrequency> <Access> <StreamReadAccess>*</StreamReadAccess> <StreamWriteAccess>*</StreamWriteAccess> <StreamAudioSampleAccess>*</StreamAudioSampleAccess> <StreamVideoSampleAccess>*</StreamVideoSampleAccess> <SharedObjectReadAccess>*</SharedObjectReadAccess> <SharedObjectWriteAccess>*</SharedObjectWriteAccess> </Access> </Client> Any thoughts?

    Read the article

  • EnvDTE: ArgumentException when accessing the ActiveConfiguration

    - by Smith
    Hello, I'm writing an addin for Visual Studio 2008. At some point in my code, I'm attempting to access the current active configuration for a project: var configName = _Project.ConfigurationManager.ActiveConfiguration.ConfigurationName; Sometimes, in some very obscure cases, the getter for ActiveConfiguration throws an ArgumentException. Nothing in the documentation says anything about this (but given the very poor quality of the documentation, it was to be expected), and the exception's message is not helping at all. Also, ConfigurationManager is an interface, and I don't know what's the real implementation behind it, so I can't simply disassemble it in Reflector to know the cause. Any help would be greatly appreciated.

    Read the article

  • Using Timthumb to Resize Images from CKEditor

    - by Edward Coleridge Smith
    I am using CKEditor to do basic text and image input into my website. I have noticed that it is quite sporadic in it's method of generating HTML for images when you add them. (Sometimes it might use height and width tags, other times it might use CSS). I use Timthumb for on the fly image resizing on a number of other websites and find it very useful. I use a mod_rewrite rule in my .htaccess file to allow me to create domains like http://localhost/images/800x600/image.jpg and achieve resizing. I would like to somehow incorporate this into CKEditor. I cannot find how to do this looking through the documentation so I have tried post-processing the data produced by CKEditor using Regex, however as mentioned before CKEditor seems to be too sporadic to be able to get this to work all the time. Anyone else done this before? How did you achieve it?

    Read the article

  • loading js files dynamically via another js file?

    - by mark smith
    Hi there, is there anyway to load other JS files from within a single JS file. I would like to point my individual pages "ITS" js file and that js file would load jquery, other js files. I know i can just pop all these into the html i.e. I was thinking of separations of concerns so i was wondering if anything exists already without me reinventing the wheel.... That i would just need to edit home.js to change what other js (jquery etc) are loaded for home.htm ... home.htm would just point to home.js Thanks

    Read the article

  • E-commerce platform for custom application integration

    - by Zach Smith
    We are building an online subscription-based website and I'm looking for recommendations on which e-commerce platform to use for the checkout process. Requirements include: Only four products. The sign-up process of the site is heavily customized, and after checkout the user should automatically get logged into the subscriber area. Subscriptions will last one year and can be renewed manually. Support for coupons/discount codes at a later point. Since the entire application is custom, we've weighed building a custom checkout but are strongly leaning towards using existing software to avoid having to build lots of admin reporting as well as a coupon engine down the road. The two questions we're pondering are: Is it better to a) build our application custom and use whatever e-commerce software we select just for the payment piece, or b) use the e-commerce software as the basis and build our application around it/as a module/etc? Which e-commerce platform should we use? I've looked into a variety of off the shelf e-commerce software, but it's not clear to me which would be easiest to integrate with. I've researched on the Web and looked at many of the threads on SO to compiled a list of potential candidates: www.magentocommerce.com/ (seems difficult to integrate with) www.prestashop.com/ www.nopcommerce.com/ www.opencart.com/ www.cubecart.com/ www.spreecommerce.com/ www.interspire.com/ www.tradingeye.com/ We're most concerned with the level of effort required with ramping up on the software and then doing the integration with our custom functionality. We're most proficient with PHP, ASP.NET and some ROR and are only considering those technologies. We prefer open source, but would be open to commercial if there's a significant upside. Any experiences with similar projects and advice is greatly appreciated.

    Read the article

  • iPhone app running in Instruments fails with unrecognized selector

    - by Mark Smith
    I have an app that appears to run without problems in normal use. The Clang Static Analyzer reports no problems either. When I try to run it in Instruments, it fails with an unrecognized selector exception. The offending line is a simple property setter of the form: self.bar = baz; To figure out what's going on, I added an NSLog() call immediately above it: NSLog(@"class = %@ responds = %d", [self class], [self respondsToSelector:@selector(setBar:)]); self.bar = baz; On the emulator (without Instruments) and on a device, this shows exactly what I'd expect: class = Foo responds = 1 When running under Instruments, I get: class = Foo responds = 0 I'm stumped as to what could cause this. Perhaps a different memory location is getting tromped on when it's in the Instruments environment? Can anyone suggest how I might debug this?

    Read the article

  • If url exists Objective-c

    - by HiGuy Smith
    Hey, I have a program that needs to tell if an online image exists, but the only way that I've gotten this to work is by loading the image in a NSData pointer and checking if the pointer exists. - (BOOL)exists { NSString *filePath = @"http://couleeapps.hostei.com/BottomBox.png"; NSURL *url = [NSURL URLWithString:filePath]; NSData *imageData = [NSData dataWithContentsOfURL:url]; if (imageData) { return YES; } return NO; } This has worked for me, but my problem is that I have a very slow connection, and it takes forever to download the image. So my question is: is there a way to check if a image (say "http://couleeapps.hostei.com/BottomBox.png") is available without having to download it? Help is much appreciated HiGuy

    Read the article

  • is (StringComparison.)Ordinal the same as InvariantCulture for testing equality?

    - by Tim Lovell-Smith
    From what I read so far, it sounds like these StringComparison types are meant to differ in how they do sorting of strings, if so, does that mean that it does'nt matter which StringComparison you use when doing an equality comparison? string.Equals(a, b, StringComparison....) Extra credit: does it make a difference to the answer if we compare OrdinalIgnoreCase and InvariantCultureIgnoreCase? What is the answer then? Please provide supporting argument and/or references.

    Read the article

  • converting JSON to an object / dictionary / dynamic

    - by benpage
    I'm currently using jqGrid to display data. Part of jqGrid's interface will give you search options, posting back the search details in a JSON string, for example: {"groupOp":"AND","rules":[{"field":"PersonID","op":"eq","data":"123"},{"field":"LastName","op":"eq","data":"Smith"}]} (meaning i'm searching for personID = 123, and LastName = 'Smith') so what i'm hoping to do is somehow convert that back into something i can use server-side. Does anyone have a solution for this that may convert it back into an object of some kind? My current solution would be to convert into xml, parse with linq and create instances of my own 'search' class with a 'rules' collection.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >