« first day (1099 days earlier)      last day (4071 days later) » 
00:00 - 22:0022:00 - 00:00

00:00
it's actually typically referring to a type
and it usually means that type needs to always be used from within the thread that created it
I don't quite get your first statement. Do you mean to say a type or an object?
when you have a type with thread affinity, any instance of that type typically has to be accessed/used from within the thread where you create that instance
(is that more clear?)
so - for example, most UI frameworks
if you create a control on a thread, that control can only be used on that specific thread
I get you.
How do I create a type that has thread affinity?
normally types that have thread affinity store (or have a place to lookup) the thread
I see
Why implement thread affinity types? I assume the obvious reason is to prevent race condition?
00:08
well, normally it's things like UI
with the UI, there's thread affinity because the controls work by processing messages
and the messages are always processed by the message pump within the "application" or dispatcher (depends on framework)
which means the messages are always running on the UI thread
if they allow the control to be accessed from elsewhere, you'd have to synchronize everything
instead, they just check to make sure that their thread is the right one, and go
Mmn, I could see how that may work. What if 2 threads decides to add to the dispatcher queue at the same time
adding to the queue is usually okay (that's a thread safe operation)
but say a bg thread tried to modify a control, and while it was doing that, the message pump received and processed a message that effected it
you'd potentially end up with nasty race conditions
because you'd have 2 threads tweaking the state of the control, and there's no synchronization within it
Makes perfect sense. Thanks for explaining it
In your answer to that question (upvoted btw) which is one recommended?
the first would be better - it doesn't block
I mean it is clearly an IO operation.. yet you suggested parallel.foreach
00:13
Parallel.ForEach blocks
well, he had the operation as a blocking, non-async operation
so if he can't change that, it'd at least let them run at once
but it's blocking - the first option doesn't block, so it's by far the better option
it doesn't block and doesn't hammer the threadpool
Does Parrallel.ForEach call wait under the hood?
sort of - it actually uses the current thread to process some items, too
so it's not just waiting - but it's a blocking call
Why is it blocking though? The methods execute in parallel.. and well foreach should return quickly after that. Unless ForEach is nested in another foreach
And then after the foreach there is some sort of pause
Parallel.ForEach was intended for data parallelism
so the delegate's run over a collection
and the current thread is actually used by the scheduler
so it will process items along with other threadpool threads
the method (by design) won't finish until all of the delegates are completed
Mmn
"The current thread is actually used by the scheduler"
How is the parallelism taking place then?
That is the loop..
00:24
say you have 100 items in the collection
and an 8 core box
(this is very simplified)
the task scheduler will kick off 4 threadpool threads with blocks of 13 items to process (ie: you process 0-12, you process 13-25, ...)
then 3 with blocks of 12 items each
then do the remaining 12 itself
which means you end up with 8 threads running each processing 12-13 items
but the main/calling thread can do some of them
when they're all done, it returns
I see. Interesting
posted on October 19, 2013 by Scott Hanselman

A while back there was a bug in the old browser definition files that shipped with .NET 2 and .NET 4. Fast forward to today and these older ASP.NET’s will mis-detect IE10 and IE11. If you have this, you'll see __doPostBack JavaScript errors in your sites when IE10 or IE11 hit them. This whole concept has been long-fixed in ASP.NET 4.5. If you have a .NET 4 app you put .NET 4.5 on it and you'r

Very nice and thanks
cya all - have a good weekend
00:34
c ya
you too
not to sound like a weirdo, but its nice having reed in here, helping me learn more, even if i'm not the one asking the q's :)
thanks
Yes it is :)
cya next week
Now we need Skeet to join the game :D
@ReedCopsey See you
@Steve You should ask more questions too. I can't think of stupid questions to ask every time.. actually I can
00:38
@ReedCopsey later!
@LewsTherin i never seem to run into major issues :/ but I think that'll change when I get more complex projects
I see. Well I'm not working on anything right now. Just asking about shiz I read in books or don't understand in general
I've been doing a lot of heavy reading lately in fact :(
01:23
i hate reading about syntax stuff, i like reading about architecture and stuff
I prefer the other lol
 
7 hours later…
08:04
1
Q: SQL Query to merge different column data in to one

Farhan MukadamI want to merge the values of three different columns name ProcessFalseRedirect,ProcessTrueRedirect,GeneralRedirectToPP into a single column named as PPID. The query i'm using is this, select ProcessFalseRedirect,ProcessTrueRedirect,GeneralRedirectToPP from IVR_PPMaster which gives me the fol...

08:55
hi guys
Some one here? :(
No, just you
09:51
Cleaning a mouse with this many buttons using a sponge may have been an error. I might have just shot someone over the internet or something.
 
2 hours later…
11:41
Why are weekends so slow here? There are lurkers.
hey @JohanLarsson
hej
hw's it going?
pretty good, trying to learn to use Gimp
Gimp, a Graphic Application Program for Linux
11:51
yep that's the one
12:03
I've worked with it but I prefer to use Adobe Photoshop instead of Gimp.
12:23
PS is a bit expensive to buy as I don't plan to use it for anything but playing around
I've just been playing with node.js
in case anybody was interested
what did you do?
hello world, basically
then built a simple app with a web framework called express, which is a slightly more complicated hello world
12:39
so you are web now
I feel I should branch out, and I think I like its philosophy of javascript for everything
not sure it's that intuitive for large projects, but for simple stuff it's, well, simple
has anyone used dotless css ?
never heard of it, just looked it up
so is it css, or something that LOOKS like css?
if you need something that isn't a browser to interpret it, and it's platform-specific, I think that gives me the creeps
that's just my 30-second intro though
Less is something where you can programming css. So you can use nested rules, declare variables and make life easy
@TomW It isn't platform specfic, There are two ways we can make browser interpret it. Use less.js and generate css on the fly or use some nuget package and write a build event to compile less files during build.
dotless site says it's a .net port
ah ok, just catching up, so there's a js library that you just include that parses it? That sounds ok
I've never done anything beyond trivial with css so haven't seen the need for something like that
ok, reading more, it actually sounds quite useful
13:25
hey there!
@m59
i have this method in api controller
public DataTable GetAllTypes()
{
SqlCommand command = new SqlCommand("GetAllType_Parameter", scnn);
command.CommandType = CommandType.StoredProcedure;
scnn.Open();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(command);

try
{
da.Fill(ds);
scnn.Close();
}
catch (Exception)
{
command.Dispose();
scnn.Close();
}
return ds.Tables[0];
}
This methd select 'Type' Column from 'Parameter' Table
i want to fill a combobox of Type Column using Angularjs.
1 message moved from JavaScript
13:54
0
Q: set default format of datetimepicker as dd-MM-yyyy

Third Battle Of PanipatI have datetimepicker which on loading of windows form , shows me format in 'MM-dd-yyyy' as follows: I wanted it in dd-MM-yyyy. I tried following: seted custom format: "dd-MM-yyyy" But Its not changing. What can be problem? Please help me.

plz help
14:07
@TomW There are something more with CSS like SASS, SCSS. Dont interfere with them. They are different and confuse you more.
14:22
I see. Never quite understood why there are so many of that sort of framework. Because obviously what the internet needs is MORE THINGS
yeah it lets you do mixins and stuff like that
yeah, SASS just pure css with more flexibility like adding nested rules and mixins. Less is where you can have variables.
at the very least, its nice to be able to do the nesting and variables
-- less/sass --
@mainTitle: #332211;

article {
   h1 {
      color: @mainTitle;
      font-size:1.2em;
   }
   p {
      font-family:Verdana;
      font-size:1em;

      strong {
         font-weight:bold;
      }
   }
}

-- css --

article h1 {
   color: #332211;
   font-size: 1.2em;
}
article p {
   font-family: Verdana;
   font-size:1em;
}
article p strong {
   font-weight:bold;
}
you know one thing web designers hate using front end framework like bootstrap, foundation are the design system has default size for labels,textbox and controls which is very large..
I read an interesting article which says the default size for controls, grid can be modified. To do so you need to use Less for better customization.. Good one !
@drch That's a good example :)
14:44
any good link for learning and examples for c# design patterns ?
 
2 hours later…
16:58
stackoverflow.com/questions/19468420/… can any one answer me for this question pls
 
2 hours later…
user1125394
19:00
No one Programming today. Peace.
19:20
@TomW and @drch Must Watch Here is good customization example of Bootstrap.less youtube.com/watch?v=I6EPArp4csA
20:16
Is it possible to solve this? stackoverflow.com/q/19470422/1261657
20:28
@rtuner -> u draw them by urself?
or the end-user draws them?
End user
u need only to opened curves, right?
or closed curves like circle or both?
just opened curves
but if I could accurately determine closed ones, I should be able to do for open ones too
I've a solution but it's not a good idea
Okay, what does it sound like?
20:31
the background always has a solid color
and the lines have always another solid color, right?
Yeah, mostly white or black
so, good
u can do it in simple way
I'm listening
1. search for first pixel of the borders in the scene from row and height 0
2. when u reach to first one store its x and y coordinates in a variable
3. then start to search 8 point in side of that pixel for find another pixel with the same color as prev pixel
4. loop it
if u reach to ur first found coordinate
it a closed shape
so
so, search for other shapes
Can you explain no.3 more, I have tried something like this but it can only find straight lines
20:36
when u reach to a pixel that belongs to a opened border
when u complete ur search
do u want I describe it with some pics
u can figure it out easier with some pics
Yeah, that would be great.
Thanks
so, wait
can anyone have a look at my question please? codeproject.com/Questions/671026/…
for some reason i cant post questions of SO anymore?
@tonyb: So your question is how to draw a bar chart?
no, ive got the bar chart, but i need to create the bars from the datatable
basically, how do i read the data from a set column in a datatable where it is the newest value. I thought maybe "Select gatesouttotal from gates where ID = MAX", but wouldnt that put the same value to every bar when the table is changed? so bar 1, 2, 3, 4 etc would all be the same gatesouttotal value?
anyone got teamviewer who can help out?
it would be the same value all round, as the page with the chart refreshes when the row is submitted
20:53
@rtuner -> r u there?
anyone?
@tonyb -> u want to find the newest value in ur db?
new entered or updated value?
@rtuner -> r u there?
kind of. I need bar 1 to be the first value in totalgatesin column, bar 2 to be the second value in the column and so on. They will be ordered by an auto-increment, so i need the bars to show the results in order
u want to show all data in ascending order from min to max for bar 1 to bar N?
pretty much (i think :P )
so i have a column in my table called totalgatesin
21:01
@MRS1367 Yeah, let briefly
@rtuner -> I show u some pics with some decription about steps
ok, waiting
i have a chart, that i need to show the data from that column in ascending order
add this line to ur Query @tonyb for sort in ascending order
ORDER BY totalgatesin
@rtuner -> imagin this pic
what would be the query though?
21:06
ok...
"Select gatesouttotal from gates where ID = MAX ORDER BY totalgatesin"
I start to search for first black pixel (borders color in image) from top to down and from left to right
but wouldnt that just show the same data on all bars when the page was refreshed, as all bars would use the same query?
s@tonyb -> I never have used charts
sry mate
@rtuner -> now, I store found coordinates in a variable
yeah..
and start searching each pixel one by one
as u can see in picture
plz zoom it
21:15
Yeah, I have but it seems you're scanning the line?
I check the eight pixels (blue and green pixels) in side of the first pixel
I don't need to check the top and left pixels
cuz I've checked them before in first them and they don't have clack pixels
I only search the right side
if I found a black pixel I'll increase the counter for x 1
and check the right again
if I reach to the end of that line from right side
means reach to white space
I check the other sides
only bottom
if I found another black pixel
I continue my search until I can't find another pixel
if I reach to the first pixel
I get that it a closed shape
if I reach to the final white space I know that it's a opened shape
and I can increase my counter for opened shapes
finally, if I want to do that simpler
I do this
I create an image from the scene in somewhere
and start to search that pic
when I found the first black pixel I add it in a list
then, I start to search for other black pixels
and I'll add all found black pixels in my search in the list
if I reach to the first point
I change all black pixels color that I've stored their coordinates in the list with background clor
with this method
when I start searching for other borders
I never reach to prev borders in lower columns of the image
with this method u can find all opened shapes
This really sounds like what I'm currently doing. If you could try to put this in a simple code you could verify if it can work.
it works
I do somethins like that in MATLAB
but u must pay attention to border size
if border size be 1 pixel
do the method like what I said
but if it's bigger than 1
u should remember that when u find the first pixel
if u reach to the end of black pixels in a row and the border continues in bottom
u must skip next pixel and start search from next two pixels in bottom direction
cuz for example border size is 2.
21:31
It sounds more like finding rectangles
u can find all borders
u must check all eight pixels in side of the current pixel
so, u can continue in all directions even diagonal directions
other solution is that simpler that this one
just find the first white pixel (background color)
then use Scan Line flood filling algorithm
and fill all pixels with white color with another color that isn't the same with background and lines color
after completing
start search
if u found a white pixel
u get it that this borders is closed
cuz u found a white pixel
this means this pixels in the closed environment
so fill black and white pixels with scan line flood filling algorithm
and start search again for other white pixels
when u can't find another white pixel
u can start to count borders
just start search from beginning
when u reach to the first black screen
increase the counter for opened borders and fill that border with scan line flood filling algorithm
then u can found all borders in faster time
If I want to do it
I save the current scene as an image and then do what I must do on the saved image
how do i write several values from a table to an array?
@rtuner -> what's ur idea about it?
@tonyb -> if u use ADO.NET
just retrieve them from ur db and then add them with a for each to ur array
@MRS1367 I don't really understand how it would work for any curve.
ohhh
21:46
The lines could be any width, they could be in different curve degrees as well as sizes.
@rtuner -> do u need to all opened borders, right?
or u only want to retrive all opened cureved lines not opened straight lines
Just to say how many open curves exist
ur mean about curved lines, all opened curved lines or all opened lines?
@tonyb -> u can do it like this:
0
A: How can I get item by row from SQL and make to String

MRS1367Use this for your problem: string conStr = @"Data Source=PathAndNameOFSdfFile.sdf"; SqlCeDataReader sqldrAllData; SqlCeConnection sqlCon = new SqlCeConnection(conStr); SqlCeCommand sqlCmd = new SqlCeCommand("Select TypeName, Syntax From tb_CsType", sqlCon); sqlCon.Open(); sqldrAllData = sqlCmd....

what a simple way to display a video from an online source with c#?
only curved ones
scanning the sample image in your example should give two.
21:56
string conStr = @"yourDatabaseConnectionString";
SqlCeDataReader sqldrAllData; // change it. it's for SQL Server Compact Edition
SqlCeConnection sqlCon = new SqlCeConnection(conStr); // change SqlCeConnection with its equivalent for ur db

SqlCeCommand sqlCmd = new SqlCeCommand("AddYourQuery", sqlCon); // change SqlCeCommand with its equivalent for ur db
sqlCon.Open();
sqldrAllData = sqlCmd.ExecuteReader();

while(sqldrAllData.Read())
{
    KeywordTipTexts.Add(sqldrAllData["urColumnName"].ToString(), sqldrAllData["urColumnName"].ToString(), ...); // in here use from List Collection. use ur 
@tonyb -> check the above
@rtuner -> check this:
do u want which type?
1 and/or 2 and/or 3 and/or 4 and/or 5?
00:00 - 22:0022:00 - 00:00

« first day (1099 days earlier)      last day (4071 days later) »