Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

All about programming (Specially c, c++, VB, Java)

View attachment 1059259
tanong ko lang po kung pano ko po mapapagalaw yung arrow sa start instruction at about. kailangan ko po kasi makagawa ng arrow selection menu. thanks in advance po. devc++ nga po pala gamit ko. pero c file lang po.

tried this in c#, mejo hawig naman sa c++. pede mong i-incorporate yung mga user-defined functions na ngawa ko. ang pproblemahin mo na lang eh, kung paano malalaman ng program mo yung up/down arrow key pag ni-press ng user sa console (konting kalikot sa main() function). hopefully, masearch mo sa internet kung paano. PM me kung interested ka sa sample program (.exe) para maforward ko sayo.

Code:
void Main()
{
	//Show the banner load the UI with the Start Option selected
	ShowBanner();
	
	//handle what option is currently selected
	int selectedOption = StartIsSelected(); //selectedOption = 1

	//declaration to handle what key is pressed in the console
	ConsoleKeyInfo keyInfo = Console.ReadKey(true);  //Console.ReadKey(true) means that the input will not display on the console screen

	//infinite loop
	while (true)
	{
		//when the Up-Arrow key is pressed on the keyboard
		if (keyInfo.Key == ConsoleKey.UpArrow)
		{
			//clear the console screen
			Console.Clear();
			//show the banner
			ShowBanner();

			if (selectedOption == 1)
			{
				selectedOption = NextSelection(selectedOption, true); //selectedOption will be 3
			}
			else if (selectedOption == 2)
			{
				selectedOption = NextSelection(selectedOption, true); //selectedOption will be 2
			}
			else
			{
				selectedOption = NextSelection(selectedOption, true); //selectedOption will be 1
			}
		}
		//when the Down-Arrow key is pressed on the keyboard
		else if (keyInfo.Key == ConsoleKey.DownArrow)
		{
			//clear the console screen
			Console.Clear();
			//show the banner
			ShowBanner();

			if (selectedOption == 1)
			{
				selectedOption = NextSelection(selectedOption, false); //selectedOption will be 2
			}
			else if (selectedOption == 2)
			{
				selectedOption = NextSelection(selectedOption, false); //selectedOption will be 3
			}
			else
			{
				selectedOption = NextSelection(selectedOption, false); //selectedOption will be 1
			}
		}
		//when the Enter key is pressed on the keyboard
		else if (keyInfo.Key == ConsoleKey.Enter)
		{
			switch(selectedOption)
			{
				case 1:
					Console.WriteLine("\n\nThe Start option is selected");
					break;
				case 2:
					Console.WriteLine("\n\nThe Instruction option is selected");
					break;
				case 3:
					Console.WriteLine("\n\nThe About option is selected");
					break;
			}

			//wait until the user press a key
			Console.Write("\n\nPress any key to exit...");
			Console.ReadKey(true);

			//quit the while loop and end the program
			break; 
		}
		//store what key is pressed on the console
		keyInfo = Console.ReadKey(true);
	}
}

/* 
 * 
 * UI
 * 
 */

void ShowBanner()
{
	Console.WriteLine("Edit this for your own banner \n");
}

int StartIsSelected()
{
	Console.WriteLine("> Start");
	Console.WriteLine("  Instruction");
	Console.WriteLine("  About");
	return 1;
}

int InstructionIsSelected()
{
	Console.WriteLine("  Start");
	Console.WriteLine("> Instruction");
	Console.WriteLine("  About");
	return 2;
}

int AboutIsSelected()
{
	Console.WriteLine("  Start");
	Console.WriteLine("  Instruction");
	Console.WriteLine("> About");
	return 3;
}

/*
 *
 */

int NextSelection(int option, bool up)
{
	if (up)
	{
		return NextSelectionUp(option);
	}
	else
	{
		return NextSelectionDown(option);
	}
}

int NextSelectionUp(int option)
{
	switch (option)
	{
		case 1:
			return AboutIsSelected();
		case 3:
			return InstructionIsSelected();
		default:
			return StartIsSelected();
	}
}

int NextSelectionDown(int option)
{
	switch (option)
	{
		case 1:
			return InstructionIsSelected();
		case 2:
			return AboutIsSelected();
		default:
			return StartIsSelected();
	}
}
 
get by id po ito....yung code ko null yong output...paki check nmn san ako mali....c# nga pala ito....tnx...

public void getUserById(int _id)
{
this.Id = _id;

try
{
con.Query("Select * From users Where id = @id");
con.Cmd.Parameters.AddWithValue("@id", this.Id);
reader = con.Cmd.ExecuteReader();
//reader.Read();
while (reader.Read())
{
this.Id = Convert.ToInt32(reader[0]);
this.FullName = Convert.ToString(reader[1]);
this.Username = Convert.ToString(reader[2]);
this.Password = Convert.ToString(reader[3]);
this.Role = Convert.ToString(reader[4]);
}
}
finally
{
if(con != null) con.CloseConnection();
if(reader != null) reader.Close();
}
}


Try mo po palitan lang sa line na 'to:

con.Cmd.Parameters.AddWithValue("@id", _id);

- - - Updated - - -

View attachment 1058507
panu po gawin yan?? tia po..

In C# it should be written like this:

if (e.KeyCode == Keys.Enter)
{
string _month = "9";
string _year = "2015";
string _inputtedDate = this.textBox1.Text;
DateTime _fullDate = DateTime.Parse(String.Format("{0:D}", Convert.ToDateTime(_month + "/" + _inputtedDate + "/" + _year)));

MessageBox.Show(String.Format("{0:MMMM}", Convert.ToDateTime(_fullDate)) +
" " + String.Format("{0:dd}", Convert.ToDateTime(_fullDate)) +
" is " + String.Format("{0:dddd}", Convert.ToDateTime(_fullDate)).ToUpper());
}


Put it in a TextBox' KeyDown Event para pag Press mo ng ENTER lalabas na ang output.

Note: yung part na ito "{0:D}" palitan mo ng 0 + : + D without the plus sign, without space. nagiging emoticon kasi pag post ko e. hehe

- - - Updated - - -

Sir paano po ung coding ng logs!!

ung makikita po lahat ng nangyare sa isang system!

ex. user1 deleted the file................
user2 update the data.....


ung ganyan po! para namomonitor ung mga nag-aaccess ng systme.

thanks po.

Sir that can be done thru the use of triggers in SQL Server. or simply gawa ka ng audit trail table at doon ka maginsert ng transactions ng bawat user. tas gawa ka report para view-able sya, at can be filter by user, by module or by date.
 
Last edited:
mga sir at maam patulong naman po...my nakita kasi ako sa youtube at google about sms sender broadband stick modem using app in vb2010 kaso ayaw naman gumana...

baka po my nakagawa na sa inyo baka po pwede magpatulong..

thanks in advance po
 
Mga Sir. Pahelp po.

Bakit kaya ndi gumagana sa Dev C++ ung 24L03.c??


Last Chapter ko na po ito sa e-book pinag-aaralan ko.

Hindi ako makatulog kasi ndi ko ma-debug.

Help nmn po.

Ndi po ako programmer/coder, Engineer po ako kaya ndi gaanong expert.

SALAMAT PO!!!

/* 24L01.c: A module file */
#include "24L02.h"

static NODE *head_ptr = NULL;

/**
** main_interface()
**/
void main_interface(int ch)
{
switch (ch){
case 'a':
list_node_add();
break;
case 'd':
if (!list_node_delete())
list_node_print();
break;
case 'p':
list_node_print();
break;
default:
break;
}
}
/**
** list_node_create()
**/
NODE *list_node_create(void)
{
NODE *ptr;

if ((ptr=(NODE *)malloc(sizeof(NODE))) == NULL)
ErrorExit("malloc() failed.\n");

ptr->next_ptr = NULL; /* set the next pointer to NULL */
ptr->id = 0; /* initialization */
return ptr;
}

/**
** list_node_add()
**/
void list_node_add(void)
{
NODE *new_ptr, *ptr;

new_ptr = list_node_create();
printf("Enter the student name and ID: ");
scanf("%s%ld", new_ptr->name, &new_ptr->id);

if (head_ptr == NULL){
head_ptr = new_ptr;
} else {
/* find the last node in the list */
for (ptr=head_ptr;
ptr->next_ptr != NULL;
ptr=ptr->next_ptr)
; /* doing nothing here */
/* link to the last node */
ptr->next_ptr = new_ptr;
}
}
/**
** list_node_delete()
**/
int list_node_delete(void)
{
NODE *ptr, *ptr_saved;
unsigned long id;
int deleted = 0;
int reval = 0;

if (head_ptr == NULL){
printf("Sorry, nothing to delete.\n");
reval = 1;
} else {
printf("Enter the student ID: ");
scanf("%ld", &id);

if (head_ptr->id == id){
ptr_saved = head_ptr->next_ptr;
free(head_ptr);
head_ptr = ptr_saved;
if (head_ptr == NULL){
printf("All nodes have been deleted.\n");
reval = 1;
}
} else {
for (ptr=head_ptr;
ptr->next_ptr != NULL;
ptr=ptr->next_ptr){
if (ptr->next_ptr->id == id){
ptr_saved = ptr->next_ptr->next_ptr;
free(ptr->next_ptr);
ptr->next_ptr = ptr_saved;
deleted = 1;
break;
}
}
if (!deleted){
printf("Can not find the student ID.\n");
}
}
}
return reval;
}
/**
** list_node_print()
**/
void list_node_print(void)
{
NODE *ptr;

if (head_ptr == NULL){
printf("Nothing to display.\n");
} else {
printf("The content of the linked list:\n");
for (ptr = head_ptr;
ptr->next_ptr != NULL;
ptr = ptr->next_ptr){
printf("%s:%d -> ",
ptr->name,
ptr->id);
}
printf("%s:%d ->|",
ptr->name,
ptr->id);
printf("\n");
}
}
/**
** list_node_free()
**/
void list_node_free()
{
NODE *ptr, *ptr_saved;

for (ptr=head_ptr; ptr != NULL; ){
ptr_saved = ptr->next_ptr;
free(ptr);
ptr = ptr_saved;
}
free(ptr);
}
/**
** ErrorExit()
**/
void ErrorExit(char *str)
{
printf("%s\n", str);
exit(ERR_FLAG);
}


/* lnk_list.h: the header file */ //eto po ung 24L02.h//

#include <stdio.h>
#include <stdlib.h>

#ifndef LNK_LIST_H
#define LNK_LIST_H
#define ERR_FLAG 1
#define MAX_LEN 16

struct lnk_list_struct
{
char name[MAX_LEN];
unsigned long id;
struct lnk_list_struct *next_ptr;
};

typedef struct lnk_list_struct NODE;

NODE *list_node_create(void);
void list_node_add(void);
int list_node_delete(void);
void list_node_print(void);
void list_node_free(void);
void ErrorExit(char *);
void main_interface(int);

#endif /* for LNK_LIST_H */


/* 24L03.c: The driver file */
#include "24L02.h" /* include header file */

main(void)
{
int ch;

printf("Enter a for adding, d for deleting,\n");
printf("p for displaying, and q for exit:\n");
while ((ch=getchar()) != 'q'){
main_interface(ch); /* process input from the user */
}

list_node_free();
printf("\nBye!\n");

return 0;
}
 
Pwede po ba magpaturo kung paanu matuto ng paggamit ng CCBOT o un tinatawag na diskless... sana po ay matulungan ninyo ako sa mabigat ko na problemang ito.... marami salamat sa tutulong.... at makapagtuturo...
 
Hi guys im developing system Information system nya . ang gsto kse ng company is connected sya in any computer via network . ayaw nla ng standalone na system . kumbaga available sya in network connection i need some suggestion and anong mgandang database ang gamitin . thank sa sasagot
 
