r/programmingrequests • • Aug 18 '21

need help A script for changing my PC's time and date by 24 hours at a time

3 Upvotes

Hey

I want a script that every time I start it, it will change the pc's time and date 24 hours ahead of what it is in the moment.

Is it possible?

thanks


r/programmingrequests • • Aug 04 '21

solved✔️ Not sure if this is the right place - Need a simple help to test combiantions

3 Upvotes

Hello,

I'm not sure if there's a better palce to post this request but I don't see any rules against this.

So I'm creating a mod for Crusader Kings 3 where player characters can have different combinations of personality traits.

I want to create a mod that allows the user to select from a set of "House Traditions" for their dynasty based on their personality. I want to validate that no personality combination exists such that the mod would hang due to lack of a valid option.

The rules are as follows:

- Each player character will have exactly 3 personality traits (very rarely 4 due to events or what not).

The complete list of personality traits are here

A House Tradition is valid if the character has at least ONE from the "Does Have" columns and does not have ANY from the "Does Not Have" columns

Note that Most traditions deliberately have fewer number of banned personality traits.

Note that Opposite traits cannot coexist as a game rule (separate from my banned list per tradition)

TraditionDoes HaveDoes HaveDoes HaveDoes NOT HaveDoes NOT HaveDoes NOT Have
ValorBraveStubbornImpatientCravenXX
HonorHonestJustStubbornDeceitfulArbitraryFickle
DutyDiligentHumbleImpatientLazyArrogantAmbitious
JusticeJustVengefulZealousArbitraryForgivingX
VengeanceVengefulJustSadisticForgivingCompassionateX
PrideArrogantAmbitiousWrathfulHumbleContentX
AuthorityCallousArrogantVengefulHumbleCompassionateX
PowerAmbitiousWrathfulImpatientLazyContentX
InfluencePatientCalmDeceitfulTrustingContentX
GuileDeceitfulFickleArbitraryTrustingHonestX
PerseveranceCravenParanoidDeceitfulBraveTrustingX
VigilanceDiligentPatientParanoidImpatientTrustingX
PeaceForgivingHonestTrustingWrathfulVengefulX
FortuneGreedyDiligentGregariousShyContentX
KnowledgePatientCynicalShyLazyParanoidX
TruthCynicalHonestJustArbitraryFickleX
WisdomTemperateCalmPatientWrathfulImpatientX
DevotionContentDiligentZealousCynicalFickleX
FamilyCompassionateForgivingChasteLustfulSadisticX
CompassionCompassionateForgivingGenerousCallousSadisticX
JoyLustfulGluttonousGenerousChasteTemperateX

The Request

- While the "easy" way might be to figure out CK3's *undocumented* variable tools for modding and create a "catch-all" tradition to default to, a "catch-all" tradition makes no sense flavor-wise. I'd like to ask someone to create a simple script to help me validate that no character personality combination would result in no qualified tradition thus causing the game to hang.

This would be extraordinarily difficult to test organically because any NPC amongst hundreds could be eligible to use this mod ability. over the course of 700 in-game years so its better to identify any potential logical misses before hand.

The rules of the script:

- Populate 3 personality traits (and separately test for 4 personality traits) from the complete list of personality traits here

- Note that opposite traits cannot coexist as per the game's rule.

- Go through each combination one by one against the table above to make sure at least one valid tradition exists (the script can move on to the next combination as soon as any valid tradition is found)

- The table matching rule is to match at least ONE from the "Does Have" columns but does not match ANY from the "Does NOT have" columns.

Thanks!


r/programmingrequests • • Jul 28 '21

fake malware with executables (NO VBS ADDITIONALS)

3 Upvotes

I want a fake malware that displays error messages in such. Basic breakdown:

the first message when ran: https://imgur.com/YO3zrv7

then once you click yes: https://imgur.com/a/U984uu2

then finally it looks something like this: htmlSite and has a timer at the bottom and if you don't enter the code in the input box and press the submit button by the time the timer goes off, it closes.

NOTE: NO VBSCRIPT extentsions for support. IDK why, but for smr my windows based script host closes everytime you open it.


r/programmingrequests • • Jul 26 '21

need help Fnf mod programmer? We are working on a mod and help would be appreciated!

Thumbnail
gallery
3 Upvotes

r/programmingrequests • • Jul 10 '21

solved✔️ Help me understand this production code JS snippet

3 Upvotes

Hello! Apologies if you're trying to read this, but I've moved to kbin.social in protest of Reddit's policies.


r/programmingrequests • • Jul 06 '21

Code to strip UK postal address information from email body

3 Upvotes

Hi,

I have a thousand or so emails with postal addresses somewhere in the body. The email bodies will be held in an excel column, 1 cell per row but they could be separate text files if that is easier. I need to be able to do 2 things: First is to confirm that there is an address in the body. Second, strip the address out of the body.

The first I could do using regex to search for the post code, but I have no idea how to accomplish the second part, Google has suggested some form of nlu as the address will be in an odd format, but that will be beyond my expertise.


r/programmingrequests • • Jul 06 '21

Need a script for a poker table that immediately clicks the “sit out” button when someone joins my table.

3 Upvotes

Please DM for more details


r/programmingrequests • • Jun 30 '21

[Request] Looking for elisp programmer

3 Upvotes

I have some very speficic ideas I'd like to have implemented into emacs. My elisp knowledge is limited though. Is there anyone proficient in elisp who is willing to help me? Of course, the work will be rewarded.


r/programmingrequests • • Jun 28 '21

need help Live tracker for mouse recording

3 Upvotes

Hi, I like to make little videos in my spare time and really like looking at how I play games so that I can get better, I am looking to make a program that shows my previous mouse movements like one of those heat sensitive pads that kids use to draw, the idea being that the newest movement is a green dot and it slowly fades to orange until disappearing 2-3 seconds later. this way I can track movements while recording and a blue background would be great so that I can chroma key it onto my screen.

any language can be used as long as the program can be used functionally while being used in games like COD or Minecraft. price is open to offers (lets agree on something before anyone starts anything so that we are both happy :D)

thank you for your time


r/programmingrequests • • Jun 22 '21

Simplest way to make quick adding program with buttons

3 Upvotes

Hello, looking for the simplest way to program something like this:

https://i.imgur.com/NgzkmCB.png

The main 3 buttons add/substract from the total

Total clicks counts all clicks of any of the buttons

Reset brings everything back to 0

What's the best way to go about this? Ideally something i can just run in the browser without needing to download a bunch of stuff.

Thanks in advance for any help


r/programmingrequests • • Mar 10 '21

solved✔️ A program, perhaps a Chrome extension that could take a list of words and download all the audio files available for them on Forvo.com

3 Upvotes

I have a giant CSV list with tons of Hungarian words. I want to get all the audio files for all the words at once from this website. https://forvo.com/

Could someone help me with this?


r/programmingrequests • • Mar 06 '21

need help Action lock-in for RPG combat... is this possible?

3 Upvotes

I am totally inexperienced in programming and was wondering if this was possible. I wanted to play a simple rpg online with friends. The idea is that players are given 30 seconds to secretly type in and submit their action each round. Then after 30 seconds, everyone’s actions are revealed. It would be up to the GM to resolve stuff after that. In other words:

Players on different devices can play simultaneously in the same session

Button to start the round, then -Display and start 30-second timer -One-line box to input text -Button to save text input

Once 30-second timer expires -Recall and display text inputs from all players -Button to start a new round and loop back to timer

I hope that makes sense. Sorry for my lack of understanding. I appreciate any suggestions/advice.


r/programmingrequests • • Feb 14 '21

need help Help building an automated stock screener

3 Upvotes

I am not certain of the language that would be most appropriate, either Python or JavaScript (Google Apps Script). Maybe SQL?

Hello! I have been investing for a while now, and I am looking to streamline my screening process of finding stock tickers. If at all possible I would love to automate the process entirely.

Currently, I have a bunch of preset filters on websites like finviz or barchart and run them periodically. The screener will spit out a list of stocks, that I can then download as an excel spreadsheet. I copy the data from the downloaded excel spreadsheet, and paste the data into a "Input" tab on a Google Sheet.

From there the Google Sheet then pulls other information, using "IMPORTHTML" functions, from websites like marketwatch, yahoo finance, or finviz based on the ticker symbol in the first column.

The spreadsheet then takes these data values that have been scraped, and it completes a few calculations. Any tickers that meet a certain set criteria have an "X" placed in the final column by using an IF function. Any ticker with an "X" is then transcribed onto a final tab that can be sorted by any one of the column headers.

I then take this much shortened list of tickers and do a bit more research on my own, before then investing. It would be much more advantageous to be able to compile more information per ticker, and to have that information over time. Finally, having updates occur when important (like an announced earnings date) would be massive. I just really don't think continuing to build out of Google Sheets is the best idea, or the most powerful route to complete this challenge.

As you can imagine, there are a myriad of issues with this current system

  • The high quantity of IMPORTHTML functions takes quite a long time to fulfill, the more data the longer it takes.

  • The high quantity of IMPORTHTML functions limits the amount of tickers I can input, limits the amount of data I can scrape per ticker, and is error prone.

  • The copying and pasting, and the prior mentioned issues, really limits the amount of screeners that I can conduct and the amount of data I can do at once. Also time consuming and sort of annoying.

  • This system returns tickers that meet the criteria, but it does not help with progression tracking in that removing old data to input new data prevents the ability to see the change over time. It would be much more powerful to have something that ran automatically at a set time, or on a set day, and compiled the data over time as well.

I am not looking to go full on /r/algotrading and write an algorithm that will do all of the investing for me, or at least not yet. But I am hoping to help build something that can gather all of this data on a regular basis and send some sort of update, like the final results listed in a spreadsheet that is emailed every morning. Ideally, the system would run daily and return stock tickers that meet the necessary criteria. Maybe this can be accomplished with Google Apps Script, I am just not sure at all. I have the links to the stock screeners with the preset filters, and all of the other materials. I am just still learning how to code, and this project may just be above my skill level.


r/programmingrequests • • Jan 17 '21

Block Break counter minecraft mod for 1.8.9

3 Upvotes

I don't have any extensive knowledge of java but I know my idea would be realitivly easy to create for a person who has created minecraft mods before.

If you could add 1 to a counter every time a block was broken, either on the lore of the item or, preferably, a number on the screen.

Having commands to be able to reset, turn on/off and move the number location would be very useful as well.

This would really help me out a lot as I couldn't find anything that was .jar on the internet. Only spiggot or bukkit mods for private servers. I have also tried converting the .sk to .jar but that did not work

Thanks


r/programmingrequests • • Jan 13 '21

[REQUEST] Jensen Box

3 Upvotes

The Jensen Box is similar to an IQ test.

Despite being quite simple I could not find an online version of it.


r/programmingrequests • • Dec 27 '20

Betting App

3 Upvotes

I'm a beginner in python programming and my goal is to build a betting app. But I'm lost at sea on what I would really need to do. To be able to build it. I really need help on designing the flow chart for my project


r/programmingrequests • • Dec 08 '20

don't PM Request: The Evolution of Trust game built for Income Inequality

3 Upvotes

I wanted to know if someone is interested in taking on a rather bigger project to create a version of the well-known educational game The Evolution of Trust except for income inequality.

Build an income inequality model like The Evolution of Trust that gives you a walkthrough of what the income inequality game is like from multiple variables and all perspectives, potential solutions, and of course the visualization of the steady-state "life" that all environments appear to reach regardless of the starting variables (I might be incorrect on that postulate).

This is a huge project and I just hope someone catches wind of this to make it one day.


r/programmingrequests • • Dec 06 '20

Matlab code to java

Thumbnail
gallery
3 Upvotes

r/programmingrequests • • Dec 02 '20

need help Please can someone help me get this R code to display the output properly?

3 Upvotes

This is for a really important project but I cant get it to run, can anyone test this on RStudio and help me understand why its not working?

I am following a tutorial here which seems to be able to run it fine. But when I do it it says there is an error on line 49: the rows in the transition matrix should equal to one.

I have tried two things to make the rows equal one:

  1. delete the last row and the last column of the transition matrix

  2. manually force the output to equal one.

Whilst both allow the code to run, the output looks nothing like the one in the tutorial! I am struggling to understand the code but I feel if I can at least get it to run and understand why its not working, I'm in a good place to learn.

The code makes and plots a Markov model, I'm familiar with how a Markov model works I just Don't understand why its not plotting! Please try and run it as I have dealt with the odd rude person who has suggested advice without running it themselves and it simply doesn't work. Any help would be really really appreciated!

library(dplyr)

library(reshape2)

library(ggplot2)

library(ggthemes)

library(ggrepel)

library(RColorBrewer)

library(ChannelAttribution)

library(markovchain)

##### simple example #####

# creating a data sample

df1 <- data.frame(path = c('c1 > c2 > c3', 'c1', 'c2 > c3'), conv = c(1, 0, 0), conv_null = c(0, 1, 1))

# calculating the model

mod1 <- markov_model(df1,var_path = 'path', var_conv = 'conv', var_null = 'conv_null', out_more = TRUE)

# extracting the results of attribution

df_res1 <- mod1$result

# extracting a transition matrix

df_trans1 <- mod1$transition_matrix

df_trans1 <- dcast(df_trans1, channel_from ~ channel_to, value.var = 'transition_probability')

### plotting the Markov graph ###

df_trans <- mod1$transition_matrix

# adding dummies in order to plot the graph

df_dummy <- data.frame(channel_from = c('(start)', '(conversion)', '(null)'),

channel_to = c('(start)', '(conversion)', '(null)'),

transition_probability = c(0, 1, 1))

df_trans <- rbind(df_trans, df_dummy)

# ordering channels

df_trans$channel_from <- factor(df_trans$channel_from,

levels = c('(start)', '(conversion)', '(null)', 'c1', 'c2', 'c3'))

df_trans$channel_to <- factor(df_trans$channel_to,

levels = c('(start)', '(conversion)', '(null)', 'c1', 'c2', 'c3'))

df_trans <- dcast(df_trans, channel_from ~ channel_to, value.var = 'transition_probability')

# creating the markovchain object

trans_matrix <- matrix(data = as.matrix(df_trans[, -1]),

nrow = nrow(df_trans[, -1]), ncol = ncol(df_trans[, -1]),

dimnames = list(c(as.character(df_trans[, 1])), c(colnames(df_trans[, -1]))))

trans_matrix[is.na(trans_matrix)] <- 0

trans_matrix1 <- new("markovchain", transitionMatrix = trans_matrix)

# plotting the graph

plot(trans_matrix1, edge.arrow.size = 0.35)


r/programmingrequests • • Nov 25 '20

solved✔️ Program that will display all possible polyomino variations within certain limitations (for a board game)

3 Upvotes

Hello! I'm not sure if this is the right sub for this, but here goes.

I'm working on the expansion for a board game that I Kickstarted this summer (link here if you're interested). Basically it's a filmmaking themed game that uses dice with custom faces as crew, and you set up your scenes for shooting by arranging the dice in the setup indicated on the scene card, which looks like a polyomino. Example:

I'd like each scene card to have a unique setup diagram so that there's always a challenge in figuring out how to get the dice in that particular arrangement. This was fine for the initial game, which only has 25 scene cards and I could just do it by hand, but for the expansion I'm planning to include up to 100 additional scenes. So I basically want to have an image that shows all possible shapes that the polyomino could take on a card, so that as I'm designing the expansion cards I can start crossing off the ones I've used and always have new ones to work with.

Note that it's NOT important for me to have every combination of every die face; just the different possible shapes that the dice can make as a group. For this purpose they might as well all be blank squares. I can assign the faces later.

The rules for the setup diagrams are:

  • Must fit onto a 3x4 grid (that's the space that the scene card allows, graphically, for the diagram, as you can see above)

  • Only combinations of 4 and 5 dice (or polyomino squares)

  • ALL combinations of 4 and 5 dice - linked together orthogonally, diagonally, spaced apart, 2 spaced and 3 diagonal, etc etc etc - as long as they fit on the grid space

  • Mirrored shapes would be considered unique from each other, but not rotated shapes (the rules of the game state that you CAN arrange dice in a pattern that is rotated (ie, 90 or 180 degrees) from what's displayed on the card, but you CANNOT set it up flipped / mirror image)

I'm hoping for a simple diagram that shows all the possible combinations.

Initially I thought I could do this by hand, and I've already created 7 pages of a document, each page looking like a variation of this:

But my brain is starting to hurt and I'm realizing there are WAY more than I first anticipated. I think it would take me a long time to go through every possible combination by myself.

Then I thought, surely there's a fairly simple program that can help me do this?!

Any help much appreciated! I'm happy to award a free copy of the board game to the first person who can create what I'm looking for :)

Thanks in advance!


r/programmingrequests • • Nov 05 '20

homework Matching Dating Sim

3 Upvotes

Hiya there, long time anon lurker first time poster
ive been racking my brain trying to figure out this assignment/project I have to do

any insights or well in depth help would be nice

Matching Project in C++

Your company has decided to diversify into matchmaking. As a first step, it is offering a service to pair people for a first date and asked you to write the software for the pairing. Initial requirements are relatively simple:

* Pairing will be between males and females only for now.

* Each profile will specify the user's **id** along with attributes **country**, **diet**, **drinking**, **gender**, **language**, **religion**, and **smoking**.

* The company expects each user to prefer to be paired with users sharing the attributes. E.g., a user from USA will want to be paired with another also from USA.

* The importance a user gives to a match on an attribute is indicated in an accompanied weight value. E.g., for country, you may get a tuple (USA, 0.340077), which specifies that the user is from USA and that the match is worth 0.340077 to him/her.

* The company calculates a compatibility score for each pair by combining the user weights for each matching attribute. E,g, if user A matches with B on country and they assign weights 0.3 and 0.4 respectively for it, they will contribute a value of 0.7 to the score (0 if they don't match).

Your job is to pair each male with a female for their first date so the pairs represent the most compatible matching across all the users. The logic is to be placed in **Match::pairs()** in **match/match.cpp**, and you need to write unit tests for it in **test/match_test.cpp**.

The *data* package provides a **profiles()** function that you can use to get a list of randomly generated profiles - you are guaranteed to get half males and half females. For this project, pair 100 users (50 males with 50 females). Use this data to create a report pairing each male's **id** (first column) with the matching female's **id**, along with the compatibility score. Sort these in the alphabetical order of the male **id**.

--------------------------------------------------------------

Hints

Only edit the files match/match.cpp (the logic that implements the match), test/match_test.cpp (the unit tests), and report.cpp (the integration test that tests the whole thing with 100 users and prints a report as explained in README)

You can run the unit tests with bazel test test/match_test - note that this will pass right away because there is nothing being tested, you will need to add your own tests that check all the requirements stated in the README or you will NOT get credit

Run the integration test with bazel run report - I put in some placeholder code to give you an idea of how to print tabulated data as asked in the README

--------------------------------------------------------------

data.h

#ifndef DATA_DATA_H_

#define DATA_DATA_H_

#include <cstdint>

#include <vector>

#include <tuple>

enum Country {

CANADA, MEXICO, USA

};

enum Diet {

NONVEGETARIAN, EGGETARIAN, VEGAN, VEGETARIAN

};

enum Gender {

FEMALE, MALE

};

enum Language {

ENGLISH, FRENCH, SPANISH

};

enum Religion {

BUDDHIST, CHRISTIAN, JEWISH

};

struct Profile {

uint32_t id;

Gender gender;

std::tuple<Country, double> country;

std::tuple<Diet, double> diet;

std::tuple<bool, double> drinking;

std::tuple<Language, double> language;

std::tuple<Religion, double> religion;

std::tuple<bool, double> smoking;

};

std::vector<Profile> profiles(uint16_t count);

#endif

-------------------------------

Match.h

#ifndef MATCH_MATCH_H_

#define MATCH_MATCH_H_

#include <cstdint>

#include <map>

#include <vector>

#include "data/data.h"

class Match {

public:

static std::map<uint32_t, uint32_t> pairs(std::vector<Profile> &);

};

#endif

-------------------------------

data.cpp

#include <cstdint>

#include <cstdlib>

#include "data/data.h"

#define WEIGHT (static_cast<double>(std::rand()) / RAND_MAX)

std::vector<Profile> profiles(uint16_t count) {

std::vector<Profile> profiles;

Gender gender = FEMALE;

for (uint16_t i = 0; i < count; ++i) {

profiles.push_back({

std::rand() % 900000U + 100000,

gender = gender == MALE ? FEMALE : MALE,

{static_cast<Country>(std::rand() % 3), WEIGHT},

{static_cast<Diet>(std::rand() % 4), WEIGHT},

{std::rand() % 2 > 0, WEIGHT},

{static_cast<Language>(std::rand() % 3), WEIGHT},

{static_cast<Religion>(std::rand() % 3), WEIGHT},

{std::rand() % 2 > 0, WEIGHT}

});

}

return profiles;

}

-------------------------------

report.cpp

#include <algorithm>

#include <vector>

#include <cstdio>

#include "data/data.h"

#include "match/match.h"

int main() {

std::vector<Profile> up = profiles(10);

for (auto p : up) {

printf("%d, %d: %f, %d: %f, %d: %f, %d: %f, %d: %f, %d: %f\n",

p.id,

std::get<0>(p.country), std::get<1>(p.country),

std::get<0>(p.diet), std::get<1>(p.diet),

std::get<0>(p.drinking), std::get<1>(p.drinking),

p.gender, 0.0,

std::get<0>(p.language), std::get<1>(p.language),

std::get<0>(p.religion), std::get<1>(p.religion),

std::get<0>(p.smoking), std::get<1>(p.smoking));

}

}

--------------------------------

Match.cpp

blank -Enter logic here
test/match_test.cpp
blank - Enter logic here


r/programmingrequests • • Oct 23 '20

Need help with an R project

3 Upvotes

It's pretty easy to do I think so it should not take more than hour but I am quite terrible at R.


r/programmingrequests • • Sep 17 '20

need help Can someone please compile this program (ptexutils) for me?

3 Upvotes

I'm trying to rip sprites from a game that uses ptex files, and this https://github.com/wdas/ptexutils is the only program I can find that opens them. I don't know anything at all about compiling or programming-related things, and from what I've been told using cmake is somewhat complex, so if you know how to compile things with cmake and can make these binaries for me I'd be very grateful.


r/programmingrequests • • Sep 04 '20

A program that will post a comment in webtoons automatically at a specified time when I'm away from my computer.

3 Upvotes

My friend's making a webcomic, and I wanna be the first one to like and reply so that I can support her, but she's planning on posting it when I'm gonna be out of town and away from internet access for a good couple of weeks. Could someone possibly make a program so that I can tell it what to say and when to say it, and it'll post it on that specified date and time?