w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
API development, Bootstrap and jQuery. Good idea to inject them all in user's code?
If you have to have jquery and bootstrap, the only acceptable solution for an embeddable widget would be an iframe. You could write a loader script which places the iframe with your main content onto the page. I've written a quite extensive article about how to build embeddable widgets and their best practices on my blog here: http://codeutopia.net/blog/2012/05/26/best-practices-for-building-embeddable-widgets/ (based on a Stack Overflow answer I gave some time ago, but couldn't find the link to it)

Categories : Javascript

Is this a good web application architecture?
I think you have more technology than needed in your architecture right now. Personally I would create a REST api on top of the DB (using either node or Rails - both are super easy to do this with and both can use pretty well any db) Then you can write any number of "apps" for the front end process, whether they are web apps, ios apps, android apps, etc... They will all get their data from your REST api on the backend. You might even consider writing the front end as a single page app using Angular, Knockout or Backbone, something like that. If you do that with node, your entire stack will essentially be written in javascript. It can get confusing for a newb, but it's super powerful.

Categories : Node Js

Guidelines for the development of web Gis Application
Please see some ideas below set out to answer your questions. I think the way to integrate the most amount of data sources is probably with the the OpenGeo Suit. This is an open source software stack that includes Geoserver as a WMS source and GXP libraries and examples as the front end client. It can be found here http://opengeo.org/ There are a number of Open source projects out there that will help. I have already mentioned OpenGeo. Also check out Openlayers http://openlayers.org/ GeoExt (Can't post link as I don't have enough reputation points yet) Leaflet (Can't post link as I don't have enough reputation points yet) Geoserver is a good one for this but you could also checkout Mapserver (Can't post link as I don't have enough reputation points yet) In summary I would recommend th

Categories : Asp Net

Pluggability in a functional paradigm
The answer to this question would be different for different functional languages. F# is not purely functional - it takes the best from functional, imperative and also object-oriented worlds. For things like logging and authentication, the most pragmatic approach would be to use interfaces (in F#, it is perfectly fine to use interfaces, but people do not generally use inheritance and prefer composition instead). A simple interface makes sense when you have multiple different functions that you can invoke: type IAuthentication = abstract Authenticate : string * string -> bool abstract ResetPassword : string * string -> void You can use object expressions, which is a really nice way to implement interfaces in F#. If you have just a single function (like logging a message),

Categories : F#

Confusion about API-based application development
With SOA, I wouldn't really say this is necessarily Go or Ruby/Rails specific. It would be the same if you were just using Ruby or Go by themselves. What it comes down to is how your application is architected. You could do SOA with just Ruby or Go. There are a lot of benefits to a Service Oriented Architecture. Clear separation of responsibility Different teams can work on different components Simplifed application archetecture code-wise Can lower development and management costs Configuration flexibility Targeted performance monitoring Simplified/gradual software updates Inherent service documentation (godoc generates from source) Targeted unit testing (does the service work?) Better scalability You could probably add more benefits to that list. The biggest obstacle to overcome is

Categories : Ruby On Rails

Contacts android application development
try to use checking string like this if ((!name.equals("")) && name !=null ) { ops.add(ContentProviderOperation.newInsert( ContactsContract.Data.CONTENT_URI) .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0) .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE) .withValue( ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, name).build()); } else { Toast.makeText(this, "Enter Valid Name",Toast.LENGTH_LONG).show(); return; } if (!(number

Categories : Java

Mobile application development using HTML5
HTML is basically for webpages and hence HTML5. Yes you can create a mobile app with HTML5 only, but it will be a like a website and when you want to display it, you will still need to use webview or a browser, so still you will need some other tools. But there are some frameworks which are using HTML 5, try PhoneGap. Hope this will help. Thanks

Categories : HTML

Modern AJAX Webapp Paradigm
You have a couple of options. If you have requirements that keep you from migrating away from ASP Classic, then you may want to look at integrating one of the (still) existing frameworks/libraries that make ASP/VBScript a more manageable development environment. Here are three that I have links to at the moment, I know there are 2 or 3 others (that I'm aware of) but I can't recall where to find them... ASP Xtreme Evolution ClASPpdev ASP-Ajaxed (full disclosure, I recently took over this project) If you can move to another language/framework, you may still want to use one of the libraries above to help build some of the glue that ties the old code to the new (ASP-Ajaxed has a class for emitting JSON). I'd be wary of rapidly changing/upgrading your code base only because you never kn

Categories : Java

Application resource path is different from development and IIS7
For an alias, try setting the path of the app in IIS7. Try this: http://www.codeproject.com/Questions/460354/How-to-set-virtual-path-of-my-application-hosted-o You should be able to use ~/folder/resource.ext syntax in newer versions of mvc. The ~ uses a relative path based on the location of the app. Or, use Url.Content("~/folder/resource.ext") if that doesn't work, which should work in all versions.

Categories : Asp Net Mvc

Sharing Private keys in application development
You don't want to share your private keys with your developers...you should restrict access to the private key to a very small group of trusted people. To allow developers to work on code you can use Delay Signing/Test Key signing: http://blogs.msdn.com/b/shawnfa/archive/2004/03/17/91575.aspx On your secured CI/Build Server that generates your "releases"...you would allow it access to the production private key and then use that in the build process during a "Release" build (which doesn't use Delay Signing) to sign everything properly. What exactly are Delay signing and strong names in .net? http://blogs.msdn.com/b/shawnfa/archive/2005/10/24/484170.aspx http://blogs.msdn.com/b/shawnfa/archive/2006/06/23/644648.aspx

Categories : Java

When exactly session is created in java web application development?
A user session is/(should be) created after the successful login of the user into the system and it will be valid till the user logs out of the system or the session expires after the session timeout.

Categories : Java

SOLVED!! Best Practise for GUI development for vanilla C++ application
You can to a large extent write completely separate logic and GUI code in Qt. However you will be able to create a much more useful GUI if you allow the logic and GUI code to interact. Qt has it's own classes for a lot of things (QString, QVector<> etc.) but you're free to ignore these for the most part and use the standard library instead if you'd prefer. However, I do not think that it is worth trying to separate Qt from the logic code entirely because, as mentioned before, you will be able to build a much better GUI if they interact. For a simple example you could write a very simple Qt GUI with just a window and a button; press that button and some logic code is run. However with more interaction you could use signals and slots to update a progress bar on the GUI to let the user kn

Categories : C++

Xbox Application Development using C# and Visual Studio
Visual Studios seems to be what most developers would use for xbox. As for languages if your looking to develop apps for xbox and not games, you could use C# or WPF. Hope this was a bit helpful.

Categories : C#

would a css grid framework be a good fit for creating application like layouts?
if you have some experience with resposive design and media queries, i would code it myself to avoid the thousands of lines of unnecessary code that comes with frameworks/libraries. bootstrap is great, but it also requires a bit of effort to master, and it would be a bit overkill for this one layout (if i understand you correctly). if you just need this one layout, i would really recommend you do code it from scratch (personally i'd use something like jQuery and LESS). i hope i understood your question correctly, and sorry if this was not very hands-on. to sum it up: in my opinion you're probably better off coding it yourself, but bootstrap and other frameworks will provide valuable insight and inspiration for how to do it.

Categories : CSS

Is it good choice to structure a large Asp.net MVC application using Areas?
Areas shouldn't be confusing, and certainly aren't redundant. As you say, they allow you to partition your web app into smaller functional groupings. This is extremely helpful when the size of your applications grow and a single application umbrella becomes unwieldy. As an example, I have just completed a large application that stored promotional data for various retailers across North America. The US and Canada sales teams are isolated, but are executing their tasks in nearly the same business contexts. It made a lot of sense to partition the US and Canada parts of the web app into Areas, which organized things a lot better for us. Each area could still use the same components where they make sense (repositories, services, etc...), but the isolation Areas brought allowed us to build sep

Categories : Asp Net Mvc

Is it a good practice to have 2 winforms in the same application one for dashboard and one for output?
Sure you can. But for the common case of the "log output", I personally often use a SplitContainer control with 2 panels (one for the log, the other for everything else), in a single form.

Categories : C#

Access to Application Support Directory on the device during development
Take a look at http://developer.apple.com/library/mac/#recipes/xcode_help-devices_organizer/articles/copy_app_data_from_sandbox.html This should provide you with a package of all data within the App's sandbox

Categories : IOS

ImageButton control with Google TV android application development
Make sure your ImageButtons are marked as focusable. You'll also want to make sure you set the nextFocus* related attributes as well. The following is from my project, Serenity for Android which uses ImageButtons on the OSD when playing a video. <ImageButton android:id="@+id/osd_rewind_control" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" android:focusable="true" android:nextFocusRight="@+id/mediacontroller_play_pause" android:nextFocusUp="@+id/mediacontroller_seekbar" android:scaleType="fitXY" style="@android:style/MediaButton.Rew" android:src="@drawable/skipback_selector" tools:ignore="ContentDescription" /> Agai

Categories : Android

Is it a good idea to store LRUCache object in an Application singleton?
I think this is a perfectly fine idea. Here's a video from Google I/O 2012 with some relevant information: http://www.youtube.com/watch?v=gbQb1PVjfqM

Categories : Android

Is Java Memory Consumption a good Web Application Healthcheck Metric?
You need to establish baseline. As long as your app works fine under desired load (number of request/sec, num of online users, etc), any cpu/memory consumption will do, more or less. Once you have baseline, you can add features to your code and then check if features make consumption decrease or increase and act accordingly. Then, if needed, you will optimize places in code which worsened after features were added (or you discover that no local code change saves you, and you need more hw to support new features under given load, or you need to re-design some components of your app, but it's another story). So, it's not an absolute value that matter most (although having JVM heap consumption constantly at 95% is a bit worrying), but a change between code changes.

Categories : Java

Divide and conquer paradigm and recursion in C - Merge sort example
I am not sure why you are asking people to make you understand the algorithm. I can just assist you you but you have to go through it. In merge short you have to cut the array in two pieces. suppose you have 10 elements then high=0 and low=10-1=1. mid = (9+0)/2 = 4. So, you have divided the main array to 2 parts from 1th element to 5th and from 6th element to 10th (1..10). When ever you have more than one element in a piece you cut it into two again. At the end merge them i.e. add arrays again but in ascending order. Finally you get a single array sorted. Its very tough to explain every piece. I think this link from wiki can help. http://en.wikipedia.org/wiki/Merge_sort Now comes the function calling. main function is calling merge_sort it will pass low and hight (the full range of array

Categories : C

Is this the right paradigm for a preemptive, exclusive function in a multithreading environment?
Entire function body can be locked to eliminate the running boolean: object @lock = new object(); volatile bool cancel = false; void Function () { if (!Monitor.TryEnter(@lock)) return; try { for (var i = 0; i < 100; i++) { if (cancel) { cancel = false; return; } // code } } finally { Monitor.Exit(@lock); } } void Stop () { cancel = true; } + Notice the volatile keyword: http://msdn.microsoft.com/en-us/library/vstudio/x13ttww7(v=vs.100).aspx

Categories : C#

Returning errors back to development team from deployed iOS application
Depends on what kind of errors you're talking about... Exceptions are automatically reported back by Apple. But, they don't give all exceptions back and there is a lag. There are several 3rd party services which you can use where you add their framework and it will detect the exception and send it back to their server for you to analyse. For non-exception errors there is nothing standard. I would suggest adding analytics to your app and using part of the analytics to track these occurrences.

Categories : IOS

How do I statically configure Celery application differently in production and development?
The way that I do it is using an environment variable. As a simple example... # By convention, my configuration files are in a "configs/XXX.ini" file, with # XXX being the configuration name (e.g., "staging.ini") config_filename = os.path.join('configs', os.environ['CELERY_CONFIG'] + '.ini') configuration = read_config_file(config_filename) # Now you can create the Celery object using your configuration... celery = Celery('mymodule', broker=configuration['CELERY_BROKER_URL']) @celery.task def add_stuff(x, y): .... You end up running from the command line like so... export CELERY_CONFIG=staging celery -A mymodule worker This question has an example of doing something like this, but they say "how can I do this in a way that is not so ugly?" As far as I'm concerned, this is quite

Categories : Python

How to design/organize/architect the development of mobile web within a Rails application?
It seems to me that the one piece of essential information is "why?" and you need to consider your budget and timescales and deadlines for the job. Providing you use a liquid layout similar to the awesome layouts by Matthew James Taylor that will resize according to the available screen size The only reason I can see for needing mobile specific templates is in order to provide specific css styling to make you views look more like a mobile app. I don't see performance as being an issue. If you have performance overhead from an existing website and you are designing these performance issues out for mobile then why not also design these issues out for the non mobile. i.e. design a mobile site with a liquid layout and make it work for desktop/tablet viewing as well. It could be an good oppor

Categories : Ruby On Rails

Why assets (except application.css, applications.js) are not being served in Development mode using require_tree
Actually, it was the problem with the order in which the JavaScript files are being loaded using require_tree. directive. When we use require_tree. it assumes to load all the js files inside the app/assets/javascripts directory in alphabetical order. But in case of javaScript, we can load the files in a particular order so that one file should not conflict with the other regarding any functionalilty. So, it is better to avoid require_tree. directive unless we are using only small number of js files. You can explicitly declare each file in the application.js manifest file so the order can be controlled. The common files you are loading can be put in to a separate directory under app/assets/ and it can be loaded using require_directory ./separate_directory_name to load it (iff it has not

Categories : Ruby On Rails

Library/Framework for Single Page Application Development (as of 2013)
I finally made my own jQuery plugin. It manages the page-swapping and the ajax loading from files, firing custom events before and after each page is shown. Took no more than 150 lines comments included. I kept the parameter-passing stuff out, though.

Categories : Javascript

What is a good way to record time periods in Rails application, so that I can easily use them for calculations?
It would be best to store them all in a standardized format; like seconds, so that you can easily do calculations without having to first convert things. If you also stored some sort of units field (i.e. years, days, minutes, seconds), you could then easily convert the seconds back to their appropriate units for display - sort of like what you have above. stored_value_in_minutes = stored_value.seconds / 1.minutes

Categories : Ruby On Rails

Good location to add a 'save context' in stock Master/Detail application
There's no single right answer. It depends on how your app works and when, in your app, it makes sense to say "OK, let's make sure we don't lose this state". Where this is depends on the app-- it's not like there's one specific method that's always the right place to save state. Generally it's whenever the user has completed a specific action or task that you want to keep around. If your current approach makes sense in your app, then it is the right solution. If not, figure out where it does make sense and save changes there.

Categories : IOS

android application development- saving and retrieving the values of editText and textView
Its happening because you are saving all data in Arrays which get cleaned up when the app exits. There are several ways tht you could do this. You could either use SharedPreferences to save your data or write your values to a file. For e.g. you could use SharedPreferences as follows: public static final String MY_PREF = "MyPreference"; SharedPreferences.Editor editorPref; public static String keyName = "MyKey"; SharedPreferences myPref; You could then create the shared preference and add values to it.Hope this helps

Categories : Java

What is the exact way for view handling in multiple orientation in iPad application development?
And here is a guide from apple. If autolayout it's not suitable for you, then you need a separate landscape viewcontroller. https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html

Categories : IOS

Does SCOM make sense as an application monitoring tool (used by development group)?
Yeah, what you're asking is somewhat possible. I spent the best part of a day trying to figure this out and so I thought I'd post what I found for you here. it is possible to set up monitoring for any log on any machine. As long as you can see that log in windows with the event log viewer (there are actually many more, but if you can see it here. Assume it can me monitored. Put whatever you are monitoring into it's own group in SCOM and set up it's own management pack. You can even set up mail alerts with the criteria for a subscription matching 'raised by any instance in a specific group' if you want to be mailed about these alerts. Here is an example if you wanted to monitor just the 'application' log on a remote server: Start the Operations Console as a member of the Operations Ma

Categories : Windows

WebMethod error response as application/json on Development but text/html on Production
It turns out the issue is about "Friendly Error Message" - which is in html format. IIS is using this by default on Windows 2008 R2 machine. As a solution, I found this article: http://helpnotes.vpasp.com/kb/611-General-hosting-questions/1089-How-to-Turn-Off-Friendly-Error-in-IIS-7xx/ and performed #4 to #6.

Categories : Jquery

Good Dynamics: How can a third party create an IPA consumable by the Good Wrapping server?
The second flow is the correct one. Application wrapping is mostly intended for in-house developers. Just be aware that your particular scenario, where the customer provides you with their certificate, might not be Apple approved.

Categories : Misc

.NET integration with Honeywell D6X00 Platform SDK ( for Personal digital assistant - Dolphin 6500 Mobile Computer application development )
Although this is now several weeks old... If you get a windows mobile device from any company and need an SDK for special hardware in the dvice, you first have to look for downloads at the company's web site. For a Dolphin 6500, for example, you will find the possible downloads at https://www.honeywellaidc.com/en-US/resources/Pages/download.aspx?pid=DOLPHIN6500. To develop for a Windows Mobile (NOT Windows Phone!) you need a full VS2005 or 2008 version, the Express one's will not support SmartDevice development. After you have downloaded and installed at least one Windows Mobile SDK by the MS sites. You are able to start a SmartDevice project in your VS setup. You can write C/C++, C# or VB.net SmartDevice projects (you can also mix the progr. languages). The company's SDK is only an exte

Categories : Dotnet

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

Data-centric application: separate database tables for separate organizations a good idea?
I was wondering whether rather than have a single set of tables, it would be much safer to have a separate set of tables for each client, all running within the same database. If you want to do this, you have a separate set of tables for each client, running in different logical databases. It's easier for the DBAs to manage. You're basically admitting that you can't depend on your application code to keep the firms separate when sharing the same database tables. Since each firm will have around 20-40 tables, will the number of tables tend to explode in magnitude with number of users, thus slowing down the database altogether? You're either going to have 20 - 40 tables for each firm, or 20 - 40 large tables for all the firms. The amount of storage will be about the same either

Categories : Database

windows mobile application development Windows 7 Operating System
I dont understand the question. I had to do nothing special as I installed Visual Studio 2008 and then the Windows Mobile 6 SDK. I assume, you already connected the WM device to your Win7 station. So you should have WMDC already installed. Otherwise install Windows Mobile Device Center from the MS site. Secondly install VS2008 (not express version, it does not support WM development). Then download and install Windows Mobile 6 (professionell) SDK and install. That is all, nothing special. I did it without any hassle on my Win7/64 PC. Should be the same for Win7/32. If you need further assistance be more specific in your description.

Categories : Windows

How to Test ASP Application on Domain when Development Environment isn't on Domain?
We did few large deployments of AD with asp.net applications with automatic account provisioning and 50k+ users and the idea was always to abstract the user backstore and have at least two or three implementations: inmemory repository injected into upper layer services for unit testing them database implementation convenient for developers as it is persistent, doesn't vanish on restarts actual ad implementation tested separately in two different testing environments but not directly by developers (devs use the database repository) Having the logic which relies on abstraction and is conveniently tested with the inmemory repository and then having the ad repository tested separately allows us to just compose these two on the production site.

Categories : Asp Net

C++ spanish question mark
this character is simply not included in basic ascii. Try using wstring http://www.cplusplus.com/reference/string/wstring/

Categories : C++



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