w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Hadoop compression : "Loaded native gpl library" but "Failed to load/initialize native-lzo library"
I was having the exact same issue and finally resolved it by randomly choosing a datanode, and checking whether lzop was installed properly. If it wasn't, I did: sudo apt-get install lzop Assuming you are using Debian-based packages.

Categories : Hadoop

initialize itertools count in library from database query
class Thing(object): id_iter = None def __init__(self, num=1): if Thing.id_iter is None: Thing.id_iter = itertools.count(num) self.id = next(self.id_iter) Example: x = Thing(5) print(x.id) #prints 5 y = Thing() print(y.id) #prints 6

Categories : Python

Initialize JavaScript app with large client-side data?
"JSON" is the right answer; "file" is not. Have a serverside script generate your JSON from the database. (Actually, you could even pregenerate it, in which case it really would be a file, if the data is static enough.) Dumping a database into JSON is a trivial exercise. Even better, if the data is huge enough, and if not all of it is needed at once, chunk it: send it in several JSON requests, so the user can start getting some feedback as soon as possible.

Categories : Javascript

Error debugging code in visual studio 2012 - Failed to initialize client proxy: could not connect to
It looks like this happens sometimes when the VS execution engine process is terminated. This was the case for me, since I had terminated the process manually when the process was not responding. You could check if you have "vstest.executionengine.exe" process running when you see this error message. I came across this solution at the MS forum below: Reference: http://social.msdn.microsoft.com/Forums/vstudio/en-US/997291d8-03e4-47ed-a30d-9d47550c0094/cannot-connect-to-the-testexecutor-via-named-pipes-from-vs-2012-rc

Categories : Dotnet

Google Api PHP Client Library
You have to configure proxy settings in curl. Check Google_CurlIO.php for a line that calls curl_exec($ch). You may need to add something beforehand similar to: curl_setopt($ch, CURLOPT_PROXY, 'your-proxy-server');

Categories : PHP

Initialize array to use mysql output outside loop
Change this: $host = parse_url($row['url'], PHP_URL_HOST); For this: $host[] = parse_url($row['url'], PHP_URL_HOST); http://php.net/manual/en/language.types.array.php

Categories : PHP

Could not initialize class org.apache.axis.client.AxisClient thrown even though axis jar was there
My boss helped me find the answer . It was actually the problem with commons-logging . I loaded a commons-logging in my nexus .The nexus which was running in a jetty server itself had a commons-logging , so there was a conflict . Now I removed my commons logging from the plugin descriptor . Then the problem was over , my plugin started working . Thanks .

Categories : Java

Client-side JS session library
You can use localStorage if available, and if it's not, then using cookies (or whatever you feel to): var appToken = createToken(); try { if (localStorage.getItem) { localStorage.downloadAppAlert = appToken; } else { setCookie('downloadAppAlert', appToken, 10); // name, a string value, num. of days } } catch(e) { console.log(e); } Then you can use some function to set your cookies - i.e. this one i just found in w3schools: function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; } To retrieve a cookie value by it's name - downloadAppAlert in the example - you can use th

Categories : Javascript

how to send js library to client dynamically?
You can add your string variable to your model ("MyJavascriptCode"), then simply output the contents inside a script tag on your view. Html.Raw outputs content with encoding it. <script type="text/javascript"> @Html.Raw(Model.MyJavascriptCode) </script>

Categories : Asp Net

GCS client library NoSuchMethod systemNanoTime
As suggested here you probably have a google-collections jar on your classpath as well as Guava. Make sure to remove that. If using Maven <exclusions> <exclusion> <artifactId>google-collect</artifactId> <groupId>com.google</groupId> </exclusion> </exclusions> See also here Guava is a fully compatible superset of the old Google Collections Library. It also includes years worth of bug fixes, doc fixes, and performance fixes, so we strongly encourage you to use Guava instead of Google Collections. If your application ever ends up with both google-collect-1.0.jar and guava-r##.jar on the same classpath, simply remove the Google Collections JAR and you should be fine. If you don't remove it, it will either cause terrible pr

Categories : Google App Engine

Java library for JasperReports WS Client
jasperserver-common-ws should be in your JRS install jasperserver-ireport-plugin should be in your iReports install jasperserver-ws-client ought to be within the jasperserver-ireport-plugin jar reference The Jaserserver source code can be found at here (Credentials: anonsvn anonsvn)

Categories : Maven

WCF client app.config in Class Library
The config file in your DLL project will be used by Visual Studio, for example when updating service references: it isn't used at runtime. Each client application that uses the DLL will need to have its own configuration file with the relevant configuration section in order to use the service at runtime.

