« first day (2053 days earlier)      last day (2889 days later) » 

1:19 AM
Hey all. anyone here? I need help
 
Hello
 
@JohnSomsky Hey there. Do you know how I can add a new entry from a datagrid itself?
 
Not sure that I do.
 
1:52 AM
hello! Please help me, how implement this code: ((char *)oy->data + oy->fill) on c# ?
oy->data = char* and oy->fill = int.
 
Hey all. Just wondering if anyone has Xamarin experience with sound, hoping to pick their brains
 
 
2 hours later…
4:05 AM
 
 
2 hours later…
5:46 AM
Mornings!
 
More than one at once? What is this?
 
Sorcery!
oh this rainy monday morning. Time to let the blues flow.
 
 
1 hour later…
7:05 AM
Morning all
 
good morning
 
Hello peoplez of the C# roomz.
 
Hello VR man
 
7:23 AM
hello
since this is a no profanity room i will proceed to call people pineapples
and grapefruits
 
mango to that brother
 
hey guys
 
what's a good suffix for a calculated property?
 
7:38 AM
string.Empty
call the properties not by programmer technical notes, but what they are.
 
Yeah, just give it a sensible name and no setter. That'll get the idea across.
 
good morning
 
hey
 
7:56 AM
what other dictionaries Caprica have? I heard a new word (tkuvm) and I try to find out what it means. I tried ! !define, urban, wiki
 
Makes sense
 
maybe someone taught her that
 
why was Microsoft.VisualBasic namespace even a thing? Urgh.
 
dont get me started
 
OK.
 
7:58 AM
it's monday. Get him started, so he feels what monday likes...
 
starting Ggalla1779
 
Error: Disc format not recognised.
Would you like to format @Ggalla1779? y / n
 
omg
reborn
ow wait I am a user not a program!
 
That's what they want you to believe.
 
8:23 AM
Hello lads
 
morning
 
 foreach (var VARIABLE in config.AppSettings.Settings)
why can I access the key but not the value that way?
is it better to pass all the keys ti a dictionary and then check them?
hmmm I think I found a way
 
8:39 AM
replace var
 
with string ?
 
if it have values in the Settings, because Settings is a dictionary, than replace with KeyValuePair<>
than You can call VARIABLE.Key or VARIABLE.Value
 
  for ( int i = 0; i < appSettings.Count; i++ )
         //Console.WriteLine(" Key: {0} Value: {1}"
 ConnectionList.Add(appSettings.GetKey(i));
@ntohl thx :D
what struct type should I use?
 
Dictionary
 
Dictionary is Love, Dictionary is Life
 
8:45 AM
btw AppSettings is NameValueCollection not Dictionary. I don't know if KeyValuePair works
 
@ntohl it works ;) I've used dictionary earlier for the appSettings
 
You have .AsQueryable() extension method tho
 
works fine
@ntohl for linq right?
 
right
 
hmmm yeah I think I could use some Linq Query, time to learn :D
 
8:47 AM
Linq is love, Linq is Life
 
hahahahaha
 
ok lads
i have an interview to do
in an hour
 
hmmm let me see if I can try to do some linq
 
what kind of test do i give the person
 
what kind of job are you questioning for
 
8:50 AM
a web dev
 
you looking for a experience dev or
junior?
 
 foreach (Dictionary<string,string>  keyValuePair in config.AppSettings.Settings)
            {
                ConnectionStringsList.AddRange(from VARIABLE in keyValuePair where VARIABLE.Key.ToString().StartsWith("OR")
                                               && VARIABLE.Key.ToString().EndsWith("ConnectionString") select VARIABLE.Value);
            }
@ntohl something like that?
 
almost
 
ask them basic questions
 
'What does "Dim" stand for?'
 
8:54 AM
I did my first interview 4 weeks ago
 
you're saying to replace the foreach by just a query?
 
if AppSettings.Settings is a dictionary (which is not), than You could write foreach (KeyValuePair<string,string> keyValuePair in config.AppSettings.Settings)
 
