<?php $host = "localhost"; $usr = "root"; $pwd = ""; $db= "DB"; conOpen($host,$usr,$pwd,$db); function conOpen($host,$usr,$pwd,$db){ $con=mysql_connect($host,$usr,$pwd) or die ("Connection Failed "); mysql_select_db($db,$con);} $rows_per_page=5; // database connection stuff here $result=mysql_query("Select * from newsimage"); $pages=ceil(mysql_num_rows($result)/$rows_per_page); if (!isset($screen)) $screen = 0; else echo $_GET[screen]; /* $start = $screen * $rows_per_page; $sql = "SELECT nId FROM newsimage "; $sql .= "LIMIT $start, $rows_per_page"; $result = mysql_query($sql); $rows = mysql_num_rows($result); for ($i = 0; $i < $rows; $i++) { $description = mysql_fetch_array($result); echo "\$description = $description[nId]<br>\n"; } echo "<p><hr></p>\n"; // let's create the dynamic links now if ($screen > 0) { $url = "z.php?screen=" . …

Member Avatar
Member Avatar
+0 forum 19

I am working on Image Viewer How do I work on the Action button to display images one after the other with Next and Previous

Member Avatar
Member Avatar
+0 forum 1

Node inside a linkedlist SomeInterface has an addLast() method that should add a node at the end of the list public LinkedList<T> implements SomeInterface<T>{protected class Node<T>{ privateT data; private Node<T> head,tail; protected Node(T data,Node<T>tail){ this.data=data;head=null;this.tail=tail;} private T getInfo(){return this.data;} private void setTail(Node<T>newTail){this.tail=newTail;} private void setLink(Node<T>newHead){this.head=newHead;} private Node<T> getLink(){return tail;} }} public void addLast(){ } }//end of LinkedList<T> class when I create a LinkedList object (`LinkedList<String>somelist=new LinkedList<T>()`) and try to append multiple items (`somelist.append("William");somelist.append("Fredk rick"`);somelist.append(`Maria`)) only the last item/string gets appended to the list. Any reason why?

Member Avatar
Member Avatar
+0 forum 2

Hiya, please can you help: In my poker program I used to have loads of code for the 10 player slots, I used to ElseIf through each player in each player spot. Tonnes of code. Now I want to loop through so I have only one set of code. The dropdown Boxes are called: Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Player9, Player10 The problem I have is the correct code to replace the number after the word PLAYER. ie: If Player(PlayX) = "YT" Then There seems to be some syntax problem with the way I'm doing the Player(PlayX) …

Member Avatar
Member Avatar
+0 forum 6

Hello Everyone, I am trying to compute the subscription next due date. For example, these are the subscription dates: 1/28/13 1/29/13 1/30/13 1/31/13 When I used the php function strtotime( "+1 month", <date> ) the next month due date will be: 1/28/13 due date is 2/28/13 1/29/13 due date is 3/1/13 1/30/13 due date is 3/2/13 1/31/13 due date is 3/3/13 With this, it will change the due date of the subscriber even though other months have the 29th, 30th and 31st. Can you please provide any suggestions or options on how to handle this? Thanks in advance

Member Avatar
Member Avatar
+0 forum 5

I have to do a second assigment on doubly linked lists. Problem description: Create a class to implement a doubly linked list to store student records. Besides the basic operations, the class should include a sorting method that allow the user to sort the records in the list. Programming Requirements: 1. Create a doubly linked list in Java. Each element in the list contains a data which is an object of a Student class and two links, next and previous. 2. The Student class contains two class fields only: name - The first and last names are in one string …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am not for sure if I am posting in the correct room. I have a flash photo gallery question. I am making a flash webpage using CS4 using a previous and next button. Both the previous and next button work but one problem. It does not stop at the first gallery instead it goes all the way to the end to the very last gallery. Example. One gallery is name food, the next family, and after sports, and etc. The next and previous button goes to the next gallery without stopping. My question is, is there a way …

Member Avatar
Member Avatar
+0 forum 2

