« first day (17 days earlier)      last day (4931 days later) » 

12:07 AM
Hello, i need some help with link to entities do some body can help me ?
 
12:54 AM
eh, i haven't touched entities for months, but i might be able to help
 
1:19 AM
alright, question about organizing my personal project.
i have a service that is performing updates to an existing database. but now i want to add a web based front end to it.
should i create a separate ASP.NET MVC project that pulls from the existing database or integrate the existing server into a new MVC project?
 
1:39 AM
Hi guys
Can anyone help with this question?
2
Q: Exception raised when using a Linq query with Entity Framework [question redux].

SergI removed a substantial amount of text from this question because I feel it needed to be more succinct. - Serg Here's what I'm trying to do. User selects a State, then a ComboBox loads with Cities in that State, then when user selects a City a Listbox loads all projects from that City. When run...

 
 
1 hour later…
3:04 AM
Hello
 
LMAO
 
4:05 AM
hello.............. good morning
 
 
2 hours later…
6:25 AM
Hi - Any Linq 2 Sql experts around right now?
 
7:03 AM
hello............
 
jjj
7:21 AM
hello
 
hi, i am trying to remove decimal from string 1.2.3.4 to 1234 in vb
tempstr = ""

For m = 1 To Len(str)
If str <> "." Then
tempstr = tempstr + str(m)
End If
Next m
i am trying this
but when i do str(m) it gives a compilor error
i am used to C can any what i would have to do here
 
jjj
dim tempstr as integer = 0
For m = 1 To Len(str)
If str <> "." Then
tempstr = tempstr + m
End If
Next m
 
please help me to do this (stackoverflow.com/questions/4075656/…)
 
got it, str = Replace(str, ".", "")
 
jjj
ok ..good
 
7:31 AM
@jjj thankx anyway dude
 
jjj
you are welcome
 
8:24 AM
Q: How to get all checked values from CheckListBox and concatenate them in one string?
 
A: www.stackoverflow.com
 
9:14 AM
Whew
Small question to everyone here: Is there any mechanism which chooses a TypeConverter based on the class you want to convert to automatically? :)
Going through all types with a case doesn't seem to be so effective
Like a TypeConverterSelector which you give for example "System.Int32" and it returns you the Int32Converter
 
9:59 AM
Can I loop through public fields of an object?
 
jjj
@Raynos..ya
you can
 
@jjj how?
 
jjj
8
Q: c# - How to iterate through classes fields and set properties

PetrasI am not sure if this is possible but I want to iterate through a class and set a field member property without referring to the field object explicitly: public class Employee { public Person _person = new Person(); public void DynamicallySetPersonProperty() { MemberInfo[] members = t...

 
@jjj thanks. I've never dealt with getMember
 
jjj
wait .. i am not sure if it is .. what it is
is it what you want?!
 
10:05 AM
PropertyInfo is not in c# 2.0 ?
I want something similar to javascript's obj["prop"] or for (key in obj) { messWith(obj[key]); }
 
jjj
oh .. ok
42
Q: Javascript - array.contains(obj)

bradWhat is most concise/efficient way to find out if a javascript array contains an obj? This is the only way I know to do it: contains(a, obj){ for(var i = 0; i < a.length; i++) { if(a[i] === obj){ return true; } } return false; } Is there a better/more concise way to acc...

@Raynos
check it ..
@Raynos ....or this
0
Q: How to loop a key/value object in javascript

Blankmanvar user = {}; now I want to create a setUsers method that takes a key/value pair object and initializes the user variable. setUsers = function(data) { // loop and init user } where data is like: 234: "john", 23421: "smith", ....

 
@jjj I want to do it in c# not javascript :)
 
jjj
10:21 AM
??!!!...ok ok
maybe ...
0
Q: Loop through Dictionary with string key=>vals?? C#

Joshuapublic static string DictToQueryString(Dictionary<string, string> data) { string querystring = ""; foreach (string key, string val in data) querystring += key + "=" + val + "&"; return querystring; } How i foreach?

@Raynos
 
@jjj Dont worry I used reflection and obj.getType().getFields()
 
jjj
ok .. so
 
11:07 AM
tired...
 
11:33 AM
any one who has used ADO on VB6
?
@ALL
 
11:52 AM
Hi everyone, I was wondering if you guys have done an updater and what patcher have you used to make diff files instead of reseeding the entire file ?
 
12:05 PM
Hi guys,
I am using vb6 and trying to read an mdb file into a

Set rs = New ADODB.Recordset
rs.Open SqlStr, mvarDB

this my criteria string "id = 'SA / -AS 0N' And mp <>'N'", there is a record in the table which id is the above mentioned and its mp column is not N. but when the

rs.MoveFirst

in watch window i can see the values of first column. but when below runs , the header says

rs.Filter = sCriteria




: Value : <Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.> : Appreciate ur help.
 
0
Q: Does null == null?

serhioI have an object of type Foo. Foo has an Id (int) a) Is the code bellow "good"? b) What should I return if both are null? // overload operator == public static bool operator ==(Foo a, Foo b) { if (ReferenceEquals(x, y)) { return true; } if (x == null && y == ...

 
@serhio return numm
sorry null
I SUCk
@jjj can u help me in above question mate
0
Q: Problem in reading data form mdb file in vb6

jaminatorHi guys, I am using vb6 and trying to read an mdb file into a Set rs = New ADODB.Recordset rs.Open SqlStr, mvarDB this my criteria string "id = 'SA / -AS 0N' And mp <>'N'", there is a record in the table which id is the above mentioned and its mp column is not N. but when the rs.MoveFi...

 
 
1 hour later…
1:26 PM
help
0
Q: How to add data to a Listview from an XmlFile using XML to LINQ

Pramodhi'm having a ListView like and an Xml file (foo.xml) <root> <RowDetails RowName="A" ColumnSize="1"> <ColumnDetails ColumnName="A1" /> </RowDetails> <RowDetails RowName="B" ColumnSize="2"> <ColumnDetails ColumnName="B1" /> <ColumnDetail...

help
 
1:37 PM
how do u post the questions like above here... thats pretty cool
np... guess i should have read the FAQ... chat.stackoverflow.com/faq
 
just use the link to the question
 
thx Chris
it would be pretty cool if the information about the questions updated as well. Instead of just a static snap shot at the time of post
 
 
2 hours later…
3:45 PM
i'm going to reiterate my request for project organization advice: do i create a new seperate MVC project to present a view to my service/database, or do i start porting my service/database as a subset of a new MVC project?
 
4:04 PM
I may be too sleepy, but, what's the problem here?
List<string> filesToDelete = files.Select(file => new FileInfo(file)).All(fi => (fi.LastWriteTime <= now.AddDays(-1 * retentionDays)));
I get the following error: Cannot implicitly convert type 'bool' to 'System.Collections.Generic.List<string>'
As I understand it Select() returns an IEnumerable, not a bool
and so does All()
 
what is the 'var' used for ? variable ? type ? .
 
it's a type, the compiler deduces it and puts it in place of var
var l = new List<string>();
l is of type List<string>
 
ok
 
in other words, var l = new List<string>(); produces the exact same code as writing List<string> l = new List<string>();
 
ok. shorthand
 
4:09 PM
so it's just syntactic sugar
 
4:20 PM
Bah, I wanted Where(), not All(). Too sleepy
 
I tried putting a throw new exception inside my try and my catch never runs, what the heck?
 
4:39 PM
try { throw new Exception(); } catch (Exception e) { Console.WriteLine("Hi") }
That you did?
 
ya basically but I have return View() instead of writeline
 
hmmm, can you paste a reproduceable sample?
 
        try
        {
            throw new Exception("Your Mom.");
        }
        catch(Exception ex)
        {
            ViewData["LoginError"] = "Username or password is incorrect.";
            return View("Index");
        }
thats my code
not sure what you mean reproducable
 
i dont get the top answer
the only reason i am throwing an exception right now is to test the exception handling...
 
4:43 PM
How can you tell your catch isn't catching?
 
because its not returning that view
 
and what is it returning?
 
it's actually just exiting the method that contains this try block and continuing with the rest of the code
 
Haven't you messed with the project properties?
 
oh wait
i bet it's because i am calling an ActionResult method from inside some code
it's not returning to the browser its just returning to the place that called it...
i wonder how i would do that then... hmm, just make it a regular void?
 
4:45 PM
I know naught about ASP
 
i'll try it
yeah that was the problem
i expected too much out of this thing haha
however once i make it 'void' i cannot return View()
but that's ok, probably a lame idea anyways
instead i made it return bool and then when I call it I do if(!theMethod(...)){ return View() }
yeah MVC is pretty awesome if you ever do web stuff i recommend it over web forms..
it's nice to just do plain html for things
 
I don't like that about ASP, there's too much going on behind the scenes, always. Haven't had the need to use it, so haven't learned it all
 
and regular POSTS and GETS instead of postback() crap IMO
 
agreed
 
yeah thats whats cool about MVC too you have total control.. you just serve up HTML and accept GET/POST HTTP requests rather than having this 'living page'
plus the URL handling it can do is grrrrreat
 
4:52 PM
But it's not that easy to get that living page in MVC
 
yeah but i would argue that you don't really need it
if you want something to be that alive just use jQuery
 
or silverlight
 
"just use jQuery"?
 
$.post()
 
I'm sorry, I'm not following you, you want to replace one complicated engine with another one, built on top of ajax and asynchronous callbacks?
 
4:54 PM
that's not what i meant, maybe we are confusing each other with my coined phrase 'living page'
 
hey
 
The whole point of the ASP.NET engine was to make web forms work similar to win forms
I'd say it succeeded at that
 
yeah but i'm not sure if win forms belong on the web :)
 
It might not be the best way to build web apps any more
 
4:55 PM
but it never was meant for one to replace the other
so it's a nonsensical debate really..
 
No, but to argue that you have complete control with MVC, just as long as you throw AJAX and jQuery into the mix...
 
again, that's not what i meant
i was confused by what you meant when you said you want a 'living page'
because i think you might have been confused by what i meant
it wasn't very clear anyways, probably a bad choice of words on my part
 
by living page I mean the event and postback system built into ASP.NET
 
yeah i'm not a big fan of that thing
 
which means you can have postback events on input fields changing, to validate server-side etc.
 
4:57 PM
The Ajax mechanism is simple compared to the gargantuan ASP.NEt complexity
easy to manage and understand
 
that depends
 
but why post back per field change if you dont need to is what i mean
i guess i can imagine some things where it would be nice
 
you can build simple one POST/GET submission forms in ASP.NET too you know
 
at the end of the day, use what you like, as long as the end user can do his or her task :)
but if you haven't done some MVC i highly recommend trying it if you do web stuff with .NET, you won't be disappoint, like me switching from web forms i felt like i put on some scuba gear where i once was using mechanical arms from inside my robotic submarine
i dont need this submarine i said, dive
but sharks can be more scary that way :D
actually i have no idea how that last statement was analogous, lol
 
5:21 PM
Guten Morgen meine damen und herren, I have arrived ... queue the fanfare and the banquets .... tehehehe ... so nice to get to work at lunch and all anybody says is "what did you bring me"
so anybody working on anything fun or interesting today?
 
5:41 PM
Hello everyone.
 
hola
 
FYI: bad idea to have two key/pair values with duplicate keys in your app.config.l
Especially when it has to deal with the rate at which the client should refresh their cache.
 
@GeorgeStocker which is worse? finding that or then realizing that of all the KVP that ASP.NET refuses to allow you to duplicate (think httpHandlers or the like), in this instance it will let you duplicate them...
But yes, I've run across that once before myself. Such a pain.
 
I need help with WPF, is anyone available? Regarding "Invoke".
 
Sure, what's the problem
 
5:52 PM
@lnluis just ask away
 
Please refer to my question here stackoverflow.com/questions/4080316/…
 
0
Q: How to implement Invoke method?

lnluisI've been searching a lot of topics but it's already too complicated to understand. I don't even see the this.Invoke(); method. Here's my scenario: I have this UserControl called test1.xaml and it has a frame control called frame1 Basically test1.xaml.cs contains public test1() { ...

@lnluis posting the url without comment does this "onebox" so that we can see the top of the question immediately
 
Sorry, Im new here.
 
It's fine
As for the question, I'm not sure the answer. I see that you have had a couple of views tho, so give it a bit longer...
 
Okay, thanks.
 
6:01 PM
I'm still trying to get used to C# 4 and they're already going to release new stuff in C# 5.
Slow down, people.
 
@GeorgeStocker lol, same here! ;)
 
