w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
HTTP Status 500 - file:/survey.jsp(16,15) jsp:getProperty for bean with name 'survey'. Name was not previously introduced as per JSP.5.3
Name was not previously introduced This indicates that you haven't told your JSP about this bean as of yet. You are directly using the <jsp:getProperty> before letting the JSP know about the bean. You need to use the <jsp:useBean> tag to define the bean in the survey.jsp.The name attribute of the getProperty tag must match the id attribute of the useBean tag : <jsp:useBean id="survey" class="appScope.SurveyBean" scope="request"> But this won't work , unless you set the bean named survey in the request scope in the check.jsp file and post that request to the survey.jsp.

Categories : Java

Constructing queries for collecting survey data from my survey database design
So after a bit of research I found one way to do it. result = SurveyResponse.joins(:survey_answers => :survey_option).where(user_id: 96, survey_id: 64).select("SUM (survey_options.weight) as score, survey_responses.created_at").group("survey_responses.created_at, survey_responses.id") Then I could use the find_each function on ActiveRecord::Relation object. result.find_each do |r| puts " score: #{r.score} created_at: #{r.created_at}" end find_each is better than each, because it loads a batch of 1000 records at a time, so it doesn't hog up your memmory. Imagine loading millions of records. If anyone has a better solution for querying, please share and I will accept it.

Categories : SQL

Create a Symfony2 Survey Form
Use the form collection approach. See http://symfony.com/doc/current/cookbook/form/form_collections.html From what I see from your requirements you'll have three levels, basically will have a object (a survey) with a collection of objects (questions) each of them will have another collection of objects (answers)

Categories : Forms

I'm creating a survey using ASP.NET...but how to I create the database to store it?
you need to use database servers like sql or ms-sql or oracle or other database engines unless u are asking query to create the database, which i assume not, as there is no query or other related tags in your question

Categories : Asp Net

I did a Survey using ASP.NET in visual studio 2012. but how do I create the reports?
since you want to store the user's answers and make a report out of them, I suggest creating a table for the users first. Create a User table - that has UserId , Password and other user details like name,etc Create a Question table - that has all the questions and options. Create an Answer table - that stores the users answer with the UserId. So, use the User table for Login purpose. Once the user logged in , show the Questions and options from the Question table. When the user clicks the submit button at the end, store all the user's answers in the Answer table along with his UserId. While creating a report, you can easily retrieve the data from the Answer table for the required user (with particular UserId) or for all the users. And again there are so many options for making repor

Categories : Database

How to create a simple slide Up slide down login/signup division in JQUERY
You need to change your show()'s and hide()'s to be called when the sliding is done. Like this: $(".show_hide_sign_up").slideUp(function() { $(this).show() } ); $(".show_hide_sign_up").slideDown(function() { $(this).hide() } );

Categories : Javascript

Simple public function in simple jQuery plugin
By default Jquery plug-ins do not stay persistent with every call. What you're doing here is re-initializing the entire plug-in twice, and each declaration is a completely new object that is not aware of any previous declarations. I'm afraid you may need to re-think your solution completely if you want to do this as a JQuery plug-in. Generally speaking external functions are triggered by callbacks passed as options and/or events. You can also pass data between DOM elements using the .data() function (which creates data-whatever attributes on the dom object itself).

Categories : Jquery

Simple Form: How can I create a custom wrapper that does not wrap the input and create a label?
This code below may result in your expected HTML: config.wrappers :category_tab, tag: "ul" do |ul| ul.use :html5 ul.wrapper tag: "li" do |li| li.wrapper tag: "label" do |label| label.use :input, label: false end end end

Categories : Ruby On Rails

How to get each new survey to start from 1?
I do not think this can be easily done via SQL. Perhaps you should move this logic to the application layer. For instance, when you add a new question, the QuestionOrder will be equal to "# of QuestionOrder in Survey" + 1

Categories : Asp Net

