Adding $.put to JQuery
◷
تاریخ انتشار: 1396/2/13 | ساعت: 7:58
Vote count: 0Used specs: HTML5, JavascriptMy question is as follows, I am trying to make a put request to the api from Phillips HUE and I found the following method of adding $.put to Jquery:$.put = function(url, data, callback, type){ if ( $.isFunction(data) ){ type = type || callback, callback = d...
Rails4: like order with sqlite3 is OK but PG not working
◷
تاریخ انتشار: 1396/2/13 | ساعت: 7:58
Vote count: 0There is no problem with sqlite 3 but 'PG :: GroupingError: ERROR' appears in posgresql's environment.I want to display posts with a lot of total by using paginate's gem in the order of total of like, but it is displayed without problem in sqlite 3posts_controller.rb def popular @posts ...
Why did `cherry-pick begin..end` return conflicts when `rebase --onto` didn't?
◷
تاریخ انتشار: 1396/2/13 | ساعت: 0:38
Vote count: 0I recently hit unexpected conflicts when ru ing a git cherry-pick:git checkout myBranch git cherry-pick begin..end I thought "that makes no sense", aborted, and and tried the equivalent git rebase --onto:git rebase --onto myBranch begin end Voilà! A clean rebase, no unexpected conflicts...
Change x scale of path dynamically d3.js
◷
تاریخ انتشار: 1396/2/13 | ساعت: 0:38
Vote count: 0I am trying to change the x-scale of already plotted path in d3.jsAlso, i am able to change the x-scale of circles using following code.var s = d3.event.selection || xTimeScale.range(); xTimeScale.domain(s.map(xDateScale.invert, xDateScale)); d3.selectAll(".dot").transition().duration(1...
Convert dataframe to numpy matrix where indexes stored in dataframe
◷
تاریخ انتشار: 1396/2/13 | ساعت: 0:38
Vote count: 0I have a dataframe that looks like so time usd hour day 0 2015-08-30 07:56:28 1.17 7 0 1 2015-08-30 08:56:28 1.27 8 0 2 2015-08-30 09:56:28 1.28 9 0 3 2015-08-30 10:56:28 1.29 10 0 4 2015-08-30 11:56:28 1.29 11 0 14591 2017-04-30 23:53:46 9.28 23 609 Given this how would I go about
menu images does not show in Hard Player but does in soft Players and PS3
◷
تاریخ انتشار: 1396/2/12 | ساعت: 17:11
Vote count: 0I'm developing a blu-ray menu with java (BD-J). I developed a simple loading animation. when ru ing it on PS3, soft players (PowerDVD, TotalMedia Theatre, ...) and some hard players (Samsung ht-c6950w), there is no problem and it runs like a charm. But when ru ing it on other hard playe...
How to Mock local variable using mockito
◷
تاریخ انتشار: 1396/2/12 | ساعت: 17:11
Vote count: 0I have class likepublic class Myclass{ public boolean processePersonData(){ private Person p; boolean flag=true; if(flag){ p= new Person("john",1); } else{ p= new Person("adam",2); } //do sth with p } } How can I mock the variable p, I google a lot but did not get the. can this be done ...
How to Display Internal Storage files in a listview?
◷
تاریخ انتشار: 1396/2/12 | ساعت: 17:11
Vote count: 0I want to show all the files from inte al storage in my application. If this success then i want to filter out .h264 files from this. My device didn't having any sdcard present.so how to deal with this? P.S i am using Moto G(2nd edition) device.I tried:-How to display files in listView?...
Usage of roots and solve in MATLAB
◷
تاریخ انتشار: 1396/2/11 | ساعت: 22:11
Vote count: 0I have an equation which goes like this: (a/k^2)-((w^2-b)/(w^4-k^2*cw^2-d))-((ew^2-f)/(w^4-k^2*g*w^2-h)) (I don’t know how to put this in equation style). Here a, b, c, d, e, f, g, h are constants. I want to vary k from say .6 to 10 with 0.1 interval and to find w. There are 2 ways to d...
Using Django static() to generate audio files' URLs in production
◷
تاریخ انتشار: 1396/2/11 | ساعت: 22:11
Vote count: 0I'm trying to get my Django app to play audio files (supposedly) uploaded by users via a form. Said files are tied to a model : # models.py class Doc(models.Model): # ... tape = models.FileField() The uploading and saving parts are working fine, and the files are stored where they shoul...
JPA calling stored procedure with argument
◷
تاریخ انتشار: 1396/2/11 | ساعت: 22:11
Vote count: 0I have this procedure in my postgreSQL database:CREATE OR REPLACE FUNCTION getItemsForCategory(categoryId integer) RETURNS SETOF ITEM AS $_$ DECLARE result ITEM; BEGIN FOR result IN SELECT * FROM item it JOIN item_category itcat ON it.id = itcat.item_id WHERE itcat.category_id = categor...
Localization using .resx files working on LocalHost but not server MVC
◷
تاریخ انتشار: 1396/2/11 | ساعت: 15:51
Vote count: 0I have setup localisation and debugged it completely fine on IIS Express on my local machine. I have uploaded the compiled resource .dll files located in the /bin/LANG_CODE folders to my server and edited the Web.Config.I added this to the module tags: And I add this to the system.web t...
Cancel FingerprintAuthentication
◷
تاریخ انتشار: 1396/2/11 | ساعت: 15:51
Vote count: 0I made a Login. There are two ways to login.1. Use Use ame and Password2. Use Use ame and FingerprintWhen the User successfully loged in he will come to the HomeActivity.Now I have the Problem that if the User didn't login with Use ame & Fingerprint the Fingerprint from my user will be ...
javascript: passing parameter with special characters to function without being replaced
◷
تاریخ انتشار: 1396/2/11 | ساعت: 15:51
Vote count: 0I need to pass to javascript function some data that has special characters like#228; A full string will look like thisBundesland Kä ten My javascript function looks like thisfunction my_fumc(arg){ console.log(arg); } If i call this function in the following waymy_fumc('Bundesland ...
Restructure a table with JQuery
◷
تاریخ انتشار: 1396/2/11 | ساعت: 6:24
Vote count: 0As I can't modify the code itself that generates a table, I'm trying to restructure it in the dom with the help of JQuery. More precisely, I'm trying to move td id="td03" out and above tr id="tr01" to display:3 1 2 1 All I seem to do is move it about in the tr instead of moving it above...
dynamic sorting using ng-repeat order by and md-options does not work
◷
تاریخ انتشار: 1396/2/11 | ساعت: 6:24
Vote count: 0Orderby works when the page first loads, with the default value set in scope. But then value for the Order By changes, the sort order does not change. The option selector does assign the correct value upon selection and I have verified that. But no change in the sort order.Here is how I...
Python syntax for type()
◷
تاریخ انتشار: 1396/2/11 | ساعت: 6:24
Vote count: 0When are you able to specify the function after the dataframe and when must you specify the function before?For example,file = example.txt file.readline() This will work fine. But,file = example.txt file.type() This will not work. You have to use type(file).I'm confused by this syntax a...
Find all solutions to k bishops on chessboard with backtracking
◷
تاریخ انتشار: 1396/2/10 | ساعت: 6:36
Vote count: 0I am trying to solve the puzzle of placing k non-attacking bishops on an 8x8 chessboard. http://mathworld.wolfram.com/BishopsProblem.html What i do is try to place the rook on a square, if However I have some problem in my backtrack method, because I only print the first found solution....
Android - ERROR Notification Builder context is null, try to combine with alarm manager
◷
تاریخ انتشار: 1396/2/10 | ساعت: 6:36
Vote count: 0i have a main activity to set alarm and create notification :public class MainActivity extends Activity { @Override public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { super.onCreate(savedInstanceState, persistentState); } public void...
How can I summarize datetime-index for unique dates using Pandas?
◷
تاریخ انتشار: 1396/2/10 | ساعت: 6:36
Vote count: 0I have four datasets with overlapping datetime columns. I want to produce an analysis showing just the date columns as a single dataframe to reveal the overlapping dates. Similar to this,| A | B | C | | 2017-05-01 | NAN | 2017-05-01 | | 2017-05-02 | NAN | 2017-05-02 | | 2017-05-03 | 201...