What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-12 13:03:03
d3 paning
var svg = d3.select("body") .append("svg") .attr("width", "100%") .attr("height", "100%") .call(d3.behavior.zoom().on("zoom", function () { svg.attr("transform", &... Add solution -
TypeScript 2021-09-11 05:10:02
useful python scripts for translators of texts
# First install translate with pip in cmd pip install translate # Code from translate import Translator translator= Translator(from_lang="german",to_lang="spanish") translation = translator.translate("Guten Morgen") print(tr... Add solution -
C# 2021-09-10 20:43:02
C# player movement script unity
//make sure to add a CharacterController to the thing that you want to move using UnityEngine; public class PlayerMovement : MonoBehaviour { CharacterController characterController; public float jumpSpeed = 8.0f; public float gravity = 20.0f... Add solution -
Java 2021-09-10 07:16:03
libgdx move camera with touch
@Override public boolean touchDragged(int screenX, int screenY, int pointer) { //difference between the current pointer location and the last pointer location on X axis float x = Gdx.input.getDeltaX(); //difference between the current pointer ... Add solution -
Swift 2021-09-10 03:09:02
present modal view controller in half size parent controller swift
import UIKit final class ViewControllerB: UIViewController { lazy var backdropView: UIView = { let bdView = UIView(frame: self.view.bounds) bdView.backgroundColor = UIColor.black.withAlphaComponent(0.5) return bdView }() let menuView = UIVi... Add solution -
CSS 2021-09-09 13:29:02
centrer un élément absolute
.truc-a-centrer { position: absolute; /* postulat de départ */ top: 50%; left: 50%; /* à 50%/50% du parent référent */ transform: translate(-50%, -50%); /* décalage de 50% de sa propre taille */ } Add solution
Best helpers
Ranking is empty