« first day (1253 days earlier)      last day (3678 days later) » 

12:02 AM
hello :P mind any1 supporting me with link of learning how to handle users in asp mvc 5? I've found one on asp.net but its all about google/facebook authentication :P
 
 
3 hours later…
3:22 AM
@joker morning
 
Morning
 
4:09 AM
morning @nimesh bhai
 
Morning
 
 
3 hours later…
Ram
7:03 AM
0
Q: How to create Dropdownlist using XSLT C#?

RamI am working on project used xslt file to display repeated items. as below: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes" /> <xsl:param name="BasePath" select="/" /> <...

please hep me
 
8:01 AM
hello good after noon
i have a problem in gridview with update panel
when i click on another page then it don't go to second page
 
8:17 AM
What kind of page u r tlking @VIPULPARMAR
 
8:28 AM
@TheDictator i have gridview with paging in update panel it is not working at first time it show data with paging but when i click on next page then it is not working.
 
@VIPULPARMAR ok.. if u remove ur update panel then what is happening? Paging working correctly ?
 
@TheDictator yes when i remove update panel then it working properly
 
@VIPULPARMAR check the link buddy
that might help u
 
8:48 AM
it is not working
 
I have two forms: frmLogin and frmMain. frmLogin is a startup form and the frmMain is shown after the successfull login. The frmLogin is hidden then. And here, I want the application to be Exit'ed when frmMain closes. But closing frmMain only closes it but the application is not exit'ed.

I can use use `Application.Exit()` in frmMain's FormClosing event but then Google said its a bad practice.

So, whats the good practice in this case?
 
9:26 AM
Once the login is successful, .Show() frmMain and .Close frmLogin (in that order)?
So long as a window is open, the app wont quit.
Or frmLogin.Hide(),frmMain.Show(),frmLogin.Close
 
user1804599
@RoelvanUden What?
 
user1804599
So if I close a window and open another one directly, the app just aborts the main thread?
 
user1804599
Gonna be fun with finally then. :V
 
@RoelvanUden closin frmLogin closes the entire application.
@rightfold I had a query about a multi-threading!
 
user1804599
yesterday, by rightfold
Writing thread-safe code is pretty easy.
 
9:41 AM
@rightfold

public void UpdateOnlineUsers(User[] onlineUsers)
{
if (this.listOnineUsers.InvokeRequired)
{
// What delegate to create and how to UpdateOnelineUsers
}
else
{ // This is what needs to be done
foreach (User user in onlineUsers)
{
listOnineUsers.Items.Add(user);
}
}

}

I read this MSDN article http://msdn.microsoft.com/en-us/library/ms171728(v=vs.110).aspx?appId=Dev12IDEF1&l=EN-US&k=k(EHInvalidOperation.WinForms.IllegalCrossThreadCall)%3bk(TargetFrameworkMoniker-.NETFramework,Version%3dv4.5)%3bk(DevLang-csharp)&rd=true&cs-save-lang=1&cs-lang=csharp#code-snippet-1
 
user1804599
Indent pl0x.
 
@rightfold plus how do I format code here? I tried the way we'd do while posting the question. Didn't work.
@rightfold nevermind, I'm reading the FAQ!
 
my understanding was/is that chat formatting is similar to comments in that you can only do inline code but not entire blocks
 
@Nacimota :\
 
10:05 AM
Click the Fixed Font button if you paste a multi-line text block.
 
or ctrl + k it
 
10:26 AM
@RoelvanUden (Y)
Why can't we pass the direct method reference instead of a delegate in methods like Invoke()?
 
You can pass method references..
public static void Foo(Action<int> bar) {
	for (var i = 0; i < 10; i++) {
		bar(i);
	}
}

public static void Bar(int n) {
	Console.WriteLine(n);
}

public static void Main(string[] args) {
	Foo(Bar);
}
 
@RoelvanUden so ask for a delegate? Whats the advantage of using a delegate?
 
How else do you intend to let the compiler know you intent to pass in a method?
 
 
2 hours later…
12:42 PM
hey hey
 
word homes
 
word up
 
1:04 PM
hangover
you?
wait, what time is it in 'murka?
 
lol, for some reason i didn't view you as a drinker
just working on my site a little
 
Early enough that I wouldn't want to be awake, I'll bet
 
9:06 :p
 
not on a Saturday
 
i can't help it i have an addiction, i dream code
 
1:09 PM
I only got up to go and hunt some bacon
 
mmm
 
