FlutterIcon error: Invalid params: - data.config is required (undefined) - dart

I tried to "Download" data from FlutterIcon (https://www.fluttericon.com/).
What I had tried to do:
Select Icons
Write "AppIcons" in "MyFlutterApp"
Press button "Download".
Then I got this message: "Invalid params: - data.config is required (undefined)"

you can use this service to convert svg to font
https://icomoon.io/app/#/select/font
click on +import icon
and after that converted
create dart file that contain class with attribute of
IconData(int,fontName), the int take it from the site
or in setting icon on right of download button you can check generate dart class for flutter

Related

Umbraco 7 Upload File - Check if remove file is ticked

I have an Upload file option in Umbraco 7, the problem I have is if the remove checkbox is ticked and you click publish to remove the file, my code below catches the upload field as empty and display my custom error message.
if (string.IsNullOrEmpty(urlForFileUpload))
{
e.CancelOperation(new EventMessage("Error", "Please select an Excel file before publishing",EventMessageType.Error));
}
Does anyone know what gets passed to the server so that I can check for it and not display my error message if the checkbox is ticked?
--------------------CancelOperation---------------
You don't need an event handler to check that. Just make the field mandatory:

Indesign SDK Panels TextEditbox

how to get the TextEditbox value for indesign panel. I have tried the following code:
GetTextControlData(kDYNTextEditBoxWidgetID);
It returns an error like as below:
error C3861: 'GetTextControlData': identifier not found
The function GetTextControlData() is available with IDialogController. Are you including IDialogController.h header in the file ?
Another approach could be to use IWidgetUtils::QueryRelatedWidget() to get ITextControlData for this widget. From ITextControlData, you can GetString()

Image upload functional testing in Geb

When i am testing the image upload in Geb ,how i click the Open option when we
have to select image from the system My code is:
class UploadImageTestSpec extends GebReportingSpec{
def "test for UploadImage"()
{
when:
to LandingPage
waitFor(20) {title.endsWith("Jobulo")}
loginButton.click()
j_username="candidate2"
j_password="p"
login.click()
then:
at DashBoardPage
when:
at DashBoardPage
waitFor(20) {title.endsWith("Jobulo")}
uploadImage.click()
// uploadImage1.click()
Thread.sleep(1000)
//new File(".").getAbsolutePath().replace("..","");
// cd=new File(".").getAbsolutePath().replace("..",""); + "images.jpeg"
driver.manage().timeouts().implicitlyWait(200,TimeUnit.SECONDS)
crop.click();
then:
at DropDownPage
}
}
It is not possible to do image upload using geb.
Refer this link: http://www.gebish.org/manual/current/#file-upload
It’s currently not possible with WebDriver to simulate the process of a user clicking on a file upload control and choosing a file to upload via the normal file chooser. However, you can directly set the value of the upload control to the absolute path of a file on the system where the driver is running and on form submission that file will be uploaded.
<input type="file" name="csvFile">
$("form").csvFile = "/path/to/my/file.csv"
-- From the link

Jasper: error opening input stream from url

I'm designing a jasper report using iReport which takes a parameter and fetches an image from a given URL:
The parameter is a user's screen name in twitter, and the url is it's profile image.
<image>
<reportElement x="4" y="51" width="73" height="64"/>
<imageExpression><![CDATA["https://api.twitter.com/1/users/profile_image?screen_name="+$F{user_screen_name}+"&size=bigger"]]></imageExpression>
</image>
It works great when the image exists. If it doesn't the following exception is thrown:
Error filling print... net.sf.jasperreports.engine.JRException: Error opening input stream from URL :
https://api.twitter.com/1/users/profile_image?screen_name=CPTCurtisHervey&size=bigger
Setting up the file resolver... net.sf.jasperreports.engine.JRRuntimeException:
net.sf.jasperreports.engine.JRException: Error opening input stream from URL :
https://api.twitter.com/1/users/profile_image?screen_name=CPTCurtisHervey&size=bigger
at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:138)
at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:186)
at net.sf.jasperreports.repo.RepositoryUtil.getBytes(RepositoryUtil.java:202)
at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:141)
at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:498)
at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:441)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:468)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2037)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:761)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:813)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:878)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by:
net.sf.jasperreports.engine.JRException: Error opening input stream from URL :
https://api.twitter.com/1/users/profile_image?screen_name=CPTCurtisHervey&size=bigger
at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:314)
at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:121)
... 19 more Caused by: java.io.FileNotFoundException:
https://api.twitter.com/1/users/profile_image?screen_name=CPTCurtisHervey&size=bigger
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at java.net.URL.openStream(URL.java:1029)
at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:310)... 20 more
Print not filled. Try to use an EmptyDataSource...
How can i handle this situation in the jrxml file?
I would like to simply add a fixed URL address in case it can't find one.
Anyone has any suggestions?
Thank you!
I think you need to add an additional helper class to handle this. You need a static method boolean urlExists(String url) that would allow you to put this in the imageExpression:
MyClass.urlExists($F{image_url}) ? $F{image_url} : $P{fallback_image}
It would be a simple class to write... but clearly there's additional complexity in adding in another .jar file. Without that method, I can't see any way to do the processing in the .jrxml.
in jrxml file,
to show image from url resource, use image expression URL()
like below, for example $F{ADPN_NO} is parameter from report
<imageExpression><![CDATA[new URL("http://anyserver:7001/images/"+$F{ADPN_NO}+".jpg")]]></imageExpression>
when onError occurred, it will show blank item, icon, or error that is set on jrxml.
the other way, outside of jrxml file, you can use java map object which contains img urls that is check by URL() or File() Exception ..
In my case I had a report to which I "injected" the image's url and it was causing an error with the certificate (the url I was "injecting" had the IP and it had to be a name for the certificate). After I changed the url it worked.

How to set a icon for this right click menu?

I can add a new item for the folders right click menu using registry:
HKEY_CLASSES_ROOT\folder\shell\Your item name
But i don't know how to set a icon for created item like this :
May somebody help me?
To create a custom context menu with an icon when clicking on a folder follow these steps:
Under HKEY_CLASSES_ROOT\folder\shell\ create a new key: "MyContextMenu"
Under HKEY_CLASSES_ROOT\folder\shell\MyContextMenu edit the (Default) key to specify the text to show in the context menu: MyMenu
To execute a command when the menu is chosen add a new key name "Command" and set the commmand to execute in it's (Default) value. For instance: cmd.exe
Now to set the icon you add a new string value name Icon and set it's value to the *.ico you want to show or you can reference an ico that is embedded in a dll using [name of the dll],[icon number] A lot of the default windows icons are in imageres.dll. So for this example set the value to: c:\windows\system32\imageres.dll,10
There is a nice tool called iconviewer that you can use to examine icons in dlls. After you install it you can right click a dll, open it's properties and an extra tab with it's icons will be added to the propery pages
You should to add iconpath in this key for showing when the user clicked right button.
Try to write key OpenWithProgIds, and then create value with name (path) of your application.
Example for recycle:
TRegistry *key=new TRegistry(KEY_ALL_ACCESS);
key->RootKey=HKEY_LOCAL_MACHINE;
key->OpenKey("Software\\Classes\\CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\shell", false);
key->OpenKey("Prog_name", true);
key->WriteString("Icon", ExtractFileDir(Application->ExeName)+"\\icon_prog.ico");
key->OpenKey("command", true);
key->WriteString("", ExtractFileDir(Application->ExeName)+"\\Program.exe");
key->CloseKey();

Resources