FAQ Database Discussion Community


execute a call in batch file to a lable with variable

windows,variables,batch-file,label,call
It should be a simple thing, but I'm not getting it I want to do a call inside a batch file to a label using a variable as a parameter, something like this: echo off set TEST=message text call :MESSAGE %TEST% more text :MESSAGE echo %1 what I get is...

How to call a data.frame inside an R Function by name

r,function,data.frame,call
I want to write a function that runs the same analysis on different data.frames. Here is a simple version of my code: set1 <- data.frame(x=c(1,2,4,6,2), y=c(4,6,3,56,4)) set2 <- data.frame(x=c(3,2,3,8,2), y=c(2,6,3,6,3)) mydata <- c("set1", "set2") for (dataCount in 1:length(data)) { lm(x~y, data=mydata) } How do I call a data.frame by name...

c# Main Class include “subclass”

c#,call,mainclass
Hey I have two classes class Main { public exLog exLog; public Main() { } } and class exLog { public exLog() { } public exLog(String where) { } public exLog(String where, String message) { } } i tried to call exLog direct without giving exLog a parameter. So I...

Bad System Call (core dumped) on Sybase 12.5 installation (SunOS)

installation,system,call,solaris,sybase-ase
I am trying to install Sybase ASE 12.5.4 on a Sun OS Solaris 11 machine but I am getting the following messages when launching the setup file : -bash-4.1$ ./setup InstallShield Wizard Initializing InstallShield Wizard... Searching for Java(tm) Virtual Machine... Bad System Call (core dumped) Would you have any idea...

IronPython strange method calling

list,methods,call,instance,ironpython
Why does calling a method like this in ironPython work?: from System.Collections.Generic import List class test: mem = None def __init__(self): # !No Instance created !!! self.mem = List[int] def doSomeThing(self): if self.mem.Contains((List[int](), 123): pass I can't get the behaviour of IronPython in this case: self.mem.Contains((List[int](), 123):. Does any one...

Java: Calling a method of an instanced instance

