Deniss Kozlovs

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Mar 9, 2018 10:24
Hello. It was about an hour i was getting strange error with parsing JSON, finally narrowed it to single spot. Can someone explain this? drive.google.com/file/d/1iYNSxa0hUXQ5QHaKUqfeFNEIflv_SdA2/…
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Oct 8, 2016 11:12
@Danack ok, thanks, will look into it
Oct 8, 2016 11:03
there's no hierarchy in my threads. each message belongs to one thread id. One specific thing is that for each message there should be 2 records (inbox/outbox) so each user can delete them without affecting other users inbox/outbox
Oct 8, 2016 10:52
@Danack why not? thread id is unique, primary key, a simple select for it should be fast
Oct 8, 2016 10:51
well ok, i guess i should just try to make something and see where it gets
Oct 8, 2016 10:50
i thought that, if i could calculate thread id regardless who started it, i can make a simple select for thread_id.
Oct 8, 2016 10:44
@Danack i'll check the book, looks interesting
Oct 8, 2016 10:44
yes, that was on my mind. but how can i search whether this conversation exists? i need to check select thread_id from threads where (uidA = 1 and roomid = 39902) or (uidB = 1 and roomid = 399002) because i dont know who started the thread, who is uidA and who is uidB
Oct 8, 2016 10:41
for example user A talks with user B directly, or user A talks with users B in room #39902
Oct 8, 2016 10:40
@tereško well, users can communicate with each other directly, but they can have separate thread where they talk about something else, like separate room
Oct 8, 2016 10:38
but as i'm just thinking of the architecture, it isn't decided yet for sure
Oct 8, 2016 10:37
mysql
Oct 8, 2016 10:36
but i guess i will run into collisions very soon
Oct 8, 2016 10:36
or 1+2+15932 (thing id)
Oct 8, 2016 10:35
The first idea was to calculate checksum/hash from all users like 1 (user A) + 2 (users B) + 0 (default thread)
Oct 8, 2016 10:35
Hi! I'm designing a messaging functionality and conversations between users should be grouped by threads, but there can be not only one thread per pair of users, bet each thread between those users and specific thing. I'm looking for way to generate unique thread id for these conversations.
Jul 14, 2016 21:22
@Steel If you'r writing ORM, you will probably need a query builder also
Jul 14, 2016 20:55
yes, we are
Jul 14, 2016 20:52
@tereško čau
Jul 14, 2016 20:37
@Danack yeah, looks like the interface seems a way to go
Jul 14, 2016 20:35
database, i mean
Jul 14, 2016 20:35
yeah, the second part is that should be stored in tables
Jul 14, 2016 20:34
@FélixGagnon-Grenier should i split the data in multiple tables or keep them in one?
Jul 14, 2016 20:33
concrete example is - the thing that gets modelled is the events. There is a Performance event, that has, description, duration, ticket data, and lots, and a simple internal Event, that has only title
Jul 14, 2016 20:31
well, because A have methods that B doesn't have, and if somewhere accidentaly A gets swapped with B, well, fatal error
Jul 14, 2016 20:30
How would you model this within a class structure: there are two types of the same thing, lets say A and B, but type A has a lot more data than B. Naturally i would think i can make base class and A,B extend it. But it feels wrong because A will have a lot more properties/methods than B, i guess it violates LSP
Jun 10, 2014 21:37
i know what 404 means, the question is about symfony 1.4 trying to load something that doesnt exists. do i require rewrite rules for assets or maybes i need to rebuild cache somehow?
Jun 10, 2014 21:32
i tried to clear cache, remove cache directory, but that didn't help
Jun 10, 2014 21:32
Hi! i moved project with symfony 1.4 to another server, and now my CSS and JS files are not loading. The path for example is /css/v2/style.1402428359.css which returns 404.
Jan 31, 2013 19:57
i think i will
Jan 31, 2013 19:56
searched SO, but either almost no one uses SphinxQL or the problems are little bit different
Jan 31, 2013 19:52
just need to figure out that specific query...
Jan 31, 2013 19:52
but search is working, in other places it works fine
Jan 31, 2013 19:52
mysql_connect('localhost:9306')
Jan 31, 2013 19:51
oh well, will dig in manual then :)
Jan 31, 2013 19:48
i try SELECT * FROM articles WHERE MATCH('"keyword1,keyword2"/1') LIMIT 0,5 OPTION ranker=matchany but that doesnt even give me back the source article
Jan 31, 2013 19:47
this gives me possibility to make search with sql (well, sphinx specific sql) queries
Jan 31, 2013 19:47
i dont user the API, i just connect with mysql_connect to sphinx search deamon
Jan 31, 2013 19:43
and want to display related to them, using keywords of that article
Jan 31, 2013 19:43
so i open a specific article on a page
Jan 31, 2013 19:42
table articles - columns, title, body, keywords
Jan 31, 2013 19:42
ok ill try be more specific :)
Jan 31, 2013 19:40
no i use SphinxQL
Jan 31, 2013 19:38
using sphinxql
Jan 31, 2013 19:38
so i cant figure out how to create the search query
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Jul 23, 2015 16:16
backend sounds more like admin interface or something
Jul 23, 2015 16:16
good point
Jul 23, 2015 16:15
Well, it's just too specific. HTML & CSS usually go side by side
Jul 23, 2015 16:13
hmm, UI seems ok
Jul 23, 2015 16:12
I want to start tagging my commits by affected parts of the site, for example css changes have own tag, javascript changes by another, and server side fixes as the third. What can be one-word tags for each of it? English is not my native :)