[Solved] Form to redirect to a particular URL

Solved with <script type=”text/javascript”> function goTo() { var NUM= document.forms[0].NUM.value; var URL = ‘http://staticurl/’ window.location = URL+NUM+’.jpg’; return false; } </script> And <form action=”” method=”get” onsubmit=”return goTo()”> solved Form to redirect to a particular URL

[Solved] indexing for python list of lists

Here is a simple function to do what you want: def get_length_or_value(l, *i): item = l for index in i: item = item[index] return len(item) if isinstance(item, list) else item This function first finds the element at the given indices (if any), and then returns the appropriate value based off wether the element is a … Read more

[Solved] then mistake at function PHP

Change to function foo($string, $color) { echo ‘<p style=”color: ‘.$color.’;”>’.$string.'</p>’; } foo(“example”, “#FF00AE”); Need to be a string and start with # hexdecimal color symbol also your echo had a wrong chart ; I fixed it 5 solved then mistake at function PHP

[Solved] Linq query to group payment receipts for a person over a period

Based on the view you want to display, your models are incorrect and they need to be public class MemberPaymentVM { public string MemberName{ get; set; } public string TransactId { get; set; } [DisplayFormat(DataFormatString = “{0:d}”)] public DateTime PayDate { get; set; } public IEnumerable<CategoryAmountsVM> Payments { get; set; } [DisplayFormat(DataFormatString = “{0:C}”)] public … Read more

[Solved] Remove white space from an image using python

The code is almost perfect. It just can’t crop on the right side because of the scrollbar. And it does not consider some padding (which you liked according the comments). The thing I removed is the topology modification. import numpy as np import cv2 img = cv2.imread(‘cropwhitefromimage.png’) scrollbarright = 20 img = img[:, :-scrollbarright] gray … Read more

[Solved] Generate PDF file in ios [duplicate]

Create your custom view to add image, tableview or anything. Points the pdf converter to the mutable data object and to the UIView to be converted to pdf. Try this: NSMutableData *pdfData = [NSMutableData data]; UIGraphicsBeginPDFContextToData(pdfData,self.bounds, nil); UIGraphicsBeginPDFPage(); CGContextRef pdfContext = UIGraphicsGetCurrentContext(); // draws rect to the view and thus this is captured by UIGraphicsBeginPDFContextToData … Read more

[Solved] How to Collect the numbers in Lebel text

Add this line totaleValue.text = “$\(Int(typPrice.text!.replacingOccurrences(of: “$”, with: “”))! + Int(fruitPrice.text!.replacingOccurrences(of: “$”, with: “”))!)” in end of typesegm and fruitSegm method like this. @IBAction func typesegm(_ sender: Any) { switch typesegm.selectedSegmentIndex { … } totaleValue.text = “$\(Int(typPrice.text!.replacingOccurrences(of: “$”, with: “”))! + Int(fruitPrice.text!.replacingOccurrences(of: “$”, with: “”))!)” } @IBAction func fruitSegm(_ sender: Any) { switch fruit.selectedSegmentIndex { … Read more

[Solved] why nested loop not working in laravel

You have to make another array from your collection. And then you will able to get anything that you need. $result = []; foreach ($users as $u) { $result[ $u-> namecategory ] = $result[ $u-> namecategory ] ?? []; $result[ $u-> namecategory ][$namesubcategory] = $result[ $u-> namecategory ][$namesubcategory] ?? []; $result[ $u-> namecategory ][$namesubcategory][] = … Read more