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
0 answers

Laravel 'Str' helper class doesn't work with Unicode

Since I'm new to laravel, I'm trying codes from the documentation. I got to the helper classes. When in my controller I wrote the code bellow, $a='გიორგი გოგიავა'; $b="George Gogiava"; echo Str::length($a), '
'; …
Leo Garsia
  • 105
  • 1
  • 10
0
votes
1 answer

Openvino nsc2 with docker : Can't initialize GTK backend in function 'cvInitSystem'

I do have some troubles with openvino and the Neural Compute Stick 2 on docker: When I try to run : python3 object_de tection_demo.py -d MYRIAD -i /home/openvino/video.mp4 -m /home/openvino/person-vehicle-bike-detection-2004.xml -at ssd --labels…
simsim
  • 25
  • 1
  • 4
0
votes
3 answers

How to bulk delete all YouTube comments

Ever wanted to remove your entire comment history quickly without deleting your channel? Apparently I need a minimum amount of characters to post
Josh Maxwell
  • 79
  • 10
0
votes
1 answer

Unable to find observer in Laravel

I tried to register my ObserverHelper in the AppServiceProvider as below, but I am getting the following error. Unable to find observer: App\Helpers\App\Observers\FileLogObserver AppServiceProvider.php use Illuminate\Support\ServiceProvider; use…
user16124793
0
votes
1 answer

angular-error: unhandled exception: cannot find module @angular-devkit/build-angular/package.json

while I run (A perfectly fine project that worked for several people) on vs code I get this weird error that I can't understand : from what I understand I don't have a specific file/package/folder? And I don't understand what I need to do? will…
Natalie Torch
  • 23
  • 1
  • 4
0
votes
1 answer

Sorting in rails using helper

I'm a novice in ruby-on-rails. I have an applications counting distance between metro station and a ATM. There's two models with many-to-many relation: Station, Cashpoint. And there's a controller SHOW, that should get the station and show ATMs in…
lich
  • 290
  • 1
  • 5
  • 10
0
votes
1 answer

Passing variables to 'helper_method's

I am using Ruby on Rails 3.0.9 and I would like to pass some variables to an helper_method stated in my controller. class ArticlesController < ApplicationController helper_method :method_name private def method_name # Here I would like to…
Backo
  • 18,291
  • 27
  • 103
  • 170
0
votes
1 answer

Rails: Unexpected tSTRING_BEG in rails helpers

I am trying to create a helper function to be used in my view for my Rails application. I am using the number_to_human ActionView::Helpers::NumberHelper method for formatting the values. This is my implementation of the function: def money(value,…
Promise Preston
  • 24,334
  • 12
  • 145
  • 143
0
votes
0 answers

how do I properly write django helper functions in order to check for new rows, and if the data was changed?

I am trying to write two functions in Django as helpers where it will help me to check if new data is coming or if the existing data was changed for further update is_new_row - will understand if the row is new and add it to an array that will be…
etyzz
  • 55
  • 6
0
votes
1 answer

Implementing mutual exclusion for a shared resource used by multiple Ruby rspec test runs

I am trying to fix a problem when running multiple tests that all login and search for emails in a shared IMAP email server account. Tests use a helper that uses NET::IMAP for login/search/delete and they occasionally fail when logging in or…
akarollil
  • 435
  • 4
  • 12
0
votes
2 answers

Problem when calling the helper function - Vue

Main view: Helper: import DataService from "../services/data.service"; export function…
Weronika
  • 368
  • 3
  • 24
0
votes
1 answer

How can I implement this function in Odoo 12 or OpenERP?

I'm trying to make a conditional function for the invoices. I know how to write but I don't know how can I implement in Odoo by code. My function if(country_id==base.au || country_id==base.ca || country_id==base.jp || country_id==base.li) {
user15755649
0
votes
1 answer

How can I relation countries and invoices for print a custom text?

In the invoice view I have a custom boolean field and a custom text field. Odoo Server Error Traceback (most recent call last): File "/home/ubuntu/OdooAddons/odoo/odoo/addons/base/models/qweb.py", line 348, in _compiled_fn return…
user15755649
0
votes
2 answers

How to give information between an activity to a fragment in android?

I have a Fragment and an Activty, the activity has 3 editText and a Image. You can upload the image from your device. But know i'm trying to connect both fragment and pass all the information from Activity B to Fragment A. Fragment has a button for…
user15755649
0
votes
1 answer

How to relation two field from differents models in Odoo or OpenERP?

I want to know how to relation 2 CHAR Fields by code in Odoo. First field is in product.template the HS CODE and the other one is in account.invoice.line and is a custom field. How can I do this? I have this error message Error: Odoo Server…
user15755649
1 2 3
99
100