MongoDb get distinct items after grouping
Vote count: 0 I'm using mongodb with the following collection sample { "_id" : ObjectId("5703750ca9c436386c4814c9"), "user_id" : NumberLong(17), "activitytype_id" : NumberLong(1), "created_date" : ISODate("2015-10-03T03:52:03.000Z") }, { "_id" : ObjectId("5703750ca9c436386c4814ca"), "s_id" : NumberL...
C++ Program that produces LSystem Model
Vote count: 0 Can you please help me with implementing a c++ code that produces a Lindenmayer System model of the string of A and B with the output like; 1 A 2 AB 3 ABA 4 ABAAB 5 ABAABABA 8 ABAABABAABAAB 13 ABAABABAABAABABAABABA with its relation to Fibonacci Sequence. Regards. asked 1 min agoTHABEL...
Making D3 chart Responsive in React app
Vote count: 0 I am currently trying to render plot in React using D3. To integrate both of them , i have used the following link: http://oli.me.uk/2015/09/09/d3-within-react-the-right-way/. I have also tried the solutions provided in the link for making the chart responsive: Resize svg when window i...
Uri.AbsoluteUri is different than requested URL
Vote count: 0 I use HttpUtility.EncodeUrl to encode a querystring param. When I send request to the server then on the server side Uri.AbsoluteUri contains---in some cases---different querystring param values. E.g. the to-be-escaped data string is string data = "+-/*.,?!~"£$%^&*()_{}[]@'#<>\|`¬;:=";...
Exponential smoothing with values changing
Vote count: 0 I have an exponential smoothing function that is used for predictive analysis. I need it to be grouped over other variables and to have a lag of one row. Here is the function: exp1 = function(x) {if (NROW(x) < 4) {res <- x} else {res <- fitted(ses(x, alpha = 0.1))} retu (res)} I run it...
JavaFx Text Field set text
Vote count: 0 I have never tried to create a GUI and I am stuck on something that is probably not something that I should be stuck on. How do I get the text field to set the text without an action? I tried to use setText... I know I can have it set when I click the search button but I don't think it...
Keep div open on hover effect
Vote count: 0 I am looking at using the following: http://jsfiddle.net/webdevem/4RgTS/ But I need a way of making sure the div that appears to stay open if you hover over the div that appears. Here is the code: $(document).ready(function() { $("#toggleSwitch_j").hover( function() { $("#theBox_3").sl...
convert xml data to php array
Vote count: 0 i have xml row column data like this : <RETS ReplyCode="0" ReplyText="Operation Success."><DELIMITER value="09"/><COLUMNS>AcresNum ADAFeaturesYN AdditionalFeatures AdditionalInformation Age AgeDescription AirConditioning ApartmentYN ApplianceIncluded AppointmentContactNumber ApproxLivi...
DevExpress GridControl InitNewRow when grid is empty
Vote count: 0 I have a DevExpress GridControl (in WPF) binded to ObservableCollection. NewItemRowPosition = Top NavigationStyle = Cell AllowEditing = true When there are rows in the grid - the add new row works good. But when grid is empty - there is no ability to edit the first row in the grid, and...
Enable cross domain Web-API 1
Vote count: 0 I have following method in web api [System.Web.Http.HttpPost] public string savedata() { string retval = ""; } routing config.Routes.MapHttpRoute( name: "savedata", routeTemplate: "api/{controller}/savedata.{ext}", defaults: new { ext = RouteParameter.Optional } ); And I am calling thi...
jQuery add css style
Vote count: 0 I have this text string and I would like to replace it with new text string but everytime I do it the css of it was gone. And then I make a script to add the css back but it doesn't seem to work. Any help please? jQuery('div:contains("text")').replaceWith('newText').css({font-weight:"b...
RequireJS amd-required-library in non-amd project
Vote count: 0 I have non-amd project, some of the scripts are amd-compatible, some are not. All of them are loaded using the script tags. Now I need to add an amd-module (excelbuilderjs) that is, as I see, ca ot be used without RequireJS. I'm a bit confused how to do that in a fast way. The search o...
Set default values with setdefault within specific list
Vote count: 0 I am getting a response from API and sometimes it has an optional key called Selections. When it does not have the key I would like to have Selections: [] in MarketPrices like below: {'Timestamp': datetime.datetime(2016, 4, 3, 21, 14, 19, 726967, tzinfo=<suds.sax.date.FixedOffsetTimezo...
Detecting WiFi Tethering traffic using TrafficStats API?
Vote count: 0 Anyone know how this can be done? The TrafficStats source code notes that there is a supposed to be a special UID (UID_TETHERING) used to track this, but using the getUidTxBytes and getUidRxBytes APIs always retu zero. I've seen other apps have this feature and I was wondering if the T...