The problem is on this page: http://www.tagalogreader.com/document.php?id=28. I'm using this: https://github.com/aron/annotator.touch.js with this https://github.com/openannotation/annotator. There is one annoying bug that I have found when using my ipad. When I highlight some text and then click "annotate" the box pops up to write a note. That is desired. But what happens next is that somehow I'm automatically scrolled to the middle of the article even though I was highlighting something in the beginning of the article....
Thursday, June 30, 2016
OPTIONS (failed) only on Chrome and Firefox
I make a POST request and the request just sits, pending until it eventually fails. I've monitored the nginx logs and the node server logs and the request doesn't even register. This works for anyone else that I've had test it except one other colleague. If I use the edge browser or a different computer it works fine. I have attempted to make POST requests to other (custom) servers and it hangs on options there as well. I have also made the POST request with jQuery and it fails the same way. It's maybe worth noting...
Remove default Android padding from HTML emails
I have a responsive email layout where some elements stretch the entire width of the viewport, whatever that may be. In Android (native mail and Gmail app on 4.4 at least) There appears to be a ~10px padding on either side. Is there any property or trick for negating this? (I feel like this question should have been asked somewhere already, but searches provide only completely unrelated HTML email margin issues, so sorry if this is a duplicate). Tried Cancelling out the body margin. This affected the layout but did...
Ionic hybrid app: Select multiple not working on some devices
I have a selectbox where you can select multiple failure types: <select name="failureType" ng-model="model.failureType" required ng-options="item.name for item in data.failureType" form="regFailForm" label='{{"FAILURETYPE" | translate}}' multiple> <option value=""></option> </select> This "works on our machines" but on some devices of the client they can't select multiple items. Like for example...
Receiving “400 Bad Request” for /oauth/access_token
I have approved for public_content clientId. To get access token, I send a request to www.instagram.com: GET /oauth/authorize?client_id=MyClientId&redirect_uri=MyRedirectURL&response_type=code&scope=likes+comments+public_content HTTP/1.1` After authentication, the browser redirects me to MyRedirectURL and I can get the code from the URL. With this code I send a request to api.instagram.com: /oauth/access_token HTTP/1.1 client_id=MyClientId&client_secret=MyClientSecret&grant_type=authorization_code&redirect_uri=MyRedirectURL&code=CodeFromURL`...
Wednesday, June 29, 2016
Dagger 2 lifecycle of a component, module and scope
I've read a lot of posts and tutorials about dagger 2: http://frogermcs.github.io/dependency-injection-with-dagger-2-custom-scopes/ https://github.com/codepath/android_guides/wiki/Dependency-Injection-with-Dagger-2 http://fernandocejas.com/2015/04/11/tasting-dagger-2-on-android/ https://github.com/konmik/konmik.github.io/wiki/Snorkeling-with-Dagger-2 What determines the lifecycle of a component (object graph) in Dagger 2? etc. But I am still confused about the lifecycle of a component, and how it relates to module...
Why can I not place Master and Detail view next to each other in UISplitViewController on the first run, but upon rotation it works?
I have a split view controller that has a list of items on the left and a detail view on the right. Relevant code in AppDelegate: let splitViewController = mainView.instantiateViewControllerWithIdentifier("initial") as! UISplitViewController let rightNavController = splitViewController.viewControllers.last as! UINavigationController let detailViewController = rightNavController.topViewController as! DetailsIpad...
Tuesday, June 28, 2016
Cannot read property 'bcrypt' of undefined with Meteor
I am following the Basic Tutorial to use TurkServer, but I get an error from the beginning. The error I get when I run: meteor --settings settings.json W20160615-01:19:27.320(-4)? (STDERR) W20160615-01:19:27.406(-4)? (STDERR) ~/.meteor/packages/meteor-tool/.1.3.3.b5ue33++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280 W20160615-01:19:27.406(-4)? (STDERR) throw(ex); W20160615-01:19:27.407(-4)? (STDERR) ^ W20160615-01:19:27.407(-4)? (STDERR) TypeError:...
Rails 5 rendering from outside a controller with ApplicationController.renderer.render doesn't set variables on self
I'm using the Rails 5 ApplicationController.renderer.render method to render from within a model. I need to pass some variables to my layout which I have done using the locals option; this variable is then available in the layout if accessed directly, but not via self. Here is how I have setup my render html_string = ApplicationController.renderer.render( file: "/#{template_path}/base/show", :formats => [:pdf,:html], locals: { :@routing_form => self, :controller_name => controller_name, :action_name...
Size Class compact height doesn't work properly with UIStackView's axis and real device
This is how it looks like in my storyboard and Preview: And this is what I set up in storyboard for that UIStackView: But everything changes when I run this on real device: Why it happens like that? Please note that I have here two UIStackViews: icon with labels box, two buttons. The second one works correctly, but not the first one. Why? it is done exactly the same way. Two direct subviews of UIStackView EDIT I realised...
Does github (twitter, stripe & co) uses oauth for its own login?
Does github (twitter, stripe & co) uses OAuth for its own signin/signup forms? All those authentications are cookie based, so is this regular web client basic auth or does it use some form of OAuth or xAuth ? On login, a call to https://github.com/session (or https://twitter.com/sessions or https://dashboard.stripe.com/ajax/sessions) is made (with credentials given as formdata) that result in a 302 (or 200 for stripe) with Set-Cookie and a location to https://github.com (or https://twitter.com). It does not seems...
Monday, June 27, 2016
CORS not working with route
I have an issue with an endpoint on my web api. I have a POST method that is not working due to: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 405. I cannot see why that is not working since I have plenty of methods that are working indeed with the same COSR configuration. The only difference is that this method has...
Using py.test with compiled library code
I have a python library with the following repository structure: repobase |- mylibrary | |- __init__.py |- tests |- test_mylibrary.py Up to now, running the tests could simply be done by calling py.test in the repobase directory. The import mylibrary in test_mylibrary.py then used the local code in repobase/mylibrary. Now, I've extended the library to use compiled code. Therefore the source code at repobase/mylibrary is not functional on its own. I have to do a setup.py build. This creates repobase/build/lib.linux-x86_64-2.7/mylibrary....
How to build hsdis.dll for Windows 32-bit?
I am trying to build hsdis.dll in my laptop 32-bit Windows. I read http://dropzone.nfshost.com/hsdis.htm instructions and got to know that I will have to follow those steps. I saw that I have to use the mingw64-i686-gcc-core. I followed the steps, but have always found this error. make[2]: i686-w64-mingw32: Command not found Makefile:246: recipe for target 'libiberty.a' failed make[2]: *** [libiberty.a] Error 127 make[2]: Leaving directory '/home/User/hsdis/build/Linux-i586/libiberty' Makefile:8045: recipe for target...
Sunday, June 26, 2016
Android signature verification
I have got lot of doubts to be cleared in the case of Android signature verification and its vulnerability. Once we generate apk for an application we can unpack the apk and edit resource files using apktool. As we repack the edited apk back it loses its signature. I can resign the unsigned apk using the jarsigner with my own private key that i used while generating the apk. I found an application named zipsigner in playstore which can be used to sign such kind of unsigned apk. So when this zipsigner signs the unsigned...
Saturday, June 25, 2016
Weird behavior of Lucene query parser 5.1.0
I am using Lucene Query Parser 5.1.0 These filter queries do not work: * AND {!tag=guid}guid:(*) * && {!tag=guid}guid:(*) * {!tag=guid}guid:(*) it throws org.apache.solr.search.SyntaxError: Cannot parse 'guid:(*': Encountered \"<EOF>\" at line 1, column 7.\nWas expecting one of:\n <AND> ...\n <OR> ...\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \")\" ...\n \"*\" ...\n \"^\" ...\n <QUOTED> ...\n <TERM> ...\n...
Getting Product Collection Sorted by minimum price
Summary of Work Environment I am working on a website where we have customer and dealers both. Each Dealer can have their own price for a product. Production collection data is having another duplicate record (CLONING PRODUCT) for each product having price of that seller. For example if master catalog have IPHONE 6S . than 5 dealers who deal in Iphone 6s can have their own prices. Cloning product creates a new product ID related to Seller ID Requirement I need to get the category wise product listing having lowest price...
certificate problems trying to send email with libcurl
This is my libcurl code. I am trying to send email to my own email domain in linux. This is my sample libcurl code. curl_easy_setopt(curl, CURLOPT_USERNAME, "username@mydomain.com"); curl_easy_setopt(curl, CURLOPT_PASSWORD, "mypassword"); curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.mydomain.com:25"); curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM); recipients = curl_slist_append(recipients, TO); curl_easy_setopt(curl, CURLOPT_MAIL_RCPT,...
Proper approach to feature detection with opencv
My goal is to find known logos in static image and videos. I want to achieve that by using feature detection with KAZE or AKAZE and RanSac. I am aiming for a similar result to: https://www.youtube.com/watch?v=nzrqH... While experimenting with the detection example from the docs which is great btw, i was facing several issues: Object resolution: Differences in size between the known object and the resolution of the scene where the object should be located sometimes breaks the detection algorithm - the object won't be...
How can I set videos to “private yet shared” using the v3 YouTube API?
I work for a school that has an institutional YouTube account (Google Apps for Education). The video privacy options are Public, Unlisted, and Private. The important bit: Private videos can be shared with either: - the institution (i.e., all students with a school account), or - a list of specific email addresses. We have a tool that uses the v3 YouTube API (Java) to automatically upload videos to YouTube. I can use the API to set privacy: VideoStatus videoStatus = new VideoStatus(); videoStatus.setPrivacyStatus("private");...
Friday, June 24, 2016
Receiving touch events outside bounds
There have been similar questions before and I have referred to Capturing touches on a subview outside the frame of its superview using hitTest:withEvent: and Delivering touch events to a view outside the bounds of its parent view. But they do not seem to answer my particular problem. I have a custom control with the following structure: +-------------------------------+ | UIButton | +-------------------------------+ | | | | | UITableView ...
wallaby.js got error >> SyntaxError: Unexpected token u
i tried to set up wallaby.js on visual studio code. my project use language: node.js (es6) test: mocha ide: visual studio code node version: v5.9.0 i always got this error when i run wallaby SyntaxError: Unexpected token u ====== my wallaby config file (wallaby.js) ======= module.exports = function (wallaby) { return { files: [ 'server/**/*.js', '!node_modules/**/*.js' ], tests: [ 'test/**/*.js' ], compilers: { '**/*.js': wallaby.compilers.babel() }, env: {...
Which kind of DBs calculate rate per minute statistics?
I have a use case requirement, where I want to design a hashtag ranking system. 10 most popular hashtag should be selected. My idea is something like this: [hashtag, rateofhitsperminute, rateofhisper5minutes] Then I will query, find out the 10 most popular #hashtags, whose rateofhits per minute are highest. My question is what sort of databases, can I use, to provide me statistics like 'rateofhitsperminute' ? What is a good way to calculate such a detail and store in it db ? Do some DBs offer these features? 4 AnswersAnswers...
Javascript Event Listener quits (?) from listening… Youtube API - No console error
I spent 6 hours on this already. (plus 1 editing this question!) I'm kind of debugging the last 4 lines of it. Problem is that I get NO console error as a hint. Concept: I want to link numerous Youtube videos to text links. The wanted effect for the user is to be able to click on a citation link while reading a text... In order to be able to confirm the citation. The video has NOT to play entirely. The video shall start at a...