java,methods,call,instance
Beginner here. Main.java: public int foo = 0; public static void main(String[] args){ Window f = new Window(); // do some other stuff } public static void incrementFooEverySecond(){ while(true){ foo++; bar.repaint(); // <- Problem here! Thread.sleep(1000); } } Window.java: public class Window extends JFrame { public Window(){ this.setSize(X, Y) //......

Calling a Method that has Generic Parameters

java,generics,methods,call
I am trying to understand some source code. How do I call this method in main? public void introSort(T[] array, int max_depth) { System.out.println(array.length); } I simply want to return the length of the given array in my main method. If this is any help, the method is in a...

How to use/call stemmer (croatian stemmer) [closed]

python,call,stemming
import re import sys...

How do I return a result from a dialog?

python-3.x,tkinter,call,tk
I have created a dialog, everything is fine, except when I have in some way to return the result. The problem of getting a user's choice from a dialog is that we don't know when he/she will click for example ok or cancel. I have tried to see how standard...

How to chain call functions by using a string containing that chain in PHP

php,call,method-chaining
I have a chain call like so: $object->getUser()->getName(); I know that I can use a string to call a function on an object: $functionName = 'getUser'; $object->$functionName() or call_user_func(array($object, functionName)) I was wondering if it was possible to do the same for a chain call? I tried to do: $functionName...

How to call public function within the file in Java?

java,eclipse,call,eclipse-luna,public-method
I tried to change the picture in this code. I tried to call the public function, and able to load when I want to call them out. I wanted to know how to do this, so that way I can put them in the if statement, while loop, or case...

Organize External API Calls in Rails 4 - Module or Class?

ruby-on-rails,ruby,ruby-on-rails-4,shared-libraries,call
I am creating a Rails app that will use quite a few external APIs such as SalesForce, FolderGrid(like Dropbox) etc., which would all sync to my database. I've never worked with external api calls so I created a few basic Ruby scripts with scattered methods to test the call to...

Check SMS and DIal support before Intent

android,android-intent,sms,call,tablet
I have this code to send SMS via Intent and to call a number : public void Call(String s) {//Appeler String url = "tel:" + s; Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url)); startActivity(intent); } public void Sms(String s){ startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", s, null))); } it looks fine in my phone...

Loop a function?

function,loops,vbscript,call
Is it possible to loop a function until an item = TRUE? I am trying to ping a server... Once connection is established, or Ping = TRUE, then a program will execute. If connection is not established, then the ping will repeat until it is TRUE. My code thus far...

Strings- taking out a letter at the start of each string in a list

python,string,list,loops,call
I am new to coding and am doing a computer science class. I have enjoyed it so far. the following Question has stumped me: An acronym is a string of capital letters formed by taking the first letters from a phrase. For example, SADD is an acronym for “students against...

PHP undefined function [closed]

php,mysql,function,object,call
I'm currently working on a message display in PHP and MySQL. I always get this error on line 22: Fatal error: Call to undefined function query() in ... But I defined $query in this specific line.... My code looks as follows: <?php $servername = "localhost"; $username = "root"; $password =...

C# Calling variables from other classes

c#,class,oop,methods,call
this is probably very simple, but I have always just made one big class and never tried make clean code. Now I am trying and experiencing errors.. So, this is the idea: class1 { method1 { value 1; value 2 } method2 { value 3; value 4 } method3 {...

How to set javascript properties on a global listener, without duplicating code

javascript,parameters,call,bootstrap,typeahead
If I have multiple '.typeahead' input field on my page, and I want each of them to initialize typehead(), how can I make an exception for one specfic input element without duplicating my code? E.g.: My fields: <input type="text" class="typehead_selector" id="coworkers"> <input type="text" class="typehead_selector" id="jobs"> <input type="text" class="typehead_selector" id="search" data-action="search">...

C# Calling a Method Inside another Method

c#,methods,callback,call,steam
public static void Main2(string[] args) { WebRequest_BeginGetRequeststream.RequestCheck(); WebRequest_BeginGetRequeststream.ReadCallback(IAsyncResult asynchronousResult); } This is the Method I want to call. static void OnMsg(SteamFriends.FriendMsgCallback callback) { string msg = callback.Message; //Announcement Related Messages if (msg == "RequestCheck") { Main2 (string[] args); Console.WriteLine("Starting Operation Line for Announcement Creation."); Console.WriteLine("Version 1.08 of Announcement Code Initiated.");...

function call and execution in R

r,function,call,sequential
I have 2 functions defined one after the other. When I call them as a block the 1st function is executed (will become clear when you see below and I understand whats happening here and why it's happening) and the second function call gets ignored. Can this be fixed ?...

How to call a public function from another form

vb.net,forms,function,call,public
Frm1 contains the code for validation of textbox: Public Function AlphabeticalOnly(ByVal Str As String) As Boolean Dim pattern As String = "^[a-zA-Z\s]+$" Dim reg As New Regex(pattern) If reg.IsMatch(Str) = False Then MsgBox(Str & " is invalid! Please enter alphabetical characters only!", MsgBoxStyle.Critical, "Error") End If Return reg.IsMatch(Str) End Function...

how to make @IBAction in table?

ios,uitableview,swift,call
I wrote an application to have a table and when i press the button it would make a call. I have already done a table, code as follow.. var callContent = ["Police","Hospital"] override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib....

string array remains blank after calling it

javascript,jquery,function,call,var
When call this from the file hfunc.js the var vid appears to be blank in my DOM. (I've checked it with alert(vid.length)): var vid = []; $(document).ready(function wfiller() { for (var n = 0; n < 1; n++) vid[0] = '<iframe width="560" height="315" src="https://www.youtube.com/embed/0xpAqxH2Kzw" frameborder="0" allowfullscreen></iframe>'; }); on head tag:...

Binding Object Prototype Functions to Object in Javascript

javascript,prototype,call,this,bind
Background I have a prototype object that has dozens of functions that access info from a list like this: var prototype_object = { yellow: function(list) { return list[this.type+'_yellow']; }, green: function(list) { return list[this.type+'_green']; }, // ... 50 more functions here } The 'this.type' is supposed to come from the...

Is it possible to apply the same context to many functions?

javascript,call,this
Is there a way to bind the same 'this' context to different functions? var obj = {'a':1, 'b':2 }; init.call(obj); function init() { func1.call(this); func2.call(this); func3.call(this); etc... } Preferred syntax: function init() { // each function should use this. func1(); func2(); func3(); etc... } Not really a problem per se,...

Execute a method from a class in mainActivity (Android)

java,android,methods,call
I m trying to execute a method from a class called QrScann in the MainActivity class when the user click on a button but everytime the app crash as soon as I click the button and it gives me this log crash output 06-02 17:00:24.890 7067-7084/t.n.app W/EGL_emulation﹕ eglSurfaceAttrib not implemented...

PLS-00306: wrong number or types of arguments in function call

oracle,function,plsql,call
I cannot figure out how to call a function in SQL Developer. I'm trying to call the function GET_SUIT but it says that I am using the wrong number or type of arguments in call to 'GET_SUIT': create or replace FUNCTION GET_SUIT ( RND_NUM IN INTEGER, Suit OUT VARCHAR2 )...

make phone call when specific notification arrive

java,android,notifications,call
i'm trying to make a phone call, when a specific notification arrive, i use Notification Service Listener to read incoming notificaion, public void onNotificationPosted(StatusBarNotification sbn) { // if(if this is my notificaion..){ String name = sbn.getNotification().extras.getCharSequence(Notification.EXTRA_TITLE)); List<String> numbers = getPhoneNumbers(name); Log.d(TAG, "i have all this numbers - " + numbers.toString());...

DOS/Windows xmlstarlet usage with a String instead of a xml file

command-line,echo,call,xmlstarlet
can xmlstarlet be used with a String instead of a xml file? e.g.: xmlstarlet sel -t -v "/*" "<pathlist><path>C:\file.txt</path></pathlist>" instead of xmlstarlet sel -t -v "/*" pathlist.xml or how else could i realize with a string ? when i echo the string and pipe it to xmlstarlet it does not...

Why is “echo l > /proc/sysrq-trigger” call trace output always similar?

linux,linux-kernel,call,backtrace,sysctl
According to the official kernel.org documentation echo l > /proc/sysrq-trigger is supposed to give me the current call trace of all CPUs. But when I do this a couple of times and look into dmesg after that the call traces look completely similar. Why is that?

Java call a method before constructor

java,methods,constructor,call
I have the class Map with a method setMapName which choose from an Enum mapName to set it, inside the constructor there is a rule to name a cell from the array sector either Alien or Human according to the mapName value, i want to test if the name of...

How to execute API link of another website in PHP

php,api,http,curl,call
I want to call the API URL of another website in php file. The URL is: http://otherwebsite.com/api/web2sms.php?workingkey=YourKey&to=DestinationNumber&sender=Source&message=HELLO My code: <?php $workingkey = "YourKey"; $to = "DestinationNumber"; $sender = "Source"; $message = "HELLO"; $url = "http://otherwebsite.com/api/web2sms.php?workingkey=$workingkey&to=$to&sender=$sender&message=$message"; $this = execute($url); ?> I think many things are missing. So please tell me how...

How do you run/call a module in another module in VBA excel?

excel-vba,module,call
Okay so i have 3 modules. My first module is "main" that is the module that i need to call the other module. What i mean is that when i run main, i want it to call/run the other 2 module. Currently when i press F5, it doesn't do this....

Exit Sub And Call another Sub

vba,excel-vba,call
I have two subs, sub1 and sub2. I want to exit sub1 completely and start sub2 if a condition is satisfied. My attempt is (running from : sub1 . . If x=y Then Exit Sub And Call sub2 End If . . End Sub ...

When I run my code the only number that appears on the screen is the number that I entered. How do I get this to work?

function,loops,numbers,call,void
#include <iostream> #include <string> #include <cmath> using namespace std; void primefunction(int); int main() { char response = 'y'; while (response == 'y') do { int num; int i; cout << "Please enter a number that is greater than or equal to 2 \n"; cin >> num; cout << "The number...

JavaScript call - I can just access object properties directly

javascript,scope,call
I am trying to understand the purpose of using call(). I read this example on what it's used for, and gathered examples from Mozilla, namely: var animals = [ { species: 'Lion', name: 'King' }, { species: 'Whale', name: 'Fail' } ]; for (var i = 0; i < animals.length;...

Create a Method-Call from a String

php,class,call
at the moment I'm looking for a way to call a method from a String. My String looks like this: "Hello, here's the Link you look for: [[Link,internLink,Go,Login]]." I'd like to replace [[Link,internLink,Go,Login]] with: K :: gI('Link')->internLink('Go', 'Login'); Is there a way? The reason is, that I got various texts...

Call a custom GAS function from external URL

function,url,google-apps-script,call
I want to call a custom function I wrote within my Google Apps Script. When I execute a getJSON I suppose it'll automatically run my doGet(e). My Javascript: $.getJSON(https://script.google.com/macros/s/[ID]/exec, function(data){ //code here }); Is there a possible way to call one of my custom functions for example My Google Apps...

Calling the default constructor from another constructor

c++,constructor,call
I am trying to make the overloaded constructor call the default constructor, but it only gives me garbage numbers. What I want it to do is recognize if the date entered is invalid, and so default it to 1/1/2000. #include <iostream> #include <iomanip> #include <string> #include "date.h" using namespace std;...

Why doesn't my bash script read lines from a file when called from a python script?

python,arrays,bash,call
I am trying to write a small program in bash and part of it needs to be able to get some values from a txt file where the different files are separated by a line, and then either add each line to a variable or add each line to one...

AS3 - Get reference of instance who called a function

actionscript-3,function,class,flash,call
I have two classes, "player" and "Stickman", "player" extends "Stickman". The class "Stickman" contains functions that all characters will have in the game such as moving and handling animations (all use the same animations) while the "player" class contains player-exclusive actions. When I call an action from a player instance...

Function that calls itself returns only first result of its call

python,return,call
I have a string s="expences > drinks" that is sent to a function. Inside that function I am supposed to add new values using raw_input() till I input an empty string. Each one of these inputs should be added to the initial string. In the case of an empty string,...

How to call classes methods in eiffel

function,methods,call,eiffel
im kind of a beginner in eiffel,and I got 2 classes, the main one called APPLICATION that contain this: class APPLICATION inherit ARGUMENTS create make feature {NONE} -- Initialization make -- Run application. do print ("test") end end and another classe called BLUE: class BLUE create make feature make local...

Call a java script function for all targeted elements

javascript,function,call
I found a javascript function that I want to apply to all targeted elements, in my case all textarea from page but when I am changing the selector from document.getElementById('text'); into document.querySelectorAll('textarea'); or document.getElementsByTagName('textarea') in order to target all elements is not working and I don't understand why, I have...

C# pure R6025 virtual function call

c#,function,call,virtual
i get the following error on my live System (Windows Server 2012 R2 x64) but not on my dev (Windows 7 x64) machine. Another stackoverflow thread said "you are calling a function that is declared, but since you are not calling any child's implementation, it has no definition.". Wouldn't the...

I keep gettting the error “no match for call '(std::vector) (int)”

c++,c++11,vector,call,no-match
Before reading this problem please note that this is a PRACTICE problem for hp codewars (a programming competition), I am not asking the forum about a real problem. My program is supposed to take the following input: -a number that represent the number of candies in a jar -the number...

Undefined value when calling an input from a HTML form from PHP

php,html,forms,variables,call
Getting some issues with my PHP. I'm trying to get assign the value from the text box to a variable so that I can check it against a random number. This is me initializing my variables: session_start(); if (!isset ($_SESSION["rand"])) { $_SESSION["rand"] = rand(0,100);} $rand = $_SESSION["rand"]; if(!isset ($_SESSION["att"])) {...

android quickBlox Video calling code force close on click on receive button click

android,video,call,quickblox
Hello all i need to integrate video and audio call using QuickBlox for that i am using This link i am able to login with user name and password But when user clickes on receive video call they get error and force close app on both the device the error...

Call of a method that returns int[] [closed]

java,class,methods,int,call
I have the following code : public int[] getState() { int[] a = new int[SIZE]; for (int i = 0; i < SIZE; i++) { a[i] = mCells[i].getState(); } return a; } public void setState(int player, int[] state){ setCurrentPlayer(player); //state = new int[9]; // have tried this.getState(); state = getState();...

How to call posts from PHP

php,wordpress,caching,cron,call
I have a website, that uses WP Super Cache plugin. I need to recycle cache once a day and then I need to call 5 posts (URL adresses) so WP Super Cache put these posts into cache again (caching is quite time consuming so I'd like to have it precached...

C++ Calling - search function

c++,function,call,iostream
I was wondering how I could finish up this program. It's to perform a linear search on a list "ll" (which length is 31) for the user inputted item it, returning the user inputted numbers and their locations if they're found. Problem: I'm not sure how to call the functions...

Display app during phone call ( Objective-C or Swift )

ios,objective-c,swift,call
Hi everyone, I can't find a way to display my app when the user calls someone through the default iPhone's Phone Application. Is it possible to do that ? I'd like to show up a specific screen which looks like the iPhone's default one. That's a brief question, please tell...

dynamic call to a function jquery

javascript,jquery,function,dynamic,call
I am trying to build a lib and i need to call functions dynamically depending on the variables i have in parameter like this strategies = min function dispatchRuleToStrategy(strategies) { $.each(strategies, function(index, value) { strategy = "strategy_" + value; }); } function strategy_min() { // do something } How can...

ios open call history

ios,call,history
How to open the call history programmatically? Sort of: call://history ?...

vbscript error: Name Redifiined; Line 43: ExecuteGlobal sFileContents

function,vbscript,parameter-passing,call
Question from a amatuer scripter with informal coding background: I've researched this on stack, msdn, random scripting websites but can't seem to glean a concrete solution. So please be advised this request for help is a last resort even if the solution is simple. To put it simply, I'm trying...

How to handle empty parameters in a main method java call

java,methods,jar,call,main
I would like to have a dynamic way of passing in parameters to a java main method call which is done via the Command Line(cmd) to a Runnable JAR file. At the moment my main() method takes 6 parameters and sets each one to a variable before calling another method...

Best Practice for Checking Dependent Variables Before or inside Method

java,methods,coding-style,call
I was wondering what the best practices would be for when you have a variable that needs to be checked before a certain helper method could run. Should the check be done in the caller or callee? I see benefits to both. A bit less expensive to do it in...

php class magick function __call dosent work

php,class,call
Hello i trying store debug information by using magick class function __call , but nothing store in.... __call function __call($method, $arguments) { $load_functions = array('get', 'insert', 'update', 'delete', 'rawQuery'); if(in_array($method, $load_functions)) { array_push($this->_debug, microtime(true)); } } excute $app->database->setbase('MyBase'); $query = $app->database->get('MEMB_INFO'); $app->database->debug(); nothing store into $this->_debug array... $app->database->debug(); return empty...

Getting an error “error: expected expression before…” when I try to call a function with parameters in C

c,function,call,declare
My code looks like: FILE *test char line[50]; fp = fopen(arg[5], "r"); doSomething(File test, char line[50]); // declare function doSomething(fp, line[50]); // call function I am getting an "expected error expression before 'FILE' error. I've tried many different variations of the syntax, but I still get this error, or more...