« first day (1123 days earlier)      last day (3826 days later) » 

4:02 PM
@KendallFrey why is that naked women spread eagle on the second result?
what?!
 
@rlemon huehuehue you fell for it
 
Hi Everyone, I have over 1000 given regular expression patterns, that need to be run on the same 100 - 200 kb text files and return list of success patterns. File come from outside, so I can't do any assumption about that file. What is better to call IsMatch for each regex, or try to concatenate all patterns and call one match?
are there any good practices on this kind of problems?
 
@ArsenMkrt Probably one at a time.
 
had to reboot and plug in a different keyboard =/
just got used to the other one too sigh.
 
4:05 PM
good practice: profile/time it ;)
 
@codebrain - I saw lucene and it was suggested, however, I am not sure I need predictive text nor that it can solve searching deeply nested relations as they stand.
@JLott - Mornin :)
 
@KendallFrey but how can I different patterns, do you mean to create groups like (<?pattern1>pattern1)|....
 
Sometimes I wish I was just doing something simple for entertainment and not business related
 
^
 
@ArsenMkrt ?
 
4:07 PM
@KendallFrey I mean, how can I extract which patterns success.. multiple patterns can success at once
 
@ton.yeung Not a fan of MMOs
 
@KendallFrey I have patterns as a string array, and need a list of succesed patterns
 
@ArsenMkrt You can determine that based on each regex's success or failure
 
I love MMOs because I enjoy the competition. Just don't have time for games anymore.
 
@KendallFrey you just suggest me to create one big regex, so I don't have regex array, I have one regex with a lot of patterns joined to each other right?
 
4:11 PM
@ArsenMkrt no
 
@KendallFrey than please explain your version in mode details... I have string regex pattern array, how can I run this patterns at once?
 
@ton.yeung But those 2D treadmills are better.
@ArsenMkrt Why would you want to run them all at once?
 
@KendallFrey because the text is the same... I am thinking of fastest way.. I think running 1500 regexes to the same string is slow... and would be great if later regexes can use information that use first ones about the text
 
@ArsenMkrt Running a ginormous regex won't be any faster
 
@ArsenMkrt, don't assume, time it, IMHO!
 
4:16 PM
@ton.yeung The ones that let you walk infinitely in any direction
 
run the individual compile+match in parallel
 
@KendallFrey regex built automate right? so if I use one pattern, it will have more information which patterns are valid/not valid for the next symbol...
@radical right, I will check it...
 
posted on November 12, 2013 by Eric Lippert

Here's an interesting question: what is the behavior of this infinite sequence? WOLOG let's make the simplifying assumption that x and m are greater than zero and that x is smaller than m. static IEnumerable Sequence(Integer x, Integer m) { … Continue reading →

 
but in general, i agree with what @KendallFrey said.
 
@ton.yeung Can't find what I originally saw, but CyberWalk is similar
 
4:20 PM
hey there!
 
Any way I can improve this where clause? I used a simple list of ints to screen the primary key of the projection of a grand child
var list = Enumerable.Range(0,12).ToArray();
query = query.Where(q => list.Any( m => q.TC.Select(tc => tc.T.MId).Contains(m) ));
 
@KendallFrey Virtuix Omni? youtube.com/watch?v=qpHWJMytx5I
 
@Mike No, that's a little different.
@TravisJ Select.Contains could become Any
So, you're selecting all q where q.TC contains at least one of the numbers in the list?
Perhaps an Intersect?
 
@Kendall - Since I am not using a HashSet, Contains and Any will both be O(n)
 
4:34 PM
I am selecting all q where q.TC.MId is one of the numbers in the list yeah
But TC is a collection
 
I think Intersect might be O(n + m), but Any/Any could be O(n * m)
 
@TravisJ is list always (0,12)?
 
var list = GetArbitraryArrayOfInts();
var hashSet = new HashSet<int>(list);
query = query.Where(q => q.TC.Any(tc => hashSet.Contains(tc.T.MId) ) );
?
 
I mean [0...n] interval?
 
@Mike winner
 
4:37 PM
@ArsenMkrt - No that is just an example. It is an array of ints.
@Mike - That was actually what I wrote just a second ago too :)
Not sure that using any projections in the Where clause can get past not timing out though :( which is where this test is coming from
sweet, that worked
 
@TravisJ than Mike is right, also you can try to use join
 
It is already eager loading the projected records
Now I just have to nest a bunch of async calls :)
And then unwind them all at the same time
 
 
1 hour later…
5:43 PM
> Google patent: THROAT TATTOO with lie-detecting mobe microphone built-in
 
@Pheonixblade9 Any idiot knows you speak with your tongue and lips, not your throat.
 
@KendallFrey Then why do US Navy Seals use microphones on the throat instead of infront of your mouth?
 
link?
 
It just doesn't seem feasible to detect consonantal sounds from the throat
 
5:48 PM
A throat microphone, also laryngophone, is a type of contact microphone that absorbs vibrations directly from the wearer's throat by way of single or dual sensors, often called "transducer," worn against the neck. The throat microphone's design has several advantages. The transducer can pick up speech even in extremely noisy or windy environments, such as on a motorcycle or in a night club, whereas other types of microphones do not function well under those conditions because of high levels of background noise. More advanced throat microphones are also able to pick up whispers, and ther...
 
I'd expect the need for lots of filtering. Surely the larynx would overpower anything else
 
Is this a bad way to test if a database exist remotely from a server?
        using(SqlConnection connectionForSQL = new SqlConnection(@"Server=localhost; Integrated Security=SSPI; Database=master"))
        {
            string verifyQuery = string.Format("SELECT database_id FROM sys.databases WHERE NAME = '{0}'", dbName);
            using(SqlCommand verifySqlCommand = new SqlCommand(verifyQuery, connectionForSQL))
            {
                connectionForSQL.Open();
                int databaseId = (int)verifySqlCommand.ExecuteScalar();
                return databaseId > 0;
Because the Stack gives me the following message;
   at Framework.Core.SQL.InitializeSQL.IsDatabaseInExistence(String dbName) in e:\Main Street Software\Framework\Core\SQL\InitializeSQL.cs:line 58
   at Framework.Core.SQL.InitializeSQL.ConfigureSQL(ServerProfile server, CustomerProfile customer) in e:\Main Street Software\Framework\Core\SQL\InitializeSQL.cs:line 32
   at Service_Layer.CustomerRegistration.DeployCMS(CustomerProfile customer) in e:\Main Street Software\Service Layer\CustomerRegistration.svc.cs:line 72
   at SyncInvokeDeployCMS(Object , Object[] , Object[] )
It mentions the E: which is on my local machine, not the server. Which the service should be running on.
 
what's the exception?
 
@Mike That is the error.
 
linq to sql doesn't like .ToLower(), any alternatives I can use?
 
5:55 PM
@TravisJ Can't you use the .ToLower() function that SQL has built into it?
@Mike I'm kind of at a lost.
 
@Greg - I tried m = > m.ToLower() and it fails
 
Maybe SELECT database_id will yield null for a scalar query if there's no match, and it's failing with NullReferenceException on attempting to convert it to int?
The "E:" just indicates what machine the code was compiled on
 
@Mike Wouldn't it simply return a 0 then?
@TravisJ Can you write a SQLCommand then use the built in conversion in SQL?
 
10
Q: Handling ExecuteScalar() when no results are returned

Hemant KothiyalI am using the following SQL query and the ExecuteScalar() method to fetch data from an Oracle database: sql = "select username from usermst where userid=2" string getusername = command.ExecuteScalar(); It is showing me this error message: System.NullReferenceException: Object reference not s...

 
@Greg - oh gawd no
 
5:57 PM
"If the first column of the first row in the result set is not found, a null reference (Nothing in Visual Basic) is returned. If the value in the database is null, the query returns DBNull.Value."
 
@Mike So maybe change the check to also verify it isn't DbNull? But that will then lead me to the next issue, I can physically see this database exists. Can it possibly not have permission to check?
 
@Greg Yeah possibly. Try connecting to the DB server manually using the same credentials if possible to test it out
@Greg Also: Make sure you're aware of the risks of using string.Format with SQL.
 
@Mike Which format are you speaking of?
 
string.Format("SELECT database_id FROM sys.databases WHERE NAME = '{0}'", dbName);
if dbName comes from any sort of user input, that code is dangerous
 
@Mike No, it comes from the code.
User has zero control of that class.
Or parameter.
 
6:05 PM
had to use any for the tolower to work
 
@TravisJ Really, that is weird.
 
at least it works :D
Kind of epic really
 
That is true, at least it works.
 
First 100 results, single string search, 900ms :D
Now I just have to make it work with every related table instead of just the one somehow
 
@ton.yeung those are all extremely generalized statements.
 
6:16 PM
argggggg
Refactoring is frustrating.
 
a more correct version would be "be careful with joins, as they can negatively affect your performance."
yeah, but you say them as ultimatums
 
@ton - This is why they are done at the same time :) doing them synchronously would be a disaster
 
well, the whole point of a relational database is to do JOINs, so I'm not sure that advice should be given.
If you were doing NoSQL DB design, you would be correct, joins are bad.
in relational DB design, joins can make performance worse, but the DB is designed to do joins. That's why it exists
2
so, if you must do a join, just try to do it on an indexed column.
if you're not doing joins, you should be using a doc storage/NoSQL database. The overhead of the relational DB is not worth it.
 
All joins should be done based on foreign relations
@ton - This one will ;)
 
