« first day (2774 days earlier)      last day (2176 days later) » 

8:12 PM
Hey there
 
hello @cryophoenix
 
@MilanUptech so are you just looking to see if checked or you looking for the value of the label?
 
I have this fiddle. https://jsfiddle.net/humanware/ztfnzf5b/2/
I want to apply a condition. If user select under 18 radio button and selects something from dropdown I want to create a variable and assign a value to it.
how can I do that?
 
lemme take a look quick
 
I have updated the code : jsfiddle.net/humanware/ztfnzf5b/2
 
8:18 PM
I probably wouldn't use radio buttons here. I'd just make a standard checkbox that says "over 18" or "under 18"....either way, when it's checked, you can use
 
A K
hmmm sequelize seems slow as fcuk
any pros to using it?
i feel like it gets in the way of productivity
 
if checkbox is used user can select multiple checkbox so I am using radio for this.
 
3830
Q: How to check whether a checkbox is checked in jQuery?

PrasadI need to check the checked property of a checkbox and perform an action based on the checked property using jQuery. For example, if the age checkbox is checked, then I need to show a textbox to enter age, else hide the textbox. But the following code returns false by default: if ($('#isAgeSel...

here's your answer :D
but you only have two options.
over or under.
make it "check this if you're over 18"
or something like that.
and default it to something else.
 
what if someone checks both checkboxes?
 
There need be only one checkbox
 
8:20 PM
@MilanUptech Only one checkbox
Checked = over 18, unchecked = not over 18
 
What madara said.
 
can it be done with radio button?
 
@MilanUptech Probably, just would be more complicated.
 
yes, you can loop throgh them
but you really don't wanna add loops wehre you don't need loops
it just gets ugly later when you forgot what your code did later xD
 
The thing is with radio buttons you have a third option
Not select any of them
Which is not what your situation is (which is a binary yes/no answer)
 
8:22 PM
I have used this code for radio buttons to show and hide div:

$('input[name="selectYourAge"]').click(function() {
        var inputValue = $(this).attr("value");
        var targetBox = $("." + inputValue);
        $(".age").not(targetBox).hide();
        $(targetBox).show();
    });
I think I can modify it to fulfill my requirement.
 
No, but it is an if-then-else type scenario..or even a switch case scenario
 
I have even assigned both radio buttons to variables like:
var inputUnderEighteen = $('#inputUnderEighteen');
    var inputOverEighteen = $('#inputOverEighteen');
 
1 message moved to Trash can
@MilanUptech Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
if (inputUnderEighteen.is('checked') && selectSessionType.val == 'hourly') {
newVariable = 20;
}
can I do something like this? @cryophoenix @MadaraUchiha
 
@MilanUptech Sure, that might work
 
8:28 PM
@MadaraUchiha I know above code is not correct. can you correct it please. :)
 
@MilanUptech I'm pretty sure that .is('checked') isn't a thing
 
I found this in stackoverflow:
$('#element').click(function() {
   if($('#radio_button').is(':checked')) { alert("it's checked"); }
});
 
That's jQuery, and the : before checked is important
Or you could just reference the DOM element itself and check the .checked attribute
 
I like ramda
const qs = {
  stringify: compose(
    join('&'),
    map(join('=')),
    toPairs,
  ),
  parse: compose(
    fromPairs,
    map(split('=')),
    split('&'),
  ),
}
 
@corvid You've forgotten encodeURIComponent
 
8:38 PM
yos, but easy to add
 
Now M&M's are broken
I hope you're happy.
 
because it's so composable!
I'm never happy
 
!!giphy shame on you shame on the cow
 
lol
@rlemon your server's dead ^
 
8:39 PM
@MadaraUchiha rlemon is afk: 💐
 
I have tried this code & getting this error: prntscr.com/jkufxa
function calc() {
  var inputUnderEighteen = $('#inputUnderEighteen');
  var inputOverEighteen = $('#inputOverEighteen');
    if(inputUnderEighteen.is(':checked')) { alert("it's checked"); }
}
 
8:51 PM
Any angularpros here?
 
@Maciej21592 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
no pros here
 
@Maciej21592 yo soy un pro de angular
 
That's great to know but I do not know spanish
2
 
Tu hablo angular?
 
8:54 PM
Yeah I guess
 
Sweet well then we can speak english and talk about angular. What's your question?
 
I just wanted to ask how to acomplish something like the following: uimovement.com/ui/5643/add-card using angular animations
 
@Vap0r I don't speak Spanish but I know you're using too many pronouns lol
 
I am fairly new to the framework and creating UIs in general and have absolutely no clue where to start
I can already animate some basic objects but that is it..
 
@forresthopkinsa educado en espanol un y dos soooooo
@Maciej21592 I believe that's basically material's design book
 
8:56 PM
I don't typically hear people using so many pronouns in real-world use but fair enough
 
and the resources available online seem to be limited just to VEEERY straightforward animations
 
Yeah that's fair
@Maciej21592 I would use angular-material and you should get a new set of components you can use out of the box that has many (probably not all) of those animations
As far as making them yourself, not sure, I think that would be more in the realm of CSS animations but I'm not sure
@forresthopkinsa yeah I don't really speak it and am not around many native speakers
Anyways, I'm about to leave gtg done with work!
 
@Neil I've got a different answer to your rope question
 
I feel like you could do all of that in CSS
 
How though
 
8:58 PM
lol what a question
 
yeah, a very broad one
 
also, could != should...
use the tools at your disposal
 
One question. Does the client get a "detailed" requirement analysis document (use cases, technical, funktional, non functional requirements etc) together with the contract?
 
What I struggle most with is the expanding circle
 
do you struggle with the circle itself, or with positioning it?
 
9:01 PM
I'd say understanding how it animates, when I tried recreating it myself the content that I placed within the circle div just scaled together with the circle
resulting in a very poor view
 
why is there other content in your circle div
oh I think I understand what you're doing
 
I have to place the input somewhere right?
 
I feel like you're gonna want these things to be more parallel than you're currently doing
you want the illusion of these things being related to each other, but that doesn't mean the code should reflect that
 
I would love to find some sort of open source project containing examples
 
of material animations? that shouldn't be hard to find at all
 
9:04 PM
Implemented in angular, yes
not necessarily just the material ones
just instances of well crafted animations
that I could so to say learn from
 
How are Unix time stamps time zone-independent?
 
hmm I don't have any resources like that up my sleeve but I'd suggest sharpening your Google-fu skills, I don't know why that would be difficult to find
 
If I change my system clock to 10 hours ahead
 
@DemCodeLines they're non-localized
they're in UTC
 
Then that's 10 hours added to the number of seconds
 
9:06 PM
Yeah maybe I am just bad at using Google
 
@Neil you set fire to both ends of #1, and at the same time, to one end of #2, when #1 finished burning, you start counting, and set fire to the other end of #2, #2 will finish after exactly 15 minutes.
 
@forresthopkinsa yes, but I'm not understanding why they won't change even if the system time gets changed
 
@MadaraUchiha can Caprica print Wikipedia summaries
@DemCodeLines you're not changing the actual time, you're just changing your offset from UTC
 
@forresthopkinsa It used to, I think it relied on an API which isn't available anymore
 
lame. ok
 
9:07 PM
Oh
 
well, here's the Wikipedia summary for unix time:

Unix time (also known as POSIX time[citation needed] or UNIX Epoch time[1]) is a system for describing a point in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970,[2].
 
So is it not possible to change the actual time? Does this mean the time stamp that's returned by Date can be trusted?
 
yeah you can change the actual time
just not by setting a time zone
 
I mean I understand that it's the number of seconds since that date, I'm just confused about what base is it using to calculate the seconds
 
@DemCodeLines
I changed my system time
and it changed the epoch time in the command line
I ran date +%s and it returned "1526937065"
and then I rewound a few days and ran it again, and it returned "1526591474"
so I don't understand the problem
 
9:16 PM
What I'm saying is that I know it works
But I don't know why it works
A computer doesn't magically know the current "moment" in time, right? It must be using something as a reference to get the current time. What is that "something"?
 
network time protocol
lol
alternatively, the CPU's idle clock
 
Hi, is there anyway to assign hostname of you ubuntu machine to a variable in javascript without hardcoding the hostname?
like running hostname -f on ubuntu and assign it to variable in a javascript file
 
JavaScript as in node.js?
require('os').hostname()
 
angular
 
hey guys, can you have a look at this question please? please suggest me improvements if it's not clear. stackoverflow.com/questions/50456816/…
 
9:25 PM
@Damon The browser is sandboxed
You don't have access to things like hostname from the browser.
 
even if .js file resides on server?
 
lol
 
@Damon Uhhhh...
If it's on the server, it runs on the server
And you'll get the hostname of the server :)
 
yes, I need server hostname
not clients
 
can you help me please
 
9:28 PM
fuck that
 
@EduardoHerrera 1. No one will read a huge blob of code and debug it for you
 
I have multiple servers so I am trying to have js figure out what server its running on
 
2. You're posting what's clearly confidential information in a public, indexed chat.
 
i can't accept danesh letters but normal letters yes
 
Did they just remove the disclaimer comment forbidding them from publishing this code?
 
9:31 PM
uh, yeah?
looks like it
 
well thank you
please any idea?
 
i want to validate between 2 and 70 letters including danesh letters in name (just letters) in address letters and numbers
 
function validateText(text) {
    return true;
}
there you go
its validated
 
9:39 PM
ok?
 
@EduardoHerrera Don't share code you're not allowed to share
 
What do you mean can't i share code here?
 
12
A: Travel SE Isn’t Very Welcoming. It’s Time for That to Change

Mark MayoSome guidelines I'd love to see follow below. I know I'm guilty for some of them too, when I'm in a hurry, but maybe we can call people out for it when we see it. I don't think we can get them implemented in code, but we could call people out for not following: If you close vote a question fr...

 
The code you share obviously belongs to your company, and you obviously have a policy there that you aren't allowed to share the code in public
You're violating your company's policy (and possibly breaking the law) by posting company code here, in a public chat.
Seriously, narrow down your case, make a small example that demonstrates the problem that you wrote for the purpose of debugging for the bigger problem, and isn't using real parts from your real code.
 
Mar 13 '13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
9:45 PM
@CapricaSix wat
 
It's a true story.
 
i trying to validate string with length between 70 and 2 including danesh letters
 
Ah, missed your edit
 
Jan 20 '15 at 21:11, by Benjamin Gruenbaum
I just made Joel Spolsky read slidepoop - my work here is complete.
:D
Lmao
19
Q: Banned from chat for apparently inappropriate content?

rlemonBasically here is the scenario: In the JavaScript chat room user A is talking about dummy text (keep in mind the room was pretty stagnant at the time) so I posted links to 7/8 lorem ipsum services (not the text within, just the links) and user B says stop after the first 5/6, so I finish with my ...

> I was in the middle of helping another user in the C# room when I was banned and have now abandoned him.
:'( <3
 
I always knew @rlemon was a spammer
 
10:14 PM
why do you think he's the all-time most active user?
 
LOL i got The answer
it's a error capa 8
from database
it's varchar2 instead of varchar (byte)
 
10:51 PM
If you guys will have me, I'm ready to resume my RO duties again
I've made peace with myself :)
 
11:02 PM
function startCalc(){
      interval = setInterval(calc(),1);
    }

    function calc() {
      fullName = document.getElementById('inputFirstName').value + ' ' + document.getElementById('inputLastName').value;
      inputEmail = document.getElementById('inputEmail');
      inputPhone = document.getElementById('inputPhone');
      inputProfession = document.getElementById('inputProfession');
      underEighteen = document.getElementById('inputUnderEighteen');
      overEighteen = document.getElementById('inputOverEighteen');
I am using this code to check selected radio button but I need to click radi button two times to select. is there any better option?
 
11:23 PM
you use an interval every second to check/set proper radio button based on form state?
the problem is you have to click the radio button twice before its value changes?
 
11:40 PM
@SterlingArcher done, also updated the gh repo
 
11:50 PM
@Loktar thank you :)
 

« first day (2774 days earlier)      last day (2176 days later) »