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
''' | |
This script goes through every textureSlot setting settings such that the blocks are rendered correctly in the scene | |
beware, this sets those properties for ALL objects, so this script should when theres only the world on the scene | |
also, I've only programmed in python for blender scripting, so the code may be substandard for other pythonists out there | |
''' | |
import bpy | |
objects = bpy.data.objects |
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 fi.matalamaki.util; | |
import androidx.databinding.InverseMethod; | |
/** | |
* Data-binded values that are boxed(such as ones that come from Kotlin, | |
* as there's no primitive types in Kotlin..) requires safe unboxing, | |
* so there's no NPE(null pointer exception) when binding data. | |
* | |
* Theres a method for this safeUnbox inside Android SDK, |
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
/** | |
* turn php DateInterval object to SQL date interval calculation | |
* by generating SQL code that adds or subtracts given dateinterval | |
* from a variable | |
* | |
* @param DateInterval $interval the interval to subtract or add | |
* @param $sqlVariable the variable on which the calculation should be performed on, probably now() or some column | |
* @param string $sqlFunction the function to use to calculate the date, probably either DATE_SUB or DATE_ADD | |
* @return string sql time calculation | |
*/ |
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
<?php | |
static function changeParameters($url, $parameters) | |
{ | |
$urlParts = parse_url($url); | |
$url = ""; | |
if (isset($urlParts['scheme'])) { | |
$url .= $urlParts['scheme'] . "://"; |
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
static function changeParameters($url, $parameters) | |
{ | |
$urlParts = parse_url($url); | |
$url = ""; | |
if (isset($urlParts['scheme'])) { | |
$url .= $urlParts['scheme'] . "://"; | |
} |
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
{ | |
"AL": "yyyy-MM-dd", | |
"AE": "dd/MM/yyyy", | |
"AR": "dd/MM/yyyy", | |
"AU": "d/MM/yyyy", | |
"AT": "dd.MM.yyyy", | |
"BE": "d/MM/yyyy", | |
"BG": "yyyy-M-d", | |
"BH": "dd/MM/yyyy", | |
"BA": "yyyy-MM-dd", |
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
/* | |
used such as.. | |
fetch("https://google.com") | |
.then(function (response) { | |
return pausePromise(response, 5) | |
}) | |
.then(function (response) { | |
console.log(response); |
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
<html> | |
<body> | |
<style> | |
.root { | |
width: 50px; | |
height: 50px; | |
position: relative; | |
} |
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
{"AD":{"lat":42.546245,"lng":1.601554,"name":"Andorra"},"AE":{"lat":23.424076,"lng":53.847818,"name":"United Arab Emirates"},"AF":{"lat":33.93911,"lng":67.709953,"name":"Afghanistan"},"AG":{"lat":17.060816,"lng":-61.796428,"name":"Antigua and Barbuda"},"AI":{"lat":18.220554,"lng":-63.068615,"name":"Anguilla"},"AL":{"lat":41.153332,"lng":20.168331,"name":"Albania"},"AM":{"lat":40.069099,"lng":45.038189,"name":"Armenia"},"AN":{"lat":12.226079,"lng":-69.060087,"name":"Netherlands Antilles"},"AO":{"lat":-11.202692,"lng":17.873887,"name":"Angola"},"AQ":{"lat":-75.250973,"lng":-0.071389,"name":"Antarctica"},"AR":{"lat":-38.416097,"lng":-63.616672,"name":"Argentina"},"AS":{"lat":-14.270972,"lng":-170.132217,"name":"American Samoa"},"AT":{"lat":47.516231,"lng":14.550072,"name":"Austria"},"AU":{"lat":-25.274398,"lng":133.775136,"name":"Australia"},"AW":{"lat":12.52111,"lng":-69.968338,"name":"Aruba"},"AZ":{"lat":40.143105,"lng":47.576927,"name":"Azerbaijan"},"BA":{"lat":43.915886,"lng":17.679076,"name":"Bosnia and Her |
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 parseUrlParameters(search) { | |
var queryParts = {}; | |
var searchParts = search.split("&"); | |
for (var i = 0; i < searchParts.length; i++) { | |
var searchPart = searchParts[i]; | |
var whitespaceIndex = searchPart.indexOf("="); |
OlderNewer