w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why doesn't NSString support objectAtIndexedSubscript and how to work around?
Add a category on NSString with the method: -(id)objectAtIndexedSubscript:(NSUInteger)idx { if(idx >= self.length) { return nil; } return @([self characterAtIndex:idx]); } and call it like this: unichar c = [foo[i] unsignedShortValue] Note that c will be 0 both when the character is the null character, or index is out of bounds.

Categories : Objective C

ConditionalPanel doesn't support variables with dot in the name, any work around?
In conditionalPanel the condition is a Javascript expression. You are relying on Javascript's dot notation when you type "input.test". You don't have to change your variable names. There is a simple workaround, just use the square bracket notation instead: input["tes.t"] checkboxInput("tes.t", label="tes.t", TRUE), conditionalPanel( condition='input["tes.t"]', h2("tes.t tes.t") will work.

Categories : R

.find doesn't work in jquery 1.4.2 and I can't figure out how to support it
Yes, that would be correct. The .find() function was added in 1.6. You could upgrade jQuery or use the .find() using the CSS selector. If you have the elements with unique .id elements, you could just change your .find function to call that: .find('#' + n.id) Another option, since you have 'this', is that you could just use the basic $(this): var r = $(this); Or, for your code r = e(this);

Categories : Javascript

Multi link event in image map doesn't work
Right now, you're trying to add a <div> inside an <area> (this), which makes no sense. But I think you want this : $("#gt1").hover( function () { $(document.body).append($("<div id='mouse' class='gtcon'><span>Hello 1</span></div>")); }, function () { $("div:last").remove(); } ); This effectively makes the pretty bubbles you probably want. Demonstration As noticed by gvee, you can reduce repetitions. For example : var texts = [null,'hello 1', 'hello 2']; $(".pin").hover( function () { $(document.body).append($("<div id='mouse' class='gtcon'><span>"+texts[this.id.slice(-1)]+"</span></div>")); }, function () { $("#mouse").remove(); } ); Demonstration

Categories : Javascript

Multi-schema select statement doesn't work in PL/SQL procedure?
Most likely, the problem is that the user that owns the stored procedure, REGREPORTUSER has access to the table saturn.shttran via a role rather than as a direct grant. A definer's rights stored procedure cannot use privileges that are granted to a definer via a role. It can only use privileges granted directly. You can verify that this is, in fact, the problem by disabling roles in your SQL*Plus session. If you run the command SQL> set role none; and then try to execute the SQL statement, you should get the same error. In order to fix the problem, you need to give the grant directly GRANT SELECT ON saturn.shttran TO REGREPORTUSER

Categories : SQL

nodejs&couchbase work with multi-core cpu and multi-server
The creation of multiserver couchbase cluster is easy as a pie - just install couchbase on new server and add it to cluster with one button. Nodejs scaling is more difficult. If you have realtime game (i.e. you use websockets to handle players communication) you should look to nosql databases that have "pub-sub" out of the box (i.e. redis). There are some utils that implement "pub-sub" for memcached, but they are very ugly and their performance isn't good. But if your game isn't realtime (i.e. your game is like FarmVille) you can use couchbase as a "shared" layer between nodejs threads and servers.

Categories : Node Js

Multi-devices support in Android
If you are talking about the GUI, I guess your environment is Windows? Then you can use the following batch: @ECHO OFF cd "C:Program Files (x86)Appium ode_modulesappium" node server.js --app "<path-to-your-project>in<app-name>.apk" -p <port-to-listen-on> -dp <device-port-to-connect-to-device-on> With this you should be able to start two different Appium servers and using them parallel. For a full list of all available commands, type node server.js --help. If you installed Appium via npm, the path to server.js would be something like "C:Users\AppDataRoaming pm ode_modulesappium" instead.

Categories : Android

Multi Query Support in MySQL?
You forgot ; here for separating sql queries NULL, NULL, NULL)'; ^ NULL, NULL, NULL);'; Also use mysqli_* ,it supports to run multiple query in one sigle statement.

Categories : PHP

Support for Multi Window App Development
Anyone can do it. Your Activities screen area is just reduced. You can use resource qualifiers to choose different layouts for such instances. See: http://developer.android.com/guide/topics/resources/providing-resources.html#ScreenHeightQualifier Here's an example of a AndroidManifest.xml that supports the multi-window support. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.multiwintest" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"

Categories : Android

Multi Language Design support in IOS
As Mike Weller mentioned in his comment, Autolayout should do this: https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html#//apple_ref/doc/uid/TP40010853-CH1-SW1 "You don’t even have to specify new layout for languages like Hebrew and Arabic in which the left to right ordering of elements themselves should generally be reversed." This question seems to have been answered a couple of time before, including here: Right to left and left to right languages in the same app? and here for determining which direction the language should be: iOS: Determine if device language is Right to Left (RTL)

