w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Do any standards and practices exist for applying acceptance test driven development to non-development tasks?
Take a look at this post in StackExchange: Agile methodologies such as Scrum in non-software development projects Also there is a nice article called "Scrum is not just for software" written by the Agile Alliance (note that this is a PDF download)

Categories : Misc

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

Proper User Role Development
You can have the admin and moderator modules under separate namespace while making the "user" namespace your default. Just reuse your common code in the appropriate places. This'll keep your code separated, and if you feel like having different views later it should be easier to implement.

Categories : Ruby On Rails

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++

What is the role of phonegap build in phonegap app development
Great question. I think the heart of this question lies at the differences between PhoneGap and Cordova. Cordova is sometimes thought of as the Open Source version of PhoneGap, but in reality, Cordova is the Open Source core of PhoneGap. What does this have to do with PhoneGap Build? I'm getting there. When Adobe wanted to Open Source PhoneGap, they wanted to keep the branding for a few value added features that they could monetize. The Apache foundation had them rebrand the open source version, which is now known as Cordova, and Adobe retained the rights to use PhoneGap for their value added features, one of which is PhoneGap build. The PhoneGap Build FAQ might be useful info. But, instead of developing the app for IOS, if I had developed the app for android, I assume that phonegap

Categories : Android

Multicasting big packet contain all info to multiple clients vs individual packets to targeted clients
One of the major advantages of multicast is scalability so in the future if you tend to have more devices multicast will help. Better to look at multicast vs unicast performance for guidance M. Ebrahimi, M. Daneshtalab, P. Liljeberg, and H. Tenhunen. Performance evaluation of unicast and multicast communication in three-dimensional mesh architectures. In Computer Architecture and Digital Systems (CADS), 2010 15th CSI International Symposium on, pages 161-162, sept. 2010.

Categories : C++

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

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

Dynamic Role from database to show content to user based on their role
Maybe you want to store the different ROLES in a Properties file and get them in the code, like: @PreAuthorize("hasRole(" + PropertyManager.getProperty("role.admin") + "')" + '"') Or when you configure the GRANT permissions to the different users you are possibility to select different columns for each role. So in the Controller of the app redirect to the specific method

Categories : Java

How to deploy a Node.js web role along with a .NET web role in azure cloud service project?
The development experience probably will be smoother if the Node.js component of the application is deployed as a separate cloud service instance. But it is possible to automate the deployment using startup taks as described in Run Startup Tasks in Windows Azure. You can create a command batch file to download anything you need and install it on the instance. You can run it with administrative privilege. You can listen to a port and have it set up as a cloud service endpoint. You can even deploy the files as part of your cloud service project and just configure and run them through the startup task. Use RDS to debug this script via logging and system events.

Categories : Dotnet

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

Connect Web Role to Web Site Role in the same windows azure solution
https://connect.microsoft.com/VisualStudio/feedback/details/790187/vs2012-add-service-reference-discover-services-in-solution-feature-creates-empty-proxy The types in the WCFRole and WebsiteRole are colliding. Right click and the Service Reference -> Configure service reference -> Uncheck the "Reuse reference Types" working like a charm now :)

Categories : Wcf

Whats the difference between role and name in symfony2 role class?
The security.yml role_hierarchy is to do with role's inheritance. It allows you to create many roles and then state that some roles inherit other roles. http://symfony.com/doc/current/book/security.html#hierarchical-roles ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] The above means that if as a user I have the role "ROLE_SUPER_ADMIN" (which comes from the role field in your group entity) then I also inherit the roles "ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH". so: ROLE_TO_INHERIT: [ROLES_TO_INHERIT_FROM] So your name field has no meaning in security.yml only your role field. Role hierarchy is separate to where you store your roles. It is an extra level of configuration so that, for example, you don't need to add 3 roles to every super admin user but rather

Categories : PHP

Web Role vs Worker Role in Cloud Services / Node.js
The difference is that Node Web Role will runs through IIS. But Node Web Worker is VM and runs through node.exe it self as clustered worker. Main difference here is that your virtual hosts and web platform setup will depend on the option you choose. As you aware setting up IIS is very different from node.exe it self. So with Web Role it will proxy all traffic through IIS rather than directly through node master process. Cons/Pros: Main advantage of Web Worker as it does not relies on any stack and you have full control over what runs there and how it affects your app. As well if you already have something ready, you can reuse it without big problems. In mean time you will need to manage your stack your self, by implementing master node process and then forking workers your self. While u

Categories : Node Js

Role of data-role attribute in html markup
In summary: "The value of the role data attribute is the name of the widget in lower case e.g. "autocomplete", "dropdownlist" etc." You can find info here: http://docs.kendoui.com/getting-started/data-attribute-initialization#example---initialize-a-kendo-ui-widget-using-a-data-attributes

Categories : Javascript

