« first day (1473 days earlier)      last day (3489 days later) » 

1:01 PM
also, finding longest continuous segment of same digit is a linear task
 
ok so what should be the alternate way i go with. Run a loop and check each characters for pattern ?
 
@Sajal probably the best course.
 
@Sajal .. so, lets sum this up: you have no idea how to do even a basic regexp, but you still insist on using a regexp for something that woulod not need a regexp
why ?
 
yes i don't know whether its even possible with regex but i know pattern matching can be done with regex so i was trying it. This is my need -
4 digits in a row like 1111 or 2222 or 3333 and so on
4 digits counting like 1234 or 5678 and so on
can it be done with regex? u guys know better, u can tell.
 
no, it cannot be done with a sane regexp
 
1:07 PM
regex is never sane
 
make a loop, increment a counter if current digit is same as previous, else - reset the counter
we will NOT write your homework
 
@tereško even i would not want the direct solution. I more i do myself the more i learn. I just needed a hint and now i get that. Thanks :)
 
also, when counter reaches the expected limit, you can stop .. the rest of string becomes irrelevant
 
Much easier than regexing
 
@Psychemaster I would partially do it in regex, maybe...
 
1:11 PM
@tereško with this approach i will do it anyhow :) din't had confidence with regex as i din't knew it.
 
Again, you could do it in one regex. But I guess the maintainer will get some heart-attack from a few lines of regex...
 
@HamZa Sure whatever floats your teaset, just regex isn't a cure-all solution for everything :D
 
thanks guys.
 
I really doubt anybody in here had to dick around with offlineimap before, but in case somebody did:
0
Q: Migrating mail to a new server using OfflineIMAP

PeeHaaI am trying to migrate mails from a server to a new server using OfflineIMAP. My config looks like: [general] accounts = TestAccount ui = noninteractive.Basic [Account TestAccount] localrepository = TestAccountSource remoterepository = TestAccountDestination maxsyncaccounts = 3 maxconnections ...

 
tried looking for help in FreeNode already ?
 
1:13 PM
No I did not. Would that be useful?
If yes? Where? :)
 
@PeeHaa I actually do use it :)
with mu
 
@PeeHaa I probably would go to the distro-specific room or ##gentoo
 
@FlorianMargaine What's mu?
multi user?
 
a mail indexer
 
ancient MMORPG =P
 
1:15 PM
@tereško tnx will try if @FlorianMargaine fails on me
 
@FlorianMargaine The problem for me is that the .foo directories are not being copied to the new machine. Any idea how to fix that?
@FlorianMargaine Where is the .exe? :P
 
no idea, only used it on linux
 
Any idea on my issue?
 
1:17 PM
>asks for an .exe in response to a question on Unix/Linux
What is this madness
 
lol
 
@Psychemaster I have been running winamp using wine-linux via fedora emulator on freebsd 6.0
the stuff you can come up with when in need
 
I can't imagine what planet you're on that you desperately need access to Winamp that badly.
 
@PeeHaa weird issue you have there
 
inorite
 
1:21 PM
@Psychemaster I actually do not recall which exe file i was trying to run back then
 
I am totally clueless how to fix this :(
a.k.a. what I am doing wrong
 
why is your local repository a remote one?
I've never worked with offlineimap in such a way...
 
No idea. I think I found an example like that on the intarwebs
 
you have a maildir on your old server?
if yes, use something like this:
 
Yes I think so
 
1:23 PM
[Repository TestAccountSource]
type = Maildir
localfolders = ~/Maildir
^
 
@FlorianMargaine Does it have to be ~/Maildir? Or can it also be /var/mail/vhosts/exmaple.com/account?
 
@PeeHaa it has to be the maildir
 
How does it know what account to sync?
 
because a maildir is only a single account
unless I don't understand your question
 
ah right. yeah. That would be /var/mail/vhosts/exmaple.com/account
 
1:26 PM
@tereško @HamZa Yeah it does. I got it ready to watch. Apparently some versions out there are more censored than others, so make sure you pick the right one for you.
 
exmaple.com. There you go.
 
IMAP -> Maildir ??? defuck is wrong with that thing :P
 
errr
should go the other way too :P
 
Let me recheck whether I am using maildir
hmmm I think it is running using mbox instead (if that is a thing)
 
ah
yeah, it's a thing
all the mails in a single file
 
1:31 PM
no :P
Is that what mbox does?
file per mail I have
 
oh?
honestly...
I'd do remote imap (old serv) -> local maildir (old serv) -> remote imap (new serv)
or you can wait for someone more expert than me
 
I am afraid you are the only thing I got right now ;)
 
that's sad
 
user895378
morning
 
send a mail to offlineimap's ML
the remote/remote shouldn't ignore your dot folders...
@rdlowrey moin
 
1:35 PM
@FlorianMargaine :P
@rdlowrey morning
 
1:45 PM
tnx @FlorianMargaine
 
?
why? I didn't help you :/
 
Time is precious :)
 
i have a php application in yii
i am running it on my localhost
its giving 500 internal server error
i have checked the paths of yii framework in index.php
 
check your error log
 
1:46 PM
any solution?
can u tell me where is the error log
 
yes. I just gave it
 
?
@PeeHaa , can u please tell me where is the error log
 
No
 
Good morning
 
1:48 PM
mornin'
 
137
Q: How to get useful error messages in PHP?

CandidasaI find programming in PHP quite frustrating. Quite often I will try and run the script and just get a blank screen back. No error message, just empty screen. The cause might have been a simple syntax error (wrong bracket, missing semicolon), or a failed function call, or something else entirely. ...

@ircmaxell morgen
 
the location of log files depends on you setup and oiperating system
 
what's the good word?
 
@ircmaxell bemby
.. oh , wait , that was the safety word
 
lol
 
1:50 PM
@PeeHaa , ini_set('display_errors', 1);
maybe this helps
 
user895378
> The trouble with ignorance is that it feels so much like expertise.
7
 
user895378
^ lol
 
user895378
@ircmaxell mornin'
 
yesterday, by Danack
 
1:53 PM
@Danack at least they are selling them :-X
 
any yii expert here
?
 
Not so much....they're sales are tanking allegedly - both being undercut but cheaper android phones, and the larger iphones are taking away their sales at the high end....they've never had so much stock sitting around before.
 
Ma, someone is wrong on the internet reddit.com/r/PHP/comments/2kk4v2/…
 
@Patrick it looks like he heard the right thing, but did not stick around to listen for reasons
the name of interface should illustrate the capabilities
 
2:01 PM
I'm a fan of the -able interface naming personally
 
public function print(Printable $document)
 
@FlorianMargaine As long as you don't force your names to be like that
 
user895378
/r/php is the dumbest collection of coders I've ever encountered.
6
 
user895378
Talk about Dunning-Kruger ...
 
2:03 PM
@PeeHaa ?
@ircmaxell which makes me wonder: why did you leave internals?
 
@FlorianMargaine (Request $request) How would you name this? Requestable?
 
@Patrick Request is an interface?
 
I think it is a common thread with dracony: he only stays long enough to hear about something, but not long enough to actually understand the subject
 
@FlorianMargaine I can get a large amount more done without participating there than I ever have before
 
but you don't get anything done in php-src
 
2:06 PM
@FlorianMargaine This is why I am asking... github.com/PatrickLouys/http/blob/master/src/Request.php :)
 
@Patrick what methods does the contract identify ?
 
@Patrick it should be a concrete class imho
 
oh ... you have a lot of them
those should be several separate interfaces
also, I get a feeling that you have way too many methods there (then again, making Request class IS kinda tricky)
 
I tried to keep it simple by just wrapping the superglobals, but I see how that resulted in a lot of methods...
 
hi everybody...
Guys am stuck with the following code...... Help would be appreciated.... thanks
$classname="";
$i=0;
foreach($rows as $row){
if ( $i % 2 == 0) {
$classname = "bg";
} else {
$classname = "";
}
$i++;
}
If statement can't seems to be working....
 
2:12 PM
@tereško Are some of your packages production ready by the way? I don't mind using a better package than my own, but the alternatives out there that I know of look rather grim (symfony...)
 
@Patrick whether it is production-ready, I cannot tell, but I am using it in a project which will soon go live and I have not had to make any update to it in past month or so .. github.com/fracture/http/blob/master/src/Fracture/Http/…
also, Scrutinizer is down
 
1 message moved to bin
 
;)
 
Hello
i have a question concerning mysql pdo
 
@ircmaxell maybe you could consider a future post about how and when to properly use interfaces? unless you have one already that I happened to miss :)
 
2:21 PM
public function execute(){
return $this->stmt->execute();
}
$this->Query_ID = $this->execute();
when try to call the fetch on my resource like this $this->Query_ID->fetch(PDO::FETCH_BOTH)
i get this error
Call to a member function fetch() on a non-object in
can anyone help ? please
 
@Joseph Have you tried googling that error?
 
i did
 
And did you read any of the top 5 errors?
 
i did
:s
my resource exists
i checked for === false
 
2
A: PDO Fatal error: Call to a member function fetch() on a non-object in... file

cillosisThe PDOStatement::execute() method returns true on success or false on failure -- not the result of the query. You need to return your statement instead: public function displayInfo() { $stmt = $this->dbh->prepare("SELECT fname, lname FROM info"); $stmt->execute(); return $stmt; } ...

> The PDOStatement::execute() method returns true on success or false on failure -- not the result of the query.
 
2:26 PM
NO YOU ARE WRONG it returns true or false in case of insert update
in case of select it DOES return the result set
and false if no results
 
php.net/manual/en/pdostatement.execute.php "Returns TRUE on success or FALSE on failure."
 
lol, capslock is cruise control for not getting help.
 
127.0.0.1 - - [28/Oct/2014:19:57:26 +0530] "GET /stylish HTTP/1.1" 500 530
this is the apache error
can anybody tell me what that means
i copied it from the log
 
user895378
@Danack Ah, I finally found the source of the new connection problem -- stupid logic error on my part. Should be able to push/tag in the next hour or two.
 
\o/
/o\
\o/
 
user895378
2:33 PM
And the bastion script runs wayyyyy faster now that it reuses connections lol :)
 
@BhawinParkeria Your request "GET /stylish HTTP/1.1" returned a 500 response code with a body 530 bytes in size
 
@cspray , yes and its a 500 internal server , but i dont know why its occuring
i am runing a yii application
 
@BhawinParkeria And neither do we. You'd have to look at your application's log file or otherwise debug the code that processes that request.
 
@rdlowrey Oh I should have said - don't be surprised if it starts falling over/giving errors after several runs....Github limit you to 5000 requests per hour even when signed. Artax seems capable of reaching that limit rather quickly.
 
@cspray , the application log file is empty , its not writing any log
 
user895378
2:36 PM
@Danack Well, I actually ran into Fatal error: Allowed memory size of 134217728 bytes exhausted first ... I'm thinking that instead of queuing requests indefinitely that artax should start rejecting new requests with a TooBusyException instead of storing them indefinitely.
 
plus its not showing any error , just a text 500 internal server error
 
user895378
That way you know to throttle your concurrent requests a bit.
 
@JoeWatkins at this point I start to think it would have been better if you named phpdbg something else back then, then you could have kept off from php-src if you wanted to keep the lead/rights for the decisions.
 
2:37 PM
wish we could have some better system for distributing SAPIs
without bundling them
 
@BhawinParkeria Sounds like you need to implement some better logging. If you're realistically expecting somebody in this chat to magically know what's wrong with your code based on "500 Internal Server Error" you're going to be very disappointed.
 
@cspray , thnx a lot
nice suggestion , u r right
 
@JoeWatkins lol @ company name
also, I would actually say that for established companies, this should be true
 
@Tyrael that would be good ... it would also be good if everyone could just be sensible ...
 
@rdlowrey Yes, there should definitely a hard limit on the number of queued requests - however, I'm slightly surprised you're hitting any memory limit. The actual files being downloaded aren't that large, and there's only 4 connections at once, then even with a memory limit of 128MB then it's slightly odd to hit it.
I guess it's possible you just got 'unlucky' downloading 4 16MB files at once, and they all complete at the same time, duplicating the memory being used when the app writes the files.
 
user895378
2:40 PM
@Danack well I have the limit on 8, so that may affect it as well
 
ah, k. I'll investigate after you push.
 
@tereško it is just as sexist as me saying "when men lead, companies do better" ... no company should have any policy that cares about the sex of their employees whatever is a much more sensible thing to say ...
 
@Tyrael git submodules?
 
@FlorianMargaine e.g. Decoder
 
@tereško I'm glad I'm not the only one that chuckled at that
 
2:42 PM
@PeeHaa Decodable is perfectly fine, isn't it?
 
@JoeWatkins no, actually males have a tendency to make more risks. It's good for a startups but bad for established companies.
 
@FlorianMargaine HELL NO. And also it doesn't solve the problem of sapis need to be compiled into PHP.
 
@FlorianMargaine No it isn't
 
@tereško that's exactly the kind of generalization the poster is rebelling against ... it doesn't solve anything to do that ...
 
A decoder is not decodable
 
2:42 PM
@PeeHaa why? your object is decodable, isn't it?
oh, my bad
 
The object the Decoder "consumes" is Decodable
 
Decodarizingable
 
Also Decodable sucks
the word
:P
 
yeah... I can't see a correct interface name
that said, I don't like Decoder either
imho it should be a concrete class
naming things is hard...
 
BTW @FlorianMargaine I just downloaded the latest version from github of offlineimap and shit seems to work now
 
2:44 PM
@JoeWatkins generalization is what that poster does.
 
@PeeHaa oh, cool
 
Decoder DecoderSubject
 
@PeeHaa no, Decoder should consume something that implements Encoded
 
^
 
@tereško hmmm
Not sure about that one
 
2:46 PM
 
Decoderizificationizering
 
Yeah I guess that also work for ISP yeah in this case
 
@Tyrael too late now, the project is lost to the madness ... destined to go stale like everything else in /sapi ...
 
user895378
@JoeWatkins So, should I not bother with phpdbg-websocket then?
 
nope
 
2:49 PM
@JoeWatkins we're having a really good discussion about it in #php.pecl
 
phpdbg is under php.net ; every decision about phpdbg should then be
debatted with all the team, and new ideas, such as a protocol, RFC'ed,
whoever are the maintainers of the code. It's like that for every
piece of code, of every extension.
This is PHP process. If you dont want to adhere the rules, you can
keep your ideas yours, in a separate repo, like Derick does for
Xdebug.
People must understand that as soon as the code is part of the PHP
project, it is owned by the PHP project, and not a single/duo person
 
10:34 <ircmaxell> jpauli: not true, FPM was an external project as well, with its own website: php-fpm.org
10:35 <jpauli> ircmaxell: ah yes, you are right , what was the status / consensus then ?
10:36 <ircmaxell> I don't think anyone ever raised an issue
10:36 <ircmaxell> I think the line is not that there's external dev, but *how* much involvement should internals have with it. Does every change need an RFC? Or only major ones? I don't know
10:36 <jpauli> from what I remember, developpers gave the code to php , much more like its been done for phpdbg anyway
 
@Danack did u even bother to look at the code i pasted :s ?
@Danack
public function execute(){
return $this->stmt->execute();
}
my personalized execute returns a statement
 
@Joseph you are being a moron today:
PDOStatement::execute - Returns TRUE on success or FALSE on failure.
$this->Query_ID = $this->stmt->execute();
$this->Query_ID->fetch(PDO::FETCH_BOTH)
 
i'm not i am just trying to sort my shit out :( , apologies if you think i am
@Danack apologies
 
2:55 PM
you should learn to read and trust error message - even if you think they're impossible, they usually reflect reality.
 
@Danack mate that's exactly my point
$this->Query_ID = $this->stmt->execute();
$this->Query_ID->fetch(PDO::FETCH_BOTH)
$this->Query_ID->fetch(PDO::FETCH_BOTH) is giving this Call to a member function fetch()
 
What do you think the value of $this->Query_ID is given that "PDOStatement::execute - Returns TRUE on success or FALSE on failure."
 
$this->pdo->execute();
$result = $this->pdo->fetch();

read the docs and what Danack wrote... -.-"
 

« first day (1473 days earlier)      last day (3489 days later) »