পোস্টগুলি

2016 থেকে পোস্টগুলি দেখানো হচ্ছে

Simple Android Application for the beginners

ছবি
                  Simple Android Application for the beginners  AndroidManifest ----------------------- <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.faisalporag.tutorialproject">     <application         android:allowBackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsRtl="true"         android:theme="@style/AppTheme">         <activity android:name=".MainActivity">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application> </manifest> ac

Simple Android Application for the beginners

ছবি
                  Simple Android Application for the beginners  AndroidManifest ----------------------- <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.faisalporag.tutorialproject">     <application         android:allowBackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsRtl="true"         android:theme="@style/AppTheme">         <activity android:name=".MainActivity">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application> </manifest> ac

Fan design using Computer Graphics (cpp)

ছবি
                                         Fan design using Computer Graphics (cpp) //Faisal Porag //Computer Graphics /* স্বপ্নের প্রতিবিম্ব...  **/ #include <iostream> #include <stdlib.h> #include <math.h> #include <GL/glut.h> /*Faisal porag Computer science and Engineering department in American International University-Bangladesh*/ //Initializes 3D rendering void initRendering() { glEnable(GL_DEPTH_TEST); } //Called when the window is resized void handleResize(int w, int h) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, (double)w / (double)h, 1.0, 200.0); } float _angle = 0.0; float _cameraAngle = 0.0; float _ang_tri = 0.0; //Draws the 3D scene void drawScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); //Switch to the drawing perspective glLoadIdentity(); //Reset the drawing perspective glRotatef(-_cameraAngle, 0.0, 1.0,

Write a program which takes some input into an Array from console and finds the second last occurrence of a number from that array.

Problem Number : 3 Write a program which takes some input into an Array from console and finds the second last occurrence of a number from that array. (print the index) Sample Input: 10 15 2 35 11 9 7 2 47 13 2 2 Sample Output: 7 Source code :  Download Solution for this problem : <?php //echo "Hello World !"; echo "<br/>"; $a=array(10,15,2,35,11,9,7,2,47,13,2); $count=0;   for($i=count($a)-1;$i>0;$i--) { if($a[$i]==2) { $count++; } if($count==2){ break; } } echo $i; // echo $count; echo "<br/>"; echo "<br/>"; ?> Sample Input: 10 15 2 35 11 9 7 2 47 13 2 2 Sample Output: 7

Write a program which takes a string as input and finds the number of occurrence of “i”.

Problem number : 2 Write a program which takes a string as input and finds the number of occurrence of “i”. Sample Input: University Sample Output: 2 Solution For this problem : <?php //echo "Hello World !"; echo "<br/>"; $name="university"; $count=0;   for($i=0;$i<strlen($name);$i++) { if($name[$i]=="i") { $count++; } } echo $count; echo "<br/>"; echo "<br/>"; ?> Sample Input: University Sample Output: 2

Write a program which can print the following sequences: Sample Output: 1, 10, 100, 1000, ……, N 1, 3, 6, 10, 15, ……, N

Problem number : 1  Write a program which can print the following sequences: Sample Output: 1, 10, 100, 1000, ……, N 1, 3, 6, 10, 15, ……, N Solution for this problem : <?php //echo "Hello World !"; echo "<br/>"; $a=1;   for($i=0;$i<4;$i++){ echo $a; echo ",&nbsp;"; $a=$a*10; } echo "...... , N"; echo "<br/>"; echo "<br/>"; $n=1; for($j= 0; $j < 5; $j++){ $res = $n*($n+1)/2; echo $res; $n++; echo ",&nbsp;"; } echo "...... , N"; echo "<br/>"; echo "<br/>"; ?> Sample Output: 1, 10, 100, 1000, ……, N 1, 3, 6, 10, 15, ……, N

Name Validation Using Java Script

ছবি
                       Name Validation Using Java Script   //Name validation: //Name Format--:      MD.XXXXX XXXX_XXXX_XXXX //accept only one space //accept only one dot //accept less than 50 char //accept greater equal 3 char //number is not allow                     function name_Validation()                     {                         var nameFiled = document.getElementById('nameField');                         if(nameField.value=="" || nameField.value==null)                         {                             display_msg("nameField", "Required", "red", "msg_name");                         }                         else {                             //display_msg("nameField", "Done", "green", "msg_name");                             var name = nameField.value;                             var i;                             var entered_name = "valid&

ID validation using JavaScript

ছবি
                                                                               ID validation using JavaScript  <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head>     <meta charset="utf-8" />     <title> Form Validation</title>         <script>                       function display_msg(fID,msg,color,eID)             {                 var fID = document.getElementById(fID) || document.getElementsByName(fID);                 var eID = document.getElementById(eID);                 eID.innerHTML = msg;                 eID.style.color = color;                 eID.style.visibility = 'visible';             }             //ID check                                              //XX-XXXXX-X        something like that             function idValidation() {                 var idField = document.getElementById('idField');                 if (idField.valu

2D Fan design in computer graphics using c++

ছবি
/**Faisal Porag স্বপ্নের প্রতিবিম্ব...  **/ ///Source code : using c++ #include <iostream> #include <stdlib.h> #include <math.h> #include <GL/glut.h> //Initializes 3D rendering void initRendering() { glEnable(GL_DEPTH_TEST); } //Called when the window is resized void handleResize(int w, int h) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, (double)w / (double)h, 1.0, 200.0); } float _angle = 0.0; float _cameraAngle = 0.0; float _ang_tri = 0.0; //Draws the 3D scene void drawScene() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); //Switch to the drawing perspective glLoadIdentity(); //Reset the drawing perspective glRotatef(-_cameraAngle, 0.0, 1.0, 0.0); //Rotate the camera glTranslatef(0.0, 0.0, -7.0); //Move forward 5 units glPopMatrix(); //Undo the move to the center of the pentagon glPushMatrix(); //Save the current stat

Simple 2D hut design in computer graphics using c++

ছবি
/*Faisal Porag স্বপ্নের প্রতিবিম্ব... */ Source Code: #include <GL/glut.h> void display(void) { /* clear all pixels */ glClear(GL_COLOR_BUFFER_BIT); /* draw white polygon (rectangle) with corners at * (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0) */ glColor3f(0.0, 1.0, 0.0); //glBegin(GL_POLYGON); //glBegin(GL_POINTS); //glBegin(GL_LINES); //glBegin(GL_TRIANGLES); /* glVertex3f(0.25, 0.25, 0.0); glVertex3f(0.75, 0.25, 0.0); glVertex3f(0.75, 0.75, 0.0); glVertex3f(0.25, 0.75, 0.0); */ /* glVertex3f(0.25, 0.25, 0.0); glVertex3f(0.25, 0.75, 0.0); glVertex3f(0.75, 0.25, 0.0); glVertex3f(0.75, 0.75, 0.0); */ //code for one single line /*glVertex3f(0.25, 0.25, 0.0);//starting point glVertex3f(0.75, 0.25, 0.0);//Ending point //code for one single line glVertex3f(0.25, 0.25, 0.0);//starting point glVertex3f(0.50, 0.75, 0.0);//Ending point //code for one single line glVertex3f(0.50, 0.75, 0.0);//starting point glVertex3f(0.75, 0.25, 0.0);//Ending p