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: Ghulam Mustafa | |
-- Create date: 30-Jun-2017 | |
-- Description: Here goes the description for Select Stored Procedure | |
-- ============================================= | |
CREATE PROCEDURE SP_NameOfStoredProcedureForSelect | |
-- Add the parameters for the stored procedure here | |
@Action varchar(50) = NULL | |
/*Here goes the rest of the parameters*/ | |
,@result int = 0 output |
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 async Task<object> Post() | |
{ | |
//First check if request is Multipart Content | |
if (!Request.Content.IsMimeMultipartContent()) | |
{ | |
return "Nope. Not this one."; | |
} | |
else | |
{ | |
//The attachment type |
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 React, { Component } from 'react'; | |
import { View, Image } from 'react-native'; | |
import { Container, Content, Footer, Body, Text } from 'native-base'; | |
import { StackActions, NavigationActions } from 'react-navigation'; | |
export default class extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
timer: 5 //The duration you want it to stay in seconds |
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
--Step 1: (create a new user) | |
CREATE LOGIN hello WITH PASSWORD='foo', CHECK_POLICY = OFF; | |
-- Step 2:(deny view to any database) | |
USE master; | |
GO | |
DENY VIEW ANY DATABASE TO hello; | |
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 function takes two sets of values, say Coordinates and returns the angle bearing to the location. | |
//a1 and a2 being latitude and longitude of location a | |
//b1 and b2 being latitude and longitude of location b | |
double bearing(double a1, double a2, double b1, double b2) { | |
const double TWOPI = 6.2831853071795865; | |
const double RAD2DEG = 57.2957795130823209; | |
// if (a1 = b1 and a2 = b2) throw an error | |
//double theta = atan2(b1 - a1, a2 - b2); | |
double theta = math.atan2(b1 - a1, a2 - b2); | |
if (theta < 0.0) |
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 'package:flutter/material.dart'; | |
class ChatConversationScreen extends StatefulWidget { | |
@override | |
_ChatConversationScreenState createState() => _ChatConversationScreenState(); | |
} | |
class _ChatConversationScreenState extends State<ChatConversationScreen> { | |
var currentAudioIndex = -1; //The index of the currently playing audio. By default it is -1 |
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 'dart:io'; | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
class DownloadFileScreen extends StatefulWidget { | |
@override | |
_DownloadFileScreenState createState() => _DownloadFileScreenState(); | |
} |
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
DECLARE @name NVARCHAR(256) -- database name | |
DECLARE @path NVARCHAR(512) -- path for backup files | |
DECLARE @fileName NVARCHAR(512) -- filename for backup | |
DECLARE @fileDate NVARCHAR(40) -- used for file name | |
-- specify database backup directory | |
SET @path = 'C:\test\' | |
-- specify filename format | |
SELECT @fileDate = REPLACE(REPLACE(REPLACE(CONVERT(NVARCHAR(20),GETDATE(),120), '-', ''), ' ', ''), ':', '') |
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 main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
OlderNewer