Skip to content

Instantly share code, notes, and snippets.

@hiun
hiun / koreanWebCSS.css
Created March 30, 2014 07:18
CSS for beautiful korean and english font.
body {font-family: 'Helvetica Neue', 'Helvetica', 'Apple SD Gothic Neo', 'NanumBarunGothic', 'Malgun Gothic', dotum, 'Lucida Grande', sans-serif;}
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)']));
});
connection.query('SELECT * FROM `Users` WHERE `Id` = ?;', [Id], function (err, row) {
var a = row;
});
//how can I use variable `a` in here?
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;
});
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);
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));
}
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);
<!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>
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int x;
int store[10];
int remain;
int z=0;
int i;
bool finish = false;
// 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];