How different is your work setup vs your home setup for programming? Ask Programming |
- How different is your work setup vs your home setup for programming?
- JAVA - How to read approved option from JFileChooser and then append it to a file?
- I'm starting a MASc in computational engineering. I'll be running simulations with many different versions of code and variables. What's the best way to manage this?
- My brother's cell phone has a resolution of 1440x3040 so even in portrait view, it loads the CSS media query for desktops. Can you stop this from happening?
- Trying to find a simple algorithm for rewriting into a run-length-encoded binary sequence
- Using Send API to send customized messages to FB messenger via Amazon Web Services
- How should I start with MVVM + Retrofit?
- What programming languages would you recommend to someone wanting to work in this field?
- How to tell how popular a given NumPy function is
- C# array struct
- Suggestions for GUI practice for hobby project
- What's the best to automate video view counts from LinkedIn & Twitter to a Google Sheets document?
- Project with a large spreadsheet - pinpointing rows with the most "important" words rather than frequent
- What's the best way to generate a schema from a certain set of parameters?
- Programming application to change current image in real time?
- How to return multiple SQL queries in Java?
- Personal Project Advice
- What to learn to become a software engineer/developer?
- Best way to locally store secrets?
- Editing XML saved as string in table column using SQL
- [Design] About modelling behaviour. More parameters on function, or new function?
- [SERIOUS] How to deal with small windows of downtime while developing/debugging?
- Can I add a python decompiler to Visual Studio?
How different is your work setup vs your home setup for programming? Posted: 12 Aug 2019 03:54 PM PDT I do web dev on OSX with a stock apple 104 key chiclet-style keyboard at work, but at home I run Debian/GNOME with an 87 key mechanical, with ctrl and caps swapped. I use Emacs in both cases, using left and right hand modifiers equally. I'm finding that the muscle memory I build for 8 hours a day at work really makes working on side projects at home unpleasant due to typos and reaching for the wrong modifier. I'm wondering if anyone out there feels equally productive on multiple interfaces, or if I should give up and try to standardize my setup between work and home. [link] [comments] |
JAVA - How to read approved option from JFileChooser and then append it to a file? Posted: 12 Aug 2019 10:04 PM PDT EDIT: Added the whole code instead of just the AddListener class. I'm trying to append the path selected from the JFileChooser to a file, but if I do it more than once, it just overwrites the previous selection. So say I select "path1" select ok, then I select "path2" select ok, then I check the file and it only has path2. I don't know why it's getting overridden, any help would be much appreciated. Here's my code (and I know it's terribly written, I'm pretty noob still): [link] [comments] |
Posted: 12 Aug 2019 08:45 AM PDT For example, I might run a set of simulations where everything is the same except one or two parameters. For now, I've been sorting results into descriptive folders, but I know this approach will be extremely troublesome when I have hundreds of different results. What's the best way for me to organize things? Should I look into SQL? Thanks! [link] [comments] |
Posted: 12 Aug 2019 09:17 PM PDT I set breakpoints based on how my design looks, starting with mobile view then widening out. I also took into account common screen resolutions based off this site: https://gs.statcounter.com/screen-resolution-stats Here are some examples of the screen resolutions I'm talking about: http://socialcompare.com/en/comparison/samsung-galaxy-s-product-line [link] [comments] |
Trying to find a simple algorithm for rewriting into a run-length-encoded binary sequence Posted: 12 Aug 2019 03:31 PM PDT Suppose I have a sequence of black and white pixels, encoded as block-lengths. For example: 3,5,1,2 encodes the following: BBB WWWWW B WW Now suppose I want to change the pixels at positions 4 to 7 to Black: BBB W BBBBB WW The new encoded sequence is 3,1,5,2. If instead I had changed positions 3 to 7 to black: BBBBBBBBB WW the new encoded sequence would be 9,2. What I'm trying to find is if there is a simple algorithm for taking one encoded sequence, specifying a block of pixels to change to either black or white, and to then output the new encoded sequence. Naively, one could decompress the sequence to a string of black and white pixels, make the change, and recompress it, but that's what I'm trying to avoid. I've figured that I can work out where the new block lies, which blocks it overlaps, and various ways for dealing with all combinations, but it feels like there should be a simpler way. Does anyone have any ideas? Or any proper names for some of the concepts I'm talking about that would help me to search for more info? Notes: the first number always represents a black block, so it may be 0. The uncompressed sequence always has the same total length. I'm writing in C++ but I'm just trying to find a simple generic algorithm at the moment. [link] [comments] |
Using Send API to send customized messages to FB messenger via Amazon Web Services Posted: 12 Aug 2019 02:15 PM PDT I currently have a chatbot set up using Amazon Lex that answers questions and interacts properly with my facebook business page. However, I am trying to introduce a new subscription messaging feature (just got approved by Facebook) that will send customized messages to different users based on different metrics (e.g. frequency of message, contents of message, etc.) How do I go about setting this up? so that I can send all types of messages (e.g. subscription message, broadcast message etc.) in addition to the pre-set messages that the chatbot can send. I currently have all of the business logic for my facebook business app on AWS (lambda functions, storage, etc.) I am not a developer, but I have been able to teach myself the basics so far. My best guess is to use AWS's API gateway service. I need directions on the best way to set these up considering all of the current infrastructures I have set up. Any guidance will be much appreciated [link] [comments] |
How should I start with MVVM + Retrofit? Posted: 12 Aug 2019 01:21 PM PDT Hi, I've got a little problem with MVVM. I'd wanted to create my own project, using Retrofit, instead of Room, but I'm totally don't know how It should look like. I'm already familiar with Retrofit, but I don't have any idea, how to use it with MVVM, can I have any advice? [link] [comments] |
What programming languages would you recommend to someone wanting to work in this field? Posted: 12 Aug 2019 05:01 PM PDT I've been interested for long in working in the field of software programming, I've learned a few languages and enjoyed very much doing so, but what are languages I should learn if I want a great future in this job? [link] [comments] |
How to tell how popular a given NumPy function is Posted: 12 Aug 2019 04:19 PM PDT Basically like stars on GitHub. Is there a way? This is one of the ways in which I judge whether to use a function or not (or which function to use), because I'll almost always pick the more popular ones. They tend to have the most staying power. Is there a way to do this? [link] [comments] |
Posted: 12 Aug 2019 01:22 PM PDT Is it possible to create a custom type I'd like that last line to modify [link] [comments] |
Suggestions for GUI practice for hobby project Posted: 12 Aug 2019 01:08 PM PDT I know it sounds suspicious, but this is not homework. I finished an interdisciplinary arts degree and a computer science degree and we had exactly one class where we worked with GUIs, and that was Java class/OOP, and even then it was like create_rect(1,5); type stuff. As you can tell, I feel like school was a waste of time where I didn't really learn anything, but whatever. That said, I want to work my way up to making a very simple connect 4 game where I can click on a column and then have the coin fall in. At the moment I have a (I believe) fully functioning connect 4 game for two people where you can set it between 7 to 98 columns. I will eventually make it to where you can have like 5 players. Once I am happy with my clickable connect 4, I'm going to make an item based checkers/chess game where you can shoot pieces or make them invulnerable to being captured, maybe add teleportation and cloning or create shields. But anyway, here's my code at the moment to show that I put in effort and am not trying to get someone to code my project. I test my code like every other line with stuff like "printf "testing C. You should see this.\n") to make sure my program correctly progresses, so ignore the weird commented prints. include <stdio.h>include <stdlib.h>//can change rows between 4 and infinity probably define ROWS 6define COLUMNS 7define WINLENGTH 4define CLEARSCREEN system("cls")void createBoard(int board[ROWS][COLUMNS]); void showBoard(int board[ROWS][COLUMNS]); void dropPiece(int board[ROWS][COLUMNS], int player, int lastMove); int checkVictory(int board[ROWS][COLUMNS], int* lastMove); int main(int argc, char *argv[]) { int board[ROWS][COLUMNS]; int lastMove[2]; int player=1; int turnsElapsed = 0; createBoard(board); //initialize an empty 6x7 board } void createBoard(int board[ROWS][COLUMNS]) { int c,r; } void showBoard(int board[ROWS][COLUMNS]) { int r,c,i; i = 0; } void dropPiece(int board[ROWS][COLUMNS],int* player, int* lastMove) { int attempt; while (1) { printf("Which column do you wish to drop a piece into?\n"); scanf("%d",&attempt); } int checkVictory(int board[ROWS][COLUMNS], int* lastMove) { } [link] [comments] |
What's the best to automate video view counts from LinkedIn & Twitter to a Google Sheets document? Posted: 12 Aug 2019 12:55 PM PDT My company is running an internal competition where employees generate video content that is then posted to our LinkedIn and Twitter pages and monitored over 1 week. Whoever has the highest view count at the end of the period wins. I set up a spreadsheet and dashboard in Google Data Studio already that allows me to manually update the counts of each, but I'm looking to automate this process. I've looked into some of the API documentation for LinkedIn and Twitter, but it's honestly pretty above my head and I'm not even sure how to go about getting started. I know pretty basic-level Python and bash, but am just looking for the quickest / easiest way possible to do this to lessen my workload. (No tools I've found offer this functionality so far) Any help or direction for this would be much appreciated, thanks! [link] [comments] |
Posted: 12 Aug 2019 09:03 AM PDT Hello! I have been assigned a large project for my team, and I am currently trying to resolve a smoother way to complete my objective. (The example details will be changed due to confidentiality) The spreadsheet is on the larger side (~5k rows) with multiple categories. However, I need to find a program/language that will allow me to mark or pinpoint the excel Rows with the most important words on the columns. For example, If one of the employee feedback column says "need more consulting training", and as one of other programs contain the keywords "consulting training", then that employee's row will be pinned as "Consulting Program". This applies the same concept with other program names and descriptions as well. I would say this would be a much stronger version of Excel's ctrl + f. My team gave me additional time to learn programming and practice them as well, so I am always free to take extra online classes for recommended programs. The file can be worked on the program language as well (Python, R, Etc), but I just would like to know which program is recommended and what the specific function/action is called. Thank you so much, if you guys need more details, please let me know. [link] [comments] |
What's the best way to generate a schema from a certain set of parameters? Posted: 12 Aug 2019 12:03 PM PDT I'm trying to generate an array of strings (or any other data structure that might be more useful for my task, but I can't think of anything else) in Python. The program I'm working on has several radio buttons. Two examples: *) One set of radio buttons is "Blocked" and "Alternating" and results in the output being either blocked or alternated. Example: Blocked is selected, the output looks like this: Alternated: *) Other set is "single" or "duplicate". Example: Single and blocked is selected: Duplicate and alternate is selected: I'm not really after a piece of code, but a general concept of how to create something like this. There's many more settings aside from those I listed, but the general idea is the same: based on the parameters I somehow need to generate an array of varying length with elements of varying order. I just need an idea for a concept; it doesn't have to be Python or array - I just can't think of a way to start writing this. Thanks in advance! [link] [comments] |
Programming application to change current image in real time? Posted: 12 Aug 2019 10:40 AM PDT Let me explain a bit. I'm trying to figure out if there is an application or what is the simplest way to do it (within python or java if it can be done) where I can set a solid color (rgb) and with the press of a button i can change it's intensity. so like I press the down key on my keyboard and the intensity of the image lowers. and after which i can press the up key to increase the intensity. thing is i don't want it to have like a delay or it stops as soon as i press on it once. What is the simplest way for me to do this? I'm trying to build something like this for me to collect data with the images i mess around with. [link] [comments] |
How to return multiple SQL queries in Java? Posted: 12 Aug 2019 06:31 AM PDT Hey, I'm trying to extract two SQL queries through Java so that they both would show up on the screen. Is there a return statement that could perform that with this code or do you have any other suggestions on how to do that? https://pastebin.com/Zs7ZgXvx [link] [comments] |
Posted: 12 Aug 2019 08:58 AM PDT I'm working on my first project in hopes of landing a job but I'm having some trouble getting started. In short, the purpose is to be a travel calculator where you enter information in (location, time, date, etc.) And it spits back the best time and way to travel as well as how much it would cost. I don't have any idea on how to start and I was wondering if there was a course I could find that would help me start and finish. Any advice or help is appreciated. [link] [comments] |
What to learn to become a software engineer/developer? Posted: 11 Aug 2019 11:18 PM PDT Hey guys, I'm studying next year but I'm want to get ahead. What should I learn to help me before course? [link] [comments] |
Best way to locally store secrets? Posted: 12 Aug 2019 07:05 AM PDT I am working on a project where we have to store access tokens and passwords to send off to an API. Since we have to send them in plaintext, we can't just hash them and store them that way. That being said, storing them in plaintext is clearly not an option. The process I came up with is as follows:
My line of thinking is that no one can get the AES key back out without knowing the salted hash of the PIN, which would require the knowing of the PIN. Is there a better way to do this? And/or a more secure way? Thanks in advance Edit: I should mention that the XOR key is longer than a single character, so it is not just a glorified substitution cipher Edit2: Some answers to some questions u/moobied had for better visibility: API is third party, and we can either send the user's password to them or an access token. We support both, but no matter what that sensitive information needs to be encrypted. We also do not plan on storing the PIN, nor the salted hash; if the user enters the PIN wrong, we will know when we get a decryption error or a logon error [link] [comments] |
Editing XML saved as string in table column using SQL Posted: 12 Aug 2019 05:51 AM PDT The column named "xmlString" contains XML stored as a string. I need to check, for each value of this column, whether or not it contains a certain value for a <tag1> which is wrapped around a bunch of <tag2>. The <tag2>s consist of key-value pairs (basically a dictionary item saved in each one) . I need to add a new <tag2> containing a new key-value pair in a <tag1> with a certain value. For example, I have this: as a part of my XML, and I want to add a new <tag2> inside a <tag1> which contains --name=\"test_name\"--, or even just "test_name\" if that is possible, the desired outcome would look like this: I need to do this using SQL and basically update every row with the new <tag2> if it contains <tag1 name =\\"test\_name\\"> [link] [comments] |
[Design] About modelling behaviour. More parameters on function, or new function? Posted: 12 Aug 2019 05:46 AM PDT First, let me set up some context. I have a function that simulates a user typing a string, printing each character of the buffer at a fixed delay. But now, I want another behaviour. There has to be a random delay if the user wants, so it will now print each character at a random delay between two numbers.
I am a student going through a more analytical approach building stuff and will be great to hear your opinion about it, even for such a simple problem. Would you use option 1, 2 or 3, or even take another approach? Thanks for your insight. [link] [comments] |
[SERIOUS] How to deal with small windows of downtime while developing/debugging? Posted: 12 Aug 2019 02:14 AM PDT I code very iteratively, i.e. make a small change, execute code to see if nothing broke, make a small change, etc. This means I often have small windows of downtime waiting for my code to finish (usually a minute or two). I find myself often browing reddit while keeping an eye on the execution and return to my work once the execution is done. I feel this method however wreaks havoc on my attention span. I would love to spend these small windows on something useful, e.g. learn something new, but I feel these time windows are too small. Moreover, multitasking isn't a thing. I have tried meditating in these windows, but I feel there's only so much meditation one can do in a day. Does this way of working sound familiar to you? If so, how do you fill these small windows? [link] [comments] |
Can I add a python decompiler to Visual Studio? Posted: 12 Aug 2019 01:25 AM PDT I'd like to be able to decompile a pyc file from within VS. Is this possible? I found this decompiler to work best for me. Is there anyway I can add this as a tool so I can right click a pyc file and decompile it like that? I'm new to python and VS. If not, is there another way to decompile using a gui? [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