Are this "*" mean anything like "." or ".." when we define path? I am not getting what those means. Why can't I specify the path in the usual way? I wanted to use paths like "../../XYZ" or something like that. But where is this asterisk coming from and what does it mean? Can I define the path in tailwind without using the asterisk?
If anyone can help I would be most glad. I am new to tailwind CSS so a little bit confused. Thank you.
The asteriks are used for dynamic imports for if you want Tailwinds to scan for content in any folder that is under ./src/ (asuming you are using ./src/**/*.{html,js} as content in tailwinds.config.js file. That means if you use ./src/**/*.{html,js}, the first two ** will look for any folder inside ./src, including subfolders.
So, for example, file path in your configuration file will most likely look like:
./src/**/*.{html,js}
./something-else/**/*.{html,js}
And these configured paths will "translate" to something like:
./src/folder1/file.html
./src/folder1/file.js
./src/folder1/subfolder/file.js
./something-else/folder1/file.html
./something-else/folder1/file.js
etc..
Which means if you add a file with the .js or .html extension in the specified folder(s), Tailwinds will automatically include these files in your project.
According to the documentation, you don't want to use really broad path configurations like /**/*.{html,js}' but rather use something like:
./components/**/*.{html,js}
See the Tailwinds content configuration documentation for more examples.
you can use * to match anything except slashes and hidden files,
and use ** to match zero or more directories.
check this site it will help you:
https://tailwindcss.com/docs/content-configuration
Related
I want to make some basic math stuff like Sum in Diagrams.net (old Draw.io).Is it possible ?
Exemple : I create a new parameter on a shape, like "Elec : T16" and make several copy on this shape. Is it possible to have a Text which can give me the total of the shape with this parameter ?
Best Regards.
I search a lot in the Diagrams.net blog but anything relevent.
This is not supported.
Regards,
I also wanted to do something similar and while it doesn't seem possible to do it completely in the software (as of v20.3.0), I did find a bit of a workaround: If you add properties to the shape data, then do File > Export As > XML, the properties will be there in the XML data. You can then count them one of two ways:
Open the XML file with a text editor like Notepad++, do a find on the value you want to count. If you choose "Find All" it will tell you how many times it appears.
Use a programming language like Python to read through the file and count the instances of that value.
Example:
I created a red circle in a new diagram, edited the text to say "RedCircle" and used Edit Data to add a property called TestValue, to which I assigned a value of 1. When I exported to XML it contained this element:
<object label="RedCircle" TestValue="1" id="6byQ5fOap-RXn7mFit_J-1">
Notes
When you export, make sure you turn off the Compressed option, this will create an unusable file.
Don't use Save As > XML, this will also use compression.
Diagrams.net natively saves in a compressed XML format, with only slight differences between that and the other compressed XML options, but it seems happy to also read in the exported uncompressed XML. I didn't test but if you go the programming route and want to take it a step further, it seems you could have the program update the value of a given "counter" element with the count, then open the XML file in diagrams.net to see the updated value and save it as a native .drawio file or publish in whatever format you like.
Edit: I discovered that under File > Properties you can turn off the compression on the actual .drawio file. If you do that you can just work from this file instead of exporting, but you might want to check the size of your file with and without it.
I'm sure a plugin could be created to do all of that within the app itself, but the other methods are enough for me at this point.
Hope this helps you!
I have a URL like this http://.../test/index.mpd. What I want is create another dash manifest that will contain multiple fallback URLs pointing the original manifest file.
For example for URL http://example.com/test/index.mpd (original manifest), the new manifest file should contain multiple CDN URLs like:
http://cdn1.com/example/test/index.mpd
http://cdn2.com/example/test/index.mpd
http://cdn3.com/example/test/index.mpd
I found something similar in following URL https://bitmovin.com/docs/player/faqs/how-can-i-utilize-the-cdn-fallback-feature-of-the-player. However, this example adds base URLs to the original manifest file and It does not work for dynamic manifest(live stream). Is there any way to do that. I cannot find good documentation or examples on dash manifest manipulation.
The proper way to do this is via BaseURLs. What do you mean by "It does not work for dynamic manifest"? BaseURLs work independently of the manifest type and definitely do work in dynamic manifests. Perhaps your player is at fault?
Another option is to specify the alternative MPD URLs in <Location> tags which allows you to specify multiple locations at which the MPD is available, but IMO BaseURL is better specified for CDN failover.
I am working with a framework written in .NET and I do not know .NET. I just need to change this one line where it checks to see if a variable exists, and I need to change it to instead just check on the server to see if the file itself exists.
Here is what is there now:
#if (!string.IsNullOrEmpty(Model.DrawingLink2){
Is this the correct code to change it to check if the file exists instead?
#if (File.Exists(/Portfolio/#(Model.FileNumber)/Images/Large_#(Model.FileNumber)_1.jpg))
You need to map that file, relative to the root of the web application, to the physical file system. You can use HttpServerUtility.MapPath for that. You also need quotes around string literals. The process running the code also needs read access to the directory (very likely the case, just mentioning it to be complete).
#if (File.Exists(HttpServerUtility.MapPath("/Portfolio/#(Model.FileNumber)/Images/Large_#(Model.FileNumber)_1.jpg"))
Say I have a project that I am deploying at
www.foo.com/path1/default.aspx
and
www.foo.com/path2/default.aspx
What would be the most reliable way to know if I was in the folder "path1", or "path2"? Can I grab that directly, or do I need to split() somehow on the Request.Url.AbsolutePath, or... ?
I just want to change colors, etc. based on which folder the user is in.
Thanks for any assistance!
If you want to code that logic directly into the page, then yeah, I'd go with split() on Request.Url.AbsolutePath.
That said, I'd consider storing this kind of setting in the AppSettings section of web.config. That way if you decide to change the color in path2, you just need to edit the web.config for path2. If you need to add a new path, just deploy there and edit the web.config as appropriate.
Yeah use Request.Url.AbsolutePath.
I do it to create Breadcrumbs, using Split to split the URL, then in your case I suggest to use Switch statement to change color based on the case of the Switch statement
Here is a great article about Paths in ASP.
Check out the MSDN docs on System.IO.Path. It contains a number of useful functions for dealing with path names. You can get GetDirectoryName() or GetFullPath() or GetFileName() or GetFileNameWithoutExtension().
I am trying to adapt a perl script that is used to generate a splash page for a public wifi installation. I was only given a couple example files to work from and no documentation. After several hours on the phone with the access point vendor I was told I could "just edit" the examples in order to design our custom page. I am trying to understand what is going on in the files.
I have .css file with the following in it.
#logo_container {
width: 528px; height: 58px;
background-image: url(${imagepath}body_title_line.gif);
border: 0;
}
I also have a .pl file with a variable $html_body_top containing the following snippet of html:
Acceptable Use Policy
What does the ${imagepath} refer to? Can I get at it?
I guess the root directory of your images. So if body_ title_line.gif is under /images/ the imagePath variable will probably need to reflect this.
CSS does not support variables so this is something injected by your PL script.
It's possible that's a variable substituted by Template Toolkit, not by your Perl script.
It's also possible the Perl script isn't using strict and, due to lack of declaration of the variable, is substituting a blank string in place of ${imagepath}.
Looks like a token that will be replaced by some sort of build script that runs over all the files in the project.
I would guess that imagepath is a variable from the perl script, replaced at generation time with the actual URL.
Looks like the perl script needs to be run with some value of $imagepath.
${imagepath} is equal to the variable $imagepath. The braces are generally used when variables are used in a string, to remove ambiguity