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
| mImageView = (ImageView) findViewById(R.id.imageView1); | |
| mImageView.setImageResource(R.drawable.camera); |
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
| func getLatestCounterNumber() { | |
| var int = 0 | |
| ref = Database.database().reference() | |
| ref.observeSingleEvent(of: .value, with: { snapshot in | |
| if !snapshot.exists() { return } | |
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
| //swift 4.0 | |
| func convertpdfToImage(url: URL) -> UIImage? { | |
| guard let document = CGPDFDocument(url as CFURL) else { return nil } | |
| guard let page = document.page(at: 1) else { return nil } | |
| let pageRect = page.getBoxRect(.mediaBox) | |
| let renderer = UIGraphicsImageRenderer(size: pageRect.size) | |
| let img = renderer.image { ctx in | |
| UIColor.white.set() | |
| ctx.fill(pageRect) |
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
| //this is an snippet from previous code on UIALert (show up modal) | |
| @IBAction func setExpenditure(_ sender: Any) { | |
| let alert = UIAlertController(title: "Description", message: "Edit or cancel", preferredStyle: .alert) | |
| alert.addTextField { (textfield: UITextField) in | |
| } | |
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 tensorflow as tf | |
| # node1 = tf.constant(3.0, tf.float32) | |
| # node2 = tf.constant(4.0) | |
| # sess = tf.Session() | |
| # print(sess.run([node2, node1])) |
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
| from xml.dom import minidom | |
| from datetime import datetime | |
| import csv | |
| import xml.dom.minidom | |
| workshops = minidom.parse('list_of_workshops.xml') | |
| policy_holder_rules = minidom.parse('policy_holder_rules.xml') | |
| cars_model_exclude_honda = minidom.parse('carlist_exclude_honda.xml') | |
| honda_cars = minidom.parse('carlist_model_honda.xml') |
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
| package com.spring.model; | |
| public class Login { | |
| private String username; | |
| private int passcode; | |
| public String getUsername() { | |
| return username; | |
| } | |
| public void setUsername(String username) { |
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
| <!DOCTYPE html> | |
| <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> | |
| <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> |
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
| // | |
| // TestViewController.swift | |
| // etiqa-autoclaim | |
| // | |
| // Created by izzuddin on 25/10/2017. | |
| // Copyright © 2017 etiqa. All rights reserved. | |
| // | |
| import UIKit | |
| import Foundation |
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 <Foundation/Foundation.h> | |
| #import "BNRTest.h" | |
| @interface BNRHelp : NSObject | |
| { | |
| NSString *_helpName; | |
| } | |
| @property (nonatomic) NSString *luar; |