Questions tagged [helper]

Additional functionality not defined in a class that the helper operates on.

A helper is a method commonly used in object-oriented programming to provide additional functionality to classes that not directly associated with the class. This is known as an Inversion of Responsibility.

Helper methods are typically grouped into a single helper class through the delegation pattern.

2672 questions
0
votes
1 answer

How to run a yaml config file?

I'm running "wpdistillery/config.yml" and getting the error message zsh: permission denied
0
votes
1 answer

Is it bad practice to add helpers for IO operations in Go?

I come from a C# background and am used IO methods like File.ReadAllLines and File.WriteAllLines from the System.IO namespace. I was a bit surprised to learn that Go didn't have convenience functions for these IO operations. In an effort to avoid…
K. Claesson
  • 603
  • 8
  • 22
0
votes
0 answers

I'm facing a problem while using "View data layout" in .Net Core

Facing problem while using "View data layout" So Please help me. Code are given below. Its showing redline on view data public class Home1Controller : Controller { [ViewData] public string Message { get; set; } public ActionResult…
0
votes
0 answers

How to update enum dynamically at development time

How to Create a Helper to update my enum list from the database. When a new item is added to the database, update my enum as soon as the developer updates his project (rebuild). Note: It does not necessarily need to be a Database, it can be an…
0
votes
1 answer

Change entire string if contains substring using replace

a = “thanklynette i owe you one best regardsjohn” b = [(“lynette”,”john”)] for i in b: a.str.replace(b,’’) print(a) I received a type error as replace doesn’t accept list. Is there a way to go about it? My desired output would be a = “i owe…
0
votes
1 answer

Table component in rails

I'm looking for a simple table component to use in my rails application. I'll need filters & page navigation on that. To explain more, I've quite a few table views in my app for various models, instead of coming up with markup separately, I would…
ramanr
  • 725
  • 1
  • 8
  • 11
0
votes
1 answer

How would one pass a component to a helper?

I want to pass a component to a helper and have that helper return an array of objects, each with a component node... // helpers.ts import { LINKS } from '../constants'; // error on the next line: Cannot find name 'Component'. ts(2304) const…
Jeff Stein
  • 38
  • 5
0
votes
2 answers

Retrieve Data from MVC 3 Razor Html Helper

I have a particularly interesting issue with a Razor Html Helper I'm trying to implement. The goal of this helper is to accept a System.Type, generate an JQuery-validate-able form from that Type's properties and associated attributes, as well as…
Jtibble
  • 31
  • 4
0
votes
1 answer

I keep on getting the same error in the newest version of python

So on python (Discord.py mainly) i keep getting the same error on a "$move" command how do i fix it. the error is python -u "/Users/ats/Desktop/bot.py" iMac:~ ats$ python -u "/Users/ats/Desktop/bot.py File "/Users/ats/Desktop/bot.py", line 8 …
0
votes
1 answer

Discord bot is not running for some reason CLOSED

I need help with my bot, I coded it all before but then something happened and I made a new one and it just isn’t working when I run the code it works fine but the bot isn’t online or responding to the commands import discord from keep_alive…
Whatic
  • 11
  • 4
0
votes
1 answer

How to handle errors in Sinatra from external file?

I'm trying to handle errors in a Sinatra App including a Helper Module. I tried doing it like this: # application_controller.rb require './application_helper' class ApplicationController < Sinatra::Base helpers…
Abdel P.
  • 739
  • 9
  • 24
0
votes
1 answer

How to call Helper.php function in JavaScript

I have a function in helper.php: public static function getFristImageSearch($slug) { $slug = str_replace("-", " ", $slug); $image = Images::select('thumbnail')->where( 'metakeywords','LIKE', '%'.$slug.'%' ) ->where('status', 'active' ) …
Anonymous Girl
  • 582
  • 8
  • 22
0
votes
0 answers

How to call Laravel helper method in Config/Constants.php

I am giving this error Call to undefined function getDefaultConfigByHost() In constants.php line 5: In helper.php function getDefaultConfigByHost($developmentValue = null, $testValue = null, $productionValue = null) { try { …
Cansu Koç
  • 11
  • 12
0
votes
2 answers

How do i Stop the v.s code source code from displaying all my desktop files?

i just started using v.s code and im still getting around it but im not comfortable seeing "1k plus changes" on the SCM icon.it seems to be tracking all of my files on my desktop and it really makes me uncomfortable.picture showing SCM tracking…
0
votes
0 answers

SQLITE3 programming learning in Python

I've created a new sql base in pycharm and it gave me the next error message: Traceback (most recent call last): File "C:\Users\rnicolescu\Desktop\my_program.py", line 619 (line from the pycharm), in cursor.execute("""INSERT INTO Names (id,…