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 @Enumerator CURSOR | |
| SET @Enumerator = CURSOR LOCAL FAST_FORWARD FOR | |
| select UserId | |
| from Users | |
| where IsActive = 1 | |
| OPEN @Enumerator | |
| declare @id int |
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 System; | |
| using System.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| namespace InvoiceWorks.Model | |
| { | |
| public abstract class BaseModel : INotifyPropertyChanged | |
| { | |
| protected bool SetProperty<T>(ref T storage, T value, [CallerMemberName] String propertyName = null) | |
| { |
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
| var express = require('express'); | |
| var app = express(); | |
| var sql = require("mssql"); //load the driver | |
| // config for your database | |
| var config = { | |
| user: 'sa', | |
| password: 'mypassword', | |
| server: 'localhost', | |
| database: 'SchoolDB' | |
| }; |
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
| DefaultHttpClient httpclient = new DefaultHttpClient(new BasicHttpParams()); | |
| HttpPost httppost = new HttpPost(http://someJSONUrl/jsonWebService); | |
| // Depends on your web service | |
| httppost.setHeader("Content-type", "application/json"); | |
| InputStream inputStream = null; | |
| String result = null; | |
| try { | |
| HttpResponse response = httpclient.execute(httppost); | |
| HttpEntity entity = response.getEntity(); |