Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
Peter Delvaux
@pjetr
I suppose that could be lucrative
so hackers, don't try this at home okay :sweat_smile:
FazilSog
@FazilSog
Hello guys
could someone tell me how configure my server.js , in order to initiat connection to INGRES DB
Peter Delvaux
@pjetr
why ingres?
and, sorry never worked with ingres, can't help you
FazilSog
@FazilSog
actually , I'm working in company
who has old DBs
so I need to get Data from thoses Databases
I wanted to know if with Something like that , that could work ?
Peter Delvaux
@pjetr
So I see ingres supports ODBC, so you should be able to use https://www.npmjs.com/package/odbc
FazilSog
@FazilSog

ingresConfig= {
libpath: 'C:/Users/20012106/Desktop/Adeo 17072019/SQuirreL SQL/iijdbc.jar',
drivername: 'ca.ingres.jdbc.IngresDriver',
url: 'jdbc:ingres://dadeodbpcaa01:aa7/prodca',
// uri: 'jdbc:oracle:thin://abc-test.corp.int:1527/stage1',
user:'';
password: '',
};

//example of sample select query to fetch the result set

var sql = 'select first 10 * from table';
db.execute(ingresConfig, sql, function(results){
console.log(results);
});

var db = require('node-any-jdbc');
Peter Delvaux
@pjetr
put 3 bacticks on the first line, and 3 on the last line, and nothing else
That way you can
  indent
    readable
      code
FazilSog
@FazilSog
it was just an example
I didn't understand when you said just 3 backticks ?
dimtabu
@taburetkin
` - this one, three times
```
your code
```
FazilSog
@FazilSog
```
```
var db = require('node-any-jdbc');
ingresConfig= {
    libpath: 'C:/Users/20012106/Desktop/Adeo 17072019/SQuirreL SQL/iijdbc.jar',
    drivername: 'ca.ingres.jdbc.IngresDriver',
    url:  'jdbc:ingres://dadeodbpcaa01:aa7/prodca',
    // uri: 'jdbc:oracle:thin://abc-test.corp.int:1527/stage1',
    user: 'lm',
    password: 'lm',
  };
var sql = 'select first 10 * from precovte';
db.execute(ingresConfig, sql, function(results){
  console.log(results);
});
Bolzoni225
@Bolzoni225
what's wrong with that codes ?
FazilSog
@FazilSog
my first question
sould I put the local path (libpath) of the Following jar
iijdbc.jar
(Ingres JDBC connector)
the second question I had a prob when I executed npm install in order to dowload the 'node-any-jdbc' lib
dimtabu
@taburetkin
if you didn't installed node-any-jdbc, then i believe its a question number one
becase other things does not matter until you have no package installed
FazilSog
@FazilSog
OKey I'm gonna try to find a way to install that package
& retry my connection
I wanted to know just if my string connection was correct
ns26
@ns26
Hey guys. I have a script that loops through iframes with try/catches and I'm trying to make an if statement if (elems[j] = 1397) { asd } but I'm stuck. Can someone take a look at line 24? https://pastebin.com/FeLDx6Gv
rommni
@rommni
Hey @ns26 shouldn't it be === instead of = ;)
ns26
@ns26
Yeah that's what I started with.. doesn't work
rommni
@rommni
hum ok, and so what doesn't work? have you an error, are you going in the catch, just nothing?
ns26
@ns26
Nothing, added a bunch of breaks in the highlightItems func
function highlightItems(ids, color, background, border) {
    for (let v = 0; v < ids.length; v++) {
        var mainElements = document.querySelectorAll(`[value="${ids[v]}"]`);
        for (let i = 0; i < mainElements.length; i++) {
            highlightElem(mainElements[i], color, background, border);
        }
        var iframes = document.querySelectorAll('iframe');
        for (let i = 0; i < iframes.length; i++) {
            try {
                var content = iframes[i].contentDocument || iframes[i].contentWindow.document;
                var elems = content.querySelectorAll(`[value="${ids[v]}"]`);
                for (let j = 0; j < elems.length; j++) {
                    highlightElem(elems[j], color, background, border);
                    break;
                    if (elems[j] === 1397) {
                        alert('found 1397');
                    }
                }
            } catch (ex) {
                break;
                console.log('Caught Error', ex);
                continue;
            }
        }
    }
}

I'm not even sure if that's where I should be checking for 1397 or somewhere around here:

var frames = document.querySelectorAll('iframe');
    for (let i = 0; i < frames.length; i++) {
        try {
            frames[i].addEventListener('load', function() {
                highlightAll(itemList);
                                chrome.runtime.sendMessage({greeting: "hello"}, function(response) {
                                    console.log("hallo1");
                              });
            });
        } catch (ex) {
            console.log('Error Processing IFrame', ex);
            continue;
        }
    }

(lines 175 to 188 in my pastebin)

dimtabu
@taburetkin
what do you think break does? you put it as first instruction in the catch block
ns26
@ns26
I use it to see where scripts stop working
what is it meant to be fore?
for*
ns26
@ns26
what do you use to step through scripts @taburetkin
dimtabu
@taburetkin
debugger
ns26
@ns26
jezus, ofc.. -_-
Matteo
@Nibelino
best web framework right now for building rest api?
Eric
@sliceofbytes
@Nibelino it depends on what you are looking for? Best performance, easiest dev experience, etc...
nopestack
@nopestack
if you know nothing @Nibelino go with Express and move on later if it stops suiting your needs