This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
#include<math.h> | |
void main() | |
{ | |
int a[100],**b,i,j,r,c,n,temp,k=0,sum,avg[10],l,h; | |
clrscr(); | |
printf("How many data? "); | |
scanf("%d",&n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calculator; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.*; | |
public class Calculator extends JFrame implements ActionListener { | |
JFrame f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace DC4 | |
{ | |
class Program | |
{ | |
class fano | |
{ | |
public float pro; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace DC5 | |
{ | |
class Huff | |
{ | |
public int frequency; | |
public string data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_facebook" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
String QRcode = "..."; | |
new generateQrcode(qrcodeImageview).execute(QRcode); | |
... | |
private class generateQrcode extends AsyncTask<String, Void, Bitmap> { | |
public final static int WIDTH = 400; | |
ImageView bmImage; | |
public generateQrcode(ImageView bmImage) { | |
this.bmImage = bmImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n, d = map(int, input().split()) # n = len(array), d = Number of rotation | |
values = [i for i in input().split()][:n] | |
print(" ".join(values[d:] + values[:d])) # left rotation | |
print(" ".join(values[n-d:] + values[:n-d])) # right rotation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
s1 = input('input: ').strip().lower(); l1 = len(s1) + 1 | |
s2 = input('target: ').strip().lower(); l2 = len(s2) + 1 | |
m = numpy.empty([l1, l2], dtype = int) | |
for i in range(l1): | |
m[i][0] = i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Regex | HackerRank | |
# https://www.hackerrank.com/domains/regex | |
# Matching Anything But a Newline | |
Regex_Pattern = r'...\....\....\....$' | |
# Matching Specific String | |
Regex_Pattern = r'hackerrank' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip = input('Enter a string: ') | |
op = ip[0] | |
for i in range(len(ip) - 1): | |
dist = ord(ip[i].lower()) - ord(ip[i+1].lower()) | |
if dist > 0: op += ' > ' + ip[i+1] | |
else: op += ' < ' + ip[i+1] | |
print(op) |
OlderNewer