I'm stuck with a regular expression. I currently have the following:
(\<div class\="m".*?\<div class\="b")
I need to capture anything between those two divs except other ending divs (lazy match, which is why I did .*?)
Pattern: <div class="m" ... <div class="b"
Content: <div c...
people keep commenting with "it's good but it doesn't cover this sentence". By the end of my edits I hope this answer will be the single place to got for all questions about the entire English language.
@ircmaxell oh, fun! I'll hop into the fray in a moment
I'm looking for a SE/SO site where people can help me name things (classes, methods). Anything like that exist? I realize it's subjective, but I've literally spent hours of my life trying to name things adequately.
@Josh, I've got a panel with some widgets. I want to cut it in half to reuse it for another panel. The widgets don't have much in common, essentially the new panel has half the functionality as the existing one. I can call it TopPanel and move on with my life, but I hate coming across a package of classes like that.
This is now possible.
We (sort of) still require a @reply to have at least three characters, and still stop matching on whitespace, but we now accept "nothing" as the third character, meaning "word boundary". So the comment
Thanks @Jo, that helped!
will cause a notification to the user "Jo...
Hi all, sorry if the title is abit vague as i didnt know how else to put it. I am currently working on a framework and have come accros a snag... how should I handle incorrect parameter types when someone calls a function in the framework?
Example:
// Title is expected to be string, comment_num...
sorry, i couldn't stand it. Looks like you couldnt aswel
@ircmaxell for my company's PHP framework system, we started using trigger_error. We found that switching to using Exceptions and building our own logging system was far more powerful, easier to write, debug, and test.
So you wind up with a C style error checking rather than flow controlled error checking
that's not saying you shouldn't ever return error status variables, but not for exceptional circumstances (like passing the wrong thing to a method, or not being able to open a file)
We started with a global error handler which caught the warnings and printed an "Sorry, an error may have occurred when processing your request" message to the user, and generated an email to us. PAIN IN THE ASS
Now we throw exceptions if necessary and log to syslog
now, the system is still not fully exception based since some of the core and the CMS still uses trigger_error, but, I want to do a from the ground up rewrite for v2.0
Yum thanks. Who said this bar doesn't serve drinks?
Funny, my question on "Is everyone in favor of the new 'everyone can edit' idea?" is by far my highest scoring question or answer on any of the SE sites, LOL
I downloaded ndk and then uncompressed it. How to change to that directory in linux?
This is my directory: /home/embdes/projects/android1/android-ndk-r5/
When I enter that into the terminal I get: android-ndk-r5: is a directory
How do I use the android NDK in eclipse?
No I'm with you, my fault. I was thinking Which means he should not be developing LOL on Linux and I'm thinking it doesn't make sense to laugh mid-sentance
The only type that I could see being different is something like:
$foo = 1;
$bar = 1;
($foo = $foo + $bar) == ($bar = $foo);
To see why, look at it
A -> ($foo = $foo + $bar)
B -> ($bar = $foo);
If A is run first, the result will be 2 and the result of B will be 2, so they are equal a...
I'd put this function onto the String object directly. Instead of creating an array, filling it, and joining it with an empty char, just create an array of the proper length, and join it with your desired string. Same result, less process!
String.prototype.repeat = function( num )
{
return...
What about:
function(n) {
var result = "";
var part = 0;
while (n > 0) {
part = n > 10 ? 10 : n;
result += " ".substring(0, part);
n -= part;
}
return result;
}
@TimStone Stock. 2.67GHz. I've got the setup to overclock, but when I built it I just wanted it up and running and have never done anything with that lol.
In the SO moderator nominations, two candidates withdrew their entries after it was revealed that they had been caught using sock puppets with many cross-votes in the past (with the number of fraudulent votes in the hundreds in one case, in the thousands in the other).
Although I was personally ...
Well, here's another installment of our weekly code-bowling game. As a refresher:
Code-Bowling is a challenge for writing the most obscure, unoptimized, horrific and bastardized code possible. Basically, the exact opposite of Code-Golf.
The Challenge:
Create a program using the langauge o...
I recently answered a question and found out the next day that it had vanished. I suspect it was migrated but I don't want to go randomly opening 10 accounts in the hope that I might find my answer.
Feature Request: A cross-site list(maybe a page on SE.com?) that shows all of the logged-in user...
If I ever step down as the CEO of a multi-billion-dollar company, I hope the media will find a better photo of me... http://www.businessinsider.com/eric-scmidt-out-as-google-ceo-2011-1
You know @Benjol I could actually scrape data from chat site profiles, using YQL. That would still be 30 HTTP request from SO's end, but for us it would only be a single jsonp request to Yahoo
Building on my previous question, and more importantly on Yi's most excellent implementation, the feature request is simply that something like this should be implemented into SE for future elections.
I've made a feature request out of this
I found myself doing lots of clicking through to profiles to try and compare nominees with (what I consider to be) useful/interesting information.
I've cobbled together an Excel file with some metrics, may help you with your decision, and possible inspire...
ok fair enough. I'm orthodox Jewish so I won't be online from in about 3-4 hours until the following evening. I guess if you are doing that, I don't mind waiting until next week.