« first day (635 days earlier)      last day (3153 days later) » 

12:16 AM
Does anyone have a recommendation for a read on how to use the response when you've made a POST?
 
12:27 AM
 
@Gemtastic how do you mean?
 
I'm trying to use JS to POST a value to the server, and seemingly it goes fine, but the success message is not fired.
So I thought I'd read up on how that works
 
jQuery or javascript?
I imagine the server would return a success response?
with Tumblr, you get a 200 response
 
Well, it's the server response part I'm guessing I need to read up on
Because as it is now, nothing happens on the return part. The code I'm using looks like this: pastebin.com/wJxagnBv
Earlier it triggered the negative result (not added to cart) but now it doesn't fire at all
 
12:44 AM
var cartUrl = "/foo/cart";

function getProductID( productID ){
  return $.ajax({
    "type": "POST",
    "url" : cartUrl,
    "data": {"productID" : productID}
  });
}

getProductID( '111' ).done( function ( response ) {
  console.log( response + 'success' );
}).fail( function( response ) {
  console.log( response + 'fail' );
});
In you paste, you don't call getProductId().
 
I do it on a <a> button in the code
<a th:href="@{${category}}" class="shopbutton" th:onclick="'javascript:getProductId(\'' + ${product.id} + '\');'" th:text="#{cart.buy}">Buy</a> Beware of the thymeleaf syntax
 
ahh ok, and the response object is data?
 
Well, I don't know
Obviously not since it's not working...
It was firing the not added to cart message arlier
But not now.
I have no clue why
 
12:59 AM
Well, now I know why it isn't firing anything out of the addToCart method; it does load but since it's an a tag it reloads before I can see it
But what's printed is still the "not added to cart" even though it is...
 
Sim
1:11 AM
quick question is style="" similar to class"" can i include element in header for style similar to css?
*class
or can it be only done through style="thecodes"
 
1:22 AM
Are you talking about this: w3schools.com/htmL/html_styles.asp @Sim?
 
Sim
im trying to use style similar to css can be used is that possible? like in header .test1{something;} in body <h1 class="test1">blah<h1> and for style is this possible? never used it <h1 style"test1">blah<h1> i tried used it doesn't work thats why im concern @Gemtastic
 
It sounds like you are trying to use what I linked you. Did you read the link?
 
Sim
yes i read it but seems like the style can be only used like example <h1 style="font-size:300%">This is a heading</h1> but can it be used with id instead similar to class?
@Gemtastic
 
I'm sorry I don't think I understand what you mean
 
@Sim no it can't.
style is for inline styles only and rarely should be used.
 
Sim
1:32 AM
figured i was curious i have been using class for long never used style thanks
 
Its usually used by javascript
 
Sim
so the only methods that can be used in style.css are either .theid or #id
 
no, there are more.
!!google css3 selectors
 
hi All
I am working on a web application and i have two different clients, let's say client one and client 2. both systems share the exact same functionality except the titles of the pages, the logo and other stuff
my issue right now is with the deployment
as i mentioned earlier they share all the functionality except the logo and some static page
for instance the home page is different for both clients
the about page
the contact us page
 
Sim
1:42 AM
@mikedidthis thanks
 
@Sim no worries. The 30 CSS Selectors is a good read
 
Sim
but the one that are used the for ids are . and #
 
no, # = ids
 
Sim
got it thanks man @mikedidthis
 
1:57 AM
@mikedidthis agreed
 
Sim
@Gemtastic thanks for helping
 
@Sim I couldn't really help you though
 
Sim
@Gemtastic but u tried :)
 
Yeah :P
I get so much help in here I ought to at least try to help others
 
Sim
i try too lol
more i try less points i get lol
 
2:17 AM
Most beginner questions are already answered on SO, so just keep searching 'til you find the answer
I do recommend you try something like codeacademy (it's free!) to learn more.
w3schools provides an API for the HTML, CSS and JS, but their tutorials are bad.
 
2:39 AM
morning
 
Sim
morning
 
mike has nothing better to do at 2:46 AM? :D
 
Sim
lol
 
He didn't wanna own this mess ;P
 
Sim
2:52 AM
about time im close to be done yay :)
the feeling when everything is running smooth lol
and all of the sudden some code error geez lol
@mikedidthis thanks for helping
talk 2 u guys soon take care
 
Bye
 
3:30 AM
he doesn't listen
 
Is Sim and Singh the same person?
 
oh, lol
sorry, had them mixed up
Singh is good, he listens
 
We all make mistakes :p
I love it when I figure things out!
 
that's what makes programming worth it
 
I'm trying to send a form and while I'm not entirely sure of how this will work with my framework...
I'm looking at a JS version where you receive the form and .serialize() it, but I'm not sure how the requestparams are supposed to look in the server side
 
3:58 AM
@Gemtastic uh?
 
The JS looks like this: pastebin.com/iUveuPru
And it's giving me a "HTTP Status 405 - Request method 'POST' not supported" message
 
what are you running server side? java?
 
Yes
Spring MVCweb
If it was plain java server this would be a piece of cake >_>
 
in the routing you should enable / have a route handling a POST method on that page
once you did that you probably can access the post variables
i don't know how it's done in spring
did that help?
the 405 error looks to be sent automatically when a route matching an url exists, but the post method is not supported
 
It's declared through this: @RequestMapping(value="/contact/sendmessage", method = RequestMethod.POST)
But still it says it only accepts GET O.o
 
4:05 AM
i have no idea :(
 
Nor do I :/
It's just a simple form, how hard can it be? :I
 
don't say that!
 
4:33 AM
Well, now I get it to post, but I can't get the function that's supposed to fire on success to fire...
 
Do you know what kind of data data is supposed to receive here?
$(function(){
    $("#contactMessage").on('Submit', function(e){
        alert("You clicked the button");
        var form = $("#contactMessage");
        e.preventDefault();

        $.ajax({
            "type": "POST",
            "url": "/LillaKammaren/contact",
            "data": form.serialize(),
            "success": function(data){
                $("#msgSendingSuccess").append(data + "sent!");
            }
        });
    });
});
 
well, first i think you should use
"url": "/LillaKammaren/contact/sendmessage",
no?
"success": function(data){ the data here is the output of the page at given url
html, json, xml
so it's not "sent"
data + "sent!";
but data "received" as response from the given page
 
Well, it's working with /contact and I don't really want to load a new page
What kind of data is the data expecting?
It's retrieving a string at the moment
Yet it still doesn't fire "true"
 
5:18 AM
I'm collecting a very useful and pretty comprehensive public posts over on GraphicDesign about web stuff including these: graphicdesign.stackexchange.com/questions/463/… graphicdesign.stackexchange.com/questions/39613/… and graphicdesign.stackexchange.com/questions/41834/…
If you need resources to point a noob to, let me know and I likely have a good one for them
8
 
a noob is looking for an english help @ZachSaucier :D Returns true if the given recipient was just subscribed, false if it was already subscribed.
can i remove the second "subscribed" right?
 
not really
 
you could change it to "Returns true if the given recipient has just subscribed, false if they were already subscribed."
or something like I'd say, "Returns true if it's a new subscription, false otherwise"
 
the second option looks definitely better, but i was curious about omitting redundant verbs
 
5:28 AM
you could say, "Returns true if the given recipient has just subscribed, false if they've been subscribed" as well
the key is have been instead of it already
 
yet the second "subscribed" has still to be there, no?
 
in this case pretty much unless you go with a short version like the one I said above
can't think of a similar situation ATM
 
no, cool, i thought it was possible
 
it kind of is :P depends on how you say it
people would understand as you had it
"Returns whether or not it's a new subscription or already in the system" would be about the same
 
with a completely different meaning: Returns true if they were subscribed, false if they weren't.
in this case you can omit the redundant "subscribed"
 
5:35 AM
ya, much more easily
 
i thought it would have been the same with "if they were already."
 
as I said, depends on how you phrase it :)
 
Returns true if the given recipient has just subscribed, false if it was already.
how about this?
 
"false if they have already", but yes it'd work :) more often than not I think people would say subscribed again, but it's perfectly fine so long as you use they have
 
why they? it has you mean? it's a single recipient
english is complicated :D
 
5:38 AM
it's not "it" because it's a person :) people are always he/she/them
"they" is in regards to all people who have already subscribed
 
oh, so you can use they even if referring to a single person?
 
if there was a unisex way of saying he/she you'd use it, but there isn't
@JecebahnYaledimacOndestal so long as it's a person from a particular category of people, yes (I think), haha
I'll give an example
> Zach: The referee was terrible today.
> Mario: Yeah, they are always terrible.
So it's talking about the group in general, but in context it's talking about one singular person (sort of)
I'm not good at explaining these nuances evidently, haha
 
nope, got it, makes sense
btw i thought you can use "it" for a genderless version of he/she/it. i was wrong evidently
lol.
 
@JecebahnYaledimacOndestal not when talking courteously, no
sometimes people use it sort of jokingly for kids
but using "it" to refer to a person is derogatory
for animals or something using "it" is fine
 
woa, i'm learning things
:D
in italian we omit subjects. they are there but they are implied, as in
The referee was terrible today. Forgot to wear the eyeglasses.
you omit "He" forgot
 
5:54 AM
Damn refs always do ;)
 
it's informal to have two sentences for that
it's something I'd be fine saying in a pub or to a friend, wouldn't write it in a paper or something
 
as when you say, "please, go pick children at school". in this case "you" is omitted
it's the same thing, but we do that more often than it's done in english
 
"Please go pick the children up from school" or "Please go pick up the children from school", but yes :)
picking children at school sounds like you're going to steal them or add them to a team or something, haha
 
down up on off are a big mystery for me
 
5:58 AM
agreed
xD
 
that's the type of stuff you only pick up from using it and being corrected over time
 
i will never assimilate certain rules
and that's the case
 
maybe. If you moved to the U.S. you may
 
one day maybe :D
 
6:02 AM
you seem fun enough to be around :D
 
green card for comedians? looks legit
 
 
2 hours later…
8:34 AM
posted on January 25, 2015

New Cyanide and Happiness Comic

 
 
1 hour later…
9:43 AM
Morning
 
10:02 AM
morning
 
10:16 AM
 
@easwee totally how smokers' brain works :D
 
:D
 
 
1 hour later…
user3949359
11:40 AM
What would be a great way of finding the parent of an element in Chrome inspector without just manually searching for it visually??
 
@nosille Open console, type $0.parentNode
 
user3949359
let me try
 
(After you inspect the target element)
 
user3949359
works, thanks
 
@nosille $0 is a shortcut in the console for "the last element I inspected"
And it returns a DOM node
 
user3949359
11:43 AM
thanks
 
Which has the .parentNode property :)
 
user3949359
@SecondRikudo Does font-family: inherit inherit from the parent element or what?
 
@nosille Yes
 
Hey guys.
 
@MarcosEusebi Hey
 
11:54 AM
@nosille inherit is the default value assigned to font-family property. And copies the parent element computed style. w3.org/TR/css-cascade-3/#inheriting
What's up? @SecondRikudo
 
@MarcosEusebi Good, you?
 
I'm doing okie, thanks.
I've heard about CSS4 is working into nth-letter selector.
Is that true?
 
user3949359
@SecondRikudo how do I select an element that I havent inspected in the console?
 
@nosille document.querySelector('css selector here')
If you don't have jQuery included, you can use $ as a shorthand for that
$('css selector here')
 
user3949359
12:21 PM
thanks
 
12:34 PM
@SecondRikudo Give me a linkie for a decent online anime site
 
@KeyboardWarrior animefreak.tv
Where'd you reach?
 
and Parasyte is weird as fuck
I was on episode 2 and it kept freezing so gave up
 
@KeyboardWarrior Have you played Prototype?
 
just got home
Yeah I have played Prototype
 
@KeyboardWarrior 1:1 :P
That was my first thought when I watched this series
 
12:35 PM
Dude the fuck
Click the link you gave me
 
Sorry, my bad
 
oh, dear lord
 
hahaha
 
No dash XD
Freaking trolls
 
12:36 PM
@SecondRikudo I don't mind, just got a bit excited :D
 
"Let's buy a very close domain and put porn there!"
 
@SecondRikudo It is genius though
like www.gogle.com
MAKE IT PORN
 
There was an old viral video "Internet is for porn".
 
@MarcosEusebi Porn is love, porn is life
 
Yo right bud.
Just don't get on the "Teenage Programmers Chatroom" and you should be fine.
 
12:39 PM
@MarcosEusebi So grab yo' dick and double click for porn porn porn
@MarcosEusebi Yeah, you might accidentally get pregnant by staying there!
 
I'm not sure how to awnser that... lol
 
