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
| ' MS Access VBA: export to Excel and create a pivot table | |
| Dim TheDate As Date | |
| TheDate = Now() | |
| Dim strFilePath As String | |
| strFilePath = "C:\Temp\filename_" & Month(TheDate) & "-" & Day(TheDate) & "-" & Year(TheDate) & ".xls" | |
| DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "my_query_here", strFilePath, 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
| Public Function MakeExcelPivot() As Boolean | |
| On Error GoTo Err_MakeExcelPivot | |
| Dim TheDate As Date | |
| TheDate = Now() | |
| Dim strFilePath As String | |
| strFilePath = "D:\blah" & Month(TheDate) & "-" & Day(TheDate) & "-" & Year(TheDate) & ".xls" | |
| If Len(Dir(strFilePath)) > 0 Then |
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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/08/webview-using-swift-with-progress-indicator-tutorial | |
| import UIKit | |
| class ViewController: UIViewController, UIWebViewDelegate { | |
| @IBOutlet weak var webView: UIWebView! | |
| @IBOutlet weak var progressIndicator: UIActivityIndicatorView! | |
| override func viewDidLoad() { |
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
| # http://stevesohcot.com/tech-lessons-learned/2016/05/11/rails-create-admin-namespace | |
| # /app/controllers/admin/base_controller.rb | |
| class Admin::BaseController < ApplicationController | |
| before_action :admin_only | |
| layout "admin" | |
| private |
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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/15/android-webview-sample-code/ | |
| package com.diamondium.hashtagsaver; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.webkit.WebView; | |
| import android.webkit.WebViewClient; | |
| public class MainActivity extends Activity { |
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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/15/android-webview-sample-code | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.diamondium.hashtagsaver" > | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/15/android-webview-sample-code | |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <WebView | |
| android:layout_width="fill_parent" |
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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/15/android-cannot-resolve-method-startactivityandroid-content-intent | |
| package com.diamondium.hashtagsaver; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.webkit.WebView; | |
| import android.webkit.WebViewClient; | |
| // Needed to open URLs in a new window |
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
| // http://stevesohcot.com/tech-lessons-learned/2016/05/17/get-data-from-sql-server-in-excel | |
| Public Sub GetData() | |
| Dim strSQL As String | |
| Dim strCnn As String | |
| Dim cnn As Object | |
| Dim rst As Object | |
| strCnn = "Driver={SQL Server};" & _ |
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
| <h1>Connect to a database</h1> | |
| <?php | |
| // http://stevesohcot.com/tech-lessons-learned/2016/06/19/xampp-php-setup-on-a-mac/ | |
| // Sample connection to local PHP/MySQL using XAMPP | |
| $host = "localhost"; | |
| $user = "root"; | |
| $password = ""; | |
| $db1 = mysqli_connect($host, $user, $password, "MyDatabase") or die ("Could not connect"); |