Deploying WCF Service on Azure : Web Role or Worker Role?
A web role assumes that the application will be hosted in IIS. If your service does not require any of the benefits provided by IIS or its HTTP stack, then hosting it in a worker role may do you perfectly fine and also provide you a lower resource utilization for that service (since there's no "overhead" for the IIS server).

Categories : Wcf

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

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

Posting from web role to another web role Windows Azure
It is better to make the API call from server side such as MVC controller in your web app. You can include security key and other things that you don't want to expose to others. When you make API call directly from javascript for another subdomain or url, you are creating cross-domain ajax request. In your javascript, you will make an ajax call to your controller action in your web app. Web app will make the call to whatever service it is talking to. You can also test your API from fiddler with POSt/GEt/PUt/DELETE requests. If you want to directly call from javascript and host web roles under different subdomains, you need to make CORS request: http://www.html5rocks.com/en/tutorials/cors/. You can also look at this related question: Running WebApi alongside MVC project in Azure

Categories : Azure

How to add an user to sysadmin role using ALTER ROLE?
alter role is for database roles, but sysadmin is server role. Try alter server role instead: ALTER SERVER ROLE server_role_name ADD MEMBER p_sys

Categories : Sql Server

What is the role for a controller and what is the role for $scope in AngularJS?
The $scope is an object that both the view and the controllers know... It's not actually the controller itself, but through it you can pass in references to data and methods and use them inside of the view. The controller in angular is more like a presentation model, which holds up an object which is a "mutual friend" of both the view and the controller... that's how I like to think of it at least :)

Categories : Javascript

Azure Web Role can't see VM's internal IP (but VM can see web role)
For completeness, moving my comment to an answer: While the virtual network is allowing traffic in both directions, you'll need to enable ICMP via the firewall, which will then let your pings work properly.

Categories : Azure

How to deny a user in a role unless they are in another role in .NET c#
Isn't it enough to allow Admin specifically before your deny rule? The authorization rules are checked from top to bottom until a match is found. <authorization> <allow roles="Admin"/> <deny users="?" roles="ROLE1"/> </authorization>

Categories : C#

Connecting an Azure worker role to a dedicated cache worker role
Hello maybe you should try to set the connection between them using Inter Role Communication, you can find an answer for how to make the inter role communication in the following stackoverflow website: How to do inter-role communication with Azure? you can also find more details in the following link: http://blogs.msdn.com/b/avkashchauhan/archive/2011/10/30/communication-between-windows-azure-roles.aspx I hope this helps you solve your problem please let me know if you need anything else.

Categories : Caching

HTML5 standards of nesting div in li or dl
It is perfectly allowed to nest <div> elements in <li> and <dd> elements. <li>/<dd> elements may contain flow content, which <div> elements are. Specification: http://www.w3.org/TR/html5/grouping-content.html#the-li-element

Categories : HTML

Which SQL DBMSs Follow Which SQL Standards?
This site has been very handy to me over the years... http://troels.arvin.dk/db/rdbms/ And of course, wikipedia... http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems

Categories : SQL