Categories : Wcf

Generating a HATEOAS client library
My question is: can I/does it make sense to generate implementations of the Order/Item interface from the API? By this I mean in a manner similar to that offered with C#/web services which export WSDLs. It partially makes sense. By a simple CRUD API you can map the resources to the entities. By complex applications it does not work, because you map URIs to resources and METHOD URI pairs to operations. So every time if you need an operation not defined by HTTP, you have to create a new resource or at least a new URI for an already existing resource. Some examples: transfer money from one account to another: POST /transfer [acc1, acc2, amount, currency] - the transfer does not necessary exist as an entity in your domain logic (don't try that kind of solution in production code un

Categories : Rest

How to do a asynchronous set in Couchbase PHP client library
I'm wondering what the purpose would be ... the async get makes sense ... you send a bunch of keys and get a response whenever the data is sent back to you. With a set you're going to send the data to the server. The couch server will cache the data in memory and return instantly. My understanding is that it queues it for disk writing. After writing to disk it queues it for indexing of views. There really isn't much to "delay". It returns to you immediately after writing it to memory. There isn't anything to do asynchronously is there? The only thing I could think of is the driver could cache it for you before sending it the couch server, but I'm not sure that would accomplish much except for using memory in the couch client (harder to debug oom errors).

Categories : PHP

How do I get more than 250 calendar items using the .net client library?
Did you try to change the MaxResult property on the request? For example, try doing the following: var itemlistreq = calsrv.Events.List(cal.Id); itemlistreq.MaxResults = 10000; var itemlistex = itemlistreq.Execute(); var itemlist = itemlistex.Items; UPDATED: Try getting the NextPageToekn property from the Events class (itemlistex in your case) var itemlistreq = calsrv.Events.List(cal.Id); var itemlistex = itemlistreq.Execute(); var token = itemlistex.NextPageToken; // THAT IS THE TOKEN YOU ARE LOOKING FOR var itemlist = itemlistex.Items; Then you can set it on the itemlistex.PageToken property to get more events...

Categories : C#

SSLError when using google api client library
The solution that works for me is changing permission of cacerts.txt to your own user (instead of root). Or run as root. You can find the files at /usr/local/lib/python2.7/dist-packages/httplib2/cacerts.txt

Categories : Python

Native Client plugin using tesseract library
It may be easiest to try debugging. See https://developers.google.com/native-client/devguide/devcycle/debugging#gdb The link above gives a lot of detail, but here is the basics: Run chrome with --enable-nacl-debug on the commandline, and navigate to your page. The NEXE will not load, and instead will wait for a debugger connection. Launch the native client debugger: $NACL_SDK_ROOT/toolchain/linux_x86_newlib/bin/x86_64-nacl-gdb In gdb, type: nacl-manifest hello_tutorial.nmf then target remote :4014 (the link above mentions running nacl-irt ... as well, it gives additional information if the crash is not in your code, but often is not necessary) At this point, you should be connected to the paused NEXE, type c to continue The NEXE should crash, as before. Type bt to print a stack backtrac

Categories : C++

Is there any cassandra C++ client library which is thread safe?
I don't know if you are still interested... anyway, the standard c++ client library at the moment is cpp-driver. It is quite straightforward to use, even though still missing many functionalities of its java-python counterpart. Doing multi-thread insertions is as easy as sharing the "session" instance amongst threads. You will know what I mean if you just look at the simple demo app provided with the driver.

Categories : C++

