Lyx reconfiguration error on Mac and how to use .cls and .bst files on Lyx - configuration

Recently, the forward search on Lyx all of sudden stop working and the customized layout also stop working...
So, I try to reconfigure by clicking Tools - Reconfigure, but it says "The system reconfiguration has failed. Default textclass is used but LyX may not be able to work properly. Please reconfigure again if needed."
If I select customized document class then it says "Due to some error in it, the layout file: artticletheorem could not loaded. A default textclass with default layouts will be used. Lyx will not be able to produce correct output." I don't know what happened... It used to work well with no issue.
In addition, I would be very much appreciated if someone let me know how to use .cls file in lyx. It looks like I need .layout file, but how can I convert it? Also, I have .bst file for the reference style, but I have no idea how to use it in Lyx...

Related

Live templates in PhpStorm not useful

I installed "Live Templates for Angular" plugin in PhpStorm. I think something is wrong with suggestion (triggered with Ctrl + Space). I have to write whole snippet a-component to get to right suggestion.
Can I improve it somehow in settings?
Here is a gif:
It's because the template name (abbreviation) has a dash - in it ... and when completing IDE treats a and component as separate parts until whole match is found (in case you were doing some subtraction operation with two variables). At very least that's my understanding of this behaviour based on my own usage experience.
You may just change the abbreviation and remove - from there and it will be much better recognized as valid completion item. But that may not be ideal in long run (potentially may have issues when plugin will be updated with new templates etc.)
To bypass it ... just use Live Template specific completion where only Live Templates will be listed. For that invoke shortcut assigned to Code | Insert Live Template... action (Ctrl + J on Windows using Default keymap) at any time when you're typing your Live Template abbreviation.
Please make sure the applicable context yet.
Apply to the specified type of file, or check everywhere.
Like below:

Changing a value in a .config file based on a user's selection in an InstallShield 2013 install

Sorry - I'm a total newbie with InstallShield. I've inherited an InstallShield 2013 project that presents the user with a dialog that let's the user select a SQL Server and based on their selection sets a value in a config file. That's not working, so I opened the project in IS and looked in the Text File Changes under System Configuration and there's nothing there that would do this. So how do I figure out where this is happening (or not happening in my case), and then how do I get it to work? I need to set both data source and initial catalog in a file called server.config.
So how do I determine what the user selected and then save that in this file? It looks like I can set up a Text File Change, but how do I access the values selected by the user? And how can I figure out where the "code" is that is supposed to be doing this?
Thanks,
Ben
I would try to track this from the dialog and controls in question, or by following the value through a verbose log. Since you say it doesn't work today, there will probably be an interruption in the flow I describe below, and since you don't know the full state of the installation project, it may be hard to identify. So search from what you know.
Top down: what gets configured
First, find the dialog that you fill out as a user making the selection. Then figure out the property that the particular control is associated with. Now you've got a thread; pull on it.
Search in the direct editor for references to the property. If the property is named MYCONFIG search for just that: MYCONFIG. You'll probably find some sort of use that looks like [MYCONFIG] instead, which is typically a format string specifying to use the value of MYCONFIG. You may also have to search all the files related to your project, as Custom Action implementations can be code stored outside of your InstallShield project.
The use may be in a ControlEvent, CustomAction, or some other table. If it's in a ControlEvent, it may be used to set another property. Ditto if it's in a CustomAction that sets properties (type 51) which may be easier to understand in the Custom Actions and Sequences view. In that case, also search for the property that gets set.
If you find it in a table like ISSearchReplace* or ISXml*, or IniFile, it's probably part of the Text Files Changes, XML File Changes, or INI File Changes, and that view should make it easier to understand.
Maybe that thread dead-ends somewhere. A property gets set, but never referenced. So try to search from the other end.
Bottom up: what gets written
If there are text file changes, xml file changes, ini file changes, or custom actions that reference the file you need updated, see where they get their information. Try to follow it back. If they're well written, you should be able to identify the property (noting that one called CustomActionData comes from a property matching the name of the custom action it's used in), and then trace that further back using the same ideas as above, but in the other direction.
Where's the problem?
If the threads don't connect, that's probably the problem. It's also possible that a custom action lacks permissions but doesn't reports a failure, or that the file name or path got misconfigured somewhere along the way. Look for small things like that if things look like they should work but don't.
It turns out that I misunderstood the problem and the project was never set up to change that value, so all I had to do was set up a Text File Change and it works perfectly. Thanks #Michael Urman for the thorough response - I really appreciate it!

Fixing deprecated files

