Search Results

Search found 21663 results on 867 pages for 'result sets'.

Page 9/867 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Change div backgroung color base on result from servlet using jquery

    - by Both FM
    Java Script Code Snippet $(document).ready(function() { $("#button").click(function(){ $cityName = document.getElementById("name").value; $.post("AddServlet", { name:$cityName }, function(xml) { $("#feedback").html( $("result", xml).text() ); }); }); }); In Servlet String name= request.getParameter("name"); if (name.equals("shahid")) { response.setContentType("text/xml"); out.println("<result>You are shahid</result>"); } else{ response.setContentType("text/xml"); out.println("<result>You are not shahid</result>"); } This is working fine! but I want to change the background color of div (feedback) accordingly , means if condition true, background color should be Green otherwise background color should be Red (else)

    Read the article

  • Get result from mysql orderd by IN clause

    - by SchlaWiener
    I have the following query SELECT * FROM invoice WHERE invoice_id IN (13, 15, 9, 27) My result is: invoice_id | invoice_number | ... ------------------------------------ 9 | 201006003 | 13 | 201006020 | 15 | 201006022 | 27 | 201006035 | which is the result set I want except that is ordered by the invoice_id (which is an autoincrement value). Now I want the result in the order I specified in my query (13, 15, ...). Is there a way to achive that? The background is that I have a DataTable bound to a DataGridView. The user can filter and sort the result but if he want's to print the result I don't use the DataTable for printing because it only contains the most important columns and instead I pull the whole records from the database and pass it to my printing control. I also tried to extend the existing DataTable with the missing results but that seems to slower than using the IN (...) query.

    Read the article

  • Android Read contents of a URL (content missing after in result)

    - by josnidhin
    I have the following code that reads the content of a url public static String DownloadText(String url){ StringBuffer result = new StringBuffer(); try{ URL jsonUrl = new URL(url); InputStreamReader isr = new InputStreamReader(jsonUrl.openStream()); BufferedReader in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null){ result.append(inputLine); } }catch(Exception ex){ result = new StringBuffer("TIMEOUT"); Log.e(Util.AppName, ex.toString()); } in.close(); isr.close(); return result.toString(); } The problem is I am missing content after 4065 characters in the result returned. Can someone help me solve this problem. Note: The url I am trying to read contains a json response so everything is in one line I think thats why I am having some content missing.

    Read the article

  • Write-error on swap-device, Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK

    - by Jan
    My root server at 1&1 was unresponsive on HTTP and SSH, so I logged into the serial console . It flooded my connection with endless error messages like quoted below. I initiated a reboot and now everything seems to work properly. After googling, I installed smartctl and ran a short self test, which told me the device was healthy. Is this likely a disk failure soon to happen or could it be just some program going wild? I assume, the swap device could also grow full when huge amounts of memory get consumed by a buggy program? How can I find out for sure? The sever was already unresponsive a week ago when I just restarted it without proper investigation. The server is running on CentOS. Write-error on swap-device (8:16:8351055) Write-error on swap-device (8:16:8351063) Write-error on swap-device (8:16:8351071) Write-error on swap-device (8:16:8351079) Write-error on swap-device (8:16:8351087) Write-error on swap-device (8:16:8351095) Write-error on swap-device (8:16:8351103) Write-error on swap-device (8:16:8351111) Write-error on swap-device (8:16:8351119) Write-error on swap-device (8:16:8351127) Write-error on swap-device (8:16:8351135) Write-error on swap-device (8:16:8351143) Write-error on swap-device (8:16:8351151) Write-error on swap-device (8:16:8351159) Write-error on swap-device (8:16:8351167) Write-error on swap-device (8:16:8351175) Write-error on swap-device (8:16:8351183) Write-error on swap-device (8:16:8351191) sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 1:0:0:0: [sdb] CDB: Write(10): 2a 00 00 9c 00 ef 00 00 08 00 end_request: I/O error, dev sdb, sector 10223855 Write-error on swap-device (8:16:10223863) sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 1:0:0:0: [sdb] CDB: Write(10): 2a 00 00 9c 0e 97 00 00 10 00 end_request: I/O error, dev sdb, sector 10227351 Write-error on swap-device (8:16:10227359) Write-error on swap-device (8:16:10227367) sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 1:0:0:0: [sdb] CDB: Write(10): 2a 00 00 9c b0 1f 00 00 10 00 end_request: I/O error, dev sdb, sector 10268703 Write-error on swap-device (8:16:10268711) Write-error on swap-device (8:16:10268719) sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 1:0:0:0: [sdb] CDB: Write(10): 2a 00 00 a0 84 7f 00 00 08 00 end_request: I/O error, dev sdb, sector 10519679 Write-error on swap-device (8:16:10519687) sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 1:0:0:0: [sdb] CDB: Write(10): 2a 00 00 a7 26 af 00 04 00 00 end_request: I/O error, dev sdb, sector 10954415 Write-error on swap-device (8:16:10954423) Write-error on swap-device (8:16:10954431) Write-error on swap-device (8:16:10954439) Write-error on swap-device (8:16:10954447) Write-error on swap-device (8:16:10954455) Write-error on swap-device (8:16:10954463) Write-error on swap-device (8:16:10954471) Write-error on swap-device (8:16:10954479) Write-error on swap-device (8:16:10954487) Write-error on swap-device (8:16:10954495) Write-error on swap-device (8:16:10954503) Write-error on swap-device (8:16:10954511) Write-error on swap-device (8:16:10954519) Write-error on swap-device (8:16:10954527) Write-error on swap-device (8:16:10954535) Write-error on swap-device (8:16:10954543) Write-error on swap-device (8:16:10954551) Write-error on swap-device (8:16:10954559) Write-error on swap-device (8:16:10954567) Write-error on swap-device (8:16:10954575) Write-error on swap-device (8:16:10954583) Write-error on swap-device (8:16:10954591) Write-error on swap-device (8:16:10954599) Write-error on swap-device (8:16:10954607) Write-error on swap-device (8:16:10954615) Write-error on swap-device (8:16:10954623) Write-error on swap-device (8:16:10954631) Write-error on swap-device (8:16:10954639) Write-error on swap-device (8:16:10954647) Write-error on swap-device (8:16:10954655) Write-error on swap-device (8:16:10954663) Write-error on swap-device (8:16:10954671) Write-error on swap-device (8:16:10954679) Write-error on swap-device (8:16:10954687) Write-error on swap-device (8:16:10954695) Write-error on swap-device (8:16:10954703) Write-error on swap-device (8:16:10954711) Write-error on swap-device (8:16:10954719) Write-error on swap-device (8:16:10954727) Write-error on swap-device (8:16:10954735) Write-error on swap-device (8:16:10954743) Write-error on swap-device (8:16:10954751) Write-error on swap-device (8:16:10954759) Write-error on swap-device (8:16:10954767) Write-error on swap-device (8:16:10954775) Write-error on swap-device (8:16:10954783) Write-error on swap-device (8:16:10954791) Write-error on swap-device (8:16:10954799) Write-error on swap-device (8:16:10954807) Write-error on swap-device (8:16:10954815) Write-error on swap-device (8:16:10954823) Write-error on swap-device (8:16:10954831) Write-error on swap-device (8:16:10954839) Write-error on swap-device (8:16:10954847) Write-error on swap-device (8:16:10954855) Write-error on swap-device (8:16:10954863) Write-error on swap-device (8:16:10954871) Write-error on swap-device (8:16:10954879) Write-error on swap-device (8:16:10954887) Write-error on swap-device (8:16:10954895) Write-error on swap-device (8:16:10954903) Write-error on swap-device (8:16:10954911) Write-error on swap-device (8:16:10954919) Write-error on swap-device (8:16:10954927) Write-error on swap-device (8:16:10954935) Write-error on swap-device (8:16:10954943) Write-error on swap-device (8:16:10954951) Write-error on swap-device (8:16:10954959) Write-error on swap-device (8:16:10954967) Write-error on swap-device (8:16:10954975) Write-error on swap-device (8:16:10954983) Write-error on swap-device (8:16:10954991) Write-error on swap-device (8:16:10954999) Write-error on swap-device (8:16:10955007) Write-error on swap-device (8:16:10955015) Write-error on swap-device (8:16:10955023) Write-error on swap-device (8:16:10955031) Write-error on swap-device (8:16:10955039) Write-error on swap-device (8:16:10955047) Write-error on swap-device (8:16:10955055) Write-error on swap-device (8:16:10955063) Write-error on swap-device (8:16:10955071) Write-error on swap-device (8:16:10955079) Write-error on swap-device (8:16:10955087) Write-error on swap-device (8:16:10955095) Write-error on swap-device (8:16:10955103) Write-error on swap-device (8:16:10955111) Write-error on swap-device (8:16:10955119) Write-error on swap-device (8:16:10955127) Write-error on swap-device (8:16:10955135) Write-error on swap-device (8:16:10955143) Write-error on swap-device (8:16:10955151) Write-error on swap-device (8:16:10955159) Write-error on swap-device (8:16:10955167) Write-error on swap-device (8:16:10955175) Write-error on swap-device (8:16:10955183)

    Read the article

  • How to sort linq result by most similarity/equality

    - by aNui
    I want to do a search for Music instruments which has its informations Name, Category and Origin as I asked in my post. But now I want to sort/group the result by similarity/equality to the keyword such as. If I have the list { Drum, Grand Piano, Guitar, Guitarrón, Harp, Piano} << sorted by name and if I queried "p" the result should be { Piano, Grand Piano, Harp } but it shows Harp first because of the source list's sequence and if I add {Grand Piano} to the list and query "piano" the result shoud be like { Piano, Grand Piano } or query "guitar" it should be { Guitar, Guitarrón } here's my code static IEnumerable<MInstrument> InstrumentsSearch(IEnumerable<MInstrument> InstrumentsList, string query, MInstrument.Category[] SelectedCategories, MInstrument.Origin[] SelectedOrigins) { var result = InstrumentsList .Where(item => SelectedCategories.Contains(item.category)) .Where(item => SelectedOrigins.Contains(item.origin)) .Where(item => { if ( (" " + item.Name.ToLower()).Contains(" " + query.ToLower()) || item.Name.IndexOf(query) != -1 ) { return true; } return false; } ) .Take(30); return result.ToList<MInstrument>(); } Or the result may be like my old self-invented algorithm that I called "by order of occurence", that is just OK to me. And the further things to do is I need to search the Name, Category or Origin such as. If i type "Italy" it should found Piano or something from Italy. Or if I type "string" it should found Guitar. Is there any way to do those things, please tell me. Thanks in advance.

    Read the article

  • LINQ : How to query how to sort result by most similarity/equality

    - by aNui
    I want to do a search for Music instruments which has its informations Name, Category and Origin as I asked in my post. But now I want to sort/group the result by similarity/equality to the keyword such as. If I have the list { Harp, Piano, Drum, Guitar, Guitarrón } and if I queried "p" the result should be { Piano, Harp } but it shows Harp first because of the list's sequence and if I add {Grand Piano} to the list and query "piano" the result shoud be like { Piano, Grand Piano } here's my code static IEnumerable<MInstrument> InstrumentsSearch(IEnumerable<MInstrument> InstrumentsList, string query, MInstrument.Category[] SelectedCategories, MInstrument.Origin[] SelectedOrigins) { var result = InstrumentsList .Where(item => SelectedCategories.Contains(item.category)) .Where(item => SelectedOrigins.Contains(item.origin)) .Where(item => { if ( (" " + item.Name.ToLower()).Contains(" " + query.ToLower()) || item.Name.IndexOf(query) != -1 ) { return true; } return false; } ) .Take(30); return result.ToList<MInstrument>(); } Or the result may be like my old self-invented algorithm that I called "by order of occurence", that is just OK to me. Is there any way to do that, please tell me. Thanks in advance.

    Read the article

  • ASP.NET and SQL server with huge data sets

    - by Jake Petroules
    I am developing a web application in ASP.NET and on one page I am using a ListView with paging. As a test I populated the table it draws from with 6 million rows. The table and a schema-bound view based off it have all the necessary indexes and executing the query in SQL Server Management Studio with SELECT TOP 5 returned in < 1 second as expected. But on the ASP.NET page, with the same query, it seems to be selecting all 6 million rows without any limit. Shouldn't the paging control limit the query to return only N rows rather than the entire data set? How can I use these ASP.NET controls to handle huge data sets with millions of records? Does SELECT [columns] FROM [tablename] quite literally mean that for the ListView, and it doesn't actually inject a TOP <n> and does all the pagination at the application level rather than the database level?

    Read the article

  • New instruction sets in CPU

    - by Tomek Tarczynski
    Every new generation of CPU introduces some sets of new instruction, ie.: MMX,3DNOW,SSE and so on. I've got few general questions about them: 1) If some program uses for example SSE instruction can it be run on CPU that doesn't support SSE? 2) If yes , does it mean that those instuction will be changed to some greater number of simpler instuctions? 3) If not, does it mean that the real perfomance impact of such new instructions will be after few years when most CPU will support such technology (so there won't be any incompatibilities)? 4) When I compile a C++ program with optimizations does it mean that it'll use some of this new instructions? (I know that it depends on many factors, especcialy on the code, but I want some general answer) Or are they reserved mostly for programs written in asm?

    Read the article

  • setting codeigniter mysql datetime column to time() always sets it to 0

    - by Jake
    Hi guys. I'm using Codeigniter for a small project, and my model works correctly except for the dates. I have a column defined: created_at datetime not null and my model code includes in its array passed into db-insert: 'created_at' = time() This produces a datetime value of 0000-00-00 00:00:00. When I change it to: 'created_at' = "from_unixtime(" . time() . ")" it still produces the 0 datetime value. What am I doing wrong? How can I set this field to the given unix time? Also, I know mysql sets TIMESTAMP columns automatically for you - I'm not interested in that solution here. So far I can't find a complete example of this on the web.

    Read the article

  • Trouble understanding Java map Entry sets

    - by Jake Sellers
    I'm looking at a java hangman game here: https://github.com/leleah/EvilHangman/blob/master/EvilHangman.java The code in particular is this: Iterator<Entry<List<Integer>, Set<String>>> k = partitions.entrySet().iterator(); while (k.hasNext()) { Entry<?, ?> pair = (Entry<?, ?>)k.next(); int sizeOfSet = ((Set<String>)pair.getValue()).size(); if (sizeOfSet > biggestPartitionSize) { biggestPartitionSize = sizeOfSet; } } Now my question. My google foo is weak I guess, I cannot find much on Entry sets other than the java doc itself. Is is just a temporary copy of the map? And I cannot find any info at all on the syntax: Entry<?, ?> Can anyone explain or point me toward an explanation of what is going on with those question marks? Thanks in advanced.

    Read the article

  • SQL Find duplicate sets

    - by Aheho
    given this Schema: table tblSET SetID int PK SetName nvarchar(100) Table tblSetItem SetID int PK ItemID int PK tblSetItem.SetID is a FK into the tblSet Table. Some data: tblSet SetID SetName 1 Red 2 Blue 3 Maroon 4 Yellow 5 Sky tblSetItem SetID ItemID 1 100 1 101 2 100 2 108 2 109 3 100 3 101 4 101 4 108 4 109 4 110 5 100 5 108 5 109 I'd like a way to identify which sets contain the same items. In the example above Red and Maroon contain the same items (100,101) and Blue and Sky contain the same values (100,108,109) Is there a sql query which would provide this answer?

    Read the article

  • Get Flickr Sets

    - by PaulAdamDavis
    Hi everyone. Usual stuff, Googled forever, looked on here, no help. Yet. What I want is to list the sets of photos I have on Flickr. Nice & simple, it would seem. I want the 'title image' (the one used as the thumb for it on Flickr its self), the title and URL. Can't be that hard, can it? The language of choice is PHP (5.1.6), or JS (jQuery if possible). Both are good.

    Read the article

  • Get the checked value of 2 sets of radiobuttons using jQuery

    - by Hans Wassink
    Im having a weird issue here. Its probably just something stupid but I dont see it. I have two sets of radiobuttons, group1 and group2, and I want to get their values in a function. I have 1 clickevent on all radiobuttons in that div and when I click them I want to display the check-values of both groups. But he only reads the value of the first group. and so it always displays 1-1 2-2 3-3 4-4 instead of possibly 1-2 3-1 etc.... There is a jsfiddle here what am I missing??

    Read the article

  • New replicaset resident memory is larger than the existing sets

    - by eded
    From the mongodb tutorial of how to resync a set, I wipe all the files in /data/db and restart the mongod process to resync the data. Everything looks ok, I get the same number of documents as the existing two sets(primary and one secondary). However, when I check the memory on MMS. it shows me my new resynced set/mongod process has a different memory status value than the other two. For existing twos using db.serverStatus.mem shows like the following: "mem" : { "bits" : 64, "resident" : 239, "virtual" : 66348, "supported" : true, "mapped" : 32865, "mappedWithJournal" : 65730 } however, the new resynced set shows like: "mem" : { "bits" : 64, "resident" : 1239, "virtual" : 52447, "supported" : true, "mapped" : 25700, "mappedWithJournal" : 51400 } the resynced resident memory is 6-10 times more than the existing ones. I wouder if it is normal because all data comes in suddenly during the resyncing?? and even virtual and mapped value are different too. Can anyone explain?? thanks

    Read the article

  • Creating problem-sets with answers in Latex

    - by ARV
    Hello everyone. I want to typeset Mathematical problem-sets in Latex. My requirements are as follows: When I type them in, I want the questions and the answers to be next to each other in the source-code so that fixing errors, etc. can be done easily. However, when the document is typeset, I want the answers to appear in a separate "Answers" section just the way they do in textbooks. Does anyone know of a way to do this? Many thanks in advance!

    Read the article

  • Loop through different sets of unique permutations

    - by user558610
    Hi I'm having a hard time getting started to layout code for this problem. I have a fixed amount of random numbers, in this case 8 numbers. R[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; That are going to be placed in 3 sets of numbers, with the only constraint that each set contain minimum one value, and each value can only be used once. For example: R1[] = { 1, 4 } R2[] = { 2, 8, 5, 6 } R3[] = { 7, 4 } I need to loop through all possible combinations of a set R1, R2, R3. Order is not important, so if the above example happened, I don't need R1[] = { 4, 1 } R2[] = { 2, 8, 5, 6 } R3[] = { 7, 4 } NOR R1[] = { 2, 8, 5, 6 } R2[] = { 7, 4 } R3[] = { 1, 4 } What is a good method?

    Read the article

  • Working with sets of rows in (My)SQL and comparing values

    - by Pep.
    Hello, I am trying to figure out the SQL for doing some relatively simple operations on sets of records in a table but I am stuck. Consider a table with multiple rows per item, all identified by a common key. For example: serial model color XX1 A blue XX2 A blue XX3 A green XX5 B red XX6 B blue XX1 B blue What I would for example want to do is: Assuming that all model A rows must have the same color, find the rows which dont. (for example, XX3 is green). Assuming that a given serial number can only point to a single type of model, find out the rows which that does not occur (for example XX1 points both to A and B) These are all simple logically things to do. To abstract it, I want to know how to group things by using a single key (or combination of keys) and then compare the values of those records. Should I use a join on the same table? should i use some sort of array or similar? thanks for your help

    Read the article

  • Get all sets of list in prolog

    - by garm0nboz1a
    How can I generate all the possible sets of the elements of a list with current length? get_set(X, [1,2,3]). X = [1,1,1], X = [1,1,2], X = [1,1,3], X = [1,2,1], X = [1,2,2], X = [1,2,3], X = [1,3,1], X = [1,3,2], X = [1,3,3], ..... X = [3,3,2], X = [3,3,3]. UPD: there is good answer given by Sharky. But maybe it's not the best. Here is another: get_set(X,L) :- get_set(X,L,L). get_set([],_). get_set([X|Xs],[_|T],L) :- member(X,L), get_set(Xs,T,L).

    Read the article

  • Flex 4: Getter getting before setter sets

    - by Steve
    I've created an AS class to use as a data model, shown here: package { import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.http.HTTPService; public class Model { private var xmlService:HTTPService; private var _xml:XML; private var xmlChanged:Boolean = false; public function Model() { } public function loadXML(url:String):void { xmlService = new HTTPService(); if (!url) xmlService.url = "DATAPOINTS.xml"; else xmlService.url = url; xmlService.resultFormat = "e4x"; xmlService.addEventListener(ResultEvent.RESULT, setXML); xmlService.addEventListener(FaultEvent.FAULT, faultXML); xmlService.send(); } private function setXML(event:ResultEvent):void { xmlChanged = true; this._xml = event.result as XML; } private function faultXML(event:FaultEvent):void { Alert.show("RAF data could not be loaded."); } public function get xml():XML { return _xml; } } } And in my main application, I'm initiating the app and calling the loadXML function to get the XML: <fx:Script> <![CDATA[ import mx.containers.Form; import mx.containers.FormItem; import mx.containers.VBox; import mx.controls.Alert; import mx.controls.Button; import mx.controls.Label; import mx.controls.Text; import mx.controls.TextInput; import spark.components.NavigatorContent; private function init():void { var model:Model = new Model(); model.loadXML(null); var xml:XML = model.xml; } ]]> </fx:Script> The trouble I'm having is that the getter function is running before loadXML has finished, so the XML varible in my main app comes up undefined in stack traces. How do I put a condition in here somewhere that tells the getter to wait until the loadXML() function has finished before running?

    Read the article

  • Having two sets of input combined on hadoop

    - by aeolist
    I have a rather simple hadoop question which i'll try to present with an example say you have a list of strings and a large file and you want each mapper to process a piece of the file and one of the strings in a grep like program. how are you supposed to do that? I am under the impression that the number of mappers is a result of the inputsplits produced. I could run subsequent jobs, one for each string, but it seems kinda... messy?

    Read the article

  • Exchange Web Services and Property Sets

    - by Sam
    I need to retrieve calendar information by invoking the Exchange Web Service in BPOS. I'm using a CalendarView with a PropertySet to retrieve as little data as possible. However, property sets seems to be limited. I need the EmailAddress of the one who made the calendar appointment so I thought I could use the AppointmentSchema.Organizer in the PropertySet. When fetching a whole Appointment I can get the e-mail through appt.Organizer.EmailAddress. But with the code below the Organizer.EmailAddress is always null. I've enabled the trace and checked it and only the Organizer.Name property is sent, nothing else. Does anyone have a solution on how to get the EmailAddress when using a PropertySet? CalendarView view = new CalendarView(dtFrom, dtTo); view.PropertySet = new PropertySet(ItemSchema.Subject); view.PropertySet.Add(ItemSchema.Id); view.PropertySet.Add(AppointmentSchema.Start); view.PropertySet.Add(AppointmentSchema.End); view.PropertySet.Add(AppointmentSchema.Organizer); // This should contain EmailAddress but it doesn't Mailbox mailbox = new Mailbox("[email protected]"); FolderId id = new FolderId(WellKnownFolderName.Calendar, mailbox); CalendarFolder folder = CalendarFolder.Bind(service, id); FindItemsResults findResults = folder.FindAppointments(view);

    Read the article

  • jQuery tabs - multiple sets on on page

    - by Jonny Wood
    This is kind of a follow on from a previous question I posted but I've not been able to get it to work.. I'm trying to use multiple sets of tabs (jQuery) on one page. This is the code I had for one set of tabs which works great: $('div.tabs div.tab').hide(); $('div.tabs div:first').show(); $('div.tabs ul.htabs li:first a').addClass('current'); $('div.tabs ul.htabs li a').click(function(){ $('div.tabs ul.htabs li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $('div.tabs div.tab').hide(); $(currentTab).show(); return false; }); To use more than one set on the page I assigned #id's to each tab-set and tried to impliment this with: $.each(['#tabs-1', '#tabs-2', '#tabs-3' ], function(id) { $(id + 'div.tab').hide(); $(id + 'div:first').show(); $(id + 'ul.htabs li:first a').addClass('current'); $(id + 'ul.htabs li a').click(function(){ $(id + 'ul.htabs li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $(id + 'div.tab').hide(); $(currentTab).show(); return false; }); }); Obviously I'm doing something wrong here but as a jQuery newcomer I'm stumped!

    Read the article

  • Turning on multiple result sets in an ODBC connection to SQL Server

    - by David Griffiths
    I have an application that originally needed to connect to Sybase (via ODBC), but I've needed to add the ability to connect to SQL Server as well. As ODBC should be able to handle both, I thought I was in a good position. Unfort, SQL Server will not let me, by default, nest ODBC commands and ODBCDataReaders - it complains the connection is busy. I know that I had to specify that multiple active result sets (MARS) were allowed in similar circumstances when connecting to SQL Server via a native driver, so I thought it wouldn't be an issue. The DSN wizard has no entr y when creating a SystemDSN. Some people have provided registry hacks to get around this, but this did not work (add a MARS_Connection with a value of Yes to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\system-dsn-name). Another suggestion was to create a file-dsn, and add "MARS_Connection=YES" to that. Didn't work. Finally, a DSN-less connection string. I've tried this one (using MultipleActiveResultSets - same variable as a Sql Server connection would use), "Driver={SQL Native Client};Server=xxx.xxx.xxx.xxx;Database=someDB;Uid=u;Pwd=p;MultipleActiveResultSets=True;" and this one: "Driver={SQL Native Client};Server=192.168.75.33\\ARIA;Database=Aria;Uid=sa;Pwd=service;MARS_Connection=YES;" I have checked the various connection-string sites - they all suggest what I've already tried.

    Read the article

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