« first day (701 days earlier)      last day (4247 days later) » 
00:00 - 10:0010:00 - 23:00

10:00 AM
could you be more specific with your last statement?
 
If the point is merely search results
You could probably use YouTube's API to display those results
 
well the idea
 
The bridge pattern is a design pattern used in software engineering which is meant to "decouple an abstraction from its implementation so that the two can vary independently". The bridge uses encapsulation, aggregation, and can use inheritance to separate responsibilities into different classes. When a class varies often, the features of object-oriented programming become very useful because changes to a program's code can be made easily with minimal prior knowledge about the program. The bridge pattern is useful when both the class as well as what it does vary often. The class itself can...
 
is to have search results and then once selected
you would see some specific information
maybe I want to show just the description and upload date
of each video
and of course if selected a new page would open with more info
maybe adding wikipedia things as well
[just an idea]
 
If the site has a specific API, which most larger ones do, you can use that
If not, you'll need to build a specific parser for that website
 
10:03 AM
I assume that is what I am somehow supposed to do
 
Yes, it's quite a big project
Let me tell you that
 
well the idea is to create a Business Intelligence related website with a backend of erlang
but I believe that we will create just 1 specific parser
and then try to go for APIs
since what we are trying to do is not something already out there
we might need to work a bit
so just to recap
the crawler would search about anything from the specific website
and add it to the DB?
that would take forever
even to do it once, right?
 
Yes, it would.
 
mm
 
You'll need to run a background task of constantly crawling the target websites
For instance for YouTube, check to see if you can find an RSS feed for new videos
Wikipedia for new articles etc
 
10:08 AM
hourly cronjob would do the trick
 
nice
 
Hi, I have a string: $z='stuff <XRefExternal reference-type="act" link="C-42"> blah blah </XRefExternal> <XRefExternal reference-type="act" link="C-42"> bla';
 
yeah RSS could be a nice solution
 
can you please suggest the regex to replace only the first <XRefExternal tag regardless of the attributes with a simple <i>
 
one more thing
let's say I have this hourly crawling job
and it checks from wikipedia for new stuff
now 12.30
a User searches for something
how would the website work now?
it would need to trigger a new crawling process specifically to the target search
 
10:11 AM
@UnoMeinAme DOM parser
 
and then search the local DB
right?
wouldnt that be pointless then?
 
@Gordon i wish i knew how to deal with it
 
@UnoMeinAme there is plenty of questions on SO asking how to do that with ext/DOM. Just give it a search
 
hey Gordon -- long time no see (i havent been around)..
 
4
A: How can I use XPath and DOM to replace a node/element in php?

GordonSince the answer in the linked duplicate is not that comprehensive, I'll give an example: $dom = new DOMDocument; $dom->loadXml($html); // use loadHTML if its invalid (X)HTML // create the new element $newNode = $dom->createElement('div', 'this is new'); $newNode->setAttribute('id', 'n...

@Justin heya
 
10:15 AM
thanks for the link. i'll check it out. small question - the input is a string, not xml - does it make a difference?
 
@UnoMeinAme only in the method you have to use to load it, e.g. one of load, loadXML, loadHTML, loadHTMLFile. the example in my answer loads from string, too.
 
@N3sh The point of the hourly crawling is to not do it on user demand.
 
oh ok
 
When the user requests the search, all you do is check in the local DB
That's why it's faster.
 
so if the User searches now for a new article
 
10:17 AM
Because the heavy work is done in the background
 
if will find it the next hour
right?
 
Assuming it was created before the hourly sweep, yes
 
then Im starting to understand :)
 
Your search won't find it until it's crawled again
 
great! :D
and do u have by any chance any experience with erlang with PHP?
 
10:18 AM
thank you @Gordon
 
just to know if I need a specific server for it
 
@N3sh What's erlang?
:P
 
functional language
developed by Ericsson
it's ok :P
 
Erlang ( ) is a general-purpose concurrent, garbage-collected programming language and runtime system. The sequential subset of Erlang is a functional language, with strict evaluation, single assignment, and dynamic typing. It was designed by Ericsson to support distributed, fault-tolerant, soft-real-time, non-stop applications. It supports hot swapping, so that code can be changed without stopping a system. While threads require external library support in most languages, Erlang provides language-level features for creating and managing processes with the aim of simplifying concurrent pr...
 
@MadaraUchiha Thanks a lot by the way ;)
 
10:19 AM
@N3sh Sure :)
 
@MadaraUchiha is there a way to get a contact from you?
 
@N3sh A contact?
 
If he has more questions he means :)
 
yeah, so if in case you need help or I need it or even for later use
 
10:21 AM
I'm usually here on the chat
 