I'm trying to eliminate the console warnings (of deprecation) from the iron-flex-layout element.
When I load my app, I get the following errors in the console:
iron-shadow-flex-layout.html:12 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-shadow-flex-layout.html:12
iron-flex-layout.html:14 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-flex-layout.html:14
iron-fit-behavior.html:221 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
When I inspect the file paths, I see the following:
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-flex-layout.html
http://localhost:8080/bower_components/iron-fit-behavior/iron-fit-behavior.html
I am reluctant to go tinkering around and manually deleting files in my bower_components directory.
So, how can I fix these errors? What is the recommended best practice?
Edit
Here is the deprecated file on Github. Line 14 writes the console warning. But this deprecated file is not being imported anywhere in the app. (I know because I did a global search on the string iron-flex-layout/classes and, separately, on iron-shadow-flex-layout.html). Instead, I have done as the warning suggests; I imported iron-flex-layout/iron-flex-layout-classes.html everywhere instead. But the warning persists nevertheless.
I assume the element owners and Google overlords want to retain the console warnings in place (and not accept a PR which removes it). So, what is the best practice? Live with the warnings? (It doesn't seem quite right to edit my local copy and just comment out the warnings.) Or should I do something else? (Maybe there is another option I'm not aware of.)
Edit2
per #tony19:
I recommend setting a breakpoint in the deprecated file (on the console.log() line) to see who's importing it. – tony19
So now, I'm using this:
https://github.com/PolymerElements/iron-flex-layout/blob/master/classes/iron-flex-layout.html
<script>
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
debugger;
</script>
I'm seeing some information appear when the app reaches the breakpoint. But nothing so far indicates what's causing the import of the iron-flex-layout element. Or what to do to fix it.
Is there a command or something that can log what file imported another file? I've looked all over for how I might accomplish that. Could anyone please describe in detail what that might look like?
The warning indicates that an HTML file in your source or dependencies is importing ../iron-flex-layout/classes/iron-flex-layout.html, which is deprecated. The import must be in your tree somewhere, or else the warning wouldn't appear. I recommend setting a breakpoint on the console.log() line of the deprecated file to track down the offender.
If you're in control of the offending element that imports this deprecated file, you can update the import to use iron-flex-layout-classes.html that the warning recommends. Otherwise, you can petition the maintainer of the offending element to update their dependencies (or submit a PR ;).
I had this same issue today and thought the same thing. However, diving a bit deeper I found a few third party components were using paper-styles/paper-styles which called in iron-flex-layout/classes/iron-flex-layout.html. The reference it'd be there somewhere I'm certain. Hope that helps.

Conditional minification for specific bundles using System.Web.Optimizations

I am making use of System.Web.Optimizations BundleConfig in my project. I'm running into an issue with a specific jQuery plugin that I'm using on my site. If I add the file to my ScriptBundle it works fine in Debug mode but throws JavaScript errors when I am in Release mode (i.e. set Web.config debug=false). I'm thinking something isn't getting minified correctly.
All others scripts are not giving me any problems so I don't want to affect behavior for all bundles but is there a way to customize for a specific bundle to tell it to use a specific version in debug and the min version in release.
I know the default behavior is for it to look for .min files but I just can't seem to get this to work. Can anyone tell me what I may be missing here? Thanks for your help.
Here is example I split it out by self. This works in debug but not when i set debug=false in web.config
ScriptBundle layoutBundle = new ScriptBundle("~/jsbundles/jquery/layout");
layoutBundle.Include("~/Scripts/plugins/jquery.layout-latest.js");
bundles.Add(layoutBundle);
If you just want to turn off minification for one bundle, you can simply switch to a normal Bundle instead of a ScriptBundle and it won't be minified. Then it will serve that bundle in whatever form that you included without running it through minification.

MODX: where are new_folder_permissions and new_file_permissions?

Those are asked during the installation, but are not anywhere in config files\tables to change afterwards
EDIT:
The changelog states the following:
[#MODX-760], [#MODX-1080], [#MODX-1528] Added setup option to set new_file_permissions and new_folder_permissions in welcome view
[#MODX-760], [#MODX-1528] Removed new_file_permissions and new_folder_permissions system settings from setup
Seems kinda weird to me to do that... I am still in need to change them, though.
It appears that these should be in your MODX System Settings although I wasn't able to locate them in any of my own MODX installs (all Revo 2.1+). There's a chance they might be redundant or are for some reason not being properly created during installation (in which case it might be an installer bug).
You might be able to override them by adding those settings, like so:
Key: new_folder_permissions
Value: 0755
Do that and then try creating a new folder using the File Manager. Let us know if the correct permissions are then being used. If so I'll look at opening up a bug report for the installer.
They are not in System Settings, as they default to the PHP umask values, as they should. If you want to override them, you can do so by adding the settings "new_file_permissions" or "new_folder_permissions" to your System Settings.
apache/webuser needs to write to:
core/cache
core/export
core/config/config.inc.php [change back after install]
core/packages
core/components
assets/components
EDIT Sorry, take a look here: core/model/modx/processors/system/filesys/folder/create.php
they appear to be hard coded in that file.