I want to use the code mirror addon edit/closebrackets.js in the mobile browser, how do I do it? - codemirror

I used a translator, so I apologize in advance for the text is not smooth.
I want to close parentheses using the edit/closebrackets.js addon to Code Mirror.
However, while it works normally on PC, the corresponding add-on does not work on mobile.
Where do I need to modify the addon's code to make it work properly on mobile?
Or is there a better mod?

Related

Lit not working, not giving back anything from the custom web component

I'm trying to learn how to use lit as a dev tool for making web components and I'm having issues with making it run on my system.
In the documentation it states that you just need to run the command "npm i lit" on the folder of your project and after being successfully installed it should be running.
I did the "simple greeting" test also available on the documentation but it's returning me a blank page. I even copy-pasted both ts and html. Still blank page.
on my html, if I drill something into it, it shows on the page, so I know it's something regarding the custom web component (named simple-greeting).
I already did a course on native web components and I understand how it works, but I never worked with lit.
Isn't it just to import the necessary things from the respective library (like html, css, LitElement) and use it in TS?
Am I missing something? I am really confused and can't find anything online.
Thanks in advance.
It seems I forgot to run the web server. Still a long way to go, I guess.

How can I control a function on a raspberry pi based on a button selection on a website that I create?

I'm doing a DIY project that requires me to activate motors based on selections made on a custom website I'm creating on localhost. I'm really new to raspberry pi's and I really have no idea of how to connect input on a website and make it do something in the real world. My website is almost done and I'm thinking about whether it would be a better idea to create a pop up or to link it to a completely new website. If it is possible to make the raspberry pi recognize a link and notice the browser accessing the link, then I rather make a new html page for the function. If there is another way to do so like by adding a photo from the local folder and then making the pi look for the file being accessed locally. Although I have these ideas about how to do it, im really lost on how to go about it in the coding realm, im new to coding and python in general. Any help is really appreciated.
One of the ways you can do this is by using PHP to write to a txt file or database.
Then using a python code to capture the echo-ed value of in the text file or database and then manipulating the GPIOs based on this value.
If you have a single or only few motors to be manipulated then the text file way should do fine. You must also note that although this is very simple to implement, and you'll find all the necessary code online, it is far from secure.
Using a database is better if you have more no. of entities to control. It'll also be a bit more secure.

how to get browser window resolution while loading Unity3D

Really need your input. I have unity furniture configurator and client decided he wants make it fully adjustable depending on browser window. Would be perfect if unity can get resolution while loading.
I found this http://helloracer.com/unity/ - it is exactly same thing i need.
I cannot figure out how to achieve this result
Thanks!!!
Having in mind you tagged your question with php - you can not do that using it. You need to do it with javascript:
window.screen.availHeight
window.screen.availWidth
and somehow transfer it to your php code, which later decides what to do based on that. You can achieve it using 2 http calls in the same page.

How can I program a button on an Access form to link to a browser window that looks up multiple addresses on Google Maps?

My problem is very similar to the one posted here:
http://www.utteraccess.com/forum/Plotting-Addresses-Maps-t1968130.html
except that thread never found any solutions. Basically, I'm working on an Access form that has a datasheet as a subform. Upon clicking a button on the main form I'm trying to make it so that a browser window opens up and, using the address columns from the spreadsheet data in the subform, plot all the address markers listed. I've looked up a lot of ways to attempt this but I've yet to find a way that seems to work.
I'm not even sure if it's possible to plot multiple markers on Google Maps, but according to research (and after trying it myself) it seems like it isn't, although I don't want to rule it out entirely because I'm still not 100% sure. However I know both Google Earth and batchgeo.com do allow this. I still want to try and do this on Google Maps, but if that doesn't work I want to try to do it using batchgeo.com and if that still doesn't work, then Google Earth (I don't want to make the user download external software if possible).
If it helps, from what I've read API's seem like a useful tool, though I'm not sure how to apply it to an Access form, it seems more like a way to embed to already existing websites.
I'd really appreciate if someone could help me figure out how to approach this problem!
Maybe this would help?
http://ramblings.mcpher.com/Home/excelquirks/getmaps/mapmarkers
It is Excel but should be translatable.
Here is another example, this time using Access:
http://www.utteraccess.com/forum/Google-Maps-Multiple-Mar-t1973499.html
...from what I've read API's seem like a useful tool, though I'm not
sure how to apply it to an Access form, it seems more like a way to
embed to already existing websites.
You're right. There's no way, that I'm aware of, to embed a Google Maps object in a form (like an ActiveX control). Microsoft MapPoint is a software product that lets you do Map integration by way of an ActiveX control (no need to use HTML and/or javascript).
What I usually do on a project like you're working on is I get my HTML page working the way I want it to, outside and independent of MS Access. You should be able to program and test the HTML file locally without having to use an actual web server. Just use something like NotePad++ or Sublime Text Editor 2 to write your HTML and Javascript and then open the file in your browser to see if it works. I'm quite sure you'll need to use Javascript in your HTML page to make this work. That's what the Google Maps API is all about.
After you have your webpage working, then you will have to go into Access and write code to create that web page on the fly with the address data for the current data set. You can just write it out to the Windows Temp folder and then open your browser control that that web page.
Julian Knight's answer links to more specifics on how to create the HTML page on the fly. It looks like gobble-de-gook, mostly because it is. Outputting HTML/Javascript/CSS from VBA is far less than optimal. This is why you troubleshoot it outside of Access, as much as you can.

Silent Printing from Web Page

I am working on a web application that needs silent printing (without print dialog box) with client side printer.
After some research we found that we can make it work using ActiveX and Foxit Reader.
Currently it works great but it constraints us with IE only and we want to make it work with Firefox and Chrome as well.
I know there is no direct code to make it work, but there must a work around?
What I need is the point to start e.g. Chrome/Firefox plugins to access local printer - or make windows service that runs in background in the client side, change browser settings, use ActionScript etc.
It will also be great if someone also illustrate how Facebook access local webcam from its website it may make about accessing clients peripherals from website. Thanks in advance.
For anyone who still wants information regarding printing on Chrome and/or FireFox without the use of ActiveX, extensions or client-side scripting, please see my answer to another question similar to this.