Categories : IOS

JSF 2 - Multi language support issue
You have to use <f:view/> tag with its locale attribute, which should be bound to a SessionScoped bean variable (or another scope, if you want only an specific part of your application to be in a different language). That will render the current view based in that locale value.

Categories : JSF

Does emacs support multi column editing?
I'm not sure if this fits your requirements, but you might take a look at Two Column Editing.

Categories : Emacs

gperftools cpu profiler does not support multi process?
Quite old, don't know if you found an answer or not, but... Seems like every thread/fork should register itself using ProfilerRegisterThread(); You can find more information in those two issues: Here and Here. Also here is an example code, similar to your test case where the forks can be registered.

Categories : Linux

Does linux support multi-touch screen
Linux started supporting Microsoft's Multi-touch protocol from kernel 3.8 onwards. The reference is here: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt Addendum http://www.ptrackapp.com/apclassys-notes/embedded-linux-multitouch/ has arm multi-touch tutorial for iPhones but it applies equally to Android. The hid-multitouch in linux supports a whole bunch of panels: See http://lxr.free-electrons.com/source/drivers/hid/hid-multitouch.c for details Addendum 2 Multi touch support has been somewhat there since 2.6 Ubuntu had multi touch support in its distribution in 2010. Microsoft Multi-touch protocol support started in 3.8. Chrome OS support started in kernel v3.9. X.org server had multi touch support built into it in 2011.

Categories : Linux

How can i use Google Cloud SQL to support multi-tenancy for my application
According to https://developers.google.com/appengine/docs/python/multitenancy/ datastore, memcache & taskqueue are the only things that supports namespace which is used by the multitenancy feature. Meaning stuff like blobstore and cloud sql you have to manually namespace or implement yourself.

Categories : Google App Engine

Custom powershell cmdlets do not support multi-threading?
No custom cmdlets are not the problem. My guess is the problem is that calling Get-MyCmdlet fails with an error so $result is not set and thanks to your if the browser is started. If you would check the results of your jobs you would see an error message. You probably need to make sure the job initializes right so you can call your cmdlet. You could use the -InitializationScript parameter of Start-Job to import your module for the job. See here, here and here for more information.

Categories : Multithreading