error in generating end point client library
updated working code below for adding my own endpoint method with my custom query. @SuppressWarnings({ "unchecked", "unused" }) @ApiMethod(name = "getUserTableByEmail") public CollectionResponse<UserTable> getUserTableByEmail( @Nullable @Named("cursor") String cursorString, @Nullable @Named("limit") Integer limit, @Named ("emailAddres") String email) { EntityManager mgr = null; Cursor cursor = null; List<UserTable> execute = null; try { mgr = getEntityManager(); Query query = mgr.createQuery("select n from UserTable n where n.emailAddress = '"+email+"'"); if (cursorString != null && cursorString != "") { cursor = Cursor.fromWebSafeString(cursorString); query.setHint(JPACursorHelpe

Categories : Android

Installing Zend Gdata Client library
Welcome! Your Q is about include files rather than ZF elements. Understanding where the include setting can be made (and subsequently overridden) is an absolute key bit of information. You need to find out where it is on the server you are working on. echo ini_get('include_path'); Then dash off and really, really read the corresponding manual page. Try out including a very simple file with an echo statement, and you will regain your sanity and confidence. http://www.php.net/manual/en/function.include.php Get that working then have a play with this: http://www.php.net/manual/en/function.ini-set.php The experience how you can include a file from the same directory (not generally a good idea if that is a public webpage - inside your webroot) Then if you want to really chase this thi

Categories : PHP

Google Storage Client Library from outside AppEngine
Google Cloud Storage and Google AppEngine are separate products that can be used seperately. AppEngine provides an AppEngine-specific client for Google Cloud Storage that provides several useful features for developing an AppEngine app that will use Google Cloud Storage, which I believe is the library you're referring to. You can absolutely use Google Cloud Storage from outside AppEngine, but you cannot use AppEngine's GCS library to do so. Instead, you'll have to use one of GCS's APIs or client libraries. There are two main APIs (XML and JSON-based), and also client libraries for many major languages, including Python and Java. For getting started, check out https://developers.google.com/storage/docs/signup

Categories : Python

Customizing RTSP client library for woza
I recommend you to install wowza locally on your host, turn it on the max debug level and try to establish the session with you client. Then, in the log, you will see what is going on. As per my experience, wowza standard setup behaves in a pretty expectable way, understands h264 + aac sound. I implemented rtsp client for android, can send you negotiating logs, etc. You, on the other side, could also grab the log on how session is established to check if commands order is ok, all is sane and what the response is.

Categories : IOS

Load Google JS Client library in AngularJS
This is a complete guess, and may not even be close, but perhaps it can spurn others to take a look. My guess involves accessing the angular service from outside angular. I'm using this post as a reference: // since the callback is referencing the function 'load', define it here: var load = function(){ var elem = angular.element(document.querySelector('[ng-controller]')); var injector = elem.injector(); var oauth2 = injector.get('oauth2') // grab the factory return oauth2 } Again - just a guess. If it doesn't work, comment below and I'll delete!!

Categories : Angularjs

Where do I find the Google Places API Client Library for Python?
Andre's answer points you at a correct place to reference the API. Since your question was python specific, allow me to show you a basic approach to building your submitted search URL in python. This example will get you all the way to search content in just a few minutes after you sign up for Google's free API key. ACCESS_TOKEN = <Get one of these following the directions on the places page> import urllib def build_URL(search_text='',types_text=''): base_url = 'https://maps.googleapis.com/maps/api/place/textsearch/json' # Can change json to xml to change output type key_string = '?key='+ACCESS_TOKEN # First think after the base_url starts with ? instead of & query_string = '&query='+urllib.quote(search_text) se

Categories : Google Maps

CloudTable vs TableServiceContext in Azure Storage Client Library 2.0
If it were me, I wouldn't change all the code unless there was a legit need to do so. How much code would need changed also plays a factor in that decision. Have you reviewed these two resources for additional info on the new features in the latest storage client library: Windows Azure Storage Client Library 2.0 Table Deep Dive - http://blogs.msdn.com/b/windowsazurestorage/archive/2012/11/06/windows-azure-storage-client-library-2-0-tables-deep-dive.aspx Windows Azure Storage Client Library 2.0 Breaking Changes & Migration Guide - http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/windows-azure-storage-client-library-2-0-breaking-changes-amp-migration-guide.aspx

Categories : Azure

NoClassDefFoundError on generated client library - GAE cloud endpoints
After more than 2 days of dead stop, found out that I needed to check Android Private libraries and Android 4.2 in (Build path -> Configure build path -> Order and Import). http://stackoverflow.com/a/16784945/902572

Categories : Android

Build "Boghe" SIP Client Library in Windows phone 8
u need to make one folder myboghe. Then check out both the folders from their svn in this folder. Run the boghe/2.0/solution file. It will run. If you have any problem get back to me. I will write step by step execution.

Categories : Visual Studio 2010

How can I import the Google API Objective-C Client Library in to my iOS project without getting errors?
I'll just quote what @borrrden already wrote. This worked for me. Make sure that you have the armv7 architecture included in your build settings under "Architectures"

Categories : IOS

Client and server side password strength validation library
Take a look at this link, it used XML config which is shared by client and server side.

Categories : C#

Loading Google API Javascript Client Library into Chrome Extension
You just need set the onload method for this library https://apis.google.com/js/client.js?onload=handleClientLoad and handleClientLoad - default your registration method. Sample for js oauth

Categories : Javascript

which are the files uri on GAE java emulating cloud storage with GCS client library?
You can see how this is done here: https://code.google.com/p/appengine-gcs-client/source/browse/trunk/java/src/main/java/com/google/appengine/tools/cloudstorage/dev/LocalRawGcsService.java As of today this mapping is being maintained by the using the local datastore. This may change in the future, but you should be able to simply call into this class or one of the higher level classes provided with the GCS client to get at the data.

Categories : Google App Engine

Deep Insert using wcf data services client library / odata
The only way to do deep insert using DataServiceContext is to use Batch mode. While the OData protocol supports deep insert, DataServiceContext does not have that support in it. For doing Batch, call ctx.SaveChanges(SaveChangesOptions.Batch) Hope this helps. Thanks Pratik

Categories : C#

Send mail using c# interop library without installing outlook client
yes this is possible using C# alone. user does not need to install outlook in client machine. C# provides a namespace called System.Net.Mail. This has all the classes required to send a mail from C#. It does not have any dependency with OutLook. Have a look below code snippet : System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add("jeet@abc.come"); message.Subject = "This is the Subject line"; message.From = new System.Net.Mail.MailAddress("From@XYZ"); message.Body = "This is the message body"; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("**yoursmtphost**"); smtp.Send(message); In place of "yoursmtphost" you can configure the Ip address of machine as well. Hope this solves your query. Don't forget to mark

Categories : C#

VAB of Enterprise Library 6.0 Client Side validation(Jquery/Javascript)
It is possible, so says this link, but i have been unable to get past the problems with multiple validators being adding to the page with the same name.

Categories : Asp Net Mvc

Instance of client implementation of abstract class in library code
Your approach won't work. If you want to "restore" the instance you should do in other way instead of simply newInstance. this is one thing. I don't know your concrete requirement, so I cannot answer further on the "restore" part. I said your approach won't work, because you said your are writing a "library", so I guess client code will import your class, that is, your abstract class is in client codes's classpath. however, the client class won't be in your classpath. that's why you got the classnotfound Ex. same as if I extend a class from guava for example, how come in guava codes, it knows my class and create an instance of my class?

Categories : Java

creating a filter using the gdata java client library and email settings api
From here: Didn't you ever want some kind of tool to create new Google Data projects in seconds? Google Data Java Client Eclipse Plug-in is now available for use. Using this plug-in you can create a new Java project to interact with any Google Data API of your choice. Now, you don't need to worry about setting up the dependencies for your Google Data project. This plug-in handles all the dependencies and also provides you with an option to download the external dependencies. It also creates a boiler plate code to interact with the API that you are interested in. This will give a quick start to all the newbies.

Categories : Misc

Failed to load Firebird client library: Embedded database with Jaybird
I created a very simple program to connect to Firebird embedded: package pkg; import java.sql.*; public class MainClass { public static void main(String[] args) throws SQLException { try (Connection con = DriverManager .getConnection("jdbc:firebirdsql:embedded:D:/data/db/testdatabase.fdb", "sysdba", "")) { try ( Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM RDB$DATABASE"); ) { while (rs.next()) { System.out.println(rs.getString(2)); } } } } } This is in a layout: src +--pkg +--MainClass.java I opened a command prompt, and went to the src folder and compiled with: javac -cp . pkgMa

Categories : Java

How to deal with client and server sockets using shared library .so format both having main()?
Shared library would not have file with main() function. After creating shared library we have to create c program with main function which which will call main() function and perform specific task!

Categories : C++

How can you test that an SSL client library is properly verifying the certificate of the server to which it connects?
First off, you'll need a collection of SSL certificates, where each has just one thing wrong with it. You can generate these using the openssl command line tool. Of course, you can't sign them with a trusted root CA. You will need to use your own CA. To make this validate correctly, you'll need to install your CA certificate in the client libraries. You can do this in Java, for example, using the control panel. Once you have the certificates, you can use the "openssl s_server" tool to serve an SSL socket using each one. I suggest you put one certificate on each port. You now have to use the client library to connect to a port, and verify that you get the correct error message. I know that Python by default does no certificate validation (look at the manual for httplib.HTTPSConnection).

Categories : Security

Generate cloud endpoint client library suddenly stopped working
The issue tracker shows that this issue was resolved (https://code.google.com/p/googleappengine/issues/detail?id=9746). Also @howettl posted above in the comments that this issue was fixed. There were some questions in the issue tracking about remote servers being involved and the fix not requiring an update to the GPE. This appears to be related to the fact that there is a Google web service used by the GPE for generating some of the cloud endpoint code. If this web service is not working (routing issue, server issue, etc), or you don't have a connection to the internet, you will not be able to generate (or regenerate) cloud endpoints for your project. Also if your generation is slow, it might be due to your internet connection speed.

Categories : Android



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