Search Results

Search found 3278 results on 132 pages for 'ho li cow'.

Page 12/132 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How can I easily retab html files according to some sane default?

    - by James
    I have some html files that I'd like to retab that look like this: <header> <div class="wrapper"> <img src="images/logo.png"> <div class="userbox"> <div class="welcome">Welcome Andy!</div> <div class="blackbox"> <ul> <li><a href="#">Invite Friends</a></li> <li><a href="#">My Account</a></li> <li><a href="#">Cart</a></li> <li><a href="#">Sign Out</a></li> </ul> </div> </div> </div> </header> And I want them to look something like this: <header> <div class="wrapper"> <img src="images/logo.png"> <div class="userbox"> <div class="welcome">Welcome Andy!</div> <div class="blackbox"> <ul> <li><a href="#">Invite Friends</a></li> <li><a href="#">My Account</a></li> <li><a href="#">Cart</a></li> <li><a href="#">Sign Out</a></li> </ul> </div> </div> </div> </header> Or some sane default. What's the easiest way to go about doing this from the terminal in ubuntu for all of the html files in the current directory?

    Read the article

  • find substring and indices in mips

    - by ccc
    im trying find out substring and first occurrence indices. but something wrong. im comparing each element of pattern array and each element of string array until pointer reach to '\0'. and if any characater found it keep in temp array. and increasing pointers +1. whats the problem. algorithm is totaly wrong ? #Note: $v0 is a symbolic name used by the assember for $2. # $a0 is a symbolic name used by the assember for $4. .data prompt_str: .asciiz "Please type a text string: " prompt_ptr: .asciiz "Please type a pattern string: " print_yes: .asciiz "Yes, there is a match." print_no: .asciiz "No, there is no match." text_str: .asciiz "Text string : " pattern_str: .asciiz "Pattern string : " print_out: .asciiz "Output to be produced :" print_dash: .asciiz "----------------------" print_index: .asciiz "Starting index :" print_msg : .asciiz "Length of longest partial match = " nl: .asciiz "\n" str : .space 81 ptr : .space 81 tmp : .space 81 .text main: la $a0, prompt_str li $v0, 4 #print_string command. syscall la $a0,str #read string li $a1,81 li $v0,8 syscall la $t0,str #move string to $t0 la $a0,prompt_ptr li $v0,4 #print pattern command syscall la $a0,ptr #read pattern li $a1,81 li $v0,8 syscall la $t1,ptr #move pattern to $t1 la $t5,tmp #move temp to $t5 lb $t2,0($t0) #pointer first element array of string lb $t3,0($t1) #pointer first element array of pattern lb $t6,0($t5) #pointer first element array of temp loop : beq $t3,$0,end_loop beq $t2,$t3,match addiu $t0,$t0,1 j loop match : move $t6,$t2 addiu $t5,$t5,1 addiu $t0,$t0,1 addiu $t1,$t1,1 j print_match print_match : la $a0,text_str #print string li $v0,4 syscall move $a0,$t0 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,pattern_str #print pattern string li $v0,4 syscall move $a0,$t1 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,print_out #print output line and newline character li $v0,4 syscall la $a0,nl li $v0,4 syscall la $a0,print_dash li $v0,4 syscall la $a0,print_yes li $v0,4 syscall la $a0,print_index #print starting index li $v0,4 syscall li $v0,10 syscall end_loop : li $v0,10 syscall

    Read the article

  • what is the jquery selector syntax to select this LI item

    - by Jonathan Lyon
    hi all I need to select each list item and change the background image of the parent div homepagecontainer but I can't even select the li element in my script. Here is the code: <div class="transparent" id="programmesbox"> <ul id="frontpage"> <?php query_posts('showposts=20&post_parent=7&post_type=page'); if (have_posts()) : while (have_posts()) : the_post(); ?> <li id="<?php the_id() ?>" ><a class="sprite" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> </ul> </div> I need to do something like this <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $('#frontpage li a').hover(function() { alert('here'); //CHANGE BACKGROUND IMAGE OF 'homepage_container' to different image depending on which list item is hovered over } ); </script> This is the URL of the site:- http://www.thebalancedbody.ca/ Thanks so much!! Jonathan

    Read the article

  • jQuery Accordion

    - by Fuego DeBassi
    Just wondering if anyone can provide some basic advice on an accordion I'm trying to simplify. Got a working version, but it seems way overly complex. Here is my new JS. $(document).ready(function() { $("#themes li ul").hide(); $("#themes li").hover(function() { $("ul").show(); }, function() { $("li ul").hide(); }); The markup looks like this: <ul> <li>Tier 1 <ul> <li>Tier 2</li> <li>Tier 2</li> </ul> </li> <li>Tier 1 <ul> <li>Tier 2</li> <li>Tier 2</li> </ul> </li> </ul> My script works alright. But it shows all of the child ul's when any parent li is hovered, and it hides all the child ul's when unhovered. Just not sure how I can get it to A.) Only .show the li ul when that specific li is hovered. And B.) Hide the shown li ul only when another one is hovered (not itself). Example + explanation would be especially helpful! Thanks!!

    Read the article

  • jQuery Accordian

    - by Fuego DeBassi
    Just wondering if anyone can provide some basic advice on an accordion I'm trying to simplify. Got a working version, but it seems way overly complex. Here is my new JS. $(document).ready(function() { $("#themes li ul").hide(); $("#themes li").hover(function() { $("ul").show(); }, function() { $("li ul").hide(); }); The markup looks like this: <ul> <li>Tier 1 <ul> <li>Tier 2</li> <li>Tier 2</li> </ul> </li> <li>Tier 1 <ul> <li>Tier 2</li> <li>Tier 2</li> </ul> </li> </ul> My script works alright. But it shows all of the child ul's when any parent li is hovered, and it hide's all the child ul's when unhovered. Just not sure how I can get it to A.) Only .show the li ul when that specific li is hovered. And B.) Hide the show'n li ul only when another one is hovered (not itself). Example + explanation would be especially helpful! Thanks!!

    Read the article

  • how to get items that hasnot got a certain class in jquery?

    - by manraj82
    <ul id ='caseStudies'> <li class="humor crime fantasy hidden"> A </li> <li class="crime"> B </li> <li class="humor crime hidden"> C </li> <li class="humor crime"> D </li> <li class="humor crime fantasy action hidden"> E </li> <li class="fantasy action"> F </li> <li class="humor fantasy"> G </li> <li class="crime action hidden"> H </li> </ul> $('ul#caseStudies li.hidden').each(function() { }//this will get all the LI in the UL that has got class 'hidden' But how do i get all the LI in the UL that hasn got a class 'hidden'?

    Read the article

  • mootools get data of child element of li?

    - by sea_1987
    Hi there, I am trying to get some information of a child element of an li using mootools, essentially my html looks like this, <li><a href="/home" id="home" class="nav-link">Home</a></li> I am wanting to be able get the id, class and href of the a tag using mootools, so far my javascript looks similar to this, $$('.rate').each(function(element,i){ element.addEvent('click', function(){ var myStyles = ['nostar', 'onestar', 'twostar', 'threestar', 'fourstar', 'fivestar', 'sixstar', 'sevenstar', 'eightstar', 'ninestar', 'tenstar']; myStyles.each(function(myStyle){ if(element.getParent().hasClass(myStyle)){ element.getParent().removeClass(myStyle) } }); myStyles.each(function(myStyle, index){ if(index == element.id){ element.getParent().toggleClass(myStyle); var req = new Request({ method:'post', url: '/recipes/save', data: {'rating' : element.id}, onRequest: function(){ alert('Request made. Please wait...');}, onComplete:function(response){ alert('Response:' + response);} }).send(); alert('Clicked '+element.id); alert(element.getChildren().get('href'); } }); }); }); The final alert in the script is my attempt to the child of the li(element) and its href.

    Read the article

  • jQuery: How to make `real-time pager` depending on browser screen size without `content` refreshing?

    - by Binyamin
    jQuery: How to make real-time pager depending on browser screen size without content refreshing? Example for it you can see in http://www.nytimes.com/chrome/ HTML and CSS in http://jsfiddle.net/laukstein/qjGrV/ #content{ display:block; width:100%; height:40%; min-height:205px; max-height:408px; overflow:hidden; } li{ width:100px; height:100px; margin:1px; float:left; background:#ccc; } ... <ul id="content"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> ... </ul> <div id="pager"><!--here lets show 1,2,3,4 etc. depending on screen size--></div>

    Read the article

  • How do I select only the 4th and higher LIs in each UL?

    - by KatieK
    For this XHTML: <ul class="collapse"> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul> <ul class="collapse"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> Using jQuery, how do I select only the 4th and higher LIs in each UL? I've tried: $("ul.collapse li:gt(2)").css("color", "red"); But it selects the 4th and higher LIs in the whole document. "Four", "Five", and "1", "2", "3", "4" are red.

    Read the article

  • navigation li to create <span></span> around text via jquery

    - by MikesEpitaphSays
    I've been trying all day and reading a few things, but for some reason my code isn't working right What i'm trying to achieve is this: When i create an un ordered list in my index page - I want my jquery to automatically add around the text in the anchor. So i want it to look like this <li><a href="index.htm"><span>Home</span></a></li> while I am only adding: <li><a href="index.htm">Home</a></li> I want to do this because i have a LOT of list items and instead of writing when i'm adding pages it makes the most sense to save some time in the long run and create a loop that will handle that anytime i add one. This is What i have so far (sorry if it looks ugly): $('document').ready(function () { var begSpan = "<span>"; var endSpan = "</span>"; $('p').each(function () { $(this) prepend(begSpan); }).append(endSpan); }); How can i get that to auto create span tags for me

    Read the article

  • infix operation to postfix using stacks

    - by Chris De La O
    We are writing a program that needs to convert an infix operation (4 5/3) to postfix (4 5 3 / ) using stacks. however my convert to postfix does not work as it doesnt not output the postFix array that is supposed to store the conversion from infix notation to postfix notation. here is the code for the convertToPostix fuction. //converts infix expression to postfix expression void ArithmeticExpression::convertToPostfix(char *const inFix, char *const postFix) { //create a stack2 object named cow Stack2<char> cow; cout<<postFix; char thing = '('; //push a left parenthesis onto the stack cow.push(thing); //append a right parenthesis to the end of inFix array strcat(inFix, ")"); int i = 0;//declare an int that will control posFix position //if the stack is not empty if (!cow.isEmpty()) { //loop to run until the last character in inFix array for (int x = 0; inFix[x]!= '\0'; x++ ) { //if the inFix element is a digit if (isdigit(inFix[x])) { postFix[i]=inFix[x];//it is assigned to the next element in postFix array i++;//move on to next element in postFix } //if the inFix element is a left parenthesis else if (inFix[x]=='(') { cow.push(inFix[x]);//push it unto the stack } //if the inFix element is an operator else if (isOperator(inFix[x])) { char oper2 = inFix[x];//char variable holds inFix operator if (isOperator(cow.stackTop()))//if the top node in the stack is an operator { while (isOperator(cow.stackTop()))//and while the top node in the stack is an operator { char oper1 = cow.stackTop();//char variable holds node operator if(precedence( oper1, oper2))//if the node operator has higher presedence than node operator { postFix[i] = cow.pop();//we pop such operator and insert it in postFix array's next element cow.push(inFix[x]);//and push inFix operator unto the stack i++;//move to the next element in posFix } } } //if the top node is not an operator //we push the current inFix operator unto the top of the stack else cow.push(inFix[x]); } //if the inFix element is a right parenthesis else if (inFix[x]==')') { //we pop everything in the stack and insert it in postFix //until we arrive at a left paranthesis while (cow.stackTop()!='(') { postFix[i] = cow.pop(); i++; } //we then pop and discard left parenthesis cow.pop(); } } postFix[i]='\0'; //print !!postFix array!! (not stack) print();//code for this is just cout<<postFix; }

    Read the article

  • jQuery / Dynatree: How to use Json or ul/li together with IFrame sample

    - by ggerri
    Hi I'm a newbie with dynatree, but happy that i've found this supercool plugin. On the dynatree site, I've found an example how to use it with IFrames http://wwwendt.de/tech/dynatree/doc/sample-iframe.html I was able to adapt the IFrame example successfully. But i'm a bit stuck here, because I'd like to load the tree either via UL/LI or better, with Jason/Ajax. my problem now is, that I dont understand how to provide ther url/links with LI or Jason, so that clicking an entry still opens the linked site in the iframe. Also don't know how I have to format parents/children/subchildren in Json.. Would anybody be so kind to give a sample with iframe and jason/ajax or iframe with ul/li? Thanks a lot :-) G

    Read the article

  • Javascript Noob: How to emulate slideshow on front page by automatically cycling through existing ho

    - by Zildjoms
    hey everyone. hope you could help me out am working on this website and i've finished all the hover effects i like - they're exactly how i want them to be: http://s5ent.brinkster.net/beta3.asp - try hovering over the four links and you'll see a very simple fade effect at work, which degrades into a regular css hover without javascript. what i plan to do is to make the page look like it had a fancy slideshow going on upon loading and while idle, and i wanted to achieve that by capitalizing on the existing hover styling/behavior of the main page links instead of using another script to create the effect from scratch. to do this i imagined i'll need a script that emulates a hover action on each link at regular time intervals once the page has loaded, starting from left to right (footcare, lawn & equipment, about us, contact us), looping through all 4 links indefinitely (footcare, lawn & equipment, about us, contact us, footcare, lawn& equipment, etc.) but pauses when any of them have been actually hovered over by a viewer and resumes from wherever the user left off upon mouseout. hope you get my drift... i also want to achieve this without unnecessarily disrupting the current html. so i guess everything will have to be done by scripting as much as possible.. i'm very new to javascript and jquery. as you can see at s5ent.brinkster.net/beta3.1-autohover.asp, the following script i made works wrong: it hovers-on all of them at the same time and doesn't hover-out anymore. when you try to actually hover into and out of each link the link just comes back on: <script type="text/javascript"> $(document).ready(function () { var speed = 5000; var run = setInterval('rotate()', speed); }); function rotate() { $('.lilevel1 a').each(function(i) { $(this).mouseover(); }); } </script> it's just gross. aside from the fact that this last bit of script isn't even working in ie. could you please help me make this thing happen? that'd be really sweet, guys. i know there are tonsa geniuses out there who could whip this up in no time. or if you have a better way to go about it by all means kindly lemme know. thanks guys, hope you're all havin a blast.

    Read the article

  • Ho to stop scrolling in a Gallery Widget?

    - by Alexi
    I loaded some images into a gallery. Now I'm able to scroll but once started scrolling the scrolling won't stop. I would like the gallery to just scroll to the next image and then stop until the user does the scroll gesture again. this is my code import android.widget.ImageView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; public class GalleryExample extends Activity { private Gallery gallery; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); gallery = (Gallery) findViewById(R.id.examplegallery); gallery.setAdapter(new AddImgAdp(this)); gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { Toast.makeText(GalleryExample.this, "Position=" + position, Toast.LENGTH_SHORT).show(); } }); } public class AddImgAdp extends BaseAdapter { int GalItemBg; private Context cont; private Integer[] Imgid = { R.drawable.a_1, R.drawable.a_2, R.drawable.a_3, R.drawable.a_4, R.drawable.a_5, R.drawable.a_6, R.drawable.a_7 }; public AddImgAdp(Context c) { cont = c; TypedArray typArray = obtainStyledAttributes(R.styleable.GalleryTheme); GalItemBg = typArray.getResourceId(R.styleable.GalleryTheme_android_galleryItemBackground, 0); typArray.recycle(); } public int getCount() { return Imgid.length; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView imgView = new ImageView(cont); imgView.setImageResource(Imgid[position]); i.setScaleType(ImageView.ScaleType.FIT_CENTER); imgView.setBackgroundResource(GalItemBg); return imgView; } } } and the xmlLayout file <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" > <Gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/examplegallery" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout>

    Read the article

  • Ul Li last element not aligning properly

    - by Chase
    I am having a problem where the last li element in a ul is pushing itself to the left further than the rest of all my pieces. Attached is a screen shot and my code. I have tried using the last-child element but it doesn't work in Safari or Chrome. #attending ul { display: inline; margin: 0 5px 0 0; padding-left: 0px; } #attending ul li { display: inline; list-style-image:none; padding: 5px; } #attending li:last-child { margin-right:-4px; } Suggestions? TIA, Chase http://desmond.yfrog.com/Himg338/scaled.php?tn=0&server=338&filename=screenshot20100526at808.jpg&xsize=640&ysize=640

    Read the article

  • how to write this typical mysql query( ho to use subquery column into main query)

    - by I Like PHP
    I HAVE TWO TABLES shown below table_joining id join_id(PK) transfer_id(FK) unit_id transfer_date joining_date 1 j_1 t_1 u_1 2010-06-05 2010-03-05 2 j_2 t_2 u_3 2010-05-10 2010-03-10 3 j_3 t_3 u_6 2010-04-10 2010-01-01 4 j_5 NULL u_3 NULL 2010-06-05 5 j_6 NULL u_4 NULL 2010-05-05 table_transfer id transfer_id(PK) pastUnitId futureUnitId effective_transfer_date 1 t_1 u_3 u_1 2010-06-05 2 t_2 u_6 u_1 2010-05-10 3 t_3 u_5 u_3 2010-04-10 now i want to know total employee detalis( using join_id) which are currently working on unit u_3 . means i want only join_id j_1 (has transfered but effective_transfer_date is future date, right now in u_3) j_2 ( tansfered and right now in `u_3` bcoz effective_transfer_date has been passed) j_6 ( right now in `u_3` and never transfered) what i need to take care of below steps( as far as i know ) <1> first need to check from table_joining whether transfer_id is NULL or not <2> if transfer_id= is NULL then see unit_id=u_3 where joining_date <=CURDATE() ( means that person already joined u_3) <3> if transfer_id is NOT NULL then go to table_transfer using transfer_id (foreign key reference) <4> now see the effective_transfer_date regrading that transfer_id whether effective_transfer_date<=CURDATE() <5> if transfer date has been passed(means transfer has been done) then return futureUnitID otherwise return pastUnitID i used two separate query but don't know how to join those query?? for step <1 ans <2 SELECT unit_id FROM table_joining WHERE joining_date<=CURDATE() AND transfer_id IS NULL AND unit_id='u_3' for step<5 SELECT IF(effective_transfer_date <= CURDATE(),futureUnitId,pastUnitId) AS currentUnitID FROM table_transfer // here how do we select only those rows which have currentUnitID='u_3' ?? please guide me the process?? i m just confused with JOINS. i think using LEFT JOIN can return the data i need, but i m not getting how to implement ...please help me. Thanks for helping me alwayz

    Read the article

  • Ho to get PHP setrawcookie value back?

    - by user250343
    The IETF recommends to use base64 encoding for binary cookie values. http://tools.ietf.org/html/draft-ietf-httpstate-cookie-07 So I use setrawcookie(..) but I don't know what variable to use to get the cookie back because $_COOKIE[..] still uses the URL decoding that matches setcookie(..). This replaces "+" with " " in the output. <?php var_dump($_COOKIE['TEST']); $binary_string = ""; for($index = 0; $index < 256; $index++){ $binary_string .= chr($index); } $encoded_data = base64_encode($binary_string); var_dump($encoded_data); $cookie_set = setrawcookie('TEST', $encoded_data, time() + 3600); ?

    Read the article

  • Ho to launch Choose File dialog on Mac

    - by Manish
    Hi All, I am using LSOpenItemsWithRole() to open any file from my appication. It works fine for all files which has a default application to get opened on Mac, but for the files which cannot be open with any default application this method returns an error kLSApplicationNotFoundErr and does nothing. For such cases I want my application to launch the "Choose Application" dialog box, so that end user can choose any application from there to open the file. This dialog box pops up whenever any such file is directly opened by double clickig. Is there is any direct API call to do the same? any help will be appreciated, Thanks in advance! Manish

    Read the article

  • Ho to add dynamic table list to a Fullcalendar page

    - by Dave Burton
    I have implemented a Fullcalendar on a RoR page. I would like to add a list (index) below the calendar showing events for the day the user selects. Click on a day and that days events list below the calendar. I'd like it to be dynamic (don't reload the whole page). Please point me in the right direction to learn how to do this. I have a subscription to Railscast. But, I'm not sure what to look for. Thanks

    Read the article

  • How to replace '<p>' with '<li>' in an array in jQuery?

    - by Devyn
    Hi, Let's say I have this $(document).ready(function() { var array = $.makeArray($('p')); $(array).appendTo(document.body); }); }); <p>how</p> <p>are</p> <p>you</p> <p>baby?</p> If I want to replace <p> with <li> and expected output is ... <li>how</li> <li>are</li> <li>you</li> <li>baby?</li> What should I do? Thanks in advance!

    Read the article

  • wrapping the content of a span inside an li so it stays in its own column

    - by codergeek
    hello, I have a list, each li in it has this structure: <li> <img class="yes" src="..."> <img class="no" src="..."> <span class="a">...</span> <span class="b">...</span> </li> now if the content of class b is long, it will wrap around the image. I don't want it to wrap under the image, I want it to stay in its own column. If there is anyway to do this, please let me know as using tables to do it will be just wrong. Thanks! Nima

    Read the article

  • Find the 5th element with a specified class in a list and add another class in jQuery

    - by Répás
    I'd like to addClass "green" to the 5th li.hr in every ul containers in my site. $("ul li.hr").each(function() { if ($(this).length = 5) { $(this).addClass("green"); } }); PS: if its possible with CSS only, tell me how please. Note that the ul has mixed elements, like: <li class="a">foo</li> <li class="b">foo</li> <li class="hr">foo</li> <li class="c">foo</li> <li class="a">foo</li> <li class="hr">foo</li> I need the 5th li.hr.

    Read the article

  • Assigning data to an <li> element?

    - by user246114
    Hi, I am generating some list items as a result of a search, and I want to attach some data to each list element from the search (possibly a bad idea to merge ui and data), but now curious about it. I am doing this: var element = $("<li>Hello</li>); element.mydata = "foo"; element.appendTo("#panelParent"); so I'm just assigning my stuff to element.mydata. My click handler reports that no such data exists for the element when clicked: $('#panelParent').delegate('li', 'click', function() { // this.mydata is undefined. }); where did it go to? I could keep the data external to the a list item element, was wondering if there's a convenient way like this to just keep it bound though? Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >