« first day (746 days earlier)      last day (4208 days later) » 

12:00 AM
Good news: I just gained 50 rep on Meta.
Bad news: I could have got 100 from a bounty, but it... expired, so my post automatically got half.
 
just put &$elem...
 
I declare this a bug for two reasons:

1. The output is boring.
^^ who needs a second reason?
 
needs moar colors
 
@webarto Ha ha, that's quite funny.
 
12:25 AM
@ŠimeVidas You can ask these questions in chat and I'm sure anyone can answer since something like that is quite trivial to experienced user, and there is a big probability it was asked before...
 
"doesn't work" is not an valid error message
 
^ search tool for closable questions
 
12:43 AM
 
1:00 AM
@webarto, @DaveRandom I've updated the JavaScript on my example (it shouldn't stop working anymore): shaquin.tk/experiments/comet2.html
 
@MichaelBerkowski ...or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. This really is an RTFM question, and "not reading the manual" is a narrow situation that shouldn't apply to the rest of the internet - before this question existed, that manual page would have been the first result for a Google search for the exact question title. I admit TL is not a great reason description for closing, but the question should not be here and TL is the closest reason we (currently) have. — DaveRandom 32 secs ago
if you agree ^^
...and now I'm going to bed, so if someone else could pick up the argument I would be grateful.
 
@DaveRandom I agree.
+1 (and +1 flag)
 
@ShaquinTrifonoff there is an XSS
 
@tereško Yeah, I know, but normally the data would come from a script and be processed by a script, the data wouldn't come from user input and be displayed.
 
1:18 AM
@tereško Now I know that you use Opera 9.80 on Windows 7 x64 :P
 
nope
 
i use 12.02 , opera has strange UA string , because it was the first browser which hit two digit version numbers ... which caused a lot of stupid scripts to crash
 
> Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.289 Version/12.02
I missed the Version/12.02 at the end.
 
oh .. and they are gonna soon release 12.10
i kina like opera's release system:

- x.0 : make it actually work
- x.1 : make it work better
- x.5 : add new stuff
- x.6 : improve the new stuff
sometimes there are also x.2 (we have no new ideas yet) and x.7 (the new stuff is still horribly broken) releases
 
1:32 AM
Does anyone know how to paginate xml feeds?
 
Manually.
 
<page></page>
not sure what he wants
 
@TapThatApp What exactly do you want? To split some XML into chunks?
 
I want to display 5 listings at a time into a div
and then display "1 2 3 4" to gain the next 5 of the feed on the respective pages.
 
what is "xml feed" ?
are you talking about Atom/RSS ?
 
1:40 AM
yes
@tereško yes
 
then start reading the RFC: tools.ietf.org/html/rfc5005#section-3
 
That is only showing feeds that are designed to be paged right?
This feed doesn't have anything like that.
 
@TapThatApp So it's someone else's feed that you want to split into pages?
 
@ShaquinTrifonoff exactly
 
Kev
1:55 AM
@Gordon probably because one asks specifically about Windows the other isn't OS specific. Merges are only done if the questions are 100% identical. If it's 99.5% we don't merge. There's also no rollback with merges, so that's why we're extra extra careful.
 
I have the following line in my code: $nodeId = $this->addBranch( $segments ); .. but it feels wrong. The addBranch() method actually walks a tree structure and create the nodes, if they are not there, and then returns the ID of last added node. If such branch has been already created, it does alters nothing and only returns the ID. Can anyone suggest a better name ?
 
Looks good, maybe you should just document the method behavior...
 
@tereško What's the name length limit?
 
something under 40 chars
thing is , i am not sure, that i can separate this in two methods
.. trees are tricky like that
 
Maybe createNodes, and document it returning the last added node? (otherwise something like createNodesAndReturnLastAddedNode...)
 
2:12 AM
^ stupid idea
I'm not sure what your comment has to do with anything here beside ramping up your user stats. However, if I am translating this properly, your telling me to use prepared statements rather than direct queries. Well, sir, not that it is any of your business or anything but we are about to migrate this data over to a SQL server, which means all of my database code is going to change. This is also why I am teaching myself OOP - I am writing a new class for SQL in tandem with the rest of this project. — DevlshOne 16 mins ago
 
2:29 AM
<?php echo file_get_contents('/dev/urandom'); ?>
 
 
I did try cat /dev/random... It (almost) didn't end well...
 
real man do cat /dev/urandom > /dev/tty0 ... or whats-it-terminal-device
 
Have you tried cat /dev/usbmon0? It does nothing until you plug in a USB device...
 
it also works well with mouse device
 
2:33 AM
USB mice?
(I'm using a touchpad)
 
not sure about the usb mouse , i usually use /dev/sysmouse abstraction anyway
^ lazy
 
Well, my computer doesn't have /dev/sysmouse :P
 
hey
 
@JSweete Hi.
@tereško /dev/usbmon0 works with USB mice, I just tried it.
 
@ShaquinTrifonoff it's a freebsd thing
 
2:37 AM
:) has anyone seen this error before... PHP Notice: Indirect modification of overloaded property ControllerAccountAdvertising::$error has no effect
 
So nobody knows how to paginate a sites php?
This has been bugging me for a while.
 
this is from a custom opencart module im building but im baffled and ive never seen this before
 
@JSweete I bet Google has.
 
yeh i had a google but i couldnt find a definitive answer as to how to get around the problem
 
Anybody know anything about Web Sockets?
 
2:40 AM
1
Q: PHP Indirect modification of overloaded property

mck89i have this simple class: class A { var $children=array(); function &__get($name) { if($name==="firstChild") { if(count($this->children)) $ret=&$this->children[0]; else $ret=null; } return $ret; } } By acces...

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
Yeah I've tried there, figured i'd try here too just in case since you can work it with PHP
 
thanks i saw this but its not really relevant to my senario
 
16
Q: Smart pagination algorithm

jeannicolasI'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it. Here's a quick example to make it clearer... this is what I h...

 
the line of code causing mine is not a loop or anything its just this....
$this->error['error_photo1'] = $this->language->get('error_php_file');
 
A wild Help Vampire Swarm appeared!
 
2:42 AM
it appears that there is a problem adding to this object array $this->error[] but i cant work out how to get around it
haha sorry just really stuck and was hoping someone could point me in the right direction or at least of what im doing wrong or how to work around it
can this be caused by a server issue? as im sure this did work fine prior to a server move but seen as its a php error i cant see how
 
@JSweete is you actually spend the time to read the answers , you would notice that error is caused by what $this->error is and is not
 
sorry yes i understand the error is caused by $this->error but i dont understand how else to make this function work
 
3
Q: Pagination Function - Can this be shortened or approached differently?

JoeI recently had an interview for a programming job and after the interview I was then asked to create a function with the following brief: The Task: Relating to pagination links: given a page number, a total number of pages, and an amount of 'context' pages, generate the appropriate pagin...

 
well how else to add to this objects array, as i tried $error but of this didnt work
 
does anyone know how I can dump my mysql database data to a .dat file?
 
2:48 AM
@Dave , this has NOTHING to do with php
 
php people use mysql a lot
fact
 
@JSweete , here is a hint: is $this->error a real value ?
 
@Dave mysqldump?
 
@Dave php users also every day take a piss .. it does not make this the right place for consultation about your today's color of piss
 
hmmm let me try
 
2:50 AM
@TapThatApp If you use the code from my answer to that question please follow the license that code on stackoverflow and the sister sites uses: CC-SA 3.0.
 
@tereško yes this is used throughout opencart it is a standard value
 
no
is it a real value , or you are accessing it via magic methods
 
php users also take a piss every day* about your color of today's piss*
thanks Shaquin for the help, sorry about teresko
 
