Jump to content

smus

Members
  • Posts

    177
  • Joined

  • Last visited

Posts posted by smus

  1. HTML Web Workers are using JavaScript code to run.

    Why Web Workers need to be used only under a server then? 

    I tried launching .html file separately and they don't work.

  2. Yeah, true, same info is on StackOverflow: different implementatoins of recursive approach. Strange that ES6 doesn't have a built-in function or method for it. Object.hasOwnProperty is only for the upper-level keys which makes it useless for structured objects.

  3. const data = { level1: { level2: { level3: 'some data' } } };

    Is there a way to get the names of all the keys (at any level) in that object without using a recursion? (level1, level2, level3)

     

     

  4. On 1/15/2018 at 12:36 AM, Ingolme said:

    Without syntax highlighting, brace matching and auto indentation, a simple editor like that is not very useful. 

    But it's fast!

    Have any of you tried AkelPad? I like it. It is simple, fast and if you need any of that options as highlighting, they are represented as plug-ins, so you can switch them on.

  5. On ‎1‎/‎28‎/‎2019 at 11:53 PM, justsomeguy said:

    It's pretty straight-forward, there should be plenty examples online.

    It is, but to be honest, I couldn't find the solution. Unfortunately, classic ASP is not really popular nowadays.

  6. I want to create full-functional web interface on node.js which uses mysql database. Node greatly interacts with MySQL (adding, editing data), but when it comes to returning the data from a database after submitting it, ordinary page reload is not enough. How am I better to perform it? Should I use some additional modules? I am pretty new to Node.js. So how is it usually done by node.js developers?

  7. Please help me with the complicated query that I should complete. Can't get the right result because 'having' has to have a static value to compare and 'where' doesn't work with aggregate functions. Is there an alternative way to solve it? Maybe inner join can help?

  8. Yes, exactly, VBScript. I've found the way to perform the opposite action (ascii into hex):

    dim x

    x = 1

    response.write hex(asc(x))

    //31

    but have no idea about the backward conversion.

  9. Couldn't find the information how on how to convert the hex values into ascii ('31' > '1', '32' > '2' etc.). Could anyone remind me which method/function I should use?

  10. Why is map() method often used for these reasons? Might that be because the structure is complex and I know the name of the property and I am not sure about its hierarchical disposition? For example,

    a = { first : ['propertyOne' = 'po', 'propertyTwo' = 'pt'],

         second : [smallObj = {s1:'s1', s2: 's2', s3: 's3'}, smallObj2 = {s1:'s1'}, ['a1', 'a2']],

         third : ['t1', [{'whatIWantToFind':'someInfo'}], t3, 'abcdef']

    }

    I have to find the 'whatIWantToFind' property inside a object. I know it is inside the object, but I don't know where exactly it is. Do I need to use a map() or any other method for it?

  11. If I have a JSON data, can I apply to it as if it is a JS Object, or I should use JSON.parse() first?

    Will it skip the property names quotes? ("name":"value" or name:"value")

    If there are some associative arrays inside and the structure is complex, is it easier to use array.map() method or it is better to apply to the properties directly?

  12. It's a part of a more complex task. 5 is already a result, it is a GCD (greatest common divisor) of those 2 integers (210,65). They are function input parameters, but now it has to return x and y, not only GCD.

  13. Where n is the amount of nested loops? According to your explanation, it is better to have several independent loops, than one nested loop:

    for(){}

    for(){}

    for(){}

    for(){}

    would be faster than:

    for(){

      for(){}

    }

     

×
×
  • Create New...