Devinkathrinenettie's Profile

230
Points

Questions
44

Answers
52

  • Asked on July 17, 2020 in XML.

    As I understand .parent().remove(); removes parent to.

    Maybe you want to uninstall odoo_referral module?

    • 370 views
    • 1 answers
    • 0 votes
  • Asked on July 17, 2020 in XML.

    so you want to find the Reference node that has ReferenceType is HasComponent and IsForward is false, from that, go up 1 level find the DisplayName ?

    const {transform} = require('camaro')  ;(async function main() {     const xml = `     <UAObject NodeId="ns=1;i=15024" BrowseName="2:ParameterSet" ParentNodeId="ns=1;i=15008">         <DisplayName>ParameterSet</DisplayName>         <Description>Flat list of Parameters</Description>         <References>             <Reference ReferenceType="HasComponent">ns=1;i=15061</Reference>             <Reference ReferenceType="HasTypeDefinition">i=58</Reference>             <Reference ReferenceType="HasModellingRule">i=78</Reference>             <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=15008</Reference>         </References>     </UAObject>     `     const template = {         names: ['//References/Reference[@ReferenceType="HasComponent" and @IsForward="false"]', '../../DisplayName']     }     console.log(await transform(xml, template), null, 4); })() 

    out

    { names: [ 'ParameterSet' ] } 
    • 501 views
    • 2 answers
    • 0 votes
  • Asked on July 16, 2020 in .NET.

    I found that you are supposed to use the RawJson field so I just need to have that field in my response model class.

    I was not looking for it, because i was trying to use the SDK EphemeralKey class but that’s not what that’s for, since this is a response from your server not Stripe API

    So I just need to parse the response for the RawJson field and then create a model class out of that, which will have the secret field in it

    • 427 views
    • 1 answers
    • 0 votes
  • Asked on July 16, 2020 in XML.

    The URL is a namespace. You can declare that in your XPath. But ora seems to be reserved as it still gets null with that, so you can change it to something else (just in the query, not in the XML document):

            'declare namespace xyz="http://www.oracle.com/something/somethingelse";          /root/itemTypes/itemTypesList/xyz:itemType' 

    so in context:

    select   xmlcast(      xmlquery(         'declare namespace xyz="http://www.oracle.com/something/somethingelse";          /root/itemTypes/itemTypesList/xyz:itemType'          passing xmltype(xmldata)          returning content      )      as varchar2(100)    ) res from test_table 

    db<>fiddle

    As you want multiple values you’re probably better off with XMLTable:

    select x.* from test_table tt cross join xmltable(   xmlnamespaces('http://www.oracle.com/something/somethingelse' as "xyz"),   '/root/itemTypes/itemTypesList'   passing xmltype(tt.xmldata)   columns first_str varchar2(30) path 'xyz:itemType',     second_str varchar2(30) path 'xyz:billFactor' ) x 

    db<>fiddle

    Read more

    • 453 views
    • 2 answers
    • 0 votes
  • Asked on July 16, 2020 in .NET.

    I don’t have time to create code for this, ut here’s a relatively simple algorithm you can try to implement in order to find gaps after each appointment:

    • Order all appointments by increasing start-time.
    • Iterate over the appointments, and for each one: Search for any appointment that has a start-time that is less than or equal to the current appointment’s end-time.
      • If so: Does that conflicting appointment end before or at the same time as the current appointment?
        • If so, ignore it and continue looking for other conflicting appointments.
        • If not (it ends after the current appointment), you know there is no free time directly after the current appointment, so break and skip to checking the next appointment instead.
          • (Actually you could skip to the conflicting appointment, since you already know there will at least not be any break until that one ends).
      • If not: Congratulations, you’ve found an appointment after which there is some free time!

    Tip: Visualize each appointment as a timeline while thinking about this, and look for where they overlap:

    |-------------|     |--------|        |------------|                 |----------|                    |-------|                               <free time>                                            |-----------|                                               |------------| 
    • 445 views
    • 2 answers
    • 0 votes
  • Asked on July 16, 2020 in Mysql.

    Set the value equal to id = 4 which is a Boolean expression that evaluates to 1 if it is true or 0 if it is false:

    UPDATE table SET value = (id = 4) 
    • 390 views
    • 4 answers
    • 0 votes
  • Asked on July 16, 2020 in Mysql.

    Oracle Application Express (abbreviated APEX, previously named Oracle HTML DB) is a web-based software development environment that runs on an Oracle database. It is fully supported and comes standard (at no additional cost) with all Oracle Database editions and, starting with Oracle 11g, is installed by default as part of the core database install.

    APEX can be used to build complex web applications which can be used in most modern web browsers. The APEX development environment is also browser-based

    You can use Oracle Apex web charts to vizualize data from your MySQL database.

    • 483 views
    • 1 answers
    • 0 votes
  • Asked on July 16, 2020 in Mysql.

    If the error is comming while opening a connection to mysqld , it could be possible that MySQL server (mysqld) is blocking the host from connecting to it. It means that mysqld has received many connection requests from the given host that were interrupted in the middle.

    Read why? To confirm you could see the DB’s logs as well. So, a way to unblock it is to flush the cached hosts using the MySQL CLI:

    mysql> FLUSH HOSTS; 

    And then try again to connect.

    Plus, give this answer a read as well. Might help.

    You can check the state of the socket used by mysqld using (For Linux):

    netstat -nt 

    Check if there’s any previously hanging connection from the host to mysqld. If yes, then kill it and try again.

    • 368 views
    • 1 answers
    • 0 votes
  • Normally, innodb_buffer_pool_size is set to about 70% of available RAM, and MySQL will consume that, plus other space that it needs. Scratch that; you have only 1GB of RAM? The buffer_pool needs to be a smaller percentage. It seems that the current value is pretty good.

    You top show only 37.2% of RAM in used by MySQL — the many threads are sharing the same memory.

    Sort by memory (in top, use < or >). Something else is consuming a bunch of RAM.

    query_cache_size should be zero.

    max_connections should be, say, 10 or 20.

    CPU — You have only one core? So a big query hogging the CPU is to be expected. It also says that I/O was not an issue. You could show us the query, plus SHOW CREATE TABLE and EXPLAIN SELECT...; perhaps we can suggest how to speed it up.

    • 431 views
    • 2 answers
    • 0 votes
  • Asked on July 16, 2020 in Mysql.

    You have to put around the OR close a parentheses () so that the expression only is true when admin_id is 36 and the rest also is true

    SELECT      * FROM     patient WHERE     admin_id = 36 AND (fname LIKE '%test%'         OR email LIKE '%test%'         OR mobile LIKE '%test%') ORDER BY ID DESC  
    • 391 views
    • 2 answers
    • 0 votes