#programming help
Explore tagged Tumblr posts
Text
would it be possible to like... ask for programming advice? there's some really smart ppl around and to be honest I've confused myself a bit too much perhaps haha. explaining more below the cut because it's a bit of a lengthy explanation.
essentially I'm trying to parse an ID string into the way I'm formatting my json files. the format looks like this:
{
"name" : (name, string),
"id" : (id, string, they look like "e[a]" or "d[e[a]]^o.d.o" or something like that, there's a lot of variety),
"op_count" : (int, the number of individual runes combined to create this one. Each rune could be made up of smaller runes, so if I know which runes are in it I can reduce the op_count by combining those rather than each one individually),
"operations" : {
"base": {
"path" : (filepath to that rune's json, optional)
(if "path" isn't here, then either it already has the json, or else it's empty, as is the case for a combination like "('[n.k.n.k]', o)" which begins with a group rather than a single rune)
},
"op": (either one or sometimes two characters specifying which operation is performed),
"mod" : {
(Follows the same structure as "base")
}
}
there's a couple more quirks to this. If there's multiple operations, then each operation and mod will be "op#" and "mod#" with # being which operation it is. Grouping symbols like "[", "(", "'[", or "'(" follow a slightly different format for applying an operation, they instead become part of the mod, without really advancing the count of the mod# unless it's something like a group within a group. Here's an example of a completed one, I've done a number of these by hand which is why I have it:
{ "name": "Laughing", "id": "('[n.k.n.k]', o)", "op_count": 3, "operations": { "base": {}, "op1": "", "mod": { "type":"()", "mod1":{ "type":"'[]'", "mod1":{"path":"res://scripts/json/yes.json"}, "op2":".", "mod2":{ "path":"res://scripts/json/yes.json"} }, "op3":",", "mod3":{ "path":"res://scripts/json/action.json"} } } }
Because I've done a number of these by hand already, I'd rather not change the format, but if it's absolutely necessary then I'll push on through.
I've gotten it so that I have a list of each composite rune ID as well as a list of how many operations have been performed by the time that ID appears in the list, and a second list of each operation (opening and closing a group are considered separate operations until they're in the json, so that I can figure out where a group ends) and how many rune IDs have been seen by the time that operation is performed.
This sort of allows me to cross reference the list to get an idea of what happens where, but I've driven my brain right out of my head trying to figure out how to use these to get a string like "a.(b,c)" to turn into something like:
{
"name" : (name),
"id" : "a.(b,c)",
"op_count": 2,
"operations":{
"base": { (data for "a") },
"op1": ".",
"mod": {
"type" : "()",
"mod1": { (data for "b") },
"op2" : ",",
"mod2": { (data for "c") }
} } }
I don't know if I've made any sense at all, I'm not a bad programmer I promise I've just spun myself in circles over this 😅
no need to worry about where I get the data for "a," "b," and "c," that part's taken care of. Just need to parse the id string into the json format if I can.
#programming#wizardposting#game dev#programming help#tumblr is not stack overflow#and I'm hoping that means people will be nicer than if I ask there#I get the feeling that this is a dumb problem I've created for myself#so I ask for help
12 notes
·
View notes
Text
Guys how do i do this with divs and images cause i need to have an image next two two stacked divs but for some reason the image which has float left has like a margin or smth idk but like it isnt right next to the divs its kinda offset a bit and idk how to do this :-(
5 notes
·
View notes
Text
okay, tumblr-backup is working GREAT for me EXCEPT now it wont make an archive of my blog. like, i keep running it, and it makes the .first-run-options file, but no "posts" or "media" folders show up, and no posts get downloaded. i finished archiving my original posts, but i really need to run it again grabbing my writing with the notes archived, because a lot of writing is saved in the replies. it just keeps skipping over posts as if it's seen then before and doesn't need to archive them but im trying to tell it to archive them again anyway! i've gone to new folders, saved it on and off my external hard drive, i've zipped and deleted my old archive, i've deleted and freshly installed tumblr-backup, i don't know what else to do. please can anyone tell me why this is happening? i dont know if i can copy all these notes by hand
#help#tech#coding#coding help#programming help#archive#archival help#tumblr-backup#tumblr backup#back up tumblr blog
2 notes
·
View notes
Text
Could I get some help from coderblr?
I was relegated the legacy code of a game, which has a lot of problems. The owner burnt out from the technical debt, and I have no idea how to tackle it properly since I was given the code (2 years ago, maybe more)
The code is all in 1 file. From memory, there are at least 30k LOC. The methods are not documented, and several arguments can be of two classes which are not under the same polymorphism, and really shouldn't be (a character and a location).
I don't know what I should do first: split the classes into files but keep shared methods, split classes and shared methods, documents all the file, migrate to better libraries, bugfix everything I can, maybe a secret option?
Thanks for reading!
12 notes
·
View notes
Text
hey would any python programmers be willing to help me with my code? i’m having a small issue with an if statement and stack overflow won’t let me post a question
12 notes
·
View notes
Text
Need help figuring out this error... Noticed it only occurs once the delays are added. If I only use line 18-21, it functions fine.
6 notes
·
View notes
Text
anyone have tips on learning the basics of linear algebra in approximately seven days. trying to take a datamining class and i might have dived directly into the ocean.
#math#linear algebra#programming help#data mining#data science#please help im just a little library sciene student PLEASE#at least the class seems to be R-based... i know r
2 notes
·
View notes
Text
can someone who's better at coding please tell me what this bug is
(chessgamesarr is a dtype=str numpy array)
why is it cutting the last two characters off why is it doing that i thought it might be a character limit thing but that only is 58->56 long that would be a weird number to cut off at
3 notes
·
View notes
Text
I'm supposed to use Assembly to make a game for one of my college courses, anyone have any tips or advice?
15K notes
·
View notes
Note
🙋♀️🙋♀️🙋♀️how to make run-time? my time works perfectly fine for two hours, minute resetting to zero and hours increasing properly, but then the minutes start counting past 60 after two hours, even reach 100, and the hour does not increase
If you need help debugging, we'll need to see what code you're working with!
Feel free to send it in text form or as a screenshot here, or you can join our Discord server to get more immediate help.
1 note
·
View note
Text
Writing Data to text file gives error,unknown parameter
hi All
I am trying to write some parameter to a py file as follows
Let’s say I have the m-file 1 that contains the parameters like p=2,,,, q=3*p ,,,,,, and tf=1
m-file 2 is a function like : mvar(m) , I always assign m=1,
file 1 runs m-file 2 that contains these lines:
fid = fopen(‘myparams.py’, ‘w’);
fprintf(fid,’p1 = %d\n’,p1);
fprintf(fid,’q = %0.12f\n’,q); fprintf(fid,’tf= %0.12f\n’,tf);
to write them on the third file myparams , it writes the first 2 but for the last one, tf , it gives error , while it is introduced in the same way also I dont know the difference of %d\n with %12f\n
the error is
Function is not defined for ‘tf’ inputs
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
%d is used when you want to write an integer (1,2,3,…)
%f and all derivative (%12f,…) are used to write float numbers (specify the precision, add spaces,..)
see the help of fprintf.
and I just try the code bellow, it works.p = 2; q = 3*p; tf = 1 ;fid = fopen('myparams.py', 'wt'); fprintf(fid,'p1 = %d\n',p); fprintf(fid,'q = %d\n',q);
SEE COMPLETE ANSWER CLICK THE LINK
#matlab#education#promo code#matlab assignment help#assignment#programming#coding#matlabsolutions#assignment help#programming help
0 notes
Text
Top 10 Advantages Of Python Programming
Python is one of the most popular programming languages today due to its wide range of applications and user-friendly syntax. It enables programmers to write clear, logical code in fewer lines than other languages. With simple, easy-to-read code, Python is beginner-friendly yet powerful enough for complex programming tasks. Its versatility, large developer community, and extensive libraries make Python a top choice for web development, scientific computing, AI, machine learning, data analysis, and more. If you're considering learning Python or are curious about its popularity, here are the top 10 advantages that make it stand out:
1. Easy to Learn and Read
Python has a very simple, clean syntax that is easy to learn for beginners. Its code reads almost like English, using indentations instead of brackets for blocks. This makes Python highly readable and maintains a consistent styling across programmers.
2. Vast Libraries and Frameworks
Python has a huge variety of high-quality libraries and frameworks for tasks like data analysis, machine learning, web development, and more. Popular ones include NumPy, Pandas, Matplotlib, Django, Flask, Selenium, Beautiful Soup, PyTorch, and TensorFlow. This makes Python very powerful and flexible.
3. Cross-Platform Compatibility
Python code can run on many operating systems like Windows, macOS, and Linux. This cross-platform compatibility allows programmers to write code on one OS and run it on another without rewriting it. Python provides easy portability across platforms.
4. Supports Multiple Programming Paradigms
Python supports OOP, procedural, and functional programming styles. It enables structuring code in ways that are best suited for a project or problem. Programmers can implement various paradigms separately or even mix and match them when needed.
5. Vast Open Source Community
Python has a very active, large community contributing to its growth. It has many online forums, blogs, and tutorials to find solutions and help quickly. The open-source culture enables collaboration and continuous improvements to Python and its packages.
6. Extensive Collection of Libraries
Python has a rich collection of high-quality libraries for a wide range of functions like data processing, visualization, web development, machine learning, numerical analysis, automation, and much more.
7. Web Development
Python is great for web development with full-stack frameworks like Django and Flask. It can be utilized to build server-side web applications efficiently and even connect it to databases like MySQL seamlessly.
8. Scientific Computing and Data Analysis
Python has powerful libraries like NumPy, SciPy, Pandas, and Matplotlib for scientific and mathematical computing. It is the preferred language in the fields of data science, machine learning, and AI.
9. Rapid Prototyping
Python enables building prototypes and minimum viable products quickly due to its simple syntax, readability, and vast libraries suited for most tasks. This makes Python useful for testing ideas and concepts before investing in full-scale development.
10. High Salary Prospects
As one of the most in-demand programming languages, Python skills lead to lucrative career opportunities in software engineering and data science roles.
Conclusion
In summary, Python provides an optimal combination of simplicity, readability, versatility, extensive libraries, cross-platform capabilities, and strong community support. It is easy for beginners to learn yet robust for advanced applications like machine learning and web development. Python's design philosophy emphasizes code readability, rapid prototyping, and modularity. The wide range of uses across domains, active open-source ecosystem, and rising industry demand make Python skills valuable in today's job market.
By enabling faster and cleaner programming, Python boosts productivity for individuals and teams. With advantages like these, it is no surprise that Python has quickly risen to become one of the most popular and widely used programming languages across the world. Whether for simple scripting or complex programs, Python proves itself to be an efficient, powerful, and flexible option. Its strengths make it worth learning if you want to level up your programming skills in a language that provides long-term value.
0 notes
Text
I think unity hates me
I'm trying to make like. a good nice slope that my character can walk on right
but everything is so fucking jagged
like I use the smooth height tool. it barely works
it makes like these weird little jaggedy hill things that make it impossible to walk anywhere and I kind of want to cry
PLEASE. HELP
#ripley doesn't say stuff#game dev#unity#programming help#i guess#there isn't a unity help tag so#but yeah.#help
0 notes
Text
I think I have finally understood how to use C++ in Unreal after all these years?? and tbh I kinda hate it lmao. this is most likely, very much just my brain being my brain in a low-stimulation environment from having this knowledge, because the way it works is not just "hey let's learn something new" it's "memorize this pattern and apply it 10x". Honestly, I'd really, really love to be proven wrong on that one, but all of a sudden, the general advice to program in BP and then convert it to c++ makes sense now
0 notes
Text
humanformers au where these two get to bond because they’re both tech savvy programmer nerds or somethibg
more of this au!
#had this lying around for a week or so here it is!#soundwave’s gamer posture is vital to his character design#ratchet helps raf with his programming homework but when he’s busy raf goes and finds soundwave instead#walks out of the most comically shady evil looking alley a few hours later like ‘bye soundwave! see yo next time! :D’#people aren’t even sure if this soundwave guy exists or if he’s some urban myth raf made up#like 3 people max have seen him in the daylight#nobody has ever heard him speak they’re not even sure there’s a human guy under there#turns out he very much exists. he plays minecraft with raf#transformers#maccadam#soundwave#tfp soundwave#tfp bumblebee#tfp#transformers prime#tfp raf#zorangetf#artists on tumblr#raf is seemingly oblivious to his Cryptid aura and jusy goes like#[gestures to the gangling dark figure looming in the far corner] ‘that’s my pal soundwave :D’#bee is stressed out 24/7 HAHA
2K notes
·
View notes