Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

09-09-2011 , 12:44 PM
Godamn it this is giving me a huge headache, anyone here know Linq? I need to return results by total number of matches but tbh just returning the results where one or more strings in Words exists in c.Term would suffice:

Code:
    /// <summary>
    /// Retrieve search suggestions from previous searches
    /// </summary>
    public static string[] getSearchSuggestions(int SectionID, string Query)
    {
        string[] Suggestions;
        string[] Words = Regex.Split(Query, @"\W+");

        using (MainContext db = new MainContext())
        {
            var q = (from c in db.tblSearches
                        where c.SectionID == SectionID
                        && Words.Any(w => c.Term.Contains(w))
                        select new { c.Term });

            Suggestions = new string[q.Count()];
            int i = 0;
            foreach (var r in q)
            {
                Suggestions[i] = r.Term;
                i++;
            }
        }
        return Suggestions;
    }
Quote:
Local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains operator.
Hope it's obvious what I'm trying to do I've been stuck on it for friggin ages
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 12:47 PM
also i am happy you like springloops! it's awesome and i really hope they do well. by far my favorite code hosting / source control site with post-commit hooks. awesome interface and everything. can't say enough about them, the CS is great and the owners are good guys
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 12:48 PM
Quote:
Originally Posted by kyleb
Ah OK. Which version of PHP are you using? I bet it's a garbage collector issue or misallocation of variables/arrays problem. If you are using the newest version of PHP it can fix a lot of "bad coding" errors by mistake in this regard; the GC does pretty good work in 5.3+.
yeah it's 5.3. tracking down what's causing the memory consumption is pretty tough, given the code. 5K line classes, 1K line methods, etc. Just a mess.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 12:49 PM
Quote:
Originally Posted by kyleb
also i am happy you like springloops! it's awesome and i really hope they do well. by far my favorite code hosting / source control site with post-commit hooks. awesome interface and everything. can't say enough about them, the CS is great and the owners are good guys
agree, they did a terrific job on the UI.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 12:49 PM
welp must be a really bad problem then if it's leaking memory since 5.3+ is pretty good about fixing stupid mistakes

some method is probably being called 100 times more often than necessary i'd guess
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 03:26 PM
I started this thread in the Computer Technical Help forum but it's probably more a question for this forum (I didn't know about this forum until 2mins ago).

I don't want to double-post the thread but if some of you guys could have a look at it that would be great. If a MOD could replace the thread that would be even better.

Thanks!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 03:37 PM
report the post and a mod there will move it, the mods of this forum can't do it

it's this button
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 03:42 PM
Thanks, just did that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 04:47 PM
Quote:
Originally Posted by RoundTower
report the post and a mod there will move it, the mods of this forum can't do it

it's this button
done
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 06:39 PM
Jon Skeet has written a C# book. I'm about 90% sure that being a public personality is a big part of his job.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 06:45 PM
I got his book, 100% recommend it but it's not for beginners.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 06:46 PM
Quote:
Originally Posted by Zurvan
Jon Skeet has written a C# book. I'm about 90% sure that being a public personality is a big part of his job.
I imagine that's part of it, but he's answered over 16,000 questions (he's answered more but self deleted a lot). I think the book promotion is to be honest a positive bi product of his passion for C# and addiction to SO.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 07:21 PM
Quote:
Originally Posted by Gullanian
I think the book promotion is to be honest a positive bi product of his passion for C# and addiction to SO.
This.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 07:32 PM
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 07:40 PM
Quote:
Originally Posted by kyleb
lololol
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 09:45 PM
lol please be true
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-09-2011 , 10:15 PM
amazing
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2011 , 12:33 AM
Quote:
Originally Posted by jjshabado
Yeah, the change to Python3 is pretty big. I believe the adoption rate of Python 3 is growing, but we're still using 2.7 and so are lots of other people.

It's probably not worth it for you to switch at this point. It's just going to make life more annoying for you.
I'm preparing a longer answer for the Python thread. I think that, overall, the changes are very good.

Hopefully I can find the thread, but they were talking about the speed of people changing over and one of the Python heads was talking about how the timing is right on track. Of course, the change won't really come to fruition until Django, et. al., decide to hop on board.

Quote:
Originally Posted by kyleb
Microsoft Security Essentials
Quote:
Originally Posted by Benholio
+1 on this. They have really caught up with the competition and it makes life so much easier for setting up/supporting family members and stuff. Just install it and forget about it.
qft. My gf is about the dumbest computer person on earth, and managed to get tons of viruses until I dropped that program on her computer. MSE is just amazing and light-weight. Microsoft really scored a touchdown with this one.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2011 , 10:35 AM
I wish someone would release an irb app for the ipad or iphone. Would be a lot of fun to do some tinkering on the subway. And given the existence of MacRuby, I would think it would be fairly trivial to create.

EDIT: apparently there is an app since the last time I looked, but based on reviews it doesn't work.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-10-2011 , 06:02 PM
remote desktop, maybe? Or are you specifically mentioning the subway as somewhere where you won't have reliable internet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-11-2011 , 12:01 PM
Xcode is a raging pile of horse****. I've spent the last day and a half trying to figure out why I'm losing focus in my app in a place where I shouldn't lose focus, only to discover that mysteriously there is no focus when the "Title Bar" of a panel is set to not be shown.

There have been several times that I've had similar occurrences, but more typically with frameworks that are built for IOS that only half-heartedly (or not at all) support Cocoa. Also, Xcode is slow, crashes, will occasionally unlink a file in a project for no reason.

And don't get me started on MacRuby, which doesn't work with Xcode 4.1 without some obscure workaround hack, and yet there is NO MENTION OF THAT ON THE MACRUBY WEBSITE!! The fault here is back with the Xcode team, who just decided to release a version of Xcode (4.0+) that breaks the ability to even link to the MacRuby framework. Did I mention that Xcode is a raging pile of horse****!!! My one hope was that I could just use MacRuby, but guess what? There are very important ruby gems that break when run with MacRuby, rendering it somewhat impotent. MacRuby is also a raging pile of horse****!!!

Sorry for the vent But I have at least doubled the amount of time working on a small cocoa app, mostly in trying to figure out MacRuby workarounds, but then also with suffering through learning this stupid IDE. I just hate IDEs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2011 , 10:28 PM
i think git is my favorite piece of installed software.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2011 , 10:45 PM
Agreed, it's pretty amazing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2011 , 10:17 AM
Someone should start a code golf thread, any ideas?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2011 , 06:06 PM
zomg Me and my brother have received our angel investment!!!!!!!!!!!

We can now work into the future on the back of those funds now without having to worry about getting jobs this is so exciting!!!!!!!!!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m