« first day (2151 days earlier)      last day (2796 days later) » 

11:02 AM
Who cares?
 
You can't know what's important.
 
as long as you can do what others can't.
 
Leaving out the whole situation/context where a certain pattern is well suited makes you know patterns without their applications. That seems.. redundant. I don't know any pattern without knowing why and when to use it. That said, I barely know any pattern at all
 
@ARr0w Dude, you're consistently asking vague and unspecific questions, then getting pissed that people aren't falling over themselves to help you. You want help? It's your responsibility to make sure people udnerstand you. No-one else's.
You asked me, personally, a question yesterday. I asked a clarifying question, which you ignored, then got pissy and left because no-one would help you.
 
i'll make sure i create a proper question.
from now on.
later, @AvnerShahar-Kashtan and 100 others. :D
got to run for home.
 
11:10 AM
Friendly fellow.
 
Funny fellow*
 
Huh. Interesting. I got a bug, I know what happens that causes it, I know what exactly goes wrong, I can't find where the third item on its list comes from for the life of me.
 
@RoelvanUden It's mine, I'm sorry. I added it.
 
( ͡° ͜ʖ ͡°)
 
Damn youu!!
 
11:14 AM
We had a weird bug the other day. On a test machine, something kept creating databases. We would erase them, and they would be recreated. (This is EF code first, so anything accessing the tables would create them).
We stopped our services. We killed all processes. Still, it kept coming back.
 
Until you found some guy running on his local machine connecting to dev? :P
 
We ran the SQL Server profiler, and it showed connections from the local Administrator account. We had nothing running on that account.
 
Damn. What the fuck :D
 
It was a wizard.
 
Turns out, the server was one of several cloned VM instances, made after the DB was installed. Each was later renamed, but the SQL server was still set to the original hostname. So code running on a different machine accidentally connected to our machine.
 
11:16 AM
Ahhhh :D
 
MSSQL was running on host MACHINE_A, but it advertised itself on the network as MACHINE_B.
Someone on MACHINE_B thought he was connecting locally, but was actually connecting to our machine.
Magic.
 
Wizard #Confirmed
 
So something launches a thing when switching to this app.. but I can't find it.
 
What do you mean tho
 
I have a mobile app. It can mutate state and re-render through a rendering pipeline. This only occurs when you, the user, initiates a change of some sort (clicking a button or whatever). Somehow, a change is being ran when you switch back to the app. But only on Windows Phone, not Android or iOS. #confusing
 
11:24 AM
Hello
 
Found it! :D
 
Hmm
Nice ! :)
 
Thanks rubber duckies.
 
Can we ask programming questions here?
 
Yes.
 
11:25 AM
Only if you solemnly swear that you are up to no good.
2
 
are u familer with NAudio? ive been stuck on a problem for like 2 days now
yes i do
 
Im not familiar with NAudio.
but, ask the Q anyways as long as it i C# related
 
ok, can i just just post a link to the question on so? it didnt get any responses
i was hoping someone here could help
 
@RachelDockter Never used it, but you can ask anyway. Roel just used us successfully as a general-purpose sounding board, so that sometimes works.
 
ok this is the question im stuck on
0
Q: C# NAudio library, Cant list codecs in combo box

A-Jay Beeim a beginner with programming so bare with me. Im trying to list all the codecs possible for audio compression in a combo box. NAudio have source code and a demo application which im trying to emulate in my form application. If anyone can help me, their source code is here. So they have about 7...

i had to ask from my roomates account because im not allowed to ask anymore questions lol
 
11:27 AM
Uhm. That's never a good sign. What'd you do?
 
That isn't an NAudio question. It looks like a MEF question.
 
i think it was just because my questions were bad format and it seemed like i just said "give me the answer"
i have no idea what MEF is
 
You're using an ImportMany which is part of MEF, yet no initialization calls of MEF.
So, that value is always null, hence boom. Read up on MEF
 
@RoelvanUden should i know about MEF in asp.net? Or to what section does it fall?
 
[ImportMany] is magic, but for the magic to work you have to set up the smoke and the mirrors.
 
11:30 AM
@ElieSaad Extensibility.
 