How to add support of multi-line arguments for Python scripts using argparse?
Post-facto answer, based on my comments: The problem is in your bash script. If it worked as intended, python wouldn't even know there's a newline between arguments--the shell handles that and removes the newline. Most likely there's a space after the first backslash. But since the same file works properly on Debian but fails under cygwin, it was not a space after the backslash. Perhaps it's a problem with the line endings in your script? So, the problem was automatic CR/LF conversion by git, combined with a strange refusal by cygwin to understand the line-ending conventions of its host operating system. Though you fixed it by hand-converting the script back to unix line endings, I would recommend a more robust solution: You could enable CR/LF support in cygwin (since you imply that it

Categories : Python

how to use shared preference on multi textview,multi checkbox,multi button and multi edit box in android?
Use these method to save and get values from any where in your app change parameter according to your requirment this method to save value in shared prefrences public static void setPref(Context c, String pref, String val) { Editor e = PreferenceManager.getDefaultSharedPreferences(c).edit(); e.putString(pref, val); e.commit(); } this method to get value from shared prefrences public static String getPref(Context c, String pref, String val) { return PreferenceManager.getDefaultSharedPreferences(c).getString(pref, val); }

Categories : Android

Is this the right way to structure MVC (understanding gathered from teresko's posts) + incorporating multi-language support into the framework?
This really isn't all that related to MVC. When you are implementing multilingual URLs, it's all about routing. Routing Basically, by the time your code gets to calling stuff on controller, you should have fully initialized request instance, that has recognized language from the URL and translated all the parts of input into something useful for creating instances. $request = new Request($query); $router = new Router; $router->import('/path/to/routes.json'); $router->route( $request ); At this point you would have split the user's query (from example: '/presentation/view/dernières/nouvelles') into recognized segments, based on pattern that was recognized. Lets take for example, that matted pattern was in config defined as: /presentation[[/:action[/:filter]]/:resource

Categories : PHP

MongoDB schema design to support editing subdocuments within an array in multi-user environment?
Having different writers is a key downside of embedding documents in my opinion. You might want to take a look at this discussion that presents different solutions. I'd try to avoid different writers to one document and use a separate Comments collection instead, where each comment is owned by its author. You can fetch all comments on a post by an indexed field postId reasonably fast. Then the comments simply have a regular _id field. It makes sense to use an ObjectId because that automatically stores the time the comment was created, and it's a monotonic index by default. create a "lastModified" timestamp on the parent document, and only save the edit if nothing has changed on the document. This is called 'optimistic locking' and it's generally not good if there is a high probabilit

Categories : Mongodb

Anorm and get[Double]
When I replace "match" with "map" in your converter, it compiles for me: val myThingConverter = { get[String]("type") ~ get[String]("code") ~ getDouble]("value") ~ get[Long]("id") map { case tpe ~ code ~ value ~ id => MyThing( "test", " test", value , 213 ) } } Also, you can't/shouldn't name variable "type" in Scala.

Categories : Scala

Capistrano doesn't support svn 1.8+?
Subversion 1.8 introduces a new working copy database format, and it's not automatically upgraded. If your working copy is accessed by both 1.8 and 1.7 client libraries, the 1.7 clients will fail after the 1.8 client has upgraded the database format.

Categories : Svn

Why my app doesn't support nexus 7?
change your manifest to this.. <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="18" /> becaue nexus 7 uses android api 18 that is latest JellyBean....

Categories : Android

using requests with TLS doesn't give SNI support
The current version of Requests should be just fine with SNI. Further down the GitHub issue you can see the requirements: pyOpenSSL ndg-httpsclient pyasn1 Try installing those packages and then give it another shot.

Categories : Python

Why PlatformURLResourceConnection doesn't support outputstream?
It's probably not used to interact with the workspace, since there's the IResource/IFile API. You can open an enhancement request at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=Resources

Categories : Eclipse

Why doesn't C11 support lambda functions
This is really just my opinion, since I don't know what the committee thinks. On the one hand, Lisp has been supporting lambda expression since its birth, which is in 1958. The C programming language was born in 1972. So lambda expression actually has a longer history than C. So if you ask why C11 doesn't support lambda expression, the same question can be asked about C89. On the other hand, lambda expression is always a functional programming thing, and is absorbed to imperative programming languages gradually. Some of the "higher" language (e.g, Java, before the planned Java 8) doesn't support it yet. Finally, C and C++ are always learning from each other, so maybe it will be in the next C standard. For now, you can take a look at Blocks, a non-standard extension added by Apple. This

Categories : C

Object doesn't support #inspect with many to many associations
Your problem is here: class Game < ActiveRecord::Base serialize :data, :history ^^^^^^^^ Serialize is defined as: serialize(attr_name, class_name = Object) ..it does not take multiple serializable arguments. See: http://apidock.com/rails/ActiveRecord/AttributeMethods/Serialization/ClassMethods/serialize What you probably meant to do is this: class Game < ActiveRecord::Base serialize :data serialize :history

Categories : Ruby On Rails

ElasticSearch doesn't seem to support array lookups
Try searching for "open" rather than "Open." By default, Elasticsearch uses a standard analyzer when indexing fields. The standard analyzer uses a lowercase filter, as described in the example here. From my experience, Elasticsearch does search arrays.

Categories : Elasticsearch

/MP doesn't enable OpenMP support in VS2012
The /MP option means that the compilation will run on multiple processors, it's purpose is to "reduce the total time to compile the source files". It has nothing to do with OpenMP API. To enable OpenMP support, there's an /openmp option (in the documentation you'll also find an example and the description of how to enable OpenMP support).

Categories : C++

jQuery + ie8 'Object doesn't support this property'
There's no trim in IE8 but jQuery provides one. Change var $content = $(response.trim()); to var $content = $($.trim(response));

Categories : Jquery

Why doesn't GCC's ternary extension support assignment?
To answer the question, I believe there are some other questions that needs to be answered as well. Why is there a ?: operator in the C language and why is it better than if-else? As far as I know, nobody has been able to answer that question, without merely stating their own subjective opinions. K&R 2.11 states that "The conditional expression often leads to succinct code." and then they illustrate this with the line printf("%6d%c", a[i], (i%10==9 || i==n-1) ? ' ' : ' '); which is their own subjective, muddy opinion. Personally, I believe that printf("%6d", a[i]); if(i%10==9 || i==n-1) printf(" "); else printf(" "); is far, far clearer since I can read and understand that code in 10 seconds, as opposed to 1 minute to read and understand the K&R version. A

Categories : C

Why Java doesn't support function like clrscr in C?
OOP has nothing to do with it. It's more clrscr is more a function of the environment the Java is running in than Java itself, and so it is not in Java's scope. Or to put it another way: since Java is cross platform and can be run without a console, the meaning of clrscr has to change depending on how the app is run and on what platform.

Categories : Java

Object doesn't support addEventListener IE8 in jquery
jQuery 2.x has dropped support for IE < 9, so if you want to support IE7 & 8 then use latest version of 1.x branch - now 1.11.0 From jQuery jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. All the notes in the jQuery 1.9 Upgrade Guide apply here as well. Since IE 6/7/8 are still relatively common, we recommend using the 1.x version unless you are certain no IE 6/7/8 users are visiting the site.

Categories : Javascript

Object doesn’t support this property or method
This is just a guess but I suspect your problem is coming from line 53 of the DOMImplTrident.isOrHasChildImpl method. return (parent === child) || parent.contains(child); I am further guessing that you are encountering your errors on IE10? The reason I think you are running against IE10 is because GWT doesn't officially support IE10 with a separate DOM implementation. It would end up using the DOMImplIE9 implementation on IE10 which in turn uses the above method from DOMImplTrident for its 'isOrHasChild' implementation. I am wondering if line 47 if (parent.nodeType == 9) { isn't actually returning 9 for the document node and thereby dropping into the 'else' statement for a document node and blowing up when it tries to access the 'contains' method. Perhaps IE10 doesn't implement those

Categories : Internet Explorer

Nanoscroll doesn't support multiple contents
You have only one "nano" class but two content classes. For every scrolling on your page, you need two of the both classes. So you may need something like this: <div id="tabs_container" class="nano"> <div id="tabs-1" class="overthrow content"> short text </div> </div> <div id="tabs_container_2" class="nano"> <div id="tabs-2" class="overthrow content"> very long text </div> </div> Or somethink like this: <div id="tabs_container" class="nano"> <div class="content"> <div id="tabs-1" class="overthrow"> short text </div> <div id="tabs-2" class="overthrow"> very long text </div> </div> </div>

Categories : Javascript

play framework anorm for different database
Short answer: NO. Long answer: Anorm is just a library for dispatching your SQL queries to the database through JDBC, retrieving the results and delivering them to you. It does not understand the differences between different databases because it relies on JDBC for connection handling, and on you for writing queries. You either have to handle different DB engines yourself or have an ORM handle that for you. PS: Unless you really need to have a DB agnostic application (and fully understand its implications), I'd suggest you simply target 2-3 popular engines and avoid the future complications.

Categories : Scala

Play Scala Anorm One to Many relationship
A side note about something I have found useful: if youre not sure you will always want to fetch the addresses for a user you can avoid adding that relation as a field and instead use tuples or other datastructures for representing. This would allow you to have a method like this: def allUsersWithAddresses(): Map[User, Seq[Address])] = ... But still have methods that returns only users without having the joined data. To read a join (or subselect) you will have to parse the combined output with a parser, something like this: .as(User ~ Address *).groupBy(_._1) If you really want to put the addresses inside of user you'd have to make the adress list empty from the user parser and then map each distinct user into one with the addresses: .as(User ~ Address *).groupBy(_._1).map { cas

Categories : Mysql

RESTORE DATABASE doesn't work, and doesn't report any error
I think restore sometimes doesn't happen because the database being replaced is in use at that time. Try adding this before RESTORE DATABASE command: ALTER DATABASE [TestMLS] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

Categories : Sql Server

Dynamic javascript event calendar with multi-day event support
First off, I would consider refactoring the renderCalendar function - it's huge! It cannot be easy to imagine, let alone implement, multi day events with that code. I have created a fiddle based on some old, unfinished code (with which the goal was to create a google-like calendar) that can perhaps serve as a suggestion on how to do it. It's very far from what you want, but maybe you can draw some ideas from it. It is written without any third party libraries, but it requires a newish browser. The map, some, etc functions can be easily polyfilled however. The Calendar, Day and Event prototypes serves as a way to avoid huge methods. I could e.g. remove the logic in the rendering methods to completely follow an MVC pattern, which eases development. To dynamically add events, push an Even

Categories : Javascript

Why shellcodes with jmp instruction work, and why doesn't the labels work inside a C wrapper?
The address of mesg can vary depending on how your program is laid out in memory. The following will hard-code a specific address and will not work reliably (or at all): mov ecx, mesg For reference, the first approach hard-codes the following address: mov ecx, 0x804807d The second approach does work because it figures out the address of mesg at runtime, using the return address of a call instruction. Put another way, the first version only works if loaded at a specific address whereas the second is position-independent. It is worth noting that the jmp and the call instructions that appear in the second version use relative addressing, meaning that the opcodes specify the distance to the target rather than the address of the target. This makes these instructions work regard

Categories : Assembly



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