« first day (663 days earlier)      last day (4285 days later) » 

5:00 PM
@JordanRichards Hey there.
So you discovered your function scoping problem?
 
yeah
Having trouble fixing it
 
@NikiC not sure...
 
could we go to a seporate room?
 
:) I bet you have had trouble fixing it.
Definitely.
 
@LeviMorrison who won? :)
I always lose...
 
user895378
5:02 PM
@LeviMorrison Man, learning all this HTTP knowledge is super helpful in life:
 
user895378
1
A: code to know whether the file has been downloaded or not

rdlowreyDespite comments to the contrary, this is possible, though it's not for the faint of heart because it requires some knowledge of the HTTP protocol as well as understanding of file streaming. Assuming PHP ... Run the file download through a PHP script -- i.e. don't have the web server serve the...

 
@rdlowrey Definitely.
 
@LeviMorrison That's how it is right now.
 
@NikiC so to return a key/value pair, what's the current syntax?
 
user895378
5:08 PM
@webarto Except why would you involve a database and a session to do what my answer does without them? :)
 
@LeviMorrison yield $key => $value;
 
@NikiC Looks fine to me, why is everyone going off on these side streets then?
 
@rdlowrey yes it does use database, but I needed tracking anyways, just pasting teh codez... you know this user* are not going to accept or anything...
 
user895378
@webarto Oh yeah totally. I wouldn't have answered for that reason but there was a guy in the comments who said it wasn't possible.
 
user895378
I generally ignore questions from user123456
 
5:10 PM
Hello folks! I'm looking forward to stabilize GenPhrase library, and would like to hear some feedback. Do you see anything missing or any show stoppers? github.com/timoh6/GenPhrase
 
@LeviMorrison The bikeshed ;) Never forget about the bikeshed :)
 
Any comments much appreciated :)
 
@rdlowrey I also considered it was "impossible", but if file hosts can do it, so can we :)
 
ok so if utf8 is variable length, arent there longer-length characters (like using 3 or 4 bytes) where the 1st one or two bytes of it could represent a valid utf8 character?
in other words, how does the encoding...thing (engine?) know where the separations of characters are
 
@AndyPerlitch don't overflow your brain :) complicated s* ... github.com/kohana/core/blob/3.2/master/utf8/ord.php look here, but this can also break UTF8 char... just leave that to engine...
 
5:16 PM
So you have a method with a signature like this: `($id,$option=false,$quantity=1)`

Weeks after making it, you're adding a related method that takes the same arguments, and you do this: `($id,$quantity=1,$option=false)`

Stop the presses! I want them to be consistent (looking at you, PHP string functions [https://bugs.php.net/bug.php?id=44794]), but I prefer the order of the second iteration -- it makes more sense in that order. Do you, as a developer, a) go change the first method (and everywhere that calls it), or b) stick with the already-established conventions and make the second meth
 
@Chris If it's deployed and other people might be using it, the latter. If it's ONLY your code and you are completely sure of it, refactor all you want.
Some IDE's can even automatically do that for you.
 
regex replace :}
 
I am the only active developer, but the former (change the first method) has time (and therefore money) considerations
 
@Chris I personally hate that, I use one order everywhere and then have to shuffle it in parameters...
 
5:20 PM
@Chris definetly refactor the old code ;)
 
@Chris The bucket-of-params approach might be appropriate if you can't settle on one or the other
12
Q: Should my PHP functions accept an array of arguments or should I explicitly request arguments?

JohnIn a PHP web application I'm working on, I see functions defined in two possible ways. Approach 1: function myfunc($arg1, $arg2, $arg3) Approach 2: // where $array_params has the structure array('arg1'=>$val1, 'arg2'=>$val2, 'arg3'=>$val3) function myfunc($array_params) When shoul...

 
user895378
*args, **kwargs ...
 
I end up with a "get 'er done!" mentality that would either cause me to do b (use a harder-to-remember argument order to keep consistency), OR I'd be a dick to myself and leave them inconsistent. Either way, I find my decision being driven by time constraints rather than good practice, which is kind of frustrating.
 
