Skip to main content

Home/ Coders/ Group items tagged Functional

Rss Feed Group items tagged

anonymous

Functional Javascript - 0 views

  •  
    Functional is a library for functional programming in JavaScript. It defines the standard higher-order functions such as map, reduce (aka foldl), and select (aka filter). It also defines functions such as curry, rcurry, and partial for partial function application; and compose, guard, and until for function-level programming. And all these functions accept strings, such as 'x -> x+1', 'x+1', or '+1' as synonyms for the more verbose function(x) {return x+1}.
bhawna sharma

Inline function in C++: How to use Inline function in C - 0 views

  •  
    Learn about Inline function and how to use in C++ program. Inline function is a kind of function which help to improve execution speed of function or program.
Andrey Karpov

Wade not in unknown waters. Part two - 0 views

  •  
    This time I want to speak on the 'printf' function. Everybody has heard of software vulnerabilities and that functions like 'printf' are outlaw. But it's one thing to know that you'd better not use these functions, and quite the other to understand why. In this article, I will describe two classic software vulnerabilities related to 'printf'. You won't become a hacker after that but perhaps you will have a fresh look at your code. You might create similar vulnerable functions in your project without knowing that. STOP. Reader, please stop, don't pass by. You have seen the word "printf", I know. And you're sure that you will now be told a banal story that the function cannot check types of passed arguments. No! It's vulnerabilities themselves that the article deals with, not the things you have thought. Please come and read it.
Matteo Spreafico

Classical Inheritance in JavaScript - 0 views

  • function ZParenizor2(value) { var that = new Parenizor(value); that.toString = function () { if (this.getValue()) { return this.uber('toString'); } return "-0-" }; return that; }
    • Matteo Spreafico
       
      This constructors lies, wondeful!
  • Again, we augment Function. We make an instance of the parent class and use it as the new prototype. We also correct the constructor field, and we add the uber method to the prototype as well.
  • This adds a public method to the Function.prototype, so all functions get it by Class Augmentation. It takes a name and a function, and adds them to a function's prototype object.
  • ...3 more annotations...
  • To make the examples above work, I wrote four sugar methods. First, the method method, which adds an instance method to a class. Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; };
  • JavaScript can be used like a classical language, but it also has a level of expressiveness which is quite unique. We have looked at Classical Inheritance, Swiss Inheritance, Parasitic Inheritance, Class Augmentation, and Object Augmentation. This large set of code reuse patterns comes from a language which is considered smaller and simpler than Java.
  • I have been writing JavaScript for 8 years now, and I have never once found need to use an uber function. The super idea is fairly important in the classical pattern, but it appears to be unnecessary in the prototypal and functional patterns. I now see my early attempts to support the classical model in JavaScript as a mistake.
David Corking

JavaScript as a Functional Language | Ajaxonomy | 2009 - 0 views

  • there is a little bit of hand-waving involved in calling JavaScript a functional language. JavaScript is not a side-effect free language, nor is it an expression-based language (i.e., it is not value-oriented, but rather variable-oriented). There is no tail call optimization in any of the current implementations, so recursion must be kept shallow. And the list goes on. Truth be told, JavaScript is really one of the first hybrid imperative-functional languages.
  • Higher-order functions allow us to do functional composition,
  • Since JavaScript does not have "overloaded" functions, this type of functionality is usually simulated using manipulation of the function's arguments. Currying comes in handy because it allows you to do this manipulation in a much cleaner and more modular way.
  • ...1 more annotation...
  • Closures have quite a few applications in real-world JavaScript: event binding, callbacks, sorting, mapping (in the classical Lisp sense), and many others. In more modern JavaScript programming, you can find them almost everywhere.
  •  
    This is a short tutorial approach to an old but little-noticed saw.
Joel Bennett

Functional Programming Fundamentals, Chapter 1 of 13 - Dr. Erik Meijer - C9 Lectures - ... - 0 views

  •  
    "We kick off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer "
Joel Bennett

Detours - intercepting Win32 functions - 0 views

  • Transactional model for attaching and detaching detours.
    • Joel Bennett
       
      Transactional ... aspects. This is crazy impressive.
  • Detours is a library for instrumenting arbitrary Win32 functions on x86, x64, and IA64 machines. Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments (called payloads) to any Win32 binary.
  •  
    Detours is a Microsoft Research project which exposes a transactional model for intercepting arbitrary Win32 functions by rewriting the in-memory code and attach an arbitrary payload to any binary.
Joel Bennett

Deriving from WebClient to handle persisting cookies for login - 0 views

  • Then just use the ExWebClient class to make your requests;
  • Public Class CookieWebClient : Inherits WebClient ' overridden to add cookie headers to http requests. Protected Overrides Function GetWebRequest(ByVal address As System.Uri) As System.Net.WebRequest Dim request As WebRequest = MyBase.GetWebRequest(address) If TypeOf request Is HttpWebRequest Then DirectCast(request, HttpWebRequest).CookieContainer = _cookies End If Return request End Function ' overridden to save cookies to the container for http requests. Protected Overrides Function GetWebResponse(ByVal request As System.Net.WebRequest) As System.Net.WebResponse Dim response As WebResponse = MyBase.GetWebResponse(request) If TypeOf response Is HttpWebResponse Then _cookies.Add(response.ResponseUri, DirectCast(response, HttpWebResponse).Cookies) End If Return response End Function ' overridden to save cookies to the container for async http requests. Protected Overrides Function GetWebResponse(ByVal request As System.Net.WebRequest, ByVal result As System.IAsyncResult) As System.Net.WebResponse Dim response As WebResponse = MyBase.GetWebResponse(request, result) If TypeOf response Is HttpWebResponse Then _cookies.Add(response.ResponseUri, DirectCast(response, HttpWebResponse).Cookies) End If Return response End Function Private Shared _cookies As CookieContainer = New CookieContainer End Class
David Corking

Stevey's Blog Rants: Execution in the Kingdom of Nouns - 2006 - 0 views

  • For the lack of a horseshoe, EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot();
  • the stories all take a definite shape: object construction is the dominant type of expression, with a manager for each abstraction and a run() method for each manager. With a little experience at this kind of conceptual modeling, Java citizens realize they can express any story in this style.
  •  
    The nursery rhyme looks familiar, but how realistic is it? Smalltalk and Self appear at first glance to be in danger of this kind of horror, especially Smalltalk where every object has a class, yet a Smalltalk statement consists largely of verbs. Yegge seems to have missed an important detail in his analogy - verbs are not functions - they are symbols (selectors) that resolve to a function (method) when they are looked up (depending on ... whatever - Smalltalk the class of the receiver, CLOS the types of the arguments and so on). C and FORTRAN don't have verbs, they just have functions (actions).
Joel Bennett

Microsoft F# Developer Center - 0 views

  •  
    F# is a functional programming language for the .NET Framework. It combines the succinct, expressive, and compositional style of functional programming with the runtime, libraries, interoperability, and object model of .NET. -- and it had a new CTP in September 2008
Joel Bennett

VSTrac - DevjaVu - 0 views

  •  
    VSTrac is a Visual Studio addin which integrates Trac functionality into Visual Studio 2005 and 2008. It's main function is to facilitate management of tickets from within Visual Studio...
Joel Bennett

Security Development Lifecycle (SDL) Banned Function Calls - 0 views

  •  
    Microsoft's official list of "banned" unsafe function calls. Basically this is a list of all the SafeCRT and StrSafe.h function equivalencies ... along with a short discussion of the relative merits for StrSafe vs. SafeCRT... also includes some *very* useful examples.
Joel Bennett

The Weekly Source Code 34 - The Rise of F# - Scott Hanselman's Computer Zen - 0 views

  •  
    Everyone is agog over F# and getting all functional. Again...
Fabien Cadet

Quirks or Standards Mode Bookmarklet - dorward.me.uk - 0 views

  •  
    « These days, many browsers can function in Standards Mode and Quirks Mode. In a nutshell, they perform an intelligence test based on the document author's choice (or lack thereof) of Doctype. If they see a "good" Doctype, they enter Standards mode and more closely follow standards, otherwise they enter Quirks and … don't. »
  •  
    These days, many browsers can function in Standards Mode and Quirks Mode. In a nutshell, they perform an intelligence test based on the document author's choice (or lack thereof) of Doctype. If they see a "good" Doctype, they enter Standards mode and more closely follow standards, otherwise they enter Quirks and … don't.
Joel Bennett

Windows 7 Taskbar .NET Sample Library - an Overview - Windows 7 for Developers - The Wi... - 0 views

  • The MainDemo sample is a simple WinForm application that showcases all the functions that are expose via the API, including building a jump list with custom categories and custom tasks, setting an overlay icon and progress bar, and creating and handling events from Thumbnail Toolbar buttons:
  •  
    A series of samples including demonstrations of all the functions that are new in Windows 7 and exposed via the API, including: * building a jump list with custom categories and custom tasks, * setting an overlay icon and progress bar * creating and handling events from Thumbnail Toolbar buttons * customizing taskbar thumbnails
anonymous

Underscore.js - 3 views

  •  
    Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux.
Fabien Cadet

php.js : Use PHP functions in JavaScript - 5 views

  •  
    php.js is an open source project that brings high-level PHP functions to low-level JavaScript platforms such as web browsers, ...
consultgeek

Transform Your Business Using ERP Services and ERP Consultant - 0 views

  •  
    The full form of ERP is Enterprise Resource Planning. It is software that is used for business process management. The ERP software is used for managing the business and many back-office functions can be automated. It includes almost all the phases of the products of a company- planning, manufacturing, development, sales and marketing, etc. This software is usually designed for medium and large-scale companies. All this is handled by the specialist in ERP services- ERP Consultant.
  •  
    The full form of ERP is Enterprise Resource Planning. It is software that is used for business process management. The ERP software is used for managing the business and many back-office functions can be automated. It includes almost all the phases of the products of a company- planning, manufacturing, development, sales and marketing, etc. This software is usually designed for medium and large-scale companies. All this is handled by the specialist in ERP services- ERP Consultant.
iwebservices7

What Is the Future of Cross-Platform App Development? - 0 views

  •  
    Cross-platform apps have emerged as one of the most popular choices in the world of mobile app development due to the advantages they provide. In the technology-driven world today, there is a strong demand for apps without bugs. Quite naturally, businesses put in their best efforts to satisfy the customers with powerful apps without glitches. With enhanced user experience, businesses can get the opportunity of increasing revenue. Before you move ahead to the future of cross-platform apps, it is essential to understand what they mean for businesses. Cross-platform app development refers to the creation and delivery of mobile apps that can function effortlessly on different platforms, such as iOS and Android. It requires a single codebase to develop cross-platform apps. Among the popularly-known cross-platform apps, Flutter and React Native from Facebook are common among the app developers.
  •  
    Cross-platform apps have emerged as one of the most popular choices in the world of mobile app development due to the advantages they provide. In the technology-driven world today, there is a strong demand for apps without bugs. Quite naturally, businesses put in their best efforts to satisfy the customers with powerful apps without glitches. With enhanced user experience, businesses can get the opportunity of increasing revenue. Before you move ahead to the future of cross-platform apps, it is essential to understand what they mean for businesses. Cross-platform app development refers to the creation and delivery of mobile apps that can function effortlessly on different platforms, such as iOS and Android. It requires a single codebase to develop cross-platform apps. Among the popularly-known cross-platform apps, Flutter and React Native from Facebook are common among the app developers.
1 - 20 of 132 Next › Last »
Showing 20 items per page