HTP | Hack The Printer | Hacking library
kandi X-RAY | HTP Summary
kandi X-RAY | HTP Summary
Hack The Printer
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HTP
HTP Key Features
HTP Examples and Code Snippets
Community Discussions
Trending Discussions on HTP
QUESTION
I'm using ORA_EXCEL PL/SQL API to create custom Excel files. I have it set so that when clicking a button it calls a GENERATE_EXCEL_PROCESS
via a page submit (tried both Processing
and After Submit
processing points) and builds the file and saves it to a Blob variable (confirmed file creation is working in separate test writing file to an Oracle Directory).
My goal is to generate the Excel file in PLSQL, save to a blob and then display a download dialog for users to save the excel file locally similarly to the native Download
link that Classic reports allow you to turn on declaratively.
When run I get a weird APEX error, that I only found by turning Full Trace mode on in debugging. I've included the code below, but I do not know what it means to troubleshoot further. It looks like I get a response back of Blob looking at network tab in devtools.
...ANSWER
Answered 2022-Jan-13 at 12:56Someone provided a solution for me in the Oracle forum. I'm not sure why this works and wish I had a better understanding of the error and how this fixes it, but posting here in case others have the same problem.
QUESTION
How do I print my output at a new line in PL/SQL Web document?
For learning PL/SQL Web, I try to make a web page to display the list. I make this code to testing:
...ANSWER
Answered 2021-Nov-17 at 06:53Include HTP.BR calls when necessary.
QUESTION
I've installed Oracle DB/ORDS and created all the handlers and related procedures by following Oracle-base guides. There is one issue which I was not able to solve, which seems simple but my lack of understanding SQL hinders me.
When I send JSON documents in bulk such as below;
...ANSWER
Answered 2021-Nov-01 at 13:53Answer your comment, if you want to do split by return carriage, one option might be regexp_substr
and connect by
Example
QUESTION
Is there any way to return a clob as text (or file) without splitting into smaller pieces first?
I tried creating a GET
handler with PL/SQL
source that would just do this:
ANSWER
Answered 2021-Oct-27 at 15:31The doc states that htp.p
and htp.prn
take only VARCHAR2 so you're limited by the max size of a varchar2 and if the clob length exceeds that it will throw an error. This is what you can do:
Loop through the clob in 4k chunks and output using htp.prn
. Avoid using htp.p
in a loop because that generates a newline characters which could mess up the output, for example if you're generating json. It's also good practice to let the browser know what he's getting by setting the mime header.
QUESTION
My understanding is that the lstrip(arg)
removes characters from the left based on the value of arg
.
I am executing the following code:
...ANSWER
Answered 2021-Oct-21 at 06:55If you want all chars right of a given string try split
QUESTION
I am trying to use TIdHttp.Put()
for Microsoft's Graph API, but it is not possible to use the Content-Range
header. If I use the Ranges
property then I get an error about a missing Content-Range
, and if I use this header in the CustomHeaders
property then I get an error about an invalid Content-Range
.
Here is the code:
...ANSWER
Answered 2021-Oct-11 at 19:17The Range
and Content-Range
HTTP headers are two completely different things. See Difference between Content-Range and Range headers?
Content-Range
is for specifying the range of bytes that are in the body of the same message that contains the Content-Range
header.
The Range
header is for requesting a range of bytes from the server. The response message will indicate, via its own Content-Range
, the actual range being sent in the response body.
So, that explains why you are getting a "missing Content-Range
" error when using the TIdHTTP.Ranges
property. That property is simply not intended for the purpose you are using it for.
As for using the TIdHTTP.Request.CustomHeaders
property to send a Content-Range
header, that is the correct way to go (technically, TIdEntityHeaderInfo
has ContentRange...
properties, but they are currently only used by TIdHTTP.Response
, not by TIdHTTP.Request
- that needs to be fixed).
The problem with your custom Content-Range
header is that the server is simply rejecting it as bad. Which most likely means that the iSize
value you are using doesn't actually match the number of bytes you are actually sending.
Try something more like this instead:
QUESTION
...This is the code I am using, if there are suggestions, I will gladly accept them. I want root to re-open after I close lvls_menu.menu(). I've tried a loop import but it didn't work, soo pls enlighten by 2 brain cells.
ANSWER
Answered 2021-Oct-11 at 18:25When you try to do such a thing in Tkinter it can be quite messy, I would suggest trying to move your menu()
from lvls_menu
into your main python script, and wrapping your whole main menu in another function so you can just reference the functions without having to go through messing with imports.
I have edited the provided code to this rough version that you can hopefully integrate into your program.
If you truly wanted to completely separate them, then your best bet would be to use pyinstaller to create exe's and use os.startfile()
to start each executable that was made from your scripts, and just use exit()
instead of .destroy()
if you choose to go down that route since as I said importing modules for different menus can get extremely messy in Tkinter I would also suggest creating classes for menus and putting all the menu's respective functions inside of that class to somewhat organize it.
QUESTION
I am using Oracle Apex v21.1, I'm working on a dynamic insert form which displays a certain numbers of textfields based on a numbers selected by the user in a LOV.
It's currently working using the solution based on one of my previous post (thanks davidm)
I am using an Interactive Report with a SQL Query that SELECT n APEX_ITEM.TEXT components.
I would like to improve this solution and use a PL/SQL Dynamic Content Region using HTP.P, because this would allow me to create textfields with and more css classes, which would give my apex_item components a more native look of the declarative apex items.
Unfortunately, it's not possible as far as I know to partially refresh a PL/SQL Dynamic Content Region.
Is there a way that could look like a refresh for the user, using a Set Value DA or an existing plug-in, that would allow the submit of the value in the LOV, and so dynamically generate my textfields ?
Thank you,
Thomas
...ANSWER
Answered 2021-Aug-24 at 08:17UPDATE
If this can help anyone, I've found this plug-in which gives you the possibility to refresh a PL/SQL Dynamic Content Region.
QUESTION
I have an application on Oracle Apex 20.2 with oracle DB 18c. and I have a pl-sql procedure that render questions and some specific actions. now I want to enhance the actions using JavaScript functions but my problem is :
For example I have this procedure plsql code :
...ANSWER
Answered 2021-Jul-30 at 13:48You can use APEX_JAVASCRIPT package, e.g. APEX_JAVASCRIPT.ADD_INLINE_CODE
or APEX_JAVASCRIPT.ADD_ONLOAD_CODE
procedures.
Something like this:
QUESTION
I am trying to follow along with a tutorial on how to get a JSON object loaded into a ORDS table. I have this working using a standard curl with 1 record at a time but it would be great if I could feed a large file that the is then read in my REST handler via JSON_TABLE.
Tutorial link : https://www.thatjeffsmith.com/archive/2019/03/using-the-database-to-manipulate-json-from-your-post-body-requests-in-ords/
The code I am trying to compile:
...ANSWER
Answered 2021-Jul-09 at 15:20In that blog post, Jeff is putting that code in the source of the post handler, you're putting it in a pl/sql stored procedure. That does not compile because the bind variable :body_text does not exist in the scope of that procedure.
It should work if you put the following code in the source of the POST handler (not using the stored procedure):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install HTP
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page