Tutorial by Examples: ce

Here are some basic best practices for Excel: Flat File Database - Excel IS a Flat File application and should be treated as such Less Worksheet/Workbooks is more. Analyzing will be much faster with fewer worksheets/workbooks to go through. Try to ensure that all raw data is on one workshe...
A simple OGL 4.0 GLSL shader program that shows the use shader subroutines. The program is executed with a phyton script. To run the script, PyOpenGL and NumPy must be installed. The subroutines switch between different geometry generated in the geometry shader and change the surface representatio...
STUFF(Original_Expression, Start, Length, Replacement_expression) STUFF() function inserts Replacement_expression, at the start position specified, along with removing the characters specified using Length parameter. Select FirstName, LastName,Email, STUFF(Email, 2, 3, '*****') as StuffedEmail Fr...
1.The Unit return type declaration is optional for functions. The following codes are equivalent. fun printHello(name: String?): Unit { if (name != null) println("Hello ${name}") } fun printHello(name: String?) { ... } 2.Single-Ex...
Gpars offers intuitive ways to handle tasks concurrently import groovyx.gpars.* GParsPool.withPool { def result = dataList.collectParallel { processItem(it) } }
In practice, shiny Apps are often very complicated and full of features that have been developed over time. More often than not, those additional details are not necessary to reproduce your issue. It is best if you skip such details when writing MCVE's. WRONG Why is my plot not showing? libra...
function REReplaceCallback(re,str,callback) { /* Thanks to Ben Nadel "Learning ColdFusion 8: REMatch() For Regular Expression Matching" from 2007-06-13 https://www.bennadel.com/blog/769-learning-coldfusion-8-rematch-for-regular-expression-matching.h...
REReplaceCallback('YOUR REGEX GOES HERE','AND YOUR STRING HERE',function(groups) { //now you can access the 'groups' array containing all the captured groups return result; //return whatever you've processed inside });
Define a custom loss function: import keras.backend as K def euclidean_distance_loss(y_true, y_pred): """ Euclidean distance loss https://en.wikipedia.org/wiki/Euclidean_distance :param y_true: TensorFlow/Theano tensor :param y_pred: TensorFlow/Theano ...
Large chunks of code can also be "commented out" using the preprocessor directives #if 0 and #endif. This is useful when the code contains multi-line comments that otherwise would not nest. #if 0 /* Starts the "comment", anything from here on is removed by preprocessor */ /*...
You can perform the same change instead of using Vue.$set by using the Array prototype's splice() new Vue({ el: '#app', data:{ myArr : ['apple', 'orange', 'banana', 'grapes'] }, methods:{ changeArrayItem: function(){ //this will not work ...
For really huge search results, you can use dedicated Map/Reduce script. It is much more inconvenient, but sometimes unavoidable. And sometimes could be very handy. The trick here is, that in Get Input Data stage, you can provide to the NS engine not the actual data (i.e. script result), but just t...
Consider the following HTML markup: <section> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> <p>...
A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched p...
<cfscript> api_request = GetHttpRequestData(); api = createObject("component","myAPI").init(); </cfscript> <cfif api_request.method is 'GET'> <cfoutput>#api.welcome()#</cfoutput> <cfelseif api_request.method is 'POST'> ...
File structure / -src/ awesome.service.ts another-awesome.service.ts awesome.module.ts -index.ts -tsconfig.json -package.json -rollup.config.js -.npmignore Service and module Place your awesome work here. src/awesome.service.ts: export ...
Celery requires a broker to handle message-passing. We use RabbitMQ because it’s easy to setup and it is well supported. Install rabbitmq using the following command sudo apt-get install rabbitmq-server Once the installation is complete, create user, add a virtual host and set permissions. sud...
Listing services systemctl To list running services systemctl --failed To list failed services Managing Targets (Similar to Runlevels in SysV) systemctl get-default To find the default target for your system systemctl set-default <target-name> To set the default target for your syst...
#include opencv2/opencv.hpp> #include vector> using namespace std; using namespace cv; int main() { Mat3b img = imread("test.jpg"); imshow("Original", img); // Cluster int K = 8; int n = img.rows * img.cols; Mat data = img.reshape(1, n); data.convertTo(data, CV_32F); ...
When you use python file as module there is no need always check if package is installed but it is still useful for scripts. if __name__ == '__main__': try: import requests except ImportError: print("To use this module you need 'requests' module") t ...

Page 130 of 134