[QUOTE=Mega1mpact;45930610]I'm currently working on the REST API documentation for the service I'm working on and I was wondering if the way I'm doing it is any good. I still have to make the part where the parameters for the methods are shown and a "playground" where you can test the api using a simple user interface.
[url]https://api.azise.net/docs/[/url] (wip name)
-image-
[/QUOTE]
I only glanced over it but you have URIs which are redundant. When you design a REST API you need to remember that the CRUD operation is already announced as the HTTP method. That means having
/listen/new
/listen/list
/listen/delete
is redundant. What you would ideally do is this:
POST:/listen
GET:/listen
DELETE:/listen/$1
If you need a specific instance of /listen you would use
GET:/listen/$1
Obviously there's not really any functional difference. It's just using REST the way it was meant to.
[QUOTE=jetboy;45931549]I only glanced over it but you have URIs which are redundant. When you design a REST API you need to remember that the CRUD operation is already announced as the HTTP method. That means having
/listen/new
/listen/list
/listen/delete
is redundant. What you would ideally do is this:
POST:/listen
GET:/listen
DELETE:/listen/$1
If you need a specific instance of /listen you would use
GET:/listen/$1
Obviously there's not really any functional difference. It's just using REST the way it was meant to.[/QUOTE]
It would be a small effort to change it to that. I'll do that when I get home
Starting to learn OOP (or procedural - not sure which is better) in PHP as well as MySQL. Setting up a simple DB and all that kind of stuff. Not sure how to use it in applications (although im sure there's TONS of them) so yeah.
Finally got it to output stuff from a table I populated so yaaaaaaaaaaaaaaaaaaaaaaaaaaay
[QUOTE=jetboy;45931549]I only glanced over it but you have URIs which are redundant. When you design a REST API you need to remember that the CRUD operation is already announced as the HTTP method. That means having.[/QUOTE]
I made it 100% REST [url]http://api.azise.net/[/url]
So, I have been interested in getting deeper into MVC, however most tutorials don't seem to do it for me, the moment I try to make anything what the tutorials said just... don't make sense.
If anyone is willing to help a guy out that would be great. (No I am not a beginner, I am familiar with web design and C#)
You can add me on steam
<------- over there
Any help is appreciated.
Did some good work on my [url=http://spoonfedstyle.com]clothing recommendation[/url] website today :)
Homepage update, redesigned signup modal, and I added some more personality to the copy in a few spots.
Been playing with canvas, made a graphing system and a spinning thing :downs:.
[url]http://inervate.com/devsite/graph.htm[/url]
[url]http://inervate.com/devsite/animation.htm[/url]
What the actual fuck is going on?
[vid]http://svenskunganka.com/share/2014-09-12_12-32-45.mp4[/vid]
This is the jQuery code for triggering the child-navs:
[code]
$('.mobile-toggle').click(function() {
if($(this).hasClass('plus')) {
$(this).parent().find('ul.children').slideDown();
$(this).attr('class', 'minus').attr('src', '/avesina/wp-content/themes/avesina/assets/img/minus.png');
}
else if($(this).hasClass('minus')) {
$(this).parent().find('ul.children').slideUp();
$(this).attr('class', 'plus').attr('src', '/avesina/wp-content/themes/avesina/assets/img/plus.png');
}
});
[/code]
Edit: Didn't notice I was in the WAYWO...
it's moving over when the container overflows, so i'm guessing that's related, its hard to say without seeing the html and css, dev tools will probably make the issue obvious
[QUOTE=Shadaez;45959691]it's moving over when the container overflows, so i'm guessing that's related, its hard to say without seeing the html and css, dev tools will probably make the issue obvious[/QUOTE]
HTML and CSS is here: [url]http://rbmedia.se/gfx/avesina/[/url] (Beware the clusterfuck..)
[QUOTE=Svenskunganka;45959910]HTML and CSS is here: [url]http://rbmedia.se/gfx/avesina/[/url] (Beware the clusterfuck..)[/QUOTE]
I can't understand why it needs to be overflow in the y direction to show the icon :S
Have you actually tested it on a device or just emulated one?
[QUOTE=xmariusx;45960121]I can't understand why it needs to be overflow in the y direction to show the icon :S
Have you actually tested it on a device or just emulated one?[/QUOTE]
When I debug, I tend to try every possible solution to make it work, which is why overflow-y is there.
I've tested it on iPhone 5 and Sony Xperia Z1 and it's the same issue there.
Oh, and I found a solution:
Remove
overflow: scroll; from .ng-pageslide-nav
Add
overflow-y: scroll; and height: 100vh; to .mobile-nav
[editline]12th September 2014[/editline]
You probably don't need the height actually, but if the scroller is always visible (Like windows for desktop) it looks kinda silly not having the scrollbar all the way down
[editline]12th September 2014[/editline]
Or you could add
overflow-y: auto;
instead :v:
[QUOTE=xmariusx;45960199]Oh, and I found a solution:
Remove
overflow: scroll; from .ng-pageslide-nav
Add
overflow-y: scroll; and height: 100vh; to .mobile-nav
[editline]12th September 2014[/editline]
You probably don't need the height actually, but if the scroller is always visible (Like windows for desktop) it looks kinda silly not having the scrollbar all the way down
[editline]12th September 2014[/editline]
Or you could add
overflow-y: auto;
instead :v:[/QUOTE]
OMG You are so SEXY right now. I wanna tap you so bad!! Reproduce-like
EDIT: Shite, now it doesn't work to scroll anymore. [del]I'll probably need to wrap .mobile-nav in a new div and set overflow on that instead.[/del] The 100vh fixes it, but I've heard that vh and vw isn't supported by many browsers yet?
[QUOTE=Svenskunganka;45960249]
EDIT: Shite, now it doesn't work to scroll anymore. [del]I'll probably need to wrap .mobile-nav in a new div and set overflow on that instead.[/del] The 100vh fixes it, but I've heard that vh and vw isn't supported by many browsers yet?[/QUOTE]
Depends on the version though. [URL="http://caniuse.com/#feat=viewport-units"]http://caniuse.com/#feat=viewport-units[/URL]
Only one, Opera Mini, has no support so far. 2 browsers (IE11 and iOS Safari) give partial support, but that depends on the measure unit used. As seen in the notes underneath the table.
Is it supposed to download the site I'm going to rather than going to it?
[img]http://i.imgur.com/oNPza2z.jpg[/img]
[QUOTE=xmariusx;45962741]Is it supposed to download the site I'm going to rather than going to it?
[img]http://i.imgur.com/oNPza2z.jpg[/img][/QUOTE]
Press alt and release it. Sometimes it bugs. Alt + left click downloads the page.
Sorry if this is the wrong place for this, but I use a mac and I've been trying out various development tools like brackets and sublime text. Brackets has pissed me off, and sublime text you have to pay for it. They are good, but I really like geany for linux. I haven't found any programs that are similar to geany for mac. Any recommendations from other mac users?
[QUOTE=brianosaur;45970901]Sorry if this is the wrong place for this, but I use a mac and I've been trying out various development tools like brackets and sublime text. Brackets has pissed me off, and sublime text you have to pay for it. They are good, but I really like geany for linux. I haven't found any programs that are similar to geany for mac. Any recommendations from other mac users?[/QUOTE]
You only technically have to pay for Sublime Text. You can download a free endless trail that only has a nag screen every number of saves. It's really not at all annoying.
[QUOTE=brianosaur;45970901]Sorry if this is the wrong place for this, but I use a mac and I've been trying out various development tools like brackets and sublime text. Brackets has pissed me off, and sublime text you have to pay for it. They are good, but I really like geany for linux. I haven't found any programs that are similar to geany for mac. Any recommendations from other mac users?[/QUOTE]
[URL="https://atom.io/"]Atom[/URL]. Developed by the GitHub team, really neat.
Simply run in terminal to chroot your tree view:
[code]
cd /path/to/my/project
open -a atom .
[/code]
[QUOTE=horsedrowner;45970960]You only technically have to pay for Sublime Text. You can download a free endless trail that only has a nag screen every number of saves. It's really not at all annoying.[/QUOTE]
Every 100 saves, yes.
[QUOTE=Cyberuben;45971184]Every 100 saves, yes.[/QUOTE]
It's 50, iirc. Unless it was changed recently.
[QUOTE=TH3_L33T;45946708]So, I have been interested in getting deeper into MVC, however most tutorials don't seem to do it for me, the moment I try to make anything what the tutorials said just... don't make sense.
If anyone is willing to help a guy out that would be great. (No I am not a beginner, I am familiar with web design and C#)
You can add me on steam
<------- over there
Any help is appreciated.[/QUOTE]
I learned MVC in school and not from a tutorial and boy am I glad I did: most tutorials show it either as an afterthought or do a terrible job explaining it (and it's likely that the authors themselves don't even understand it). If I ever find a good tutorial I'll let you know.
[QUOTE=Banana Lord.;45971809]It's 50, iirc. Unless it was changed recently.[/QUOTE]
I'm probably wearing off my "S" key at this point so I get the pop-up often but yeah, it's definitely closer to 50 than 100.
Ive been working on a little tool in nodeJS to display information about your VPS, at the moment its just using information from nodes OS class
[IMG]http://i.imgur.com/R5YQ6oW.png[/IMG]
I wanted to use node-sigar to get lots of additional information but it seems its so out of date you cant build it any more :/
[QUOTE=Richy19;45987951]Ive been working on a little tool in nodeJS to display information about your VPS, at the moment its just using information from nodes OS class
[IMG]http://i.imgur.com/R5YQ6oW.png[/IMG]
I wanted to use node-sigar to get lots of additional information but it seems its so out of date you cant build it any more :/[/QUOTE]
How about a list of installed packages, semi-independent of distribution?
[QUOTE=mastersrp;45992941]How about a list of installed packages, semi-independent of distribution?[/QUOTE]
The thing is to do that I would have to make a call to apt/distro equivalent, and parse the output, which is what im trying to do at the moment for other stuff, but JS is providing difficult for that kind of things
[QUOTE=Richy19;45996257]The thing is to do that I would have to make a call to apt/distro equivalent, and parse the output, which is what im trying to do at the moment for other stuff, but JS is providing difficult for that kind of things[/QUOTE]
Maybe [URL=http://stackoverflow.com/questions/13981938/print-a-list-of-all-installed-node-js-modules]listing installed npm modules[/URL] would be a good start?
[QUOTE=Richy19;45996257]The thing is to do that I would have to make a call to apt/distro equivalent, and parse the output, which is what im trying to do at the moment for other stuff, but JS is providing difficult for that kind of things[/QUOTE]
Well, I'm not sure how you're doing it, but the way I'd do it is simply to first open lsb-release, check values of that if it even exists, else loop over a sorted list of $DISTRO-release files, until you hit bottom, and then just assume LFS (don't bother).
For instance, you could check for "arch-release" and then use "pacman -Qs" or whatever to query installed packages, check if "gentoo-release" and then use either `which eix` or `which emerge` to query, depending on what is installed, and so on so forth. Then, for distributions based upon others, just ignore it and use their base package manager, unless required. For instance, a case where gentoo-release is present, but emerge is NOT prefered, is sabayon. Based on Gentoo, but uses equo instead. It's cases like these that can be a pain, but when done right show the flexibility and professionality of your applications.
With a little bit of magic!
[QUOTE][IMG]http://i.imgur.com/7yqkkO1.png[/IMG][/QUOTE]
All file sizes are in bytes as I havent done any processing on the output of the data yet
[QUOTE=Richy19;45997188]With a little bit of magic!
All file sizes are in bytes as I havent done any processing on the output of the data yet[/QUOTE]
Are you going to release the source? I was actually planning on something like that, would like to see how you did it, rather than reinventing the wheel...
also: [url]http://stackoverflow.com/a/9567357/2248679[/url]
Sorry, you need to Log In to post a reply to this thread.