I am not a spammer, don't worry ;P
ok then :
:D
 
Also, other people here are very helpful too
 
And if he's not, someone else is sure to be able to help you
 
I didnt say they are not
 
Your chances to get a good answer are better the more people see it
 
10:22 AM
like @Gordon more than likely has some experience in what you're doing
 
I see ;)
yeah?
 
More than me for sure
 
hellow @Gordon :P
anyway
nice to read you all
 
@N3sh i dont know any erlang
 
it's ok
 
10:23 AM
Wow, something @Gordon doesn't know! Hell hath froze over...
 
I might need some help with the crawing
crawling}
 
morning @Gordon
 
but I found several tutorials and nfo
 
@Justin actually … hell was always frozen over depending on who you ask. In Dante's Divine Comedy, the innermost ring of hell is a lake of ice in which the beast is frozen from the waist down and chewing eternally on Judas.
@Justin apart from that, I dont know much anyway. you might be confusing me with @NikiC or @ircmaxell ;)
@NikiC morning
 
@NikiC and @ircmaxell definitely know a lot too... But, from my time spent here you definitely know a fare share....
I'm personally still playing catchup learning all the ins-and-outs to the extent of folks like @NikiC .. Right now my knowledge consists of things i've done or had to do and not much else... Might be the reason I try and build apps that 1 person shouldn't be able to build..
Though i also think, to the detrement of my own code, the use of frameworks (codeigniter, symfony, etc) has deteriorated my raw PHP knowledge...
 
10:33 AM
@Justin "Right now my knowledge consists of things i've done or had to do and not much else" pretty much sums up my knowledge, too.
 
Maybe I need to get back to basics on my PHP... Delve deeper into true OOP
 
@Justin then you have to abandon PHP and buy a book about Smalltalk ;)
 
lol.. okay, lets rephrase that... true PHP OOP as apposed to just using a class for the sake of using a class
 
@Gordon It's not exactly a duplicate of that question
 
@MadaraUchiha well, he asks why global is evil and how to avoid it and my/the accepted answer in the linked dupe answers both
 
10:47 AM
morning everyone
 
morning @tereško
 
was surfing youtube and stumbled upon this video : youtube.com/watch?v=aSz5BjExs9o&feature=relmfu
it's an interesting theory hypothesis
 
I'll watch it and pretend I understand half of it (from reading the description)
 
@Gordon have you read the whole thing or only read about it ?
 
@tereško I had an english translation which I read most of. i remember going over many verses superficially only though. not an easy read.
 
10:53 AM
.. kinda like my experience with Milton's "Paradise Lost"
 
@tereško yepp. though there is translations for PL into modern english which are easier to grasp then.
 
naah , that would be missing the point
 
i feel lost....
 
@tereško yeah, but the original will definitely make you miss a few points, too ;)
 
the most fascinating thin about that book is how our perception has changed
when it was originally written , fighting against authority was mean to be a bad thing
 
11:06 AM
@tereško i had to compare PL with the Prometheus myth for university. They share a lot in common. Perception of that authority aspect changed from greek antiquity to today several times.
 
heh , never thought of that connection ... "bringer of fire"
 
@tereško the connection is most obvious in Mary Shelley's Frankenstein, which is subtitled the Modern Prometheus and the Monster reads PL.
 
now , that one i have never read =/
 
@tereško awesome book
 
@Justin welcome to php chat room, where we talk quantum physics and classical literature
6
i guess i will have to pick it up after i finish reading zarathustra (english translation)
 
11:13 AM
@Justin fear not, we also worship cats in here ;)
 
lol...
So, because IRC is freakin DEAD right now... any suggestions on decent screencap software to run on linux?
 
what do you mean by "irc is dead" ?!
 
as in the freenode server is quiet as can be
 
11:35 AM
Can anyone share link to SO copypad?
 
11:55 AM
you mean this one ? gist.github.com/2768567
 
@tereško Yes. Thanks.
 
12:12 PM
can anyone help me regarding of this issue
http://stackoverflow.com/questions/12356996/unable-to-get-10th-variable-in-url-string-through-htaccess
 
 
1 hour later…
@Gordon: funny, because I feel that I've learned a lot from you.
 
1:44 PM
morning
 
@ircmaxell that really surprises me Oo
 
:-D
 
2:00 PM
@PeeHaa Hello
 
2:53 PM
i want my 4 hours back
tried listening to "Monster Hunter International" audiobook (as a background noise for playing Diablo2)
it's terrible
to create that book you would have to take worst possible work by Simon R. Green , and replace all the humor with equal GOP platform and lame stereotypes
 
 
2 hours later…
4:44 PM
anyone experienced in YAWS and mySQL?
 
