Hie,I have Merge Sort Program .It's giving correct output but when checked through debugger it gives different values everytime.I also tried doing it manually but I am not getting the actual output. I will not ask now for complete program explanation. I just want to know the value over here.This is the half program. #include<stdio.h> int main() { int i,low,high,n,a[10]; printf("how many elements"); scanf("%d",&n); printf("\nEnter the elements"); for(i=0;i<n;i++) scanf("%d",&a[i]); low=0; high=n-1; msort(a,low,high); printf("The sorted array is "); for(i=0;i<n;i++) printf("\n%d",a[i]); return 0; } msort(int a[],int low,int high) { int mid; if(low<high) { mid=(low+high)/2; msort(a,low,mid); // values are correct here msort(a,mid+1,high); // …

Member Avatar
Member Avatar
+0 forum 1

Hey guys. I am having a hard time getting this started. I need to have a page where a user can select or de-select (check boxes, radio doesnt matter) pdfs and then have the selected pdfs merged into a single pdf. I have used [PDF Merger](http://pdfmerger.codeplex.com/) in the past but I used it in a different way. I need a page with a list of pdfs that can be selected and posted to this pdf merger. Any ideas? I am still a PHP novice but I am learning, although slowly... Happy New Year Everyone!

Member Avatar
Member Avatar
+0 forum 9

Hi Guys, I have a big problem. I want to merge two oft/msg outlook templates. when I try to open my oft/msg outlook template with: Outlook.Application oApp = new Outlook.Application(); Outlook.MailItem newMail = (Outlook.MailItem)oApp.CreateItemFromTemplate(path); newMail.Display(); It works - pictures are visible.. The problem is that I need to merge two templates into one email. I tried to copy one HTMLBody to string and to add it to other HTMLBody It works - but pictures dissapear :( IS there any way to achieve that including the pictures?? HELP!

Member Avatar
Member Avatar
+0 forum 6

Hi i was facing merge conflict problem from few days. I tried to get conflict file from remote i.e theirs . But i was failed to get remote conflict file to edit . So i removed all the files in local and tried to push the empty folder which contains only .git folder files. Its updated in bitbucket but it is not getting updated on remote server aws. Still i was facing merge conflict issue. How can i over come this issue. If anyone know about this issue let me know.Thankks in advance

Member Avatar
+0 forum 0

I suppose to write a Java program using array and method follows: It reads a sequence of strings, each on a separate line, and stores them in an array, let call it input1, with one string per cell, in the order they were read. The sequence ends with an empty line: one with a String of length 0. Same thing with 2nd sequence.Then prints the 1st sequence and 2nd sequence. And then create an array that contains all of the elements of the above two arrays. Merging is done by alternating between the arrays: that is, the first cell of …

Member Avatar
Member Avatar
+0 forum 1

** # i am tring to merge two array but every time its display first array proparly but in second array its only display last element....thx....# ** #include<stdio.h> #include<conio.h> void main() { int a[10],b[10],i,j,c,d,e; clrscr(); printf("how many number in first array="); scanf("%d",&c); printf("how many number in second array="); scanf("%d",&d); printf("\nenter %d number for fist array\n",c); for(i=1;i<=c;i++) { scanf("%d",&a[i]); } printf("\nenter %d number for second array\n",d); for(j=1;j<=d;j++) { scanf("%d",&b[j]); } e=c+d; for(i=c+1;i<=e;i++) { for(j=1;j<=d;j++) { a[i]=b[j]; } } printf("\nafter merge two array"); for(i=1;i<=e;i++) { printf("\t%d",a[i]); } getch(); }

Member Avatar
Member Avatar
+0 forum 2

Hi, I would like to know how to merge 2 daniweb accounts because there was a time I accidentally created a new account (Username: samuel1991) via Facebook which used a slightly different email address (samuel_lee_1991@qq.com) from my main email address (samuel_lee_1991@hotmail.com) used in Daniweb. TYVM

Member Avatar
Member Avatar
+0 forum 1

Hi there everyone, I'm a bit new to see and I need your help please. I'm stuck with a merge sort problem where it's support to sort my nodes in lexicographical order. Can you please have a look on my code because i've posted everywhere and i'm not getting the answers i'm looking I'm a newbie so sorry if i don't explain myself correctly. It's just not running my case 8 on my main. Any ideas how to fix that? // // main.c // Double Linked List // // Created by Yann Bohbot on 12/22/13. // Copyright (c) 2013 Yann …

Member Avatar
+0 forum 0

Hi All, I was assigned to code a project which to some extend simulates timetable of an airport. This has to be implemented using linkedLists. The poject should consist of Node class and SLL (singly linked list) class. The logic of the project is like this: There should be a clock which ticks every 15 minutes in the main function; I created flight.h file and included all the information related to a flight within. What confuses me here is just some parts of the code related to mergeSort and quickSort. The project asks to sort all the flights: 1. based …

Member Avatar
Member Avatar
+0 forum 3

hello fellow programmers, i am doing an assignment for class and i am having a bit of trouble. So the assignments reads Given two sorted (in ascending order) lists of size M and N, write an O(M+N) algorithm to find the sorted (also in ascending order) union of the two lists. Assume each list contains no duplicate items. I know that i want to use a MergeSort to merge the two lists together, i just dont know how to write in code. So far i have: template<typename T> list<T> listUnion(const list<T>& one, const list<T>& two) { list<T> result; std::list<T>::iterator modifIter; …

Member Avatar
Member Avatar
+0 forum 3

Say I have 2 tables: Table 1 Name - Toys - broken Jack 6 4 John 8 3 Mary 8 2 Nina 6 0 Table 2: Name - ID Mary 1 John 3 Jack 2 Nina 4 I need to merge Table 1 into table 2 and get the ID column to match up with the persons name. Notice the orders of both tables are different, and the only common field is the name How do i do this? Thank you.

Member Avatar
Member Avatar
+0 forum 1

This is an assingment i've been working on but since this is a merge between two previous developments i need a little help solving my issue here that would be highly appreciated. In a nutshell what this program needs to do is recieve a .txt file create a vector holding all this values and apply them some sorting algorithms. Here's the code i wrote so far but as i said before what i think i need is a function to convert the vector values to an int array but i'm stuck there, so any help is appreciated. Main.cpp #include <iostream> …

Member Avatar
Member Avatar
+0 forum 3

Hello, I'm having a little trouble with a some code that I'm writing for homework. Basically, I'm taking two files that contain numbers and merging the contents into another file. The files do not have the same amount of numbers in them (one might contain 7 while the other contains 10) and the numbers are sorted from small to large in each file al ready. My problem is that not all the numbers are being written to the output file. Here is the code below: #include <iostream> #include <fstream> using namespace std; void MergeFiles(ifstream&, ifstream&, ofstream&); int main() { ifstream …

Member Avatar
Member Avatar
+0 forum 3

i need to join those two peice of code the first peice of code takes a csv file from a textarea formats it and put it into a mutidimentional array <?php if(isset($_POST['TextArea1'])){ $str = $_POST['TextArea1']; $patterns = array("/\t+/", "/ +/"); //set up an array of items to replace $str = preg_replace($patterns, ' ', $str); $lines = explode("\n", $str); $parsedArray = array(); foreach ($lines as $line) { $parsedArray[] = str_getcsv($line, ' ', '"', '\'); } echo "<pre>"; print_r($parsedArray); echo "</pre>"; } ?> <form method="post" > <textarea name="TextArea1" id="TextArea1" rows="10" cols="50"></textarea> <input type="submit" value="Parse" name="submit" /> </form> now i need to insert …

Member Avatar
Member Avatar
+0 forum 39

hey hai eveybody help me in sql..i have three fields namely passengerGender1,passengerGender2,passengerGender3 in single table..now i want to take count for female and male separately from the three fields..it is posssible friends?can anyone help me???thanks in advance...!!

Member Avatar
Member Avatar
+0 forum 2

Hi, All, I am just wondering is this is doable. I've tried searching it in google but still no luck. I want to merge my 2 CSV files by column. For example: File: coded.csv "Header A","Header B","Header C" "Data A","Data B","Data C" "Data A","Data B","Data C" "Data A","Data B","Data C" "Data A","Data B","Data C" File: truth.csv "Header D","Header E","Header F" "Data D","Data E","Data F" "Data D","Data E","Data F" "Data D","Data E","Data F" "Data D","Data E","Data F" Output should be: Final.csv "Header A","Header B""Header C","Header D","Header E","Header F" "Data A","Data B","Data C","Data D","Data E","Data F" "Data A","Data B","Data C","Data D","Data E","Data …

Member Avatar
Member Avatar
+0 forum 2

Is it possible to merge both the 2 element below so that they work on a single page. What i mean is this should be the background of the page: http://tympanus.net/Development/AnimatedResponsiveImageGrid/index3.html and a slideout contact form can appear at the corner over the background: http://www.building58.com/examples/tabSlideOut.html Is it possible, how?

Member Avatar
Member Avatar
+0 forum 3

Basically I got 2 calendar scripts from the same source. I saw a custom script before that merged these two but Everything I tried failed. Please help. Here are the 2 scripts. Script 1: $('#date3').DatePicker({ flat: true, date: ['2008-07-28','2008-07-31'], current: '2008-07-31', calendars: 3, mode: 'range', starts: 1 }); Script 2: $('#inputDate').DatePicker({ format:'m/d/Y', date: $('#inputDate').val(), current: $('#inputDate').val(), starts: 1, position: 'r', onBeforeShow: function(){ $('#inputDate').DatePickerSetDate($('#inputDate').val(), true); }, onChange: function(formated, dates){ $('#inputDate').val(formated); if ($('#closeOnSelect input').attr('checked')) { $('#inputDate').DatePickerHide(); } } }); Please help, I have a deadline and my head is already hurting.

Member Avatar
Member Avatar
+0 forum 2

Just wondering if anyone knows how to not save a document after creation when using Microsoft.Office.Interop.Word. Basically i am using mail merge to print off a report from c#, the document get made, values are passed to it no problem and i can then print it without any issues, however, I only need to print the document, I do not need to save a copy on the computer. Once i have passed all the values to the document, i use the following code to print and close the document: wordDoc.PrintOut(); wordDoc.Close(); wordApp.Application.Quit(); However, this prints the document and then the …

Member Avatar
Member Avatar
+0 forum 6

Hi. Does anyone know how to migrate a Merge Module project from .Net Framework 2.0 to 3.5? I have been able to move the WindowsFormApplications and msi project but got stuck with the msm. Thanks

Member Avatar
Member Avatar
+0 forum 8

Hello everyone, I need some help, I would like to merge two cells together within a row only (e.g) in a CSV file using python. So far, I have 4 columns in the file, but now I would like to merge two cells in one, but I don't have any clue how to do it. Can someone help me please? Thank you I used the code below to write in the file. print "write in file" fobj = open(rawPathOutput, "w") outputLine = "%s;%s;%s;%s " % ( "Section", "Points", "Lines", "Polygon" ) fobj.write(outputLine + "\n") for row in range(iRows): for col …

Member Avatar
Member Avatar
+0 forum 4

Hi all, hope you can give me some help to edit my code. I'm unaware how to merge two arrays and allocate them to a third array(of the right size) and let's just say for the sake of things, we'll call it C. I went ahead and instead used the StringTokenizer, but I assume there's a simpler way to put it together. (Also, I'm getting the data from a .txt file, for my instance the file is called "SortedArrays.txt") import java.io.*; import java.util.*; class SortedArrays { public static void main(String args[])throws FileNotFoundException{ File f = new File("SortedArrays.txt"); Scanner s =new …

Member Avatar
Member Avatar
+0 forum 5

I have two datatables that generate a datagridview like below: 1) datatable name : grpDT ![119](/attachments/large/3/119.JPG "119") 2) datatable name : grpTot ![211](/attachments/small/3/211.JPG "211") I want to merge both datatable so that I the datagridview will be like this: ![34](/attachments/large/3/34.JPG "34") what is the best way to do this? do i need to create new datatable and merge it?

Member Avatar
Member Avatar
+0 forum 3

If someone could help point me in the right direction, it would be much appreciated. My problem is merge sorting a list from a text file and outputting the sort into a different text file that the user chooses. The text file that's inputted is about a 20 item list of random integers that I created myself. The program builds and compiles, yet it doesn't merge sort at all. The mergeSort function is located in LinkedList.cpp. The way I used the .txt file to create nodes was implemented in LinkedList::createList. Is my implementation of the merge sort function itself wrong? …

Member Avatar
Member Avatar
+0 forum 1

Hi! I have a problem... I need to make simple upload script which for me as a novice php programmer isnt so simple aat aall! So if someone could point me to a good tutorial or solve my problem, it would be great! Ok, this is what i have now. Please dont laugh hahaha <?php include ('head.php') ?> <?php $con = mysql_connect("localhost","root","*"); if (!$con) { die('Could not connect to the database: ' . mysql_error()); } mysql_select_db("warehousemanagement", $con); $sql="INSERT INTO parts (username, customer_name, customer_address, date, warehouse, part_number, description, serial_number, quantity, part_condition, certificate_number, certificate_date, location, incoming_reference, shelf_life_end_date, dangerous_goods) VALUES ('$_POST[username]','$_POST[customer_name]','$_POST[customer_address]','$_POST[date]','$_POST[warehouse]','$_POST[part_number]','$_POST[description]','$_POST[serial_number]','$_POST[quantity]','$_POST[part_condition]','$_POST[certificate_number]','$_POST[certificate_date]','$_POST[location]','$_POST[incoming_reference]','$_POST[shelf_life_end_date]','$_POST[dangerous_goods]')"; if (!mysql_query($sql,$con)) …

Member Avatar
Member Avatar
+0 forum 4

Hi I've tried the code below to merge 2 linked list which f1 and f2 are the first nodes in the initial lists and the "first" is the first node in the result list. But it doesn't work! [CODE] node *merge(node *first,node *f1, node *f2,int n1,int n2){ int n=n1+n2; while(n-- > 0){ if(n1-- > 0)first=insert(first,f1->info); if(n2-- > 0)first=insert(first,f2->info); } return first; }[/CODE] Which insert is the following function that construc a list: [CODE] node *insert(node *first, int x){ if(first==NULL){ first=new node; first->info=x; first->next=NULL; } else{ node *Temp=first; while(Temp->next!=NULL) Temp=Temp->next; Temp->next=new node; Temp=Temp->next; Temp->info=x; Temp->next=NULL; } return first; } [/CODE] Looking …

Member Avatar
Member Avatar
+0 forum 6

**the code works perfectly, just i got something i dont understand...** i'v been trying to get a hold of recursion and sorting for about 3-4 days now, im getting some of it, but still not happy enough.. i searched for some good code for binary search and merge sort on the net, found some, took the one i liked most, and have been editing it to my needs. it would have felt a lot better had i been able to write both on my own, but.... i cant..... :( (hence all the downloading, editing and testing and comparing ... :| …

Member Avatar
Member Avatar
+0 forum 6

Hello, I am using a php function to merge 2 pdfs and it works great. <?php include 'PDFMerger.php'; $pdf = new PDFMerger; $pdf->addPDF('testFile5.pdf', 'all') ->addPDF('testFile57.pdf', 'all') ->merge('download', 'samplepdfs/TEST2.pdf'); ?> I get a merged pdf as soon as the page loads. I need the ability to make this merge happen when the user clicks a button, and I am stumped. Im a bit of a php nooby so please excuse my ignorance. Further more I need the user to be able to select or click and drag over pdfs to be merged. Any help is MORE than appreciated.

Member Avatar
Member Avatar
+0 forum 19

I want to merge 2 XMLs based on a particular condition. e.g: Sample1.xml: <rootNode> <header> <title agg="sum">1</title> <records agg="sum">10</records> <number agg="min">5</number> <header> </rootNode> Sample2.xml <rootNode> <header> <title agg="sum">2</title> <records agg="sum">20</records> <number agg="min">15</number> <header> </rootNode> I want that these two xml files should be merged based on the attribute specified within the tag i.e "agg".if agg="sum" then title from sample1.xml and sample2.xml should get added. Output should be like: output.xml <rootNode> <header> <title agg="sum">3</title> <records agg="sum">30</records> <number agg="min">5</number> <header> </rootNode> Kindly provide XSLT for this. Thanks.

Member Avatar
Member Avatar
+0 forum 5

Hi, I am writing a Silverlight Bing Maps based application and I am trying to merge two (and more) polygons. The approach I am using at the moment is the following: The geometry for the polygons is stored in a database, and Im writing and reading from it through a WCF Service. So I get the geometry from the database, and I am dealing only with Polygons. The thing I did was to use the STUnion function in the SQL, through a StoredProcedure. It supposedly works, but here is the twist: Many of the polygons are not really sharing a …

Member Avatar
+0 forum 0

The End.