GithubHelp home page GithubHelp logo

lxb320124 / pbidea Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 7.0 63.33 MB

This is a set of potentially powerful PowerBuilder function extension library, including JSON, XML, httpclient, encryption / decryption, webapi client / server, websocket client / server, FTP / SFTP, PDF view, compress / decompress, image processing, chart, map and other particularly easy-to-use functions

PowerBuilder 99.98% Batchfile 0.02%

pbidea's Introduction

Before starting, it is recommended to take a moment to read this instruction

This library is specially developed for PowerBuilder applications. After testing, it is applicable to PB versions 8 – 2019.

1、JSON The user-friendly json for PB is seamlessly connected with datawindow/datasore. It can dynamically create dw/ds to import data, or match and import existing dw/ds by column. Real time import and export of json is fast and efficient. uo_ There are mainly four json function functions, namely:

  1. Parse: Convert string to JSON object
  2. ToString: convert JSON object to string
  3. Set: set JSON object or array value
  4. Get: Get JSON object or array value In the case of multi-level nesting, concatenated strings can be used to directly take values. for example
    [ { "rowid":1, "id":1.0, "sj":"2020-02-17", "sub": [ {"rowid":1,"id":1.0,"mch":"菜1","dj":9.0,"je":7.0}, {"rowid":2,"id":1.0,"mch":"菜2","dj":1.0,"je":3.0}, {"rowid":3,"id":1.0,"mch":"菜3","dj":7.0,"je":1.0}, {"rowid":4,"id":1.0,"mch":"菜4","dj":5.0,"je":9.0} ] } ] To get the dj under the first line array "Dish 3", you can write the key string as follows: deciaml ld_ dj json. Get("/0/sub/2/dj",ref ld_dj) In the "/0/sub/2/dj" string, the first 0 represents the data in the first row of the large array, and the sub represents the data in the first row is JSON. The sub value is a JSON array. The following 2 represents the data in the third line of the sub array. The key is dj and the value type is decimal. ***Note that the lower limit of the JSON array starts from 0 and ends at n-1, which is different from the lower limit of the PB array.

2、HttpClient After developing PBJson, I suddenly feel that HttpClient has become an inevitable need. This is the HttpClient. Because I didn't use HttpClient much before, I didn't have enough experience, and my shortcomings are inevitable. Excuse me! HttpClient uses WinHttp API internally:

  1. It is simple to use. There is only one parameter, Request, to complete the request. For parameter description, see uo_ Statement in httpclient Local External Functions

  2. With the help of pbjson, it can work perfectly with json and datawindow. 3.uo_ Httpclient has a built-in variable uo_ Response response is used to record various response results and data.

  3. Learn about the request category first //Static variable, the first parameter nHttpType of the require function constant int HttpGet = 1 constant int HttpPost = 2 constant int HttpPut = 3

  4. It is necessary to know in advance what will be returned after the httpclient sends the request. String header//Save the response header of the httpclient String headerlist []//Save the response header keyword of httpclient Blob data//Save the result of the httpclient, which is not limited to text, but may also be other binary data. In the case of text only, you can take the text value Int errcode//The returned value is incorrect string errtext//The returned value error text Int httpcode//200 normal, 404 501 string verb //POST ,PUT ,GET 。。。 Long timeout=5000//The default timeout is 5 seconds String charset//Language code utf-8 gbk, etc String ContentType//text/html application/json, etc String Server//Server type String text//Text, converted from data. Automatically convert various types of utf8, GBK, UNICODE to the current text code. In most cases, this text is available. However, it does not rule out that the response result is non text, such as binary data such as pictures and sounds. You must read the data to obtain the correct result. uo_ Json json//When Content Type: application/json is returned, this json object will be generated 3、Encryption, decryption and encoding It provides RSA, AES, DES, signature, base64, CRC, urlencode, etc.

4、 In the future, other functions will be added to the library to facilitate PB application. Stay tuned.

5、About being reported as anti-virus software by 360 Some DLLs developed by myself are often reported as viruses or trojans by 360. Here, I solemnly guarantee that I will never write malicious code in DLL! To solve the 360 virus, you can compress the DLL into a zip file and submit it to the https://open.soft.360.cn/report.php testing. After passing the test, 360 will no longer report the virus.

6、Special instructions

  1. The copyright is mine, which is certain.

  2. DLL is free of charge.

  3. Individual modules need development authorization. But it is not absolute. Even if there is no development authorization, the most important thing is to pop up a dialog box when testing. After compiling, it will not pop up, but only pop up the development environment.

                 大自在(QQ:781770213 group:624409252) 
                                                    2020/03/06
    

image

image image image

image image

image

image image

image

image

image image image

pbidea's People

Contributors

lxb320124 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pbidea's Issues

Issue with CALLs, Application Crashing

I am not able to use PBIdea.dll from VB6 or any other win32 application that is supporting external win API techniques. For example, the PING function is crashing the application. I tried PBIDea.dll for PB9 and PB10 as well. Also one quick question regarding the declaration of the PING function in the PB environment.
function int Ping(readonly string ip,int count,long timeoutMS) system library "PbIdea.dll" alias for "Ping"
What is the role of the keyword system in this declaration.
thanks
Devang (India)
[email protected]
[email protected]

About the license

Hi,

I'm interested into websocket server license, how can i get a full license ( multi threaded) ?

Regards,

need more info

Hi

Its great work you have been doing. Since its in Chinese we need to translate and read still not able to figure out which powerbuilder version you have used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.