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 React, { Component, Fragment } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import { | |
Card, | |
CardHeader, | |
CardBody, | |
ButtonGroup, | |
Button, | |
} from 'reactstrap'; |
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 React, { Component, Fragment } from 'react'; | |
import PropTypes from 'prop-types'; | |
import _ from 'lodash'; | |
import classNames from 'classnames'; | |
import { withRouter } from 'react-router-dom'; | |
import { | |
SortingState, | |
GroupingState, | |
IntegratedGrouping, |
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 React, { Component } from 'react'; | |
import FormSelect from '../common/form_select.js.jsx'; | |
import FormInput from '../common/form_input.js.jsx'; | |
import FormNumberInput from '../common/form_number_input.js.jsx'; | |
import FormInputWithTime from './form_input_with_time.js.jsx'; | |
import FormNested from './form_nested.js.jsx'; | |
import LocationInventories from './location_inventories.jsx'; | |
import ProductVariantsForm from './product_variants_form.js.jsx'; | |
import RoomTime from './room_time.js.jsx'; | |
import FormCheckbox from '../common/form_checkbox.js.jsx'; |
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 ProductSerializer < ActiveModel::Serializer | |
attributes :id, | |
:external_id, | |
:excerpt, | |
:profile, | |
:product_id, :product_handle, :product_title, :product_image_url, | |
:capacity_type, :capacity, :capacity_option1, :capacity_option2, :capacity_option3, | |
:duration_type, :duration_option_external_id, :duration_option_position, :duration_option, :duration_option_range_variant, | |
:duration, :max_duration, :min_duration, | |
:lead_time, :lag_time, :mindate, :maxdate, :range_count_basis, |
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
# == Schema Information | |
# | |
# Table name: users | |
# | |
# id :integer not null, primary key | |
# email :string(255) default(""), not null | |
# encrypted_password :string(255) default("") | |
# reset_password_token :string(255) | |
# reset_password_sent_at :datetime | |
# remember_created_at :datetime |
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
<?php | |
ini_set( 'max_execution_time', 33600 ); | |
$m = new Mongo( "mongodb://nosavn.net:27018" ); | |
// print_r($m->getConnections()); | |
// var_dump($m); | |
$db = $m->selectDB( 'Nosa' ); | |
$db->authenticate( "nosavnnet", "nsvn6688" ); | |
//connect collection |
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<string.h> | |
#include<stdlib.h> | |
typedef signed short int_least16_t; | |
// swapping two charaters | |
void swap( char* a, char* b ) { | |
char p = *a; | |
*a = *b; |
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 sumLuhn (barcode, nParity) | |
checksum = 0 | |
for i in 0..barcode.length - 1 | |
nDigit = barcode[i].to_i | |
if nParity == ( i & 1 ) # i % 2 | |
nDigit = ( nDigit << 1 ) # nDigit * 2 | |
end | |
checksum = checksum + nDigit / 10 + nDigit % 10 | |
end | |
return checksum % 10 |