-
Posts
465 -
Joined
-
Last visited
-
Days Won
2
markyrocks last won the day on January 15 2020
markyrocks had the most liked content!
Recent Profile Visitors
934 profile views
markyrocks's Achievements
-
Xandy reacted to a post in a topic: I'm looking for an opinion on a specific scenario. (easy)
-
So I been chewing this over on my lunch break and the last exchange got me thinking. The 128 number wasn't correct. The byte can easily be broken into 2 halves that each half only has 16 different combinations.... of those 16 four of them {0,6,9,15} already reflect themselves. So that leaves 6 mapped pairs?... This is the kinda efficiency I'm talking about. Yeah!! Let me get out my can of loop be gone. I still believe that there's an algorithm in here. I'm just zeroing in on it. 2 of the pairs can simply be flipped. So now we have 2 groups those that can be flipped and those that cant.....
-
TheDcoder reacted to a post in a topic: Pretty cool lil nerd out
-
Werty reacted to a post in a topic: Pretty cool lil nerd out
-
Hmmmmm ... wouldn't even be 256 they'd only need to be a map of 128 that was reflective of whatever the mirror was. Not to mention that would scale up very well. I'm not usually a fan of the database type approach but being so small....ya I like it. Again this is just for fun but that's....wait I have something coming I think. An algorithm maybe looming.. I'll report back.
-
TheDcoder reacted to a post in a topic: Pretty cool lil nerd out
-
I've been playing around with this for a lil bit. Not necessary mulling over the actual solving of the problem but the reversing of a series of bits... like its got my ocd kicking in. I know that it has to be possible algorithmically using some combination of bitwise operations, that doesn't involve a loop.... loops are BAD!! BAD LOOP NO. I just can't wrap my brain around it. Anyways its just for fun. The point of this is to check to see if a series of bits are a palindrome. so if you only had 8 bits it would need to look like 0001 1000 etc. An earlier version I had them all being checked individually but i was trying to come up with something a little cleaner... If you got any ideas hit me up. Its not that big of a deal bc its just some random thing someone of fb was asking for help with. Like shouldn't I be able to make the computer just read it backwards? like wtf. change the encoding or something. void reversebyte(byte* p) { byte b = 0;; for (int i = 0; i < 8; i++) { if(*p & (1 << i)){ b |= 1 << 7 - i; } } *p = b; } int main() { int a = 1; byte b[4]{}; while (a < 100000000) { *(int*)&b = a; reversebyte(&b[0]); reversebyte(&b[1]); if (b[0] == b[3] && b[1] == b[2]) { cout << "good result : a = " << a << "\n"; } a++; } } on the topic of reversing a series of bit. I can get it to work sometimes because of my bits are 0101 bitwise ~ is a good reverse which would be 1010 something like 1101 ~ is 0010 so no good.
-
bobomb reacted to a post in a topic: I'm looking for an opinion on a specific scenario. (easy)
-
Letraindusoir reacted to a post in a topic: How do GUI and GuiCreateObj interact with or pass values to each other?
-
TheDcoder reacted to a post in a topic: Sort question in C++
-
I got no issues with this. Would have been nice to get a tag. Pixelsearch seems like one of the good ones. If anyone was following the other thread as I said in there the new version is drastically different than this. The whole thing was essentially rewritten to get rid of any copying except when absolutely necessary (strings) . That being said it doesn't even need a struct it just sorts the pointers at the actual autoit variant type variable. That and I eliminated all calls to processread/write. I'm almost ready to drop a new version. Getting to the strings is some Uber obscure syntax but I got em. I promise I'm not going to hijack this thread. I would have helped out but I didn't see this until just now. It took me roughly 5 years to get to this point with c++. I'm like so good with it I'm beginning to think that I can see into the future. Joking. Goodluck. Take care.
-
Ok so I got it to push blanks to one side or the other. The issue is that if I have mixed data types (if it's doing a number sort) the strings get pushed to the same side as the blanks. They're treated exactly the same which just kinda happened on accident but it's a happy accident. In that scenario it's possible for blank elements to get mixed in with strings bc theres currently no distinction in that particular path. My question is how should I handle this? Put the blanks at the very end and check to see if the blank is a string and group them all together after the blanks? Before the blanks, separate sides? I can pretty much do whatever at this point. I'm not too concerned with 2d array and so on bc its still stored in sequential memory there's a formula to deal with that. I just don't have it in me to think about it rn. Sleepy thanks. Also in the above the reverse should be true for basic types that get mixed into a string sort. Comments on that awell.
-
Script doesn't work in background
markyrocks replied to Davy2022's topic in AutoIt General Help and Support
I'm guessing it's a privilege level issue. Attempt to elevate the process to all access via open process, if that doesn't work Attempt to get a dup handle to the process or open up a security debug token. Handles are weird like that. Also try #Require admin. <====first. Scatter brained sry. -
StdInWrite send an incorrect blank value [Solved]
markyrocks replied to ChessMate's topic in AutoIt General Help and Support
https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetStdHandle.htm gets the handle to the specific stream. https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_WaitForSingleObject.htm wait for the handle to signal released. https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_CreateMutex.htm you can optionally create a mutex around the attempts to read the stream bc you may be interupted by the sender. when you'r done call mutex release close the mutex handle. This is pretty basic stuff in the world of multithreaded programming. I've used it in autoit b4 so i know it works. They don't exactly make it easy, its more straight forward in other languages. -
my point exactly. Everyone so quick to pile on... This is just like every other post i'm heavily involved it. People come in talk smack and somehow i'm always the bad guy. In case you havent' noticed i'm fine with that. I might aswell play the part. I wish people would ignore me bc trust me I don't want to deal with this nonsense that some of you all bring to my door. By all means please hit the bricks. I'm not seeking you out or seeking confrontation but i'm not going to shy away either. The biggest problem I see is that I'm not going to sugar coat the truth to make anyone else feel better. Sitting around and pretending autoit is even remotely relevant is just a fallacy. python is just as simple to learn has 10x the capabilities, superfast, is actually oop and amazingly things usually just work the way theyre supposed to. O not to mention that it was just voted programming language of the year? I'm wondering where autoit fell on the list... as a side note I was just able to pull out the strings.... what a pita. https://analyticsindiamag.com/python-is-again-the-top-programming-language-of-the-year/
-
Earthshine reacted to a post in a topic: Why is _ArraySort so broken? Updated 1/9/22 630pm g2g
-
StdInWrite send an incorrect blank value [Solved]
markyrocks replied to ChessMate's topic in AutoIt General Help and Support
you can try using some sleeps in there. Just bc your code starts reading the stdOut buffer (or tries to ) that doesn't mean that it has been released by the sending process. The right way to do it is to use a mutex and lock the std handle object and wait for it to actually locks (it won't if the other process has control of it). There should be a mutexwait function if not I know theres a waitforobject function in the win api udf. The mutex wont lock until the handle returns the free signal. That stdoutread just looks at the stdout buffer if its empty it leaves. You looking may actually be preventing the write on the other end. It really just depends on what stdout() is doing exactly. A mutex is pretty much the standard for dealing with shared objects. Well not around here but everywhere else. -
Lol anyways. If you don't like the thread don't click on it. My code is in the very early stages and is the baremetal performance that you all should be looking for. Idk how that couldn't be beneficial. Its really sad bc my latest tests almost halved my previous times just on my function execution. I'm actually gearing up to make a redim function of my own bc due to attempting to identify the array I have to add an element at the end. This one redim takes like 3x as long as the sort itself. I realize reallocations are expensive but dear lord. The last time though I essentially eliminated any need to copy anything from the heap and save it. So basically all heap allocations have been removed bc I can simply swap the pointers around to do the sort and it all works. (Sort them in place). on my machine a 200k size int array took 1400ms from start to end the 2x redims took ~550 ms each. My dll function execution took 170-190 ms ITs not a question or not if its game changing or not...It absolutely is. All these encouraging words Its hyping me up to keep going. I was just working on the barebones for the string sort. The current version doesn't have all features quite working yet but it sorts all number types, conveniently it ignores strings. It basically treats the strings like a blank and just pushes them to the front(or back). I've put in ways to push blank elements to one side of the array or the other, ummm it can sort ascending or descending and I've implemented start and end (iterator functionality). But ya its actually going really well It. The source code is the precompiled files. I'm not sure what you want that's my intellectual property. You want me to hand over the keys to my truck too while im at it? Not like autoit has their source available for free, not the current version anyway. Its ok for them but when I do it how dare I. lol that seems reasonable. I'd also like to add that the current version looks nothing like the previous versions that i've shown.
-
I'm not going to stop doing anything. I'm not saying I won't allow it to be used but I won't hand over the source code for free. Maybe in your world exchanging of products for currency is unfriendly.. maybe you get upset when the burger guy asks you to pay for the meal you just ordered but most people just call that business as usual. lol unfriendly bc I've always been met with such encouraging words and well wishes when i come here. the first page and a half of this thread was people trying to discredit me and challenge every aspect of anything I said.... please. I make a comment about future improvements thread which was more like a wishing well than anything based on reality and I was attacked...Your comments in general are looked upon by me as an unfriendly act. you can't even say nice job,
-
My guess is probably through the tag data or through the execution of some javascript and the resulting data. You can scrape web pages information via downloading the source code and parsing through it. Anything stock related is usually hidden bc so many have made stock bots. The selling of stock trading data has turned into its own industry. It's ridiculous really.