See Chalangable Things-What You Want That You Get

I am Jack From USA and i am trying to give all kind of The Supernatural things.

Tuesday, May 12, 2009

class file here

Option Explicit

Public Function GetRecords(strQuery As String) As ADODB.Recordset
On Error GoTo selectError

Set GetRecords = CN.Execute(strQuery)

Exit Function
selectError:
Set GetRecords = Nothing
End Function

first page

Option Explicit
Dim rs As New ADODB.Recordset

Public Sub Search(strQuery As String)
' Dim i As Integer, iCol As Integer
' cmbUni.Clear
' Dim cClass As New JK
' Set Rs = cClass.GetRecords(strQuery)
' Fg.DataMode = flexDMBound
' Set Fg.DataSource = Rs
'
' If (Rs.EOF And Rs.BOF) Then
' MsgBox "No Record Found", vbInFormation + vbOKOnly, MediMsg
' Uni_C0 = ""
' Uni_C1 = ""
' Uni_C2 = ""
' Uni_C3 = ""
' Exit Sub
' Else
' 'Uni_C0 = ""
' End If
'
' If Rs Is Nothing Then
' MsgBox "No Record Found", vbInFormation + vbOKOnly, MediMsg
' Uni_C0 = ""
' Uni_C1 = ""
' Uni_C3 = ""
' Uni_C2 = ""
' Fg.Rows = 1
' Exit Sub
' Else
' 'Uni_C0 = ""
' End If
'
' For i = 0 To Rs.Fields.Count - 1
' Fg.TextMatrix(0, i) = Rs(i).Name
' cmbUni.AddItem Rs(i).Name
' Fg.AutoSize i, i, True
' Fg.AutoSizeMode = flexAutoSizeColWidth
' Next
'
' cmbUni.Text = Rs.Fields(0).Name
' cmbUni.ItemData(0) = True

Dim i As Integer ', iCol As Integer
cmbUni.Clear
Dim cClass As New JK
Set rs = cClass.GetRecords(strQuery)

'''''''''''Change for Sorting '''''''''''''''

'Fg.DataMode = flexDMBound
Fg.DataMode = flexDMFree
Set Fg.DataSource = rs

'''''''''''Change for Sorting '''''''''''''''

If (rs.EOF And rs.BOF) Then
MsgBox "No Record Found", vbInformation + vbOKOnly, MediMsg
Uni_C0 = ""
Uni_C1 = ""
Uni_C2 = ""
Uni_C3 = ""
Exit Sub
Else
'Uni_C0 = ""
End If

If rs Is Nothing Then
MsgBox "No Record Found", vbInformation + vbOKOnly, MediMsg
Uni_C0 = ""
Uni_C1 = ""
Uni_C3 = ""
Uni_C2 = ""
Fg.Rows = 1
Exit Sub
Else
'Uni_C0 = ""
End If

For i = 0 To rs.Fields.Count - 1
Fg.TextMatrix(0, i) = rs(i).Name
cmbUni.AddItem rs(i).Name
Fg.AutoSize i, i, True
Fg.AutoSizeMode = flexAutoSizeColWidth
Next

cmbUni.Text = rs.Fields(0).Name

'''''''''''Change for Sorting '''''''''''''''
Fg.Select 1, 0, 1, Fg.Cols - 1

Fg.Sort = flexSortGenericAscending

Fg.Select 1, 0
'''''''''''Change for Sorting '''''''''''''''

cmbUni.ItemData(0) = True

End Sub

Private Sub cmbUni_Click()

Dim i As Integer
' txtSearch.SetFocus
'
' If Fg.Rows = 1 Then Exit Sub
' Rs.Filter = ""
'
' For i = 0 To Rs.Fields.Count - 1
' Fg.AutoSize i, i, True
' Fg.AutoSizeMode = flexAutoSizeColWidth
' Next

'''''''''''Change for Sorting '''''''''''''''
txtSearch.Text = ""
'''''''''''Change for Sorting '''''''''''''''
txtSearch.SetFocus

If Fg.Rows = 1 Then Exit Sub

'''''''''''Change for Sorting '''''''''''''''
Fg.DataMode = flexDMFree

Set Fg.DataSource = rs

