Learner010 99 Posting Whiz in Training

try this in command prompt:

format <drive letter>:
ex:
format H:

and then follow the instructions.

Learner010 99 Posting Whiz in Training

first off , i don't understand what do you mean by with calculation in c++

second , you can't get help by asking your question in such a manner. you have to write the entire question includes the problem definition , your efforts, comments and so on. Once you prove that you made efforts in order to solve the question and didn't succeed then i'm damn sure that daniweb will certainly help you and then nobody thinks that you are asking them to write code for you.

last , i can give you the hint:

"user inputs to array" does not uses any different mechanism , its done with as usual like cin>> and with other getting input functions.

use loop

for(i=0;i<10;i++)
{
cin>>arr[i];
}

the above code will help you to get input to array named arr.
See This Tutorial for more information on array.

Learner010 99 Posting Whiz in Training

My son wrote "I have red the book" last night - or maybe he was saying he has a book called Red....

i think that he was saying that he had read the book.Because past participle of read of pronounced as red but spelt as read. so probably he wrote exactly what he spoke without considering the spelling and pronunciation rules.

Learner010 99 Posting Whiz in Training

hello

Learner010 99 Posting Whiz in Training

i am not much familiar with registry and therefore i think that going with program setting will be good enough for me to understand the code.

i want to create trial of an application which ask for activating the application upto 30 days . After 30 days application should not start. Or if user enters the correct serial number then it stop asking for serial number(it will be like activated version)

hope i explain in clear words.

Learner010 99 Posting Whiz in Training

please show us your efforts to solve this problem . its almost impossible to get assistance if you don't prove what you have done.

for this code, you neeed nested looping and print statement of viualbasic and code will be written inside click event of the button.
if you are not familiar with nested looping then This Link will provide you an idea of how use it. Syntax may be different from language to language but logic remains same.
thats all about.

Learner010 99 Posting Whiz in Training

the above code is not working . My IDE does not understand the statement at line 8.

Learner010 99 Posting Whiz in Training

hello ,
today i suddenly think about creating an application that has limited uses . i mean after using an application for 30 days , it should not start the application . How can i do that ?

i can decide if the day is the last day or not(i mean using some date comparision functions i can decide if the day is 30th day) but then after how to code for trial expiration ?

Learner010 99 Posting Whiz in Training

i was wondering if you could provide some more interesting words.But i think that queue is the only word
i also find the same word(i.e. queue).I think that queue is the only 5 character long word thats pronunciation remain same even after removing continuous 4 words.However we can have more words if there is no condition like removing character in continuous fashion.

Learner010 99 Posting Whiz in Training

goddessship
frillless

any proof that prove it. i don't think of these words to be universally accepted.

goddessship= i think should be like goddess-ship.Click Here.

that all about what i read about these words but it may be wrong.

Learner010 99 Posting Whiz in Training

after stressing more on this issue , i got the solution. here i would like to share it (in the hope that if somebody who is facing the same problem may get the solution here).
here is what i have done to solve the issue.
i create a form type object named activeform and then initialize it to me.ActiveMdiChild.And if activeform does not contain Nothing then it means there exist child form and therfore i unload it before loading new form.

here is the code:

Dim activechild As Form = Me.ActiveMdiChild
        If (Not activechild Is Nothing) Then
            Me.ActiveMdiChild.Close()
        End If
Learner010 99 Posting Whiz in Training

Me.ActiveMdiChild().Close()

okay it should work. But what i need is something different i want that first it should check if mdicontainer contains mdichild or not. if it contains then it should close the current child and then load the new child form.

now , with the code you provide , i got how to close the current child form but how can i decide if mdicontainer contains mdichild or not ?

Learner010 99 Posting Whiz in Training

hello
today i start writing an application which uses mdi forms(its new to me). and i use the following code:(i set form1=idmdicontainer=true) , is this correct way to create mdi forms ?

further i write the code :
there i have 2 more forms (form2 and form 3)

 Private Sub RegisterToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RegisterToolStripMenuItem.Click
        Dim frm As New Form2
        frm.MdiParent = Me
        frm.Show()
    End Sub

    Private Sub RegisterToolStripMenuItem1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RegisterToolStripMenuItem1.Click
        Dim frm As New Form3
        frm.MdiParent = Me
        frm.Show()
    End Sub

on the first menu's click i wanna show form2 and on the other 's click i wanna show form3. when i click more times on these menus , these forms continue to load , and therfore i a lot forms load in the mdi form

here is what i want

when i want to open the form it should unload the current child form and then it should load the form.how can i do that ?

Learner010 99 Posting Whiz in Training

hello ,
today i read about barcodes and QRcodes . well i see barcodes / QR codes and often see them on almost every product. But as a programming learner , i wanna know about what they represent ?, how they are created(with which information) ?, how they are read by our application ? does any application can read any barcode ?

