Wednesday, September 18, 2013

The purpose programming language design

0 komentar
  • A good language should be easy to compile.
  • Not complicate the compilation process.
  • Complexity can arise because of the symbol
  • have different meanings.
  • Example signs parenthesis (brackets open / close):
Grouping sub-expression Restricted arguments in the function / procedureIndex on the arrays (in VB) Expression of mathematics and logic Examples of simple but powerful scheme are passing parameters by value and by reference.

What Role Did She Play in Miley-Liam Split? : January Jones

0 komentar
At least one tabloid has said Hemsworth was caught cheating with Eiza Gonzalez over the weekend, a Mexican singer/actress with whom he hooked up in Las Vegas.
But other reports have claimed tension between Liam and Miley for weeks, dating back to the latter's lewd Video Music Awards performance and continuing when Cyrus went naked for her "Wrecking Ball" video.
Then there's January Jones.
Rumors first surfaced in February that Liam swapped spit with the Mad Men actress at a Vanity Fair party, while an insider alleges the two have kept in contact ever since... especially dirty contact, that is!
More than one source says Hemsworth texted Jones that he wants to "f-ck" her, while Us Weekly quotes a friend of the star's who backs up this allegation and adds that "January thinks Liam is so sexy."
Liam Hemsworth was reportedly pursuing Mad Men’s January Jones, while his relationship with his 20-year-old fiancee crumbled in recent months.
A source told Us magazine that Jones thinks that The Hunger Games actor is very sexy.
Earlier this summer, Hemsworth had also sent the 35-year-old single mum, a graphic sexual message, which read the he wants to “**** her”.
The Mad Men star was earlier linked to Miley Cyrus’ former fiancee in February, when the two of them were spotted leaving West Hollywood hotspot, ‘Chateau Marmont,’ together.
A source had then revealed that Jones and Hemsworth were “all over each other” at a house party that night, though the 23-year-old actor denied the rumours.
Though a rep had recently hit out at claims Liam had been pursing the actress, insisting to GossipCop the rumours were "tabloid fiction," sources recently told Us Weekly the actor had once again been after her.  "January thinks Liam is so sexy," a source told Us Weekly, claiming the couple were "all over each other," on the infamous night out at the Chateau Marmont.

Hamming code

0 komentar
Hamming code
Richard Hamming invented at Bell Labs in 1950
Error detection mechanisms by adding a data word (D) with a code, usually a parity check bit (C).
The data stored in length D + C.
Known errors by analyzing the data and parity bits

# Data Bits
# Bit Paritas SEC
# Bit Paritas DEC
8
4
5
16
5
6
32
6
7
64
7
8
128
8
9
512
9
10

Parity check bits are placed with 2N formulation where
Each check bit (C) operates in every bit position data position number 1 in the column contains numbers
Data enter: 00111001 then change the data bits to 3 from 0 to 1 as its error.

how to get the data bits to 3 bits as there are errors?

  N = 0,1,2, ……, while the remaining bits of the data is. Then the exclusive-OR sum::
  C1 = D1 Å D2 Å D4 Å D5 Å D7
  C2 = D1 Å D3 Å D4 Å D6 Å D7
  C4 = D2 Å D3 Å D4 Å D8
  C8 = D5 Å D6 Å D7 Å D8
answer:
Enter data into the formulation of the parity check bits :
C1 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C2 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C4 = 0 Å 0 Å 1 Å 0   = 1
C8 = 1 Å 1 Å 0 Å 0   = 0
Now bit 3 having a data error : 00111101
C1 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C2 = 1 Å 1 Å 1 Å 1 Å 0   = 0
C4 = 0 Å 1 Å 1 Å 0   = 0
C8 = 1 Å 1 Å 0 Å 0   = 0

Query for checking

0 komentar
/*before running this script run the report from backoffice first to store the data to table itemsales*/
/*this query will find out variance between sales after tax/gross sales and collected*/


--1.run this script to group all item per salesno
SELECT salesno,splitno,
Sum(([ItemSales].[Quantity]*[ItemSales].[ItemAmount])*case when
([ItemSales].[TransMode]='REG') then 1 else -1 end *case when ((FunctionID)=26)
then 1 else 0 end ) AS ItemSales,
Sum(((Discount)+(PromotionSaving))*case when
((FunctionID)=26) then 1 else 0 end *case when ((DiscountType)<>'FOC Item') then
1 else 0 end *case when ((TransMode)='REG') then 1 else -1 end ) AS ItemDisc,
Sum((ItemAmount)*case when ((FunctionID)=25) then 1 else 0 end *case when
((TransMode)='REG') then 1 else -1 end ) AS BillDisc,
(
Sum(([ItemAmount]*[Quantity])*case when (([FOCType])='FOC Item') then 1 else 0
end *case when ((FunctionID)=26) then 1 else 0 end *case when
(([TransMode])='REG') then 1 else -1 end )) AS TFOC,
Sum(([ItemAmount])*case
when ((FunctionID)=7) then 1 else 0 end *case when (([TransMode])='REG') then 1
else -1 end ) AS BFOC, Sum((Tax0)*case when ((TransMode)='REG') then 1 else -1
end ) AS TTax0,
Sum((Tax1)*case when ((TransMode)='REG') then 1 else -1 end
*case when FunctionID=1  or FunctionID=2  or FunctionID=3  or FunctionID=4  or
FunctionID=5  or FunctionID=6  or FunctionID=8  or FunctionID=9  then 1 else 0
end ) AS TTax1,
Sum((Gratuity)*case when ((TransMode)='REG') then 1 else -1 end
) AS TGratuity,
Sum((RndingAdjustments)*case when ((TransMode)='REG') then 1
else -1 end ) AS TRndAdj,
Sum(([ItemAmount]+[Gratuity])*case when FunctionID=1
or FunctionID=2  or FunctionID=3  or FunctionID=4  or FunctionID=5  or
FunctionID=6  or FunctionID=8  or FunctionID=9  then 1 else 0 end *case when
(([TransMode])='REG') then 1 else -1 end ) AS Collected,
Sum(([ItemSales].[Covers])*case when ([ItemSales].[TransMode]='REG') then 1 else
-1 end *case when ([ItemSales].[TransStatus]='S') then 1 else 0 end ) AS
TCovers, Sum(([ItemSales].[Quantity])*case when ([ItemSales].[TransMode]='REG')
then 1 else -1 end *case when ([ItemSales].[TransStatus]='S') then 1 else 0 end
) AS TBills
, Sum(RndingAdjustments) as RndingAdjustments
into #tot
FROM ItemSales WHERE ((ItemSales.TransStatus)=' ') OR
((ItemSales.TransStatus)='S') or ((Itemsales.TransStatus)='E')
group by salesno,splitno


--2.run this script to get netsales and tax
select salesno,itemsales,itemsales-itemdisc-billdisc-tfoc-bfoc as netsales,collected-RndingAdjustments as collected,tgratuity,ttax0,ttax1
into #tot2
from #tot

--3.a run this script for exclusive tax
select salesno,itemsales,netsales+ttax0+ttax1+tgratuity as NetAndTax,collected
into #tot3
from #tot2

--3.b run this script for inclusive tax
select salesno,itemsales,netsales+tgratuity as NetAndTip,collected
into #tot3
from #tot2

--4.run this script to find out the variance
select * from #tot3
where netandtax<>collected


/*after you find out wrong salesno,go to salesitemstemp and anlyze the data to find out the wrong record*/

 
Trends K N A Copyright © 2009
Fresh Girly Blogger Template Designed by Herro | Powered By Blogger