« first day (2526 days earlier)      last day (2405 days later) » 

4:01 AM
in EF if I am saving an entity with a child entity and there's an exception saving the child, should the parent entity be saved?
 
 
 
2 hours later…
mr5
5:51 AM
what is a lid? ^
@mr5 it's a cover
@mr5 okay. thanks
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
@mr5 that just happend
 
mr5
6:12 AM
o/ neglecterrorino
 
[HttpPost]
public ActionResult AddCompany(Company cmp)
{

try
{

if (ModelState.IsValid)
{

ScriptManager.RegisterStartupScript(this, typeof(Page), "paginationClickHandler", "paginationClickHandler();", true);
}

return View();
}

catch
{
return View();
}

}
I have tried using RegisterStartupScript but I don't understand how it works still and it isn't working anyway.
how to call javascript paginationClickHandler() in button click action
Please help me
0
Q: how to call javascrpit function to mvc form in the view?

Vanuston IntelligenceIn a single page web form I have multi step registration form When I initially click the first form the text box appears when I click on next button the value of button goes to javascript code. So how to call the javascript on the next button function in the asp.net MVC. <section class="box-typ...

 
ohayou
 
Morning sharperinos! Why are you already in @Nerdintraining? Kid wouldn't let you sleep?
 
Kid didn't wake me up
 
6:36 AM
ey yo
 
mr5
you already have a kid nerd?
 
yeah he needs to get enough people to play pubg with him
1 more to go
 
mr5
:O
I thought nerd was still in school
 
maybe he is :P
 
mr5
6:44 AM
why are you unsure? you are his neighbor, and kamil
 
6:56 AM
@mr5 yeap
 
mr5
so do you play dota together? :)
 
Me and my son?
 
mr5
yeap
 
Nah.
He prefers PUBG.

He woke up from his midday nap once and saw the airplane in PUBG, and said "Airplane gone" once i jumped off the airplane
was very cute
 
:D
we play NFS: MW
but he only controls the car if it is not too fast. And only one button
 
7:13 AM
Lol
poor bloke^^
 
mr5
you should teach him how to play dotatu and made him to join TI
so you insta $$$
 
#theperfectplan
 
mr5
7:32 AM
r u goin to teach him how to code?
 
I am going to teach him how to be a bad ass doto player and how to code to the win
 
mr5
nice! that's my plan also
but I need a gf first
 
I teach him materialize byte code from his mind into the computer. So if the architecture changes, he can keep up with it.
mitigating risks...
 
mr5
7:53 AM
start him teaching in assembly, and made him make a 3d game out of it
 
leave the kids alone
 
8:21 AM
ahoy mateys o/
 
@Kieran where's the rum gone
 
WHY HAS THE RUM GONE
]Kieran2
wot
 
mr5
nyconing is the new caprica
 
The better caprica
]urban nyconing
 
8:23 AM
@Nerdintraining No definition found for nyconing
 
OOOOH
 
shge got urban working
 
long time
@KamilSolecki Or maybe a he
@KamilSolecki don't judge
 
mr5
]youtube nyancat
 
8:25 AM
@mr5 That didn't make much sense. Use the !!/help command to learn more.
 
!!tell yall sandbox
 
@yall Please go and play in the Sandbox
 
mr5
]tell sandbox
 
@mr5 Invalid /tell arguments. Use /help for usage info
 
0
Q: javascript function from Asp.net MVC on Httppost method?

Vanuston IntelligenceI have created a javascript function in a external JS file but,now i want to call external JS file in asp.net mvc ActionResult [HttpPost] public ActionResult AddCompany(Company cmp) { try { if (ModelState.IsValid) { ...

 
9:07 AM
]tell KamilSolecki I'm not in the sandbox though
 
@Metallkiller Command i'm does not exist. (note that /tell works on commands, it's not an echo.)
 
]tell KamilSolecki echo I'm not in the sandbox though
 
@Metallkiller Command echo does not exist. (note that /tell works on commands, it's not an echo.)
 
mr5
what happened to nyconing? he completely turned into bot
]! 1+1
 
@mr5 That didn't make much sense. Maybe you meant: π, ), (
 
9:15 AM
]tell mr5 help
 
@mr5 Information on interacting with me can be found at this page
 
mr5
@Metallkiller did his account converted into bot?
 
Or maybe her account?
We can never be sure it's not the bot posting. We'll never konw.
Or maybe its account
 
mr5
or maybe it's a bot all along now on his serious mode?
 
Maybe they're still figuring that out. After all, they came to life not too long ago.
Oh shit, you mean before, the bot just was here to do a blind touring test?
 
mr5
9:18 AM
yeah. like what the OpenAI did
it's learning all our behaviour
and is now under low-power mode. processing all those data to be a complete super ai
 
Where's OpenAI btw? I heard there's a OpenAI dota bot, but what else are they doing?
]Dominate world
 
@Metallkiller That didn't make much sense. Use the !!/help command to learn more.
 
Yeah I'd say that too if I were you.
 
mr5
shh
it doesn't want you to know its plans
acting like it can't understand us. good acting AI
 
9:40 AM
^^
 
10:27 AM
^^
@Metallkiller unsommer her
Do it
or @Kieran
10 mins ago, by Nerd in training
]unsummon nyconing
 
3 mins ago, by Metallkiller
]unsummon
 
i think you have to write the name aswell
 
Get up to date bruh
 
"nyconing"
braaaah
that is missing
do the unsummon
 
10 messages moved to Trash can
 
10:29 AM
Kieran unsummon her
 
why
am confuse
 
in a star wars sith voice do it
 
42 messages moved to Trash can
nyet
not until you give me a valid reason as to why i would do it C:
 
Because we can
and re can resummon her
i want to see if it leaves the room
 
mr5
what is the story behind this?
why did he became a bot?
or how?
did he eat the devil fruit?
]n 1+1
 
10:39 AM
@mr5 That didn't make much sense. Maybe you meant: π, ), (
 
mr5
]Ï€, ), (
 
@mr5 That didn't make much sense. Maybe you meant: π
 
mr5
]n
 
@mr5 That didn't make much sense. Maybe you meant: π, ), (
 
mr5
triggered me
 
10:45 AM
@Nerdintraining nyconing did leave the room when I unsummoned, and then reentered like a minute after that.
unsummon doesn't need the name behind it, since it is a command directly talking to the bot executing the command.
Or: the bot doesn't need to hear its own name, it already knows.
 
@Metallkiller ok
^^
A while back it set itself up to listen to caps !! command.
When Avni told it to STFU it changed the listingn to ]
ez pz
 
I remember. She tried several other symbols, including some asian syllable.
 
mr5
can you post the permalink?
god. I've missed those
@Metallkiller so it's . the command "summon" to convert into a bot?
 
11:37 AM
@Metallkiller I member
ouuh
2.222.206 Calls
 
12:15 PM
CASSINI IS DEAD
And I'm back from my break
 
I KNOW
AHHHHHHH
 
Cassini did the dive?
HUSSA
 
@Nerdintraining Cassini went down on Saturn
 
I knew it was going to happen in the next week or so but today on my fathers birthday?
HURRAY!
360 degrees nice
rewind 1 hour :D
-33 (-) was the death
Roughly 1 hour after stram start
 
12:58 PM
@mr5 Somewhere there :
https://chat.stackoverflow.com/transcript/7?m=38843632#38843632
 
@Metallkiller Why you STAHP working to share that?
 
@Nerdintraining That didn't make much sense.
 
> Yes, Im nonsense almost all the time. Just chatting. *with MeowBot integrated, will behave both human and bot.";"prefix
TIL nyconing is a cyborg.
 
cycat
or is it meowborg
 
meowborg sounds better
 
1:13 PM
Catrica 6
 
I feel this is necessary.
 
How to get the size of a directory i code? DO i have to iterate over all contents?
 
Nah, this is necessary.
 
@Metallkiller Ask file info size of everything and add it up.
@mikeTheLiar Thank you for your helpful addition.
 
1:23 PM
@RoelvanUden This says otherwise.
 
Once again, thank you.
 
low effort senpai
 
@RoelvanUden took way to long
 
2:28 PM
Have a nice weekend guys, cya tuesday!
 
Cya
Its friday friday
gotta get tot town on friday
wweeeek end weeek end
 
