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
| <!-- | |
| Use this snippet to add a google map location chooser to your form | |
| Step 1: Get a google map api key and insert it in the first javascript tag | |
| Step 2: In your html form, create two hidden elements, one for latitude, and one for longitude. Give the elements ids and set the LATITUDE_ELEMENT_ID and LONGITUDE_ELEMENT_ID to the appropriate variables | |
| Done! | |
| --> |
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
| -- ######################################################### | |
| -- Author: www.sqlbook.com | |
| -- Copyright: (c) www.sqlbook.com. You are free to use and redistribute | |
| -- this script as long as this comments section with the | |
| -- author and copyright details are not altered. | |
| -- Purpose: For a specified user defined table (or all user defined | |
| -- tables) in the database this script generates 4 Stored | |
| -- Procedure definitions with different Procedure name | |
| -- suffixes: | |
| -- 1) List all records in the table (suffix of _GetAll) |
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
| CREATE TABLE IF NOT EXISTS `country` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `iso` char(2) NOT NULL, | |
| `name` varchar(80) NOT NULL, | |
| `nicename` varchar(80) NOT NULL, | |
| `iso3` char(3) DEFAULT NULL, | |
| `numcode` smallint(6) DEFAULT NULL, | |
| `phonecode` int(5) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
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
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] | |
| [ValidatePattern('^(\\\\|[a-z]\:)')] # \\share or drive: | |
| [string] | |
| $VssRepositoryPath, | |
| [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] | |
| [ValidatePattern('^\$/')] # $/something | |
| [string] |
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
| // Check table if exists on SQLite | |
| // http://stackoverflow.com/questions/3058909/how-does-one-check-if-a-table-exists-in-an-android-sqlite-database | |
| // | |
| public boolean isTableExists(String tableName, boolean openDb) { | |
| if(openDb) { | |
| if(mDatabase == null || !mDatabase.isOpen()) { | |
| mDatabase = getReadableDatabase(); | |
| } | |
| if(!mDatabase.isReadOnly()) { |
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
| using Microsoft.Rtc.Collaboration; | |
| using System; | |
| namespace SimpleUserUCMA | |
| { | |
| class Program | |
| { | |
| private const string sipaddress = "sip:from@domain.com"; | |
| private const string username = "USERNAME"; | |
| private const string password = "PASSWORD"; |
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
| // create an index with an analyzer "myindex" | |
| curl -X PUT localhost:9200/myindex -d ' | |
| { | |
| "settings" : {` | |
| "index":{ | |
| "number_of_replicas":0, | |
| "number_of_shards":1, | |
| "analysis":{ | |
| "analyzer":{ | |
| "first":{ |
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
| SET NOCOUNT ON | |
| GO | |
| PRINT 'Using Master database' | |
| USE master | |
| GO | |
| PRINT 'Checking for the existence of this procedure' | |
| IF (SELECT OBJECT_ID('dbo.sp_generate_inserts','P')) IS NOT NULL --means, the procedure already exists | |
| BEGIN |
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 ActionResult Grid(string FirstName, string LastName) | |
| { | |
| GridHelper.Filters filter = new GridHelper.Filters("FirstName", "LastName"); | |
| var _page =(!String.IsNullOrEmpty(HttpContext.Request.QueryString["page"])) ? Convert.ToInt32(HttpContext.Request.QueryString["page"]) : 1; | |
| var _contacts = from c in testDB.Contacts | |
| join ac in testDB.Account_Contact on c.ID equals ac.ContactID | |
| where ac.AccountID == 725 | |
| select c; |
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
| /* | |
| Copyright (C) 2013 Richard Szalay | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
| files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
| modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
| WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
OlderNewer