« first day (3173 days earlier)      last day (1783 days later) » 

2:23 AM
what was that
oh a game.
 
mr5
hey nyc
would you recommend Xamarin.Android for developing a close-to-native experience app?
Xamarin.Forms in Android platform is still slow in terms of boot up time and its ListView
 
Definitely yes.
 
mr5
How was the boot up time?
Is it good?
 
I dont recommend Xamarin.Forms
 
mr5
Xamarin.Forms for a simple app is okay I think
 
2:30 AM
good the xamarin people are here
 
mr5
But for large app, it doesn’t scale well on production
heya c0de
 
Boot up time? App is no effect related to device booting time
Unless you make heavy work in background + startup event
 
mr5
It does for users experience.
 
@mr5 you play dota?
 
mr5
The mono loading different .so files is the bottleneck
We couldn’t do anything about it
@c0dem0nkey yep but I started to stop just yesterday. I need to grow as a person ;)
 
2:33 AM
dont worry bout it. your in IT anyway.
i just downloaded a ragnarok private server.
lol
youre*
 
Eh you do not need to avoid it, human needs entertainment, just decrease the playing time if you found some other work more interested
 
mr5
It’s just not about the time, it’s also about the community that plays it. It’s becoming more and more toxic for me.
I don’t want to be in that kind of environment forever
 
My app start immediately just like native app. I think there is no startup-time issue.
Most of app even slower than mine
 
mr5
@nyconing did you profile the boot up time?
It should only take not greater than 300ms
 
Debug mode are slower
 
mr5
2:39 AM
How about the RecyclerView in Xamarin.Android?
 
It was same just like Java
 
mr5
Nice.
I’ll recommend that to our upcoming big project
Thank you for confirming
 
You can just copying java codes spinet from SO, paste into it, it worked mostly the same
 
mr5
Eh, automatic code transpilation?
 
((TextView)view.findViewById(r.id.view)).setText("BaaBaaBlackRebecca");
view.FindViewById<TextView>(Resource.Id.view).Text = "BaaBaaBlackRebecca";
Nope, its not automatic...
Team at binding android support library manage to convert java's setText(), getText() into c# property..
Xamarin.Android is fast than expected, just like java app. It has cons I remember is they have a bit larger app size, terrible layout designer, and slower Android support library version
BTW no one is using Xamarin's android layout designer, we used to designing UI at Android studio
 
2:49 AM
i feel stupid trying to learn rest.
 
3:04 AM
@c0dem0nkey what about rest
 
3:17 AM
@mr5 im building an MVP. would it be okay if i use direct calls to db
@mr5 rather than build web api for it? it will for sure shorten dev time.
 
mr5
4:00 AM
@c0dem0nkey MVP pattern in Xamarin Forms?
REST is the recommended way for mobile development. You’ll find many documentation about it. It’s quite established.
Well, I didn’t actually get your question
 
4:28 AM
shorter dev time
it is extremely easy to setup a model and dto
@Rob did you like my artwork
how can I read this
public enum Intent {
            Book_flight,
            Cancel,
            None
        };
i am trying to emulate this if statement
if (intent == "Book_flight")
 
Rob
4:44 AM
@ChristianMatthew Beautiful
if (intent == Intent.Book_flight)
 
Intent intent = Intent.Book_flight;
if (intent == Intent.Book_flight)
{

}
 
why do I have to have the class involved
 if (intent == LuisReturn.Intent.Book_flight )
 
Class not required. Only enum Intent alone is required
 
Rob
That's either a namespace or you put the definition of Intent in the LuisReturn class
 
var result = await recognizer.RecognizeAsync<LuisReturn>(turnContext, cancellationToken);
ahh nm i see
I didn't get the error with the above statement
 
5:27 AM
 public class ToClass
            {
                public string[][] Airport;
                [JsonProperty("$instance")]
                public _InstanceTo _instance;
            }
            public ToClass[] To;
@Rob why can't i access airport in there
 
Rob
That depends on how you're trying to access it
 
from -> To is it accessable or no because it is a field?
 
