I am using CGI DSPSTMF command to display stmf file on web browser. I am copying a spool file to a stmf file using CPYSPLF *STMF option. Once copied i am passing IFS location to DSPSTMF command but it is going to download automatically and when i open the download file i am getting all Junk data any idea why?
Also, i noticed it is using CONTTYPES file in CGILIB and on my server it is empty. What should be the values in it and what should i do show correct data instead of junk. I tried to use different methods to copy the file to IFS like used cpytostmf instead of cpysplf but on IFS file looks correct not the download version.
What CCSID is the resulting stream file tagged with?
use WRKLNK and option 8=Display attributes
If 65535, that tells the system the data is binary and it won't try to translate the EBCDIC to ASCII.
The correct fix is to properly configure your IBM i so that the stream file is tagged with it's correct CCSID.
Do a WRKSYSVAL QCCSID ... if your system is still set to 65535, that's the start of your problem. But this isn't programming related, you can try posting to Server Fault but you might get better responses on the Midrange mailing list
I'm looking for a way for PhpStorm to watch a file - so that every time it changes, it should sync that file to the remote server. And the 'Upload external changes'-option (with the 'On explicit save action') is not working for me. It's close - but no cigar. It makes me save the css-file twice - and only after the second time I save the scss-file, then it uploads the gulp-compiled-style.css-file, as I would like it to do after the first 'save'. I know it's an itty-bitty thing - but for something that I easily do 200-400 times per day, I would like it to run as smooth as possible. It's both the time I spend saving the file twice - but it's also the doubt in my mind, every time something doesn't act like I want it to - then I always have to check first, if the file is uploaded properly.
I'm working with Wordpress and I have a 5-8 SCSS-files, that are being compiled using gulp. The gulp-procedures are quite comprehensive (autoprefixer, merge-media-queries, minifycss, etc., etc.), so it takes a couple of miliseconds for the file to be compiled. I assume that it's that compile-time that makes PhpStorm 'miss' that the style.css has changed - and therefore don't upload it on the first 'save'. Because sometimes everything is uploaded after the first 'save' - but it's only every 8th time (or so).
Extra fun fact (that may indicate where the body is burried): If i run the gulp watch from a terminal in the background, then I have to save the file, wait for at least 2-4 seconds and then save again, before the gulp-compiled-style.css-file is uploaded. If I press 'save', 'save', 'save', 'save' - with less than those 2-4 seconds pause, but with only 1 seconds pause, then PhpStorm never sync's the gulp-compiled-style.css-file.
If I run the gulp watch from PhpStorm's Gulp-integration (not the terminal, but the Gulp-prompt), then I can save twice in a row with only .5 second pause between (as soon as the progress bar in the bottom disappears) - and then it uploads (every time, - consistently).
It's only the upload of the gulp-compiled-style.css-file that is the problem. Everything else is working perfectly.
Here's what I have tried:
**Attempt1) I've previously used Atom, where the FTP-configuration was established using a plugin with a .ftpconfig-file. In that file, there was a 'watch: []'-parameter, where I could specify a file to 'watch'. That worked wonders!! I've tried finding a plugin that did something of the sort - but couldn't find it.
**Attempt2) I read one of the support-pages, concerning the same. It seems like that if the SCSS-files are compiled using PhpStorm, then it knows to upload the style.css-file (after it has been compiled). I can't setup my gulp-file using PhpStorms' SCSS-compilation (since it compiles it and then pipes the content through multiple procedures. And if I change projects and have to set that up every time, then that would be a pain to maintain.
**Attempt3) I thought about making a macro or something. And then seeing if I could remap CMD-s to 'save-current-file-and-execute-the-macro'. But then if I don't edit the scss-file (but just some php-file), then it would still upload the style.css-file. It's by no means a pretty solution, - but it just shows how far out in the ropes I've been, to find a solution to automate this.
**Attempt4) I thought about building it into the gulp-file, that it has to upload the style.css-file after compiling the style.css-file. I thought about getting the host and the username from the .idea-folder - and getting the password from the keychain and then establishing the sftp-connection that way. But it quickly became extensive to do this, so I hoped that there was an easier/better way.
Addition1
LazyOne asked, what I had tried with the File Watchers, so here goes. I tried making PhpStorm compile the Scss-file (so PhpStorm basically did what Gulp does for me today).
So that was a SCSS-filewatcher (file type), the scope was the SCSS-files in my project, pointed the 'Program' to my ruby-installed scss-file, etc., etc., etc.
However... I realized that it was difficult to get PhpStorm to do the same thing to the Scss-files as the Gulp-file does.
The Gulp-file that I'm using is supplied with each project (as a default) - and we're several webdesigners working on the same projects. So if I suddenly do something other that use that Gulp-file, then I'm pretty sure that I will have to be able to produce the exact same result, - otherwise I'm pretty sure that my colleagues will skin me alive. But I made it as far as to have this as my Arguments, before I gave up (I still need to do several things in this line, before it does what my Gulp-file does):
--no-cache --update $FileName$:../../style.css --style compressed --sourcemap=none
... However... When doing that, then I could conclude that the style.css-file was uploaded on every save (score!). Which means that if I can just setup some kind of File Watcher, then hopefully PhpStorm will watch that file and therefore upload it after Gulp has compiled the style.css.
So I tried to make a File Watcher, that watches the style.css-file - but I didn't know what to put as my 'Program'. Since basically I want PhpStorm to poke the style.css-file three times with a stick - and thereafter realize that the file has changed and upload it to the server. Is that possible to do automatically?
Ok. Here's how it's done!
The important part is that PhpStorm watches the style.css-file. It will do that, if you point a File Watcher to look at the file. Now, at first I tried running the Gulp-file with a File Watcher. Then I tried compiling the scss-files with the File Watcher. But that is not necessary. The important part is the 'Output paths to refresh' (as #LazyOne pointed out in the comments). So the best solution I've come to, is to make a bash-script that does nothing. It looks like this:
#!/bin/bash
sleep .01
I've called that 'donothing'. I don't have to do the sleep .01 for it to work, - but it doesn't stop it from working (based on the 20 upload tests I've done). And in my mind, it's better if there's a short delay, after the scss-files are saved (so the gulp-integration in PhpStorm have time to finish compiling the style.css-file).
Here's the setup of my File Watcher:
The scope is a custom-made one, and I've set it to this:
file[PROJECTNAME]:wp-content/themes/THEME_NAME/assets/sass/*
But I assume the scope could just be the entire project, since it's just looking for when SCSS-files change in that scope, before the 'Program' is executed (if I've understood this whole File Watcher thingy properly).
And I'm working on a project, where the SCSS-files are at
/wp-content/themes/THEME_NAME/assets/sass/STYLEDIRNAME/
And in this case, then the 'Output paths to refresh' should be set to something along these lines:
$FileDirRelativeToProjectRoot$/../../style.css
or
$ProjectFileDir$/wp-content/themes/THEME_NAME/style.css
And if you unfold 'Other options', then you have to set Working directory to be the root of the project, for it to work:
/Users/USERNAME/dropbox/foo/bar/
A downfall for this solution is, if PhpStorm are faster than the Gulp-task, - since it would then upload the style.css-file before the Gulp-task has finished compiling it (and therefore uploading the old or an incomplete file). That didn't happen during my 20 brief tests. But if it happens, then I would set a higher delay in the 'donothing'-file and see if that solves it.
Addition 1
I just experienced, that it wasn't working - that it didn't upload style.css upon every compilation/save (but I could swear that the setup was correct). So I restarted PhpStorm and then it worked. I tried restarting the gulp watch-process first, - but that didn't make a difference.
Another, much simpler solution is to set the File Watchers scope for SCSS files to "All Changed Files".
This is what my File Watcher setup looks like.
It compiles the .scss file, copies the minified .css into another folder, and then automatically uploads both files to the server if you have "Auto upload" enabled.
(You might note that I'm not using the SCSS compiler but the PHP-based PSCSS, which is about 70% faster and can be installed via composer global require scssphp/scssphp).
I'm giving the flag -Denable-debug-rules, which the documentation says should print something to a log at least every 5 minutes, according to http://graphdb.ontotext.com/documentation/standard/rules-optimisations.html
Unfortunately it's not, and I need to figure out why inferencing is taking so long.
Help?
The specific files is http://purl.obolibrary.org/obo/pr.owl and I'm using owl2-rl-optimized
Version graphdb-ee-6.3.1
An exchange with GraphDB tech support clarified that the built-in rule sets can not be monitored. To effectively monitor them, copy into a new file and add that file as a ruleset following http://graphdb.ontotext.com/documentation/enterprise/reasoning.html#operations-on-rulesets
i have a page with sstv (slow scan TV) jpg images, 12 of them in a table..they change as the ham operators send the sstv.. my question ..how can i set the images named 1.jpg - 12.jpg to be downloadable in a zip file via a download link ..the zipping would need to occur server side when the download link is clicked..is that possible? ...... or.. how can i add a download link under each individual image if the complete 12 zipped up isnt possible?
thanks for any help... i have tried .htaccess to make the images themselves downloadable and could not get it to work, it broke the complete page when i did i think because i use htaccess to password protect the site for a group of club members...
Zipping the files up every time someone clicks the download link would probably be costly in terms of server-side processing. If you still want to do it, I would suggest writing a dynamic script in something such as PHP to handle doing it.
However, what I would suggest is writing a short cron script (Windows Scheduled Task if you're on a Windows box) to periodically zip up the files to a predetermined filename and location. For example, a simple cron entry might look like:
15 * * * * zip /path/to/downloadfile.zip /path/to/zip/images >/dev/nul
Use crontab -e to edit your crontab (or sudo crontab -e to edit the root crontab). Then put a link to the downloadfile.zip to let people download it. Yes, it's generated every 15 minutes (feel free to tweak the timing) instead of on demand, but that's generally better to give you consistent server performance.
If you absolutely must have it generated on demand, look into, for example, PHP's Zip library of functions to do the actual compression, and something like tempnam to allow you to save the file to a guaranteed unique temporary filename and server it to your client.
I have a small VB .Net application that, among other things, attempts to substitute system wide typed text by the user(hotstrings concept). To achieve that, I have deployed 'ahk2exe' and 'AutoHotkeySC.bin' with my application and did the following:
When a user assignes a new 'hotstring':
Kill 'hotstring' exe script file if running
Append new hotstring to the script file (if non exist then create a new one)
Convert edited/new script file to exe (using ahk2exe)
Run the newly converted script exe
(somewhere there I also check if the hotstring has been already assigned)
However, I am not totally satisfied with this method for the following two main reasons:
The extra resources deployed with the application.
Lag: The time it takes for the system to kill the process and then restart it takes a minimum of 5 seconds on my fast computer and more on other computers. That amount of time is much more than the time it takes the user to assign the hotstring, minimize/close the window and then test his/her new hotstring. When the user does so initially with no success they will think the process failed. So this method is not very good for user experience.
So, I am looking for a different method or implementation. May be using keyboard hooks? Or maybe adding a .dll library that achieves the same. Are there any resources you know about that might help (free or commercial)? What is the best way to achieve my desired goal?
Many thanks for your help.
Implementing what Autohotkey does would be a pretty non trivial task.
But I'm pretty sure that AHK supports an "autoreload" option for scripts
googling "autohotkey auto reload" turned up several pages discussing that very concept. IF that worked, all you'd have to do is update the script file and that's it, AHK should automatically reload the script.