Structure for MVC4 Survey Web App
I actually ran in to this same problem earlier this week. What I ended up doing, successfully, was this: My Model consists of a list of Questions, which is a custom class I wrote with the necessary properties needed for my scenario: List<Question> Questions { get; set; } My View uses a DropDownList inside of a foreach block as opposed to a DropDownListFor, and I am setting the name using the Id of each question: @foreach (Question question in Model.Questions) { <li>@question.QuestionText</li> <li>Answer: @Html.DropDownList(String.Format("ddlAnswer{0}", question.QuestionId), Model.Answers)</li> } On HttpPost on the Controller, I am passing in the FormCollection as a parameter to the Action and am again iterating through the results set. This wo

Categories : Asp Net Mvc

customize survey progress bar css - Fluidsurvey
To achieve re-locating the progress bar to another location in the survey, a custom javascript must be used (possible through a FluidSurveys JavaScript advanced question, or by pasting script html into a question description or something). You'll want to remove the existing progress bar element and move it to the bottom of the #survey element, but retaining the same structure for CSS purposes means having to create a second .survey-header element to contain your relocated progress bar. This is to ensure existing CSS and JavaScript can still find the progress bar. var p = $('.survey-progress-outer').detach(); $('<div class="survey-header"/>').append(p).appendTo('#survey');

Categories : CSS

php/mysql/jquery (broken with simple jquery code)
You are preventing the default in this line e.preventDefault(); And never actually posting the file Try e.preventDefault(); $.post('insert_ac.php', $(this).serialize(), function(){ $("#listuser").load("templates/showuser.php"); $("#signupform").remove(); });

Categories : PHP

Surveymonkey: Is there an API method that indicates if a survey has been completed by a user?
I believe you can get that information by first hitting : https://developer.surveymonkey.com/mashery/get_respondent_list for the survey you are interested in.It will give you all the people who have responded to your survey and their status. The key you would be interested in would be "status" in the response. (Make sure to specify that you want the status in the "fields" param in the request.

Categories : Misc

PHP MySQL Insert survey answers into table
create a page called getval.php then put the below code and you have to make sure you connect to the database using pdo thats when this code is gonna work for you . H i hope it will help you good luck <?php $answer1=(isset($_POST['answer1']))? trim($_POST['answer1']): ''; $answer2=(isset($_POST['answer2']))? trim($_POST['answer2']): ''; $answer3=(isset($_POST['answer3']))? trim($_POST['answer3']): ''; $answer4=(isset($_POST['answer4']))? trim($_POST['answer4']): ''; $answer5=(isset($_POST['answer5']))? trim($_POST['answer5']): ''; $answer6=(isset($_POST['answer6']))? trim($_POST['answer6']): ''; $answer7=(isset($_POST['answer7']))? trim($_POST['answer7']): ''; $answer8=(isset($_POST['answer8']))? trim($_POST['answer8']): ''; $query="INSERT INTO surveys_completed( answer1,answer2,answ

Categories : PHP

Send an email newsletter/survey in Rails
Create a rake task that iterates through all the email addresses of active users on your site, constructing, and sending, one email per user. Something like: namespace :transactional_emails do desc "Email to ask users what they're interested in" task :interests => :environment do User.all.each |u| do QuestionsMailer.interest_question(u).deliver end end end I don't think it's important to send in batches unless the task completely soaks up your CPU or takes up more RAM than you can spare on your app server. It's unlikely to have more than a minor impact on your DB performance. The loading of the :environment is likely required (it basically loads up your Rails app) so that your connection settings to your database, as well as your ActionMailer config from config/

Categories : Ruby On Rails

