|
What's the leanest and meanest way to get zlib.dll inflation and deflation??
|
|
|
|
|
albert_redditt wrote: What's the leanest and meanest way to get zlib.dll inflation and deflation?? Add a reference to the file and then start using it.
|
|
|
|
|
Reading the documentation.
|
|
|
|
|
I am trying to making a webscraping code and i have searched a lot and could not find any relevevant code. which scrap the below details from the webside.
your help in this regard will be highly appreciated.
Item name
item price
Shipping price
Sub Web_Scraping()
Dim Internet_Explorer As InternetExplorer
Set Internet_Explorer = New InternetExplorer
Internet_Explorer.Visible = True
Internet_Explorer.navigate ("https://www.ebay.com/sch/i.html?_nkw=045496902612+-Disc+-Only+-Refurbished+-Used+-Lot+-Import+-Japan+-Repro+-Reproduction+-Replacement+-VGA+-Graded+-Edition+-Edtion+-EU+-Mod+-Mods+-Moded+-modded+-Digital+-Collection+-Bundle+-Code+-Codes&LH_TitleDesc=0&LH_BIN=1&LH_Sold=1&rt=nc&LH_PrefLoc=1&LH_ItemCondition=3")
Do While Internet_Explorer.readyState <> READYSTATE_COMPLETE: Loop
MsgBox Internet_Explorer.LocationName & vbNewLine & vbNewLine & Internet_Explorer.LocationURL
For Each item In respJSON("QuickQuoteResult")("QuickQuote")
ThisWorkbook.Worksheets(1).Cells(i, "A") = item("Item name")
ThisWorkbook.Worksheets(1).Cells(i, "B") = item("item price")
ThisWorkbook.Worksheets(1).Cells(i, "C") = item("Shipping price")
End Sub
|
|
|
|
|
Don't try to scrape the details from the website. Even if you get it to work, the code will be brittle and will break at the slightest change of markup on eBay's pages.
It will also potentially breach eBay's terms and conditions.
Use the API instead:
All API documentation[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Alright Thank you for the help.
|
|
|
|
|
|
Hello everyone, i've been assignt at my university to create on visual studio a personal appointment reminder visual basic. My profeccor asked me to find a code on the internet for the subject to create this project.. I searched all over the internet and i couldn't find a simple reminder code or tutorial that can help me.. Does anyone have any idea where to find such a code?
|
|
|
|
|
|
Your prof actually said: "Don't use your own work ... copy it from the internet"?
You should ask for your money back. And in VB yet.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Dear All
Please help me to write VBA code
DATA
Type PMT VCHNO VCHDT ACode Ref1(N) Ref2(InvNo) Ref3(Description) Amount
BANK TT 123123 01/01/2021 ABCD123 987654 TTNO 123123 120
BANK TT 123123 01/01/2021 ABCD123 987653 TTNO 123123 125
IOU CASH 123123 01/01/2021 ABCD124 MANO 654321 505
IOU CASH 123123 01/01/2021 XYZ123 MANO 45689 605
IOU CASH 123123 01/01/2021 FDE987 MANO 75375 550
PETTY CASH 123123 01/01/2021 6528 TEA EXPENSES 650
BANK CHEQUE 123121 01/01/2021 IOP643 987689 CH NO 64321 5555
-------------------------
RESULT
Vch Date Vch No Account Code Description Amount Dr/Cr
01/01/2021 BP123123 ABCD123 TTNO 123123 245 Dr
01/01/2021 BP123123 BANK TTNO 123123 -245 Cr
01/01/2021 IOU123123 ABCD124 654321 505 Dr
01/01/2021 IOU123123 XYZ123 45689 605 Dr
01/01/2021 IOU123123 FDE987 75375 550 Dr
01/01/2021 IOU123123 IOU SETTLE ON -1660 Cr
01/01/2021 CP123123 6528 TEA EXPENSES 650 Dr
01/01/2021 CP123123 CASH TEA EXPENSES -650 Cr
01/01/2021 BP123121 IOP643 CH NO 64321 5555 Dr
01/01/2021 BP123121 BANK CH NO 64321 -5555 Cr
|
|
|
|
|
Uhhh.... look at what you posted again. Did you ask a question or describe a problem you're having?
What are you supposed to do with all that data you posted?
|
|
|
|
|
You have the wrong expectation of this forum, you need to do the work and ask specific coding questions.
I suggest
Clearly define the rules for each column.
Define the rules for each aggregation.
Break the process down into smaller pieces ie. get the column headers correct then get the aggregations correct then put the data into the correct columns.
It is your problem, you cannot expect strangers to define the business rules from a bunch of data for you.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
i want to change mac address by vba code, pls help me, thanks
|
|
|
|
|
Why would you want to change it? It's only ever used to identify network interfaces on a network subnet. That's the only use for it.
|
|
|
|
|
example:
when i login 5 facebook, but i only have 1 laptop. If i use 1 web browser to login, may i have checkpoint? So this case, i open browser then change user agent, change mac address
Can you help me
This links change user agent, but only extension https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg?hl=vi, you can see it
|
|
|
|
|
Maybe you're thinking of "IP address". And a checkpoint is like a (software system) snap shot; how is that relevant?
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
That made no sense what-so-ever.
The MAC address isn't going to impact any application. Changing it will do nothing. There is no "checkpoint" and there is nothing like that attached to the MAC address.
|
|
|
|
|
|
The concept seems "unreal"; since the (hardware) MAC address incorporates the Vendor's id.
In any case, "my" control center doesn't show the MAC address as changeable (contrary to the "adverts"). And I'm an Admin.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Is there a Access VBA version of Google Translator please?
Or, if no, any other Access VBA code using Google's Translation API?
Or, if no, any other Access VBA method of getting a translation of a text written in Language1 in Textbox1 on an Access Form1, into Language2 in Textbox2 in the same Form?
I can code only in Access VBA and am not fluent with APIs. I have found only old Excel VBA solutions, and don't know how to adapt the code to Access VBA. My PC is running Win 10.
Thanks!
|
|
|
|
|
Unlike earlier versions of Office, the VBA that runs in Access is the same as the VBA that runs in Excel. The only difference will be how you access the host Office application.
If you have code that works in Excel, then it should work in Access as well.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you Richard Deeming. I decided to first try out the Excel Code (below) on Excel.
On the .Navigate command, Microfot Edge opened the site correctly
But on the While...Wend statement the code froze or raised Run-time error 462 :
"The remote server machine does not exist or is unavailable". I re-tried many times.
Tony
Option Explicit
Sub Button1_Click()
Dim TestString As String
TestString = "Hello world. Are you ready for us?"
MsgBox VBA_Translate(TestString, "en", "fr")
End Sub
Function VBA_Translate(strSource As String, strSourceLang As String, strDestLang As String) As String
' Adopted from: http://stackoverflow.com/questions/1...text-using-vba
' Set a reference to Microsoft Internet Controls from Tools, References in VBE [OK]
' Source: http://www.vbaexpress.com/forum/showthread.php?52248-google-translator-vba-code-stop-working
Dim j As Long
Dim Web_Translation
With CreateObject("InternetExplorer.Application")
' .Visible = False
.Navigate "http://translate.google.com/#" & strSourceLang & "/" & strDestLang & "/" & strSource
While .Busy Or .ReadyState <> 4
DoEvents
Wend
Application.Wait (Now + TimeValue("0:00:05"))
Web_Translation = Split(Application.WorksheetFunction.Substitute(.Document.getElementById("result_box").innerHTML, "", ""), "<")
.Quit
End With
VBA_Translate = ""
For j = LBound(Web_Translation) To UBound(Web_Translation)
VBA_Translate = VBA_Translate & Right(Web_Translation(j), Len(Web_Translation(j)) - InStr(Web_Translation(j), ">"))
Next
End Function
|
|
|
|
|
' The following code is working for me.
' I have adapted, and converted to Access VBA, some Excel VBA code suggested at https://www.mrexcel.com/board/threads/google-translate-excel-vba.1079457/
' Thanks to Dossfm0q on July 24th 2020 This seems to be executing an instance of Mozilla Firefox.
' I do have Firefox installed and it's my default browser. Not sure if this is relevant.
' While I could not get Dossfm0q's code to work, I noticed that the text in objHTTP.ResponseText DID in his code in fact contain the translated text,
' and that this occurred between the string div class="result-container" just before it and /div just after it.
' so I altered his function to strResponseText() and wrote a function GetTranslatedTextFrom(ResponseText As String) As String to obtain the translated text.
' I am sure that this is less elegant than Dossfm0q's use of objHTML.getElementsByTagName("div") ,
' but since that did not work for me, I had no choice.
<pre lang="vb">
Public Function GetTranslatedTextFrom(TextToTranslate As String, FromLangCode As String, ToLangCode As String) As String
On Error GoTo Get_Err
Dim ResponseText As String
Dim GotAnError As Boolean, PosPrefix As Long, PosAfterPrefix As Long, LenPrefix As Long, PosSuffix As Long, lenSuffix As Long
Dim Prefix As String, Suffix As String
GotAnError = False
ResponseText = strResponseText(TextToTranslate, FromLangCode, ToLangCode)
Prefix = "<div class=""result-container"">"
LenPrefix = Len(Prefix)
Suffix = "</div"
lenSuffix = Len(Suffix)
PosPrefix = InStr(1, ResponseText, Prefix)
If PosPrefix = 0 Then MsgBox "Failed!": GoTo PreExit
PosAfterPrefix = PosPrefix + LenPrefix
PosSuffix = InStr(PosPrefix, ResponseText, Suffix)
GetTranslatedTextFrom = Mid(ResponseText, PosAfterPrefix, PosSuffix - PosAfterPrefix)
PreExit:
Exit Function
Get_Err:
GotAnError = True
MsgBox str(Err) & " " & Err.Description, vbOKOnly, "Error in Sub: [SiftResponseText]"
Resume PreExit
End Function
Public Function strResponseText(strInput As String, FrmLng As String, ToLng As String) As String
On Error GoTo Goo_Err
Dim GotAnError As Boolean
GotAnError = False
Dim strURL As String
Dim objHTTP As Object
Dim objHTML As Object
Dim objDivs As Object, objDiv As Object
Dim strTranslated As String
strURL = "https://translate.google.com/m?hl=" & FrmLng & _
"&sl=" & FrmLng & _
"&tl=" & ToLng & _
"&ie=UTF-8&prev=_m&q=" & strInput
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "GET", strURL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.send ""
Set objHTML = CreateObject("htmlfile")
With objHTML
.Open
.Write objHTTP.ResponseText
strResponseText = objHTTP.ResponseText
.Close
End With
Set objHTML = Nothing
Set objHTTP = Nothing
PreExit:
Exit Function
Goo_Err:
GotAnError = True
MsgBox str(Err) & " " & Err.Description, vbOKOnly, "Error in Sub: [GoogTranslate]"
Resume PreExit
Resume Next
End Function
|
|
|
|
|
I've been using the RDLC design editor in VS 2017+ for a long time, and finally decided to ask about it.
The editor allows for multiple lines, but my expressions are always one liners. I remember in the past trying to use multiple lines but never had any luck. If there a char I need to add at the end of a line to use multiple lines?
I'm beginning to use notepad now to edit this expression.
I need to write this expression to check and make sure that the values are not 0 before I run the equation, but I'm not having any luck. I'm not sure why this expression crashes on 0's when I'm checking, it looks good to me but I'm not sure how to fix it. Maybe I should flip it around. Do the IFF and format the number in the IFF statement.
This expression compares sales in 2017 against sales in 2016, and show the percent of change.
FYTD4 is 4 years back
FYTD3 is 3 years back
On some items they are 0 because they didn't exist in those years.
=FormatNumber(IIF(Fields!FYTD3_A.Value > 0 and Fields!FYTD4_A.Value > 0, ((Fields!FYTD3_A.Value - Fields!FYTD4_A.Value) / Fields!FYTD3_A.Value) * 100, 1), 0) & "%"
I also need to write a color expression as well. It works without the % sign tacked on the previous expression. I searched around for a way to evaluate me.value and strip out the % sign with no luck.
=iif(me.value < 0, "Red", "Green")
Last, I wanted to add a red or green arrow pointing up or down after the % sign. I tried an image, but the table cell seems to only take 1 element like text, or image and not a combination of both.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|