Learner010 99 Posting Whiz in Training

okay,
i'll try it.

And waht about label color(2 colors in a label) problem ?

Learner010 99 Posting Whiz in Training

How to create two circle shape (circle shapes will work as token for 2 players ) in snake and ladder game. I can’t see any control for that ?

Here is what I’ve done and what I want :
I ve created 100 labels and set their Text property 1…..100 respectively . And now I want is that shape will be shown over the label control so what can I do for that(Actually I don’t see any control for that) ?

One more problem I’m facing there is that I decide to add ladder(I don't add picture box for ladder i just display text) on some labels and want to add snake on some others labels.(like on label 10 , 25 ,65, 77 will have text as ladder and saying these follow to 30,45,85,99 label respectively and same procedure for snake label,i.e they take the token down).So, to show these information on the label I need to display these indicator in different color text on label .

Ex:- on label 10,25,65,77 will display their text(i.e. 10,25,65,77 with forecolor =vbblack) . The problem is that on the these label I want to show info in new line (new line in label with forecolor=vbgreen). So how can I have different colored text on the same labels ?

I know I present the problem in complicated way but I hope you understand the problem

Learner010 99 Posting Whiz in Training

yes , i see it.
its nice. And that make Daniweb a perfect Community.

is only capable of pulling from the past 7 days. So the tab only appears for members who have logged in within that time frame.

if we wanna see the activity stream for a user who last login around 1 month ago then whats the solution for that ??

are you working on it ?

but overall , you are adding great functionality to Daniweb , and i hope one day daniweb will be supirior to SO.

Learner010 99 Posting Whiz in Training

yes , nice changes.
i see changes in endorsement section and changes in appearance of social links.

thats all are nice.

Learner010 99 Posting Whiz in Training

Or you could see if this might be helpful
http://wordweb.info/developer/SQL.html

they don't provide database for it.

You could try using an API
http://dictionaryapi.com/

i need the database file so the application which don't require internet connection. it will be offline dictionary.one more thing , Right Now , i am not familiar with APIs implementation(i think API uses internet connection).

Learner010 99 Posting Whiz in Training

please mark your thread as solved.

Learner010 99 Posting Whiz in Training

for more information on loops visit my tutorial here.

Learner010 99 Posting Whiz in Training

try like this(not tested but it will give you a hint):

for(x=1;x<=9;x++)
    {
        for(sp=1;sp<x;sp++)
        {
            printf(" ");
        }
        printf("%d\n",x);
    }
    printf("Merry chirstmas");

this should work.

Learner010 99 Posting Whiz in Training

mark this thread solved if you get the solution.

Learner010 99 Posting Whiz in Training

i don't understand the exact the problem but i guess that the following will be hint for you.

on login button's click

dim xvar as boolean = false
id=textbox1.text
if(id="valid text")then
xvar=true
end if
if (xvar=true) then
msgbox("login successful")
else
msgbox("wrong id")
end if

however you can do it without using boolean.

on logout button

msgbox("logout")

i've not tested the code but i hope that it will work as hint.

Learner010 99 Posting Whiz in Training

i need database for english words and their meanings so i can create an application for English Dictionary.
do you have any database for such requirments ? if you don't have then you can recommend me a link where i can find it . I think that's the important part my application.

i prefer mdb database but no problem if you find something other (i'll try to convert it to mdb).

thanks

Learner010 99 Posting Whiz in Training

i didn't notice that.
thanks for pointing it out.

Learner010 99 Posting Whiz in Training

i've 9 button(i've set "" to button text) there and all buttons have almost same code as button1 has and here is the code :-

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If (exitgame = 0) Then
            If (Button1.Text = "") Then
                Label2.Text = "Active Player Name ==>  " & player
                If (player = "X") Then
                    player = "O"
                Else
                    player = "X"
                End If
                Button1.Text = player
                checkfordraw()
            End If
        End If
End Sub

and here is code for checkfordraw()

Public Sub checkfordraw()
        If (exitgame <> 1) Then
            If (Button1.Text <> "" And Button2.Text <> "" And Button3.Text <> "" And Button4.Text <> "" And Button5.Text <> "" And Button6.Text <> "" And Button7.Text <> "" And Button8.Text And Button9.Text <> "") Then
                If (MsgBox("No more places " & vbNewLine & "Game Draw " & vbNewLine & "would you like to play new game ?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok) Then
                    Button10.PerformClick()
                End If
            End If
        End If
End Sub

when i first click on on any button(except button10) it gives an error saying "InvalidCastException Unhandled" and "Conversion from string "" to type 'Boolean' is not valid".Error occurs at line no three in checkdraw() procedure(i.e second if condition).

Learner010 99 Posting Whiz in Training

hello
now i am creating an application on what i've learned up to now. so for that i don't wanna show white character over black screen(i don't wanna show white characters in console window ). i want something colorful text.
and one more thing i also want for the application is that how to show the heading in increased text size

Thanks

Learner010 99 Posting Whiz in Training

thanks for your reply but its not creating colors in a pattern what i think . it shows only black like color.

as a hint to understand the problem :
you can imagine that i want to show color changing every 10 ns . like we see while installing window 8 .(color changes to its nearest color )

Learner010 99 Posting Whiz in Training

i done with the code below and it shows color values but not all color values (i think that it can be more improved)...

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Static x, y, z As Integer
        If x < 255 Then
            BackColor = Color.FromArgb(x, y, z)
            x = x + 1
        ElseIf y < 255 Then
            BackColor = Color.FromArgb(x, y, z)
            y = y + 1
        ElseIf z < 255 Then
            BackColor = Color.FromArgb(x, y, z)
            z = z + 1
        Else
            Exit Sub
        End If
End Sub
Learner010 99 Posting Whiz in Training

I thought the rule was: Before vowel add 'n'

I think the rule is : Before vowel sound / pronunciation add 'an'.
An is placed before a vowel pronouncaition.
ex:- an LED, an MLA , an hour etc.

however i am not good at english.

Learner010 99 Posting Whiz in Training

thanks for quick reply.
i wanted to know to if there exist any other way to use strings as operator but i didn't find any useful that's why i created thread here and now i am sure that this is really very rare .

thanks.

Learner010 99 Posting Whiz in Training

i want to display all possible colors on a form (i am using timer with 500 interval).

what logic should be there to display all possible color (i want to display colors which are more closer to each other like red to pink not just red to black). color should be changed every half second with its closet matching color value.

and i don't know the how to implement logic.

how to use color value(0 to 255 ) for red , green , blue so that it looks that color change to its closest matching color value.

i hope that you underatnd what i want to do .

Learner010 99 Posting Whiz in Training

hello everybody,
i started learning vb.net around 3-4 days ago. And now i playing with operators . There i have one doubt :

is it possible to treat string value like a operator ?

for example : let suppose , there are 2 variable named a ,b of integer type which will store 2 numeric values. and one variable of string type named opertor_type of string type which will store the operator symbol.

a=10
b=20
operator_type="+"

and here is where my doubt arise

a operator_type b              'for a+b

is that kind of statement allowed in vb.net or not ?
However i done it using switch statement.

Learner010 99 Posting Whiz in Training

In your function you need to declare a local variable to hold the sum of the array elements and then return that. You do not want to store the sum in n.

yes, in you function n is not declared . so decalre it.

Learner010 99 Posting Whiz in Training

n = a[i] + b[i];

replace it with this :

n+=a[i]+b[i]
Learner010 99 Posting Whiz in Training

I think that the earlier design was much better.
Anyways, this is also good design but i still say that the earlier was very much better.

That's my personal opinion.

Dani commented: What about it don't you like? :) +0
Learner010 99 Posting Whiz in Training

@john
we are not here to write code for you. it is very necessary to show us your efforts in order to get assistance.

so , post your effors(your code) and then any assistance will be possible.

And , don't forget to create a new thread for a question. don't load too much in a single thread. right ?

thanks.

Learner010 99 Posting Whiz in Training

thanks for such a nice tutorial.
really very interesting .

looking forward to your pointers tutorial.

thanks.

Learner010 99 Posting Whiz in Training

this thread belongs to function in c++ so i am not sure why you give such a title(bitwise operator) to the thread.

however , right now , i am not familiar with functions(i can't pass any suggestions on function related issues) but i found 2 mistakes there in your code and these are :

1.you declare prototype with name Andgate(void); and defining andgate().again you done a mistake of calling Andgate();(line no.90). so the call should be andgate(); instead of Andgate();.So replace Andgate to andgate.[c++ is case sensitive language]

2.In line 77 there is missing closing curly brace. so also add curly brace at line 77.

Learner010 99 Posting Whiz in Training

first off, a few things :
are you really using number as password ? if yes then consider following things :-

An Array Arr[5] will consist 5 values from 0 to 4 index hence there will be nothing in Arr[5]. ok.

cout << "enter pass: ";
cin >> pass[5];

by doing so , you are getting value at the fifth index of pass array which is not valid(because we can access elements from 0 to size-1 values) .However the statement will not throw any error but i don't think its valid. if you want to create a program to check password then i think this can be achieved without using Array. Look at this :-

int x,y;
x=12345;
cin>>y;
if(x==y)
cout<<"Password is valid";
else
cout<<"Password incorrect";

also consider other data types as your requirments(if you need password around 10 character long) then use of string or array.

Learner010 99 Posting Whiz in Training

Pointer to array: doesn't change the rules
Dynamic memory: doesn't change the rules in terms of pointers, dynamic memory is a different thing that happens to make use of pointers. Are we now saying that pointers are hard because of anything under the sun that might use them? If so, then any fundamental feature of C++ is "hard".
Pointer to function: actually changes two rules, they can't point to null, and they can't be generalized with void*. Pointers to functions are actually simpler than object pointers.
Near and far pointers: died with DOS.

i think that these replies exciting me to learn pointers very soon.i hope no doubt will be there for me if i grasp it completely.

thanks all of you for enriching this thread.

Learner010 99 Posting Whiz in Training

mark this thread solved.

happy coding.

Learner010 99 Posting Whiz in Training

try logic like this:

for(i=0;i<3;i++)
{
    //code for getting input to arr[i]
    for(int j=0;j<i;j++)
    {
        if(arr[i]==arr[j])
        {
        cout<<"value already exist";
        i--;    //so that you can insert again at the same index
        break;
        }
    }
}
Learner010 99 Posting Whiz in Training

here we don't do your homework. you should think more on this problem . And make full use of ifs or switch inside loop.

start thinking and writing the code. If you get errors then post your code here and we will try to point out the error.

so , don't forget to show you efforts (post your code).

Learner010 99 Posting Whiz in Training

thanks everyone for contributing to this thread.Now a hope raise inside me that whenever i'll start learning pointer then i'll not get more problems as other gets.i will not hate pointer.

@rubberman,
thanks for little nice explaination but thats not all about pointers[according to one of my friends, he says:
(pointer to array, dynamic memory , pointer to function , pointer to pointer ,types of pointers like near pointer , far pointer etc) are the other aspects that make the pointer hard.]

i think so.

Learner010 99 Posting Whiz in Training

i guess that they think pointer as very hard concept because pointer has a lot ways to access different values and different address in different different form.

one more reason is that pointer is applicable to a lot concepts(even we can access array through it, Memory allocation and so on). And i think if i grasp all these concepts then it'll be easier for me and i'll write such a tutorial so that nobody will hesitate about pointers.

Also ,i look forward to your tutorials on pointer .I hope you will write tutorial on pointer for the beginners like me free time.

Thanks.

Learner010 99 Posting Whiz in Training

would here anybody like to suggest some good books on pointers ? Actually some of my friends often say me that pointer is hard , too hard(however i've not started learning pointers , so i can't say). And i'd like to make the pointer concept very clear , so please recommend some good books particularly targeted to Pointers so that i can learn some deep aspects of the pointer.

thanks.

Learner010 99 Posting Whiz in Training

i think that using system in our program reduce/destroy/neglect the most important feature and that is portability(moving program from one system to another) of the program.

let's imaging that if we are developing an application on Window OS. Upto Window Editions system will work but when we install our application on other OS(like linux etc.) then will through an error.

that's my opinion however right now , i don't have much knowledge in c++ , i am learning it.

Learner010 99 Posting Whiz in Training

Please read our homework policy.
you can't get help if you asking us to write code you.

Not possible at all.

Please post your code and we will point out where you are going wrong.

Learner010 99 Posting Whiz in Training

try this:

"select * from Tran where Date=" & Date 
Learner010 99 Posting Whiz in Training

but it through an error when i use (a+i) with cin>>
i've declared and initialized as below:

a[5]={1,2,3,4,5},i;

and for the purpose to overwrite these values during runtime i wrote statement as below:

cin>>(a+i);

here error is throne. i don't know why ?

Learner010 99 Posting Whiz in Training

@phadhorlard
you should create your own thread for this.
Click Here to create a new thread.

Learner010 99 Posting Whiz in Training

very easy question if you are quiet familiar with Array concept.So for getting assistance in this thread i'll highly recommend you to post your code .It will be very easier for us to pointout where you are going wrong if you post the code.

Learner010 99 Posting Whiz in Training

now , my question is that how to access Elements of 2D Array using pointer ?

Learner010 99 Posting Whiz in Training

thanks for your answers . From your replies i learn another way to access the Array Element(*(a+i) or *(i+a)). Its nice.

however i've not studied on pointer yet but i think that pointers and array are related to each other in some way.

Learner010 99 Posting Whiz in Training

i don't understand the exact problem.

what i want is it will repeat the menu without going to new line in DOS

Then just remove \n.

Learner010 99 Posting Whiz in Training

i learned about 1D Array , 2D Array , 3D Array.But today , suddenly my friend asked my a question on "how to access Array Elements".
i said "just use array with index".like a[0],a[1] and so on.

and then he replied(it seemed that he knew very well about array) "is it possible 0[a],1[a] and so on ?". i was confused there and tried on the compiler and run it , it run successfully , no error were there.But he could make me satisfied with the logic why the result of a[i] and i[a] are same.

i want to know the logic behind this.
why both are same ?

Learner010 99 Posting Whiz in Training

make proper use of distinct in your select statement.

try this(i am not sure)

"SELECT distinct product.productN,brand.brandN FROM product, brand
Learner010 99 Posting Whiz in Training

I see that all I had to do was post a comment of my own.

yes.
you have to post there to mark your ShoutBox as read.

Learner010 99 Posting Whiz in Training

so , whats lpr equivalent in Window ?

Learner010 99 Posting Whiz in Training

i've doubt in the line below:

for(i; i < 5; i++)

where i is not initialized with value 0. so i think that it should be written as below

for(i=0; i < 5; i++)
Learner010 99 Posting Whiz in Training

It was ultimately decided that I would change the system so that invisible users remain invisible until they start participating in the chat room, at which point they become visible

have you done it ? or currently working on it.

Learner010 99 Posting Whiz in Training

thanks for your replies

std::system("lpr my_file.txt");

gives error in Window OS saying Illegal Command :lpr.