Learner010 99 Posting Whiz in Training

I hate the new year

Why So?

Learner010 99 Posting Whiz in Training

which one do you think is easier to read and understand ?

Obviously Loops.

i didn't meet with such a condition where goto is the only choice .i read about goto and find the following (its exactly what i thought):

Although the use of goto is almost always bad programming practice (surely you can find a better way of doing XYZ), there are times when it really isn't a bad choice. Some might even argue that, when it is useful, it's the best choice.

anyways, i'll create tutorial on conditional and unconditional statement in c++. There i'll try to explain my best.
Right Now , i am back to c++ and start learning where i stopped it and i'll write tutorial on strings(to just make you familiar with its library function),functions etc.And also will write tutorial on file manipulation when i finish learning it.
For Tutorial on pointers , i've already informed to deceptiokon.I am damn sure that he can write much better on it . I Can't Explain mcuh of it(I am not too good at Pointers, actually don't know every aspect of it).

So, if deceptikon is reading this post then please start writing on it so that no beginner will be scared of pointer anymore.Also your tutorial titled "Array in c++" was great.

Learner010 99 Posting Whiz in Training

seems contraversy between the picture you added here and your last reply ?
you wanna show email in listbox , thats ok. i got it but what about spaces , what you want to say about spaces ?

Learner010 99 Posting Whiz in Training

where you are printing the result ? on form ? or other place holder ?

Learner010 99 Posting Whiz in Training

I need the vb.exe to run on its own, with or without the visual studio. Any suggestion?

you need to use package and deployment wizard. It will create installer of it so that you can run it wihout having installed Visual Studio.

Learner010 99 Posting Whiz in Training

Happy Christmas and New Year.

Learner010 99 Posting Whiz in Training

Was that really a serious question

i read about homosexual relationship and found that still there are some countries which are against of it. that's why i asked for UK.

you can read articles about homosexuality in india.
just google it.

Learner010 99 Posting Whiz in Training

does 'homosexual activity' still prohibited in UK ?
i think being a gay isn't a crime . That's my personal opinion.

Learner010 99 Posting Whiz in Training

Replace this:

System.out.println("The number of integers is " + count++);"

with

System.out.println("The number of integers is " + count++);

@kal_crazy
why should not have break in else part because you pass true in while , which means it will repeat , and repeat and never stop . that's why i think of something like break to stop interation.

Learner010 99 Posting Whiz in Training

try this:

import java.util.Scanner;
public class IntegerCount
{
public static void main(String[] args)
{
int num,count=0;
Scanner input = new Scanner(System.in);
System.out.print("Enter an integer, the input ends if it is 0: ");
num = input.nextInt();
while(num!=0){
    count++;
    System.out.print("Enter an integer, the input ends if it is 0: ");
    num = input.nextInt();  
}
System.out.print("total integers="+count);
}
}
Learner010 99 Posting Whiz in Training

what output you are getting ?

Learner010 99 Posting Whiz in Training

you can write an additional condition like this(inside while):

if(n1==n)
System.out.print(x);
else
System.out.print(x+" ");
Learner010 99 Posting Whiz in Training
import java.util.Scanner;
public class Pentagonal {
public static void main(String[] args) {
int n,x,n1;
Scanner input = new Scanner(System.in);
System.out.print("How Many Elements you want in the sequence ");
n = input.nextInt();
n1=1;
while (n1<=n) 
{
        x = (3*n1*n1 - n1)/2;
        System.out.print(x+" ");
        n1++;
}
}
}

Hope now you understand .

<M/> commented: OH! +10
Learner010 99 Posting Whiz in Training
while(num!=0)
{
count++;
//here again write code with to get input to `num` variable
}
System.out.print("Total Integer Numbers="+count);
Learner010 99 Posting Whiz in Training

Read the second line of my just above post. you have to get input into n variable and that's your limit of the pentagonal number sequences.

for example if give 5 to n then it will display first 5 pentagonal number

Learner010 99 Posting Whiz in Training

here i am telling the way what i used for it (you can also use predefined forms for this purpose).

just create two label and textboxes and one button .

on button you can now check for login as follow:

if(Txtusername.text="Admin" and Txtpassword.text="Password")
msgbox("login successful")
else
msgbox("Password Invalid")
End if

right now you should write above code but later (when you understand DB concept) then you can retrieve data from DB and then check for login.

hope this helps.

DM Galaxy commented: correct answer +2
Learner010 99 Posting Whiz in Training

try this:

int n,x,n1;
//here write code for getting input to n variable
n1=1;
while (n1<=n) 
{
        x = (3*n1*n1 - n1)/2;
        System.out.print(x+" ");
        n1++;
}

hope this helps

Learner010 99 Posting Whiz in Training

the compiler is free to produce any results it wants.

i check these expression in different environment and they produce different result. i think these expression are compiler dependent.

Learner010 99 Posting Whiz in Training

It would've more helpful if you had added this to your original thread

sorry for that. I thought that asking more questions in a single thread is not suitable , it will overload a thread. thats why i decided to create a new thread.

ok. i check the link.

Learner010 99 Posting Whiz in Training

i'm using VS 2008 for window application and made an http web request and it returns result in json(click here for json result). I am not much familiar with JSON and also newbie in vb.net . So , i don't have any idea to deserialize the JSON result.

would you please explain how can i deserilize json result so that i can show json result in my own way. i searched for it but didn't found any meaningful.

please provide your assistance.

Learner010 99 Posting Whiz in Training

logic seems to be correct if you need the numbers in same line with tabs.use "\t" in print statement.if you need to print the number specific times then implement logic like this:

int count=1;
while(count<=n)
{
//your code
//your code
count++;
}

try this (for printing tabs):

System.out.print(n+"\t");

hope now you can adjust the code to your suitability.

Learner010 99 Posting Whiz in Training

dim statement is used to decalre one or more variables in vb.
one suggestion :
Never use of space in Identifiers.Its against the naming rules.

Learner010 99 Posting Whiz in Training

what can(++)and(--) do in c++ source code?

++ increase the variable value by 1.

int x=0;
cout<<x<<endl;
x++;
cout<<x;

output:

0
1

lets see more about ++.

x++(postfix)
++x(prefix)

there is an important difference between postfix and prefix.

int x,y=10;
x=++y;

output:

x=11
y=11

int x,y=10;
x=y++;

output:

x=10
y=11

now i hope you can adjust with --
for more information read this tutorial

Learner010 99 Posting Whiz in Training

11° temperature here with little rain drops and temperature is in downward trend day by day.

hope it will be around -1° within 3-4days.

Learner010 99 Posting Whiz in Training

Now how to convert JSON result into readable format.
i've heard of DeserializeObject() But don't know how to use it.

and also ignore line 8 in the above post.

Learner010 99 Posting Whiz in Training

i tried following :

 ' Create a request for the URL. 
        Dim request As WebRequest = WebRequest.Create("http://www.daniweb.com/api/forums/58/articles?filter=solved")
        ' If required by the server, set the credentials.
        request.Credentials = CredentialCache.DefaultCredentials
        ' Get the response.
        Dim response As WebResponse = request.GetResponse()
        ' Display the status.
        Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
        ' Get the stream containing content returned by the server.
        Dim dataStream As Stream = response.GetResponseStream()
        ' Open the stream using a StreamReader for easy access.
        Dim reader As New StreamReader(dataStream)
        ' Read the content.
        Dim responseFromServer As String = reader.ReadToEnd()
        ' Display the content.
        RichTextBox1.Text = (responseFromServer)
        ' Clean up the streams and the response.
        reader.Close()
        response.Close()

and i get the the result in the following format and how can i customize it

{
 "data":[
  {
   "title":"login form using mysql",
   "related":[
    {
     "id":"449332"
    },
    {
     "id":"452768"
    },
    {
     "id":"446410"
    },
    {
     "id":"446934"
    },
    {
     "id":"454719"
    },
    {
     "id":"466701"
    },
    {
     "id":"460422"
    },
    {
     "id":"453107"
    },
    {
     "id":"457555"
    },
    {
     "id":"454198"
    },
    {
     "id":"450850"
    },
    {
     "id":"462062"
    },
    {
     "id":"448456"
    },
    {
     "id":"456066"
    },
    {
     "id":"462221"
    },
    {
     "id":"467063"
    },
    {
     "id":"288263"
    },
    {
     "id":"297980"
    },
    {
     "id":"443334"
    },
    {
     "id":"445701"
    }
   ],
   "posters":[
    {
     "id":"1096074"
    },
    {
     "id":"1095889"
    }
   ],
   "uri":"http:\/\/www.daniweb.com\/software-development\/vbnet\/threads\/469565\/login-form-using-mysql",
   "id":"469565",
   "forum":{
    "id":"58"
   },
   "replies_count":"1",
   "views_count":"13",
   "first_post":{
    "timestamp":"1387077167",
    "id":"2046635",
    "poster":{
     "username":"ernestclyde",
     "id":"1096074"
    },
    "raw_message":"\n    Public Sub login()\n            SQLConnection.ConnectionString = ServerString\n            cmd.Connection = SQLConnection\n            SQLConnection.Open()\n            cmd.CommandText = \"SELECT employee_id, password FROM employees_list WHERE employee_id='\" & Form1.EMPLOYEE_ID_txt.Text & \"' and password='\" & Form1.PASSWORD_txt.Text & \"'\"\n            dr = cmd.ExecuteReader()\n            If …
Learner010 99 Posting Whiz in Training

As dani suggested that i have to send http request if i use daniweb api?

so , anybody here would tell how to send http request in vb.net ?

Learner010 99 Posting Whiz in Training

I don't know APIs? but i heard of Daniweb API. what it is ?
Now i am playing with basic controls of vb.net but i hope after getting about API i'll be able to guess what kind of application i create in vb.net using Daniweb API?

So , i won't overload this thread by asking How to use APIs in vb.net. first i will understand what daniweb api is ? then create new thread for how to use it in vb.net so i can play with it.

thanks.

Learner010 99 Posting Whiz in Training

What is WAP?

i think OP is newbie and doesn't familiar with daniweb homework policy. He take WAP as Write A Programme , i think.

WAP to print the sum of all the PRIME or EVEN integers in the array and ignore the remaining.

if you think that somebody here will write program for you then i think you are at wrong place ,in order to get assistance you need to prove that you made efforts to solve this question(you can prove this by showing us your code you have so far).

create an array variable and then give input to it. then check each element if they are numbers , if they are numbers then check if they are prime or even number then add the number to a variable(sum+=arr[i]).don't forget to initialize the sum variable to 0.

Learner010 99 Posting Whiz in Training

i can't understand , what you want.
please explain again in convenient way.

Learner010 99 Posting Whiz in Training

everybody here knows the solution but we won't give you the exact solution.
use this as a hint:-

if the number is evenly divisible(reminder =0) by 2 then it will be even otherwise odd.

the key element in the program is modulus operator.

for more information on operator, read my tutorial Here.

now see this:

for conditions you can if statement like:

if(number is evenly divisilbe i.e. reminder=0 after divide by 2)
cout<<"even number";
else
cout<<"odd number";

hope these hints help you.

Learner010 99 Posting Whiz in Training

okay
Now , delete that older project and thinking to create a new one .
for this , i need an idea about what controls should i use to create 100 square blocks which have text(forecolor=vbblack) from 1 to 100 respectively. And few of them will have different text(in additional to normal text) in different color.

moreever these block should be capable to have tokens over itself. For token(blue token , gray token) i use 2 shape controls(for 2 players).

please give your suggestion ?

Learner010 99 Posting Whiz in Training

Even i cannot access label(created dynamically).
see this :

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        player = IIf(player = "Blue", "Green", "Blue")
        lblPlayer.Text = "Active Player is " & player
        OvalShape1.Left = 10
        OvalShape1.Top = 555
        MsgBox(lbl1.text)   'here i cannot access lbl1 which is created dynamically inside form_load
End Sub
Learner010 99 Posting Whiz in Training

hello and welcome to Daniweb!

Learner010 99 Posting Whiz in Training

i use vs2008.
here is my code:

Public Class Form1

    Dim player As String = "Blue"
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x, y, count As Integer
        Dim varx, vary As Integer 'for positioin(varx=left and vary=top)
        Dim xbool As Boolean = False
        vary = 549
        Dim lbl As Label
        For x = 1 To 10
            For y = 1 To 10
                count += 1
                lbl = New Label
                lbl.Name = "lbl" & count
                lbl.Size = New Size(90, 60)
                lbl.Left = varx
                lbl.Top = vary
                If (xbool = False) Then
                    varx += 91
                Else
                    varx -= 91
                End If
                lbl.Text = "LABEL " & count
                lbl.BackColor = Color.MediumTurquoise
                lbl.TextAlign = ContentAlignment.MiddleCenter
                AddHandler lbl.Click, AddressOf lbl_click
                Me.Controls.Add(lbl)
            Next
            vary -= 61
            'varx = 0
            If (xbool = False) Then
                xbool = True
                varx = 819
            Else
                xbool = False
                varx = 0
            End If
        Next
        lblPlayer.Text += " " & player
    End Sub
    Private Sub lbl_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim lbl As Label = DirectCast(sender, Label)
        MsgBox("top=" & lbl.Top & vbNewLine & "Left=" & lbl.Left & vbNewLine & "Name=" & lbl.Name)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        player = IIf(player = "Blue", "Green", "Blue")
        lblPlayer.Text = "Active Player is " & player
        'OvalShape1.Left = 10
        'OvalShape1.Top = 555
    End Sub
End Class

Here on form load , i create 100 Label(lbl1 to lbl100) dynamically.
And on Button1_click i just …

Learner010 99 Posting Whiz in Training

i have shape control and one button. On button click event handler , what should i write that a shape will be there over a label.

i wanna see a shpae control over label.