so I'm trying to run my unit test and get data from repo. But everytime, I run the test, the repo is null.... I get object not set to instance of an object
on this line
var Repo = DependencyResolver.Get<IRepository<DBRepo>>();
Am I missing something?
 
a repo :')
 
aww I have it though
 
user7480455
3:24 PM
Hi All
 
user7480455
3:45 PM
Hi all, question
 
user7480455
Can an mvc action result be put in to a class?
 
...
Considering that's pretty much the only place they go
 
user7480455
it seems like it can't... how can I make and action result reusable in another controller?
 
user7480455
tell me more please...
 
user7480455
we have a class of tools that we call by using the using statement
 
user7480455
3:48 PM
when I try to put that action result that we need to reuse in that class I get errors
 
user7480455
it reports back that tpe or namespace actionresult could not be found
 
When you say make an action result reusable in another controller
do you litterally mean call the function from another controller?
redirect the user to another controller?
 
user7480455
call the function
 
user7480455
not from a nother controller but make it once so I don;t have to make it in each crontroller
 
user7480455
you know how you have a class of functions that you can use all over your program
 
user7480455
3:53 PM
you just use an import if you VB or Using if you C#
 
user7480455
it allows you to then use those functions in a new sector of your program
 
user7480455
Or do I just take the word action result out and it just becomes a basic function?
 
5:12 PM
Hello there, I have a question concerning Entity Framework.
I'm trying to find the best way to do migration on multiple database (azure).
There is not much information on this on this link https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-scale-use-entity-framework-applications-visual-studio They say"The sample code for this document does not demonstrate how to do this. Consider using Update-Database with a ConnectionString parameter to iterate over all shards; or extract the T-SQL script for the pending migration using Update-Database with the -Script option and appl
Does this mean that I have to create a new connectionString in my Web.config for each database, then run my Migration in the Package Manager Console with each connectionString?
 
Yes Each Database will need it's own connectionString in the Web.Config file
You will have to run Migration on each Database
 
Is there a way to make only one connection string but with a parameter that change like a number?
MyDatabase001
MyDatabase002
 
No
 
I think the project might have a rather large number of database in the future for each client
 
not that I know of
 
5:17 PM
Ok, so I just write every database manually?
Thank you I'll try that =D
 
Yes it sucks but that is how Database server work
 
ok, a big thanks Juanvan!
 
 
1 hour later…
6:32 PM
hello, my questions is concerning entity framework too, I am trying to get a result from a store procedure, but I am getting different errors when I am trying a different approach
this is the question I posted on stackoverflow yesterday: stackoverflow.com/questions/46228223/…
does any one has an idea of what is going on here?
 
7:01 PM
That bottom code is what you are trying to run in C#?
 
well I tried that one
and also Context.Database.SqlQuery<int>(sqlSP, params).FirstOrDefault();
I tried both
but I am not getting any result
 
user8010252
7:18 PM
any idea how to return the instance of the first child match in recursive associations using linq
class A{ int ID;
IEnumerable<A> child}
MVC core
 
user8010252
my approach is not recursive and i get the info of all parents but its not efficient
 
user8010252
i keep using singleordefault parent->child and in the view i check for null child-> parent
 
7:40 PM
@Heinrich
int id = ExecuteSqlCount(statement, parameters.ToArray());
 
using the latest approach?
 
You mean this?
var returnCode = new SqlParameter("@ReturnCode", SqlDbType.Int);
returnCode.Direction = ParameterDirection.ReturnValue;

var sql = "exec @ReturnCode =dbo.usp_insertinspectioneventpublic @contenttype, @image, @applicationid, @statusid, @notes, @requestuserid, @assigneduserid, @parentid, @eventid, @discipline, @replyby, @workitemid, @messagetype, @inspectionid, @floor";
var data = Context.Database.SqlQuery<int>(sql, returnCode, inParameters);
var res = data.FirstOrDefault();
 
yes
 
Should be this
var parameters = new List<SqlParameter>();
string statement = "exec uspPersonAdd @personName = @name, @activeFlag = @active";
parameters.Add(new SqlParameter("@name", person.PersonName));
parameters.Add(new SqlParameter("@active", person.Active));
int id = ExecuteSqlCount(statement, parameters.ToArray());
this is for using Select as the out and not a true out
 
but the stored procedure @juanvan is returning an id that was set before
something like this for example
select @id = 30
Return @id
I don't want to modify the way they use it because this is a legacy application that other apps can be using the same stored proc
 
7:45 PM
Does anyone know how to make a Graph?
I mean the general algorithm
 
can you show me how you make the call inside the ExecuteSqlCount
?
 
1
Q: EF Core, how to call stored procedure with input and output params?

SledgeHammerIn EF Core, with dbContext, how do you call a stored procedure with input AND an output param? I know the basic gyst is: Set<blah>.FromSql("storedProcName @p0 = {0}, @p1 = {1}", p0, p1); But, what do I put for "blah" since there is no entity, it's just a bool output... and how do I get said ou...

 
I am assuming that your sp is calculating the count on sql and assigning the value to an integer that you return, am I right?
 
that is the answer I was pulling from
I don't have any code like that - tho I could make it to see
 
let me test first
 
8:11 PM
it didn't solve the issue
I mean of getting the parameter
the id
I was able to execute the query, but not getting the value from the sp
 
so what was the error when you executed it?
did it run at all, or?
 
Guys I have a business Idea
Needed some smart people to verify if it will work
 
what are you offering
 
So majority of big businesses are effected by viruses/spywar/malware through emails
So if I develop a SAAS product
that will just be an outlook plugin
to verify the links in the email
emails
do you guys think i can make some money this way?
 
how are you verifying the links?
 
8:19 PM
var sql = "exec @...."
var id = Context.Database.ExecuteSqlCommand(sql, parameters.ToArray());

the id that it returns is a constant number 4 all the time I am calling in that way. But I am passing the same parameters that you saw on the question, so it should return an incremental value that should be greater at this point than 51742
I am not getting any error
 
@Euridice01 would have a Known URL list to filter on
 
yes
 
But then you get into all kinds of 'Privacy' concerns
 
so my current company cio
sent a spam email to all employees
just to check
how many will click the fake link to linkedin
70% did
 
yup same thing with my company
 
8:21 PM
without knowing that the linkedin link was fake
 
not linkedin but similiar action
 
@Heinrich are you able to look at the SQL Profiler to see what Query is being ran on the server
 
They pretty much trained us to read through the email of the sender
and make sure the company name is spelled right haha
 
I think AntiVirus will do this for you already @Obviously
 
does outlook even provides some functionality/api for plugins to interact this way
 
8:22 PM
outlook has a spam filter
but I guess it's not very good
 
good.. ya humm no
Pointless to the effect that disabling it is it's Best Feature.
 
@Obviously this is a social problem, not an engineering problem
 
@juanvan let me run it just a second, good idea
 
And furthermore that's something that should be handled by your IT department/firewall/mail filtering program.
 
8:32 PM
ya there are some amazing email programs out there
most of them reroute your mail from their servers as a first line type filter.
 
Most of those aren't set up to handle internal mail though and it sounds like his CIO is intentionally sending spam within the company.
And all that means is that his company is full of fucking morons, including the CIO.
Which in this case I assume stands for Chief Idiocy Officer.
 
8:55 PM
@juanvan, is executing the same query
exec sp_executesql N'exec dbo.usp_insertinspectioneventpublic @contenttype, @image, @applicationid, @statusid, @notes, @requestuserid, @assigneduserid,
@parentid, @eventid, @discipline, @replyby, @workitemid, @messagetype, @inspectionid, @floor',N'@contenttype varchar(8000),@image varbinary(8000),@applicationid int,@statusid int,@notes varchar(8000),@requestuserid int,@assigneduserid int,@parentid int,@eventid int,@discipline int,@replyby datetime,@workitemid int,@messagetype int,@inspectionid int,@floor
when I running directly in sql it executes correctly
 
When you copy and past the sql being ran in the SQL server it runs correctly
 
even if I take those parameters and create them separately for the stored procedure it returns a different value all the time
yes it runs
 
9:33 PM
wwwwwwwwwwwwwwwwwwwww
 

« first day (2526 days earlier)      last day (2405 days later) »