Daily Archives

Articles indexed Monday June 14 2010

Page 1/108 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I check if selected value of the DropDown List is not selected in C#?

    - by Sahat
    This code will display the selected value from the drop down list. E.g. if I sellect Item 1 I will get the following output: You have selected Item 1. Label1.Text = "You have selected " + DropDownList1.SelectedValue + "<br />"; But if I don't select anything and click on Submit button, I will get: You have selected What would I need to make it display "You have not selected anything. Please select at least 1 item."

    Read the article

  • Is gchart safe to use?

    - by Paul Tomblin
    The home page for gchart, a client side charting add-in for Google Web Toolkit (GWT), has a long screed about how the project's only maintainer thinks his Google account has been hacked and because of that he will be "disavowing/abandoning my own project and Google account". Does that mean the project is an orphan? Is somebody taking it over? There is always a risk on basing your project on somebody else's code because they may stop supporting it or abandon it during your project's life time, but it seems to me that with the fast evolution of Java and GWT, using gchart in a new project may be a big mistake. Am I right?

    Read the article

  • Storing information inside YAML

    - by yuval
    I looked through the YAML for ruby documentation and couldn't find an answer. I have a list of several employees. Each has a name, phone, and email as such: Employees: Name | Phone | Email john 111 [email protected] joe 123 [email protected] joan 321 [email protected] How would I write the above information in YAML to end up with the following ruby output? employees = [ {:name => 'john', :phone => '111', :email => '[email protected]'}, {:name => 'joe', :phone => '123', :email => '[email protected]'}, {:name => 'joan', :phone => '321', :email => '[email protected]'} ] This is how I parse the YAML file: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yml") Thank you!

    Read the article

  • Where can I find a description of the old British Standard structured flow charts?

    - by Steve314
    Some professional organisation defined these in, IIRC, the early 80s as similar to the more well known flow charts, but "structured". Instead of having arbitrary "goto" arrows, they had the equivalent of loops etc. They were standardized, and I vaguely remember studying them briefly at O Level. Of course they were about as useful as the well-known chocolate teapot, but I'd still like to be able to find a reference guide for them if possible - for roughly the same reason I was looking for a reference for standard Basic a while back. Google tells me - well, nothing really. They may as well never have existed. Which is probably nearly (and perhaps completely) true - I certainly never heard of them anywhere else except when I was at school. There's a chance that they may even be my computer science teachers little joke.

    Read the article

  • Using sqlite from vala without dependence on glib

    - by celil
    I need to use the Sqlite vapi without any depedence on GLib. SQlite is non-gobject library, so it should be possible to do that. However, when I try to compile the following file with the --profile posix option, using Sqlite; void main() { stdout.printf("Hello, World!"); } I get am error messages: sqlite3.vapi:357.56-357.59: error: The symbol `GLib' could not be found public int bind_blob (int index, void* value, int n, GLib.DestroyNotify destroy_notify); ^^^^ sqlite3.vapi:362.68-362.71: error: The symbol `GLib' could not be found public int bind_text (int index, owned string value, int n = -1, GLib.DestroyNotify destroy_notify = GLib.g_free); ^^^^ sqlite3.vapi:411.42-411.45: error: The symbol `GLib' could not be found public void result_blob (uint8[] data, GLib.DestroyNotify? destroy_notify = GLib.g_free); ^^^^ sqlite3.vapi:420.59-420.62: error: The symbol `GLib' could not be found public void result_text (string value, int length = -1, GLib.DestroyNotify? destroy_notify = GLib.g_free); ^^^^ Compilation failed: 4 error(s), 0 warning(s) It seems that several of the functions defined in the sqlite vapi make references to the GLib.g_free and GLib.DestroyNotify symbols. Are there any posix alternatives to those?

    Read the article

  • WAN interface responds as LAN when request comes from LAN, is that correct?

    - by Eugenio Miró
    Hi Everyone! I have a problem with my router/modem. I've published an HTTP service from one of my internal computers and when I access the service from the internal lan using the external IP address the modem responds instead of redirecting the call to the forwarded port. I can access the service from outside however, but from the internal network the modem responds to my calls. I'm using a ZTE ZXDSL 831 Series modem with ZXDSL 831IIV7.5.1e_E09_BR1 firmware. Thanks in advance!

    Read the article

  • A Tab Exception Message

    - by Kooper
    06-14 00:21:30.398: ERROR/AndroidRuntime(332): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost' what it means? I've already given the id for tabhost.And I can see the id in R.java. Here is the .xml: TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" TabWidget android:id="@+id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" FrameLayout android:id="@+id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" LinearLayout TabHost

    Read the article

  • What's going on here? Repeating rows in random list of lists.

    - by Jesse Aldridge
    I expected to get a grid of unique random numbers. Instead each row is the same sequence of numbers. What's going on here? from pprint import pprint from random import random nrows, ncols = 5, 5 grid = [[0] * ncols] * nrows for r in range(nrows): for c in range(ncols): grid[r][c] = int(random() * 100) pprint(grid) Example output: [[64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36], [64, 82, 90, 69, 36]]

    Read the article

  • How to save many to many fields by using an auto complete text box

    - by iHeartDucks
    If I have two models like class Author(models.Model): name = models.CharField(max_length=100) title = models.CharField(max_length=3, choices=TITLE_CHOICES) birth_date = models.DateField(blank=True, null=True) def __unicode__(self): return self.name class Book(models.Model): name = models.CharField(max_length=100) authors = models.ManyToManyField(Author) I can render the book form using a model form like this class BookForm(ModelForm): class Meta: model = Book widgets = { 'authors' : TextInput() } The authors fields is now rendered as a text box and I want to use an auto complete (where I can enter multiple authors) text box to populate the field. I am having a hard time to understand how I can save the authors in view function? I am thinking of using a hidden field to record all the author id's but I am having a hard time figuring out how to save it on the postback.

    Read the article

  • How to overcome drawbacks and enjoy the job of a software tester?

    - by mgj
    Dear all, One notion that has been prevalent mostly as rumours for many aspiring programmers is that the testing phase of the SDLC(Software Development Life Cycle) is not that challenging and interesting as one's job as a tester after a period of time becomes monotonous because a person does the same thing repeatedly over and over again. Boredom is a very important issue a software tester has to deal with. With regard to this I have the following questions: How can one overcome this in their day to day activities of their job as a software tester? What are the possible new avenues a tester can explore on a general note in a s/w co. ? Could you also please highlight what challenge's a tester could also face in real life situations.Something that would make their job also interesting and fun-filled. Thanks..:)

    Read the article

  • Where/what is the specification for odata.service meta tag?

    - by Sam Saffron
    I would like to add some tags to our web app to enable auto-discovery of our odata feeds. So for example Nerd Dinner has the following tag: <link rel="odata.service" title="NerdDinner.com OData Service" href="/Services/OData.svc" /><link rel="odata.feed" title="NerdDinner.com OData Service - Dinners" href="/Services/OData.svc/Dinners" /> The trouble is that I have 4 different feeds and am unclear if I am allowed to add multiple link rel="odata.service" to the document. Where is the specification for this meta tag? (follow on question, are there any apps that take advantage of this tag that I can use to test out behavior)

    Read the article

  • "read lock failed" at cvs annotate

    - by idrosid
    I am trying to use cvs annotate. This is the what I run: cvs -d /mycvs/cvsroot/ annotate "projects/dg/SomeClass.java" However, I get the following error: cvs annotate: failed to create lock directory for `/mycvs/cvsroot/projects/dg^M' (/mycvs/cvsroot/projects/dg^M/#cvs.lock): No such file or directory cvs annotate: failed to obtain dir lock in repository `/mycvs/cvsroot/projects/dg^M' cvs [annotate aborted]: read lock failed - giving up What does this mean? How can I overcome this problem? Could it be related to the ^M character I see at the error message? When I use eclipse to do the annotation it works. I checked and the directory `/mycvs/cvsroot/projects/dg' exists. The error also occurs when I'm logged in as root, so probably it's not a permissions issue either. I am using CentOS

    Read the article

  • Linux: page faults and network filesystems

    - by Alex B
    If a Linux system runs out of physical memory, does it drop inactive executable code pages? I assume the answer is yes, since there is no reason to keep them in swap, so they are simply discarded and re-loaded if necessary (as far as I know, that's what FreeBSD does). If the above is true for Linux, my question is, how does it handle executables run from network filesystems (e.g. NFS)? Does it go and fetch executable pages over the network if there is a page fault?

    Read the article

  • MVC 2 Presentation &ndash; Final Demo

    - by Steve Michelotti
    In my presentation this past weekend at NoVa Code Camp, a member of the audience caught my final demo on video. In this demo, I combine multiple new features from MVC 2 to show how to build apps quickly with MVC 2. These features include: Template Helpers / Editor Templates Server-side/Client-side Validation Model Metadata for View Model HTML Encoding Syntax Dependency Injection Abstract Controllers Custom T4 Templates Custom MVC Visual Studio 2010 Code Snippets The projector screen is a little difficult to see during parts of the video – a video of the direct screencast can be seen here: MVC 2 in 2 Minutes.   Direct link to YouTube video here.

    Read the article

  • Silverlight Cream for June 13, 2010 -- #881

    - by Dave Campbell
    In this Issue: Mark Monster. Shoutouts: Adam Kinney has moved his blog, and his first post there is to announce New tutorials on .toolbox on PathListBox and Fluid UI Awesome graphics for the MEF'ed Video Player by Alan Beasley: New MEF Video Player Controls (1st Draft – Article to follow…) It must be a slow relaxing summer weekend, because I only found one post... and Mark submitted this one to me :) From SilverlightCream.com: How to improve the Windows Phone 7 Licensing development experience? Mark Monster is ahead of all of us if he's already programming his WP7 apps for 'trial versions'... but maybe it's time to start learning how to do that stuff :) Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • C++ "if then else" template substitution

    - by duli
    I would like to declare a template as follows: template <typename T> { if objects of class T have method foo(), then const int k=1 else if class has a static const int L then const int k=L else const int k=0; } How can I do this? In general, I would like a mechanism for setting static consts based on properties of T (or typedef defined inside T).

    Read the article

  • NSTableView get rid blank space separating columns

    - by Matt S.
    I have an NSTableView with 4 columns. I also have a custom background color for each row. The only problem is I have these ugly white spaces where the gridlines would go in both the horizontal and vertical axis. I have both unchecked in IB, but they still show up. How can I get rid of the vertical ones and change the color and size of the horizontal ones? Here's what I see:

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >