|
aBagorn posted:Ok, what do you guys consider to be the best map API, Google or otherwise, for .NET? If you're talking about web stuff, I like Bing personally.
|
# ? Feb 18, 2012 14:30 |
|
|
# ? Apr 25, 2024 02:31 |
aBagorn posted:Ok, what do you guys consider to be the best map API, Google or otherwise, for .NET? poo poo man you are AMBITIOUS
|
|
# ? Feb 20, 2012 02:18 |
|
edit: solved, removing for sake of scrolling
Chunderstorm fucked around with this message at 08:23 on Feb 20, 2012 |
# ? Feb 20, 2012 07:55 |
|
You are probably never instantiating the private member Room.npcs. So the linecode:
code:
|
# ? Feb 20, 2012 08:03 |
|
Eggnogium posted:You are probably never instantiating the private member Room.npcs. So the line Sure enough. Looked through my code, found I had: code:
|
# ? Feb 20, 2012 08:14 |
|
I initially wanted to use SQL CE for an application I'm about to write for Windows 8, but I can't find poo poo about availability of it. The current list of WinRT APIs and supported .NET ones don't list any Data namespaces at all, or anything suggesting SQL database support in any way. I'm not particularly a fan of LINQ, since in my mind, hammering a bunch of lambdas and function calls into a processing queue, that sit on top of SQL CE, doesn't sound quite efficient. Is my perception wrong? The reason I want to go with SQL CE to begin with is that I can define a schema with FK constraints and hope to have a second layer that makes sure that data's correct. But it looks currently like I have to accept the idea that LINQ-to-XML is the way to go, hoping SQL CE will be ported to WinRT, letting me switch out database engines. --edit: I tried some LINQ to XML stuff. How the gently caress is this intuitive in any way?! Combat Pretzel fucked around with this message at 16:03 on Feb 20, 2012 |
# ? Feb 20, 2012 15:32 |
|
I seem to be having trouble connecting to my local SQL Compact database. I am in Visual Studio 2008, C# and trying to do the following: code:
Anyway, I just started my project so everything seems standard. But this is the first time I am using SQL with my C#. I also tried the help files here http://msdn.microsoft.com/en-us/library/d7469at0%28v=vs.90%29.aspx but it doesn't seem to help. Any set up things I could have been missing? Or are there any guides out there that will take me from start to finish creating a sample application that uses SQL Compact? I'm almost thinking its a issue of connecting my app to the sql compact "server"? (PS. I tried to work this with Linq originally but apparently Linq to SQL Classes only work with SQL server or something?... I couldn't get that to work either) EDIT: after talking to someone in a group nearby, I believe the problem may be the SQL connection issue. They recommended I used an XML database. Never done that yet, so looking for information on XML databases now EDIT2: But you know, something doesn't make sense here. I thought the whole idea of SQL Compact is I don't need to worry about server set ups and stuff like that. I just set up a little SQL database in Visual Studio and it automatically links to my application... I think I am missing a point here since this ought to be more seamless... cannibustacap fucked around with this message at 20:02 on Feb 20, 2012 |
# ? Feb 20, 2012 19:19 |
|
I'm sorry, but If the problem is a connection issue with the SQL database, isn't the solution to fix that, as opposed to throwing it all away for an XML database instead?
|
# ? Feb 20, 2012 20:01 |
|
Chasiubao posted:I'm sorry, but Well for the purpose of this application, I'd rather the database be a flat file, no server or connection issues to go through.
|
# ? Feb 20, 2012 20:03 |
|
cannibustacap posted:Well for the purpose of this application, I'd rather the database be a flat file, no server or connection issues to go through. Well if it's a requirements thing then I understand. I was just really about the idea of 'throw the whole thing away instead of solving the actual issue'.
|
# ? Feb 20, 2012 20:20 |
|
Chasiubao posted:Well if it's a requirements thing then I understand. I was just really about the idea of 'throw the whole thing away instead of solving the actual issue'. Nah, apparently in my company, to set up a database server on the company network, our group would have to give $1000+/month to the IT dept. So the way around it is to use flat databases while still developing.
|
# ? Feb 20, 2012 20:55 |
|
cannibustacap posted:Nah, apparently in my company, to set up a database server on the company network, our group would have to give $1000+/month to the IT dept. That's... retarded. If the end product is going to use a relational database, it should be developed against a relational database for integration testing purposes. Also, I'd recommend against LINQ to SQL as an ORM solution... Microsoft has pretty much openly stated that L2Q is dead. Entity Framework is actively being developed, whereas L2S is not.
|
# ? Feb 20, 2012 20:58 |
|
Ithaqua posted:That's... retarded. If the end product is going to use a relational database, it should be developed against a relational database for integration testing purposes. This, exactly. Find some way to virtualize or grab some old machines and make a development LAN for yourselves (that's actually what I'm doing).
|
# ? Feb 20, 2012 21:04 |
|
aBagorn posted:This, exactly. Hell, as long as the schema is source controlled and updated as part of each release, there's nothing wrong with having a local SQL instance to develop against. You can even use SQL express at that point, which has a 2 GB database size limit.
|
# ? Feb 20, 2012 21:07 |
|
Ithaqua posted:Hell, as long as the schema is source controlled and updated as part of each release, there's nothing wrong with having a local SQL instance to develop against. You can even use SQL express at that point, which has a 2 GB database size limit. Yes I forgot to mention that, which is funny because I'm doing exactly that with an application I'm beta testing on our help desk. The website AND db are both hosted on my workstation.
|
# ? Feb 20, 2012 21:12 |
|
aBagorn posted:Yes I forgot to mention that, which is funny because I'm doing exactly that with an application I'm beta testing on our help desk. The website AND db are both hosted on my workstation. But what about SQL Compact? Isn't that a flat file "virtual" database system? How come that is giving me grief when I try to connect to it?
|
# ? Feb 20, 2012 22:38 |
|
cannibustacap posted:I seem to be having trouble connecting to my local SQL Compact database. Is your database actually encrypted? If not, I think you're freaking SQLCE out by specifying a password (even though it's blank). If it is, include "Encrypt Database=True" into your connection string.
|
# ? Feb 20, 2012 22:45 |
|
boo_radley posted:Is your database actually encrypted? I've tried like every combination, including the password field, putting a full path to the datasource. The "connection" variable still reports it being closed. I even followed these instructions to the T http://msdn.microsoft.com/en-us/library/bb655884%28v=vs.90%29.aspx EDIT: I even tested the connection within the Visual Studio "Modify Connection" dialog box and it connects just fine.. Does this help: ((System.Exception)(connection.ServerVersion)).StackTrace " at System.Data.SqlClient.SqlConnection.GetOpenConnection()\r\n at System.Data.SqlClient.SqlConnection.get_ServerVersion()" cannibustacap fucked around with this message at 23:20 on Feb 20, 2012 |
# ? Feb 20, 2012 23:11 |
|
I think I may have stumbled on the answwer.code:
Hurray! That seemed to work. cannibustacap fucked around with this message at 23:54 on Feb 20, 2012 |
# ? Feb 20, 2012 23:33 |
|
Ithaqua posted:You can even use SQL express at that point, which has a 2 GB database size limit. I think it's 10gb.
|
# ? Feb 21, 2012 00:05 |
|
epswing posted:I think it's 10gb. Ahh, I was wrong in two ways! It used to be 4GB, 2008 R2 is 10GB.
|
# ? Feb 21, 2012 01:34 |
|
I want to put a little spinning "busy..." icon in the corner of a WPF app when it's doing it's thing. What's the easiest way to do this? What keywords should I be searching for? It seems like the kind of thing that has eight billion terrible ways to do it, so I want to avoid those. e: I know absolutely nothing about images and graphics and whatever in WPF. I've only used controls like text boxes and buttons and stuff. I do have the event stuff set up - I just need the graphics end. raminasi fucked around with this message at 00:49 on Feb 22, 2012 |
# ? Feb 22, 2012 00:45 |
|
Here's one: Better WPF Circular Progress Bar Put that in your view and bind its visibility to some property on your view model which indicates that your program is doing its thing.
|
# ? Feb 22, 2012 01:10 |
|
GrumpyDoctor posted:I want to put a little spinning "busy..." icon in the corner of a WPF app when it's doing it's thing. What's the easiest way to do this? What keywords should I be searching for? It seems like the kind of thing that has eight billion terrible ways to do it, so I want to avoid those. In Silverlight I use a BusyIndicator so I would imagine there is a similar WPF version.
|
# ? Feb 22, 2012 01:14 |
|
GrumpyDoctor posted:What keywords should I be searching for? Throbber.
|
# ? Feb 22, 2012 02:00 |
|
Something interesting came up today. I have some ideas about how to approach it, but I want to bounce it off of other folks. We have a WCF service that exposes its configuration via a service. The configuration client requests the current configuration from the service, which is delivered as XML. The XML is deserialized and presented via a UI. Make some changes, save it, XML is serialized and sent back to the service, which validates it and reloads the configuration. Some of you are already thinking of what I realized today: What if User A and B both get the same configuration file, but then both change settings and save them? Answer: Whoever hits "save" first loses their changes. So, obviously, we want this to not have users' changes get mysteriously "eaten", but be as frictionless as possible. Option #1: The easiest option is to version the XML file at the root element. Service can check the version on a save request, and say "I sent you version 1234, but now I have version 1240. Save failure!", discard the changes, and the client can be alerted that an error condition occurred. That would work and be pretty low-effort, but we have the very real use case of multiple, independent pieces of configuration data that simply don't have any bearing on one another. So, option #2: Put a GUID fingerprint, an "IsDirty" attribute, and a version on every element. Write a bunch of code to match everything up and merge what's safe to merge, fail the entire transaction if there's an irreconcilable change. I hate this option. Option #3: I'm not entirely sure about the feasibility of this last one (I'm going to write some POC code before bed!), but it seems like it would be easier to just send the dirty elements as XML fragments, assuming the fragments contain a fingerprint and a version. It's the same basic idea as #2, except less XML parsing/traversal fuckery on the server side. I'm leaning toward option 3, but I can be convinced otherwise. Does anyone have an option #4?
|
# ? Feb 22, 2012 03:27 |
|
I am facing a similar problem currently, and I think the best solution is somewhere in between. Break down your data into arbitrary units (whatever works best for your data). Each unit is versioned and saved individually. Have a save method like this (pseudocode):code:
code:
|
# ? Feb 22, 2012 03:46 |
|
#1, but merge the changes and only reject it if there's actually any conflicting changes. This requires storing every previous version, but you probably want to be doing that anyway. Appropriately formatted xml diffs very well. Maybe-not-comedy-option: store the config as a xml file in a git repo and let git do this for you.
|
# ? Feb 22, 2012 03:52 |
|
Sedro posted:Merging is a possibility but that gets really complicated. Think about the amount of effort vs. how many people will realistically configure this service concurrently. Unfortunately, the answer is probably "quite a few". This application is going to be seeing widespread release, so if even 1% of the users do it, it's still potentially thousands of people.
|
# ? Feb 22, 2012 04:39 |
|
Ithaqua posted:Unfortunately, the answer is probably "quite a few". This application is going to be seeing widespread release, so if even 1% of the users do it, it's still potentially thousands of people. This smells to me like a larger issue. Is it impractical to have a configuration per user?
|
# ? Feb 22, 2012 06:09 |
|
Option #4: Use a database.
|
# ? Feb 22, 2012 06:34 |
|
Using a database won't magically solve those problems.
|
# ? Feb 22, 2012 06:41 |
|
Ithaqua posted:I'm leaning toward option 3, but I can be convinced otherwise. Does anyone have an option #4? Yes. Don't re-invent what is a VERY standard and well-solved problem! I read an interesting blog recently from a game developer who faced the same problem with multiple artists on the team modifying entities in his 3d world. So he abandoned XML, switched to a diff-friendly text format, split his configuration stuff up into more smaller files, spent some effort designing a storage format that was going to be friendly to standard diff tools, and went with that. Alternatively: your option 1 is a pretty standard solution to the same problem.
|
# ? Feb 22, 2012 07:00 |
|
I need to perform an action one time after my assembly is loaded, before the assembly is used. The action is to configure a third-party library, so not my horror. This is not an executable so I don't have an entry point I can rely on. Is there a good way to handle this?
|
# ? Feb 22, 2012 21:36 |
|
Sedro posted:I need to perform an action one time after my assembly is loaded, before the assembly is used. The action is to configure a third-party library, so not my horror. This is not an executable so I don't have an entry point I can rely on. Is there a good way to handle this? You could use a static constructor but it's only called right before a static member is referenced. The code using your assembly could use the AppDomain.AseemblyLoaded event to call a setup method on your assembly which seems clunky. Just curious why can't you put the setup code in your classes constructor? If there are multiple classes have one base class that does all the setup with the third party configuration
|
# ? Feb 22, 2012 21:52 |
|
My solution right now is to call a setup method in the cctor of every class which uses the third-party library. But I just made a new class and forgot to have it run the setup method, so it would be nice to have it all in one place. I don't know how I could use the assembly load event, because I would need a single point of entry to attach an event listener. Edit: I don't want to put this logic in the executable which uses the assembly.
|
# ? Feb 22, 2012 23:51 |
|
Since I haven't gotten to this chapter in The Art of Unit Testing yet... say I want to refactor a class that currently takes some UserControl from a third party charting library as a parameter, sets up its datapoints, and sets a whole bunch of properties on it. There's a bunch of logic in here that I'd imagine I'd want covered by unit tests before I go mucking about, but of course by its very nature it's coupled to a UserControl - the class basically exists just to set properties on this hulking third party UI element. Am I kind of SOL here? Would mocks be of any help? Since it's a third party component this doesn't really seem like something I could mock, unless maybe I were to wrap the UserControl itself in a class and then make that implement some interface that I'd pass instead of the control itself... And anyway, it seems a large part of what I actually want to test is that I'm not doing something stupid with the chart control's API, which seems pretty heavily dependent on the chart control behaving like a chart control. Which I guess means this isn't really unit testing at all, it'd be more of an integration test. Eh. I guess I don't get what real world unit testing looks like yet, since I'm the only one doing it where I work. I'm just sort of making it up as I go. What does unit testing start to look like once you start mixing in big third party libraries?
|
# ? Feb 23, 2012 05:29 |
|
Sedro posted:I need to perform an action one time after my assembly is loaded, before the assembly is used. The action is to configure a third-party library, so not my horror. This is not an executable so I don't have an entry point I can rely on. Is there a good way to handle this?
|
# ? Feb 23, 2012 05:42 |
|
Malacola posted:Since I haven't gotten to this chapter in The Art of Unit Testing yet...
|
# ? Feb 23, 2012 06:24 |
|
|
# ? Apr 25, 2024 02:31 |
|
Sedro posted:I need to perform an action one time after my assembly is loaded, before the assembly is used. The action is to configure a third-party library, so not my horror. This is not an executable so I don't have an entry point I can rely on. Is there a good way to handle this? Can't you just wrap all access to the 3rd party stuff in your own wrapper class(es) and make sure to correctly initialize it there?
|
# ? Feb 23, 2012 09:24 |