@rdlowrey maybe in PHP 10 :)
 
YES. I figured it out. so epic. @webarto THANK YOU FOR THAT ARTICLE
 
5:23 PM
I don't use an IDE, so maybe that would be better
 
@rdlowrey Well too bad. If we get an AST into the PHP interpreter, it has a much better chance of making it. An AST allows us to do many of the things we currently can't do, such as the lovely PHP6 syntax I am working on.
 
user895378
<crossedFingers />
 
user895378
I just crossed my fingers in a valid XHTML tag.
 
@AndyPerlitch thank @deceze for writing it :P so you figured it out eih? :)
 
Okay it's not as Latin-1 it looks like. Reverse engineering failed. Can not paint a nice picture :/
 
5:26 PM
@hakre painting by mouse or ... ? :)
 
@deceze i love you, wherever you are...
thanks for the help though @hakre and @webarto
 
I've got some retarded XML that I need to parse, in the form of
<start>
<nonstandard>...</nonstandard>
<standard>...</standard>
</start>
How can I get only the <standard>...</standard>?
 
What's non-standard about it?
 
> $cnt = intval(floor(count($arrayTranspose)));
ohgodwhy... ^
 
(length varies, so I can't hack substr)
I can't load it with SimpleXML, because that breaks on the <nonstandard> stuff
 
5:34 PM
What is non-standard about it?
 
@SomeKittens what do you mean with can't load?
 
@LeviMorrison It's wannabe SQL, so some attributes are weird
<Filter xsi:type="QueryOrExpression">
 
(and by the way, WTF are you using SimpleXML for anyway? USE THE DOM!)
@SomeKittens That's not non-standard.
at least not that part.
 
@hakre Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\xampp\htdocs\CWplay\cwconnect.php:50 Stack trace: #0 C:\xampp\htdocs\CWplay\cwconnect.php(50): SimpleXMLElement->__construct('&lt;?xml versio...') #1 C:\xampp\htdocs\CWplay\sendToCW.php(142): CWConnect->getCompanyId('Kittens%') #2 {main} thrown in C:\xampp\htdocs\CWplay\cwconnect.php on line 50
@LeviMorrison because people in this very room said it should work, and was easy to learn.
 
@SomeKittens . . . who? Everyone I know in this room would MUCH prefer to use DomDocument and friends . . .
 
5:36 PM
@LeviMorrison That's the part that's throwing errors when I try to validate it
Can not resolve 'QueryOrExpression' to a type definition for element 'Filter'.
 
@SomeKittens Well don't validate it, just parse it
 
@LeviMorrison lemme try that. I don't remember who
 
As long as it is a valid XML serialization that's all that matters.
 
May have been @deceze
 
@SomeKittens you have the xml somewhere?
 
5:38 PM
@LeviMorrison It's breaking on parse, so I tried to validate it
gist: XML example, 2012-08-09 17:39:45Z
<?xml version="1.0" encoding="UTF-8"?>
<FindPartnerCompaniesAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<CompanyName>training</CompanyName>
	<IntegrationLoginId>JoomConnectTrainingMIL</IntegrationLoginId>
	<Limit xsi:nil="true" />
	<Skip xsi:nil="true" />
	<Filter xsi:type="QueryOrExpression">
		<Left xsi:type="QueryLikeExpression">
			<Left xsi:type="QueryPropertyExpression">
				<Name>CompanyName</Name>
			</Left>
			<Right xsi:type="QueryConstantExpression">
				<ValueType>System.String</ValueType>
				<Value xsi:type="xsd:string">Kittens%</Value>
			</Right>
		</Left>
		<Right xsi:type="QueryLikeExpression">
			<Left xsi:type="QueryPropertyExpression">
				<Name>PhoneNumber</Name>
			</Left>
			<Right xsi:type="QueryConstantExpression">
				<ValueType>System.String</ValueType>
				<Value xsi:type="xsd:string">`</Value>
			</Right>
		</Right>
	</Filter>
	<Companies>
		<Company>
			<CompanyRecID>600</CompanyRecID>
			<CompanyName>Kittens R Us</CompanyName>
			<CompanyID>12345</CompanyID>
			<PhoneNumber />
			<AddressLine1>123 Fuzz St</AddressLine1>
			<City>Oneonta</City>
			<State>NY</State>
			<Zip>13820</Zip>
			<Country>United States</Country>
			<Type>Customer</Type>
			<Status>JoomConnect - Website User</Status>
			<Territory>Corporate</Territory>
			<Website />
		</Company>
	</Companies>
</FindPartnerCompaniesAction>
 
mega gist :(
 
user895378
I have yet to see a situation where the gist one-boxing was anything but annoying ...
 
All I need is the contents of <CompanyRecID>
 
is there a meta issue for it?
 
user895378
@NikiC there should be. no one writes three line gists.
 
user895378
5:41 PM
They're all really long and gobble up the chat window
 
if there isn't one yet, I'll open it
16
Q: Chat oneboxes too big

Konrad RudolphCase in point: gist in C++ chat. It fills the whole screen. Or, as DeadMG puts it: whoah, giant wall'o'text I suggest reducing the max-height by half, i.e. 300px. That should be enough.

Added +50 to it. maybe helps
 
@NikiC TBH... I thought you were a girl.
 
:p
 
@Chris Nikita is an Unisex name @ircmaxell :P
 
DOMDocument isn't loading it either. (returns false on $doc->loadXML($xml))
 
"Niki", in the US, would usually be a female name (most names that end in the "ee" or "i" sound are). I just happened upon his blog, and realized my mistaken assumption.
I <3 DomDocument
 
@NikiC is a guy?!!
 
I know, right? It makes those fantasies we were talking about kind of... weird.
 
fantasies ?!?
 
5:55 PM
@Chris like I already told, in mother Russia, borzoi.net/BN-WEB/Html/Russ-Female.htm names that are ending on "a" are usually female names...
 
@SomeKittens What about setting strictErrorChecking to false on DomDocument... any help?
 
@SomeKittens is $xml the XML itself or the file path?
 
@salathe the xml itself
(returned by CURL)
 
@SomeKittens Works For Meâ„¢ -- so.viperpad.com/NktC8O
 
@Chris familiarize yourself with rules of the internet
27. Always question a person's sexual preferences without any real reason
28. Always question a person's gender - just in case it's really a man
29. In the internet all girls are men and all kids are undercover FBI agents
 
5:57 PM
hello i am trying to integrate paypal in my yii app that is cart but i see strange error that reads
SetExpressCheckout failed: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed(60)
 
yii the programming language?
 
yii the framework yiiframework.com
 
Hold on, I'm an idiot. DUH.
 
@webarto I prefer to reject that advice, and stumble through it. You've heard the ancient Chinese curse "May you live in interesting times"? Well, I'd call that a benediction. Nothing more interesting than a gender-bender.
 
Sorry for wasting everyone's time
 
@SomeKittens You should be sorry! Less time for talking about really important things!
@webarto drools
 
@SomeKittens that's okay, kittens can waste as much of my time as they like. :)
 
some one knows good and brief guide to paypal integration
 
@Chris lmao hilarious
 
that tells payment was sucessfull or not
 
6:00 PM
@AfnanBashir ExpressCheckout or Website Payments?
 
i have a small website that has a cart just payment for that one time
you can suggest
 
If you're using the API, you'll get back a response, the success/failure details are in the array key 'ACK'
 
@webarto sorry to disapoint you, my trails ended up here -> plus.google.com/116797686750161798768/posts
 
@Nick I wouldn't call it a Yii app, but PHP app, Yii is pretty much irrelevant..
 
yes i agree but i just gave info to people
 
6:02 PM
@webarto is it safe to assume its a man
 
@Nick was a man, yes :D with Google paycheck you can do all sorts of wicked things now :D
 
lolol ^^
 
i am looking for Expresscheckout
any good guide and working app samples
?
 
you are boring, IMHO
 
lmao
 
6:04 PM
:(
 
hey guys working with some preexisting code trying to prevent repost of data
basically the idea looks like this
newdata
 
It is enough to read Paypal docs, and if not, net.tutsplus.com/tutorials/html-css-techniques/… pretty much covers it... if it hadn't changed drastically @AfnanBashir
 
@salathe hrm
I feel like this topic comes up in here every other day ...
Should maybe rename to NikiC (male)
 
hey guys working with some preexisting code trying to prevent repost of data
basically the idea looks like this

$newdata = postvar1 + postvar2
if !($newdata == $_SESSION(olddata)) then
action()
else
endif
$_SESSION(olddata) = newdata
this however doesn't work
 
Hello guys
one Q on Calling dll from PHP
 
6:13 PM
switch to linux, live a happier life
your question?
 
how can I call dll method from php
it is a microsoft dll
 
2
Q: How do I call a function from a dll from php on windows?

marc40000I'm using xampp. I search and it looks like for php 4.x, there was an extension called php_w32api.dll which seems to have vanished for php 5.x. Nevertheless, it's still in the documentation on php.net but marked as experimental. Some suggested to use win32std in pecl instead, but that just wrap...

@flex im assuming above didn't work for you
 
y
@er
@ert3 y it doesn't works
 
interesting
 
Can you system() out to RunDLL?
/me knows nothing about PHP on Windows, or DLLs for that matter
 
6:16 PM
@AfnanBashir They have a ton of documentation for ExpressCheckout. Here is a thrown-together sample... I've not tested this at all, but you should get the idea
gist: Quickie paypal implementation (untested), 2012-08-09 18:15:18Z
function chargeCreditCard($detail) {
	$API_USERNAME = '-USERNAME-';
	$API_PASSWORD = '-PASSWORD';
	$API_CERTIFICATE = '-SSL-CERT-';
	$API_SIGNATURE = '';
	$API_ENDPOINT = 'https://api.paypal.com/nvp';
	$PAYPAL_URL = 'https://www.paypal.com/webscr&cmd=_express-checkout&token=';
	$VERSION = '51.0';

	$return = array(
		'error'=>false,
		'message'=>'',
		'transaction_id'=>false
	);

	if (
		!isset($detail['CREDITCARDTYPE']) || 
		!isset($detail['ACCT']) || 
		!isset($detail['EXPDATE']) || 
		!isset($detail['CVV2']) || 
		!isset($detail['CURRENCYCODE']) || 
		!isset($detail['COUNTRYCODE']) || 
		!isset($detail['PAYMENTACTION']) || 
		!isset($detail['DESC']) || 
		!isset($detail['AMT'])
	){
		$return['error'] = true;
		$return['message'] = 'Missing required values';
	}

	$post_string='
		METHOD=doDirectPayment&
		VERSION='.urlencode($VERSION).'&
		PWD='.urlencode($API_PASSWORD).'&
		USER='.urlencode($API_USERNAME)
	;
	foreach($detail as $k=>$v)
		$post_string.= "&".$k."=".urlencode($v);

	$ch = curl_init();
	curl_setopt($ch, CURLOPT_SSLCERT, $API_CERTIFICATE);
	curl_setopt($ch, CURLOPT_URL,$API_ENDPOINT);
	curl_setopt($ch, CURLOPT_VERBOSE, 1);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch, CURLOPT_POST, 1);

	curl_setopt($ch,CURLOPT_POSTFIELDS,$nvpreq);

	$response = curl_exec($ch);

	$response = deformatNVP($response);

	$ack = strtoupper($response["ACK"]);
 
	if($ack=="FAILURE") {
		$out = '';
		if (isset($response['L_LONGMESSAGE0']))
			$out = $response['L_LONGMESSAGE0'];
		if (isset($response['L_LONGMESSAGE0']))
			$out .= '('.$response['L_ERRORCODE0'].')';
		$return['error'] = true;
		$return['message'] = $out;
		return $return;
	}
	$return['transaction_id'] = $response['TRANSACTIONID'];
	return $return;
}
function deformatNVP($nvpstr) {
	$intial=0;
 	$nvpArray = array();	
	while(strlen($nvpstr)){
		$keypos= strpos($nvpstr,'=');
		$valuepos = strpos($nvpstr,'&') ? strpos($nvpstr,'&'): strlen($nvpstr);
		$keyval=substr($nvpstr,$intial,$keypos);
		$valval=substr($nvpstr,$keypos+1,$valuepos-$keypos-1);
		$nvpArray[urldecode($keyval)] =urldecode( $valval);
		$nvpstr=substr($nvpstr,$valuepos+1,strlen($nvpstr));
     }
	return $nvpArray;
}	
JFC
 
@NikiC you should set up an avatar of some playboy blonde
 
I just wanted to post the link, FFS
 
@webarto Yes. That way people will treat me much better I suppose :D
 
user895378
@NikiC NikiC (NC === Not a Chick)
 
Niki can be taken as negation, none...
 
user895378
6:17 PM
For those who need a mnemonic device to remember ...
 
How can I call Lync from PHP?
 
How can I call Mars from PHP?
 
@webarto, I mean to say How can I integrate Lync to php?
 
@flex or I suppose you could wrap the DLL into a binary extension, a la PECL
 
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,'http://mars.jpl.nasa.gov/msl/');
	$response = curl_exec($ch);
 
6:20 PM
@IMSoP, PECL? can u give some more detail
 
@webarto Calling mars from PHP, that snippet does it
 
basically, instead of just a PHP library, you can write C code that exposes functionality to PHP
in the same way that, for instance, mysql_real_escape_string() actually calls a binary library provided by MySQL
 
@IMSoP, $ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://mars.jpl.nasa.gov/msl/');
$response = curl_exec($ch); what it actually does?
 
?
It loads that webpage with CURL
 
6:24 PM
It was.... a joke about calling Mars (they have live video feeds from the Mars rover there, sometimes)
 
@Chris, I guess it requries autherization right
 
@orourkek nice, parallax
 
@flex No
 
@orourkek not nice, fscking epic
 
6:26 PM
pretty much, those people are seriously talented
 
@Chris, the url am going to use requries credentials befor login, all am trying to fetch all the user list in the lync
 
@orourkek far too much free time with fireworks and edge, boredum is the fuel of awesome
 
@Chris this reminds me of some game, i think it is MS made... this is epic too O.o
 
Did you notice it is NOT flash? :) I'm proud of NASA
 
NASA is the man :)
 
6:28 PM
evening
 
user895378
> Bye bye, heat shield. Job "well done" and a "toast" to you!
 
user895378
@orourkek That wedding page would be infinitely more satisfying if it offered an auto-play option like the nasa page.
 
user895378
manual scrolling blows.
 
@remi.gaubert please don't do this: "php_flag magic_quotes_gpc on"
 
@rdlowrey we can send them JS, or Ping of Death to server...
 
6:32 PM
@rdlowrey Agreed! That said... I spent 5 minutes scrolling that nasa page up and down with the autoplay paused.
 
hey guys, can some of you check by the way, what are the rules when sending jewelry across the great pond... like $2000 worth... from US of course...
not something you leave at the mailbox, eih...
 
@rdlowrey agreed, but still epic :}
 
Blah
 
@webarto Google blocking you?
 
lync integraion with php? is it possible
 
@Chris haven't found relevant info, USA mailing services are beyond my scope... here we still use pigeons...
nvm, I'll call them
 
lync integraion with php? is it possible
 
@flex Have you read the room description?
@flex Have you read the room description?
 
@PeeHaa NO
 
in JavaScript, 1 min ago, by Neal
http://stackoverflow.com/q/11889827/561731
 
6:39 PM
"Can you send jewelry by regular mail or do i hafto go to an fedex or UPS to send it?
i'm pretty new at this sending package....if i was gonn send it as regular mail, how many stamps would i put on, it's a light jewelry box. I still dunnno how stamps work."

Still doesn't know how to write...
 
@flex I am asking it twice because it looks like in your language you have to repeat yoursefl
.
@flex I am asking it twice because it looks like in your language you have to repeat yoursefl
 
user895378
lol
 
@ u mean N! time u want :)
 
user895378
Ignore prevents me from seeing the impetus for that, but I bet it's awesome.
 
1 min ago, by PeeHaa
@flex Have you read the room description?
 
6:40 PM
@flex What? Saying it twice it not enough?
What? Saying it twice it not enough?
@flex What? Saying it twice it not enough?
 
@PeeHaa x 4
 
Am I doing it right?
 
18 secs ago, by Neal
@PeeHaa x 4
26 secs ago, by Neal
23 secs ago, by Neal
20 secs ago, by Neal
17 secs ago, by Neal
15 secs ago, by Neal
12 secs ago, by Neal
7 secs ago, by Neal
10 secs ago, by Neal
18 secs ago, by Neal
@PeeHaa x 4
 
:)
 
@PeeHaa, u mean to say N factorial time time :)
 
6:42 PM
@flex @flex @flex
 
user895378
PHP chat just went all Inception on me.
 
@rdlowrey :-P
 
stop it pls @Neal ty
:)
 
32 secs ago, by Neal
14 secs ago, by Neal
10 secs ago, by Neal
8 secs ago, by Neal
6 secs ago, by Neal
Ill think abt it :-)
 
:P
 
6:42 PM
AHHHH!
The bugs I can manipulate in the SO chat ^_^
 
Fuck the LHC people. This guy just went back in time!!!!!!111111
 
guys give some input :(
 
0
Q: php time() and microtime() do sometimes not concord

zoydWhile logging some data using microtime() (using PHP 5), I encountered some values that seemed slightly out of phase in respect to the timestamp of my log file, so I just tried to compare the output of time() and microtime() with a simple script (usleep is just here in order to limit the data out...

 
15 secs ago, by Neal
5 secs ago, by Neal
8 mins ago, by flex
lync integraion with php? is it possible
Is it?
:-P
 
@Neal :) any idea on that ?
 
6:44 PM
@flex no
And it doesn't help to post it over and over again...
 
@Neal , i thought, bec of lot of message it will be lossed :)
 
@Flex I presume you just need to get the mp3s, then you can integrate away!
Lync was a 1990s post-hardcore band from Olympia, Washington. Formed in 1992, Lync was composed of vocalist/guitarist Sam Jayne, bassist/vocalist James Bertram and drummer Dave Schneider. Lync's distinctive sound of distortion, cryptic lyrics, and irregular tuning created a chaotic, visceral sound which drew comparisons to Fugazi, Unwound, Hush Harbor, The Fall, and Drive Like Jehu. The band went on to release singles on Magic Pail, Candy Ass, Landspeed, and K Records. Jayne and Bertram played on Beck's album One Foot In The Grave in 1994, right before releasing Lync's one full-length a...
 
I wantz to call Marz!!!=!=01201010211???
@flex
 
@fl @fle @flex @flexi @flexig @flexig @flexign @flexigno
 
6:50 PM
@rdlowrey you want to have a quick peek on my machine to see the http client issue in action? or do you say forget about it?
 
code in PHP, wants to buy a Ruby
 
This chat room reads like it is Friday
 
we are mental institution ready
 
user895378
@PeeHaa No, I'm not ready to forget about it, because if there's a bug in my code I want to find it. Are you talking about a vnc connection?
 
@rdlowrey lets just setup a teamviewer connection
 
6:51 PM
Hey guys
Got some code that looks like
while($row = $sql->fetch(PDO::FETCH_ASSOC))
{
echo "<h2>".$row['title']."</h2>";
echo "<p>".$row['description']."</p>";
}
How can I check if the fetch is empty?
 
@Chris its not friday !?!?
:(
 
user895378
@PeeHaa Now's not the greatest time for me, but I'll take a look at the code this evening and try to make it work (like I was going to last night). If that doesn't work I'm definitely in for teamviewer tomorrow.
 
cool
 
user895378
@PeeHaa Or if you're around a bit later I might ping you for teamviewer. Either way.
 
@webarto what deos it mean
 
6:54 PM
@rdlowrey All fine with me
 
@AlexCastro RTFM
@AlexCastro see Returned values section
 

« first day (663 days earlier)      last day (4285 days later) »