« first day (1418 days earlier)      last day (3523 days later) » 

12:01 AM
I'm assuming I need to do more to my listbox than make it an observable collection to have it update my UI.
 
For a UI to see changes to a collection, all that is required is INotifyCollectionChanged, which ObservableCollection implements.
 
 
1 hour later…
1:37 AM
mhmmm
how would I write a 1 producer (my app) and 2 consumer (ILogger, IMessageBox) kind of thing?
i.e. my application needs to notify user of error, so its calls something like Notify.Add(string message), where both my logger and messagebox service will report the info
aka a way to not have to all logger.Add and notify.Add or whatever
 
 
4 hours later…
5:26 AM
Hello. Why when i add new folder to my project in explorer, this folder not visible in tfs?
 
6:03 AM
it has to be added to your project seperatly
 
@SebastianL how can tfs autodetect new folder? (without visual studio)
 
6:57 AM
@GLeBaTi i think there might be a subversion plugin which is capable of doing this, but i've never used it. A second approach could be to write a tool which edits the csproject file as necessary
 
 
2 hours later…
8:41 AM
15 hours ago, by Pinkey
give me solution please
Lol.
 
 
3 hours later…
11:22 AM
i have deveolped a crystal report for generating the id cards. now i want to show two student's id card in a row (Means 2 column format). Currently i can display 1 id card in a row
 
@yogi970 is that report dynamically generated, or did you built it with the designer?
 
@SebastianL number of fields are fixed but values are coming form db
 
@yogi970 then you have to update the template
 
@SebastianL means i have to make a two format report ?
 
@yogi970 yes
@yogi970 a workaround would be to print multiple sites of this report on one page
 
11:27 AM
@SebastianL is there any other way to this dynamically
?
@SebastianL i can't get u
 
@yogi970 in my experience generating a reporttemplate in runtime is not an easy task. And with the workaround i mean your printer has the ability to print for example 2 pages on one, by resizing them to half of their size. The same could work to display two columns
i would just provide two reports
 
@SebastianL ok.Thank a lot
:)
@se
@SebastianL hey is there any method to generate report in local language (HINDI) from data stored in db (in ENGLISH only)
 
@yogi970 to handle translation we use a whole table which contains translated english data to the requested language, but you have to add every used phrase.
so you can do something like this before displaying the data: data = getTranslation(data, languageenum.Hindi);
 
11:45 AM
@SebastianL but for the dynamic data i thinkit will fail
 
12:00 PM
@yogi970 you could use google API for translating, but i do not know how acurate this would be
 
Can anyone explain why this if statement is getting skipped? Here's the debug but I'm not really understanding why. The blocked code is equal to a reasoncode gyazo.com/fce09ac10c59a9020802d0ac2e36ef4d
 
@Shaun Because it's not equal.
 
How though?
 
@Shaun You're comparing "DL" with "DL,Bla,Bla,Bla,Bla"
That's not the same thing.
 
Oh.
How do I just compare from one then?
 
12:12 PM
blockedCodes.Split(',').Contains(uaType.whateverItWasNamed)
Do you see why I do this?
 
Could you explain? ^^
never seen the .Split term before
 
"DL,Bla,Bla" is a string. You want it to be a Collection of some sort, so I'm assuming that all values are split by comma. By doing .Split(','), I get a collection with each value seperated. Then you can easily use the Contains function to determine whether something is in the collection.
 
Oh, wow. That worked, thank you so much :3
Wish you could give upvotes on here somehow ^^
 
Upvote one of his answers.
 
Ah yeah. Upvoted your latest answer. Thanks buddeh :3
 
12:28 PM
Lol. Not necessary, but thanks I guess. You're welcome
 
12:41 PM
Sure @Shaun, go ahead.
 
In the same kinda context, how would I do it so if that ReasonCode contained something equal to the first value of the blockedCodes string
if (blockedCodes.Split(',').Contains(uaType.ReasonCode))
 
Take(1).Contains(...) is one way to do it.
 
and would the 1 be equivalent to blockedCodes?
if (Take(blockedCodes).Contains(uaType.ReasonCode))
That's not right is it haha :'3
 
Take(1) means take 1 value.
From a collection.
So you'd do
 
Hi hi, relatively new with programming. Anyone who could help me with a really quick thing on my code?
 
12:52 PM
if (blockedCodes.Split(',').Take(1).Contains(uaType.ReasonCode))
 
Ooooh!
 
Get it now?
 
That makes far much more sense ^^'
 
:)
 
I do :3
 
12:52 PM
Goodo.
 
0
Q: How do I call one item at a time stored in my list object?

user6225I am creating an application using ASP.NET 4.0 Web Forms for a friend who organizes parties and she wants to ask who will bring what(i.e. sides, meat, desert) to a list of her friends. I already have a undetermined number of friends in stored in my index via Microsoft SQL Management Studio and ...

 
What's wrong, @tatu?
 
