« first day (2303 days earlier)      last day (2868 days later) » 

12:09
I have a quick query, why use Content-type: 'application/json' when sending response from server when after AJAX request we will have to manually parse it using JSON.parse etc. treating it like text. Should not browser parse the response in XmlHttpRequest automatically?
are CVs usually text-only files?
as in, I should still always have a text-only copy that would be good enough, or does it not matter anymore?
also, am I "Matei 'towc' Copot" now?
@towc Are we talking Curriculum Vitae here?
yeah
Where I live, it is customary to produce a .pdf file, but some recruiting agencies also want the source (usually in .doc or .docx format) because they often remove any data that the workplace might use to find us on their own.
can someone do me a favor by going to thecodesee.pe.hu clicking the submit button and showing me what is displayed?
12:20
@TheCodesee try browserstack
Movie Name:RED
and image and description
can you show me a picture of it?
@towc do you see this? prntscr.com/e4debj
do you know where I can find signs similar to this?
@TheCodesee yes
12:24
I just don't understand why it's happening
@Zirak So it is just for our information that the document is json. And we will have to do it anything we want to do all by ourselves.
@TheCodesee what do you expect to be happening?
this should be the output i.sstatic.net/uzFlw.png
i don't understand why there's a line of text under the image
i am using $("#here").find('img').css("height", $(".text").outerHeight());
I blame magic
@TheCodesee because the height of the text changes after you're removed some width with the image
@towc is there a way around that?
12:27
yes, use proper layout and css
there's no good reason to use jQ there
or JS (for styling)
i can't really get the text's height without jquery though
the text and image is dynamic
@TheCodesee but you don't need it
meaning they can change
the amount of text can change
learn css
i know css, but what im doing is not possible with it
12:28
no, you don't know css
everything’s possible with css \o/
i do know css
ok.
so how do i get the div's height with css
with that attitude you won't get it working
height: 100%?
and set it to the image?
but you don't have the proper layout, so it's going to be harder
12:29
add height 100% to the image?
unless you want to change the layout as well, which I heavily reccomend
Use flexbox; it solves all problems
Let me explain to you the issue as I think there's a misunderstanding.
you listen to me bud
Okay, can you guide me how to resolve this?
12:31
you should have 2 different containers, one for the image, and one for the text
that's what you're probably missing
floats are not meant to be used for layout
but with css, you can't get another elements height
js is needed for that
you don’t need to get it
how come?
also floats are okay for layout, css is made of hacks
@Ryan well, only when you know what you're doing
12:32
the image and text are dynamc
dynamic
if i manually set the image's height to 230px, which i believe is what you're suggesting, what if the text's height is more?
the issue is that $("#confirmation").find('img').css("height", $(".text").outerHeight()); doesn't make the image have the same height as the text.
@ankitbug94 First of all yes, the content type is to signal the type of the content. But XHR can parse things for you, that's what responseType is for.
I'm unsure if I should just start talking again, since The Codesee seems to be right in the middle of being taught something useful.
Oh, well, a jsfiddle is worth a thousand words I guess :)
But now, @Ryan, do we just set the image to 100% and then let it take whatever width it takes? Won't this change the lenght of the text, recursively?
I didn’t actually look at the page. Are the images different sizes?
12:43
the image size can vary
I tought the idea was to have the image take the same height as the text, but I probably got that wrong. This was about the text having the same height as the image, right?
no
the image's height needs to adjust so that its the same height as the text
I'm not sure this is going to work properly, ever, @TheCodesee. Let me explain why.
Suppose we have a text that is, I don't know, 600 characters. If we fit it to an hypotetical 50% width frame, it has height A.
Now we set (with .js or .css, it doesn't matter) the image to take A as a height, but unfortunately that means it is larger than 50%. So it pushes the text in a slimmer column. Now the text takes an height B>A and the image needs to be taller (thus even wider).
(Oh I thought you just didn’t want the last line of text to wrap under)
well this is the new outcome from using flex prntscr.com/e4dmfl
but this is the desired outcome: i.sstatic.net/uzFlw.png
12:48
put the first two elements in a different container
Well, first of all take the Submit out of the container
but if you want a dynamic image height, yeah, listen to @Zachiel =)
the image doesn't change without the page being refreshed, so i dont think theres an issue there
A dynamic height might work, but only if you manually (or automatically) check that the text does not generate an image too big, because if it does it is doomed to look bad.
Ah, if there's no iterative sizing I'm not sure this will ever work. The size of the text (its height) can only be determined if you know the width of the text, unless you change the font size (or the line height) as well (which is still iterative, I guess. I haven't really put much thought into this.)
I've taken the submit out of container and now it looks prntscr.com/e4dno5
12:52
Another option might be using a box with a vertical scrolling bar for your text
the text will only ever be about the same as it is now, maybe with 5 more or less lines
not like long essay of text
$("#here").find('img').css("height", $(".text").outerHeight()); was working, except for the fact that one line of text was under the image
you can see outcome at thecodesee.pe.hu by clicking submit
I would guess it was not working properly exactly because it didn't do recursion, so it just stopped at the first iteration: It calculated text height, then sized the image which compressed the width of the text in return, making it higher than before (and going below)
I've had the same issue with trying to determine which <span> was the last in a row, then removing its ::after content to get an "A | B | C (return) D | E" menu
well this is what i'm stuck with then, i suppose prntscr.com/e4dpcw
but i dont understand why $("#here").find('img').css("height", $(".text").outerHeight()); is getting the wrong height for .text
probably want a + 'px' on that
12:58
I'm not the most expert on the matter, but my opinion why is written on my previous post. The height you are using to size the image is the height of the text before the image was sized.
would a timeout or something work
no, you’d have to find an equilibrium
so wait for the image to be sized, then set it or something like tha
is it absolutely unacceptable to have text past the bottom of the image? (unwrapped)
(so not like now, but not always flush with the bottom)
If you wait for the image to be sized (based on what? On the text height you don't know yet) then measure the text height, this becomes an iterative process.
13:01
ok i have something to show you
it works here: prntscr.com/e4dr4y
but when i add an <input type="submit"> and add a <div class="text"> as a container for the text and change $("#here").find('img').css("height", $("#here").outerHeight()); to $("#here").find('img').css("height", $(".text").outerHeight());, it stops working
@TheCodesee My guess is that the height of that text is just the one that is needed to get an image width that does not change the height of the text when it is implemented.
not enough jquery
ok let me explain
everything is fine and the image has correctly been resized: prntscr.com/e4droy
but when i add <input type="submit"> and add a container around the text and change the jquery, it stops working
do you get what i mean?
Does the "text" class have any margins, or padding, or borders that might change its height or width from the one of the original outerHeight?
Try doing the three things one at a time. Let's ignore the submit button for now
Try just changing the jQuery
(of course you will need to have a .text class for it to work, but don't give .css rules to that class yet. Maybe use a .test class for now)
ok so if i forget about the submit button, add <div class="text"> around the text and change the jquery, it stops working
.text has no styles
13:10
Ok, I'm a bit rusty so please help me
ok
what part is confusing?
Which height is the first version of your jQuery targeting? i.e.: what is #here?
#here is the container div which the image and text are both in
I think it's the 15px padding that's causing the two heights to be different.
Your first .js gets the whole height of the container, the second one gets 30 px less.
Thus, the image is drawn smaller than before
Please use the consoleLog function and check which height is passed to the function in both cases.
If it is not this, I have no idea what's happening.
ok hang o
on
13:16
(Of course, we'd all expect the second one to be the one that works properly)
amazing, i have got a solution here
0
A: Image won't correctly adjust to the height of a div

B. DesaiTry this solution. $.ajax({ type: "POST", url: "search.php", success: function(data) { $("#here").css("display", "block"); $("#here").html(data).promise().done(function() { $("#here").find('img').css("height", $(".text").outerHei...

goddamnit, jQ is not the solution
blasphemy
more jquery is always the only solution
you are just fascist!!!
also, you're directly injecting html, that's heavily discouraged, but I guess it's not the issue at hand
13:23
@towc Now, I know not everyone wants to spend time solving problems of other people for free, but if you don't provide a (working) .css solution, I don't really know how The Codesee is supposed to change their ways.
I told him
he should use a different container for the image and the text
then the solution is almost trivial
but with css, i cannot the height of the text and apply it to the image
do the thing first, then you'll see
you're thinking in the wrong paradigm
the text also sets the height of the container of the image, and therefore the container of the container of the image if you do it right, which means that you can set the image to be as high as its container without changing the height of the text while doing so
hint: don't use float
stop pretending you know css
that last line was uncalled for.
knowing css also involves knowing where and how to use it
what's magic and what isn't
you think that a simple solution to your problem in css is magic. It isn't, therefore you don't know css
the sooner you realise it, the better
:)
13:27
@towc Won't that fall into the problem I mentioned earlier, about the image getting bigger and bigger?
@Zachiel no
if you do it right, you can set a maximum width for the image to be the same size as the container
the containers should have fixed-width either way
@towc Or a certain percentage of that size, right?
Sup
well, to keep it simple, the whole width
and you can use padding to keep it well spaced
hey rlemon
Wait. If the containers have fixed width, and you suggest using two separate containers, this means we could have an image with lots of free space on the sides, or up/down.
But if you're talking about a cointainer of those two containers, then we don't want the image to take 100% of it.
(of course the outer containter should have a fixed width, if it didn't have to this wouldn't be a problem, just use a fixed width for the text and go from there, but that's bad webpage design)
13:32
@Zachiel and not only is that good practice for UI, but also makes it a lot simpler
waz da issue?
dudeman used jquery and float for layout and style (surprise: it's not working)
and insists that there's no other way
yep thats me
if floats are your answer, flexbox probably has your solution
While I agree that float is not the way, I don't think that some js to dynamically set the dimensions of the image is necessary if we want it to align properly. If he really wants to have the text start right next to the image, and the image size to be based on the height of the text, something has to be done recursively, and I don't think .css handles this natively.
(I'm a .css noob, but all the solutions I've seen don't seem to be able to reproduce the intended layout, whether this is good or bad)
13:37
@Zachiel yes, you don't need JS either, at all, for this one
are the images all the same sized?
same width?
except for fetching the data and injecting it
Simplify your design and then the issues will disappear. I constantly see web sites trying to make things fancy, but they always get it wrong. I'll shrink my window just a bit and everything will mess up. "Responsive" my ass.
even if they weren't same-sized, it's easily fixable ;)
just wondering
13:38
@Brandin I do wholeheartedly adgree with this.
but yeah, it does make things easier
if they all have the same width, two columns with a background image solves everything
I think the images have the same proportions, if they're all movie posters.
then make it a background image and it'll assume the height of the container
and responsive design is better than not-responsive. but only if they do it right
@rlemon Ah, no. The author wants the text to take the exact same height of the image, which IMO needs an iteration (and some luck in not choosing a text too long)
Which in turn could be impossible if the whole thing's width is responsive.
13:40
the issue was that i needed the height of the image to adjust to be the same as the text's height
needed wanted
but i was given a solution
well one solution does it, but it introduces a lot of white space at the sides of the image if the text is too short.
And if the text happens to be too much... well the design just breaks
this also helps
window.onresize = function(){
$("#confirmation").find('img').css("height", $(".text").outerHeight());
}
My suggestion is to either accept that the text can be longer than the image, and use a fixed width (even better if responsive) image, more or less like our avatars and messages do in this page (a vertical line between text and image might do wonders for making it nice to look at), or use a textbox with a vertical scroll, and only care about image/textbox width balancing.
Last, ugliest solution: size every image manually to fit the text that accompanies it.
13:50
btw @rlemon, I finally started working on my cv: docs.google.com/document/d/…
@Zirak ping
@Zirak I got some grand idea for a project, let's make it together? It features a fuse fs in go and a qt app in C++
@towc "Software Engineer"
what software have you ever engineered?
@rlemon your mom counts, no?
Besides, a CV is for the role you want.
and letting me review it is for the comments I want
It's not because you have freedom of speech that I don't have freedom of saying it's shit opinion :P
14:01
it's not a shit opinion. it's a lie. saying you've engineered something comes with a certain connotation. tmk he's never done anything like that so it is mostly just a lie
I need to detect the top 5 shortest code in this page rosettacode.org/wiki/Maze_generation
@towc in the experience section, I was taught (and agree with) that you shouldn't just list what your tasks were, you should list what you brought to the table kinda thing. don't say "worked on blah blah blah" say "helped increase X through innovations on Y"
how I could achieve my goal?
My google-fu must really be the weakest. Can anyone point me to a basic tutorial to writing scipts for tampermonkey? I'm not even able to prepend a div to body.
Let alone output a Hello World
14:13
@Zachiel why you need tampermonkey?
yea, lol. silly firefox
@SterlingArcher wait for it..
@rlemon SterlingArcher is afk: my life is a mess
@neoDev I have this site where there's a chat, and I want the ability to add things to each message I write, intercepting the "send" button and similar functions, according to checkboxes and values in a script-created menu.
@FlorianMargaine hrm?
@Zachiel use node.js and socket.io
14:16
@Zirak interested?
@Zachiel you will be learning something popular at least
the idea is to hold some files in an luks-encrypted partition (e.g. on an usb key), and provide some nice UI to make you use them seamlessly. A good example is private SSH key. You always keep it on this LUKS-encrypted USB key, and you only need to input the key once a day when you need it (it's kept in memory for nicer UX)
@neoDev I don't think I've ever heard about socket.io, and isn't node.js for injecting scripts directly into Chrome, but you need to load them manually every session?
socket.io maybe not so popular for you, but it's simple and cool IMO
for client side stuff use JavaScript
it is client stuff side
14:19
node.js is server side
I'm going to use JS (possibly jQuery since I understand its structure more easily than the original)
jQuery is redundant
I just needed tampermonkey to inject my code into this site
just use JS
The site itself uses jQuery, albeit an old version of it.
14:20
if it is not your website, you should not do it
use react webpack gulp uws and redis
if its yours, then write some code
@neoDev Well, it's just for having an easier time. other people just copy-paste this part from a separate file every time they need to post something, I'd like if it would happen automatically every time I post.
It's not like I want to hack the site into doing something that doesn't usually get done.
create an extension
it will auto-inject your code
I don't even know where to start, but I thought that was what I was using Tampermonkey for.
Auto-injecting my code, I mean
14:23
if you use chrome, I can help you
I do use chrome
I have a base extension for you sec
it will be easy to start with this one
It would be nice if this also worked in firefox (we're allowed to log in twice to the site with two profiles from the same account, but the system needs us to use two separate browsers, and most users use chrome and firefox), but only chrome will be more than enough for me.
So thank you for helping.
omg I can't find it... I'm so disorganized :(
ok lets start frm sctratch
it is simple
go to the chrome extension docs
14:27
just use RoboGist
easy peasy lemon sqeazy
I... I have no idea how to work with git. T_T
@rlemon so it will be cross-browser?
I'm a poor guy who coded webpages in notepad for years, with inline css.
@rlemon so why we should prefer it to chrome extensions?
simplicity?
14:29
@FlorianMargaine Don't file managers do that?
because chrome > all
why should I care about other subpar browsers when it is personal consumption
I intend to share this with fellow users of the same site.
@Zachiel you choose if use chrome extensions, or github.com/rlemon/RoboGist
see what sounds more suitable for you
On the other hand, I would like to pass this around manually. It's not a very popular site, I don't need this extension to be searchable in the extensions store
you can simply create it for yourself, and share with your friends
then you decide what to do
14:32
Ok.
So, @rlemon, sell me this RoboGist.
it's a thing I made. there are many others like it. mine isn't even the best. but the name is snazzy and did I mention I made it?
enjoy
It will also give you eternal happiness
Tell them about the happiness, Rob
@Zirak they don't ask you to plug in your encrypted device when an open() is done on a special file
Since I'm not good with setting up things, i guess I will go with the Extension. At least, there will be some more documentation around. @neoDev, please go on.
Or keep the file content in memory so that you don't need to replug said-device every time
14:35
you need to create a manifest file
@FlorianMargaine oh, so when some file is opened, there's a popup saying "yo, put that drive in", it goes in, you decrypt it and do the rest of the shazam
@FlorianMargaine So I'm guessing you mean for the important file to be kept on the encrypted drive, and the special file signifies "open me from there"
don't spend time doing popup, you don't need it
@neoDev can't I put my commands in the popup?
Still pondering if it's a good idea over simply having the hard disk being encrypted.
you will need the manifest, and a content script, where your "injection" goes
@FlorianMargaine How do you create a special file in a non-special directory/filesystem? Like the private key example. I guess the public key lying next to it is also meant to be public and unencrypted
in the manifest you also specify the URL where this extension will work
14:38
Moreover, isn't storing it in memory a bit of a slap to the idea of encrypting it in the first place?
@Zirak symlink to the special file
@Zachiel if you want to perform actions from the popup, like buttons inputs etc
@Zirak it's a bit like what the ssh agent does. You can choose to have no timeout, or you can keep it in memory for 60s for convenience
you will need to make the popup communicating with thepage
its everything inside docs
shouldn't be difficult
@rlemon I still have no idea what my actual profession title would be. While it's true that I'm mainly a front-end web dev/designer, I'm clearly getting to know back-end quite well, and will get to do mobile and pc-native fairly soon
14:41
try it, and then I am here if you have questions
ok?
I mean, this is for a roleplaying game site. Each person plays one character and in some cases we're asked to state some of those character's stats (e.g. current/total life points, armor value, list of active buffs) that might need updating at every post. So I need a place to manually change some values in fields, and my initial idea was to build a menu div and put checkboxes in it, but if this can be done directly in that popup menu, why not?
I will read the docs and maybe go back to my initial idea.
At least for the "activate stats mode" flags.
The idea being that you can immediately unplug the device
so you can put them in the popup, yes
@rlemon yeah, good point. On the other hand, the companies I worked at either had no employees who did what I did, or what they previously had sucked quite a lot. Except for the one I'm at now, where I'm still getting used to the stack and have been doing basic maintenance while they wait for another design to be approved
it will work like:
14:42
This idea looks cool to me
popup trigger an event
extension listen to this event
Hi All
and perform an action (content script)
that's it
I have a API service in Angularjs. The api service holds all the api calls.
The problem is that some params in those api calls can change. So, I was thinking to hold it in ng expressions
so I literally brought all the innovation there is in most cases. I guess I can cherry pick and try to be realistic enough not to be asked to do things I can't do
14:43
something like this: http://example.com/{{month}}/{{year}}
@FlorianMargaine tbh I never needed to use an external LUKS encrypted media (or at least it never occurred to me to give it a shot), can you give me more use cases? The private SSH key can be "solved" by being a known host to your target, which is something you'd probably do anyway
or is there any better way?
wait I'm stupid it doesn't solve it
Private ssh key, files with credentials (authinfo, s3 credentials, some emacs files with e.g. irc passwords, etc)
@Zirak btw, have you tried emacs' restclient? It's really good.
@Zachiel done something so far?
15:01
@rlemon omg what a clusterfuck
@neoDev being carried away from people on skype for now
I wouldn't say 'old as shit', but I bet you @towc doesn't know what these are
@Zachiel lol :)
@neoDev I'm most productive when working in pairs.
I'm fairly clueless. Looks like those tape things to catch flies?
15:12
cap strips. can be used in a capgun or just setoff with your nail
oh, heh
yeah, never would have gotten there
do they still make capguns?
> you're old as shit
something tells me they would still make them, but another part of me thinks the pc parents would have a lot to complain about
I'm trying to find a kufic art generator
they look so cool
before I tried to find mazes generators (there are many)
but not kufi generators :/
15:23
TIL you can iframe google docs stuff
Anonymous
Hey guys... can someone tell me how a language like TypeScript (for example) is created in itself?
Anonymous
Well, it looks weird...
Anonymous
what else will run TypeScript?
Anonymous
I might be asking this in an inappropriate place, but...
Anonymous
there's no place to ask this, btw
15:27
@TheProHands Well, you can create a core for a program in something else, then create the rest from this core. You might even go as far as re-creating the core with the core.
Just because something can be written in a languange and has been written in that language, it doesn't mean it has always been done that way.
Anonymous
Yes, but, in TypeScript I haven't seen other sources
Anonymous
that can run the language itself
Anonymous
Maybe I didn't look too well at the repository.
Anonymous
Thanks
15:50
In computer science, bootstrapping is the process of writing a compiler (or assembler) in the source programming language that it intends to compile. Applying this technique leads to a self-hosting compiler. An initial minimal core version of the compiler is generated in a different language (which could be assembly language); from that point, successive expanded versions of the compiler are run using the minimal core of the language. Many compilers for many programming languages are bootstrapped, including compilers for BASIC, Algol, C, D, Pascal, PL/I, Factor, Haskell, Modula-2, Oberon, OCaml...
really gotta get the CV sorted (I'm thinking separate versions: a concise one that I can iframe with 512px width, and a proper 2-page one), then fix up a few images, and I guess I'm done already? towc.eu/v2
also gotta make a mobile-friendly version
mobile first
I mean, it's not like it doesn't work on mobile
I like it. Nice and clean. Resume + examples is nice. the resume looks off center, though (thot the container, but the contents).
"have some samples" looks awkward, too.
@towc But the information stuff first. Right now it's in a small scrollable "Google Docs" window, but actually you want that to be the focus of a recruiter. Look at samples second, after they're sold.
15:53
@Luggage stole it from zirak
I agree with brandin, too.
@towc where tf is that hosted?
Azure?
@Brandin ofc. As I said, I need to make a separate concise version that looks good in an iframe
@littlepootis bloody windows server somewhere in italy
I only have ftp control over it
but it's fairly cheap. I'm going to need to change it soon if I want to look serious though, agreed
@towc I was going to say "not aruba, right?"
Aruba was like the bane of me and friends when we used to roleplay on a site hosted there. In the end, we always joked about making a quest to slay this Aruba demon...
@towc how cheap?
15:58
@littlepootis 12€/yr hosting, 8€/yr domain name I think
> Supported languages: Ajax, LINQ, SSI and other
oh right, PHP works on it too, thankfully
saved me a lot of trouble back in the day
but you need to pay extra for any database and stuff
I don't think it even allows websockets
last time I checked was about 3 years ago

« first day (2303 days earlier)      last day (2868 days later) »