When I sit and program for multiple hours, my head starts to buzz and I can’t think straight. How does this compare to having a full-time job in programming? Ask Programming |
- When I sit and program for multiple hours, my head starts to buzz and I can’t think straight. How does this compare to having a full-time job in programming?
- How should I prepare for this tech interview?
- Need help with app development
- Roast My Code
- I am going to a new job and I was asked to suggest the laptop for my use. I was looking for Windows competitors of MacBook Air. I won't use any of this, rather than programming. Am I overspending?
- Developing a Chess App for Android using Flutter and Stockfish
- (C++/WinAPI) How can I simulate a virtual user program?
- General overview of what you need to do to get some kind of photogammetry
- Writing a program to automate writing and printing process
- Career change, need advice
- No server response question using express.
- Pycharm make me reinstall modules everytime I start new project?
- Does this program exist?
- How can I make a branch that is behind master point to master's head?
- Which DBMS you find to be the most suitable in Android development?
- Is anyone else terrible at code challenges?
- Going to be taking computer engineering at college in 2 years, what language should I start learning now?
- Incorporating react native component into flutter apps
- Enhancements on Encryption/Decryption Java Project?
- Automatically finding the selectors of login (username and password) fields on websites
- solve anagram problem
- Is it possible to have backwards compatibility without introducing extra technical debt?
- A device that allows me to control multiple (10+) sim cards and can have software developed for it?
- [AskJS] Curious about a huge file in the JS folder of a project named just "z"
Posted: 13 Jul 2020 05:47 PM PDT |
How should I prepare for this tech interview? Posted: 13 Jul 2020 10:32 AM PDT I had an interview 2 weeks ago with Sheetz (a large gas station and convenience store located in pennsylvania and the surrounding states). I'm fresh out of college with a bachelor's degree in computer science. I wouldn't describe myself as "above average" within my field, but mostly because I didn't manage to secure any internships while I was in school (they say you learn more from your first internship than your entire 4 years of classes). The first interview was over the phone with a non-technical person. The next interview will be a video interview tomorrow. The position will be for an associate SQL programmer. The way the position has been explained to me, I most likely won't be authoring much new code. Each person in the team pretty much becomes the house expert on a different piece of vendor code and learns how to maintain it and fix bugs. I asked the person (the non-technical person who I interviewed with the first time) if there were any topics I should review and if this was going to include any sort of quiz of sorts. She said she didn't believe so but again, she's non-technical, so perhaps she doesn't know. As far as I understand, the interview will be with 2-3 people (the hiring manager who I believe is technical, the team head, and maybe one other person but i can't remember). She said if i pass this interview there'd be one more that was about "culture" and seeing if i was a good fit within the team. What do you think I should study? I took a couple sql courses through school and know the basics of databases. But i don't know much more about the job beyond that. Do you think there'll be a quiz? Are there any general tech interview questions I should always know? Anybody apply for sheetz before? Thanks [link] [comments] |
Need help with app development Posted: 13 Jul 2020 09:52 PM PDT Create an app that by scanning QR codes, manages our assets. We can assign each piece of equipment we own a QR code (which links to a unique id) that we can scan with an app for iOS. Each equipment will also have metadata that we will store in a database (equipment name, make, serial #, etc). I would like there to be one database which logs every piece of equipment that is scanned. There will be one master log which has the fields: id (QR code), destination, and scanned by. So essentially there will just be a huge amount of rows here, being added to each time a new item is scanned. I want each QR code id to be linked to a table where all of the specific asset's metadata is available: equipment name, make, serial #, etc. I want the app to work as follows: when the user launches the app, they input their name. Let's say they input 'John', this populates the 'name' field in a log. John is taken to a QR code scanner, where he scans the QR code of the equipment, and the 'id' of the code is matched to its corresponding one in a publicly accessible database. John then inputs 'Toronto', which will populate the 'destination' field in the database. Before inputting, John can see all previous scan history for the piece of equipment (at this point it would just be the destination and name), as well as its 'metadata'. Let's play it out. Frontend: John launches the app. When prompted for his name, he enters 'John'. He is then taken to a QR code scanner, where he scans a battery. He can now see the battery's make, serial #, date purchased, expiry date. Below this, John can also see a log of when the battery was last scanned in chronological order. Backend: In the database with the metadata, we query all rows matching the qr code id which is scanned. (There should only be one). This info is displayed neatly on the frontend. The QR code id is then searched for in the table with the fields id, destination and scanned by (which is full of logs). All rows in the table matching the QR code id are displayed. There can be multiple entries. Frontend: John then presses a button that allows him to add to the log. He inputs the destination 'Toronto' Backend: There is a new row added with the destination as 'Toronto' and the name as 'John'. This will be displayed next time somebody scans the QR code. So overall, how should I approach it? I have basic programming experience, but am confident I can make this myself following tutorials/documentation for each component. So far, I have developed an app using React Native, which scans a QR code. I am now on the stage where I link it to a SQL (maybe?) database. I have tried firebase, but NoSQL is kind of hard to work with for this purpose, as I have a log and etc. A table would be a much simpler approach. Overall, I would just like some guidance on how to do the next step. Appreciate it, thanks. [link] [comments] |
Posted: 13 Jul 2020 04:56 PM PDT Hello! I wrote this code to process a Konami Code easter egg on my website, but I want to try to improve it if I can so it's more clear/speedy/etc. So I'm inviting you to critique my code. First though, a little background. The trouble with setting up a konami code system is that most browsers have a "TypeAheadFind" feature. Basically, unless you get rid of that in the javascript, most users won't be able to use the feature. The problem is that nowhere is the ability to do that documented. Now, it's not like it's a security feature, if you're building a browser game using webgl or canvas, then you likely need to do this for the keyboard input. What TypeAheadFind does is basically capture all of your keyboard input, and if it's not one of the keyboard shortcuts recognized by the browser, it won't go through, if it is a letter or number or some punctuation, it will open up an abbreviated version of "Find" to search the page for what you've begun typing. Obviously that won't work if you're trying to capture arrows (which move the page) letters (which bring up the find) or enter (which does nothing or triggers an action depending on the focus on the page. This is ANNOYING and it seemed like NOBODY had any clue how to get around this. So after months of experimenting and reading I finally figured it out. Below is the code that prevents the input capture from the browser, passes through most keyboard shortcuts, Reloads the page appropriately with and without caching when ctrl+shift+r and ctrl+r are pressed, and finally processes the Konami Code triggering an event which can then be processed to institute an easter egg. It currently DOES depend on JQuery but I don't mind that. ```javascript var index = 0; const UP = 'ARROWUP'; const DOWN = 'ARROWDOWN'; const LEFT = 'ARROWLEFT'; const RIGHT = 'ARROWRIGHT'; const A = 'A'; const B = 'B'; const START = 'ENTER'; var konami = [UP, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, B, A, START]; const event = new Event('Konami'); function processKonami(key) { // check that key pressed matches konami at current index. if (key == konami[index]) { index++; console.log('Konami Code Trigger: ' + key.toLowerCase() + '; index: ' + index); } else { // reset konami code: index = 0; return; } } $(function () { window.onkeydown = function (e) { // Detect both kinds of refreshing and execute them. if (e.ctrlKey && e.shiftKey && e.key.toUpperCase() == 'R') { // console.log('refresh the page'); location.reload(true); return false; } else if (e.ctrlKey && !e.shiftKey && e.key.toUpperCase() == 'R') { location.reload(); return false; } else if (e.key.toUpperCase() == ' ' && e.shiftKey) { // console.log('shift+space pressed'); return true; } else if (e.key.toUpperCase() == 'F5' || e.key.toUpperCase() == 'F11'|| e.key.toUpperCase() == 'ESCAPE' || e.key.toUpperCase() == ' ' || e.ctrlKey == true || e.altKey == true) { // console.log('shortcut key pressed'); return true; } else { // console.log('key event: ' + e.key + ' Ctrl: ' + e.ctrlKey + ' Alt: ' + e.altKey + ' Shift: ' + e.shiftKey); processKonami(e.key.toUpperCase()); return false; } }; $(window).focus(); window.addEventListener('Konami', function () { // Easter Egg! }, false); }); ``` I would love a way to define the constants in one or two lines rather than seven, but it's not strictly necessary. Also the reason "shift+space" is its own "else if" is that it didn't seem to capture correctly but I could be wrong. So far, I've only tried this code on Firefox for Windows so I'd be interested to see how well it works on Chrome, Edge, Opera, Safari, and the open source equivalents on Windows, Mac, and Linux. But moreso, I'm interested in improving the flow of the code and removing anything extraneous. Thoughs? [link] [comments] |
Posted: 13 Jul 2020 08:34 PM PDT For the note, money isn't an issue. They already approved the laptop I suggested. But I am rethinking if it isn't a luxury. These laptops are generally targeted to creativity people, able to run with some performance apps such Photoshop and Illustrator. I will use Excel, Bloomberg, Python, Power BI/Tableau and maybe Visual Studio. I didn't choose my stack yet. I will also use it in a huge ultra wide-screen. I wonder if I need a GPU to perform in such resulution. I am not putting here any laptop I am currently looking for, because I am not in the US, so I don't know they are available there. Also, the prices are very different. But keep in mind that they compete against a MacBook Air 2017 in price. Am I overspending? EDIT: Specs 14'' NVIDIA GeForce MX250 with 2GB 62 Wh of battery - almost 9 hours of battery with low usage Intel core i7-1065G7 10th Gen (1.3Ghz in the lowest clock. 8MB Cache) 256GB of SSD Storage 8GB of RAM Memory [link] [comments] |
Developing a Chess App for Android using Flutter and Stockfish Posted: 13 Jul 2020 07:52 PM PDT It's a small personal project that I'm working on and I can't figure out how to
I'm using Flutter in Android Studio and Dart Language.
I can say that I know the basics of how chess engines work theoretically and yet I can't solve this seemingly small yet crucial problem I want in the end to have Stockfish completely integrated in the app as the computer opponent, analyse the games and maybe generate some puzzles using saved games if that's even possible. I have downloaded the source code for Droidfish to examine how it works since it's similar to what I'm trying to achieve but I couldn't figure it out. At this point I'm starting to think that I should settle for developing my own much simpler and weaker chess AI. At least that way I have a clear path and know what to do. Can anyone point me to the right direction whether it's direct tips on how I can tackle my problem or some kind of documentation or videos. Anything is welcome really. [link] [comments] |
(C++/WinAPI) How can I simulate a virtual user program? Posted: 13 Jul 2020 01:46 PM PDT I'm trying to build a program that could be run in the background and that could operate a PC purely through visual input. I'm using OpenCV and TensorFlow to help it identify/learn shapes of buttons etc and then Tessaract OCR to help it read but I'm having an overall issue with defining the Windows backbone of this program. I know the basics of WinAPI but not enough to really get into indepth system programming. This is the functionality that I'm looking to perform:
During this time the program is constantly capturing the screen and feeding the screen capture through the OpenCV/TF/OCR pipeline to generate the AI mouse output and key out put. What the program doesn't need: It doesn't need to read any states, so I don't have to install any hooks or any message listeners etc. All the input the program needs is the actual visual feed of monitor's active display to generate normal output. So it just operates like a virtual AI user. Now I have thrown together some ideas just from my knowledge of WinAPI of how I'm going to do this , but I was wondering if this is the best/correct way. This is what I've come up with so far: Putting the program into background: I was thinking of just sending WM_DESTROY to the main program window, which would close the window but still keep the program running in the main message loop dispatch loop. So Instead of having a normal message loop that I currently have in my other projects, I'd have one with a loop thath doesn't depend on WM_QUIT to exit. This is one way I thought of doing it. I also know I can run my program as a service something which I've looked into and it seems pretty straight forward, but I'm not sure what's more appropriate in this case. If I go with this method than the program will still appear in the Task Manager, I know there are ways to manually hide it from Task View but is it worth going through all the hoops where I can just make it a Windows Service? The next issue is the screen shot / active display capture. I've gotten this basic method which I've used on a few Windows games So just something like that running inside a WM_TIMER message proc, where it captures a frame every half a second or so. I'm wondering if this will successfully capture the entire screen even if my app goes out of focus. Supposedly GetDC(NULL) is supposed to get the device context of the desktop when I don't specify a window but would this work in all cases? Or should I use some other way? The last thing is that I need to be able to send the input to the computer. So the program will just be clicking around like a normal user would be and whatever window it selects I want to send input to it. What I've found so far is an API like SendInput(...) it seems appropriate as it's supposed to send input message to the currently active window, but I'm not sure if it will also work in all cases. Like for example if the program I'm operating doesn't rely on the message proc and instead uses GetAsyncKeyState to get the raw shift states of keyboard keys, would this functions still work? Thanks for any input! [link] [comments] |
General overview of what you need to do to get some kind of photogammetry Posted: 13 Jul 2020 03:57 PM PDT I'm not saying "install this library" I mean if you were to make one from scratch and I'm not talking about stereoscopic imaging(2 offset images, same shot), I'm talking about multiple images of a person's face at different angles making a 3D surface. Where would you start? Image processing, edge detecting, OpenCV, etc... shadows? [link] [comments] |
Writing a program to automate writing and printing process Posted: 13 Jul 2020 12:44 PM PDT I want to write a program that can read label numbers from a text file(essentially just strings) and write them onto a label template and print them. Normally the process involves typing each individual label number onto the label slot in the document, once the document has a full page you print the label sheet and then have to clear the label template and repeat the process. I wanted to know how I should go about approaching this such as which language to use and how I would create it. My idea was to create a txt file that has each label number on their own line and pass that into the program. Any help would be much appreciated. (Just as a little note these are wholesale labels not ups or fedex labels) [link] [comments] |
Posted: 13 Jul 2020 06:09 PM PDT Hey guys. I'ma diesel mechanic, lately I've been thinking of a change that would be easier on me lol. But I've been thinking of coding, haven't done to much research on it, but saw this link today. I was wondering if I bought it would it be a good start to learning? Don't mind self guides, just don't know if this will teach me a basic understanding [link] [comments] |
No server response question using express. Posted: 13 Jul 2020 06:00 PM PDT I'm trying to create a user profile API, where I store skills that someone has. Also, skills aren't necessarily required. Because of this, I am not using express validation however my server will not respond. Below is my code for profile.js and Profile.js. profile.js is the API endpoint for profiles, and Profile.js is the mongoose schema for profiles, I've been trying to figure out why it won't work for a while now but am very lost. When I use a post request to create a profile in Postman, I don't receive a response. I've tested Postman and it is not the issue, and I'm certain the issue lies in my code. I'd really appreciate any help. Thanks! profile.js: Profile.js [link] [comments] |
Pycharm make me reinstall modules everytime I start new project? Posted: 13 Jul 2020 11:59 AM PDT Noob here, everytime I start a new project and try to import modules, it says they are not installed, so I use the terminal window attached/ running from pycharm and use pip to install them. Is there a way to stop having to do this everytime. I have anaconda installed.. [link] [comments] |
Posted: 13 Jul 2020 05:50 PM PDT I need a program that can sign into a web site and click a couple buttons once or twice a day at specific times. Does that exist, or is there an easy way to script that? Thanks! -Mr. Noob [link] [comments] |
How can I make a branch that is behind master point to master's head? Posted: 13 Jul 2020 10:10 AM PDT Well, this seems like a very stupid question, but I really couldn't find an answer on google no matter how I phrased the question... In my project, I made some commits in development, merged them with master, and then commited some bugfixes directly to master. Now, development is two commits behind master. I'd like to branch development off master again, but the branch should not be based from this commit that is two behind master's head, but from master's head itself. Just to be extra clear, I have not deleted development's branch pointer, it's still sitting there two commits behind master. How could I do it? [link] [comments] |
Which DBMS you find to be the most suitable in Android development? Posted: 13 Jul 2020 11:41 AM PDT SQLite, Realm, or ObjectBox? If you need to do complex data queries, which one would be the most efficient option? https://redwerk.com/blog/sqlite-vs-realm-vs-objectbox/ [link] [comments] |
Is anyone else terrible at code challenges? Posted: 13 Jul 2020 11:27 AM PDT I feel like code challenges are a skill on their own. I'm confident that I can build almost anything in the languages/frameworks I know but when it comes to code challenges or quizzes I am completely flustered. Is this something you all have experienced? Do I just need to practice challenges specifically? Is my lack of confidence the problem? All of the above? [link] [comments] |
Posted: 13 Jul 2020 02:43 PM PDT I will be going to college for a bachlers in computer hardware engineering and while I know that is mostly hardware understanding how programming works will be extremely beneficial. What language would be most practical, and what would be beginner friendly? I have a Macbook with xCode and windows computer so short of running Linux I should be able to use any language. Thanks! [link] [comments] |
Incorporating react native component into flutter apps Posted: 13 Jul 2020 10:55 AM PDT I'm writing a react native component that is to be incorporated into native apps written by others. I have found a way to include it in to swift/obj-C and Kotlin, and even got a way to add to Xamarin. What I can't find is way to include into flutter. Anyone have suggestions? [link] [comments] |
Enhancements on Encryption/Decryption Java Project? Posted: 13 Jul 2020 11:13 AM PDT |
Automatically finding the selectors of login (username and password) fields on websites Posted: 13 Jul 2020 10:05 AM PDT I did a search but I couldn't find the answer to this. I'm using Puppeteer in a project where I want to be able to automatically log in to any site. I have the code for logging into a site I know and it works fine. I just have to go onto the site and edit four lines of my code:
What I'm wondering, is how can I automate the process of finding the correct selectors? I want to have the capability of inputting a URL and the selectors modifying themselves to fit a brand new page. Obviously I already have the URL so that part is fine, but is there a reliable way to get the other three? If you're interested the code currently looks like this: [link] [comments] |
Posted: 13 Jul 2020 07:48 AM PDT Hello, I dont know if this is the right area. But I have a problem to solve: How can we obtain anagrams from sequences of operations performed by a stack? For example, there are two possible sequences of operations that allow us to transform TROT into TORT: i i i o o o o i o i i o o i o i o o o o Where 'i' involves performing the Push operation on the stack and 'o' the Pop operation. The program to be carried out aims, given a couple of words, to produce all the possible sequences of operations that allow us to transform the first word into the second. Process: A stack is a data structure that performs the following operations: Push — Insert an item. Pop — Returns and deletes the last item that was inserted into the stack. We will use the 'i' (in) symbol for the push and 'o' (out) operation for pop for an initially empty stack of characters. Given an Input word, we say that a sequence of push and pop operations is valid if each character of the word is, at some point, inserted and deleted. Also, you never attempt to perform the pop operation with the empty stack, for example, if the input word is FOO, then the sequence: i i o i o o Es valid i i o Not valid (very short) i o o o o o i Is not valid (illegal operation) Valid sequences produce a new arrangement of the letters in the input word. For example, with the word FOO and the sequence 'i i o i o o' we produce the anagram 'OOF' Input: The program must receive a pair of words, where the first is the base word and must be transformed to the second. Output: The program should return an ordered list with all possible sequences of 'i' and 'o' that lead from the first word to the second. Sample input: a) madam, adamm b) bahama, bahama c) eric, rice d) aaaabbb, ababaab Sample output: (a) [ i i i i o o o o o o, i i i i o o o o o o o o, i i o o o o , i i o i o i o o i o o o i o ] (b) [ i o i i i o o i o o, i o i i i o o o o i o i o o o, i o i o i i i o o o o o, i o i o i o i o i o i o ] c) [ i i i o i o o o o ] d) [ i i i i o i o o i o o o i o, i i i o i i o o i o o o i o, i i o i i i o o i o o o i o, i o i i i i o o i o o o i o ] any advice will help [link] [comments] |
Is it possible to have backwards compatibility without introducing extra technical debt? Posted: 13 Jul 2020 03:46 AM PDT |
A device that allows me to control multiple (10+) sim cards and can have software developed for it? Posted: 13 Jul 2020 03:30 AM PDT I don't know if anything like this exists, I am looking for a device that I can put several sim cards into, and then use those for either internet/sms etc. The end goal would be to develop a software that can for example visit a link or do some action online from multiple accounts. I have seen stuff like "sim servers" or "sim gateways" but I am unsure what they are used for and if software can be written to use them in the way I would like to. Any ideas? [link] [comments] |
[AskJS] Curious about a huge file in the JS folder of a project named just "z" Posted: 13 Jul 2020 07:00 AM PDT I recently took over a project, and it has a huge file, Has any one of you come across such a file before, and or have any idea what it might be? Edit: I'm pretty sure that the file isn't being included in any HTML file. [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment