Search Results

Search found 423 results on 17 pages for 'william hooper'.

Page 13/17 | < Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >

  • Using Django view variables inside templates

    - by William
    Hi, this is a rather basic question (I'm new to Django) but I'm having trouble using a variable set in my view inside my template. If I initialize a string or list inside my view (i.e. h = "hello") and then attempt to call it inside a template: {{ h }} there is neither output nor errors. Similarly, if I try to use a variable inside my template that doesn't exist: {{ asdfdsadf }} there is again no error reported. Is this normal? And how can I use my variables within my templates. Thanks!

    Read the article

  • How do I submit really big amounts of data to a form?

    - by William Calleja
    I have an HTML from that's posting a really big amount of data which is eventually being saved into an SQL Server 2005, the form is as follows: <form name="frmForm" method="post" action="saveData.aspx"> the target page takes the content of a control within the form and saves it to the database through a normal SQL insert statement. However only a portion of the data is being saved. The field in the database is an ntext. Should I use a different field? Or is something happening while I'm transferring from one page to another? Or even still there's something happening when I'm sending the really big SQL statement through c# in saveData.aspx?

    Read the article

  • Iphone -- maintaining a list of strings and a corresponding typedef enum

    - by William Jockusch
    Suppose I have the following: typedef enum functionType {ln, sin, sqrt} functionType; NSArray *functions = [NSArray arrayWithObjects: @"ln", @"sin", @"sqrt", nil]; Suppose further that *functions will not change at runtime. Question -- is there any way to set up a single structure which updates both of these? So that I only have to keep track of one list, instead of two. To explain what is going on -- the idea is that string input from the user will be stored in a variable of type functionType. Later on, I will have code like this: double valueOfFunction: (functionType) function withInput: (double) input switch (function) { case ln: return ln(input); case sin: return sin(input); case sqrt: return sqrt(input); //etc . . . could grow to include a lot of functions. } And valueOfFunction needs to be fast. So I don't want to be doing string comparisons there.

    Read the article

  • how do I return to the same exact page after posting a form?

    - by William Calleja
    I'm posting data to a page called process.aspx that handles some business logic with the following code: <%@ Page Language="C#" %> <% MyData.process(Request); Response.Redirect("") %> this page I will be calling from a variety of pages. Is there some way of knowing from which page my form was submitted? I was thinking something along the lines of writing: <form id="frmSystem" method="post" action="process.aspx?page=<%= %>"> However I don't know what to write in between the <%= %> to get the current page name. Can anyone help please?

    Read the article

  • HTML Line Spacing & Compact Code

    - by William Hand
    I was just wondering if there was a professional opinion on the matter of compact code. Does it really speed up page loading. Example: <body> <div id="a"></div> <div id="b"></div> </body> VS <body> <div id="a"></div> <div id="b"></div> </body> any ideas?

    Read the article

  • How do I use multiple settings file in Django with multiple sites on one server?

    - by William Bing Hua
    I have an ec2 instance running Ubuntu 14.04 and I want to host two sites from it. On my first site I have two settings file, production_settings.py and settings.py (for local development). I import the local settings into the production settings and override any settings with the production settings file. Since my production settings file is not the default settings.py name, I have to create an environment variable DJANGO_SETTINGS_MODULE='site1.production_settings' However because of this whenever I try to start my second site it says No module named site1.production_settings I am assuming that this is due to me setting the environment variable. Another problem is that I won't be able to use different settings file for different sites. How do I start use two different settings file for two different websites?

    Read the article

  • Samsung Galaxy Tab 1 layout problems

    - by William Rae
    I'm having trouble running my app on the Galaxy tab original 7". It appears to make everything 1.5 times bigger, i.e. if I specify 40dip for a textSize in my layout, it will display as 60 dip when I run it on the tablet. I tried messing around with the display metrics and changing the density and densityDpi to 1. (When I run a toString of the display metrics in the Galaxy tab 2, they are both 1, whereas the Galaxy tab 1 has values of 1.5) The app runs very well on every phone I've tested it on, and on the Galaxy tab 2, so I can't figure out what the problem is. I even tried creating a dummy app with just a textView with a size of 40dip, and it still converted it to 60. Any ideas? Thanks.

    Read the article

  • Javascript style variables with "-" in their name aren't able to be changed?

    - by William
    Okay, so this bug has cost me quite a bit of time and embarrassment. It seems that any style variable with a - in it's name can't be modified by javascript. As seen here: <!DOCTYPE html> <html lang="en"> <head> <title>Class Test</title> <meta charset="utf-8" /> <style> body { text-align: center; background-color: #ffffff;} #box { position: absolute; left: 610px; top: 80px; height: 50px; width: 50px; background-color: #ff0000; color: #000000;} </style> <script type="text/javascript"> var box = 0; </script> </head> <body> <div id="box" ></div> <script type="text/javascript"> box = document.getElementById('box'); box.style.background-color = "#0000ff"; </script> </body> </html> The box in said example will just remain red. So how do I change a style variable with a - in it's name?

    Read the article

  • In which layer should I join 2 entities together?

    - by William
    I use Spring MVC and a regular JDBC. I've just learned that I should separate business process into layers which are presentation layer, controller layer, service layer, and repository/DAO layer. Now suppose that I have an Entity called Person that can have multiple Jobs. Job itself is another entity which have its own properties. From what I gathered, the repository layer only manages one entity. Now I have one entity that contains another entity. Where do I "join" them? The service layer? Suppose I want to get a person whose job isn't known yet (lazy loading). But the system might ask what the job of that particular person is later on. What is the role of each layer in this case? Please let me know if I need to add any detail into this question.

    Read the article

  • Then files in my project folder used for what?

    - by william-hu
    I finished one project. But others want me give them the non-Compiled code.what's that? My project folder include: Classes:of course, the source code. build: I don't understand clearly. imagesrc: I added, include the images of my project. The others are the nib file. Give me the explanation in detail,thank you so much.

    Read the article

  • How do I build SDL_TTF?

    - by William
    Okay, so I'm on Windows Vista, and I want to use SDL_TTF, but the idiots who made it decided you have to build everything from source, so I to build the .lib files and all that other stuff, but I'm on Windows, so how am I suppose to do this?

    Read the article

  • How would I create this background effect?

    - by William
    What would you call the effect applied to the backgrounds in the Giygas fight of Earthbound, and the battle backgrounds in Mother 3? This is what I'm talking about. http://www.youtube.com/watch?v=tcaErqaoWek http://www.youtube.com/watch?v=ubVnmeTRqhg Now anyone know how I could go about this without using animated images, or using openGL?

    Read the article

  • Can I prevent a computed column from changing it's value if the formula changes?

    - by William Hurst
    I have a computed column in MS SQL 2005 that does some VAT calculations. The website uses invoices that can only be generated once and rely on the value in the computed column to work out the VAT. Unfortunately, a bug was found that means that the the VAT value calculated was off by a few cents. Not a huge problem but we can't change the values from all the previously computed values as these need to be honoured on the invoices. tldr; How do I change the calculation for a computed column without re-calculating the values that have already be calculated?

    Read the article

  • How do I set a value to the Session in asp.net on an onClick event of a normal htmlElement?

    - by William Calleja
    I need to make a Function that receives a Session Key and a Session Value and call this function on a normal HTML onClick event. When this function is called the Session variable is assigned the Key I sent with the Value I sent. So far I have this: <script runat="server" type="text/C#"> protected void setSessionValue(string key, string value) { Session[key] = value; } </script> But when I try to call if like so: onclick="setSessionValue('itemID','3345');" Its not working and giving me an error. Any help? I'm using c# and asp.net but I can't use code behind and need to work everything off the page.

    Read the article

  • How can I find all the supported weights of a Font in Java?

    - by William
    How can I find all the available font weights for a given font in Java? The TextAttribute for font weight lists 11 different weight constants, way more than just Font.PLAIN and Font.BOLD. I'd like to know which ones actually exist for a given font family, so I can make sure I'm only using weights for which a font face exists. The getAttributes() and getAvailableAttributes() methods in Font will only show me whether or not the Font supports the FONT_WEIGHT attribute, not which weight values it supports. If I just pass in a particular value to see what I get back, I don't have any guarantee that I'll get what I asked for. The TextAttribute class says "The values for WEIGHT, WIDTH, and POSTURE are interpolated by the system, which can select the 'nearest available' font or use other techniques to approximate the user's request."

    Read the article

  • Simple Java Sound Applet won't work!!! ARG!!!

    - by William
    import java.applet.*; /** * SoundApplet.java - a simple applet that plays the "gong.au" sound file. */ public class AppletGame extends Applet { public void init() { super.init(); resize(0,0); AudioClip gong = getAudioClip(getDocumentBase(), "test0.au"); gong.play(); } } In Eclipse applet viewer it loads and doesn't play sound. In html it doesn't load and says start not initalized. I've tried calling it outside of init, and all that someone help me!!!

    Read the article

  • Maintaining property lists for xCode projects

    - by William Jockusch
    My project currently contains two largish property lists. One is currently 20KB; another is 8KB. So far, I have been maintaining them with xCode's property list editor. This is manageable but also a bit clunky. I am wondering if other people have better ways of doing this? So far, my lists consist of nested arrays of strings. The depth is not uniform.

    Read the article

  • predict location of single-line text from a UITextView

    - by William Jockusch
    Is this possible? Specifically, I have a UITextView, and the text is short enough that it will fit on a single line. I want to predict where it will appear, so that (for example) if I wanted to, I could set up a UILabel that rendered the text in exactly the same location. Once I get that figured out, what I really want to do is pick contentInset and/or contentOffset so that the text of the UITextView and the left-justified UILabel will render in the same location. But I figure the above will let me do that. EDIT: In response to a comment, the fundamental problem I am trying to get around is that UITextField does not let you set the location of the cursor. It appears a lot of people have tried to get around this without success. I need to be able to move the cursor -- inserting/deleting text there is not enough. Control cursor position in UITextField Insert string at cursor position of UITextField Moving the cursor to the beginning of UITextField iOS -- dealing with the inability to set the cursor position in a UITextField

    Read the article

  • What's the actual windows media player maximum banner width?

    - by William
    When looking at the documentation for the banner tag in windows media metafiles all the documentation says there is a maximum size of 194 x 32 pixels. http://msdn.microsoft.com/en-us/library/dd562478(v=VS.85).aspx However, when experimenting with larger images they seem to be displaying correctly. Is there some real undocumented limitation here? Will it get cut off on different/older versions?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >