w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

json data for Ext4 store which requires a root element using SPRING MVC
Wrap the list in an object: @ResponseBody Users where class Users { public List<User> items; } And yes, brackets [] are used for JSON arrays.

Categories : Json

Django Tastypie with Apache LXML and DefusedXML: Error: "Usage of the xml aspects requires lxml and defusedxml"
OK, so I found the answer to my not so well worded question. When I ran easy_install, it never told me that lmxl had actually failed to install since I was missing a compiler. I have no idea why it worked from the Django development server and not through Apache, but I found and installed a binary distribution of lxml and it all started working the way it should.

Categories : Python

non-public API usage Warning...preventing validation on upload to App store?
Apple recently disallowed developers from accessing the device's UDID (Unique Device Identifier), but some third party libraries haven't updated yet. In particular, some people have been having problems with Google Analytics. Another post on here recently gave a pretty good answer: App rejected, but I don't use UDID

Categories : Iphone

Sencha Touch 2, CPU usage increasing on each store load from remote proxy
I don't think the records are being destroyed by clearing the store's underlying Collection. I would suggest using the store's removeAll method which will do a destroy on each record and hopefully free up some of the resources used by each. If your store is dealing with large datasets then this might add up and cause a slowdown.

Categories : Javascript

What is the proper way to generate, store, and configure an SSH public/private key pair for git repository usage on Assembla?
Since you are just entering gitrep, it's just saving it in your current directory (which is apparently your home directory, judging from your example above). Check and see if ~/gitrep and ~/gitrep.pub exist. You'll need to copy the contents of the gitrep.pub file to the destination when it asks you for your public key.

Categories : GIT

What slows down Java if CPU usage low, hdd usage low, memory usage low?
You can test what is the bottle neck by taking different parts out of the equation. To take out the CPU, just read the files and don't do anything else. To take out the disk, keep reading the same file again and again, assuming it fits in your file cache. Compare this to the time for everything.

Categories : Java

Why does this usage of until in Ruby not work, while another usage does?
In Ruby, the until block doesn't use do, so you should do something like this: def bubble_sort(arr) until arr == arr.sort (arr.count - 1).times do |i| (arr[i], arr[i + 1] = arr[i + 1], arr[i]) if (arr[i] > arr[i + 1]) end end arr end Edit: Expanded the code so it includes the algorithm from the original question. This code works for me on ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0].

Categories : Ruby

To find factorial of 500 and store it in a variable...and perform calculations...How to store such a huge number?
There is no built-in language support for such large numbers. You have two options: if you can, use existing library, like GMP implement you own solution If you decide to take the second path, you might want to consider storing digits (not necesserily decimal) in an array, and perform arithmetic operations using well known school algorithms. Keep in mind it will be (probably considerably) less efficient than heavily optimized library code.

Categories : C

Unable To Lock Store This Is Usually A Result Of Some Other Neo4j Kernel Running Using The Same Store
Spring is trying to initialize the GraphDatabaseService during startup. C:UsersAnthonyDocuments omcat7apache-tomcat-7.0.40in argetconfig-test eostore is the default location configured. It makes sense to have the neo4j db in a directory outside of the tomcat folder structure. I suggest you find the spring config file where the GDB is being initialized and changes it to something like below <neo4j:config storeDirectory="C:home eo4j-db"/>

Categories : Java

App Store Optimization - Special Characters on Keywords of Apple Store
Apple App Store isn't accent sensitive, which means: no, you don't need to put both of the keywords. I made a search using both of the keywords in mobileaction dashboard and you can see everything is the same for the keywords except search score, for your reference here is screenshot:

Categories : IOS

Opencart use Category as parent for store ( multi store system )
Alright, after a lot of try's i searched the fora's of OpenCart better and came upon this thread: OpenCart Fora Thread The anser there is as follows: There's a "top" flag you set to make it show up as a top level menu So what i did is this: I've edited the new main category ( with uid 355 ) and flagged it as top, that didn't helped, but i left it on. Then i've edited all the direct childs of the main category and flagged them as top and foila, there they are. the problem was solved. So with my edit to the main core, and the flagging of the categorie's, the problem is now solved

Categories : PHP

How to search/fetch Google play store or iTunes store via API
Google Custom Search! All you have to do is enter the site(s) you're trying to search.[][1] [1]: http://i.stack.imgur.com/YnmLr.png

Categories : Ruby On Rails

how to set customer of one store should not be able to login to another store in magento in single website
Unfortunately Magento only allows you to set "customer sharing" across the global and website scopes. The (maybe not so simple) solution would be to move your other store to a separate website instead of a separate store. Found in System > Configuration > Customers > Customer Configuration:

Categories : Magento

Extjs 4 store - query entire store not just cached records
It's been a while since I've used ExtJS, but I believe that you can use store.getRange() to get the behavior that you want (with no arguments, it should return the full contents of the store). According to the documentation, filtering is taken into account for this, so you should be able to apply whatever filters you need to get the desired set of records.

Categories : Javascript

Is there any way to configure disk store for terracotta BigMemory to remove all data store on service/cache manager start up?
As I understand your question, you want to remove the Index data from BigMemory Go on restart. Whether you can do this or not depends on your persistence strategy. If it is local restartable, BigMemory Go will try to either reuse the index data if the application was shutdown cleanly, or it will recover the indexes if it was shutdown abruptly. So, for a persistence strategy of local restartable, there is no way to avoid rebuilding the data. If your persistence strategy is "localTempswap", then you will not rebuild any data on restart and will lose the application's state. Please see here for more information: http://ehcache.org/documentation/configuration/fast-restart

Categories : Java

Rebol cd requires no %?
You can have a look at the source of the cd function by writing source cd There you can find that for convenience, other datatypes are converted to file. "Why is a string name of a dir treated as a word when no such word has been set?" Rebol recognizes words by syntax allowing symbolic programming. It does not matter at all whether a word has been set or not to be recognized as a word. "[If] I set a word to a dir name but in upper-case, the get-word moves me to that dir and shows it in that incorrect upper-case" Some operating systems (such as Windows) try to be case-insensitive, assuming that this is more convenient for humans. Rebol string handling is also case-insensitive by default for the same reason. "Did anyone ever suggest that chdir could have all convenience

Categories : String

In Ember.js, what's the difference between store save and store commit?
There is no difference. save is an alias for commit that was introduced with this PR (Make #commit an alias for #save) Hope it helps

Categories : Ember Js

How to get Ember Data's "store" from anywhere in the application so that I can do store.find()?
The TRANSITION doc says that you can do this to inject the store into components : App.inject('component', 'store', 'store:main'); You might be able to change 'component' to 'view' or to 'model', but I'm not sure about that.

Categories : Ember Js

ExtJS Store dynamically filter on already filtered store
You won't be able to accomplish what you want using the store's filters because these methods all end up filtering on the whole dataset. So you'll need to apply your filter yourself! In order to do that, we need to replicate the code from Ext.data.Store#filter, except for the part that restores the whole dataset before filtering. That gives us: // -- Ensure that our current filter is not stalled ---------------- // Clear our filtering if the query string has changed in a way // that invalidate the current filtering if ( // previous filter is stalled ) { myStore.data = myStore.snapshot; delete myStore.snapshot; } // -- Create your new or updated filter ---------------------------- var filter = new Ext.util.Filter({ filterFn: function(record) { // your filtering

Categories : Javascript

How to create method for withdrawal from store and deliverance to store
The deliveranceToStore method isn't correct. Why are you calling the method recursively? The method can simply be: public int deliveranceToStore(int store) { unitsInStore = unitsInStore + store; return unitsInStore; } If there is no need to return the number of units in store with this call, you should have the return type as void (i.e., if updating the count is sufficient): public void deliveranceToStore(int store) { unitsInStore = unitsInStore + store; } For withdrawal, you need a similar strategy where unitsInStore is updated: public void withdrawal(int units) { if(unitsInStore - units >= 0) { unitsInStore = unitsInStore - units; } else { System.out.println("Unable to withdraw. Insufficient units in store."); } } You can also make the

Categories : Java

Why std::vector requires operator =
This might surprise you: v.push_back(A(20)); v.push_back(A(10)); std::sort(begin(v), end(v)); There are aspects of vector itself that require assignability, though I don't know, offhand, which (and I can't tell by compiling your code, since my compiler doesn't complain when I remove operator=()). According to Wikipedia (which references the relevant portion of the '03 standard), elements must be CopyConstructible and Assignable. EDIT: Coming back to this a day later, it seems forehead-slappingly obvious when std::vector requires Assignable — any time it has to move elements around. Add a call to v.insert() or v.erase(), for example, and the compile will fail.

