Tuesday, August 30, 2016

write a good Article



http://www.techtunes.com.bd/category/oracle
https://www.youtube.com/channel/UCxK1Lc5XTqq8-_7LxmDqy7g


EXEC [pr_GetPlanFundsCategories] 453063803
*/
ALTER PROCEDURE [dbo].[pr_GetPlanFundsCategories] (@PlanNumber INT) AS
Declare @PlanID Varchar(12),
@FundHistoryDate DateTime,
@ClientStatus Varchar(50)

SET NOCOUNT ON

Select @PlanID = PlanClientNumber, @ClientStatus = ISNULL(ClientStatus, '')
FROM PlanAccount where PlanNumber = @PlanNumber

--select @clientstatus
IF @ClientStatus IN ('Proposed','Setup')
BEGIN
Select DISTINCT UPPER(ISNULL(F.AssetClass404a5Report + ' ', 'Other ') + 'Funds') AS AssetClass
, convert(varchar(10), getdate(), 101) AS AsOfDate
, RL.RiskLevelID
from XAccountFund H
INNER JOIN Fund F ON H.FundID = F.FundID
LEFT JOIN tblFundRiskLevel RL ON ISNULL(F.AssetClass404a5Report, 'Other') = ISNULL(RL.AssetClass, '')
WHERE H.AccountID = @PlanNumber
AND (F.Status = 'Open' OR H.MarketValue IS NOT NULL)
ORDER BY RL.RiskLevelID
END

ELSE
BEGIN
SELECT @FundHistoryDate = Max(FundHistoryDate) from PlanFundHistory
SELECT DISTINCT UPPER(ISNULL(F.AssetClass404a5Report + ' ', 'Other ') + 'Funds') AS AssetClass
, convert(varchar(10), getdate(), 101) AS AsOfDate
, RL.RiskLevelID
from PlanFundHistory H
INNER JOIN Fund F ON H.CUSIPNUM = F.Cusip
LEFT JOIN tblFundRiskLevel RL ON ISNULL(F.AssetClass404a5Report, 'Other') = ISNULL(RL.AssetClass, '')
WHERE H.PlanID = @PlanID
AND (F.Status = 'Open' OR H.DollarAmount > 0) AND ISNULL(H.SuspenseCode, '') <> 'Yes'
AND H.FundHistoryDate = @FundHistoryDate
ORDER BY RiskLevelID
--SELECT RiskLevelID,UPPER(AssetClass+ ' Funds') AS AssetClass, '1/1/2000' as AsOfDate from tblFundRiskLevel

END







Wednesday, August 17, 2016

HTML input elements + Script

  • input elements
  • select elements
  • button elements
  • textarea elements
Input Types :  text, hidden password, radio, checkbox, button, submit, file

<input type="text" ng-model="firstname">

<input type="text" name="firstname">
<input type="checkbox" ng-model="myVar">
<input type="radio" ng-model="myVar" value="dogs">Dogs
<input type="radio" ng-model="myVar" value="tuts">Tutorials

Selectbox

<select ng-model="myVar">
    <option value="">
    
<option value="dogs">Dogs
    
<option value="tuts">Tutorials
</select>

<select name="cars">
  <option value="volvo">Volvo</option>
  
<option value="saab">Saab</option>
</select>

<textarea ng-model="myTextarea">
</textarea>


<textarea name="message" rows="10" cols="30">
     The cat was playing in the garden.
</textarea>

**************************************************************************
JavaScript variables can hold many data types: numbers, strings, arrays, objects and more:
var length = 16;               // Number
var lastName = "Johnson";      // String
var cars = ["Saab""Volvo""BMW"];    // Array
var points = [40100152510];          // Good
var x = {firstName:"John", lastName:"Doe"};// Object
****************************************************************************
function bar() {
    return 3;
}

bar() //3
function myFunction(a, b) {
    return a * b;
}
window.myFunction(102);
    myFunction() and window.myFunction() is the same function:


JavaScript allows us to assign a function to a variable and then use that variable as a function. It is called function expression.

Example: Function expression

var add = function sum(val1, val2) {
    return val1 + val2;
};

var result1 = add(10,20);
var result2 = sum(10,20); // not valid

JavaScript allows us to define a function without any name. This unnamed function is called anonymous function. Anonymous function must be assigned to a variable.

Example: Anonymous Function
var sayHello = function (firstName) {
    alert("Hello " + firstName);
};
sayHello("Bill");

//anonymous function expression
var a = function() {
    return 3;
}
<script> var x = function (a, b) {return a * b}; document.getElementById("demo").innerHTML = x(4, 3);

       var myFunction = new Function("a""b""return a * b");
        var x = myFunction(43);

</script>
**************************************************************
//self invoking function expression
(function sayHello() {
    alert("hello!");

})();
**************************************************************
function person(first, last, age, eye) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eye; } var myFather = new person("John", "Doe", 50, "blue"); var myMother = new person("Sally", "Rally", 48, "green"); document.getElementById("demo").innerHTML = "My father is " + myFather.age + ". My mother is " + myMother.age;




// This is a function constructor:
function myFunction(arg1, arg2) {
    this.firstName = arg1;
    this.lastName  = arg2;
}
// This creates a new object
var x = new myFunction("John","Doe");
x.firstName;                            

 // Will return "John"

*************************************************************
var myObject = {
    firstName:"John",
    lastName: "Doe",
    fullName: function () {
        return this.firstName + " " + this.lastName;
    }
}
myObject.fullName();         // Will return "John Doe"
In JavaScript you can define function as object methods.

The following example creates an object (myObject), with two properties (firstName and lastName), and a method (fullName):.

// This is a function constructor:
function myFunction(arg1, arg2) {
    this.firstName = arg1;
    this.lastName  = arg2;
}
// This creates a new object
var x = new myFunction("John","Doe");
x.firstName;                            
 // Will return "John"




Driving

 https://youtube.com/shorts/5Ac2qZHrApU?si=_X-G7pJFHiZoD-s7 https://www.youtube.com/watch?v=f6pSsex87oU