how can solve deploy material ui icon on vercel - material-ui

i'm trying to deploy my website on vercel, everything is working fine on my localhost3000
but when i try to deploy it on vercel, i keep getting this Error Module not found: Can't resolve '#mui/icons-material/Github' in '/vercel/path0/components. please why is it not working or do i need to reinstall the material icon package
here is my code
import GithubIcon from "#mui/icons-material/Github"
const Footer = () => {
return (
<div className="pb-4">
<div className="flex justify-center space-x-8 m-3">
<GithubIcon className="cursor-pointer lg:text-4xl"/>
</div>
</div>
)
}
export default Footer

the h in the github was uppercase not smallercase
this is what i was using
import GithubIcon from "#mui/icons-material/Github"
instead of this
import GitHubIcon from "#mui/icons-material/GitHub"

Related

Is there any way to view media files in template in django?

I deployed my project to web faction, set the static and media settings. Initially media files not showing, only the static files are shown in the site. But I can see the media files in my local system.
I used filefield not imagefield during model creation. Is that a problem?
is tried both ways:
<img src="{{MEDIA_URL}}{{i.cover_image.url}}" alt="">
<img src="{{i.cover_image.url}}" alt="">
These are settings:
settings.py
STATIC_URL = '/static/'
STATIC_ROOT = '/home/{}/webapps/testapp_static/'.format('user')
STATIC_FILE_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL= '/media/'
And i added this setting to myproject urls
urls.py
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Please help me where i went wrong. Is there any additional settings or path is missing. i want to view media files in my template.
I Put MEDIA_URL ='http://www.yoursite.com/static/' in Settings.py file and in template i used
<img src="{{ MEDIA_URL }}{{ obj.image.url }}" >
now its working properly in production. For local, change media url to /media/.

When sign in with google plus getting an error '10'

When I sign in with google. I am getting the popup of gmail list but when I select any gmail. I get an error as 10.
.ts file
import { GooglePlus } from '#ionic-native/google-plus/ngx';
loginWithGP(){
this.googlePlus.login({
'webClientId': '#####', //reverse client id
'offline': true
}).then(res=>{
console.log('res', res)
this.userInfo=res;
this.isUserLoggedIn=true;
}).catch( err => console.log(err ,'error'));
}
.html file
<ion-card *ngIf="isUserLoggedIn" style="text-align:center">
<img [src]="userInfo.imageUrl" />
<h3>{{userInfo.displayName}}</h3>
<p>{{userInfo.email}}</p>
<ion-button ion-button clear (click)="logout()">Logout</ion-button>
</ion-card>
<ion-footer *ngIf="!isUserLoggedIn">
<ion-button ion-button block (click)="loginWithGP()">Login with Google+</ion-button>
</ion-footer>
its occurred mismatch about your SHA-1 key mismatch with app id or your release or debug key
ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=279073034910-0000000000000000000.apps.googleusercontent.com
npm install --save #ionic-native/google-plus#4
Note: in ionic youcan find packagename config.xml top of it widget id="com.your.id"

How to deploy a Polymer dart application

I have a dart application using Polymer.dart, i replace the dart.js file by the boot.js (in my index.html), an now i want to deploy this application in order to have a working javascript one.
But, when i launch the build.dart, i have :
Total time spent on web/index.html -- 504 ms
Total time -- 555 ms
but nothing is created, no more "out" folder.
And when I do Pub Deploy, it create a "deploy" folder, but that version is not working (because the build.dart doesn't properly work i think).
Have you any idea?
Right now, it's a two step process. I suspect this will get easier. In the meantime:
Create a build.dart that looks like this:
import 'package:polymer/builder.dart';
main() {
build(entryPoints: ['web/index.html'], options: parseOptions(['--deploy']));
}
Take note, currently, a lot of warnings and hints are produced. You can ignore them for right now.
For the current version i have done these steps :
type on your console:
dart build.dart --deploy
dart2js out/web/index.html_bootstrap.dart -oout/web/index.html_bootstrap.dart.js
index.html:
<!DOCTYPE html>
<html>
<head>
...
<link rel="import" href="clickcounter.html">
<script type="application/dart">export 'package:polymer/init.dart';</script>
<script src="packages/browser/dart.js"></script>
</head>
<body>
...
<div id="sample_container_id">
<click-counter count="5"></click-counter>
</div>
</body>
</html>
build.dart:
import 'package:polymer/builder.dart';
main(args) {
build(entryPoints: ['web/aaa.html'],
options: parseOptions(args));
}

How to debug java applet

Im not very familiour with Java nor Java applets but I have to fix this issue.
Ever since JRE 7 Update 21 the applet is throwing eceptions in all browsers.
I need to debug the app, because the error gives no clues whatsoever (the application was running for years now, its after latest JRE update that the clients cant use it anymore).
So the applet is used as a JAR file in .NET application.
It is called as javascript with some code:
<html>
<head>
<script type="text/javascript">
var i = 0;
var path = "\\\\\\\\reaktorm\\\\Outgoing\\\\test";
var ext = ".tif";
var fullPath = "";
function nextImage() {
if (i==2) {
alert("There is no next image in collection!");
} else {
i++;
displayImage();
}
}
function previousImage() {
if (i<1) {
alert("There is no previous image in collection!");
} else {
i--;
displayImage();
}
}
function displayImage() {
//fullPath= path + (i<10?"0"+i:i) + ext;
fullPath= path + ext;
alert(fullPath);
document.webViewer.display(fullPath);
}
</script>
</head>
<body>
<div style="width:100%; height:100%;">
<applet name="webviewer" archive="..\webviewer.jar" code="my.webviewer.WebViewerApplet.class" width="100%" height="100%">
<param name="java_arguments" value="-Xmx512m">
<param name="image_source" value="C:\test\test.tif">
</applet>
</div>
<form id="testForm" name="testForm" style="display:block">
<input type="button" onClick="previousImage();" value="previous" />
<input type="button" onClick="nextImage();" value="next" />
</form>
</body>
</html>
So if I put this in html file and open it in a browser, i get the upper RuntimeException.
Now I want to debug in order to find the reason for this exception.
I have eclipse, the source code and an JAR export.
I have tried remote debug by launching:
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar webviewer.jar
Then i tried to connect to that using "Remote Java Application" under Debug options in eclipse by connection to locahost:5005, but i get connection refused.
Please can some one point me to the solution - how can i debug this in eclipse?
In Eclipse, navigate to your Applet class, and then click Run in Eclipse menu, then Debug As and Java Applet. Eclipse will launch your applet in debug mode.
The java console will give you a full stack trace on any exceptions your applet is throwing. You can enable it by following the instructions on the linked Oracle doc.

Deploy VisiFire On JBoss Portal

I am trying to improve my JBoss Portal dashboard using some analytical charting tools then I found VisiFire. So I started to investigate how I could deploy a simple VisiFire page as a portlet onto JBoss Portal dashboard. Below is what I did:
- I created a dummy portlet (display "Hello World" on the index page, index.html)
- Replaced the content of the index.html with a simple chart which would be rendered by VisiFire:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Visifire Charts</title>
<script language="javascript" type="text/javascript" >
</script>
</head>
<body>
<!-- To embed in existing html copy the code below -->
<script type="text/javascript" src="Visifire.js"></script>
<div id="VisifireChart">
<script language="javascript" type="text/javascript">
var chartXmlString = ''
+'<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts" Width="500" Height="300" BorderThickness="0" Theme="Theme1" ToolBarEnabled="True" >'
+'<vc:Chart.Titles>'
+'<vc:Title Text="Global Fortune 5 Companies 2007" />'
+'</vc:Chart.Titles>'
+'<vc:Chart.AxesX>'
+'<vc:Axis Title="Companies" />'
+'</vc:Chart.AxesX>'
+'<vc:Chart.AxesY>'
+'<vc:Axis Title="Revenue in Million dollars" AxisType="Primary" />'
+'</vc:Chart.AxesY>'
+'<vc:Chart.Series>'
+'<vc:DataSeries RenderAs="Column" AxisYType="Primary" >'
+'<vc:DataSeries.DataPoints>'
+'<vc:DataPoint AxisXLabel="Wall-Mart" YValue="351139" />'
+'<vc:DataPoint AxisXLabel="Exxon Mobil" YValue="345254" />'
+'<vc:DataPoint AxisXLabel="Shell" YValue="318845" />'
+'<vc:DataPoint AxisXLabel="BP" YValue="274316" />'
+'<vc:DataPoint AxisXLabel="General Motors" YValue="207349" />'
+'</vc:DataSeries.DataPoints>'
+'</vc:DataSeries>'
+'</vc:Chart.Series>'
+'</vc:Chart>';
var vChart = new Visifire("SL.Visifire.Charts.xap" , 500 , 300 );
vChart.setDataXml(chartXmlString);
vChart.render("VisifireChart");
</script>
</div>
<!-- Copy till here -->
</body>
</html>
I downloaded the VisiFire 3.6.1 Silverlight binaries and copied into the same directory as the index.html
I updated the web.xml with the MIME type:
xamlapplication/xaml+xml
xapapplication/x-silverlight-app
I deployed it onto my local JBoss AS, but the portlet is blank
I have been google around but could not find any useful information on how to deploy a portlet contains VisiFire Silverlight chart onto JBoss Portal. Have I don't anything stupidly unreasonable? Any hints or sample codes would be appreciated!
Thanks in advance
There is no "Silverlight" icon on the right click drop down menu.
I think JBoss is not allowing to download the file SL.Visifire.Charts.xap. Please check whether SL.Visifire.Charts.xap and Visifire.js are uploaded at correct directory. Also type the direct path of SL.Visifire.Charts.xap in address bar of the browser and try to download it.
Also try setting direct path like below
var vChart = new Visifire("http://www.example.com/SL.Visifire.Charts.xap" , 500 , 300 );
Can you please check whether you are able to see Silverlight on right click.