0
A: C# 'Basics.Product' does not contain a definition for 'ProductGroup'

Weyland YutaniFurther to Chris's answer, I think it might help giving the property a different name than its type. When starting out it can prevent possible confusion. Eg: public Product(string name, ProductGroup group) { this.Name = name; this.Group = group; } public ProductGroup Group {get; set;}

It's in the comments section of Chris, I could put my current code up on pastebin or something but that would require me to translate it to English first... Variables and class names are in Finnish right now
 
Your group object isn't a string
It's a ProductGroup
 
I'll upload my current non-translated code on PasteBin, a sec.
 
12:55 PM
Is it possible to give application settings two sets of strings, or can it only be one set?
 
@Shaun Truly whatever you prefer. There aren't many limits in our world of programming :P
 
I hope you can understand it :o
 
Lol why would you write code in English and Finnish
That makes no sense to me
 
@Sippy I thought it would be easier for people to understand it if I translated it into english
 
12:56 PM
So I could add another set of blockedcodes to this: http://gyazo.com/9fed48dd46aa405d440156f9d5ee9066
with a + symbol or something?
 
But this assignment requires me to write the classes for the Main()
So I can't just give them english names as I would usually do because the assignment is in Finnish
 
@Sippy Yes, well, nobody here is going to read your native language. Most companies, though, wherever they are, code in english.
 
How would I go about calling one object at a time in a dynamic list object?
 
@Tatu No, your 'Finnish' code, it's not coded in Finnish. Your var names are just Finnish. It makes no sense to me that you use a language written in English and use Finnish var names is all
To each their own though I guess.
 
Sorry, I propably explained myself a bit poorly.
 
12:58 PM
did I ask this incorrectly?
 
But you get what I meant with it, anyways.
 
Just be patient obadiah, it's busy in here :3
 
@Tatu I do, I don't get what your issue is with the code though. What's going wrong with it?
 
Cannot implicitly convert type 'object' to 'OlioohjelmoinninPerusteet.Tuoteryhma'. An explicit conversion exists (are you missing a cast?) @Sippy
 
@ObadiahWilliams If you have a dynamic list object and you wish to operate on each item in the list, use a foreach loop.
 
12:59 PM
The program has to output this Kodinkoneet: Kahvinkeitin 49.90
Kodinkoneet: Mikroaaltouuni 99.90
Yhteensä 149.80
I'm terribly sorry because the assignment is in Finnish
 
@Tatu Would your professor truly be disturbed that you use English names? :/
 
public Product(string name, object ProductGroup, decimal price)
{
     this.Price = price;
     this.Name = name;
}
object ProductGroup
That
Is wrong.
 
Roel/Sippy, is it plausible to have two sets of strings in a settings file? (example: gyazo.com/9fed48dd46aa405d440156f9d5ee9066)
 
@RoelvanUden It's not that, but we have a program which automatically checks it. The program won't accept it if my var & class names are not the same as in the assignment
 
Omg, automatic checks for code assignments. Way to limit your students!
 
1:02 PM
That's gay.
 
Lazy teaching ;p
 
Tatu I just spotted your problem btw
 
@Shaun Sure man, no problem. I have 30+ settings here. :P
 
object ryhma;
 public Tuote(string nimi, Tuoteryhma ryhma, decimal hinta)
 
Oh ahaha, do you seperate them with a plus sign
 
1:03 PM
@RoelvanUden I know that, it's damn retarded because the students can't solve a problem in a more efficient way or so, it just keeps limiting us.
 
@Shaun Just make another entry in your settings file
 
Sippy, what's up with it?
 
Change rhyma in your class to be of the type Tuoteryhma, as opposed to type object
 
Oooh, but I kinda need it to have the same variable name, is that not possible?
 
Sippy, how do I do that?
 
1:04 PM
Replace the word object
 
I'm sorry for my noobish questions ~o~
 
Everyone starts somewhere.
Shaun, use the same var lol
Just assign to it more than once?
 
Sippy, what do I replace it with?
 
@Sippy Ahah, we can see that Universities have started again :-))
 
@RoelvanUden That we can.
For once I'm not the one asking the questions :P
 
1:05 PM
Aha, tsssh who needs University when you can be an apprentice x3
 
Ben
anyone have experience using watin?
 
How can you assign to it more than once in a Settings file? (this is genuinely my first time using Settings before)
 
Why would you use Watin?
 
Ben
as opposed to?
 
Wouldn't downloading VS help you a bit more?
 
1:07 PM
 
Ben
writing watin code I mean?
 
@Shaun Just add more ^^'
 
@Tatu WatiN = Web Application Testing In .Net
 
Oh I'm sorry, I misread
I thought it was an online IDE lol
 
