w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
building in support for future Solr sharding
Basically, what you are describing has already been implemented in SolrCloud. There the ZooKeeper maintains the state of your search cluster (which shards in what collections, shard replicas, leader and slave nodes and more). It can handle the load on indexing and querying sides by using hashing. You could, in principle, get by (at least in the beginning of your cluster growth) with the system you have developed. But think about replicating, adding load balancers, external cache servers (like e.g. varnish): in the long run you would end up implementing smth like SolrCloud yourself. Having said that, there are some caveats to using hash based indexing and hence searching. If you want to implement logical partitioning of you data (say, by date) at this point there is no way to this but mak

Categories : Solr

Firefox web console reflects future changes to array
This happens because the console.info call is asynchronous. It may not finish before lines after it have completed and as you are dealing with an array which is passed by reference, the console.info call received a pointer to the array (which seems to have been updated before the log was made) rather than the value at the time console.info was called.

Categories : Javascript

Will BLE peripheral role support be added to Android API in a future version?
From my experience you've got to wait at least until 2014 Q4 to get a somewhat working peripheral role feature on a device that fully supports that feature. And even if you have that feature available, you have to wait another 6 to 12 months until major devices from major manufacturers support it. But this role will come later as told by google engineers at https://developers.google.com/events/io/sessions/326240948

Categories : Android

Error C2248: 'std::future::future': can not access private member declared in class std::future
Replace std::future<Worldlet> with std::shared_future<Worldlet> might solve your immediate compiling problem. But the root of your problem is that probably you want only one consumer of the std::future. You are copying the struct somewhere, which is asking for two futures to be tied to the same source promise (or whatever source). std::future is designed to deliver its data once, to one consumer. So if you want to move it around, you have to move it, not copy it. As a guess from your error, you are compiling in MSVC2012. This compiler lacks automatic move constructor and assignment constructor creation. So try adding an explicit move constructor and move-assign method. struct LoadingWorldlet { int x, z; std::future<Worldlet> result; LoadingWorldlet(LoadingWo

Categories : C++

CSS Animation support within firefox and IE?
Firefox and IE10 both support CSS Animations (now even unprefixed, so there is no real need to use -ms- prefix for animations because there is no shipped IE version that need them, and -moz- is probably also safe to remove because Firefox hasn't needed a prefix since version 16). But 'background-image' property is marked in the spec as 'not animatable'. That's why most browsers can't animate (cross-fade) them via CSS, only Chrome has this non-standard feature. Some more info on the topic: CSS3 transition of background-image for Firefox not working As a workaround, I'd suggest to create 2 layers of background (e.g. element and pseudo-element) and animate the opacity of the top layer.

Categories : HTML

StarDict support for JavaScript and a Firefox OS App
I am working on a pure Javascript implementation of MDict parser (https://github.com/fengdh/mdict-js) simliliar to your stardict project. MDict is another popular dictionary format with rich format (embeded image/audio/css etc.), which is widely support on window/linux/ios/android/windows phone. I have some ideas to share, and wish you can apply it to improve stardict.js in future. MDict dictionary file (mdx/mdd) divides keyword and record into (optionaly compressed) block each contains around 2000 entries, and also provides a keyword block index table and record block index table to help quick look-up. Because of its compact data structure, I can implement my MDict parser scanning directly on dictionary file with small pre-load index table but no need of IndexDB. Each keyword block ind

Categories : Javascript

What is Selenium webdriver support for firefox 23
Here is the Changelog 2.35.0 (2013-08-14) Firefox: Updated Firefox native event components to support Firefox 23.

Categories : Firefox

Texturise text support Firefox , Chrome
Use mask-image. -webkit-mask-image: url(images/ur-image.png); -o-mask-image: url(images/ur-image.png); -moz-mask-image: url(images/ur-image.png); -ms-mask-image: url(images/ur-image.png); mask-image: url(images/ur-image.png); Create a texture you need in photoshop and save it as png with transparency ticked when saving for web. Check this link. You will get the idea. http://www.netmagazine.com/tutorials/texturise-web-type-css

Categories : Javascript

Does Firefox offer AppleScript support to get URL of windows?
To see all of the AppleScript commands that Firefox responds to, launch AppleScript Editor, select the menu File > Open Dictionary..., and choose the Firefox application. You'll find what you're expecting: Firefox doesn't offer any useful AppleScript commands.

Categories : Firefox

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox?
There is no sophisticated way to detect it. The good news is the last stable Firefox 24.0 support play shoutcast streams in MP3 with HTML5 audio. The best way to detect the support that I wrote: function icy(){ try{ if(!navigator.userAgent.match(/Trident/7./) && $.browser.mozilla && $.browser.version < 24) return false;//https://bugzilla.mozilla.org/show_bug.cgi?id=869725 var a = document.createElement('audio'); r = !!(a.canPlayType && !!a.canPlayType("audio/mpeg; codecs=mp3").replace(/^no$/,'')) }catch(e){ r = false; } return r; } If you use the lastest jQuery 1.10.2, you need include jQuery Migrate plugin to use $.browser

Categories : Firefox

Selenium webdriver support for the latest versions of firefox and chrome
I have found that the newest version of firefox routinely doens't work immediately well with Selenium. Check out this firefox support matrix on Github that someone made. Unfortunately the only thing you can do is stop Firefox from auto-updating and keep your selenium tests running for firefox newest version minus 1 or 2. Chrome tends to work out of the box for Selenium, sometimes the Beta channel has fixed some selenium issues, so try that if you have a particular issue (on the other hand it may introduce other bugs). So in the end you need to be constantly weary of browser updates and routinely checking how they are working with the current version of selenium.

Categories : Python

Convert scala 2.10 future to scalaz.concurrent.Future // Task
After evaluating couple of alternatives I have come to following solution. Obviously if someone wantsscalaz.Monad[scala.concurrent.Future], scalaz.std.scalaFuture https://github.com/scalaz/scalaz/blob/series/7.2.x/core/src/main/scala/scalaz/std/Future.scala#L85 is the way to go. object ScalaFutureConverters { implicit def scalaFuture2scalazTask[T](fut: Future[T])(implicit ec: ExecutionContext): Task[T] = { Task.async { register => fut.onComplete { case Success(v) => register(v.right) case Failure(ex) => register(ex.left) } } } implicit def scalazTask2scalaFuture[T](task: Task[T]): Future[T] = { val p: Promise[T] = Promise() task.runAsync { case -/(ex) => p.failure(ex) case /-(r) => p.success(

Categories : Scala

Do chrome and firefox support pointer event (pressure, tilt, touch, etc.) any soon?
The API is still in draft, but it is getting closer to being released as a W3C Recommendation. There is a prototype Chromium build created with a patch from Microsoft adding the MSPointer events API, and progress is being made on the Webkit implementation, so it looks like adoption is moving forward. Microsoft has also contributed a demonstration patch to Firefox and it is being integrated with the main trunk. (Thanks apsillers) The timeline remains uncertain, but all signs point to eventual adoption by all browsers.

Categories : HTML

How return Future from Future? Or this is prohibited in async library?
Look at the api documentation http://api.dartlang.org/docs/releases/latest/dart_async/Future.html It says there: If the returned value is itself a Future, completion of the created future will wait until the returned future completes, and will then complete with the same result. I guess that means you can't return a Future from a Future. But you could return a list of futures. void main() { var temp = foo(); temp.then((List<Future<int>> list) { list[0].then((int result) { print(result); }); }); } Future<List<Future<int>>> foo() { return new Future<List<Future<int>>>(() { return [new Future<int>(() => 5)]; }); }

Categories : Dart

Java generics converting Future of list of concrete class to future of list of interface?
Yes, you should do it. Suppose you have: public void doStuffWithInterface(Future<List<InterfaceClass>> f) { List<InterfaceClass> list = f.get(); list.add(new AnotherConcreteClassWhichImplementsTheInterface());// it will fail if you use "? extends" } So, it makes the list of only ConcreteClasses to contain incompatible type. Simple example: public void addStuff(List<Number> l) {l.add(1.5);} List<Integer> l = new ArrayList<>(); addStuff(l); for(Integer i : l) {}// class cast exception!

Categories : Java

Future.wait() can't wait without a fiber (while waiting on another future in Meteor.method)
Wrap your callback into Meteor.bindEnvironment, example: fs.readdir(dir, Meteor.bindEnvironment(function (err, res) { if (err) future.throw(err); future.return(res); }, function (err) { console.log("couldn't wrap the callback"); }); Meteor.bindEnvironment does a lot of things and one of them is to make sure callback is running in a Fiber. Another thing that could be helpful is var funcSync = Meteor._wrapAsync(func) which utilizes futures and allows use to call a function in synchronous style (but it is still async). Watch these videos on evented mind if you want to know more: https://www.eventedmind.com/posts/meteor-dynamic-scoping-with-environment-variables https://www.eventedmind.com/posts/meteor-what-is-meteor-bindenvironment

Categories : Meteor

scala.concurrent.Future wrapper for java.util.concurrent.Future
import java.util.concurrent.{Future => JFuture} import scala.concurrent.{Future => SFuture} You can't wrap JFuture with SFuture without blocking since there is a callback in SFuture (onComplete) and there is only blocking get in JFuture. All you can do is to create additional thread and block it with get, then complete Promise with result of get. val jfuture: JFuture[T] = ??? val promise = Promise[T]() new Thread(new Runnable { def run() { promise.complete(Try{ jfuture.get }) }}).start val future = promise.future You could check isDone in endless loop, but I don't think it is better then blocking.

Categories : Java

Acrobat restriction
Your forum is correct. However things are changing over time so the particular restrictions in place are not constant. Some features would be very useful in a PDF but Adobe define them as "Extended Features". This means that they are enabled in Acrobat Reader but only if the PDF was created using Acrobat Pro. This means that Adobe can continue to provide a free reader but at the same time encourage people to purchase Acrobat Pro since only it can be used to create this type of document. The way this is detected is via a digital signature inserted into the PDF. If the signature is not present or has been invalidated by modifying the document then you will see a message along these lines. “This document enabled extended features in Adobe Reader. The document has been changed since

Categories : C#

Acrobat XI forms invisible
Is this a viewer other than Adobe Acrobat? Adobe Acrobat will by default highlight any available fields. If it isn't, look for a setting to change that. If you create a form with Adobe Acrobat Pro, you can double click the fields to get a properties dialog, and there are settings for border and fill color under the 'Appearance' tab. I don't know how FormsCentral is set up, but it may have a similar command.

Categories : Misc

acrobat reduced size pdf with gs/im/other?
gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf This works pretty well to reduce the pdf file size. When getting used to ghostscript inside a batch script be wary of special characters. For example "%" is a special character for postscript so when using variable in cmd you have escape the character so % -> %% and %% -> %%%% This can cause a headache depending on what you are trying to do. Also paths are a pain, use CD and relative file paths. Source

Categories : Pdf

Calculating dates in Acrobat
My Solution: var d1 = new Date(this.getField("Starting").value); var num = d1.valueOf(); num += 1000 * 60 * 60 * 24; var d2 = new Date(num); event.value =util.printd("m/d/yy", d2);

Categories : Javascript

How can I submit as PDF from Acrobat Pro without creating a new PDF?
I later discovered the way to prevent this is by returning FDF from the server instead of HTML. Below is an example of how to take a submitted PDF, save to the server, and then output a thank you message to Acrobat Pro. if (Request.HttpMethod == "POST") { using (var file = new FileStream(Server.MapPath("~/submitted.pdf"), FileMode.Create)) { Request.InputStream.CopyTo(file); } Response.ContentType = "application/vnd.fdf"; Response.Write(@"%FDF-1.2 1 0 obj << /FDF << /Status (Thanks - your information has been stored) >> >> endobj trailer << /Root 1 0 R >> %%EOF RESPONSE; ?>"); Response.End(); }

Categories : Misc

iOS created PDF won't open in Adobe Acrobat
Problem Solved. Was createing an NSMutableData object with NSMutableData dataWithLength: instead of NSMutableData dataWithCapacity: so I probably had some unused Data space at the beginning. Oops.

Categories : IOS

Acrobat's Javascript console is not working
Finally got my question answered over on Adobe's forums. I thought I had tried everything, but it turns out that I had not even tried a simple Shift + Enter. Hard to believe, since I thought I'd tried every possible key combination already, but I cannot deny the facts. Since I only had the small Apple keyboard without the numeric keypad, I suppose this is the only way to get Enter instead of Return from that key. At any rate, the answer is now known!

Categories : Javascript

Print PDF with Acrobat Pro: select printer
Here is the documentation: http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/iac_api_reference.pdf It seems this is not possible: PrintPages always uses the default printer setting.

Categories : C#

OLEObject available verbs for Adobe Acrobat Documents
You should not need to use the .Activate method on the OLEObject, unless there is some specific reason that you need it to be Active within the workbook/worksheet. Most of the time, there is no reason to do this. There are only two Verbs available for an embedded PDF OLEObject: When I do oleObj.Verb xlVerbOpen this opens the PDF with focus on my machine (Win 7/Excel 2010). When I do oleObj.Verb xlVerbPrimary this activates the PDF but does not give it focus.

Categories : Vba

Store All Input Data Acrobat Form
If you want to do all the processing local (without server roundtrip) you would have to embed all data in the PDF itself. There are several ways to do this but I would recommend using JavaScript. You would declare this at the document level. You would handle the blur event of the customer name (or other key field), find a match among the multiple customers and populate the secondary fields. Assuming the data sits somewhere in a database, you would have to generate such a PDF or manipulate an existing template programmatically using a library. Not sure if you are looking to a programming solution or a tool. Here is more info on JavaScript for Acrobat: http://www.adobe.com/devnet/acrobat/javascript.html

Categories : Pdf

How to load a PDF into memory then read it via acrobat reader?
Download the file to a location, then load up the file into Adobe from the fileLocation. I am not certain you can pass a memory stream to Adobe Reader directly. Get the path of the PDF file and do this: //Get the path var path = @"C:UsersMyUserMy DocumentsMyPdf.pdf" //Open adobe reader with the file Process.Start(path);

Categories : C#

How to automate extracting pages from a PDF using AppleScript and Acrobat Pro?
I think you can do this entirely with the Automator without the need for AppleScript or Adobe software. The "PDF to Images" action splits a multi-page .PDF file into individual .PDF files, one per page:

Categories : Pdf

How to execute and debug an acrobat reader plugin
If it's still up to date: I'm just starting with Adobe Reader/Acrobat development, but when I get it right you tried to start the plugin in visual studio. I think you have to specify Acrobat as the output program, but I'm not sure exactly how. Maybe this can help: Debugging - Acrobat SDK

Categories : C++

How to write a text file in Acrobat Javascript
All Acrobat JavaScript functions that write a file to the user’s local disk pose a security risk, so there are some restrictions placed on their use. These functions include doc.saveAs() and all of the data export functions, like doc.exportAsFDF(). As you can read here: Acrobat provides us with two modes of operation for these functions--with a path and without a path. If no path parameter is provided to the function, Acrobat displays a file-browser dialog. The file browser dialog gives users control over how data is saved to their systems. If a path is provided to the function, then no dialog is displayed and the operation is handled silently, i.e., the user is not necessarily aware that data has been saved to their hard drive. This is a security problem, so to use one

Categories : Javascript

Multi-page document merging Adobe Acrobat Pro
Docotic.Pdf library can merge PDF files while maintaining outline (bookmarks) structure. There is nothing special should be done. You just append all documents one after another and that's all. using (PdfDocument pdf = new PdfDocument()) { string[] filesToMerge = ... foreach (string file in filesToMerge) pdf.Append(file); pdf.Save("merged.pdf"); }

Categories : Pdf

How to display PDF in web browser control instead of opening Acrobat Reader
You could generate a temp HTML file to embed the desired PDF: <body> <object classid="clsid:ca8a9780-280d-11cf-a24d-444553540000" id="pdf1" type="application/pdf" data="test.pdf" style="width: 100%; height: 100%"> <param name="src" "value"="test.pdf"></param> </object> </body> What's interesting, to make it work with a local (file://) PDF document, I had to specify both data attribute and src param. When it was served via http from localhost, the data alone was just enough. UPDATE: I could not tell why this doesn't work for the OP, so I've cooked up a very basic C# WebBrowser project demo'ing this. It works quite reliably in my environment (Win8, IE10, Acrobat Reader 11.0.3). UPDATE: I think I understand why this is happening. Your pro

Categories : Wpf

Adobe Acrobat is interfering with PDF files shown with WebView
Access the preferences property of the WebView, and disable plugins. [webView.preferences setPlugInsEnabled:NO]; This will disable the Acrobat plugin.

Categories : Objective C

Exported TeeChart to PDF shows error in Acrobat Reader after printing
I get this error message after printing the PDF file: "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." The file prints correctly but the PDF file ignores font name settings so I have added the defect (TF02016650) to the bug list to be fixed.

Categories : Wpf

Does firefox support loading favicons when loading image pages (i.e. http://www.asdf.com/image.jpg)? If so, how?
Unfortunately, Firefox doesn't support loading favicons when loading images because as you said, it doesn't grab it from the root and Chrome does. You have nothing to do with the problem, it's that Mozilla's programmers just didn't add the favicons from the root/command line. But maybe any day now they could add that and make every image with a favicon!

Categories : HTML

Qt, Android: QDesktopServices::openUrl( QUrl::fromLocalFile( "......pdf") ) without Acrobat Reader - crash
Maybe it is as simple as described in error message: No Activity found to handle Intent So without Adobe Reader installed there is not another application which can show pdf files. Thare is also related discusion here: Android: Activity not found exception on some devices, when trying to open local HTML - file in browser In this case you have to use QAndroidJniObject:: methods. And another one solution - there is permissions problem detected: https://forum.qt.io/topic/44859/solved-qt-on-android-open-an-external-file

Categories : Android

jQuery.support.ajax returns true even if XMLHTTP support is disabled
According to this Microsoft page, the IE8 setting only disables the W3C standard XMLHttpRequest object. It leaves the ActiveX Microsoft.XMLHTTP control enabled. There is a separate setting to disable (all) ActiveX controls. The jQuery support.ajax test works for both methods, so disabling the former but leaving the latter enabled will return true.

Categories : Javascript

support lib android.support.v7.widget.GridLayout causes InflateException / ClassNotFoundException with app widgets
When making widgets, you are constrained to the Views that implement the RemoteViews mechanism. The way that mechanism works is that the remote, "host" process is the one doing the actual inflating. Therefore, if that remote process (the launcher that hosts the widget) does not have the GridLayout class in its classpath, there is absolutely no way you can do this short of drawing the View in your own process and setting it as a Bitmap on an ImageView. I wouldn't do that, though. In general, when making widgets, constrain yourself to the Views that come with the framework.

Categories : Android

Getting "An error exists on this page. Acrobat may not display the page correctly." using ITextSharp WriteSelectedRows
You're introducing a PDF syntax error here: PdfContentByte canvas = writer.DirectContent; canvas.SetTextMatrix(50, 50); With DirectContent, you grab an object that allows you to write PDF syntax directly to the content stream. Immediately after that, you introduce a text state operator. This is illegal PDF syntax: A text state operator is only valid inside a text object; that is: between BT (BeginText()) and ET (EndText) operators). Why do you need to set the text matrix? That line doesn't make sense, because you're defining the position of the table in the writeSelectedRows() method. Long story short: remove canvas.SetTextMatrix(50, 50); and you'll have at least one syntax error less in your PDF. I just checked the iText codebase, and normally your code should throw an "unbalanced

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.