whats an interface
whats inheritance
if its c#
ask them real question... ie we have 3rd party supplier and hes PITA...have you ever had this and how did you cope with them
 
@ntohl ohhhh :\ what will AppSettings.Settings return?
 
@Mr.Toxy NameValueCollection
 
8:57 AM
Hi All
You will have to store the contents of your list at some point in your application, otherwise your list to check will always be empty. You can use a static field in your class though, so your static method will access that static field, so the information is only stored once. — Adwaenyth 4 mins ago
 
NameValueConfigurationCollection
THIS?
srry caps
 
Any Help
 
@Ggalla1779 In my opinion, asking how someone deals with something will always end up in the textbook perfect answer if the candidate is a good talk, or in something absolutely distorted if not. That doesn't mean that the smooth talker is better at the job nor at dealing with troublesome people; he just was better at saying what you wanted to hear. I would just try to gauge his personality and eagerness to learn/general competence. Even that is hard enough if the candidate is more introverted etc.
 
true listen to senpai
 
I always trust my gut instinct
questions just pad the time and give insight
but I have only ever done 1 interview in my life
 
8:59 AM
or give him some problem to solve
from home
 
@Mr.Toxy try something like ConnectionStringsList.AddRange(config.AppSettings.Settings.AsQueryable().Where(x => ...
 
oki doki. :D
 
wait a minute I'll check if it works like that
I don't have AppSettings.Settings
WPF?
 
:D
C#
 
>D WinForms? Console? WPF?
 
9:05 AM
But what project typeroni
 
oh damn ya hahahaha winForms
im still slippy af sorry
 
Verify that pan.ini is in your project
 
@RoelvanUden thanks fam
thats just terrible
i dont want vb devs
ill ask him whats solid :^)
 
Apostrophes, please
 
I was asked what is SOLID
at the interview here
 
9:08 AM
!!wiki solid principle
 
@JanDvorak The Wikipedia contains no knowledge of such a thing
 
!!wiki solid
 
Solid is one of the four fundamental states of matter (the others being liquid, gas, and plasma). It is characterized by structural rigidity and resistance to changes of shape or volume. Unlike a liquid, a solid object does not flow to take on the shape of its container, nor does it expand to fill the entire volume available to it like a gas does. The atoms in a solid are tightly bound to each other, either in a regular geometric lattice (crystalline solids, which include metals and ordinary ice) or irregularly (an amorphous solid such as common window glass). The branch of physics that deals with...
 
HAHAHAHAHA
In computer programming, SOLID (single responsibility, open-closed, Liskov substitution, interface segregation and dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the "first five principles" named by Robert C. Martin in the early 2000s that stands for five basic principles of object-oriented programming and design. The principles, when applied together, intend to make it more likely that a programmer will create a system that is easy to maintain and extend over time. The principles of SOLID are guidelines that can be applied while working on software to remove code...
thats solid
 
        var dummy = System.Configuration.AppSettings;
won't compile
wtf
 
9:11 AM
foreach (NameValueConfigurationCollection VARIABLE in config.AppSettings.Settings )
I cant then convert it to Dictionary
and check the key
 
what is config?
 
Anyways... I've made a userscript to colorise this chat by user. Is anyone interested?
 
how did You init it?
 
but yes LINQ seems the best aproach to this imo
 
query on it would be much better
 
9:12 AM
 ExeConfigurationFileMap configOld = new ExeConfigurationFileMap();
            configOld.ExeConfigFilename = Path_Config;
            Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configOld, ConfigurationUserLevel.None);
like that
so it accesses a .config file using a "custom" path
@ntohl yeah query seems a lot faster and simpler then going through all pairs one by one
 
@ntohl what happened
 
@misha130 I'm checking this site> msdn.microsoft.com/en-us/library/…
and the var appSettings = ConfigurationManager.AppSettings; part doesn't work
not in console, nor in WPF
 
@JanDvorak Depends on the palette :)
 
4
Q: ConfigurationManager.AppSettings does not work with an App.config file created programmatically

