Search Results

Search found 8 results on 1 pages for 'sumant'.

Page 1/1 | 1 

  • How to make an internet server as firewall using ubuntu 11.10

    - by Sumant
    i have one static broadband connection which is coming to my Ubuntu server with 2 lan cards, there are 10 more PC's to which i need to provide internet connection through Ubuntu server as well as i have to block social networking websites access during office hours. Now i am getting confuse with the way i should follow i should go for sharing internet connection & firewall building or should configure DHCP server,router & firewall. which will be easiest setup and what i should do for that. coz its first time i will be doing.

    Read the article

  • On restart server Ethernet went down saying not configured!

    - by Sumant
    i justy have configured my dhcp server with static ip. after configuration dhcp server & routers were working fine. but after restarting server network connectivity went off. there are two lan cards but none of them is up.i tried setting up manually ip address again but it remains same. when i executed sudo /etc/init.d/networking restart i got this message * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces * Reconfiguring network interfaces... /bin/sh: cannot open /etc/iptables_rules: No such file Failed to bring up eth0. i have configured my server according to this What is it the problem with ubuntu 11.10 or some configuration error. i am not getting it please help me.

    Read the article

  • Not enough disk space '/' in AWS instance

    - by Sumant
    i am running Ubuntu 11.04 instance for my Web Server on AWS cloud, now i am getting there is no disk space in / partition of my server. df -ah say this Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 7.8G 97M 99% / proc 0 0 0 - /proc none 0 0 0 - /sys fusectl 0 0 0 - /sys/fs/fuse/connections none 0 0 0 - /sys/kernel/debug none 0 0 0 - /sys/kernel/security none 3.7G 112K 3.7G 1% /dev none 0 0 0 - /dev/pts none 3.7G 0 3.7G 0% /dev/shm none 3.7G 80K 3.7G 1% /var/run none 3.7G 0 3.7G 0% /var/lock /dev/xvdb 414G 16G 377G 4% /mnt Now i have Tried these thing for getting some extra space on / partition Clean up All Log files for Apache. Removed all unnecessary files from server. Home directory Cleanup. But Still I am not getting enough space. This Instance type is m1.large with 8GB EBS. Now i am getting i have enough disk space in /dev/xvdb. Is there a way i can allocate some diskspace to / from /dev/xvdb or Any other Ways. Please suggest me the possible solution for this.Is it possible to use the same /dev/xvdb partition with another instance.

    Read the article

  • Problem with Ubuntu and UEFI (Problem with any linux OS)

    - by K.T.Sumant
    I have purchased a new Sony Vaio laptop and it is said that the Windows in the recent laptops is installed in the UEFI mode. But all the Linux OS are installed in default in Legacy mode. When I reboot my laptop, Ubuntu is not being detected on boot. Only Windows is detected. To access Ubuntu, whenever I boot the system, I need to: (1) enter the boot menu, (2) change the mode to legacy, and (3) type a bit of scary commands in grub then Ubuntu successfully opens. This is a bit of problem for me. So I wanted to know the solution for this problem. So please kindly look over my problem as soon as possible.

    Read the article

  • Feedback on iterating over type-safe enums

    - by Sumant
    In response to the earlier SO question "Enumerate over an enum in C++", I came up with the following reusable solution that uses type-safe enum idiom. I'm just curious to see the community feedback on my solution. This solution makes use of a static array, which is populated using type-safe enum objects before first use. Iteration over enums is then simply reduced to iteration over the array. I'm aware of the fact that this solution won't work if the enumerators are not strictly increasing. template<typename def, typename inner = typename def::type> class safe_enum : public def { typedef typename def::type type; inner val; static safe_enum array[def::end - def::begin]; static bool init; static void initialize() { if(!init) // use double checked locking in case of multi-threading. { unsigned int size = def::end - def::begin; for(unsigned int i = 0, j = def::begin; i < size; ++i, ++j) array[i] = static_cast<typename def::type>(j); init = true; } } public: safe_enum(type v = def::begin) : val(v) {} inner underlying() const { return val; } static safe_enum * begin() { initialize(); return array; } static safe_enum * end() { initialize(); return array + (def::end - def::begin); } bool operator == (const safe_enum & s) const { return this->val == s.val; } bool operator != (const safe_enum & s) const { return this->val != s.val; } bool operator < (const safe_enum & s) const { return this->val < s.val; } bool operator <= (const safe_enum & s) const { return this->val <= s.val; } bool operator > (const safe_enum & s) const { return this->val > s.val; } bool operator >= (const safe_enum & s) const { return this->val >= s.val; } }; template <typename def, typename inner> safe_enum<def, inner> safe_enum<def, inner>::array[def::end - def::begin]; template <typename def, typename inner> bool safe_enum<def, inner>::init = false; struct color_def { enum type { begin, red = begin, green, blue, end }; }; typedef safe_enum<color_def> color; template <class Enum> void f(Enum e) { std::cout << static_cast<unsigned>(e.underlying()) << std::endl; } int main() { std::for_each(color::begin(), color::end(), &f<color>); color c = color::red; }

    Read the article

  • lambda traits inconsistency across C++0x compilers

    - by Sumant
    I observed some inconsistency between two compilers (g++ 4.5, VS2010 RC) in the way they match lambdas with partial specializations of class templates. I was trying to implement something like boost::function_types for lambdas to extract type traits. Check this for more details. In g++ 4.5, the type of the operator() of a lambda appears to be like that of a free standing function (R (*)(...)) whereas in VS2010 RC, it appears to be like that of a member function (R (C::*)(...)). So the question is are compiler writers free to interpret any way they want? If not, which compiler is correct? See the details below. template <typename T> struct function_traits : function_traits<decltype(&T::operator())> { // This generic template is instantiated on both the compilers as expected. }; template <typename R, typename C> struct function_traits<R (C::*)() const> { // inherits from this one on VS2010 RC typedef R result_type; }; template <typename R> struct function_traits<R (*)()> { // // inherits from this one g++ 4.5 typedef R result_type; }; int main(void) { auto lambda = []{}; function_traits<decltype(lambda)>::result_type *r; // void * } This program compiles on both g++ 4.5 and VS2010 but the function_traits that are instantiated are different as noted in the code.

    Read the article

  • What is the meanning of 'idx_categories_desc_categories_name' in osCommerce

    - by Sumant
    while working on osCommerce-3 i got the table structure for category & categories_description as CREATE TABLE IF NOT EXISTS `osc_categories` ( `categories_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `categories_image` varchar(255) DEFAULT NULL, `parent_id` int(10) unsigned DEFAULT NULL, `sort_order` int(11) DEFAULT NULL, `date_added` datetime DEFAULT NULL, `last_modified` datetime DEFAULT NULL, PRIMARY KEY (`categories_id`), KEY `idx_categories_parent_id` (`parent_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; CREATE TABLE IF NOT EXISTS `osc_categories_description` ( `categories_id` int(10) unsigned NOT NULL, `language_id` int(10) unsigned NOT NULL, `categories_name` varchar(255) NOT NULL, PRIMARY KEY (`categories_id`,`language_id`), KEY `idx_categories_desc_categories_id` (`categories_id`), KEY `idx_categories_desc_language_id` (`language_id`), KEY `idx_categories_desc_categories_name` (`categories_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; here i am not getting the meanning of indexing "idx_categories_desc_categories_id", "idx_categories_desc_language_id", "idx_categories_desc_categories_name" What is the use of this indexing.What does it mean?

    Read the article

  • Using deprecated binders and C++0x lambdas

    - by Sumant
    C++0x has deprecated the use of old binders such as bind1st and bind2nd in favor of generic std::bind. C++0x lambdas bind nicely with std::bind but they don't bind with classic bind1st and bind2nd because by default lambdas don't have nested typedefs such as argument_type, first_argument_type, second_argument_type, and result_type. So I thought std::function can serve as a standard way to bind lambdas to the old binders because it exposes the necessary typedefs. However, using std::function is hard to use in this context because it forces you to spell out the function-type while instantiating it. auto bound = std::bind1st(std::function<int (int, int)>([](int i, int j){ return i < j; }), 10); // hard to use auto bound = std::bind1st(std::make_function([](int i, int j){ return i < j; }), 10); // nice to have but does not compile. I could not find a convenient object generator for std::function. Something like std::make_fuction would be nice to have. Does such a thing exist? If not, is there any other better way of binding lamdas to the classic binders?

    Read the article

1