@ton.yeung it really depends on how your DB is designed.
if it's all just data and you have to do a table scan every single time, yes, it will be bad. But if your data is properly indexed and partitioned, it can be highly efficient.
 
6:22 PM
Ugliest C# code I've seen in a long time...
0
Q: C# Developing .Net3.5 using reflection to get/set values to nested properties and/or nested fields

LorentzI'm developing an app that works with data block classes inheritied from a base class and I am trying to use Reflection to drill down to properties/fields in my data block class. Since all the data block classes are derived/inherited from the base class (which contains a Size property) I can use...

 
if what you're talking about is truly a graph, you should not be using relational databases to store it, you should be using one of the new fancy MapReduce style DBs
Well, we use a data warehouse to do reporting. It's ETL'd from the relational DB to the data warehouse a few times a day./
 
@TravisJ LINQ to SQL should support ToLower(), just not ToUpper()
 
@ReedCopsey eww
 
Yay, I learned something about our T4 file!
 
@Reed - It wasn't working in a Contains, I think because it was trying to do tolower to an enumerable? unsure, but using any and then str => str.tolower worked
 
6:25 PM
9 mins ago, by Spencer Ruport
Refactoring is frustrating.
@SpencerRuport Refactoring is fun. I've been doing it for the past few days.
 
I usually do refucktoring.
 
I refucked your... eesh...
 
Q to StackGods: what is the percentage of users who ask a question, but never mark an acceptable answer; and, should there be a ban on them for a period of time.
 
@Darek That belongs on meta
 
... and I already pissed the Gods of .. sheesh!
 
6:29 PM
@KendallFrey - It's just getting to the point where it's pretty obvious that nobody really knew the business rules when they were developing this.
Which means it's going to be really difficult to get answers.
 
Once bitten, twice shy
 
@KendallFrey I second that "ReFactoring is fun" especially with R#
 
@SpencerRuport sounds like you're in that situation where the real problem is deciding how much to throw away
 
@SpencerRuport throw it all out and start over
 
6:32 PM
i.e. didn't match the business rules then, because there weren't any; doesn't match the business rules now - bin.
 
@Darek - Not my decision to make.
I did clean up the Master page and the first page.
There's 10 total though.
It's an application wizard.
 
Not a program "application" like an online form wizard.
Right now each page has code that determines whether the session has expired.
>_<
 
Your search for 'i need help with searching a relational database' didn't match any Helpouts.
 
why is it that when i do 4&4 i get back 4. and 4&1 i get back 0. same with 4&2 untill 4. Anything greater than 4 = 4.
 