Boss baka pwede patulong gumawa ng phonebook emulator gamit console app ng vb.net. Crud po name and phone number lang po ung need. Thanks sana active pa
 
Mga Sir. Pahelp po.

Bakit kaya ndi gumagana sa Dev C++ ung 24L03.c??


Last Chapter ko na po ito sa e-book pinag-aaralan ko.

Hindi ako makatulog kasi ndi ko ma-debug.

Help nmn po.

Ndi po ako programmer/coder, Engineer po ako kaya ndi gaanong expert.

SALAMAT PO!!!

/* 24L01.c: A module file */
#include "24L02.h"

static NODE *head_ptr = NULL;

/**
** main_interface()
**/
void main_interface(int ch)
{
switch (ch){
case 'a':
list_node_add();
break;
case 'd':
if (!list_node_delete())
list_node_print();
break;
case 'p':
list_node_print();
break;
default:
break;
}
}
/**
** list_node_create()
**/
NODE *list_node_create(void)
{
NODE *ptr;

if ((ptr=(NODE *)malloc(sizeof(NODE))) == NULL)
ErrorExit("malloc() failed.\n");

ptr->next_ptr = NULL; /* set the next pointer to NULL */
ptr->id = 0; /* initialization */
return ptr;
}

/**
** list_node_add()
**/
void list_node_add(void)
{
NODE *new_ptr, *ptr;

new_ptr = list_node_create();
printf("Enter the student name and ID: ");
scanf("%s%ld", new_ptr->name, &new_ptr->id);

if (head_ptr == NULL){
head_ptr = new_ptr;
} else {
/* find the last node in the list */
for (ptr=head_ptr;
ptr->next_ptr != NULL;
ptr=ptr->next_ptr)
; /* doing nothing here */
/* link to the last node */
ptr->next_ptr = new_ptr;
}
}
/**
** list_node_delete()
**/
int list_node_delete(void)
{
NODE *ptr, *ptr_saved;
unsigned long id;
int deleted = 0;
int reval = 0;

if (head_ptr == NULL){
printf("Sorry, nothing to delete.\n");
reval = 1;
} else {
printf("Enter the student ID: ");
scanf("%ld", &id);

if (head_ptr->id == id){
ptr_saved = head_ptr->next_ptr;
free(head_ptr);
head_ptr = ptr_saved;
if (head_ptr == NULL){
printf("All nodes have been deleted.\n");
reval = 1;
}
} else {
for (ptr=head_ptr;
ptr->next_ptr != NULL;
ptr=ptr->next_ptr){
if (ptr->next_ptr->id == id){
ptr_saved = ptr->next_ptr->next_ptr;
free(ptr->next_ptr);
ptr->next_ptr = ptr_saved;
deleted = 1;
break;
}
}
if (!deleted){
printf("Can not find the student ID.\n");
}
}
}
return reval;
}
/**
** list_node_print()
**/
void list_node_print(void)
{
NODE *ptr;

if (head_ptr == NULL){
printf("Nothing to display.\n");
} else {
printf("The content of the linked list:\n");
for (ptr = head_ptr;
ptr->next_ptr != NULL;
ptr = ptr->next_ptr){
printf("%s:%d -> ",
ptr->name,
ptr->id);
}
printf("%s:%d ->|",
ptr->name,
ptr->id);
printf("\n");
}
}
/**
** list_node_free()
**/
void list_node_free()
{
NODE *ptr, *ptr_saved;

for (ptr=head_ptr; ptr != NULL; ){
ptr_saved = ptr->next_ptr;
free(ptr);
ptr = ptr_saved;
}
free(ptr);
}
/**
** ErrorExit()
**/
void ErrorExit(char *str)
{
printf("%s\n", str);
exit(ERR_FLAG);
}


/* lnk_list.h: the header file */ //eto po ung 24L02.h//

#include <stdio.h>
#include <stdlib.h>

#ifndef LNK_LIST_H
#define LNK_LIST_H
#define ERR_FLAG 1
#define MAX_LEN 16