AdrianI ran into something interesting. I am trying to make a quick console app for our clients to run to change some connection strings on some of their programs. This being a "quick app" for clients, I want it to be "idiot proof". One of the main things the app does is re-create a default config fil...

 
@ntohl its winForms, and it does work
 
9:16 AM
35
Q: ConfigurationManager.AppSettings - How to modify and save?

HoumanIt might sound too trival to ask and I do the same thing as suggested in articles, yet it doesn't work as expected. Hope someone can point me to the right direction. I would like to save the usersettings per AppSettings. Once the Winform is closed I trigger this: conf.Configuration config = ...

 
Auto-generated to produce distinct colors, more distinct for users that talk more.
 
var appSettings = ConfigurationManager.AppSettings; I haven't used that @ntohl
 
string mysetting = App.Default.MySetting;
App.Default.MySetting = "my new setting";
 
but yeah it made sense, it should work imo
 
Updated at real time, which means that if you don't like your mid-gray, talk more.
192-255 in each channel
 
9:18 AM
In a Linq query. Why do you write from cust in db.Customer where cust.Id == 'x'...? Is it just to declare the variable cust as the table in the db? The word from seems a bit off :p I would like to write: from db.Customer as cust instead
 
I have an existing local git repository, and I want to sync it with an external master. Do the .gitignore file apply to files within the same commit? The local repo is a clone of a existing SVN repo.
 
maybe I will just pass the keys to a dictionary, ti save all the hassle. but it seems unecessary since I will only be looking for 3/4 keys
 
or do I have to push the gitignore file first, then sync the rest of the repo?
 
Doesn't matter @scheien. .gitignore applies to your local repository. Thus, if you modify it, it applies immediately to the next commit. Note that at that point, you'll probably be committing the .gitignore file itself, thus the new ignoresbecomes available to everyone after they get your changeset.
 
ignore the gitignore that ignores the gitignore.
Deep shit
 
9:24 AM
I dont understand the damn "NameValueConfigurationCollection", if I pass the var to a foreach Im not able to access the name or the value
 
@Mr.Toxy apostrophes, please
 
It's a new master repo(s), just migrating some old SVN repos. So I guess I'll just commit the gitignore to local repo before pushing to master. SVN contained a lot of ignore rules, so I guess it will be ok. Thanks @RoelvanUden
 
 foreach (NameValueConfigurationCollection VARIABLE in config.AppSettings.Settings )
            {

                var keys = VARIABLE.AllKeys;
@ntohl that doesnt let me access any name/value. I passed the "keys" to a foreach and nothing
and I dont see any name or value anywhere within VARIABLE methods
 
What type is keys?
 
it's a string array
 
9:30 AM
string[]
I'm struggling with that too
 
so not keys[0]. something?
 
yeah but you cant use VARIABLE.count cause keys[] takes a string
 
how hard is that to use it so You can write .Where...
 
LINQ is not exactly for me at this point, I've yet got the time to get a good grasp of it
 
not my territory either. Still something I need to explore and am exploring
 
9:33 AM
yeah LINQ is very important and handy, I rly need to get my hands on it
  KeyValueConfigurationCollection settings = config.AppSettings.Settings;
                    Old = settings.AllKeys.ToDictionary(key => key, key => settings[key].Value);
I've done it like that in a previous function @ntohl
 
But you said you can't do VARIABLE.count.. why?
I think I need to grasp what you are trying to do :)
 
@JakobMillah you can, but you cant do this: VARIABLE[VARIABLE.count]
I need to get all the values from a .config file where the key starts with OR and ends with ConnectionString
but passing all keys to dictionary is dumb
 
user4433485
Heya! Could someone tell me why I can't connect to my local database while using 127.0.0.1 ? I can only log in while using my pcname/sqlexpress
 
since Im only looking at 4/5 keys
 
What's the use of doing VARIABLE[VARIABLE.count]? :o
 
9:39 AM
        List<string> result = new List<string>();
        result.AddRange(
                (from x in System.Configuration.ConfigurationSettings.AppSettings.OfType<string>()
                 where x.StartsWith("OR") && x.EndsWith("ConnectionString")
                 select System.Configuration.ConfigurationSettings.AppSettings[x]));
 
no usage, but since it doesnt let me access the key straightforward I thougt to use count since I only had a key there
it doesnt make much sense I know
 
kurwa @ntohl
 
I wanted something like that, but with .OfType<string> replaced with .AsQueriable(). Didn't work
or better
        List<string> result = new List<string>(
                (from x in System.Configuration.ConfigurationSettings.AppSettings.OfType<string>()
                 where x.StartsWith("OR") && x.EndsWith("ConnectionString")
                 select System.Configuration.ConfigurationSettings.AppSettings[x]));
 
@ntohl I can try that
 
btw it sais ConfigurationSettings is obsolete... And the System.Configuration.ConfigurationManager doesn't exists, which he wants me to replace with
 
9:45 AM
doesnt pop nothing about that here
dunno
 
App. doesn't exists neither
 
AppSettings
AppSettings.Settings
 
AppSettings which I cannot reach. Only from an obsolete class
 
 foreach (Dictionary<string,string> VARIABLE in config.AppSettings.Settings )
            {
                foreach (var Key in VARIABLE)
                {
                    if(Key.Key.StartsWith("OR") && Key.Key.EndsWith("ConnectionString")) ConnectionStringsList.Add(Key.Value);
                }


            }
I will try that, maybe it'll work
 
impossible
Settings is not something like Dictionary
 
9:49 AM
 KeyValueConfigurationCollection settings = config.AppSettings.Settings;
                    Old = settings.AllKeys.ToDictionary(key => key, key => settings[key].Value);
or I do that
and then the above
 
        List<string> result = new List<string>(
                (from x in config.AppSettings.Settings.OfType<string>()
                 where x.StartsWith("OR") && x.EndsWith("ConnectionString")
                 select config.AppSettings.Settings[x]));
that should work for You
 
hmmm it gives me an error
 
Feck webforms and its needs to constantly reload all pages over and over and over and over
 
mashes F5
 
9:54 AM
1 min
 
@JanDvorak Pliz no..
 
mashes F5 even harder
 
@ntohl did you look at the question I posted it was winforms problem
 
alt + f4 sometimes gets the work done
 
mashes alt+f4, then reopens all closed windows
 
9:57 AM
hahahhahaha
 
@Ggalla1779 I'm afraid not
 
@JanDvorak Like in my case.. Client wants to be able to control what pages are shown for specific userroles. But it makes me so sad that this check needs to be done for each damn page load.. Unless I might be able to do it on master.page !page.reload
 
@JakobMillah cant u use tabControl?
put all the pages there
oh its webforms
srry
 
35
Q: ConfigurationManager.AppSettings - How to modify and save?

HoumanIt might sound too trival to ask and I do the same thing as suggested in articles, yet it doesn't work as expected. Hope someone can point me to the right direction. I would like to save the usersettings per AppSettings. Once the Winform is closed I trigger this: conf.Configuration config = ...

there see if that helps
 
 public string VersaoCurrente(string Config)
        {
            string value = "";
            ExeConfigurationFileMap configOld = new ExeConfigurationFileMap();
            configOld.ExeConfigFilename = Config;
            Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configOld, ConfigurationUserLevel.None);
            if (config.AppSettings.Settings["Version"] != null)
            {
               value = config.AppSettings.Settings["Version"].Value.ToString();

            }
you just save it
after all the alterations
config.Save(ConfigurationSaveMode.Modified); why the hell did he used that?
just config.Save();
 
10:18 AM
@Ggalla1779 yes I have checked it
 
@ntohl ok I've solved it, I did it like this
 public List<string> ConnectionStrings(string Path_Config)
        {
            //Dictionary<string,string> keyValuePair = new Dictionary<string, string>();
            Dictionary<string, string> Keys = new Dictionary<string, string>();
            ExeConfigurationFileMap configOld = new ExeConfigurationFileMap();
            configOld.ExeConfigFilename = Path_Config;
            Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configOld, ConfigurationUserLevel.None);

            KeyValueConfigurationCollection settings = config.AppSettings.Settings;
that should do the trick
 
yep
 
but it seems a little dumb for what I need
 
just the naming is not right. Keys is not the right name for a dictionary
 
I shouldnt just get all keys if I only need to check for 3 or 4 keys right ?
how should I name it ?
 
10:23 AM
ConfigMapping or something
 
oki doki :D
 
        List<string> result = new List<string>(
                (from x in config.AppSettings.Settings.AllKeys
                 where x.StartsWith("OR") && x.EndsWith("ConnectionString")
                 select config.AppSettings.Settings[x].Value));
that works too
gtg eating
 
thx man
:D
I'll use yours, it's a lot cleaner
 
Hi guys someone knows I can I have a List of Geometry Path in XAML?
 
10:39 AM
hello, how to return html page as zip from controller in asp.net web api?
any good tutorials?
 
you need a custom ActionResult for zip responses
 
@StevenLiekens any good link that explains that?
 
"html page as a zip"?
isn't it just returning a binary file with the appropriate content-type set?
 
how to return it via httpresponsemessage ??
 
192
Q: Returning binary file from controller in ASP.NET Web API

Josh EarlI'm working on a web service using ASP.NET MVC's new WebAPI that will serve up binary files, mostly .cab and .exe files. The following controller method seems to work, meaning that it returns a file, but it's setting the content type to application/json: public HttpResponseMessage<Stream> Post(...

with mime type "application/zip" I assume
 
10:52 AM
i saw it
 
cool :) what are you missing?
 
Hi..Any one using wpfextendeddatagrid control?
 
you can't just change the content type header and call it a zip
 
i have one question can any one tell how i can Group by particular column from the code behind ?
 
@StevenLiekens if you have your binary zip data, surely that's all you really need to do - set the content type and stream the binary output?
unless the goal is to actually render a HTML page using razor, then zip it, then send it to the browser? Or what?
vague questions :P
 
10:55 AM
I just assumed he already has the HTML as a string and wants to zip it and return that instead
 
    I have a question. So I have this:
     private void buttonExecScript_Click(object sender, EventArgs e)
            {
                OracleConnection connection = new OracleConnection();
                var ConnectionStrings = new FuncoesUpdater().ConnectionStrings(Global.NovoServiço + @"OrcaService.exe.config");
                foreach (var ConnectionString in ConnectionStrings)
                {
                    connection = new OracleConnection(ConnectionString);
                    using (CdpsiUpdateSql NovoUpdater = new CdpsiUpdateSql(connection))
 
but I'm starting to think that he's confusing zip archives with gzip compression
 
@Squiggle how did u know that, thats actually my goal
 
@Kob_24 I'm a witch
 
hehehe
sounds good
 
10:57 AM
@Kob_24 1. Why zip it? How huge is it?
 
can the witch provide a good link to do so ?
yeah i really why they want to zip it, its just a normal html page..
 
I'm sure you can somehow wrap any ActionResult in a decorating ActionResult
 
it smells like some fudged requirements. What is the end result meant to be?
 
one that zips the stream and changes the content type
 
@Squiggle download a zip file to local and then reender it as razor template
 
11:00 AM
that doesn't make any sense. It's the server's responsibility to generate the HTML given a razor template.
not the client's.
 
any suggestions pls?
 
My question is, why does the client/browser need a zip of a web page?
 
bro igot this assignemnt today for a company and i asked this question but no one could answer this question, they want it like that and no idea they want it to be like this
 
@Kob_24 bogus. I'd clarify the "acceptance criteria" - i.e. explain to them exactly how this will appear to the user - and confirm that is what they want
it smells funky
 
wow yield return is the answer to my problem
^^
 
11:03 AM
@Mr.Toxy is it?
 
xd
 
@Squiggle "You use a yield return statement to return each element one at a time." accordingly to that it seems so
 
(hint: it isn't)
 
Rule #1 of consulting: what they say they want is not what they actually want
 
@Squiggle guys are not ready to change thier approach at the moment.. i think so
 
11:04 AM
@Mr.Toxy sure, but you have nothing to return it to. It basically exposes an IEnumerable stream of... stuff.
 
Rule #2 of consulting: what they want is not what they need
 
@TomW I was just about to add that.
 
I was reading the MSDN docs :p
hehehe
@Squiggle hmmm a question: is there anything that does what I need directly? or do I need to do some "black magic" to work around it
?
 
@Mr.Toxy what you have right there looks fine to me. You're iterating over SQL connections, not statements. The using is in the right place. What's the problem?
 
@Squiggle I was trying to see if there was another way to do it but having the using block outside the foreach
 
11:06 AM
Here's my connection to database 1. Using that connection, execute these scripts.
Here's my connection to db 2. Using that connection, again execute these scripts.
^ looks fine to me
 
yes it does look fine :P
ok I'll stick with it then
 
:D
 
we need a javascript razor engine
 
now Im wondering about the yield aproach XD gonna check it out
 
wouldn't that be somethin
 
11:09 AM
@StevenLiekens great idea!
 
Hmmm..machine translate the source to TypeScript, could that be done?
 
Hey - why don't we make it real-time as well, so it regenerates when the data changes?
 
well I'll be damned
 
and call it something like "Angular" or "React"
 
hmmm I dont see any application for what I was saying
 
11:09 AM
it actually exists
 
Wow, how's that for an obscure reference
 
obscure?
 
Wasnt what I was thinking of
Whatever that is
 
vash ^^
 
it's... Vash the Stampede, from Trigun
I thought everyone knew that?
 
11:12 AM
I'm assuming character from Star Trek, the only human as far as we know that Q found interesting enough to actually level with and consider a friend
 
I have no idea what you guys are talking about
 
@TomW yeah, that would be quite obscure.
1 message moved to Orphan GIFs
 
@Squiggle cannot be more so than yours. People watched Star Trek.
 
oof
@StevenLiekens tell Tom he's being mean and I'm not talking to him anymore
 
hmmm I have lasagna for lunch <3
 
11:21 AM
uhh
okay
 
 
damn how 4 hours pass so quick o.O
 
hi, anyone know about signalR
 
there are some signalR gurus here XD
 
Everyone knows about SignalR
 
11:28 AM
except me
ROFL
 
but the cool kids are all doing native websockets these days.
 
but that doesnt count anywyas
"I wish that I could be like the cool kids, 'Cause all the cool kids, they seem to fit in"
 
Native websockets ftw.
 
See? Roel is cool.
Roel knows where it's at.
 
i dont know anything about either :(
 
11:32 AM
He even knows who Vash the Stampede is.
 
can anyone give me an example of calling a Task (the function and how to call the function, creating a task)
 
I know nothing
 
Native websockets for all communications? kurwa
 
read the MSDN docs. They're decent on this topic.
 
@Squiggle thx :D
 
11:34 AM
if Tasks, async and await sound hard, you're thinking too hard.
 
@Mr.Toxy I'm back. No problem.
I ate
!!pizza 600 600
 
@ntohl Input not matching /(\d+)\s(\d+)/. Help: User-taught command: 'gives <>http://lorempizza.com/$1/$2#.png
 
My motivation right now...
!!pizza 100 100
 
!!horse 150 150
 
11:40 AM
@JakobMillah That didn't make much sense. Maybe you meant: choose
 
11:56 AM
@CapricaSix he wanted a square of horse. Is that so difficult to understand?
@TomW only just saw that message. Yes, it's good money - pretty standard as a senior contractor in finance. I'm guessing it's in Zurich, though?
@TomW although they can be flexible on the whole "German-speaking" thing in many larger organisations.
 

« first day (2053 days earlier)      last day (2889 days later) »