@tereško sorry im confused what you mean
 
array_push($tinyAvatars, "Dave");
 
2:53 AM
$tinyAvatars[] = 'Dave';
 
@JSweete in that case , i cannot help you .. this was a simple question
 
@Paul I made a mistake in my last post. I mean to ask for paginating a sites RSS feed.
 
@tereško well it is predefined in the launched system code of opencart and so any classes and controllers within this can use these variables eg. $this->error if returned will show an error message and this used to work however from the client moving to a different server this seems to no longer function correctly and gives that error and i don't understand whats causing the problem
sorry if i seem thick here im still learning php and so i wouldnt class my self as a full developer yet classes are quite a new thing to me
 
Wasn't the reaction a bit too strong for a single mysql request? People do come in here asking javascript, css and mysql questions. Why not be polite when you tell them you think they should ask elsewhere?
4
 
@tereško --^
 
3:15 AM
hey, find this useful? i'd appreciate an upvote :)
 
@goldenparrot Are you doing the Windows 8 Challenge? :-)
(+1, by the way)
 
yeah. thanks :)
 
3:35 AM
I don't understand that. Am I entered to win if I get the upvotes, or do I just get the tshirt?
 
hey peeps
 
don
 
4:19 AM
@SomeKittens all entering level 1 get the shirt. for the rest, you are entered for a draw.
 
5:09 AM
morning .....:-)
 
5:24 AM
@ShaquinTrifonoff I have now made two windows-8 posts
answers that is
waiting for upvotes :P - i just want the shirt, don't care about the rest of the things
 
I think I'll post a few, too. (The shirt is guaranteed, the other things are a draw.)
 
exactly
 
But I would have to post from memory, because I've replaced Windows with elementary OS :P
It rotted again, and I'd had enough.
 
lol
 
The only problem is, there aren't any really, really good text editors for Linux that can replace Notepad++, and even Notepad++ running in Wine just isn't the same :(
(And yes, I did try Geany.)
 
5:35 AM
sublime?
 
kate > notepad++, sorry
gedit is better too if you use gnome tbh
at least the syntax highlighting and coding features, etc
 
@Lusitanian Okay, but what about FTP integration? :P
 
FTP?
You use FTP? :P
install a plugin then
kate is certainly more powerful than npp though
 
Or advanced search/replace (find in files, normal search, advanced search, regex search)?
 
i believe kate supports find in files
it supports regex
i don't know what 'advanced search' means :p
but tbh, in linux you have grep
 
5:38 AM
\r, \n, \0 etc.
 
yes it supports that
you mean escape sequences presumably
 
lol
just try it!
 
It has heaps of dependencies, including a media player (!):
  docbook-xml kate kate-data katepart kde-runtime kde-runtime-data kdelibs-bin
  kdelibs5-data kdelibs5-plugins kdoctools kubuntu-debug-installer libattica0.3
  libcanberra-pulse libclucene0ldbl libdlrestrictions1 libkateinterfaces4
  libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5
  libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5
  libkidletime4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff2-4
  libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4
 
oh
you don't use kde
 
5:39 AM
No.
 
meh
what gui do you use?
 
GNOME
(I'm pretty sure that elementary OS uses GNOME, since it's based on Ubuntu)
 
ew
so try gedit :)
 
That's what I'm using... it's not the same...
There are some simple things that make a big difference, like code markers and being able to select lines at a time by dragging by the line numbers.
 
then rewrite notepad++ for linux :p
 
5:44 AM
I hardly know any C/C++ :-)
Otherwise, I would.
 
i'm guessing most of the windows api dependency lies in the GUI
opening up the solution file to check
**project file
 
user895378
FWIW, I used gedit + plugins for a long time before eventually moving back to windows as my primary development environment. Notepad++ was a big reason why. Nothing I found in *nix came close.
 
user895378
I run VMs and have dedicated linux boxes in my office with terminals and remote desktops open all the time, but windows is my preferred environment right now.
 