struct lnk_list_struct
{
char name[MAX_LEN];
unsigned long id;
struct lnk_list_struct *next_ptr;
};

typedef struct lnk_list_struct NODE;

NODE *list_node_create(void);
void list_node_add(void);
int list_node_delete(void);
void list_node_print(void);
void list_node_free(void);
void ErrorExit(char *);
void main_interface(int);

#endif /* for LNK_LIST_H */


/* 24L03.c: The driver file */
#include "24L02.h" /* include header file */

main(void)
{
int ch;

printf("Enter a for adding, d for deleting,\n");
printf("p for displaying, and q for exit:\n");
while ((ch=getchar()) != 'q'){
main_interface(ch); /* process input from the user */
}

list_node_free();
printf("\nBye!\n");

return 0;
}

Sir engineer, ano po exactly yung problema niyo sa code? anong hinidi gumagana? Ano ang error? :)

- - - Updated - - -

Hi guys im developing system Information system nya . ang gsto kse ng company is connected sya in any computer via network . ayaw nla ng standalone na system . kumbaga available sya in network connection i need some suggestion and anong mgandang database ang gamitin . thank sa sasagot

Gawa nang website?
 
TS may alam po ba kayo kung pano ma embed or integrate ang Google Earth at pwede itong manipulahin ang KML files sa VB.net? Need po kasi sa project eh, kung may alam kayo TS, pwede po bang magpaturo?
 
Good Afternoon Sir,

May thesis po kami about detecting defective coffee beans using image processing and C# po yung language na gamit namin, need namin nang programmer na makakatulong samin sa paggawa nang system! Here's the manuscript nang thesis namin for you to have a better idea kung ano po yung ginagawa nang system. Yung main function nalang po yung kailangan namin so I hope na may makatulong po sakin dito. We are willing to pay po para sa maggagawa nang system. Kaya please if you can po baka pede po namin kayo ihire as programmer? Badly needed lang po talaga. Thankyou so much. Just comment to this thread and kami na po ang bahala kumontact sa inyo for further discussions. Thanks
 

Attachments

  • Manuscript (2).rar
    125.9 KB · Views: 16
Last edited:
Patulong naman po sa java . pano po pag nag input ung user ng password dapat lalabas asterisk . salamat po
 
Pahelp namn po about sa restaurant system sa java using JOptionPane at System out print ln lang po . pag po kasi nasa loob na ng if or case ung variable pag nilabas ko na ayaw po nya basahin.? pano ko po mapapalabas ung value na yun sa labas ng case nya or if ?
 
pa tulong namn po pahinge po sample ng student information system vb.. salamat po
 
Gusto ko lang po sana malaman kung sino diyan ang mayron ng JAVA Add,Edit,Delete,Search na may form.. salamat po sa makakapagbigay :D Kailangan ko po kasi eh... salamat
 
hello sir, good day. may code po ba kayo sa pag gawa ng online exam using visual basic? ung bago po. pati pag design. salamat po ng marami!
 
sir pa help nmn po panu po nya ma rerecognize ung capital letter... palindrome po sya sir ... for Example po ... "madam" ang output nya palindrome ..pag "Madam" nmn is not palindrome...

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplicationpal;
import java.io.*;
import java.util.Scanner;
/**
*
* @author Administrator
*/
public class JavaApplicationpal {

public static void main(String args[])throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String opt;
String iS;
Scanner in = new Scanner(System.in);
do
{
System.out.println("Input a string");
iS = in.nextLine();

int length = iS.length();
int i, begin, end, middle;

begin = 0;
end = length - 1;
middle = (begin + end)/2;

for (i = begin; i <= middle; i++) {
if (iS.charAt(begin) == iS.charAt(end)) {
begin++;
end--;
}
else {
break;
}
}
if (i == middle + 1) {
System.out.println("Palindrome");
}
else {
System.out.println("Not a palindrome");
}
System.out.println("another oner ?: y/n");
opt=br.readLine();
}while(opt.equals("y"));


}
}




yan po ung code ko ..salamt po ng marami
 
Back
Top Bottom