« first day (2046 days earlier)      last day (2904 days later) » 

4:01 AM
@EnglishMaster So vim == MS Text?
You're probably confusing nano for vim.
 
Either that, or EM is saying it's basic skill irrelevant to your work.
irrelevant to the professional part, at least, which is about getting news right, not about typing letters.
I don't really agree but that's the point I see.
 
@JanDvorak Yeah, in version 5 I think. So maybe since 1998.
 
MS Text with additional juice
 
BRB, disassembling my fridge because its manual doesn't tell me how to replace the lightbulb
 
$ man fridge
 
4:06 AM
wow
too relevant
@EnglishMaster You've obviously never used vim.
By vim, I mean the editor that gets installed when you install the vim package on most Unixes and unix-likes.
 
vim usually comes by default with unixes
POSIX specifies a vi-compatible editor
 
I think "vim skill" hints at a few things. It hints that you are on good terms with Linux, you can learn and have learned a software famous for its steep learning curve, and you prefer professional tools that let you do your job fast, rather than simple tools for dummies.
 
doesn't have to be vim though, there are others
 
@FizzyTea Yeah, so vi.
 
@FizzyTea Ah. So that's why I get vi/vim everywhere. Never know that! :)
 
4:10 AM
Indeed.
 
Linux distros and POSIX-compliance? lmao
 
Yeah, well ... that part is compliant :-)
 
how to you add jquery reference to your typescript in webstorm?
 
anyone around
 
^Nope, I'm not that big
 
4:17 AM
@William No
 
darn, well I'm trying to install maven on windows with no luck so far
Can I ask that as a question on the main site?
 
@William good luck
Now you have some luck.
 
It doesn't work like that, @littlepootis. Just because you wish somebody good luck, it doesn't mean they actually get good luck
 
@littlepootis why did you change your avatar?
 
@JanDvorak How about "Have faith in God"? If you still encounter resistance after you put your faith in God, either this is a test and you don't have enough faith, or God is barring the doors for your benefit and you should, well, have faith in God.
 
4:22 AM
@William This was funnier than the one before.
@Sheepy or god doesn't exist.
 
I wouldtn't say either is funny.
 
don't understand the reference but ok
/is/are/
 
@JanDvorak Taken out of context, they aren't
 
@littlepootis It's ok, child. God still loves you ;)
 
4:24 AM
One of the only wishes I asked for god made come true
but I didn't take advantage of the opportunity
oh well
 
You should pray that you actually learn about him, from the right folks
 
@William dvorak jan is very good grammariman
 
@JanDvorak I don't care what your source says it doesn't sound right
 
It does to me.
 
dvorak jan is very good sigh...
 
4:26 AM
triggered
 
@William Are you saying that you and I disagree?
 
I'm not sure. Just as well we agree I guess.
 
If either of you disagrees, I'll stab the one that does it first.
 
stab me!
 
stabs in the face over the interwebs
 
4:28 AM
I think you accidentally missed a
 
@littlepootis Singular verb.
 
WEBSTORM ROCKS!
 
@William Many regulars think this room is full of smart people. Very smart people :)
 
Somebody disagree with @EnglishMaster please
 
@littlepootis That wasn't for your benefit, btw.
 
4:30 AM
I read that as WEBS TORN kinda confused
 
@FizzyTea the s was emphasized for a reason ;)
 
Web's torn over whether WEBSTORM rocks.
 
:-)
 
@littlepootis If everything is emphasised, nothing is.
 
@EnglishMaster It... sucked the last time I used it.
I used version 8.x iiirc.
 
4:32 AM
I agree with Dvorak. To me both either/neither result in singular. But I don't have a master in english study... I am only CEF C1 in English.
 
@littlepootis Good. I think the same. Now stab yourself.
 
WEBSTORM RULEZ!
VS is alright
 
stabs 127.0.0.1 in the :42 over the interwebg
@EnglishMaster You're not.
 
@littlepootis Oh yeah, I think I need a new typeface.
 
Let's just flag the next time somebody praises WEBSTORM.
 
4:34 AM
hi.
 
@FizzyTea Take the one under my owl
 
would like to ask, how do i insert multiple values into a single SQL query statement
can i do this.
 
@JanDvorak I promise to praise only IntelliJ from now on. WebStorm is not enough for me... would that do? o_o
 