void printInt(int int2print)
{
	TCHAR str[32];
	wsprintf(str, TEXT("%d"), int2print);
	::MessageBox(NULL, str, TEXT(""), MB_OK);
};

void printStr(const TCHAR *str2print)
{
	::MessageBox(NULL, str2print, TEXT(""), MB_OK);
};
god wtf stop doing this to C++...WHY
this is a typical mix of C and C++
:(
 
printInt(int int2print) is funny :D
@rdlowrey I've heard it said,
> Windows is good for development, and Linux is good for servers.
 
5:48 AM
but look at how messed up that is
 
@Lusitanian I'm guessing ::MessageBox is the messed-up part?
 
nono
i guess it's not really that bad it just bothers me to see a call to wsprintf in an application written in C++
heh
 
@Lusitanian What should it be?
 
either a stringstream or a lexical cast if you have boost in the project
eliminates a possible buffer overflow (not that there's one there since it's typed as an int and the buffer is length 32)
but more importantly the function is called print and it calls messagebox...
const int nbWtf = 6;
char *wtf[nbWtf] = {
"WTF?!",
"lol",
"FAP FAP FAP",
"ROFL",
"OMFG",
"Husband is not an ATM machine!!!"
};
why is that in the codebase
also bad news if you want to port to linux, it uses the windows threading api
instead of the cross-platform C++ threading api
 
@Lusitanian Which file?
 
5:54 AM
Notepad_plus.cpp
 
@Lusitanian So it would have to be changed to the C++ threading API, or what?
@Lusitanian OK.
 
well, it also depends on lots of other windows api stuff it looks like so meh
okay what is with the random spurts of hungarian notation
it's a strongly typed language. you do not need hungarian notation.
 
> Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size.
So that's why it uses the Windows threading API?
 
actually it's probably because this was in existence well before the C++ threading library
which was introduced with C++11 (std::thread)
though boost::thread existed well before it
@rdlowrey did you get hit at all by the massive media-sensationalized storm that passed over the east coast?
 
> For what I know of WxWidgets, it should be "straightforward" to port otepad++ [sic] to such a toolkit. As straightforward as it would be, it wuld still require changing a thousand API calls and rewriting large portions of code. Even if there is no other latform-specific [sic] issue, which I don't believe, it is still a fairly large devlopment [sic] effort. We are not aware of adequate resources being available at this point. [source]
So, a thousand API calls need to be changed...
 
6:02 AM
how fun
scintilla can be compiled for linux though
if you want to write your own editor
@ShaquinTrifonoff have you tried bluefish.openoffice.nl?
 
some help would be appreciable--- >http://stackoverflow.com/questions/13151735/integration-of-facebook-like-button-in-magento-programmatically
 
user895378
@Lusitanian Nope, it all passed north of me.
 
ah. i got lots of rain and wind and a still-persistent flood warning
and exactly no flooding [around me]
 
@rdlowrey was it a reply to me ?
 
user895378
And I went and spent the weekend at a college buddy's place a couple hours south down near Atlanta, so the only thing I saw was a bit of light wind.
 
6:08 AM
ahhh
 
@nik_hil Um, no, it wasn't.
 
@Lusitanian nopes ... i got u ... f9 continue .. sorry
 
user895378
It's been a while since we've had any real hurricane threat on the South Carolina coast.
 
@nik_hil huh?
@rdlowrey yeah [i have a strange obsession with tropical weather] i've noticed
Dwight Howard 3/14 from the free throw line. Solid.
 
user895378
lol
 
user895378
6:11 AM
I love that the Lakers lost to a Junior Varsity Mavericks squad.
 
Yeah
I concur
 
user895378
Mike Brown is terrible.
 
He coached my team for several years!
(and was terrible)
 
user895378
Can't win with Lebron. Can't win with Kobe/Nash/Gasol/Howard.
 
I was encouraged by Dion Waiters tonight though
yup...though I partially attribute the former to LeBron
 
user895378
6:12 AM
Oh no, you're one of those people.
 
heheheh
I'm no longer bitter but believe me, he threw the Celtics series his last year here.
That was, of course, a year during which we had a reasonable shot at winning the title but he had his sights set south so...
 
user895378
I would've thrown it too if Delonte West gave my mother the proverbial business. Allegedly.
 
Allegedly. lol.
It's okay, at least I have the Browns and Indians...
oh, wait.
 
user895378
Brandon Weeden not doing it for you?
 
user895378
Terry Francona will right the Indians ship. Allegedly.
 
6:15 AM
I like him but we have a crappy offensive line (Trent Richardson constantly gets hit in the backfield, pretty strong evidence of that :P) and a bunch of receivers who literally cannot catch a ball.
Yeah no, not until the team is sold...the Dolan family won't spend any money. I do like Francona though.
 
user895378
Yeah, Francona looks like a freaking baseball Messiah compared to Bobby Valentine.
 
Yeah I don't quite understand why they fired him. The players were at fault, as evidenced by this season...
 
user895378
Anyway, now that we've coopted PHP chat with sports talk radio fodder, it's time for me to go to bed. Catch ya later dude.
 
Peace.
 
Hi, does anybody have any experience using WhatsAPI to send WhatsApp messages via PHP?
I am hoping somebody figured out how to pass the user nickname as a parameter to the send request...
I guess by the silence that no one has done it... or you guys are all asleep...
 
6:29 AM
@chimgrrl I have no familiarity with it
that and i'm also partially asleep :p
 
ok thanks anyways...
 
 
1 hour later…
7:32 AM
I haven't slept, heart attack is smiling...
 
7:45 AM
morning
 
Sometimes I wish there was a 'dislike' button on websites (example)..
 
I am using wmd-editor But it is not working same as SO or it is (vulnerable to xss)?
Can i use SO's wmdeditor? or where can i found it.?
 
wat
 
8:06 AM
The user synchronizes data with a directory on the webspace via FTP
then PHP synchronizes these files with the DB
Any idea how to lock the folder for FTP while PHP runs a sync?
with flock I can just lock a single file
 
You could rename the folder...
 
yes, I could copy it, but what if the ftp export start while copying?
 
8:28 AM
flock for dirs isn't working is it? (I didn't find a way)
 
