What do I add to requirements.txt for font awesome (font-awesome) - font-awesome

SO yeah I'm pretty new to this I used font-awesome for some icons (free version) but after i tried to deploy it to heroku it got some errors, I highly suspect that it is due to requirements.txt, can anyone tell me what I should write in there? I tried font-awesome-free==16.0 but that didnt really work...

Kind of this requirements.txt. You can create
Flask==0.8
Jinja2==2.6
Werkzeug==0.8.3
certifi==0.0.8
chardet==1.0.1
distribute==0.6.24
gunicorn==0.14.2
requests==0.11.1
So that it could fetch or default will work. This is an example

Related

ErrorException Cannot redeclare class Concrete\Package\MolliePlugin\Controller in Concrete5 website

I'm new here, so I hope I'm doing this right. I inherited a portfolio of websites and one is a Concrete5 website. Unfortunately I don't have much experience with Concrete5 and I directly start with a site with an issue :(.
When I go to https://www.example.nl/index.php/dashboard/extend/install I get the following error.
Whoops \ Exception \ ErrorException (E_COMPILE_ERROR)
Cannot redeclare class Concrete\Package\MolliePlugin\Controller
Image of the exception
I hope that someone can give me some guidence on this.
Thanks
Okay I found the issue when looking in cPanel: there was mollie_plugin and mollie_plugin_not_working. I guess that my predecessor had an issue and renamed the folder and added the extension again.

Google model-viewer - how to set max zoom?

I'm very happy about what I'm able to do using Google model-viewer. It's relatively configurable, but there's more I'd like to be able to do with the camera-- for instance, setting a max zoom/min distance from the target. I've found code that seems to suggest how to modify this, but I don't know how to override the script delivered via the CDN. Is my only option to download using npm?
Excuse my naivete!
You can see this issue Zoom in/out #1172
Now it's possible to use camera control settings:
max-camera-orbit
min-camera-orbit
max-field-of-view
min-field-of-view
model-viewer(
src="https://cwervo.com/assets/3D-models/logo.glb" ios-
src="https://cwervo.com/assets/3D-models/logo-3m-scaled.usdz"
auto-rotate
camera-controls
min-camera-orbit='auto auto 100%'
max-camera-orbit='auto auto 100%'
min-field-of-view='110deg'
max-field-of-view='110deg'
)
Source: https://codepen.io/schmidtsonian/pen/VwvEwVw
I'm the maintainer of the <model-viewer> project. You aren't crazy; we haven't added the ability to control this yet.
But don't worry! We are planning to add this feature to a release very soon (currently planned for v0.7.0). Please track https://github.com/GoogleWebComponents/model-viewer/issues/458 for progress!
[edit] Also to answer your question about NPM: you can download the module from NPM and assemble a customized version of the pieces that make up <model-viewer>. Also, you could fork the project and patch it that way. I don't necessarily recommend these things, but they are options if you are desperate. If you go this route, I highly recommend asking questions on our Github project page. We are friendly and responsive to everyone.

Need to have dynamic background image in Ruby on Rails view

I need to have a dynamic background image in a Rails view. I've tried a few different code samples I've found on Stack Overflow for dynamic background images, but none of them have worked for me. Here's what I've tried so far:
<style media="screen">
.my-image { background-image:url("mypicture.jpg");}
</style>
<div class="my-image"></div>
It works fine when I substitute a URL from the web (i.e. instead of "mypicture.jpg", I used "http://lorempixel.com/400/200" which worked fine). However, it doesn't seem to work when I try to use an image stored on my hard drive. It also works fine when I hard code the CSS file. And yes, the image is stored at \app\assets\images. I am using Ruby 2.3, Rails 5.0 and Windows. Any ideas on what I might be missing?
You can use an image_url:
.my-image {
background-image:url(image_url(mypicture.jpg));
}
Take a look at AssetUrlHelper in the Ruby on Rails API docs for future information.
As suggered by Shah, this is supposed to work :
background-image: image-url("mypicture.jpg")
or
background-image: asset-url("mypicture.jpg", image)
Did you try to run rake assets:precompile , then restart your server ?

Why always getting Nullpointer when doubleclicking link on XPage?

