« first day (2175 days earlier)      last day (2776 days later) » 

10:00 AM
or are you re-declaring your mapper instance in each controller?
O_o
 
var config = new MapperConfiguration();
config.CreateMap<Source, Dest>();
and then
var mapper = config.CreateMapper();
and then i create a instance of the base class with its props, give them some dummy values for now
and now im trying to
var foo = mapper.Map<Source, Destination>(bar);
since automapper 5.0 +
 
you didn't really answer my question, and now I have no idea what you're trying to do.
 
they are going away from static
what do you mean
 
Where are you creating and configuring your mapper?
 
the mapper variable
is my Mapper.Map version in nonstatic
that you use.
the config variable isnt exactly like what i wrote, it holds a new instance of MapperConfiguration with all the property mappings in .ForMember's
 
10:05 AM
where
 
So there ^
 
wheeeeeere
 
what do you mean
its litterary
 
xDD
 
10:07 AM
just a typical @Froxer
 
best practice: Declare your mappings once throughout the whole app.
either as a Static, or as a singleton which is injected as a dependency
 
im using auto mapper and my classes are not static
 
var config = new MapperConfiguration (cfg =>
{
cfg.CreateMap<Source, Destination.Object>()
.ForMember(to => ~
 
you should read first
 
@Froxer where not what
 
10:08 AM
Litterary right there ?
In the config variable
i configure my MapperConfiguration
I do it in the beginning of my method scope
 
@Froxer i have suggestion
1. highlight all your code, press DEL
2. Find the root folder, press DEL
3. Close all running apps
4. Shutdown your pc and sleep
 
Thats rude :)
 
after you wake up, you will realize it is working
no its not rude :3
we need to reboot sometimes
 
I rebooted last night. Twice!
 
the reason?
 
10:10 AM
 
I actually did step 1,2,3 then i got latest from our source control
!!wat
 
10 Internet Points to anyone who actually gets the reference.
 
reboot lol
 
star my suggestion please I want to be famous
 
10:12 AM
@Squiggle did that run more than one season?
 
@MatthewFlynn yeah, a few!
 
Rebooting is dangerous
I can report your suggestion as they were insulting if you want ?
 
@Squiggle wow four seasons
ReBoot is a Canadian CGI-animated action-adventure television series that originally aired from 1994 to 2001. It was produced by Vancouver-based production company Mainframe Entertainment, Alliance Communications and BLT Productions. The animated series was created by Gavin Blair, Ian Pearson, Phil Mitchell, and John Grace, with the visuals designed by Brendan McCarthy after an initial attempt by Ian Gibson. It was the first half-hour, completely computer-animated TV series. The series follows the adventures of a Guardian named Bob and his companions Enzo and Dot Matrix as they work to keep the...
 
i also watched another series
Mr. ReBoot lmao
 
those graphics were awesome at the time
 
10:17 AM
i remember though when he jumped on the hover board how bad it looked though
even back then
 
how old r u guys?
havwbt seen sat series
 
@Sherlock 33 years old, yo.
 
u guys are old
and still likes chatting? haha
 
hush, junior
 
@Squiggle sorry father
 
10:28 AM
Who doesn't like chatting?
 
33 years of age too
or 1,065,916,800 seconds
 
30
 
u guys are so old :P
 
and yet you use pacman as your avatar lol
 
dont hate, pacman is godman.
 
10:36 AM
hardly an icon of the 21st century though is he
 
only tryhards care
 
hello
 
hello guys i have a question
 
what is the difference between API and Webmethod
i tried to search but i still confused
 
how do i make this label that shows the back Image
remove the back color
shows the back image instead
as i know there is not None value in BackColor Property
 
10:48 AM
how this color set ? @hamreenAhmad
 
backcolor property
thx
HEHE
47
Q: Transparent control over PictureBox

DerezzedIn my C# Form I have a Label that displays a download percentage in the download event: this.lblprg.Text = overallpercent.ToString("#0") + "%"; The Label control's BackColor property is set to be transparent and I want it to be displayed over a PictureBox. But that doesn't appear to work co...

 
@hamreenAhmad , so just remove this :)
 
HAHA the question you mean
?
or the label
 
if u remove the backcolor from the properties , does this solve the problem ?
 
nope
:)
@Bassem
it uses default color
"Control"
 
10:59 AM
hmmmmmmm
so just follow the answer for the question you just sent :D
 
HAHA kid
 
you know , in web application the default is transparent
 
i just know c# and Java
what is web
:D
 
you use c# to do a desktop application
it can also be used with ASP.net to make websites
Guys any one can explain the difference between Webservice and API ?
 
iam kidding guy
iam CS student
look at my final grade
 
11:04 AM
ehda
 
where are you from @hamreenAhmed
 
@HamreenAhmad Strange, why are the numbers written in western numerals, and not in arabic ones?
 
@AvnerShahar-Kashtan and the courses are in latin chars aswell
 
From Kurdistan
 
ILLUMINATI CONFIRMED!
 
11:05 AM
@Nerdintraining That's fine, because they're in English. It's not just a matter of transliteration, but of translation.
You wouldn't write English words in Arabic script.
 
باڵا means very very high grade
there is not grade above that
 
@HamreenAhmad
be - aláph - el - aláph

msh keda?
 
what?
 
hahaa i was trying to read itr
 
i just know English and Kurdish
 
11:07 AM
its a b-a-l-a isn't it?
 
thats english alphabet
we have our alphabet
ب ا ڵ ا
 
No shit?
 
بالا
means
امتياز in Arabic
which is excellent in english
right ?
 
U used google translate
 
11:08 AM
I don't remember much arabic xD
 
iam not arabic
 
"امتياز in Arabic "
 
i can speak arabic
 
@nerdin :D why a7a
 
11:10 AM
اسلام عليكم
 
@Bassem ashan a7a
is the only thing i remember properly xD
 
lol
where are you from @Nerd in
@hamreen عليكم السلام
 
War
0
Q: Clean Install VS Compile Performance Problems

WarI noticed this performance problem recently, but i'm not sure exactly when it started, so to play it safe I have taken the following actions ... Disabled any redundant / not needed services running in windows Re-installed VS 2015 Enterprise Deleted everything in %temp% deleted everything in "C...

 
@Bassem almanaya
 
@AvnerShahar-Kashtan we have our culture and language in the middle east
its not arabic
 
11:12 AM
@Nerdin Germany ;)
 
Hi all, I need some help with something. I'm making a custom control. But the problem I'm facing right now, is that when I create a Class Library, I give it a name, such as TextBox (as it is a custom TextBox control). But, then inside the class library, you have to actually create the Custom Control file aswell - and guess what it will be called? That's right! "TextBox.cs", so then, when the control will be used by somebody, they will have to type: TextBox.TextBox tb = new TextBox.TextBox();..
 
@Bassem yes
@War The questionis, what is the question^^
 
and how can you speak arabic
 
War
@Nerdintraining that's the question
 
11:13 AM
... now obviously that is not ideal. But also I don't want to do anything like: ControlLibrary.TextBox either. I just want to be able to do: TextBox tb = new TextBox(); (nevermind conflicts - that's not the point)
 
War
look at the image .. and the output
 
@Bassem i lived in egypt
@Jase Inherit from Textbox
 
@HamreenAhmad I know about Kurdistan and the Kurds. But still, your screenshot shows text written in Arabic script (even if not in the Arabic language, but using western numerals, which was surprising)
 
@Jase Also i would call is CustomTextbox to make a clear --> class CostumTextbox : Textbox
 
Yeah ok, but what about for controls that don't even exist in the .net framework? Let's say I'm making a whole new kind of control. Then how?
 
11:15 AM
Although I see now that Kurdish speakers in Iraq use the Sorani alphabet, which isn't 100% identical to the common persian-arabic script.
https://en.wikipedia.org/wiki/Kurdish_alphabets#Sorani_alphabet
 
@Jase you need inheritance
 
It's like... Namespace>Class. But I want to remove Namespace (sounds stupid that way but that's essentially the effect that i need)
 
for example you create a class that extednds Button class
you can customize the label over the button
that holds the text
 
I'm not inheriting from anything. This is a completely custom-drawn control.
 
OMG means new Language
:)
@AvnerShahar-Kashtan arabic alphabet dont contain Úµ
Ú•
 
11:19 AM
@nerdintraining
so you lived in EGYPT , and only remember A7a :D :D
 
as you see Úµ
in the screenshoot
 
I agree with you
 
@HamreenAhmad Well, the last time I studied Arabic was about 20 years ago, so I don't always notice the small differences right away. :)
 
@AvnerShahar-Kashtan HEHE we have our language and calture our place reserved By turkey in the world war 1
cykespicot agreement
 
Do you usually use western numerals when writing Kurdish, not the Persian-Arabic Ù  Ù¡ Ù¢, etc?
@HamreenAhmad I know. My father-in-law is Kurdish, born in northern Iraq.
 
11:22 AM
really
love you...
iam there
hehe
 
But the scripts used are very similar to the persian-arabic script, though more different than I thought.
And my mother-in-law is Iraqi.
Not sure where exactly in Iraq she's from.
 
@AvnerShahar-Kashtan look at this video
https://www.youtube.com/watch?v=oYXrMV3XN1o
 
@Bassem ayuwa
@Jase i don't udnerstand what you want to do...
@Jase I can only advise you to inhertit stuff
 
11:37 AM
@AvnerShahar-Kashtan dont you want Join
:)
 
Hi, is it necessary to get data from database map to ReadModel and than map it to ViewModel for UI.. or can i use ReadModel as my ViewModels in UI?
 
you mean trusting the user input?
 
@Squiggle no, i mean when i want to display Products on UI, can i have ReadModel which is used as ViewModel to display Products on page. All user does is Reads
its only ReadOnly
UI <= ReadModel <= DAO - Select * From dbo.Products
 
12:02 PM
Shit. I think I've lost a webapp.
It's somewhere on Azure. I can access it, but I have no idea under which account it lives.
^ relevant
 
hey guys, i need your glorious ideas!
Apparently i am the C# expert here at work
(i am not)
 
company doomed >D
 
So we have this dude who programmed sth for us (we have sourcecode and full license).
Now we want to sell that programm to another dude.
That dude shall not be sell that programm
 
War
LMAO
 
@Nerdintraining Use generics. Decouple all the things. Inversion of Control is a good thing. Upgrade your frameworks. ASPNet Core isn't a fix-all.
 
12:07 PM
@ntohl I love the faith you have in me ♥
 
lol
 
So anyways, back to the problem.
So we want to sell it to the dude, he is not allowed to resell or distribute that programm
 
@Nerdintraining selling the source? or just permission to use/reuse the software?
 
meaning it shall only work on 1 computer
 
ah OK
 
12:08 PM
And we only want to sell the programm (.exe)
So yeah
Now they come to me and ask me how to do that most inteligently.
 
Use an off-the-shelf software licensing solution.
don't reinvent the wheel
 
And remember that anyone who wants to bypass DRM badly enough, can
 
Correct if i am wrong, but doesn't a license only "not allows to reproduce/copy ect"
 
isn't it the default? I think by default, if someone sells Your program, that You sold him, with a regular license, You can sue
 
77
Q: How can I create a product key for my C# application?

J3r3myKHow can I create a product key for my C# Application? I need to create a product (or license) key that I update annually. Additionally I need to create one for trial versions. Related: How do I best obfuscate my C# product license verification code? Web-based license activatio...

 
12:11 PM
But he still can Copy+Pasta the programmm and it would work on a diffrent device
 
Why is that a problem?
 
@TomW beats me.
 
As long as they've paid for it what difference does it make?
 
Yeah, the best you can do is have your software report back to servers you control to record when/where it's being used, helping you identify piracy.
 
the copy pasted program will not be maintaned
 
12:12 PM
@TomW i think it's the reselling risk they dont wanaa take
@Squiggle haha okay thats what i thought
 
If they're scared of selling their software they shouldn't be doing it in the first place.
SaaS solves most of these issues.
 
Yeah there are times that the right answer is "This is not a problem that people have"
 
@Squiggle never seen a question with that much of an even spread upvotes(q)<->upvotes(a)<->stars(q)
 
copy-protection is a pain to implement. Most solutions to this problem are legal rather than technical.
 
yeah. Who would miss some bucks sued from illegal copies
 