6:35 PM
LMFAO
 
@user1040131 - Look up binary comparisons.
 
Thank You!
 
@TravisJ - I finally have a working example of those multi-lingual HTML views I'm always ranting about.
 
@user1040131 Anything greater than 4 != 4 ... (4&8)==0, for example
 
@Spencer - You mean click on a flag, translate to a different language?
 
@user1040131 It's documented in the binary & operator: msdn.microsoft.com/en-us/library/vstudio/sbf85k1c.aspx
 
must discipline people to not put things mid-sprint...
 
@Spencer - Does it to it automatically or are the words pre-defined?
Do these "helpout" people really expect to get paid $60+ per hour?
I saw one that would be 95/hr
"Basic website walkthrough." I am going to quite my day job if that is the case lol
 
They're pre-defined. But the cool part is I can just email all the HTML views in English to some Spanish translator I find on Craig's List for example. They quote me a price and translate all the phrases and send it back.
Now I have a spanish site.
I can do that with every language.
 
lol
 
6:40 PM
@SpencerRuport depends on the subject matter
we tried that. Came back total garbage
 
Well the main point is that I don't have to give someone access to any code they wouldn't see anyway just by viewing the site.
 
the technology is a non-issue when it comes to translation. The problem is a human being on the other end with enough of a brain to do the job correctly
 
It's all nicely separated.
I still have to demonstrate how the server validation messages are handled though.
@TomW - The technology can be a huge issue if the language is too ingrained into the codebase.
@ton.yeung - This is all handled by HTML/javascript.
The back end is ASP.Net and there's a Python app as well.
HTML/jQuery
 
If the only thing that calls you is private, why should you be public? Just in case?
 
@kush In general, you shouldn't - unless you're exposing yourself as an API
 
6:46 PM
@ReedCopsey that's what I was thinking... Thanks :)
 
@ton.yeung - Angular only supports translating of literal strings. What if I want the Chinese website to look different than the English site?
 
build a different website?
 
Why build a different website? Why not just swap out the HTML?
 
@ton.yeung so you'd pull-right your company logo?
@ton.yeung sorry, Hebrew?
do you serve different languages based on what the browser demands or do you try to predict what the user wants based on geolocation?
 
@kush - Are you asking me?
 
6:51 PM
@ton.yeung see if you can get me ma.il for ten dollars
@SpencerRuport open question really. I started doing geolocation once and couldn't wrap my head around it :C
just served the language the browser asks
!wiki .il
 
it's about time...
unzips pants
 
@TomW As Kesha says, "stripping down to dirty socks"
 
:(
Well I thought it was pretty cool.
This just annoys me.
private IEnumerable<Contractor> Contractors
{
    get { return _contractors ?? ContractorLogic.GetContractorsByProgramIdForOnlineApp(ProgramId); }
}
_contractors isn't set anywhere.
 
yeah - was probably supposed to be
get { return _contractors ?? (_contractors = ContractorLogic.GetContractorsByProgramIdForOnlineApp(ProgramId)); }
but they forgot
 
Yeah the code is littered with that kind of forgetfulness.
 
7:00 PM
I hate that "pattern" in general, though - just compute it, or use Lazy<T> ;)
 
what does GetContractorsByProgramIdForOnlineApp do?
 
Pretty much what it says it does. ;)
 
@ton.yeung I think @rlemon brought the bot down...
 
User expects a friendly error when trying to save a document into isolated storage when isolated storage is almost full. Should I catch the error and show it or should I try to see how much space is left and try to calculate if it will fit?
 
bbl
 
7:04 PM
@kush Catching an error seems more simple.
 
don't blame me
 
12
A: Some issues with a recent action that was taken regarding the Root Access chat bot

balphaI suspended the bot because of the greeting, and only because of that, which is also what I told you in my chat message. Root Access is the general chat room for users of Super User, and any new user coming in being curious about the chat will have that bot greeting them. That is a functionality...

 
mods decided that a few things were no Kosher
we're fighting for our rights to have a bot that is given the same rules to abide by as regular users
 
@NinjaEcho The time has come for you to take over the world.
 
because after all, the bot does nothing a regular user cannot do (aside from maybe using Google)
 
7:05 PM
Well, it is capable of extreme spam beyond what a human could do.
 
@KendallFrey It would be nicer to submit a pull request than to suspend a bot
 
@KendallFrey not at all.
throttling applies just the same to the bot
and the bot is not above being suspended or flagged
 
Yeah, but it can still do things like send long messages in quick succession
 
so again, how is the bot any different than a user with a nice clipboard utility
my argument isn't that the bot cannot do bad things, it is that ALL of those things I can do myself.
 
Ultimately, it's still subject to the system, but it makes it easier to break the rules.
 
7:07 PM
the bot has no special powers
 
Except automation
 
@ton.yeung no
@KendallFrey the fact is: if I automated things with my personal user account that is fine. This is only an issue because SE doesn't want people thinking it is a SE feature
but to me that is a horrible hole filled argument
especially considering it is not malicious.
but ohh well.
FYI the issue atm isn't bots in general
it is automated greeting messages
(and I imagine any automated messages of any kind)
but balpha also displayed ill feelings about our access control
which is just silly in its own rights, as we made that feature to fix a problem with the access control that he refused to fix on meta. he said "it would require a major re-write of the chat" or something along those lines
@ton.yeung "abuse of the system"
but if you understand our access control feature, all it does it auto accept people who request access unless they have been put on the mute list (revoked access) manually by an owner.
so really, it does nothing but allow us to not have to open access tab unless we're moving the room in and out of gallery
that tab is horrible
 
@KendallFrey I think it should be ok if the bot only acts when someone calls it like !!weather
!!weather
 
@kush same
 
is hole-filled an oxymoron?
 
7:16 PM
I filled... yeah
 
8 mins ago, by rlemon
but to me that is a horrible hole filled argument
 
the argument is full of holes, my brain is full of fuck
 
who the fuck is eating breakfast cereal at 2PM in the office?
 
milky milky coco puffs
!!urban milky milky coco puffs
 
@NinjaEcho search for oxymoron
 
7:19 PM
An oxymoron (plural oxymora or oxymorons) (from Greek ὀξύμωρον, "sharp dull") is a figure of speech that juxtaposes apparently contradictory elements (it is not however a contradiction in terms (see below)). Oxymora appear in a variety of contexts, including inadvertent errors such as ground pilot and literary oxymorons crafted to reveal a paradox. Types The most common form of oxymoron involves an adjective-noun combination of two words. For example, the following line from Tennyson's Idylls of the King contains two oxymora: Other examples of oxymora of this kind are: * Dark...
 
remember, all is not lost
 
@NinjaEcho I miss your face
 
Will Stack Exchange give me a dump of all questions and answers and all if I would like to host it on like a personal server?
 
7:23 PM
@kush SE publishes their data in data.SE.
 
better to use the 2.x api
 
7:44 PM
I wish Visual Studio could run on Windows RT or Plain-Windows 8 name they changed it to.
@ton.yeung They changed the name of RT to "Windows 8".
But what I was hoping, is it ran on the mobile version.
@ton.yeung I know.
I'll just buy a stupid Macbook Pro with Virtual Box or Parallels running Windows 8.1 on it. Then I'll just by a Nokia Lumia 2520.
@ton.yeung Hard to justify, I have to purchase a Mac for some horrible Apple development / learning.
@ton.yeung X-Code is fickle with hackintoshes.
Hm, I've never heard of that. Link?
@ton.yeung Potentially, but I've had issues with VM's before. I've had zero issues with Microsoft in a VM though.
@ton.yeung I'll check that out, I'd much rather not purchase a Mac.
@ton.yeung But won't the VM still have issues if the hardware doesn't match up to an extent?
@ton.yeung I remember it being kind of evil, unless I tweaked my Alienware a bit for it.
 
7:59 PM
not me
 

« first day (1123 days earlier)      last day (3826 days later) »