Questions tagged [modular]

347 questions
1
vote
1 answer

Using ServiceLoader to get All Instances of an Annotation

All! I know that long questions are frowned upon, but this is the only way I will be able to get my problem adequately explained. So, I apologize up front for the length of this question. I am working on a modular project that will be extensible via…
1
vote
0 answers

Modular programming to accommodate future changes (software for scraping websites)

I had developed a software in C# using Windows Forms to scrape selected websites for images. First problem I have is that the websites I monitor constantly change their look and feel, thus making my code in need for updating. I had switched to…
Monk
  • 69
  • 1
  • 7
1
vote
0 answers

C Segmentation Fault with Modular Programming

I need to create a program which takes songs and outputs them as a playlist. It's my first time working with malloc and linked lists and I am getting a segmentation fault and I don't know where it is from. I don't think I have overallocated any…
1
vote
2 answers

Passing an array of strings into a function for fscanf

When I run this code I get a segmentation error I don't know why this happens, I'm trying to read a name and cash amount from each line of a text file, and put it into an array. #include #include #include void…
1
vote
0 answers

JAvaFX modular from ID(intellij) worksnonmodular: Error: JavaFX runtime components are missing, and are required to run this application

Can anyone explain to me where the mistake is? For several days I have been trying to clarify this issue: package sample; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import…
Ion Cretu
  • 11
  • 1
1
vote
2 answers

How can I force Gradle to use --module-path instead of -cp?

I have a relatively straightforward modular project, and I've already set all of the options that I've found in the documentation as well as in different answers or articles such as How to force gradle to add dependencies to the module path instead…
1
vote
0 answers

How to select the last column of numbers in this snake game?

I am creating a snake game and need to target the last column of numbers so i can make logic to make the snake 'teleport' to the opposite side when it enters it. I can do that however im finding it tricky to target the last column of numbers. I need…
Kas
  • 111
  • 3
  • 10
1
vote
0 answers

Calling Sinatra's DSL methods from Sinatra extensions

I have a modular Sinatra app and am looking for the most straightforward way to call Sinatra API-level methods (such as get()) from inside other modules. I figured Sinatra extensions would be it, but something's not working. This is the main file…
fullstackplus
  • 1,061
  • 3
  • 17
  • 31
1
vote
2 answers

Calculating a^b^c mod 10^9+7

Problem Link - https://cses.fi/problemset/task/1712 input - 1 7 8 10 Expected Output - 928742408 My output - 989820350 point that is confusing me - Out of 100s of inputs, in only 1 or 2 test cases my code is providing wrong output, if the code is…
1
vote
1 answer

How can I refactor this Javascript code to make it more modular and concise?

var vid1 = document.getElementById("v1"); var vid2 = document.getElementById("v2"); var vidArr = [vid1,vid2]; var tempListener1 = function checkViewA(){ if(elementInView(vid1)){ playVideo(vid1); …
1
vote
1 answer

Problem accessing routes from a module that inherits from ModuleWidget

class SearchModule extends ModuleWidget { @override List get binds => [ Bind((i) => SearchController()), ]; @override List get routers => [ Router(Modular.initialRoute, child: (_, args) => SearchPage()), …
1
vote
1 answer

Separating and reuse project several times

I wanna separating and make core for all projects(I don't need write it from scratch) and every time I need a features of core only import it on my projects but I don't have good idea to do it ... Also I use this to make my every core (as…
Ramin
  • 57
  • 1
  • 11
1
vote
1 answer

Python import with as

I have to files in the same folder First: (module1.py) a = 2*np.pi Second: (MainProg.py) import numpy as np from module1 import a print(np.pi) print(a) When running MainProg.py the error tells me that name np in np.pi is not defined in…
LoLiebe
  • 23
  • 5
1
vote
1 answer

How to calculate 2 to the power of a large number modulo another large number?

M = 115792089237316195423570985008687907853269984665640564039457584007908834671663 296514807760119017459957299373576180339312098253841362800539826362414936958669 % M = ? Is it possible to calculate this in Python? Or are there other methods?
Mamu
  • 13
  • 3
1
vote
1 answer

Which is the best approach for communication between modules in clean architecture

I am working on an e-commerce site. I am following clean architecture with MVVM and Dagger 2.But am getting stuck when we need to communicate in between modules, means i have to call some methods and class from one module another. Actual scenario is…
sweet_vish
  • 141
  • 1
  • 8