Problem: I want to display a string like this in a UILabel: Where the number 5 is red in color and the rest of the string Solution: NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithAttributedString: label.attributedText]; [text addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(10, 1)]; [label setAttributedText: text]; OR NSMutableAttributedString …

Upgrade Vanilla 1.1 to 2.3
Please Follow Following Step:- – Download New Vanilla 2.3 installer – Install Vanilla 2.3 into localhost – copy all folder (everything except conf/, cache/, uploads/, custom themes/and custom plugins/ htaccess) – before paste delete all folder from old vanilla (except conf/, cache/, uploads/, custom themes/and …
Get orientation from video or thumb obtained with AVAssetImageGenerator
Solution: Need to add following line under above method generator.appliesPreferredTrackTransform=true
Retrieve Last Logout timestamp for xmpp / openfire users
Overview : We are not able to find any plug-in in openfire for sending push notification to offline group members. Therefore, We have used cron job to send push notification and the cron job will run at every 10 seconds. The Cron job will have …
Quickbook integration with yii1 error
When this issue raised? Quickbook integration with yii1 framework failed because of quickbook SDK’s internally used another 3rd party library which cause the issue. Every time it throws the error like “Failed to open stream: No such file or directory found”. How to solve it? …
Merge Audio with Video
To create app like Dubsmash. <https://itunes.apple.com/in/app/dubsmash/id918820076?mt=8> I have merged audio file of any dialogue or song with captured video. Check method to merge video with audio :- // MARK: – Merge Video func mergeVideoWithAudio() { let mutableComposition = AVMutableComposition() var mutableCompositionVideoTrack …
Swift : Nil Collision Operator ,Save Your iPhone app from random crashes.
Nil-Coalescing Operator: The nil-coalescing operator (a ?? b) unwraps an optional a if it contains a value, or returns a default value b if a is nil. The expression a is always of an optional type. The expression b must match the type that is …
Jquery – Custom dropdown with search functionality
That time you can create your custom drop-down with search functionality For that first add JS and CSS file into your project. you can find js & CSS file from here custom-dropsown. After Download that Code you can add that references in you page. and put …
Slow page load
Problem Client was running into an issue where his website pages were taking a really long time to load. Solution The following .htaccess code helped me to solve the issue. #Force non-www: #RewriteEngine On #RewriteCond %{HTTP_HOST} !^www\. #RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # REDIRECT TO UNDER CONSTRUCTION …
Turn on speakerphone whenever an outgoing call is made
You can set it through programmatically as below : AudioManager audioManager = (AudioManager)getApplicationContext().getSystemService(Context.AUDIO_SERVICE); audioManager.setMode(AudioManager.MODE_IN_CALL); audioManager.setSpeakerphoneOn(true); But, keep in mind that don’t forgot to set speaker off when stop the call: audioManager.setSpeakerphoneOn(false); And, Set permission in manifest: android.permission.RECORD_AUDIO android.permission.MODIFY_AUDIO_SETTINGS This code is working fine for me.hope …