Ben
@Sippy do you have experience?
 
1:08 PM
@RoelvanUden I don't think I'm explaining very well xP I need another set of BlockedCodes with the same variable name, but they'll be different two letter codes. But they can't be in that comma seperated string.
oops
was meant to be Roel
 
@Shaun I don't honestly know what you're doing. Never used that settings thing before :P
 
@Shaun Uh, confused. Why do you need different content with the same variable name? It makes very, very little sense.
 
@Ben Sorry, no.
 
@Roel I need my code to be able to differentiate from which BlockedCodes to use as there are two sets and possibly more to be added. However my spec says I have to make it so that no code changes would be needed, so I guess I need them to have the same variable name?
 
@Shaun wat
 
1:11 PM
lmao :'3
 
Uh, make a collection out of them. Weird spec! What is the purpose o_o
 
It's so hard to explain D=
 
lmao I just can't find a way to convert my ryhma into a string
 
The purpose is to block out any codes from the existing app, but if another dev needs to add another collection of BlockedCodes then they won't have to make any code changes
 
@Tatu Why need it be anything other than a string to begin with?
@Shaun So the idea is that you need to be able to modify the collection of blockedcodes without hardcoding it?
 
1:13 PM
Let's see how would I explain it
 
The BlockedCodes will never get modified, but there may be another set of BlockedCodes added as a different variable, but I can't change the hardcode no
so like the existing BlockedCodes are called BlockedCodesTP but in the future someone may add a BlockedCodesXC
 
I need ryhma to come out as "Kodinkoneet" when it's printed but instead it comes out as Olioohjelmoinninperusteet.Tuoteryhma, @Shaun
Uh, I mean @Sippy
Sorry @Shaun
 
So like, is there a way to decide which set of BlockedCodes to use?
 
@Tatu rhyma is not a string. rhyma is an object. When you print rhyma, it prints the type of object that ryhma is because it is not a string and it will not behave as one.
If you need rhyma to be a string, you need to specify that it is a string, not that it is a Tuoteryhma
If it IS a Tuoteryhma, then your Tuoteryhma needs to have a string inside it.
And then when you print that string, you will need to print the string inside your rhyma object.
 
Let me go ahead and translate this code really quick, so the variables and classes are in english
 
1:17 PM
:P
 
easier to understand, I don't quite grasp what you mean so maybe that helps
 
My description will likely not change.
But go ahead.
@RoelvanUden Coming off web forms project by next week. So happy I could cry.
 
What do you do Sippy? :)
 
ASP.NET developer
 
@Sippy Awesome! Finally! Don't let them extend it!
 
1:21 PM
Supposed to be an ASP.NET MVC developer
 
MVC D:
I did that in my training
 
But I'm not being allowed to do what I want atm >:(
 
I hated MVC
 
Why's that?
 
Just seemed so confusing and fiddly.
 
1:22 PM
Why would you hate that? :-O
 
Far from it, it's well structured and organised
 
I'm working on webservices at the moment
which is just as awful
 
Admittedly starting out I found it a bit much to get used to
But when you get your head around it
It's very easy to work with.
 
yeah the main problem was the concept behind it
like I didn't understand why you had to do half of the stuff
 
It's 100x better than web forms :P
 
1:23 PM
seperation of concerns is a GOOD thing
 
I quite like web forms ^^'
 
@RoelvanUden ^
 
A 100x? More like a 1.000.000 times!
AHHH WEB FORMS NO BURN IT WITH FIRE
 
xD
 
Allright @Sippy pastebin.com/zdRDP7kv
 
1:25 PM
I'm only a beginner coder, but when my work sent me to do MVC training it was the worst week ever :'3
 
I can see why ASP.NET MVC may be overwhelming for a novice.
 
1 week isn't really enough time to get your head around it.
 
But as you progress, you don't want anything else.
 
For me it was akin to getting my head around OOP for the first time.
 
I'd only really done the basics in C# then as well so it fucked my head so much
Now i've got a perpetual fear of it ^^'
 
1:28 PM
@Tatu Yeah that's not going to work. You're trying to push a round peg into a square hole.
You're saying you have a string, and you want your string to equal a ProductGroup.
You're not saying you want your string to equal the name of the ProductGroup.
 
What's the correct way of doing what I want to do?
 
this.Group = group.Name
Because the Name property of your ProductGroup object is a string
That represents the name of your ProductGroup.
 
I'm an idiot
 
Does that make sense to you?
What you were trying to do before is akin to uhhh
 
Yes, it makes a ton of sense now
Now it actually runs
 
1:30 PM
Say you wanted to write the name on a whiteboard, you were putting the group of people on the whiteboard and saying YOU ARE A NAME
 
But the problem is that it's still not outputting "Home appliances"
 
And of course a group of people are not a name, they're a group of people who can have a name.
 
