This file contains 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
body {font-family: 'Helvetica Neue', 'Helvetica', 'Apple SD Gothic Neo', 'NanumBarunGothic', 'Malgun Gothic', dotum, 'Lucida Grande', sans-serif;} |
This file contains 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
global.loadTagInfo = (function (tagName, callback) { | |
connection.query('SELECT `Id`, `Desc` FROM `Tags` WHERE `Name` = ?;', [tagName], function (err, row) { | |
callback([JSON.stringify(row[0]['Id']), JSON.stringify(row[0]['Desc'])]); | |
}); | |
}); | |
global.countTagMembers = (function (tagId, callback) { | |
connection.query('SELECT COUNT(UserId) FROM `TagMembership` WHERE TagId = ?;', [tagId[0]], function (err, row) { | |
callback(JSON.stringify(row[0]['COUNT(UserId)'])); | |
}); |
This file contains 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
connection.query('SELECT * FROM `Users` WHERE `Id` = ?;', [Id], function (err, row) { | |
var a = row; | |
}); | |
//how can I use variable `a` in here? |
This file contains 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
function proc(callback) { | |
connection.query('SELECT COUNT(Id), Id, firstname, lastname FROM Users WHERE Email = ? AND Password = ?;', [email, passwordHashed], function (err, row) { | |
callback(row); | |
} | |
} | |
proc(function (row) { | |
var a = row; | |
}); |
This file contains 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
exports.create = function (req, res) { | |
var data = req.body; | |
var tagname = data.tagname, | |
tagdesc = data.tagdesc, | |
latitude = data.latitude, | |
longitude = data.longitude; | |
var userId = req.session.userId; | |
console.log('data : ',data); |
This file contains 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
navigator.geolocation.getCurrentPosition(function(position) { | |
alert("press ok then run callback"); | |
locationCallback(position.coords.latitude, position.coords.longitude); | |
}); | |
function locationCallback(latitude, longitude) { | |
alert("latitude: " + latitude.toFixed(2) + ", longitude: " + longitude.toFixed(2)); | |
} |
This file contains 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
if (!navigator.geolocation) { | |
alert('geolocation is not supporting!'); | |
} | |
var latlong = navigator.geolocation.getCurrentPosition(showPosition); | |
function showPosition(position) { | |
var lat = position.coords.latitude; | |
var long = position.coords.longitude; | |
alert(lat); |
This file contains 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> | |
<html> | |
<head> | |
<title>Ajax demo</title> | |
</head> | |
<body> | |
<input type="text" id="tagname"> | |
<input type="text" id="tagdesc"> | |
<input type="submit" id="create-button"> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> |
This file contains 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
#include<stdio.h> | |
#include<stdlib.h> | |
int main(void) | |
{ | |
int x; | |
int store[10]; | |
int remain; | |
int z=0; | |
int i; | |
bool finish = false; |
This file contains 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
// c.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <stdlib.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
int i;int math[40]; |