`INSERT INTO table1 VALUES ([v1, v2, v3])
INSERT INTO table1 VALUES ([v1, v2, v3])
can i insert a list is what i mean
 
@Ming Depends on the database and version.
 
4:35 AM
postgresql
 
How do you insert values into a query statement?
 
can someone please explain to me how to install maven from this page
 
latest version
 
i don't see any old versions say yes latest version
 
@William have you tried clicking one of the links labeled as "link"?
 
4:36 AM
arrayValues = [v1, v2, v3, v4]
sqlStatement = "INSERT INTO table1 (col1, col2, col3 col4) VALUES (arrayValues);"
 
@JanDvorak it appears I have to set MAVEN_HOME which doesn't make sense why they don't build an installer that does such automatically.
 
that's not.. how SQL works..
 
@Ming Sorry I misunderstood the question as multi-row insert. No that's not correct SQL syntax. So, no.
 
i'm using postgres. but i guess same thing.
is it?
 
@William maybe it does so on the first run?
 
4:37 AM
i don't think so
 
from postgres site
INSERT INTO films (code, title, did, date_prod, kind)
    VALUES ('T_601', 'Yojimbo', 106, '1961-06-16', 'Drama');
 
OK, I'm confused. What pill did I just eat?
 
or
 
insert into table (col1, col2) select 'foo', 'bar' union all select 'baz', 'owl' union all select 'blah', 'blah'
 
There's not much difference between SQLs, at least not in INSERT syntax.
 
4:38 AM
INSERT INTO films VALUES
    ('UA502', 'Bananas', 105, '1971-07-13', 'Comedy', '82 minutes');
im trying to write a script that will automatically determine the field values without me having to specify them.
 
One does not simply store an array in a database
 
how do i store the values. because postgres requires me to specify it manually.
 
@Ming You need to write a script that build the correct SQL statement from an array, and execute that statement. The page you linked already described the insert syntax pretty well.
 
Unless it's BigTable, in which case you do so by storing several pieces of data with the same data version ID.
 
4:40 AM
@Ming That's not a Postgre requirement. That's SQL standard.
 
Yojimbo is a good movie, btw.
 
flagged
 
is this correct?
import json

with open('./clinic_gov.json') as jFile:
	jData = json.load(jFile)
	sqlQuery = '"CREATE TABLE table1 (id serial PRIMARY KEY, '
	count = 0
	for k, v in jData[0].items():
		count += 1
		if isinstance(v, int):
			sqlQuery += k + ' int, '
			if count == len(jData[0]):
				sqlQuery += k + ' int);"'
		elif isinstance(v, str):
			sqlQuery += k + ' character varying, '
			if count == len(jData[0]):
				sqlQuery += k + ' character varying);"'
print(sqlQuery)
 
@William Ah, just an env variable. Do it.
 
	sqlInsert = '"INSERT INTO table1 (id,'
	count = 0
	values = []
	for k, v in jData[0].items():
		count += 1
		values.append(v)
		if count == len(jData[0]):
			sqlInsert += k + ');"'
			# sqlInsert += 'VALUES (' + k
		else:
			sqlInsert += k + ', '
print(sqlInsert)
print(ARRAY[values])
 
4:41 AM
What's that language?
 
not working though
 
That doesn't look like valid JavaScript to me.
 
oh. sry
forgot. wrong chat.
but still.
 
lol
 
that is not valid js
 
4:41 AM
my bad. i was thinking of postgres. forgot this is js
 
The chat is fine. Your language is all wrong.
 
@JanDvorak looks like python
 
Maybe it's one of the python look-alikes?
 
Not JS, not sql stored procedure.... in a js room...
 
Such as coffeescript
 
4:42 AM
it is python.js
 
lol
 
It's python3.x
 
for sql. how can someone auto detect the number of fields.
 
Ask NSA
 
highfives @littlepootis
 
4:43 AM
!!tell ming google postgre get number of fields
 
@Sheepy Nice try. Now go and join the "migrate Cap to Node" movement.
 
Q.Q
 
gives up waiting for @littlepootis to connect the highfive
 
Cap stands for captain america right?
 
does this work
function autoDetect() {
	for (var x in file.csv) {
		valuesArray += x;
	}
	sqlStatement = "INSERT INTO table1 VALUES(" + valuesArray + ';)"';
}
 
4:45 AM
@William It stands for Caprica Six.
 
"captian", where does this spelling come from?
 
you see. with this, i do not need to specify each field. it can auto detect
 
I prefer Captain America
much better
 
I can get "capitan" if you're a Slav.
 
@JanDvorak highfives
 
4:47 AM
@Ming Are you... relying on the intrinsic order of columns in an SQL table?
 
@JanDvorak My experience with Node is that its ES6 support is not up to par with Firefox / Chrome... and you know how I abuse Cap with one line statements chocked full of ES6 if not ES7...
 
misses and slaps self
@Sheepy babel
 
@JanDvorak yes. the order will be correct. Not too sure what you mean intrinsic order
 
@Sheepy NWJS perhaps?
 
I just dont know if INSERT INTO table VALUES (array??). do they allow that?
postgresql
 
4:48 AM
@littlepootis So should I petition for Cap to run Babel when !!> results in SyntaxError? :)
 
Have you tried? Worst case is three months in jail.
 
@Ming No they don't. In any SQL that I know.
 
!!define partition
 
@JanDvorak partition An action which divides a thing into parts, or separates one thing from another.
 
Did you mean "petition"?
 
4:49 AM
@Ming What is "array??" ?
 
so you mean must like this?

`INSERT INTO tables VALUES (v[0], v[1], v[2], v[3]...)`
 
@Ming Yes.
 
meant array
 
@littlepootis It's a nullable nullable array
 
4:49 AM
but what if i didnt know how many v there was
 
of an unspecified type
 
wanted to auto detect
 
@Ming Google "postgre get number of fields" (using your words)
 
@JanDvorak lol
@Ming You should. If you don't, you shouldn't be storing them in a table.
Well, unless you are.. like.. doing some nasty shit that requires it.
 
@littlepootis let say i have 10-20 csv. I cant be doing customize script for each one?
 
4:51 AM
Yes. Yes, you can.
Doesn't the CSV tell you where to insert?
 
@Ming If you know the csv's field match the table, can't you just loop the array to build the SQL statement?
 
You could have a config array hard-coded and then scan that with your export logic.
 
hey guys
 
hey
 
you mean.
```
INSERT INTO table1 VALUE(v[1])
INSERT INTO table1 VALUE(v[2])
INSERT INTO table1 VALUE(v[3])
```
@Sheepy
 
4:53 AM
NO!
 
it will loop
 
no
that's not how you loop
 
i mean. run INSERT INTO as a loop
 
No..........
 
Not all loops are created equal
 
4:53 AM
Pootis o/
 
Build your query string in a loop.
@Abhishrek \o
 
Its a very naive implementation
 
for (v=0; v < col.length; v++) {
   INSERT INTO table1(value[v]);
}
4
like this?
 
What language is that?
 
Not all loops are created equal. Some are short and weak, some are long and strong, some can even survive a computer reboot.
 
4:54 AM
js
 
That's not valid javascript
 
oh. my bad. INSERT INTO is using a library. its not complete code
but is that the idea?
 
It might compile won't really do anything
 
I would guess Pseudocode, but if there's an actual language that can do ^this, let me know.
 
Mathematica can do such.
 
4:55 AM
!!> INSERT INTO table1(1)
 
Mathematica is a rather weird language.
 
@JanDvorak "SyntaxError: missing ; before statement"
 
@Ming Not like that, as others have said in union...
 
ok. I'm still new to sql. sry if mistake.
 
SQL = "INSERT INTO table1("
for (v=0; v < col.length; v++)
   SQL += (v==0?"":",") + value[v];
SQL += ")"
Something like that.
 
4:57 AM
@Sheepy why you no map-join?
 
@Sheepy thanks. will try that out
 
@JanDvorak It's obviously not javascript. I don't know how it looks like in python.
 
OK, can python do c-style for-loops?
 
no
 
no
 
4:58 AM
no
 
XD
 
it's against it's zen
 
c-c-c combo breaker x<
 
You should post functional pseudocode instead of that pseudo-python imperative \w{4}.
 
It's some mysterious pseudo language, obviously ;)
 
4:59 AM
> functional pseudocode
 
!!>{['test','test','test']:['test','test','test']}
 
@Shea "SyntaxError: missing ; before statement"
 
SQL = `INSERT INTO table1(${Object.values(value).join(',')})`
ah fuck this chat
 

« first day (2046 days earlier)      last day (2904 days later) »