6:10 PM
HEY!
 
@user1656125 Hi.
 
hey... so I modified my code and the value is being stored in $_SESSION... but when I redirect the user to another page and output the value of the session nothing comes out.
HI @ShaquinTrifonoff!!!!!
 
@user1656125 Does it display the value from the session on the same page?
 
YES!
 
Make sure you have session_start on both pages.
 
6:14 PM
@user1656125 Yes --^
 
@Robik right!
 
What do you think of my answer? stackoverflow.com/questions/12449525/…
The user was asking for code, so I gave him some simple advice as far as functions are concerned to help him a little and made him aware that we don't write code for them.
 
@JordanRichards I often write code for people :D
What do you think of my answer? stackoverflow.com/a/12449692/1421049
 
@ShaquinTrifonoff :o good one!
@ShaquinTrifonoff I'll upvote yours. What I'm saying is you shouldn't expect us to write code as a question on stackoverflow.
 
@JordanRichards I agree that people shouldn't expect us to write code for them. If we do, it is just something nice that we have done for them, not a standard 'questions get code'.
 
@ShaquinTrifonoff Yeah ;)
@ShaquinTrifonoff upvote mine too :o? xD
 
6:56 PM
@JordanRichards I already did.
 
@ShaquinTrifonoff Oh yeah. :) Thanks!
 
You can always tell if a user has upvoted/downvoted your answer, because it will show up on the votes tab of their profile.
 
7:25 PM
Would anyone be able to help me with setting up lamp on debian. (wheezy/sid) I got further than this last time, but don't understand why it's just downloading the test.php - and google is giving me unanswered threads.
 
Wouldn't that combination be called DAMP? :D
@CitrusRain Try this: linux-answered.com/2012/08/16/… And remember to use Apache 2.4, not 2.2.
 
Whoops. I copy-pasted the 2.2.
...But it worked!
Thank you.
 
7:48 PM
hi guys
how to fetch this pls ? `$db = JFactory::getDBO();
$query = "/* some valid sql string */";
$db->setQuery($query);
$result = $db->query();`
how to fetch it , not by foreach .but normal fetching
 
This may not be a PHP question, but if I grab facebook albums and pictures from a facebook page that is Public, and display on my site, can I get sued for this? I am not storing any pictures on my server but load from facebook?
 
@Karem It depends on how they are used. Facebook pictures are sometimes linked to directly by Stack Overflow for a user's profile picture (I think it is when the user is unregistered).
 
Hey
Um I have a question about SQL in general
 
@JordanRichards Yeah?
 
Is there a way to add onto a column using SET?
 
7:58 PM
@ShaquinTrifonoff glist.se/Vb like this, it is listing the albums and when you click on a album you can see all the photos in the album. These are directly from a facebook page which is Public
 
For example (this is not syntax just to make it easier for you to know what I'm trying to do) "UPDATE table SET blah += :param "
@ShaquinTrifonoff
 
any help ?
 
@JordanRichards So you want to add a new value to the old value?
 
@ShaquinTrifonoff yes
Is there a way to do that without making 2 queries?
 
SET blah = blah + :param ?
 
8:01 PM
:O
 
@Karem rak mlih fi malmö karem ?
 
@Karem I'm not sure if that would work.
 
@goodmood yes :) @JordanRichards no its something like that, i dont remember
 
@Karem rak taba3 fel-hafalat !!
@Karem rak zahi fa daniya ?
 
@ShaquinTrifonoff would Karem's answer be right?
 
8:05 PM
@JordanRichards I just checked, and it set the value to the new value, it got rid of the old value.
 
how to fetch this pls ? `$db = JFactory::getDBO();
$query = "/* some valid sql string */";
$db->setQuery($query);
$result = $db->query();`
how to fetch it , not by foreach .but normal fetching
 
@ShaquinTrifonoff oh that's odd, because on here: stackoverflow.com/questions/973380/… the answer says that it would work
Oh MAYBE because that's a number?
 
@JordanRichards Yep. Numbers work fine.
 
@ShaquinTrifonoff That's why then
 
It increments the number, but text can't be incremented.
 
8:07 PM
Yeah
So is there a way to append it on?
:O wHAT ABOUT CONCAT()?
Could you test that out?
 
@JordanRichards It works.
 
:O!
I think I'll post that on stackoverflow
to help someone else out
so..
 
8:35 PM
morning
 
Hi @draconis.
 
good morning everybody
 
morning @hakra
 
hi @draconis
 
@goodmood are you trying to fetch single row?
 
8:47 PM
@draconis fetch my sql , to get result , like in normal mysql $row4= mysql_fetch_array($sql);
@draconis i wanna fetch it to late i will use row['ma_coloumn_name']
 
i don't know your DB object's methods and other stuff, as i see you don't know this too that means this is not belongs to you so try $result = $db->fetch();(most of db wrappers use this name for methods like this) if not works take a look for class and you will see the method you are looking for.
or lemme fix this, first look codes in the class before using it, never mind $db->fetch() thing i said.
 
@draconis didnt fetch this $db->fetch()
 
can you post link or codes of this class (which is returned by ::getDBO) method?
 
Hey guys
could you take a look at this answer? stackoverflow.com/a/12450644/1513134
 
@draconis $db =& JFactory::getDBO();
 
8:54 PM
hi @JordanRichards
 
Any feedback?
@draconis :)
 
@draconis this is for joomla
@draconis i dont use any class , its original joomla class
 
joomla? never used it but let me check for a minute please.
 
@draconis ok
 
What do you guys think of my answer? stackoverflow.com/a/12450644/1513134
 
8:58 PM
@draconis ok ok thx i get it to work :)
 
@JordanRichards +1
 
@ShaquinTrifonoff cheers! :)
 
@draconis i fetch it like that $row = $sql->loadAssoc() ; :)
 
@goodmood nice, here is list of all methods you need : docs.joomla.org/JDatabase/1.6
yup, i was just looking for this :) never used joomla before so i don't know it well
 
9:00 PM
@draconis good , thx :)
 
@ShaquinTrifonoff definite +1 from me
 
@draconis i have half hour searching , and i never get cross the website u provided me :) , it was very helpful website thx:)
 
@JordanRichards Great, thanks :-)
 
@goodmood yw.
@ShaquinTrifonoff nice answer but imho it should also contain mysql_* version too and PDO suggestion should be additional information.
because OP is using mysql_* functions.
 
@draconis It just got accepted, so I suppose they are fine with PDO :-)
 
9:04 PM
@ShaquinTrifonoff nice :)
 
In all my searching nothing ever came up about PDO. It makes things much simpler. Thank you much. — user1638987 45 secs ago
 
Anyone else think my answer deserves an upvote? stackoverflow.com/a/12450644/1513134
 
@JordanRichards nice answer
 
@goodmood Thanks :)
Is there a way to do !IN() in SQL?
 
9:23 PM
some one can help me in this code ? pastie.org/4734339
 
@JordanRichards NOT IN ()
 
in this code its only for submit0 and i have same code for submit1 and submit2 .......submit9 , is there a way to make the code shorter and nicer ?
it took for me long page for 9 submits code
 
-2
A: Creating collision free "random" string

Shaquin TrifonoffThis might be what you are after: <?php // You should create your own salt (hand-typed), and // ideally, it should be the same length as the hash // (e.g. for SHA512, it should be 512 chars long). $salt = 'hi48hO*$H84hOhe8o4hnioH$*oihnO$8hOHTO84HoihOhno$i*HOIHNOh$Oh48oh$'; for($i = 0; $i <...

 
dbf
shame that it doesn't update the voting when pasted in chat
 
Thanks for the upvote :-)
 
9:35 PM
@ShaquinTrifonoff np :)
 
@ShaquinTrifonoff Please mention emulation of prepared statements when PDO uses the mysql driver
 
@PeeHaa That is good, I always use it, but it is not necessary when prepared statements are not being used.
 
Nopez but when you just add it as an answer somweher where OP doesnt know what PDO is you have just helped to create vulnerable application(s).
 
1
A: DataGridView VB.net to a list

Jordan RichardsYou'll need to run a query. My recommendation is to use pdo. The query should look something like this. SELECT * FROM `customers` (you could add a WHERE clause also e.g. WHERE id = 1) Next you need to grab the results from that query. You should use fetch. Once you have the results. You cou...

 
9:51 PM
some one can help me in this code ?http://pastie.org/4734339 in this code its only for submit0 and i have same code for submit1 and submit2 .......submit9 , is there a way to make the code shorter and nicer ?
it took for me long page for 9 submits code
 
@PeeHaa Done, thanks for mentioning it :-)
0
A: DataGridView VB.net to a list

Shaquin TrifonoffI would recommend that you get the data with PDO, then store it in a spreadsheet with PHPExcel. The query would be something like: SELECT * FROM `customers` ORDER BY `customer_name` If there are multiple rows for one customer, you can also use: SELECT * FROM `customers` ORDER BY `customer_na...

 
10:25 PM
echo "good day SO!";
 
Hi @mdgrech.
 
00:00 - 10:0010:00 - 23:00

« first day (701 days earlier)      last day (4247 days later) »