Search Results

Search found 9134 results on 366 pages for 'variadic functions'.

Page 12/366 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Recording Available - Features and Functions Payments Module

    - by MHundal
    The Payments Module recording provides a high-level overview of Payments Processing in ETPM.  The recording discusses the Payments Data Model, including Payment Events, Tenders, Tender Control, Deposit and Deposit Control.  In addition, there is a product demonstration of payment processing in the system. Payments Module Overview:  https://oracletalk.webex.com/oracletalk/ldr.php?AT=pb&SP=MC&rID=67364002&rKey=9fe755e4f41a2d4d

    Read the article

  • Understanding Dynamic Management Views and Functions in SQL Server 2008

    Performance monitoring and optimization is an inseparable part of a DBA's activities. To optimize a poorly performing system/query or to troubleshoot the performance issues you need to know the root cause. Prior to SQL Server 2005, we had several system tables to monitor the state of the system. SQL Server monitoring made easy "Keeping an eye on our many SQL Server instances is much easier with SQL Response." Mike Lile.Download a free trial of SQL Response now.

    Read the article

  • Is writing recursive functions hard for you?

    - by null
    I'm taking a computer science course now. I feel it is so hard compared to my polytechnic IT course. I can't understand recursive methods well. How do you manage to get your brain to understand it? When the recursive method returns back, my brain can not trace it nicely. Is there a better way to understand recursion? How do you start learning it? Is it normal that feel that it is very hard at then beginning? Look at the example, I'm very surprised how can I write this if it appears in exam. public class Permute { public static void main(String[] args) { new Permute().printPerms(3); } boolean[] used; int max; public void printPerms(int size) { used = new boolean[size]; max = size; for (int i = 0; i < size; i++) { used[i] = false; } perms(size, ""); } public void perms(int remaining, String res) { if (remaining == 0) { System.out.println(res); } else { for (int i = 0; i < max; i++) { if (!(used[i])) { used[i] = true; perms(remaining - 1, res + " " + i); used[i] = false; } } } } }

    Read the article

  • enable all touchpad functions

    - by user118136
    When I had been using Windows 8 my touchpad had multiple gestures: 2 fingers direction top-bottom = vertical revers scrolling(if I scrolled top than page have scrolled bottom); 2 finger direction left-right = horizontal revers scrolling zoom in and zoom out like smartphones with 2 fingers 2 finger rotation = rotate image in image viewer (+ 90 deg or -90 deg) place a finger in the left edge and drag it to right = change windows application, in Ubuntu I want to change the active program to left like Ctrl+Shift+Tab place a finger in the right edge and drag it to left = open right menu and select the option moving finger on direction top-bottom, in Ubuntu I want to change the active program to right like Alt+Tab I succeed enable 2 finger vertical scrolling of System Setings, but I want that it do not work in revers sense. Do it exist a method to enable the rest of gestures and revers the vertical scrolling? edit: It's a Synaptics touchpad.

    Read the article

  • Help with correct php syntax [migrated]

    - by Robert hue
    I was working on some php functions and I got confused with php syntax. Here is the function. Is this correct? to use add_filter inside function_exists check if ( ! function_exists( 'disable_password_reset' ) ) : function disable_password_reset() { return false; } add_filter ( 'allow_password_reset', 'disable_password_reset' ); endif; or this one is correct, to use add_filter outside function_exists check if ( ! function_exists( 'disable_password_reset' ) ) : function disable_password_reset() { return false; } endif; add_filter ( 'allow_password_reset', 'disable_password_reset' ); I was working on Wordpress if that matters.

    Read the article

  • Static / Shared Helper Functions vs Built-In Methods

    - by Nathan
    This is a simple question but a design consideration that I often run across in my day to day development work. Lets say that you have a class that represents some kinds of collection. Public Class ModifiedCustomerOrders Public Property Orders as List(Of ModifiedOrders) End Class Within this class you do all kinds of important work, such as combining many different information sources and, eventually, build the Modified Customer Orders. Now, you have different processes that consume this class, each of which needs a slightly different slice of the ModifiedCustomerOrders items. To enable this, you want to add filtering functionality. How do you go about this? Do you: Add Filtering calls to the ModifiedCustomerOrders class so that you can say: MyOrdersClass.RemoveCanceledOrders() Create a Static / Shared "tooling" class that allows you to call: OrdersFilters.RemoveCanceledOrders(MyOrders) Create an extension method to accomplish the same feat as #2 but with less typing: MyOrders.RemoveCanceledOrders() Create a "Service" method that handles the getting of Orders as appropriate to the calling function, while using one of the previous approaches "under the hood". OrdersService.GetOrdersForProcessA() Others? I tend to prefer the tooling / extension method approaches as they make testing a little bit simpler. Although I dependency inject all my sourcing data into the ModifiedCustomerOrders, having it as part of the class makes it a little bit more complicated to test. Typically, I choose to use extension methods where I am doing parameterless transformations / filters. As they get more complex, I will move it into a static class instead. Thoughts on this approach? How would you approach it?

    Read the article

  • Why are effect-less functions executed?

    - by user828584
    All the languages I know of would execute something like: i = 0 while i < 100000000 i += 1 ..and you can see it take a noticeable amount of time to execute. Why though, do languages do this? The only effect this code will have is taking time. edit: I mean inside a function which is called function main(){ useless() } function useless(){ i = 0 while i < 100000000 i += 1 }

    Read the article

  • Encapsulate standard C functions?

    - by Jack Stout
    While studying the C programming language and learning safe practices, I'm inclined to write a layer of functionality over several parts of the standard library. This would serve two purposes: I could use standard parts of the language in ways that feel more familiar or rational to me, and I could easily replace that functionality with my own, if I needed to. I could benefit from this, but should I do it? As an example, we can consider memory management. If I've written malloc() into the constructors of each of my objects, then decide that I need to handle memory allocation on my own, I have to edit the constructor associated with every object. By referencing my own function, I can change the contents of that function without writing a new constructors. It seems obvious that I should do this, but I'm used to Python. I'm extremely comfortable in that environment and have no problem linking to any part of the standard library from any part of my program because I know I will almost certainly leave that relationship untouched for the life of the project. The situation I'm running into with C feels like I'm trying to hide the language from myself. Will writing a layer of functionality over the C standard library help me in learning the language and developing a codebase, or will it stifle my understanding going forward?

    Read the article

  • Expected time for lazy evaluation with nested functions?

    - by Matt_JD
    A colleague and I are doing a free R course, although I believe this is a more general lazy evaluation issue, and have found a scenario that we have discussed briefly and I'd like to find out the answer from a wider community. The scenario is as follows (pseudo code): wrapper => function(thing) { print => function() { write(thing) } } v = createThing(1, 2, 3) w = wrapper(v) v = createThing(4, 5, 6) w.print() // Will print 4, 5, 6 thing. v = create(7, 8, 9) w.print() // Will print 4, 5, 6 because "thing" has now been evaluated. Another similar situation is as follows: // Using the same function as above v = createThing(1, 2, 3) v = wrapper(v) w.print() // The wrapper function incestuously includes itself. Now I understand why this happens but where my colleague and I differ is on what should happen. My colleague's view is that this is a bug and the evaluation of the passed in argument should be forced at the point it is passed in so that the returned "w" function is fixed. My view is that I would prefer his option myself, but that I realise that the situation we are encountering is down to lazy evaluation and this is just how it works and is more a quirk than a bug. I am not actually sure of what would be expected, hence the reason I am asking this question. I think that function comments could express what will happen, or leave it to be very lazy, and if the coder using the function wants the argument evaluated then they can force it before passing it in. So, when working with lazy evaulation, what is the practice for the time to evaluate an argument passed, and stored, inside a function?

    Read the article

  • Using T[1] instead of T for functions overloaded for T(&)[N]

    - by Abyx
    The asio::buffer function has (void*, size_t) and (PodType(&)[N]) overloads. I didn't want to write ugly C-style (&x, sizeof(x)) code, so I wrote this: SomePacket packet[1]; // SomePacket is POD read(socket, asio::buffer(packet)); foo = packet->foo; But that packet-> looks kinda weird - the packet is an array after all. (And packet[0]. doesn't look better.) Now, I think if it was a good idea to write such code. Maybe I should stick to unsafe C-style code with void* and sizeof? Upd: here is another example, for writing a packet: SomePacket packet[1]; // SomePacket is POD packet->id = SomePacket::ID; packet->foo = foo; write(socket, asio::buffer(packet));

    Read the article

  • Interface design where functions need to be called in a specific sequence

    - by Vorac
    The task is to configure a piece of hardware within the device, according to some input specification. This should be achieved as follows: 1) Collect the configuration information. This can happen at different times and places. For example, module A and module B can both request (at different times) some resources from my module. Those 'resources' are actually what the configuration is. 2) After it is clear that no more requests are going to be realized, a startup command, giving a summary of the requested resources, needs to be sent to the hardware. 3) Only after that, can (and must) detailed configuration of said resources be done. 4) Also, only after 2), can (and must) routing of selected resources to the declared callers be done. A common cause for bugs, even for me, who wrote the thing, is mistaking this order. What naming conventions, designs or mechanisms can I employ to make the interface usable by someone who sees the code for the first time?

    Read the article

  • How to access functions in extended classes efficiently?

    - by nischayn22
    In PHP I have classes as below class Animal { //some vars public function printname(){ echo $this->name; } } class AnimalMySql extends Animal { static public function getTableFields(){ return array(); } } class AnimalPostgreSql extends Animal { static public function getTableFields(){ return array(); } } Now I have an object $lion = new Animal(); and I want to do if($store == mysql) //getTableFields from class AnimalMySql else //getTableFields form class AnimalPostgreSql I am new to OOP and not sure what is the best way to call the method from the specific class P.S. Please leave a note with the answer to explain the efficiency of the approach

    Read the article

  • Using the "naked" attribute for functions in GCC

    - by Art Spasky
    GCC documentation (http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html) states in 6.29 Declaring Attributes of Functions "naked Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that the specified function does not need prologue/epilogue sequences generated by the compiler. It is up to the programmer to provide these sequences. The only statements that can be safely included in naked functions are asm statements that do not have operands. All other statements, including declarations of local variables, if statements, and so forth, should be avoided. Naked functions should be used to implement the body of an assembly function, while allowing the compiler to construct the requisite function declaration for the assembler." Can I safely call functions using C syntax from naked functions, or only by using asm?

    Read the article

  • 3 hash functions to best hash sliding window strings for a bloom filter with minimum collisions

    - by Duaa
    Hi all: I need 3 hash functions to hash strings of a sliding window moving over a text, to be used later to search within a bloom vector. I'm using C# in my programming I read something about rolling hash functions and cyclic polynomials, they are used for sliding window applications. But really, I did not find any codes, they are just descriptions So please, if anyone have any idea about 3 best C# hash functions to use with sliding window strings of fixed size (5-char), that consume less time and have minimum number of collisions, either they are rolling hash functions or others, please help me with some C# codes or links to hash functions names Duaa

    Read the article

  • (C++) What's the difference between these overloaded operator functions?

    - by cv3000
    What is the difference between these two ways of overloading the != operator below. Which is consider better? Class Test { ...// private: int iTest public: BOOL operator==(const &Test test) const; BOOL operator!=(const &Test test) const; } BOOL operator==(const &Test test) const { return (iTest == test.iTest); } //overload function 1 BOOL Test::operator!=(const &Test test) const { return !operator==(test); } //overload function 2 BOOL Test::operator!=(const &Test test) const { return (iTest != test.iTest); } I've just recently seen function 1's syntax for calling a sibling operator function and wonder if writing it that way provides any benefits.

    Read the article

  • Moving Function With Arguments To RequireJS

    - by Jazimov
    I'm not only relatively new to JavaScript but also to RequireJS (coming from string C# background). Currently on my web page I have a number of JavaScript functions. Each one takes two arguments. Imagine that they look like this: functionA(x1, y1) { ... } functionB(x2, y2) { ... } functionC(x3, y3) { ... } Currently, these functions exist in a tag on my HTML page and I simply call each as needed. My functions have dependencies on KnockoutJS, jQuery, and some other JS libraries. I currently have Script tags that synchronously load those external .js dependencies. But I want to use RequireJS so that they're loaded asynchronously, as needed. To do this, I plan to move all three functions above into an external .js file (a type of AMD "module") called MyFunctions.js. That file will have a define() call (to RequireJS's define function) that will look something like this: define(["knockout", "jquery", ...], function("ko","jquery", ...) {???} ); My question is how to "wrap" my functionA, functionB, and functionC functions where the ??? is above so that I can use those functions on my page as needed. For example, in the onclick event handler for a button on my HTML page, I would want to call functionA and pass two it two arguments; same for functionB and functionC. I don't fully understand how to expose those functions when they're wrapped in a define that itself is located in an external .js file. I know that define assures that my listed libraries are loaded asynchronously before the callback function is called, but after that's done I don't understand how the web page's script tags would use my functions. Would I need to use require to ensure they're available, such as: require(["myfunctions"],function({not sure what to put here})] I think I understand the basics of RequireJS but I don't understand how to wrap my functions so that they're in external .js files, don't pollute the global namespace, and yet can still be called from the main page so that arguments can be passed to them. I imagine they're are many ways to do this but in reviewing the RequireJS docs and some videos out there, I can't say I understand how... Thank you for any help.

    Read the article

  • Generating link-time error for deprecated functions

    - by R..
    Is there a way with gcc and GNU binutils to mark some functions such that they will generate an error at link-time if used? My situation is that I have some library functions which I am not removing for the sake of compatibility with existing binaries, but I want to ensure that no newly-compiled binary tries to make use of the functions. I can't just use compile-time gcc attributes because the offending code is ignoring my headers and detecting the presence of the functions with a configure script and prototyping them itself. My goal is to generate a link-time error for the bad configure scripts so that they stop detecting the existence of the functions.

    Read the article

  • I just learned about C++ functions; can I use if statements on function return values?

    - by Sagistic
    What I am confused on is about the isNumPalindrome() function. It returns a boolean value of either true or false. How am I suppose to use that so I can display if it's a palindrome or not. For ex. if (isNumPalindrome == true) cout << "Your number is a palindrome"; else cout << "your number is not a palindrome."; #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { return 0; } #include <iostream> #include <cmath> using namespace std; int askNumber(); bool isNumPalindrome(); int num, pwr; int main() { askNumber(); return 0; } bool isNumPalindrome() { int pwr = 0; if (num < 10) return true; else { while (num / static_cast<int>(pow(10.0, pwr)) >=10) pwr++; while (num >=10) { int tenTopwr = static_cast<int>(pow(10.0, pwr)); if ((num / tenTopwr) != (num% 10)) return false; else { num = num % tenTopwr; num = num / 10; pwr = pwr-2; } } return true; } } int askNumber() { cout << "Enter an integer in order to determine if it is a palindrome: " ; cin >> num; cout << endl; if(isNumPalindrome(num)) { cout << "It is a palindrome." ; cout << endl; } else { cout << "It is not a palindrome." ; cout << endl; } return num; }

    Read the article

  • How do I print values of an array in Three Rows?

    - by Ramkumar
    I need this output.. 1 3 5 2 4 6 I want to use array function like array(1,2,3,4,5,6). If I edit this array like array(1,2,3), it means the output need to show like 1 2 3 The concept is maximum 3 column only. If we give array(1,2,3,4,5), it means the output should be 1 3 5 2 4 Suppose we will give array(1,2,3,4,5,6,7,8,9), then it means output is 1 4 7 2 5 8 3 6 9 that is, maximum 3 column only. Depends upon the the given input, the rows will be created with 3 columns. Is this possible with PHP? I am doing small Research & Development in array functions. I think this is possible. Will you help me? For more info: * input: array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) * output: 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15

    Read the article

  • Best Method of function parameter validation

    - by Aglystas
    I've been dabbling with the idea of creating my own CMS for the experience and because it would be fun to run my website off my own code base. One of the decisions I keep coming back to is how best to validate incoming parameters for functions. This is mostly in reference to simple data types since object validation would be quite a bit more complex. At first I debated creating a naming convention that would contain information about what the parameters should be, (int, string, bool, etc) then I also figured I could create options to validate against. But then in every function I still need to run some sort of parameter validation that parses the parameter name to determine what the value can be then validate against it, granted this would be handled by passing the list of parameters to function but that still needs to happen and one of my goals is to remove the parameter validation from the function itself so that you can only have the actual function code that accomplishes the intended task without the additional code for validation. Is there any good way of handling this, or is it so low level that typically parameter validation is just done at the start of the function call anyway, so I should stick with doing that.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >