« first day (1816 days earlier)      last day (3115 days later) » 

12:13 AM
(horrid) question of the day!
-10
Q: I Need People Who Arent stupid to tell me why my code isn't working (I'm a beginner) Visual C#

Ben HoefsHere it is. It probably has all kinds of stupid little mistakes I made but I literally started learning C three days ago in my spare time. I'm not new to programming altogether; I have a little bit of experience in Python and am slightly more competent there. But C is a whole new world to me. #i...

I think he just randomly copy-pasted code-segments from the web without regard to logic, language, or common sense
 
lol, C# tag... stdio.h....
 
I like Olaf's comment
 
me too
I also can't believe somebody bothered to put up an edit
polishing turds just wastes everyone's time...
 
12:31 AM
@BradleyDotNET that title... wow
that's got like 4 things seriously wrong with it, not counting that it doesn't mention the question at all
 
at least he knows where he is at... I guess
 
How did he get so much rep in other categories?
 
he has 1 rep
not sure what you mean
 
whoops I was looking at the editor
 
ah
I would hope anyone with more than 1 rep would know enough to not ask a question like that
 
 
2 hours later…
2:13 AM
what kind of knowledge do jrs have ? what kind of responsibilities do they need to do
Just for personal reasons
 
so I have "<!-- ............. --><validXml />"... how should I remove the comment to return just the string
or remove all comments and return the string
 
java can suck a fat fucking dick
gradle, in particular
0
Q: Can't find symbol junit android studio

Steve GI just can't seem to get a test file to find Junit4. I've been trying forever and I'm just frustrated. It says it can't find symbol junit under org. Everything I've googled (for days), and even the android docs say this is how to do it. What am I doing wrong? Here is my test class import org.j...

:(
im so mad
 
 
1 hour later…
3:47 AM
jk, it's because i'm a fool, like always
 
4:15 AM
;)
 
5:10 AM
hey guys help me to fix problem getting file with ajax post
this is my code:pastie.org/10463156
 
5:59 AM
@vishuminhas have your tried $.post
and marking the method [HttpPost] on the controller
 
You could also inspect the ajax request with fiddler, to see what's going on.
@vishuminhas: What is the problem? Just posting some code doesn't tell me much.
 
@MatthewFlynn yes it will do easily with your solution
@scheien i need to upload file and want to get it in controller
 
$.post is merely a predefined variant of $.ajax, with the properties he already have.
Is it an ApiController, or just a regular mvc Controller?
 
@scheien it is regular mvc controller
 
take a look at this tutorial: mikesdotnetting.com/article/259/…
 
6:08 AM
ok thanks @scheien
 
You need to handle the files within the action.
 
@MatthewFlynn thanks you too
 
You're welcome.
 
6:37 AM
posted on October 06, 2015 by Scott Hanselman

Often times I hear folks say that they need (or want) 64-bit support when they deploy to the cloud. They'll deploy their modest application to Azure, for example, as a Web Application, then immediately go to the settings and set it to 64-bit. So many years later and it's "do I need 64-bit" is still confusing to a lot of people. I made basic Hello World ASP.NET app and deployed i

 
6:56 AM
hello
is that possible to execute a function is an application as administrator? only one function. I can provide credential to authentificate as administrator. I'm not interested in running the entire app as administrator. Is the only way to do this to run two different processes?
 
7:10 AM
@nkoniishvt Yes. Or upgrade the existing credentials when you need it. But a different process is usually how it is done
 
what kind of application?
 
7:27 AM
@RoelvanUden ok thank you
@TomW desktop, wpf app
 
7:52 AM
Good question
 
8:08 AM
morning everybody
 
8:39 AM
Hi guys, i dont really found a vbs chatroom, thats why i ask you here. I have to create a vbs script which replaces strings in multiple files. everything is working fine except the resx. I created a resx which matches perfectly here e.g. regex101.com but its not working with vbs
I guess it has something to do with the groups stuff
regexp, not resx, sry
My current regexp is:
justAString([\.][\w]*)[\""\.\n]
namespace Test.Test2.justAString.v2_4_0_0.Data
xmlns:c="clr-namespace:Test.Test2.JustaString.v2_4_0_0"
namespace Test.Test2.justAString.v2_4_0_0
These 3 cases should be matched, and only the v2_4_0_0 should be replaced
 
your grouping includes the first '.' for starters
and I'm not sure what \"" does?
 
The complicated thing about it, is that v2_4_0_0 is changing all the time thats why i created this regexp. Can any1 help me to modify it so its working for vbs too?
One " less is correct sry
 
Wouldn't this work?
\.(v[\w]*)
blah.**v2_4_0_0**.Data
should match that
stoopid formatting
do you have any regex working as part of your vbs script?
 
the problem is that v2_4_0_0 can be a random string
and not always starting with v and so on
 
ah
 
8:47 AM
What i have is the justAString stuff
in fact i need to rename my namespaces in wpf projects
 
so anything [\w]+ after 'justAString.'
won't Visual Studio do that for you?
or do you have to do it regularly?
 
yea but not only. cause it also needs to match if it dont ends with a .
I have to do it after each build (on the build server at the end=
 
Hi everyone
 
Its a weird system with plugins -.-
 
it smells like you're trying to fix a symptom rather than the underlying problem here.
 
8:49 AM
hi
 
ew
 
Yes im doing this.. but im forced to do that :/
 
Any one working with Isolated shell application[extensibility applications]
 
And additionally to
so anything [\w]+ after 'justAString.'
it should just replace the things between the first and second dot...and it is working like i did it, but not in vbs :(
 
should work. \w matches a-zA-Z0-9 and _
so will terminate on . or "
 
8:52 AM
ah i see..i try iz
 
what's it doing in vbs? Can you get a simpler replace to work?
 
Yes, a simpler replace is working perfectly :/
 
Try typing harder.
(I'm out of ideas)
 
at first i thought its not working, but if i add a * (to do it for everything) its seems to work
justAString\.[\w]*
i need to check it in vbs
 
* is zero-or-more
+ is one-or-more
you'll want to use +
General C# question to all - what's the clearest way of comparing dates? Like, figuring out if one date is over 7 days later than the other?
DayOne > DayTwo.AddDays(7)?
DayOne.Subtract(DayTwo) > (7 somethingsomething)?
 
8:58 AM
Thats true, + is better
 
@Squiggle I prefer the timespan approach. date1 - date2 > TimeSpan.FromDays(7)
 
@RoelvanUden that's way more elegant. Thanks :)
 
Visual Studio 2013 professional doesn't give me the option to create an Application Configuration File, only a Web Configuration File. Is this usual? (first ever WCF project so I don't know anything about this kind of project)
 
@Squiggle right now im failed at concating strings..i really love this vbs stuff -.-
 
@nkoniishvt WCF is web-based, so it uses web.config. They're pretty much the same thing.
@nkoniishvt the hint is in the name - WCF = Windows Communication Foundation. It's a network services framework.
 
9:09 AM
@Squiggle I read on stackoverflow that if the WCF service was self hosted it uses App.config, if it uses IIS it uses Web.config. Is that wrong?
 
@nkoniishvt I guess that depends on the type of project. Actually I've got a self-hosted WCF app right here - it's a console application, uses app.config
I guess the Visual Studio default is to create a web-hosted WCF project
 
@Squiggle Now i got it. Thank you very much, its working great :!
 
@JoshuadV \o/
 
@Squiggle ok, I'm a bit lost with WCF (I just begun with it). I want a simple service but the host (a console app) seem not to use the Web.config. I noticed that because when I try to .Open() the service it throws an exception saying that the service have no endpoint. If I add endpoint programmatically it starts it fine. And the web.config contains endpoint
and on msdn they say you've to add an Application Configuration File, which isn't an option in visual studio, so I've no idea how to fix my problem
 
@nkoniishvt what's the MSDN resource you're using?
 
9:18 AM
@Squiggle to add the App.config: msdn.microsoft.com/en-us/library/vstudio/…
"Expand Installed, expand Visual C# Items, and then choose the Application Configuration File template."
 
@nkoniishvt I mean a broarder WCF guide
 
@Squiggle I'm trying to follow this tutorial on codeproject: codeproject.com/Articles/650869/…
 
OK - so you created a class library?
 
yep
 
that should have an app.config, not a web.config
in VS - check your project's Properties
Output type: Class Library?
 
9:24 AM
yes
 
hm.
 
but you're right, I used the WCF Service Library if I remember right
 
¯\_(ツ)_/¯
 
my bad
I thought following the vs template would be better :/
I'll create an app.config and edit it
 
depends entirely what you're trying to accomplish
self-hosted in a service, desktop app or console app then you'll need to do what you're doing now
 
9:34 AM
I'll follow completely the tutorial or I'll get lost and lose time :)
 
@nkoniishvt what sort of app are you making?
where will these services be consumed?
Hosting in IIS provides many benefits if you're exposing the services to clients over a network. I use the self-hosted WCF as a service layer of a suite of hosted applications - it's never exposed externally or used by 3rd parties
 
@Squiggle I've a problem: I need to be able to set the local computer timezone & time. For this you need admin rights, so I've a manifest for this. It works well. On the other hand I also need to use Marshal.GetActiveObject on an external executable to get information. My problem is that this executable is ran as local user, so it throws an exception if I get it from my app that's run as admin.
So I need a Service that runs as local user to provide me with the result of GetActiveObject and provide it to my app
it's a service purely consumed on local computer
I don't need any network availability
brb lunch, thank you for your help, back in 45 mins
 
I think you can just launch a thread with different administrative rights from within the same program, no?
 
How the hell does WCF handle decimal data types? I try to pass value and always get 0 onserver side.
[DataContract]
public class Transakce
{
    [DataMember]
    public decimal Celkem { get; set; }
 
separate Process, sorry. stackoverflow.com/questions/2021831/… @nkoniishvt I suggest you just create a command line app that sets system time, launch it using StartProcess with admin rights
@Marek should work just fine. You're consuming WCF service in C#, right?
 
9:48 AM
@Squiggle Yep.
 
@Marek enable WCF Tracing and check the message payload? msdn.microsoft.com/en-us/library/aa738639.aspx
 
@Squiggle Thanks!
It is weird if I Test WCF, values are OK.
 
@Marek how are you referencing the WCF endpoint? Could be that your contracts don't match?
 
10:13 AM
When I examined the Trace log, I can notice Warning: Configuration evaluation context not found. Do you have any idea what it could mean? @Squiggle
 
nope. What does Google say?
 
Uhh, hell I was missing [XmlSerializerFormat]
 
10:31 AM
it's always something like that with WCF :(
 
@Squiggle indeed good idea
@Squiggle and much simpler one
 
GETTING PEOPLE TO DO THIS IS LITERALLY THE WHOLE POINT OF THE CHARGE YOU LOBOTOMISED SHITLARKS http://t.co/4LtEwT7Jat
meanwhile in the UK...
Chaos reigns over the introduction of a 5p charge for carrier bags. Tabloid suggests a revolutionary idea of "bringing your own bag when you go shopping".
 
10:48 AM
Outrageous.
 
Hello Guys
anybody please help me
0
Q: Logout in one application cause logout in another one

FoolI have two different web applications hosted in same server . and in one application i have link to the second one . If a user login in first application and click the link to second one , the user automatically login as i pass the login information through query string . The Problem : If the...

 
11:09 AM
did the cookie thing not work?
sounds the most likely culprit
@Fool sounds like your auth mechanism is a bit unusual
 
11:27 AM
hi guys, I'm having an issue where my form is not posting when published to an azure server? any ideas why? i know sometimes they can be a bit over protective??
the form generated is
<form novalidate="novalidate" action="/MA/Accounts/Register" method="post"></form>
now they have an api running at the root
so this application is running under the ma folder
i cant see it having any issues with the binding? and I would have thought I would see an error page if it cant find the controller aciton?
clicking the button just does nothing? and if i look at the firebug network monitor clicking the button is not firing th epost at all?
 
@MatthewFlynn I think the answer for Your four questions are yes
 
11:42 AM
good morning!
 
har har
 
he he
 
@ntohl after looking at the get a bit deeper with firebug i have an ajax usename availability check which is throwing back a 500 error, with the message 'The remote certificate is invalid according to the validation procedure.' The site is running on https does it look like a cert issue?
 
12:03 PM
63
Q: How do I use WebRequest to access an SSL encrypted site using https?

Alfred B. ThordarsonI'm writing a program that reads content from a user provided URL. My problem is in the code that goes something like this: Uri uri = new Uri(url); WebRequest webRequest = WebRequest.Create(uri); WebResponse webResponse = webRequest.GetResponse(); ReadFrom(webResponse.GetResponseStream()); And...

 
12:20 PM
@ntohl ok i see. so do you think I am requesting ove http?
 
o/
 
@MatthewFlynn: Inspect the request with Fiddler.
 
@scheien ok installing it now
@scheien ok got it running now struggling to see the data?? its picking up the call ok and adding it to the list but i can tsee what its returning?
 
12:38 PM
Header?
or Response?
 
@JoJo @ton.yeung sorry i'm rushing. yeah after a refresh its giving more info
so yes its showing the 500 error
its just givin gthe same info. i.e. pastie.org/10463803
@ton.yeung i can take a bit of stick :) i deserver it a lot of the time
 
Is the certificate issued by a trusted party? or is it a selfsigned thingy?
if self-signed you need to put it in another store, e.g. trusted people
might be. Never dealt with an CA locally. Just used from verisign and other CA's.
 
12:56 PM
@scheien sorry I rebooted the browser in frustration
I dont have access to the azure server which is frustrating
I have just found out that the cert is a wildcard
*.theirdomain.com
 
:>
Me neither. Just running around with selfsigned stuff
@MatthewFlynn: I don't know how to set up that kind of stuff in azure, probably others here who have more knowledge about it than I do.
 
@scheien thanks anyway. fiddler is saying it is sendong over https so the cert can be the only issue i can see?
 
how difficult would it be to create a visual studio extension that lets you drag and drop files onto the editor and have the plugin insert all text from that file?
like you can with the toolbox and code snippets
I mean how much pain are visual studio extensions in general?
 
regarding fiddler a quick question
the main window is showing HTTPS (in the selectable list)
the request headers is showing
GET /IMA/Accounts/DoesUsernameExistAsync?Username=test HTTP/1.1
does this mean it sending over HTTP?? and not HTTPS?
 
1:18 PM
something somthing uservoice.com?
 
1:28 PM
lol at the visual studio icon issue
My company is still on 2012, so we have no problem
I think we have one lol
nah, thankfully no :)
I think .NET 4.0
lol
We're a consultancy company
so I guess we don't care about newer versions unless necessary or if clients wants it :/
 
A dev should be kept up-to-date on the newest of tech, that be framework or editor.
 
Agreed, @scheien
 
lol okay
 
Especially when working as a consultant.
 
yeah I know but oh wells :/ That's just how it is here
 
1:34 PM
It doesn't feel like you're falling behind in terms of technology and productivity until it's too late
On a similar note, it's incredibly depressing how many people turn up here asking for help with a WinForms project.
@ton.yeung waiting for SP1 is smart, however frustrating :P
Our business just upgraded to IE11! \o/ that's practically progressive for an organisation like this one.
@ton.yeung I was doing VB6 in 2007 and I thought that was pretty poor. VB6 is a cripplingly barren language to use.
 
oh noes that reminds me... my feature doesn't work right for IE11
darn
but the rest of the browsers it does :/
 
hi guys
 
hi
 
i've implemented an IEditableObject interface to manage changes of an object
 
Morning
 
1:39 PM
but I dont know how to check if the object is effectively changed
 
yeah I think so
 
@FrancescoDS: Have a internal property that's modified if any changes occur?
 
Apparently, it's an issue with editing one of the drawn lines in Unity3D
can't edit
 
I've also implemented INPC
 
in IE11 but other browsers, they can edit
 
1:40 PM
but setters are also called inside VM constructor
 
hi guys as my site is running locally (over https e.g localhost:44304) is it worth trying to create a developer ssl through IIS and run the site through this to debug?
 
I've followed the sample in msdn msdn.microsoft.com/en-us/library/…
so I have private structs for backup and current data
so I cannot access them from external
do I need to create a method?
 
1:55 PM
is this a good tutorial on adding an ssl to a vs project?
seems a little long winded having to edit the hosts file
 
you are only editing the host file for DNS
so the cert matches
you can't go to localhost and get the cert to work has to be the name
 
the T in Lazy<T> can be abstract
 
@juanvan so can I just setup the project over https (as it is currently)
 
but then you have to specify a factory method that creates an instance of a derivation
 
and then edit the hosts file to redirect to localhost?
 
1:59 PM
following that @MatthewFlynn it looks like it - I have never done the process as shown
 

« first day (1816 days earlier)      last day (3115 days later) »