Need help on Converse.js - javascript

Am trying to create a chat application using Converse.js. As a student am trying to figure out where to start from in order to edit the code to suit my application. i can not figure out things like the entry point of the application.javascript. i need pointers. Looking for step by step video on youtube yields nothing meaningful for me, i can not find anything meaning full. The online documentation i think its for advanced users. Am looking for some sort of baby steps. what i want is able to edit the source code without a hustle
I tried running it on my localhost and and connecting. Wat am concerned about is editing the source code

Related

How to use a MongoDB Search Index?

I am currently learning to build websites using Node JS, Express JS, MongoDB and PUG. I followed the Mozilla tutorial to understand the fundamentals and now I want to add a search bar.
I would like to profit from MongoDB search functionalities, but after 3-4 days, I am still at basket case.
Can anyone explain how it is supposed to be done? The code is exactly as described in the tutorial/example website.
Also, I really don't understand how this whole thing works, are there easier features to add or ways to 'get it' better? The debugger is an ocean of variables as I have never seen, and the slightest alterations to the example makes the whole thing sink. I am crying inside. Any help or resource is very welcomed.
Here is a link to a public repo (since it's a lot of code for a blog post).
Public GitHub Repository

Meteor Search-Source Has vague instruction, not sure where this code goes

I am making an web app with meteor and I have already created a databse of a bunch of elements, now I need to be able to have them come up when a user searches for them. I found a package called search-source. It can be found here:
https://github.com/meteorhacks/search-source
or here:
https://meteorhacks.com/implementing-an-instant-search-solution-with-meteor
My problem is I cant figure out how to implement this into my meteor project. Their instructions are very vague and I am having trouble figuring out where to put the code they give, and what I need to change to make it search through my database. Any help would be great, thanks!

Photographic Decay by Page Hits

I'm a beginner in all things code, but am extremely interested in working with it. I am a photo student wanting to integrate digital media and my photographic processes. I was seeing if anyone had any advice for a problem I'm having. I started using Processing to achieve a "generation loss" compression effect to my photographs, and I want to move that to the web. So what I want to happen is every time someone goes to the specified web address, the application, will continue. For example, if I am the first user there, I see the first photograph in the sequence. If I am the 650th person, I see the 650th image. I was wondering if anyone had any suggestions, if I should continue trying to use Processing, or use a javascript, or any other means. Any help would be greatly appreciated! I can also post what I'm using in processing and such. Thanks so much in advance.
You have to break this down into a few pieces:
The first piece is the actual algorithm that "decays" an image based on some number. It sounds like you have that working.
The second piece is storing that number on a server somewhere so that it can be accessed and modified by various users over multiple sessions. It sounds like that's the part you're confused about.
There isn't a way to automagically store variables across multiple runs in a Processing sketch. After all, that entire thing is actually being run on the clients' computer! But what you can do is store the variable in a central location so that everybody can "share" that variable.
There are many ways to accomplish that, which is why people are saying your question is too vague. The most obvious solution would be to use a database, although using a database to store a single number might seem like overkill. You could also setup your web server to increment a number stored in a file every time the page is accessed.
Which approach you take depends on the setup of your program, web server, as well as your own comfort level with programming.
Good luck! It sounds like an interesting project.

Creating a note taking app using JQuery mobile and phone gap

I have an app i'm developing with JQ Mobile and PhoneGap. Within this app, i want to include a 'Notes Taking' page and it has to do the following.
Make new notes and save them locally.
Recall them whenever i need to,
Edit them and delete them
i could not find a good example to follow, i tried this:
http://tutorialzine.com/2012/09/simple-note-taking-app-ajax/
but he lost me at the index php and how to implement that, i also tried this example:
http://miamicoder.com/2011/building-a-jquery-mobile-application-part-1/
but its so complex i got lost in all the code.
I'm a beginner at programming and my JavaScript is very very poor and i have no idea where to start and what kind of code is involved in making this part of the app.
Please help. Thank you.
Your first site (http://tutorialzine.com/2012/09/simple-note-taking-app-ajax/) will not work for you as the examples are embedding PHP into the html and that is not acceptable with phonegap apps.
Your second site is making it way more complicated than it needs to be for your limited scope.
Not going to do this for you but I will give you some advice and places to look.
Draw out what you want the user interface to look like and create that html
Create a load and save function in javascript to... well... load and save your notes. Take a look at the below references:
This will show you how to interact with the local database and store and retrieve info. Always a good thing to read the documentation.
This is a great resource for help all sorts of stuff. In this case, with SQL queries.
Test, test, test. With the above, you will be able to figure it out if you put your mind to it. Come back here and post specific questions with code samples of what you have tried if you get stuck.

Display Comic Book files on a webpage?

I'm thinking about creating a webpage and I'm trying to brainstorm some ways to display them in the page.
If i wanted to get dirty and create everything myself, i think i could do it with html5, CSS3, and javascript/jquery. Just do some kind of page buttons with an image tag and maybe get into some more detailed stuff as it comes up (i dont know how i would do zooming and multiple pages).
But wahat i really want to know is if there is already some way to do this? I've looked around for a bit and cant seem to find any sort of plugin that would read a cbz file or display an set of images with the 'e-reader' type of tools in mind. Just wondering if anyone knows of anything?
Thanks
I used to use an online reader for a long time so I started an experiment to build one myself a while back: netcomix
It's open source so you can see if you find anything appealing in what I did. I figured I'd do all the real UI work client side with HTML, CSS, and JavaScript and the server was strictly responsible for acting as a service (for example, to supply a list of comics or a list of all the pages in a particular issue) and serving up the individual JPG/PNG/GIF files. That compartmentalized things nicely and I was very pleased with how jQuery BBQ gave me a history that I could back through even though I stayed on one page the whole time.
Now if I were to do the same experiment again, I'd use Backbone.js to give some structure to the client side and obviously it needs a lot of love because the server side really does nothing at the moment. Early versions were strictly hard coded although I started putting in some simple SQL stuff in there in the latest version. It's nothing more than an experiment though and should be treated as such. It's there for ideas and little else. If you find it interesting and want some more ideas contact me and I'll be happy to let you know all my wacky ideas for such a program.
I know this is an old question. But web technologies have gotten better in the last few years. There are several comic book readers that can work in the browser using pure HTML and JavaScript. I wrote one called: http://comic-book-reader.com .
If you want to see a very simple example of how to read CBR and CBZ files in the browser. You should check out http://workhorsy.github.io/uncompress.js/examples/simple/index.html which uses the JavaScript library https://github.com/workhorsy/uncompress.js

Categories

Resources