so i should look into "how to initialise MEF"?
 
@ElieSaad It complements dependency injection frameworks.
 
would that work, im pretty bad at programming
 
MEF is usually used for plugin-like features.
 
if you are a beginning C# programmer then MEF is going to be a bit over your head, TBH.
 
11:31 AM
Oh great, tomorrow i am looking into DI, has it on my tabs been some time.
So I go DI -> MEF? Or is there anything before?
 
Like.. I have this interface and if you implement it and drop your DLL into said folder, I'll see it and use it. Extensibility, plugins, whatever. Not exactly useful if you don't want others to add 'dynamic' extensions
 
im confused already lol
 
Albeit MEF can also scan your own app domain and whatnot but that irks me.
 
in my situation, is it litrally a one line thing to initialise it?
 
It is not.
 
11:32 AM
uh jesus
 
@RachelDockter you took out one small part of the demo app and missed all the other stuff that makes it work. The code you copied is meant to list all of the codecs NAudio has written a plug-in for, but you didn't copy any of the naudio plugins.
 
You'll have to set up a MEF container, point it where to find implementations, and tell it to load it up.
 
yeh the demo app is huge and uses panels isntead of forms
 
@ElieSaad DI is an important architecture and design concept to know and use. MEF builds on top of that to give you easy plugin extensibility on top of your DI framework of choice.
 
@RoelvanUden I think you gave me a small context
@AvnerShahar-Kashtan Awesome! Tomorrow after i am done, i am hammering you guys if i have any questions
 
11:34 AM
Yeah :3
 
@RachelDockter but the code you're missing is here
 
The chats require +1 stuff :P
 
i saw that yesterday and tried to copy it but i got an error or something
thanks for confirming michael, im going to try again
 
that reminds me of the devexpress demos.
like 100000000000000000000000000000% overcomplicated for a demo.
 
hey michael i think ive only got 1 error, do u know what new ExportFactoryProvider(); is?
 
11:41 AM
I find devexpress to be kind of clutterfuck all the way.
 
I can guarantee you that you have more than "just one error", but...
 
lmao have faith
 
I'm pretty sure that's part of MEF. did you include the using statements?
 
im missing using Microsoft.ComponentModel.Composition.Hosting;
im looking for it atm
 
so, let's back up a second. because seriously you're digging yourself into a hole for, I suspect, no reason.
> Im trying to list all the codecs possible for audio compression in a combo box
^-- list all the codes from where ?
 
11:47 AM
i think from my soloution explorer, theres like 7 .cs files which im pretty sure resemble codecs
 
do they all say things in them like:
[Export(typeof(INetworkChatCodec))]
    class G722ChatCodec : INetworkChatCodec
 
yeh thats it
 
well that part's at least right.
then you "just" need to figure out MEF.
 
tbh id be happy getting rid of all the codecs except 1 and just use that by default without MEF
seems more effort than its worth though
i think if i just find this missing reference Microsoft.ComponentModel.Composition.Hosting;, ill be ok maybe
 
MEF "more effort that its worth" <--pretty much spot on
 
11:51 AM
you don't have the MEF bits installed.
I think that's part of PRISM
 
oh dont say i need to install other stuff
 
if you wanna see "more effort than it's worth", go get PRISM
 
i know your not that familer with the code but is there any way i can just scrap the whole mef and just use 1 codec?
 
You have to add assemblies for the MEF stuff
 
yes. scrap the whole MEF thing and just use the one codec.
 
11:53 AM
@Squiggle Unless you have a good reason for using it.
 
@RachelDockter or add all of the codecs by hand to an collection
 
How far away am i :)
 
hey hey anyone knows any decent library to export lists to a file?
like csv xls xlsx etc
 
@Bechi yes that sounds alot better, is there an easy way to do that?
 
11:54 AM
which is not interop
 
var codec = new TrueSpeechChatCodec ()
 
closedxml for excel related formats
 
alright
 
ok hold on
 
it's pretty neat
 
11:56 AM
not a nuget?
 
Yes, it is
 
If you have the cs files of the codecs, and you know that all of them have a class that implements the INetworkChatCodec, you coudl do sometzhing like:

ObservableCollection<INetworkChatCodec> _listOfCodecs = new ObservableCollection<INetworkChatCodec>();
_listOfCodecs.Add(new TrueSpeechChatCodec ());
(...)
 
thanks Ill check it out
 
@misha130; for csv you can just use Linq and string.Join()
string.Join(',', collection.Select(property))
 
I dont remember the syntax and I am a tad lazy
 
11:57 AM
hold one 1 second pls
 
I figure it would be more complex
 
@MichaelEdenfield Prism, at least, is relatively modular. We don't use regions and View injection, but we use some of its utility classes, like EventAggregator.
 
@misha130 Don't over-do it, before you have to :)
 
@MichaelEdenfield if i was just going to add one, where would var codec = new TrueSpeechChatCodec(); go?
i cant make a var variable right at the top
 
@RachelDockter You can put it in the constructor of your main application
The same holds for the ObservableCollection mentioned above
 
11:59 AM
so here? Application.Run(new Form1());
sorry if im being stupid
 
I would put it in the constructor of Form1
You could search for something like "public Form1(" t ofind it
 
@AvnerShahar-Kashtan I have used bits from PRISM, but mostly just the Blend SDK.
 
ok yes i have that here public Form1()
{
InitializeComponent();
PopulateInputDevicesCombo();
PopulateCodecsCombo(Codecs);
}
so i put it below initialize component right?
 
Yes, you can do so.
Do you see how "Codecs" is defined?
it msut be somewhere around in the same cs file
 
is it defined by this? IEnumerable<INetworkChatCodec>
 
12:03 PM
Yes!, and actually this is the lsit of codecs you want to fill.
you could change the definition to List<INetworkChatCodec> or ObservableCollection<INetworkChatCodec>
or, wait, don't change it's definition
 
ok i changed to list, ill change back
 
just add three lines to the "public Form1" constructor
 
ok what 3 lines should i add
 
Codecs = new ObservableCollection<INetworkChatCodec>(); // This creates a collection that will hold all your codecs, it is needed to be displayed in your combobox
Codecs.Add(new TrueSpeechChatCodec()); // here you add one of the seven Codecs you have
(...) // Add the other six codecs the same way as before
Just put it right under your
InitializeComponent();
 
ok done that, should i change public IEnumerable<INetworkChatCodec> Codecs { get; set; } to a list again?
because i cant add to that
 
12:07 PM
I don't think so. I understand that problem. Give me a second please...
 
ok no problem, thankyou so much for helping me
imgur.com/a/Thd2F thats what i have atm if that helps
and i moved InitializeComponent(); to the top
 
