« first day (2457 days earlier)      last day (2717 days later) » 

00:32
bigly
01:02
wagwan
 
2 hours later…
03:08
When the quartz crystal was first used to keep track of time, did someone just say that a second takes X quartz cycles?
 
1 hour later…
04:37
Does anyone know the best practice to connect to a database? I was taught never to connect directly from the program because it can be decompiled. Besides using json and php, is there another way to connect to a database?
Using JSON as a means to format data between two endpoints seems fine. What are your other requirements?
I have an application and I need to connect to a database but I don't want to connect to the database from the application. Do you think the best way to do it is using php?
I'm assuming the application is written in PHP, I'm not particularly experienced in web-design, but I'd say an API is the best approach. It keeps your data access centralized.
I am using C#, I would send logs to the database by sending the string to a php file
I just don't think it is secure to put the database password in the application, and this is the only other way I can think of how to do it.
05:14
Oh, so your php file manages the connection to the database?
You should save the hashed password, not the original string.
!!google how to save passwords in database
@CapricaSix
 
1 hour later…
06:32
Anyone have some exp in VBA and can help me in this task as i'm struggling with some errors
0
Q: Subscript out of range (Error 9): Loop through a folder of Excel files, copy cells and paste in the current worksheet

WelooI'm a beginner in VBA and have to work on some task to open a folder consists of scientific results in Excel files, select some cells based on a specific key from each Excel file and retrieve these data to the current workbook/worksheet in a sort of final table. I'm getting this error Subsc...

i appreciate any help !!
07:01
hi..
is here any body who helped me in ffmpeg please ?
i am using Command in C#
-y -f dshow -i audio = Microphone (High Definition Audio Device) -f gdigrab -video_size 1300x700 -i desktop -vcodec h264 D:\\output.mp4"
but not working
 
3 hours later…
Paz
Paz
10:04
People, angular or react?
10:17
People.
 
3 hours later…
13:25
` var result = quote.Split(new string[] { " " }, StringSplitOptions.None);

var symbol = new
{
symbol = result[0],
ask = result[1],
bid = result[2],
};`
Sometimes I have this kind of code, Any advise to improve the readlibity
the result[0], result[1] is bad...event the naming of result
qoute = "USDAUD 1.24 1.36"
please
what does o/ means?
its a guy waving
like o7 is a guy saluting
\o/ is a guy with his hands in the air
13:30
haha, I see
And could you give me some advises
oh..I have a question above
I'm confused as to what your question is
The naming advise of result variable
Whats wrong with using indexes?
I mean you could just
var s = result[0];
Then you can use s how you would result[0]
13:37
OK got it
@MichaelMao I mean if the datatype of the results isn't going to change, there is nothing stopping you explicitly making it a string/int/whatever
you mean string symbol = result[0]
yeah
int ask = result[1]
like that
13:40
oh...I will serialize the symbol to JSON so I don't need to give them explicitly type
That works too
Yes it's work
14:04
i have doubt is it possible to give int size of blob oraclecommand.Parameters.Add("ans_attach", OracleType.Blob, "ans_attach");
 
4 hours later…
user7442629
17:53
Guys is there an easier way to write this?
user7442629
public static int ToAppropriateDataSize(this long inputBytesLong)
        {
            int total = 0;

            float inputBytes = inputBytesLong;

            while (inputBytes >= 1024)
            {
                inputBytes /= 1024;
                ++total;
            }
            return total;
        }
Isn't that just a logarithm?
Math.Log
couldn't you just do inputBytesLong / 1024 to get the total (without remainder)?
@Bardicer It's logarithm, not division
that's logarithm?
user7442629
17:59
Ahh I knew it. Logarithm. I knew I was missing something. Thanks a lot @KendallFrey.
@Aleksbgbg Also, use 1000 not 1024.
hmm
sorry i'm in learning mode myself lol
user7442629
I'm calculating KiB not KB (for example)
Oh. Why?
user7442629
Windows program - windows uses KiB but doesn't specify
user7442629
18:00
I mean like drive/file sizes
Huh?
I'm pretty sure drive and file sizes aren't measured in KiB
<-- crash coursing on netcore, entityframeworkcore, web api and angularjs...
user7442629
They say KB but they are measured in KiB
huh, looks like you're right about files at least
and drives
wtf
user7442629
My thoughts exactly
I didn't know about KiB and was even more confused when Windows was using the wrong abbreviation
18:01
I always thought Windows would measure drives the same as the manufacturer
since when does M$ adhere to everyone else's standards?
internet explorer?
outlook?
Also, just because Windows displays it wrong doesn't mean you have to
^---- this
don't get into microsoft's bad practices lol
user7442629
Wouldn't a logarithm work with 1024?
It works with whatever you give it
user7442629
18:03
Sorry that was a stupid question
user7442629
I would prefer to use 1024
user7442629
But make sure it's clear that it's KiB and not KB
i'm trying to get a list of objects, as well as the person who last modified them in entity framework. .Include("User") doesn't appear to be working with the ModifiedBy property...
It's sad that the "MB" and "KB" suffixes was perverted enough that people just gave up and made new units for the same things.
user7442629
@LasseV.Karlsen what do you mean in more depth? What was wrong with the units?
18:11
KB used to mean 1024 bytes and MB used to mean 1024 KB.
However storage manufactorers and media used 1000 instead of 1024, so at some point MiB and KiB was invented to handle 1024 and leave KB as 1000 and MB as 1000 KB.
@LasseV.Karlsen source?
Wikipedia? All the way back in 1969 they were used that way - en.wikipedia.org/wiki/Timeline_of_binary_prefixes
user7442629
@LasseV.Karlsen oh so that's how the confusion was made. I was wondering how such a mistake could happen.
And I grew up with them, all books and magazines used 1024
"perverted" and "gave up" is my opinion though

« first day (2457 days earlier)      last day (2717 days later) »