Search Google

Friday 25 September 2015

Share market knowledge

Hello guys .. I had found this artical very useful . This article is in hindi . Just read and understand it . It reveals the Dark side of Market.

A must for nerd trader:


----------------------------------------------------------------------------------------------------------------------------------------------------
Sab ke Sab Chor hai.........


Quote:
Is Bazar me sab chor baithe huye hai ... ab yeh aap par nirbhar karta hai ki aap kitna bach paate hai... mai bhee share baazaar me nivesh/trade karta hoon... in sab choro se bachne kaa sabse achha tareeka yah hai ki aap unse apane trade sambandhit saari jaankari le bhale hi iski jaroorat aapko ho yaa naa ho... aur yadi ve koi jankari dene me aaana- kaani kare to in logoko RTI ki dhamaki de ... itne me to yah log raste par aa jaate hai...
shuruvaat me account kholne ke baad inka vyavhaar badal jaataa hai, aap sab ne mahsoos kiyaa hoga to aap apna bhee vyvhaar badal de, hamesha in se jara Rude hokar baate kare....
lekin account kholane ke pahle aap kuchh baate sunishchit kar le....
1. kabhi bhi DIAL & TRADE jaisi koi suvidhaa ke chakkar me naa pade ( agar aap TRADER ho to )

2. kam Brokerage hamesha suvidhaajanak nahee hoti...

3. in logo se T+1,2,3,4,5 , MARGIN aur M2M ke matlab pooch aur samajh le...

4. kabhi bhi jara si bhi dikkat ho to inke Branch/Area/ Regional/Zonal Head ke pass jaakar use Hadkane me jara bhee deri nahi kare( jab yeh log aapse beimaani karne me nahi darte hai to aap apane paise ke liye ladne me bhi naa dare " fir is baat ka koi farak nahee padhta hai ki yeh HARD EARNED MONEY yaa EASY EARNED MONEY " aakhirkaar yah aapki hi hai.....

5. yadi aap Online Trading kare to DIET ODIN jaisa hi koi software le... aapake broadband par yah VSAT ki tulna me keval 1/3 seconds ki deri se hi utaar- chadaav ( fluctuation) dikhataa hai ... jabaki koi doosri Browser Based application 2-3 seconds se lekar 5 minutes tak ki deri karti hai .... bhale hi woh ICICI Direct , Relaince Money ka INSTATRADE, Kotat kaa KEAT ho yaa fir Angel walo ka ANGEL TRADE ....

Vaise yah jo DIETODIN software hai yah wahi soft ware hai jo aap kisi bhi Broker ki Screen par Lal Neele utar chadavo ke sath dekhte hai... meri jaankaare ke anusaar abhi keval Angel Broking waale hi yah software de rahe hai par isake liye 2-3 hajaar / mahine ki kam se kam brokerage ki maang karte hai ...

6. kabhee bhee in logo ke BTST calls par dhyan naa de... yah sirf Brokerage Banane ki chaal hoti hai ....

7. FINALLY & MOST IMPORTANTLY , BUSINESS NEWS channel sabase bade chor hai, in Business News Channels par recommend kiye gaye Stocks par kabhi bhi apna paisa naa lagaye .... yah �aksar� keval unhi counters ki baate karte hai jo ki chal chuke hote hai... inki baat sunkar aap keval oopari staro par apna paisa fansa sakte hai aur kuchh nahi kar sakte hai...

PAISA KAMANE KAA SABASE SAHI TARIKA :-
Jab bhi koi Counter jaise Relaince , L& T , BHEL, ONGC, GAIL ,RCOM yaa aapaki pasand kaa koi bhi Counter jaise ki meri pasand NTPC , DLF, SAIL aur TTML hai ..... 3 se 10 % tak Correct ho jaave to us par apne paas uplabdh kul 40% pasia hi lagaye, aur yadi aapaka share 10% aur neeche aata hai to 35 % paisa aur lagaye... aur intzaar kare ... aap kabhi bhi ghata nahi kaatenge...

PAISA NAA GAVANE KAA SABASE SAHI TARIKA :-
aap yadi F& O me Trade karna chahate hai to kabhi bhi haa kabhi bhi kisi bhi Position ko carry naa kare bhale hi woh ASHOK LEYLAND hi kyu naa ho ( Jiska Span Margin 55 000 se 65000 hi hai) JAB TAK KI AAPKE ACCOUNT ME 5 LAKH Rs naa ho ... baat badi ajeeb lagati hai lekin mera Ganit to yahi kahta hai... aur Cash Market me bhi Nivesh aur Trade karte samay ho sake to KAM se KAM 1 lakh Rs. se Nivesh /Trade kare...
kyuki har jagah ki tarah yaha bhi SAARI BADI MACHHLIYA CHOTI MACHHLIYO PAR HI PALTI HAI....

PS: ho sake to kisi Retail Niveshak/ traders ke samooh ke sadasya ban jaaye jisase aapka partyaksh sampark ho... aur har 3-4 din me SEBI ki website par jaate rahe ( bhale hi yah kitni hi dheemi khule)

Monday 14 September 2015

Multidimensional Arrays

Multidimensional Arrays

 http://php.net/manual/en/control-structures.foreach.php

 http://www.informit.com/articles/article.aspx?p=31840&seqNum=4

 

Laymens terms:

A recursive function is a function that calls itself

A bit more in depth:

If the function keeps calling itself, how does it know when to stop? You set up a condition, known as a base case. Base cases tell our recursive call when to stop, otherwise it will loop infinitely.
What was a good learning example for me, since I have a strong background in math, was factorial. By the comments below, it seems the factorial function may be a bit too much, I'll leave it here just in case you wanted it.

function fact($n)

  { if ($n === 0)  

{ // our base case return 1; } 

 else { return $n * fact($n-1); // <--calling itself. } }

In regards to using recursive functions in web development, I do not personally resort to using recursive calls. Not that I would consider it bad practice to rely on recursion, but they shouldn't be your first option. They can be deadly if not used properly.

 

Arrays do not have to be a simple list of keys and values—each location in the array can hold another array. This way, we can create a two-dimensional array. You can think of a two dimensional array as a matrix, or grid, with width and height or rows and columns.
If we want to store more than one piece of data about each of Bob's products, we could use a two-dimensional array.
Figure 3.3 shows Bob's products represented as a two-dimensional array with each row representing an individual product and each column representing a stored product attribute.
Figure 3.3Figure 3.3 We can store more information about Bob's products in a two- dimensional array.
Using PHP, we would write the following code to set up the data in the array shown in Figure 3.3.
$products = array( array( 'TIR', 'Tires', 100 ),
          array( 'OIL', 'Oil', 10 ),
          array( 'SPK', 'Spark Plugs', 4 ) );
You can see from this definition that our products array now contains three arrays.
To access the data in a one-dimensional array, recall that we need the name of the array and the index of the element. A two-dimensional array is similar, except that each element has two indices—a row and a column. (The top row is row 0 and the far left column is column 0.)
To display the contents of this array, we could manually access each element in order like this:
echo '|'.$products[0][0].'|'.$products[0][1].'|'.$products[0][2].'|<br />';
echo '|'.$products[1][0].'|'.$products[1][1].'|'.$products[1][2].'|<br />';
echo '|'.$products[2][0].'|'.$products[2][1].'|'.$products[2][2].'|<br />';
Alternatively, we could place a for loop inside another for loop to achieve the same result.
for ( $row = 0; $row < 3; $row++ )
{
 for ( $column = 0; $column < 3; $column++ )
 {
  echo '|'.$products[$row][$column];
 }
 echo '|<br />';
}
Both versions of this code produce the same output in the browser:
|TIR|Tires      |100|
|OIL|Oil        |10 |
|SPK|Spark Plugs|4  |
The only difference between the two examples is that your code will be shorter if you use the second version with a large array.
You might prefer to create column names instead of numbers as shown in Figure 3.3. To do this, you can use associative arrays. To store the same set of products, with the columns named as they are in Figure 3.3, you would use the following code:
$products = array( array( Code => 'TIR', 
             Description => 'Tires', 
             Price => 100 
            ),
          array( Code => 'OIL', 
             Description => 'Oil', 
             Price => 10 
            ),
          array( Code => 'SPK', 
             Description => 'Spark Plugs', 
             Price =>4 
            ) 
         );
This array is easier to work with if you want to retrieve a single value. It is easier to remember that the description is stored in the Description column than to remember that it is stored in column 1. Using associative arrays, you do not need to remember that an item is stored at [x][y]. You can easily find your data by referring to a location with meaningful row and column names.
We do however lose the ability to use a simple for loop to step through each column in turn. Here is one way to write code to display this array:
for ( $row = 0; $row < 3; $row++ )
{
 echo '|'.$products[$row]['Code'].'|'.$products[$row]['Description'].
    '|'.$products[$row]['Price'].'|<br />';
}
Using a for loop, we can step through the outer, numerically indexed $products array. Each row in our $products array is an associative array. Using the each() and list() functions in a while loop, we can step through the associative arrays. Therefore, we need a while loop inside a for loop.
for ( $row = 0; $row < 3; $row++ )
{
 while ( list( $key, $value ) = each( $products[ $row ] ) )
 {
  echo "|$value";
 }
 echo '|<br />';
}
We do not need to stop at two dimensions—in the same way that array elements can hold new arrays, those new arrays in turn can hold more arrays.
A three-dimensional array has height, width, and depth. If you are comfortable thinking of a two-dimensional array as a table with rows and columns, imagine a pile or deck of those tables. Each element will be referenced by its layer, row, and column.
If Bob divided his products into categories, we could use a three-dimensional array to store them. Figure 3.4 shows Bob's products in a three-dimensional array.
Figure 3.4Figure 3.4 This three-dimensional array allows us to divide products into categories.
From the code that defines this array, you can see that a three-dimensional array is an array containing arrays of arrays.
$categories = array( array ( array( 'CAR_TIR', 'Tires', 100 ),
               array( 'CAR_OIL', 'Oil', 10 ),
               array( 'CAR_SPK', 'Spark Plugs', 4 )
              ),
           array ( array( 'VAN_TIR', 'Tires', 120 ),
               array( 'VAN_OIL', 'Oil', 12 ),
               array( 'VAN_SPK', 'Spark Plugs', 5 )
              ),
           array ( array( 'TRK_TIR', 'Tires', 150 ),
               array( 'TRK_OIL', 'Oil', 15 ),
               array( 'TRK_SPK', 'Spark Plugs', 6 )
              )
          );
Because this array has only numeric indices, we can use nested for loops to display its contents.
for ( $layer = 0; $layer < 3; $layer++ )
{
 echo "Layer $layer<br />";
 for ( $row = 0; $row < 3; $row++ )
 {
  for ( $column = 0; $column < 3; $column++ )
  {
   echo '|'.$categories[$layer][$row][$column];
  }
  echo '|<br />';
 }
}
Because of the way multidim


Friday 4 September 2015

PHP LOGIC PROGRAMMING





multidimensional 

<?php 
//Initialize the array using the array() function.
$flower_shop = array( 
"rose" => array( "5.00", "7 items", "red" ), 
"daisy" => array( "4.00", "3 items", "blue" ), 
"orchid" => array( "2.00", "1 item", "white" ), 
); 

//print "rose costs 5.00, and you get 7 items." 
echo "rose costs ".$flower_shop['rose'][0].", and you get ".$flower_shop['rose'][1]."."; 
//print "daisy costs 4.00, and you get 3 items." 
echo "daisy costs ".$flower_shop['daisy'][0].", and you get ".$flower_shop['daisy'][1]."."
//print "orchild costs 2.00, and you get 1 item. 
echo "orchid costs ".$flower_shop['orchid'][0].", and you get ".$flower_shop['orchild'][1]."."; 
?>