work

Why don't proxyHost/proxyPort work when running my Java application?

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a java app that talks to some REST services, and I want to look at the HTTP traffic using Fiddler. Fiddler acts as a proxy on localhost:8888, so the following Java VM options are supposed to configure java to use this proxy: -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 However, if I pass these parameters when running the java app that I want to debug, I see no traffic in Fiddler. I wrote a test Java app that simply performs an HTTP GET using HttpURLConnection. I can view the HTTP traffic from this app in fiddler, if I specify the

Loading long RTF-Text in TRichEdit does not work

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: If a long RTF-sequenz (eg 150 000 chars) is streamed into a TRichEdit control (in XE4), the control does not display the text but instead shows the raw RTF code: {\rtf1\ansi\ansicpg1252\deff0... What is wrong? procedure TForm1.Button1Click(Sender: TObject); var RtfText: string; Stream: TStringStream; begin RtfText := GenerateRtfText(); Stream := TStringStream.Create(RtfText); try RichEdit2.PlainText := False; RichEdit2.Lines.LoadFromStream(Stream); //<--- ERROR: RichEdit displays raw RTF-Code // if RtfText is too long if StartsText('{\rtf',

Ionic infinite scroll doesn&#039;t work on all android devices

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently developing an ionic app and successfully implemented an infinite scroll feature. It works fine on desktop browsers and newer android devices, however, i'm having problems with phones that run android version 4.1 or less. The problem: I open the page, it loads and displays the first 20 items just fine, i scroll to the bottom, the next 20 items load, but it doesn't let me scroll any further to see the next 20 items. Here is a GIF showing how it looks on my desktop (the way it's supposed to work). desktop gif Here is another GIF

How to make BrowserSync work with an nginx proxy server?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: (If needed, please see my last question for some more background info.) I'm developing an app that uses a decoupled front- and backend: The backend is a Rails app (served on localhost:3000 ) that primarily provides a REST API. The frontend is an AngularJS app, which I'm building with Gulp and serving locally (using BrowserSync ) on localhost:3001 . To get the two ends to talk to each other, while honoring the same-origin policy , I configured nginx to act as a proxy between the two, available on localhost:3002 . Here's my nginx.conf: worker

Does afterRender work with Knockout components?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: afterRender works with template bindings, but after converting my templates to components, there does not seem to be any way to use afterRender . I have tried looking for an example of a component that uses afterRender , but cannot find anything. 回答1: I could not get the method working as per the above post. However i found a workaround on the git issue list and it doesn't require a custom KO Binding. Add the below line in your component template html or string of code. Then create a init function in your module / viewModel: this.init =

Bootstrap 3 dropdown doesn&#039;t work with Rails 4 &amp; Turbolinks

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I recently upgraded my site to Bootstrap 3 and am in the process of going through all the layouts to update class names and various functionality to work correctly. My most recent problem is that drop downs don't seem to be working. At first I thought I hadn't implemented the code correctly for my nav bar, but after getting frustrated, I actually tried just getting rid of my nav bar and using the one straight out of the BS 3 documentation . Even that code doesn't work. I've looked into this, and I'm fairly certain I have all the proper .js

PHP Nested classes work… sort of?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: So, if you try to do a nested class like this: //nestedtest.php class nestedTest { function test (){ class E extends Exception {} throw new E ; } } You will get an error Fatal error: Class declarations may not be nested in [...] but if you have a class in a separate file like so: //nestedtest2.php class nestedTest2 { function test (){ include ( 'e.php' ); throw new E ; } } //e.php class E Extends Exception {} So, why does the second hacky way of doing it work, but the non-hacky way of doing it does not work? 回答1: From the manual (

How does this checkbox recaptcha work and how can I use it?

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've recently signed up to the oneplusone website https://account.oneplus.net/sign-up , and noticed this checkbox recaptcha How does it work, and how can I use it on my sites? Much better than those cryptic words/digits:) The recaptcha site does not mention any new recaptcha method... https://www.google.com/recaptcha/intro/index.html 回答1: This is a beta API for reCAPTCHA. I gather this from the source of their JS API: https://www.google.com/recaptcha/api.js referencing "API2". And I also found this: http://jaswsinc.com/recaptcha-ads/

pqxx reuse / reactivate a work transaction

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use a pqxx::work for multiples queries AND commitments, while the commit function prevent me from using it again. Here is a simple example : pqxx::connection G_connexion("dbname=basetest user=usertest password=1234"); pqxx::work G_work(G_connexion); int main(int argc, char* argv[]) { G_work.exec("insert into test.table1(nom) VALUES('foo');"); G_work.commit();//until here, no problem G_work.exec("insert into test.table1(nom) VALUES('bar');"); //error, transaction already closed G_work.commit(); } When I try to insert the 'bar' value

Does Swift not work with function pointers?

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use a C library in Swift, and I'm having trouble calling any function that takes a function pointer as one of it's arguments. For example, part of the lua.h file that I'm trying to use in Swift looks like this: LUA_API void (lua_setuservalue) (lua_State *L, int idx); typedef int (*lua_CFunction) (lua_State *L); LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, int ctx, lua_CFunction k); I use the bridging header to get access to the library, and from my Swift code I can call lua_setuservalue without any trouble.