« first day (1254 days earlier)      last day (3686 days later) » 

10:46 AM
ITS not even 7am on a sunday and here i am in this room...
 
you're an addict Steve, it's time to be honest
:P
 
lol
to be honest, i'm so excited about this project i'm working on, i worked on it all day yesterday
but now i'm to a point where i'm kind of stuck,i feel like i'm querying the db too many times per request..... wonder if i can combine some of this stuff... hmm
 
Look at me - the last conversation which was yesterday had me in it. History has not advanced at all in the time I've been asleep
 
lmfao
 
what's the project?
 
10:50 AM
its that event site i was working on a few months ago
picked it back up
 
I don't think I heard about that the first time round
 
i know thats not too descriptive
pretty much, public events: people can search them too, so for example: i get bored, want to get a group of people together to volunteer, i throw an event up on the site, people search for volunteering, and the different events show up, or concerts, or political protests, or even large sales....
or whatever really
 
would writing a View solve your excessive querying problem?
 
lol
you know
 
You can have an asynchronous process quietly scraping the database in the background and updating that view, which you can query just once
 
10:52 AM
(at first i thought you meant view as in MVC, but then i realize you mean db view)
it actually might solve my problem
see, i'm querying the db with his long math formula to find distances between zip codes, so all the events within the radius you select (miles), show up, but then I have to do that equation again out-side of the where clause to be able to get it in the select part (So i can tell users how far a certain event is from their location (origin))
hope that makes sense
and i'm not happy with that all at, trying to think of a better solution
(i'm actually not even doing it in one go, i'm hitting the db two separate times)
 
my sql sucks, but it sounds as though that has to be a solved problem. I think there's something called an aggregate function that does that sort of thing
 
not using mysql
sql server for now, then i'm moving it to azure storage once I feel confident enough :)
 
as in 'sql that is mine'
 
but i'll definitely look into an aggregate function
 
not 'mysql'
 
10:56 AM
oh, lmao
yeah, i'm actually using l2e
i'm guessing creating a view per user is bad lol
 
I was imagining a view comprising something very close to what you intend to display, something like | UserId | EventName | DistanceFromUser |
and you'd do all your logic in SQL to populate those columns
 
but it would have to be DistanceFromZipCode though, wouldn't it? I'd have to keep a record of how far every zip code is from eachother, or i'd have to create a view for every search
both of those options i'm not that happy with, there has to be a better solution
 
nah, you can define views with subqueries IIRC
 
my experience here is a little limited, what do you mean?
 
mine too, let me think a second
 
11:06 AM
i could solve this if i just used a sproc instead of EF
but it would break what I have so far
maybe
 
ok, this is taking more thought than I anticipated. I'm useless at sql without intellisense
yeah, if you're committed to EF I think that rules out the handcrafting I'm thinking about here
 
lmfao its okay, thanks for trying
and helping me brainstorm
i think the problem is
that the Entity that EF provides, doesn't have that distanceFromOrigin field to it, so I think telling EF to use a sproc to select the fields, and adding a custom property to the entity might work
but i'm so far over my head, not even sure if what i said makes sense :p
(jk, it does)
 
It wasn't long ago that I feared sql, I'm trying to overcome that. Watched a video from Udi Dahan talking about CQRS and his notion of "fuck it, databases are cheap" sort of changed my mind about economising the amount of sql you have to write
the gist being, as I understood it, it's cheapest to read exactly what data you want from a table that's designed in a way that matches your viewmodel, and you can get away with updating it whenever you've got time, instead of immediately
 
yeah, the most we discuss it, the more I'm realizing that
 
it doesn't matter if a user's view presents stuff like your event listings half a minute after they're created, so you can maintain a datastore for driving that view that doesn't have to be completely synchronised with the writes to the db
 
11:16 AM
yup, i think you're spot on, right now I have this huge where clause in my service layer, using l2e, but then i realized I didn't select that distance data to use, so i created another method to get the distance
 
That's a big true, man! :D
 
i'm hacking the front end together, when i should just make the data that i need on the database side
 
it rejects CRUD applications, that get crippled in performance so easily because they try to munge a single relational model into both reads and writes, and try to keep it 100% consistent by locking everything
Instead of running a massive update query whenever a user clicks 'save', record the fact that they tried to save, do some processing asynchronously, and return either { 'Here's your data!'} or { 'fuqd, sorry' } over ajax or whatever
how hypocritical of me - I maintain a system component that, at present, repeatedly executes a 500 line sql query stored as a string in a console application 370-something times
serially, because parallelising intermittently corrupts the db and we don't know why
 
:/
that sounds pretty bad, but at least its not customer facing? :)
 
it's the initial bulk load for our master data store, so no
it was only ever intended to be interim, but the expected date for fixing it properly seems to be receding at about 1 second per second
 
12:14 PM
so, i thought i read some where that there was a way to have EF use a stored proc whenever I used "select" on an entities
but all that I'm seeing is update, delete, insert..... i thought i remembered creating an import function with it, but it seems like all that does is allow me to execute the stored proc through a specific command, rather than just replacing the select
can't seem to find an example online, so i'm not sure if my memory is failing me, am i crazy?
 
not really used EF, dunno
 
maybe this is why I decided to put all that crap in my service layer
lol
now that i think about it, i must be crazy, because if i forced it to use my stored proc for select... how would that work when I tried joining.... i bet its not even possible
 
data munging is dull dull dull
 
12:33 PM
i need some help
 
don't we all
 
in my application values cannot retreive back from data base
it is a sqlite data base and it is windws mobile app uses c #
 
have you tried to fix it?
sorry for the wall of text: stackoverflow.com/questions/22591045/…
 
12:54 PM
this way it doesnt private async void FetchTasksButtonClicked(object sender, RoutedEventArgs e)
{
Database database = new Database(ApplicationData.Current.LocalFolder, "usertask .db");
await database.OpenAsync();
string query = "SELECT * FROM TASKS";
Statement statement = await database.PrepareStatementAsync(query);
while (await statement.StepAsync())
{
MessageBox.Show(statement.GetTextAt(0));
}
}
 
there's a space in usertask .db - is that intentional?
 
no tht code is picked up
it cannot be the problem
 
1:25 PM
hi I used this code to set gps http://www.codeproject.com/Tips/627318/Using-GPS-for-Getting-Location-in-Windows-Phone . and it works. and I used this code to mark the route on the map.
void MyQuery_QueryCompleted(object sender, QueryCompletedEventArgs<Route> e)
{
if (e.Error == null)
{
Route MyRoute = e.Result;
MapRoute MyMapRoute = new MapRoute(MyRoute);
MyMap.AddRoute(MyMapRoute);
MyQuery.Dispose();
}
}
now i need to add a check condition to send an sms
(if the gps current location moves out of the marked route ) ...
how can I write that code with that condition please help
void MyQuery_QueryCompleted(object sender, QueryCompletedEventArgs<Route> e)
{
if (e.Error == null)
{
Route MyRoute = e.Result;
MapRoute MyMapRoute = new MapRoute(MyRoute);
MyMap.AddRoute(MyMapRoute);

List<string> RouteList = new List<string>();
foreach (RouteLeg leg in MyRoute.Legs)
{
foreach (RouteManeuver maneuver in leg.Maneuvers)
{
RouteList.Add(maneuver.InstructionText);
}
}

RouteLLS.ItemsSource = RouteList;

MyQuery.Dispose();
}
}
 
 
2 hours later…
3:07 PM
@KendallFrey I came up with the program I wanted to write in REBEL, but in normal regex it is impossible. Since REBEL is turing complete, I was hoping you could provide some insight. LMK
 
@deltree @KendallFrey is not online. @KendallFrey are you online?
 
@Jenny he'll get a notification that I pinged him. REBEL is his language, no one else to ask
bbiab
 
hmm i also have a big question can u have a look at the above q?
 
3:35 PM
@Jenny you want to trigger it in your watcher changed method
if you're trying to write software to do navigation, you're doing ti wrong though
alternatively, if you're like the creepy guy writing that tutorial, you need help
"Isn’t it is a great idea to trace your girlfriend’s activity, her whole routine?" No, that's what a stalker does
 
what god
what did you say
 
it would be right above what you typed
 
i don;t want your bulshit ideas in that way unless it helps me to solve my problem. i have a submission tmrw left with 10 hours other thing i have a bf not gf in that case i am a girl what does it sense u when u read my name to think it is a boy
go to hell stay shut up if u dnt know to help
some one will answr
 
lol, I was quoting the link you posted
You said you used this tutorial: codeproject.com/Tips/627318/… <-- maybe you should read the Introduction
 
3:53 PM
i really didnt have time to read it and it doesnt need since code helps me for what i need
 
4:04 PM
jenny most of us spend our days pouring over documentation. if you dont have time to read it you probably shouldn't be programmg
 
lol do you want to waste you time reading smthn useless like this just bcz it z in a web page that gives you a real code that works for you. I read stuf what i need only not smthn like this. "I was working on a really nice Windows phone 8 application that uses geolocation techniques to pinpoint the location of your friend. This will keep track of where they go and when. Isn’t it is a great idea to trace your girlfriend’s activity, her whole routine? In my point of view, it is awesome"
it is enf seeing the topic and going thru and checking the code smthms
if you are a creative write keep reading about other ppl's gfz
in my case i know wt gps is and itzz opportunities
 
his point is: if we have to read that shit to figure it out, so do you. coming in here and have us read it because you don't enjoy it and/or are lazy is fucking stupid
 
