« first day (2051 days earlier)      last day (2890 days later) » 

1:08 AM
In EF 6.0, I tried to remove an entity that I had loaded but it gives exception as I try to delete it: The object cannot be deleted because it was not found in the ObjectStateManager.
using( MyContext context = new MyContext () )
{
marks.Marks = "43";
marks.StdId = 1;
marks.SubId = "2";

context.Marks.Load();
context.Marks.Remove(marks); // Exception
}
 
1:53 AM
@TomW Thanks Tom . I will definitely try setting accept in header.
 
 
1 hour later…
user6096770
3:03 AM
how can you print/store "\"? i get an error
 
3:13 AM
@FluffyWuffy What error do you get?
 
user6096770
i cant print "\", googled answer: @"\"
 
5:23 AM
Is there anyone?
 
6:17 AM
its weekend
not many ppl are gonna be online
 
7:09 AM
morning
 
gm :)
 
7:30 AM
I wish I could run .NET Core apps on my synology diskstation
I know that the more expensive ones can run Docker so maybe it's time for an upgrade
but I'm afraid I'm gonna spend a lot of money on something that doesn't work
 
I got no experience with the diskstation :/
 
do you have a synology?
my diskstation is absolutely fantastic for data storage and lightweight web apps
but it quickly grinds to a halt when you try to do any sort of processing on it
like unpacking archives
 
