Posts

what to do if drop down menu hide behind containers

Image
if you have the problem shown in the picture you simply added " position" to your css for your wrapper or container content , to come by this problem just remove the position and move around the object by using margin  code: .CONTAINER  { position:absolute or relative ;   /*DELETE THIS */ MARIGN:........... ;  /* USE THIS INSTEAD */ } NOTE: it does not matter either absolute or relative position both will cause this problem

Adding navigation to your web pages with one line of php code

Image
Ok so fist time i learned html i added all the nav code to all of my pages , BIG MISTAKE  from now on i just create one html file containing my <NAV> and one PHP file for the page i use . then i include my nav.html into my php file (NOTE : im a newbie this is the way i know and i assure you there are alot more ways but this one of them ) here is the code you have to write : NAV.HTML     /*this is the fhtml file you create youre nav in , inside notepad <nav> <ul> <li><a href="home.php"></a></li> <li><a href="Contact us.php"></a></li> <li><a href="About us.php"></a></li> </ul> </nav> Home.PHP: // your first website page <!DOCTYPE HTML> <html> <body> <? php include_once "NAVHTML"; ?> </body> </html> now you can include your nav in all of your pages with one line , NOTE : this is the...

what does @ do in c# ?

when you want to address an external address the ( \ ) might cause you Errors to prevent or resolve that you can use (  @ ) which means -AT- , it tells the app this is a path for example : 1.wrong , might give you an Error : process.start( " c\:windows\user\you " ); 2. Right : process.start( @ " c\:windows\user\you " );

bubble sort in c# ?

bubble sort , one of simplest  sorting algorithm for small app you write as a student , the reason why its not good for bigger app cause it is slow let me explain it to you the amount of oration need to be done equals = (N-1) it means if you have 1000 number your app will do 999 operation to sort the array or whatever each two neighbor number will be compare together , here is the core of sorting algorithm   for (int i = 1; i < max; i++)             {                 for (int j = 0; j < max - i; j++)                 {                     if (numarr[j] > numarr[j + 1])                     {                         int temp = numarr[j];               ...

Odd and Even number in c#

Image
if you are an software engineering student finding the odd and even number will be your first coding so let me break it to you then we share the code together a number is even when number%2=0 . for example 10%2=0 so its an even number . this % is mod option, not division  the code i wrote was in first semester it will get some numbers and choose using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Collections; namespace zojfard {     class Program     {                  static void Main(string[] args)         {                                      int k;             Console.WriteLine("enter the amount of  numbers you like to do ");    ...

how to get an array from text box in C# ? or as i call it multiple input.

we all no arrays , the difference between arrays and strings is that strings are separated by ( "" )but arrays separated by ( , ) , so what if we want to get an list of numbers into an array from one text box ? to do so simply learn then copy and paste the code below : var number=textBox1.Text.Split(',').Select(s => double.Parse(s.Trim())).ToArray();

open file dialog in c# (2 methods)

Image
you created an app that needs to open an external file manually, for example you created a player in c# and you want to let the user open up files that's why you use openfiledialog which prompt a dialog file and let you choose an specific file. to do here is the code only for openfiledialog  i will provide you two methods 1.for text files 2. windows media player  please add using.sytem.IO namespace first 1.method for text :   //allow you to open a dilogbox and load the file you desire              OpenFileDialog record = new OpenFileDialog();             record.FileName = "";             record.Filter = "Text Files|*.txt";             if (record.ShowDialog() == System.Windows.Forms.DialogResult.OK)             {                 string file = record.Fil...