Tutorial by Examples: change

os.chmod(path, mode) where mode is the desired permission, in octal.
If you just want to get data, but not modify anything, you can turn off change tracking and proxy creation. This will improve your performance and also prevent lazy loading. Bad Example: using(var context = new Context()) { return await context.Set<MyEntity>().ToListAsync().ConfigureAw...
archive: create an unversioned archive of a repository revision bundle: create a changegroup file clone: make a copy of an existing repository export: dump the header and diffs for one or more changesets graft: copy changes from other branches onto the current branch incoming: show new change...
RecyclerView will perform a relevant animation if any of the "notify" methods are used except for notifyDataSetChanged; this includes notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRemoved, etc. The adapter should extend this class instead of RecyclerView.Adapter. impo...
Set default layout for entire application. i.e, created layout file in /src/Template/Layout/admin.ctp class AppsController extends Controller { public function beforeFilter(Event $event) { parent::beforeFilter($event); $this->viewBuilder()->layout('admin'); // For Ver...
Thanks to this great post If we want to mimic the Sitecore UI behavior and execute the command which will change the workflow state, we need to use WorkflowProvider to get an instance of the workflow assigned to the given item and call Execute method with a chosen command ID. This will fire all the...
.gitignore and .git/info/exclude work only for untracked files. To set ignore flag on a tracked file, use the command update-index: git update-index --skip-worktree myfile.c To revert this, use: git update-index --no-skip-worktree myfile.c You can add this snippet to your global git config ...
Some common operations in MATLAB, like differentiation or integration, output results that have a different amount of elements than the input data has. This fact can easily be overlooked, which would usually cause errors like Matrix dimensions must agree. Consider the following example: t = 0:0.1:1...
All we need to do is to use set() method of $query object. It takes two arguments, first what we want to set and second what value to set. add_action( 'pre_get_posts', 'change_posts_per_page' ); function change_posts_per_page( $query ) { if( !$query->is_main_query() || is_admin() ) retu...
Changing an auto-increment value is useful when you don't want a gap in an AUTO_INCREMENT column after a massive deletion. For example, you got a lot of unwanted (advertisement) rows posted in your table, you deleted them, and you want to fix the gap in auto-increment values. Assume the MAX value o...
# list gem sources: gem sources -l # remove default gem source: gem sources -r https://rubygems.org/ # add other gem sources: gem sources -a https://ruby.taobao.org/
You can register for notifications of when the device text size is changed. Swift NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(updateFont), name: name:UIContentSizeCategoryDidChangeNotification, object: nil) Objective-C [[NSNotificationCenter defaultCenter] addObs...
Whenever you change data, in a Data Manipulation Language(DML) command, you can wrap your changes in a transaction. DML includes UPDATE, TRUNCATE, INSERT and DELETE. One of the ways that you can make sure that you're changing the right data would be to use a transaction. DML changes will take a loc...
Steps to Reproduce (Turbo Forms, CRM 2015.1, --> CRM 2016.2) Form (with or without other required fields) has one field that is empty and required. Lose focus on the empty field ("title" in this example), this triggers the Field Notification Icon: Wire up onChange Handler for emp...
When we want to change root password in windows, We need to follow following steps : Step 1 : Start your Command Prompt by using any of below method : Perss Crtl+R or Goto Start Menu > Run and then type cmd and hit enter Step 2 : Change your directory to where MYSQL is installed, In my case i...
If your application doesn't need to update resources during a specific configuration change and you have a performance limitation that requires you to avoid the activity restart, then you can declare that your activity handles the configuration change itself, which prevents the system from restartin...
Making an app adaptive – that is, responding to size class changes by changing your layout – often involves lots of help from the Auto Layout system. One of the primary ways apps become adaptive is by updating the active Auto Layout constraints when a view's size class changes. For example, conside...
Properties with notify:true also fires an event <link rel="import" href="../bower_components/paper-input/paper-input.html"> <dom-module id="property-change-event"> <template> <style></style> <paper-input id="input&quo...
The revert command allows discarding unwanted uncommitted changes. Reverting changes to a single file. hg revert example.c Reverting all changes. This will discard all changes not just the current directory. hg revert --all hg will output which files were reverted. reverting exa...
If you are using library that contains (for example) AwesomeViewController with a wrong status bar color you can try this: let awesomeViewController = AwesomeViewController() awesomeViewController.navigationBar.barStyle = .blackTranslucent // or other style

Page 5 of 10