Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Avi Parshan avipars

🎯
Focusing
View GitHub Profile
View dev.goggles
! name: Tech and Developer Search
! description: Boost more relevant pages and blogs, take down less relevant ones
! public: true
! author: Avipars
$discard
$downrank,site=medium.com
$discard
$downrank,site=geeksforgeeks.com
View friends.cpp
Food * gMeal[2]
= new Fish();
= new Dessert();
MyString &operator+(char c);
friend MyString&operator(char c, MyString s);
View Point.cpp
/*
Avraham Parshan -
Course: C++ Workshop
Excersice: 1, Week 7
Date: 4/7/2022
*/
#include "Point.h"
#include <cmath> //sqrt function
@avipars
avipars / bubblesort.mips.s
Created Apr 8, 2022 — forked from manudatta/bubblesort.mips.s
Bubble sort in MIPS assembly.
View bubblesort.mips.s
# Copyright 2002 Manu Datta (gmail.com ID Manu dot Datta)
# All rights reserved
.data
msg1: .asciiz "\nEnter integer values followed by return (-1 terminates input): \n"
msg2: .asciiz ","
msg3: .asciiz "Bubble Sort"
msg4: .asciiz "#########pass#########"
msg5: .asciiz "\n"
msg6: .asciiz "\nNumber list has been sorted\n"
@avipars
avipars / wsl2.ps1
Created Apr 6, 2022
WSL 2 using powershell
View wsl2.ps1
wsl --list --online
wsl --set-default-version 2 #make sure to use the updated kernel https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
#wsl --install -d Debian
View firstprob.txt
Question number one:
Define a class for the rational numbers.
Reminder: Denominator value will not be 0 or negative)
The class will include the following fields:
 Numerator
 denominator
as well as the following methods:
• For each field:
o From a set method. The denominator should not place 0, so if the resulting parameter is 0, setDenominator () method will do nothing. Note that, as defined above, a negative value in the denominator must be initialized accordingly.
@avipars
avipars / file.js
Last active Feb 2, 2022
JCT - Language switch
View file.js
javascript:document.querySelector('select[ng-model="model.currentLanguage"]').selectedIndex = 1;angular.element(document.querySelector('select[ng-model="model.currentLanguage"]')).triggerHandler('change');document.querySelector('div[local-title="title_local_switcher"] button[local="ok_button"]').click();
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Wordle - A daily word game</title>
<meta name="description" content="Guess the hidden word in 6 tries. A new puzzle is available each day.">
View distance.cpp
using namespace std;
#include <iostream>
#include <cmath>
//Question 11 (7 points) moed b 5778
//Consider an array of unique integers terminated by the value 0 (0 is not considered part of the array). Write a function that receives a pointer to the array (it does not receive its size) and returns the distance between the position of the largest element in the array and the smallest one.
int pointGap(int *arr)
{
int distance = 0;
int smallest = *arr;
int largest = *arr;
@avipars
avipars / biaryPermutate.cpp
Created Nov 9, 2021
I needed a quick solution to check permutations and substitutions
View biaryPermutate.cpp
using namespace std;
bool isEq = false;
int equ = 0;
int isOne(bool number)
{
if (number)
{