Daily Archives

Articles indexed Saturday April 10 2010

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

  • Links styling in CSS

    - by misha-moroshko
    Hello, Why the following styling of the link does not work ? <html> <head> <style type="text/css"> a:link {color:#123456;} /* unvisited link */ </style> </head> <body> <a href="http://www.google.com">Visit Google</a> </body> </html> Thanks !

    Read the article

  • drawRect not being called in my subclass of UIImageView

    - by Ben Collins
    I have subclassed UIImageView and tried to override drawRect so I could draw on top of the image using Quartz 2D. I know this is a dumb newbie question, but I'm not seeing what I did wrong. Here's the interface: #import <UIKit/UIKit.h> @interface UIImageViewCustom : UIImageView { } - (void)drawRect:(CGRect)rect; And the implementation: #import "UIImageViewCustom.h" @implementation UIImageViewCustom - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { } return self; } - (void)drawRect:(CGRect)rect { // do stuff } I set a breakpoint on drawRect and it never hits, leading me to think it never gets called at all. Isn't it supposed to be called when the view first loads? Have I incorrectly overridden it?

    Read the article

  • Finding if a target number is the sum of two numbers in an array via LINQ and get the and Indices

    - by Dr.H
    Hello I am new to Linq , I found this thread which explain 90% of what I need http://stackoverflow.com/questions/2331882?tab=newest#tab-top , thanks "pdr" but what I need is to get the Indices too , here is my modification I get the index of the first number but I don't know how to get the index of the second number int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var result = from item in numbers.Select((n1, idx) => new { n1,idx, shortList = numbers.Take(idx) }) from n2 in item.shortList where item.n1 + n2 == 7 select new { nx1 = item.n1,index1=item.idx, nx2=n2 };

    Read the article

  • Validate numeric text field in jquery

    - by mcxiand
    I have this code in jquery to prevent non-numeric characters being inputted to the text field $("#NumericField").numeric(); Now, on the text field i cant input non-numeric characters. That is OK. The problem here is if the user will paste on the text field with non numeric characters. Is there a way/method to disable pasting if the value is non-numeric? Or is there any other approach to handle this situation that you can share?

    Read the article

  • Can I have two apps under same (custom)Tab

    - by simple
    As I am stumbling through Facebook App Dev. I am getting more and more close to a bit sophisticated questions, bu still I am at newbie level. Can I have custom Tab and inside that tab two different apps ? ex. (the slideshow and top 5 news(RSS feed))

    Read the article

  • explaining $this->load->view()

    - by ajsie
    in a controller you can use this method to load a view. but i want to know behind the scenes here. im new to php and frameworks, but i’ve learned the basics of OOP. when $this-view() is made then the method in the current class or the parent class is used. but what does this mean: $this-load-view(). what is the intermediate load? is it a function or is it a property? where is it located? how could it contain view()? grateful for explanation.

    Read the article

  • proftpd: copying uploaded files to an additional directory

    - by Matthew Iselin
    Using proftpd, is there a good way to automatically synchronise uploaded files from the upload directory to some other directory? Our layout ends up a bit like this: ~/ftp/some/path <-- Files are uploaded here ~/some/other/path/not/accessible/via/ftp <-- But also need to be here after uploading Is there a good way to do this automatically, or do I have to tell anyone uploading files to upload twice, and open up an additional directory (containing data we cannot redistribute)?

    Read the article

  • Throw of a dice in Java

    - by Arkapravo
    The throw of a dice is a popular program in Java, public class Dice { /* This program simulates rolling a dice */ public static void main(String[] args) { int dice; // The number on the dice. dice = (int) (Math.random() * 6 + 1); System.out.println (dice); } } What I wish to do is make it repeat, 500 times. I have not been able to put this program into a loop of 500. I usually program in Python, thus I guess my Java has rusted ! Any help is most welcome !

    Read the article

  • Embedded SQL in OO languages like Java

    - by Steve De Caux
    One of the things that annoys me working with SQL in OO languages is having to define SQL statements in strings. When I used to work on IBM mainframes, the languages used an SQL preprocessor to parse SQL statements out of the native code, so the statements could be written in cleartext SQL without the obfuscation of strings, for instance in Cobol there is a EXEC SQL .... END-EXEC syntax construct that allows pure SQL statements to be embedded in the Cobol code. <pure cobol code, including assignment of value to local variable HOSTVARIABLE> EXEC SQL SELECT COL_A, COL_B, COL_C INTO :COLA, :COLB, :COLC FROM TAB_A WHERE COL_D = :HOSTVARIABLE END_EXEC <more cobol code, variables COLA, COLB, COLC have been set> ...this makes the SQL statement really easy to read & check for errors. Between the EXEC SQL .... END-EXEC tokens there are no constraints on indentation, linebreaking etc., so you can format the SQL statement according to taste. Note that this example is for a single-row select, when a multiple-row resultset is expected, the coding is different (but still v. easy to read). So, taking Java as an example What made the "old COBOL" approach undesirable ? Not only SQL, but system calls could be made much more readable with that approach. Let's call it the embedded foreign language preprocessor approach. Would an embedded foreign language preprocessor for SQL be useful to implement ? Would you see a benefit in being able to write native SQL statements inside java code ? Edit I'm really asking if you think SQL in OO languages is a throwback, and if not then what could be done to make it better.

    Read the article

  • How do I support the touch of the navigation bar label?

    - by iaefai
    I have an editor that I am making, and I need a way of editing the document's title. I was considering touching the title of the navigation item and have a custom view appear. I did this in an initial version of the application with a button bar item (and target/action), but I cannot seem to find a way to do it with the managed navigation bar. The alternative I was considering was putting another bar at the bottom with an item to do just that, but it doesn't seem like the best design if I don't need to do it, as it takes away from viewing space. Example image: i.imgur.com/NXAQs.png

    Read the article

  • What is the single most effective thing you did to improve your programming skills?

    - by Oded
    Looking back at my career and life as a programmer, there were plenty of different ways I improved my programming skills - reading code, writing code, reading books, listening to podcasts, watching screencasts and more. My question is: What is the most effective thing you have done that improved your programming skills? What would you recommend to others that want to improve? I do expect varied answers here and no single "one size fits all" answer - I would like to know what worked for different people. Edit: Wow - what great answers! Keep 'em coming people!!!

    Read the article

  • Qt – How to add calculated column in QsqlRelationalTableModel ?

    - by user289175
    I have an table view showed part description, quantity, price And I have a Model/View using this code model = new QSqlRelationalTableModel(this); model->setTable("parts"); model->setRelation(3,QSqlRelation("part_tbl","part_id","part_desc")); model->select(); ui->tableView->setModel(model); I need to add a new column that shows quantity * price in the table view. It's important to know I'm using QsqlRelationalTableModel Help is appreciated, Thanks in advance

    Read the article

  • How do you write "Select (all) From (table) Where posting=$posting except this posting? (Mysql)

    - by ggfan
    I want to write a Mysql statement that selects all from a table(posting) where title is like $title except for the title of $title. Basically I want to display all related posting of a certain posting. I want the query to select all the postings in the table that has the title name in the title and detail. But I don't want the posting to display in the related postings. $query="Select * From posting Where title,detail, like %$title% except $title"; how do I write the except part?

    Read the article

  • API to determine cell carrier?

    - by Chris Lively
    Is there a free API or some other way to determine what carrier a cell phone number is registered with? I'd like my application to broadcast text messages without them picking their carrier from a list. UPDATE: Interestingly, a coworker found the answer: http://developer.whitepages.com/ UPDATE2: Well the whitepages license agreement is so restrictive that you can't build an app for it. Any other ideas?

    Read the article

  • Report Generator using templates

    - by well son
    Hi all I'd like to a suitable programming language/software that I can use to generate a report of PDF/DOC using a template of my choice. As I currently have to manually edit, add things in report, I like to automate it by softwares. Thank you.

    Read the article

  • Setting The Wallpaper On An IPad

    - by Anirudh
    I think there is no way to set the lock screen wallpaper on the iPhone programmatically (with ref to this question), but with the 3.2 SDK and the ability to set the wallpaper on the home screen on the iPad, does the SDK allow this to be done via APIs now? I looked up the developer reference, but i could not find anything useful.

    Read the article

  • QT: I've inherited from QTreeView. I've inherited from QStandardItem. How do i Style the items?

    - by San Jacinto
    My Google skills must be failing me today. I've inherited from QTreeView to create a TreeView that stores a QStandardItemModel instead of a QAbstractItemModel. I have also inherited from QStandardItem to create a class to store my data in an item as is necessary. I've successfully inserted my derived QStandardItem into my derived QTreeView's QStandardItemModel. Now the trouble is, I can't figure out how to style it. I know that QTreeView has a setStyleSheet(QString) member, but I can't seem to get it working. It may be as simple as I'm not styling the correct attribute. Any pointers would be appreciated. Thanks. For clarity, here are my class defs. class SurveyTreeItem : public QStandardItem { public: SurveyTreeItem(); SurveyTreeItem( const QString & text ); ~SurveyTreeItem(); }; class StandardItemModelTreeView : public QTreeView { public: StandardItemModelTreeView(QWidget* parent = 0); ~StandardItemModelTreeView(); QStandardItemModel* getStandardItemModel(); }; I've tried the following StyleSheets: StandardTreeView::Item { font: 87 12pt 'Arial Black'; } StandardTreeView::QStandardItem { font: 87 12pt 'Arial Black'; } QTreeView::QStandardItem { font: 87 12pt 'Arial Black'; } QTreeView::Item { font: 87 12pt 'Arial Black'; } QTreeView::SurveyTreeItem { font: 87 12pt 'Arial Black'; } StandardTreeView::SurveyTreeItem { font: 87 12pt 'Arial Black'; }

    Read the article

  • Where do you download a package with java.exe?

    - by Derek
    I was trying to run this java ee program with session beans which involves the 'ant' command apparently and when I try to run 'ant' it says... '"java.exe"' is not recognized as an internal or external command. Soooo I am thinking I need to get java.exe in order to use 'ant' properly. Where can I find it? What downloadable contains it?

    Read the article

  • Very Slow WebResponse triggering TimeOut

    - by David Fdez
    Hello: I have a function in C# that fetches the status of Internet by retrieving a 64b XML from the router page public bool isOn() { HttpWebRequest hwebRequest = (HttpWebRequest)WebRequest.Create("http://" + this.routerIp + "/top_conn.xml"); hwebRequest.Timeout = 500; HttpWebResponse hWebResponse = (HttpWebResponse)hwebRequest.GetResponse(); XmlTextReader oXmlReader = new XmlTextReader(hWebResponse.GetResponseStream()); string value; while (oXmlReader.Read()) { value = oXmlReader.Value; if (value.Trim() != ""){ return !value.Substring(value.IndexOf("=") + 1, 1).Equals("0"); } } return false; } using Mozilla Firefox 3.5 & FireBug addon i guessed it normally takes 30ms to retrieve the page however at the very huge 500ms limit it stills reach it often. How can I dramatically improve the performance? Thanks in advance

    Read the article

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