This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.*; | |
| class LongestSubstringKDistinct { | |
| public static int findLength(String str, int k) { | |
| int windowStart = 0, maxLength = 0; | |
| Map<Character, Integer> charFrequencyMap = new HashMap<>(); | |
| for (int windowEnd = 0; windowEnd < str.length(); windowEnd++) { | |
| char rightChar = str.charAt(windowEnd); | |
| charFrequencyMap.put(rightChar, charFrequencyMap.getOrDefault(rightChar, 0) + 1); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Convert the .cer file into a .pem file: | |
| $ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
| # Convert the private key’s .p12 file into a .pem file: | |
| $ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem | |
| # Finally, combine the certificate and key into a single .pem file | |
| $ cat PushChatCert.pem PushChatKey.pem > ck.pem | |
| # At this point it’s a good idea to test whether the certificate works. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | - (void)viewDidLoad { | |
| [super viewDidLoad]; | |
| self.videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionFront]; | |
| self.videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait; | |
| // self.avatarView is a non full screen GPUImageView instance | |
| // created in Storyboard | |
| [self.videoCamera addTarget:self.avatarView]; | |
| [self.videoCamera startCameraCapture]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Install FFmpeg | |
| https://www.faqforge.com/linux/how-to-install-ffmpeg-on-ubuntu-14-04/ | |
| Nginx server: | |
| https://blog.100tb.com/how-to-set-up-an-rtmp-server-on-ubuntu-linux-using-nginx | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include<iostream> | |
| using namespace std; | |
| bool isBinarySearchFoundElement(int* arrData,int searchElement,int left, int right){ | |
| if(left > right){ | |
| return false; | |
| } | |
| int mid = left + (right-left)/2; | |
| if(arrData[mid] == searchElement){ | |
| return true; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <iostream> | |
| #include<cstdio> | |
| #include<cstdlib> | |
| using namespace std; | |
| void mergeSortedArrays(int* arrData,int *arrLeft,int leftCount,int* arrRight, int rightCount){ | |
| int i =0,j=0,k=0; | |
| while(i < leftCount && j < rightCount){ | |
| if(arrLeft[i] < arrRight[j]){ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <cmath> | |
| #include <cstdio> | |
| #include <vector> | |
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| struct Player { | |
| string name; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <iostream> | |
| using namespace std; | |
| int getPartitionPoint(int* arrData, int low, int high){ | |
| //Set pivot | |
| int pivot = arrData[(low+high)/2]; | |
| while(low < high){ | |
| //Move pointer for left half | |
| while(arrData[low] < pivot){ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | extension Bundle { | |
| var apiBaseURL: String { | |
| return object(forInfoDictionaryKey: "serverBaseURL") as? String ?? "" | |
| } | |
| } | |
| //And call it from the code like this: | |
| let baseURL = Bundle.main.apiBaseURL | 
NewerOlder