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!

Programming 101 [Problems & Solutions]

uso talaga ang hingian ng system, wala bang katulad ng iba na nagsusumikap gumawa.
 
mga idol pwd patulong paanu gumawa ng algorithm?hindi ko kc yan alam
 
patulong naman first assignment ko :pray:

Database using MS access
ganto yung pinapagawa samin .

faculty
subjects
students
grades


wala akong idea kung papano magagwa :noidea::noidea:
patulong naman po :praise: :thanks:
 
Last edited:
patulong naman first assignment ko :pray:

Database using MS access
ganto yung pinapagawa samin .

faculty
subjects
students
grades


wala akong idea kung papano magagwa :noidea::noidea:
patulong naman po :praise: :thanks:

try mo muna mag open ng MSAccess at mag create ng new database
makikita mo naman dun kung pano mag create ng tables

kumbaga umpisahan mo muna boss
 
PA-HELP naman po.

may dalawang coordinates po ako. "initial" at "next" coordinates.
Gusto ko kasi na ipatravel ang pointer ko from initial to next coordinates.

example: ang steps na itravel ni 'Y' ay xa ring steps na matravel ni 'X'

so far, ang idea ko is to get the slope pero malaki yung error.

patulong naman ng algorithm na iba.
thanks po.
 
Last edited:
PA-HELP naman po.

may dalawang coordinates po ako. "initial" at "next" coordinates.
Gusto ko kasi na ipatravel ang pointer ko from initial to next coordinates.

example: ang steps na itravel ni 'Y' ay xa ring steps na matravel ni 'X'

so far, ang idea ko is to get the slope pero malaki yung error.

patulong naman ng algorithm na iba.
thanks po.

You could actually use the point-slope formula to solve this but it's a little cumbersome and there are better methods.

First method via trig:

1. get angle between points with atan2(dy,dx)
2. calculate components by (cos(theta)*speed, sin(theta) * speed)

Then just add the components every frame.

Second method via Vector normalization.

1. normalize your vector by dividing it by its magnitude.
ie.
Code:
dx = targetx - posx
dy = targety - posy
mag = sqrt(dx*dx + dy*dy)
dx = dx/mag
dy = dy/mag

2. add dx and dy to your position every frame.

Third method via interpolation:

1. Determine how many steps you want to use up from pos to target.
2. get distance between 2 vectors b-a.
3. Divide it by steps
4. Add it to pos every frame until counter == steps.


I suggest method 2 or 3 in your case. Sorry no code. Hirap nag post sa phablet.
 
patulong naman first assignment ko :pray:

Database using MS access
ganto yung pinapagawa samin .

faculty
subjects
students
grades


wala akong idea kung papano magagwa :noidea::noidea:
patulong naman po :praise: :thanks:


What exactly ba pinapagawa sa inyo? As in database na ba talaga o gagawa lang muna ng mga Tables para sa faculty, subjects, students, grades? Di ako familiar masyado sa Access kasi Oracle gamit namin sa school pero parehas lang naman yun search ka na lang sa youtube pano gumawa ng tables... Sa pagkakaintindi ko kasi sa pinapatulong mo since 1st assignment nyo pa lang naman yan e gagawa pa lang kayo ata ng tables... Unless kung may binigay na syang inputs. Pwedeng hard code yun, pwede ding direct na. (ewan ko kung pwede ba yung direct sa Access)...

So ganto yung sa hardcode:

example lang toh ha?
CREATE TABLE faculty
(
fac_IDno int,
LastName varchar(30),
FirstName varchar(30),
Address varchar(30),
City varchar(30)
);

na-gets mo ba? I think so since inaaral mo yang Database ngayon.
 
Mga sir, pa help naman po dito sa pagination ko. Habang dumadami po kasi yung page eh priniprint nya lahat ng page, eto po yung codes ko


//computing page
$per_page = 10;


$result = mysql_query("SELECT * FROM tbl_posts WHERE topic_id='$id'");
$total_results = mysql_num_rows($result);
$total_pages = ceil($total_results / $per_page);



if (isset($_GET['page']) && is_numeric($_GET['page']))
{
$show_page = $_GET['page'];

if ($show_page > 0 && $show_page <= $total_pages)
{
$start = ($show_page -1) * $per_page;
$end = $start + $per_page;
}
else
{
$start = 0;
$end = $per_page;
}
}
else
{
$start = 0;
$end = $per_page;
}

//displaying page
for ($i = 1;$i
<
= $total_pages;$i++)
{
echo "<a href='viewtopic.php?id=$id&page=$i'>$i</a> ¤ ";
}


Thanks po in advance.
 
question lng po. gagamit po ako ng vb at mysql. alin pong mysql ang iddl ko? hindi ko po alam kung anu pipiliin ko. my cluster kc, my enterprise. alin po dapat dun? tia po.
 
A mathematician named Ulam proposed generating a sequence of numbers from any positive integer N greater than 1 using the following procedure:

If N is 1, stop.
If N is even, replace it with N/2.
If N is odd, replace it with 3 * N + 1.

Continue with this process until N reaches 1.
Write a Java program that accepts as input an integer value N (assume N > 1) and prints out the Ulam sequence that begins with the input value N.
.. pahelp po.. gamit ay util.* :weep: thankk youuuu!!
 
