Permutations of neighboring elements Ask Programming |
- Permutations of neighboring elements
- Professional code in GitHub?
- Git Help; how to ignore 'notes' files
- Trying to recreate a pixel perfect representation of an image from JS code?
- Editing a site powered by weebly?
- Discord: how programmatically see if there’s a new post in a channel?
- Best EEG headset compatible with Python/respective library?
- I have a truth table that contains the values Sometimes, Always, Never for Ands and Ors. How do I implement this?
- list and tuple exercise left me clueless
- Basic workflow for user registration app?
- Is programming worth pursuing?
- Generate all the possible permutations of the first N numbers in Assembly Inline with Visual Studio
- If I want to produce an open source program to do a specific task, using other open source libraries, what would be the proper way?
- SQLSever & Python , Need Help exporting csv's
- Explain like I'm 5, what is a web service, SOA and ROA ?
- [HELP] Script not working when called by cron
- C program
- What program/language should I learn to make games?
- My friend claims this Python script as a bot which can fill Google Forms
- Expanding storage Ubuntu VM truenas
Permutations of neighboring elements Posted: 06 May 2021 11:05 AM PDT I have a quite specific problem. I want to combine every element of an array (string in this case) with neighboring elements to a new array of minimum length 2. Im not sure if Im explaining that correctly so here's an example: Given the array: I want to create a new array that looks like this: Not necessarily in that order. ['abcd'] is not returned since it is only of length 1. It dosent really matter if ['a', 'b', 'c', 'd'] is returned or not, but I rather it didn't. I feel recursion could be useful here, but I can't figure it out. [link] [comments] |
Posted: 06 May 2021 05:28 PM PDT Guys, do you usually put professional codes on GitHub? As if it were open source? I have this doubt hammering here because I know that these codes can serve as a portfolio, but I don't know if it is a good idea to leave the code that I am selling on display, even with a license, you know? [link] [comments] |
Git Help; how to ignore 'notes' files Posted: 06 May 2021 02:17 AM PDT Essentially I've got some files that belong to the project, but must not be tracked. I would normally add it to the gitignore, but I don't want to push that as a commit. I am lazy so I want do Is there any way around this, through git? [link] [comments] |
Trying to recreate a pixel perfect representation of an image from JS code? Posted: 06 May 2021 04:51 PM PDT Hi so I'm trying to get a pixel perfect skin from this tetris site, https://blockwars.miniblip.com/ Whenever I screenshot the blocks though, it's always pixelated and the edges aren't precise. And it looks like the blocks are drawn from code, instead of using a png image. Any way to construct the blocks using the information from the code to get a pixel perfect representation? This is the code https://blockwars.miniblip.com/js/blockwar.min.js I tried to do it myself, using 12x12px for each color block, to get this skin. https://i.imgur.com/7fmpqwH.png (I used nearest neighbor x4 so that's why it's 48x48. But 12x12 was just my guess. Is each block actually supposed to be 24x22? Since it's a little bit wider than it is tall, and i found this piece of code that I surmise might be talking about its dimensions: this.ctx.scale(24,22). I know I got the colors right because I can see the hex codes match up in the code, but not sure about the dimensions, and also not sure about the exact location and lengths of the little white strips on the top left of each block. Can someone help me to recreate a block from the code? I have no experience in programming. [link] [comments] |
Editing a site powered by weebly? Posted: 06 May 2021 09:33 AM PDT A company I'm working for wants me to add some stuff to their website that was originally created through weebly. Would I need to rebuild the site from scratch if I wanted to customize it using VS code? I don't know if weebly allows access to the css and js files. [link] [comments] |
Discord: how programmatically see if there’s a new post in a channel? Posted: 06 May 2021 12:49 PM PDT I have a task I'd like to automate involving Discord. In the most general sense, whenever a specific channel on a discord server has a new message (not on a server I run, but a foreign one), I want to be able to "see" that message in order to (potentially) programmatically respond to it. Is this possible? Something like IFTTT does not seem helpful as it appears to only trigger automated stuff based on activity outside of discord, not within it. [link] [comments] |
Best EEG headset compatible with Python/respective library? Posted: 06 May 2021 12:49 PM PDT Hi! I am trying to begin development of a device that utilizes EEG readings. I was wondering if anyone knew of a headset & library that I could use? Thank you for your time. [link] [comments] |
Posted: 06 May 2021 05:17 AM PDT Boolean logic doesn't seem to work due to 'Sometimes', but I have the logic to implement in the form of a 12 line truth table. I have the data in conjunctive normal form, so as long as I solve parenthesis first, things seem pretty straight forward. However the actual evaluation is hanging me up. Something like (A or B or C or D) is easy with boolean logic, but with 'sometimes', I need to write my own way of handling this. I was considering using IFs to apply replace on a string or using a dictionary to replace a string. These seem a bit manual, and requires an additional scenario for parenthesis. Any ideas/links? (Python, Pandas, Sympy) [link] [comments] |
list and tuple exercise left me clueless Posted: 06 May 2021 10:17 AM PDT My python teacher barely gives us any example of how to write a code that does something like this but I hope you guys can help. The task is a basically coding a program that would be used to order something at a fast food restaurant. As you can see, this code won't run, but if we get rid of the last 3 lines, it would run but do nothing other than take in values. The code must 1. exit if I input 0, 2. If I give a valid input, the code will automatically tell me at the end what I ordered and how much I need to pay. So if I input 3 and 2, the code will exit after telling me "order list: triple pack, 2 total price: $16" I know the solution is to make it so that placeholder gets translated to the price (ie if I enter 1, then 1 gets translated into 6 for "totalprice = //price of the item// * item_qnty" and it gets translated to the name of the item at "print('order list: ', //the name of the item//, item_qnty)".) The teacher literally didn't tell us how to do any of this and only taught us basic list and tuple function that barely helps. I've tried to do something like to somehow try to translate the number to the name so that it shows up properly at where //the name of the item// is written. Of course, the teacher didn't tell us how to work with values that have spaces in them while making a list and this doesn't work at all. This is the code in question. Those 2 pieces of code are suppose to be in the same cell but it's an absolute clusterfrik so I decided to separate them. I'm sorry for sounding mad. I'm very irritated at the moment as I've been at this task for 7 hours. [link] [comments] |
Basic workflow for user registration app? Posted: 06 May 2021 09:44 AM PDT Im new to app development and am doing a very basic project where I implement an app which allows users to sign up and message each other. What I have decided on right now: Frontend: Flutter Backend: Python Protocol: gRPC Database: postgreSQL I've been looking at examples of grpc bidirectional streams with python, and using pstgreSQL with python (psycopg2?). Just wanted to get feedback on what I have right now and what I believe is the server process: the server script handles both the grpc stuff and the database stuff? Not entirely sure how the signing up would work atm. [link] [comments] |
Is programming worth pursuing? Posted: 06 May 2021 09:39 AM PDT The title stands for itself. Is it really worth pursuing? Wherever u see, there r children who can whip up advanced softwares with the help of their laptops. Programming can be taught to virtually anyone and it does not require you to have a degree. Also, this side of the job sector is quickly becoming very saturated. So it possible to find a job? And if so, is the job secure? [link] [comments] |
Generate all the possible permutations of the first N numbers in Assembly Inline with Visual Studio Posted: 06 May 2021 09:22 AM PDT I am new to Assembly Inline in C. I have to solve the following problem with the inline assembler of Visual Studio:
I tried to solve this problem but I can't find a solution. Can anyone help me? [link] [comments] |
Posted: 06 May 2021 09:06 AM PDT For example if I wanted to include use of the PRAW library. [link] [comments] |
SQLSever & Python , Need Help exporting csv's Posted: 06 May 2021 12:38 AM PDT Hey guys hope yall are safe and doing well , So the thing i need help with is that i have a database and it contains a lot of tables , what i am trying to do is export each one of them onto a separate csv file in my local directory using SQLAlchemy The table format goes something like 'Databasename.dbo.Tablename' what i am doing rn :- con = engine.connect(credentials) #getting all the table names in a list rows = con.execute('select table_name from information_schema.tables') tables = [print(row) for row in rows] for t in tables: dataframe = pd.read_sql('select * from Databasename.dbo.'+t'where cast(modify_timestamp as date) = (select max(cast (modify_timestamp as date)), con = con) dataframe.to_csv(t '.+csv') but this isn't working, any and all help would be highly appreciated. Have a safe one <3 [link] [comments] |
Explain like I'm 5, what is a web service, SOA and ROA ? Posted: 06 May 2021 07:44 AM PDT |
[HELP] Script not working when called by cron Posted: 06 May 2021 07:05 AM PDT Hi, I have a script which works perfectly fine when running manually: and want to call it every 15mins wirh cron. I set up many other scripts like that with cron but this one doesn't work: Do you have an idea why? edit: rsyslog output: [link] [comments] |
Posted: 06 May 2021 03:29 PM PDT I need to get some strings like B001,B002……how to write the code?plz help [link] [comments] |
What program/language should I learn to make games? Posted: 06 May 2021 06:15 AM PDT I want to make a crafting/survival/farming game akin to Minecraft or Stardew Valley. I have some experience with Python but don't know where to start on something like this. [link] [comments] |
My friend claims this Python script as a bot which can fill Google Forms Posted: 06 May 2021 01:22 AM PDT Title So basically my friend calls this a 'bot' that can fill his google form and as a 'proof' he told me that among the class his form is filled first. So the question is, is this above piece of code coded in phyton really a bot? Pls take a quick glance [link] [comments] |
Expanding storage Ubuntu VM truenas Posted: 06 May 2021 12:28 AM PDT hi all, have a vm in truenas running ubuntu server with the docker containers. [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