Search Results

Search found 37697 results on 1508 pages for 'append string'.

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

  • An analog of String.Join(string, string[]) for List<T> or other generic enumerable

    - by abatishchev
    class String contains very useful method - String.Join(string, string[]). It creates a string from an array, separating each element of array with a symbol given. But general - it doesn't add a separator after the last element! I uses it for ASP.NET coding for separating with "<br />" or Environment.NewLine. So I want to add an empty row after each row in asp:Table. What method of IEnumerable<TableRow> can I use for the same functionality?

    Read the article

  • How to convert string with double high/wide characters to normal string [VC++6]

    - by Shaitan00
    My application typically recieves a string in the following format: " Item $5.69 " Some contants I always expect: - the LENGHT always 20 characters - the start index of the text always [5] - and most importantly the index of the DECIMAL for the price always [14] In order to identify this string correctly I validate all the expected contants listed above .... Some of my clients have now started sending the string with Doube-High / Double-Wide values (pair of characters which represent a single readable character) similar to the following: " Item $x80x90.x81x91x82x92 " For testing I simply scan the string character-by-character, compare char[i] and char[i+1] and replace these pairs with their corresponding single character when a match is found (works fine) as follows: [Code] for (int i=0; i < sData.length(); i++) { char ch = sData[i] & 0xFF; char ch2 = sData[i+1] & 0xFF; if (ch == '\x80' && ch2 == '\x90') zData.replace("\x80\x90", "0"); else if (ch == '\x81' && ch2 == '\x91') zData.replace("\x81\x91", "1"); else if (ch == '\x82' && ch2 == '\x92') zData.replace("\x82\x92", "2"); ... ... ... } [/Code] But the result is something like this: " Item $5.69 " Notice how this no longer matches my expectation: the lenght is now 17 (instead of 20) due to the 3 conversions and the decimal is now at index 13 (instead of 14) due to the conversion of the "5" before the decimal point. Ideally I would like to convert the string to a normal readable format keeping the constants (length, index of text, index of decimal) at the same place (so the rest of my application is re-usable) ... or any other suggestion (I'm pretty much stuck with this)... Is there a STANDARD way of dealing with these type of characters? Any help would be greatly appreciated, I've been stuck on this for a while now ... Thanks,

    Read the article

  • Padding a string in Postgresql with rpad without truncating it

    - by dmoebius
    Using Postgresql 8.4, how can I right-pad a string with blanks without truncating it when it's too long? The problem is that rpad truncates the string when it is actually longer than number of characters to pad. Example: SELECT rpad('foo', 5); ==> 'foo ' -- fine SELECT rpad('foo', 2); ==> 'fo' -- not good, I want 'foo' instead. The shortest solution I found doesn't involve rpad at all: SELECT 'foo' || repeat(' ', 5-length('foo')); ==> 'foo ' -- fine SELECT 'foo' || repeat(' ', 2-length('foo')); ==> 'foo' -- fine, too but this looks ugly IMHO. Note that I don't actually select the string 'foo' of course, instead I select from a column: SELECT colname || repeat(' ', 30-length(colname)) FROM mytable WHERE ... Is there a more elegant solution?

    Read the article

  • jquery append choking on quotes in ei

    - by bert
    This jQuery statement works in recent versions of Firefox and Chrome but throws an error in IE 8. left_bar_string = "<tr><td><a href='#' onclick= "return newPopUpWindow('somelink','window', '1000','800','100','0','yes')">Directions</a></td></tr>"; $("#side_bar").append(left_bar_string); I think problem is with double quotes. Any comments/solutions?

    Read the article

  • cassandra thrift: append data

    - by urssujith
    If I need to append data (not insert) into a particular super column, what should I do? For eg: Consider a existing record described below Kespace : test columFamily: testColum SuperColumn : testSuper column_name : email value : [email protected] Here if I want to add my phone number to the super column "testSuper". What should I do?

    Read the article

  • jquery find h2 tags and append into div

    - by SoulieBaby
    Hi all, I'm trying to write a bit of jquery which finds all h2 tags inside a div (.content), then appends each one into another div (.intro). So far I have this: var h2 = $(".content").find("h2"); $(h2).each(function() { $(this).append(".intro"); }); But it's not working.. if someone could help me out, that'd be great :)

    Read the article

  • Can you append a NSMutableArray to a file?

    - by Emil
    Hi. I am trying to write some data from an NSMutableArray to a plist, while keep the old plists content. The function writeToFile:atomically: overwrites the old contents with the new, I want to append the objects in the new array to the plist. How can this be done? Thank you.

    Read the article

  • IE not showing jquery append() images

    - by Johannes Ruuska
    Ok, so i took John Raasch's slideshow script and modyfied it too dynamicly fetch images from folders on the server through ajax. The slideshow work like a charm in FF and Chrome but IE is not showing the images. And since IE's javascript debugging possibilities is close to none I cant figure out what is crashing. Javascript (indenting got messed up when pasting here but you get the code anyway): function slideSwitch() { var $active = $('#box_bildspel IMG.active'); if ( $active.length == 0 ) $active = $('#box_bildspel IMG:last'); var $next = $active.next().length ? $active.next() : $('#box_bildspel IMG:first'); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); }); } $(document).ready(function(){ $.get('includes/bildspel.php?page='+page, function(r){ var file = r.split('!'); var path = 'pic/bildspel/'+page+'/'; var data = ''; if(file != null && file != ''){ $.each(file, function(key, value){ if(key == 0) { $('#box_bildspel').append('<img src="'+path+value+'" class="active"></img>'); //console.log(path+value); } else { $('#box_bildspel').append('<img src="'+path+value+'"></img>'); //console.log(path+value); } }); } if(file.length > 1){ $(function() { setInterval( "slideSwitch()", 4000 ); }); } }); }); PHP: <?php function getimgs($page) { $path = '../pic/bildspel/'.$page; $files = ''; if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ($file !== '.' && $file !== '..') { $files .= $file.'!'; } } closedir($handle); echo substr_replace($files ,"",-1);; } } getimgs($_GET['page']); ?> Tested in IE 7 & 8 Any ideas? I have a deadline on this site for tomorrow (april 23) would appreciate VERY much if someone could figure this on out for me, thanks in advance!

    Read the article

  • Trim a string in C

    - by Orion Edwards
    Briefly: I'm after the equivalent of .NET's String.Trim in C using the win32 and standard C api (compiling with MSVC2008 so I have access to all the C++ stuff if needed, but I am just trying to trim a char*). Given that there is strchr, strtok, and all manner of other string functions, surely there should be a trim function, or one that can be repurposed... Thanks

    Read the article

  • Regarding Java String dollar to cents conversion

    - by arav
    I have a java string which has an dollar value and cents value after decimal points and starting with a + or - sign. I want to convert into cents and store it in a integer (it can have + or -). Also i need to check if the cents part (after decimal point) not more than 2 digits and throw an error message if exists example : String dollval= "12.23" ,"12","-0.09", "-99","-99.0", "-99.23","0.00" int dollint = 1223,12,-9,-99,-00,-9923,0

    Read the article

  • Sql Server string to date conversion

    - by JosephStyons
    I want to convert a string like this: '10/15/2008 10:06:32 PM' into the equivalent DATETIME value in Sql Server. In Oracle, I would say this: TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM') This question implies that I must parse the string into one of the standard formats, and then convert using one of those codes. That seems ludicrous for such a mundane operation. Is there an easier way?

    Read the article

  • Finding out why Dell Controler is Degraded

    - by Kyle Brandt
    I installed open manage on a couple of my PE 2950s for snmp monitoring of the RAID. All the checks seem to come back okay except for controllerState: [root@aMachine ~]# snmpwalk -v 2c -c bestNotToPostPasswords myMachine -m +StorageManagement-MIB controllerstate StorageManagement-MIB::controllerState.1 = INTEGER: degraded(6) Other checks seems to indicate the battery, LD, and physicals disks are all good unless I missing something. Can anyone tell if I am missing something or neglecting something import in my RAID monitoring/understanding? I get degraded for both these servers I have set up. A walk of the entire storage management tree for on of them: StorageManagement-MIB::softwareVersion.0 = STRING: "3.2.0" StorageManagement-MIB::globalStatus.0 = INTEGER: warning(2) StorageManagement-MIB::softwareManufacturer.0 = STRING: "Dell Inc." StorageManagement-MIB::softwareProduct.0 = STRING: "Server Administrator (Storage Management)" StorageManagement-MIB::softwareDescription.0 = STRING: "Configuration and monitoring of disk storage devices." StorageManagement-MIB::displayName.0 = STRING: "Server Administrator (Storage Management)" StorageManagement-MIB::description.0 = STRING: "Configuration and monitoring of disk storage devices." StorageManagement-MIB::agentVendor.0 = STRING: "Dell Inc." StorageManagement-MIB::agentTimeStamp.0 = INTEGER: 1273842310 StorageManagement-MIB::agentGetTimeout.0 = INTEGER: 5 StorageManagement-MIB::agentModifiers.0 = INTEGER: 0 StorageManagement-MIB::agentRefreshRate.0 = INTEGER: 300 StorageManagement-MIB::agentMibVersion.0 = STRING: "3.2" StorageManagement-MIB::agentManagementSoftwareURLName.0 = "" StorageManagement-MIB::agentGlobalSystemStatus.0 = INTEGER: nonCritical(4) StorageManagement-MIB::agentLastGlobalSystemStatus.0 = INTEGER: ok(3) StorageManagement-MIB::agentSmartThermalShutdown.0 = INTEGER: notApplicable(3) StorageManagement-MIB::controllerNumber.1 = INTEGER: 1 StorageManagement-MIB::controllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::controllerVendor.1 = STRING: "DELL" StorageManagement-MIB::controllerType.1 = INTEGER: sas(6) StorageManagement-MIB::controllerState.1 = INTEGER: degraded(6) StorageManagement-MIB::controllerRebuildRateInPercent.1 = INTEGER: 30 StorageManagement-MIB::controllerFWVersion.1 = STRING: "5.0.2-0003" StorageManagement-MIB::controllerCacheSizeInMB.1 = INTEGER: 256 StorageManagement-MIB::controllerCacheSizeInBytes.1 = INTEGER: 0 StorageManagement-MIB::controllerPhysicalDeviceCount.1 = INTEGER: 5 StorageManagement-MIB::controllerLogicalDeviceCount.1 = INTEGER: 1 StorageManagement-MIB::controllerRollUpStatus.1 = INTEGER: nonCritical(4) StorageManagement-MIB::controllerComponentStatus.1 = INTEGER: nonCritical(4) StorageManagement-MIB::controllerNexusID.1 = STRING: "\\0" StorageManagement-MIB::controllerAlarmState.1 = INTEGER: disabled(2) StorageManagement-MIB::controllerDriverVersion.1 = STRING: "00.00.03.05 " StorageManagement-MIB::controllerPCISlot.1 = STRING: "embedded" StorageManagement-MIB::controllerClusterMode.1 = INTEGER: notApplicable(99) StorageManagement-MIB::controllerMinFWVersion.1 = STRING: "5.2.1-0067" StorageManagement-MIB::controllerMinDriverVersion.1 = STRING: "00.00.03.21" StorageManagement-MIB::controllerChannelCount.1 = INTEGER: 2 StorageManagement-MIB::controllerReconstructRate.1 = INTEGER: 30 StorageManagement-MIB::controllerPatrolReadRate.1 = INTEGER: 30 StorageManagement-MIB::controllerBGIRate.1 = INTEGER: 30 StorageManagement-MIB::controllerCheckConsistencyRate.1 = INTEGER: 30 StorageManagement-MIB::controllerPatrolReadMode.1 = INTEGER: automatic(1) StorageManagement-MIB::controllerPatrolReadState.1 = INTEGER: stopped(1) StorageManagement-MIB::controllerPatrolReadIterations.1 = INTEGER: 162 StorageManagement-MIB::controllerEntry.57.1 = INTEGER: 99 StorageManagement-MIB::controllerEntry.58.1 = INTEGER: 99 StorageManagement-MIB::channelNumber.1 = INTEGER: 1 StorageManagement-MIB::channelNumber.2 = INTEGER: 2 StorageManagement-MIB::channelName.1 = STRING: "Connector 0" StorageManagement-MIB::channelName.2 = STRING: "Connector 1" StorageManagement-MIB::channelState.1 = INTEGER: ready(1) StorageManagement-MIB::channelState.2 = INTEGER: ready(1) StorageManagement-MIB::channelRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::channelRollUpStatus.2 = INTEGER: ok(3) StorageManagement-MIB::channelComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::channelComponentStatus.2 = INTEGER: ok(3) StorageManagement-MIB::channelNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::channelNexusID.2 = STRING: "\\0\\1" StorageManagement-MIB::channelBusType.1 = INTEGER: sas(8) StorageManagement-MIB::channelBusType.2 = INTEGER: sas(8) StorageManagement-MIB::enclosureNumber.1 = INTEGER: 1 StorageManagement-MIB::enclosureName.1 = STRING: "Backplane" StorageManagement-MIB::enclosureVendor.1 = STRING: "DELL" StorageManagement-MIB::enclosureState.1 = INTEGER: ready(1) StorageManagement-MIB::enclosureProductID.1 = STRING: "BACKPLANE " StorageManagement-MIB::enclosureType.1 = INTEGER: internal(1) StorageManagement-MIB::enclosureChannelNumber.1 = INTEGER: 0 StorageManagement-MIB::enclosureRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::enclosureComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::enclosureNexusID.1 = STRING: "\\0\\0\\0" StorageManagement-MIB::enclosureFirmwareVersion.1 = STRING: "1.00" StorageManagement-MIB::enclosureSASAddress.1 = STRING: "50019090B4C67200" StorageManagement-MIB::arrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskVendor.1 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.2 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.3 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.4 = STRING: "DELL " StorageManagement-MIB::arrayDiskState.1 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.2 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.3 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.4 = INTEGER: online(3) StorageManagement-MIB::arrayDiskProductID.1 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.2 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.3 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.4 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskSerialNo.1 = STRING: "3LN0LRL0 " StorageManagement-MIB::arrayDiskSerialNo.2 = STRING: "3LN0JYJS " StorageManagement-MIB::arrayDiskSerialNo.3 = STRING: "3LN0LR0V " StorageManagement-MIB::arrayDiskSerialNo.4 = STRING: "3LN0JH97 " StorageManagement-MIB::arrayDiskRevision.1 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.2 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.3 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.4 = STRING: "T106" StorageManagement-MIB::arrayDiskEnclosureID.1 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.2 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.3 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.4 = STRING: "0" StorageManagement-MIB::arrayDiskChannel.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInMB.1 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.2 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.3 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.4 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskTargetID.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskTargetID.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskTargetID.3 = INTEGER: 2 StorageManagement-MIB::arrayDiskTargetID.4 = INTEGER: 3 StorageManagement-MIB::arrayDiskLunID.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInMB.1 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.2 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.3 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.4 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskBusType.1 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.2 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.3 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.4 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskSpareState.1 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.2 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.3 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.4 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.2 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.3 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.4 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.2 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.3 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.4 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskNexusID.1 = STRING: "\\0\\0\\0\\0" StorageManagement-MIB::arrayDiskNexusID.2 = STRING: "\\0\\0\\0\\1" StorageManagement-MIB::arrayDiskNexusID.3 = STRING: "\\0\\0\\0\\2" StorageManagement-MIB::arrayDiskNexusID.4 = STRING: "\\0\\0\\0\\3" StorageManagement-MIB::arrayDiskPartNumber.1 = STRING: "SG0DR2381253172FLRL0A00 " StorageManagement-MIB::arrayDiskPartNumber.2 = STRING: "SG0DR2381253172FJYJSA00 " StorageManagement-MIB::arrayDiskPartNumber.3 = STRING: "SG0DR2381253172FLR0VA00 " StorageManagement-MIB::arrayDiskPartNumber.4 = STRING: "SG0DR2381253172FJH97A00 " StorageManagement-MIB::arrayDiskSASAddress.1 = STRING: "5000C50002380201" StorageManagement-MIB::arrayDiskSASAddress.2 = STRING: "5000C50002385B89" StorageManagement-MIB::arrayDiskSASAddress.3 = STRING: "5000C50002385AA9" StorageManagement-MIB::arrayDiskSASAddress.4 = STRING: "5000C500023841E1" StorageManagement-MIB::arrayDiskSmartAlertIndication.1 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.2 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.3 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.4 = INTEGER: no(1) StorageManagement-MIB::arrayDiskManufactureDay.1 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.2 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.3 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.4 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.1 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.2 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.3 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.4 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureYear.1 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.2 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.3 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.4 = STRING: "2005" StorageManagement-MIB::arrayDiskMediaType.1 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.2 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.3 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.4 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskEntry.36.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.4 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.40.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.1 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.2 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.3 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.4 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.4 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.2 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.3 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.4 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.4 = INTEGER: 1 StorageManagement-MIB::batteryNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryName.1 = STRING: "Battery 0" StorageManagement-MIB::batteryVendor.1 = STRING: "DELL" StorageManagement-MIB::batteryState.1 = INTEGER: ready(1) StorageManagement-MIB::batteryRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::batteryComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::batteryNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::batteryPredictedCapacity.1 = INTEGER: ready(2) StorageManagement-MIB::batteryNextLearnTime.1 = INTEGER: 21 StorageManagement-MIB::batteryLearnState.1 = INTEGER: idle(16) StorageManagement-MIB::batteryEntry.13.1 = INTEGER: 0 StorageManagement-MIB::batteryMaxLearnDelay.1 = INTEGER: 168 StorageManagement-MIB::batteryConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryConnectionBatteryName.1 = STRING: "Battery 0" StorageManagement-MIB::batteryConnectionBatteryNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryConnectionControllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::batteryConnectionControllerNumber.1 = INTEGER: 1 StorageManagement-MIB::virtualDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::virtualDiskName.1 = STRING: "Virtual Disk 0" StorageManagement-MIB::virtualDiskDeviceName.1 = STRING: "/dev/sda" StorageManagement-MIB::virtualDiskState.1 = INTEGER: ready(1) StorageManagement-MIB::virtualDiskLengthInMB.1 = INTEGER: 278784 StorageManagement-MIB::virtualDiskLengthInBytes.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskWritePolicy.1 = INTEGER: writeBack(3) StorageManagement-MIB::virtualDiskReadPolicy.1 = INTEGER: noReadAhead(5) StorageManagement-MIB::virtualDiskCachePolicy.1 = INTEGER: not-applicable(99) StorageManagement-MIB::virtualDiskLayout.1 = INTEGER: raid-10(10) StorageManagement-MIB::virtualDiskCurStripeSizeInMB.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskCurStripeSizeInBytes.1 = INTEGER: 65536 StorageManagement-MIB::virtualDiskTargetID.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::virtualDiskComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::virtualDiskNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::virtualDiskArrayDiskType.1 = INTEGER: sas(1) StorageManagement-MIB::virtualDiskEntry.23.1 = INTEGER: 2 StorageManagement-MIB::virtualDiskEntry.24.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.1 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.2 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.3 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.4 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.4 = INTEGER: 1

    Read the article

  • String length differs from Javascript to Java code

    - by François P.
    I've got a JSP page with a piece of Javascript validation code which limits to a certain amount of characters on submit. I'm using a <textarea> so I can't simply use a length attribute like in a <input type="text">. I use document.getElementById("text").value.length to get the string length. I'm running Firefox 3.0 on Windows (but I've tested this behavior with IE 6 also). The form gets submitted to a J2EE servlet. In my Java servlet the string length of the parameter is larger than 2000! I've noticed that this can easily be reproduced by adding carriage returns in the <textarea>. I've used Firebug to assert the length of the <textare> and it really is 2000 characters long. On the Java side though, the carriage returns get converted to UNIX style (\r\n, instead of \n), thus the string length differs! Am I missing something obvious here or what ? If not, how would you reliably (cross-platform / browser) make sure that the <textarea> is limited.

    Read the article

  • Algorithm to see if keywords exist inside a string

    - by rksprst
    Let's say I have a set of keywords in an array {"olympics", "sports tennis best", "tennis", "tennis rules"} I then have a large list (up to 50 at a time) of strings (or actually tweets), so they are a max of 140 characters. I want to look at each string and see what keywords are present there. In the case where a keyword is composed of multiple words like "sports tennis best", the words don't have to be together in the string, but all of them have to show up. I've having trouble figuring out an algorithm that does this efficiently. Do you guys have suggestions on a way to do this? Thanks! Edit: To explain a bit better each keyword has an id associated with it, so {1:"olympics", 2:"sports tennis best", 3:"tennis", 4:"tennis rules"} I want to go through the list of strings/tweets and see which group of keywords match. The output should be, this tweet belongs with keyword #4. (multiple matches may be made, so anything that matches keyword 2, would also match 3 -since they both contain tennis). When there are multiple words in the keyword, e.g. "sports tennis best" they don't have to appear together but have to all appear. e.g. this will correctly match: "i just played tennis, i love sports, its the best"... since this string contains "sports tennis best" it will match and be associated with the keywordID (which is 2 for this example).

    Read the article

  • Finding character in String in Vector.

    - by SoulBeaver
    Judging from the title, I kinda did my program in a fairly complicated way. BUT! I might as well ask anyway xD This is a simple program I did in response to question 3-3 of Accelerated C++, which is an awesome book in my opinion. I created a vector: vector<string> countEm; That accepts all valid strings. Therefore, I have a vector that contains elements of strings. Next, I created a function int toLowerWords( vector<string> &vec ) { for( int loop = 0; loop < vec.size(); loop++ ) transform( vec[loop].begin(), vec[loop].end(), vec[loop].begin(), ::tolower ); that splits the input into all lowercase characters for easier counting. So far, so good. I created a third and final function to actually count the words, and that's where I'm stuck. int counter( vector<string> &vec ) { for( int loop = 0; loop < vec.size(); loop++ ) for( int secLoop = 0; secLoop < vec[loop].size(); secLoop++ ) { if( vec[loop][secLoop] == ' ' ) That just looks ridiculous. Using a two-dimensional array to call on the characters of the vector until I find a space. Ridiculous. I don't believe that this is an elegant or even viable solution. If it was a viable solution, I would then backtrack from the space and copy all characters I've found in a separate vector and count those. My question then is. How can I dissect a vector of strings into separate words so that I can actually count them? I thought about using strchr, but it didn't give me any epiphanies.

    Read the article

  • python - remove string from words in an array

    - by tekknolagi
    #!/usr/bin/python #this looks for words in dictionary that begin with 'in' and the suffix is a real word wordlist = [line.strip() for line in open('/usr/share/dict/words')] newlist = [] for word in wordlist: if word.startswith("in"): newlist.append(word) for word in newlist: word = word.split('in') print newlist how would I get the program to remove the string "in" from all the words that it starts with? right now it does not work

    Read the article

  • jQuery append Google Adsense to div..

    - by SoulieBaby
    Hi everyone, I'm having issues with google adsense and it loading before my jQuery and killing my codes, so I thought I'd try to append the Google Adsense javascript to the appropriate div using the document ready function, here's the code I'm trying to write: <script language="javascript" type="text/javascript"> $(document).ready(function(){ $(".googleBanners").html("<script language='javascript' type='text/javascript'>\n" + "google_ad_client = 'pub-8487967187298044';\n" + "google_ad_slot = '1088799521';\n" + "google_ad_width = 250;\n" + "google_ad_height = 250;\n" + "</" + "script>\n" + "<script language='javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js' type='text/javascript'>" + "</" + "script>"); }); </script> But I'm not so good writing javascript/jQuery so if someone could help me implement this that would be fantastic. The error in FF I'm currently getting is "Error: google_protectAndRun is not defined". I'm not sure what that means, but I'm guessing I've written the jQuery code wrong.. lol

    Read the article

  • Append a string to the end of an element attribute using jQuery

    - by ILMV
    I have an element: <select id="row" /> I want to append a string to the end of the id attribute, like this: <select id="row_1" /> The jQuery I am using to achieve this is (from within an each): $(this).attr('id',$(this).attr('id')+'_'+row_count); This looks ugly as sin, and whilst it works I want to know if there is a simpler solution. In this example, the ID prefix (e.g. row) is never constant, so I can't just do 'row_'+row_count. Cheers!

    Read the article

  • Using recursion an append in prolog

    - by Adrian
    Lets say that I would like to construct a list (L2) by appending elements of another list (L) one by one. The result should be exactly the same as the input. This task is silly, but it'll help me understand how to recurse through a list and remove certain elements. I have put together the following code: create(L, L2) :- (\+ (L == []) -> L=[H|T], append([H], create(T, L2), L2);[]). calling it by create([1,2,3,4], L2) returns L2 = [1|create([2,3,4], **)\. which is not a desired result.

    Read the article

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