hindi 'to complete at hindi ako marunong ng java pero try ko.

// input
n=5;
//print n

while(n!=1)
{

// if n is even
if(n mod 2 == 0)
{
n = n/2;
//print n
}

//n is odd
else
{
n = 3*n + 1;
// print n
}

}
 
Last edited:
:pray:Pde po ba ako dito?may problem din kasi ako sa programming in PHP and javascripting.ok lng po ba?:help::help::help:
 
Pwde tambay d2 ??
1st week self study about programming ..
Trying to learn JAVA kaya lang hirap pala .. hanap ako mga resources hehehe
 
mga master:) pde po pa help sa problem ko about php?

Kung pde ho sana maghingi ako sa inyo ng simpleng code lng na gamit php,mag tritrigier or tatawag ng javascript text or effects at ska simpleng input to database ang php with javascript.wala kasi akong alam dito pero gustong matuto at mahirap kasi maintindihan sa google mga masters:help::help::help:
 
mga master:) pde po pa help sa problem ko about php?

Kung pde ho sana maghingi ako sa inyo ng simpleng code lng na gamit php,mag tritrigier or tatawag ng javascript text or effects at ska simpleng input to database ang php with javascript.wala kasi akong alam dito pero gustong matuto at mahirap kasi maintindihan sa google mga masters:help::help::help:

Codeacademy
Kung seryoso ka talagang matuto about PHP programming, boss, sundan mo lang yung course sa Codeacademy about PHP.
 
make a program that will output passed, failed and nograde
if student got 75' and higher print,"Passed,"
if student got 74' and below printf,"Failed,"
if student got 0 grade print,"NoGrade",
end program

pa help po begginer lang po kasi ako sa programming e. thank po. :excited:

C++, visual basic, java
 
Last edited:
guys patulong naman sa php.

may error ako sa registration.

nag iinvalid email lagi kahit na valid naman. ito ang code ko. thanks sa tutulong. :)

Code:
	//Retrieve form inputs.
	$strMemberID = generateMemberID();
	$strMemberName = isset($_POST['txtMemberName']) ? trim($_POST['txtMemberName']) : "";
	$strMemberPassword1 = isset($_POST['txtMemberPassword1']) ? trim($_POST['txtMemberPassword1']) : "";
	$strMemberPassword2 = isset($_POST['txtMemberPassword2']) ? trim($_POST['txtMemberPassword2']) : "";
	$strMemberType = isset($_POST['lstMemberType']) ? trim($_POST['lstMemberType']) : "Regular";
	$strMemberEmail = isset($_POST['txtMemberEmail']) ? trim($_POST['txtMemberEmail']) : "";
	$strMemberFullName = isset($_POST['txtMemberFullName']) ? trim($_POST['txtMemberFullName']) : "";
	$strMemberAddress = isset($_POST['txtMemberAddress']) ? trim($_POST['txtMemberAddress']) : "";
	$strMemberContactNumber = isset($_POST['txtMemberContactNumber']) ? trim($_POST['txtMemberContactNumber']) : "";

	//Reset status message.
	$strErrorMessage = "";
	$strSuccessMessage = "";

	//If submit button is clicked,
	if(isset($_POST['btnSubmit']))
	{
		//If no member name is entered,
		if(trim($strMemberName) == "")
		{
			$strErrorMessage = "Please enter user name.";
		}
		//If no member password is entered,
		else if(trim($strMemberPassword1) == "")
		{
			$strErrorMessage = "Please enter password.";
		}
		//If no password confirmation is entered,
		else if(trim($strMemberPassword2) == "")
		{
			$strErrorMessage = "Please confirm password.";
		}
		//If passwords do not match,
		else if(trim($strMemberPassword1) != trim($strMemberPassword2))
		{
			$strErrorMessage = "Passwords do not match.";
		}
		//If no member type is selected,
		else if(trim($strMemberType) == "")
		{
			$strErrorMessage = "Please select account type.";
		}
		//If no member email is entered,
		else if(trim($strMemberEmail) == "")
		{
			$strErrorMessage = "Please enter email address.";
		}
		//If email address is invalid,
		[COLOR="Red"]else if(! preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $strMemberEmail))[/COLOR]
		{
		  $strErrorMessage = "Please enter valid email address.";
		}
		//If no full name is entered,
		else if(trim($strMemberFullName) == "")
		{
			$strErrorMessage = "Please enter full name.";
		}
		//If no address is entered,
		else if(trim($strMemberAddress) == "")
		{
			$strErrorMessage = "Please enter address.";
		}
		//If no contact number is entered,
		else if(trim($strMemberContactNumber) == "")
		{
			$strErrorMessage = "Please enter contact number.";
		}
		//Otherwise,
		else
		{
			//Get member information.
			$sqlQuery = "SELECT * FROM member_tbl WHERE member_name = '" . $strMemberName . "' OR member_email = '" . $strMemberEmail . "'";
						 
			//Execute query.
			$cmdQuery = mysql_query($sqlQuery) or die(mysql_error());
			
			//If at least one record is found,
			if(mysql_num_rows($cmdQuery) > 0)
			{
				$strErrorMessage = "User name / email address is already registered.";
			}
			//Otherwise,
			else
 
Last edited:
Back
Top Bottom