"I didn't read your code, but".... :)
 
9:35 AM
Morning people
 
user1125394
@DaveRandom morn' what is the equivalent of innerText on IE?
 
@cyril I thought innerText worked on IE? It's textContent on FF...
 
user1125394
maybe, but IE debugger say there is an error on a line with innerText, thx
 
@cyril What's the line/whats the error/have you got a fiddle?
 
9:38 AM
Yep, innerText definitely works on IE8
 
user1125394
don't know how to do with ie, but it says line 22 char 5, this object does'nt handle this property
 
user1125394
need to find a free IE debugger
 
@cyril I know, IE console sucks ass
 
@Gordon WTF? How do these things happen?
 
One thing I notice is that you use .querySelectorAll() which I'm pretty sure IE8 doesn't support MDN reckons it is supported from 8, but it won't work it 7 or 6
Hang on, I'm going to have to get this into a document of it's own, JSFiddle is screwing me over a bit here
@cyril How much compat do you want with this? Do you want IE6 support or what?
 
user1125394
9:51 AM
ie7
 
user1125394
ah queryselectorAll, so will do jquery then
 
:-(
Would make life easier though, I admit
 
morning
 
Although you already used jQuery for the document ready event anyway
 
Somebody mentioned querySelectorAll()?
 
9:54 AM
@PeeHaa monring
 
monring
 
user1125394
that's why jquery is popular, browsers can't agree to do same things
 
user1125394
@DaveRandom yes but anyway this thing is meant to be inside jquerymobile, so...
 
Good day. What was the function to convert string which is like get parameters in URL to array?
Reverse of http_build_query
 
@DanielsPitkevičs parse_str()
The syntax is a bit stupid, you have to pass a variable reference to the second argument otherwise it's like calling extract() on the result
@cyril I'm still going to show you how to do it without jQ anyway :-P
 
10:04 AM
@DaveRandom I need to pass resultive array, yes?
 
@DanielsPitkevičs Yes, like:
parse_str($str, $result);
// $result now holds the array
 
ok, ty :)
 