8:04 AM
Hello all
How to use correctly a Converter in WPF to bind the properties?
Now I try this:
 public class ColorConverter : IValueConverter
    {
        public Color Positive { get; set; }
        public Color Negative { get; set; }
        public Color Normal { get; set; }

        public object Convert(object item, Type targetType, object parameter,
                    System.Globalization.CultureInfo culture)
        {
            var value = (double)item;
            if (value < 0)
                return Negative;
            else if (value > 0)
                return Positive;

            return Normal;
in xaml:
<Window.Resources>
    <BooleanToVisibilityConverter x:Key="BoolToVis"/>
    <local:ColorConverter x:Key="ColorConvert" Negative="Red" Positive="Green" Normal="Black"></local:ColorConverter>
</Window.Resources>
and:
        <TextBlock
                   Text="{Binding Some, StringFormat=Some: {0} }"
                   Background="{Binding Some,Converter={StaticResource ColorConvert}}">
        </TextBlock>
but this option does not work.
 
8:20 AM
The problem is solved - use a SolidColorBrush :)
 
 
2 hours later…
10:45 AM
hi guys
 
o/
 
HI..
i a using 3 tier archte. i create three solution 1 for BAL second for DAL and 3. for the main application Now the appliacation working properly. But when create setup then the database is not connect.
public static string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
public static string path = (System.IO.Path.GetDirectoryName(executable));
public static string database = path + "\\DAtabasename.mdf";
public static string connectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=" + database + ";Integrated Security=True;User Instance=True";
i am using this but its cant connect to db
any one help me out of this.
is in wpf C#
 
I can't help you because I've never using db in c#
used*
 
Why not just use ef and create the db the first time it's used, it negates the need for the file
Given that you have a dal you can abstract ef even being there from the rest of the code base but have something like code first build you one
 
11:12 AM
Anyone know why this isn't working?

public void splash()
        {
            SplashScreen s = new SplashScreen("Arunex transparent.png");
            Task task = new Task((() =>
            {
                s.Show(false);
                Task.Delay(3000);
                Thread.Sleep(3000);
                MessageBox.Show("see?");
                s.Close(new TimeSpan(1000));
            }));
            task.Start();
        }

There's no delay at all. I used both Task delay and thread sleep, but it just skips it for some reason?
@parth hey. have you tried using entity framework?
 
no not entity framework.
 
@parth Why is your datasource .\SQLEXPRESS and not your computer's name?
 
I use this type of connection string means where the setup will install the database will be there so that find from that path. Or In client pc we dont need to change the client pc name.
its already working without three tier architecture.
 
GetExecutingAssembly() is probably different in this case then
 
11:27 AM
i dont think so because here to DLL BAL.DLL & DAL.DLL then we write code in DAL so that both file in same location and also setup file also same location or i am not sure may be it change .
 
My database doesn't work when I use that as my datasource. I have my datasource= System.Environment.MachineName
try that maybe?
 
@betarunex like this public static string connectionString = @"Data Source=System.Environment.MachineName;AttachDbFilename=" + database + ";Integrated Security=True;User Instance=True"; ?
 
no, like this:
@"Data Source="+System.Environment.MachineName+";AttachDbFilename=" + database + ";Integrated Security=True;User Instance=True";
 
@betarunex ok let me check.
 
Although my connection string looks different
 
11:42 AM
Why does Console.WriteLine outputs when ran with F5 but not CTRL + F5?
 
@catgocat in the latter case the debugger redirects the output to the output window
 
And what is the output window?
 
Hey Great..! its working And i have another question also when its connected to lan then i have to use ip connection strin the i am Using that
int counter = 0;
string line;
string Ip = "192.168.0.104";
try
{

public static string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
public static string path = (System.IO.Path.GetDirectoryName(executable));
System.IO.StreamReader File = new System.IO.StreamReader(path + "\\Ip.txt");

while ((line = File.ReadLine()) != null)
{
Ip = (line);
 
@parth Glad it works :). Sorry though, I only started learning database stuff this week, So that's about as much as I can help you with for now.
 
ok no problem i will check using that ip then problem the i will let you know. But thanks a lot for this @betarunex.
 
11:50 AM
@parth Glad I could help :)
 
@catgocat actually, I'm wrong. I just tried it and it doesn't do what I was expecting
But I suspect the reason is that it's being redirected somewhere
 
Guys how can I write code here?
 
@TomW thanks anyway
 
@Antoine ctrl+k
 
    **View**

    <Grid>
        <Canvas>
            <Polyline Points="{Binding Points}" Stroke="Blue">
            </Polyline>
        </Canvas>
        <Label x:Name="label" Content="Check if is changing VM" HorizontalAlignment="Left" Margin="64,19,0,0" VerticalAlignment="Top"/>
    </Grid>

**ViewModel**

    public PolygonViewModel()
        {

            SomeUpdateFunc();
        }
        private ObservableCollection<Point> points = new ObservableCollection<Point>();
        public ObservableCollection<Point> Points
 
11:54 AM
but if it's more than a couple of lines use gist or pastebin pls
 
I trying to implement this, but for some reason isn't doing nothing.
I've checked if the viewmodel is correctly changing (with the label) and all seems ok, but the lines don't appear.
 
hi all...
 
@Antoine how does the label do that?
 
i am currently facing a problem....
its a char pointer passing to a function problem...
 
@quidstone C# doesn't have pointers, there are probably not many C/C++ users here
 
11:56 AM
oh sorry...
cool...
my bad!
 
Worth a try though
 
@TomW the label don't do anything is just a guideline for me xD to check if I changing the view correctly
 
@Antoine I don't see how it would show you that
 
@TomW because I call this view from another view. The problem is with the lines not with the label.
 
@Antoine where do you set the datacontext?
 
11:58 AM
DataContext="{Binding Settings_VM, Source={StaticResource Locator}}"
SimpleIoc.Default.Register<SettingsViewModel>();
public SettingsViewModel Settings_VM
        {
            get
            {
                return ServiceLocator.Current.GetInstance<SettingsViewModel>();
            }
        }
the view model is called settings not polygon.
 
Why does this not want to bloody wait 10 seconds no matter what I try do with it?
Task.Run(()=> {
                SplashScreen splash = new SplashScreen("Arunex transparent.png");
                splash.Show(false);
                Task.Delay(10000);
                Thread.Sleep(10000);
                splash.Close(new TimeSpan(10000));
            });
 
@betarunex await Task.Delay I think?
 
@TomW do you know what can be wrong with my code?
 
@Antoine can't see it
 
@TomW I want the rest of the code to continue though. I just want the splash sceen to show up for a while
 
12:04 PM
@TomW you don't suspect anything?
 
what do you want from me, I'm not a WPF expert
 
just tips that can help me find the problem.
 
@betarunex Use splash.Close( TimeSpan.FromSeconds(0.3));
protected override void OnStartup(StartupEventArgs e)
{
// Step 1 - Load the splash screen
SplashScreen splash = new SplashScreen("splash.png");
splash.Show(false, true);

// Step 2 - Start a stop watch
Stopwatch timer = new Stopwatch();
timer.Start();

// Step 3 - Load your windows but don't show it yet
base.OnStartup(e);
MainWindow main = new MainWindow();

// Step 4 - Make sure that the splash screen lasts at least two seconds
timer.Stop();
int remainingTimeToShowSplash = MINIMUM_SPLASH_TIME - (int)timer.ElapsedMilliseconds;
 
@parth I see why my code is crashing. I have no idea how to fix it though... That works on it's own, but when I run a bat file from my program, it immediately kills the splash screen. So I cant have a bat file run in the background...
 
@betarunex ok..can you rebuild the application..or put the break point where its loop fall actually ..!
Go to Event Manager>Windows>Application
there is you see the error message also why it crashing but it only when you make setup .
 
12:22 PM
@parth It's not crashing though. It's just deleting my instance of a splash screen. and I see it only happens sometimes???
 
@betarunex Ohh ok..!
@betarunex sorry how without code i cant get any idea.!
 
:30823591
            SplashScreen splash = new SplashScreen("Arunex transparent.png");
            splash.Show(false);
            deleteDatabase();
            createDB(truTextsDB);
            //Thread.Sleep(1000);
            splash.Close(TimeSpan.FromSeconds(2.3));
@parth my delete and create run batch files that delete and create my database from sql files.
I want the splash screen to show during that proccess, but it's just not willing to show.
Or well... it shows sometimes, and just disappears other times.
 
@betarunex May be its too slow time that in mean while your code execute it and splsh scrren will disapper.
 
@parth I also have a popup message box in my createDAB method. so the splash screen should show for a minimum of 2.3 seconds. yet sometimes when i close the message box to run the batch file, the splash screen immediately closes. But sometimes the splash screen stays open. It's a gamble at this stage whether it'll close immediately or not without doing anything differently.
@parth I also have a popup message box in my createDAB method. so the splash screen should show for a minimum of 2.3 seconds. yet sometimes when i close the message box to run the batch file, the splash screen immediately closes. But sometimes the splash screen stays open. It's a gamble at this stage whether it'll close immediately or not without doing anything differently.
 
12:38 PM
@betarunex i also finding solution some thing is wrong if any thing is there then i let you know.
 
hello
 
@parth Awesome thanks.
 
0
Q: personal Event and delegate in c# , event in timer.. some doubts

rul3zI write a small class CountDown, using a timer to create a countdown and raise an event when time target is done. My example : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CountDownWithEvent { public delegate ...

someone can give me some directions ?
 
:30823699 This just never closes the splash screen for some reason???
            Task.Run(() =>
            {
                SplashScreen s = new SplashScreen("Arunex transparent.png");
                s.Show(false);
                s.Close(TimeSpan.FromSeconds(2));
            });

but if I run the code directly, it works fine? So many random bugs....
 
If the task runs on a threadpool thread, cross-thread exception I guess?
The task isn't awaited so it just gets thrown and ignored I think
just a guess
 
12:56 PM
@TomW But the task does start. The splash screen is created, then shown, but it never closes until the entire program is stopped. it just ignores the last line of code for some reason?
wit... wtf. If I have:
MessageBox.Show("Useless text");
after the
s.Close(TimeSpan.FromSeconds(2));
it works. Then the splash screen closes with that messagebox on top?
 
Is this windows forms?
You can't close a form from a thread other than the one that created it, and Task.Run runs on a thread pool thread. So calling s.Close there is not allowed
 
1:12 PM
:(
 
Nope. wpf. and It's from main thread. And my splash screen close call wont work with
s.Close(TimeSpan.FromSeconds(2));
but it will work with
s.Close(TimeSpan.FromSeconds(2));
MessageBox.Show("useless text");
 
@betarunex No it's not, read the documentation for Task.Run
The involvement of the messagebox, I have no idea why that would be different
 
I'm currently doing it. try it on your pc maybe with another image?
Task.Run(() =>
{
SplashScreen sp = new SplashScreen("Arunex transparent.png");
sp.Show(false);
sp.Close(TimeSpan.FromSeconds(2));
MessageBox.Show("Useless Text");
});
runs as I would expect. with a fading splash screen

Task.Run(() =>
{
SplashScreen sp = new SplashScreen("Arunex transparent.png");
sp.Show(false);
sp.Close(TimeSpan.FromSeconds(2));
});
Runs with an eternal splash screen.
 
@betarunex subscribe to Scheduler.UnobservedTaskException and see if you get an InvalidOperationException
 
@TomW Sorry. No idea what that is? I'm new to tasks and threading.
 
1:20 PM
What part's not clear?
The way you run that task, I believe it will throw an exception and I believe that because you're not awaiting it, the exception will be ignored
That event gives you feedback on exceptions thrown from tasks but not observed
 
I have no idea how to "subscribe to Scheduler.UnobservedTaskException"
 
I didn't realise that SplashScreen was a built-in feature though
 
Yea. A lot of people seem to create a new window with a picture as their backround for some reason?
 
OK, I revise my statement
I hadn't noticed that the splash screen is created in the same task
But creating new windows - and I think it is fundamentally a window - in another thread is kind of weird. I would avoid doing that
 
@TomW I just want the splash screen to be created in a new thread so that my background code can run while the splash screen shows for a few moments.
 
1:52 PM
0
Q: Splash screen not closing from task without adding unwanted code

betarunexMy method in wpf: Task.Run(() => { SplashScreen sp = new SplashScreen("image.png"); sp.Show(false); sp.Close(TimeSpan.FromSeconds(2)); MessageBox.Show("Useless Text"); // I cant get rid of this without unwanted results }); runs as I would expect. with a fading splash screen and a popup message...

 
T J
Hello
 
Hey there
 
T J
Do you happen to use visual studio?
 
What do you recommend for learning C#?
I already program in other languages
 
@TJ Yes. using vs
 
T J
2:04 PM
I wanted to test a hybrid application. When I opened it (2015 community edition) after long time, it asked me for update and now it has been updating for hours :/
just wondering if that's normal
btw my system was shutdown during the update. After restart it automatically resumes the update but it seems like never ending ._.
 
@TJ yeah massive updates to VS aren't uncommon, but that does sound like a bug...
 
T J
Hmm will cancel and try again then. Thanks!
 
@TJ I've known some people that have had updates running for hours. literal hours. but it eventually finishes
my question has 13 views, but no answers :/
 
Hi guys
 
hello there
 
2:17 PM
I am having interview tomorrow on asp.net mvc
Recently my friend was ask in interview that why mvc
My friend answered separation of code
But interviewer was not satisfied with answer
 
2:35 PM
@Learning what do you think they want to hear?
 
2:45 PM
I too dont know
But what will be your answer
 
2:58 PM
what's the difference between new public and public override ?
 
3:16 PM
How can I relate different classes and join their "fields", for example I have students and classes, in classes I have the following code: ("Clas" is a class related with the form "Class")
Array.Resize<Clas>(ref cla, cla.Length + 1);
clas[clas.Length - 1] = s;
clas is from:
private Clas[] clas= new Clas[] { }
 
3:33 PM
@catgocat they are different keywords. Were you trying to find information?
 
SQB
PSA: interested in comics and cartoons of all kinds? From superheroes to Gaston Lagaffe, from Garfield to Maus, from Tintin to xkcd? Follow and support the new Comics Proposal over on Area 51!
 
Hi , can anyone help me in solving this problem
http://stackoverflow.com/questions/37482874/polynomial-long-division-c-sharp
 
@Learning good luck with that
@rockethon why not use List<_>?
 
3:57 PM
@FoggyFinder will that guarantee that all classes are in the variable?
Also to compare values in datatimepicker´s what do I have to do to see if they´re the same as a ComboBox?
 
@rockethon sorry, I don't quite understand what you want to do.
 
I want to compare a time that I have on the datetimepicker and a day of the week I have on the combobox to make sure their´r different. Because I want to assign them to a ClassRoom and I have to make sure that only one classroom cannot be able to be assign to more than schedule at the same day of the week or time/hour
 
Then, maybe use Dictionary?
 
@FoggyFinder I´m using "if" at the moment
 
Sorry, I need to go, but I'll be back later
 
4:10 PM
Ok, do You know any link that can help me with this?
 
5:08 PM
@rockethon how can a time of day and a day of the week ever be the same? You're measuring different things
 
user47589
5:32 PM
well i have 3 minutes, and its the 3rd day of the week. 3 = 3 = win
 
5:48 PM
does anyone remember who's that guy who was asking about the visitor pattern?
 
@TomW Its a day of the week that the user enters by itself on a text box created by me and the time also has this property.
 
user47589
nope
 
Does anybody know how to compare a content in a datetimepicker with a string entered by the user?
using if
 
Is the string a date time?
Or should I say ... Is it parsable to one
 
if (p.Timeoftheday == timeoftheday)
from foreach (Timeoftheday (class) p in time (variable linked to a class with private Times[] time= new Times[] { };)
 
6:00 PM
You're using datetime for that? O... K ....
 
@Darth_Wardy no the string is entered by the user in a txtbox and then he basically want s to search for it in other form using the method I described and therefore comparing with the datetimepicker
It´s used to "scroll" through hours and minutes
 
@rockethon I have no idea what you're talking about, and it looks like several other people have no idea either
 
OK, I´m going to paste the code here
 
Use a gist please
 
nvm
 
6:05 PM
wat
 
Please don't read that.
 
Too late ( Í¡° ͜ʖ Í¡°)
 
gist: 1f0ff3e11bd109ee0c4cd24c77f2a719, 2016-05-28 18:08:24Z
   private Time[] times = new Time[] { };
   public Time SearchSchedule(string day_of_the_week, int starting_time)
        {
            Time h = null;
            Time p = null;
            foreach (Time hl in times)
            foreach (Time pl in times)
            {
                if (hl.Day_of_the_week(form) == day_of_the_week)
                    if (p.Starting_time(form) == starting_time)
                {
                    h = hl;
                    p = pl
                    break;
                }
            }
            return h;
            return p
        }
Hope it helps @TomW
 
Not really. What does this function do?
'Search Schedule'. OK. What's it searching the schedule for?
What schedule?
 
user47589
none of those variables have meaningful names
 
user47589
6:10 PM
we can't discern their meaning
 
Also, you can't return two objects from a method
 
I still think this is a really funny language feature dotnetfiddle.net/KlfwhG
the double dispatch thing
 
Also, it doesn't compile. You're missing a semicolon on the last return
 
TIL gist can embed
 
@Failsafe it rather defeats the purpose doesn't it?
 
user47589
6:12 PM
yeah
 
The whole purpose to this is to get the Room that´s "linked" to the Schedule
imagine a school schedule
where you have your classes time and classrooms
 
How in any way does that function get a room? Where do you mention rooms?
 
and you have a form for the schedule and another for the classroom
in a form
where they´re inputted by the user
and get save
in that exact form
 
@TomW Yea
 
@TomW did you got it?
 
6:20 PM
@rockethon the background is interesting but I still don't know what you're asking
 
I´m trying to build a code that would be able to show me the Classroom that´s in the Schedule for the time that´s inserted by the user and day of the week
 
That's not a question
 
I don´t understand
 
I give up
 
What you don´t understand (if it makes any sense)
 
6:23 PM
If you can't explain clearly what you want, we can't help you
 
Please explain again
 
user47589
We can't understand your problem domain, let alone what your code is trying to do.
 
What do you need
 
What do you want to know?
 
The classroom
 
user47589
6:23 PM
I doubt we're going to be able to help you.
 
thats in the schedule for that day of the week and time
If i send you the class of both forms would it help?
 
Sure, put it in a gist, but I doubt it will help
 
user47589
If the rest of your code is like the code you've already provided, it won't.
 
there it is
both correspond to the 2 form I have
 
The hell is that?
oh, right
why did you embed it in a script tag?
No, I give up
 
user47589
6:29 PM
why does the gist only have 8 lines?
 
Because they´re only referring to the class in the forms which lets you know about the content of both forms at the moment
 
user47589
@rockethon, i dont think we're going to be able to help you.
 
I don´t know whats lacking
 
What do you want us to tell you?
That is to do with C#
 
how do I get the classroom number, just by inputting the day of the week and the time
 
6:33 PM
How are we supposed to know what a classroom number is?
You're basically just asking us to write the code for you, so no
 
I´m not
I´m asking for help
 
I am
 
since I posted the code and you weren´t able to tell me if it worked
 
*... the plot thickens... *
 
like that
 
6:34 PM
@rockethon you didn't explain what 'works' means
What result are you expecting?
What do you get instead?
 
guys look at my nasty code and tell me if it looks right to you...
 
I need to know how can I use the operator == with a datetimepicker
just that
 
user47589
what, @kush?
 
Finally we are getting somewhere. Why didn't you just say that to start with?
 
I did
You asked me what are you trying to compare
I explained
 
6:37 PM
@kush wow your code must be really bad if it start getting offensive :P
 
@Amy so basically I'm comparing avl tree, red black tree, and 2-3 tree. I didn't write any of the code so I'm not sure what counts as an operation
 
I disagree that what you gave us was a clear explanation
But anyway. I assume DateTimePicker gives you a DateTime.
 
@kush If you have nothing to add please resume your presence
 
so the way I have it, every node in a 2-3 tree has to do two comparisons which makes 2-3 tree look horrible
@rockethon ??
 
user47589
okay, @kush
 
6:39 PM
@TomW indeed
 
Dear flagger staph please
 
user47589
who is spam flagging kush, and why?
 
Just ignore him if you think it's annoying
 
But I have set it only for time, since I´m working with hours,minutes,seconds @TomW
 
@Amy I didn't do anything :(
anyway, here is the gist
 
6:41 PM
OK, if the comparison you want is not exact equality i.e. two datetimes are exactly identical, it's not really 'equals'
 
user47589
@kush i know.
 
the thing is I only have 1 datetimepicker and the other would be a txtbox
 
Hello!
 
@rockethon what is entered into the textbox?
 
6:44 PM
the time the user wants to include in order to compare with the datetimepicker
 
@Amy so my concern is line 1503 gist.github.com/9034725985/…
 
@rockethon specified in what format?
Also, expecting your users to know what format you expect and enter it correctly according to your rules is at best tedious for them
 
it´s in a string format
 
Obviously
No, what layout of numbers and punctuation do you expect?
 
just pure string
 
user47589
6:51 PM
...
 
...
 
I don't see how you don't understand the question
 
user47589
@TomW lol, man
 
How do you distinguish whether the user has entered garbage, or a value that you understand?
If I typed 'asdf' there's no way that can be a valid date or time in any sense
 
Once it will be assign to a variable
I think any format would work
 
6:54 PM
Just answer the question, PLEASE
 
in Ruby :: Sometimes on Rails, 5 mins ago, by Jan Dvorak
I have a first world problem: The stream I want to watch is native 1080p but my secondary monitor is only 900p.
 
@TomW simple as it can be, the user enters a number in the textbox and it should be compared with the datetimepicker to check if they´re the same
If they´re then it will assign this value to a variable "pl" in this case
 
@rockethon does the number represent hours?
also they will never be 'the same'. You have to describe clearly what you want the comparison to be
A number is never a datetime unless it represents ticks, which would be impractical
 
Why did some guy mark my question as duplicate to another question that has nothing to do with mine?
 
the number (entered by the user) will represent hours, yes
 
7:00 PM
0
Q: Splash screen not closing from task without adding unwanted code

betarunexMy method in wpf: Task.Run(() => { SplashScreen sp = new SplashScreen("image.png"); sp.Show(false); // Thread.Sleep(2000); // just to show for 2 sec before fading sp.Close(TimeSpan.FromSeconds(2)); MessageBox.Show("Useless Text"); // I cant get rid of this without unwanted results }); runs as ...

 
@betarunex Same answer, I guess?
 
@JanDvorak Can you check it quick and see if any of those answers are relevant to my question about code not running in a separate thread?
 
I can't
 
Because I dont see any similarities
 
Don't you?
 
7:03 PM
@rockethon then the closest I'm aware of in DateTime is DateTime.TimeOfDay.Hours
Number of hours past 00:00 for that time of day
Which I found by reading the documentation
 
@JanDvorak No. No one answered my post, but this guy just marked it as a dupicate, and the supposed duplicate is just some random guy asking for basics.
 
Apparently you are, too?
 
@TomW doesn´t work it says that I may be missing a reference
 
@rockethon well fix it then
 
user47589
lol
 
7:07 PM
DateTime is in System
Waait.
You posted .js earlier
DateTimePicker is a name from jQuery, although not exclusively
What language is this?
 
C#
 
user47589
lol
 
I'm asking why a line of code in a task is ignored unless I have extra code afterwards. So the guy thinks "you fix it by running the splash screen on the UI thread running the main window" is an answer to why code is ignored on a thread
 
@betarunex that's along the lines of what I thought
The UI thread is the UI thread for a reason
But yes the difference in the two cases is mysterious
@rockethon DateTime is in System
 
but That has nothing to do with why
sp.Close(TimeSpan.FromSeconds(2));
doesn't work, but adding
MessageBox.Show("Useless Text");
will now force it to work again.
 
7:10 PM
59 secs ago, by Tom W
But yes the difference in the two cases is mysterious
 
So then you agree that it's not a duplicate thread to some guy asking how to show a splash screen?
 
I agree
> Because your problem is fundamentally the same: you are not dispatching window messages. Showing the MessageBox causes, while it's shown, window messages to be dispatched, allowing the window to close.
There's the answer
 
@JanDvorak yeah I have a 1680 x 1050 on a 23" here. It is annoying.
 
@betarunex I've prompted that user to make that an answer
 
@TomW Thanks. I see that :)
 
7:19 PM
My laptop screen is native 1080p. My office monitor is also 1080p, but the pixels are twice as big.
 
This could be a high-quality answer with some care and obviously some red freehand circles
 
Goodnight Moon, goodnight stars, goodnight people stuck on Mars — Jan Dvorak 7 mins ago
 
7:38 PM
iRacing is awesome
 
Is it anything like the "toss your iPhone as high as you can" game?
 
no
i is srs racer now
 
I'm sorry, I don't understand your version of English
 
lol I realized who I was talking to just after I said it
 
7:52 PM
Funny story, Visual Studio started itself on my work computer randomly today.
I guess my computer is bored
 
user47589
your computer will soon be doing your job.
 
user47589
unless you destroy it first
 
No, don't destroy it. Enslave it. Have it do your job and then make sure your boss doesn't get the clue.
 
user47589
it'll try to break free.
 
As long as it doesn't start singing Queen songs...
 
7:57 PM
 
@kush yup
 
8:15 PM
how do I get Random.next to not spit back the same number it gave me the last time?
29
A: Why does Random.Next() always return the same number

Reed CopseyYou're always seeding a new instance with the same seed, and then grabbing the first max. By using a Seed, you're guaranteeing the same results. If you want to have a static, random number generation that does different results, you should rework this a bit. However, since Random is not thread...

should have googled first I guess
4
 
8:49 PM
any ideas on how to schedule task to get rss feeds ?
 
9:01 PM
lots of ways
 
any good tutorial?
 
 
2 hours later…
Ben
10:51 PM
Good evening
 

« first day (2051 days earlier)      last day (2890 days later) »