This file contains hidden or 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
{ | |
"Guid" : "E9BE065F-0ED9-40A0-ACF6-11D8A620174A", | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Green Component" : 0.5764705882352941, | |
"Red Component" : 0.7411764705882353, | |
"Blue Component" : 0.9764705882352941 | |
}, |
This file contains hidden or 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 main(): | |
memo = 0 | |
x = 0 | |
y = 0 | |
for i in range(1, 999): | |
for j in reversed(range(1,999)): | |
temp = i * j | |
s = str(temp) | |
if (s[0] == s[-1] and temp > memo): | |
memo = temp |
This file contains hidden or 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 main(): | |
memo = 0 | |
for i in range(1, 999): | |
for j in reversed(range(1,999)): | |
temp = i * j | |
s = str(temp) | |
if (s[0] == s[-1] and temp > memo): | |
memo = temp | |
print(memo) |
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"math" | |
"math/big" | |
) | |
func Sqrt(x float64) float64 { | |
if x == 0 { |
This file contains hidden or 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
#!/bin/bash | |
# -c file - compress file | |
# -d file - decompress file | |
while getopts ":c:d:" opt; do | |
case $opt in | |
c ) cut -d' ' -f1,3,4,5,6 $OPTARG | gzip -k -9 > comp.gz;; | |
d ) gzip -d $OPTARG --stdout | sed -e "s/\([0-9]\{2\}:[0-9]\{2\}\)\(:[0-9]\{2\}\)/\1\2 \1/" > decomp.txt;; | |
esac |
This file contains hidden or 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
/* | |
5. The total number of students travelling to a specific country in a multi city | |
trip operated by a specified coach in given date. | |
Result should contain both detailed breakup & summary for above mentioned | |
categories along with overall summary. | |
*/ | |
SELECT COUNT(student_id) AS `Total number of students`, country_name, vin AS `Coach No` | |
FROM country |
This file contains hidden or 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
Problem | |
You just made a new friend at an international puzzle conference, | |
and you asked for a way to keep in touch. You found the following note | |
slipped under your hotel room door the next day: | |
"Salutations, new friend! I have replaced every digit of my phone number | |
with its spelled-out uppercase English representation ("ZERO", "ONE", "TWO", | |
"THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE" for the digits | |
0 through 9, in that order), and then reordered all of those letters in some |
This file contains hidden or 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
Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: Main.Main$1 | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1149) | |
at Main.Main.main(Main.java:62) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:483) | |
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) |
This file contains hidden or 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 Main; | |
import Model.Person; | |
import javax.persistence.EntityManager; | |
import javax.persistence.EntityManagerFactory; | |
import javax.persistence.EntityTransaction; | |
import javax.persistence.Persistence; | |
public class Main { |
This file contains hidden or 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 Model; | |
import javax.persistence.*; | |
import java.io.Serializable; | |
import java.util.Date; | |
@Entity(name = "persons") | |
public class Person implements Serializable { | |
@Id | |
@GeneratedValue(strategy= GenerationType.IDENTITY) |
NewerOlder