Search Results

Search found 799 results on 32 pages for 'textfield'.

Page 20/32 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Django query get recent record for each entry and display as combined list

    - by gtujan
    I have two models device and log setup as such: class device(models.Model): name = models.CharField(max_length=20) code = models.CharField(max_length=10) description = models.TextField() class log(model.Model): device = models.ForeignKey(device) date = models.DateField() time = models.TimeField() data = models.CharField(max_length=50) how do I get a list which contains only the most recent record/log (based on time and date) for each device and combine them in the format below: name,code,date,time,data being a Django newbie I would like to implement this using Django's ORM. TIA!

    Read the article

  • XML pass values to timer, AS3

    - by VideoDnd
    My timer has three variables that I can trace to the output window, but don't know how to pass them to the timer. How to I pass the XML values to my timer? Purpose I want to test with an XML document, before I try connecting it to an XML socket. myXML <?xml version="1.0" encoding="utf-8"?> <SESSION> <TIMER TITLE="speed">100</TIMER> <COUNT TITLE="starting position">-77777</COUNT> <FCOUNT TITLE="ramp">1000</FCOUNT> </SESSION> myFlash //myTimer 'instance of mytext on stage' /* fields I want to change with XML */ //CHANGE TO 100 var timer:Timer = new Timer(10); //CHANGE TO -77777 var count:int = 0; //CHANGE TO 1000 var fcount:int = 0; timer.addEventListener(TimerEvent.TIMER, incrementCounter); timer.start(); function incrementCounter(event:TimerEvent) { count++; fcount=int(count*count/1000);//starts out slow... then speeds up mytext.text = formatCount(fcount); } function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("0000000" + whole).substr(-7, 7) + "." + (fraction < 10 ? "0" + fraction : fraction); } //LOAD XML var myXML:XML; var myLoader:URLLoader = new URLLoader(); myLoader.load(new URLRequest("time.xml")); myLoader.addEventListener(Event.COMPLETE, processXML); //PARSE XML function processXML(e:Event):void { myXML = new XML(e.target.data); trace(myXML.ROGUE.*); trace(myXML); //TEXT var text:TextField = new TextField(); text.text = myXML.TIMER.*; text.textColor = 0xFF0000; addChild(text); } RESOURCES OReilly's ActionScript 3.0 Cookbook, Chapter 12 Strings, Chapter 20 XML

    Read the article

  • Display ny website source code for copy/paste

    - by AlexGuz
    Hi everyone... I have a website displaying data from MySQL in a php file (/something.php).... i want to copy the source code of that page as HTML so i can use it in a textfield box so users can copy paste that code... It's almost like an HTML generator using info from mySQL, so users can custimize each HTML code. I have everything covered... except the display HTML thing. Please Help

    Read the article

  • [iPhone app] Detecting which key has been pressed in UITextField

    - by Dough
    Hi, I have an UITextField object in my view and want to launch a method when user press backspace button and textField is empty. First I have to do is to create a cursor storing text length, so when cursor changes from 1 to 0 there is nothing to do. The only way to launch the method is when text length is 0 - press backspace - remain to 0. How to catch the event of pressing the backspace key in my UITextField ? Thanks in advance !

    Read the article

  • Saving data in custom class via AppDelegate

    - by redspike
    I can't seem to save data to a custom instance object in my AppDelegate. My custom class is very simple and is as follows: Person.h ... @interface Person : NSObject { int _age; } - (void) setAge: (int) age; - (int) age; @end Person.m #import "Person.h" @implementation Person - (void) setAge:(int) age { _age = age; } - (int) age { return _age; } @end I then create an instance of Person in the AppDelegate class: AppDelegate.h @class Person; @interface AccuTaxAppDelegate : NSObject <UIApplicationDelegate> { ... Person *person; } ... @property (nonatomic, retain) Person *person; @end AppDelegate.m ... #import "Person.h" @implementation AccuTaxAppDelegate ... @synthesize person; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; } - (void)applicationWillTerminate:(UIApplication *)application { // Save data if appropriate } #pragma mark - #pragma mark Memory management - (void)dealloc { [navigationController release]; [window release]; [person release]; [super dealloc]; } @end Finally, in my ViewController code I grab a handle on AppDelegate and then grab the person instance, but when I try to save the age it doesn't seem to work: MyViewController ... - (void)textFieldDidEndEditing:(UITextField *)textField { NSString *textAge = [textField text]; int age = [textAge intValue]; NSLog(@"Age from text field::%i", age); AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; Person *myPerson = (Person *)[appDelegate person]; NSLog(@"Age before setting: %i", [myPerson age]); [myPerson setAge:age]; NSLog(@"Age after setting: %i", [myPerson age]); [textAge release]; } ... The output of the above NSLogs are: [Session started at 2010-05-04 18:29:22 +0100.] 2010-05-04 18:29:28.260 AccuTax[16235:207] Age in text field:25 2010-05-04 18:29:28.262 AccuTax[16235:207] Age before setting: 0 2010-05-04 18:29:28.263 AccuTax[16235:207] Age after setting: 0 Any ideas why 'age' isn't being stored? I'm relatively new to Obj-C so please forgive me if I'm missing something very simple!

    Read the article

  • Display any website source code for copy/paste

    - by AlexGuz
    Hi everyone... I have a website displaying data from MySQL in a php file (/something.php).... i want to copy the source code of that page as HTML so i can use it in a textfield box so users can copy paste that code... It's almost like an HTML generator using info from mySQL, so users can custimize each HTML code. I have everything covered... except the display HTML thing. Please Help

    Read the article

  • How to resize controls at runtime in java

    - by user1349213
    Is there a way to resize a control, a JTextfield for example, at runtime in java? I want my textfield to have the resize cursors (just like when you point your cursor on the corner of a window) and will be able to resize on runtime. Ive read on the internet that vb6 and C# have those capabilities, is there anything for java? A sample code or a link to a good tutorial will be very much appreciated. Thank you.

    Read the article

  • Django form and User data

    - by Dean
    I have a model that looks like this: class Client(models.Model): name = models.CharField(max_length=100, primary_key=True) user = models.ForeignKey(User) class Contract(models.Model): title = models.CharField(max_length=100, primary_key=True) start_date = models.DateField() end_date = models.DateField() description = models.TextField() client = models.ForeignKey(Client) user = models.ForeignKey(User) How can i configure a django form so that only clients associated with that user show in the field in the form? My initial thought was this in my forms.py: client = forms.ModelChoiceField(queryset=Client.objects.filter(user__username = User.username)) But it didn't work. So how else would I go about it?

    Read the article

  • how to display numbers without garbage numbers?

    - by Medeti Naveen Kumar
    Hi friends, whenever i press the numbers in text filed upto 9 numbers my textfield has taken right values but i press 10 th number.i have found duplicate number. in my header file i declare a pressnumber is "long long int" -(IBAction)press:(id)sender{ pressNumber = pressNumber*10 + (int)[sender tag]; phonenumber.text = [NSString stringWithFormat:@"%d",currentNumber]; } i want to enter a phone number in my textfiled but it is not taken 10 right numbers. Thanking you,

    Read the article

  • Specifying Struts templates source

    - by Chris
    Say I'm using a form with a text-field. <@s.form action="login" <@s.textfield label="E-mail" name="email"/ <@s.submit value="send"/ How can I specify that the text-form should be generated by a custom template (text_login.ftl) rather than the standard text.ftl?

    Read the article

  • Restricting copy,paste option for a particular UITextfield

    - by EXC_BAD_ACCESS
    Hi, My UIView contains Two UITextField.I need to restrict copy,paste option for one textfield.I don't want to restrict that for another. When i am using the following code,Both the field gets restricted from copy,paste. -(BOOL)canPerformAction:(SEL)action withSender:(id)sender { if ( [UIMenuController sharedMenuController] ) { [UIMenuController sharedMenuController].menuVisible = NO; } return NO; } Can any one provide me the solution to solve my problem.

    Read the article

  • Facebook application - Add wall

    - by fortysixandtwo
    How can I add a wall on my facebook-application (fbml). Do I have to store the wallposts (user-id and comment) in my database, and display them using fb:wall, fb:wallposts, or is it a plugin like fb:comments for this? If so, how do I add a textfield/form for interacting with the wall?

    Read the article

  • jQuery AutoComplete with three levels of suggestions?

    - by Meitham
    I am building a django based application and its time to add the DHTML stuff. One of my fields represent a database field with this format databaseName.tableName.fieldName I would like to have javascript autocompletion in three levels, say once I type part of the database names I get a list of all matching databases, one that is selected I get a list of all tables, and once that is selected I get a list of all fields in that table, all in the same textfield. Any help would be appreciated. Thanks M

    Read the article

  • Pass parameters to Flash Main (Document) class

    - by loto
    In Flash CSn/AS3 you associate a Main class with a flash file which when loaded in the flash player "automatically creates an instance of the program's main class." I'd like to know how to pass arguments to the main class, since you don't write it yourself (you put its name in the Document textfield in the IDE).

    Read the article

  • iPhone UITextView leaves room for 2 lines at the bottom

    - by Ton
    Hi Guys, When i start typing text in a default textView in my viewcontroller, its not going to the bottom of the textfield. It leaves room for 2 more lines of text and then starts scrolling. I want it to start scrolling when i start going beyond the last line. I tried everything, and i dont know what i can do? Anyone any ideas?

    Read the article

  • How do I use a DataGrid to display the contents of a MDB

    - by orangecl4now
    I'm relatively new to .Net 4 and I am creating my FIRST WPF application using a MDB as a backend datasource. I designed my UI. I have a TextField (called Name), a Combobox (called Division) and a DataGrid (called dataGrid1). The only problem I'm having is figuring out how to link my DataGrid to display data from the DataSource. and load the data in the Windows1_Loaded method. Thanks

    Read the article

  • riched32.dll or riched20.dll sourcode

    - by genesys
    Is the sourcecode of riched32.dll or riched20.dll available somewhere If not - what could I do if i want to create a richedit textfield that behaves slightly different (like changing the control for the scrollbars, such that i can change the size and positions of them from outside) thanks

    Read the article

  • Unexpected return value

    - by Nicholas Gibson
    Program stopped compiling at this point: What is causing this error? (Error is at the bottom of post) public class JFrameWithPanel extends JFrame implements ActionListener, ItemListener { int packageIndex; double price; double[] prices = {49.99, 39.99, 34.99, 99.99}; DecimalFormat money = new DecimalFormat("$0.00"); JLabel priceLabel = new JLabel("Total Price: "+price); JButton button = new JButton("Check Price"); JComboBox packageChoice = new JComboBox(); JPanel pane = new JPanel(); TextField text = new TextField(5); JButton accept = new JButton("Accept"); JButton decline = new JButton("Decline"); JCheckBox serviceTerms = new JCheckBox("I Agree to the Terms of Service.", false); JTextArea termsOfService = new JTextArea("This is a text area", 5, 10); public JFrameWithPanel() { super("JFrame with Panel"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pane.add(packageChoice); setContentPane(pane); setSize(250,250); setVisible(true); packageChoice.addItem("A+ Certification"); packageChoice.addItem("Network+ Certification "); packageChoice.addItem("Security+ Certifictation"); packageChoice.addItem("CIT Full Test Package"); pane.add(button); button.addActionListener(this); pane.add(text); text.setEditable(false); text.setBackground(Color.WHITE); text.addActionListener(this); pane.add(termsOfService); termsOfService.setEditable(false); termsOfService.setBackground(Color.lightGray); pane.add(serviceTerms); serviceTerms.addItemListener(this); pane.add(accept); accept.addActionListener(this); pane.add(decline); decline.addActionListener(this); } public void actionPerformed(ActionEvent e) { packageIndex = packageChoice.getSelectedIndex(); price = prices[packageIndex]; text.setText("$"+price); Object source = e.getSource(); if(source == accept) { if(serviceTerms.isSelected() = false) // line 79 { JOptionPane.showMessageDialog(null,"Please accept the terms of service."); } else { JOptionPane.showMessageDialog(null,"Thanks."); } } } Error: \Desktop\Java Programming\JFrameWithPanel.java:79: unexpected type required: variable found : value if(serviceTerms.isSelected() = false) ^ 1 error

    Read the article

  • Image depending on the text in Python/Django

    - by PyOut
    Hello, How can I find an image, depending on the text? I have image model with keywords: class Post(models.Model): image = ImageField(_('Image'), blank=True, upload_to='folder') keywords = models.CharField(_('Keywords'), max_length=80) And model which will serve as the search for a suitable image class TextSearch(models.Model): body = models.TextField(_('Text'))

    Read the article

  • Could I use urlize filter in this way ?

    - by xRobot
    Could I use urlize filter in this way? : from django.utils.html import urlize def save(self, force_insert=False, force_update=False): self.body = urlize(self.body) super(Post, self).save(force_insert, force_update) body is a TextField.

    Read the article

  • remote_form_for in index.html.erb file not working w/ AJAX...Ruby on Rails...

    - by bgadoci
    Just curious if I am overlooking something simple here. I have deployed the remote_form_for in the show.html.erb code before to render comments on a post (project in this case) without a problem. I have moved this code to the index view and seems to degrade to the normal form_for action (page refresh). I am not getting any javascript errors so not sure what is wrong here. Here is my code: index.html.erb <% remote_form_for [project, Comment.new] do |f| %> <p> <%= f.label :body, "New Comment" %><br/> <%= f.text_area (:body, :class => "textarea") %> </p> <p> <%= f.label :name, "Name" %> (Required)<br/> <%= f.text_field (:name, :class => "textfield") %> </p> <p> <%= f.label :email, "Email" %> (Required but will not be displayed)<br/> <%= f.text_field (:email, :class => "textfield") %> </p> <p><%= f.submit "Add Comment" %></p> <% end %> CommentsController#create def create @project = Project.find(params[:project_id]) @comment = @project.comments.create!(params[:comment]) respond_to do |format| format.html { redirect_to projects_path } format.js end end /views/comments/create.js.rjs page.insert_html :bottom, :commentwrapper, :partial => @comment page[@comment].visual_effect :highlight page[:new_comment].reset page.replace_html :notice, flash[:notice] flash.discard /views/comments/_comment.html.erb <% div_for comment do %> <div id="commentwrapper"> <% if admin? %> <%=link_to_remote "X", :url => [@project, comment], :method => :delete %> <% end %> <%= h(comment.body) %><br/><br/> Posted <%= time_ago_in_words(comment.created_at) %> ago by <%= h(comment.name) %> <% if admin? %> | <%= h(comment.email) %> <% end %></div> <% end %>

    Read the article

  • subview is not added immediately (iphone)

    - by Jonathan
    When the return button on the keyboard for a textfield is tapped I want to add a UIView, then connect to a website with NSURlConnection sendsynchronousrequest and I have the code in that order But when I run in the simulator (I can't run on device) the connection is run first then the subview is added (ie the opposite of the order of the code) Why is this and how can stop it, because I want the view to added, then the connection done and then the view removed.

    Read the article

  • PHP contact form sends empty data

    - by Alan Lawlessness
    I am trying to create a HTML5 contact form compatible with computer and mobile devices, when I clicked on send message it jumps into a blank white screen. I do get a email but it contains no information. I am quite new with PHP. For www.rare1.ca/test: <!DOCTYPE html> <html> <head> <title>Responsive HTML5/CSS3 template</title> <meta charset="utf-8" /> <meta name = "viewport" content = "width=device-width, maximum-scale = 1, minimum- scale=1" /> <link rel="stylesheet" type="text/css" href="css/default.css" media="all" /> <link rel="stylesheet" href="css/flexslider.css" type="text/css" /> <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css' /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="js/jquery.flexslider.js"></script> <script src="js/default.js"></script> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="js/respond.min.js"></script> <![endif]--> </head> <body> <div id="pagewidth"> <header id="header"> <div class="center"> <nav id="mainNav"> <ul> <li class="active"><a href="#pagewidth"><span>gallery</span></a></li> <li></li> <li></li> <li></li> <li></li> <li><a href="#contactUs"><span>contact us</span></a></li> </ul> </nav> </div> </header> <div id="content"> <section class="row"> <div class="center"> <h1><img src="img/logo.gif" width="142" height="78"></h1> <strong class="subHeading">Coming soon</strong> <div class="gallery"> <ul class="slides"> <li><img src="img/img-gallery.jpg" alt="image" /></li> <li><img src="img/img-gallery2.jpg" alt="image" /></li> <li><img src="img/img-gallery3.jpg" alt="image" /></li> </ul> </div> <div class="buttons"></div> </div> </section> <section id="contactUs" class="row grey"> <div class="center"> <h1>Contact Us</h1> <strong class="subHeading">lorem ipsum dolor sit amet, consectetur adipiscing elit</strong> <div class="columns"> <div class="half"> <form action="sendemail.php" class="form"> <fieldset> <h2>Feedback form</h2> <div class="formRow"> <div class="textField"><input type="text" name="Name" id="name" placeholder="Your name ..." /></div> </div> <div class="formRow"> <div class="textField"><input type="text" name="Email" id="email" placeholder="Your Email ..." /></div> </div> <div class="formRow"> <div class="textField"><textarea name="Message" cols="20" rows="4" placeholder="Your message ..."></textarea> </div> </div> <div class="formRow"> <button class="btnSmall btn submit right"> <span>Send Message</span> </button> </div> </fieldset> </form> </div> <div class="half"> <h2>How to find us</h2> <div id="map"> <div class="imgHolder"><img src="img/map.jpg" alt="google map" /></div> </div> </div> </div> </div> </section> </div> <footer id="footer"> <div class="center"> </div> </footer> </div> </body> </html> <?php // This is the script for sending email. // change the email address below to your own email address. $mailTo = '[email protected]'; $name = htmlspecialchars($_POST['Name']); $mailFrom = htmlspecialchars($_POST['Email']); $message_text = htmlspecialchars($_POST['Message']); $headers = "From: $name <$mailFrom>\n"; $headers .= "Reply-To: $name <$mailFrom>\n"; $message = $message_text; mail($mailTo, $subject, $message, $headers ); ?>

    Read the article

  • Store information on iphone device

    - by Siva
    Hi I am new to iphone development. In my app, i am using two UITextfield for that registering user ID and password. These user ID and password should be save on iphone device after entered text in textfield by the user. is there any idea to do that without database? otherwise how to do that?

    Read the article

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