Just noticed you're from UK Sippy, where abouts? ^^
 
As a group.
 
It's outputting ClassBasics.ProductGroup as a string instead of the name I want from the property
 
1:31 PM
@Tatu That's because the ProductGroup object you're putting in is the Home Appliances one.
That could be due to a poorly formatted loop or something.
uhhh wat
@Shaun I'm from Wiltshire.
 
@Sippy Nevermind I was stupid once again, you fixed it for me
Gave you stars for that, thanks a ton!
 
@Sippy Gonna be honest, I had to google maps that
 
@Tatu Lol, thank you I guess? :P Those stars are kinda just like 'Liking' something on Facebook :P
 
Haha I don't understand how that concept works, have some facebook likes then
 
Woo!
@Shaun It's a pretty big county :) guessing you're not from the UK? :P
 
1:34 PM
No I am aha, I'm from Newcastleish
 
LOL
 
I just say Newcastleish because nobody ever knows the place I'm from x3
 
Lol, gimme a shot.
 
Durham
 
I know Durham lol.
 
1:37 PM
maybe you'll know the uni
I just say Durham because you deffo won't know the eral place
but Durham is really close
:P
 
Go on where's the real place
 
Why does this produce a 5th position (array with a length of 5) with a blank "" value?
string[] lsToAddresses = "email1@email.com; email2@email.com; email3@email.com; email4@email.com;".Split(";".ToCharArray());
 
Darlington
 
that was the code I found.. I changed it to:
string[] lsToAddresses = { "email1@email.com", "email2@email.com", "email3@email.com" };
and of course it is fine now.. but cant figure out why they would have coded it the original way..
 
O my, the school children are here.
 
1:54 PM
Ugh. Users. What weird things they do...
 
@Shaun I've heard of Darlington.
 
@Sippy No matching message (are you sure we're in the right room?)
@Sippy That didn't make much sense. Use the !!/help command to learn more.
@Sippy No matching message (are you sure we're in the right room?)
 
fu too then cappy
 
Morning everyone.
 
2:10 PM
Has anyone worked with the salesforce toolkit library?
Morning all
 
2:26 PM
Has anyone actually used Xamarin in production or otherwise?
 
0
A: Secure windows Impersonation c#?

GregUpdate: You could implement an encrypted app.config. You can do this through several different approaches: Protecting Connection Information Windows Data Protection So how this would work, is when an Administrator inserts the credentials you would decrypt the app.config modify the key/value...

That is a good question, can someone review my answer.
 
@KalaJ Xamarin for mobile or plain 'ol Mono?
 
mobile
 
Personally, no. A good friend (and experienced programmer) speaks highly of it; he uses it often. Anything specific you want to ask about it? :P
 
Seems hard and buggy to set up. Just wondering if it's worth the effort
and how it compares to native Android?
 
2:34 PM
It was pretty easy to set up for me. You just get Xamarin Studio and the SDK of the target platform. You then make an Emulator and run it on the emulated device. Pretty straightforward.
It's not Java. That's one hell of a whooping plus.
Otherwise it just wraps around all the native stuff and there's not much difference in the end result, if any at all. Mono may use a little more memory initially, because it loads a bit of the runtime, but it's not much.
 
Roel
 
Actually not sure if you know but how would I write up the C# android app?
Would I still use intents and fragments and listviews?
like i normally would for Java
(Haven't done windows phone dev before. Do I just use windows phone framework?)
 
@RoelvanUden
I've had to change my if statement a bit to accomodate the fact that there might be more than one BlockedCodes

if (propp.Split(',').Contains(uaType.ReasonCode))
{
is what it is now. propp =

string searchString = "BlockedCodes" + sector;
SettingsProperty propp = MyRosterService.Properties.Settings.Default.Properties[searchString];

now however when I try use the .Split on that I'm getting the error message:
'System.Configuration.SettingsProperty' does not contain a definition for 'Split' and no extension method 'Split' accepting a first argument of type 'System.Configuration.S
 
@KalaJ Drag 'n drop baby! But yes, intents are still around -- that's the OS mechanism after all, but you don't have to use it. You can use more generic approaches that translate to intents under the hood. You use the full .NET framework, or parts that are supported. PCL support is there, too, so you can make it cross platform for iOS, Android, WP, Windows Store, and desktop, Linux and Mac. :P
 
@RoelvanUden, drag and drop like XAML WYSIWYG lol
 
2:43 PM
@KalaJ Drag and drop actually works if you have decent panels. But if that's not your thing, you can hand-code everything. ;-)
 
Okay I'll check it out
 
ew, never drag/drop xaml
 
anyone good with web services?
 
yeah I learned the hard way after working with xaml in WPF
now I just set everything in the code and just use the viewer to see how it looks visually
 

« first day (1418 days earlier)      last day (3523 days later) »