1:19 PM
dude this new Identity Membership provider is awesome, to enable facebook, google, twitter signin, all i have to do is uncomment some code and throw in some keys
 
1:34 PM
grunt
 
well good morning to you too
 
2:01 PM
can't believe how awesome this identity shit is..... but i'm afraid because I think @TravisJ said that it has a shit ton of security holes in it :(.... risk it or not....
 
2:25 PM
I can't parse a JSON string using a JSON.NET.

I have a `Message` class like this:

public class Message
{
public User From { get; set; }
public User To { get; set; }
public string Text { get; set; }
public string At { get; set; }
}

The User class has futher two automatic properties: `ID` and `Nick`, integer and string respectively.

This is the code that should parse the string:

Message[] newMessages;
newMessages = JsonConvert.DeserializeObject<Message[]>(response.ResponseText);

And this is the response text:
 
You're asking it to deserialize an array, could that be it?
 
yea looks like it
 
@LasseV.Karlsen yeah!
 
my noob wpf skills require some assistance, if you have some spare time?
 
how can i send a text message to a number that is stored in my windows phone 8 db?
it is a alert message
c#
 
2:36 PM
@CCInc ask man
 
@LasseV.Karlsen help
 
please don't ping random people
if somebody can help you, they will
 
Jenny, pinging for help is considered rude, post your question and wait imo
 
I don't program against Windows phone, so I don't know
 
Alright, so I've got a DataTemplate inside an ItemsControl which contains a Grid and a TextBox. I need to find the index of a textbox inside the DataTemplate from an event triggered by the textbox, if that makes any sense
 
2:38 PM
@Jenny Use a SMS service
 
@CCInc sounds strange, is tha xaml huge?
 
!!google windows phone send sms message
 
Server error (status 500) occured (message probably too long)
 
@JohanLarsson No, not really
 
@CCInc XY, what do you intend to do with that index?
 
2:41 PM
I want to add another text box after that one
Like, when the return key is pressed, it adds another textbox after the one that's currently selected
 
> CATSTROPHIC HOLE IN UNIVERSE ABORT ABORT 2
 
try visualtreehelper to get the parent and add another child, still sounds a bit starnge
 
Presumably he's binding, so that's not really an option
 
Is there a better way to do what I want? Or a better option instead of ItemsControl/DataTemplate?
 
you are writing a thing for composing equations?
 
2:47 PM
Yes, a graphing calculator of sorts that kind of mimicks this
 
Your making a graphing calculator?
 
in a way
well, my application needs the ability to graph like a graphing calculator
 
does it have to be advanced equations?
 
I have one for you
Wait a minute let me find it
 
2:53 PM
@CCInc if it is just simple stuff this parses polynoms.
 
oh cool, thanks
 
don't look directly at the tostring code :)
 
haha okay :D
 
I have code that fits a polynom to a set of points if you need (ike in excel)
 
pseudo-code:

httprequest request = createRequest("http://wolframalpha.com/input/?i=" + httpAllowedCharacters(equation) + "&dataset=");
graph.Image = //find graph in teh request
 
2:59 PM
found it
and then Is it possible to add voice recognition to my windows phone application?
I mean we are developing it as using an emulator through laps and we have to run the final product on a windows phone how does it affect adding voice recognition to that application
helpp
@KendallFrey
 
@JohanLarsson that'd also be helpful
 
@Johan c=='e' || c=='E'?
 
@OutlawLemur haha that's some good stuff
 
e ~= 2.71
En = 10^n
@CCInc :)
 
@OutlawLemur I think double parses both the same but not sure
 
3:02 PM
Huh... I guess I would just replace e with 2.71...
but if it parses strangely....
I guess that is also because in my math class we just finished learning about e lol
 
@JohanLarsson
@Steve
@TravisJ
 
STOP IT
 
help if can
and then Is it possible to add voice recognition to my windows phone application?
I mean we are developing it as using an emulator through laps and we have to run the final product on a windows phone how does it affect adding voice recognition to that application
helpp
 
Haha.. well I got to go see you guys late
 
cya outlaw!
 
3:06 PM
Stop what?
 
@Jenny Of course it is possible, do a search on google
 
PINGING RANDOM PEOPLE
Anyway, gotta go, thanks for the help as always Mr Johan :)
 
I ddnt ping u @CCInc
 
..so?
 
I asked help from some people who usually helps me
 
3:06 PM
There is probably several APIs you could use already @Jenny
 
it can't affect ur reputation here if u can't help pls stay away I am busy to argue for u
 
@Jenny What have you tried? What do you know about it? No one can help you without knowing those things, and no one will want to unless you give some information
 
@CCInc did not find recent code, this is prolly okish. It uses mathnet.numerics
 
@OutlawLemur the thing is
 
Voice recognition is not easy, it is complicated signal processing
 
3:08 PM
I have done some what of voice recognition using mbrola as a laptop application problem can i use the sameway for a mobile app?
and when i did it thru desktop i kind of had to add all the words that i am going to speak for my application... So is there any other way because i dont know what users are gonna say to my application
it is like for travel purpose
 
You must always have grammer dictionaries for speech recognition currently
But I have to go
 
users has to enter their destination thru voice how can i add all the destinations in the world urgh
 
3:26 PM
oki
 
@CCInc no need for my bs there already is MathNet.Numerics.Fit.Polynomial(), hope it was not there when I wrote mine :)
 
code review time!
tell me what you think
 
if you check the undo thing, deal?
 
ok, I have time today
 
is github urs @KendallFrey
?
 
3:38 PM
private Client Client
{
    get;
    set;
}
@KendallFrey why not on one row and why public set? (minor)
 
i never do one row
and the set isn't public
 
of sry, read-o :)
 
where's your undo thing again?
 
I like one line for auto props, reads clearly that there is nothing to see in it
 
I like space
 
3:40 PM
> all ctors must come before all properties
Is Credentials.LoadFrom() leaking files? No using
 
yeah?
 
I would use fFile.Readlines or readalltext
 
damn, good catch
 
@KendallFrey I have been cleaning too many stylecop errors this week
 
3:43 PM
think i cleaned 5k in 24 hours
now i turned on stylecop warning -> build error, gonna try how annoying it gets. think it is good
static void Main(string[] args)
{
    Bot bot = new Bot();
    Task startTask = bot.Start();
    startTask.Wait();
}
it just logs in then exits?
 
lol yeah
 
have you tried restsharp?
 
I do have code to make it send a message, but commented it out to avoid spam
@JohanLarsson nope, what's that?
 
has a nuget package, nice ime
 
looks like killing a fly with a cannon
I already have 2 nuget packages lines up
 
3:50 PM
ok, did not find much other than formatting in the code, don't know much web so skimmed those parts
@KendallFrey nah, really simple to use and adding a nuget package is a nonissue
 
i know
but I don't want this thing to get too complex
I have a fairly simple system now, and mostly happy with it
um, your undoredo thing...
 
ok fair enough
 
uncheck checkbox, ctrl+z, ctrl+y <-- nothing
 
:)
could be a bug?
 
redo sometimes undoes
 
3:53 PM
haha
 
seems like changing something should reset the redo stack
 
gonna have to check when I pushed the last time
@KendallFrey yeah
 
if you fix the bugs, it'll be cool :)
 
checkbox worked in sweden
 
including the redo?
 
3:57 PM
yeah
and editing cleared redo stack
 
it works if it's not the first thing I do
but if i start it, click the checkbox, Ctrl+Z, Ctrl+Y and it stays checked
 
hmm, redo does not happen if checkbox is focused or something
 
might be it
 
found something now
 
focus is a little bit... ch
 
4:00 PM
clicking in the textbox lets me redo when it glitches
def some bs going on, not gonna fix it now :D
 
I'd call you lazy, but I know myself
 
do you think adding ctrl +z & ctrl + y keybindings automatically would make sense?
that could potentially fit the issues
 
debating whether to work more on the bot, or play games
@JohanLarsson you mean to the controls?
makes more sense to catch it at the window level
 
yeah the parent container and all controls handled
ok, something swallows it I think
 
should be able to catch it tunnelling
even if that's bad practice
 
4:05 PM
<GroupBox.InputBindings>
    <KeyBinding Modifiers="Control" Key="Z" Command="Undo"/>
    <KeyBinding Modifiers="Control" Key="Y" Command="Undo"/> <- bug :)
</GroupBox.InputBindings>
 
never heard of that, lol
 
pushed an update, looks like it works better now :)
yeah undoing on both ctrl + z & y was < optimal
that explains why it worked when textboxes were focused, they have the binding by default
 
I'm gonna do a coding competition today, anyone want in?
 
what kind of competition?
 
4:27 PM
@KendallFrey did you try after the fix?
 
this rocket bends more than a person doing the limbo :/
 
Can we see the challenges without being registered in the contest?
With a delay, perhaps
Hi guys, btw
 
4:44 PM
@KendallFrey what chart control do you use in wpf?
 
@RodrigoSilva check out the training area, you can see all the previous challenges
when the current challenge is over, you'll get to see it too
 
@deltree Ok, thanks.
 
@JohanLarsson null
 
wot
I have no use for a chart
 
4:50 PM
ew :)
 
whats the matter
 
can you code fun stuff that does not require charts and maths?
 
yes
chatbots :)
 
5:05 PM
Hi guys,i`m learning collections.I have one problem,when i try to add new item to IList (i`m using IList.Add(class)),it changes all my values in list to (class) values.Where`s the secret? Here`s code that change values:
    zmogus.Name = name + "aa";
    zmogus.Surname = surname + "aaa";
    list.Add(zmogus);
 
Are you creating a new object in zmogus every time?
Remember that if you change zmogus and it's in the list, the list will see the same changes
 
that`s my problem.Maybe you can say me a hint how can i change it?
 
1 min ago, by Kendall Frey
Are you creating a new object in zmogus every time?
 
list.Add(new Zmogus(name + "aa", surname + "aaa")); or object initializer if you love mutable state :)
 
thanks now i get it
 
 
1 hour later…
6:15 PM
anyone there?
 
aye
 
oh hey
i have a problem
i put a code to my mobile app to show the map
but i dnt know how i can display the route
when destination given
help?
I did according to this
 
6:32 PM
know nothing about phone, sorry
 
not about phone
just c #
and map
road map
why everyone sleeps early today
:(
 
ok, what's the problem?
 
so i dont know how to draw the route on the map
@George can help?
 
it looks like the article you linked shows you how to do that
 
no i put all that code but it dsnt help to draw the route line yes i also thot it does bt it kind of doesnt
 
6:40 PM
so the map appears with no route?
try stepping through the MyQuery_QueryCompleted code to see whether there's anything being returned from that query
 
ok i will c
 
How do you make footnotes in a SO post?
like, the tiny text
 
Use <sub>tiny text</sub>
 
6:55 PM
Ah, thanks
 
7:10 PM
@TomW no it is a void method
 
I can see that, I thought it was obvious what I meant. You query a service and use the results. So step one when nothing happens is - see whether there are any results.
 
no results
 
well I suppose you ought to do something about that
 
i have added gps so map get loaded and current position shows but when try to enter destination and get the route displayed it currupts
@TomW
 
sounding a lot like a help vampire now...
 
7:36 PM
ah?
wtevr
gn
 
March 22, and I think there's almost 6 feet of snow on the ground...
 
user1804599
7:54 PM
I don’t like feet made of snow.
 
8:33 PM
There are three computers connected to the same network, two of them are HPs and one is a Lenovo, the three of them are trying to connect to a WebService with the same certificate, just one of the HPs can connect. Any idea why ?
 
any more specific about the 'can connect'?
can't resolve the host, can't find the service on the host, can't establish SSL?
 
It can't authenticate the certificate
Metadata contains a reference that cannot be resolved: 'https://nfe.sefaz.am.gov.br/services2/services/cadconsultacadastro2'.
There was no endpoint listening at nfe.sefaz.am.gov.br/services2/services/cadconsultacadastro2 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (407) Proxy Authentication Required.
If the service is defined in the current solution, try building the solution and adding the service reference again.
 
not seen a 407 before
client needs private key permissions on the cert you're using IIRC
 
Proxy.. ffs, not this error. Wait, the error is not that one. I forgot I changed the network. one second
 
and also needs to be able to talk to the root certification authority to verify stuff, I think
 
8:37 PM
Ok, changed
There was an error downloading 'https://nfe2.fazenda.pr.gov.br/nfe/CadConsultaCadastro2?wsdl'.
The remote name could not be resolved: 'br-saoprx002'
Metadata contains a reference that cannot be resolved: 'https://nfe2.fazenda.pr.gov.br/nfe/CadConsultaCadastro2?wsdl'.
Could not establish secure channel for SSL/TLS with authority 'nfe2.fazenda.pr.gov.br'.
The request was aborted: Could not create SSL/TLS secure channel.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Even though we three use the same authentication
The same pfx
 
is br-saoprx002 one of yours?
 
Yep
The proxy I'm on
 
OK, so that's transport level, not message level, nothing to do with WCF
I'm thinking aloud here, bear with me
 
No problem.
 
I don't THINK private key permissions matter on the client machines, because in general you don't need your own cert to authenticate with the host, it's stuff like WCF encrypt and sign that needs that
 
8:43 PM
And for some odd reason, when I try another WebService ( sorta of the same, but for a different state ) I get this :
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://nfe.sefaz.pe.gov.br/nfe-service/services/CadConsultaCadastro2'.
The HTTP request was forbidden with client authentication scheme 'Anonymous'.
The remote server returned an error: (403) Forbidden.
If the service is defined in the current solution, try building the solution and adding the service reference again.
 
I guess the client machine has to verify the host's certificate, I don't know exactly how cert verification works but I think the verification chain has to call out to a root certification authority at some point
so if your non-working machines can't get out onto the internet to talk to VeriSign (or whoever) that would explain it
 
That means that... No luck ? :(
 
var answer = await Reed
:D
can you browse to that url from those machines?
browsers tend to warn you if they can't verify certs on https endpoints but services will just fail
for good reason, you don't really want a service silently accepting a bad cert that could be anybody
well that will do it
Huh.
It's a server config problem, by the looks
it's accepting the cert supplied by your one working machine and rejecting the rest
I didn't think SSL used a client-side cert
 
Yep I can
 
you said you have the same certificate on each machine. Don't know how this works, but as I understand it, certs refer to a particular hostname. If you have the same one on each machine, doesn't that imply that they're trying to identify themselves with a certificate that refers to a different machine?
 
8:54 PM
Oh.. that does make sense..
 
like I say, don't know how client certificates in SSL work. It isn't a very common scenario from what google is telling me, but some security experts think it should be
 
I think that helps already. I'm going to use the computer which is working. I was supposed to work with 6 hands instead of 2 but anyway.. It needs to work.
Thanks
 
hope you get it figured out - tell me when you do, I might run into it myself someday
 
@KendallFrey came in #35, #5 in C#
got lucky though
took me 95% of the competition to figure out how to do pathfinding, but I'm happy with my result
 
9:18 PM
dangit, now I need somewhere to practice my new pathfinding skills, any ideas?
 
hello. I hope i'm not bothering anyone but can someone help me with something?
how can I add a for loop for each value
Number = Number + 1;
Label3.Text = Number;
so for each number do something
 
If you had asked that question on SO it would've been closed with "Unclear what you're asking". Can you elaborate?
 
Basically I've got a label and it increments by 1 every 5 seconds, so I just need to add a for loop each time that label increments
 
Still not clear what you're asking for. You got a label. Every second you increment a value that this label is showing. So far I'm with you. What do you mean by "add a for loop each time"?
 
9:34 PM
So for every time the label increments I want it to do something that's why i need a loop
 
How do you "increment the label" now?
 
using a timer but it suddenly stopped working
weird.
    int Number;
private void Timer1_Tick(object sender, EventArgs e)
{
	Number = Number + 1;
	Label3.Text = Number;
}
ok it works
i just need to add the loop
looks like i got a solution
For i As Integer = Label3.Text To Number + 1

        Next i
 
ok, apologies but I don't know the programming language VB.C# so I can't help you
 
Yea it's ok I use code converters :P helps me alot.
I know a bit of both vb.net and c#
i decided to use vb.net for something :D
 
9:49 PM
that won't work
Label3.Text isn't an integer, it's a string
 
it does form for me though
it increments fine
 
I am very surprised
not done VB for quite a while
 
could it be because my label3.text is only displaying numbers?
ir is that entirely something different
 
well I'll be damned.
there's an implicit cast there, I think
aha
Option Strict Off
stupid VB
I'd never write any VB with Strict off, because it permits weird stuff like that. Strict On gives it 'normal' CLR type rules, more or less
 
i've actually never used strict or explicit stuff like that :/
is that bad practise?
 
9:57 PM
It's up to you, I think it's in the language for compatibility with VB6
I prefer to be warned when I've done something crazy
3
 
haha good enough
 
it's not a problem if you trust yourself to write sane code all the time
 
well I've been doing stuff like that since i started programming
I'm not a pro
just an enthusiast
 
So the question I was actually going to ask was
what do you need that loop for?
 
I'm just playing around with vb.net code. but I wa creating a simple backup program just copying folders
so every 5 or 50 or 10 seconds etc there will be a folder copied to a location
 
10:16 PM
VB, the PHP of .NET
4
 
10:32 PM
Can you even do such an update in a non-async loop? I don't think the UI will update.
You'd need some asynchronous code flow in there if you're doing long bound tasks.
(Or threaded)
 

« first day (1253 days earlier)      last day (3678 days later) »