« first day (1344 days earlier)      last day (3830 days later) » 

15:00
If I've got /src/MyProject/MyNamespace/MyClass how can I get PHPStorm to generate the test in /tests/MyProject/MyNamespace/MyClassTest rather than in the same directory?
PHPStorm can generate tests?
Yea, they bundled support and dropped skelgen
(though, I think you can still use skelgen if you want)
what may have happened that on kubuntu command output got localized? though the only thing I have set to be localized is the second keyboard layout?
*make, wget, etc
Hello, I am trying to get amazon ECS working and having a really hard time. I guess my problem is that the response I am getting is this:
["webserviceWsdl":protected]=>
string(74) "http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl"
["webserviceEndpoint":protected]=>
string(76) "https://webservices.amazon.%%COUNTRY%%/onca/soap?Service=AWSECommerceService"
And I don't understand what to do with that
I'd suggest stop using the Soap interface...the JSON one is a bit less horrible.
15:11
yeah, i might go back I was working with it before and got fed up. The documentation for all of them is pretty rough
okay, thanks for the pointer
15:25
Damn SQL
Anyone good with SQL?
^^ Shouldn't that be "Damn SQL" then?
Well yes.
Changed it.
@DanLugg so you any good?
ThW
ThW
16:01
@radleybobins Soap using SimpleXML?
16:12
@DanLugg have you configured directories?
nvm doesn't work.
ThW
ThW
@hakre I improved FluentDOM the last days scrutinizer-ci.com/g/FluentDOM/FluentDOM/?branch=master
@ThW ah, "scruw" scrutinizer, they changed the metrics and now my code is f***'ed
:D
ThW
ThW
hehe
my current stance is that metrics aren't useful if the metricing changes :D
they need to run all previous codes again with the new metrics.
but that's not going to happen.
ThW
ThW
yeah, they are really fixed on the changes, but this works only if the metric is stable
16:28
Whats wrong with this:
<?php $downloadStmt = $db->query('SELECT * FROM items WHERE id = :pageid');
$downloadStmt->execute(['pageid' => "%".$_GET['id']."%"]); ?>
Dammit and this!
$searchStmt = $db->prepare('SELECT * FROM items WHERE tag LIKE :usersearch');
$searchStmt->execute(['usersearch' => "%".$_POST['search']."%"]); Only displays one result...
Anyone?
Anyone here?
@ThW and now since the metrics are that hard, it's not useful for posing any longer :D
ThW
ThW
:->
scrutinizer-ci.com/g/pear/Net_URL2 <- went really down here!
ThW
ThW
That's why I have only the code coverage badge in the readme ...
From 9.35, that IS depressing
yeah, I was shocked and that in the middle of the night!
but actually it's just that the code is complex, so metrics are just saying so.
16:47
Don't worry, I fixed half of it.
@hakre Can I do this?
$downloadStmt = $db->prepare('SELECT * FROM items WHERE id = :downloadID');
$downloadStmt->execute(['downloadID' => $_GET['id']]); ?>
$relatedStmt = $db->prepare("SELECT * FROM items WHERE tag = (select tag from items where id = :downloadID"); ?>
@hakre Yea I have; I can simply replace src with test in the dialogue, but it won't create the directories, they need to exist already.
Dan
@DanLugg good at SQL?
Rahul
@DanLugg yes, they need to. also you need to name them.
It just not as comfortable as it was with Eclipse.... .
@hakre I think I'll just stick with skelgen though...
Yea. Same goes for me and NetBeans, and even that wasn't particularly great.
16:49
so..?
Anyone help me please?
puh that one was really pushy
ThW
ThW
@hakre yeah the information is useful, I started at the issues, continued with the hotspots and the result is much better.
@ThW Any good at SQL?
@RahulKhosla Rather than asking over and over and over and over and over and over and over and over and over and over and over and over and over, why don't you try troubleshooting and problem solving... y'know, programming.
I tried
Im getting no where
16:50
Well, then you haven't tried enough.
Just need some firsthand advice.
Try a manual.
buhähähähääähäääääää - it will never work!
Can't you just give me a tip?
@RahulKhosla Can't you just RTFM?
16:51
I don't know what part.
All I need to know is, can I do that ^?
If your problem is not googleable, that means it's either complicated, or you don't know what your problem is.
I'm going to guess your problem isn't complicated.
No. It isn't.
Read it^
ThW
ThW
@RahulKhosla Yes, but you don't ask about a SQL problem, you keep pasting some database statement execution.
16:52
Thats an SQL query.
Just asking if I can do the following, because I keep getting no output.
$downloadStmt = $db->prepare('SELECT * FROM items WHERE id = :downloadID');
$downloadStmt->execute(['downloadID' => $_GET['id']]); ?>
$relatedStmt = $db->prepare("SELECT * FROM items WHERE tag = (select tag from items where id = :downloadID"); ?>
The ?id=123 works, but the relatedStmt does not.
ThW
ThW
@RahulKhosla You don't output anything
@ThW @DanLugg
$relatedStmt = $db->prepare("SELECT * FROM items WHERE tag = (select tag from items where id = :downloadID"); ?>
<?php foreach ($relatedStmt as $row) { ?>
<div class="itemHold">
<img src="images/thumbs/<?php echo $row['id'] ?>.jpg" title="<?php echo $row['name'] ?>" class="itemThumb" /><br />
<span class="itemName"><?php echo $row['name'] ?></span><br />
<a href="<?php echo $row['link'];?>" class="itemLink"><input type="button" class="button" value="View Download" /></a>
</div>
<?php } ?>
user924016
hi
16:54
Hi
user924016
@RahulKhosla please do not dump code in the chat =]
Is there a limit on how many lines @RonniSkansing
user924016
I do not understand that question, is it something you can search for?
@RonniSkansing I meant is there a limit on how many lines of code I can post in this chat?
user924016
I think the most acceptable in properly formatted minimal example
user924016
16:56
that you tested yourself
Ok thanks.
ThW
ThW
@RahulKhosla No execute()?
@RahulKhosla post the source into a nopaste (see the channel rules)
@ThW Would I need to even if I have the same :downloadID ?
ThW
ThW
your're preparing a statement and asking for the result, but do not execute it before asking for the result?
@PeeHaa lol, Predator just came on TV.
I may have difficulty working now.
@ThW I've tested $relatedStmt->execute(['relatedDownloadID' => $_GET['id']]); also.
ThW
ThW
You're missing error handling/reporting
17:03
That can be done after.
ThW
ThW
NO
user924016
@RahulKhosla and how will you see the errors then?
Ok I get you.
How do I go about error handling PDO statements?
user924016
Have you searched "error handling PDO" ?
Doing that right now
user924016
17:06
Then please do not ask
But I have no idea what i'm doing.
user924016
it is fair to be stuck, but you have to try out stuff yourself..
It sounds like you have a bunch of reading and testing to do.
user924016
search, read , test =]
I don't think there's any errors.
try {//sql query
}
catch (PDOException $e){
echo $e->getMessage();
}
And I got nothing back.
17:15
$relatedStmt = $db->prepare("SELECT * FROM items WHERE tag = (select tag from items where id = :downloadID"); ?
again write this query, $relatedStmt->execute(['downloadID' => $_GET['id']]); ?>
then try
is this $relatedStmt->execute(['downloadID' => $_GET['id']]); ?> missing causing problem?
no1 here?
can anybody show me how to write while loop in mysql ?
what you have done yet?
nothing
17:19
in mysql or mysqli, or pdo?
pdo is best but advance, then mysqli and mysql is old and it will not be supported in future
Any tor users around?
hi second
1 min, telling you some example in pdo
@web2students.com Hi, thanks but its still the same problem.
<?php
$db_name = 'mysql:dbname='.DB_NAME.';host='.DB_HOST;
$options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
);
$con = new PDO($db_name, DB_USER, DB_PASSWORD,$options);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$con->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$prepare = "SELECT * FROM users WHERE id = :id ";
$bind_arr = array(":id" => 1);
$stmt = $con->prepare($prepare);
$stmt->execute($bind_arr);
$row_count = $stmt->rowCount();
if($row_count>0){
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
no need of while loop in pdo, you will get associative array without loop
@web2students.com Can you take a look at my problem, you seem to be good with PDO
17:29
@RahulKhosla not really, just started it anyway trying
Oh, thanks.
user924016
@web2students.com please do not drop your code here like that
@RonniSkansing ok, what is alternative of it?
user924016
Formatting it or using pastie, pastebin, collabedit etc
@web2students.com there are some options here (point 3 of "do's")
As per jetbrains.com/phpstorm/webhelp/creating-imports.html, you can Alt+Enter to generate a use, but can one do that for a whole file?
@DanLugg What does 'doing that for a whole file' mean?
@Danack For each FQN generate a use.
Do you mean a directory or something?
For reference, NetBeans supports it as "Fix Uses...", which does pretty much exactly that.
17:33
oh. you mean refactor out the fqn from a file.
^^ Yea. And insert use's for each (or comma separated, though I don't think that's possible yet)
If you right click on the file in project window, choose inspect code, and then have your head explode with amaze-balls.
It will complain about unnecessary fqn's - you can select all those cases, and fix probably.
tbh, I usually turn that warning off, as sometimes having the fqcn is quite useful in helping the code be readable.
I use like, $bind_arr = array(":downloadID" => 123); $downloadStmt->execute($bind_arr); also try direct execute same query in phpmyadmin
@DanLugg that's not good
17:37
No, it's not; it looks like refined syrup to me too.
So tell us @DanLugg how many issues does PHPstorm have with your code?
so I doubt posting it was a good idea
@Danack lol, at the moment? Just the undefined classes, cause I turned them from FQNs into unqualifieds without the uses.
@AlmaDo Its been posted before without issue. But...
@iroegbu Yea, read that before. PITA with generics cause you can only use the new() constraint.
But then again, constructors don't belong in the interface; use an interfaced factory.
17:40
@iroegbu Horrible.....constructors aren't/shouldn't be part of the class hierarchy.....and "To be able to Update (check for edge of screen etc) and draw itself it will always need a GraphicsDeviceManager" No....that means that you could never make mock version of the interface for testing.
Which completely defeats the purpose of using an interface.
Because the contract binds you to provide a certain behaviour. How interfaces are used implies extracting common behaviours, and that is not dependent on state (which would then be an implementation detail). — Cornelius Nov 15 '12 at 13:58
@web2students.com il give it a try, thanks.
Well said
@iroegbu I actually think it's slightly unfortunate that __construct looks like it isn't a static function as it limits people's thinking - verraes.net/2014/06/named-constructors-in-php
17:59
how do i store music in my database?
delimiter #
create procedure ins()
begin

  start transaction;
  while  1 <= (SELECT MIN(`SI_Ins_NO`) FROM `student_installment` WHERE RG_Reg_No = 'PAN/A-000001' AND `SI_Ins_Amount` != `SI_Paid_Amount`)

  end while;
  commit;
end #

delimiter ;
can i use such a condition in while loop ?
@danack best build provider around entity
Constructor overloading is be excellent. But we can do without it easily. Just a few more lines
and if i am streaming the music from the database, what security issues should concern me?
@ircmaxell could you help me with that sql ?
18:10
no
:D
so i guess i should be concerned with nothing
18:34
morning
@DanLugg :)
@NikiC awesomeness
@ircmaxell massively repeat offender, I don't have many tiny avatars
evening @all
@DaveRandom Yeah, I know. I just ignored that.
18:44
@hakre thanks again for taking the time to point me in the right direction! Those links were incredibly helpful
^ this is the kind of thing we want to see more of
Also you have an awesome name @radleybobins
hehe thanks
:-P
@ircmaxell are you phpnwing this year? :-D
19:02
@Gordon if you are about can you clean up the comment thread here to just the stuff that's actually relevant to the question?
Guys, may I ask those of you who have a profile on askubuntu to make an upvote on my question? askubuntu.com/q/486448/228535 if that's appropriate, of course
@SergeyTelshevsky it's pretty rare that you'll find a fibre modem that doesn't bind to a specific mac, does your nic support MAC emulation?
ow wait, is that win screenshot from the same hw?
@DaveRandom I doubt, but yes, the screenshot is the same hardware and everything else
so MAC is the same..
right that's pretty unlikely to be the answer then
I take it dhcpcd is working and configured to work with that nic?
well, on Windows it resolved automatically at once the when the OS was installed
19:11
@NikiC ah, finally…
@SergeyTelshevsky ps aux | grep dhcpcd plz
@DaveRandom I will try what @meccool suggested, manually setting up IP, but I doubt ubuntu is so dumb it couldn't handle it while windows did
@DaveRandom one min, restarting to kubuntu
@SergeyTelshevsky That's something of a last resort for a final fix, but it would be interesting to see whether it works (could be a driver issue maybe?)
@DaveRandom nothing :(

vlakarados@vlakarados-kubi:~$ ps aux | grep dhcpd
vlakara+ 2592 0.0 0.0 11852 936 pts/2 S+ 22:16 0:00 grep --color=auto dhcpd
@DaveRandom well, I tried installing all that the system suggested as well, but it didn't help
@SergeyTelshevsky dhcpcd (extra c)
looking for the client daemon, not the server
19:18
@DaveRandom oops, no, still nothing
interesting
Yet your wireless nic acquires an IP address via DHCP?
Or did you hard set it?
@DaveRandom no, did acquire via DHCP, but the wifi connects to the router, which is connected to the fiber modem
@SergeyTelshevsky so what are you trying to do sorry? connect the modem directly to the nic instead of going through the router?
@DaveRandom this is really, really stupid, but I tried connecting to the router via cable. It works. Gotta post this info
@SergeyTelshevsky well yes, it will
19:26
oh no, it does not, connection disappears after ~15secs
it's a mac binding problem
Why would you want to connect the modem directly to the machine?
That's a really bad idea as a general rule
Well, there are two reasons 1) wifi router is really bad, will change it in the meantime 2) I want my laptop to be able to connect on my work, where only ethernet is available
But I can't understand, why does it work on windows without problems
do i store the uploaded music file as blob?
@SergeyTelshevsky Neither of those are good reasons
There is literally no reason why you would need to connect your workstation directly to the unfiltered internet to accomplish any of those things
Even if you want no-NAT, you still use a router...
You are exposing your computer to all sorts of network nasties by doing that
And moreover, you are probably advertising your presence to anyone else on the same segment of the ISPs network as you
Still, this does open up a new possibility: It's possible that your ISP is giving you an IPv6 address and the *nix driver for your nic only supports IPv4
Like I say though, I'd be surprised if this isn't a MAC binding issue...
>By default, all methods of the given class are replaced with a test double that just returns NULL unless a return value is configured using will($this->returnValue()), for instance.

