Skip to main content

Posts

Showing posts from 2017

Change Windows 7 Taskbar Text Color

This likely works for Windows 8, and 10. I got fed-up with Windows 10 forced updates at worst possible time (and other stupidities) and finally installed Windows 2008 R2 (Windows 7) so that I am in total control. But Windows 7 lacks the 'Task View' (Win + Tab) which is awesome and can be duplicated with Switcher ', however it requires using Windows Aero theming engine. I personally prefer the classic gray flat look so as a compromise I tweaked the default theme to a light solid color - which makes the white taskbar icon text unreadable, and Microsoft in all it's wisdom to this day does not allow any sane way to change it. After way too much effort spent in finding a solution I want to admit to I did finally stumbled onto the fact that Classic Shell includes change taskbar color functionality! - a simple change to black as in the screenshot and things are good again. Be legendary and do social like this post as that helps me immensely and do follow me on twi...

Brother Scanner Drivers for Windows Server

Modded drivers to allow scanning MFC-J4710DW on a Windows Server 2008 R2 Officially only printing is supported for the Windows Server platform for the MFC-J4710DW and similar printers. On the download page you are advised that the full software suite functionality is not available . If you attempt to install the full software you will receive OS not supported error, trying to force install the drivers also fails. But with an iron will, a weekends worth of time, and some luck I was able to modify later model's drivers and successfully install the scanner drivers. Unfortunately ControlCenter4 seems to be hardcoded not to function in a Server environment, but as an alternative I found NAPS2 which works wonderfully with the 'scan' button events - please donate to the developer! You can find the modified driver at this MFC-J4710DW Scanner Driver Link . Please note 'Desktop Experience' feature is required or driver will fail with Error: No INF AddService dire...

Force recall a Salesforce approval process

Non-submitter and non-administrator approval recall Salesforce lacks the functionality to recall an in-flight approval process for anyone other than the original submitter or a system administrator. For our latest client this posed a problem as their specific business needs required the ability to recall an approval one step back in a multi person process, and giving the approvers administrative permissions posed an unacceptable security risk. Thus until Salesforce implements this idea (please upvote) to extend recalling to record owners, below approach workaround will accomplish approval recall without compromising security - albeit in an interesting way. setup an email service that runs in elevated privileges and recalls force recall an approval provide normal users the ability to execute an Apex method that internally emails that service Reference setup Below are the relevant bits extracted from a working solution, leverage and adapt to your own unique solution. Ape...

First error: Process failed. First exception on row 0; first error: INVALID_OPERATION, Illegal transition type: []

Approving a record through APEX error Searched return no relevant results to the issue I encountered. I encountered this when writing a schedulable class and thought it was due to SF restriction inside the limited context of the scheduler; so posting this in hopes it saves others some frustration and time. The solution Check the spelling when specifying the action (see Docs here ). In my case I had Approved instead of Approve , allowed options are Approve , Remove d , and Reject . ... Approval.ProcessWorkitemRequest oPWR = new Approval.ProcessWorkitemRequest(); oPWR.setComments('Auto approved through JobId: \'' + oBatchableContext.getJobId() + '\''); oPWR.setAction('Approve'); // allowed choices are 'Approve`, `Removed`, `Reject`. oPWR.setWorkItemId(oWorkItemCurrent.ID); Approval.ProcessResult oPR = Approval.process(oPWR); ... If this has helped you feel free to comment or follow me on twitter @danielsokolows .

Selecting Indvidiual Custom Labels in Eclipse Force.com IDE

Workaround for managing individual custom labels in Eclipse Force.com IDE Unfortunately the Force.com IDE does not yet support individual custom label selection even though the UI does. There is a bug/issue filled so please upvote it at this link Selection of individual `CustomLabels` not working There is a workaround however. One must manually update the `package.xml` and specify the metadata member `CustomLabel` (no s at the end) and the individual labels like so. Also ensure you don't have the labels node selected through the Eclipse Force.com IDE UI, that is there should not be an entry in your `package.xml` for member `CustomLabel s `. One annoying caveat of this is to edit `CustomeLabels.labels` you must be in offline ('Right click root project > Force.com > Work Offline') mode otherwise it get's still refreshed from the server. <types> <members>Label_1</members> <members>Label_2</members> ...

MQL5 indicator artifacts issue

MQL5 indicator buffer random values During my coding of an indicator random values would end up in the index buffer if one would switch time frames. It took me a few hours to figure out that if I didn't explicitly set an empty value this would cause this to happen - so the solution is to always set a value during your OnCalculate() loop both for your empty bars and not. /* OnCalculate =========== Called only in custom indicators when it's necessary to calculate the indicator values by the Calculate event. */ int OnCalculate(const int iRatesTotal, const int iPreviousCalculated ,const datetime &time[] ,const double &aOpen[] ,const double &aHigh[] ,const double &aLow[] ,const double &aClose[] ,const long &tick_volume[] ,const long &volume[] ,const int &spread[]) { Print(">>> OnCalculate(): `iRatesTotal=" + iRatesTotal + "`, `iPreviousCalculated=" + iPreviousCalculated + "`"); //int...

A review of my one month FOREX trading experience

In Charts and Tables My first month trading FOREX trading is now complete and as expected (but definitely not wanted) my account balance has gone down 52% . I have done a total 115 trades which equates to about 28 trades per week. Trade History export to CSV MetaTrader must have been designed by geeks for geeks as there is no export to CSV/Excell. Fortunately I am such aforementioned geek and created a script for this purpose. On the bright side is I expected to start learning MQL at some point so this started that process. You can find my script at this link: MetaTrader Export Trade History to CSV . Lossing vs Winning Trades I did really great in the first week, perhaps it was luck perhaps it was new trader confidence. Looking back at the trades I seldom had a stop loss, had a generous stop loss in place, or kept adjusting it, and I recall leaving the trades alone then coming back to them seeing profits and just setting a trailing stop loss; I can possibly confirm this...

Least Correlated Forex Currency Pairs

Minimizing risk trough Un-correlation The number of possible major/minor currency is large and trading currencies that are correlated logically increases risk. My Google search for least correlated Forex pairs came up empty so I decided to run the analysis myself. Using information from this list on Oanda I created a JS script that would loop through the table entires and return the least correlated pairs based on the 1 year value. Major Currencies Max correlation between -0.50 and 0.50 . ["AUD/JPY", "AUD/USD", "EUR/AUD"] Major + Minor Currencies Max correlation between -0.60 and 0.60 , with preference to try to keep major currencies in final set ["AUD/CAD", "AUD/CHF", "AUD/HKD", "AUD/JPY", "EUR/GBP", "EUR/SEK", "NZD/CAD", "SGD/CHF", "USD/SAR"] You may want to run the below snippet and adjust aPAIRS_TO_TRY_FIRST and nMAX_ABSOLUTE_CORRELATION ...