mr5
@ChristianMatthew your coding is very weird
 
lol oh man you never give up on me do you
why is that weird
please tell me
 
mr5
You are not following any coding convention, aren’t you?
 
5:34 AM
epxlain
explain
 
public _InstanceTo _instance;
serious?
 
mr5
 
im just laughing because I DIDN'T write IT
you yell at bill gates ok
 
lol i didn't write it
omg
and in context it makes sense for what they are doing
-		Entities	{CoreBot.LuisReturn._Entities}	CoreBot.LuisReturn._Entities
this is the object
errr I can't get to london
do i have to do the FirstOrDefault()
 
5:51 AM
yes I needed to return the first result
I don't see why I can't just use [0] like normal people
bookingDetails.Destination = result.Entities.To?.FirstOrDefault()?.Airport?.FirstOrDefault()?.FirstOrDefault()?.ToString();
lol it's the first result in an array
 
mr5
@ChristianMatthew which is more readable: [0] or First()?
 
[0] > ?.FirstOrDefault()
at least get rid of the ?
and then it would be more readable
btw here is the entire generated code base from luisgen
// <auto-generated>
// Code generated by LUISGen .\FlightBooking.json -cs Luis.LuisReturn -o ..\
// Tool github: github.com/microsoft/botbuilder-tools
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
using Newtonsoft.Json;
using System.Collections.Generic;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.Luis;
namespace CoreBot
{
    public partial class LuisReturn: IRecognizerConvert
    {
        public string Text;
 
mr5
It was made for a reason.
 
@mr5 and furthermore [][] that nonsense right there wth is that lol
[0][0] >>> FirstOrDefault.FirstOrDefault
lol
they look like glasses
 
mr5
It’s called Jagged arrays
 
5:56 AM
i know
im just kidding
 
mr5
?
 
hello, is it good to store the refresh token? on the database?
 
never
why would you need to
 
because i'm doing a research on how to implement refresh token. So far I have a jwt token based authentication for my app
I give it an expiration of 1 day
 
ok but that is not on the database
 
6:00 AM
when it expires, the client pushes to re-authenticate
but I've heard about this refresh token
so i have little understanding how to create it
 
usually they are through middleware
 
I understand
 
you can rate limit them as well. salesforce uses them
 
so, i have token that expires 15 minutes
so when comes the refresh token?
i mean, if it expires, it will re-authenticate using the refresh token right?
 
again are you using a service or are you really trying to do this through a database. I have never heard of such a thing
 
6:03 AM
i'm using jwt to generate token
but it is stateless
i'm not storing my tokens
i just don't know or understand very well how to create a refresh token
and how it works
to re-create a new token
 
because here,
he has a method SaveRefreshToken
and i'm getting confused
i'm not sure if he saves those refresh tokens
and I can't find an implement of SaveRefreshToken so most likely he probably saves it on the db
 
  var savedRefreshToken = GetRefreshToken(username); //retrieve the refresh token from a data store
    if (savedRefreshToken != refreshToken)
        throw new SecurityTokenException("Invalid refresh token");

    var newJwtToken = GenerateToken(principal.Claims);
    var newRefreshToken = GenerateRefreshToken();
    DeleteRefreshToken(username, refreshToken);
    SaveRefreshToken(username, newRefreshToken);
he is saying go out and get a new generated refresh token from the database
 
in the article that you sent, he noted We will store the Refresh Token in the database and verify it as soon as the client wants to update his Access Token. It is a randomly generated string itself
so, he saves the RefreshToken in the database
 
6:08 AM
now I'm getting confused again
 
about what exactly
 
about saving the refresh token, because you said, Never
12 mins ago, by Christian Matthew
never
12 mins ago, by Christian Matthew
why would you need to
 
lol because i didn't know what you were saying
i thought you were changing a database token
 
I asked this before,
12 mins ago, by AppleCiderYummy
hello, is it good to store the refresh token? on the database?
 
not storing tokens
yes if you have a mechanism to authroize a person retrieving them and you trust that
like I said there are middleware systems that do this
but if this is something that you can trust then by all means
the only part I am confused on his the access method from the client. I'd like to see how he is doing that
haha lol the next sentence
Use the ASP.NET Core authentication middleware to authenticate a user using a JWT token
We need to configure ASP.NET Core’s middleware pipeline so that if a request comes in with a valid Authorization: Bearer JWT_TOKEN header the user is “signed in”.
 
6:14 AM
@mr5 sorry i meant MVP as in minimum viable product
:P
 
interesting
 
I already using those authentication, middle wares are already setup
jwt authentication is already working fine
 
ok yea this seems legit
 
the only missing is the refresh token
 
is it free
well yea you have to store them
so how are you going to do that
salesforce does this and they charge for it
got i can't wait for microsoft to buy them already
+		[0]	{{
  "query": "Travel from Berlin to london",
  "topScoringIntent": {
    "intent": "Book flight",
    "score": 0.9026307
  },
  "entities": [
    {
      "entity": "berlin",
      "type": "From",
      "startIndex": 12,
      "endIndex": 17,
      "score": 0.7912792
    },
    {
      "entity": "london",
      "type": "To",
      "startIndex": 22,
      "endIndex": 27,
      "score": 0.826571167
    },
    {
      "entity": "berlin",
      "type": "Airport",
      "startIndex": 12,
      "endIndex": 17,
 
6:44 AM
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' squirrelerinos!
 
Rob
Link's dead
Should be 290
 
mr5
lol
I just tried it and it’s opening the print dialog indeed
 
Aye ty rob
 
6:59 AM
This one, lol
Remind me did accidentally printed my codes to the admin desk printer
Even I cancelled the print jobs, the printer still printing...
 
7:20 AM
I want to record a persons name, the time and one word.
Before I did this:
public List<Tuple<string, DateTime, string>> WordRecorder = new List<Tuple<string, DateTime, string>>();
Is it better to create a class WordRecorder and put every item in a list?
 
mr5
@nyconing lol. How many pages did it print?
 
@kame Yes this would be better. :D
 
Good morning,
I want to learn about files (what's binary files -in depth, why are some files can be opened in a text editors and other can't), the story of ASCII, Unicode, and UTF etc.
any good resource that teach these things?
 
mr5
Text files are also binary files.
It's just that we can read the content once viewed. OTOH, binary files are non human-readable contents.
Encoding refers to how many bytes are allocated per character.
ASCII, for example, encodes each character by 1 byte (0-255)
Since not all characters cannot be contained in that range, various encodings arises, and the rest were history.
Btw, binary files have fixed encoding, that is, each characters are 1 byte allocation
 
7:38 AM
You can open binary files in a text editor
Whether or not you have characters to display for each byte is another matter though
 
hi guys.
O/
 
@mr5 this is a nice intro!
@mr5 so, files are either text or binary, these are the only two types of files?
 
@mshwf All files are binary. It's just what they contain and how they're encoded that differs
 
@mr5 nice.
@mr5 that was nerdy but cool. hahahaha
 
mr5
Yeah. You get all these kind of info if you started from C++ ^^
 
7:46 AM
Hey-ho.
 
so three things make up distinguished file (JPEG for instance):
1)it's content. 2)it's encoding. 3)the extension)
 
Noooooooooooo
The extension is meaningless
 
@CaptainObvious yes I know but for the system to read it and open it
 
The extension is for humans and for the shell to associate a program easily.
 
The system doesn't care what it reads and opens, it's for the dumb humans
 
7:48 AM
the extension is for the system or user to know what kind of content it is
 
"encoding" and "content" are mixed up here. Encoding, in the sense used earlier (ASCII, UTF8, etc) means text encoding.
 
the system or user can then choose to open that file in a program that understands the content
 
However sometimes dumb programmers make their program logic depend on the file extension
 
but you can always open files with other applications
some might give you errors that the content is not in a correct format tho
 
mr5
@AvnerShahar-Kashtan yeah. Encodings are just for us human consumption
 
7:50 AM
For instance, in our current app we had a couple of .MKV files that our app would play, using a media element control. At some point we needed to replace them, so we re-edited them. But after editing, they were .MP4 files, not .MKV - so we simply renamed the files and let the control load them renamed. It didn't care. The media control has no use for the extension, it checked the actual file content.
 
@AvnerShahar-Kashtan but for other video formats it may not be opened by the player, like converting from mp4 to flv
 
and?
 
@mshwf That depends on the player. Most players will play any of their supported formats, regardless of extension.
But if your player doesn't support FLV, naturally renaming won't help
 
@AvnerShahar-Kashtan but how does the player know which format it is?
 
extension is just a convenient way to say something about file
 
7:54 AM
or does it try all of them?
 
@Wietlol By opening it. Most formats have signatures in the first few bytes.
 
but when converting from format to another what has changed that a player doesn't understand it? encoding? content?
 
hmm...
 
@Wietlol I think it's in file itself
 
> When inspecting sample.mp4 file's binary data using any Hex Viewer, like Active@ Disk Editor we can see it starts with a signature ftyp (hex: 66 74 79 70) at offset 4, which defines QuickTime Container File Type.
@mshwf "Content" is merely the sum of bytes in the file. "Encoding" is "what do the bytes mean".
 
7:55 AM
like Bit order mark thing
 
pretty much like jwt
 
hello everyone
 
Hey @ratna
 
need your help guys
-2
Q: {"ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"}

MaximiousI have a file for logging store procedure error to oracle database but at the time of executing the store procedure I'm facing error {"ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"} . Earlier I was using microsoft enterprise logging but now...

hello raimonds
 
7:58 AM
@mshwf A player will take the file, read its header trying to understand what format it is, and if it's a recognized one, will start reading the contents and decoding it appropriately. For instance, an image viewer opens a file, sees the GIF89a header, then, because it knows the structure and encoding of a GIF file, it knows how to intepret the raw binary data as a GIF.
 
-2
Q: {"Input string was not in a correct format."}

MaximiousI have a file for logging store procedure error to oracle database but at the time of executing the store procedure I'm facing error {"ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1"} . Earlier I was using microsoft enterprise logging but now...

 
It seems answered
 
:o
 
@ratna what is your problem exactly?
 
do most file types have such a signature header?
 
8:00 AM
my problem is this
My old code was this
 
for example, pdf files
 
db.AddParameter(storedProcCommand, "abcd2", DbType.String, 32, ParameterDirection.Input, false, (byte)0, (byte)0, (string)null, DataRowVersion.Default, (object)logEntry.Severity.ToString())
when i was using microsoft.enterprise.library
now i am using oracle.managed.dataaccess
odp
 
@Wietlol I think all of them should, we can't rely on extension
 
@Wietlol I wouldn't know about "most". But for image, video and sound files it seems quite common, yes.
 
now my code is this
 
8:02 AM
Otherwise it's just "try to open it and let the user say whether it's defective or not".
 
cmd = adapter.InputField(cmd, "abcd2", logEntry.Severity.ToString(), OracleDbType.Varchar2);
cmd.Parameters["abcd2"].Size = 32;
 
I find it an odd idea tho
 
and it thorows error
how to change this
db.AddParameter(storedProcCommand, "abcd2", DbType.String, 32, ParameterDirection.Input, false, (byte)0, (byte)0, (string)null, DataRowVersion.Default, (object)logEntry.Severity.ToString())
to this way
 
@Wietlol what would you propose ?
 
cmd = adapter.InputField(cmd, "abcd2", logEntry.Severity.ToString(), OracleDbType.Varchar2);
cmd.Parameters["abcd2"].Size = 32;
i didn't add false, (byte)0, (byte)0, (string)null, DataRowVersion.Default into my new code
how to add this
 
8:03 AM
@Raimonds we need to develop one universal standard that covers everyone's use cases
 
wat
 
: p
 
true in every sense
and those people talking are probably from microsoft
 
Hi, Hastset.IsSubsetOf is working when I have no duplicates. But what could I use when I have an array of letters like { 'h', 'e', 'l', 'l', 'o', 'a', 'b', 'c' } and the string "hello" and I want to check if every letter of "hello" is in the array. (also the duplicate 'l')
 
8:08 AM
@Wietlol isn't there one already?
 
@kame How would the duplicate matter? If the first 'l' exists, the second does as well.
But basically, a string can be treated as an IEnumerable<char> and simply passed in to IsSubsetOf
 
@AvnerShahar-Kashtan This is not what I need.
 
Ah, you want to compare the string to the array, not to the hashset.
 
@AvnerShahar-Kashtan Imagine I want to build the word "hello" from some "letter bricks" and check if every brick is available.
 
Kame, you can do a .Distinct() on your array
 
8:10 AM
@Wietlol No, that's not what they want. They want to make sure there are enough L's in the array to build "hello".
 
if you use a hash set as basis, you cant have duplicates
 
@AvnerShahar-Kashtan yes. Set is wrong here
@Wietlol I can't use hashset here. Yes
But what could I use then?
Something like an array with subset?
 
hashmap dictionary
the dictionary could contain the character and the amount of how many times that character is in your initial collection
then, you can produce the same of the second
 
Nah, that won't work.
 
and check if the latter's amounts are lower than the first dictionary's
 
8:12 AM
@Wietlol Yes this would work.
 
another way would be to sort both arrays
then iterate through them at the same time pairing the matches
like an inner join
or... right join rather
 
@Wietlol This is a nice exercise for me. :D Thank you
 
morn
 
You can store available in a List<char>, and for every character in your string, call available.Remove(). If it returns false, you don't have that letter available.
 
@AvnerShahar-Kashtan This is what I did before. :D But I thought there would be a more elegant way to solve this.
 
8:16 AM
another way is to open your hands, then let a butterfly flap its wings to disturb the flow of the eddy currents in the upper atmosphere to cause momentary pockets of higher pressure air to form, which act as lenses that deflect incoming cosmic rays, focusing them to strike the drive platter and flip the desired bit that would produce your IsSubsetOf flag
@AvnerShahar-Kashtan ew, O(n^2)
 
!!xkcd 378
 
hehe
Avner, you know the numbers or google them?
 
no, they use java
 
I only know the number of 2-3 of them by heart. #386, of course.
 
8:18 AM
\o/
 
Mostly I google.
 
googles xkcd 386
ah, classic
 
!!xkcd 386
 
It's become a common term in my circles. "Dude, that guy you're talking to is an idiot, why are you 386ing?"
 
8:20 AM
am I often a guy?
 
no, a green lion
 
obviously
 
!!green lion or guy
 
@Hans1984 green lion
 
yep
 
8:25 AM
@AvnerShahar-Kashtan where does the "encoding" information lie in- if it's not in content? for example when you choose the encoding in the "Save as" dialog?
 
@mshwf It's not "in" the content - it defines the content.
var text = "this is a simple string!";
var asciiBytes = System.Text.Encoding.ASCII.GetBytes(text);
var utf16Bytes = System.Text.Encoding.Unicode.GetBytes(text);
In this case, the same content - the text in the first line - will be stored as 24 bytes if encoded as ASCII, or stored as 48 bytes if encoded as UTF16.
Likewise, the same image - the same bitmap - will be stored as a file with different contents based on whether that bitmap is encoded as a GIF, a JPG, a PNG or whatever.
The encoding is the format. The process, if you prefer, to parse and understand the content.
For instance, you could probably take a PNG file and try to read it as UTF16-encoded text. The bytes are just bytes. UTF16 doesn't care - it takes the bytes and decodes them as if they were encoded in UTF16. Chances are, it will be garbage, of course, but that's because you're trying to read data using the wrong encoding.
 
mr5
@mshwf it’s not standardized so the text encoding are not stored in the file itself.
 
@AvnerShahar-Kashtan the bigger the bytes are, the bigger the range of readable characters?
 
@mshwf Bytes are the same size. You mean, the more bytes? Yes. ASCII always uses a single byte (0-255) for each character. UTF16 will encode each character using at least two bytes (16 bits) per character.
So the exact same string will take twice as many bytes in UTF16 as in ASCII.
 
this week it will be up to 40° c in germany
x_X
 
8:33 AM
I have been trying to write documentation again, and I couldnt help myself from putting in references to stuff
like...
var `the answer` = 42
for quoted identifiers
or
var `1` = 1
var `2` = 2
var `5` = 3
not to mention what happened with the differences between characters and strings
i might add in a few xkcds as well
the issue is, when I want to remember one of the xkcds, I black out and cant even think of one
 
useless. <3
 
OK, thanks for your help @AvnerShahar-Kashtan ,
I was trying to understand the history behind a bug in rendering a cshtml file,
the content shown in the browser is:
ظ…ظ† ظپط¶ظ„ظƒ ط£ط¯ط®ظ„ ط¨ظٹط§ظ†ط§طھظƒ

for the text (Arabic):
من فضلك أدخل بياناتك

I still can't decide, if it's a problem with encoding or anything else...?!
 
With non-Latin alphabets, you're entering a whole different set of headaches.
With ASCII, traditionally, the bottom 128 characters were shared by all codepages for the standard characters and Latin alphabet ("Low ASCII"), while characters 128-255 were dependent on the codepage. So the same character (say, 128) will be the Hebrew letter א when using a Hebrew codepage, or an arabic letter when using an Arabic code page. You couldn't show both at once.
 
@AvnerShahar-Kashtan thought I can cahnge encoding of the cshtml or whatsoever ?
 
When Unicode came around, things improved. These days, UTF8 is the standard, which uses a single byte for common chars and Latin letters, but might use more than 1 byte for other alphabets (like Hebrew, Arabic and others). This means that an Arabic word containing 4 letters might be encoded using 8 bytes.
But if the browser reading it thinks it's reading an ASCII-encoded text, it will try to parse it as 8 different characters.
That might explain the repeated characters, interspersed with "garbage" characters.
 
8:44 AM
@Hans1984 Wo wohnst du? :)
 
Try saving the CSHTML as "UTF8 with BOM", if you have the option. It adds a signature byte to the beginning of the file which browsers (and other readers) can use to determine that the document is encoded in UTF8.
 
Deutschland
;)
bayern
@kame
 
@Hans1984 Ich in BW an der Schweizer Grenze :) Schönen Gruß von hier
 
Ja Grüße dir auch !
Dann kannst du ja immer leckere Schokolade in der Schweiz kaufen
 
Wenn nicht alles doppelt so teuer wäre :(
 
8:46 AM
that is a weird spelling of english words
 
:D
 
oh
 
@Wietlol Sorry
 
haha @Wietlol
 
:D
 
8:46 AM
it's a slang
 
hehe
 
lol
There are no C# chats in germany. Poor country.
 
mr5
guttenmorgen is only thing I know
 
there are no C# chats in england either
 
mr5
I’m not even sure if it’s spelled correctly
 
8:48 AM
@mr5 It is worng btu ncie
;)
 
mr5
oh
it’s a single ‘t’
 
Guten Morgen!
 
mr5
why the heck my single apostrophe is like that
 
good,good
 
mr5
fuckin MacOS
!!> ‘\‘’ == ‘\’’
 
8:49 AM
@mr5 "SyntaxError: illegal character"
 
hehe
 
lol
@CapricaSix
 
We sent out a tech to a client site, with a very comprehensive document containing debugging and diagnostic procedures. He calls me up, saying the command-line utility isn't working, and he pasted the command directly from the doc. I tested it 3 times, so I know it's right, and we couldn't figure out what went wrong. Eventually we realized that when I copied the command-line into Word, it automatically converted some quotation marks to "smart quotes", which were, of course, invalid syntax.
 
mr5
'''''''
ahhh
fuckin MacOS
 
@AvnerShahar-Kashtan argh. Happened to me too...
 
mr5
8:54 AM
@AvnerShahar-Kashtan fuckin MacOS right?
 
and this is why I dont use document applications like word
 

« first day (3173 days earlier)      last day (1783 days later) »