$ sign does not do anything in Sublime text (win10) - ide

I just started learning how to create a website and am watching tutorial videos. When they write $-sign it turns into green and you can see that it recognizes it, but in my case it does nothing, like it would be a random character (it remains white all the time and even if I write the same lines as it is in the video, I can not get the same results).
If you would like to see here it is:
$dayofweek = date("w");
echo "$dayofweek";

Related

VBA PPT AddEffects to Pictures Inconsistently Applies Effects

I am getting really frustrated. I have code that works, as in it literally does what it says it will do, however, it doesn't always correctly read my images on the slides as images. I even went so far as naming them all "Picture" and using it as a variable. It actually worked for a second but then 5 pictures in it stopped working again.
This is the code and it DOES work:
With shp.Fill.PictureEffects
Dim eff As PictureEffect
Set eff = .Insert(msoEffectSharpenSoften)
eff.EffectParameters(1).Value = 1
End With
Why will this block of code not work on all of my images? Even when it throws the error it WILL sharpen the image as intended, but then stop??? I do not understand the problem or what a possible fix might be. This is literally the last bit of my work process that I need to solve...
For the record, I have code that will adjust the Height, Width, and center the image perfectly on the slide with no issues whatsoever, code that will put images in a placeholder and then format text... but for some reason THIS block of code won't work...
I have also tried deleting the image, manually reuploading it using the Insert Picture function in the program and it still doesn't work??? Is it possible this has something to do with the fact I am using PowerPoint 2013?
I tested it a different way by changing the picture format, it seemed like it was working but it didn't. Whether I automate it, whether I insert picture, no matter what I do, whether it's in a pre positioned container or not, this line of code refuses to work. Why are my images, in both PNG and JPEG format not being accepted by PowerPoint VBA?

Tesseract : Line detection too sensitive

I am trying to detect the .pdf file text.
They are first converted to an image, then given to Tesseract.
The detection is good but they make too many line breaks.
For example if the file is a bit panched on the right, the sentence:
"I like Tesseract for reading text"
become:
"text read for Tesseract like I"
And that's already after a treatment because the raw text is :
"textreadforTesseractlikeI"
The bug occurs since the source .pdf are in 300DPI, I understand that the problem comes from the resolution but I cannot find how to solve it.
Here is my Tesseract cmd Tesseract.exe dummy.pdf dumy-ocr.pdf --psm 12 --dpi 300 -l bvr+fra+eng+deu hocr pdf
First, I would like to solve the problem of too many lines,
Then I would find out how to make the image perfectly straight
Thank you in advance for your help
https://i.stack.imgur.com/crmdO.jpg
You seem to be working backwards.
The "many" lines and thus word reversal are due to the anti-clockwise rotation.
text"
reading
for
Tesseract
like
"I
Fix that first and then the words will naturally all be placed on the same lines.
If using Leptonica in conjunction with Tesseract it is supposed to help with the pre-processing including deskew.
However there is a very small but powerful open source GUI and Command Line tool for Windows, Linux, and macOS that you could use from a shell see https://galfar.vevb.net/wp/projects/deskew/ it is also available on GitHub as an appveyor CI artifact so for the most up to date version (currently 5 days ago) follow the green tick at https://github.com/galfar/deskew

ROIs in Digital Micrograph EELSspectra behave strangely after command "EELSSubtractPowerlawBackground()" - Bug? (GMS 2.3)

When I run the script below on a DM EELS spectrum that already contains background and signal ROIs, it is ok if I don't show any images.
ImageDocument imdoc = GetFrontImageDocument()
image i0 = ImageDocumentGetImage(imdoc,0)
image subt = eelssubtractpowerlawbackground(i0,800,900)
//image irrelevant = realimage("irrelevant",4,100,100)
//showimage(irrelevant)
But if I show any image after running the background subtraction command (activate the last 2 lines for example) the pre-existing ROIs on the initial image are changed (sig disappears and bckgd is moved to the new position).
This is despite i0 being in theory a new image, not part of the initial one.
Creating copies within the script and working on them appears in any case not to solve the problem.
More surprising is that if I first make a duplicate of the initial image and run the script on that, then close the new windows and the (modified) spectrum on which the script was run, then try and duplicate the initial image, the duplicate has the modified ROIs rather than its own. A second duplicate seems to be ok. I have no idea what's going on. Grateful for any ideas.
(The problem was initially part of a much bigger script in which I need to show images, I've reduced it to the essentials here). I'm using v2.3.2.
I have tested your script on an EELS Spectrum with ROIs in GMS 2.3.3 and in GMS 3.2.2
GMS 2.3.3:
It does not seem to happen due to the ShowImage() but rather whenever the display of the image the last Background/Signal ROI was used on is refreshing its display. You get the same behavior when you run your script without the last two lines, but then click on another image (to select it) and then the spectrum again. And you get the same if you've used the background-subtraction ROI on a completely different image and then run the script. It messes up that last images' ROIs.
GMS 3.2.2: Doesn't show this. All is fine regardless what you do.
So, from these two tests I would conclude it is a bug in GMS 2.3 which has since been fixed.
The behaviour is indeed very odd, and I see nothing wrong with your code.
The bug seems to be that the command eelssubtractpowerlawbackground() messes with the settings of the last active signal-extracting ROIs, regardless on where they are placed on. It doesn't matter what the input image is. It seems to "reuse" these last ROIs.
Unfortunately, I don't know a good workaround for it.

Converting link-like texts to links

I just noticed some very strange behaviour in my pdf.
I have a link in there (just pure text!) "www.example.com".
Now when I view this in my reader (Sumatra & Adobe) this link has a "hand" icon and I'm able to click on it. Even though I just put it as real text in there.
So I converted it to PS (pdftops ), found the text (\000w\000w\000w etc), and just changed the first "W" to "A".
Then I convert it via ps2pdf back into a PDF file, and wonder... No link anymore. (it shows now aww.example.com).
So, back to the ps file, I change the a again to w, and re-convert.
Suddenly the link is there again.
Because of this I'm pretty certain this is some feature with the reader that it's being too smart for its own good.
Which brings me to my question: how can I turn this off? Is there any comment/setting I can give which would disable this behaviour for that specific PDF file?
[the problem is that the reader is just adding "http://" in front of it to create the link, and when clicking, my reader warns me that the link is not safe. Talking about insults and injuries!]
Thanks!

odd recording qtp

when i was creating text chepoing in qtp the recording results getting odd recording results
the scanned input is
alt text http://img22.imageshack.us/img22/8255/capture1pa.png
and i get output like this insted of secs it display sees
alt text http://img22.imageshack.us/img22/5273/capture2c.png
and i made change in text like this sees to secs
alt text http://img801.imageshack.us/img801/7492/capture4f.png
but when i run the test the test result will be
alt text http://img94.imageshack.us/img94/2575/capture3z.png
I captured many times but it display same as above. I don't understand how display like this, please help me.
The problem is that QTP recognizes the word secs in your application as sees, which causes the checkpoint to fail. Most probably, this happens because the text recognition is performed using OCR, which can't guarantee 100% accuracy. You can try changing the text recognition mechanism to Windows API and see if that helps. To do this, go to Tools > Options > General > Text Recognition and set the Use text recognition mechanisms in this order option to either Use Only Windows API or First Windows API then OCR.
If this doesn't help, you can replace the word secs in the checkpoint's Checked Text with a regular expression that matches both secs and sees:
[0-9]+ days, [0-9]+ hours, [0-9]+ mins, [0-9]+ se[ce]s
Also, make sure that the Regular Expression option is turned on for the Checked Text.