Categories : C++

This operation requires a view tag
From this thread: First figure out the UUID of the view by running: % cleartool describe -long vob:vobtag versioned object base "vobtag" created 31-Dec-00.16:23:00 by ClearCase VOB admin account (vobadm.staff) VOB family feature level: 2 VOB storage hostathname "someplace" VOB storage global pathname "someplace" database schema version: 53 VOB ownership: owner someone group some group Additional groups: ... VOB holds objects from the following views: ? uuid c00c3821.f94411d4.ba94.00:01:80:a9:33:fe ... You then can remove all the references to the non-existing view by running: % cleartool rmview -force -avobs -uuid c00c3821.f94411d4.ba94.00:01:80:a9:33:fe Removing references ...

Categories : Jenkins

My popup requires re-login
You are only checking if !IsPostBack, you also need to check if the Context.User.IsAuthenticated Which means, Forms Authentification (or other), IIdentity, IPrincipal, and tralala Check this out ASP.NET MVC - Set custom IIdentity or IPrincipal

Categories : C#

Jquery get() requires 2 passes?
$.get is asynchronous. That means, its callback function will execute sometime in the future, when the request successfully fetches a response. The code below the $.get call executes synchronously, it does not wait for asynchronous operations to finish. Code that depends on the data asynchronously retrieved through $.get must be executed/called from inside the $.get callback: $.get(url, function(data) { $("#household_store").data(data); //got response, now you can work with it var household = $("#household_store"); var head = household.data('head'); alert(houseId + ": " + head); }); If you prefer, it is also possible to attach callbacks by using the $.Deferred-compatible jqXHR methods: $.get(url).don

Categories : Javascript

MinGW .exe requires a few gcc dll's regardless of the code?
Your commands are wrong ! Go to the directory where your main.cpp is, and try the following. g++.exe -Wall -c -g main.cpp -o objDebugmain.o g++.exe -static -static-libgcc -static-libstdc++ -o "binDebugHello World.exe" objDebugmain.o then you do not need dll's longer to copy.(for your hello world program) other Notes: the mingw installation instructions recommend to set c:minGW;c:MinGWin; to path environment variable. Normally with (try it with following 3 at once) -static -static-libgcc -static-libstdc++ linker options. Should work. But not for ibwinpthread-1.dll try also a clean before compile These's no '-static-something' command. Only standard libraries libgcc and libstdc++ can be set to static linking. For other libraries, you first switch to static linking with "-

Categories : C++

How to Reverse a Migration that Requires a Gem
yeah, that is true. that's the case why, at some point, you just get rid of old migrations and use the schema.rb http://adventuresincoding.com/2010/02/how-to-clean-up-your-activerecord-migrations

Categories : Ruby On Rails

Circularity: To use pip I should get virtualenv (which requires pip)
This is one of four different methods in the instructions to install virtualenv. What's stopping you from using one of the other ones? In fact, the site specifically says in a few different places that you should use pip if you already have pip 1.3 or later, use the source install if you don't have pip or have 1.2 or earlier. So, just follow the other instructions: $ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz $ tar xvfz virtualenv-X.X.tar.gz $ cd virtualenv-X.X $ [sudo] python setup.py install The [sudo] is a convention meaning "Type whatever command you need to run the rest of this as root, which is sudo on most setups on most Unix systems." On Windows, there is no such thing as sudo; runas or start with appropriate flags is the closest subs

Categories : Python

Laravel DatabaseEloquentCollection requires parenthesis on get()
Because you're already doing what a call without parenthesis does. $user->tweak === $this->belongsToMany('User', 'friends', 'sender_id', 'receiver_id')->get(); $user->tweak() === $this->belongsToMany('User', 'friends', 'sender_id', 'receiver_id'); and if you say that $user->tweakTwo() === self::results()->get() === $this->belongsToMany('User', 'friends', 'sender_id', 'receiver_id')->get(); then $user->tweakTwo() === $user->tweak and $user->tweakTwo would be $this->belongsToMany('User', 'friends', 'sender_id', 'receiver_id')->get()->get();

Categories : Laravel

Math.ceil requires float
The problem isn't calling Math.ceil - it's using the result of it. Math.ceil returns a double, which can't be implicitly converted to float. You could cast it though: perU30F = (float) Math.ceil((under30FY / totalWatchers) * 100); Or you could just use double everywhere instead of float :) (Math.round has an overload which accepts and returns float; Math.ceil doesn't.)

Categories : Java

A function is outside main,it requires use of a variable how do use it?
Have your function in this way., void Ydisplay(int D1[]) { cin >> a; //Remove getting input from main() for(int i=0;i<a;i++) { cout<<' '<<D1[i]; }

Categories : C++

How do I write this JPA query that requires a JOIN?
I might have missed an HQL syntax element SELECT user FROM CodeUser codeUser JOIN FETCH codeUser.user user JOIN FETCH codeUser.code code WHERE user.firstName = 'Dave' AND code.value = 'abode' assuming Code has a field value holding the value "abode". You might not need the FETCH. You can always replace the literal values with a placeholder like ? or a named placeholder like :name and set their values from the Query object.

Categories : Spring

ImportError: matplotlib requires dateutil
Here's a list of the programs you can install on windows: http://www.lfd.uci.edu/~gohlke/pythonlibs/ And you'll need the following dependencies: Requires numpy, dateutil, pytz, pyparsing, six

Categories : Python

Why checkstyle's checks requires compilation?
Checkstyle (or at least some of its rules) needs the compiled classes in addition to the sources. You can prevent passing of the compiled classes (and thus compilation) with tasks.withType(Checkstyle) { classpath = files() }, but it may have negative consequences on the analysis.

Categories : Gradle

c# class that requires action as variable
Maybe Action is what you are looking for: public xx(Action a) { a(); } xx(()=> Process.Start("notepad.exe", @"C:\OutputLog.txt"));

Categories : C#

Apache restart requires many times
That's a tricky one. This: child pid 13633 exit signal Bus error (7) means it's dying somewhere - most likely (although not guaranteed) in the PHP code. I would suggest: 1) Make sure that that is actually the error that is occurring when the Apache daemon dies. I.e. do whatever you do that stops Apache and look in the log and see that that's the correct error. 2) If it is, enable XDebug on your Apache server and find out what line it's dying on. (XDebug http://xdebug.org/ can take a little work to set up but it's a good tool to determine where in PHP your stuff dies ). If not, post what the last error(s) is/are. nb. Magento is not noted for being a simple and easy to debug code base, I stopped using it for that reason (not because it was dying, because it is fat and complex). Ju

Categories : Apache

Ganymed - how to execute ssh/scp that requires a password
I've never used Ganymed but just by looking at the code I suspect that you send password too early. You probably need to handle what server responds to you. In other words server receives not what you think it receives.

Categories : Java

MVC Requires Rebuild After Modifying View
My best guess is that the hosted code is at a different location from where it should be for a default VS solution. The solution building is copying the code from you solutionproject folder into the different location. Try to check the location of the actual deployment. Depending upon whether you are using IIS, IIS Express there are different ways to know that.

Categories : Asp Net Mvc

Ant taskdef - requires both classpath and -lib parameter?
The following should work the same. <path id="ant.tasks"> <fileset dir="lib" includes="myspecialant.jar"/> </path> <taskdef name="TaskName" classname="mypackage.MyClass" classpathref="ant.tasks"/> I prefer to manage my classpaths at the top of my build separate to the logic that uses them. Make troubleshooting simpler.

Categories : Java

Enum requires no recompilation of its clients - How?
enums are not compile-time constants. So their value is not copied by the compile to every class that uses them. That's different from int values, which can be compile time constants. So if you have a class like public class Constants { public static final int FOO = 1; } and have another class public class Client { public static void main(String[] args) { System.out.println(Constants.FOO); } } the class will print 1. Now change the declaration of FOO to public static final int FOO = 27; And recompile Constants without recompiling Client. Execute the Client. The printed value will still be 1, because it has been copied by the compiler to the Client class when the Client class was compiled. There is no way to have this effect using enums. If you store a value a

Categories : Java



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