Tutorial by Examples: pre

After you installed XAMPP and setup the MySQL database you can install WordPress. Download the latest version of WordPress. Unzip the file and insert the folder in the root directory of your webserver (if you used the suggested path during the setup of XAMPP it is "c:\xampp\htdocs"). ...
If you add this to your functions.php it removes the WordPress version number from the RSS feed and the header. function remove_wordpress_ver() { return ''; } add_filter('the_generator', 'remove_wordpress_ver', 999);
You can use any name for the function. function custom_postype(){ register_post_type('cus_post',array( 'labels'=>array( 'name'=>'khaiyam'// Use any name you want to show in menu for your users ), 'public'=>true,// **Must required ...
You finished your app, tested on debug mode and it is working perfect. Now, you want to prepare it to publish in the Google Play Store. Xamarin documentation provides good informations in here: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/...
ScriptAnalyzer ships with sets of built-in preset rules that can be used to analyze scripts. These include: PSGallery, DSC and CodeFormatting. They can be executed as follows: PowerShell Gallery rules To execute the PowerShell Gallery rules use the following command: Invoke-ScriptAnalyzer -Path /...
Dialog dlg; DialogGroup dGrp; DialogField dialogField; dlg = new Dialog("Evil Dialog"); dGrp = dlg.addGroup("A Group"); dialogField = dlg.addFieldValue(extendedTypeStr(NoYesId), NoYes::Yes, "I hereby sell my soul"); if (dlg.run()) { info(dialogField.valu...
In Java: Call the setAutoSizeTextTypeUniformWithPresetSizes() method: setAutoSizeTextTypeUniformWithPresetSizes(int[] presetSizes, int unit) In XML: Use the autoSizePresetSizes attribute in the layout XML file: <TextView android:id=”@+id/autosizing_textview_presetsize” android:la...
The default configuration <C-b> is not the easiest to use. It'd be better to use something like ctrla. To do so, add this to tmux.conf # remap prefix from 'C-b' to 'C-a' unbind C-b set-option -g prefix C-a bind-key C-a send-prefix
The TestProducerfrom this example produces Integerobjects in a given range and pushes them to its Subscriber. It extends the Flowable<Integer> class. For a new subscriber, it creates a Subscription object whose request(long) method is used to create and publish the Integer values. It is impor...
To initialise chat service use: QBChatService.setDebugEnabled(true); // enable chat logging QBChatService.setDefaultPacketReplyTimeout(10000);//set reply timeout in milliseconds for connection's packet. Can be used for events like login, join to dialog to increase waiting response time from ...
Creating Express Web Server Express server came handy and it deeps through many user and community. It is getting popular. Lets create a Express Server. For Package Management and Flexibility for Dependency We will use NPM(Node Package Manager). Go to the Project directory and create package....
def main(): if len(sys.argv) != 4 or '--help' in sys.argv[1:]: print('usage: my_program <arg1> <arg2> <arg3>', file=sys.stderr) sys.exit(1) # use an exit code to signal the program was unsuccessful process_data()
XSS means cross-site scripting. CodeIgniter comes with XSS filtering security. This filter will prevent any malicious JavaScript code or any other code that attempts to hijack cookie and do malicious activities. To filter data through the XSS filter, use the xss_clean() method as shown below. $data...
SQL injection is an attack made on the database query. In PHP, we use mysql_real_escape_string() function to prevent this along with other techniques but CodeIgniter provides inbuilt functions and libraries to prevent this. We can prevent SQL Injection in CodeIgniter in the following three ways − ...
CSRF stands for cross-site request forgery. You can prevent this attack by enabling an option in the application/config/config.php file as shown below. $config['csrf_protection'] = TRUE; When you create a form using the form_open() function, it will automatically insert a CSRF token in a hidden ...
Don't rely on any user input. user input everything like <script> tag or any javascript alert(); so we have to prevent this all data will no run in our browser. so we have to use xss prevention method to restrict our secure data to kept in hacker hand and also it's developer's responsibility t...
Simple Codec Here to illustrate the working principle we can use simple encryption and decryption as follows. public static String encrypt(String input) { // Simple encryption, not very strong! return Base64.encodeToString(input.getBytes(), Base64.DEFAULT); } public static String dec...
Simple Codec Here to illustrate the working principle we can use simple encryption and decryption as follows. public static String encrypt(String input) { // Simple encryption, not very strong! return Base64.encodeToString(input.getBytes(), Base64.DEFAULT); } public static String dec...
Compress-Archive -Path C:\Documents\* -CompressionLevel Optimal -DestinationPath C:\Archives\Documents.zip This command: Compresses all files in C:\Documents Uses Optimal compression Save the resulting archive in C:\Archives\Documents.zip -DestinationPath will add .zipif not present. -Li...
Compress-Archive -Path C:\Documents\* -Update -DestinationPath C:\Archives\Documents.zip this will add or replace all files Documents.zip with the new ones from C:\Documents

Page 32 of 34