Hey, I hope it is okay to post this here. I'll be interviewed by a few companies in some time and I heard mock interviews are a great way to be prepare for it (the mental aspect :)). So I was wondering if anyone else is the situation and would like to interview with me (mutually). Thanks Hope I didn't violate any forum rules here

Member Avatar
Member Avatar
+0 forum 4

Hello, I have a graph that is represented in the form of a grid. For example: V--V --VV V---V VVVVV Each V is a node. If there is another V above/below/to the side of a V then there is an edge between them. I'm to form one single connected component in this by doing either: 1. adding a node where it doesn't exist 2. Removing a node from where it exists 3. Moving a node either above/below/to the side if no node exists there. Each of the above have different costs. I'm to find a decent way to this using …

Member Avatar
Member Avatar
+0 forum 9

Hey, I had complained about this sometime ago and most of it got fixed and the site in general is a lot better. But there is one thing annoying about that "Insert with the Quote editor button" popup : 1. Select some text 2. even while the popup is being shown select some other text 3. Do 2 many times When you're done with doing this, I'd expect the popup to be shown one last time for the last text I selected. But what happens is that it gets shown a lot many times. The problem can be replicated even …

Member Avatar
Member Avatar
+0 forum 6

Look at this: http://www.codinghorror.com/blog/2007/01/how-to-become-a-better-programmer-by-not-programming.html Did someone who simply couldn't write efficient code (complexity-wise) before, felt intimidated by people who did, decide to work really hard, try to solve an insane number of problems, actually get better? I've been in touch with programming since some 4-5 years. Some of my friends who recently picked up C and speak total rubbish about it, solve those hard programming problems. I end up writing a long well polished program that employs brute force, while they get the best algorithm implemented with some really messy code. I understand programming structures quite well, can read documentation, …

Member Avatar
Member Avatar
+0 forum 29

I select something on a post and this shows up: `Select additonal text or insert with the Quote editor toolbar button` I understand that it is trying to teach us something but what about people who have learnt that? Also it has been very buggy in my experience: doesn't stop blinking, blinks thrice, blinks twice(normal?)... Not to mention, it is opaque and covers such a large area. I thought I'd give my feedback about this. Thanks

Member Avatar
Member Avatar
+0 forum 2

What are some common uses of HTML forms that contain just one text input and a submit button? The only one use I find is to submit search queries. Is there some other reason why this is commonly used?

Member Avatar
Member Avatar
+0 forum 3

hi. I'm working on a project where I must observe form submissions in websites and detect a search engine if a form is used consistently. I don't really want any help with coding this. I just want some ideas for an algorithm. Like, **for example** if I were to come to Daniweb and search for something everyday, after sometime I must be suggested to use Daniweb as a search engine. A typical algorithm would count the number of times I searched in Daniweb and if it exceeds a number, it should detect the Daniweb search form as a search engine. …

Member Avatar
Member Avatar
+0 forum 8

Please see [here](http://jsfiddle.net/jmDsB/). The intention was to have 3 `<div>'s` in decreasing order of height(`1`,`2`,`3`) and to put those 2 buttons under the `<div>` marked `2`. Something like 1 2 3 - - - - - - btn1 - btn2 I floated `1` to the left because I wanted whatever that follows to wrap around it. I combined both `2` and `3` into a single `<div>` because I wanted the 2 buttons to fall back down under `2`. So now that the single `<div>` that holds both `2` and `3`, is **NOT** floated, whatever follows should simply appear in the …

Member Avatar
Member Avatar
+0 forum 5

My B+ tree looks like : rest of tree / 9 10 / \ \ 5 9 10 If I need to delete 5, I can't simply remove it because the page wouldn't contain any elements after that. So, I decide to merge with the right sibling. I don't understand what I must do about the parent 9. I cannot delete the 9 of the parent, and merge 5 and 9 leaf pages, because 9 isn't being deleted at all! How do I proceed?

Member Avatar
Member Avatar
+0 forum 2

I read [here](http://www.google.co.in/url?sa=t&rct=j&q=can%20have%20any%20(odd)%20b%20tree&source=web&cd=1&ved=0CDAQFjAA&url=http%3A%2F%2Fwww.cs.uga.edu%2F~eileen%2F2720%2FNotes%2FBtrees.ppt&ei=PcK3UPy4IcbYrQe7-oC4Cw&usg=AFQjCNFC0kjGfN16J-I0S5o3HEjBUxmpKg&cad=rja) that an m-way B-Tree can have m only odd. Is that really true? I've used 2,4 trees that allow a maximum of 4 child linkages for each node (and a minimum of 2). Isn't this a 4-way B-Tree?

Member Avatar
Member Avatar
+0 forum 6

I have a computer with good specs and I use Ubuntu 12.04. Firefox 15.0.1 When I switch from another tab to a Daniweb tab, and I move my mouse down, there is this big ad at the top of the page (it is supposed to make the rest of the page ,but itself, go dark). My Firefox crashes right at that moment. This happens everytime and has happened way too many number of times. I thought I'd report it.

Member Avatar
Member Avatar
+0 forum 8

I'm new to javascript. Lets say I need to create a new `<p>` everytime the user clicks on a button. So I create a button in the html body and assign a function as the event handler of `onclick`. This function is in a separate file called "file.js" which I include in the main html file using `<script type="text/javascript" src = "file.js">`. In my "file.js" there is that function that does this: var body = document.getElementsByTagName("body")[0]; var para = document.createElement("p"); var text = document.createTextNode("hello"); para.appendChild(text); body.appendChild(para); Now is it possible that this function being in a separate file access the …

Member Avatar
Member Avatar
+0 forum 4

Hi. I have some trouble understanding the linking process and hence this related question. Lets say I need a global variable that is needed by every single source file in my project. I would create a `constants.h` header and put `extern const int var;` in it. In corresponding source, `constants.cpp`, I would put `const int var = 5;` .(oh and a question here, wouldn't just `int var = 5;` work?) Then, every source file would get `var`. (supposedly) Will source files, that don't `#include "constants.h"` get access to `var`? If so, how would it possible if there is no link …

Member Avatar
Member Avatar
+0 forum 10

I use a couple of usenet groups on google groups and post there as well. There are a lot of real people there who keep posting nonsensical stuff for fun. But they aren't bots or anything and they don't copy paste,they just say things to other posters. What happened was this one such user made a post about me with my IP address,my Location,city,latitude Longitude,what kind of internet I use,and some other info. There was no point in doing that but he/she simply did it. Now my question is how did s/he,being an ordinary user get all that information about …

Member Avatar
Member Avatar
+0 forum 7

[CODE] int i=5,j=10; printf("%d\n",(i=15)||(j=26)); printf("%d %d\n",i,j); [/CODE] THe output I expected was : 1 15 26 The actual output was: 1 15 10 In (i=15)||(j=26), shouldn't the brackets be done first?Isn't that the precedence order? So,first i must take 15 then j must take 26 then the || must be done. The explanation I got was,that when 10 is assigned to i,immediately the || is noticed and since one of the conditions is true the other one isn't taken care of. But what happened to operator precedence?

Member Avatar
Member Avatar
+0 forum 9

Hello I am very confused with how negative numbers are represented in binary form. They say it is done in 2s complement form. Now won't this 2s complement of a negative number clash with an actual +ve number having the same binary representation? And negation of a +ve number..... We must 1st negate the bits individually and then the left most bit is going to be 1(mostly). Now isn't that how -ve numbers are represented? So if the negated +ve number is a -ve number should I now find its 2s complement and say that is how it is represented …

Member Avatar
Member Avatar
+0 forum 7

I'm not sure on which forum this thread should have gone,so I'm asking here. I presently don't have a personal computer to work on,and won't have one for another few months.I want to be able to continue practising C++. I have access to a computer centre facility.I don't think it is allowed to install Visual Studio(or Visual C++ alone)on a computer there. I was wondering if I could install Visual Studio on a pen drive and carry it around to the computers I work with? Will copying the Visual Studio files to a pen drive and using that pen drive …

Member Avatar
Member Avatar
+0 forum 4

I have to accept three numbers from the user using cin into 3 variables. If the user enters non integers,I must reject it and ask for a new one instead of that. So,here is my attempt: [CODE]int a,b,c; do{ cin.clear(); while(cin.get()!='\n');//remove failure bits,clear stream if wrong input cin>>a; } while(!cin);//while the entry isn't good do{ cin.clear(); while(cin.get()!='\n'); cin>>b; } while(!cin); do{ cin.clear(); while(cin.get()!='\n'); cin>>c; } while(!cin);[/CODE] I expected it to work,but it takes 4 numbers instead of 3. Why? What is wrong?

Member Avatar
Member Avatar
+0 forum 27

I use Vista.There are these problems with my computer: 1.The "Computer" icon on my desktop,the text under it is like: [CODE]Comp uter[/CODE] and not [CODE]Computer[/CODE],in one line. The icon is large enough.The thing is it wasn't like that before,but now it is. 2.When I press,@ I get ".I restarted the computer,now it is fine.But the problems keep persisting.After 2 days it will come up again. Also,once there was this problem wherein it was as if someone was pressing the keys 's and 'a' on my keyboard(no one was actually).So the consequence was,I press on any input text field,it would start …

Member Avatar
Member Avatar
+0 forum 13

[CODE] int x; while(cin>>x) { cout<<"Yes"<<endl; } int y; while(cin>>y) { cout<<"Yes again"<<endl; } [/CODE] What I expected to happen is,that as long as I entered a number for x(in line 2)that block should be run and "Yes" must be printed. To get out of the 1st while loop I enter some char like 'h' and the same thing applies with the second while loop. But what happens is when I enter 'h' both the loops break and the program ends. Why does this happen?

Member Avatar
Member Avatar
+0 forum 17

[CODE] int x,y; while(cin>>x>>y) { if(x>y)cout<<x<<"\n"; else if(y>x)cout<<y<<"\n"; } [/CODE] This seems clear,but when I entered this: [CODE]2 4 6[/CODE] and hit enter, I get this: [CODE]4[/CODE] after which I am being asked to enter something again. I put 8, and it prints 8. But what is exactly happening here? How can it accept more than 2 numbers,hold one somewhere,then later use it when the fourth number is used? I am muddled up?

Member Avatar
Member Avatar
+0 forum 5

[CODE] cout<<(char)290<<endl; [/CODE] I get " as the answer. [CODE] cout<<(char)20000<<endl; [/CODE] Here I don't get anything. When char can take integer values from -128 to 127 and both 290 and 20000 are welll out of this range, then why is there an output in the first case?

Member Avatar
Member Avatar
+0 forum 7

Hey daniweb!:icon_cheesygrin: I have not done real hardcore programming still,but have created a couple of games(in flash), some applications(with MFC). I have now finished all the education I need to ,before joining an engineering course. I don't like any course(which they offer)except for computer science which is because I have enjoyed my little experience of creating some apps and games. I am now thinking of what exactly I must take up. Since most of you must be computer people,I just want to ask,do you hate your job?(like everyone is supposed to) My cousin who is a computer engineer,told me that …

Member Avatar
Member Avatar
+0 forum 5

The End.