parameters

iReport : How to process a parameter whose expression class = List and inside that list is another list?

寵の児 提交于 2019-12-19 09:42:32
问题 I have a parameter whose expression class is a List. Inside that List is another list so the data looks something like this. Class Bean{ String property1 String property2 Long property3 List<BeanDetails> beanDetails } Please take note that I'll be passing Bean in a list. (List beans) 1) Is it possible to process and read this type of data in iReport? 2) How are we going to declare it/ define it and use it in iReport? The report should look like this Col1 Col2 Col3 Col4 Col5 Col6 1 bean.id

R custom data.table function with multiple variable inputs

杀马特。学长 韩版系。学妹 提交于 2019-12-19 09:37:35
问题 I am writing a custom aggregation function with data.table (v 1.9.6) and struggle to pass function arguments to it. there have been similar questions on this but none deals with multiple (variable) inputs and none seems to have a conclusive answer but rather "little hacks". pass variables and names to data.table function eval and quote in data.table How can one work fully generically in data.table in R with column names in variables I would like to take a data table sum and order defined

Why does this generic java method accept two objects of different type?

心已入冬 提交于 2019-12-19 08:04:41
问题 This method shall take two objects of the same type and return one of those objects by random: public static <T> T random(T o1, T o2) { return Math.random() < 0.5 ? o1 : o2; } Now, why does the compiler accept two parameters with distinctive types? random("string1", new Integer(10)); // Compiles without errors EDIT: Now that I know that both parameters are getting implicitly upcasted, I wonder why the compiler does complain when calling the following method: public static <T> List<T>

Android, KSoap2 and .NET Web Service w/ parameters = NULL result

点点圈 提交于 2019-12-19 07:27:35
问题 Apparently this is a fairly often experienced issue. I'm not sure entirely where the problem lies, or what needs to be adjusted, but for the life of me I cannot retrieve anything other than a NULL result to my SoapObject or SoapPrimitive from my .NET XML web service with parameters. I've tried everything I've found on the net: Adding the .setXmlVersionTag = no change Using SoapObject instead of SoapPrimitive = no change Using SoapPrimitive instead of SoapObject = no change Using

Can I pass “this” as a parameter to another function in javascript

限于喜欢 提交于 2019-12-19 07:26:42
问题 I have this: $('#slider li').click(function () { var stepClicked = $(this).index(); alert(stepClicked); if (stepClicked != 0) { $('#cs_previous').removeClass('cs_hideMe'); } else { $('#cs_previous').addClass('cs_hideMe'); } $('li.cs_current').removeClass('cs_current'); $($(this)).addClass('cs_current'); moveToNextImage(stepClicked); function moveToNextImage(stepClicked) { alert(stepClicked); var currentIs = $('li.cs_current').index(); var newLeftEdge = currentIs - stepClicked; $('.cs

Wordpress: How can I add url GET parameter to my main menu items

若如初见. 提交于 2019-12-19 07:23:13
问题 I'm trying to add a URL GET parameter to one of my main menu items in Wordpress(but I don't know how to). So, my approach was to detect a click event on the menu item, then pass a parameter via ajax to my php page which will process value passed as needed. My main questions are, looking at my code, how come is not working? is there a better way of doing this in Wordpress and not rely on javascript? Here is the javascript: <script type="text/javascript"> $(document).ready(function() { $("#menu

Sort array on two parameters in swift

浪尽此生 提交于 2019-12-19 05:09:03
问题 I want to sort an array on two parameters, for example, name and then by description. Sorting the array first by name and then by description won't work because then the array won't be sorted by name. The solution should be something like this: var sortedArray = sorted(items, { (o1: MyObject, o2: MyObject) -> Bool in return o1.name < o2.name and o1.description < o2.description }) Thanks 回答1: Your syntax looks correct. Just change the closure to return o1.name == o2.name ? (o1.description < o2

Multi-value date parameter in stored procedure?

我的梦境 提交于 2019-12-19 04:15:18
问题 I'm trying to get a stored procedure to work that accepts a multi-value parameter for dates. This isn't in SSRS but I'm trying to use the same approach as I do with it: ALTER PROCEDURE spSelectPlacementData ( @ClientID SMALLINT, @SourceFileDates VARCHAR(MAX) ) AS BEGIN SELECT (snip) FROM [APS].[dbo].[Account] A WHERE ClientID = @ClientID AND A.[SourceFileDate] IN (SELECT * FROM dbo.Split(@SourceFileDates)) END I use this approach with INT and VARCHAR fields on SSRS report multi-value

How to Fix Error with a Swift NSTimer Calling Its Selector

主宰稳场 提交于 2019-12-19 03:24:15
问题 I'm getting a runtime error of: 2014-07-15 16:49:44.893 TransporterGUI[1527:303] -[_TtC14TransporterGUI11AppDelegate printCountdown]: unrecognized selector sent to instance 0x10040e8a0 when I use the following Swift code to fire a timer: @IBAction func schedule(sender : AnyObject) { var startTime = startDatePicker.dateValue.timeIntervalSinceDate(NSDate()) var endTime = endDatePicker.dateValue.timeIntervalSinceDate(startDatePicker.dateValue) var startDate = NSDate.date() let params = [

Is it safe to pass Delphi const string params across memory manager boundaries?

戏子无情 提交于 2019-12-19 02:47:07
问题 Subj. I'd like to use strings instead of PChar because that spares me much casting, but if I just do procedure SomeExternalProc(s: string); external SOMEDLL_DLL; and then implement it in some other project with non-shared memory manager: library SeparateDll; procedure SomeExternalProc(s: string); begin //a bla bla bla //code here code here end; I have (formally) no guarantee Delphi does not decide for whatever reason to alter the string, modify its reference counter, duplicate or unique it,