w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to make a IDE recognize JavaScript "class" referenced in other file
If you want to use classes and strongly typed members you can try TypeScript. It is a really nice super-set of javascript and gives you all the good stuff you are used to in Java and C#. http://www.typescriptlang.org/ There are some plugins for some text editors and IDEs, and Visual Studio 2012 supports it very nicely.

Categories : Javascript

Can I make a synchronous promise in the JavaScript Q library?
If you want to chain the callbacks, you have to return a new promise object from one of the callbacks. In your first example, you write .then( delay( 7500 ) ) which means you are passing a promise object to .then, not a function. According to the Promise/A+ proposal (which Q follows), all non-function arguments must be ignored. So, basically it's the same as if you just write: delay( 2500 ) .then( function () { console.log( "Step 1 done" ) } ) .then( function () { console.log( "Step 2 done" ) } ); Instead, pass function which calls delay and returns the promise object: delay( 2500 ) .then( function () { console.log( "Step 1 done" ); } ) .then( function () { return delay( 7500 ); } ) .then( function () { console.log( "Step 2 done" ); } ); Now the last callback will only

Categories : Javascript

Why Tesseract OCR library (iOS) cannot recognize text at all?
Make sure you have the latest tessdata file from Google code http://code.google.com/p/tesseract-ocr/downloads/list This will provide you with a list of tessdata files that you need to download and include in your app if you haven't already. In your case you will need tesseract-ocr-3.02.eng.tar.gz as you are looking for the English language files The following article will show you where you need to install it. I read through this tutorial when I built my first Tesseract project and found it really useful http://lois.di-qual.net/blog/install-and-use-tesseract-on-ios-with-tesseract-ios/

Categories : IOS

rpm install in CentOS6 does not recognize dynamic library libc.so.6
/lib/libc.so.6 -> libc-2.12.so This means that you have glibc-2.12 libc.so.6(GLIBC_2.17) is needed by libusbx-1.0.16-1.fc20.i686 The libusbx package requires glibc-2.17. Your distribution is too old. is there a safe way to update libc.so.6 on Centos 6.3 I could be wrong, but usually RedHat EL distributions (and CentOS based on them) do not allow you to upgrade glibc via standard update mechanisms. And you are rightfully concerned about an update causing "bricked" system; whatever you do, proceed with extreme caution.

Categories : Misc

How to make my JAR library to be included in the in AndroidManifest.xml and use it as a shared library
<uses-library> is for libraries that are part of device firmware (SDK add-ons). So, unless you are distributing your own hardware or ROM mods, <uses-library> will not be of use to you. Moreover, generally speaking, you want to have independent copies of that library, one per app using it. That way, you can update each app separately. Otherwise, changes to your JAR may necessitate simultaneous changes to all of your apps, and since you are not in charge of installing those app updates (users are), that could be a major problem.

Categories : Android

Automake & Autoconf - Program Doesn't Recognize Static Library Just Built
CFLAGS = -m32 -Wall LDFLAGS = "../libspellcheck/libspellcheck.a" First, these are user flags. Use the AM_* forms instead. Second, LDFLAGS is for flags. It is put near the start of the command line. But, for linking, order matters, so you want to use LDADD instead. There are a few ways to do this but perhaps the best is to use the per-target variable: spellcheck_LDADD = ../libspellcheck/libspellcheck.a You don't need those quotes.

Categories : C++

Make Envs Available To Sublime Text
Just a guess, but if you are using the build system, perhaps adding the "shell": true option? If it's a plugin you are working through, perhaps create an issue for the plugin (I'm guessing it's on github)

Categories : Ruby On Rails

How make php recognize feed requests
I don't think it's possible, since calls can be made automatically by different browsers etc... The only way is similar to the one Feedly provides, which has a specific user agent "Feedly/1.0" so you can easily check if client is feedly by checking $_SERVER['HTTP_USER_AGENT'] function IsThisClientFeedly() { return (strpos($_SERVER['HTTP_USER_AGENT'],'Feedly') !== false)?true:false; } see more info on Feedly http://www.feedly.com/fetcher.html