1:09 PM
any ui developers?
can anybody suggest me a good background for a dashboard application?
 
@Sajeetharan #BADA55
 
what does it mean
 
thanks but it display only colors
 
@Sajeetharan #BADA55 looks like a color to me
 
1:18 PM
@SecondRikudo is it good to have background just plain color?
 
i am so tired of questions like this.
-1
Q: How could I get the number of items in a dynamic list with Sass?

Laura C. Cencerrado<ul> <li></li> <li></li> <li></li> ... <li></li> </ul> Is it possible to get the 'n' value o the last item of a dinamic list with Sass? Like counting the number of items within the 'ul' using the @each or @for statements ?

 
too tired of questions like mine?
 
@cimmanon the ultimate would be how to loop through database using SASS
 
1:33 PM
@easwee actually, i think there is a question like that on SO
 
0
Q: Jquery round number to 1 decimal place

user3384664I'm not a javascript programmer, but need to make a change in a script to round the answer from the script below to one decimal place. I've tried various solutions I've found here, but I am clearly doing something wrong as none have worked for me. Script is below, any help is greatly appreciated!...

 
stackoverflow.com/questions/11935336/… (2 questions in one: part opinionated/part too broad)
 
@cimmanon Start whoring on questions FFS!
You don't have that much left for gold
 
4
Q: Import SASS file from database instead of filesystem

nikhilI don't have much experience with Ruby. I want to @import sass from database instead of filesystem. I did not find any examples online. How should I go about implementing this. I see that I have to extend an importer class but since I have no understanding of ruby I need to know where in my files...

@SecondRikudo that wont help me close for non-dupe reasons :p
 
@cimmanon CLOSE ALL THE DUPES
 
user3949359
1:39 PM
is there a bootstrap class that centers an element after a screen size breakpoint?
 
user3949359
like center-xs
 
user3949359
or something
 
hah today is my 5th SO birthday: Yearling × 5
You've earned the "Yearling" badge (Active member for a year, earning at least 200 reputation).
 
congrats @easwee treat?
 
@Sajeetharan coding treat - just finishing a canvas game
 
1:41 PM
@easwee 5 years and no 10k?!
This must be repaired!
 
@SecondRikudo I'm very lazy in giving answers :)
maybe I'll go do some repwhoring
but I just prefer wasting time coding lately, rather than answering questions
 
@easwee Have any bounty worthy answers?
 
@easwee noob
 
@SecondRikudo hard to say what's bounty-worthy
 
@easwee Which answer do you have that you're proud of?
 
1:46 PM
my latest anwsers are probably of much higher quality since I only answer if I'm really interested in the question
5
A: Change linear gradient background after a time

easweeWhat Dbugger said is true - you can't animate a background image with css animations. However, you could fake it with a 4 stop gradient (cleverly position your color stops - I suggest using a gradient generator as Colorzilla or similar - will make your work easier ) - since a gradient is treate...

this is a good answer i think
 
Guys can you recommend me any good wordpress security plugin? My website recently got hacked on wordpress and I am really worried about it because I didn't add any uploading or signup kind of thing in the website but it got compromised anyway...
 
@SecondRikudo whats its advantage, it only helping me to nuke my wordpress lol...
 
@user3027531 That's the idea.
I'm kidding, obviously, but WordPress isn't exactly well known for its "security"
 
@user3027531 The only thing you can do is run the thing in a jail and have backups ready
 
1:56 PM
hihihi =]
 
so it will end up nuking my website too, how's that a solution for security?
 
@user3027531 No one will hack you if there wouldn't be anything to hack.
@user3027531 The idea is that you don't use WordPress
While you can still choose an alternative, do.
 
oh comeon wordpress is awesome, ease to web development, I think the best CMS so far..
 
@user3027531 yea like some people think McD food is great, but is not healthy
 
1:58 PM
LMAO someone for the first time recommended not to use wordpress lol
 
@user3027531 O_o
You should consider finding better friends then...
 
@user3027531 Sounds like it's the first time you hang out with people who know a thing or two about real web development.
 
whocares about the health when the food is tasty, just like smoking kills .. LOL!!
 
you can't have any fun without any risks..
 
1:59 PM
@user3027531 Sure you can.
 
@user3027531 wrong
 

« first day (635 days earlier)      last day (3153 days later) »