Hello, I have a problem that I'm pretty sure I already got done before but I got lost since I didn't note down my changes with my code. My problem is that I need my displayed calendar to move fluidly showing the next 4 months and the previous 4 months. This is my calendar php. </table></td> </tr> <tr> <td align=center> <? print "<table cellpadding=1 cellspacing=0 border=0>"; for($i=0;$i<1;$i++) { print "<tr>"; for($j=0;$j<4;$j++) { print "<td>"; $cal->SetDate($month,$year); $cal->Show(); $month++; if ($month==13) { $month=1; $year++; } print "</td>"; } print "</tr>"; } print "</table>"; if ($page>1) { $prev=$page-1; print "<a class=\"link\" href=\"".$_SERVER['PHP_SELF']."?p=$prev\">Prev</a>&nbsp;"; } …

Member Avatar
Member Avatar
+0 forum 1

I do have 2 structures here. main linked list is the word. each node of the word list do have a meaning typedef struct node{ char word[20]; struct node2 *meaning; struct node *next; }word; typedef struct node2{ char meaning[100]; struct node2 *next; }means; My problem now is I can't add multiple meanings. I can just add 1 meaning and whenever i try to add, it overwrites the previous meaning instead., how can i do this? this is how i add meaning word *tmp2=(*head); means *tmp3; tmp3=(means *)malloc(sizeof(means)); if(tmp2==NULL){ printf("\n**List still empty, add a word**\n"); return; } do{ if(strcmp(tmp2->word,ins)==0){ tmp2->meaning=tmp3; strcpy(tmp3->meaning,mea); …

Member Avatar
Member Avatar
+0 forum 5

Combining queue and stack link list? hello so here is my question i ave to connect a link lists together, one who behaves like a stack the other like a queue.the numbers used are 11 22 44 77 33 99 66. so the stack link list looks like this 66 99 33 77 44 22 11 queue link list looks like this 11 22 44 77 33 99 66 what i need to do is combine both, connect the stack to the queue to make a new link list with 14 numbers. new link list should look like this 66 …

Member Avatar
Member Avatar
+0 forum 1

Hello First of all, I'm new to PHP, and also to Daniweb. I've been looking everywhere for some PHP code to skip to the next line every time my string ($description) has a period in it. So here's an example of what I want to achieve: Text: The car is green. The tree is yellow What I want it to be: The car is green. The tree is yellow. Thanks in advance!

Member Avatar
Member Avatar
+1 forum 3

HI Could yu please tell me how to get previous values from current iteration in the below example : public void parseDtoCollection(Collection dtos) contains list of dtos in private AssetClassVersion createNewAssetClassVersion(AssetDTO dto) method i am iterating but i want to get to get previous itearation values in current iteration if the dto.assetClassId is same then i want to append like previous matchedstring value + current matchedstring value public void parseDtoCollection(Collection dtos) { for (Iterator i = dtos.iterator(); i.hasNext();) { AssetDTO dto = (AssetDTO) i.next(); AssetClass assetClass = findAssetClass(dto.assetClassId); AssetClassVersion assetClassVersion = createNewAssetClassVersion(dto); assetClass.addVersion(assetClassVersion); if (dto.id > 0) { InformationAsset infoAsset …

Member Avatar
Member Avatar
+0 forum 6

# How do i do a previous and next buttons with ajax and get different results on same page? # Im fairly new to coding so i need some help. im trying to build a web site for geology ( rocks, etc). My concept is this. How do i use Ajax to display 3 previous/next results when you onclick(once or many times) a previous/next button and it displays the results each time on the same page? The current page has 3 results from a query the one on the far right is the latest result. Here is the code: 2 …

Member Avatar
+0 forum 0

My process is to multiply the given points in B8, D8, F8, H8, J8, L8, and N8 to A3, B3, C3, D3, E3, F3, G3 respectively. this procedure is to be processed in C8, E8, G8, I8, K8, M8, and O8. after multiplying, the process should perform =sum(C8,E8,G8,I8,K8,M8,O8) to P8. I have this code which is according to recorded macro. ~~~ vb Sub compute() ' ' compute Macro ' ' ActiveWindow.ScrollColumn = 9 ActiveWindow.ScrollColumn = 6 ActiveWindow.ScrollColumn = 5 ActiveWindow.ScrollColumn = 4 ActiveWindow.ScrollColumn = 3 ActiveWindow.ScrollColumn = 2 ActiveWindow.ScrollColumn = 1 Range("C8").Select ActiveCell.FormulaR1C1 = "=RC[-1]*R[-5]C[-2]" Range("E8").Select ActiveCell.FormulaR1C1 = "=RC[-1]*R[-5]C[-3]" Range("G8").Select …

Member Avatar
Member Avatar
+0 forum 1

The End.