@cyril Maybe I'm missing something, but...
Array.prototype.slice.call(document.querySelectorAll('datalist > *'), 0)
^^ why? Why not just
document.querySelectorAll('datalist > *').slice(0)
 
user1125394
yes right, anyway jsfiddle.net/ygRbS/8/embedded/result blocks at keywords.addEventListener('input', onInput); why?
 
@cyril IE doesn't support window.addEventListener until 9
 
user1125394
10:15 AM
ok
 
@DaveRandom Hey!, Remember me from yesterday (CakePHP nusoap error), I sorted the issue incase your interested, check out the question @ stackoverflow.com/questions/13138114
thanks for your help in debugging the issue
 
@JustAnil Nice one, looks like a good comprehensive wiki for some common errors, definitely worthy of a +1.
 
I love contributing to stackoverflow! Thanks! ;D
 
10:38 AM
Maybe someone knows. Is it possible to get unsuccessful attempts to connect to router without log files?
 
@DanielsPitkevičs No
 
@DaveRandom That's what I thought. Thank You
 
Good morning
 
hi
i want that mouse automatically do few click on selected time on different locations in desktop and website i want to build this program just for me
any suggestion how to do this
 
10:50 AM
c/c++/c#/python/java etc. Not PHP
 
@Robik monring
 
norning, ppl
 
@DanishIqbal I really hate to recommend this for anything ever, but: autoitscript.com/site/autoit
@tereško Norning to you too sir
 
user1125394
a developer in my team coded its language distionnay using $_SESSION
 
11:09 AM
@DaveRandom thanks
m chking this
i just read few lines and think it will solve my problem
 
@cyril Nice way cache it :)
 
user1125394
@PeeHaa but you agree on apache, if there are 1000 users connected, each one have the same copy of the dictionnary, how to cache it?
 
@DaveRandom but y u hate this to recommend ??
 
@cyril Oh I do agree. And how to cache? apc?
 
user1125394
gettext, stored in server po file...what I did but the guy don't want to follow
 
11:14 AM
@DanishIqbal Because automating GUI interaction is doing it wrong. A GUI is a human friendly way of telling the computer what to do. If the thing using it is a computer it's going the massively long way round. However, I do accept that there are some cases where it's just easier - but it's also much more prone to error, because you are relying on bits of the GUI being in the right places on the "screen".
 
@cyril the problem with gettext is that you have to restart the server each time you edit PO file
 
@tereško @PeeHaa hi
 
user1125394
it changes every week or month
@DaveRandom thx for http://jsfiddle.net/ygRbS/10/
 
@cyril That was an accidental save, it doesn't work in IE7
 
user1125394
11:26 AM
ok nvm I will jQuerify,
is it good or bad to omit semi colons: `loadHandler()`
 
Thanks
:)
 
@cyril In a oneliner like that, it doesn't matter. But best practice would be to add a semi colon. I hate putting <script> tags in the body but it's the only way to guarantee DOMContentLoaded behaviour everywhere.
 
user1125394
@DaveRandom better than <body onload="loadHandler()" ?
 
@cyril That's just another way to assign window.onload which doesn't fire until every resource (images etc) has loaded
 
user1125394
11:41 AM
@DaveRandom is it possible to have a dom prototype that returns either innertText or textContent if the first is undefined
 
user1125394
 

« first day (746 days earlier)      last day (4208 days later) »