Steps taken from: How to Solve a Rubik's Cube | WIRED
- Make the daisy
- Create the white cross
- Solve the first layer
- Solve the second layer
- Create the yellow cross:
F U R U' R' F'
// add this code to your StartupModule() function of your EDITOR module | |
// if it doesnt work, try setting loading phase to "postdefault" -- no idea if this will produce side effects though. | |
// basically idea is looping all CDOs (i.e. UClasses) and their properties, getting their "category" meta value and registering them to | |
// property sections | |
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor"); | |
static constexpr bool bAddSubcategories = false; // you probably want this to be false | |
auto ProcessCategory = [&PropertyModule](const FName ClassName, const FString& Category) |
Steps taken from: How to Solve a Rubik's Cube | WIRED
F U R U' R' F'
#!/usr/bin/env python3 | |
def get_part_of_day(h): | |
return ( | |
"morning" | |
if 5 <= h <= 11 | |
else "afternoon" | |
if 12 <= h <= 17 | |
else "evening" |
This guide is targetted at intermediate or expert users who want low-level control over their Python environments.
When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda
). See the Using the workflow section to view the end result.
autocomplete="off"
onto <form>
element;<input>
with autocomplete="false"
as a first children element of the form.<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
#!/bin/bash | |
# Stop all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ] ; then | |
docker stop $containers | |
fi | |
# Delete all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ]; then | |
docker rm -f -v $containers |
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.
We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.
var arr = [{id:3,title:"Ali"},{id:3,title:"Veli"},{id:3,title:"Vehbi"}]; | |
arr.sort(turkcesiralama); | |
function turkcesiralama(a, b){ | |
var atitle = a.title; | |
var btitle = b.title; | |
var alfabe = "AaBbCcÇçDdEeFfGgĞğHhIıİiJjKkLlMmNnOoÖöPpQqRrSsŞşTtUuÜüVvWwXxYyZz0123456789"; | |
if (atitle.length === 0 || btitle.length === 0) { | |
return atitle.length - btitle.length; | |
} |