Skip to content

Instantly share code, notes, and snippets.

💭
:)

Cosmin Popescu cosminpopescu14

View GitHub Profile
View error dot net
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE [Categories] (
[Id] int NOT NULL IDENTITY,
[UserCodeAdd] nvarchar(20) NOT NULL,
[UserCodeLastChange] nvarchar(20) NULL,
[AddedDate] datetime2 NOT NULL DEFAULT (CURRENT_TIMESTAMP),
[LastChangeDate] datetime2 NULL,
[ParentId] int NULL,
[Code] nvarchar(50) NOT NULL,
View Q_and_A.cs
using System;
using System.Collections.Generic;
namespace ConsoleApp28
{
public class Intrebare
{
public string intrebare;
public List<string> raspunsuri = new List<string>();
}
View find_occurence_in_array.js
let story = "really very basically bla bla ba afara este frig. Ana are mere. Javascript drives me very mad. But basically it is used everywhere. Very Ana Ana Ana really";
let overUsedWords = ["really", "very", "basically", "Ana"];
let storyWords = story.split(" ");
let freq = {}
for (storyWord of storyWords)
{
for(overUsedWord of overUsedWords)
{
View Output HashMap with JSF 2.2
Methode 1
<p:dataTable var="entry" value="#{hashMap.entrySet().toArray()}">
<p:column headerText="key">
<h:outputText value="${entry.key}" />
</p:column>
<p:column headerText="value id">
<h:outputText value="${entry.value.id}" />
</p:column>
</p:dataTable>
View fetch_demo.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
let clicks = 0;
const url = `fetch.php`;
@cosminpopescu14
cosminpopescu14 / average_in_stack.c
Created Dec 19, 2018
Compute avreage on a stack
View average_in_stack.c
// ConsoleApplication22.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
struct Stack
{
View XEEAttack.cs
using System;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApp22
{
class Program
{
static void Main(string[] args)
{
View charsets_with_diacritic_mark.php
<?php
echo json_encode("Göktürk-X-șpțâăîșțâ", JSON_UNESCAPED_UNICODE);
@cosminpopescu14
cosminpopescu14 / .htaccess
Created Dec 9, 2018 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@cosminpopescu14
cosminpopescu14 / rsync.sh
Created Dec 6, 2018
Sync 2 folder with rsync
View rsync.sh
rsync -avz . --dry-run --exclude='.idea,vs,cache*' ../../../../xampp/htdocs/2PerformantIntegration
You can’t perform that action at this time.