Search Results

Search found 113 results on 5 pages for 'spencer lim'.

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

  • Funnelling http traffic

    - by spencer p
    I have a situation where a large batch of servers (X), on demand, need to request data from a smaller set of web servers (Y). The worst case scenario is if all servers in X decide to fetch different requests to one server in Y. That would be X amount of connections, which could be a very large burst of traffic. The best case scenario is if 1 server in X hit 1 server in Y in tandem. Life does not work like this. One idea to entertain is placing a proxy, similar to squid between X and Y. All of X servers can connect to this proxy, but would result in a few persistent (http keepalive) connections to Y. If The few were say, 3 or 4, then it would funnel. If we could then rate limit those connections and traffic decides to spike unusually high, we wouldn't hurt anyone but ourselves. Thoughts?

    Read the article

  • How do I access my public DNS on Amazon's EC2

    - by Spencer Carnage
    I'm working with Amazon's EC2 for the first time. I went through all of the steps at http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/ and now I'm trying to access the public DNS through a web browser. I get nothing. I don't even know if I'm supposed to get anything, really. I just want to see something that indicates that my instance is accessible from the web for development's sake. I'm completely new at this and I can't find a simple answer to this anywhere to save my life. Any help would be MUCH appreciated. Thanks!

    Read the article

  • "merging" multiple internet connections

    - by Spencer R
    I've seen this question asked several times here on SF, but I'm looking for some updated information; specifically concerning Server 2012. I'm in the process of buying a home so I'm trying to get some plans together on how I want to structure my network. Internet speeds aren't the greatest and connections can be unreliable where the house is so I was thinking of having two DSL lines installed. My question is, how could I leverage those two connections to create the best network I can, in terms of speed and reliability. My parents will be moving in with me - they consume a lot of bandwidth as it is, but then add my internet traffic to it, and I'm headed for a lot of frustration. I thought I remember reading somewhere that Server 2012 has some new functionality to utilize multiple connections on multiple NICs in a way that wasn't possible in earlier versions of Server. Not sure if Windows will work but, I'm an application developer and spend the majority of my time in Windows environments. However, I've only recently returned to the Windows world, so I'd like my main server at home to run Win Server 2012 so that I can become more familiar with it.

    Read the article

  • Autosaving on emacs or xemacs files (preferably on loss of focus)

    - by Spencer
    Ideally I want to replicate with emacs functionality from TextMate, whereby on loss of focus i.e. I click away from the buffer, my file saves. If this isn't possible, I want to customize emacs so that it will autosave the file for every character I write. When I say this I don't mean I want to autosave to the ~ backup files. I want to save the file I am currently working on. I am working on a Fedora VM. Note I am not looking for a backup or autosave. I want the file I am actually in to save, so that if I loaded the html file I am editing in a web browser it would reflect my new changes without me having to explicitly change it.

    Read the article

  • App cannot start at all in Android 2.2 (Froyo)

    - by Roland Lim
    Dear fellow Android developers & Google Engineers, My app has been running okay until the recent Froyo update. After installing the Android 2.2 SDK, I can compile my code without any errors. However, when I run it, it just force closes: Here's the log: 05-23 10:15:13.463: DEBUG/AndroidRuntime(423): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 05-23 10:15:13.463: DEBUG/AndroidRuntime(423): CheckJNI is ON 05-23 10:15:14.193: DEBUG/AndroidRuntime(423): --- registering native functions --- 05-23 10:15:15.293: DEBUG/AndroidRuntime(423): Shutting down VM 05-23 10:15:15.303: DEBUG/dalvikvm(423): Debugger has detached; object registry had 1 entries 05-23 10:15:15.333: INFO/AndroidRuntime(423): NOTE: attach of thread 'Binder Thread #3' failed 05-23 10:15:16.003: DEBUG/AndroidRuntime(431): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< 05-23 10:15:16.013: DEBUG/AndroidRuntime(431): CheckJNI is ON 05-23 10:15:16.273: DEBUG/AndroidRuntime(431): --- registering native functions --- 05-23 10:15:17.392: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat= [android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.handyapps.easymoney/.EasyMoney } 05-23 10:15:17.602: DEBUG/AndroidRuntime(431): Shutting down VM 05-23 10:15:17.662: DEBUG/dalvikvm(431): Debugger has detached; object registry had 1 entries 05-23 10:15:17.742: INFO/AndroidRuntime(431): NOTE: attach of thread 'Binder Thread #3' failed 05-23 10:15:17.912: INFO/ActivityManager(59): Start proc com.handyapps.easymoney for activity com.handyapps.easymoney/.EasyMoney: pid=438 uid=10035 gids={1006, 1015} 05-23 10:15:19.032: DEBUG/AndroidRuntime(438): Shutting down VM 05-23 10:15:19.032: WARN/dalvikvm(438): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): FATAL EXCEPTION: main 05-23 10:15:19.062: ERROR/AndroidRuntime(438): java.lang.RuntimeException: Unable to instantiate application com.handyapps.easymoney.EasyMoney: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$PackageInfo.makeApplication (ActivityThread.java:649) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4232) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.access$3000(ActivityThread.java:125) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.os.Handler.dispatchMessage(Handler.java:99) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.os.Looper.loop(Looper.java:123) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread.main(ActivityThread.java:4627) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at java.lang.reflect.Method.invokeNative(Native Method) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at java.lang.reflect.Method.invoke(Method.java:521) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:868) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at dalvik.system.NativeStart.main(Native Method) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): Caused by: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.Instrumentation.newApplication(Instrumentation.java:957) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.Instrumentation.newApplication(Instrumentation.java:942) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): at android.app.ActivityThread$PackageInfo.makeApplication (ActivityThread.java:644) 05-23 10:15:19.062: ERROR/AndroidRuntime(438): ... 11 more 05-23 10:15:19.082: WARN/ActivityManager(59): Force finishing activity com.handyapps.easymoney/.EasyMoney 05-23 10:15:19.592: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{450018f0 com.handyapps.easymoney/.EasyMoney} //////////////THE ANDROID MANIFEST FILE//// <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-feature android:name="android.hardware.camera" /> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> <application android:icon="@drawable/icon" android:name="@string/app_name" android:label="@string/app_name" android:debuggable="false"> <activity android:name=".EasyMoney" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar" android:launchMode="singleTask" android:clearTaskOnLaunch="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".TranList" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".TranEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BillReminderEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BillReminderList" android:launchMode="singleTop" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BudgetList" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BudgetEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".Search" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".PasscodeEntry" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden" android:screenOrientation="portrait"/> <activity android:name=".AccountList" android:theme="@android:style/Theme.Light.NoTitleBar"> </activity> <activity android:name=".AccountEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".UserSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".CurrencySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".DisplaySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".BackupSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".CategoryList" android:theme="@android:style/Theme.Light.NoTitleBar" /> <activity android:name=".CategoryEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/> <activity android:name=".ExpenseByCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".BalanceReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyExpenseReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyIncomeReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".MonthlyCashflowReport" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".PhotoList" android:theme="@android:style/Theme.Light.NoTitleBar" /> <activity android:name=".ExpenseByPayee" android:theme="@android:style/Theme.Light.NoTitleBar"/> <activity android:name=".ExpenseBySubCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/> <service android:name="StartAlarm_Service"> <intent-filter> <action android:name="com.handyapps.easymoney.StartAlarm_Service" /> </intent-filter> </service> <service android:name=".AlarmService_Service" android:process=":remote" /> <receiver android:name="StartupIntentReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="android.intent.category.HOME" /> </intent-filter> </receiver> <receiver android:name=".WidgetProvider" android:label="@string/widget_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget" /> </receiver> <receiver android:name=".WidgetProvider" android:label="@string/widget_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <data android:scheme="easymoney_widget" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget" /> </receiver> <receiver android:name=".WidgetProvider"> <intent-filter> <action android:name="com.handyapps.easymoney.WIDGET_CONTROL" /> <data android:scheme="easymoney_widget" /> </intent-filter> </receiver> </application> The main startup class is com.handyapps.easymoney.EasyMoney. I placed a breakpoint at the start of the onCreate() method but I discovered it didn't even reach there. Somehow, the application just couldn't be loaded in Android 2.2... but it works perfectly fine for all the previous Android versions. Been trying to find the cause for the past 2 days but am totally stumped!! Any help will be greatly appreciated!!!! Thanks!! Roland

    Read the article

  • How to expand URLs in C#?

    - by Hao Wooi Lim
    If I have a URL like http://popurls.com/go/msn.com/l4eba1e6a0ffbd9fc915948434423a7d5, how do I expand it back to the original URL programmatically? Obviously I could use an API like expandurl.com but that will limits me to 100 requests per hour.

    Read the article

  • JNI dll in Ganymede

    - by Joseph Lim
    How do I import a dll into my dll project in Eclipse Ganymede? I am creating a dll for JNI. I included the .h of the dll but I keep getting errors about the function not referenced... Please help. Thanks.

    Read the article

  • htaccess to change url

    - by Guo Hong Lim
    I have the following code in my .htacess but it didn't work right. Is it because mod-rewrite is no "on", if so, how can i check? Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\$ $1.php [nc] I wanted to rename my address, example: http://www.abc.com - http://www.abc.com http://abc.com - http://www.abc.com http://www.abc.com/123.html - http://www.abc.com/123 http://www.abc.com/12-12-12.html - http://www.abc.com/12-12-12 http://subdomain.abc.com/123.html - http://subdomain.abc.com/123 Basically removing the extension and ensuring that its www is intact.

    Read the article

  • 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

  • Setting up an Ubuntu 9.10 chroot for Android OS builds

    <b>Spencer Herzberg Blog: </b>"So the goal of this post will be to install a 32-bit chroot of 9.10 in my fresh install of 10.04 as 9.10 is easier to build and test Cyanogen's custom Android rom. I have modified some guides from here and here. I have also elected to use schroot as it allows for easy chroot access."

    Read the article

  • SQL MIN in Sub query causes huge delay

    - by Spencer
    I have a SQL query that I'm trying to debug. It works fine for small sets of data, but in large sets of data, this particular part of it causes it to take 45-50 seconds instead of being sub second in speed. This subquery is one of the select items in a larger query. I'm basically trying to figure out when the earliest work date is that fits in the same category as the current row we are looking at (from table dr) ISNULL(CONVERT(varchar(25),(SELECT MIN(drsd.DateWorked) FROM [TableName] drsd WHERE drsd.UserID = dr.UserID AND drsd.Val1 = dr.Val1 OR (((drsd.Val2 = dr.Val2 AND LEN(dr.Val2) > 0) AND (drsd.Val3 = dr.Val3 AND LEN(dr.Val3) > 0) AND (drsd.Val4 = dr.Val4 AND LEN(dr.Val4) > 0)) OR (drsd.Val5 = dr.Val5 AND LEN(dr.Val5) > 0) OR ((drsd.Val6 = dr.Val6 AND LEN(dr.Val6) > 0) AND (drsd.Val7 = dr.Val7 AND LEN(dr.Val2) > 0))))), '') AS WorkStartDate, This winds up executing a key lookup some 18 million times on a table that has 346,000 records. I've tried creating an index on it, but haven't had any success. Also, selecting a max value in this same query is sub second in time, as it doesn't have to execute very many times at all. Any suggestions of a different approach to try? Thanks!

    Read the article

  • Overflow issue in IE 7

    - by Spencer Carnage
    I need some help with CSS overflow in IE, namely IE 7. I want the nested div content to be hidden. <div style="width:100px; height:100px; overflow:hidden; border:1px dashed red;"> <div style="width:60px; left:80px; position:relative;">hidden stuff goes here</div> </div> It works fine in FF but in IE 7, the overflow content is not hidden.

    Read the article

  • Advice on logic circuits and serial communications

    - by Spencer Ruport
    As far as I understand the serial port so far, transferring data is done over pin 3. As shown here: There are two things that make me uncomfortable about this. The first is that it seems to imply that the two connected devices agree on a signal speed and the second is that even if they are configured to run at the same speed you run into possible synchronization issues... right? Such things can be handled I suppose but it seems like there must be a simpler method. What seems like a better approach to me would be to have one of the serial port pins send a pulse that indicates that the next bit is ready to be stored. So if we're hooking these pins up to a shift register we basically have: (some pulse pin)-clk, tx-d Is this a common practice? Is there some reason not to do this? EDIT Mike shouldn't have deleted his answer. This I2C (2 pin serial) approach seems fairly close to what I did. The serial port doesn't have a clock you're right nobugz but that's basically what I've done. See here: private void SendBytes(byte[] data) { int baudRate = 0; int byteToSend = 0; int bitToSend = 0; byte bitmask = 0; byte[] trigger = new byte[1]; trigger[0] = 0; SerialPort p; try { p = new SerialPort(cmbPorts.Text); } catch { return; } if (!int.TryParse(txtBaudRate.Text, out baudRate)) return; if (baudRate < 100) return; p.BaudRate = baudRate; for (int index = 0; index < data.Length * 8; index++) { byteToSend = (int)(index / 8); bitToSend = index - (byteToSend * 8); bitmask = (byte)System.Math.Pow(2, bitToSend); p.Open(); p.Parity = Parity.Space; p.RtsEnable = (byte)(data[byteToSend] & bitmask) > 0; s = p.BaseStream; s.WriteByte(trigger[0]); p.Close(); } } Before anyone tells me how ugly this is or how I'm destroying my transfer speeds my quick answer is I don't care about that. My point is this seems much much simpler than the method you described in your answer nobugz. And it wouldn't be as ugly if the .Net SerialPort class gave me more control over the pin signals. Are there other serial port APIs that do?

    Read the article

  • GAE - Getting TypeError requiring class instance be passed to class's own method...

    - by Spencer Leland
    I'm really new to programming... I set up a class to give supporting information for Google's User API user object. I store this info in the datastore using db.model. When I call the okstatus method of my user_info class using this code: elif user_info.okstatus(user): self.response.out.write("user allowed") I get this error: unbound method okstatus() must be called with user_info instance as first argument (got User instance instead) Here is my user_info class. class user_info: def auth_ctrlr(self, user): if self.status(user) == status_allowed: return ("<a href=\"%s\">Sign Out</a>)" % (users.create_login_url("/"))) else: return ("<a href=\"%s\">Sign In or Get an Account</a>)" % (users.create_logout_url("/"))) def status(self, user): match = sub_user.gql(qu_by_user_id, user.user_id) return match.string_status def group(self, user): match = sub_user.gql(qu_by_user_id, user.user_id) grp = group_names.gql(qu_by_user_id, match.groupID) return grp def okstatus(self, user): match = self.status(user) if match == status_allowed: return True My understanding is that the argument "self" inside the method's calling arguments describes it as a child to the class. I've tried everything I can think of and can't find any related info online. Can someone please tell me what I'm doing wrong? Thanks

    Read the article

  • Properly using Log4r in Ruby Application

    - by Spencer
    I must really be missing something obvious, but I'm having trouble with general use of Log4r in my Ruby application. I am able to log without issue, but the overhead seems clunky the way I have it setup. I'm basically passing the full path to a filename to log in each class in my application. The ruby script that is called pulls the log file from one of the arguments in ARGV which is then passed around and set in each class that I call in ruby. In each class I use the patternFormatter to insert the class/file name into the log statement. Is there a better way to make this work? It feels like no matter what I think of will require something to be passed to each class in my ruby application. I could set the log file in a yaml configuration file instead, but then I would be passing around the configuration file to each class as well. Any advice? If this doesn't make sense I could try and post some more specific code samples to further explain what I mean. Thanks!

    Read the article

  • CSS Drop-Shadows Without Images

    - by Spencer B.
    I'm trying to use Nicolas Gallagher's brilliant CSS work on applying CSS drop-shadows to elements without images and without extra markup using the :before and :after pseudo-elements. His code is provided below... .drop-shadow { position:relative; width:90%; } .drop-shadow:before, .drop-shadow:after { content:""; position:absolute; z-index:-1; bottom:15px; left:10px; width:50%; height:20%; max-width:300px; -webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); -moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); -webkit-transform:rotate(-3deg); -moz-transform:rotate(-3deg); -o-transform:rotate(-3deg); transform:rotate(-3deg); } .drop-shadow:after{ right:10px; left:auto; -webkit-transform:rotate(3deg); -moz-transform:rotate(3deg); -o-transform:rotate(3deg); transform:rotate(3deg); } I'm trying to target all images wrapped with an a tag, which in Wordpress are really full-size images that have been resized to a medium height and width in the backend. When the user clicks on the smaller image in the post, it opens up a new tab with the fullsize view of the image (I'm sure you're already familiar with this if you use Wordpress). For some reason, I can't get his code to work, and I'm wondering if I'm targeting this wrong within my CSS. Can you help? In place of the .drop-shadow class that he uses, I'm target all images wrapped with an a tag within the #main-i div. So, like this... #main-i a img Does anyone know how to target it better than I have so that I can get the drop shadows to be applied for all images within the specified div? Thanks for your help! P.S. An example of the image I am wanting to target with this CSS is the picture of the Haitian boy here: http://lifebridgecypress.org/our-heart/seventy-two/help-haiti

    Read the article

  • oracle query with inconsistent results

    - by Spencer Stejskal
    Im having a very strange problem, i have a complicated view that returns incorrect data when i query on a particular column. heres an example: select empname, has_garnishment from timecard_v2 where empname = 'Testerson, Testy'; this returns the single result 'Testerson, Testy', 'N' however, if i use the query: select empname, has_garnishment from timecard_v2 where empname = 'Testerson, Testy' and has_garnishment = 'Y'; this returns the single result 'Testerson, Testy', 'Y' The second query should return a subset of the first query, but it returns a different answer. I have dissected the view and determined that this section of the view definition is where the problem arises(Note, I removed all of the select clause except the parts of interests for clarity, in the full query all joined tables are required): SELECT e.fullname empname , NVL2(ded.has_garn, 'Y', 'N') has_garnishment FROM timecard tc , orderdetail od , orderassign oa , employee e , employee3 e3 , customer10 c10 , order_misc om, (SELECT COUNT(*) has_garn, v_ssn FROM deductions WHERE yymmdd_stop = 0 OR (LENGTH(yymmdd_stop) = 7 AND to_date(SUBSTR(yymmdd_stop, 2), 'YYMMDD') sysdate) GROUP BY v_ssn ) ded WHERE oa.lrn(+) = tc.lrn_order AND om.lrn(+) = od.lrn AND od.orderno = oa.orderno AND e.ssn = tc.ssn AND c10.custno = tc.custno AND e.lrn = e3.lrn AND e.ssn = ded.v_ssn(+) One thing of note about the definition of the 'ded' subquery. The v_ssn field is a virtual field on the deductions table. I am not a DBA im a software developer but we recently lost our DBA and the new one is still getting up to speed so im trying to debug this issue. That being said, please explain things a little more thoroughly then you would for a fellow oracle expert. thanks

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >