Member Avatar
I thought I'm done doing mg activity, but my professor said that we need to use a Temporary Variable for Swapping and I have no idea where to put it. Mind giving me a hand, please? :( Here is his activity: Activity: Swapping Create a program that accepts a 10-element …
by exoruel in Software Development ()
Member Avatar
Hi evryone! :) I'm a complete beginner in Java and today i'm found my self stack while trying to solve a problem. Basically what i have to do is to write a program that sorts three integers. The integers are entered from the input dialogs and stored in variables num1, …
by root404 in Software Development ()
Member Avatar
This shows the code for one simple crypt of text by swapping two adjoining characters each. You can make that more complex if you like. Can also be used for one nice riddle.
by bumsfeld 413 in Software Development ()
Member Avatar
As for my assignment I had to write a program to swap 2 digit number Example:- If user input 12 the swaped number Would be 21. Along with ALgorithm, and a short description on this program(As how will you solve this program or what measure you'll take to get desired …
by dendenny01 in Software Development ()
Member Avatar
Hi guys, I got this from my teacher and im really confused. could anyone point me in the right direction? Thanks
by aVar++ 14 in Software Development ()
Member Avatar
Hey everyone, I'm new to the concept of stacks and queues. I think I have the basics, but I have a quick question. If I am wanting to swap an object, say x, for another object, say y, in a stack or a queue, is this possible without introducing an …
by fatalaccidents in Software Development ()
Member Avatar
Given two integers A & B. Determine how many bits required to convert A to B. Write a function int BitSwapReqd(int A, int B); Please first define the logic to calculate the number of bits required to convert A to B and then code. Thankx a lot.
by mayank.dyl in Software Development ()
Member Avatar
struct looks like this: struct ListNode; typedef ListNode* ListType; struct details { char first_name[20]; char last_name[20]; int start_number; int end_number; }; struct ListNode { details data; ListType next; }; ListType list = NULL; ListType head = NULL; ListType * PointerToHead = &head; I have a circular linked list that i …
by nyxxie in Software Development ()
Member Avatar
First question here, so bear with me. I have been trying to create a view on a QMainWindow using a QDeclarativeView as the canvas, but whenever I try to switch the source of the QDeclarativeView my program segfaults and I frankly have no idea why, or how to fix it. …
by tjsail33 in Software Development ()
Member Avatar
I've a vector of size 'n', I need to do random couples with the n numbers (integers) and make a swap between them. Any ideas how? I had this idea int low = 0; int temp; But when I print my vector, it steel show me the original order of …
by George_91 in Software Development ()
Member Avatar
Hi folks, int a=10,b=5,tmp; tmp=a; a=b; b=tmp; This is ordinary swap. I want to do this swap to the structure variables. And how to free the memory of tmp structure variable after swapping.
by infantheartlyje in Software Development ()
Member Avatar
Hello everyone first of all thanks to daniweb and all users to help me lots of time. now come to problem i am learning java from last one month today i wrote a program to swap two objects it is running but not performing desired task. all instance fields are …
by aman rathi 3 in Software Development ()
Member Avatar
Preconditions: Addresses of 2 integer variables are on the stack as the parameters. You must implement the following C swap function: Postconditions: The values of the two integer parameters have been exchanged.
by theburg30 in Software Development ()
Member Avatar
Hi All, A few years ago the general rule of thumb for swapping was swap=RAMx2. Now that seems fairly sensible when ram was smaller than it is today. My new rig arrives tomorrow and with 8gig of ram following the rule of thumb above would mean 16Gig of swap space. …
by Moncky 1 in Linux and Unix ()
Member Avatar
Dear Colls, I have an onmouse over problem. I need to swap JPG with HTML OR to swap JPG with marquee text (moving text in left direction). OR to swap Text with Marquee. I have spend almost half day to do it, without success. Could you help? Thank you in …
by T992KTD in UI / UX Design ()
Member Avatar
The following code swaps values between 2 variables without using a temp variable..... i want to know the logic behind this //#include "stdafx.h" include<stdio.h> int main(){ int a =3, b=5; a^=b^=a^=b; printf("%d" "\n" "%d",a,b); return 0; } Output 5 3
by neoraghav in Software Development ()
Member Avatar
I have 4 512 DDR2 pc3200 ecc and 4 512 DDR2 pc3200 non ecc that I want to swap for 2 2 Go DDR1 pc 3200 contact me asap on 07916714525 in london
by sissendz in Community Center ()
Member Avatar
Hi everyone. I am trying to figure out if it's possible to write a PHP or JavaScript that changes the background image every time the browser refresh button (or F5) is pressed. I haven't seen it done this way, however I have seen it done for banners and other images. …
by UzuNarU in Web Development ()
Member Avatar
Well i have the following program where i need to swap students(dynamically created structure array) . Just cant seem to get the swap right. Main problem's here : struct student *stemp; stemp=(struct student *)malloc(sizeof(student)); *stemp.name=s[i].name; s[i].name=s[j].name; s[j].name=stemp->name; Other info : where s[i] belongs to a dynamically created array student struct …
by goodwillwins in Software Development ()
Member Avatar
During runtime when a program asks for a memory block (say, by malloc()), its provided with a block of virtual addresses, say 0x10000000 to 0x1000A00 (for 32 bit). During the execution, other processes are incorporated into the main memory and pages 0x10000000-0x100000A0 are paged out. After some time, the program …
by daudiam -8 in Linux and Unix ()
Member Avatar
Hi everyone.. I am a new programmer to OpenGL using C++. I have an nxn grid having numbers in each cell of the grid.. I have to swap the content of two cells.. ie., the numbers in 2 cells selected, have to be swapped. I am not knowing how to …
by esash28 in Software Development ()
Member Avatar
MyClass.h class MyClass { //... public: } MyClass.cpp template <class T> void MyClass::Swap( T& Var1, T& Var2 ) { Var1 ^= Var2; Var2 ^= Var1; Var1 ^= Var2; } In another file include "MyClass.h" //... int n = 40; int m = 60; StringOperations::Swap(n, m); // IF I DELETE THIS …
by hkBattousai in Software Development ()
Member Avatar
this is my code for a simple link list...i cant solve the problem of the while loop.it is only working for "1".and i cant swap two nodes in the list and cant insert nodes in a given position...how can i do those???plz help.... //Pirate⢠include<stdio.h> include<string.h> include<stdlib.h> struct list_element { …
by arafat_alam -2 in Software Development ()
Member Avatar
Hi, Trying to add a swap file to my server as below: dd if=/dev/zero of=/swapfile1 bs=1M count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 27.4514 seconds, 78.2 MB/s [root@clearab2 /]# mkswap -c /swapfile1 Setting up swapspace version 1, size = 2147479 kB [root@clearab2 /]# swapon /swapfile1 …
by chris5126 26 in Linux and Unix ()
Member Avatar
I would like to know how can the swapping function be implemented using pointers, void swap (int*, int*) //function prototypes void swap(int& a, int& b); //function (passing by ref) void swap(int& a, int& b) { int t = a; a = b; b = t; } Is this correct? //Using …
by makan007 in Software Development ()