Search Results

Search found 180 results on 8 pages for 'eugene lim'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • How to generate a Program template by generating an abstract class

    - by Byron-Lim Timothy Steffan
    i have the following problem. The 1st step is to implement a program, which follows a specific protocol on startup. Therefore, functions as onInit, onConfigRequest, etc. will be necessary. (These are triggered e.g. by incoming message on a TCP Port) My goal is to generate a class for example abstract one, which has abstract functions as onInit(), etc. A programmer should just inherit from this base class and should merely override these abstract functions of the base class. The rest as of the protocol e.g. should be simply handled in the background (using the code of the base class) and should not need to appear in the programmers code. What is the correct design strategy for such tasks? and how do I deal with, that the static main method is not inheritable? What are the key-tags for this problem? (I have problem searching for a solution since I lack clear statements on this problem) Goal is to create some sort of library/class, which - included in ones code - results in executables following the protocol. EDIT (new explanation): Okay let me try to explain more detailled: In this case programs should be clients within a client server architecture. We have a client server connection via TCP/IP. Each program needs to follow a specific protocol upon program start: As soon as my program starts and gets connected to the server it will receive an Init Message (TcpClient), when this happens it should trigger the function onInit(). (Should this be implemented by an event system?) After onInit() a acknowledgement message should be sent to the server. Afterwards there are some other steps as e.g. a config message from the server which triggers an onConfig and so on. Let's concentrate on the onInit function. The idea is, that onInit (and onConfig and so on) should be the only functions the programmer should edit while the overall protocol messaging is hidden for him. Therefore, I thought using an abstract class with the abstract methods onInit(), onConfig() in it should be the right thing. The static Main class I would like to hide, since within it e.g. there will be some part which connects to the tcp port, which reacts on the Init Message and which will call the onInit function. 2 problems here: 1. the static main class cant be inherited, isn it? 2. I cannot call abstract functions from the main class in the abstract master class. Let me give an Pseudo-example for my ideas: public abstract class MasterClass { static void Main(string[] args){ 1. open TCP connection 2. waiting for Init Message from server 3. onInit(); 4. Send Acknowledgement, that Init Routine has ended successfully 5. waiting for Config message from server 6..... } public abstract void onInit(); public abstract void onConfig(); } I hope you get the idea now! The programmer should afterwards inherit from this masterclass and merely need to edit the functions onInit and so on. Is this way possible? How? What else do you recommend for solving this? EDIT: The strategy ideo provided below is a good one! Check out my comment on that.

    Read the article

  • Rollback in lucene

    - by Petrick Lim
    Is there a rollback in lucene? I'm saving & updating database repository & lucene repository simultaneously so that the lucene index & database are in sync.. ex. CustomerRepository.add(customer); SupplierRepository.add(supplier); CustomerLuceneRepository.add(customer); SupplierLuceneRepository.add(supplier); // If this here fails i cannot rollback the customer above DataContext.SubmitChanges();

    Read the article

  • Parsing specific numeric data from csv file using python

    - by KJ Lim
    Good morning. I have series of data in cvs file like below, 1,,, 1,137.1,1198,1.6 2,159,300,0.4 3,176,253,0.3 4,197,231,0.3 5,198,525,0.7 6,199,326,0.4 7,215,183,0.2 8,217.1,178,0.2 9,244.2,416,0.5 10,245.1,316,0.4 I want to extract specific data from second column for example 217.1 and 245.1 and have them concatenated into a new file like, 8,217.1,178,0.2 10,245.1,316,0.4 I use cvs module to read my cvs file, but, I can't extract specific data as I desire. Could anyone kindly please help me. Thank you.

    Read the article

  • CAN Controller DLL with Java Application. Unable to open CAN port.

    - by Joseph Lim
    I am creating a Java application that controls a Controller Area Network (CAN) controller via a vendor-supplied can.dll file. can.dll contains a function bool openPort(DWORD memAddr) that allows the application to establish connection with the CAN controller. I wrote a C++ test application, loaded can.dll via LoadLibrary and found this function to be working as it should, i.e. it returns true. However, in my Java application, calling this via JNI or JNA returns false. I hope someone can help me with this problem as I have been trying to fix this problem for more than a week. Thanks :) JL

    Read the article

  • Desktop PC Raid 5 or JBOD?

    - by Sean Lim
    I have a desktop PC and I want to get alot of space for movies, music, and pictures. I probably will not be deleting files. I am running Windows 7 on my system. It is kind of silly I just want the physical drives to be labeled as a single letter drive. And probably map my video, documents, pictures and music on that single drive. The main reason I considered RAID 5 because I would be lazy to get the data I lost and hopefully that if I get a new drive, it would rebuild it. So my question is which would be better? A second question is can I get RAID card that has only 2 internal connectors and still do RAID 5? or do I have to get a RAID card that has 4 internal connectors.

    Read the article

  • JNI: dll function works ok in C++ main, but not with dll wrapper

    - by Joseph Lim
    I have an a.dll (not modifiable as i do not have the source) with a function bool openPort(DWORD mem).I wrote a c++ main, loaded this dll using LoadLibrary, and the function works well.It returns true. Now, I need to call this function from Java via JNI. I wrote another b.dll with a function like so JNIEXPORT void JNICALL Java_MyClass_openPortFunc (JNIEnv *env, jobject obj, jint pMemPhy) { hInstLibrary = LoadLibrary("a.dll"); typedef bool (*openPort)(DWORD); openPort _openPort; _openPort = (openPort)GetProcAddress(hInstLibrary, "openPort"); DWORD memAddr = 0xda000; if(_openPort(memAddr)){ cout << "ok" << endl; }else{ cout << "failed " << endl; } } This however, causes the openPort to return false despite using the same parameters. I hope someone can advise me. Thank you. :)

    Read the article

  • mysql joining three specific tables

    - by sam lim
    Here what i would like to pull date from this three table. Table users i have three columns uid, username , data(text) Table users_order i have three columns uid, orders_id , users_email Table order_products i have three columns orders_id, product_id, product_name I would like to use product_id as the ref/search to pull the user info from those three tables. If product_id = 5 The query will display uid; username; users_email; orders_id; product_name; data (text) how would i right the sql query for this situation. Thanks,

    Read the article

  • BIOS update for Asrock H67M-GE/THW

    - by Eugene Beresovksy
    I can't seem to find a flash image for my mainboard. There is not even a product page for it (any more, although there used to be a manual at http://download.asrock.com/manual/qig/H67M-GETHW.pdf, as google revealed). So no driver updates from the manufacturer for my mainboard either. I offered the flash images for both of the similarly named H67M-GE and H67M-GE/HT to asrock's "Instant Flash" utility, but it complained it "could not find an image" on my usb drive. The asrock page states that "Instant Flash" searches for a flash image that exactly matches the mainboard, i.e. it must have determined that the H67M-GE/THW I have is different from H67M-GE and H67M-GE/HT. Any idea?

    Read the article

  • Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in ... on line 0

    - by Eugene
    I am using Ubuntu 10.04 and for some time I had to keep a downgraded PHP 5.2 package because I need to run Zend encrypted scripts. Recently I noticed that Zend released beta version of their loader (http://forums.zend.com/viewtopic.php?f=57&t=1365&start=80#p22073) so I updated to the native PHP 5.3 package, downloaded the .so file, added this to php.ini ;zend_extension=/etc/php5/ZendOptimizer.so zend_extension=/etc/php5/ZendGuardLoader.so zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.obfuscation_level_support=3 and restarted the server. Now I am getting this error: Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in ... on line 0 Do you by chance know an easy fix for this? Or should I downgrade back and wait till when they release something more stable?

    Read the article

  • Member Status: Inquorate in RHEL 5.6

    - by Eugene S
    I've encountered a strange issue. I had to change the time on my Linux RHEL cluster system. I've done it using the following command from the root user: date +%T -s "10:13:13" After doing this, some message appeared relating to <emerg> #1: Quorum Dissolved (however I didn't capture the message completely). In order to investigate the issue I looked at /var/log/messages and I've discovered these errors. Below is the output of few commands I got when tried to investigate the issue, however I don't have enough knowledge to make use of this information. [root@system1a ~]# clustat Cluster Status for system4081 @ Sun Mar 25 11:45:48 2012 Member Status: Inquorate Member Name ID Status ------ ---- ---- ------ chb_sys1a 1 Online, Local chb_sys2a 2 Offline [root@system1a ~]# cman_tool nodes Node Sts Inc Joined Name 1 M 872 2012-03-25 08:43:07 chb_sys1a 2 X 0 chb_sys2a [root@system1a ~]# qdiskd -f -d [17654] debug: Loading configuration information [17654] debug: 0 heuristics loaded [17654] debug: Quorum Daemon: 0 heuristics, 1 interval, 10 tko, 0 votes [17654] debug: Run Flags: 00000035 [17654] info: Quorum Daemon Initializing stat: Bad address [17654] crit: Initialization failed I tried to search through the internet and found out a quite similar issue here. However, for some reason I am not able to access the bug on bugzilla. The link to the bug is here

    Read the article

  • custom MAIL server -> Proxy Server -> Gmail Server

    - by Eugene
    So I have some custom VPS which route emails via MX record in DNS. And I need to setup gmail interface via Google Apps - this step and previous are clear. But how can I insert some middle layer, to check emails messages for special words/etc., so something like spam assasin proxy, but custom product. The question is: How could i setup proxy mail from my server = to proxy server(or application) = to gmail servers? Thank you, for any help!

    Read the article

  • Can't connect to Apple Time Capsule in home network using Home Plugs from Win 7 Machine

    - by Eugene
    I have the following home network setup with subnet 255.255.255.0 but recently moved my time capsule to a different location when I added a third Home Plug and can no longer ping or map a network drive to it from the Windows 7 Machine. However using Airport Utility on the Windows 7 machine I can manually configure the Time Capsule. Using a Macbook on WIFI Network 1 or 2 - I can backup to the time capsule, so its accessible via both the router wifi network and the time capsule wifi network. The Time Capsule is set to BRIDGE function - ie no NAT or DHCP server enabled. Any bright sparks out there that can help diagnose the problem? Router (192.168.1.254) WIFI Network 1 | | |---- Home Plug one |---- Home Plug Two | |---- Computer A Windows 7 (192.168.1.160) | |---- Printer (192.168.1.69) |---- Home Plug Three | |---- Apple Time Capsule (192.168.1.150) WIFI Network 2 |---- Smart TV (192.168.1.70) | |---- Apple TV (192.168.1.4)

    Read the article

  • NVIDIA GeForce GT750M drivers for Ubuntu 13.10 on iMac

    - by Eugene B
    I have just got a new iMac 14.3 with 21.5' display. It has Intel i7 processor and NVIDIA GeForce GT750M graphics card with GPU (Device ID: 0x00fe9). I have installed Ubuntu 13.10 on it (dual boot with refit). Everything works fine apart from graphics. It is clear that graphics' not accelerated, and there are no drivers suggested in the "Additional drivers" section. I have tried to Install nvidia drivers from the repository. Download nvidia drivers and install them manually. Follow instructions here. Follow instructions here. Follow instructions here. Install bumblebee. Play around with xorg.conf file. Blacklist nouveau. As you may guess, nothing worked. The weirdest thing is, that when I boot from a LiveCD, it picks up screen resolution and all the rest correctly, though when I install the system to my Hard Drive it clearly does not have proper drivers. Does anyone have any suggestion what to do?

    Read the article

  • RHEL Cluster FAIL after changing time on system

    - by Eugene S
    I've encountered a strange issue. I had to change the time on my Linux RHEL cluster system. I've done it using the following command from the root user: date +%T -s "10:13:13" After doing this, some message appeared relating to <emerg> #1: Quorum Dissolved however I didn't capture it completely. In order to investigate the issue I looked at /var/log/messages and I've discovered the following: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering GATHER state from 0. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Creating commit token because I am the rep. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Storing new sequence id for ring 354 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering COMMIT state. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering RECOVERY state. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] position [0] member 192.168.1.49: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] previous ring seq 848 rep 192.168.1.49 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] aru 61 high delivered 61 received flag 1 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Did not need to originate any messages in recovery. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Sending initial ORF token Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] CLM CONFIGURATION CHANGE Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] New Configuration: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.49) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Left: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.51) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Joined: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CMAN ] quorum lost, blocking activity Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] CLM CONFIGURATION CHANGE Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] New Configuration: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.49) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Left: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Joined: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [SYNC ] This node is within the primary component and will provide service. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering OPERATIONAL state. Mar 22 16:40:42 hsmsc50sfe1a kernel: dlm: closing connection to node 2 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] got nodejoin message 192.168.1.49 Mar 22 16:40:42 hsmsc50sfe1a clurgmgrd[25809]: <emerg> #1: Quorum Dissolved Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CPG ] got joinlist message from node 1 Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Cluster is not quorate. Refusing connection. Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Error while processing connect: Connection refused Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Invalid descriptor specified (-21). Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Someone may be attempting something evil. Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Error while processing disconnect: Invalid request descriptor Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering GATHER state from 9. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Creating commit token because I am the rep. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Storing new sequence id for ring 358 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering COMMIT state. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering RECOVERY state. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] position [0] member 192.168.1.49: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] previous ring seq 852 rep 192.168.1.49 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] aru f high delivered f received flag 1 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] position [1] member 192.168.1.51: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] previous ring seq 852 rep 192.168.1.51 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] aru f high delivered f received flag 1 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Did not need to originate any messages in recovery. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] Sending initial ORF token Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] CLM CONFIGURATION CHANGE Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] New Configuration: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.49) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Left: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Joined: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] CLM CONFIGURATION CHANGE Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] New Configuration: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.49) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.51) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Left: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] Members Joined: Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] #011r(0) ip(192.168.1.51) Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [SYNC ] This node is within the primary component and will provide service. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [TOTEM] entering OPERATIONAL state. Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [MAIN ] Node chb_sfe2a not joined to cman because it has existing state Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] got nodejoin message 192.168.1.49 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CLM ] got nodejoin message 192.168.1.51 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CPG ] got joinlist message from node 1 Mar 22 16:40:42 hsmsc50sfe1a openais[25715]: [CPG ] got joinlist message from node 2 Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Cluster is not quorate. Refusing connection. Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Error while processing connect: Connection refused Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Invalid descriptor specified (-111). Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Someone may be attempting something evil. Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Error while processing get: Invalid request descriptor Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Invalid descriptor specified (-21). Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Someone may be attempting something evil. Mar 22 16:40:42 hsmsc50sfe1a ccsd[25705]: Error while processing disconnect: Invalid request descriptor How could this be related to the time change procedure I performed?

    Read the article

  • Asterisk does not recognise DTMF tones from mobile phones

    - by Eugene van der Merwe
    We have an Asterisk 1.8.7.0 (the Elastix derivative) switchboard. Every since a month ago, seemingly out of the blue, the switchboard does not recognise DTMF tones any more from mobile phones. Testing the switchboard using 7777 works. Testing the switchboard from a normal phones works. Testing the switchboard from a mobile phone fails. Looking at the log file I can't see anything. I used 'asterisk -rvvvv' and 'tail -f /var/log/asterisk/full' to see the live output and scan the logs. I guess I don't see anything because it's simply not recognising the DTMF tones. I did brief research and found an old setting for SIP phones, 'rfc2833compensate=yes', and tried adding this to 'sip_general_custom.conf'. After that I did 'core restart when convenient' but that didn't make any difference. Could anyone give me some additional troubleshooting steps?

    Read the article

  • FreeBSD 32bit to 64bit migration

    - by eugene y
    I need to transfer my LAMP server (FreeBSD 7.0 i386) to another hosting. I would like to also upgrade to the 64bit version (to eliminate 4GB memory limit). Anyone have some pre-destructive suggestions? Any tutorials that you're familiar with that give an idea of the gotchas? Thanks!

    Read the article

  • Plesk Postfix Mail Server 9.5.4 very heavy load, 1000s of processes

    - by Eugene van der Merwe
    Our Plesk Linux Ubuntu 64-bit mail server has extremely high load and we don't know how to isolate it. The load was okay will two weeks ago but in the last two weeks it's seriously deteriorated. The mail server has been running for years and we have had sporadic performance issues. Normally we reduce the load by turning off all SPAM checks until the problem is sorted (which sometimes resolves itself). Currently we have turned of real time block lists, SPF checking and we have attempted to turn off SpamAssassin. No matter what we do the SpamAssassin check box stays ticked in the GUI. Out of desperation we have done /etc/init.d/psa-spamassassin stop. For years we haven't been able to do SpamAssassin because it kills the server. We would like to use it but performance is more important for now. We cannot turn off Greylisting. The moment we turn off Greylisting our help desk is inandated with calls. Out of desperation we investigated truncating the Greylisting database which is now 2.5 GB big but we abandoned this after noticing turning of Greylisting doesn't improve the performance at all. We have no anti-virus. It's just more load and Dr. Web never really worked that well for us. But we'll try that if it will make a difference. We have implemented Postfix Anvil. This seems to have made the situation worse so we disabled it. We’re not sure if this is the case. Our current mail server is configured to forward all SMTP to a relay server. We did so to reduce the load. This helped a lot because outgoing queues are generally empty. We are running in an Expand configuration. The mail server has about 12 000 accounts of which maybe half are active. We have read through this document: http://www.postfix.org/STRESS_README.html but there are too many settings and we don’t know which ones to choose. Please assist urgently. We need advice on how to fix this problem before all our clients abandon is. The only clue we have is that there are 100s of these processes: 30 13205 1 0 13:18 ? 00:00:00 /usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10027 before-queue 30 13207 1 0 11:38 ? 00:00:00 /usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10027 before-queue 30 13208 1 0 13:18 ? 00:00:00 /usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10026 before-remote 30 13209 1 0 11:38 ? 00:00:00 /usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10026 before-remote 30 13213 1 0 13:18 ? 00:00:00 /usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10027 before-queue

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >