server-side

Retrofit2: ClassCastException: java.util.ArrayList cannot be cast to retrofit2.Call

允我心安 提交于 2019-12-12 16:33:27
问题 please help with Retrofit2. I'm very new in Retrofit. I create simple server application. The application manage list of Journals: add Journal in the in-memory list and return Journal by id. There is an Journal.java: public class Journal { private AtomicInteger getNewId = new AtomicInteger(0); @SerializedName("id") @Expose private Integer id; @SerializedName("name") @Expose private String name; public Journal(String name) { this.id = getNewId.incrementAndGet(); this.name = name;} public

php paypal Server-side REST integration failure

家住魔仙堡 提交于 2019-12-12 16:16:15
问题 (I'm not able to post code/errors etc because: 'You need at least 10 reputation to post more than 2 links'; and everything contains a lot of links; just spent a couple of hours on a fully detailed post). I've read similar posts here (and other places) but they have not helped. I'm basically following: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/server-side-REST-integration/#set-up-your-client but PayPal's documentation is somewhat chaotic, lacking in

How to add a pure javascript compiler plugin server-side when running CFGroovy in Coldfusion?

Deadly 提交于 2019-12-12 11:30:36
问题 I'm trying to sell myself to the idea of trying to build enhanced Jquery Mobile markup on the server (running Coldfusion8 ) and then try to use DustJS (Javascript templating engine) to precompile the markup into a js string, which I want to server as a static file. I think I have it down to trying to add the plugin in Coldfusion. Here is what I want to do: Start with a template like this in Coldfusion: <cfsavecontent variable="renderedResults"> <cfoutput> {##person}{root}: {name}, {age}{

Simulating a back button in PHP without javascript

巧了我就是萌 提交于 2019-12-12 04:44:35
问题 I need a "back" button but without the use of Javascript. I already thought of one possible approach: Using a session variable (e.g. $_SESSION['http_referer'] ) which would be updated every time on every page whenever it's loaded, saving it's content to a variable (e.g. $lastPage ) (for further use in the current page) assigning to it the value of $_SERVER['REQUEST_URI'] But I'm not sure how efficient (or inefficient) this is. Is it at least correct? 回答1: If the user can only go back on your

rendering large server-side datasets in jquery datatables

旧城冷巷雨未停 提交于 2019-12-12 04:12:36
问题 I'm using DataTables 1.9.4 with few plugins (ColVis, ColReorderWithResize and ColumnFiltering). The parameters I'm using for server-side communication are: "bServerSide" "fnServerData" "sAjaxSource" Now, let's say I have to display 3000 rows with around 25 columns without pagination ("iDisplayLength": -1). The json containing the data weights around 1MB and it takes around second for server to send it to datatables. The problem is the rendering of those 3000 rows take few seconds (around 5-10

Creating a single page web app as part of a website

折月煮酒 提交于 2019-12-12 03:52:58
问题 I am working on a project which allows users to monitor energy consumption. The main dashboard page is a web app which is pretty neat and makes extensive use of javascript and ajax. The server currently runs apache and uses php; however, I am planning on installing node.js and updating the server side scripts in order to support websockets (and I also like the idea of using javascript on the server and client side). I have followed several online introductions but I am struggling to find

Convert arrayList to javascript array

≡放荡痞女 提交于 2019-12-12 02:55:11
问题 I am sending an arrayList from a java file to a .jsp file In order to receive that array I used the following code var words = [ <c:forEach begin="0" items="${requestScope.WordList}" var = "word"> word, </c:forEach> ]; however it is not working .. any Idea of how to do it ? 回答1: Possible fix (Bad fix): var words = [ <c:forEach items="${requestScope.WordList}" var="word" varStatus="status"> "${word}"<c:if test="${not status.last}">,</c:if> </c:forEach> ]; OR Convert the Java ArrayList to JSON

How the javascript event function can prevent server side event function (button click)

[亡魂溺海] 提交于 2019-12-12 02:13:49
问题 If I have, say, an .aspx page that has a button called "btnProcess": asp:imagebutton id="btnProcess" onmouseover="src='siteart/addpayment2.gif'" tabIndex="13" onmouseout="src='siteart/addpayment1.gif'" Runat="server" Width="88" Height="22" ImageUrl="siteart/addpayment1.gif" AlternateText="Add Payment Button (CTRL + Plus(+))" With jQuery, if I wanted to link a function to that button when it's pressed, I could write something like this: $(document).ready(function () { $('#btnProcess').click

check RadDateTimePicker value against current system date time value

↘锁芯ラ 提交于 2019-12-12 01:21:58
问题 How can I verify if the selected datetime value from the RadDateTimePicker is greater then the current system datetime value in asp.net using server side validaton . <telerik:RadDateTimePicker runat="server" ID="orderDate" > <Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true"> </Calendar> </telerik:RadDateTimePicker> 回答1: To validate it, you need to use CompareValidator or CustomValidator. Please use following markup for datetime picker: <telerik:RadDateTimePicker runat=

Implementing a server side push for a small number of clients

£可爱£侵袭症+ 提交于 2019-12-11 23:09:01
问题 For an web application I am working on I have the following requirements: Clients need to be able to log in via a web brower. After logging in, they will be able to change configurations (normal request/response) will be able to receive alarms sent by the server (a server side push) Now, the question is how to implement the alarms. I first thought of using some long polling approach (Comet), but as the amount of clients will definitely belimited to 5-10, I'm now thinking to go with a simpler