[ create a new paste ] login | about

cam

Name:
Email:
Site/Blog:
Location:
Default language:
Favorite languages:
About:

Saved pastes by cam:

Plain Text, pasted on Jul 17:
1
2
3
4
5
//------changing button ui using code and changes at once

import UIKit
@IBDesignable

...
view (28 lines)
Plain Text, pasted on Jul 14:
1
big mountain videos
view (1 line)
Plain Text, pasted on Jul 13:
1
2
3
4
5
//
//  ViewController.swift
//  swftDemoProject
//
//  Created by Avinash Singh on 14/07/17.
...
view (47 lines)
Plain Text, pasted on Jul 12:
1
2
3
sharing text

https://stackoverflow.com/questions/35931946/basic-example-for-sharing-text-or-image-with-uiactivityviewcontroller-in-swift
view (3 lines)
Plain Text, pasted on Jul 12:
1
2
3
4
5
//
//  ViewController.swift
//  faceDetectionVisionApi
//
//  Created by Avinash Singh on 12/07/17.
...
view (87 lines)
Plain Text, pasted on Jul 12:
1
2
3
4
5
//face detection using vision api swift4

//
//  ViewController.swift
//  faceDetectionVisionApi
...
view (98 lines)
Plain Text, pasted on Jun 30:
1
2
  cc.team1@aol.com
CCteam123
view (2 lines)
Plain Text, pasted on Jun 10:
1
https://stackoverflow.com/questions/30446812/sort-swift-array-of-dictionaries-by-value-of-a-key
view (1 line)
Plain Text, pasted on May 14:
1
2
3
4
5
//
//  networkTopoViewController.swift
//  cig
//
//  Created by Avinash Singh on 29/11/16.
...
view (1337 lines)
Plain Text, pasted on May 12:
1
2
3
4
5
//
//  ViewController.swift
//  concepts
//
//  Created by AVINASH on 29/04/17.
...
view (121 lines)
Plain Text, pasted on May 12:
1
2
3
4
5
//
//  networkTopoViewController.swift
//  cig
//
//  Created by Avinash Singh on 29/11/16.
...
view (1353 lines)
Plain Text, pasted on May 11:
1
2
3
4
5
///network topo VC

//
//  networkTopoViewController.swift
//  cig
...
view (1257 lines)
Plain Text, pasted on May 8:
1
Avinashsinghtech@1984 // Apple ID
view (1 line)
C, pasted on May 5:
1
2
3
4
    var Rx_ByteArr : NSMutableArray = NSMutableArray()
    var Tx_ByteArr : NSMutableArray = NSMutableArray()
    var Rx_RateArr : NSMutableArray = NSMutableArray()
    var Tx_RateArr : NSMutableArray = NSMutableArray()
...
view (31 lines)
Plain Text, pasted on Apr 26:
1
2
3
4
5
//cig device info json for 4 devices

[
  {
    "dev_id": 4,
...
view (622 lines)
Plain Text, pasted on Apr 14:
1
2
3
4
5
 class func jsonParsingFromURL(URLString:String,RequestType:String,MethodName:String,RequestParameter:String) ->(NSArray)//->(NSDictionary)
    {
         var json: AnyObject!
        
        var status :Int = 0
...
view (97 lines)
Plain Text, pasted on Apr 10:
1
2
3
4
5
int maxRepeating(int* arr, int n, int k)
{
    // Iterate though input array, for every element
    // arr[i], increment arr[arr[i]%k] by k
    for (int i = 0; i< n; i++)
...
view (38 lines)
Plain Text, pasted on Apr 8:
1
2
3
4
5
[
  {
    "dev_id": 2,
    "dev_name": "WF802_4976",
    "dev_type": "",
...
view (365 lines)
Plain Text, pasted on Apr 4:
1
2
3
4
5
// converting JSON Data to JSON String

// function call 

...
view (48 lines)
Plain Text, pasted on Apr 4:
1
2
3
4
5
//
//  clientsViewController.swift
//  cig
//
//  Created by AVINASH on 01/12/16.
...
view (918 lines)
Plain Text, pasted on Apr 4:
1
http://stackoverflow.com/questions/26162616/upload-image-with-parameters-in-swift/26163136#26163136
view (1 line)
Plain Text, pasted on Mar 29:
1
2
3
4
5
 func  deviceDict(id:Int,mac:String,sn:String) -> NSMutableDictionary {
        
        self.dict.setValue(id, forKey: "id")
        self.dict.setValue(mac, forKey: "mac")
        self.dict.setValue(sn, forKey: "sn")
...
view (17 lines)
Plain Text, pasted on Mar 29:
1
2
3
4
token :
file :
auto_reboot:
devices:{ "devices":[ { "id":1, "mac":"00:19:C7:01:56:0F", "sn":"77863370" } ] }
view (4 lines)
Plain Text, pasted on Mar 28:
1
2
3
4
5
  // Do any additional setup after loading the view, typically from a nib.
        
       //  let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0]
      //   print("document directory path : \(documentsPath)")
      //  https://iosdevcenters.blogspot.com/2016/04/save-and-get-image-from-document.html
...
view (37 lines)
Plain Text, pasted on Mar 25:
1
2
3
4
5
// Bit byte conversion 

class func bitByteConversion(bytes:Int) -> String
{
    
...
view (74 lines)
Plain Text, pasted on Mar 19:
1
2
3
4
5
//Modified utility helper class

import UIKit

class utilityClass
...
view (156 lines)
Plain Text, pasted on Mar 18:
1
2
3
4
5
 @IBAction func moreBtnClk(sender: AnyObject)
    {
        
      utilityClass.toggleFunction(self.appdel.togggleCnt,moreBtnView:self.moreViewOutlet)

...
view (6 lines)
Plain Text, pasted on Mar 18:
1
2
3
4
5
// helper class

import UIKit

class utilityClass
...
view (142 lines)
Plain Text, pasted on Mar 9:
1
 self.searchTextOutlet.attributedPlaceholder = NSAttributedString(string:"Search by device type....", attributes:[NSForegroundColorAttributeName: UIColor.grayColor(),NSFontAttributeName :UIFont(name: "Arial", size: 14)!])
view (1 line)
Plain Text, pasted on Feb 18:
1
2
3
4
5
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
    // do your task

    dispatch_async(dispatch_get_main_queue()) {
        // update some UI
...
view (7 lines)
C, pasted on Feb 4:
1
2
3
4
//json parsing from file helper class

class helperClass
{
...
view (31 lines)
Plain Text, pasted on Jan 29:
1
2
3
4
5
//sending synchronous request

//helper class

extension NSURLSession {
...
view (112 lines)
Plain Text, pasted on Jan 25:
1
2
3
4
5
 func parsing()
    {
        let filePath = NSBundle.mainBundle().pathForResource("dev_info",ofType:"json")
        
        if let data = NSData(contentsOfMappedFile: filePath!)
...
view (222 lines)
Plain Text, pasted on Jan 25:
1
2
3
4
5
 func parsing()
    {
        let filePath = NSBundle.mainBundle().pathForResource("dev_info",ofType:"json")
        
        if let data = NSData(contentsOfMappedFile: filePath!)
...
view (202 lines)
Plain Text, pasted on Jan 22:
1
2
3
4
5
// class level function 

import UIKit

class validation
...
view (28 lines)
Plain Text, pasted on Jan 20:
1
2
3
And please note that, the login token will be timeout after 5 minutes. After that, you need to login again for the new token.

Higgins
view (3 lines)
Plain Text, pasted on Jan 19:
1
2
3
4
5
[
  {
    "dev_id": 1,
    "dev_name": "WF802_B0274976",
    "dev_type": "",
...
view (169 lines)
Plain Text, pasted on Jan 18:
1
https://www.versioneye.com/objective-c/cocoaasyncsocket/references?page=1
view (1 line)
Plain Text, pasted on Dec 21:
1
2
3
4
5
//21 december

   let filePath = NSBundle.mainBundle().pathForResource("dev_info",ofType:"json")
        
        if let data = NSData(contentsOfMappedFile: filePath!)
...
view (99 lines)
Plain Text, pasted on Dec 20:
1
2
3
4
5
{
	"deviceInfoList": [{
			"dev_id": "1",
			"dev_name": "house_1",
			"dev_type": "wf802gw",
...
view (423 lines)
Plain Text, pasted on Dec 20:
1
2
3
4
5
{
	"deviceInfoList": [{
			"dev_id": "1",
			"dev_name": "house_1",
			"dev_type": "wf802gw",
...
view (568 lines)
Plain Text, pasted on Dec 20:
1
2
3
4
5
{
    "dev_size" : 1,
    "dev_list" : [
                  {
                  "dev_id": 1,
...
view (76 lines)
Plain Text, pasted on Dec 20:
1
2
3
4
5
  let filePath = NSBundle.mainBundle().pathForResource("devList",ofType:"json")
        
        if let data = NSData(contentsOfMappedFile: filePath!)
        {
            do {
...
view (38 lines)
Plain Text, pasted on Dec 15:
1
https://www.codebeaulieu.com/34/Creating-a-UITableViewController-with-sections-in-iOS-9
view (1 line)
Plain Text, pasted on Dec 14:
1
live:avinash.singh_20
view (1 line)
C, pasted on Dec 12:
1
sbi credit card 9540765999
view (1 line)
C, pasted on Dec 11:
1
2
3
4
5
// filtering

func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
        let predicate = NSPredicate(format:"Name == %@", searchText)
        let filteredArray = (arrContact as NSMutableArray).filteredArrayUsingPredicate(predicate)
...
view (13 lines)
Plain Text, pasted on Nov 25:
1
2
3
4
https://gitlab.com/yogeshc/awesome-ios#networking

https://github.com/robbiehanson/CocoaAsyncSocket

view (4 lines)
Plain Text, pasted on Nov 25:
1
2
3
4
5
https://bitbucket.org/mobileprogrammingllc/cig_ios

Mobileorchard.com


...
view (18 lines)
Plain Text, pasted on Nov 25:
1
https://www.versioneye.com/objective-c/cocoaasyncsocket/references
view (1 line)
Plain Text, pasted on Nov 25:
1
2
3
4
5
https://bitbucket.org/mobileprogrammingllc/cig_ios

Mobileorchard.com

https://www.hackingwithswift.com/example-code/system/how-to-create-a-peer-to-peer-network-using-the-multipeer-connectivity-framework
...
view (13 lines)