« first day (2687 days earlier)      last day (2487 days later) » 
01:00 - 14:0014:00 - 22:00

01:28
@AvnerShahar-Kashtan thanks! thats what i wanted
 
1 hour later…
02:50
Howdy
 
3 hours later…
05:57
mr5
mr5
o/
Is it a good practice to share the same Page for two different ViewModels?
does it violate MVVM pattern?
 
1 hour later…
07:17
ohayou
mr5
mr5
o/ delegate
08:14
good morning
Guys I need some help, and my rubber duckling is not willing to help today
It's really weird this one, let's see if someone has come across it before.
I have this web app deployed that works flawlessly when deployed in my own computer
but it doesn't when deployed to production
the problem is about storing the password and retrieving it, it's stored blank and retrieved blank too
it works during login, i.e. it checks the password correctly at login, but not in the user password edit screen
the database works fine, I can call the encrypt function from the database assembly directly, logs tell me the encryption went right... but it's not being stored
is it possible that an IIS setting is blocking this request?
08:31
nsf pool is full
Do you guys know wich day it is?
!!funfriday
( ͡° ͜ʖ ͡°)
good morning
pulls squirrel shotgun
Im using: Microsoft.VisualStudio.TestTools.UnitTesting,
Is it possible to run an method like TestInitalize for each test method instead of class?
09:16
squirrel makes me wanna kms
09:51
KMS?
Kalkutta more sugar?
google it
How can I response with my API with this exactly json:
{
"ok": true
}
I am trying to do this:
string json = JsonConvert.SerializeObject(ok);

HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, json);
But I just get Value "true"
10:17
what is "ok" in "JsonConvert.SerializeObject(ok);"?
It is a boolean
I would like to put the name of the variable (ok) as key of the json property
and as value, the value of that variable (ok)
if it is the boolean, you should get "true" or "false" (without the quotes
@Harry key management service for Microsoft Office?
In Postman I get exactly this: "true"
But then, when I assigned it to a boolean on my controller client, it works well
as a boolean
My problem is just that I want to put the key on the json value, not just send the value
{
"ok": true
}
Like that
@QuicoLlinaresLlorens no idea what you're trying to do with that
10:39
@QuicoLlinaresLlorens try making a class with an "ok" property/field
the converter converts your value, which is a boolean
and you can only convert a boolean to two values at all times
one for true and one for false
in json, these are boolean values and are written as "true" and "false"
if you want the output of the converter to be an object, you must pass it an object
@Wietlol ok, I am going to try
Now I have this to serialize it: string json = JsonConvert.SerializeObject( new {ok = res});
And I am getting this:
"{\"ok\":true}"
I am going to try with a class that has ok field
well, it is the response you wanted to have
I think
or unless you are being literal about the string literal
@QuicoLlinaresLlorens how did you "get" it?
I just want to get "ok": true
string json = JsonConvert.SerializeObject( new {ok = res});
with that
10:46
but how did you read the value?
postman?
output file?
debugger for that matter
in any case, you can never get "ok": true
that is against all laws of programming
Why?
When I did APIs with node
10:48
because it violates the rules of the format that you claim the data to be in, which is json
I get "ok": true on postman
you must have it surrounded by curly braces
can give you a clear description of a json value
it can be a boolean, null, number, string, object or array
"ok": true is an object's value with it's appropriate key
it is not a json value, so it is not valid json
on a side note, JsonConvert.SerializeObject( new {ok = res}) does work
you just extracted the output wrongly
mr5
mr5
off to work
cya
With a class it does the same
but I don't understand
why postman formats bad
10:56
because you still extract the output wrongly
and with those \
postman does nothing wrong
that is the comfort of using programs that are commonly used
Do you mean, this is wrong?
string json = JsonConvert.SerializeObject( new {ok = res});

HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, json);
that is definitely wrong
So, how can I do it?
10:59
most probably even passing the object to the CreateResponse rather than to SerializeObject
CreateResponse will probably be serializing your input as well
and a string being serialized with json specs will result in the exact value that you had
Yes that is what I had, but it doesn't give me the "ok": true I am trying to do
escaped quotes and quotes around it (with some special characters being replaced with unicode values, but that didnt happen here)
have you tried passing it the new { ok = ok } ?
no, I think that one no
Ussually, you dont want to manually serialize your values
you want it to be done by the framework
(except if you are making your own framework)
Yes
I love you
:)
11:02
I love me too
{
"ok": true
}
:)))))))
hahaha
thank you man
so why all I found on the internet was to use the Json serializer?
If the CreateResponse make it by its own
because you probably havent used the right search queries
maybe you should have tried "C# how to not serialize object"
hahaha
now, from the client
how should I deserialize that object
that is actually a very interesting one
and it annoys me a lot
the server has frameworks in every language to do it for you, but the client is always fucked up
in simple terms, you could rely on your json serializer to have the same algorithms as the framework you used on your server and use it's deserialize methods to do it
which ussually works, but when it doesnt, it can easily cost weeks of time without any improvements
in this case, you definitely want to have a class that you can deserialize to
11:17
using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri("http://localhost:55518/");
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                string ok;

                // HTTP GET
                HttpResponseMessage response = await client.GetAsync("validaNif/" + nif);
                if (response.IsSuccessStatusCode)
                {
This is how I am trying to deserialize, and I am getting an error in that line
maybe a time out?
Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path '', line 1, position 1.
Is the response valid JSON?
Wait, ReadAsAsync uses Newtonsoft.Json anyway doesn't it? So just pass in the type you want
I have it
@Wietlol Just doing this
var res = await response.Content.ReadAsAsync<JsonNif>();
 ok = res.Ok;
To do what you're doing, use .ReadAsStringAsync();, ReadAsAsync<T> requires the T that you actually want as a result
11:26
I have now working
I have created the class for my jsonObject
public class JsonNif
    {
        public bool Ok { get; set; }
    }
Congratulations
(or just return a bool)
I returned just a bool before
but I wanted exactly this
because I have to return the json with the key and value
and with the bool I return just the value
To connect my asp net mvc app to a mysql database I have, how can I do?
I have downloaded the connector
But when I try to add a connection to a MySQl
there's no Mysql connection
is your mysql db open to connections?
do you have the right port
is your connection string pointing in the correct place
The problem is that visual studio
does not offer me the option of mysql
11:47
can you manually connect using the same credentials but in a sql viewer
cap dedded?
( ͡° ͜ʖ ͡°)
I have installed the connector
but visuals studio still does not allow me to add mysql databases
11:53
has anyone used Evolve for database deployment?
@CaptainSquirrel I put just in the web config and will work?
@QuicoLlinaresLlorens There's a little more to it than that. Read the article
I hope it will help you more than i can
I've never used mysql with .net
what is the use of 'go' keyword in sql server?
11:59
It goes
> GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.

> SQL Server utilities interpret GO as a signal that they should send the current batch of Transact-SQL statements to an instance of SQL Server. The current batch of statements is composed of all statements entered since the last GO, or since the start of the ad hoc session or script if this is the first GO.
> Applications based on the ODBC or OLE DB APIs receive a syntax error if they try to execute a GO command. The SQL Server utilities never send a GO command to the server.

Do not use a semicolon as a statement terminator after GO.
...did both of you just copy paragraphs from the link i posted? lmao
@CaptainSquirrel no, I used a different link to get to that page :P
12:02
Still counts ;)
counts as what?
documentation?
@CaptainSquirrel yes, Kendall did it so I assumed that's what happens in this room
¯\_(ツ)_/¯
12:20
45 sexdecillion clips
and there is an indian ambient sound
DONE IT
and it's endless...
ofc
WAZZAAAp
I Had another dinner yesterday @CaptainSquirrel
@Squirrelintraining more than i've had this year
Keep getting fucked by zone pushing me into positions i don't want to be in
Ya squigga should play with me more often :D
12:29
Don't use that word
Already changed
I would play with you more often
but generally when i play, i'm already playing with people D:
That and i sometimes have trouble understanding you and your buddies lmao
We need to hook up bro
Our tails don't touch half as often as they used to..
@CaptainSquirrel Just cause we are vermons!
You read me
filthy filthy vermons
12:32
Are you calling squirrels vermin?
how dare ye
TO THE BRIG WITH YE
Is that a challange?
you fucker
@Squirrelintraining I tootally didn't click that
i have a doubt
@KendallFrey same
Who cares
Copy paste the link then
It's a real game
Told you
12:34
after converting the file consisting of a particular lanuage "एक संघर्ष but locally I am getting it on that specific lanuage only what to do?
I'm gonna kill you!
probably
@KendallFrey thanks
can anyone tell me some keystrokes that I can see use with regards to viewing tables in sql server
foe example using alt + f1
I am trying to connect to my mysql database
            MySqlConnectionStringBuilder conn_string = new MySqlConnectionStringBuilder();
            conn_string.Server = "localhost:3306";
            conn_string.UserID = "mtis";
            conn_string.Password = "mtis";
            conn_string.Database = "mtis";

            using (MySqlConnection conn = new MySqlConnection(conn_string.ToString()))
            using (MySqlCommand cmd = conn.CreateCommand())
            {    //watch out for this SQL injection vulnerability below
                cmd.CommandText = $"select * from metodos where soapKey = {soapKey}";
thank You for your password...
@Squirrelintraining HOW DID YOU MOVE TWO PIECES AT THE SAME TIME
@CaptainSquirrel Is that a serious question?^^
But I am getting a MySqlException: "Unable to connect to any of the specified MySQL hosts"
12:46
uh yes?
@Squirrelintraining your queen and your castle moved at the same time
@ntohl It is on localhost man
if i go back in the moves it shows that
@CaptainSquirrel king
!!wiki rochade
whatever the fuck
this is some shit
^^
!!urban rochade
12:47
@Squirrelintraining No definition found for rochade
It's a move
!!wiki rochade
Why isn't the wiki call working?
it's called a castle
!!wiki castling
German version is rochade
Castling is a move in the game of chess involving a player's king and either of the player's original rooks. It is the only move in chess in which a player moves two pieces in the same move, and it is the only move aside from the knight's move where a piece can be said to "jump over" another. Castling consists of moving the king two squares towards a rook on the player's first rank, then moving the rook to the square over which the king crossed. Castling may only be done if the king has never moved, the rook involved has never moved, the squares between the king and the rook involved are unoccupied...
@Failsafe how to view schema of table?
here it's called similar to rochade
in dutch, it is called "rokade"
@KendallFrey i'd be happy to beat you any time, but not while im at work
@KendallFrey Looking for a remach?
12:55
tmux or screen?
I make big mistake
I get an error
ALTER TABLE Persons
ALTER COLUMN City SET DEFAULT 'Sandnes'
Incorrect syntax near the keyword 'SET'.
@CaptainSquirrel why did you call it?
need to work and you clearly won there
tellpelase
squirrels
13:08
Did not but ty^^
in spanish it's called "Enroque"
@RudiVisser Thank you
Anyone body answer my query!
please
Is there any problem if I make a return of a function without closing a DataReader?
@Breathing Tell me what are the things you are doing wrong, wich makes me want to ignore you for ever?
hah
answer my query squirrel
use your powers
ALTER TABLE Persons
ALTER COLUMN City SET DEFAULT 'Sandnes'
w3schools.com/sql/…
Incorrect syntax near the keyword 'SET'.
13:18
Well
o/ @Harry
@Breathing Do you have a table called Persons?
yes ofcourse
i am not a kid
@CaptainSquirrel hi
Do you have a column called City?
Is it a varchar?
I copied from that site only
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
City varchar(255) DEFAULT 'Sandnes'
);
13:21
huh what?
do squirrels even say 'huh'?
squirrels dont tend to write code either
they do
Funfact w3schools sql != microsoft sql
@Breathing which SQL dialect do you use?
13:38
SQL SERVER
@Squirrelintraining it clearly says specific code for SQL SERVER
Please don't use w3schools. It's terrible.
The only thing they're good at is SEO.
w3schools, more like w3fools, har har har
Huh
> Today, W3Schools has largely resolved these issues and addressed the majority of the undersigned developers' concerns.
I done been told.
good morning.
13:44
alright thanks guys!
my heart goes out to all americans, we live in sad days, where US is already dead, lost in a coma, i say in a coma because it's what Trump make it look like, a leaderless body, that can do nothing to stop the decease that has infected it. I am very sad :-(
Today, an entire nation became nothing but punctuation.
lets pay our respects
oh sorry, how is it spelled?
,,,,,,,
coma
13:48
@Zorkind I-T
thanks
thats top banter from kendall
my english is not perfect ;-D
@Harry Would you prefer some bottom banter? I can do that too.
can i have fries with that
13:50
You can have a Frey
@Zorkind wat happend this time?..
teachers with guns :-(
Wasn't that like 3 days ago?
yeh
my grow goes out for all of you ARHHHH WOOOOOOOOOOOOOOOOOOOO
that's why i said "sad days"
@KendallFrey inb4 ben is in a coma
guns are bad mkay
it's been debated, so, for me, it's yet happening.
@KendallFrey no topping from the bottom now
13:54
i have not qualified guns as "bad" i said teachers with guns is a sad thing. i believe it gives quite a different meaning.
hello guys
hey json o/
o/ dude
13:59
i keep parsing you all day long here dude o/
@Harry That didn't make much sense. Maybe you meant: oh
@Harry That didn't make much sense. Use the !!/help command to learn more.
01:00 - 14:0014:00 - 22:00

« first day (2687 days earlier)      last day (2487 days later) »