I wonder what to I have to put on the Invoke method sigh.
 
So...are you sure it's possible to pass a URI to a frame that is relative to the source tree like that?
The Navigate(Uri) method I thought was for HTML content, not XAML
 
Yep, tried that on the own usercontrol. It's possible, what im trying to do is access it to make it navigate to other page with another class
 
What's the nature of the error you're seeing? exception? compile error?
It looks like you're instantiating a new test1 object, but it's not in the visual tree anywhere
I'm not sure what you're expecting to have happen
 
6:16 PM
I don't have an error, it compiles but it still wont navigate or basically, it won't update a property on my control from another class.
 
6:28 PM
hey guys, I'm using this plugin that I instantiate as an object and it has this Bind() method, it says results are returned in the form of the 'Result' event
the method is void Bind()
 
@lnluis Those actually sound like two distinctly different things there ... maybe it's just me
 
I don't get it, where do I put the code..
i mean, I call Bind(), how do I check if it works...
 
Usually to respond to an event, you attach an event handler ...
 
this is in a Controller.cs
 
does it expose an OnResult?
 
6:29 PM
uh hold on
[C#]
public event OnResultHandler OnResult;

public delegate void OnResultHandler(object sender, LdapsResultEventArgs e);

class LdapsResultEventArgs : EventArgs {
int MessageId {get;}
string DN {get;}
int ResultCode {get;}
string Description {get;}
}
 
So then you need to attach a handler to that ...
 
never done this before
can it just be a method of my controller class
how do i know it will be in scope or whatever... if that makes sense
 
so you need to declare in your class a public void HandlesMyResultsOnResultHandler(object sender, LdapsResultEventArgs events) {} and then in that method you'll get a LdapsResultEventsArgs that you can play with
what platform?
WPF?
 
MVC
 
6:32 PM
in the controller i have a private object called ldap1
 
how are you instantiating the object ...
you're beating me to it
 
:)
 
after you do something like:
 
us programmers have to be psychic remember
 
private object ldap1 = new object; then you're going to want to do ldap1.OnResult += HandlesMyResultsOnResultHandler;
and define the method as I described earlier
 
6:34 PM
ohhh
can you explain how the += works
 
You're just attaching the Event Handler for OnResultHandler to the OnResult Event of the object
 
how/why i guess..
 
lol, my psychic worked ;) ... that's the answer
 
hmm
why wouldn't it be =
 
so for any given event you can have one or more event handlers
ever work with jQuery?
ever attach two click handlers to one object?
 
6:36 PM
ah ha
so the += must be overloaded
 
I'm losing my mind.
 
i guess i shouldn't expect any different, i'm just used to += in strings and integers, but i suppose it's the same thing
just a different type of object
mind = blown lol
 
Remember to do -= when closing/disposing of the form/thing the event is on.
 
I guess I'll just look at this 10,000 lines of code line by line
 
@George really
@George just when I'm totally done?
I figured when the controller was done it would destroy the private Ldap object anyways
I guess I'm not really sure how that works in MVC, when someone calls a URL and it hands it off to an ActionResult method of a Controller does the Controller get re-instantiated every time?
or does it somehow float on my server waiting?
 
6:59 PM
@Shogun yep, that's the key. You could also handle the event in two places if you felt so inclined.
 
so wait does it or does it not disappear after the request/response is done being handled?
meaning my controller in memory
 

« first day (17 days earlier)      last day (4931 days later) »