0

When I click in listview control to send data in specific textbox then show the error.
run time error 380 Invalid property value.

I write this code:

Private Sub LVEmp_ItemClick(ByVal Item As MSComctlLib.ListItem)
With Item
       Me.txtSrNo = .Text
        Me.txtamount.Text = .SubItems(mlngCUST_LAST_IDX)
       Me.txtdate.Text = .SubItems(mlngCUST_LAST_IDX)

           End With
End Sub
0

Try this:

echo "\
Subject: My Email Subject at date \"+%m/%d/%Y %r UTC\"
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="^A^A^A^A^A"
Content-Transfer-Encoding: 7bit

--^A^A^A^A^A
Content-Type: text/plain; charset=US-ASCII; name="BDY.TXT"
Content-Disposition: inline; filename="BDY.TXT"
Content-Transfer-Encoding: 7bit

My Email Subject at date \"+%m/%d/%Y %r UTC\"

--^A^A^A^A^A
Content-Type: text/plain; charset=US-ASCII; name="ZIP_FILE"
Content-Disposition: attachment; filename="ZIP_FILE"
Content-Transfer-Encoding: 7bit

" > /tmp/ZIP_FILE

cat /tmp/MySourceZipFile >> /tmp/ZIP_FILE
echo "
--^A^A^A^A^A--" >> /tmp/ZIP_FILE

/usr/sbin/sendmail "GodSend@Heaven.godcom" < /tmp/ZIP_FILE

0

Quick look at isPaired suggests that the closing bracket must be immediately after the opening bracket to be detected?

int isPaired(char c) /*Checks if brackets match*/
{
    if (c == '}' && (peek() == '{'))
        return 1;
    if (c == ']' && (peek() == '['))
        return 1;
    if (c == ')' && (peek() == '('))
        return 1;
    else
        return 0;
}

I think it's time to put aside the code and work on the actual algorithm. Pencil and paper. I for one can't tell what the algorithm is, so I can't tell where the code is wrong. Also, not sure where exactly to paste those 66 lines and what they replace.

0

The easiest way to convert is

ahodStat = IIf(chkAhod.Checked, "Yes", "No")

in which case your code could be simplified to

Private Sub btnCopyNotes_Click(sender As Object, e As EventArgs) Handles btnCopyNotes.Click

    'Copies Info to Clipboard

    Clipboard.SetText("BTN: " + txtWtn.Text + Environment.NewLine +
        "Acct Name: " + txtAcctName.Text + Environment.NewLine +
        "Spoke With: " + txtSpokeWith.Text + Environment.NewLine +
        "Verified: " + cboVerified.Text + Environment.NewLine +
        "Email: " + txtEmail.Text + Environment.NewLine +
        "Issue: " + txtIssue.Text + Environment.NewLine +
        "AHOD: " + IIf(chkAhod.Checked, "Yes", "No"))

End Sub
0

After changing the printf placement, I ran your program with a single opening bracket and pressed enter. No closing bracket. No "mismatching" printout displayed.

i've fixed that i think with putting the entire character checking code in a for loop:

  for (i=0; i<LEN && str[i]!=0; i++)
  {
    switch (state)   /* Determines wether the character is within a comment or a string */
    {
    case OUT:
        if (str[i]=='/')
            state=LEFT_SLASH;
        else {
            if (str[i]=='\"')
            state = IN_STRING;
        }
        break;
    case LEFT_SLASH:
        if (str[i]=='*')
            state=IN_COMMENT;
        else {
            state=OUT;
        }
        break;
    case IN_COMMENT:
        if (str[i]=='*')
            state=RIGHT_STAR;
        break;
    case RIGHT_STAR:
        if (str[i]== '/')
            state=OUT;
        else if (str[i]!='*')
            state=IN_COMMENT;
        break;
    case IN_STRING:
        if (str[i]=='\"')
            state = OUT;
        break;
    }    /* End of switch */

    if (state == OUT) 
    {
        if (str[i] == '{' || str[i] == '[' || str[i] == '(')
        {
            push(str[i]);
            continue;
        }
        if (str[i] == '}' || str[i] == ']' || str[i] == ')') 
        {

            if (isPaired(str[i]))
            {
                pop();
                continue;
            }
            else
            {
                printf("In line: %d,\n %s \n Wrong use of bracket: %c \n",line,str,str[i]);
            }
        }

    }        /* End of state check if */
  }        /* End of for */
    ++line;  /* line pointing */

    for (i=0; i<LEN && str[i]!=0; i++)
    {
        str[i]=0;
    }

    i=0; /* resets str[] pointer */

but i can't get it why it doesnt work properly with :

main()
{
    [(])
}

it runs the printf with the "}" last bracket, which isn't supposed to be becuase there is still a matching "{" in the stack... i can't ...

0

I have a form which has in which data is entered in both Textboxes and Checkboxes, when the "Copy" button is clicked all the fields are copied to be pasted elsewhere. I am trying to convert the Checkboxes to Yes or No When Pasted.

Private Sub btnCopyNotes_Click(sender As Object, e As EventArgs) Handles btnCopyNotes.Click
02
        'Converts Checkboxs to yes or no
03
        Dim ahodStat As String
04
        If chkAhod.CheckState = CheckState.Checked Then
05
            ahodStat = "Yes"
06
        ElseIf chkAhod.CheckState = CheckState.Unchecked Then
07
            ahodStat = "No"
08
        End If
09

10
        'Copies Info to Clipboard
11
        Clipboard.SetText("BTN: " + txtWtn.Text + Environment.NewLine +
12
                          "Acct Name: " + txtAcctName.Text + Environment.NewLine +
13
                          "Spoke With: " + txtSpokeWith.Text + Environment.NewLine +
14
                          "Verified: " + cboVerified.Text + Environment.NewLine +
15
                          "Email: " + txtEmail.Text + Environment.NewLine +
16
                          "Issue: " + txtIssue.Text + Environment.NewLine +
17
                          "AHOD: " + ahodStat)
18
    End Sub

Iknow I have to put a ToStringsomewhere I just cant figure out where.

0

After your main loop possibly just do another loop to go from 1 - $max_id and tar up then rm -rf each lower numbered directory?

Maybe I'm missing something but it seems like you're 99% there.

Make sure you make a complete backup of your directory before testing anything that deletes files. Make sure the tar files contain the files you think they do. Make sure the right directories are deleted.

0

/*

#include<iostream>
#include <iomanip>
using namespace std;

int main()
{
    int r=12,i,j,k;
    cout<<setfill(' ')<<setw(18);

    for(i=1;i<=r;i++)
    {
        j=r-0;
        if(i==12)
        {
        cout<<j;
        }
    }

    for(i=1;i<=r;i++)
    {
        j=r-11;
        k=r-1;
        if(i==1)
        {
            cout<<endl<<endl<<setfill(' ')<<setw(10);
            cout<<k;
        }
        if(i==2)
        {
            cout<<setfill(' ')<<setw(15);
        cout<<j;
        }

    }

    for(i=1;i<=r;i++)
    {
        j=r-10;
        k=r-2;
        if(i==3)
        {
            cout<<endl<<endl<<endl<<setfill(' ')<<setw(6);
            cout<<k;
        }
        if(i==4)
        {
            cout<<setfill(' ')<<setw(24);
        cout<<j;
        }

    }

    for(i=1;i<=r;i++)
    {
        j=r-9;
        k=r-3;

        if(i==5)
        {
            cout<<endl<<endl<<endl<<setfill(' ')<<setw(4);
            cout<<k<<".";
        }
        if(i==6)
        {
            cout<<setfill(' ')<<setw(26);
        cout<<j;
        }

    }

    for(i=1;i<=r;i++)
    {
        j=r-8;
        k=r-4;

        if(i==7)
        {
            cout<<endl<<endl<<endl<<setfill(' ')<<setw(5);
            cout<<k;
        }
        if(i==8)
        {
            cout<<setfill(' ')<<setw(23);
        cout<<"#"<<j;
        }

    }

    for(i=1;i<=r;i++)
    {
        j=r-7;
        k=r-5;
        if(i==9)
        {
            cout<<endl<<endl<<endl<<setfill(' ')<<setw(9);
            cout<<k;
        }
        if(i==10)
        {
            cout<<setfill(' ')<<setw(15);
        cout<<"*"<<j;
        }

    }

    for(i=1;i<=r;i++)
    {
        j=r-6;
        if(i==6)
        {
        cout<<endl<<endl<<setfill(' ')<<setw(17);   
        cout<<j;
        }
    }

    return 0;
}

I have given a code there i want to convert it in nested for loops and the output should be as it is given in this pic*/

Attachments Capture.PNG 12.72 KB Capture.PNG 12.72 KB
0
    sub runDir($$);
    sub runDir($$) {
        my $prefix = shift @_;

        my $dir = shift @_;
        opendir(DIR, $dir) or die $!;
        my @entries = readdir(DIR);
        close(DIR);
        foreach my $file (@entries) {
            next if ($file =~ /^\.+$/);
            if ( -d $dir . '/' . $file) {
                runDir($prefix . $file .'_', $dir . '/' . $file);
            } elsif ( ( -f $dir . '/' . $file ) && ( $file =~ /\.config$/ ) && ($file !~ /^$prefix/)) {
                my $suffix = $file;
                $suffix=~s{\A[^.]*}{}xms;

                rename $dir . '/' . $file, $dir . '/' . $prefix . $suffix ;
            }
        }
    }
    runDir('',$output_dir);</pre>

obtained output:

<pre>-- Muska
    |-- Muska_.config
    |-- Muska_.html
    `-- Muska_Digital
        |-- Digital_Verification
        |   |-- Muska_Muska_Digital_Digital_Verification_.config
        |   |-- Muska_Muska_Digital_Digital_Verification_.html
        |   `-- rev1
        |       |-- Muska_Muska_Digital_Digital_Verification_rev1_.config
        |       `-- Muska_Muska_Digital_Digital_Verification_rev1_.html
        |-- Muska_Muska_Digital_.config
        `-- Muska_Muska_Digital_.html
</pre>

Expected_output:

<pre>-- Muska
    |-- Muska_.config
    |-- Muska_.html
    `-- Muska_Digital
        |-- Digital_Verification
        |   |--Digital_Verification_.config
        |   |-- Digital_Verification_.html
        |   `-- rev1
        |       |-- Muska_Muska_Digital_Digital_Verification_rev1_.config
        |       `-- Muska_Muska_Digital_Digital_Verification_rev1_.html
        |-- Muska_Muska_Digital_.config
        `-- Muska_Muska_Digital_.html
</pre>
1

You still aren't explaining what coding problems you are having, and exactly where you need help. Our members cannot help you if you don't make it clear what your problem is. Just saying 'I am stuck' or 'I need code' isn't going to wash I'm afraid. All our members are volunteers, their time is as precious as yours, the demands upon it as great as yours. In other words, you have to show that you have made some effort with your assignment before they are going to put any efforet into helpign you with it. What they won't do is just hand over finished code, that really doesn't help you progress and develop in the long term...

0
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>

void admin() {
        char pass[21];  
        int ploop = 1;
        int in = 1;
        int pass1;

            system("cls");

        for(ploop = 1; ploop<=in;) {
        printf("Enter Password: ");
        scanf_s("%s",&pass);

        pass1 = strcmpi(pass, "admin");

        if (pass1 == 0)
        {
            system("cls");
            in = 0;
            printf("Password Confirm \n\n\n");

            admin2();

        } else {
            system("cls");
            in = 1;
            printf("Access Denied \n\n\n");
        }

        }

}

void admin2() {
        int i,w;
        int item_code[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
        int item_code2;

        printf("Welcome: Admin \n\n");

        printf("MENU");

                printf("What would you like to order:\n");
            printf("Food/Price\n");
            printf("[1]Fried Chicken/P160 \n");
            printf("[2]Spaghetti/P150\n");
            printf("[3]Beef Steak/P120\n");
            printf("[4]Pork Chop/P100\n");
            printf("[5]Longanisa/P190\n");
            printf("[6]Fried Bangus/P180\n");
            printf("[7]Roast Chicken/P100\n");
            printf("[8]Sharkfin/P170\n");
            printf("[9]Beef Tapa/P140\n");
            printf("[10]BBQ Chicken/P190\n");
            printf("[11]Calamari/P180\n");
            printf("[12]Beef Salpicao/P110\n");
            printf("[13]Fried Rice/P170\n");
            printf("[14]Tempura/P190\n");
            printf("[15]Cream Dory/P100\n");
            printf("[16]Jellyfish/P120\n");
            printf("[17]Lechon/P300\n");
            printf("[18]Mash Potato/P150\n");
            printf("[19]Halo-Halo/P120\n");
            printf("[20]Lecheflan/P140\n");

            printf("Please enter how many orders do you want: ");
            scanf("%d",&w);
            for(int j=0;j<w;j++)
            {
                printf("Enter Item Code: ");
                scanf("%d",&item_code2);
            }
            for(i=0;i<w;i++)
            {
                printf("%d",item_code2);
            }

}

void cashier() {
}

void server() {
}

int main()
{       int choice;
        system("cls");

        printf("\t \t \t WELCOME TO BON'S ORDERING SYSTEM \n");

        printf("[1] Admin \n");
        printf("[2] Cashier \n");
        printf("[3] Server \n");
        printf("[4] Waitress \n");
        printf("[5] Hostess \n");

        printf("Please Enter Your Choice: ");
        scanf("%d",&choice);

        switch(choice) {
        case 1: admin(); break;

        }

        system("PAUSE");
        return 0;
}
0

How to take the maximum digits file linked with the folder using perl?

    my $location = $output_dir;
    print $location;
    open LOGFILE, $location;
    my $first_line = 1;
    #print $first_line;
    my $max_id;
    while (<LOGFILE>) {
        if (/rev_(\d)+/) {
            if ($first_line) {
                $first_line = 0;
                $max_id = $1;

            } else {
                $max_id = $1 if ($1 > $max_id);
                print $max_id;
            }
        }
    }

    close LOGFILE;

Obtained output:

 |-- USB_FS
    |   |-- Database
    |   |   |-- rev1
    |   |   |   |-- slater_ams_USB_FS_Database_rev1_.config
    |   |   |   `-- slater_ams_USB_FS_Database_rev1_.html
    |   |   |-- rev2
    |   |   |   |-- slater_ams_USB_FS_Database_rev2_.config
    |   |   |   `-- slater_ams_USB_FS_Database_rev2_.html
    |   |   |-- rev3
    |   |   |   |-- slater_ams_USB_FS_Database_rev3_.config
    |   |   |   `-- slater_ams_USB_FS_Database_rev3_.html
    |   |   |-- slater_ams_USB_FS_Database_.config
    |   |   `-- slater_ams_USB_FS_Database_.html

Expected output:

    |-- USB_FS
    |   |-- Database
    |   |   |-- rev3
    |   |   |   |-- slater_ams_USB_FS_Database_rev3_.config
    |   |   |   `-- slater_ams_USB_FS_Database_rev3_.html
    |   |   |-- slater_ams_USB_FS_Database_.config
    |   |   `-- slater_ams_USB_FS_Database_.html
0

hi

i just wanna ask because the submission of my restaurant POS System will be tomorrow. it is a very hard time for me. here are the requirements:

Restaurant POS (Point of Sale) System
Create a basic Restaurant Point of Sale software using C-Language. Your restaurant must have at least 20 dishes to choose from.
To receive full credit, your software must have the minimum of the following features:
I. Enhanced security and anti-fraud protection
• System is encrypted with password.
• Different jobs: admin, cashier, server, waitress, and hostess with different access privileges.
• Different visibility options, for example, show Remove Item button; only admins can remove item.
II. Action on Orders
• Input orders by item code and automatically computes the total price
• Customers can change the quantity of orders (example: 2 bottle of softdrinks modify it to 5 bottle of softdrinks)
• Take Payment
• Delete order.
• Refund order (it's possible with Refund item command).
• Discounts (with possibility to select a discount from predefined list of discounts, example: for Senior Citizen and other discount cards).
• Assign item modifiers (for example, well done, rare, tomato etc).
III. Actions on menu items:
• View the entire menu with corresponding item code and price
• Add item by item’s code,
• Change price.
• Make a note for kitchen.
• Refund.
• Remove.
IV. Parameters
Your software must have: Basic I/O statements of C-language, Conditional Statements, Looping Statements, functions, and arrays.

Please i really need your ...

0

Looking for an experienced coder to build an Aimbot/ESP for the game Overwatch, needs to be bypassable through Anti-Cheat, with regular updates,
proof of recent previous work will need to be given, preferably looking at someone who had done this before.Looking for a private coded Aim software that will be secured.

  • Must also have a silent load for LAN.
  • Security needs to be one of a kind and top of the line.
  • Aimbot (Smooth, FOV, Key, Spot).
  • Lifetime Updates (Or provide source code in order to update).
  • Lifetime Support.
  • For adding further features I will pay additionally.
    PM me IF u are ready, Thanks
0

I think you need to trace through your code to see why it does what it does. If you had a question about one or two lines in particular to look at I would look but 100?

So, in your IDE set break points and if no IDE, use print statement to reveal what's inside at that point.

0

Line 99: Replace with this line to see what is going on...

printf("A non-bracket was entered\n", line, str, c);

when i run it for example on this "(){}" it still giving the printf() at the end anyway..

"Works" for me. I don't get that printout. Can't see why you would either, regardless of brackets entered. See earlier comment.

Your indentation is off, so the if's and the else's and the brackets that you may THINK go with each other likely do not. Here is your code, bracketed to make things a little more obvious of what is really going on.

        if (state == OUT) 
        {
            if (c == '{' || c == '[' || c == '(')
            {
                push(c);
            }
            else if (c == '}' || c == ']' || c == ')')
            {
                if (isPaired(c))
                {
                    pop();
                }
            }
            else 
            {
                printf("In line: %d :\n %s \n there's a mismatching of %c \n", line, str, c);
            }
        }   /* End of first if */

Line 50:

            for (i = 0; i<LEN && str[i] != ('\0' || 0); i++)

I am almost certain this is not what you meant to write.

('\0' || 0) is the same as (0 || 0), which is "false or false", which is the same as "false", which is the same as 0, which is the same as '\0'. To the compiler. It ends up being the same as...

            for (i = 0; i<LEN && str[i] != '\0'; i++)

which is I think what ...