Post by altair on Mar 29, 2017 2:32:03 GMT 10
|
|
Post by bobowk on Mar 29, 2017 19:19:23 GMT 10
Thanks I've been looking for the URL! I'll be sure to credit you!
|
|
Post by altair on Mar 29, 2017 23:42:06 GMT 10
Okay.... So..... I am planning on extending this library for some more functions... I am going to jot down here the things I might add soon... - Getting approx. user location from IP
- Getting weather info (I have done it before for Makan )
- Checking currency rates...
- async alternatives for each function
Any suggestions ? Leave comment below.... Since GComplete is open source.... You could just go ahead and fork it and all the stuff you want... Then send me a pull request and I will have a look and add it to the real thing.... NOTE : GComplete is open source under GNU GPL v2 license.... You can use the code... But if you modify them, you are required to show your source code as well.... Here is the link to the license document in the repo : github.com/AndrewBastin/GComplete/blob/master/LICENSEThanks
Last Edit: Mar 29, 2017 23:43:29 GMT 10 by altair
|
|
Post by plugado on Jun 24, 2017 4:30:52 GMT 10
Last Edit: Jun 24, 2017 4:31:18 GMT 10 by plugado
|
|
Post by plugado on Jun 25, 2017 1:52:33 GMT 10
Imports System.Collections.Generic Imports System.IO Imports System.Linq Imports System.Net Imports System.Text Imports System.Threading.Tasks Imports System.Xml
Namespace Gcomplete Public Class Gcomplete
Const GOOGLE_SUGGEST_URL As String = "http://google.com/complete/search?output=toolbar&q="
Public Shared Function GetSuggestions(input As String) As String() ' Getting the XML response Dim xmlData As String = Nothing Using client As New WebClient() xmlData = client.DownloadString(GOOGLE_SUGGEST_URL & input) End Using
' Parsing the response If xmlData IsNot Nothing Then Using reader As XmlReader = XmlReader.Create(New StringReader(xmlData))
Dim response As New List(Of String)()
While reader.Read() Select Case reader.NodeType Case XmlNodeType.Element If reader.Name = "suggestion" Then response.Add(reader.GetAttribute("data")) End If Exit Select End Select End While Return response.ToArray() End Using End If Return New [String](-1) {} End Function
End Class End Namespace
|
|