what he made it really confused
i was talking about the coding part @Steveeeeeeeeee
can you tell me when i highlighted a road on map , how can I track when my current location goes out of that highlighted road.
I just attach the links because sm ppl ask to send it. bt this is my question
i need that moment to get notify
:/
@Steve
 
4:21 PM
what
 
question
 
english, with punctuation
you need to google it, and play with it
programming is more than just writing code, its figuring out what code you have to write
 
what is programming?
aside from coding?
o.O
 
researching
 
i know that i do that too :/
thank you
i like it
when says things like that :)
@Steve do you really read each and everything in a website every time?
i just go around to catch whether what i want is there
Is it bad? i thought it saves time sometimes
and now i am puzzled when so professionals do that
hmm
 
4:32 PM
@Jenny If you don't like coding or understanding how to code well, you should probably get out of coding and be a program manager or something... have other people write code for you..
3
 
4:43 PM
LOL
thats funny
you don't know much either
you will see
 
i hope so
 
@Jenny it is good that you found this chat, we need some more regs. Just remember most of us are here to just lounge. You have asked a couple of questions that would require many years of work to answer with code :)
 
5:01 PM
@Jenny we certainly skim often... at least until skimming isn't enough to solve our problem. Then we read everything more carefully. Then we explain it to a rubber duckie and then we ask a question here or on SO.
At least for complex behaviors.
Sometimes when the question is really specific we just ask right away.
 
Hello can someone help me with a problem with binding an object to a checkbox
 
@y451n there are at least three different frameworks that implement a checkbox, which one do you mean?
 
@y451n wpf?
 
@TomW @JohanLarsson ehm just the normal checkbox (aspx) CheckBox c = new CheckBox();
 
ok i have never done any web
 
5:06 PM
@y451n - I've messed with ASP.Net forms a bit. Whats your question?
 
@JohanLarsson my problem is not really web based
 
post relevant code here imo, if someone knows > profit
 
@SpencerRuport I got a form with an person object (ID,Firstname,Lastname). I am binding every property (ID,Firstname,Lastname) to 3 checkboxes. Upon a buttonclick I want to get the selected checkboxes properties and create a new instance of a Person
 
@SpencerRuport so the person might only select the first to checkboxes (ID,Firstname) so the created new instance of person should be: new Person(2,"Mike", null);
two*
 
5:08 PM
Alright. I follow so far.
 
@SpencerRuport The problem is, how can I know upon buttonclick which properties (ID, Firstname, Lastname) from that person object are in the selected checkboxes
@SpencerRuport not the values, but the propertyname
 
Well...
I'm not sure I understand your question. Are you asking how you can determine which checkboxes are checked or how you can associate a checkbox with a property name?
 
@SpencerRuport Yes, I know which checkboxes are checked but how to associate a checkbox with a property name,
@SpencerRuport couldn't explain it better, haha.
 
No worries.
So you're creating these checkboxes on the fly correct?
You basically have an array of them?
or some kind of collection.
 
@SpencerRuport yes, I got this: Dictionary<CheckBox, string> checkBoxes = new Dictionary<CheckBox, string>();
 
5:15 PM
What's the string?
 
hmph
people iz crazy
 
@SpencerRuport I am iterating the list of persons and putting the properties in it (example: Firstname)
 
Has anyone got experience with Monitor.Wait?
 
@y451n - So can't you do this? var SelectedProperties = checkBoxes.Keys.Where(chk => chk.IsChecked).Select(chk => checkBoxes[chk]).ToList()?
 
Do you need the Where?
 
5:20 PM
@SpencerRuport not sure, why ToList()?
 
@ReedCopsey Got a Monitor.Wait question, when you are in :)
 
Hi Guys, i downloaded the example project from this link: khason.net/blog/… when i compiled it i'm getting this error. I'm targeting .net 4.0 & directX is already installed in my system.
 
@y451n Force the enumeration
 
@y451n - When I'm debugging I prefer toList so I can see the results in the debugger.
But you are correct, once you get it working ToList may not be necessary.
 
5:21 PM
@SpencerRuport You can view enumeration while debugging.
 
@LewsTherin - orly? I never experimented with it.
 
@SpencerRuport i will try it out, thank you very much !
 
@SpencerRuport Yeah, it is like a refresh button.
 
@y451n - For sure. Good luck!
@LewsTherin - Oh yeah I've seen that. Guess I never tried clicking it.
 
Alright ha
 
5:25 PM
@SpencerRuport that will return the property ehm, any possibility to create a new object (Person) with the properties that are returned?
 
@y451n - For that you need reflection.
 
@SpencerRuport is that a c# function?
 
@SpencerRuport was looking at the same page atm !! haha thanks
 
5:46 PM
Prebuild event command: fxc /T ps_2_0 /E main /Fo"$(ProjectDir)bricon.ps" "$(ProjectDir)bricon.fx" Error code: 9009
 
