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
//ticketIdが一致するチケットを探し、保存した配列から消す(std::move使わない版) | |
PathTicket *PathFindTicketStore::getAndRemoveById(int ticketId) { | |
PathTicket *_ticket = nullptr; | |
_mtx.lock(); | |
for (auto ticket : *_ticketsVec) { | |
if (ticket->id == ticketId) { | |
_ticket = PathTicket::copyFrom(ticket); | |
delete(ticket); | |
ticket = nullptr; | |
break; |
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
//経路を同期的に算出し、返す | |
cocos2d::Vector<MapPosition *> PathFinder::findPathSync( | |
MapPosition *start, | |
MapPosition *end, | |
const cocos2d::Map<std::string, SDGameParts *> &jungleGym, | |
bool unitIgnore) { | |
std::vector<int> *ans = new std::vector<int>(); | |
{ | |
//自分のエリア | |
std::string tag1 = SDMapNode::makeTag(start->m_x, start->m_y, start->m_z ); |
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
// | |
// EXViewController.m | |
// Experiment | |
// | |
// Created by adachic on 2013/07/17. | |
// Copyright (c) 2013年 adachic. All rights reserved. | |
// | |
#import "EXViewController.h" | |
#include <sys/time.h> |
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
// | |
// EXViewController.m | |
// Experiment | |
// | |
// Created by adachic on 2013/07/17. | |
// Copyright (c) 2013年 adachic. All rights reserved. | |
// | |
#import "EXViewController.h" | |
#include <sys/time.h> |
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
package com.regaria.ijt; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.util.Xml; | |
import org.apache.http.HttpStatus; | |
import org.apache.http.NameValuePair; |
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
{- | |
- Problem 2 | |
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: | |
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... | |
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. | |
- -} |
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
{- | |
- Problem 2 | |
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: | |
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... | |
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. | |
- -} |
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
-(BOOL) enableRetinaDisplay:(BOOL)enabled | |
{ | |
enabled = NO; | |
// Already enabled ? | |
if( enabled && __ccContentScaleFactor == 2 ) | |
return YES; | |
// Already disabled | |
if( ! enabled && __ccContentScaleFactor == 1 ) |
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
var LINE = require('./line.js'); | |
var line = new LINE(); | |
var email = 'your email'; | |
var password = 'your password'; | |
line.login(email, password, function(error, result) { | |
if (error) { | |
return; | |
} |
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
var LINE = require('./line.js'); | |
var line = new LINE(); | |
var email = 'your email'; | |
var password = 'your password'; | |
line.login(email, password, function(error, result) { | |
if (error) { | |
return; | |
} |