How can I validate a survey based on form elements type?
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script> $(function(){ if ($('form').length > 0) { $('form').submit(function(e){ var answers = ''; //alert (qNum); var i = 1; var len = <?php echo $numRows; ?>; $('input[type=Radio]:checked').each(function() { if (answers !== '') { answers += ','; } answers += $(this).val(); //alert(answers); }) $('input[name=h2]').val(answers); for (var i = 1; i <= len; i++ ) { var qNum = 'q'+i; //document.write(qNum); if (($('inpu

Categories : Javascript

Simple way to create subdomains on the fly with PHP
ya sure its possible go to http://vikku.info/programming/php/create-subdomain-dynamically-in-php-code-to-create-subdomains-in-server-using-php.htm or http://www.phpclasses.org/browse/file/17134.html just configure the setting like add subdomain name ,cpanel username,cpanel password,domail name.it will work. for example if your sub domain name is test.example.com create_subdomain("test","CPANEL_USERNAME","CPANEL_PASSWORD","example.com");

Categories : PHP

Create Simple Timer in IOS
Why do you need a timer for that? Just store the start time and subtract it from the current time when you stop measuring: static NSTimeInterval startTime; static BOOL isRunning; - (IBAction)toggle:(id)sender { if(!isRunning) { startTime = [NSDate timeIntervalSinceReferenceDate]; isRunning = YES; } else { NSLog(@"%f", ([NSDate timeIntervalSinceReferenceDate] - startTime) * 1000.0); isRunning = NO; } }

Categories : IOS

Django Post Request with custom Dict for Dynamic Survey
That is the only thing I could come up with: template name="answer_{{question.id}}" views.py dict([(k.split('_')[-1], v) for (k, v) in request.POST.items() if 'answer' in k])

Categories : Python

Email From Access Through Outlook, Allow Recipient To Answer Survey From Message
Outlook macros are stored in outlook templates, and don't seem to be well-suited for distribution. AFAIK there is not any support for including a macro in an Outlook.MailItem -- this is the functionality you're describing, like, adding FormControls (command buttons, etc?) to the mail, which will execute a subroutine that reports back to your DB. You might look in to using the Voting Buttons. These can be added to your mail item, assuming you have an object variable like mItem to represent the Outlook.MailItem: mItem.VotingOptions = "Yes;No;Maybe" When clicked, you will receive a response email. You can probably use VBA from Access to periodically query your inobx, parse these received emails, and add to the DB.

Categories : Vba

XSLT to create simple XML from Key-Value type of XML
Your Rowset/Row's would have to be consistent (same number of Row's in each Rowset and same Row/Name's), but you could try something like this... XML Input <Rowsets CachedTime="" DateCreated="2013-07-30T00:13:32" EndDate="2013-07-30T00:13:29" StartDate="2013-07-29T23:13:29" Version="12.2.4 Build(92)"> <Rowset> <Columns> <Column Description="Name" MaxRange="1" MinRange="0" Name="Name" SQLDataType="-9" SourceColumn="Name"/> <Column Description="Value" MaxRange="1" MinRange="0" Name="Value" SQLDataType="-9" SourceColumn="Value"/> <Column Description="Min" MaxRange="1" MinRange="0" Name="Min" SQLDataType="2" SourceColumn="Min"/> <Column Description="Max" MaxRange="1" MinRange="0" Name="Max" SQL

Categories : Xml

Can't create simple text slides
You just need to change a selector to contain only direct children of #text-blocks $('#text-blocks > :first-child').fadeOut() jsFiddle Demo Your previous selector $('#text-blocks :first-child') was selecting every first child inside #text-blocks, including the first paragraphs inside .text-block elements.

Categories : Javascript

How to create simple array in Ruby?
You can use Range and call Enumerable#map method on it, like this: (1..10).map{|i| i * 10} # => [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] Or, as suggested by @JörgWMittag, with Object#method method that returns Method instance which is converted to proc by & notation: (1..10).map(&10.method(:*)) # => [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]

Categories : Ruby

create simple timer android
How precise does the timer need to be? The simplest way would be to take the time before performing the task and subtract it from the time after performing the task: long start = System.currentTimeMillis(); // do some task long timeTakenMs = System.currentTimeMillis() - start; If you mean a user-event-driven timer, you can apply the same principles as above: // Declare instance variable long start = 0L; // OnStartTimer start = System.currentTimeMillis(); // OnStopTimer long elapsed = System.currentTimeMillis() - start;

Categories : Java

How to create a simple socket in node.js?
I don't think the server is put into listening state. This what I use.. // server require('net').createServer(function (socket) { console.log("connected"); socket.on('data', function (data) { console.log(data.toString()); }); }) .listen(8080); // client var s = require('net').Socket(); s.connect(8080); s.write('Hello'); s.end(); Client only.. var s = require('net').Socket(); s.connect(80, 'google.com'); s.write('GET http://www.google.com/ HTTP/1.1 '); s.on('data', function(d){ console.log(d.toString()); }); s.end();

Categories : Node Js

Create Simple Facebook application
Firstly, the secured canvas url you have mentioned should start with https:// Your domain should have an ssl certificate installed, as Facebook always connects to secured canvas url. Secondly, if you are developing for testing purpose, you should allow facebook for unsecured browsing. or use a forward service as shown here https://forwardhq.com/in-use/facebook

Categories : C#

How to Create a Simple To Do Script on Windows
If all you're doing is creating text files whose names are your "to-do" items, you really don't need a batch file. Just right-click the desktop, select New -> Text Document, and type your text. But it's beyond me why you'd want to do it this way rather than use any of a bazillion programs out there that implement task lists, or simply create one text file with all your tasks listed in it, and keep that file in an open notepad window (be sure to get into the habit of hitting Ctrl-S every time you add an item, to save yourself a lot of frustration).

Categories : Windows

How to create mod rewrite rule for simple api
You might try this: RewriteEngine On RewriteRule ^api/(.*) http://tools.fifaguide.com/api/server.php [R,L] And if you need the resulting url you could add this: RewriteEngine On RewriteRule ^api/(.*) http://tools.fifaguide.com/api/server.php?r=$1 [R,L] Then in your script you could access the requested url with $_GET["r"] (assuming php...) Also a helpful tool i've found for htaccess: http://htaccess.madewithlove.be/ -Ken

Categories : PHP

Cocos2d-x: Create simple progress bar
See this - How to use a progress bar in cocos2d-x and C++ Basically, create two sprites one for the progress bar's border and one for the loading bar itself. CCPointer fuelBarBorder; fuelBarBorder = CCSprite::createWithSpriteFrameName ("bt_progressbarborder.png" ); fuelBarBorder->setPosition(ccp(100,100)); this->addChild(fuelBarBorder,1); // CCProgresstimer object (smart pointer) CCPointer fuelBar; fuelBar = CCProgressTimer::create( CCSprite::createWithSpriteFrameName ("bt_progressbar.png" )); Set the loading bar sprite's type to CCProgressTimerType. // Set this progress bar object as kCCProgressTimerTypeBar (%) fuelBar->setType(CCProgressTimerType::kCCProgressTimerTypeBar); // Set anchor point in 0,0 and add it as a child to our border sprite fuelBar-&

Categories : Android

create a simple html sidebar
Since you're already using Bootstrap, you could just use the container-fluid class, which should generate two columns for you - the leftmost one a sidebar. Just add some additional CSS to add a border on that column and you'll have your sidebar in at most 4 lines of CSS code. See "Fluid Layout" here: http://twitter.github.io/bootstrap/2.3.2/scaffolding.html#layouts

Categories : HTML

Simple way to create roles for my application
You can add role by simply adding a role column to your db table. CanCan is a gem that helps you authorize different actions based on the user role. Cancan expects you to have a way to differentiate users based on roles. So you should have your role setup before using CanCan

Categories : Ruby

SQL Server - simple way to create pivot
Here is a way that uses cross join and aggregation: select ages.minage, ages.maxage, sum(case when age > ages.minage and age <= ages.maxage then 1 else 0 end) as cnt from dbo.Persons cross join (select -1 as minage, 1 as maxage union all select 1, 2 union all select 2, 3 ) as ages group by ages.minage, ages.maxage I like this method because it is easy to add new age ranges. Note this also includes the ranges.

Categories : SQL

Create Simple Google Calendar Event in PHP
The last portion of your code isn't using correct logic. The crux of the problem is with if (!$client->getAccessToken()). This statement, in the context of your sample code, roughly translates to: If you fail to get the access token, create the event. Obviously this is not what you want to happen. ;) Instead try this: if ($client->getAccessToken()){ //succeeded in getting an access token, so create and insert the event } else { $authUrl = $client->createAuthUrl(); //failed to get an access token, so display $authurl as a link to open the auth window }

Categories : PHP

Codeigniter create a simple form to update the db
Try this. Your model should be function edit($id) { $data = array( 'note' => $_POST['note'], 'user'=> $_POST['user']// I don't think you need this. ); $this->db->where('id', $id); $this->db->update('company_contacts', $data); }

Categories : Codeigniter

How to create a simple HTML Cancel button
cancel is not a valid value for a type attribute, so the button is probably defaulting to submit and continuing to submit the form. You probably mean type="button". (The javascript: should be removed though, while it doesn't do any harm, it is an entirely useless label) You don't have any button-like functionality though, so would be better off with: <a href="http://stackoverflow.com"> Cancel </a> … possibly with some CSS to make it look like a button.

Categories : Javascript

How can I create a simple ListView Shopping List?
If you're happy to use an array, you can store your array in SharedPreferences. That way it won't be wiped out when you restart your app. Read the part about using SharedPrefences It's my favorite way of storing small uncomplicated data.

Categories : Android

Android: Using the accelerometer to create a simple maraca app
I can give you some pointers on this: First of all, I noticed that you're using the same resource for both outcomes: soundsMap.put(shakesound1, soundpool.load(this, R.raw.shake1, 1)); soundsMap.put(shakesound2, soundpool.load(this, R.raw.shake1, 1)); The resource in case of shakesound2 should be R.raw.shake2. Second, the following only deals with one of the motions: if (mAccelNoGrav > 3) This should be changed to: if (mAccelNoGrav > 3 || mAccelNoGrav < -3) Currently, you are not intercepting downward motion. Third, acceleration value of 3 is rather low. If you want to avoid/filter-out normal arm movement, this value should be around 6 or 7 and -6 or -7. Fourth, you do not need to store z values to check whether the motion was up or down. You can check whether: mAcce

Categories : Android

Simple SharpMap example to create shape file
The SharpMap project is apparently spitted into two main branches on GitHub: One is called SharpMap and is pretty active: https://github.com/SharpMap/SharpMap The other one is SharpMapV2 and was apparently dead by around 2012 https://github.com/SharpMap/SharpMapV2/ They are both under the same GitHub account so the "branding" of these libraries and their API is pretty confusing. The SharpMapV2 has some saving capabilities. The Link you provided uses the API of SharpMapV2. The two project have common developers, maybe the easiest way to know about the status of that feature in both version is to try to get in touch with them and post their answer here.

Categories : C#

Create a simple Login page using jsp and session
Because you're trying to access login.jsp directly from the browser you have to move it out of the WEB-INF directory - files in WEB-INF are not publicly accessible. If you move login.jsp up one directory and enter http://localhost:8088/abhirup/login.jsp in your browser it should pull up the page. However, it is a fairly common practice to put jsp pages under WEB-INF/jsp or something similar and use a servlet to intercept and process requests and then have the servlet forward to the appropriate jsp page. You have a syntax error on line 1, column 46 of display.jsp because you have the word page before your language declaration. Change this: <%@ page import="java.io.*,java.util.*" page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> to thi

Categories : Eclipse

How to Create simple drag and Drop in angularjs
I just posted this to my brand spanking new blog: http://jasonturim.wordpress.com/2013/09/01/angularjs-drag-and-drop/ Code here: https://github.com/logicbomb/lvlDragDrop Demo here: http://logicbomb.github.io/ng-directives/drag-drop.html Here are the directives these rely on a UUID service which I've included below: var module = angular.module("lvl.directives.dragdrop", ['lvl.services']); module.directive('lvlDraggable', ['$rootScope', 'uuid', function($rootScope, uuid) { return { restrict: 'A', link: function(scope, el, attrs, controller) { console.log("linking draggable element"); angular.element(el).attr("draggable", "true"); var id = attrs.id; if (!attrs.id) { id =

Categories : Javascript



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