12:14 PM
if you must use copy-protection, don't implement it yourself
> Why is that a problem?
^ best answer
 
The best DRM, IMO, is to not prevent people from copying, distributing, or reusing the software. It's to make the software be a complete asshole to people who do.
2
 
Asshole mode engaged
 
agreed
 
@KendallFrey lol and how to do that?^^
 
randomly delete their files if they don't have a licence key
that'll teach them
 
12:17 PM
You could make something that "crashes" every once in a while if it detects piracy. Most people won't think to try to fool it because they think software only crashes for reasons that aren't piracy.
 
> While most modern forms of DRM simply try to prevent gamers from even launching a pirated game, some developers have baked in pranks. In Crysis: Warhead, for example, guns will shoot chickens if the game can’t validate that it’s a legitimate copy, while Serious Sam 3 pits pirates against an invincible scorpion.
 
There's also the annoying REGISTER YOUR COPY dialogs that pop up every time you start, or every 10 minutes, or whatever
 
Hey i can specify my problem!
with a solution
a) it is not an installer, its just an .exe that is beeing distributed
 
Hey I'd play a pirated Crysis on purpose to get the chicken gun
 
12:19 PM
b) its purly console with no itneraction other than args[]
 
Especially if the chickens spawn alive and act like nothing happened
 
Possible solution:
1. Distribute Programm with a file with values for the registry
2. Read the values for the registry from file and set them
3. Delte the file
4. ????
5. Profit!
 
@Nerdintraining <shrug>
 
That would solve the "redistributing problem"
unless they save the file
 
I'll repeat what I said before
> if you must use copy-protection, don't implement it yourself
 
12:23 PM
But but but
i want to learn :D
 
is this a problem? Do you really not trust this guy?
 
I would trust him with anything
but then again i don't know him
and i am a fool in trusting ppls
Apparently the head of that other department that wants to sell that programm doesn't trust him
@Squiggle How do you sugest implementing it otherwise?
 
just quickly google "C# software licensing"
 
@Nerdintraining Or just simply look in the registry, which is one of the first things to try when pirating software.
...or so I'm told.
 
damnit I really have lost a webapp
fuuuuuuck
this is as annoying as the time I lost a server
 
12:27 PM
 
@Nerdintraining that site doesn't appear to exist
 
it does
i just type http>s<
 
it was still running, and somewhere in the rack. I could ping it, I just didn't know which server it was. I ended up unplugging network cables until I identified which one it was.
...then I tripped over the power cable and took the entire ISP offline.
GOOD TIMES.
 
and they only have http xD
 
(true story)
 
12:28 PM
@Squiggle lol
 
Yo Experts so can someone answer me? i have ProductDTO can i use it as ViewModel in UI, it is only readonly, user just views products.
or i should also have ProductViewModel for UI and map to it
 
dont bother
if no onpropertychanged involved just use the DTO
 
^ +1 don't bother
unless you need to, or you think it feels "dirty". DTOs generally are view models anyhow.
if it were an EF entity I'd map it.
but otherwise... nah.
 
So i just got back from the head of our own NSA (the leader of the i don't trust that otherguy to not never ever resell that shit we didn't even do ourself)
And he says
I's enough for now if we hard code this and that into the code and then distrbute that version.
Hurray \o/
 
hard-code what?
 
12:37 PM
@Squiggle im hard
code
 
Oh, that programm connects to some kind of Database that has a specific name and that name
or sth like that
didn't really understand
but i know what to look for
 
Don't hard code connection strings
 
Its not like that faili
Its more like:
<username>Harold Getman</username>
 
I'm still curious about what you plan on doing
 
And the software only runs if tehre is a "Harold Getman" in <username
 
12:39 PM
Wow
 
dude i am not even sure.
ever heard of cargowize?
 
That's horrible
Tbh
 
"hard coding" doesn't solve anything
 
I know i know...
 
12:45 PM
I have used "iddqd" in a license file input textbox. If the user typed iddqd, where the license file location should be, first level authorization passed.
since than another programmer modified that part of the code, but he also had a secret keyword for testing purposes >D
 
1:24 PM
hey i have a problem here dotnetfiddle.net/PHdq9e
solved it, wrong reference problem
 
'gratz
 