Fg.Select 1, cmbUni.ListIndex
Fg.Sort = flexSortGenericAscending

'''''''''''Change for Sorting '''''''''''''''

rs.Filter = ""

For i = 0 To rs.Fields.Count - 1
Fg.AutoSize i, i, True
Fg.AutoSizeMode = flexAutoSizeColWidth
Next

'''''''''''Change for Sorting '''''''''''''''
If Trim$(txtSearch.Text) <> "" Then
cmdFilter_Click
End If

'''''''''''Change for Sorting '''''''''''''''

End Sub

Private Sub cmbUni_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub

Private Sub cmdFilter_Click()
Dim i As Integer
On Error Resume Next

If rs.Fields(cmbUni.Text).Type = adInteger Or rs.Fields(cmbUni.Text).Type = adCurrency Then
rs.Filter = "[" & cmbUni.Text & "] like " & Trim$(Fg.TextMatrix(Fg.RowSel, cmbUni.Index)) & ""
Else

If rs.Fields(cmbUni.Text).Type = 7 Then
rs.Filter = "[" & cmbUni.Text & "] like #" & txtSearch.Text & "#"
Else
rs.Filter = "[" & cmbUni.Text & "] like '" & Trim$(Fg.TextMatrix(Fg.RowSel, IIf((cmbUni.ListIndex = -1), 0, cmbUni.ListIndex))) & "*'"
End If
End If

For i = 0 To Fg.Cols - 1
Fg.AutoSize i, i, True
Fg.AutoSizeMode = flexAutoSizeColWidth
Next

End Sub

Private Sub Fg_DblClick()
Dim i%

If FgClick <> True Then
If Fg.Rows <= 1 Then
Uni_C0 = ""
Uni_C1 = ""
Uni_C2 = ""
Uni_C3 = ""
Unload Me
Exit Sub
End If

For i = 0 To Fg.Cols - 1

Select Case i

Case 0
Uni_C0 = Fg.TextMatrix(Fg.RowSel, 0)

Case 1
Uni_C1 = Fg.TextMatrix(Fg.RowSel, 1)

Case 2
Uni_C2 = Fg.TextMatrix(Fg.RowSel, 2)

Case 3
Uni_C3 = Fg.TextMatrix(Fg.RowSel, 3)

End Select

Next

Unload Me
Else
Me.Hide
End If

End Sub

Private Sub Fg_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then Fg_DblClick
End Sub

Private Sub Fg_KeyUp(KeyCode As Integer, _
Shift As Integer)
' If KeyCode = 39 Then
' If Not (Fg.Col = Fg.Cols - 1) Then
' Fg.ShowCell Fg.RowSel, Fg.ColSel
' End If
'
' ElseIf KeyCode = 37 Then
' If Not Fg.Col < 0 Then
' Fg.ShowCell Fg.RowSel, Fg.ColSel
' End If
' End If
End Sub

Private Sub Form_Initialize()
Me.Width = 5310
Me.Height = 2700

End Sub

Private Sub Form_Resize()
On Error Resume Next
Picture1.Left = Me.Width - 900
txtSearch.Left = cmbUni.Width + 30
txtSearch.Width = Me.Width - (cmbUni.Width + Picture1.Width) + 200
Fg.Width = Me.Width - 100
'Fg.ScrollBars = flexScrollBarVertical
End Sub

Private Sub SmartButton1_Click()
Unload Me
End Sub

Private Sub txtSearch_Change()
Dim i As Integer
On Error Resume Next

If txtSearch.Text = "" Then
rs.Filter = ""
'''''''''''''''''OLD CODING
' For i = 0 To Rs.Fields.Count - 1
' Fg.AutoSize i, i, True
' Fg.AutoSizeMode = flexAutoSizeColWidth
' Next
'
' Exit Sub
'
'
''''''''''''''''''NEW CODE START FOR SORTING

'''''''''''Change for Sorting '''''''''''''''

Fg.DataMode = flexDMFree
Set Fg.DataSource = rs

'''''''''''Change for Sorting '''''''''''''''

For i = 0 To rs.Fields.Count - 1
Fg.AutoSize i, i, True
Fg.AutoSizeMode = flexAutoSizeColWidth
Next

'''''''''''Change for Sorting '''''''''''''''

Fg.Select 1, cmbUni.ListIndex
Fg.Sort = flexSortGenericAscending

'''''''''''Change for Sorting '''''''''''''''
Exit Sub

End If

If rs.Fields(cmbUni.Text).Type = adInteger Or rs.Fields(cmbUni.Text).Type = adCurrency Or rs.Fields(cmbUni.Text).Type = adSingle Or rs.Fields(cmbUni.Text).Type = adSmallInt Then
rs.Filter = "[" & cmbUni.Text & "] Like " & txtSearch.Text & ""
Else

If rs.Fields(cmbUni.Text).Type = 7 Then
rs.Filter = "[" & cmbUni.Text & "] like #" & txtSearch.Text & "#"
Else
rs.Filter = "[" & cmbUni.Text & "] like '" & txtSearch.Text & "*'"
End If

End If

'OLD CODING
' For i = 0 To Rs.Fields.Count - 1
' Fg.AutoSize i, i, True
' Fg.AutoSizeMode = flexAutoSizeColWidth
' Next
'
''''''''''''NEW CODE FOR SORTING

'''''''''''Change for Sorting '''''''''''''''

Fg.DataMode = flexDMBound
Set Fg.DataSource = rs

'''''''''''Change for Sorting '''''''''''''''

For i = 0 To rs.Fields.Count - 1
Fg.AutoSize i, i, True
Fg.AutoSizeMode = flexAutoSizeColWidth
Next

End Sub

Private Sub txtSearch_KeyDown(KeyCode As Integer, _
Shift As Integer)
On Error Resume Next

Select Case KeyCode

Case vbKeyDown

If Fg.Row = Fg.Rows - 1 Then
'Fg.Row = 1
Else
Fg.Row = Fg.Row + 1
Fg.ShowCell Fg.RowSel, Fg.ColSel
End If

Case vbKeyUp

If Fg.Row = 1 Then
'Fg.Row = Fg.Rows - 1
Else
Fg.Row = Fg.Row - 1
Fg.ShowCell Fg.RowSel, Fg.ColSel
End If

Case vbKeyPageDown

If Fg.Row = Fg.Rows - 1 Then
'Fg.Row = 1
Else
Fg.Row = Fg.Row + 9
Fg.ShowCell Fg.RowSel, Fg.ColSel
End If

Case vbKeyPageUp

If Fg.Row = 1 Then
'Fg.Row = Fg.Rows - 1
Else
Fg.Row = Fg.Row - 9
Fg.ShowCell Fg.RowSel, Fg.ColSel
End If

End Select

End Sub

Private Sub txtSearch_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then
Fg.SetFocus
Fg_DblClick
End If

End Sub

Thursday, October 2, 2008

Serious Security Flaw in Google Chrome


Google Chrome has quickly become one of our favorite browsers here at RWW, but as Ryan Narraine, a security evangelist at Kaspersky Lab, reports, Chrome has also inherited a potentially serious security flaw from the old version of WebKit it is based on. An attacker could easily trick users into launching an executable Java file by combining a flaw in WebKit with a known Java bug and some smart social engineering.

Security expert Aviv Raff, who first discovered this flaw, set up a demo of the exploit here. (Note: This page will automatically download a Java file onto your desktop). You can safely click on the download, as it only opens up a notepad application written in Java.

Carpet-Bombing

chome_exploit.pngThe problem here is that, after a user double-clicks the download at the bottom of the screen, this application is opened without any warning, which would allow a malicious hacker to easily execute any Java program on a user's machine.

Two facts make this exploit especially embarrassing for Google. First of all, Google stressed the security of Chrome in both the official announcement as well as in today's live video demo just before the launch.
Apple Already Did It

More importantly, as ZDNet reports, Apple already patched WebKit against this flaw when it released Safari 3.2.1 in July, though only after the flaw had been known already for more than two months. Google, however, is using an older version of WebKit as the basis for Chrome.
Social Engineering

Obviously, this exploit only works because of the social engineering behind it. Just like some pop-up ads trick users into clicking "OK" because the ad mimics a typical system message in Windows, this exploit would trick users who are not yet familiar with Chrome's interface into believing that the download is actually just part of the web page.

We assume that Google will patch this flaw a lot faster than Apple did, but this news definitely puts a bit of a damper on our enthusiasm for Chrome.

EDITOR'S UPDATE: we've been all over the Chrome story for the past few days, so here is a summary of our coverage so far:

- Video of Google Chrome Announcement
- Chrome: Test it With Us Live (check out Sarah Perez's screencast, with input from all the RWW team)
- Does Google Have Rights to Everything You Send Through Chrome? (great discussion happening in the comments of this one)

Chrome Eliminates Google's Middleman Problems

With its release of Chrome, Google is distributing a browser that will give the company direct access to the user, and more control over the data it gets. If Chrome catches on, the result would be a boon for Google's cash cow -- advertising.

Chrome is a direct assault on Microsoft's dominant market position in the browser space, and it shares some of the privacy features of IE 8. But the bigger picture is control in the cloud of the direct and indirect details of internet life and how those will distill into the perfection of online pitches.

Ad Age took a quick look into the matter, quoting blogger Nick Carr of "The Big Switch" on the potential for Google’s new product:

"To Google, the browser has become a weak link in the cloud system — the needle's eye through which the outputs of the company's massive data centers usually have to pass to reach the user — and as a result the browser has to be rethought, revamped, retooled, modernized."

Naveen Selvadurai, vice president of engineering at location-based social media platform Socialight, thinks the privacy issues are tricky but that users are willing to give up certain amounts of it -- if they're given benefits that they want:

"The wording behind it will be tricky, but I think it's going to be a powerful play. We saw Facebook trip last year with Beacon, but if and when it’s done right, it's got the potential to be a game changer."

How will Google compete? Ari Schwartz, vice president of the Center for Democracy and Technology (CDT), says that from what he’s seen, Google's "Incognito" tool functions in a similar way to Internet Explorer's privacy settings, "but without as much granular detail."

Working the controls themselves, Google could tailor their product to get the most relevant data from users possible -- targeting their advertising even further and sidestepping any restrictions that third-party browsers may have now or implement in the future.

In an e-mail to Wired.com, Google said that in "Incognito" mode web pages and downloaded files aren't logged, that each session begins without any cookies and that all new cookies are deleted when a window is closed -- conventional protections that are more about not letting the next person who uses your computer know what you've been up to.

But the feature does not mask your IP address and therefore does not make your session in incognito mode completely private because many web sites record IP address information. The incognito feature is primarily designed to protect your privacy on your own computer."

"Incognito" also allows users to open a separate window in privacy mode while still providing information to third parties -- and Google -- from other tabs on the desktop. This option could go a long way toward providing Google with information that would be lost if users remain in the full-throttled privacy mode of other browsers.

Google has navigated these waters successfully before. Gmail's launch was met with screeching privacy backlash, but do you know anybody who doesn't have an account? Enabling page rank on your Google toolbar also tips the balance away from privacy, but yields the company valuable aggregatable data that can be aggregated.

The search giant is still working out the details on Chrome's privacy features, and many other aspects of the browser. "What they tell us is that they are still working out what users want in a browser — they want feedback," says Schwartz. "I think people will want more privacy features."

Trip to the moon: $100 million



NEW YORK (CNN/Money) - The firm that already arranged for two millionaire space tourists to visit the International Space Station is getting ready to sell trips to the moon for $100 million each.

Space Adventures, an Arlington, Va., based company, announced plans Wednesday morning for two passengers to ride a Russian Soyuz rocket to the moon and back as soon as 2008. A Russian cosmonaut would pilot the space craft.

The Soyuz would travel around the far side of the moon and then return to Earth without orbiting or landing, according to Eric Anderson, CEO of the firm.

Anderson said the firm has identified more than 1,000 people with both the financial resources and the interest to consider making the trip for that sum, although he couldn't say how many he expects will eventually pay the $100 million price tag.

"There are almost 1,000 billionaires and you don't need to be a billionaire to do it," he said. "All it takes is two to do this. There are people out there with $100 million yachts and $100 million homes."

He said the cost of the first flight would cover the research and development expenses of the mission, and that future lunar flights could cost less, although he wouldn't give an estimate as to how much less, nor how big a deposit the ultra rich space tourists would have to pay to reserve one of the first two seats.

"There will only be one first private mission to the moon," said Anderson.

The challenge of finding two passengers to pay $100 million each is probably greater than making a trip to the moon for that relative bargain cost, said Charles Lurio, independent private space flight consultant.

"Going around the moon for a couple hundred million dollars is reasonable," said Lurio, who is not associated with Space Adventures or the Russian space program. "It's not a question of the technology. It's about how smart you are about using the capabilities."

But Lurio said it's very difficult to know if there are even the two passengers Space Adventures is looking for ready to pay a nine-figure fare.

"I don't know the answer and I don't think anybody else knows," he said. "The question is answerable only by putting it out there. Whether people will pony up the $100 million a pop is dubious, but it's certainly possible and I wish them luck with finding them."
Space tourism growing

The firm arranged for American Dennis Tito to ride a Soyuz to the International Space Station in 2001, followed by South African Mark Shuttleworth, who visited the following year. American Greg Olsen is set to make the third privately financed trip in October. Each paid $20 million.

Olsen appeared at the press conference announcing the lunar mission plans and said he would be one of those interested in a seat on the first flight. Olsen is the head of Sensors Unlimited, a New Jersey firm that makes highly sensitive near-infrared cameras, which he founded in 1992 and sold for $700 million in 2000.

"Who wouldn't want to go to the moon?" he said. "I must say I'm intrigued by the possibility. I have total confidence in the Soyuz vehicle. But one flight at a time."

In addition Space Adventures is taking deposits for people looking to spend just over $100,000 for a suborbital flight that will take passengers into the weightlessness of space for about 15 minutes at a time.

Virgin Atlantic founder Richard Branson also has formed a company called Virgin Galactic, which is also planning suborbital flights as early as 2008 for $200,000, using a spacecraft being designed by Burt Rutan, who won the $10 million X-prize by creating the first privately financed space craft late last year.
A view of the little seen far side

The proposed lunar mission would take the spacecraft within 100 kilometers, or about 62 miles, above the far side of the moon -- the side that is always turned away from Earth. Because it faces away from the Earth it has a surface more scarred by meteors than the side facing Earth.

The mission would be planned for when there is a new moon on Earth, so that the far side would be bathed in sunlight. That would give the mission the chance to take high-resolution photographs of the far side that weren't possible the last time a spacecraft orbited that side the satellite.

A mission that fully orbited the moon without landing would cost significantly more than this planned lunar flyby, said Chrisopher Faranetta, vice president of the orbital space flight program for Space Adventures, because much more fuel would need to be carried.

The Russian space program has previously sold seats on already-scheduled Soyuz flights going to the International Space Station, which allowed it to collect incremental money needed for the space program there.

Anderson said the lunar mission requires 10 times the total fares now being collected on the seats to the space station because this flight would be paid for completely by the passengers, and it would require two separate launches of both the Soyuz and the booster rocket with which it will dock in Earth's orbit.

Anderson said that the Soyuz is a very cost effective spacecraft; it uses what he described as "state of the art but off-the-shelf technology." While the $200 million is needed to cover both the mission and the necessary research and development, Faranetta said it should still be a money-maker for the Russian space program.

The Soyuz was originally designed during the 1960s U.S.-Soviet space race to be a lunar spacecraft, but it doesn't have the capacity to reach the moon in its current configuration. It would have to attach to a booster in low Earth orbit, either soon after reaching orbit or after a stay at the International Space Station, according to Anderson.

Anderson also said the Soyuz has proved its self as a very cost effective and dependable spacecraft, with more time carrying passengers in space than any other spacecraft design.

There has not been a manned mission to the moon since Apollo 17 in December of 1972. A total of 24 men have traveled to the moon, three of them making the trip twice. Half of those 24 men walked on the surface. But Anderson, who was born after the last manned lunar mission, said it's import to return for reasons of scientific exploration as well as the adventure of the trip.

"We're going to show that private companies can carry out exploration 250,000 miles from Earth," he said. And while he said he hoped to eventually have paid visits to the surface of the moon, he wouldn't estimate the timing or the cost of such a mission.

"I think this is an ambitious enough first step," he said

Labels: Trip to the moon