Qt default "standards" for setupUi
Not all Qt applications use that function, that is part of the code that is generated by the tools (starting from the Qt Designer xml), read this documentation page for more details about how you can use the tools generated C++ code into your code. So basically for the widgets and layouts that are created using the Designer the setupUi is used to create/setup and layout widgets (that code is generated so you don't need to complicate your life and modify it), but in case you code the widgets and layouts yourself (just code, not using the Designer) you can name functions whatever you like, you can just code all of that into class constructor or separate the code into functions and call only some of those from the constructor or you can even create and layout widgets almost anywhere you like

Categories : Qt

HTML Standards on
usage
http://www.w3.org/TR/html4/struct/global.html#h-7.5.1 says: <!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body --> %block resolves as: <!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> and then: <!ENTITY % heading "H1|H2|H3|H4|H5|H6"> <!ENTITY % list "UL | OL"> <!ENTITY % preformatted "PRE"> There is no sign of BR there, so in HTML 4 you also need to place your line breaks inside paragraphs or some other suitable element. HTML 4.01 Transitional is different … but why worry about old standards in the first place? The point of having new standards is to improve upon the old ones and fix the bits that don't make sense.

Categories : HTML

Is there any coding standards for x86 assembler?
So far I have found that there are some standards regarding style. Like Randall Hydes from here. But no common wide standards regarding solely security and robustness like MISRA-C. Although, there are some industry standards, which address assembly language in this regard. For instance, IEC 60880-2004 has eight rules about using assembler specifically and several more regarding modularity, addressing and interruption usage. I presume, other industry standards, such as DO 178-B or IEC 61508, might have some rules too.

Categories : Assembly

IE8 Standards mode for intranet sites
You can send an HTTP header (or the equiv Meta tag) to force IE8, IE9, etc. or Edge rendering: <!-- Latest standards --> <meta http-equiv="X-UA-Compatible" content="IE=Edge"/> or a specific IE version... <!-- Standards (as IE8 handled them) --> <meta http-equiv="X-UA-Compatible" content="IE=8"/>

Categories : Internet Explorer

array.map function not supported in IE8 standards?
IE8 doesn't support ES5 array methods. You can either use jQuery's $.map(), or underscore's _.map(). If you're not using any one of those libraries, you can use this polyfill on MDN.

Categories : Javascript

Joomla Strict Standards Error
Inside com_jsjobscontroller.php you probably have a method display(). You need to update it's declaration with: public function display($cachable = false, $urlparams = array())

Categories : Misc

CSS attribute selector in IE7 Standards mode
I honestly can't see a way to do what you want in pure CSS, other than fixing up your code to remove the mountains of bad practice that have led you down this path in the first place. As you presumably already know, IE7 does not support attribute selectors used in this way so you're scuppered on that front, and the only other viable solution is to add a class to the element and style that (but if you could do that, I imagine you'd already have done it). Beyond that, you're looking at Javascript solutions. You could try one of the polyfill scripts that add support for newer CSS features to old IE. Either IE9.js or Selectivizr. These two scripts are generally pretty good at adding support for CSS selectors to old IE, but what you're doing here is a real edge-case, and I would not be surpr

Categories : HTML

Coding Standards for Gremlin/Cypher
I don't think you're going to find one specific answer, as discussing coding standards can lead to very subjective (and debate-laden) answers. That said: I'll go with something more objective: First step would be to decide on Gremlin vs Cypher since they're not the same thing nor the same style. When making that decision (and maybe that decision is use both), you should really take a close look at Neo4j 2.0 development (currently at Milestone 4), as Cypher is maturing rapidly and there's a lot of work being put into it, both from expressiveness point of view and performance point of view. Assuming you go with Cypher, I'd suggest you look at the samples being published by Neo Technology, especially the Cypher learning module. I don't know of any published guidelines, but I'd think most of

Categories : Neo4j

Can I use ReSharper to enforce commenting standards?
One simple option to start with (which doesn't even need R#) is to turn on the generation of an XML documentation file, and then treat warnings as errors. That will ensure that every public member has documentation. It won't ensure that the comments are good, of course... but it will ensure they exist. EDIT: R# does have a setting for this - under Code Inspection, Inspection Severity, C#, Compiler Warnings, look for CS1591: Missing XML comment for publicly visible type or member (and related warnings near it). Change the severity of that to Error and it might help you - but it's hard to say as you're in an unusual environment.

Categories : C#

Strict Standards: Declaration of ' ' should be compatible with ' '
Quote from PHP Manual In PHP 5 a new error level E_STRICT is available. Prior to PHP 5.4.0 E_STRICT was not >included within E_ALL, so you would have to explicitly enable this kind of error level in >PHP < 5.4.0. Enabling E_STRICT during development has some benefits. STRICT messages >provide suggestions that can help ensure the best interoperability and forward >compatibility of your code. These messages may include things such as calling non-static >methods statically, defining properties in a compatible class definition while defined in >a used trait, and prior to PHP 5.3 some deprecated features would issue E_STRICT errors >such as assigning objects by reference upon instantiation. You are receiving this error because WC_Gateway_BACS::process_payment() declaration is different

Categories : PHP

Strict Standards: Only variables should be passed by reference in..
BTW your codes works for me. And i dont know about it works but try this one function AFM_fileExt($filename) { $arr = explode('.', $filename); return strtolower(end($arr)); }

Categories : PHP

Different types of software requirements specification standards
You could definitely check RUP, they have plenty of templates and extensive specifications about this. Also, check templates like volere which are also extensively used. You could also include agile methodologies like XP or Scrum, but they don't use much documentation, sometimes no documentation at all. I don't know for sure if this fits here, but check out CMMI standard. It's more oriented to "how well" you are doing things, instead of "how" you are doing them.

Categories : Misc

Strict Standards Error After Update Wordpress 3.6
there is a patch available which solves most of the "Strict Standards" errors: http://bbpress.trac.wordpress.org/ticket/2371 But this will not solve the "Declaration of BBP_Walker_Dropdown::start_el()" error. You will have to apply the changeset # 5048, too. Edit: the easiest way is to just download the latest trunk which solves all problems at once: http://bbpress.trac.wordpress.org/changeset/5081/trunk?old_path=%2F&format=zip

Categories : PHP

Variable declaration on "start value" of FOR loop - What C standards allow it?
This is allowed since c99. So c99 and c11 support it. In c89, the first clause of a for statement can only be an expression. In c99 and c11 it can be an expression or a declaration. Only one single declaration is allowed (though this can declare several variables).

Categories : C



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