Skip to content

Instantly share code, notes, and snippets.

@Aravin
Aravin / Js_Binary_to_hex.md
Last active August 31, 2020 13:54
Javascript Code to Convert Larger Binary Digit to Hex Code

To convert large binary to hex use this code

const binaryData:=
{
    '0000': '0',
    '0001': '1',
    '0010': '2',
 '0011': '3',
@Aravin
Aravin / CSharp-HelloWorld.cs
Last active January 5, 2019 19:16
C# - Hello World Program
using System;
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello, World!");
}
}
@Aravin
Aravin / xmlParser.ts
Last active March 22, 2023 01:05
Converting JSON toXML& XML to JSON in Node.js using xml2js package in TypeScript
import { parseString, Builder } from "xml2js";
// Convert string/XML to JSON
function toJson(xml: string) {
parseString(xml, { explicitArray: false }, function(error, result) {
console.log(result);
});
}
@Aravin
Aravin / ProtectedInternalAccessModifiedInCSharp.cs
Created April 12, 2018 18:44
Protected Internal Access Modified in C#
// Code from Project 1
namespace FirstAssembly
{
public class FirstClass
{
protected internal static void FirstMethod()
{
Console.WriteLine("Private protected method called...");
}
}
@Aravin
Aravin / PrivateProtectedAccessModifiedInCSharp.cs
Last active April 12, 2018 18:44
Private Protected Access Modifier in CSharp C#
// Code from Project 1
namespace FirstAssembly
{
public class FirstClass
{
private protected static void FirstMethod()
{
Console.WriteLine("Private protected method called...");
}
}
@Aravin
Aravin / FileMovement.cs
Created March 18, 2018 18:07
Moving file from one destination to another destination in C# using System.IO.File Class
using System;
using System.IO;
namespace FileMovement
{
class Program
{
static void Main(string[] args)
{
string sourcePath = @"G:\Learning\CSharp\FileMovement\FileMovement\";
@Aravin
Aravin / FileMovement.cs
Created March 18, 2018 18:04
Copying file from one destination to another destination in C# using System.IO.File Class
using System;
using System.IO;
namespace FileMovement
{
class Program
{
static void Main(string[] args)
{
string sourcePath = @"G:\Learning\CSharp\FileMovement\FileMovement\";
@Aravin
Aravin / _flash_messages.html.erb
Created December 10, 2017 17:51 — forked from roberto/_flash_messages.html.erb
Rails flash messages using Twitter Bootstrap
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@Aravin
Aravin / CenteringAFormInHTML.html
Last active February 8, 2023 18:34
Aligning a label and textbox horizontally in HTML using CSS
<!DOCTYPE html>
<html>
<head>
<title>Centering a form</title>
</head>
<body>
<div class="form">
<label>Name</label>
<input type="text" name="name">
@Aravin
Aravin / Combine Sequence Number.cs
Created September 17, 2017 02:54
C# Program to group the sequence of number
using System;
using System.Collections.Generic;
namespace CombineSequenceNumbers
{
class Program
{
static void Main(string[] args)
{
string input;