Below class to append/concat two mp4 files using mp4parser. public class Mp4ParserWrapper { public static final String TAG = Mp4ParserWrapper.class.getSimpleName(); public static final int FILE_BUFFER_SIZE = 1024; /** * Appends mp4 audio/video from {@code anotherFileName} to {@code mainFileName}. */ public static boolean append(String mainFileName, String …
Technology
Boomerang with FFMpeg – Android
If you want to create Boomerang with FFmpeg command then you can use below command to use. Single command to create boomerang video ffmpeg -y -i input.mp4 -filter_complex [0]reverse[1];[0][1]concat=n=2,setpts=0.5*PTS output/boomerrang.mp4 where setpts=0.5*PTS : This is for fast video. [0]reverse[1] : this is for reversing the input video Still …
Generic Recycleview with Adapter in Kotlin
Now I will show you how to use Generic RecycleView for different View Types. First of creating Generic Recycleview Adapter (GenericAdapter) class as below. import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup abstract class GenericAdapter : RecyclerView.Adapter { var listItems: List constructor(listItems: List) { this.listItems …
UICollectionView Auto Slider
Collection view auto scroll Data Like (Slider) Collection view scroll automatically next page every 3.0 seconds First Outlet Of CollectionView @IBOutlet weak var cvWeeklyDeals: UICollectionView! 2. creating Timer to call every 3.0 seconds call to method func startTimer() { let timer = Timer.scheduledTimer(timeInterval: 3.0, …
UITableView – Reverse Pagination
As a solution i found that we need to transform our UITableview. So all the contents in the UItableview are transformed. You need to transform Cell, You need to implement header instead of footer and vice-versa. We need much more time to do this, so …
Bootstrap 4 Multi-slide jQuery Slider
Check here:- http://inheritxdev.net/CPT/new_inx/
Sample code for sending push notifications
Please update the code a/c to requirements. Sample Code Please update if any better alternative.
Issue in file upload through PHP – cURL
Problem File not being uploaded on server through PHP – cURL Solution The CURLFile interface must be used to upload files. Code <?php $url = ‘http://192.168.1.94:5000/api/v1/upload-picture’; $img = ‘img/placeholder.png’; // Form-data $data_array = array( ‘id’ => 1, ‘picture_type’ => ‘user’, ‘file’ => new CurlFile($img) …
Change format of date/string like 5:00 to 05:00
-(NSString *)setDateInFormat:(NSString *)strTxt { NSArray *arr = [strTxt componentsSeparatedByString:@”:”]; NSString *str = [arr objectAtIndex:0]; if ([str length] < 2) { if (![str hasPrefix:@”0″]) { …
Compress image without changing image dimensions
We have to write a single line to compress the image at a time when we are uploading our image to a server. NSData *dataForPNGFile = UIImageJPEGRepresentation(imgPicked, 0.0f); 0.0f is the maximum & 1.0f is the minimum compress ratio we can change based on our …