>When the second (optional) parameter is provided, only the methods whose names are in the array are replaced with a configurable test double. The behavior of the other methods is not changed. Providing NULL as the parameter means that no methods will be replaced.
Well, that was obvious and certainly didn't take an hour to figure out.
19:37
@shortCircuit No. What you do is store it on disk. Binary data rarely belongs in the database, and I'm 99.9999999% you do not have one of the legitimate cases...
@DaveRandom I agree about the security, but I simply want to make it work here, so I can be sure it works in the office
Evening gents/ladies
@DaveRandom but how can this be related to MAC address if it's the same on win/linux? Do you think it will help if I'll set it up as it is seen on the win screenshot?
@DaveRandom Database is on disk ;) Unless you have one of those fancy pancy I don't give a fuck about my data memory engines :P
@PeeHaa trololololol :-P
@SergeyTelshevsky The win thing makes it interesting, but it doesn't make the problem at hand any more relevant. You are suffering from the XY problem here - what is it that doesn't work if you try and connect through the router?
Forget about the wired NIC for the minute, why doesn't it work over wifi?
19:41
yeah I might have been drinking again... sorry for that :)
@DaveRandom wait, it does work over wifi
@Rijnhardt There are none of either of those here, this room is exclusively for gypsies, tramps, theives, Cher and general ne'er-do-wells
@SergeyTelshevsky You said you needed to connect to your office or something. Why doesn't that work over wifi?
@DaveRandom don't look at what that guy's saying about the whole 'ramp' thing, he misunderstood and thinks the fiber modem has a wifi and what not
oh
Address the high level problem here...
also evening @Rijnhardt :-P
@DaveRandom at my work, we have public network available through wifi while the development/stage servers and all other stuff is available through the lan only, it's not my fault :)
19:45
@SergeyTelshevsky Right, so you are trying to connect to that LAN (presumably via VPN?) - what's the high-level end result you want here?
Because I promise you, plugging you machine into the internet directly is not the way to do it
And if it is the way to do it, someone in your company's IT department needs to be not only fired, but face a firing squad
(just so you know, before I was a developer I was a network architect/engineer)
@DaveRandom I just want to be sure it's related to the situation with that fiber modem, not my NIC and, again, I completely agree about connecting directly is really bad
@DaveRandom I understood that when you decided to help :)
@SergeyTelshevsky OK, fine, what led you to trying this then? What did you actually try to do that didn't work over the working wifi connection?
I'm guessing a VPN
lol what an internet idiot
41
Q: What do you do when someone calls you personally about an answer?

rayIt's after midnight and I'm unwinding, trying to finish off a nice concoction of Bailey's and Kahlua on the rocks (long day). I get a phone call from a number I don't recognize, but what the heck, I'm buzzing and answer it anyway. A guy asks if it's me and I confirm. He then, without introduc...

If that's the case my money is on an ALG on the router
@DaveRandom what is ALG?
19:49
if you have an ALG on your router, turn it off - they generally cause a lot more problems than they solve
@SergeyTelshevsky Application-layer gateway
It's basically a bit of software on the router that tries to be clever to make application layer protocols pass through the router
In theory it's a great idea, in practice it usually isn't because the people who implement them often use incomplete or just plain wrong implementations
It's usually implemented as little more than "intelligent" (read: incorrect) port triggering
@DaveRandom, Evening.. Noted. Thanks
It's usually something that accompanies a rubbish SPI firewall
@DaveRandom that's not something I can tell you, I simply talked to the helpdesk guys and they said there's no way inside via wifi or from outside while you don't have some permission
@DaveRandom stop, one second
@SergeyTelshevsky OK... did they provide you with some piece of special software to connect?
@Rijnhardt I don't think Cher is here at the moment
She's off believing in love after love somewhere
My gf has gone to see Dolly Parton tonight, I've been subjected to awful music all day
@DaveRandom currently the problem I try to solve is to be able to connect without my router (which is half-dead and constantly disconnects), despite it being bad, If I turn ALG on my router off I won't be able to connect even through the router
@DaveRandom about vpn - no, we don't have it while working locally
19:55
@SergeyTelshevsky Yeh but I need to understand how you are trying to connect at a higher level. Forget about the router and network interfaces. Imagine you sit down at some brand new computer with a fully working internet connection. What do you have to do to connect?
Well you wouldn't have a VPN locally, that would make no sense
So, I have this problem... http://stackoverflow.com/questions/24342773/sqlserv-and-php-not-working-cannot-create-a-connection-to-the-database

Any ideas?
The whole point here is that you are trying to work remotely...
@Rijnhardt It looks like you simply are providing incorrect credentials
Man. Power nap made me feel like power crap.
> Login failed for user 'sa'
19:58
@DaveRandom no, I want to be sure my NIC works, and be sure this issue is related to the fiber modem, not my NIC
@PeeHaa, I tried those exact same credentials on Management Studio, they work
@Fabien, tends to happen if you do not sleep in cycles of 90 minutes...
I have no idea what "Management Studio" is, but when I see a message like that I check and fix the credentials I pass
Is the Management Studio thing on the same machine as that is running the php file?

« first day (1344 days earlier)      last day (3830 days later) »