I have a difficult problem: I always get a Nullpointer exception on my webpace, when I
rapidly click on the same link. Or when I reload the page rapidly.
This is the error I get:
java.lang.NullPointerException
com.ibm.xsp.webapp.FacesServlet.acquireSyncToken(FacesServlet.java:285)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:161)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:653)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:476)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Question: Can someone explain in detail what this acquireSyncToken does? Maybe then I can find the bug...
In my XPages I use
sessionScope.get(key) // same with applicationScope
sessionScope.put(key, value) // same with applicationScope
a LOT ;)
I tried very much, e.g. to wrap my lookups within
synchronize(applicationScope){
// lookups and so on...
}
and stuff like that, but that only made it worse, so I removed the synchronize-stuff...
Environment:
Domino Server 8.5.3 FP1
XPages
testing on modern Browsers like FF, Chrome
MacOS / Win7
Architecture:
I have one BIG xPage, where I basically add some CustomControls and due to the current URL embed another XPage.
Inside the CustomControls and XPages I have more Custom Controls and I added some Views as Datasources and did the wildest things with "repeat controls" and SSJS inside Computed Fields.
The heavy-weight DB-Lookups are cached in the applicationScope.
For more Info, please ask!
Thanks in advance!
This is a known issue. IBM advises to downgrade from FP1 or FP2 to 8.5.3 or UP1.
See Dojo xhrGet with sync:false issue with xe:viewJsonLegacyService and Domino 8.5.3 SP1 or http://www-01.ibm.com/support/docview.wss?uid=swg1LO71603

Embedding fonts: "Font with plain weight and style was not found at..."

I am trying to embed a font in my Flash Builder 4.6 project, so far unsuccessful.
I searched around and found this fix, adding "-managers flash.fonts.AFEFontManager" to the Compiler, doesn't work. I've embedded tons of images to the same project, but I'm not sure what's going on with the embedding of fonts.
I get this error:
Multiple markers at this line:
-unable to build font 'Chinese Rocks Rg'
-exception during transcoding: Font for alias 'Chinese Rocks Rg' with plain weight and style was not found at: file:/E:/StarlingIntro - >Finished/src/../assets/textures/chinese_rocks_rg.otf
-Unable to transcode ../assets/textures/chinese_rocks_rg.otf.
For the following code:
[Embed(source="../assets/textures/chinese_rocks_rg.otf", fontName="Chinese Rocks Rg", fontWeight="normal", advancedAntiAliasing="true", embedAsCFF=false, mimeType = "application/x-font")]
public var ChineseRocks_FontClass:Class;
public var chineseRocks_textFromat:TextFormat = new TextFormat("Chinese Rocks Rg");
What do they mean was not found? It's the same path as everything else I've embedded. Does it mean that it's expecting a certain "style" from the .otf file? Wut?
Thanks for any info on this!
PS: it gives the same error for other fonts as well, for example MyriadWebPro.ttf.
[EDIT]
Okay, here's what's going on. I am using this embed code right now:
[Embed(source="chinese_rocks_rg.otf", //yes, it's in my src folder because I'm paranoid
fontName = "myChineseRocks",
mimeType = "application/x-font",
fontWeight="normal",
fontStyle="normal",
unicodeRange="englishRange",
advancedAntiAliasing="true"
)]//embedAsCFF="false"
I have commented out the embedAsCFF, because I tried it with the -managers=flash.fonts.AFEFontManager compiler parameter. None of the two work.
This is in Flash Builder 4.6, using Flex SDK 4.6.0. Now, if I switch to Flex SDK 3.6.0, the error seems to go away, but I can't use 3.6.0 since I'm using the Starling Stage3D framework.
Is it possible that stuff changed from 4.0 to 4.6, and now your article, Divillysausages, (which really illuminated me btw) doesn't apply to it?
[EDIT2]
I solved it! With the help of Divillysausages and his patience :).
Basically, I was completely stupid. I had a "#" and 2x" ` "s in the actual path to my project. I KNEW having those dumb folder names would screw my stuff up some day! And sure enough it did -with Java, but I moved Eclipse out of there a long time ago and forgot about it.
Anyway, I moved the flash project to a more friendly directory and included the embedAsCFF="false" and it worked.
Also, having -managers=flash.fonts.AFEFontManager in your compiler arguments or not, seems to not matter.
fontWeight="regular", doesn't exist. You're probably looking for fontWeight="normal" (or "bold", or "heavy")
Basically what your error is telling you that in the font you're trying to load, it couldn't find the weight "regular", so it can't be embedded.
I wrote this a while ago to explain font embedding, it might help: http://divillysausages.com/blog/as3_font_embedding_masterclass
Be sure you are not overwriting the default flex config file. If you need some config property append them in Additionnal compiler arguments : -load-config+=configFile.xml rather than -load-config configFile.xml It solve our trouble
I had the same issue embeding .otf font to starling project.
Resolved it by converting the otf file to ttf
Good luck