6:35 PM
No problem guys, fixed it.
 
 
1 hour later…
7:50 PM
Hi. Hm, let's say I have a List<MyModel> and want to have an extension method, such as:

List<MyModel> myObject = new List<MyModel>();

myObject.MyExtensionMethod();

How can I do this?
Nevermind, I found it.
 
 
1 hour later…
8:56 PM
@SpencerRuport Thank you Spencer I got upset by lot of msgs . And I like advices like you did. I am still a beginner of programming advices worths a lot more than unkind replys asking to get away from programing. because i love to code and i am stil learning as possible.
Some may laugh but I don't care . I feel things too much and I am sad of ppls responses. I have a project submision for the subject for that I asked the question because was stucked a lot last day. I cant jump in i am learning as i can may be slowly...
 
manly tears
I'm joking though, good to hear
 
@Jenny a few people are getting impatient with you because when you ask questions it looks as though what you've done is copy and paste some code from an article, then when it didn't work, came in here to ask someone to fix it for you. Maybe there's more to it than that, but it doesn't look that way from what you tell us, so what people are looking for is for you to show that you've thought through the problem yourself.
More specific questions like "This line returns x, but from reading the documentation I expected it to return y, why is that?" looks more like a good question than "How do I do x?"
 
hmm
but making people mentally down is not something you should do
@TomW got you
 
9:11 PM
hey Jenny
We have a female !!! :)
look at that , that's a new and cool thing for us c#-ers in this room
do you get any cool new permissions at 4k rep???
 
@ScottSelby we've had those before...
...don't ask what happened to them, ok?
 
@TomW - I know , and it's exciting everytime
hey Tom. can you do me a favor and upvote somehting of mine , I am only 3 points away from 4k , I want to see what I get when i reach it
 
oh let's see, can you help me find something good? :P
 
yea I CAN
3
A: C# List Elements in the Session Not Responding

Scott Selbyare you setting breakpoints and actually checking what the values of these lists and what is actually stored in the session? .Equals() is not doing what you think it is try : foreach (Student element in (List<Student>)Session["stdlist"]) { if(element.ID == txtstdi...

 
are you cheating urself?
 
9:32 PM
well fuck
it returns the 'distance'... distance in what, miles, feet, km, french fries, ffs
 
take as what ever you want
 
i tried :( even tried punching in some latitudes and longitudes, calculating the distance by hand, and looked at what this thing returned, i can't figure it out for the life of me
the closest thing is feet, but its still not accurate
makes it like 5-10 miles off, over a 50 mile stretch
 
ugh, most of the class pages are stubs
no information at all
 
@Steve you know I do not have much knowledge to help you if had i would.
 
you estimating using plain trig?
 
9:41 PM
@TomW i was, but then i had problems with it, that i won't get into
but then i realized I can do spatials with sql server & EF
so thats what i'm using now
 
I did once read a book about spatial types and remember very little about it
I would expect the units to be embedded in the geography type somewhere
 
lol so would I
 
6
Q: SQL Server units question

David PfefferThis may be a really dumb question, but... What units does Geography.STLength return? The official MSDN page doesn't say anything about the units returned, and this blog entry here says STLength() returns a float indicating the length of the instance in units. Yes, that's right, it says it retur...

wat.
so there are a large number of different standardised spheroids used to calculate ground distance depending on where in the world you are
trying to calculate distances on the surface of a sphere is comically inaccurate
I guess the units of measure are bundled up into a bunch of different stats representing the system you're calculating in
 
 
1 hour later…
10:50 PM
I'm trying to think architecturally about how to do something, and I could use some guidance. I want to create a method to get the center point among any number of points, but I'd like to include it in the API I'm building for some AI code, and I'm not sure what type of class to use.
At first I thought a "Center" class, but it seemed like an arbitrary step to create the class. Then I thought of having it be a "Calculator" which could also do distance, etc. Now though, I'm pondering if it would be a good extension of the existing .NET Math class
ideas?
 
11:08 PM
@deltree Perhaps an extension class?
for the Point object?
 
I was thinking about that too
seems inappropriate
 
Well, you'd need to pass in multiple Point objects so yeah, I guess that'd be a bit stupid
Are they all in like a list or are they individual objects?
 
seems almost like a good case for a Points static class Points.Center(List<Point>)
 
I think something like that as well would be good
 
Points.Distance(Point1, Point2
 
11:11 PM
or if you have it in individual object format Points.Center(params Point[] points)
 
explain?
 
It's been forever since I've used it but IIRC (let me draw up an example)
 
thanks
I see how the params works, sexy, thanks @CCInc
 
sure thing :D
just a different way to pass it in
 
11:33 PM
I like it, I'm thinking a static class is the way to go here
 

« first day (1254 days earlier)      last day (3686 days later) »