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
class Mobile() | |
{ | |
} | |
class monitor{ | |
String output; | |
int mode; | |
//mode 1 => home || mode 2 => keynum || mode 3 => call |
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
class Moblie{ | |
} | |
//Global | |
static void int mode = 1; | |
static void int timecalling = 0; | |
public static class Monitor{ | |
String output; |
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
public class calculator(){ | |
private Keyboard keyboard; | |
private Screen screen; | |
private Stack operant; | |
private Stack operator; | |
private String showValue; | |
private State calState; | |
enum State{ | |
on, |
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
class RomanNumerals | |
@roman = "IVXLCDM" | |
@numeric = [1,5,10,50,100,500,1000] | |
def self.to_roman(int) | |
index = int.to_s.size() | |
ans = "" | |
for i in 0..index-1 | |
c = int.to_s[i].to_i | |
value = 10**(index-1) | |
if (c == 9 || c == 4) && !(c*value > 1000) |
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
class String | |
def remove_reply(remain_username = false) | |
if remain_username | |
self.gsub(/[@]{1}/,"") | |
else | |
self.gsub(/[@]{1}[\w]{1,}/,"") | |
end | |
end |
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
class String | |
def remove_reply(remain_username = false) | |
if remain_username | |
self.gsub(/[@]{1}/,"") | |
else | |
self.gsub(/[@]{1}[\w]{1,}/,"") | |
end | |
end |
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
/*! | |
* Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) | |
* Copyright 2011-2017 The Bootstrap Authors | |
* Copyright 2011-2017 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*//*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}ma |
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
def pi(num) | |
sum = 3 | |
(1..num).each do |n| | |
dn = n*2 | |
puts "(4.0/(#{dn} * #{(dn+1)} * #{(dn+2)}) * (#{(-1)**(n+1)}))" | |
sum += (4.0/(dn * (dn+1) * (dn+2)) * ((-1)**(n+1))) | |
end | |
return sum | |
end |