Categories : PHP

make getSystemService() recognize our new system service
You need to use SystemServer which holds all system services' names. You should check this link out: http://processors.wiki.ti.com/index.php/Android-Adding_SystemService

Categories : Android

Start Sublime 3 from terminal, when default is Sublime Text 2
When you run sublime, your computer should run a bash file at /usr/bin/sublime (running which sublime as Mike Li suggested will confirm the location. Open that up and edit it for Sublime Text 3. The contents of that file should be: #!/bin/bash /usr/lib/sublime-text-2/sublime_text --class=sublime-text-2 "$@" Edit it as so: (On my computer the executable is called subime_text_3 instead of subime_text. Verifiy by opening /usr/lib/sublime-text-3.) #!/bin/bash /usr/lib/sublime-text-3/sublime_text_3 --class=sublime-text-3 "$@" Point it to the location of Sublime Text 3 on your system. Edit Build 2221 (using the ppa) changed the installation directory from /usr/lib/sublime-text-2 to /opt/sublime_text_2

Categories : Linux

How to make Subeclipse recognize the projects checked out by TortoiseSVN
Subversions clients user a certain working copy format and if these two working copy format versions do not match then you will get a result where one client software won't recognize the other. TortoiseSVN 1.7.10 uses the 1.7.7 working copy format and Subclipse 1.10.0 supports 1.8.x working copy format. Since these do no match you need to make sure they use the same. I would assume that the easiest for you is to download and install the latest version of TortoiseSVN (currently 1.8.2) as it supports the 1.8.3 working copy format. If you still have problems after the upgrade, upgrade your working copy format version by issuing a svn upgrade command.

Categories : Eclipse

How do I make pylint recognize twisted and ephem members?
The answer is to add a section like the following to your pylintrc with the problematic classes. # List of classes names for which member attributes should not be checked # (useful for classes with attributes dynamically set). ignored-classes=SQLObject,twisted.internet.reactor,ephem

Categories : Python

How to make Bundler recognize location declarations of indirect dependencies?
We recently had to tackle a very similar situation with internal gems depending on each other. We already used an internal git host (GitLab) but had the same problems with not being able to declare bundle style git:and branch: attributes in the gemspec. The solution for us was to set up internal gem hosting as well. Using geminabox it's really easy to get a gem host up and running. run gem install geminabox and create a folder for your web service (we use passenger, ymmw): gems/ public/ tmp/ restart.txt gems/ config.ru The edit config.ru so something like this: require "rubygems" require "geminabox" Geminabox.data = "gems" run Geminabox And point passenger at the gems/public folder and it'll start up as a normal rack app for you to play with. Simply add the url to the s

Categories : Ruby

how to install sublime text indent xml in sublime 3
The location is system dependent, but are located at: OS X: ~/Library/Application Support/Sublime Text 3/Packages/ Windows: %APPDATA%/Sublime Text 3/Packages/ Linux: ~/.config/sublime-text-3/Packages/

Categories : Xml

Sublime Text 2 Python.sublime-package
Remove existing /User/Python.sublime-package and try manually unzip Python.sublime-package (change it's extension to .zip) to Package folder /Packages/Python. Package folder can be revealed via Preferences->Browse Packages... command.

Categories : Python

How to refactor in Sublime Text? (Ruby, Rails, JavaScript)
I wrote this plugin for JavaScript refactoring https://github.com/s-a/sublime-text-refactor I guess there are a lot more out there supporting RoR.

Categories : Javascript

Custom JavaScript snippets for emmet (in Sublime Text 2)
You should use js as syntax name since Sublime Text defines JavaScript scope as source.js. In future, you should use source.(SYNTAX_NAME) part for syntax name. And you shouldn’t use abbreviations section for snippets since abbreviations defines element blocks and should be written as HTML element. Use snippets section. Note that in JS files in ST editor you have to use Ctrl+E to expand abbreviations since Tab key is disabled for this syntax. And, as Protractor Ninja noted, it’s not a good idea to use Emmet snippets in editors that supports native ones.

Categories : Javascript

Adding syntax highlighting to Sublime Text for JavaScript
The default syntax highlighting for javascript in Sublime is not great. I use JavascriptNext: https://github.com/Benvie/JavaScriptNext.tmLanguage It improves on the default syntax hightlighting and also adds support for future ES6 syntax. In your particular case it is more consistent on the coloring of the if values, though less consistent on the property values for the : syntax. But I think thats ok since its not actually valid syntax anyhow.

Categories : Javascript

css,javascript path recognize in codeigniter
The folders (css, javascript, images) should NOT be pasted into the views folder, but in the folder where your Code Igniter's index.php is. (Usually, the parent folder of the application folder, i.e., your site public root.)

Categories : Codeigniter

external html won't recognize javascript
The problem is most likely that your 360 viewer is being bound to the elements that you are replacing. Once you replace them with the .replaceWith() or .load(), the events are no longer bound. Without knowing how you're calling the 360 viewer, it's hard to give you the specifics. But basically, you'll want to do something along these lines: $("#button2").click(function () { $('#img2').fadeOut(500, function () { $('#content').load('external.html', function() { // Re-bind the 360 viewer in this function // Below is pseudo-code, replace with proper code $("#content").viewer({...}; }); }); });

Categories : Javascript

Why doesn't JavaScript recognize erb as valid 2d array?
Look at the JavaScript you are generating. Don't look at the template and compare that to how the browser reacts. JavaScript string literals must be quoted. You aren't outputting quotes around the strings you are outputting. Also, trailing commas will cause problems in some JavaScript engines. You are outputting a comma after the last entry.

Categories : Javascript

Class library does not recognize CommandManager class
Go to the "References" part of your class library and select "Add Reference". Look for an assembly called "PresentationCore" and add it. Then in your class file add the using statement using System.Windows.Input; You will then be able to access the CommandManager as you expect. Just adding: lots of guys when they go to create a class library, they select "WPF Custom Control Library" and then erase the "Class1.cs" file. It's a shortcut that automatically adds the right namespaces to your library. Whether it's a good or bad shortcut is anybody's call, but I use it all the time.

Categories : C#

How to configure python interpretor in sublime text 2 to make it function as IDLE python shell
Go to your Packages folder by selecting Preferences -> Browse Packages.... Go to the User folder and create a SublimeREPL folder containing a config folder containing a Python folder. Then, within that final folder save the following as Main.sublime-menu: [ { "id": "tools", "children": [{ "caption": "SublimeREPL", "mnemonic": "r", "id": "SublimeREPL", "children": [ {"caption": "Python", "id": "Python", "children":[ {"command": "repl_open", "caption": "Python", "id": "repl_python3", "mnemonic": "p", "args": { "type": "subpro

Categories : Python

Django-How to make the django inbuilt auth view recognize the customized form
You should override the URL to pass your custom form class as a view keyword argument. Details in How to override a view from an external Django app.

Categories : Python

Can I make Visual Studio recognize more than just two shortcut key sequences for a keyboard shortcut binding?
As far as i know are only maximum 2 sequences allowed in Visual Studio 2012. You can check that when you open the Options in Visual Studio and open the Keyboard Settings. I have checked that by using Ctrl+A, Ctrl+C, but i´m not allowed to add more.

Categories : Visual Studio

Javascript - Is there any javascript library for validation that works with fields not in the form?
Have a look at knockout and knockout.validation, works wonders and can do a lot more than just validation You can start with http://knockoutjs.com/ which provides a good reference and tutorials for getting started with knockout then you can have a look at https://github.com/Knockout-Contrib/Knockout-Validation which is the validation plugin. What makes knockout the best for this is that it decouples the DOM and the JS objects so any update that occurs to the DOM or JS object can easily be detected and the other can be updated. With knockout validation it can be applied to any observable which will then be checked for validation every time it is changed regardless whether it is in the DOM or through JS or where in the DOM it is.

Categories : Javascript

Make Sublime Text treat