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 clusterizer; | |
import java.util.ArrayList; | |
public abstract class Clusterizer { | |
protected class Pair { | |
public int x, y; // ID's of clusters | |
public Pair(int x, int y) { | |
this.x = x; |
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
require "net/http" | |
require "ensure" | |
class Downloader | |
# Expected encodings | |
ENCODINGS = Array['UTF-8', 'WINDOWS-1251', 'KOI-8'] | |
def get_page(url) | |
response = Net::HTTP.get_response(URI.parse(url)) | |
while response.kind_of?(Net::HTTPRedirection) |
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 generate_gender | |
return :M if rand(0..1) > 0 | |
return :F | |
end |
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
function doSomething() { | |
alert("I'm done resizing for the moment"); | |
}; | |
var resizeTimer; | |
$(window).resize(function() { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(doSomething, 100); | |
}); |
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
import java.sql.ResultSet; | |
import java.sql.Statement; | |
import java.util.StringTokenizer; | |
import java.util.Vector; | |
public class Apriori { | |
private static Statement stmt; | |
private static Vector<String> candidates; | |
private static Vector<Double> supports; |
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
--добавляет брак на термообработке | |
declare | |
----------------------------------- | |
material_no varchar(10) := '400665184'; -- номер выходного пакета | |
defect_pcs number := 1; -- количество брака | |
defect_code number := 359; -- вид дефекта select * from description_value where upper(name) like '%КРИВЫЕ%' | |
new_material_no varchar(10) := ''; -- номер пакета брака, опционально | |
workshop number := 4; -- Номер цеха, нужен для генерации кода | |
lower_material_no number := workshop * 100000000; -- Наименьший возможный код пакета |
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
select rownum as "№", cipher_list.* | |
from (select to_number(m.material_id) as "Код материала", | |
nvl(m.tns, m.proportional_tns) as "Тонны", | |
dv.code as "Шифр MES", | |
(select max(aw.no) keep(dense_rank last order by po.prod_oper_time) | |
from rs_product@erp p, | |
rs_prod_oper@erp po, | |
rs_transform_oper@erp tro, | |
acc_ware@erp aw | |
where p.rs_product_guid = c.document_guid |
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
------------------------------------------- | |
------------------------------------------- | |
---!!!Сначала проверьте на тестовой базе!!! | |
------------------------------------------- | |
------------------------------------------- | |
declare | |
----------------------------------- | |
material_no varchar(10) := '400706414'; -- номер выходного пакета | |
defect_pcs number := 1; -- количество брака |
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
select mdfr_list.material_id, | |
mdfr_list.unit_id, | |
mdfr_list.unit_name, | |
mdfr_list.oper_unit_sys, | |
mdfr_list.oper_unit_sys_mdfr, | |
mdfr_list.oper_sys_mdfr, | |
mdfr_list.oper_unit_sys_spec_cond, | |
mdfr_list.oper_unit_tech, | |
mdfr_list.oper_unit_tech_mdfr, | |
mdfr_list.oper_tech_mdfr, |
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
get_current_git_branch() { | |
local branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null` | |
if [ "$branch" != "" ]; then | |
echo " ⌥ $branch " | |
fi | |
} | |
get_git_stat() { | |
local branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null` |
OlderNewer