Daily Archives

Articles indexed Thursday May 6 2010

Page 26/118 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Add data to a list box from a dropdown

    - by bachchan
    I have a listbox (listBox) and a dropdown list(dropDown). I want to be able to select an item from the dropDown and add them to the listBox. I have looked everywhere for this but all I ever see is adding data from a datasource instead of a dropdown. I want this to be dynamic so the listBox is populated based on the a user selected in the dropDown

    Read the article

  • CoffeeScript Test Framework

    - by Liam McLennan
    Tonight the Brisbane Alt.NET group is doing a coding dojo. I am hoping to talk someone into pairing with me to solve the kata in CoffeeScript. CoffeeScript is an awesome language, half javascript, half ruby, that compiles to javascript. To assist with tonight’s dojo I wrote the following micro test framework for CoffeeScript: <html> <body> <div> <h2>Test Results:</h2> <p class='results' /> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/coffeescript"> # super simple test framework test: { write: (s) -> $('.results').append(s + '<br/>') assert: (b, message...) -> test.write(if b then "pass" else "fail: " + message) tests: [] exec: () -> for t in test.tests test.write("<br/><b>$t.name</b>") t.func() } # add some tests test.tests.push { name: "First Test" func: () -> test.assert(true) } test.tests.push { name: "Another Test" func: () -> test.assert(false, "You loose") } # run them test.exec(test.tests) </script> <script type="text/javascript" src="coffee-script.js"></script> </body> </html> It’s not the prettiest, but as far as I know it is the only CoffeeScript test framework in existence. Of course, I could just use one of the javascript test frameworks but that would be no fun. To get this example to run you need the coffeescript compiler in the same directory as the page.

    Read the article

  • IIS6 intranet site using integrated authentication fails to load when accessed externally

    - by maik
    I've developed a couple of internal sites for my organization that use integrated authentication. Ultimately we want these sites to be accessible externally to users with domain-joined computers. The sites work as expected on domain computers while on the internal network. The problem comes when I take my laptop home and try to access those sites. IIS only has integrated authentication enabled for the two sites. When I browse to the site using IE8 I get a username/password prompt asking for domain credentials. I can put those in and it will work, but the goal is to use the cached token for integrated authentication. Next I reasoned that IE wouldn't response to an integrated auth request (is NTLM the right term for this?) unless the site was trusted. I tried adding the site to Trusted Sites but I get the same behavior as the before. I then added the site to Local Intranet sites and that is where things get weird. I get a generic error page from IE, no error code or anything. Just for funsies I loaded up Firefox (which I had previously set up to use integrated authentication) and I added this new site to network.automatic-ntlm-auth.trusted-uris. Much to my surprise I was able to load the pages up with no problem at all and saw exactly what I was expecting (including verification that the integrated authentication worked). My mind is a bit boggled at the moment as I'm not really sure where to go from here. I was hoping some of you may be able to provide some insight.

    Read the article

  • javascript undefined compare

    - by nahum
    Ok here is my question in javascript you can declare a variable and be undefined you can apply variable == undefined, I know that but how you can compare a value that you dont know yet if it's in the cpu memory. I have a class which is create it when the user click on a button. before this the class is undefined there no exist in any where so how can I compare it? without using try{}catch(e){} is there a way????

    Read the article

  • sql server 2005 - return single row when 2 records in right table

    - by Peanut
    Hi, I have two related sql server tables ... TableA and TableB. ***TableA - Columns*** TableA_ID INT VALUE VARCHAR(100) ***TableB - Columns*** TableB_ID INT TableA_ID INT VALUE VARCHAR(100) For every single record in TableA there are always 2 records in TableB. Therefore TableA has a one-to-many relationship with TableB. How could I write a single sql statement to join these tables and return a single row for each row in TableA that includes: a column for the VALUE column in the first related row in table B a column for the VALUE column in the second related row in table B? Thanks.

    Read the article

  • Regarding jdbc Realm

    - by Priyanka
    I want to do login using form based authentication. i have been followed all steps for creating jdbc realm but run time error is coming. error is like-SEVERE: SEC1111: Cannot load group for JDBC realm user [pqr]. WARNING: Web login failed: Login failed: javax.security.auth.login.LoginException: Security Exception

    Read the article

  • Winforms Checkbox : CheckState property Indeterminate renders differently

    - by joedotnot
    In C# environment, setting a checkbox's CheckState property to Indeterminate displays a "green square" inside the checkbox. In VB environment, this displays as a "grayed out check" (which is less intuitive, even for "dummy" users). How do i make Indeterminate state look like a "green square" in VB.NET ? Btw, i am using VS2008, Winforms 2.0. (Btw2: I tried to create two tags CheckState Indeterminate, which is more appropriate to my question, but disallowed by StackOverflow due to points!)

    Read the article

  • php array problem ..need expert

    - by user295189
    I have tried this in another post but trying my luck again. My current array that I am making produce a different result than I am wanting. I want to have this kind of out put Row: 0: Column: 1: ID 1 Row: 1: Column: 1: ID 1 Row: 0: Column: 2: ID 2 Row: 1: Column: 2: ID 2 Row: 2: Column: 2: ID 2 Row: 3: Column: 2: ID 2 Row: 0: Column: 3: ID 3 Row: 1: Column: 3: ID 3 As you can see the Rows and columns change based on the ID. So if the ID is same it just go to next row in the same column. However if id is changed it goes to next column and rows start. Currently I my code looks like this for($i=0;$i<count($pv->rawData); $i++) { $relative=0; $relativeTypeID = -1; if ($pv->rawData[$i]->relativeTypeID != $relativeTypeID) { $relativeTypeID = $pv->rawData[$i]->relativeTypeID; $iTypeCount++; } if(!empty($pv->rawData[$i]->description)) { $pv->results[$i][$iTypeCount][0] = $pv->rawData[$i]->description; echo "Row: ".$i.": Column: ".$iTypeCount.": ID".$relativeTypeID." <br>"; } } It gives me the following output Row: 0: Column: 1: ID1 Row: 1: Column: 2: ID1 Row: 2: Column: 3: ID2 Row: 3: Column: 4: ID2 Row: 4: Column: 5: ID2 Row: 5: Column: 6: ID2 Row: 6: Column: 7: ID2 Row: 7: Column: 8: ID2 Row: 8: Column: 9: ID2 Row: 9: Column: 10: ID2 Row: 10: Column: 11: ID2 Row: 11: Column: 12: ID2 Row: 12: Column: 13: ID2 …. …. As you can see the Row and Columns are changing but not with ID number. I appreciate your help Thanks

    Read the article

  • WPF ComboBox: background color when disabled

    - by Martin
    I currently use this style for my ComboBox in WPF: <Style TargetType="ComboBox"> <Setter Property="Foreground" Value="White"/> <Setter Property="Background" Value="#303030"/> <Setter Property="BorderBrush" Value="#000000"/> </Style> How can I change it to specify the background color when the ComboBox is disabled? (this is a follow-up to this question: http://stackoverflow.com/questions/2385205/wpf-combobox-colors)

    Read the article

  • assign logon scripts to local users

    - by user311130
    Hello, I wrote a c# code that creates new local user DirectoryEntry localMachine = new DirectoryEntry("WinNT://" + Environment.MachineName + ",computer"); DirectoryEntry group = localMachine.Children.Find("administrators", "group"); DirectoryEntry user = localMachine.Children.Find(accountName, "user"); Console.WriteLine(user.Properties.ToString()); I tried to set the logon script for that user by doing: localMachine.Properties["scriptPath"].Insert(0, "logonScript.vbs"); localMachine.CommitChanges(); same with group or user instances.but the property doesn't exist in any of theses instances (localMachine, group or user). I know that because I did: System.Collections.ICollection col = localMachine.Properties.PropertyNames; foreach (Object ob in col) { Console.WriteLine(ob.ToString()); } Any idea of how to do that in other way?Cheers,

    Read the article

  • Component properties working at designtime but not runtime

    - by delphi-rulez-2010
    I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors property, and a Edit mode property Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property. When the components EditMode property is set to true, you can move the panels around at runtime. Question: Why does the colors only work at designtime and not runtime. thanks

    Read the article

  • C#: how to construct strings

    - by Craig Johnston
    Which of these will achieve the correct result: (1) int X = 23; string str = "HELLO" + X.ToString() + "WORLD"; (2) int X = 23; string str = "HELLO" + X + "WORLD"; (3) int X = 23; string str = "HELLO" + (string)X + "WORLD"; EDIT: The 'correct' result is to output: HELLO23WORLD

    Read the article

  • c# run CL exe or batch cpture output LIVE to textbox ?

    - by Data-Base
    hello, is it possible to run any Command Line based program or batch file and capturer (re-direct) the out put to a text box LIVE the CL takes time and it produce text! something like tracert.exe (it takes time and produce good amount of text). actually I will work with tracert.exe and I like to capture the output live and show it in a text-box while it is running cheers

    Read the article

  • How can I conditionally color files and folders in the OS X Finder?

    - by Girish Kolari
    I want to color badge files and folders based on the some condition in finder, what is the approach to achieve this in Mac OS X 10.6 I have checked this question: This only talk about the context menu in finder http://stackoverflow.com/questions/1651075/finder-plugin-in-snow-leopard I have even checked: http://scplugin.tigris.org/ even they don't do color badging in 10.6 which is pending task. Thanks in advance for your all help

    Read the article

  • Single nginx configuration for multiple sub domains

    - by Peter Smit
    I have the following directory structure for my websites: /var/www/sitename/subdomain/(public|log) e.g /var/www/stackoverflow.com/careers/public/index.html Can I make a single generic nginx configuration to do this? So that every domain is mapped to the right directory? I would not like to edit my nginx configuration for every website I add. The root domain can always be mapped to the www subdomain.

    Read the article

  • Performselector not call in NSThread

    - by abdulsamad
    Hi all, I have a problem that i want to call a function when one of my functions that is running into a seperate thread comes to an end. its like that [NSThread detachNewThreadSelector:@selector(fetchFeaturedFreeApps) toTarget:self withObject:nil]; here is my fetchFeaturedFreeApps function -(void)fetchFeaturedFreeApps { ////all my code [self performSelector:@selector(closeView) withObject:nil afterDelay:4.0]; } My problem is that the close view methods doesnt run after the 4 seconds. Hoew if i call the fetchFeaturedFreeApps method with perform selector then my closeview metod is called properly. Your valuable help is highly appreciated.

    Read the article

  • Changing The Underlying Background Color Of A Swing Window

    - by dimo414
    As discussed here, when resizing a Swing application in Vista (and Windows 7, which is what I'm using) you get a black background in the right/bottom corner while Swing's repaint catches up to the changes. Playing with other applications (Windows Explorer (Native), Firefox (C++?), and Eclipse (Java)) I notice that they all have this same problem - contrary to what the folks in the link above say - but they minimize the problem by having a grey fill color, which is far less visually jarring than the black that appears in Swing. I'm wondering if there's some way to change this so that Swing behaves like these other applications? I tried setting the background color of the JFrame, but to no avail.

    Read the article

  • mean of robots.txt at yahoo.com

    - by hussain
    i want to know the mean of yahoo robots.txt that website( http://www.yahoo.com/robots.txt ) have the following lines User-agent: * Disallow: /p/ Disallow: /r/ Disallow: /*? i dont know the mean of last line(Disallow: /*?) please let me know... thanks and advance

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >