Monday, April 30, 2018

Google Charts Legend Position Top Not Working

Leave a Comment
You can use this jsfiddle for testing Full Code: google.load('visualization', '1.1', { 'packages': ['bar'] }); google.setOnLoadCallback(drawStuff); function drawStuff() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Topping'); data.addColumn('number', 'Nescafe Instant'); data.addColumn('number', 'Folgers Instant'); data.addColumn('number', 'Nescafe Beans'); data.addColumn('number', 'Folgers Beans'); data.addRows([ ['2001', 500, 1200, 816, 200],...
Read More

PHP soap issues

Leave a Comment
Drupal 7-soap This is the error which iam getting in error log and when iam trying to print the test.wsdl file SoapFault: looks like we got no XML document in SoapClient->__call() I have no clue what is the error My project environment PHP : 5.4.11 MySQL : 5.5.27 Apache : 2.2.3 OS : CentOS 5.8 code information function ai_server() { ini_set('soap.wsdl_cache_ttl', 0); $server = new SoapServer(file_create_url(variable_get('app_integration_wsdl')),...
Read More

Facebook Graph API v2.0 deprecation

Leave a Comment
I've received this e-mail from facebook: Souts Pay has been making recent API calls to Graph API v2.0, which will reach the end of the 2-year deprecation window on Monday, August 8, 2016. Please migrate all calls to v2.1 or higher in order to avoid potential broken experiences. We recommend using our new Graph API Upgrade Tool to see which of your calls are affected by this change as well as any replacement calls in newer versions. You can also use our changelog to see the full list of changes. But...
Read More

Swift parse JSON to Model Object

Leave a Comment
I had this method here and it returned my data exactly as I needed it: func getTestData() -> [Any]? { return [GradingData(lot: "lot", andColumns: "andColumns", SLAIssuedFinalGrading: true, SLAIssuedFinalGradingDate: "SLAIssuedFinalGradingDate", CityApprovalIssued: true, CityCommentReceived: false, GradingRepair: "GradingRepair", CurbStopRepair: "CurbStopRepair", SplashPadDownSpout: "SplashPadDownSpout", RYCBOtherRepairs:...
Read More

OnActivityResult activity error : Failure delivering result ResultInfo

Leave a Comment
error : Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:28362 flg=0x1 }} to activity {com.projectbox.uploadfile/com.projectbox.uploadfile.MainActivity}: java.lang.NullPo @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == PICK_IMAGE && resultCode == Activity.RESULT_OK) { ...
Read More

Sunday, April 29, 2018

Two way data binding issue in a MVVM

Leave a Comment
I am trying to build a simple C#/WinFoms project that uses the Model-View-ViewModel design pattern according to the structure: The data binding between the two UserControls and the associated ViewModels does not work well. The MainForm contains two UserControls (UC): Uc_Create, Uc_Iteration. Each UC contains a combobox that is connected to the associated property in the ViewModel_xxx, namely Uc_Create has: this.comboBox1ComplexCreate.DataSource...
Read More

How to get to Facebook User Page by a known app scoped User ID

Leave a Comment
Till today there have been methods to get to Facebook User Page by user id. I mean ID, that facebook API returns to our app: https://graph.facebook.com/10152384781676191?fields=link { "link": "https://www.facebook.com/app_scoped_user_id/10152384781676191/", "id": "10152384781676191" } But none of the methods works any more: https://www.facebook.com/app_scoped_user_id/10152384781676191 - does not work https://facebook.com/profile.php?id=10152384781676191 - does not work https://facebook.com/10152384781676191 - does...
Read More

Getting same predicted values for all inputs in trained tensor flow network

Leave a Comment
I have created a tensorflow network designed to read data from this dataset (note: the information in this dataset is designed purely for test purposes and is not real): and am trying to build a tensorflow network designed to essentially predict values in the 'Exited' column. My network is structured to take 11 inputs, pass through 2 hidden layers (6 neurons each) with relu activation, and output a single binary value using a sigmoid...
Read More

Calculate input field based on expiry date

Leave a Comment
A form with 50 entries: each with P1-48, E1-48, and X1-48. I want to calculate the Entry Fee "E1" based on the expires date X1. The js date format for the expires date is YYYY.MM.DD, ex. 2018.04.21 and a player pays $3 if his expires date is greater or equal to today's date. He pays $5 if his expires date is older or less than today's date. But if the expires date is blank and the player pays a membership fee, the Entry Fee is waived to zero. JS: <script src = "js/moment.min.js"></script> I also have this...
Read More

AWS SNS subscription keeps deleting the subscription itself

Leave a Comment
I subscribed to a SNS topic with an endpoint of an email address. I have received notice of unsubscribing from the topic lastnight, I asked all who had access to the inbox, nobody clicked the unsubscribe link. I recreated the subscription and this morning it unsub itself again. How could that be? And how can I prevent this from happening again? I looked up in CloudTrail but unsubscribe action is not logged unless they are made with in the console or via the API. Any indicator would be helpful , thanks. 1 AnswersAnswers...
Read More

What does algebraic effects mean in FP?

Leave a Comment
Ref: http://www.eff-lang.org/handlers-tutorial.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/2016/08/algeff-tr-2016-v2.pdf https://github.com/matijapretnar/eff I have searched a lot of links, but it seems that no one could explain it specifically. Could anyone give some code(use javaScript) to explain it? Thanks a lot! 0 Answe...
Read More

Saturday, April 28, 2018

recreating a ggplot plot in d3.js plot

Leave a Comment
With a data frame dft below I'm plotting the data using R's ggplot. I need to recreate this plot in D3 for using in a Angular (2+) web app. Data text <- " MODEL,ENGINE,var,value,label,var2 ABCD A1601 F1S - QU1234,QUOINOK,varA_XX_Xxxx,11989,11989,varA_XX_Xxxx ABCD A1601 F1S - QU1234,QUOINOK,varB_XX_xxxXx,1.87,1.87,varB_XX_xxxXx ABCD A1601 F1S - QU1234,QUOINOK,varC,1.61,1.61,varC ABCD A1601 F1S - QU1234,QUOINOK,varD_XXX_YYYYYYY_Zzz,0,0,VAR...
Read More

Uncaught TypeError: Cannot read property 'bool' of undefined after upgrade reactjs

Leave a Comment
I have just upgraded my reactjs project from 15.4.2 to 16.3.2 , the project compiles fine however, in the browser, I get this error: Uncaught TypeError: Cannot read property 'bool' of undefined at Object.<anonymous> (propTypes.js:3) at __webpack_require__ (propTypes.js:3) at Object.<anonymous> (propTypes.js:3) at __webpack_require__ (propTypes.js:3) at Object.exports.__esModule (propTypes.js:3) ...
Read More

std::locale/std::facet Critical section

Leave a Comment
Out of curiosity. In the past I've seen performance degradation in function like boost::to_lower because of the CriticalSection employed in std::use_facet when the lazy facet is allocated. As far as I remember there was a bug with global lock on locale but according to Stephan Lavavej it was fixed in VS2013. And voila, I saw this lock on facet killing server performance yesterday so I guess I'm confusing two different issues. But in the first place, why there is a CriticalSection around the lazy facet? Obviously it will...
Read More

d3js scroll visibility - series animation for bar chart

Leave a Comment
I am working on a d3 application and I am interested in taking the following jsfiddle -- and onload or on an action -- revoking an animation where the bar charts animate one by one. So the first bar animates to its height, then the second and so forth. Also a reversal of the animation would be good too -- so maybe something that is invoked automatically on scroll visibility? http://jsfiddle.net/pg886/201/ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>...
Read More