Skip to content

Instantly share code, notes, and snippets.

@ynonp
ynonp / 01_syntax_review.md
Last active January 19, 2024 09:41
Python Exercises

Learn Python With Me

My (hebrew speaking) Python course is available online at: https://www.tocode.co.il/bundles/python

If you speak the language be sure to drop by and say hello.

Syntax Review

  1. Write a program that asks the user for a number (integer only) and prints the sum of its digits
@ynonp
ynonp / vimtips.md
Created April 4, 2017 09:11
my vim tips
  1. file navigation
  • √ open gvim on directory
  • √ open file qsize.h
  • √ use :e to open another file
  • √ use :e %:r.cpp to open corresponding cpp file
  • √ use gf to open included file
  • √ use Ctrl+O to jump back
  1. text objects
  • √ use ci(, ci{, ci[, ci" or ci' to replace contents of TO
"use strict";
var data = [];
function foo() {
var _loop = function _loop(i) {
data.push(function () {
return i;
});
};
Find and fix top border for both lists
https://codepicnic.com/consoles/devtools-lab1
The jumbotron example from CSS bootstrap doesn't work. Figure out why and fix it:
https://codepicnic.com/consoles/devtools-lab1-1460225984-1460226253-1460226592
#set($comp = $NAME.substring(0,1).toUpperCase() + $NAME.substring(1))
import React from 'react';
export default React.createClass({
propTypes: {
},
getInitialState: function() {
return {};
},
componentDidMount: function() {
var el = document.querySelector('main');
let g1 = new Game();
let g2 = new Game();
let g3 = new Game();
let layout = new StackLayout(el);
layout.addItem('g1', g1);
layout.addItem('g2', g2);
layout.addItem('g3', g3);
self.load=function(){
var value = localStorage.getItem('picture');
if ( !value ) { return; }
self.clear();
var img = new Image;
img.src = value;
img.onload = function(){
ctx.drawImage(img,0,0);
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <unistd.h>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QObject::connect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(myfork()));
@ynonp
ynonp / SassMeister-input-HTML.html
Last active October 9, 2015 09:05
Generated by SassMeister.com.
<p>Status:
<span class="my-label label success">Success</span>
</p>
@ynonp
ynonp / SassMeister-input-HTML.html
Created October 9, 2015 06:39
Generated by SassMeister.com.
<ul class="breadcrumbs">
<li><a href="#">Home</a></li>
<li><a href="#">Features</a></li>
<li class="unavailable"><a href="#">Gene Splicing</a></li>
<li class="current"><a href="#">Cloning</a></li>
</ul>