public Form1()
{
InitializeComponent();
ICollection<INetworkChatCodec> _collectionOfCodecs = new ObservableCollection<INetworkChatCodec>(); // This creates a new temporary variable which holds a collection of codecs. The difference to the case above is that it uses the interfacetype ICollection. ICollection knows the add method.
_collectionOfCodecs .Add(new TrueSpeechChatCodec()); // Add to the temporary variable instead of "Codecs"
(...)
Codecs = _collectionOfCodecs; // Make Codecs use the temporary collection. This works because every ICollection is an IEnumerable
 
no errors, im scared to run it lol
aha! i added some more codecs and there they are in the combo box
thankyou so much bechi
 
You're welcome.
 
now hopefully i can implement a udp client and server and stream the audio, should be ok tho
 
12:20 PM
 
I think Windows Phone hates me.
 
have u tried an iphone
 
Sure..?
It's like a love triangle. I love Windows Phone, but Windows Phone hates me. I hate iPhone, but iPhone loves me. I'm not sure what the relation between them two is.
 
can any body help me to how to insert ,the next Datatable contents, to the next row in Excel Sheets having Records
 
12:38 PM
>I love windows phone
get out
 
^
 
Anyone good with regex ?
Well, has the basics
 
@Froxer my approach to regex is "if you're trying to solve a problem using regex, you might succeed but then you have a new problem: maintainability"
@misha130 hey don't knock it. Windows Phone is a great OS. It's just... unloved.
 
its for codewars
Need to create logic that

            Assert.AreEqual("hello world",Kata.removeNoise("h%e&·%$·llo w&%or&$l·$%d"), "You failed the test for 'h%e&·%$·llo w&%or&$l·$%d'.");
 
you need regex for that?
 
12:48 PM
//defining bad values
char[] badValues = {'"','%','$','&','/','#','·','@','|','º','\\','ª','"',};
//Creating a instance of a List<string>
List<string> listOfStrings = new List<string>();
//Populating with verbatim strings
listOfStrings.Add(@"%$&/#·@|º\\ª");
listOfStrings.Add(@"h%e&·%$·llo w&%or&$l·$%d");
listOfStrings.Add(@"he%$·ll@o c$&%odi%&ng for ev|#·ery&$$#$on%$·e");
listOfStrings.Add(@"c|o@$%de%w@a·$r%s &rºocªks");
Idk, I need to somehow clean the strings
 
@Froxer I can think of several options. You can iterate over the strings and output non-bad values into a new StringBuilder.
You can use Replace or Regex.Replace.
Regex.Replace being the much better option since you don't have to have multiple Replace calls each creating a new string.
 
I guess i need to convert the characters to .ToString(); to use regex?
 
@Froxer You'll have to convert them to a regex string. Say, new Regex("[\"%$&/#·@|º\\ª]");
 
gonna paste my entire class scope in a sec
to show my code right now
 
char[] BAD_CHARS = new char[] { '!', '@', '#', '$', '%', '_' }; //simple example
someString = string.Concat(someString.Split(BAD_CHARS,StringSplitOptions.RemoveEmptyEntries))
or someString = Regex.Replace(someString, @"[!@#$%_]", "");
 
12:52 PM
Just making sure the comments are clearly stating my thoughts
 
		var noisy = "h%e&·%$·llo w&%or&$l·$%d";
		var result = new String(noisy.Where(c => Char.IsLetter(c) || c == ' ').ToArray());
		Console.WriteLine(result);
that's my solution.
 
10
Q: C#: Removing common invalid characters from a string: improve this algorithm

p.campbellConsider the requirement to strip invalid characters from a string. The characters just need to be removed and replace with blank or string.Empty. char[] BAD_CHARS = new char[] { '!', '@', '#', '$', '%', '_' }; //simple example foreach (char bad in BAD_CHARS) { if (someString.Contains(bad))...

 
War
anyone know why this one 1 form wont friggin validate
jquery unobtrusive validation is always such a hog
 
 var badChars = "[\"%$&/#·@|ºª]";
 List<string> listOfStrings = new List<string>();
//Populating with verbatim strings
listOfStrings.Add(@"%$&/#·@|º\\ª");
listOfStrings.Add(@"h%e&·%$·llo w&%or&$l·$%d");
listOfStrings.Add(@"he%$·ll@o c$&%odi%&ng for ev|#·ery&$$#$on%$·e");
listOfStrings.Add(@"c|o@$%de%w@a·$r%s &rºocªks");

foreach (var str in listOfStrings)
{
    Regex.Replace(str, badchars, "").Dump();
}
 
I prefer my solution.
 
12:55 PM
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

namespace practisingFundementals
{
    public class Worker
    {
        Regex rx;
        public void badValues()
        {
            /* Problem explanation:
             We have strings looking like "h%e&·%$·llo w&%or&$l·$%d"
             We want to clean the bad noise from these strings.
             So i have put up a array of characters: badValues with all the bad noise.
             defined a list holding my strings. instantiated regex in the class head.
 
one-line, Linq, no regex.
 
@Squiggle I'd replace 'IsLetter' with "!badChars.Contains(c)`, but yeah, cleaner and more elegant, and probably performant enough unless clear data indicates otherwise.
 
Why not just select all characters that are valid, rather than filter out those that are invalid? Valid characters are a very clear group.
 
@Squiggle That's a business logic decision. There might be other valid characters.
 
:P
 
12:58 PM
Hmm
am i overcomplicating things ?
 
you have some great solutions there
 
Yes, i see. I dont want to copy tho. I want to understand
 
Linq filters out noisy chars/ regex simply replaces bad chars with "" ie nothing
 
Will this line work @AvnerShahar-Kashtan
var badChars = "[\"%$&/#·@|ºª]"; ??
 
try it
its all chars within ""
 
1:03 PM
For short tests, I recommend downloading LinqPad or RoslynPad. It's what I use for short spikes.
 
Linqpad is amazing
 
yup works :o
 
@Ggalla1779 RoslynPad is a smaller project, developed by a coworker of mine, which A) doesn't have all the DB connection stuff that LinqPad has and I never use anyway, B) uses Roslyn and its language services, so it has intellisense, and C) gets updated with the latest bits for C# 7.
So it's pretty cool too.
 
LINQPad because my favorite program ever when I discovered it would show you the IL
 
Very minimalistic, but has Nuget support, so that's pretty cool.
 
1:05 PM
But is badChars now a string or a array of bad characters
 
@Squiggle Who doesn't prefer their own solution :P
 
What happends if the characters are not in the same order
 
god damn it reading gnu manuals is the worst thing ever in existance
how does anyone write like this
 
nice Avner...I bought a license for LinqPad and vowed I would use it!
@Froxer its looking for each individual char
so any char in the badchars is removed
 
Initially, i made it as a string. But then i was worried that because it was a string - the program wouldnt be able to handle a series of characters. So i made a array instead
Ok
I see
 
1:07 PM
test test test...very often thats how you find you have missed something in the logic
or if your trying something new...how the heck it works
 
Then i dont need the .ToString() Method
Yes, you are right.
Thank you
            /*Defining bad values
            char[] badValues = { '"', '%', '$', '&', '/', '#', '·', '@', '|', 'º', '\\', 'ª', '"', };
            badValues.ToString();
            */

            var badChars = "[\"%$&/#·@|ºª]"; //This is cleaner
Ok, so we have our string of bad values. list populated with strings that needs help. And now to the Regex logic.
A foreach rx.Replace every string is the easiest route ?
 
@Froxer 1. Create a RemoveNoise method that cleans a single string. It can use Regex.Replace, or @Squiggle's LINQ solution. It doesn't matter, as long as it's encapsulated.
:32669196 2. Call that method over the collection of strings:
var cleanStrings = listOfStrings.Select(RemoveNoise).ToList();
 
Has anyone ever run a SQL string against oracle with alias.....
can seem to get it to work
SELECT MAX(s.statusname) as 'Description', MAX(t.statusid) as 'Status', COUNT(t.statusid) as 'Total'
work great without alias but name is horrendous
 
could I ask about the jquery + html here??
 
Gives: Error CS0176 Member 'Regex.Replace(string, string, string)' cannot be accessed with an instance reference; qualify it with a type name instead practisingFundementals

var badChars = "[\"%$&/#·@|ºª]"; //Our bad values //Thanks for the wisdom here Avner
//Creating our list of strings
List<string> listOfStrings = new List<string>();

//Populating with verbatim strings
listOfStrings.Add(@"%$&/#·@|º\\ª");
listOfStrings.Add(@"h%e&·%$·llo w&%or&$l·$%d");
listOfStrings.Add(@"he%$·ll@o c$&%odi%&ng for ev|#·ery&$$#$on%$·e");
 
1:22 PM
@Froxer The error gives you all the details you need.
 
Yup, googling.
 
It's in the error text itself, once you know what to look for, You're calling rx.Replace - meaning you're calling an instance method on the Regex object. But the error says that you should qualify it with a type name - not rx.Replace, but Regex.Replace, because it's a static method.
 
            var badChars = "[\"%$&/#·@|ºª]"; //Our bad values //Thanks for the wisdom here Avner
            //Creating our list of strings
            List<string> listOfStrings = new List<string>();

            //Populating with verbatim strings
            listOfStrings.Add(@"%$&/#·@|º\\ª");
            listOfStrings.Add(@"h%e&·%$·llo w&%or&$l·$%d");
            listOfStrings.Add(@"he%$·ll@o c$&%odi%&ng for ev|#·ery&$$#$on%$·e");
            listOfStrings.Add(@"c|o@$%de%w@a·$r%s &rºocªks");
Yes
Someonne had similar problem here stackoverflow.com/questions/7451021/…
Thank you, gonna see what actually happends now in the debugger.
 
Gaah, IIS and user rights pissing me off
Our software can access the database from the server, but not the website cannot.
No idea what i am missing
 
oh man... it was a pain i remember in my last application @JakobMillah
that railevents app
idk if u remember :P
 
1:28 PM
ye
 
i got help from my mentors tho
what is happening for u ? Any errors or whats going on
 
Nothing really. Just trying to login using an existing username and it says its wrong
 
@JakobMillah What user is the AppPool running under?
Is it using impersonation?
Is the website on the same server as the DB?
 
Make sure you know that you are in the right connection string
 
Are you using Integrated Security?
 
1:29 PM
because, my application was a wizardo
it used its own component connection string
in my DataTable thingy
So i re routed it through a property
so it took the web.cfg and replaced what was in the comp's cfg
with that
so it was easier to maintain
 
@AvnerShahar-Kashtan Server not on the same server as DB.

I'd say that the appool runs on the windows user, but I am not sure
I am pretty sure it has something to do with user permissions etc, but no clue where to look
 
in the connection string it should state the user it is connecting through.
 
Integrated Security=SSPI btw
 
@JakobMillah Is the connetionstring correct?
 
@scheien Yeah
 
1:37 PM
Do you get any error / exception?
 
@JakobMillah The web application is executed by an AppPool process. That process runs under a user account. It's often a local user account that has no permissions to access external network resources.
Look at your DB's logs/profiler to see if there was unauthenticated access.
 
^ +1
In production you'd provision a specific service account under which the AppPool runs, which also has sufficient access to your SQL Server database.
 
@scheien Nope, nothing.

@AvnerShahar-Kashtan Yes, that's what I am thinking. Trying to figure out what needs to be done :P
But the weird thing is. We got web apps that got the same connection strings etc and can access the same db
 
Do they run under teh same applicationPool?
 
@scheien yes
 
1:42 PM
or does the application pools run as the same user?
 
is it denying the website to access since the connection string is in the web.config?
 
Maybe impersonation is disabled for your app?
 
I'd say that it's weird that you don't get the YSOD if authentication fails. Does your app swallow / handle those kind of exceptions?
 
@AvnerShahar-Kashtan Been looking into that and I think that is the problem, but I stumble somewhere on the way
 
Can you compare the connectionstring with an application that works?
 
1:45 PM
@scheien yes it does, I would have to connect using my local environment to access that shizzle. Might be logging somewhere, just not sure where and if
@scheien Yep and it's the same. The old and new server are pretty much identical, apart from the credential that Avner mentioned
 
Alright!
 
Time to leave office, cya tomorrow. Hopefully I dont get too roasted in the startup meeting. #RipFroxer2k16
 
see ya
fack me
 
@JakobMillah Sure when and where
 
Hmm, problem not solved.. Shiet
 
1:53 PM
 
hello every one
i have asked this question
-3
Q: c# should i use string with regex matchs or not " solved "

abdo refkyi have a text that i am going to find matchs within that text and after that putting the results on array . when i tried to make string array and string variables i found that it's really confusing to change from MatchCollection type to String type . and i get the error cannot convert . what ...

and got -3
for nothing
 
Where's your code? What's the question, and the problem? What have you tried?
This is all in 'How to ask a question'
 
the problem is solved
:)
but why people gave me -3
while others solved my problem
 
@abdorefky I'm trying to read the question and I still don't get what you're asking
 
Because of all I just said what's the problem with your question.
There isn't even a real question.
There is no code.
You didn't say what you're trying to do, nor what you tried.
 
1:58 PM
@abdorefky Because of the reasons Roel mentioned. Stack Overflow has a "How to ask a good question" page, with things SO considers to be good questions.
 
the link at the bottom of the question is dead
 
Things that are considered bad questions will e downvoted.
 
@abdorefky Read this sscce.org thoroughly.
 
but some one understood me
and answered my question
 
No, they were just guessing.
And they happened to guess right.
 
1:59 PM
no they werent
 
@abdorefky The fact that your question was answered doesn't make it a good question. It means someone had to work harder to answer you.
 
they just understood me
 

« first day (2151 days earlier)      last day (2796 days later) »