This file contains 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
// | |
// ViewController.swift | |
// vpn-client | |
// | |
// Created by Aravindh Kumar on 9/13/23. | |
// | |
import UIKit | |
import Network | |
import NetworkExtension |
This file contains 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
func handlePacket(packetData: Data,syntheticIp: String) { | |
if(syntheticIp == "" || syntheticIp.isEmpty){ | |
os_log(.default, log: self.log, "*****No synthetic ip found") | |
return | |
} | |
let udpPayload : Data = packetData[28..<packetData.count] | |
do { | |
//to deserialize we used https://github.com/Bouke/DNS | |
let dnsQuery = try Message(deserialize: udpPayload) |
This file contains 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 'dart:io'; | |
import 'dart:async'; | |
import 'dart:typed_data'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
//import 'package:path_provider/path_provider.dart'; | |
//import 'package:simple_permissions/simple_permissions.dart'; |
This file contains 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 'package:flutter/material.dart'; | |
import 'package:draggable_scrollbar/draggable_scrollbar.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:faker/faker.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
This file contains 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
//access the wavy header in body by below code | |
return Scaffold( | |
body: Container(height:200.0,child: new WavyHeader()), | |
); | |
//creates a curve with 3 curves merged by using stack | |
// ref link | |
https://iirokrankka.com/2017/09/04/clipping-widgets-with-bezier-curves-in-flutter/ |
This file contains 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 'dart:async'; | |
import 'dart:io'; | |
import 'package:camera/camera.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
import '/utils.dart'; | |
This file contains 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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
This file contains 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
// Swift 2.3 Xcode 7.3.1 | |
import UIKit | |
class swipeViewController: UIViewController, UICollectionViewDelegateFlowLayout, UICollectionViewDataSource { | |
let fontName: String = "Aileron-Regular" | |
let fontSize: CGFloat = 16 | |
var collectionView: UICollectionView! | |
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() |
This file contains 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
let loggedIn_array = ((loggedInUserSolution.valueForKey("solutions") as? NSArray ?? NSArray()).sort{ | |
(($0 as? Dictionary<String, String> ?? Dictionary<String, String>())["solution_id"]) < (($1 as? Dictionary<String, String> ?? Dictionary<String, String>())["solution_id"]) | |
}) as NSArray | |
let opposite_array = ((oppositeUserSolution.valueForKey("solutions") as? NSArray ?? NSArray()).sort{ | |
(($0 as? Dictionary<String, String> ?? Dictionary<String, String>())["solution_id"]) < (($1 as? Dictionary<String, String> ?? Dictionary<String, String>())["solution_id"]) | |
}) as NSArray | |
print("loggedIn_array ::\(loggedIn_array)") | |
print("opposite_array ::\(opposite_array)") |
This file contains 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
sortedarray = storedarray.sort{ | |
(($0 as! Dictionary<String, AnyObject>)["time"] as? Int) < (($1 as! Dictionary<String, AnyObject>)["time"] as? Int) | |
} |
NewerOlder