roytang.net Posts Photos Archives About

2017 October

  • What should I do with these stacks of foils? #mtg

    (Click photos to view full-size)

    1_925240248015007744_DNcdGdAUIAAfXYf.jpg
  • I kind of want a Zangief action figure so I can have him piledriver everybody

  • 🔁 Repost from insomniacgames:

    Watch our brand new #SpiderManPS4 teaser trailer from #ParisGamesWeek2017 now!

  • I'm trying out the Roxy deployer. The Roxy app was created using the default app-type. I setup a new ML 9 database, and I ran "ml local bootstrap" using the default ports (8040 and 8041)

    Then I setup a node application. I tried the following (sample code from https://docs.marklogic.com/jsdoc/index.html)

    var marklogic = require('marklogic');
    var conn = {
        host: '192.168.33.10',  
        port: 8040,
        user: 'admin',
        password: 'admin',
        authType: 'DIGEST'
    }
    
    var db = marklogic.createDatabaseClient(conn);
    
    db.createCollection(
      '/books',
      {author: 'Beryl Markham'},
      {author: 'WG Sebald'}
      )
    .result(function(response) {
        console.log(JSON.stringify(response, null, 2));
      }, function (error) {
        console.log(JSON.stringify(error, null, 2));
      });
    

    Running the script gave me an error like:

    $ node test.js
    {
      "message": "write document list: cannot process response with 500 status",
      "statusCode": 500,
      "body": "<error:error xsi:schemaLocation=\"http://marklogic.com/xdmp/error error.xsd\" xmlns:error=\"http://marklogic.com/xdmp/error\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <error:code>XDMP-IMPMODNS</error:code>\n  <error:name>err:XQST0059</error:name>\n  <error:xquery-version>1.0-ml</error:xquery-version>\n  <error:message>Import module namespace mismatch</error:message>\n  <error:format-string>XDMP-IMPMODNS: (err:XQST0059) Import module namespace http://marklogic.com/rest-api/endpoints/config does not match target namespace http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED of imported module /MarkLogic/rest-api/endpoints/config.xqy</error:format-string>\n  <error:retryable>false</error:retryable>\n  <error:expr/>\n  <error:data>\n    <error:datum>http://marklogic.com/rest-api/endpoints/config</error:datum>\n    <error:datum>http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED</error:datum>\n    <error:datum>/MarkLogic/rest-api/endpoints/config.xqy</error:datum>\n  </error:data>\n  <error:stack>\n    <error:frame>\n      <error:uri>/roxy/lib/rewriter-lib.xqy</error:uri>\n      <error:line>5</error:line>\n      <error:column>0</error:column>\n      <error:xquery-version>1.0-ml</error:xquery-version>\n    </error:frame>\n  </error:stack>\n</error:error>\n"
    }
    

    If I change the port to 8000 (the default appserver that inserts into Documents), the node function executes correctly as expected. I'm not sure if I need to configure anything else with the Roxy-created appserver so that it works with the node.js application.

    I'm not sure where the "DELETE_IF_UNUSED" part in the error message is coming from either. There doesn't seem to be any such text in the configuration files generated by Roxy.

    Edit: When accessing 192.168.33.10:8040 via the browser, I get a an xml with a similar error:

    <error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <error:code>XDMP-IMPMODNS</error:code>
      <error:name>err:XQST0059</error:name>
      <error:xquery-version>1.0-ml</error:xquery-version>
      <error:message>Import module namespace mismatch</error:message>
      <error:format-string>XDMP-IMPMODNS: (err:XQST0059) Import module namespace http://marklogic.com/rest-api/endpoints/config does not match target namespace http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED of imported module /MarkLogic/rest-api/endpoints/config.xqy</error:format-string>
      <error:retryable>false</error:retryable>
      <error:expr/>
      <error:data>
        <error:datum>http://marklogic.com/rest-api/endpoints/config</error:datum>
        <error:datum>http://marklogic.com/rest-api/endpoints/config_DELETE_IF_UNUSED</error:datum>
        <error:datum>/MarkLogic/rest-api/endpoints/config.xqy</error:datum>
      </error:data>
      <error:stack>
        <error:frame>
          <error:uri>/roxy/lib/rewriter-lib.xqy</error:uri>
          <error:line>5</error:line>
          <error:column>0</error:column>
          <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
      </error:stack>
    </error:error>
    

    If it matters, MarkLogic version is 9.0-3.1. It's a fresh install too.

    Any advice?

  • I think I'm skipping the platinum for this one lol #KingdomHearts2 #Fb #PS4share https://store.playstation.com/#!/en-us/tid=CUSA05933_00

    (Click photos to view full-size)

    1_924944351389663232_DNYP9y_UQAETv6w.jpg
    2_924944351389663232_DNYP-jkVoAAeEWB.png
  • I'm trying to migrate one of my dev envts from ML8 to ML9. I have an import script that successfully works on the ML8 version, but there's an error when I try running it against the ML9 database. The ML9 version is 9.0.3.1. The MLCP version is 9.0.3

    My MLCP options file is as follows:

    import
    -host 
    192.168.33.10
    -port 
    8041
    -username 
    admin
    -password
    admin
    -input_file_path 
    d:\maroon\data\mbastest.csv 
    -mode 
    local 
    -input_file_type 
    delimited_text 
    -uri_id 
    ClientId 
    -output_uri_prefix
    /test/records/
    -output_uri_suffix 
    .json 
    -document_type 
    json 
    -transform_module 
    /ingestion/transform.js
    -transform_function 
    testTransform
    -transform_param
    test
    -content_encoding 
    windows-1252 
    -thread_count
    1
    

    Here's the output of a test run with only 2 records in the test CSV file:

    17/10/30 14:07:33 INFO contentpump.LocalJobRunner: Content type: JSON
    17/10/30 14:07:33 INFO contentpump.ContentPump: Job name: local_455168344_1
    17/10/30 14:07:33 INFO contentpump.FileAndDirectoryInputFormat: Total input paths to process : 1
    17/10/30 14:07:38 WARN contentpump.TransformWriter: Failed document /test/records/31.json
    17/10/30 14:07:38 WARN contentpump.TransformWriter: <error:format-string xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected QName_, expecting $end or SemiColon_</error:format-string>
    17/10/30 14:07:38 WARN contentpump.TransformWriter: Failed document /test/records/32.json
    17/10/30 14:07:38 WARN contentpump.TransformWriter: <error:format-string xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected QName_, expecting $end or SemiColon_</error:format-string>
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner:  completed 100%
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: com.marklogic.mapreduce.MarkLogicCounter:
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: INPUT_RECORDS: 2
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS: 2
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS_COMMITTED: 0
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS_FAILED: 2
    17/10/30 14:07:38 INFO contentpump.LocalJobRunner: Total execution time: 5 sec
    

    If I remove the transform params, the import works fine.

    I thought it might be a parsing issue with my transform module itself, so I tried replacing it with the following example from the documentation:

    // Add a property named "NEWPROP" to any JSON input document.
    // Otherwise, input passes through unchanged.
    
    function addProp(content, context)
    {
      const propVal = (context.transform_param == undefined)
                     ? "UNDEFINED" : context.transform_param;
    
      if (xdmp.nodeKind(content.value) == 'document' &&
          content.value.documentFormat == 'JSON') {
        // Convert input to mutable object and add new property
        const newDoc = content.value.toObject();
        newDoc.NEWPROP = propVal;
    
        // Convert result back into a document
        content.value = xdmp.unquote(xdmp.quote(newDoc));
      }
      return content;
    };
    
    exports.addProp = addProp;
    

    (Of course I changed the params in the MLCP options file accordingly)

    The issue still persists even with just this test function.

    Any advice?

  • I wonder what BS humanity was giving me 2 years ago on this day. (I still wouldn't mind being a hermit)

    Quoted Sarah Addison Allen's Facebook post:

    Today, October 29, is National Hermit Day. Happy day, fellow hermits!

    (Click photos to view full-size)

    10156145684288912_1_10675742_10153658444263810_4505670194348687333_n.jpg
    10156145684288912_1_10675742_10153658444263810_4505670194348687333_n.jpg
  • I giggled at this for some reason

    Quoted IWriteMonsters's tweet:

    My daughter insisted on this costume. All the other parents at daycare will think I've never read a comic book. #HalloweenWeekend

    (Click photos to view full-size)

    1_924657274534076416_DNLrOc3XUAAwrC3.jpg
  • 💬 Reply to EkaJade's tweet:

    @EkaJade you're a staircase!

  • I’m like 90% through Kingdom Hearts 2 Final Mix and I have no idea what’s going on

  • Most of software development is just making a hundred thousand tiny decisions that would bore stakeholders if they had to do it themselves

  • My SFV crashed a couple of days ago but Steam still thinks it's running I've gotten an extra 40 hours or so of playtime now lol

  • If I saw this on the street I might go crazy

    Town in Iceland Paints 3D Zebra Crosswalk To Slow Down Speeding Cars

  • 💬 Reply to saampahlavan's tweet:

    @saampahlavan I hope these were giveaways, since I totally took the second one. Thanks!

  • And today I beat the world #1 on @PlayEternal lol

    (Click photos to view full-size)

    1_923170500674691073_DM_CoI7UEAAdyDN.jpg
  • 🔁 Repost from Iordsofiron:

    Sometimes tumblr comes up with shit like this and leaves me in tears

    (Click photos to view full-size)

    1_923132663887577088_DM7I6t6VQAAGt4g.jpg
    2_923132663887577088_DM7I6t5UEAApQx5.jpg
  • THOR RAGNAROK spoiler-free review:

    • a fun, action-packed romp that shakes up the Thor status quo significantly
    • easily the best of the three Thor movies
    • a number plot points are fairly predictable, yet still fun
    • the Marvel formula is generally action mixed with witty banter here and there, and it's what we get here, although some of the jokes feel like they're stretched a bit too much
    • some great-looking cinematic scenes here and there. One particular flashback scene looked really great
    • I kind of like how the older franchises need to be some sort of team effort nowadays. Like Civil War, this felt a bit like some kind of mini-Avengers crossover -- in space!
    • speaking of space, one of the positive things about this installment is that they didn't feel the need to tie Thor's adventures to Earth anymore (not that the movie is 100% Earth-free), and they get to go a bit wild with space and aliens and all that
    • I understand the need to highlight Hulk's involvement as part of the film's marketing, but man, it would have been so awesome to just find out right then and there
    • This movie had that Star Wars: Last Jedi trailer I was trying to avoid D:
    • 1 mid-credits scene and 1 post-credits scene
    • I think Imax was good for this movie. The 3d wasn't too much and it definitely made some scenes pop. The film is a visual delight so I think the larger screen is important too
    • Magugustuhan ba ni Mama: Probably not. Maybe I should stop including this section kasi parang same na parati ang answer. Unless for some reason I decide to watch some Tagalog romcom