Search Results

Search found 3437 results on 138 pages for 'append'.

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

  • How to append html to first occurance of string after selected element

    - by uku
    Hello, I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div> And I want to insert another link after the first one, like so: <div class=foo> (<a href=forum.example.com>forum</a>) <a href=blog.example.com>blog</a> <p> Some html here.... </div> ...but because it is enclosed in () I cannot use: $('div.foo a:first').append(' <a href=blog.example.com>blog</a>'); ...which would place it before the ). So how can I extend my jQuery selection to select the literal ) or do I need to use another solution?

    Read the article

  • choose append to existing backup instead of overwrite

    - by aron
    Hello, I have a database and I made it's first backup 2 days ago. Then yesterday I spent an entire adding new records. This morning I ran a backup, (but I selected append to existing backup set) as pictured below. I just ran a restore and I found that it wiped out all my data from yesterday and it restored it from the backup of 2 days ago. Not the version from this mornings backup. I zipped this backup file to be safe. I changed some data in the DB, Then I ran the back up again, but this time I selected "overwrite all existing backup sets" Now when I restore the db it's seems to restore the data from the backup correctly. I think I learned a lesson here, correctly if I'm wrong My questions is, Did I lose an entire day of work? I still have this morning's backup .bak file safe in a zip. Is there anyway I can restore is with the right data?

    Read the article

  • jQuery $.post & $.append & IE6

    - by Jim
    I'm having a weird problem with jQuery and IE6. Script works on IE7+ and with all other browsers I have tried it. I can't post the full script, but what it does is this: $.post("file.php",{'foo':'bar'},function(data){ $('#target').append(data) }) When I run the code in IE6, #target just shows ? and a white char with a hole in the middle. I have no idea what this second char is. My initial thought was that this was some sort of content-type problem because the file.php just echoes answer without any header information. I added Content-type: text/html with header() but didn't help. Any suggestions?

    Read the article

  • php/mysql append state to city

    - by mike
    Hello, Having a hard time figuring out the best way to do this... I have a search function that takes "search terms" and "search location". In the location input, I have an suggestion feature that brings up "city, state abbreviation" but it seems some users just do not use it(or can't) so they end up entering just a city name... I need to append the state abbreviation after the form is submitted. I have a table with all city and state names in the U.S. but the problem is... there are multiple cities with the same name in different states... I would like to add the state abbreviation for the state that the city is most popular for(does that make sense?). For example, if the user enters "Miami" I would like it to become "Miami, FL" as opposed to "Miami, WV"... Any ideas? Thanks!

    Read the article

  • Append a parameter to a querystring with mod_rewrite

    - by Matt
    Hello, I would like to use mod_rewrite to append a parameter to the end of a querystring. I understand that I can do this using the [QSA] flag. However, I would like the parameter appended ONLY if it does not already exist in the querystring. So, if the querystring was: http://www.mysite.com/script.php?colour=red&size=large I would like the above URL to be re-directed to http://www.mysite.com/script.php?colour=red&size=large&weight=heavy Where weight=heavy is appended to the end of the querystring only if this specific parameter was not there in the first place! If the specific parameter is already in the URL then no redirect is required. Can anybody please suggest code to put in my .htacess file that can do this? Thanks.

    Read the article

  • jquery .append() not working for my html

    - by user1056998
    I have a program which appends an input(type="hidden") using jquery, to an html so that when I click the submit button, it passes the value to a php file and I can process it. However, it seems that the hidden type is not really being appended to the html nor it is being passed to the php file. I already used method="get" to see the values in the address bar and print_r to see the values being catched but there's nothing. To check if my form is actually passing a value, I added a <input type="hidden" name="absent[]" value="testing" /> in the HTML and the value got passed but the ones in the jquery aren't. Here are my files: jquery: $(function(){ $("td").click(function(){ if($(this).hasClass("on")) { alert("Already marked absent"); } else { $(this).addClass("on"); var currentCellText = $(this).text(); var temp = $(this).attr('id'); $("#collect").append("<input type='hidden' name='absent[]' value = '" + temp + "'/>" + currentCellText); alert(temp); } }); $("#clicky").click(function(){ $("td").removeClass("on"); $("#collect").text(''); $("#collect").append("Absentees: <br>") alert(temp); }); }); Here is the html part: <?php session_start(); include 'connectdb.php'; $classID = $_SESSION['csID']; $classQry = "SELECT e.csID, c.subjCode, c.section, b.subj_name, e.studentID, CONCAT(s.lname, ', ' , s.fname)name FROM ENROLLMENT e, CLASS_SCHEDULE c, STUDENT s, SUBJECT b WHERE e.csID = c.csID AND c.csID = '" . $classID . "' AND c.subjCode = b.subjCode AND e.studentID = s.studentID ORDER BY e.sort;"; $doClassQry = mysql_query($classQry); echo "<table id='tableone'>"; while($x = mysql_fetch_array($doClassQry)) { $subject = $x['subj_name']; $subjCode = $x['subjCode']; $section = $x['section']; $studentArr[] = $x['name']; $studentID[] = $x['studentID']; } echo "<thead>"; echo "<tr><th colspan = 7>" . "This is your class: " . $subjCode . " " . $section . " : " . $subject . "</th></tr>"; echo "</thead>"; echo "<tbody>"; echo "<tr>"; for($i = 0; $i < mysql_num_rows($doClassQry); $i++) { if($i % 7 == 0) { echo "</tr><tr><td id = '". $studentID[$i] . " '>" . $studentArr[$i] . "</td>"; } else { echo "<td id = '". $studentID[$i] . " '>" . $studentArr[$i] . "</td>"; } } echo "</tr>"; echo "</tbody>"; echo "</table>"; ?> Here's the html part with the form: <form name="save" action="saveTest.php" method="post"> <div id="submitt"> <input type="hidden" name="absent[]" value="testing"/> <input type="submit" value="submit"/> </div> </form> And here's the php part which processes the form (saveTest.php): <?php $absent = $_POST['absent']; //echo "absnt" . $absent[] . "<br>"; echo count($absent) . "<br>"; //print_r($_POST) . "<br>"; ?>

    Read the article

  • Need to write at beginning of file with PHP

    - by Timothy
    I'm making this program and I'm trying to find out how to write data to the beginning of a file rather than the end. "a"/append only writes to the end, how can I make it write to the beginning? Because "r+" does it but overwrites the previous data. $datab = fopen('database.txt', "r+"); Here is my whole file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Facebook v0.1</title> <style type="text/css"> #bod{ margin:0 auto; width:800px; border:solid 2px black; } </style> </head> <body> <div id="bod"> <?php $fname = $_REQUEST['fname']; $lname = $_REQUEST['lname']; $comment = $_REQUEST['comment']; $datab = $_REQUEST['datab']; $gfile = $_REQUEST['gfile']; print <<<form <table border="2" style="margin:0 auto;"> <td> <form method="post" action=""> First Name : <input type ="text" name="fname" value=""> <br> Last Name : <input type ="text" name="lname" value=""> <br> Comment : <input type ="text" name="comment" value=""> <br> <input type ="submit" value="Submit"> </form> </td> </table> form; if((!empty($fname)) && (!empty($lname)) && (!empty($comment))){ $form = <<<come <table border='2' width='300px' style="margin:0 auto;"> <tr> <td> <span style="color:blue; font-weight:bold;"> $fname $lname : </span> $comment </td> </tr> </table> come; $datab = fopen('database.txt', "r+"); fputs($datab, $form); fclose($datab); }else if((empty($fname)) && (empty($lname)) && (empty($comment))){ print" please input data"; } // end table $datab = fopen('database.txt', "r"); while (!feof($datab)){ $gfile = fgets($datab); print "$gfile"; }// end of while ?> </div> </body> </html>

    Read the article

  • HTTPS Redirect Causing Error "Server cannot append header after HTTP headers have been sent"

    - by Chad
    I need to check that our visitors are using HTTPS. In BasePage I check if the request is coming via HTTPS. If it's not, I redirect back with HTTPS. However, when someone comes to the site and this function is used, I get the error: System.Web.HttpException: Server cannot append header after HTTP headers have been sent. at System.Web.HttpResponse.AppendHeader(String name, String value) at System.Web.HttpResponse.AddHeader(String name, String value) at Premier.Payment.Website.Generic.BasePage..ctor() Here is the code I started with: // If page not currently SSL if (HttpContext.Current.Request.ServerVariables["HTTPS"].Equals("off")) { // If SSL is required if (GetConfigSetting("SSLRequired").ToUpper().Equals("TRUE")) { string redi = "https://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToString() + HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"].ToString() + "?" + HttpContext.Current.Request.ServerVariables["QUERY_STRING"].ToString(); HttpContext.Current.Response.Redirect(redi.ToString()); } } I also tried adding this above it (a bit I used in another site for a similar problem): // Wait until page is copletely loaded before sending anything since we re-build HttpContext.Current.Response.BufferOutput = true; I am using c# in .NET 3.5 on IIS 6. enter code here

    Read the article

  • Append data to file in iPhone app

    - by zp26
    I have a problem. I want to create a file like XML. I have create a code for this but the file not append the information but rewrite and save only the last NSData. Can you help me/ This is my code -(void)salvataggioInXML:(NSString*)name:(float)x:(float)y:(float)z{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectoryPath = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectoryPath stringByAppendingPathComponent:@"filePosizioni.xml"]; NSFileHandle *myHandle = [NSFileHandle fileHandleForUpdatingAtPath:filePath]; [myHandle seekToEndOfFile]; NSString *tagName = [NSString stringWithFormat:@"<name>%@<name>", name]; NSString *tagX = [NSString stringWithFormat:@"<x>%f<x>", name]; NSString *tagY = [NSString stringWithFormat:@"<y>%f<y>", name]; NSString *tagZ = [NSString stringWithFormat:@"<z>%f<z>", name]; NSData* dataName = [tagName dataUsingEncoding: NSASCIIStringEncoding]; NSData* dataX = [tagX dataUsingEncoding: NSASCIIStringEncoding]; NSData* dataY = [tagY dataUsingEncoding: NSASCIIStringEncoding]; NSData* dataZ = [tagZ dataUsingEncoding: NSASCIIStringEncoding]; if ([dataName writeToFile:filePath atomically:YES]) NSLog(@"writeok"); [myHandle seekToEndOfFile]; if ([dataX writeToFile:filePath atomically:YES]) NSLog(@"writeok"); [myHandle seekToEndOfFile]; if ([dataY writeToFile:filePath atomically:YES]) NSLog(@"writeok"); [myHandle seekToEndOfFile]; if ([dataZ writeToFile:filePath atomically:YES]) NSLog(@"writeok"); [myHandle seekToEndOfFile]; NSLog(@"zp26 %@",filePath); }

    Read the article

  • Refresh table after using jQuery .append()

    - by Aaron Salazar
    The following code gets a JSON object and then spits its contents out into a <table>. The first time I do it I get my JSON content just fine. However, when I refresh, the refreshed data is stuck onto the bottom of my table. How do I refresh the data to show the new data only? I tried using .remove() but there was an obvious deleting and then a refresh of data. $(function() { $('#ReportedIssue').change(function() { //$('.data').remove() $.getJSON('/CurReport/GetUpdatedTableResults', function(json) { for (var i = 0; i < json.GetDocumentResults.length; i++) { $('#DocumentInfoTable').append( "<tr class='data'>" + "<td>" + json.GetDocumentResults[i].Document.DocumentId + "</td>" + "<td>" + json.GetDocumentResults[i].Document.LanguageCode + "</td>" + "<td>" + json.GetDocumentResults[i].ReportedIssue + "</td>" + "<td>" + json.GetDocumentResults[i].PageNumber + "</td>" + "</tr>" ); }; }); }); }); Thank you, Aaron

    Read the article

  • preg_replace function to append a string to all the hyperlinks of a page

    - by KoolKabin
    hi guys, i want to append my own value to all hyperlinks in a page... e.g if there are links: <a href="abc.htm?val=1">abc 1</a> <br/> <a href="abc.htm?val=2">abc 1</a> <br/> <a href="abc.htm?val=3">abc 1</a> <br/> <a href="abc.htm?val=4">abc 1</a> <br/> I want to add next var like "type=int" to all hyperlinks output should be: <a href="abc.htm?val=1&type=int">abc 1</a> <br/> <a href="abc.htm?val=2&type=int">abc 1</a> <br/> <a href="abc.htm?val=3&type=int">abc 1</a> <br/> <a href="abc.htm?val=4&type=int">abc 1</a> <br/> I hope it can be done quite easily with preg_replace function

    Read the article

  • trying to append a list, but something breaks

    - by romunov
    I'm trying to create an empty list which will have as many elements as there are num.of.walkers. I then try to append, to each created element, a new sub-list (length of new sub-list corresponds to a value in a. When I fiddle around in R everything goes smooth: list.of.dist[[1]] <- vector("list", a[1]) list.of.dist[[2]] <- vector("list", a[2]) list.of.dist[[3]] <- vector("list", a[3]) list.of.dist[[4]] <- vector("list", a[4]) I then try to write a function. Here is my feeble attempt that results in an error. Can someone chip in what am I doing wrong? countNumberOfWalks <- function(walk.df) { list.of.walkers <- sort(unique(walk.df$label)) num.of.walkers <- length(unique(walk.df$label)) #Pre-allocate objects for further manipulation list.of.dist <- vector("list", num.of.walkers) a <- c() # Count the number of walks per walker. for (i in list.of.walkers) { a[i] <- nrow(walk.df[walk.df$label == i,]) } a <- as.vector(a) # Add a sublist (length = number of walks) for each walker. for (i in i:num.of.walkers) { list.of.dist[[i]] <- vector("list", a[i]) } return(list.of.dist) } > num.of.walks.per.walker <- countNumberOfWalks(walk.df) Error in vector("list", a[i]) : vector size cannot be NA

    Read the article

  • Append json data to html class name

    - by user2898514
    I have a problem with my json code. I want to append each json value comes from a key to be appended to an html class name which matches the key of json data. here's my Live demo if you see the result in the life demo. it's only appending the last record. is it possible to make it show all records in order? json var json = '[{"castle":"big","commercial":"large","common":"sergio","cultural":"2009"},' + '{"castle":"big2","commercial":"large2","common":"sergio2","cultural":"20092"}]'; html <div class="castle"></div> <div class="commercial"></div> <div class="common"></div> <div class="cultural"></div> javascript var data = $.parseJSON(json); $.each(data, function(l,v) { $.each(v, function(k,o) { $('.'+k).attr('id', k+o); console.log($('#'+k+o).attr('id')); $('#'+k+o).text(o); }); }); for more illustration... I want the result in the live demo to look like this big large sergio 2009, big2 large2 sergio2 20092

    Read the article

  • DBD::CSV: Append-extension-question

    - by sid_com
    Why does only the second example append the extension to the filename and what is the "/r" in ".csv/r" for. #!/usr/bin/env perl use warnings; use strict; use 5.012; use DBI; my $dbh = DBI->connect( "DBI:CSV:f_dir=/home/mm", { RaiseError => 1, f_ext => ".csv/r"} ); my $table = 'new_1'; $dbh->do( "DROP TABLE IF EXISTS $table" ); $dbh->do( "CREATE TABLE $table ( id INT, name CHAR, city CHAR )" ); my $sth_new = $dbh->prepare( "INSERT INTO $table( id, name, city ) VALUES ( ?, ?, ?, )" ); $sth_new->execute( 1, 'Smith', 'Greenville' ); $dbh->disconnect(); # -------------------------------------------------------- $dbh = DBI->connect( "DBI:CSV:f_dir=/home/mm", { RaiseError => 1 } ); $dbh->{f_ext} = ".csv/r"; $table = 'new_2'; $dbh->do( "DROP TABLE IF EXISTS $table" ); $dbh->do( "CREATE TABLE $table ( id INT, name CHAR, city CHAR )" ); $sth_new = $dbh->prepare( "INSERT INTO $table( id, name, city ) VALUES ( ?, ?, ?, )" ); $sth_new->execute( 1, 'Smith', 'Greenville' ); $dbh->disconnect();

    Read the article

  • Appended content using jQuery 'append' is not submitted?

    - by YourMomzThaBomb
    I'm new to jQuery so this may be a real simple answer. I have a ASP.NET project that I'm trying to dynamically add content to a span element by typing into a text box and clicking a button. Sounds simple right? Well, I can get the content to added, but when the form is submitted the span element is still empty? Why is the new data not submitted? What step am I missing? Please help. Here's some sample code: < span id="tagContainer" runat="server"< /span < input type="text" name="tag" id="tag" / < input type="button" name="AddTag" value="Add" class="button" onclick="addTag();" / function addTag() {    if ($("#tag").val() != "") {       $("#tagContainer").append('$("#tag").val()');       $("#tag").val("");    } }

    Read the article

  • class selector refuses after append to body

    - by supersize
    I'm appending loads of divs in a wrapper: var cubes = [], allCubes = '', for(var i = 0; i < 380; i++) { var randomleft = Math.floor(Math.random()*Math.floor(Math.random()*1000)), randomtop = Math.floor(Math.random()*Math.floor(Math.random()*1000)); allCubes += '<div id="cube'+i+'" class="cube" style="position: absolute; border: 2px #000 solid; left: '+randomleft+'px; top: '+randomtop+'px; width: 9px; height: 9px; z-index: -1"></div>'; } $('#wrapper').append(allCubes); // performance for(var i = 0; i < 380; i++) { cubes.push($('#cube'+i)); } and then I would like to make them all draggable with jQueryUI and log their current position. var allc = $('.cube'); allc.draggable().on('mouseup', function(i) { allc.each(function() { var nleft = $(this).offset().left; var ntop = $(this).offset().top; console.log('cubes['+i+'].animate({ left:'+nleft+',top:'+ntop+'})'); }); }); Unfortunenately it does not work. They are neither draggable nor there comes up a log. Thanks

    Read the article

  • Is it possible to append html code in parts via JQuery?

    - by phpheini
    I am trying to append li elements coming from a php file with JQuery. Problem is that the html code needs to be seperately appended to different html IDs according to the key value. Unfortunately as I understood append() can only append correct html with all elements closed. Otherwise it will automatically close the tags. The following code will NOT work as dval contains code like <div><li class="some">Some value</li> and append() will make <div><li class="some">Some value</li></div> out of it. So I was wondering whether there is another way, maybe a function other than append() to be able to append html parts? $.each(obj, function(key,val) { $.each(obj[key], function(key, dval) { if(key == "text") { $("#" + key).append(dval); } }) });

    Read the article

  • NSMutableString leaks on append or replaceOccurrencesOfString

    - by John
    Hello Folks, I know similar questions have been asked time and time again but I ask that you please bear with me as I cannot seem to find an answer that helps. My application has leaks that are driving me out of my mind. Actually, they are not reported as leaks using Leaks, but my net bytes in ObjectAlloc goes up and up and up and never stops, eventually leading to a crash if it goes on long enough (not very long). The problem occurs with NSMutableStrings. I think there is either something fundamental I don't understand about them, or I am facing another problem that I am having difficulty tracking down but keeps hiding behind the NSMutableStrings. Specifically, I am noticing that whenever I append to or perform a replace on a NSMutableString, ObjectAlloc reports what appear to be mismatches in malloc/frees behind the scene when resizing the NSMutableString. I'm sorry to say this is the second time I'm facing this problem - the first time I messed around for hours and hours and finally the problem went away (magic!) but I don't really know why. When I look at the code below (and believe me, I've stared at it for hours) I cannot see the problem. I look at the code and think to myself that I should be fine because I'm releasing the only object for which I am responsible (aString) and that NSMutableString should be taking care of cleaning up after any resizing it does. In the second example, just so you know in case it helps, the string being passed in comes from an ASIHTTPRequest object (it's the responseString) and I don't do anything at all with it. It's being called simply like so ([self DoStuff2:[request responseString]]) and I don't free the request myself either (I'm using a ASINetworkQueue and I assume that the requests are destroyed for me (I tried and caused errors because the request was already being release somewhere else). Also, I know it shouldn't do anything, but I even tried wrapping the code in autorelease pools, which of course did nothing. I should mention that this code is being run inside of an NSOperation. I thought that perhaps I am experiencing problems because NSOperations should create an autorelease pool for themselves, but I've tried that to no avail. Not related to NSMutableString, but I find I also have similar problems using the NSString componentsSeparatedByString method. Sometimes the memory used by the array that gets the separated components is never released. Hmmm...strings in general seem to be somewhat problematic for me it seems. I would appreciate ANY help anyone can provide. If you require more info, I'll be glad to add it. I do promise you that I've struggled with this (and other problems) for weeks and every problem I encounter I research hard and long until I find a solution - this is not an idle request, but a true cry for help! I've written so much code and now I'm trying to seal some small leaks etc and I notice this problem. Honestly, I cannot believe how memory management in Objective C can stump me so at times...I've read Apple's memory mgmt docs many times and I thought I thoroughly understood it and I try to be diligent about releasing objects I own, but sometimes I find myself wondering if I truly understand...I would like to put this to bed once and make sure I understand all this fully - to have this sort of question/problem after writing thousands of lines of code is more than a little scary/embarrassing/annoying. So again, if anybody has any insight, I'd be grateful. Thanks for your time and efforts. -(void)DoStuff { NSString *aString [ [[NSString alloc] initWithFormat:@"text %@ more text", self.strVariable]; [self.someMutableStringVar replaceOccurrencesOfString:@"replace" withString:aString options:NSCaseInsensitiveSearch range:NSMakeRange(0, [self.someMutableStringVar length])]; [aString release]; } -(void)DoStuff2:(NSString *)aString { [self.someMutableStringVar appendString:aString]; }

    Read the article

  • Hard to append a table with many records into another without generating duplicates

    - by Bill Mudry
    I may seem to be a bit wordy at first but for the hope it will be easier for all of you to understand what I am doing in the first place. I have an uncommon but enjoyable activity of collecting as many species of wood from around the world as I can (over 2,900 so far). Ok, that is the real world. Meanwhile I have spent over 8 years compiling over 5.8 meg of text data on all the woods of the world. That got so large that learning some basic PHP and MySQL was most welcome so I could build a new database driven home for all this research. I am still slow at it but getting there. The original premise was to find evidence of as many species of woods in the world I can. The more names identified, the more successful the project. I have named the project TAXA for ease of conversation (short for Taxonomy). You are most welcome to take a look at what I have so far at www.prowebcanada.com/taxa. It is 95% dynamically driven. So far I am reporting about 6,500 botanical wood names and, as said above, the more I can report, the more successful is the project. I have a file of all the woods in the second largest wood collection in the world, the Tervuren wood collection in the Netherlands with over 11,300 wood names even after cleaning out all duplicates. That is almost twice the number I am reporting now so porting all the new wood names from Tervuren to the 'species' table where I keep the reported data would be a major desirable advancement in the project. At one point I was able to add all the Tervuren records to the species table but over 3,000 duplicates also formed. They were not in the Tervuren file in the first place but represent the same wood names common to both files. It is common sense that there would be woods common to both that when merged would create new duplicates. At one point and with the help of others from another forum, I may very well have finally got the proper SQL statement. When I ran it, though, the system said (semi-amusingly at first) ----- that it had gone away! After looking up on the Net what could have have done this, one reason is that the MySQL timeout lapses and probably because of the large size of files I am running. I am running this on a rented account on Godaddy so I cannot go about trying to adjust any config file. For safety, I copied the tervuren.sql file as tervuren_target.sql and the species.sql file as species_master.sql tp use as working files just to make sure I protect the original files from destruction or damage. Later I can name the species_master back to just species.sql once I am happy all worked well. The species file has about 18 columns in it but only 5 columns match the columns in the Tervuren file (name for name and collation also). The rest of the columns are just along for the ride, so to speak. The common key in both is the 'species_name" columns in both. I am not sure it is at all proper to call one a primary key and the other a foreign key since there really is no relational connection to them. One is just more data for the other and can disappear after, never to be referred to the working code in the application. I have been very surprised and flabbergasted on how hard it can be to append records from one large table into another (with same column names plus others) without generating NEW duplicates in the first place. Watch out thinking that a SELECT DISTINCT statement may do the job because absolutely NO records in the species table must get destroyed in the process and there is no way (well, that I know of) to tell the 'DISTINCT" command this. Yes, the original 'species' table has duplicates in it even before all this but, trust me ---- they have to be removed the long hard way manually record by record or I will lose precious information. It is more important to just make sure no NEW duplicates form through bringing in new names in the tervuren_target.species_name into species.species_name. I am hoping and thinking that a straight SQL solution should work --- except for that nasty timeout. How do I get past that? Could it mean that I may have to turn to a PHP plus SQL method?? Or ..... would I have to break up the Tervuren files into a few smaller ones and run them independently (hope not....)" So far, what seems should be easy has proven to be unexpectedly tricky. I appreciate any help you can give but start from the assumption that this may be harder to do right than it may seem on the surface. By the way --- I am running a quad 64 bit system with Windows 7, so at least I have some fairly hefty power on the client end. I have a direct ethernet cable feeding a cable connection to the Internet. Once I get an algorithm and code working for this, I also have many other lists to process that could make the 'species' table grow even more. It could be equivalent to (ahem) lighting a rocket under my project (especially compared to do this record by record manually)! This is my first time in this forum, so I do not know how I can receive any replies. Do I have to to come back here periodically or are replies emailed out also? It would be great if you CC'd copies to me at billmudry at rogers.com :-) Much thanks for your patience and help, Bill Mudry Mississauga, Ontario Canada (next to Toronto).

    Read the article

  • Remove All Nodes with (nodeName = "script") from a Document Fragment *before placing it in dom*

    - by Matrym
    My goal is to remove all <[script] nodes from a document fragment (leaving the rest of the fragment intact) before inserting the fragment into the dom. My fragment is created by and looks something like this: range = document.createRange(); range.selectNode(document.getElementsByTagName("body").item(0)); documentFragment = range.cloneContents(); sasDom.insertBefore(documentFragment, credit); document.body.appendChild(documentFragment); I got good range walker suggestions in a separate post, but realized I asked the wrong question. I got an answer about ranges, but what I meant to ask about was a document fragment (or perhaps there's a way to set a range of the fragment? hrmmm). The walker provided was: function actOnElementsInRange(range, func) { function isContainedInRange(el, range) { var elRange = range.cloneRange(); elRange.selectNode(el); return range.compareBoundaryPoints(Range.START_TO_START, elRange) <= 0 && range.compareBoundaryPoints(Range.END_TO_END, elRange) >= 0; } var rangeStartElement = range.startContainer; if (rangeStartElement.nodeType == 3) { rangeStartElement = rangeStartElement.parentNode; } var rangeEndElement = range.endContainer; if (rangeEndElement.nodeType == 3) { rangeEndElement = rangeEndElement.parentNode; } var isInRange = function(el) { return (el === rangeStartElement || el === rangeEndElement || isContainedInRange(el, range)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; }; var container = range.commonAncestorContainer; if (container.nodeType != 1) { container = container.parentNode; } var walker = document.createTreeWalker(document, NodeFilter.SHOW_ELEMENT, isInRange, false); while (walker.nextNode()) { func(walker.currentNode); } } actOnElementsInRange(range, function(el) { el.removeAttribute("id"); }); That walker code is lifted from: http://stackoverflow.com/questions/2690122/remove-all-id-attributes-from-nodes-in-a-range-of-fragment PLEASE No libraries (ie jQuery). I want to do this the raw way. Thanks in advance for your help

    Read the article

  • jQuery selector syntax gives Firefox warning

    - by FreekOne
    The following code stringref = "tab_2"; jQuery('.someclass a:not(.someclass #a_someclass_'+stringref+')').css('color', '#000'); gives me this warning in the FF 3.5.5 error console and I can't figure out why: Warning: Missing closing ')' in negation pseudo-class '#a_someclass_tab_2'. Is my syntax failing me or has FF gone bonkers ?

    Read the article

  • UNIX: Replace Newline w/ Colon, Preserving Newline Before EOF

    - by Maarx
    I have a text file ("INPUT.txt") of the format: A<LF> B<LF> C<LF> D<LF> X<LF> Y<LF> Z<LF> <EOF> which I need to reformat to: A:B:C:D:X:Y:Z<LF> <EOF> I know you can do this with 'sed'. There's a billion google hits for doing this with 'sed'. But I'm trying to emphasis readability, simplicity, and using the correct tool for the correct job. 'sed' is a line editor that consumes and hides newlines. Probably not the right tool for this job! I think the correct tool for this job would be 'tr'. I can replace all the newlines with colons with the command: cat INPUT.txt | tr '\n' ':' There's 99% of my work done. I have a problem, now, though. By replacing all the newlines with colons, I not only get an extraneous colon at the end of the sequence, but I also lose the carriage return at the end of the input. It looks like this: A:B:C:D:X:Y:Z:<EOF> Now, I need to remove the colon from the end of the input. However, if I attempt to pass this processed input through 'sed' to remove the final colon (which would now, I think, be a proper use of 'sed'), I find myself with a second problem. The input is no longer terminated by a newline at all! 'sed' fails outright, for all commands, because it never finds the end of the first line of input! It seems like appending a newline to the end of some input is a very, very common task, and considering I myself was just sorely tempted to write a program to do it in C (which would take about eight lines of code), I can't imagine there's not already a very simple way to do this with the tools already available to you in the Linux kernel.

    Read the article

  • mysql select update

    - by Tillebeck
    Got this: Table a ID RelatedBs 1 NULL 2 NULL Table b AID ID 1 1 1 2 1 3 2 4 2 5 2 6 Need Table a to have a comma separated list as given in table b. And then table b will become obsolete: Table a ID RelatedBs 1 1,2,3 2 4,5,6 This does not rund through all records, but just ad one 'b' to 'table a' UPDATE a, b SET relatedbs = CONCAT(relatedbs,',',b.id) WHERE a.id = b.aid

    Read the article

  • jQuery: appendTo parent

    - by Kenneth B
    Hi guys I can't seem to get the appendTo to work. What do I do wrong? $('div:nth-child(2n) img').appendTo(parent); Current markup: <div class="container"> <img src="123.jpg" /> <p>Hey</p> </div> <div class="container"> <img src="123.jpg" /> <p>Hey</p> </div> I want this output: <div class="container"> <p>Hey</p> <img src="123.jpg" /> </div> <div class="container"> <p>Hey</p> <img src="123.jpg" /> </div> Please help me guys... I'm tearing my hair of every minute.. :-S

    Read the article

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