1:51 PM
@JakobMillah where have u been?
 
hi
every1
hey how can we test Web Service using c# code?
REST webservices
 
Hi, I'm trying to do something very simple :
using (SqlConnection connection = new SqlConnection("Data Source=x.x.x.x;Initial Catalog=xxxxx;Persist Security Info=True;User ID=xxxx;Password=xxxx;")) {
	SqlCommand command = new SqlCommand("SELECT top 3258  ID, NAME, LIB, TIME FROM  PROJECTS WHERE  NAME = 'Jon Doe' ORDER BY  ID desc", connection);
	connection.Open();

	SqlDataReader reader = command.ExecuteReader();

	if (reader.HasRows) {
		while (reader.Read()) {
			Console.WriteLine(reader.GetInt32(0));
 
@Hamza_L What is the error you getting in this
 
I got an exception : SqlException : Transport-level error
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
 
C:\Program Files\Microsoft SQL Server\\MSSQL\LOG
check this
If the timestamp for startup is very recent, then we can suspect that this is what caused the error. Try to correlate this timestamp with the time of exception.
 
2:04 PM
OK, now the WEIRD thing ! if I change the 'top 3258' to 'top 3257', everything work
if I remove any field in the query, everything works !
if I change the where clause to "NAME = 'Someone else' ", it works !!
PS : 3258 is the rows count
 
2:44 PM
maybe the original works now?
tcp error may be fixed after a time, when the TCP link is reestablished
 
nope
still have the same error
0
Q: Transport-level error whith simple Select query

Hamza_LI'm trying to do something very simple : using (SqlConnection connection = new SqlConnection("Data Source=x.x.x.x;Initial Catalog=xxxxx;Persist Security Info=True;User ID=xxxx;Password=xxxx;")) { SqlCommand command = new SqlCommand("SELECT ID, NAME, LIB, L_TIME FROM PROJECTS WHERE NAME = '...

 
Can you reproduce the issue in SSMS?
 
is it possible that it's a server side problem ?
@mikeTheLiar, no, it works fine with SSMS
 
And you said 2358 is the total row count? What happens if you remove the top 2358 and just select all records?
 
exception :/
 
2:54 PM
Hrm. And changing the where clause works?
 
yes
I changed the where clause with another name, I got 3500 rows, and it's OK
 
Looking at this it suggests a dodgy connection to the server or a timeout. If it weren't for the fact that it works in SSMS I'd think it might be a bad index.
Is it possible that other active connections were inadvertently left open?
 
yes, maybe, I don't know, but, why the problem occurs only with this query ?
if I remove the where clause, it works, and I get 20 000 rows
 
That really sounds like a bad index to me. Doesn't make sense that it works in SSMS without a problem though
 
I tried with Connection TimeOut and command TimeOut, did not solve the problem
bad index ? how can I be sure ?
 
3:01 PM
Run the query with "include execution plan" in SSMS
It's one of the options in the toolbars
According to some of the things I'm seeing on the internet, you can also use a timeout of 0 to wait without an exception
 
but SSMS dont throw an exception, I'll include execution plan and see
 
Looking at the comments on your question, SSMS and your code are running in the same location relative to the sql server?
 
It's a distant server, and I'm running SSMS on my computer
my code is running also on my computer
 
Are they running under the same SQL account?
i.e., do you use the same credentials to log into SSMS that are in your connection string
 
yes
I included execution plan, I'm not expert in SSMS, I have this message in green :
_Missing Index ( impact 52.0635) : CREATE NONCLUSTERED INDEX ON ..._
 
3:09 PM
52% is a lot
What field does it suggest? name?
 
what does it mean
?
 
brb, work stuff
 
ok
thanks mike !!
 
in the meantime just google MS SQL Nonclustered index for some reading
okay back
So an index is basically and additional piece of information that the server keeps so it can organize date for a more efficient lookup
Exactly like an index in a book
You store an extra 50 pages at the back of the book so you can look up by keywords as it were
Trying running that create index statement in SSMS, then run the code again
 
hey boys and girls
 
3:14 PM
@Hamza_L make sense?
 
can anyone hit me up with your best latency on EF?
 
yes Mike
 

« first day (2175 days earlier)      last day (2776 days later) »