parameters

How to correctly pass a SQL query as parameter in Jasper Reports?

两盒软妹~` 提交于 2019-12-13 07:38:35
问题 I've looked into all other questions regarding this topic and I followed all steps mentioned there, however I'm still getting an error when trying to pass an entire SQL statement as Parameter. This is my SQLQuery Parameter: <parameter name="SQLTag" class="java.lang.String"> <defaultValueExpression><![CDATA["SELECT * FROM REPORT_VER WHERE TAG BETWEEN $P{Von} AND $P{Bis}"]]></defaultValueExpression> </parameter> I've checked it and the SQL works perfectly fine when passed directly into the

mod_rewrite RewriteCond and query string

爷,独闯天下 提交于 2019-12-13 07:29:07
问题 recently, I have been working on a small project for a client. I was thinking about using a wordpress style pretty URL format. I googled around a lot and came accross Apache’s mod_rewrite and RewriteRule , RewriteCond . But didn't find any example which can handle random of parameters. For example: /index.php?param=1 → /index/param/1 /index.php?foo=bar&hour=1&minutes=12 → /index/foo/bar/hour/1/minutes/12 /index.php?page=login&attempt=2 → /index/page/login/attempt/2 or something similar. As

Passing multiple parameters to Crystal Report

馋奶兔 提交于 2019-12-13 07:13:21
问题 I'm working on Visual Studio 2008 and SQL Server 2008, language C# I want to pass multiple parameters to Crystal Report in ASP.NET. I have two parameters @accountnumber and @customerid . But I can only pass one parameter to my report as in code below. CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.ServerName = "CJ-PC"; CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.UserID = "sa"; CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.Password = "***"; CrystalReportViewer1.LogOnInfo[0]

Rails4 // append strong_parameters with other params

亡梦爱人 提交于 2019-12-13 06:59:10
问题 Let's say for the following actions' controller: class PostsController < ApplicationController def create @post = Post.create(post_params) end private def post_params params.require(:post).permit(:title, :content) end end Is there a one-line way to do something like this when creating a record : def create @post = Post.create(post_params, user_id: current_user.id) end What would be the clean way to do it ? Is it possible ? 回答1: params is an instance of ActionController::Parameters, which

How to extract URL parameters on 404 Error in PHP

半腔热情 提交于 2019-12-13 06:36:03
问题 I have my htaccess redirecting to a error404.php but I want that PHP file to be able to extract the original url parameters. For example: http://mywebsite.com/unknownfile.php?param1=value1&param2=value2 I've tried $_GET['param1'] but that's empty. The $_SERVER['PHP_SELF'] just shows error404.php Many thanks in advance. 回答1: You can access original URL via $_SERVER["REQUEST_URI"] . For example: requesting URL /hihi/meow?key=rumba which does not exists. The $_SERVER["REQUEST_URI"] will have

Rails Button_to not passing model param

喜欢而已 提交于 2019-12-13 06:05:35
问题 I have the following in my products index page: <%= button_to "Add", user_order_orderitems_path(user_id: current_user.id, item_id: x.id, order_id: current_user.group.current_order.id), class: "btn btn-mini" %> Which I can see from the logs is being picked up by my Orderitems#create action in my controller ok. This looks like: def create @orderitem = Orderitem.new(orderitem_params) if @orderitem.save redirect_to items_path else redirect_to items_path end end private def orderitem_params params

Classes as parameters error

二次信任 提交于 2019-12-13 05:40:39
问题 In Weapon.h, when I try and take a class 'Entity*' as a parameter, it says "Syntax error: identifier 'Entity'" when I compile. Additionally when I roll over the text 'target', Visual C++ Express 2010 gives me the text " *target". The Entity class is fine and I'm pretty sure it's included correctly. (I won't post Player.h as it's unnecessary - see Library.h - but it has a header guard and includes Entity.h) Library.h: #ifndef _LIBRARY_ #define _LIBRARY_ #include <iostream> #include <string>

PHP Remove parameters from image extension

与世无争的帅哥 提交于 2019-12-13 05:13:21
问题 I am getting the image url from one function. I need to find the extension for the image. Sometimes the image url comes with parameters like 'http://slimages.macys.com/is/image/MCY/products/4/optimized/1776484_fpx.tif?$filterlrg$&wid=370'. So, the file extension comes like 'tif?$filterlrg$&wid=370'. How can I get the exact extension. Below is my code <?php $srcimg = 'http://slimages.macys.com/is/image/MCY/products/4/optimized/1776484_fpx.tif?$filterlrg$&wid=370'; $fullpath = basename($srcimg)

Ignoring values passed in as parameters

坚强是说给别人听的谎言 提交于 2019-12-13 05:13:13
问题 I asked this question here (thinking I would help people) Creating an unnecessary getter and unearthed a huge area of ignorance I have. In this answer it was pointed out to me I had a fatal flaw in my code and I quote for ease: "This is wrong: public Patient(final String ptNo, final String ptName, final String procDate, final int procType, final String injury, final String drName) throws IOException { Patient.ptNo = getPtNo(); Patient.ptName = getPtName(); Patient.procDate = getProcDate();

jQuery Moblie: passing parameters and dynamically load the content of a page

折月煮酒 提交于 2019-12-13 04:58:50
问题 I know it's a base problem, but I wasn't able to find anything fitting my situation. I have a jQuery Mobile page with a list of elements. The elements references to a second pages which has a content that depends on what element where choose (for example a list of articles and choosing an article it should show the relative text). Basically I have to pass a parameter between pages. I tried to do that using AJAX: $.ajax({ url : "index.html#page2", data : "id="+id, dataType : 'json' type: "GET"