« first day (3168 days earlier)      last day (1763 days later) » 

1:54 AM
hello everyone
 
 
4 hours later…
5:49 AM
Hi, is there an online tool for checking my code quality?
and code smell
 
mr5
o/
@kame Resharper?
So we have this code from Xamarin Prism:
NavigationService.NavigateAsync("/ControlsPage/ApiTestPage/ServicesPage/MainPage");
And we're thinking we could replace it with the following code to be more maintainable:
var result = await NavigationService.Absolute()
    .Push<ControlsPageViewModel>()
    .Push<ApiTestPageViewModel>()
    .Push<ServicesPageViewModel>()
    .Push<MainPageViewModel>()
    .NavigateAsync();
What do you guys think?
 
tldr on Xamarin Prism?
First time hearing about it
 
mr5
I mean, Prism is a NuGet package especially targeting Xamarin :D
 
6:16 AM
@mr5 Hi, but is there also a free alternative?
 
mr5
Sorry. I'm not using one and I only hear about Resharper from here though
 
6:43 AM
Morning coders and other nasty people!
 
Did prism existed before nuget?
 
7:26 AM
so I posted my question in the unity forum
 
good morning
 
good morning my sunshine
 
Hello
 
> Pojo
> C#
0.o?
 
can any one help
0
Q: sa account not work with all domain users

BassemWe have a production server that has SQL SERVER Installed , all Pcs and servers are joined domain , the problem is we have 2 users A , B User A (from his pc) do a remote desktop connection to the server then he can login normally to sql using sa account User B (from his pc) do a remote deskto...

 
7:44 AM
@Wietlol ooops I mean POCO, I am so sorry.
 
hehe
np
 
hehe
 
we all have a bit of Jaba in us
 
I feel it in my jellies
 
8:04 AM
o7
AHOY MATEYS
IT BE A STICKY AND HUMID DAY ON THE HIGH SEA
MAINLY BECAUSE I HAD TO WALK UP AND DOWN LOTS OF STAIRS, BUT ALAS THIS DAY BE HOT AF
 
8:16 AM
Nah its mild
 
G'morning Cap'n O7
 
@Bassem 2 things. 1) nobody should be using sa day to day. If they have domain accounts, MSSQL supports Windows auth. And especially sharing accounts. And 2), it might be a hostname limitation
Can somebody help me with asp -
I'm trying to use this from my controller
return RedirectToAction("Details", "Days", new {id = today.DayId});
 
Well do it then
 
@CaptainObvious blue skys tho
 
Which in my eyes should redirect to /Days/Details/<DayId>?
 
8:28 AM
I'm amazed
 
But it just goes to /Days/Details/
 
Maybe put it as route. I could imagine it using the DayId as parameter or body or something. Just a guess tho
 
anyone familiar with moq?
im trying to set up a mock for an IAmazonLambda, but it keeps returning nulls
 
I'll give that a go
 
var moq = new Moq<IAmazonLambda>() ?
moq is great
 
just as great as NSubstitute
 
status code is set to default (0)
instead of the bad request (400)
wait... something weird is happening, the status code of the dummy response is also 0
 
hello everyone
 
uw quack quack
Hi ratna o/
 
@Wietlol there's an error with your error, sir
 
8:42 AM
hi friends
 
@user3548161 \o
 
hello @Squirrelkiller
hello @user3548161
 
does anyone of u know how to throw an exception but not show stack trace ?
 
oh, im silly
there is HttpStatusCode and StatusCode
 
@user3548161 throw new Exception(); boom empty exception
 
8:44 AM
(not sure if I am silly or Amazon)
 
@Wietlol Definitely both
 
is there any other software more efficient than elmah to log error
 
both? both. both! both is good
 
But Amazon at least lets me call Alexa "Computer" so I can go full startrek
I love it
 
wietlol but will it not return in stack trace line number where exeception occured
 
8:46 AM
ok, now my next error
it doesnt work the only way how I want it to work
 
@user3548161 The point of an exception is to know where it came from though. Why do you want an exception without a stacktrace?
 
does it do reference equality?
 
I'm smeling that smelly smell again.
 
meh it still does give full file location details 186 --- End of inner exception stack trace ---
 
@Wietlol It seems like it
@user3548161 That's wanted behaviour. Why do you want to omit the stacktrace?
There are method toremove it, but...last resort kind of stuff.
 
8:50 AM
who can explain me this:
>>>
I still don't know why it's not working with vector.Set() but with vector = new Vector3();
>>>>
>>>
Because you call Vector.Set on the copy of vector in your function local variables stack. Your code do not modifies any values in the list.
for (int i = 0; i < 8; i++)
                    {
                            Debug.Log("In Pojo:");
                            Debug.Log(carrierCollection.carriers[i].X);
                            //doesn't work, for simplifying I will just set the opcPositions[0]
                            // opcPositions[i].Set(carrierCollection.carriers[i].X, carrierCollection.carriers[i].Y, 0);
                            opcPositions[0].Set(333.0f, 666.0f, 0);

                            Debug.Log("in the List:");
 
@Suisse I'm guessing it's a matter of reusing the same instance as opposed to making a copy of it
 
15
A: How to use moq to verify that a similar object was passed in as argument?

k0styaThe following should work for you: Moq.It.Is<Account>(a=>a.Property1 == _account.Property1) However as it was mentioned you have to implement matching criteria.

ok, that works
 
i'm working with a front end that will not be changed and is on a different location from the 1990's that is seperate from the backend .. apparently i can return mesages to it and if i want to return error i have to throw an exception
to halt operations
 
http?
Because you could jsut send a BadRequest or something
 
But an exception is an exception either way, what does it matter if it's got a stack trace or not
 
8:54 AM
!!Did you kill poor OakBot ?
 
@Hans1984 That didn't make much sense. Use the !!/help command to learn more.
@Hans1984 All signs point to no
 
Clever girl
 
why is he not responding :(
cruel caprica
 
@Neil , @Wietlol, @Squirrelkiller Hugs
 
8:58 AM
asp core is dumb
 
free hugs ?
 
    var result = RedirectToAction("Details", "Days");
    result.RouteValues.Add("id",today.DayId);
    return result;
I'm getting a null ref on the first line there for some reason
 
inlined function?
 
@Hans1984 yes! :)
 
\o/
 
9:02 AM
wtf?
lambdaClient
    .Setup(client => client.InvokeAsync(It.Is<InvokeRequest>(it => it.FunctionName == dummyRequest.FunctionName && it.Payload == dummyRequest.Payload), default (CancellationToken)))
    .ReturnsAsync(dummyResponse);
this works
var requestEquality = It.Is<InvokeRequest>(it => it.FunctionName == dummyRequest.FunctionName && it.Payload == dummyRequest.Payload);
lambdaClient
    .Setup(client => client.InvokeAsync(requestEquality, default (CancellationToken)))
    .ReturnsAsync(dummyResponse);
this does not
what the heck is dis trickery?
what is this "expression tree" thingy that only works when your code is ugly?
 
@CaptainObvious why not
return RedirectToAction("Details", "Days", new { id = today.DayId });
?
 
@CaptainSquirrel Because that wasn't redirecting properly
 
49 mins ago, by Captain Obvious
Can somebody help me with asp -
See the following few messages
Also holy fuck that was nearly an hour ago
How the fuck is it 10:16 already
 
wot
how
WOT
 
9:17 AM
how do i say var test = object;?
 
Nope, it is 11:17 :-P
 
test = objectList;
 
well shit
@CaptainObvious do you have a routeconfig.cs?
 
If I do it hasn't been moddified
 
wait
before we go down this route
 
9:18 AM
hehe, route
 
thanfully its 11:17 already
 
does today.DayId DEFINATELY have a value
 
and not still 10:16
that would be even worse
 
uhm no @Hans1984 its 10:19
 
Yes, that's the primary reason the controller action exists
 
9:19 AM
 
lies!
 
Truths!!!
 
 var Test = List<object>();

        if(Model.CalendarInputsDataList[0].TIMEFRAME == "" &&
            Model.CalendarInputsDataList[0].HOWFARBACK == "" &&
            Model.CalendarInputsDataList[0].MONTHSTART == "" &&
            Model.CalendarInputsDataList[0].DAYSTART == "" &&
            Model.CalendarInputsDataList[0].YEARSTART == "")
        {

            //EVERYTHING IS BLANK, USE ALL DATES:

            Test = Model.TTransactionsDataList

                      .OrderBy(x => decimal.Parse((int.Parse(x.MONTH) * 31 + int.Parse(x.DAY) + int.Parse(x.YEAR) * 365).ToString()))
 
@CaptainObvious change to ActionResult
 
9:20 AM
list<T> cannot be used as a method
wtf
 
Then try the redirecttoaction like i suggested
 
From IActionResult? Would that even make any difference
 
ActionResult is what is used in regular .net
 
But im in Core
 
So my gut tells me using IActionResult won't work the way you think it will
ya i know dis
 
9:21 AM
well, thanks anyways
 
just try
@Adan at what point do you get that error?
Also, don't give up so easily :P
 
Cool, brb rebuilding like 5 times, failing to start the sire, having errors with dotnet, and then we should be good to go
 
let's say you say 'var x = 5;' the '5' is an int
 
how do i do this for an object list?
 
9:22 AM
omg it works wtf
 
Why are you doing an object list
 
var objectList = ???; objectList = Model.Object.select....
 
and not a specific Type list
 
Why are IActionResult and ActionResult not the same thing
 
@CaptainObvious because i', the fucking greatest that ever lived
Well one is an interface
 
9:23 AM
wdym?
 
@Adan why are you doing List<Object>(); instead of List<SomeModelOrObjectHere>();
 
Ya I know that, but they're named the same, presumably ActionResult implements IACtionResult so RedirectToAction should work the same either way
 
!!shrug
 
@CaptainSquirrel it wont accept it
 
¯\_(ツ)_/¯
 
9:24 AM
or what is the name?
 
don't question it
@Adan you have to make a class with your variables in it
 
don't question the squirrel
 
Fucking Microsoft, y u so dum
 
im confused
 
nah u dumb @CaptainObvious
 
9:25 AM
:(
 
cuz is Microsoft
 
i already made a class
 
@CaptainObvious ily really
 
but you can be both dumb
 
9:26 AM
@Adan but you are not using that to creating your list
You are just using object, which can be anything
 
Apparently a huge upside down nose
 
fk this just went to another level
god dam it
fk
 
Adan frustrated?
 
This isn't going to solve your problem of list<T> cannot be used as a method, but it will help you going forward
 
maybe you need some cat gifs?
 
9:27 AM
!!meow
 
Don't take this the wrong way, but do you actually know how to code? @Adan
 
obviously not
 
heck,thats not a cat
 
silly squirrel
noone here (except me) can code
:p
 
9:27 AM
lmao
 
That's not code! That's a cat!
 
@Adan I will try and find you an example of an MVC Project
 
(see, I do know how to code)
 
That should give you some insight as to using actual type objects etc
 
wouldnt calling a new class wipe the old data?
new {}?
am i creating a new class?
 
9:28 AM
no
 
an example of a class would be like Coordinate containing an x and y position
 
You can have several Coordinate instances with different values
 
ok
here's a way to describe it in laymans terms
Say you have a laptop, a phone & a drink.
 
@CaptainSquirrel what kind of drink?
 
9:29 AM
You want to store the laptop, phone & drink in your bag, but you only have a LaptopBag
 
Hopefully not a cup of Java
 
And the LaptopBag class looks like this
public class LaptopBag {
	public Laptop laptop { get; set; }
	public Phone phone { get; set; }
}
 
Bag<(Laptop, Phone)>
 
so in order to store the phone and the laptop, you would create a new instance of the LaptopBag Class
var bag = new LaptopBag();
 
 
9:32 AM
At this point, bag.laptop & bag.phone are both null because they haven't been assigned anything
 
it wont take Model
 
XD
 
it wont let me put anything after 'new'
im trying to use Model.LaptopBag
new Model.LaptopBag
 
i just
😬
 
9:33 AM
not specifically laptopbag, but the thing i created in my models class
Model.ex
 
maybe you should start over cap
 
screw JS
 
I'm going to go lie down
 
all hail to Java!
o/
 
NGL Hans
you were about a second from getting kicked there
 
9:34 AM
where is rob when u need him ><
 
all hail Jaba
 
We don't talk about java
 
fk java
 
@CaptainSquirrel That didn't make much sense. Did you mean C#?
 
9:35 AM
Why yes cap, yes i did
 
:>
 
fk C#?
 
Jawhat?
 
JS is garbage
 
@Adan are you writing code for work or for learning?
 
9:35 AM
g-a-r-b-a-g-e
 
hobby
 
i love js duck
 
i just want it to work and im happy
idc about the formalities
 
9:36 AM
no thx
 
don't do it!
 
Follow that tutorial & make a website
 
i'l wait for rob
 
start with node.js and typescript
 
alrighty then
 
9:36 AM
how can I improve this "architecture" of my app:
 
but the way you are doing stuff is no está bien
 
'1'+'1'-'1' equals 10
 
I have a websocket which is sending this data:
{
  "carriers": [
    {
      "ActualPos_mm": 0,
      "TrackID": 0,
      "CarrID": 0,
      "LiftID": 0,
      "LiftPos": 9999,
      "OrderID": 0,
      "Pen": {
        "cap_color": "green",
        "tube_color": "yellow",
        "text": "Hahahhaha"
      },
      "X": 5,
      "Y": 0
    },....
 
yea i know
 
9:37 AM
@CapricaSix lolol
 
everyone here tells me that
 
each message has 8 carriers in it
'1'+'1'-'1' is 10 O__O
ehm back to c#
then I have this:
carrierCollection = JsonUtility.FromJson<CarrierCollection>(message);
 
'2'+'2'-'-2' = 24
in javascript
 
omg stop it!
haha
 
'1'+'2'-'-3' IS 15
 
9:40 AM
ehm back to my "problem"
 
THIS MAKES NO SENSE
 
hahah no way!
haha
 
RIGHT
Back on topic
 
hahaha
ehm the problem is, I get like 10 to 100 times in the second this message
the full message with 8 carriers
this happens, when just one, doesn't matter which one, one value in the carriers changes
 
Are you still in unity?
 
9:42 AM
cough no
maybe
I am in c#
hehe
 
alrighty
unity's c#? :D
 
yes yes unity == c# //true in javascript
 
lmao
ok
so what's your issue
you get shit loads of data when something changes?
 
so my question is, how could I solve the mapping in c#, when I only would send the message which was changed and not everytime the whole 8 carriers
yesss
you got it
 
What handles sending the message?
 
9:44 AM
cough
I don't want to say it
haha
 
unfortunately yer gunna need to :D
 
j a v a s c r iiiiii p t
 
Your issue will be with whatever is sending the data
not what is rec
sorry, just had a stroke there, it looked like you said javascript was sending your data
 
9:46 AM
JaVaScRIpT
haha
 
So basically
 
no the problem is not about sending data.. I can manage to send only what was changed
 
but how to map it in c#?
 
so your FromJson thing
that is the method that gets called when your javascript sends the updated data?
 
9:48 AM
yes
somehow it needs to know, what is now recieving
because it can be everytime something else (not like now, now its everytime the carrierCollection)
'1'+'1'-'1' is 10 =>
'1'+'1' => string concatinate = '11'
'11'-'1' => there is no - for strings, so it is converted to Number and that is 10
same here
'1'+'2'-'-3' IS 15
 
Are you able to give your 8 things individual ids?
 
'1'+'2' = '12' - -3 = 15
Captain I am able to do anything.. it is my websocket server
I am the captain of that server
 
ok
So the 8 objects that you have
give them individual id's and make sure that your javascript send's the relevant id along with your data
then when you receive the update in your c#, find the specific object you need via its id
 
and than create 8 pocos in c#?
 
no, update the one that you need to via its id
 
9:55 AM
aha but to find out the ID, you first need to convert the string message(json) to a poco
and thats not possible because I need to know which poco to use
or just juse string split function and find out the id?
juse? wtf.. use!
 
@Suisse you could create a seperate object
with an int id
and your other pocos as objects
Because you are sending it as json, you will only populate the relevant poco object
public class pocoData {
	public int id { get; set; }
	public poco1 p1 { get; set; }
	public poco2 p2 { get; set; }
	public poco3 p3 { get; set; }
}
like that or something
does that make sense @Suisse ?
 

« first day (3168 days earlier)      last day (1763 days later) »