Tutorial by Examples: e

public static void cleanUpOldData(AmazonDynamoDB amazonDynamoDB, String dynamoDBTablesPrefix, String tableName, String dateRangeField, String dateHashKey, String dateIndex, Class clazz) { log.info(String.format("Cleaning old data from table: %s", tab...
To generate json user model with username, password_hash, email_id, created_at, updated_at, type mix phoenix.gen.json User users username:string email_id:string password_hash:string timestamps()
np.save and np.load provide a easy to use framework for saving and loading of arbitrary sized numpy arrays: import numpy as np a = np.random.randint(10,size=(3,3)) np.save('arr', a) a2 = np.load('arr.npy') print a2
The following code sample demonstrates a quick and easy means of encrypting and decrypting files using the AES symmetric encryption algorithm. The code randomly generates the Salt and Initialization Vectors each time a file is encrypted, meaning that encrypting the same file with the same password ...
First, you will need to install Push.js module. $ npm install push.js --save Or import it to your front-end app through CDN <script src="./push.min.js"></script> <!-- CDN link --> After you are done with that, you should be good to go. This is how it should look l...
Keep in mind that this will not work on Apple devices (I didnt test them all), but if you want to make push notifications check OneSignal plugin.
When you run mix phoenix.gen.html or mix phoenix.gen.json from command line, migrations are created in priv -> repo -> migrations in your project folder. To run migrations type mix ecto.migrate. To generate migrations for your project mix ecto.gen migrations <model_name> To generate m...
class UserRegistration(APIView): def post(self, request, *args, **kwargs): serializer = UserRegistrationSerializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save() return Response(serializer.to_representation(instance=serializer....
$http.post("\<domain\>/user-registration/", {username: username, password: password}) .then(function (data) { // Do success actions here });
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Detailed instructions on getting symfony-forms set up or installed.
Encoded URL http%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty Use this command to decode the URL echo "http%3A%2F%2Fwww.foo.com%2Findex.php%3Fid%3Dqwerty" | sed -e "s/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g" | xargs -0 echo -e Decoded URL (result of command) http://www.foo...
To remove whitespace (spaces, tabs, newlines…) between HTML tags use spaceless tag: {% spaceless %} <div> <span>foo bar </span> </div> {% endspaceless %} {# produces output <div><strong>foo bar </strong></div> #} If you need ...
This is an example to explain the variations of load events. onload event <body onload="someFunction()"> <img src="image1" /> <img src="image2" /> </body> <script> function someFunction() { console.log("Hi! I am l...
In order to use bootstrap, there are 2 cases. The electron app is connected to internet The electron app is not connected to internet For electron apps that are connected to internet, we can just make use of CDN links for bootstrap and include that in our html files. The problem comes when w...
This example grabs the Node.gitignore file from GitHub's gitignore repository, downloads it to your current working directory and renames it to .gitignore - all very typical actions for someone starting a new node.js project. $ curl http://github.com/github/gitignore/raw/master/Node.gitignore -o .g...
navigate to the desired file in a repository click the 'raw' button copy the url from the address bar See the following example from GitHub's gitignore repository: http://github.com/github/gitignore/raw/master/Node.gitignore You can quickly recognize a url that will work to download an indiv...
#!bin/bash $ string='Question%20-%20%22how%20do%20I%20decode%20a%20percent%20encoded%20string%3F%22%0AAnswer%20%20%20-%20Use%20printf%20%3A)' $ printf '%b\n' "${string//%/\\x}" # the result Question - "how do I decode a percent encoded string?" Answer - Use printf ...
Detailed instructions on getting metal set up or installed.

Page 1184 of 1191