MongoDb get distinct items after grouping
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
22:15
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...
htaccess redirect to parent page if not found with only knowing the beginning of path
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
22:15
Vote count: 0 I have paths like this: mypage/blog/somestring1 mypage/blog/somestring2 mypage/blog/somestring3 I would like it if I go to mypage/blog/somestring1/page1 and it is not found it redirects back to: mypage/blog/somestring1. All I know is that the path begins with mypage/blog. The rest can ...
C++ Program that produces LSystem Model
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
21:08
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
21:08
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
21:08
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
19:58
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
19:58
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...
How we can change data loaded in ng-grid in effective way by getting data from HTTP services
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
19:58
Vote count: 0 We have a ng-Grid in application. Once we change User from drop down http call made and get data for user and it should bind to grid. I want only digest to update data to grid should be fired not all digest in grid. Basically i want good performance doing this operation. $http({ method...
Keep div open on hover effect
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
18:45
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...
Get all PHP errors/warnings/... that occurred during the current request
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
18:45
Vote count: 0 Setting the directive display_errors to true (while having error_reporting set to E_ALL) prints all errors that occured during the current request bofore returing the PHP output. Since I'm sending headers in my PHP code, I get several more errors (sending header after content has been ...
convert xml data to php array
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
18:45
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
17:39
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
17:39
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...
python Fitting weighted data with Gaussian mixture model (GMM) with minimum on covariance
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
17:39
Vote count: 0 I want to fit a Gaussian mixture model to a set of weighted data points using python. I tried sklea .mixture.GMM() which works fine except for the fact that it weights all data points equally. Does anyone know a way to assign weights to the data points in this method? I tried using dat...
jQuery add css style
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
16:25
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...
Hbase: multiple column qualifiers vs single column qualifier as a Json string for data
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
16:25
Vote count: 0 I need to store multiple data on a Hbase table. I am thinking on two approaches as follows, Have a column family with multiple column qualifiers for each attributes. c:cq1 c:cq2 c:cq3 Have a one column qualifier for data and store data as a jason object. {cq1:value, cq2:value, cq3:valu...
Please answer these data-structure related questions
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
16:25
Vote count: 0 enter image description here enter image description here [enter image description here][3] asked 2 mins agoPrateek Kohli Let's block ads! (Why?)
RequireJS amd-required-library in non-amd project
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
15:20
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
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
15:20
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?
◷
تاریخ انتشار:
1395/1/17
|
ساعت:
15:20
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...