Theano gradient with function on tensors
◷
تاریخ انتشار: 1395/3/8 | ساعت: 16:42
Vote count: 0 I have a function that calculates a value of a scalar field on a 3D space, so I feed it 3D tensors for x, y and z coordinates (obtained by numpy.meshgrid) and use elementwise operations everywhere. This works as expected. Now I need to calculate a gradient of the scalar field. I've bee...
UI-based memory game
◷
تاریخ انتشار: 1395/3/8 | ساعت: 16:42
Vote count: 0 I have created a UI shown in the screenshot. I am initalizing too many JPanels within a panel in my code to achieve the UI which will lead to bad code design and slower performance. Is there any good practices to follow in writing such a UI? import java.awt.BorderLayout; import java.aw...
Need suggestions on generic java monitoring code using TImer and callback mechanism
◷
تاریخ انتشار: 1395/3/8 | ساعت: 16:42
Vote count: 0 Problem Statement : I am executing a REST API and getting the response which gives a String based status of a job which is either "RUNNING","COMPLETED","FAILED" etc and I want a GENERIC monitoring mechanism that will use Timer to delay the REST call based on intervals (with a time out)...
How to fix relative image path in html when html and image is moved to blob but htmls are served from different website
◷
تاریخ انتشار: 1395/3/8 | ساعت: 15:40
Vote count: 0 we have htmls and images stored in the Github, we decided to move htmls and images to Azure blob storage, so that we can easily manage them. these htmls are requested by Ajax request and its content is then added to a asp.net page. Now what really happens, the relative image path in ht...
Is putIfAbsent method blocking or not?
◷
تاریخ انتشار: 1395/3/8 | ساعت: 15:40
Vote count: 0 I want to use ConcurrentSkipListMap in my application, but not quite sure how to deal with it. Looking at the sources I didn't find any synchronized statement of Lock acquisition. Documentation is also not quite clear. All it says is that the operation performs atomically. So, is publi...
What's wrong with Python datetime.now() in this piece of codes?
◷
تاریخ انتشار: 1395/3/8 | ساعت: 15:40
Vote count: 0 here is the codes: >>> from datetime import datetime >>> t=datetime.now() >>> print(t) And I got such a result: 2016-05-28 16:17:56.192505 How does the float number come? How could I solve it? Environment: Python 3.5.1 on Windows 10. asked 40 secs ago陈梓泉 Let's block ads! (Why?)
Nodata message with React 0.13.3 and react-highcharts 3.0.0
◷
تاریخ انتشار: 1395/3/8 | ساعت: 14:36
Vote count: 0 I'm working with react-highcharts. It works perfectly except nodata state. I need to display 'No data available' message when chart has empty data. I have check no-data-to-display.js of official highcharts but it doesn't work with React. I would like to make a result like this: http://...
What is the performance impact of onCreate() and onStart() on activity startup
◷
تاریخ انتشار: 1395/3/8 | ساعت: 14:36
Vote count: 0 Whenever a new Activity is created onCreate is called. Followed by onStart. And onStart is called again when activity is back on to the screen. I know this fundamentals. But, what is the actual difference between when you launch the activity. I mean to say, when you click on some objec...
PHP cURL grant type invalid / unsupported
◷
تاریخ انتشار: 1395/3/8 | ساعت: 14:36
Vote count: 0 I'm trying to use php and cURL to make requests to the Fitbit oauth 2.0 api. I can get my authorisation code but ca ot manage to exchange the code for a token. The Fitbit api docs say (https://dev.fitbit.com/docs/oauth2/#access-token-request) that I need to post code, client id, redire...
array allocation followed by memcpy or vector with reserve?
◷
تاریخ انتشار: 1395/3/8 | ساعت: 12:25
Vote count: 0 I have a byte array which i want to compress.(Size 400 byte on avg).I have two options.I keep an array of 400 byte and stuff bits in it.Finally say the compressed size is 300 byte so I use memcpy to copy those bytes to an array of size 300 and send. Else I can keep a vector and reserve...
can't update ipad3 for iOS 9.3.2
◷
تاریخ انتشار: 1395/3/8 | ساعت: 12:25
Vote count: 0 I wants to update my iPad3 from iOS-9.3.1 to iOS- 9.3.2, but it constantly showing Verifying update... popup for a long time , not allowing me to interact with it. asked 1 min agoanupam mishra Let's block ads! (Why?)
Google analytics users and sessions are not increasing
◷
تاریخ انتشار: 1395/3/8 | ساعت: 12:25
Vote count: 0 I am using google analytics in my asp.net mvc 5 and I am a new one to this. I have created a tracking Id and I have inserted the generated script to my layout page header(the script is saved in a separate file and imported using scrip tag). Now in my google analytics dashboard I can se...
Sort by given formula (Haversine) with Query DSL
◷
تاریخ انتشار: 1395/3/8 | ساعت: 7:57
Vote count: 0 I have latitude and longitude in my Location enitity. Now im using something like that to get nearest locations by given coords. String haversine = "(3956 * 2 * ASIN(SQRT(" + "POWER(SIN((l.latitude - ?1) * pi()/180 / 2), 2) +" + "COS(l.latitude * pi()/180) * COS(?1 * pi()/180) *" + "PO...
LINQ GroupBy to get top sales yields NotSupportedException about unrecognizable Select method
◷
تاریخ انتشار: 1395/3/8 | ساعت: 7:57
Vote count: 0 Typical, one User (happens to be .NET Identity ApplicationUser) to many Sale relationship, and I'm trying to produce a list of top ten salespeople. I also need the current user's rank in said list (regardless of whether it's in the top ten) e.g. User1 $10.00 User2 $8.50 User3 $7.00 hen...
Getting raw data of files (eg. PDFs, .docx, .png, etc) via JavaScript, and saving them to a server disk
◷
تاریخ انتشار: 1395/3/8 | ساعت: 7:57
Vote count: 0 I'm ru ing a front-end app that allows users to enter a destination URL that can be any file type really. PDFs, or Word documents, or images. The app only needs to run in Chrome, and so I'd like to make the request to the file on the front end, and then send that data to a server for s...
select whole record based on max column
◷
تاریخ انتشار: 1395/3/8 | ساعت: 6:09
Vote count: 0 Hello am trying to get the whole record information based on a max value for example lets say that i have this table called animals id name price ____ ______ _______ 1 dog 250 2 cat 100 3 bird 50 the max price is 250 then I want to retrieve its record so I should get id name price ____...
some files not transferring when deploying website to azure
◷
تاریخ انتشار: 1395/3/8 | ساعت: 6:09
Vote count: 0 I am in the process off trying to deploy my site to azure. I right click and select "Publish". When the site is opened automatically it seems to work but I can see some css and some files have not transferred. Looking at "Server explored" in Visual Studio it looks like many files are n...
Bluetooth Gatt readCharacteristic takes 2 seconds for each characteristic
◷
تاریخ انتشار: 1395/3/8 | ساعت: 6:09
Vote count: 0 Sometimes it works as expected and sometimes it takes 2 seconds for each Characteristic read. I used a bluetooth sniffer and noticed that android overrides the co ection params set on the central device. Is there no way to override the gatt co ection params on the android side? I added...
CSS overflow to float left
◷
تاریخ انتشار: 1395/3/8 | ساعت: 5:04
Vote count: 0 So, I have css question. I have a div that contains two lines. Top line is title and bottom line is name. when the title is short enough, that the name is on the bottom line (left image) However, when the title is long, I want the overflow to go to the second line and have the name nex...
how to add a new field to one entry in MongoDB?
◷
تاریخ انتشار: 1395/3/8 | ساعت: 5:04
Vote count: 0 I have a collection for which we must minimise space in a MongoDB. Some of the field for an entry are sometime null. In that case, I would like to field to be absent from the entry. One solution I have is to first insert the entry for which every field is sure not to be null. This is d...